/* ==========================================================================
   DPDP Niyam – design system (plain CSS, no build step)
   Palette taken from the logo: navy + teal. Amber is reserved for risk.
   ========================================================================== */
:root {
  --ink: #121a5e;
  --ink-2: #1d2a8a;
  --ink-soft: #3b4575;
  --teal: #11b5a1;
  --teal-d: #087f71;
  --teal-bg: #e4f7f4;
  --paper: #f5f7fb;
  --white: #fff;
  --line: #dfe5f0;
  --muted: #5b6585;
  --amber: #d9660a;
  --amber-bg: #fff2e3;
  --red: #c8321d;
  --red-bg: #fdeceb;
  --green: #0b8a5f;
  --green-bg: #e3f6ee;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(18, 26, 94, .06), 0 8px 24px -12px rgba(18, 26, 94, .18);
  --font-head: 'Sora', 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-body: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --wrap: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 16px/1.65 var(--font-body); color: var(--ink-soft); background: var(--paper); -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; display: block; }
a { color: var(--teal-d); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--ink); line-height: 1.18; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.5rem); font-weight: 700; letter-spacing: -.035em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 650; }
h3 { font-size: 1.15rem; font-weight: 600; letter-spacing: -.01em; }
h4 { font-size: 1rem; font-weight: 600; }
p { margin: 0 0 1em; }
.lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 62ch; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.section { padding: 72px 0; }
.section.tight { padding: 48px 0; }
.section.white { background: var(--white); border-block: 1px solid var(--line); }
.section.dark { background: var(--ink); color: #c9d0f0; }
.section.dark h2, .section.dark h3 { color: #fff; }
.stack > * + * { margin-top: 16px; }
.grid { display: grid; gap: 20px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } .section { padding: 52px 0; } }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 .95rem/1 var(--font-head); padding: 14px 22px; border-radius: 11px; border: 1.5px solid transparent; cursor: pointer; text-decoration: none; transition: transform .15s, background .15s, box-shadow .15s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--teal); color: #052b27; }
.btn-primary:hover { background: #0fa591; color: #052b27; box-shadow: 0 6px 18px -6px rgba(17, 181, 161, .7); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: var(--ink-2); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn-sm { padding: 10px 16px; font-size: .85rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .9); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; gap: 28px; height: 70px; }
.brand img { height: 38px; width: auto; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: .95rem; padding: 8px 12px; border-radius: 8px; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--teal-bg); color: var(--teal-d); }
.bar-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn { width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; }
.icon-btn:hover { border-color: var(--ink); }
.burger { display: none; }
@media (max-width: 900px) {
  .burger { display: inline-grid; margin-left: auto; }
  .nav { position: absolute; top: 70px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: #fff; padding: 12px 20px 20px; border-bottom: 1px solid var(--line); display: none; margin: 0; }
  .nav.open { display: flex; }
  .bar-actions { display: none; }
  .nav .mobile-only { display: flex; }
}
.nav .mobile-only { display: none; }
.search-pop { display: none; position: absolute; right: 20px; top: 74px; width: min(440px, calc(100vw - 40px)); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; z-index: 60; }
.search-pop.open { display: block; }
.search-field { position: relative; }
.search-field input { width: 100%; padding: 13px 14px 13px 42px; border: 1.5px solid var(--line); border-radius: 11px; font: inherit; background: var(--paper); color: var(--ink); }
.search-field input:focus { outline: none; border-color: var(--teal); background: #fff; }
.search-field svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.suggest { list-style: none; margin: 10px 0 0; padding: 0; max-height: 320px; overflow: auto; }
.suggest a { display: block; padding: 10px 12px; border-radius: 9px; text-decoration: none; color: var(--ink); }
.suggest a:hover, .suggest a:focus { background: var(--teal-bg); }
.suggest small { display: block; color: var(--muted); font-size: .8rem; line-height: 1.4; }
.user-chip { font-size: .9rem; color: var(--ink); text-decoration: none; font-weight: 600; padding: 8px 12px; border-radius: 9px; }
.user-chip:hover { background: var(--teal-bg); }

/* ---------- Hero ---------- */
.hero { padding: 64px 0 80px; background:
  radial-gradient(900px 420px at 88% -10%, rgba(17, 181, 161, .16), transparent 60%),
  radial-gradient(700px 400px at -5% 10%, rgba(29, 42, 138, .08), transparent 60%), var(--paper); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 56px; align-items: center; }
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; gap: 40px; } .hero { padding: 40px 0 56px; } }
.hero h1 { margin-bottom: 18px; }
.deadline { display: inline-flex; align-items: center; gap: 10px; background: var(--white); border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px 7px 8px; font-size: .88rem; color: var(--ink); margin-bottom: 22px; }
.deadline b { background: var(--amber-bg); color: var(--amber); border-radius: 999px; padding: 3px 10px; font-weight: 600; }
.scan-form { display: flex; gap: 10px; background: var(--white); border: 1.5px solid var(--line); border-radius: 16px; padding: 8px; box-shadow: var(--shadow); max-width: 600px; margin-top: 28px; }
.scan-form:focus-within { border-color: var(--teal); }
.scan-form input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 1.02rem; padding: 12px 14px; color: var(--ink); }
.scan-form input:focus { outline: none; }
.scan-form .btn { padding-inline: 24px; }
@media (max-width: 560px) { .scan-form { flex-direction: column; } }
.reassure { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 18px 0 0; padding: 0; list-style: none; font-size: .9rem; color: var(--muted); }
.reassure li { display: flex; align-items: center; gap: 7px; }
.reassure svg { color: var(--teal-d); flex: none; }

