@font-face { font-family: 'Playfair Display'; font-style: normal; font-weight: 600; font-display: swap; src: url(../assets/fonts/playfair-display-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Playfair Display'; font-style: normal; font-weight: 700; font-display: swap; src: url(../assets/fonts/playfair-display-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url(../assets/fonts/inter-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url(../assets/fonts/inter-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url(../assets/fonts/inter-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url(../assets/fonts/inter-latin-700-normal.woff2) format('woff2'); }

/* ============================================================
   Certified Counselor License Check
   Palette: navy + teal with a gold accent (seals / certificates),
   soft mint surfaces, gradients and layered shadows.
   Illustrations live in assets/images (SVG, served from this site).
   Type: Playfair Display (headings) / Inter (body & UI), self-hosted in assets/fonts
   ============================================================ */

:root {
  --navy: #0E2238;
  --white: #FFFFFF;
  /* NBCC brand colours: used for the header and footer */
  --nbcc-navy: #16223E;
  --nbcc-teal: #2D6B7B;
  --radius-sm: 6px;
  --radius-md: 10px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--white);
  color: var(--navy);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  line-height: 1.55;
}
h1, h2, h3 {
  font-family: 'Playfair Display', Georgia, Cambria, 'Times New Roman', serif;
  color: var(--navy);
  line-height: 1.25;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); font-weight: 700; }
h2 { font-size: clamp(1.4rem, 2.3vw, 1.85rem); font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0 0 1em; color: var(--navy); max-width: 62ch; }
a { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }
img { max-width: 100%; display: block; border-radius: var(--radius-md); }
:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

.wrap { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

/* Navy surfaces: everything inside flips to white */
.cta-band, .contact-aside { background: var(--navy); color: var(--white); }
.site-header, .admin-header { background: var(--nbcc-navy); color: var(--white); }
.site-footer { background: var(--white); color: #000; }
.cta-band h2, .cta-band p,
.contact-aside h2, .contact-aside a { color: var(--white); }

/* Buttons: navy on white surfaces, white on navy surfaces; hover inverts */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.65em 1.4em; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 0.95rem; cursor: pointer; text-decoration: none;
  border: 2px solid var(--navy); transition: transform 0.15s ease;
  font-family: inherit;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--navy); color: var(--white); }
.btn-primary:hover { background: var(--white); color: var(--navy); }
.btn-ghost { background: var(--white); color: var(--navy); }
.btn-ghost:hover { background: var(--navy); color: var(--white); }
.btn-large { padding: 0.85em 1.8em; font-size: 1rem; }
.btn-block { width: 100%; }
.btn[disabled] { border-style: dashed; cursor: progress; }

.site-header .btn, .cta-band .btn, .admin-header .btn { border-color: var(--white); }
.site-header .btn-primary, .cta-band .btn-primary { background: var(--white); color: var(--navy); }
.site-header .btn-primary:hover { background: var(--nbcc-navy); color: var(--white); }
.cta-band .btn-primary:hover { background: var(--navy); color: var(--white); }
.cta-band .btn-ghost { background: var(--navy); color: var(--white); }
.admin-header .btn-ghost { background: var(--nbcc-navy); color: var(--white); }
.cta-band .btn-ghost:hover, .admin-header .btn-ghost:hover { background: var(--white); color: var(--navy); }

/* Header / nav */
.site-header { position: sticky; top: 0; z-index: 40; border-bottom: 3px solid var(--nbcc-teal); }
.header-row { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--white); font-weight: 700; font-size: 1.05rem; text-decoration: none; }
.brand-mark { color: inherit; display: inline-flex; flex-shrink: 0; }
.brand-text { line-height: 1.2; }
.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav a { color: var(--white); font-weight: 500; font-size: 0.95rem; padding: 6px 2px; border-bottom: 2px solid transparent; text-decoration: none; }
.site-nav a:hover, .site-nav a.active { border-bottom-color: var(--white); }
.site-nav a.nav-cta { border: 2px solid var(--white); padding: 0.6em 1.3em; }
.site-nav a.nav-cta:hover { border-bottom: 2px solid var(--white); }

.nav-toggle { color: var(--white); display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--white); display: block; }

@media (max-width: 820px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: absolute; top: 72px; left: 0; right: 0; background: var(--nbcc-navy); border-bottom: 3px solid var(--nbcc-teal);
    flex-direction: column; align-items: flex-start; gap: 0; padding: 8px 24px 20px;
    max-height: 0; overflow: hidden; transition: max-height 0.3s ease;
  }
  .site-nav.open { max-height: 320px; }
  .site-nav a { width: 100%; padding: 12px 0; border-bottom: 1px solid var(--nbcc-teal); }
  .site-nav a.nav-cta { margin-top: 10px; width: fit-content; }
}

/* Hero */
.hero { background: var(--white); color: var(--navy); padding: 72px 0 96px; overflow: hidden; border-bottom: 2px solid var(--navy); }
.hero-row { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
.eyebrow-plain { color: inherit; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.85rem; margin-bottom: 10px; }
.hero-lede { font-size: 1.05rem; max-width: 48ch; }
.hero-actions { display: flex; gap: 14px; margin: 28px 0 40px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 36px; }
.hero-stats strong { display: block; font-family: 'Playfair Display', Georgia, Cambria, 'Times New Roman', serif; font-size: 1.6rem; color: var(--navy); }
.hero-stats span { font-size: 0.85rem; color: var(--navy); }

.hero-panel { display: flex; justify-content: center; animation: floatIn 0.9s ease both; }
@keyframes floatIn { from { opacity: 0; transform: translateY(18px) scale(0.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
.panel-card { background: var(--navy); color: var(--white); border-radius: var(--radius-md); padding: 26px; width: 100%; max-width: 340px; }
.panel-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px dashed var(--white); font-size: 0.92rem; }
.panel-label { color: var(--white); }
.panel-value { font-weight: 700; }
.panel-status { margin-top: 18px; display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--white); font-size: 0.95rem; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--white); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

/* Sections */
.section { padding: 72px 0; }
.page-intro { background: var(--white); color: var(--navy); padding: 64px 0 56px; border-bottom: 2px solid var(--navy); }
.page-intro h1 { max-width: 20ch; }

.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 36px; }
.how-card { background: var(--white); border: 2px solid var(--navy); border-radius: var(--radius-md); padding: 28px; }
.how-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%; background: var(--navy); color: var(--white);
  font-family: 'Playfair Display', Georgia, Cambria, 'Times New Roman', serif; font-weight: 700; margin-bottom: 14px;
}

