/* ============================================================
   NU Result Unified — nu-result.css  (v6.1.0)
   Palette aligned to the NU Result Homepage design system
   (.nrh-root): green #06694d primary + red #e23b46 accent,
   ink #18222f, page #f2f5f9, radii 20/14/12.
   System fonts only. Mobile-first touch targets.
   Scoped under .nucom-redesign so nothing leaks into the theme.
   ============================================================ */

.nucom-redesign {
  /* System font stack — identical to .nrh-root. English only,
     no Bengali fallbacks, no webfonts loaded. */
  --font-primary:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  --font-mono:ui-monospace,SFMono-Regular,Menlo,Consolas,"Liberation Mono",monospace;

  /* ── Brand (from .nrh-root) ── */
  --green:#06694d; --green-soft:#0c8a64; --green-ink:#0a5e44;
  --red:#e23b46;
  --grad:linear-gradient(135deg,#06694d 0%,#0c8a64 100%);

  /* ── Surfaces ── */
  --bg-body:#f2f5f9; --bg-panel:#ffffff; --bg-solid:#ffffff;
  --bg-subtle:#f2f5f9; --bg-header:#06694d;
  /* Soft green wash for the fieldset panel — same hue as --green,
     kept very light so form text stays high-contrast on it. */
  --bg-fieldset:#f8fafa; --border-fieldset:rgba(6,105,77,.10);
  --border-element:rgba(24,34,47,0.09);
  --border-soft:rgba(24,34,47,0.07);

  /* Ambient lift. The 20px blur is what makes a card read as *floating*
     rather than *outlined* — mapping this onto the homepage's --shadow-sm
     (a 4px chip shadow) is what flattened the design. --shadow-premium here
     corresponds to the homepage's --shadow, which is what .nrh-card uses. */
  --shadow-premium:0 2px 20px rgba(24,34,47,.07),0 1px 4px rgba(24,34,47,.04);
  --shadow-hover:0 14px 36px -18px rgba(24,34,47,.30),0 4px 12px rgba(24,34,47,.06);
  --shadow-modal:0 40px 80px -30px rgba(24,34,47,.42);

  /* ── Text ── */
  --text-main:#18222f; --text-body:#3a4654;
  --text-muted:#5a6a7d; --text-hint:#7b8799; --text-inverse:#ffffff;

  /* ── Semantic — mapped onto the homepage's two brand hues ── */
  --color-primary:#06694d; --color-primary-light:#0c8a64; --color-accent:#0a5e44;
  --color-danger:#e23b46; --color-success:#06694d; --color-info:#0c8a64;

  --tint-success:rgba(6,105,77,.08);
  --tint-success-line:rgba(6,105,77,.20);
  --tint-danger:rgba(226,59,70,.07);
  --tint-danger-line:rgba(226,59,70,.16);
  --tint-warn:rgba(234,179,8,.09);
  --tint-warn-line:rgba(234,179,8,.22);
  --warn-ink:#a16207;

  /* ── Geometry (from .nrh-root) ── */
  --radius-lg:20px; --radius-md:14px; --radius-sm:12px; --radius-pill:999px;
  --transition-smooth:all .35s cubic-bezier(.16,1,.3,1);
  --transition-fast:all .18s ease;

  font-family:var(--font-primary);
  color:var(--text-main);
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
  max-width:820px;
  margin:0 auto;
  padding:0 4px 20px;
}
.nucom-redesign *,
.nucom-redesign *::before,
.nucom-redesign *::after { box-sizing:border-box; }
.nucom-redesign button,
.nucom-redesign select,
.nucom-redesign input { font-family:inherit; outline:none; border:none; }

/* Kill the blue flash on tap (Android/iOS) */
.nucom-redesign button,
.nucom-redesign a,
.nucom-redesign .tab-btn,
.nucom-redesign select,
.nucom-redesign input { -webkit-tap-highlight-color:transparent; }

@keyframes nucom-gradient-flow { 0% { background-position:0% 50%; } 100% { background-position:200% 50%; } }
@keyframes nucom-spin { 0% { transform:rotate(0); } 100% { transform:rotate(360deg); } }
@keyframes nucom-shake { 0%,100% { transform:translateX(0);} 20%,60% { transform:translateX(-4px);} 40%,80% { transform:translateX(4px);} }
@keyframes nucom-reveal { from { opacity:0; transform:translateY(24px);} to { opacity:1; transform:translateY(0);} }


/* ── Tabs ─────────────────────────────────────────────────── */
.nucom-redesign .checker-tabs {
  display:flex; gap:4px; padding:0;
  background:var(--bg-panel);
  border:1px solid var(--border-element);
  border-radius:0;
  box-shadow:var(--shadow-premium);
  margin-bottom:20px;
  overflow:hidden;
}
.nucom-redesign .tab-btn {
  flex:1; padding:12px 12px; min-height:44px;
  background:transparent; border-radius:0;
  font-size:.92rem; font-weight:700; color:var(--text-muted); cursor:pointer;
  display:flex; align-items:center; justify-content:center; gap:8px;
  transition:var(--transition-fast);
  position:relative;
}
.nucom-redesign .tab-btn svg { width:16px; height:16px; stroke:currentColor; stroke-width:2.2; fill:none; }
/* Active state uses an underline indicator rather than a lift shadow —
   the strip is overflow:hidden, so a drop shadow would be clipped. */
.nucom-redesign .tab-btn.active {
  background:var(--grad); color:#fff;
}
.nucom-redesign .tab-btn.active::after {
  content:""; position:absolute; left:0; right:0; bottom:0; height:3px;
  background:var(--green-ink);
}
.nucom-redesign .tab-btn:not(.active) { position:relative; }
.nucom-redesign .tab-btn:not(.active)::after {
  content:""; position:absolute; left:0; right:0; bottom:0; height:3px;
  background:transparent; transition:background .18s ease;
}
.nucom-redesign .tab-btn:not(.active):hover {
  background:var(--bg-body); color:var(--green-ink);
}
.nucom-redesign .tab-btn:not(.active):hover::after { background:rgba(6,105,77,.28); }
.nucom-redesign .checker-tab-panel[hidden] { display:none; }

/* ── Premium card ─────────────────────────────────────────── */
.nucom-redesign .nucom-card {
  background:var(--bg-panel);
  border:1px solid var(--border-element);
  border-radius:var(--radius-lg);
  padding:32px;
  box-shadow:var(--shadow-premium);
  transition:var(--transition-smooth);
  position:relative; overflow:hidden;
  margin-bottom:20px;
}
.nucom-redesign .nucom-card::before {
  content:""; position:absolute; top:0; left:0; width:100%; height:3px;
  background:linear-gradient(90deg,var(--green),#3fbf94,var(--green));
  background-size:200%; animation:nucom-gradient-flow 6s linear infinite;
}
.nucom-redesign .nucom-card:hover { box-shadow:var(--shadow-hover); }

/* ── Fieldset ─────────────────────────────────────────────── */
.nucom-redesign fieldset {
  background:var(--bg-fieldset); border:1px solid var(--border-fieldset);
  border-radius:var(--radius-sm); padding:20px; margin:0 0 16px;
}
.nucom-redesign legend {
  font-size:1.05rem; font-weight:800; letter-spacing:-.015em;
  color:var(--green-ink); padding:0 8px;
}

/* ── Form grid ────────────────────────────────────────────── */
.nucom-redesign .form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
.nucom-redesign .form-col-span-2 { grid-column:span 2; }
.nucom-redesign .form-group { display:flex; flex-direction:column; gap:7px; min-width:0; }
.nucom-redesign .form-group label {
  font-size:.86rem; font-weight:700; text-transform:uppercase; letter-spacing:.6px;
  color:var(--text-muted); display:flex; align-items:center; gap:6px;
}
.nucom-redesign .form-group label svg { width:14px; height:14px; stroke:var(--text-muted); stroke-width:2.2; fill:none; }

.nucom-redesign .select-wrapper { position:relative; width:100%; }
.nucom-redesign .select-wrapper::after {
  content:""; position:absolute; right:14px; top:50%; transform:translateY(-50%);
  width:7px; height:4px; background:var(--text-muted);
  clip-path:polygon(100% 0%,0 0%,50% 100%); pointer-events:none;
}
.nucom-redesign select,
.nucom-redesign input[type="text"],
.nucom-redesign input[type="number"] {
  width:100%; padding:13px 16px; min-height:48px;
  border-radius:var(--radius-sm);
  background:var(--bg-solid);
  border:1px solid var(--border-element);
  color:var(--text-main);
  /* 16px floor — anything smaller makes iOS Safari zoom on focus */
  font-size:16px; font-weight:500;
  transition:var(--transition-fast); appearance:none; -webkit-appearance:none;
}
.nucom-redesign select:hover,
.nucom-redesign input[type="text"]:hover,
.nucom-redesign input[type="number"]:hover {
  border-color:rgba(6,105,77,.35);
}
.nucom-redesign select:focus,
.nucom-redesign input[type="text"]:focus,
.nucom-redesign input[type="number"]:focus {
  border-color:var(--green);
  box-shadow:0 0 0 4px rgba(6,105,77,.10);
}
.nucom-redesign input::placeholder { color:var(--text-hint); opacity:.85; }

/* Strip the number spinners — the year field is typed, not stepped */
.nucom-redesign input[type="number"] { -moz-appearance:textfield; }
.nucom-redesign input[type="number"]::-webkit-outer-spin-button,
.nucom-redesign input[type="number"]::-webkit-inner-spin-button { -webkit-appearance:none; margin:0; }

.nucom-redesign .input-icon-wrapper { position:relative; }
.nucom-redesign .input-icon-wrapper input { padding-left:40px; }
.nucom-redesign .input-icon-wrapper > svg {
  position:absolute; left:14px; top:50%; transform:translateY(-50%);
  width:14px; height:14px; stroke:var(--text-muted); stroke-width:2.2; fill:none; pointer-events:none;
}

/* Invalid state (JS toggles .nucom-invalid) */
.nucom-redesign .nucom-invalid {
  border-color:var(--color-danger) !important;
  box-shadow:0 0 0 3px rgba(226,59,70,.14) !important;
}

/* ── Captcha (admission form only; results solve it server-side) ── */
.nucom-redesign .nucom-captcha-row {
  display:flex; align-items:stretch; gap:12px; margin-top:4px;
}
.nucom-redesign .nucom-captcha-top {
  display:flex; align-items:stretch; gap:12px; flex:0 0 auto;
}
.nucom-redesign .nucom-captcha-chip {
  display:flex; align-items:center; justify-content:center;
  min-width:158px; padding:0 22px; height:54px;
  background:var(--bg-subtle); border:1px solid var(--border-element); border-radius:var(--radius-sm);
  font-family:var(--font-mono); font-size:1.35rem; font-weight:700; color:var(--green-ink);
  letter-spacing:1.5px; user-select:none; white-space:nowrap; overflow:visible;
  transition:opacity .35s ease;
}
.nucom-redesign .nucom-captcha-question { display:inline-block; }
.nucom-redesign .nucom-captcha-question.nucom-fading { opacity:.2; }
.nucom-redesign .nucom-captcha-refresh {
  flex:0 0 auto; width:54px; height:54px;
  display:flex; align-items:center; justify-content:center;
  background:var(--bg-solid); border:1px solid var(--border-element); border-radius:var(--radius-sm);
  color:var(--text-muted); cursor:pointer; transition:var(--transition-fast);
}
.nucom-redesign .nucom-captcha-refresh:hover { color:var(--green); border-color:var(--green); background:var(--bg-body); }
.nucom-redesign .nucom-captcha-refresh:active { transform:scale(.94); }
.nucom-redesign .nucom-captcha-refresh svg { width:18px; height:18px; stroke:currentColor; stroke-width:2.4; fill:none; }
.nucom-redesign .nucom-captcha-row input { flex:1 1 auto; height:54px; }


/* ── Buttons ──────────────────────────────────────────────── */
.nucom-redesign .form-actions { display:flex; gap:14px; margin-top:10px; }
.nucom-redesign .form-actions--center { justify-content:center; }

.nucom-redesign .btn {
  padding:14px 26px; min-height:48px; border-radius:12px;
  font-size:1rem; font-weight:700; cursor:pointer;
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  border:1px solid transparent;
  transition:transform .2s cubic-bezier(.16,1,.3,1),box-shadow .2s cubic-bezier(.16,1,.3,1),filter .2s cubic-bezier(.16,1,.3,1),background .2s cubic-bezier(.16,1,.3,1),color .2s cubic-bezier(.16,1,.3,1);
  white-space:nowrap;
}
.nucom-redesign .btn svg { width:17px; height:17px; stroke:currentColor; stroke-width:2.2; fill:none; }
.nucom-redesign .btn-primary {
  flex:2; background:var(--grad); color:#fff;
  box-shadow:0 8px 16px -7px rgba(6,105,77,.55);
}
.nucom-redesign .btn-primary:hover {
  filter:brightness(1.05); transform:translateY(-2px);
  box-shadow:0 12px 22px -8px rgba(6,105,77,.6);
}
.nucom-redesign .btn-primary:active { transform:translateY(0) scale(.988); box-shadow:0 4px 10px -4px rgba(6,105,77,.5); }
.nucom-redesign .btn-secondary-outline:active { transform:scale(.988); }
.nucom-redesign .btn-primary:disabled {
  background:var(--grad); filter:grayscale(.4) opacity(.7);
  cursor:not-allowed; box-shadow:none; transform:none;
}
.nucom-redesign .btn-secondary-outline { flex:1; background:var(--bg-solid); border-color:var(--border-element); color:var(--text-main); }
.nucom-redesign .btn-secondary-outline:hover { background:var(--bg-body); border-color:var(--green); color:var(--green-ink); transform:translateY(-1px); }

/* ── Alert ────────────────────────────────────────────────── */
.nucom-redesign .nucom-alert {
  display:flex; margin-top:14px; padding:12px 15px; border-radius:var(--radius-sm);
  align-items:center; gap:9px; font-size:.92rem; font-weight:600;
  animation:nucom-shake .5s ease-in-out;
}
/* button label / spinner: keep flex alignment when scripts toggle them */
.nucom-redesign .nucom-btn-text,
.nucom-redesign .nucom-btn-spinner,
.nucom-redesign #nuar-btn-text,
.nucom-redesign #nuar-btn-spinner { display:inline-flex; align-items:center; gap:7px; }
.nucom-redesign .nucom-alert svg { width:15px; height:15px; stroke:currentColor; stroke-width:2.2; fill:none; flex-shrink:0; }
.nucom-redesign .nucom-alert--error   { background:var(--tint-danger); border:1px solid var(--tint-danger-line); color:var(--color-danger); }
.nucom-redesign .nucom-alert--success { background:var(--tint-success); border:1px solid var(--tint-success-line); color:var(--green-ink); }

/* ── Loading ──────────────────────────────────────────────── */
.nucom-redesign .nucom-loading {
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:14px;
  padding:40px 16px; margin-bottom:20px;
  background:var(--bg-panel); border:1px solid var(--border-element);
  border-radius:var(--radius-lg); box-shadow:var(--shadow-premium);
}
.nucom-redesign .nucom-loading span { font-size:.98rem; font-weight:700; color:var(--text-main); letter-spacing:.3px; }
.nucom-redesign .nucom-spinner { position:relative; width:48px; height:48px; }
.nucom-redesign .nucom-spinner::before,
.nucom-redesign .nucom-spinner::after {
  content:""; position:absolute; border:3px solid transparent; border-radius:50%;
  animation:nucom-spin 1.2s cubic-bezier(.5,0,.5,1) infinite;
}
.nucom-redesign .nucom-spinner::before { inset:0; border-top-color:var(--green); }
.nucom-redesign .nucom-spinner::after { inset:7px; border-top-color:var(--green-soft); animation-duration:.8s; animation-direction:reverse; }
.nucom-redesign .nucom-spin { width:15px; height:15px; animation:nucom-spin .8s linear infinite; }

/* ── Error panel ──────────────────────────────────────────── */
.nucom-redesign .nucom-error { text-align:center; }
.nucom-redesign .nucom-err-text { margin:0 0 16px; color:var(--color-danger); font-size:1rem; font-weight:700; }

/* ── Result modal (PDF viewer) ────────────────────────────── */
.nucom-redesign .nucom-modal-overlay {
  display:none; position:fixed; inset:0; z-index:99999;
  background:rgba(24,34,47,.5); -webkit-backdrop-filter:blur(6px); backdrop-filter:blur(6px);
  padding:18px; align-items:center; justify-content:center;
  overscroll-behavior:contain;
}
.nucom-redesign .nucom-modal-overlay.nucom-modal-open { display:flex; }
.nucom-redesign .nucom-modal-box {
  width:100%; max-width:860px; max-height:92vh;
  display:flex; flex-direction:column;
  background:var(--bg-panel); border:1px solid var(--border-element);
  border-radius:var(--radius-lg); overflow:hidden;
  box-shadow:var(--shadow-modal);
  animation:nucom-reveal .4s cubic-bezier(.16,1,.3,1);
}
.nucom-redesign .nucom-modal-header {
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:16px 22px; background:var(--grad); position:relative;
  flex:0 0 auto;
}
/* Animated accent strip — the small motion cue that makes the sheet feel alive */
.nucom-redesign .nucom-modal-header::before {
  content:""; position:absolute; top:0; left:0; width:100%; height:3px;
  background:linear-gradient(90deg,rgba(255,255,255,.15),rgba(255,255,255,.65),rgba(255,255,255,.15));
  background-size:200% 100%;
  animation:nucom-gradient-flow 5s linear infinite;
}
.nucom-redesign .nucom-result-title-1 { margin:0; font-size:1rem; font-weight:800; color:#fff; letter-spacing:.2px; }
.nucom-redesign .nucom-result-title-2 { margin:2px 0 0; font-size:.76rem; font-weight:500; color:rgba(255,255,255,.78); letter-spacing:.4px; }
.nucom-redesign .nucom-modal-close {
  flex:0 0 auto; width:40px; height:40px; border-radius:var(--radius-pill);
  display:flex; align-items:center; justify-content:center;
  background:rgba(255,255,255,.14); color:#fff; border:1px solid rgba(255,255,255,.22);
  cursor:pointer; transition:var(--transition-fast);
}
.nucom-redesign .nucom-modal-close:hover { background:var(--red); border-color:var(--red); color:#fff; }
.nucom-redesign .nucom-modal-close svg { width:16px; height:16px; stroke:currentColor; stroke-width:2.5; fill:none; }

.nucom-redesign .nucom-modal-body {
  flex:1 1 auto; overflow:auto; background:var(--bg-subtle); padding:16px;
  -webkit-overflow-scrolling:touch; overscroll-behavior:contain;
}
.nucom-redesign .nucom-pdf-viewer-wrap { width:100%; }
.nucom-redesign .nucom-result-iframe,
.nucom-redesign .nucom-pdf-iframe {
  width:100%; height:66vh; min-height:440px;
  border:1px solid var(--border-element); border-radius:var(--radius-md); background:#fff;
}
.nucom-redesign .nucom-pdf-image-viewer { display:flex; flex-direction:column; gap:12px; }
.nucom-redesign .nucom-pdf-page-wrap { background:#fff; border:1px solid var(--border-element); border-radius:var(--radius-md); overflow:hidden; }
.nucom-redesign .nucom-pdf-page-img { display:block; width:100%; height:auto; }

/* Download-first prompt (mobile, when the host produced no page images) */
.nucom-redesign .nucom-dl-prompt {
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:8px; text-align:center; width:100%; padding:44px 20px; color:var(--text-muted);
}
.nucom-redesign .nucom-dl-prompt svg { color:var(--green); margin-bottom:4px; }
.nucom-redesign .nucom-dl-prompt p { margin:0; font-size:1.05rem; font-weight:800; color:var(--text-main); }
.nucom-redesign .nucom-dl-prompt span { font-size:.9rem; }

.nucom-redesign .nucom-result-actions {
  display:flex; gap:12px; flex-wrap:wrap; flex:0 0 auto;
  padding:16px 22px; border-top:1px solid var(--border-element); background:var(--bg-panel);
}
.nucom-redesign .nucom-result-btn {
  flex:1 1 auto; padding:12px 18px; min-height:48px; border-radius:12px;
  font-size:.98rem; font-weight:700; cursor:pointer; text-decoration:none;
  display:inline-flex; align-items:center; justify-content:center; gap:7px;
  border:1px solid transparent;
  transition:var(--transition-smooth);
}
.nucom-redesign .nucom-result-btn svg { width:16px; height:16px; stroke:currentColor; stroke-width:2.2; fill:none; }
.nucom-redesign .nucom-result-btn--download { background:var(--grad); color:#fff; box-shadow:0 8px 16px -7px rgba(6,105,77,.55); }
.nucom-redesign .nucom-result-btn--download:hover { filter:brightness(1.05); transform:translateY(-1px); box-shadow:0 12px 22px -8px rgba(6,105,77,.6); }
.nucom-redesign .nucom-result-btn--search { background:var(--bg-solid); border-color:var(--border-element); color:var(--text-main); }
.nucom-redesign .nucom-result-btn--search:hover { background:var(--bg-body); border-color:var(--green); color:var(--green-ink); transform:translateY(-1px); }
.nucom-redesign .nucom-pdf-mobile-note {
  display:flex; align-items:center; gap:6px; justify-content:center; flex:0 0 auto;
  padding:11px 14px; font-size:.78rem; font-weight:600; color:var(--text-muted);
  background:var(--bg-subtle); border-top:1px dashed var(--border-element);
}
.nucom-redesign .nucom-pdf-mobile-note svg { width:13px; height:13px; stroke:currentColor; stroke-width:2.2; fill:none; }

/* ── Admission marksheet (rendered by handler.php into the modal body) ── */
.nucom-redesign .nuar-status-banner {
  display:flex; align-items:center; gap:8px; margin-bottom:14px;
  padding:12px 16px; border-radius:var(--radius-sm); font-size:.86rem; font-weight:700; border:1px solid transparent;
}
.nucom-redesign .nuar-status-banner.admitted     { background:var(--tint-success); color:var(--green-ink); border-color:var(--tint-success-line); }
.nucom-redesign .nuar-status-banner.not-admitted { background:var(--tint-warn); color:var(--warn-ink); border-color:var(--tint-warn-line); }
.nucom-redesign .nuar-status-admitted,
.nucom-redesign .nuar-status-pending {
  display:inline-flex; align-items:center; gap:5px; font-family:var(--font-mono);
  font-weight:800; font-size:.76rem; padding:3px 9px; border-radius:6px;
}
.nucom-redesign .nuar-status-admitted { background:var(--tint-success); border:1.5px solid var(--tint-success-line); color:var(--green-ink); }
.nucom-redesign .nuar-status-pending  { background:var(--tint-warn); border:1.5px solid var(--tint-warn-line); color:var(--warn-ink); }

.nucom-redesign .nuar-result-sheet {
  background:var(--bg-panel); border:1px solid var(--border-element);
  border-radius:var(--radius-lg); overflow:hidden; box-shadow:var(--shadow-premium);
}
.nucom-redesign .nuar-sheet-header {
  display:flex; flex-direction:column; gap:2px; padding:20px 22px; text-align:center;
  border-bottom:2px solid var(--border-element); background:var(--bg-subtle);
}
.nucom-redesign .nuar-sheet-org  { margin:0; font-size:1.02rem; font-weight:800; color:var(--text-main); letter-spacing:.2px; }
.nucom-redesign .nuar-sheet-type { margin:0; font-size:.76rem; font-weight:700; color:var(--green-ink); text-transform:uppercase; letter-spacing:.6px; }

.nucom-redesign .nuar-info-wrap { padding:20px 22px; }
.nucom-redesign .nuar-info-table { width:100%; border-collapse:collapse; }
.nucom-redesign .nuar-info-table td { padding:12px 16px; border-bottom:1px solid var(--border-element); font-size:.86rem; vertical-align:top; }
.nucom-redesign .nuar-info-table tr:last-child td { border-bottom:none; }
.nucom-redesign .nu-lbl,
.nucom-redesign .nu-lbl-sm {
  width:1%; white-space:nowrap; background:var(--bg-subtle); color:var(--text-muted);
  font-size:.7rem; font-weight:800; text-transform:uppercase; letter-spacing:.8px;
}
.nucom-redesign .nu-lbl-sm { font-size:.68rem; }
.nucom-redesign .nu-val { color:var(--text-main); font-weight:600; }

.nucom-redesign .nuar-sheet-footer { display:flex; justify-content:flex-end; padding:18px 22px; border-top:1px dashed var(--border-element); background:var(--bg-subtle); }
.nucom-redesign .nuar-footer-sig { display:flex; flex-direction:column; align-items:flex-end; gap:1px; text-align:right; }
.nucom-redesign .nu-sig-top   { font-size:.68rem; color:var(--text-muted); text-transform:uppercase; letter-spacing:.6px; }
.nucom-redesign .nu-sig-title { font-size:.84rem; font-weight:800; color:var(--text-main); border-top:1px solid var(--text-muted); padding-top:4px; margin-top:3px; }
.nucom-redesign .nu-sig-org   { font-size:.74rem; color:var(--text-muted); }

.nucom-redesign .nuar-fetch-error,
.nucom-redesign .nuar-rate-limit-msg {
  padding:14px 16px; border-radius:var(--radius-sm); font-size:.86rem; font-weight:600; text-align:center;
  background:var(--tint-danger); color:var(--color-danger); border:1px solid var(--tint-danger-line);
}

/* ── Utility ──────────────────────────────────────────────── */
.nucom-redesign .nucom-hide { display:none !important; }

.nucom-redesign .btn:focus-visible,
.nucom-redesign .tab-btn:focus-visible,
.nucom-redesign .nucom-captcha-refresh:focus-visible,
.nucom-redesign .nucom-result-btn:focus-visible,
.nucom-redesign .nucom-modal-close:focus-visible { outline:2px solid var(--green); outline-offset:2px; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width:620px) {
  .nucom-redesign { padding:0 6px 20px; }
  .nucom-redesign .nucom-card { padding:20px 16px; border-radius:var(--radius-md); }
  .nucom-redesign .form-grid { grid-template-columns:1fr; gap:15px; }
  .nucom-redesign .form-col-span-2 { grid-column:span 1; }
  .nucom-redesign fieldset { padding:16px 14px; }

  /* Primary action on top, Reset beneath it — thumb reaches the CTA first */
  .nucom-redesign .form-actions { flex-direction:column-reverse; gap:10px; }
  .nucom-redesign .btn { width:100%; flex:1 1 auto; }

  /* Tabs: name under the icon (stacked), all four fit */
  .nucom-redesign .checker-tabs { gap:3px; padding:0; }
  .nucom-redesign .tab-btn { flex-direction:column; gap:5px; font-size:.74rem; padding:9px 3px; min-height:56px; }
  .nucom-redesign .tab-btn .tab-label { display:block; }
  .nucom-redesign .tab-btn svg { width:17px; height:17px; }

  /* Captcha: question + refresh on row 1, answer input on row 2 */
  .nucom-redesign .nucom-captcha-row { flex-direction:column; gap:10px; }
  .nucom-redesign .nucom-captcha-top { width:100%; }
  .nucom-redesign .nucom-captcha-top .nucom-captcha-chip { flex:1 1 auto; min-width:0; }
  .nucom-redesign .nucom-captcha-row input { width:100%; }

  /* Modal goes full-bleed; dvh avoids the iOS URL-bar height jump.
     Safe-area padding clears the home indicator on notched phones. */
  .nucom-redesign .nucom-modal-overlay { padding:0; }
  .nucom-redesign .nucom-modal-box {
    max-width:none; max-height:none;
    height:100vh; height:100dvh;
    border-radius:0; border:none;
  }
  .nucom-redesign .nucom-modal-header { padding:14px 16px; }
  .nucom-redesign .nucom-modal-body { padding:12px; }
  /* dvh, not %, because the ancestor chain has no resolved height */
  .nucom-redesign .nucom-result-iframe { height:64vh; height:64dvh; min-height:320px; }

  .nucom-redesign .nucom-result-actions {
    padding:12px 16px calc(12px + env(safe-area-inset-bottom));
    flex-direction:column-reverse; gap:10px;
  }
  .nucom-redesign .nucom-result-btn { width:100%; }
  .nucom-redesign .nucom-pdf-mobile-note { padding-bottom:calc(11px + env(safe-area-inset-bottom)); }

  /* Marksheet: labels stop being a narrow column and stack instead */
  .nucom-redesign .nuar-info-wrap { padding:14px; }
  .nucom-redesign .nuar-info-table td { padding:9px 11px; font-size:.86rem; }
  .nucom-redesign .nuar-sheet-header,
  .nucom-redesign .nuar-sheet-footer { padding:16px 14px; }
}

/* Very narrow phones (≤360px): the 4-up tab row is the pinch point */
@media (max-width:360px) {
  .nucom-redesign .tab-btn { font-size:.68rem; padding:8px 2px; letter-spacing:-.2px; }
  .nucom-redesign .nucom-card { padding:16px 12px; }
  .nucom-redesign .nuar-info-table td { padding:8px; font-size:.8rem; }
  .nucom-redesign .nu-lbl,
  .nucom-redesign .nu-lbl-sm { font-size:.62rem; letter-spacing:.4px; }
}

@media (prefers-reduced-motion:reduce) {
  .nucom-redesign *, .nucom-redesign *::before, .nucom-redesign *::after {
    animation-duration:.001ms !important; transition-duration:.001ms !important;
  }
}