/* live report demo */
.report { position: relative; background: var(--white); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 30px 60px -30px rgba(18, 26, 94, .35); overflow: hidden; }
.report-top { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); background: #fafbfe; }
.dots { display: flex; gap: 6px; } .dots i { width: 10px; height: 10px; border-radius: 50%; background: #d5dbea; }
.report-url { font: 500 .85rem var(--font-body); color: var(--muted); background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 4px 12px; flex: 1; text-align: center; }
.report-body { padding: 22px; display: grid; gap: 16px; }
.report-score { display: flex; align-items: center; gap: 18px; }
.ring { --p: 0; --c: var(--teal); width: 92px; height: 92px; border-radius: 50%; background: conic-gradient(var(--c) calc(var(--p) * 1%), #e6ebf5 0); display: grid; place-items: center; flex: none; }
.ring span { width: 72px; height: 72px; border-radius: 50%; background: #fff; display: grid; place-items: center; font: 700 1.45rem var(--font-head); color: var(--ink); }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.checks li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: .92rem; color: var(--ink); background: #fff; }
.checks li small { margin-left: auto; font-size: .78rem; font-weight: 600; }
.tick { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; flex: none; color: #fff; font-size: .7rem; font-weight: 700; }
.tick.ok { background: var(--green); } .tick.warn { background: var(--amber); } .tick.bad { background: var(--red); }
.ok-t { color: var(--green); } .warn-t { color: var(--amber); } .bad-t { color: var(--red); }
.scanline { position: absolute; left: 0; right: 0; top: 0; height: 90px; background: linear-gradient(180deg, transparent, rgba(17, 181, 161, .22), transparent); border-bottom: 2px solid rgba(17, 181, 161, .7); pointer-events: none; opacity: 0; }
.report.play .scanline { animation: sweep 2.4s ease-in-out 1 forwards; }
.report .checks li { opacity: 0; transform: translateY(6px); }
.report.play .checks li { animation: pop .4s ease forwards; animation-delay: calc(var(--i) * .38s + .3s); }
.report:not(.js-on) .checks li { opacity: 1; transform: none; }
@keyframes sweep { 0% { top: -90px; opacity: 1; } 100% { top: 100%; opacity: 0; } }
@keyframes pop { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .report .checks li { opacity: 1 !important; transform: none !important; animation: none !important; } .scanline { display: none; } html { scroll-behavior: auto; } }

/* ---------- Cards, steps, timeline ---------- */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card.pad-lg { padding: 32px; }
.card h3 { margin-bottom: .4em; }
.card p:last-child { margin-bottom: 0; }
.tag { display: inline-block; font-size: .78rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--teal-bg); color: var(--teal-d); }
.tag.amber { background: var(--amber-bg); color: var(--amber); }
.tag.ink { background: #e8ebfa; color: var(--ink-2); }
.risk-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 20px; }
@media (max-width: 900px) { .risk-grid { grid-template-columns: 1fr; } }
.big-fig { font: 700 clamp(2.4rem, 6vw, 4rem)/1 var(--font-head); color: var(--ink); letter-spacing: -.04em; }
.risk-main { background: var(--ink); color: #c9d0f0; border-color: var(--ink); }
.risk-main h3, .risk-main .big-fig { color: #fff; }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; counter-reset: s; position: relative; }
.step { position: relative; padding: 0 22px 0 0; counter-increment: s; }
.step::before { content: counter(s); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: #fff; font: 700 1rem var(--font-head); margin-bottom: 16px; position: relative; z-index: 1; }
.step::after { content: ""; position: absolute; top: 20px; left: 40px; right: 0; height: 2px; background: repeating-linear-gradient(90deg, var(--line) 0 8px, transparent 8px 14px); }
.step:last-child::after { display: none; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; gap: 28px; } .step { padding: 0 0 0 58px; } .step::before { position: absolute; left: 0; top: 0; margin: 0; } .step::after { display: none; } }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.timeline li { display: grid; grid-template-columns: 140px 22px 1fr; gap: 16px; padding-bottom: 28px; position: relative; }
.timeline li:last-child { padding-bottom: 0; }
.timeline .when { font: 600 .92rem var(--font-head); color: var(--ink); text-align: right; padding-top: 1px; }
.timeline .node { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--line); margin: 5px auto 0; position: relative; z-index: 1; }
.timeline li::before { content: ""; position: absolute; left: calc(140px + 16px + 10px); top: 22px; bottom: -6px; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline .done .node { background: var(--teal); border-color: var(--teal); }
.timeline .now .node { background: var(--amber); border-color: var(--amber-bg); box-shadow: 0 0 0 4px var(--amber-bg); }
.timeline .next .node { border-color: var(--ink); }
.timeline h3 { margin-bottom: .2em; }
@media (max-width: 620px) { .timeline li { grid-template-columns: 22px 1fr; } .timeline .when { grid-column: 2; text-align: left; } .timeline .node { grid-row: 1 / span 2; } .timeline li::before { left: 10px; } }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 28px; } }
.quote { font: 500 1.05rem/1.55 var(--font-body); background: #fff; border-left: 4px solid var(--teal); padding: 18px 22px; border-radius: 0 12px 12px 0; color: var(--ink); }
.pen-row { display: grid; grid-template-columns: 170px 1fr; gap: 20px; padding: 16px 0; border-top: 1px solid var(--line); align-items: baseline; }
.pen-row:first-child { border-top: 0; }
.pen-row b { font: 700 1.05rem var(--font-head); color: var(--ink); }
.pen-row:first-child b { color: var(--red); }
@media (max-width: 620px) { .pen-row { grid-template-columns: 1fr; gap: 4px; } }
details.acc { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 0 20px; }
details.acc + details.acc { margin-top: 10px; }
details.acc summary { cursor: pointer; list-style: none; font: 600 1.02rem var(--font-head); color: var(--ink); padding: 18px 28px 18px 0; position: relative; }
details.acc summary::-webkit-details-marker { display: none; }
details.acc summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-size: 1.4rem; color: var(--teal-d); transition: transform .2s; }
details.acc[open] summary::after { transform: translateY(-50%) rotate(45deg); }
details.acc .a { padding: 0 0 18px; }
.page-head { padding: 56px 0 36px; background: linear-gradient(180deg, #fff, var(--paper)); border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
.prose h2 { margin-top: 1.6em; font-size: 1.5rem; }
.prose h3 { margin-top: 1.4em; }
.prose ul { padding-left: 1.2em; } .prose li { margin-bottom: .4em; }
.prose { max-width: 72ch; }
.toc { position: sticky; top: 92px; align-self: start; display: grid; gap: 2px; font-size: .92rem; }
.toc a { padding: 7px 12px; border-radius: 8px; text-decoration: none; color: var(--ink-soft); border-left: 2px solid var(--line); }
.toc a:hover { color: var(--teal-d); border-color: var(--teal); background: var(--teal-bg); }
.with-toc { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 48px; }
@media (max-width: 900px) { .with-toc { grid-template-columns: 1fr; } .toc { display: none; } }
dl.gloss dt { font: 600 1rem var(--font-head); color: var(--ink); margin-top: 18px; }
dl.gloss dd { margin: 4px 0 0; }
.cta-band { background: linear-gradient(120deg, var(--ink), var(--ink-2)); border-radius: 22px; padding: 44px; color: #cfd5f5; display: flex; gap: 28px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin: 0 0 6px; }
.cta-band p { margin: 0; }

/* ---------- Forms & auth ---------- */
.field { margin-bottom: 16px; }
.field label, .label { display: block; font: 600 .9rem var(--font-body); color: var(--ink); margin-bottom: 6px; }
.field .opt { font-weight: 400; color: var(--muted); }
.input, .field input[type=text], .field input[type=email], .field input[type=password], .field input[type=url], .field input[type=tel], .field select, .field textarea { width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 11px; font: inherit; color: var(--ink); background: #fff; transition: border-color .15s, box-shadow .15s; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 4px rgba(17, 181, 161, .15); }
.field .hint { font-size: .82rem; color: var(--muted); margin-top: 5px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .row2 { grid-template-columns: 1fr; } }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; margin-bottom: 12px; }
.check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--teal-d); flex: none; }
.auth-wrap { min-height: calc(100vh - 70px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.auth-side { background: var(--ink); color: #c9d0f0; padding: 64px 48px; display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden; }
.auth-side::after { content: ""; position: absolute; right: -120px; bottom: -120px; width: 380px; height: 380px; border-radius: 50%; background: radial-gradient(circle, rgba(17, 181, 161, .35), transparent 65%); }
.auth-side h2 { color: #fff; font-size: 2rem; }
.auth-side ul { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; position: relative; z-index: 1; }
.auth-side li { display: flex; gap: 12px; align-items: flex-start; }
.auth-side li svg { color: var(--teal); flex: none; margin-top: 3px; }
.auth-main { padding: 48px 24px; display: grid; place-items: center; }
.auth-card { width: 100%; max-width: 460px; }
.auth-card.wide { max-width: 620px; }
@media (max-width: 900px) { .auth-wrap { grid-template-columns: 1fr; } .auth-side { display: none; } }
.alert { padding: 12px 16px; border-radius: 11px; font-size: .92rem; margin-bottom: 18px; border: 1px solid; }
.alert.err { background: var(--red-bg); border-color: #f4c3be; color: #8c2010; }
.alert.ok { background: var(--green-bg); border-color: #b4e5d0; color: #075c3f; }
.alert.info { background: var(--teal-bg); border-color: #b5e9e2; color: #075b50; }
.alert ul { margin: 0; padding-left: 1.1em; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .85rem; margin: 20px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.social { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 12px; border: 1.5px solid var(--line); border-radius: 11px; color: var(--ink); text-decoration: none; font-weight: 600; background: #fff; }
.social:hover { border-color: var(--ink); color: var(--ink); }

/* ---------- Assessment ---------- */
.flow { max-width: 820px; margin: 0 auto; }
.progress { height: 8px; background: #e3e9f4; border-radius: 99px; overflow: hidden; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), #3fd6c4); border-radius: 99px; transition: width .4s; }
.crumbs { display: flex; justify-content: space-between; font-size: .88rem; color: var(--muted); margin-bottom: 8px; }
.q { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 14px; }
.q > p { color: var(--ink); font-weight: 500; margin-bottom: 14px; }
.choices { display: flex; flex-wrap: wrap; gap: 10px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice span { display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; border: 1.5px solid var(--line); border-radius: 999px; font-weight: 600; font-size: .92rem; color: var(--ink); background: #fff; transition: all .15s; }
.choice input:checked + span.y { background: var(--green-bg); border-color: var(--green); color: #075c3f; }
.choice input:checked + span.p { background: var(--amber-bg); border-color: var(--amber); color: #8a4206; }
.choice input:checked + span.n { background: var(--red-bg); border-color: var(--red); color: #8c2010; }
.choice input:focus-visible + span { outline: 3px solid var(--teal); outline-offset: 2px; }
.choice:hover span { border-color: var(--ink); }
.flow-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.review-sec { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 14px; overflow: hidden; }
.review-sec h3 { padding: 14px 20px; margin: 0; background: #fafbfe; border-bottom: 1px solid var(--line); }
.review-row { display: flex; gap: 16px; justify-content: space-between; align-items: flex-start; padding: 14px 20px; border-top: 1px solid var(--line); font-size: .95rem; }
.review-row:first-of-type { border-top: 0; }
.pill { flex: none; padding: 3px 12px; border-radius: 99px; font-size: .8rem; font-weight: 700; }
.pill.yes { background: var(--green-bg); color: #075c3f; } .pill.partial { background: var(--amber-bg); color: #8a4206; } .pill.no { background: var(--red-bg); color: #8c2010; } .pill.na { background: #eef1f8; color: var(--muted); }
.result-hero { display: grid; grid-template-columns: auto 1fr; gap: 32px; align-items: center; }
.result-hero .ring { width: 150px; height: 150px; } .result-hero .ring span { width: 120px; height: 120px; font-size: 2.3rem; }
@media (max-width: 620px) { .result-hero { grid-template-columns: 1fr; justify-items: start; } }
table.tbl { width: 100%; border-collapse: collapse; font-size: .95rem; }
.tbl th { text-align: left; font: 600 .82rem var(--font-body); color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); background: #fafbfe; }
.tbl td { padding: 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.bar-mini { height: 8px; width: 120px; background: #e6ebf5; border-radius: 99px; overflow: hidden; display: inline-block; vertical-align: middle; margin-right: 8px; }
.bar-mini i { display: block; height: 100%; border-radius: 99px; }
.scroll-x { overflow-x: auto; }

/* ---------- Scan result ---------- */
.finding { display: grid; grid-template-columns: 24px 1fr auto; gap: 14px; padding: 16px 0; border-top: 1px solid var(--line); align-items: start; }
.finding:first-child { border-top: 0; }
.finding h4 { margin: 0 0 2px; }
.finding p { margin: 0; font-size: .93rem; }
.sev { font-size: .78rem; font-weight: 700; padding: 3px 10px; border-radius: 99px; }
.sev.high { background: var(--red-bg); color: #8c2010; } .sev.med { background: var(--amber-bg); color: #8a4206; } .sev.low { background: #e8ebfa; color: var(--ink-2); } .sev.pass { background: var(--green-bg); color: #075c3f; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { background: var(--paper); border: 1px solid var(--line); border-radius: 99px; padding: 4px 12px; font-size: .85rem; color: var(--ink); }

/* ---------- AI ---------- */
.ai-box { border: 1.5px solid #b5e9e2; background: linear-gradient(180deg, #f2fcfa, #fff); border-radius: var(--radius); padding: 24px; }
.ai-out { white-space: pre-wrap; color: var(--ink); line-height: 1.7; }
.ai-out h4 { margin-top: 1em; }
.chat { display: flex; flex-direction: column; height: min(72vh, 680px); background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); }
.chat-log { flex: 1; overflow-y: auto; padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.msg { max-width: 86%; padding: 12px 16px; border-radius: 16px; white-space: pre-wrap; line-height: 1.6; }
.msg.bot { background: var(--paper); color: var(--ink); border-bottom-left-radius: 4px; }
.msg.me { align-self: flex-end; background: var(--ink); color: #fff; border-bottom-right-radius: 4px; }
.msg.err { background: var(--red-bg); color: #8c2010; }
.chat-form { display: flex; gap: 10px; padding: 14px; border-top: 1px solid var(--line); background: #fafbfe; }
.chat-form textarea { flex: 1; resize: none; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; font: inherit; max-height: 130px; color: var(--ink); }
.chat-form textarea:focus { outline: none; border-color: var(--teal); }
.suggests { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 22px 18px; }
.suggests button { background: #fff; border: 1.5px solid var(--line); color: var(--ink); border-radius: 99px; padding: 8px 14px; font: 500 .88rem var(--font-body); cursor: pointer; }
.suggests button:hover { border-color: var(--teal); background: var(--teal-bg); }
.typing { display: inline-flex; gap: 4px; } .typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: blink 1s infinite; } .typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

/* ---------- Search results / dashboard ---------- */
.result { display: block; padding: 18px 20px; background: #fff; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink-soft); margin-bottom: 10px; }
.result:hover { border-color: var(--teal); box-shadow: var(--shadow); }
.result h3 { margin: 0 0 4px; color: var(--ink); } .result p { margin: 0; font-size: .93rem; }
.result mark { background: #fff3b0; color: inherit; border-radius: 3px; padding: 0 2px; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px; }
@media (max-width: 900px) { .dash-grid { grid-template-columns: 1fr; } }
.a-row { display: grid; grid-template-columns: 1fr auto auto; gap: 16px; align-items: center; padding: 16px 0; border-top: 1px solid var(--line); }
.a-row:first-child { border-top: 0; }
.empty { text-align: center; padding: 36px 16px; color: var(--muted); }
.empty svg { margin: 0 auto 12px; color: var(--teal-d); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #aab3e0; padding: 60px 0 0; margin-top: 0; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 36px; padding-bottom: 44px; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .foot-grid { grid-template-columns: 1fr; } }
.foot-brand { display: inline-block; background: #fff; border-radius: 12px; padding: 8px 14px; margin-bottom: 16px; }
.foot-brand img { height: 34px; }
.site-footer h4 { color: #fff; font-size: .95rem; margin-bottom: 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a { color: #aab3e0; text-decoration: none; } .site-footer a:hover { color: #fff; text-decoration: underline; }
.foot-bottom { border-top: 1px solid rgba(255, 255, 255, .12); padding: 20px 0; font-size: .85rem; display: flex; gap: 16px; justify-content: space-between; flex-wrap: wrap; }

/* ---------- Errors ---------- */
.err-page { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 60px 20px; }
.err-page .code { font: 700 clamp(4rem, 14vw, 8rem)/1 var(--font-head); color: var(--ink); letter-spacing: -.05em; }
.err-page .code span { color: var(--teal); }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media print { .site-header, .site-footer, .no-print { display: none !important; } body { background: #fff; } }