.cta-band-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { margin-bottom: 4px; }
.cta-band p { margin: 0; }

/* About */
.about-block { border-bottom: 2px solid var(--navy); }
.about-row { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.about-block.reverse .about-row { direction: rtl; }
.about-block.reverse .about-text, .about-block.reverse .about-media { direction: ltr; }
.about-media img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.about-media svg { display: block; width: 100%; height: auto; aspect-ratio: 4/3; border-radius: var(--radius-sm); background: var(--nbcc-teal-soft, #e6f2f2); color: var(--navy); }
.svg-sprite { position: absolute; }
svg.value-icon { filter: none; color: var(--navy); }

.values-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 32px; }
.value-card { text-align: left; }
.value-icon { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; margin-bottom: 14px; }


.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* Check page */
.check-row { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.check-form { background: var(--white); border: 2px solid var(--navy); border-radius: var(--radius-md); padding: 28px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 700; font-size: 0.9rem; margin-bottom: 6px; color: var(--navy); }
.field input, .field select, .field textarea {
  width: 100%; padding: 0.7em 0.8em; border: 1px solid var(--navy); border-radius: var(--radius-sm);
  font-family: inherit; font-size: 0.95rem; background: var(--white); color: var(--navy);
}
.field input::placeholder, .field textarea::placeholder { color: var(--navy); opacity: 1; font-style: italic; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--navy); outline-offset: 2px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field-hint { font-size: 0.85rem; color: var(--navy); margin: -6px 0 16px; }

.check-result { min-height: 220px; }
.result-placeholder { text-align: center; color: var(--navy); padding: 56px 20px; border: 2px dashed var(--navy); border-radius: var(--radius-md); }
.result-placeholder svg { color: var(--navy); margin-bottom: 12px; }

.result-card { background: var(--white); border: 2px solid var(--navy); border-radius: var(--radius-md); padding: 24px; margin-bottom: 16px; animation: fadeIn 0.35s ease both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.result-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.result-top h3 { margin: 0; }
.result-detail { display: flex; justify-content: space-between; padding: 6px 0; font-size: 0.92rem; border-bottom: 1px dashed var(--navy); }
.result-detail span:first-child { font-weight: 700; }
.result-remarks { margin-top: 12px; font-size: 0.9rem; font-style: italic; }
.result-upsell { margin-top: 16px; padding-top: 14px; border-top: 1px dashed rgba(14, 34, 56, 0.25); }
.result-upsell p { margin: 0 0 10px; font-size: 0.88rem; color: var(--navy); }
.btn-small { padding: 0.5em 1.1em; font-size: 0.85rem; }

/* About page: pricing callout */
.pricing-note { background: var(--white); border-top: 2px solid var(--navy); border-bottom: 2px solid var(--navy); }
.pricing-note-inner { max-width: 62ch; text-align: center; margin: 0 auto; }
.pricing-note-inner p { margin: 0 0 10px; }
.pricing-note-inner a { color: var(--navy); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* Status badges: told apart by fill, border style and symbol, not colour */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 0.3em 0.85em; border-radius: 999px; font-weight: 700; font-size: 0.8rem; text-transform: capitalize; border: 2px solid var(--navy); white-space: nowrap; }
.badge::before { line-height: 1; font-weight: 700; }
.badge-valid     { background: var(--navy); color: var(--white); }
.badge-valid::before { content: '\2713'; }
.badge-expired   { background: var(--white); color: var(--navy); }
.badge-expired::before { content: '\25CB'; }
.badge-suspended { background: var(--white); color: var(--navy); border-style: dashed; }
.badge-suspended::before { content: '\2016'; }
.badge-revoked   { background: var(--navy); color: var(--white); border: 3px double var(--white); box-shadow: 0 0 0 2px var(--navy); }
.badge-revoked::before { content: '\00D7'; font-size: 1.1em; }

.error-box { background: var(--navy); color: var(--white); font-weight: 600; padding: 16px 18px; border-radius: var(--radius-sm); }
.notice-box { background: var(--white); color: var(--navy); border: 2px solid var(--navy); padding: 16px 18px; border-radius: var(--radius-sm); }

/* Contact */
.contact-row { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: start; }
.contact-aside { border-radius: var(--radius-md); padding: 28px; }
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { padding: 12px 0; border-bottom: 1px solid var(--white); font-size: 0.92rem; }
.contact-list li span { display: block; font-weight: 700; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 3px; }

.form-status { font-size: 0.9rem; min-height: 1.4em; margin: 10px 0 0; }
.form-status.success { color: var(--navy); font-weight: 600; }
.form-status.success::before { content: '\2713  '; }
.form-status.error { color: var(--navy); font-weight: 700; }
.form-status.error::before { content: '\00D7  '; }

/* Footer */
.site-footer { padding: 0; margin-top: 0; border-top: 4px solid var(--nbcc-teal); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: 48px; padding-top: 56px; padding-bottom: 48px; }
.brand-footer { color: #000; margin-bottom: 14px; }
.footer-tag { max-width: 32ch; color: #000; margin: 0 0 22px; font-size: 0.92rem; }
.footer-apply { font-size: 0.92rem; margin: 0 0 18px; color: #000; max-width: 34ch; }
.footer-apply + .footer-apply { margin-top: -8px; }
.footer-apply a { color: #000; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.footer-apply a:hover { text-decoration-color: var(--nbcc-teal); text-decoration-thickness: 2px; }
.footer-cta { padding: 0.55em 1.2em; font-size: 0.88rem; }
.site-footer .btn { border-color: #000; }
.site-footer .btn-primary { background: #000; color: var(--white); }
.site-footer .btn-primary:hover { background: var(--nbcc-navy); color: #000; }
.footer-heading { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: #000; margin: 0 0 16px; padding-bottom: 10px; border-bottom: 2px solid var(--nbcc-teal); display: inline-block; }
.footer-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 0.92rem; }
.footer-list a { color: #000; text-decoration: none; }
.footer-list a:hover { text-decoration: underline; text-underline-offset: 3px; }
.footer-bar { border-top: 1px solid var(--nbcc-teal); padding: 18px 0; }
.footer-bar-row { display: flex; justify-content: space-between; align-items: center; gap: 8px 24px; flex-wrap: wrap; }
.footer-copy, .footer-note { font-size: 0.82rem; margin: 0; color: #000; max-width: none; }
.footer-note { }

@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; padding-top: 44px; padding-bottom: 36px; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bar-row { flex-direction: column; align-items: flex-start; }
}

/* Honeypot field: invisible to real visitors, left for bots to fill in */
.hp-field { position: absolute; left: -9999px; top: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Cookie banner */
.cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; background: var(--white); color: #000; border-top: 4px solid var(--nbcc-teal); box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.12); padding: 16px 0; animation: fadeIn 0.35s ease both; padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
.cookie-row { display: flex; align-items: center; justify-content: space-between; gap: 16px 28px; flex-wrap: wrap; }
.cookie-text { margin: 0; font-size: 0.92rem; color: #000; max-width: 70ch; }
.cookie-text a { color: #000; font-weight: 700; }
.cookie-actions { display: flex; gap: 12px; flex-shrink: 0; }
.cookie-banner .btn { padding: 0.55em 1.4em; font-size: 0.9rem; border-color: var(--nbcc-navy); }
.cookie-banner .btn-primary { background: var(--nbcc-navy); color: var(--white); }
.cookie-banner .btn-primary:hover { background: var(--white); color: var(--nbcc-navy); }
.cookie-banner .btn-ghost { background: var(--white); color: var(--nbcc-navy); }
.cookie-banner .btn-ghost:hover { background: var(--nbcc-navy); color: var(--white); }
@media (max-width: 560px) {
  .cookie-actions { width: 100%; }
  .cookie-actions .btn { flex: 1; }
}

/* Legal pages */
.legal-body h2 { font-size: 1.3rem; margin-top: 1.8em; }
.legal-body p, .legal-body li { max-width: 70ch; }
.legal-body ul { padding-left: 1.2em; margin: 0 0 1em; }
.legal-updated { font-size: 0.9rem; margin-top: 8px; }

@media (max-width: 860px) {
  .hero-row, .about-row, .check-row, .contact-row, .how-grid, .values-grid { grid-template-columns: 1fr; }
  .about-block.reverse .about-row { direction: ltr; }
}

/* ============================================================
   Admin
   ============================================================ */
.admin-body { background: var(--white); }
.admin-login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.admin-login-card { background: var(--white); border: 2px solid var(--navy); border-radius: var(--radius-md); padding: 36px; width: 100%; max-width: 380px; }
.brand-admin { color: var(--navy); margin-bottom: 20px; }
.back-link { display: block; text-align: center; margin-top: 16px; font-size: 0.9rem; color: var(--navy); }

.admin-header { border-bottom: 3px solid var(--nbcc-teal); }
.admin-header-row { display: flex; justify-content: space-between; align-items: center; height: 68px; }
.admin-header .brand-admin { color: var(--white); margin-bottom: 0; }
.admin-header-actions { display: flex; align-items: center; gap: 16px; }
.admin-name { font-size: 0.88rem; color: var(--white); }

.admin-main { padding: 40px 24px 80px; }
.admin-toolbar { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.muted { color: var(--navy); margin: 0; }

.admin-table-wrap { background: var(--white); border: 2px solid var(--navy); border-radius: var(--radius-md); overflow: hidden; overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; min-width: 780px; }
.admin-table th { text-align: left; background: var(--navy); padding: 12px 16px; font-weight: 700; color: var(--white); }
.admin-table td { padding: 12px 16px; border-bottom: 1px solid var(--navy); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.row-actions { white-space: nowrap; }
.row-actions button { margin-right: 8px; background: var(--white); color: var(--navy); border: 1px solid var(--navy); border-radius: var(--radius-sm); padding: 5px 10px; font-size: 0.82rem; cursor: pointer; font-family: inherit; font-weight: 600; }
.row-actions button:hover { background: var(--navy); color: var(--white); }

.modal-overlay { position: fixed; inset: 0; background: var(--navy); display: none; align-items: center; justify-content: center; padding: 20px; z-index: 100; }
.modal-overlay.open { display: flex; }
.modal-card { background: var(--white); border: 2px solid var(--white); border-radius: var(--radius-md); padding: 28px; width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto; animation: fadeIn 0.25s ease both; }
.modal-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 20px; }


/* ============================================================
   Responsive layer: fluid spacing, tablet grids, large screens,
   touch targets, and stacked admin table on phones.
   Appended last so it refines the rules above.
   ============================================================ */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
img, video, iframe { max-width: 100%; height: auto; }
h1, h2, h3, p, li, td, .brand-text { overflow-wrap: anywhere; }

.wrap {
  padding-left: max(clamp(16px, 4vw, 24px), env(safe-area-inset-left, 0px));
  padding-right: max(clamp(16px, 4vw, 24px), env(safe-area-inset-right, 0px));
}
.section { padding: clamp(44px, 7vw, 72px) 0; }
.hero { padding: clamp(40px, 7vw, 72px) 0 clamp(48px, 9vw, 96px); }
.page-intro { padding: clamp(40px, 6vw, 64px) 0 clamp(32px, 5vw, 56px); }
.hero-row { gap: clamp(28px, 5vw, 56px); }
.about-row, .check-row, .contact-row { gap: clamp(28px, 4.5vw, 48px); }
.hero-stats { flex-wrap: wrap; gap: 16px clamp(20px, 4vw, 36px); }
.how-grid, .values-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.result-detail, .panel-row { flex-wrap: wrap; gap: 2px 16px; }

/* Header */
.header-row { gap: 12px; }
.brand { min-width: 0; }
.nav-toggle { min-width: 44px; min-height: 44px; align-items: center; justify-content: center; }
@media (max-width: 820px) {
  .site-nav { padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); }
  .site-nav.open { max-height: calc(100vh - 72px); max-height: calc(100dvh - 72px); overflow-y: auto; }
}

/* Tablet and phone */
@media (max-width: 860px) {
  .hero-panel { justify-content: flex-start; }
  .panel-card { max-width: 440px; }
  input, select, textarea, .field input, .field select, .field textarea { font-size: 1rem; }
}
@media (min-width: 861px) and (max-width: 1024px) {
  .footer-grid { gap: 28px; }
  .hero-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .hero-actions .btn { flex: 1 1 100%; text-align: center; justify-content: center; }
}
@media (max-width: 380px) {
  .brand { font-size: 0.95rem; }
  .brand-text { font-size: 0.95rem; }
}

/* Touch devices: comfortable tap targets */
@media (pointer: coarse) {
  .btn, .row-actions button, .site-nav a { min-height: 44px; }
  .row-actions button { padding: 8px 14px; }
}

/* Large screens: let the layout and type scale up */
@media (min-width: 1500px) { html { font-size: 106.25%; } .wrap { max-width: 1320px; } }
@media (min-width: 2000px) { html { font-size: 118.75%; } .wrap { max-width: 1560px; } }

/* Short landscape screens (phones on their side) */
@media (max-height: 520px) and (orientation: landscape) {
  .hero, .section, .page-intro { padding-top: 32px; padding-bottom: 40px; }
}

/* ---------- Admin ---------- */
.admin-login-wrap { min-height: 100vh; min-height: 100dvh; padding: clamp(16px, 4vw, 24px); }
.admin-login-card { max-width: 420px; padding: clamp(22px, 6vw, 36px); }
.admin-header-row { height: auto; min-height: 68px; padding-top: 10px; padding-bottom: 10px; gap: 12px 16px; flex-wrap: wrap; }
.admin-header-actions { gap: 10px 14px; flex-wrap: wrap; }
.admin-name { max-width: 45vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-main { padding: clamp(24px, 5vw, 40px) clamp(16px, 4vw, 24px) clamp(48px, 8vw, 80px); }
.modal-overlay { padding: max(12px, env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) max(12px, env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px)); }
.modal-card { max-height: 90vh; max-height: 90dvh; }

@media (max-width: 560px) {
  .admin-toolbar > .btn { width: 100%; }
  .modal-card { padding: 20px; }
  .modal-actions { flex-direction: column-reverse; }
  .modal-actions .btn, .modal-actions button { width: 100%; }
}

/* Phones: each table row becomes a labelled card */
@media (max-width: 760px) {
  .admin-table { min-width: 0; }
  .admin-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .admin-table, .admin-table tbody, .admin-table tr, .admin-table td { display: block; width: 100%; }
  .admin-table tr { padding: 8px 0; border-bottom: 2px solid var(--navy); }
  .admin-table tr:last-child { border-bottom: none; }
  .admin-table td { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 8px 16px; border-bottom: none; text-align: right; }
  .admin-table td[data-label]::before { content: attr(data-label); font-weight: 700; text-align: left; flex-shrink: 0; }
  .admin-table td[colspan] { display: block; text-align: left; }
  .admin-table td.row-actions { justify-content: flex-end; flex-wrap: wrap; white-space: normal; }
  .row-actions button { margin: 0 0 0 8px; }
}

/* ---------- Admin: messages & requests ---------- */
.messages-toolbar { margin-top: clamp(32px, 6vw, 56px); }
.message-list { display: grid; gap: 12px; }
.message-card { border: 2px solid var(--navy); border-radius: var(--radius-md); padding: 16px 18px; background: var(--white); }
.message-card.is-read { opacity: 0.7; border-width: 1px; }
.message-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; }
.message-body { white-space: pre-wrap; margin: 8px 0 12px; }
.badge-unread { background: var(--navy); color: var(--white); font-size: 0.75rem; padding: 2px 10px; border-radius: 999px; vertical-align: middle; }


/* ============================================================
   VISUAL REFRESH: colour, depth, imagery
   ============================================================ */
:root {
  --teal: #2D6B7B;
  --teal-dark: #1F5361;
  --teal-light: #4FA3B5;
  --mint: #EAF4F6;
  --paper: #F6F9FB;
  --line: #D9E6EA;
  --gold: #C8A24A;
  --gold-light: #F1DC9A;
  --ink-soft: #3B4A60;
  --shadow-sm: 0 2px 8px rgba(14, 34, 56, 0.08);
  --shadow-md: 0 12px 32px rgba(14, 34, 56, 0.14);
  --shadow-lg: 0 24px 60px rgba(14, 34, 56, 0.24);
  --radius-lg: 18px;
}

body { color: var(--navy); }
p { color: var(--ink-soft); }
h1, h2, h3 { letter-spacing: -0.01em; }

/* ---------- Buttons ---------- */
.btn { border-radius: 999px; box-shadow: 0 2px 0 rgba(14, 34, 56, 0.06); transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(14, 34, 56, 0.18); }
.btn-primary { background: var(--teal); border-color: var(--teal); color: var(--white); }
.btn-primary:hover { background: var(--teal-dark); border-color: var(--teal-dark); color: var(--white); }
.btn-ghost { background: var(--white); border-color: var(--teal); color: var(--teal-dark); }
.btn-ghost:hover { background: var(--teal); border-color: var(--teal); color: var(--white); }

/* ---------- Header ---------- */
.site-header { box-shadow: 0 6px 24px rgba(14, 34, 56, 0.18); border-bottom-color: var(--gold); }
.site-nav a.nav-cta { border-radius: 999px; }
.brand-mark { background: rgba(255, 255, 255, 0.1); border-radius: 50%; padding: 3px; }

/* ---------- Eyebrow pill ---------- */
.eyebrow-pill {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px;
  padding: 6px 14px; border-radius: 999px; background: var(--mint); color: var(--teal-dark);
  border: 1px solid var(--line); font-size: 0.82rem; font-weight: 700; letter-spacing: 0.04em; max-width: none;
}
.eyebrow-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: #1d9a60; animation: pulse 1.8s ease-in-out infinite; }
.eyebrow-center { display: flex; width: fit-content; margin-left: auto; margin-right: auto; }

/* ---------- Hero ---------- */
.hero {
  position: relative; border-bottom: 0;
  background:
    radial-gradient(900px 420px at 92% -8%, rgba(45, 107, 123, 0.20), transparent 62%),
    radial-gradient(700px 360px at -8% 108%, rgba(200, 162, 74, 0.16), transparent 62%),
    linear-gradient(180deg, #F2F9FB 0%, #FFFFFF 100%);
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.5;
  background-image: radial-gradient(rgba(45, 107, 123, 0.16) 1px, transparent 1px); background-size: 26px 26px;
  -webkit-mask-image: linear-gradient(120deg, transparent 30%, #000 100%); mask-image: linear-gradient(120deg, transparent 30%, #000 100%);
}
.hero .wrap { position: relative; }
.hl { color: var(--teal); background: linear-gradient(transparent 68%, rgba(200, 162, 74, 0.35) 68%); padding: 0 2px; }
.hero-stats > div { padding-left: 14px; border-left: 3px solid var(--gold); }
.hero-stats strong { color: var(--teal-dark); }
.hero-stats span { color: var(--ink-soft); }

.hero-visual { position: relative; width: 100%; max-width: 560px; margin: 0 auto; padding: 18px 0 76px; }
.hv-cert { width: 90%; margin-left: auto; border-radius: 10px; background: #fff; box-shadow: var(--shadow-lg); transform: rotate(2.5deg); animation: floatIn 0.9s ease both; }
.hv-card { position: absolute; left: 0; bottom: 26px; width: 56%; border-radius: 16px; box-shadow: var(--shadow-lg); transform: rotate(-5deg); animation: floatIn 1.1s ease both; }
.hv-seal { position: absolute; top: -8px; right: -14px; width: 108px; border-radius: 50%; filter: drop-shadow(0 12px 18px rgba(14, 34, 56, 0.35)); animation: bob 5s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-8px) rotate(3deg); } }
.hero-visual .hero-panel { position: absolute; right: -4px; bottom: 0; width: 54%; justify-content: flex-end; animation: floatIn 1.3s ease both; }
.hero-visual .panel-card { max-width: none; padding: 16px 18px; border-radius: 16px; box-shadow: var(--shadow-lg); background: linear-gradient(145deg, var(--nbcc-navy), #1b4a5c); border: 1px solid rgba(255, 255, 255, 0.12); }
.hero-visual .panel-row { padding: 7px 0; font-size: 0.82rem; border-bottom: 1px dashed rgba(255, 255, 255, 0.35); }
.hero-visual .panel-label { opacity: 0.8; }
.hero-visual .panel-status { margin-top: 12px; font-size: 0.86rem; }
.panel-status .status-dot { background: #4ADE80; box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.25); }

/* ---------- Trust strip ---------- */
.trust { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 22px 0; }
.trust-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 40px; }
.trust-label { font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 700; color: var(--teal); }
.trust-item { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 0.92rem; color: var(--navy); }
.trust-item svg { width: 28px; height: 28px; color: var(--teal); flex-shrink: 0; }

/* ---------- Section headings ---------- */
.section-head { text-align: center; max-width: 680px; margin: 0 auto 12px; }
.section-head p { margin-left: auto; margin-right: auto; }

/* ---------- How it works ---------- */
.how { background: #fff; }
.how-card { position: relative; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: 30px 28px; transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; overflow: hidden; }
.how-card::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 4px; background: linear-gradient(90deg, var(--teal), var(--gold)); }
.how-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: var(--teal-light); }
.how-num { position: absolute; top: 16px; right: 22px; width: auto; height: auto; background: none; margin: 0; color: rgba(45, 107, 123, 0.16); font-size: 3.2rem; line-height: 1; }
.how-icon { display: inline-flex; align-items: center; justify-content: center; width: 54px; height: 54px; border-radius: 16px; background: var(--mint); color: var(--teal); margin-bottom: 16px; }
.how-icon svg { width: 28px; height: 28px; }
.how-grid .reveal:nth-child(2) { transition-delay: .12s; }
.how-grid .reveal:nth-child(3) { transition-delay: .24s; }

/* ---------- Split layouts with imagery ---------- */
.split { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.split.flip > .media-frame { order: 2; }
.media-frame { position: relative; isolation: isolate; }
.media-frame > img.main { width: 100%; border-radius: 16px; box-shadow: var(--shadow-lg); background: #fff; }
.media-frame::before { content: ""; position: absolute; inset: 20px -18px -18px 20px; border-radius: 20px; background: linear-gradient(135deg, var(--teal), var(--nbcc-navy)); opacity: 0.14; z-index: -1; }
.media-frame.gold::before { background: linear-gradient(135deg, var(--gold), var(--teal)); opacity: 0.28; }
.media-float { position: absolute; width: 46%; right: -3%; bottom: -9%; border-radius: 14px; box-shadow: var(--shadow-lg); transform: rotate(3deg); }
.media-seal { position: absolute; width: 22%; min-width: 84px; left: -4%; top: -6%; filter: drop-shadow(0 10px 16px rgba(14, 34, 56, 0.35)); border-radius: 50%; animation: bob 6s ease-in-out infinite; }
.showcase { background: linear-gradient(180deg, #fff 0%, var(--paper) 100%); }
.showcase .media-frame { margin-bottom: 36px; }

.check-list { list-style: none; padding: 0; margin: 18px 0 22px; }
.check-list li { display: flex; align-items: flex-start; gap: 12px; padding: 7px 0; color: var(--ink-soft); }
.check-list li::before { content: "\2713"; flex: 0 0 24px; height: 24px; margin-top: 1px; border-radius: 50%; background: var(--teal); color: #fff; font-weight: 700; font-size: 0.78rem; display: inline-flex; align-items: center; justify-content: center; }
.badge-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }

/* ---------- State boards band ---------- */
.boards { position: relative; overflow: hidden; color: #fff; background: linear-gradient(135deg, #0E2238 0%, #16223E 50%, #1F5361 100%); }
.boards::after { content: ""; position: absolute; right: -120px; top: -120px; width: 460px; height: 460px; background: url(../assets/images/state-board-seal.svg) center / contain no-repeat; opacity: 0.07; pointer-events: none; }
.boards .wrap { position: relative; z-index: 1; }
.boards h2, .boards h3 { color: #fff; }
.boards p { color: #D3E3E8; }
.boards .check-list li { color: #E4EEF1; }
.boards .check-list li::before { background: var(--gold); color: var(--nbcc-navy); }
.boards .media-frame::before { background: rgba(255, 255, 255, 0.14); opacity: 1; }
.boards .media-frame > img.main { border: 6px solid rgba(255, 255, 255, 0.14); }
.boards .eyebrow-pill { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.25); color: var(--gold-light); }
.boards .btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.7); }
.boards .btn-ghost:hover { background: #fff; color: var(--nbcc-navy); border-color: #fff; }

/* ---------- Protect section ---------- */
.protect { background: var(--mint); }

/* ---------- FAQ ---------- */
.faq-list { max-width: 820px; margin: 28px auto 0; }
.faq-list details { background: #fff; border: 1px solid var(--line); border-radius: 14px; margin-bottom: 12px; box-shadow: var(--shadow-sm); transition: box-shadow .2s ease, border-color .2s ease; }
.faq-list details[open] { box-shadow: var(--shadow-md); border-color: var(--teal-light); }
.faq-list summary { cursor: pointer; list-style: none; padding: 18px 22px; font-weight: 700; display: flex; justify-content: space-between; align-items: center; gap: 16px; color: var(--navy); }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; font-size: 1.5rem; line-height: 1; color: var(--teal); flex-shrink: 0; }
.faq-list details[open] summary::after { content: "\2212"; }
.faq-list details p { padding: 0 22px 18px; margin: 0; max-width: none; }

/* ---------- CTA band ---------- */
.cta-band { position: relative; overflow: hidden; background: linear-gradient(120deg, var(--nbcc-navy) 0%, #17405a 55%, var(--teal) 100%); border-top: 4px solid var(--gold); }
.cta-band::after { content: ""; position: absolute; right: 22%; top: 50%; width: 280px; height: 280px; transform: translateY(-50%); background: url(../assets/images/state-board-seal.svg) center / contain no-repeat; opacity: 0.12; pointer-events: none; }
.cta-band .wrap { position: relative; z-index: 1; }
.cta-band p { color: #D3E3E8; }

/* ---------- Inner-page banner ---------- */
.page-intro { position: relative; overflow: hidden; color: #fff; border-bottom: 4px solid var(--gold); background: linear-gradient(120deg, var(--nbcc-navy) 0%, #17405a 60%, var(--teal) 100%); }
.page-intro::after { content: ""; position: absolute; right: max(2vw, 16px); top: 50%; width: clamp(160px, 24vw, 300px); aspect-ratio: 1; transform: translateY(-50%); background: url(../assets/images/state-board-seal.svg) center / contain no-repeat; opacity: 0.16; pointer-events: none; }
.page-intro .wrap { position: relative; z-index: 1; }
.page-intro h1 { color: #fff; }
.page-intro p, .page-intro .hero-lede { color: #D8E7EC; }

/* ---------- About page ---------- */
.about-block { border-bottom: 1px solid var(--line); }
.about-block.reverse { background: var(--paper); }
.about-media img { width: 100%; aspect-ratio: auto; object-fit: contain; border-radius: 16px; box-shadow: var(--shadow-lg); background: #fff; }
.about-media { position: relative; isolation: isolate; }
.about-media::before { content: ""; position: absolute; inset: 18px -14px -14px 18px; border-radius: 20px; background: linear-gradient(135deg, var(--teal), var(--nbcc-navy)); opacity: 0.12; z-index: -1; }
.pricing-note { background: linear-gradient(135deg, var(--mint), #fff); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pricing-note-inner { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--gold); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); padding: 34px clamp(20px, 5vw, 44px); max-width: 720px; }
.pricing-note-inner p { margin-left: auto; margin-right: auto; }
.pricing-note-inner a { color: var(--teal-dark); }
.value-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px; box-shadow: var(--shadow-sm); transition: transform .25s ease, box-shadow .25s ease; }
.value-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
svg.value-icon { color: var(--teal); width: 56px; height: 56px; }

/* ---------- Check page ---------- */
.check-form { border: 1px solid var(--line); border-top: 4px solid var(--teal); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); padding: clamp(22px, 4vw, 34px); }
.field input, .field select, .field textarea { border: 1px solid #B9CBD2; border-radius: 10px; transition: border-color .15s ease, box-shadow .15s ease; }
.field input::placeholder, .field textarea::placeholder { color: #6b7b8c; font-style: normal; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 4px rgba(45, 107, 123, 0.18); }
.result-placeholder { background: var(--mint); border: 2px dashed #A9C4CC; border-radius: var(--radius-lg); padding: 28px 20px 32px; color: var(--ink-soft); }
.result-placeholder .sample-card { width: 100%; max-width: 380px; margin: 0 auto 6px; border-radius: 16px; box-shadow: var(--shadow-md); transform: rotate(-1.5deg); }
.result-placeholder .sample-caption { display: block; font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 700; color: var(--teal); margin: 10px 0 14px; }
.result-placeholder p { margin-left: auto; margin-right: auto; }
.result-card { border: 1px solid var(--line); border-left: 5px solid var(--teal); border-radius: 14px; box-shadow: var(--shadow-md); }
.result-detail { border-bottom: 1px dashed #BFD0D6; }
.error-box { background: #FBE4E4; color: #8c1d1d; border: 1px solid #E6B1B1; border-radius: 12px; }
.notice-box { background: var(--mint); border: 1px solid var(--line); border-radius: 12px; }
.check-points { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 22px; }
.check-points li { display: inline-flex; align-items: center; gap: 8px; font-size: 0.88rem; font-weight: 600; color: var(--teal-dark); }
.check-points li::before { content: "\2713"; width: 20px; height: 20px; border-radius: 50%; background: var(--teal); color: #fff; font-size: 0.7rem; display: inline-flex; align-items: center; justify-content: center; }

/* Status badges: colour added on top of the fill / border / symbol cues */
.badge-valid { background: #E3F4EB; color: #14633F; border-color: #1d7a4e; }
.badge-expired { background: #EEF1F4; color: #3B4A60; border-color: #6b7b8c; }
.badge-suspended { background: #FFF3D6; color: #7a4b00; border-color: #B7791F; }
.badge-revoked { background: #FBE4E4; color: #8c1d1d; border: 3px double #B42323; box-shadow: none; }

/* ---------- Contact ---------- */
.contact-aside { background: linear-gradient(160deg, var(--nbcc-navy), #1b4a5c); box-shadow: var(--shadow-md); border-radius: var(--radius-lg); }
.contact-aside .aside-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; margin-bottom: 20px; border: 3px solid rgba(255, 255, 255, 0.15); }
.contact-list li { border-bottom-color: rgba(255, 255, 255, 0.22); }
.contact-list li span { color: var(--gold-light); }

/* ---------- Footer ---------- */
.site-footer { background: var(--paper); }
.site-footer { border-top-color: var(--gold); }
.footer-heading { border-bottom-color: var(--gold); }

/* ---------- Cookie banner ---------- */
.cookie-banner { border-top-color: var(--gold); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .split.flip > .media-frame { order: 0; }
  .hero-visual { max-width: 460px; }
  .media-frame { margin-right: 14px; }
  .cta-band::after { right: 4%; opacity: 0.08; }
}
@media (max-width: 520px) {
  .hv-seal { width: 80px; right: -6px; }
  .hero-visual .panel-card { padding: 12px 14px; }
  .hero-visual .panel-row { font-size: 0.74rem; }
  .hero-visual { padding-bottom: 88px; }
  .trust-row { justify-content: flex-start; }
}

/* Playfair defaults to old-style figures; use lining numerals for stats and headings */
h1, h2, h3, .hero-stats strong, .how-num { font-variant-numeric: lining-nums; font-feature-settings: 'lnum' 1; }

/* Exam chips (NCE / NCMHCE) */
.exam-chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 14px; }
.exam-chip { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 12px; font-size: 0.85rem; line-height: 1.3; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.25); color: #E4EEF1; max-width: 100%; }
.exam-chip strong { color: var(--gold-light); font-size: 0.95rem; letter-spacing: 0.04em; }

/* Contact photo: show the whole laptop */
.contact-aside .aside-img { aspect-ratio: 4 / 3; object-position: center; }

/* Inline styles are blocked by the site's CSP, so these live here */
.check-points-center { justify-content: center; }
.details-form { max-width: 560px; margin: 0 auto; }

/* Skip link: visible only when focused with the keyboard */
.skip-link { position: absolute; left: 12px; top: 0; transform: translateY(-250%); z-index: 200; padding: 10px 16px; background: var(--nbcc-navy); color: #fff; border-radius: 6px; text-decoration: none; font-weight: 600; }
.skip-link:focus { transform: none; top: 12px; outline: 3px solid var(--gold); outline-offset: 2px; }

/* ============================================================
   Device pass: phones, foldables, tablets, laptops, TVs
   ============================================================ */

/* Never scroll sideways; decorative shapes may poke out but are clipped */
html, body { max-width: 100%; }
body { overflow-x: clip; }
html { scroll-padding-top: 88px; }

/* Grid/flex children may shrink below their content width (stops blow-outs) */
.hero-row > *, .about-row > *, .check-row > *, .contact-row > *, .split > *,
.how-grid > *, .values-grid > *, .footer-grid > *, .cta-band-row > * { min-width: 0; }

/* Keep the decorative seal inside the screen on narrow widths */
@media (max-width: 1100px) { .media-seal { left: 0; } }

/* Mobile menu: fully hidden when closed (no sliver under the header, and
   the links can't be tabbed to while hidden) */
@media (max-width: 820px) {
  .site-nav { padding-top: 0; padding-bottom: 0; border-bottom-width: 0; visibility: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease, visibility 0s linear 0.3s; }
  .site-nav.open { padding-top: 8px; padding-bottom: 20px; border-bottom-width: 3px; visibility: visible;
    transition: max-height 0.3s ease, padding 0.3s ease, visibility 0s; }
  .site-nav a { min-height: 48px; display: flex; align-items: center; }
  .site-nav a.nav-cta { width: 100%; justify-content: center; }
}

/* Phones: compact cookie banner so it never hides the page */
@media (max-width: 560px) {
  .cookie-banner { padding-top: 10px; padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }
  .cookie-row { gap: 10px; }
  .cookie-text { font-size: 0.8rem; line-height: 1.4; }
  .cookie-banner .btn { padding: 0.45em 1em; font-size: 0.85rem; min-height: 40px; }
}
@media (max-height: 480px) { .cookie-banner { position: static; } }

/* Small phones and foldables (cover screens ~280-360px) */
@media (max-width: 360px) {
  .wrap { padding-left: max(14px, env(safe-area-inset-left, 0px)); padding-right: max(14px, env(safe-area-inset-right, 0px)); }
  h1 { font-size: 1.6rem; }
  .btn-large { padding: 0.8em 1.2em; }
  .brand-mark svg { width: 28px; height: 28px; }
  .hero-stats { gap: 12px 18px; }
}
@media (max-width: 300px) { .brand-text { font-size: 0.82rem; } .footer-grid { gap: 24px; } }

/* Tablets: use the width instead of one long column */
@media (min-width: 601px) and (max-width: 860px) {
  .hero-actions .btn { flex: 0 0 auto; }
  .how-grid, .values-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-row, .check-row { max-width: 640px; margin-left: auto; margin-right: auto; }
  .hero-visual, .media-frame { margin-left: auto; margin-right: auto; }
}
@media (min-width: 861px) and (max-width: 1100px) {
  .how-grid, .values-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
}

/* Phones turned sideways: keep everything reachable */
@media (max-height: 480px) and (orientation: landscape) {
  .site-header { position: static; }
  .site-nav.open { max-height: none; }
  .admin-login-wrap { align-items: flex-start; }
}

/* Touch: no sticky hover colours, bigger targets */
@media (hover: none) {
  .btn-primary:hover { background: var(--navy); color: var(--white); }
  .btn-ghost:hover { background: var(--white); color: var(--navy); }
  .site-header .btn-primary:hover, .cta-band .btn-primary:hover { background: var(--white); color: var(--navy); }
  .cta-band .btn-ghost:hover, .admin-header .btn-ghost:hover { background: var(--navy); color: var(--white); }
}
.footer-list a, .footer-col a { display: inline-block; padding: 4px 0; }
@media (pointer: coarse) { .footer-list a { padding: 8px 0; } .faq-list summary { min-height: 48px; } }

/* Fine-grained fluid text between phone and desktop */
body { font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem); }

/* Large monitors and TVs. The layout is built in rem, so scaling the root
   font size scales the whole page. 1080p TVs and up keep a comfortable
   reading width; 4K screens that report their full pixel width scale up. */
@media (min-width: 1500px) { .wrap { max-width: 78rem; } }
@media (min-width: 1920px) {
  html { font-size: 125%; }
  .wrap { max-width: 78rem; }
  :focus-visible { outline-width: 3px; outline-offset: 3px; }
}
@media (min-width: 2560px) { html { font-size: 162.5%; } }
@media (min-width: 3400px) { html { font-size: 225%; } }

/* TV remotes and keyboards: highly visible focus on every control */
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }
.site-header a:focus-visible, .site-header button:focus-visible, .cta-band a:focus-visible,
.site-footer a:focus-visible { outline-color: var(--gold); }

/* Respect reduced motion: also stop the reveal fade-ins hiding content */
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* Print: clean pages */
@media print {
  .site-header, .cookie-banner, .nav-toggle, .skip-link { display: none !important; }
  body { color: #000; }
}

/* Large screens: size the fixed-pixel parts in rem so they grow with the text */
@media (min-width: 1920px) {
  .header-row { height: 4.5rem; }
  .section { padding: 4.5rem 0; }
  .hero { padding: 4.5rem 0 6rem; }
  .page-intro { padding: 4rem 0 3.5rem; }
  .panel-card { max-width: 21.25rem; }
  .hero-visual { max-width: 35rem; }
  .section-head { max-width: 42.5rem; }
  .faq-list { max-width: 51.25rem; }
  .pricing-note-inner { max-width: 45rem; }
  .result-placeholder .sample-card { max-width: 23.75rem; }
  .admin-login-card { max-width: 26rem; }
  .modal-card { max-width: 32.5rem; }
  .details-form { max-width: 35rem; }
  .brand-mark svg { width: 2.1rem; height: 2.1rem; }
  .nav-toggle span { width: 1.5rem; }
}

/* ---------- Logo image ---------- */
.brand-logo { display: block; height: 52px; width: auto; max-width: 100%; }
.admin-header .brand-admin { color: var(--white); gap: 12px; }
.brand-footer .brand-logo { height: 60px; }
.admin-login-card .brand-logo { height: 56px; }
@media (max-width: 480px) {
  .brand-logo { height: 40px; }
  .brand-footer .brand-logo { height: 48px; }
}
