/* nzscan — design system: dark base + nzaisecurity.com DNA (parent teal, warm gold, pill UI) */
:root {
  /* dark base (kept for tool gravitas) */
  --bg:        #0a121e;
  --surface:   #131e2c;
  --surface-2: #1a2738;
  --border:    rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.14);
  --text:      #e8edf5;
  --muted:     #8b97ad;
  /* parent-brand accents (matched to nzaisecurity.com palette) */
  --accent:        #0f7a78;     /* parent teal — more muted than #2dd4bf */
  --accent-bright: #2dd4bf;     /* bright teal for hover/focus only */
  --accent-soft:   rgba(15, 122, 120, 0.18);
  --warm:          #c3a769;     /* parent warm gold — eyebrow, badges */
  --warm-soft:     rgba(195, 167, 105, 0.14);
  --primary:       #11283a;     /* parent primary navy */
  /* grade colors — vivid for high-contrast on dark */
  --grade-a: #4ade80;
  --grade-b: #a3e635;
  --grade-c: #facc15;
  --grade-d: #fb923c;
  --grade-f: #f87171;
  --shadow:    0 18px 40px rgba(0, 0, 0, 0.35);
  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.25);
  --radius:    18px;
  --radius-sm: 12px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; color: var(--text);
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
               'Segoe UI', Roboto, sans-serif;
  background:
    radial-gradient(circle at 20% -10%, rgba(15, 122, 120, 0.18), transparent 35%),
    radial-gradient(circle at 95% 105%, rgba(195, 167, 105, 0.10), transparent 30%),
    linear-gradient(180deg, #0c1622 0%, #0a121e 100%);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}

a { color: var(--accent-bright); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--accent); text-decoration: underline; }
code, pre { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
code { background: rgba(255,255,255,0.06); padding: 1px 6px; border-radius: 4px;
       font-size: 0.9em; }
pre { background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
      padding: 12px 14px; overflow-x: auto; font-size: 0.85rem; line-height: 1.45;
      margin: 0; }
pre code { background: none; padding: 0; }

.wrap { max-width: 820px; margin: 0 auto; padding: 48px 20px 80px; }

/* ---------- shared chrome ---------- */
header.site { padding: 16px 20px; border-bottom: 1px solid var(--border);
              background: rgba(10, 18, 30, 0.7); position: sticky; top: 0; z-index: 10;
              backdrop-filter: blur(12px); }
header.site .inner { max-width: 820px; margin: 0 auto;
                     display: flex; align-items: center; justify-content: space-between; }
header.site .brand { font-weight: 700; font-size: 1.05rem; letter-spacing: -0.01em;
                     color: var(--text); }
header.site .brand span { color: var(--warm); }
header.site nav a { color: var(--muted); margin-left: 18px; font-size: 0.95rem; }
header.site nav a:hover { color: var(--accent-bright); text-decoration: none; }

/* ---------- hero / eyebrows ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.5rem 0.85rem; border-radius: 999px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border-strong);
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted);
}
.eyebrow::before {
  content: ''; width: 0.5rem; height: 0.5rem; border-radius: 999px;
  background: linear-gradient(135deg, var(--warm), var(--accent));
}

.hero { padding: 1.5rem 0 2rem; }
.hero h1 { font-size: clamp(2.3rem, 4.2vw, 3.6rem); line-height: 0.99;
           letter-spacing: -0.04em; margin: 0 0 1rem; color: var(--text); font-weight: 700; }
.hero h1 .accent { color: var(--warm); }
.hero .tagline { color: var(--muted); margin: 0 0 32px; font-size: 1.1rem;
                 max-width: 580px; }

/* ---------- form ---------- */
.scan-form { display: flex; gap: 8px; margin: 0 0 16px; }
.scan-form input { flex: 1; padding: 14px 16px; font-size: 1.05rem;
  background: var(--surface); color: var(--text); border: 1px solid var(--border-strong);
  border-radius: 999px; transition: border-color 0.15s; }
.scan-form input::placeholder { color: var(--muted); }
.scan-form input:focus { outline: none; border-color: var(--accent);
                         box-shadow: 0 0 0 3px var(--accent-soft); }
.scan-form button { padding: 0 24px; font-size: 1rem; font-weight: 700;
  background: var(--accent); color: #ffffff; border: 0; border-radius: 999px;
  cursor: pointer; transition: transform 0.15s, filter 0.15s; }
.scan-form button:hover { filter: brightness(1.1); transform: translateY(-1px); }
.scan-form button:active { transform: translateY(0); filter: brightness(0.94); }

.error { background: rgba(248,113,113,0.08); border: 1px solid rgba(248,113,113,0.3);
         color: #fca5a5; padding: 12px 14px; border-radius: var(--radius-sm); margin: 0 0 16px; }

/* ---------- check-list / sections ---------- */
.section { margin-top: 40px; }
.section h2 { font-size: clamp(1.5rem, 2vw, 2rem); letter-spacing: -0.03em;
              line-height: 1.08; margin: 0 0 16px; color: var(--text); font-weight: 700; }

/* Grid where some rows have fewer items (e.g. 5 → 3+2) and we want the
   leftover items centered under the grid. At desktop, fit 3 cards per
   row (240px each + 14px gap × 2 = 748px < container width). */
.check-grid { display: flex; flex-wrap: wrap; justify-content: center;
              gap: 14px; padding: 0; margin: 0; list-style: none; }
.check-grid > li { flex: 0 0 240px; max-width: 100%; }
.check-grid li { padding: 18px; background: var(--surface);
                 border: 1px solid var(--border); border-radius: var(--radius);
                 transition: border-color 0.15s, transform 0.15s; }
.check-grid li:hover { border-color: var(--accent); transform: translateY(-1px); }
.check-grid li .icon { font-size: 1.4rem; line-height: 1; display: block;
                       margin-bottom: 8px; color: var(--accent-bright); }
.check-grid li strong { color: var(--text); display: block; margin-bottom: 4px;
                        font-weight: 600; font-size: 1rem; }
.check-grid li .desc { color: var(--muted); font-size: 0.88rem; line-height: 1.5; }
.check-grid.negative li { background: rgba(248,113,113,0.04);
                          border-color: rgba(248,113,113,0.12); }
.check-grid.negative li .icon { color: var(--grade-f); }
.check-grid.positive li { background: rgba(74,222,128,0.04);
                          border-color: rgba(74,222,128,0.14); }
.check-grid.positive li .icon { color: var(--grade-a); }
@media (max-width: 720px) {
  .check-grid > li { flex-basis: calc(50% - 7px); }
}
@media (max-width: 480px) {
  .check-grid > li { flex-basis: 100%; }
}

.small { color: var(--muted); font-size: 0.9rem; margin-top: 28px; }
.visually-hidden { position: absolute; left: -10000px; }

/* ---------- report page ---------- */
.report-header { margin-bottom: 28px; }
.report-header .back { display: inline-block; margin-bottom: 16px; font-size: 0.95rem;
                       color: var(--muted); }
.report-header .back:hover { color: var(--accent-bright); }
.target { font-size: 1.3rem; margin: 0 0 4px; }
.target code { background: transparent; padding: 0; color: var(--accent-bright);
               font-size: 1.05rem; word-break: break-all; }

.summary { color: var(--muted); margin: 0 0 24px; font-size: 1.05rem; }

.overall { display: flex; align-items: center; gap: 24px; padding: 28px;
           background: var(--surface); border: 1px solid var(--border);
           border-radius: var(--radius); box-shadow: var(--shadow);
           backdrop-filter: blur(8px); }
.overall .grade { font-size: 3.6rem; font-weight: 700; line-height: 1;
                   padding: 14px 26px; border-radius: 999px;
                   background: var(--surface-2); color: var(--text);
                   font-family: ui-monospace, monospace; letter-spacing: -0.05em;
                   min-width: 90px; text-align: center; }
.overall .grade[data-grade="A"] { background: var(--grade-a); color: #0b1d0e; }
.overall .grade[data-grade="B"] { background: var(--grade-b); color: #1d2206; }
.overall .grade[data-grade="C"] { background: var(--grade-c); color: #2a2106; }
.overall .grade[data-grade="D"] { background: var(--grade-d); color: #2a1306; }
.overall .grade[data-grade="F"] { background: var(--grade-f); color: #2a0606; }
.overall .body { flex: 1; }
.overall .score { font-size: 1.5rem; font-weight: 600; color: var(--text); }
.overall .meta-row { color: var(--muted); font-size: 0.9rem; margin-top: 4px; }

.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 22px; margin-top: 22px; }
.action { display: flex; flex-direction: column; align-items: center; gap: 6px;
         min-width: 180px; }
.action-blurb { margin: 0; color: var(--muted); font-size: 0.82rem;
                line-height: 1.35; max-width: 240px; text-align: center; }

/* All 3 download buttons share identical default + hover treatment.
   Recommendation is communicated by the blurb order, not by button styling. */
.btn { display: inline-flex; align-items: center; gap: 6px;
       padding: 0.75rem 1.2rem; font-weight: 700; font-size: 0.95rem;
       background: rgba(255, 255, 255, 0.04); color: var(--text);
       border: 1px solid var(--border-strong); border-radius: 999px;
       text-decoration: none; cursor: pointer;
       transition: transform 0.15s, border-color 0.15s, color 0.15s, background 0.15s; }
.btn:hover, .btn:focus-visible {
  border-color: var(--accent); color: var(--accent-bright);
  text-decoration: none; transform: translateY(-1px);
  background: rgba(15, 122, 120, 0.14);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.btn:active { transform: translateY(0); background: rgba(15, 122, 120, 0.20); }

/* ---------- check blocks ---------- */
.check { background: var(--surface); border: 1px solid var(--border);
         border-radius: var(--radius); margin-bottom: 14px; padding: 20px 22px;
         transition: border-color 0.15s; }
.check:hover { border-color: var(--border-strong); }
.check header { display: flex; align-items: center; gap: 14px; margin-bottom: 4px; }
.check header .icon { font-size: 1.3rem; line-height: 1; }
.check header h2 { margin: 0; font-size: 1.15rem; flex: 1; font-weight: 600; }
.check header .g { font-weight: 700; padding: 5px 13px; border-radius: 999px;
                   background: var(--surface-2); font-family: ui-monospace, monospace;
                   font-size: 0.95rem; min-width: 30px; text-align: center; }
.check header .g[data-grade="A"] { background: var(--grade-a); color: #0b1d0e; }
.check header .g[data-grade="B"] { background: var(--grade-b); color: #1d2206; }
.check header .g[data-grade="C"] { background: var(--grade-c); color: #2a2106; }
.check header .g[data-grade="D"] { background: var(--grade-d); color: #2a1306; }
.check header .g[data-grade="F"] { background: var(--grade-f); color: #2a0606; }
.check header .s { color: var(--muted); font-variant-numeric: tabular-nums;
                   font-size: 0.95rem; }

.findings { list-style: none; padding: 0; margin: 14px 0 0; }
.finding { padding: 12px 14px; border-radius: var(--radius-sm); margin-bottom: 6px;
           border-left: 3px solid var(--border); background: rgba(0,0,0,0.18); }
.finding strong { display: block; font-weight: 600; }
.finding .d { display: block; color: var(--muted); font-size: 0.92rem; margin-top: 2px; }
.finding .w { display: block; color: #6b7484; font-size: 0.85rem; margin-top: 5px;
              font-style: italic; }
.finding.pass { border-left-color: var(--grade-a); }
.finding.fail { border-left-color: var(--grade-f); }
.finding.warn { border-left-color: var(--grade-c); }
.finding.info { border-left-color: var(--accent-bright); }

/* ---------- fix panel ---------- */
.fix { background: var(--accent-soft); border: 1px solid rgba(15,122,120,0.32);
       border-radius: var(--radius-sm); padding: 14px 16px; margin-top: 8px;
       margin-bottom: 8px; }
.fix h3 { margin: 0 0 6px; font-size: 0.78rem; color: var(--accent-bright);
          text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700; }
.fix h3 .title { color: var(--text); text-transform: none; letter-spacing: 0;
                  font-weight: 600; font-size: 0.95rem; margin-left: 6px; }
.fix .what { color: var(--text); margin-bottom: 10px; font-size: 0.95rem; }
.fix pre { background: var(--bg); margin: 0; font-size: 0.82rem; }
.fix .more { color: var(--accent-bright); font-size: 0.85rem; margin-top: 10px;
             font-weight: 500; }

/* ---------- footer ---------- */
.report-footer, .site-footer { margin-top: 48px; padding-top: 24px;
                                 border-top: 1px solid var(--border);
                                 color: var(--muted); font-size: 0.9rem; }
.site-footer { text-align: center; }
.site-footer strong { color: var(--text); }
.site-footer .mark { color: var(--warm); font-weight: 600; }

/* ---------- ad slots (re-enable when ads ship) ---------- */
.ad-slot { display: none; }

@media (max-width: 600px) {
  .hero h1 { font-size: 2rem; }
  .overall { flex-direction: column; text-align: center; }
  .overall .grade { font-size: 2.8rem; padding: 12px 22px; }
  .actions { flex-direction: column; gap: 16px; }
}