@font-face{font-family:"Inter";font-weight:400;font-style:normal;font-display:swap;src:url("/fonts/Inter-Regular.woff") format("woff")}
@font-face{font-family:"Inter";font-weight:500;font-style:normal;font-display:swap;src:url("/fonts/Inter-Medium.woff") format("woff")}
@font-face{font-family:"Inter";font-weight:600;font-style:normal;font-display:swap;src:url("/fonts/Inter-SemiBold.woff") format("woff")}
@font-face{font-family:"Inter";font-weight:700;font-style:normal;font-display:swap;src:url("/fonts/Inter-Bold.woff") format("woff")}
/* Layout: dark signage band with usage meters, tab bar, then one working surface per tab. */
:root {
  /* CoreSafe logo palette: navy #14192f, white, silver #e0e0e8, steel #889098. Severity colors stay separate. */
  --bg: #eceef3; --surface: #ffffff; --ink: #14192f; --muted: #566075; --line: #d4d8e2;
  --accent: #14192f; --accent-ink: #ffffff;
  --band: #14192f; --band-ink: #fcfcfc; --band-muted: #aab0bd; --band-line: #889098; --meter: #e0e0e8;
  --critical: #b42318; --high: #a8620a; --medium: #2c6a9a; --low: #3f7a4a;
  --display: "Arial Narrow", "Roboto Condensed", "Helvetica Neue", Arial, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0d1020; --surface: #14192f; --ink: #f2f3f7; --muted: #a3abbb; --line: #2a3150; --accent: #e0e0e8; --accent-ink: #14192f; --band: #14192f; --critical: #ff8f84; --high: #f0b255; --medium: #84bbea; --low: #91cc9b; color-scheme: dark; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--body); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--display); text-transform: uppercase; letter-spacing: .04em; margin: 0; }
.wrap { max-width: 1040px; margin-inline: auto; padding-inline: 16px; }

.band { background: var(--band); color: var(--band-ink); border-bottom: 3px solid var(--band-line); padding-block: 14px; }
.band .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; justify-content: space-between; }
h1 { margin: 0; }
.brand { line-height: 0; }
.brand img { height: 34px; width: auto; display: block; }
.hero-logo { display: block; width: min(420px, 100%); height: auto; margin-inline: auto; }
.tagline { margin: 4px 0 0; color: var(--band-muted); font-size: 13px; }
.meters { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 12px; color: var(--band-muted); }
.meter { min-width: 110px; }
.meter .bar { height: 5px; background: rgba(255,255,255,.18); border-radius: 3px; margin-top: 3px; overflow: hidden; }
.meter .bar i { display: block; height: 100%; background: var(--meter); }
.meter.full .bar i { background: #ff8f84; }
.who { font-size: 13px; color: var(--band-muted); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

nav.tabs { background: var(--surface); border-bottom: 1px solid var(--line); }
nav.tabs .wrap { display: flex; gap: 2px; overflow-x: auto; }
nav.tabs button { border: 0; background: none; padding: 12px 14px; cursor: pointer; border-bottom: 3px solid transparent; white-space: nowrap; font-weight: 500; color: var(--muted); }
nav.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }

main { padding-block: 18px 48px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 16px; margin-bottom: 14px; }
.panel h2 { font-size: 20px; margin-bottom: 10px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .grid2 { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; min-width: 0; }
.field > label, .legend { font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
input[type="text"], input[type="email"], input[type="password"], select, textarea { border: 1px solid var(--line); background: var(--bg); border-radius: 4px; padding: 8px 10px; width: 100%; min-width: 0; }
textarea { min-height: 70px; resize: vertical; }
.checks { display: grid; gap: 6px; }
.checks label { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; }
.hint { font-size: 13px; color: var(--muted); }
.btn { border: 1px solid var(--line); background: var(--surface); border-radius: 4px; padding: 8px 14px; cursor: pointer; font-weight: 500; }
.btn:hover:not(:disabled) { border-color: var(--muted); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.btn.small { padding: 4px 10px; font-size: 13px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; flex-wrap: wrap; }
.seg button { border: 0; border-right: 1px solid var(--line); background: var(--surface); padding: 7px 14px; cursor: pointer; }
.seg button:last-child { border-right: 0; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.seg button:disabled { opacity: .5; cursor: not-allowed; }
.err { color: var(--critical); min-height: 20px; margin: 6px 0 0; }
.notice { border: 1px dashed var(--muted); border-radius: 4px; padding: 10px 14px; margin-bottom: 14px; color: var(--muted); font-size: 14px; }
.notice.upgrade { border-style: solid; border-color: var(--accent); color: var(--ink); }

.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.thumbs img, .thumbs canvas { width: 96px; height: 72px; object-fit: cover; border-radius: 3px; border: 1px solid var(--line); }
video.preview { width: 100%; max-height: 360px; background: #000; border-radius: 4px; }

.finding { border: 1px solid var(--line); border-left: 6px solid var(--sev); border-radius: 4px; padding: 12px 14px; margin-bottom: 10px; background: var(--surface); }
.finding[data-sev="critical"] { --sev: var(--critical); } .finding[data-sev="high"] { --sev: var(--high); }
.finding[data-sev="medium"] { --sev: var(--medium); } .finding[data-sev="low"] { --sev: var(--low); }
.finding h3 { font-size: 18px; margin-bottom: 4px; overflow-wrap: anywhere; }
.pill { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 1px 8px; border-radius: 3px; color: var(--sev, var(--muted)); border: 1px solid currentColor; margin-right: 6px; }
.finding dl { margin: 8px 0 0; display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; font-size: 14px; }
.finding dt { color: var(--muted); }
.finding dd { margin: 0; overflow-wrap: anywhere; }
.cite { font-family: var(--mono); font-size: 13px; }
.verify { margin-top: 8px; font-size: 13px; color: var(--muted); }
.disclaimer { font-size: 13px; color: var(--muted); max-width: 72ch; margin-top: 14px; }

.chatlog { display: flex; flex-direction: column; gap: 10px; max-height: 52vh; overflow-y: auto; padding: 4px 2px 10px; }
.msg { max-width: min(78ch, 92%); padding: 10px 12px; border-radius: 6px; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.user { align-self: flex-end; background: var(--ink); color: var(--bg); }
.msg.assistant { align-self: flex-start; background: var(--bg); border: 1px solid var(--line); }

.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.plan { border: 1px solid var(--line); border-radius: 4px; padding: 16px; background: var(--surface); display: flex; flex-direction: column; gap: 6px; }
.plan.current { border-color: var(--accent); border-width: 2px; }
.plan .price { font-family: var(--display); font-size: 34px; font-weight: 700; }
.plan ul { margin: 0; padding-left: 18px; font-size: 14px; flex: 1; }

.auth { max-width: 420px; margin: 28px auto; }
.live-log { max-height: 240px; overflow-y: auto; font-size: 13px; color: var(--muted); }

@media print {
  .band, nav.tabs, .no-print, .panel.controls { display: none !important; }
  body { background: #fff; color: #000; }
}

.fixbox { border-top: 1px dashed var(--line); margin-top: 10px; padding-top: 10px; }
.fixbox h4 { margin: 0 0 6px; font-size: 13px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.fixtext { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; }
.team-row { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; padding-block: 8px; border-bottom: 1px solid var(--line); }
details.panel > summary { cursor: pointer; font-weight: 600; }

.oauth { display: grid; gap: 8px; margin-bottom: 4px; }
.oauth-btn { color: inherit; display: block; text-align: center; text-decoration: none; }
.oauth .or { text-align: center; margin: 6px 0 0; }

/* chat bubble */
.bubble-root { position: fixed; right: 20px; bottom: 20px; z-index: 50; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.bubble-root[hidden], .bubble-panel[hidden] { display: none; }
.bubble-btn { width: 56px; height: 56px; border-radius: 50%; border: 2px solid var(--band-line); background: var(--band); color: var(--band-ink); display: grid; place-items: center; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.28); }
.bubble-btn:hover { background: #1f2745; }
.bubble-panel { width: min(380px, calc(100vw - 24px)); height: min(540px, 70vh); display: flex; flex-direction: column; gap: 8px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 28px rgba(0,0,0,.3); }
.bubble-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.bubble-log { flex: 1; max-height: none; min-height: 0; }
.bubble-form { display: grid; gap: 6px; }
.bubble-form textarea { width: 100%; resize: none; padding: 8px; border: 1px solid var(--line); border-radius: 4px; background: var(--bg); }
.bubble-err:empty { display: none; }
.bubble-err { color: var(--critical); font-size: 13px; }
body.has-bubble main { padding-bottom: 88px; }
@media (max-width: 520px) { .bubble-root { right: 12px; bottom: 12px; } .bubble-panel { height: min(520px, 72vh); } }

/* kept photos, consent */
.consent { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 4px; background: var(--bg); font-size: 14px; }
.consent input { margin-top: 4px; flex: none; width: 18px; height: 18px; }
.photos { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 8px 0; }
.pthumb { display: inline-flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.pthumb img { width: 120px; height: 90px; object-fit: cover; border-radius: 3px; border: 1px solid var(--line); display: block; }

/* audits */
.tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; margin-bottom: 14px; }
.tcard { border: 1px solid var(--line); border-radius: 4px; padding: 14px; background: var(--surface); display: flex; flex-direction: column; gap: 6px; }
.tcard h3 { font-size: 17px; overflow-wrap: anywhere; }
.tcard p { margin: 0; }
.tcard .row { margin-top: auto; padding-top: 8px; }
.pill.crit { color: var(--critical); }
.chip { display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 3px; border: 1px solid var(--muted); color: var(--muted); }
.chip[data-st="completed"] { color: var(--low); border-color: var(--low); }
.arow { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: space-between; align-items: center; }
.row.space { justify-content: space-between; }
.grow { flex: 1 1 260px; }
.inline { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; }
.bar.big { height: 10px; background: var(--line); border-radius: 5px; overflow: hidden; margin-top: 6px; }
.bar.big i { display: block; height: 100%; background: var(--ink); }
.progress-box { margin: 10px 0; }
.asec > summary { font-weight: 600; font-size: 16px; }
.aitem { border: 1px solid var(--line); border-left: 6px solid var(--sev, var(--line)); border-radius: 4px; padding: 12px 14px; margin: 10px 0; background: var(--surface); display: grid; gap: 8px; }
.aitem[data-status="pass"] { --sev: var(--low); } .aitem[data-status="fail"] { --sev: var(--critical); } .aitem[data-status="na"] { --sev: var(--muted); }
.aq { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.aitem .hint.last { font-style: italic; }
.seg.tri button { padding: 10px 20px; min-width: 76px; font-weight: 600; }
.seg.tri button[data-v="pass"][aria-pressed="true"] { background: var(--low); color: var(--surface); }
.seg.tri button[data-v="fail"][aria-pressed="true"] { background: var(--critical); color: var(--surface); }
.seg.tri button[data-v="na"][aria-pressed="true"] { background: var(--muted); color: var(--surface); }
.anote { min-height: 52px; }
.ai-sug { border: 1px dashed var(--muted); border-radius: 4px; padding: 8px 10px; font-size: 14px; }
.ai-sug[data-a="possible_issue"] { border-color: var(--high); }
.signoff { border-width: 2px; }
.esec-head { align-items: flex-end; }
.eitem { border-top: 1px dashed var(--line); padding-top: 10px; margin-top: 10px; }
@media (max-width: 520px) { .seg.tri { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; } .seg.tri button { min-width: 0; } }
@media print { .aitem { break-inside: avoid; } }

.btn.danger { background: var(--critical); color: #fff; border-color: var(--critical); font-weight: 600; }
@media (prefers-color-scheme: dark) { .btn.danger { color: #14192f; } }

/* Owner dashboard */
:root { --chart: #2a78d6; --chart-soft: rgba(42,120,214,.14); --good: #3f7a4a; }
@media (prefers-color-scheme: dark) { :root { --chart: #3987e5; --chart-soft: rgba(57,135,229,.2); --good: #91cc9b; } }
.adm h2 { margin-bottom: 12px; }
.adm .panel { margin-block: 14px; }
.adm h3 { margin-bottom: 10px; font-size: 15px; }
.adm-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-block: 12px; }
.adm-tile { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 12px 14px; min-width: 0; }
.adm-k { font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.adm-v { font: 600 24px/1.2 var(--display); margin-block: 2px; overflow-wrap: anywhere; }
.adm-chart { width: 100%; height: auto; display: block; touch-action: pan-y; }
.adm-grid { stroke: var(--line); stroke-width: 1; }
.adm-axis { fill: var(--muted); font-size: 11px; }
.adm-bar { fill: var(--chart); }
.adm-bar:hover, .adm-bar:focus { fill: var(--ink); outline: none; }
.adm-line { stroke: var(--chart); stroke-width: 2; stroke-linejoin: round; }
.adm-cross { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.adm-dot { fill: var(--chart); stroke: var(--surface); stroke-width: 2; }
.adm-read { min-height: 22px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.adm-hbars { display: grid; gap: 8px; }
.adm-hrow { display: grid; grid-template-columns: minmax(90px, 38%) 1fr auto; gap: 10px; align-items: center; font-size: 13px; }
.adm-hl { overflow-wrap: anywhere; }
.adm-ht { background: var(--chart-soft); height: 14px; border-radius: 0 4px 4px 0; }
.adm-ht i { display: block; height: 100%; background: var(--chart); border-radius: 0 4px 4px 0; }
.adm-hv { font-variant-numeric: tabular-nums; font-weight: 600; }
.adm-flag { color: var(--critical); font-weight: 700; }
.adm-list { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.pill.good { color: var(--good); } .pill.warn { color: var(--high); }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; margin-block: 8px; }
.table-scroll table { border-collapse: collapse; width: 100%; font-size: 13px; }
.table-scroll th, .table-scroll td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; white-space: nowrap; }
.table-scroll td:first-child { white-space: normal; min-width: 160px; }
.table-scroll th { font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.table-scroll tr.sel td { background: var(--chart-soft); }
.linklike { border: 0; background: none; padding: 6px 0; cursor: pointer; text-decoration: underline; color: var(--ink); text-align: left; font-weight: 600; overflow-wrap: anywhere; }
.wrapseg { display: flex; margin-bottom: 12px; }
.wrapseg button { flex: 1 1 auto; }
.check { display: flex; gap: 8px; align-items: center; margin-block: 8px; }

/* Phone, tablet, desktop: comfortable tap targets, no sideways scrolling, safe areas for notched phones */
body { -webkit-text-size-adjust: 100%; overflow-wrap: break-word; }
img, svg, video, canvas { max-width: 100%; }
.band { padding-top: max(14px, env(safe-area-inset-top)); }
.wrap { padding-inline: max(16px, env(safe-area-inset-left), env(safe-area-inset-right)); }
input, select, textarea { font-size: 16px; max-width: 100%; } /* 16px stops iPhone zooming into fields */
@media (pointer: coarse) {
  .btn, .seg button, nav.tabs button, button.btn.small { min-height: 44px; }
  .btn.small { padding: 8px 12px; }
  input[type="checkbox"], input[type="radio"] { width: 22px; height: 22px; }
}
@media (max-width: 640px) {
  .band .wrap { gap: 8px; }
  .who { flex-wrap: wrap; font-size: 13px; }
  .adm-hrow { grid-template-columns: 1fr auto; } .adm-ht { grid-column: 1 / -1; grid-row: 2; }
  .adm-v { font-size: 20px; }
}

/* Layout fixes found on phone screenshots */
main { padding-bottom: 88px; } /* keeps the last content clear of the chat bubble */
.field input[type="text"], .field input[type="email"], .field input[type="number"], .field input[type="date"], .field input[type="password"], .field select, .field textarea { width: 100%; }
.row input[type="search"], .row input[type="email"], .row input[type="text"] { flex: 1 1 200px; min-width: 0; }
.row select { flex: 0 1 220px; }
.camrow { display: none; }
@media (pointer: coarse), (max-width: 820px) { .camrow { display: flex; } .camrow .btn { width: 100%; min-height: 52px; font-size: 17px; } }
@media (max-width: 640px) {
  nav.tabs .wrap { flex-wrap: wrap; overflow: visible; gap: 0; }
  nav.tabs button { flex: 1 1 33%; padding-inline: 6px; text-align: center; }
}

/* Review screen: the photo button comes first; site details are optional and tucked away */
details.opts { margin-bottom: 14px; }
details.opts > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; padding: 0 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; font-weight: 600; color: var(--muted); list-style-position: inside; }
details.opts[open] > summary { margin-bottom: 8px; }
.finding dd { min-width: 0; } .finding dd code { white-space: normal; overflow-wrap: anywhere; }

.statebar { display: grid; gap: 6px; }
.statebar label { font-weight: 600; }
.statebar select { min-height: 44px; font-size: 16px; }
.statebar .hint { margin: 0; }

.field .seg { display: flex; } .field .seg button { flex: 1 1 auto; min-height: 44px; font-weight: 600; }

.notice.clearance { border-left: 5px solid var(--hi, #2a78d6); margin: 0 0 12px; }
.notice.stop { border-left: 5px solid var(--critical, #b3261e); font-weight: 500; margin: 0 0 12px; }

footer.advisory { border-top: 1px solid var(--line); margin-top: 24px; padding: 16px 0 28px; color: var(--muted); font-size: 13px; line-height: 1.5; }
@media print { footer.advisory { display: none; } }

.adm-list code { white-space: normal; overflow-wrap: anywhere; word-break: break-all; }
.adm-list li, .adm-list .hint { overflow-wrap: anywhere; min-width: 0; }

/* Plan cards: calm sans type instead of the condensed uppercase display face */
.plan h3 { font-family: var(--body); text-transform: none; letter-spacing: 0; font-size: 17px; font-weight: 600; }
.plan .price { font-family: var(--body); font-size: 34px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

/* =====================================================================
   Visual refresh: same CoreSafe navy / white / silver palette, softer shapes,
   calmer type, more space. This block comes last so it wins over the rules above.
   ===================================================================== */
:root {
  --bg: #f3f5f9; --surface: #ffffff; --ink: #14192f; --muted: #5a6479; --line: #e2e6ee; --line-strong: #cdd3df;
  --field: #ffffff; --soft: #f1f3f8; --accent-hover: #232b4d; --ring: rgba(20, 25, 47, .16);
  --r-sm: 10px; --r: 16px; --r-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(20, 25, 47, .05), 0 1px 1px rgba(20, 25, 47, .03);
  --shadow: 0 6px 24px rgba(20, 25, 47, .07), 0 1px 3px rgba(20, 25, 47, .05);
  --display: "Inter", "SF Pro Display", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --body: "Inter", "SF Pro Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0c0f1d; --surface: #141a30; --ink: #f2f3f7; --muted: #a3abbb; --line: #252d4a; --line-strong: #364067; --field: #0f1426; --soft: #1a2240; --accent-hover: #ffffff; --ring: rgba(224, 224, 232, .28); --shadow-sm: none; --shadow: 0 8px 28px rgba(0, 0, 0, .35); }
}
body { font: 15px/1.55 var(--body); background: var(--bg); -webkit-font-smoothing: antialiased; letter-spacing: -.005em; }
h1, h2, h3, h4 { font-family: var(--display); text-transform: none; letter-spacing: -.015em; font-weight: 650; }
:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; border-radius: 8px; }
.wrap { max-width: 1060px; }

/* Header: brand on the left, account on the right, usage as a quiet second row */
.band { background: linear-gradient(180deg, #11162b 0%, #181e3a 100%); border-bottom: 0; padding-block: 14px 12px; }
.band .wrap { display: grid; grid-template-columns: 1fr auto; gap: 10px 20px; align-items: center; }
.band .wrap > div:first-child { min-width: 0; }
.brand img { height: 30px; }
.tagline { font-size: 12px; margin: 3px 0 0; color: var(--band-muted); letter-spacing: .01em; }
.who { justify-self: end; font-size: 13px; gap: 8px 12px; color: var(--band-muted); }
.who .btn { background: rgba(255, 255, 255, .08); color: var(--band-ink); border-color: rgba(255, 255, 255, .18); }
.who .btn:hover:not(:disabled) { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .3); }
.who .btn.primary { background: #fff; color: #14192f; border-color: #fff; }
.meters { grid-column: 1 / -1; display: flex; flex-wrap: nowrap; gap: 10px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.meters::-webkit-scrollbar { display: none; }
.meter { flex: 1 1 0; min-width: 104px; font-size: 11.5px; padding: 7px 10px 8px; border-radius: 10px; background: rgba(255, 255, 255, .06); color: var(--band-muted); white-space: nowrap; }
.meter .bar { height: 4px; border-radius: 999px; background: rgba(255, 255, 255, .14); margin-top: 6px; }
.meter .bar i { border-radius: 999px; background: linear-gradient(90deg, #e0e0e8, #ffffff); }
.meter.full .bar i { background: #ff8f84; }
.hero-logo { width: min(300px, 62%); }

/* Section tabs: a sticky row of pills */
nav.tabs { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
nav.tabs .wrap { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 6px; padding-block: 10px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
nav.tabs .wrap::-webkit-scrollbar { display: none; }
nav.tabs button { flex: 0 0 auto; border: 0; border-radius: 999px; padding: 8px 15px; min-height: 0; font-weight: 550; font-size: 14px; color: var(--muted); background: transparent; transition: background .15s, color .15s; }
nav.tabs button:hover { background: var(--soft); color: var(--ink); }
nav.tabs button[aria-selected="true"] { background: var(--ink); color: var(--bg); box-shadow: 0 2px 8px rgba(20, 25, 47, .22); }
@media (prefers-color-scheme: dark) { nav.tabs button[aria-selected="true"] { background: #e0e0e8; color: #14192f; } }
@media (max-width: 640px) { nav.tabs .wrap { flex-wrap: nowrap; overflow-x: auto; gap: 6px; } nav.tabs button { flex: 0 0 auto; padding-inline: 14px; } }
@media (pointer: coarse) { nav.tabs button { min-height: 40px; } }

main { padding-block: 22px 96px; }

/* Cards */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.panel h2 { font-size: 19px; margin-bottom: 12px; }
.panel h3 { font-size: 16px; }
@media (max-width: 520px) { .panel { padding: 16px; border-radius: 14px; } }

/* Forms */
.field { gap: 6px; margin-bottom: 14px; }
.field > label, .legend { font-size: 13px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--ink); }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="date"], input[type="search"], select, textarea {
  border: 1px solid var(--line-strong); background: var(--field); border-radius: var(--r-sm); padding: 11px 13px; transition: border-color .15s, box-shadow .15s; }
input:hover, select:hover, textarea:hover { border-color: var(--muted); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px var(--ring); }
select { appearance: none; -webkit-appearance: none; padding-right: 38px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%235a6479' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 13px center; }
input[type="checkbox"], input[type="radio"] { accent-color: #14192f; }
@media (prefers-color-scheme: dark) { input[type="checkbox"], input[type="radio"] { accent-color: #e0e0e8; } }
.hint { font-size: 13px; line-height: 1.5; }
.err { font-size: 14px; }

/* File picker: a large tappable drop area instead of the browser's grey button */
input[type="file"] { width: 100%; padding: 22px 16px; border: 2px dashed var(--line-strong); border-radius: var(--r); background: var(--soft); color: var(--muted); font-size: 14px; cursor: pointer; transition: border-color .15s, background .15s; }
input[type="file"]:hover { border-color: var(--ink); background: var(--surface); }
input[type="file"]::file-selector-button { margin-right: 14px; border: 0; border-radius: 999px; padding: 10px 18px; background: var(--ink); color: var(--bg); font: 600 14px var(--body); cursor: pointer; }
@media (prefers-color-scheme: dark) { input[type="file"]::file-selector-button { background: #e0e0e8; color: #14192f; } }

/* Buttons */
.btn { border: 1px solid var(--line-strong); background: var(--surface); border-radius: var(--r-sm); padding: 10px 18px; font-weight: 600; font-size: 14.5px; box-shadow: var(--shadow-sm); transition: background .15s, border-color .15s, transform .08s, box-shadow .15s; }
.btn:hover:not(:disabled) { border-color: var(--ink); background: var(--soft); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn.primary { background: linear-gradient(180deg, #1d2547 0%, #14192f 100%); color: #fff; border-color: #14192f; box-shadow: 0 2px 8px rgba(20, 25, 47, .28); }
.btn.primary:hover:not(:disabled) { background: linear-gradient(180deg, #27315c 0%, #1a2142 100%); border-color: #1a2142; }
.btn.primary:disabled { background: var(--line-strong); border-color: var(--line-strong); color: var(--muted); box-shadow: none; opacity: 1; }
@media (prefers-color-scheme: dark) { .btn.primary { background: #e0e0e8; color: #14192f; border-color: #e0e0e8; } .btn.primary:hover:not(:disabled) { background: #fff; border-color: #fff; } }
.btn.small { padding: 6px 12px; font-size: 13px; border-radius: 9px; box-shadow: none; }
.btn.danger { background: var(--critical); color: #fff; border-color: var(--critical); }
.btn.danger:hover:not(:disabled) { background: var(--critical); filter: brightness(.94); }
.row { gap: 10px; }
.camrow .btn { border-radius: var(--r); box-shadow: 0 6px 18px rgba(20, 25, 47, .28); }

/* Segmented controls */
.seg { display: inline-flex; border: 0; background: var(--soft); padding: 4px; border-radius: 12px; gap: 2px; overflow: visible; }
.seg button { border: 0; background: transparent; border-radius: 9px; padding: 8px 16px; font-weight: 600; color: var(--muted); transition: background .15s, color .15s; }
.seg button:hover:not(:disabled) { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 4px rgba(20, 25, 47, .16); }
.seg.tri button[data-v="pass"][aria-pressed="true"] { background: var(--low); color: #fff; }
.seg.tri button[data-v="fail"][aria-pressed="true"] { background: var(--critical); color: #fff; }
.seg.tri button[data-v="na"][aria-pressed="true"] { background: var(--muted); color: #fff; }
@media (prefers-color-scheme: dark) { .seg.tri button[aria-pressed="true"] { color: #14192f !important; } }

/* Notices, chips, pills */
.notice { border: 1px solid var(--line); border-radius: 12px; background: var(--soft); padding: 12px 16px; color: var(--muted); }
.notice.upgrade { background: var(--surface); border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.notice.clearance { border-left: 4px solid var(--medium); background: var(--surface); }
.notice.stop { border-left: 4px solid var(--critical); background: color-mix(in srgb, var(--critical) 6%, var(--surface)); color: var(--ink); }
.pill { border: 0; border-radius: 999px; padding: 3px 10px; font-size: 11.5px; letter-spacing: .03em; background: color-mix(in srgb, currentColor 12%, transparent); }
.chip { border: 0; border-radius: 999px; padding: 3px 10px; background: var(--soft); }
.chip[data-st="completed"] { background: color-mix(in srgb, var(--low) 14%, transparent); }

/* Findings and audit items */
.finding, .aitem { border: 1px solid var(--line); border-left: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-sm); padding: 16px 18px 16px 22px; position: relative; overflow: hidden; }
.finding::before, .aitem::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--sev, var(--line)); }
.finding h3 { font-size: 17px; }
.finding dl { gap: 6px 16px; }
.cite { font-size: 12.5px; background: var(--soft); padding: 1px 7px; border-radius: 6px; }
.ai-sug { border: 1px solid var(--line); border-radius: 12px; background: var(--soft); }
.fixbox { border-top: 1px solid var(--line); }

/* Chat */
.msg { padding: 11px 15px; border-radius: 18px; line-height: 1.5; }
.msg.user { background: linear-gradient(180deg, #1d2547, #14192f); color: #fff; border-bottom-right-radius: 6px; }
.msg.assistant { background: var(--soft); border: 0; border-bottom-left-radius: 6px; }
@media (prefers-color-scheme: dark) { .msg.user { background: #e0e0e8; color: #14192f; } }
.bubble-btn { width: 58px; height: 58px; border: 0; background: linear-gradient(180deg, #1d2547, #11162b); box-shadow: 0 8px 24px rgba(20, 25, 47, .4); transition: transform .15s; }
.bubble-btn:hover { transform: scale(1.06); background: linear-gradient(180deg, #27315c, #14192f); }
.bubble-panel { border-radius: 20px; border: 1px solid var(--line); box-shadow: var(--shadow); padding: 16px; }

/* Plans */
.plans { gap: 16px; }
.plan { border-radius: var(--r); padding: 22px; box-shadow: var(--shadow-sm); border: 1px solid var(--line); gap: 8px; }
.plan.current { border: 2px solid var(--ink); box-shadow: var(--shadow); }
.plan h3 { font-size: 17px; font-weight: 650; }
.plan .price { font-size: 36px; font-weight: 650; letter-spacing: -.03em; }
.plan ul { padding-left: 0; list-style: none; display: grid; gap: 8px; }
.plan li { position: relative; padding-left: 24px; }
.plan li::before { content: ""; position: absolute; left: 0; top: .32em; width: 14px; height: 14px; border-radius: 50%; background: color-mix(in srgb, var(--low) 16%, transparent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233f7a4a' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 9px no-repeat; }

/* Audit templates, history, team */
.tgrid { gap: 16px; }
.tcard { border-radius: var(--r); padding: 18px; box-shadow: var(--shadow-sm); transition: box-shadow .15s, transform .15s; }
.tcard:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.team-row { border-bottom: 1px solid var(--line); padding-block: 12px; }
.team-row:last-child { border-bottom: 0; }
.bar.big { height: 10px; border-radius: 999px; background: var(--soft); }
.bar.big i { border-radius: 999px; background: linear-gradient(90deg, #14192f, #3b4670); }
.consent { border-radius: 12px; background: var(--soft); border-color: var(--line); padding: 14px 16px; }
.pthumb img, .thumbs img, .thumbs canvas { border-radius: 12px; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
details.opts > summary { border-radius: var(--r); box-shadow: var(--shadow-sm); min-height: 50px; padding: 0 18px; color: var(--ink); font-weight: 600; }
details.panel > summary, .asec > summary { font-weight: 650; }
video.preview { border-radius: var(--r); }
footer.advisory { border-top: 1px solid var(--line); margin-top: 32px; }

/* Sign-in */
.auth { max-width: 440px; margin: -36px auto 20px; padding: 28px; border-radius: var(--r-lg); box-shadow: var(--shadow); position: relative; }
.auth h2 { font-size: 24px; margin-bottom: 14px; }
.auth .row .btn.primary { flex: 1 1 140px; padding-block: 12px; }
.oauth { gap: 10px; margin-bottom: 8px; }
.oauth-btn { padding: 12px 18px; }
.oauth .or { display: flex; align-items: center; gap: 12px; }
.oauth .or::before, .oauth .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
@media (max-width: 520px) { .auth { margin-top: -28px; padding: 22px 18px; } }
.band:has(.hero-logo) { padding-block: 40px 64px; background: radial-gradient(120% 140% at 50% 0%, #1e2650 0%, #11162b 62%); }
.band:has(.hero-logo) .wrap { display: block; }

/* Owner dashboard */
.adm-tile { border-radius: var(--r); padding: 16px 18px; box-shadow: var(--shadow-sm); }
.adm-k { letter-spacing: .02em; text-transform: none; font-size: 12.5px; font-weight: 600; }
.adm-v { font: 650 26px/1.15 var(--display); letter-spacing: -.02em; }
.table-scroll { border-radius: var(--r); box-shadow: var(--shadow-sm); }
.table-scroll th { letter-spacing: .02em; text-transform: none; font-size: 12.5px; background: var(--soft); }
.table-scroll td, .table-scroll th { padding: 11px 14px; }
.table-scroll tr:last-child td { border-bottom: 0; }
.adm-ht, .adm-ht i { border-radius: 999px; }
.linklike { text-decoration-thickness: 1px; text-underline-offset: 3px; }

@media (max-width: 640px) {
  .band .wrap { grid-template-columns: 1fr; }
  .who { justify-self: start; }
  .tagline { display: none; }
  .band:has(.hero-logo) .tagline { display: block; }
  h2 { font-size: 18px; }
}
@media print { nav.tabs { display: none !important; } .panel, .finding { box-shadow: none; } }

/* refresh: layout corrections */
.band .wrap > div:first-child { grid-column: 1; grid-row: 1; }
.who { grid-column: 2; grid-row: 1; }
.meters { grid-row: 2; }
.band:has(.hero-logo) { background: #14192f; } /* matches the logo image's own background so it blends in */
.band:has(.hero-logo) .wrap > div { grid-column: auto; }
details.panel.auth { margin-top: 0; padding: 4px 28px; }
details.panel.auth > summary { min-height: 52px; display: flex; align-items: center; }
details.panel.auth[open] { padding-bottom: 22px; }
.auth { margin-bottom: 14px; }
details.opts > summary { padding-block: 12px; }
@media (max-width: 640px) { .who { grid-column: 1; grid-row: 2; } .meters { grid-row: 3; } }
.plan ul { align-content: start; }
details.panel.auth { padding-inline: 20px; } details.panel.auth > summary { text-align: left; justify-content: flex-start; }

/* =====================================================================
   Modern layer: icons, capture tile, severity badges, app-style bottom tabs, motion
   ===================================================================== */
.ico { flex: none; vertical-align: -.2em; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn.block { width: 100%; padding-block: 15px; font-size: 16px; border-radius: 14px; }
.linklike.center { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 10px auto 0; font-weight: 600; font-size: 14.5px; }
.center { text-align: center; }

/* Tabs: icon + label pills on desktop */
nav.tabs button { display: inline-flex; align-items: center; gap: 8px; }
nav.tabs button .ico { opacity: .8; }
nav.tabs button[aria-selected="true"] .ico { opacity: 1; }

/* Review screen */
.cap-head { margin-bottom: 14px; }
.cap-head h2 { font-size: 22px; margin-bottom: 4px; }
.cap-head .hint { margin: 0; font-size: 14.5px; }
.capture-panel > .seg { margin-bottom: 14px; }
.capture-panel .seg button { display: inline-flex; align-items: center; gap: 7px; }
.capture { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 34px 18px; border: 2px dashed var(--line-strong); border-radius: 20px; cursor: pointer; font: inherit; color: var(--ink);
  background: radial-gradient(120% 140% at 50% 0%, color-mix(in srgb, var(--ink) 5%, var(--surface)) 0%, var(--soft) 100%); transition: border-color .15s, background .15s, transform .1s, box-shadow .15s; }
.capture:hover, .capture.drag { border-color: var(--ink); box-shadow: var(--shadow); }
.capture:active { transform: scale(.99); }
.capture.has { padding-block: 18px; flex-direction: row; justify-content: center; gap: 12px; }
.capture.has .cap-s { display: none; }
.cap-ico { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: linear-gradient(180deg, #27315c, #14192f); box-shadow: 0 8px 22px rgba(20, 25, 47, .3); }
.capture.has .cap-ico { width: 44px; height: 44px; }
.capture.has .cap-ico .ico { width: 22px; height: 22px; }
@media (prefers-color-scheme: dark) { .cap-ico { background: #e0e0e8; color: #14192f; } }
.cap-t { font-size: 18px; font-weight: 650; letter-spacing: -.01em; }
.cap-s { font-size: 14px; color: var(--muted); }
.thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 4px; }
.thumbs canvas { width: 88px; height: 88px; object-fit: cover; }
.need { color: var(--high); font-weight: 600; text-align: center; margin: 8px 0 0; }
.capture-panel details.opts { margin: 14px 0; }
.capture-panel .consent { margin: 14px 0 6px; }
.capture-panel .go { margin-top: 6px; }

/* Severity */
.sev-badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 650; letter-spacing: .01em; white-space: nowrap;
  color: var(--sv); background: color-mix(in srgb, var(--sv) 13%, transparent); }
.sev-badge b { font-weight: 700; }
[data-sev="critical"] { --sv: var(--critical); } [data-sev="high"] { --sv: var(--high); } [data-sev="medium"] { --sv: var(--medium); } [data-sev="low"] { --sv: var(--low); }
.sevstrip { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.summary { font-size: 16px; line-height: 1.6; }

/* Finding cards */
.finding { padding: 18px 20px 16px 24px; }
.finding .f-head { display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.finding .f-head h3 { margin: 0; font-size: 17px; flex: 1 1 200px; line-height: 1.3; }
.finding .f-head .sev-badge { margin-top: 1px; }
.f-do { background: color-mix(in srgb, var(--sv, var(--ink)) 7%, var(--surface)); border-radius: 12px; padding: 11px 14px; margin-bottom: 8px; }
.f-do-l { display: block; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--sv, var(--muted)); margin-bottom: 2px; }
.f-do p { margin: 0; }
.f-more { margin: 4px 0 0; }
.f-more > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 0; font-size: 14px; font-weight: 600; color: var(--muted); min-height: 44px; }
.f-more > summary::-webkit-details-marker { display: none; }
.f-more > summary .ico { transition: transform .2s; }
.f-more[open] > summary .ico { transform: rotate(180deg); }
.f-more dl { margin: 0 0 6px; }
.finding .pill { display: none; }

/* Motion (respects reduced-motion) */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.rise > *, .finding { animation: rise .35s cubic-bezier(.2, .7, .2, 1) both; }
.rise > *:nth-child(2) { animation-delay: .04s; } .rise > *:nth-child(3) { animation-delay: .08s; } .rise > *:nth-child(n+4) { animation-delay: .12s; }
@media (prefers-reduced-motion: reduce) { .rise > *, .finding { animation: none; } * { transition: none !important; } }

/* Phones: app-style bottom navigation */
@media (max-width: 720px) {
  nav.tabs { position: fixed; top: auto; bottom: 0; left: 0; right: 0; z-index: 40; border-top: 1px solid var(--line); border-bottom: 0; background: color-mix(in srgb, var(--surface) 94%, transparent); padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -4px 20px rgba(20, 25, 47, .08); }
  nav.tabs .wrap { padding: 6px 4px; gap: 0; scroll-snap-type: x proximity; }
  nav.tabs button { flex: 0 0 20%; flex-direction: column; gap: 3px; padding: 8px 2px 6px; border-radius: 12px; font-size: 11px; font-weight: 600; background: transparent !important; box-shadow: none !important; color: var(--muted); scroll-snap-align: center; min-height: 54px; }
  nav.tabs button .ico { width: 24px; height: 24px; opacity: 1; padding: 3px 12px; box-sizing: content-box; border-radius: 999px; transition: background .15s; }
  nav.tabs button[aria-selected="true"] { color: var(--ink); }
  nav.tabs button[aria-selected="true"] .ico { background: color-mix(in srgb, var(--ink) 11%, transparent); }
  nav.tabs button .lbl { white-space: nowrap; }
  main { padding-bottom: 120px; }
  .bubble-root { right: 12px; bottom: calc(78px + env(safe-area-inset-bottom)); }
  .bubble-panel { height: min(520px, 62vh); }
  body.has-bubble main { padding-bottom: 120px; }
  footer.advisory { padding-bottom: 80px; }
  .band { padding-block: 12px 10px; }
  .capture { padding-block: 30px; }
}
