@font-face { font-family: "Archivo"; src: url("/assets/archivo.woff2") format("woff2-variations"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("/assets/plexmono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --ink: #13203A; --ink-2: #1C2C4D; --steel: #56657F; --steel-2: #8492A8;
  --fog: #EEF2F7; --bg: #F6F8FB; --line: #DDE4EE; --paper: #FFFFFF;
  --leak: #F2541B; --leak-soft: #FFE9DF; --amber: #B7791F; --amber-soft: #FDF3E1;
  --ok: #1F7A50; --ok-soft: #E3F4EB;
  --font: "Archivo", Arial, sans-serif; --mono: "Plex Mono", ui-monospace, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.5; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.15; }
p { margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--leak); outline-offset: 2px; border-radius: 6px; }
.muted { color: var(--steel); }
.mono { font-family: var(--mono); font-size: 0.86em; }

/* Brand */
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; }
.wordmark { font-weight: 800; font-stretch: 112%; font-size: 1.15rem; letter-spacing: -0.01em; }
.wm-leak { color: var(--leak); } .wm-to { color: var(--steel); } .wm-locked { color: var(--ink); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 10px; padding: 10px 16px; font-weight: 700; text-decoration: none; cursor: pointer; background: var(--ink); color: #fff; white-space: nowrap; }
.btn:hover { background: var(--ink-2); }
.btn--ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn--ghost:hover { background: var(--fog); }
.btn--leak { background: var(--leak); color: var(--ink); }
.btn--leak:hover { background: #FF6A35; }
.btn--small { padding: 7px 12px; font-size: 0.88rem; border-radius: 8px; }
.btn--add { width: 100%; background: var(--paper); color: var(--ink); border: 1.5px dashed #B9C5D6; }
.btn--add:hover { background: var(--fog); }

/* Shell */
.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.side { background: var(--paper); border-right: 1px solid var(--line); padding: 20px 14px; display: flex; flex-direction: column; gap: 22px; position: sticky; top: 0; height: 100vh; }
.side .brand { padding: 0 8px; }
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; text-decoration: none; color: var(--steel); font-weight: 600; }
.nav a svg { flex: none; }
.nav a:hover { background: var(--fog); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--ink); color: #fff; }
.nav a .count { margin-left: auto; font-size: 0.78rem; font-weight: 700; background: var(--leak-soft); color: #B23A0E; border-radius: 999px; padding: 1px 8px; }
.nav a[aria-current="page"] .count { background: var(--leak); color: var(--ink); }
.nav__group { margin: 16px 10px 6px; font-size: 0.8rem; font-weight: 700; font-stretch: 85%; color: var(--steel-2); }
.main { min-width: 0; display: flex; flex-direction: column; }
.bar { height: 60px; display: flex; align-items: center; gap: 16px; padding: 0 28px; border-bottom: 1px solid var(--line); background: var(--paper); position: sticky; top: 0; z-index: 4; }
.bar__menu { display: none; background: none; border: 0; padding: 6px; cursor: pointer; }
.bar__sample { font-size: 0.82rem; font-weight: 600; color: var(--amber); background: var(--amber-soft); padding: 4px 10px; border-radius: 999px; }
.bar__user { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 0.9rem; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 0.85rem; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.role { font-size: 0.75rem; font-weight: 700; background: var(--ink); color: #fff; border-radius: 6px; padding: 2px 7px; }
.view { padding: 28px 28px 64px; max-width: 1240px; width: 100%; outline: none; }

/* Page head */
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.head h1 { font-size: 1.75rem; font-weight: 800; font-stretch: 112%; letter-spacing: -0.01em; }
.head p { margin-top: 4px; color: var(--steel); }
.head__actions { display: flex; gap: 10px; }

/* Score band (overview hero) */
.band { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center; background: var(--ink); color: #fff; border-radius: 18px; padding: 26px 28px; margin-bottom: 22px; }
.grade { width: 108px; height: 108px; border-radius: 50%; display: grid; place-items: center; position: relative; }
.grade svg { position: absolute; inset: 0; }
.grade b { font-size: 3rem; font-weight: 800; font-stretch: 125%; line-height: 1; }
.grade small { position: absolute; bottom: 18px; font-size: 0.72rem; font-weight: 700; color: #A9B6CC; }
.band h2 { font-size: 1.35rem; font-weight: 800; font-stretch: 108%; }
.band p { color: #A9B6CC; margin-top: 4px; max-width: 46em; }
.band__stats { display: flex; gap: 14px 0; margin-top: 18px; flex-wrap: wrap; }
.band__stats div { padding: 0 22px; border-left: 1px solid rgba(255,255,255,0.12); }
.band__stats div:first-child { padding-left: 0; border-left: 0; }
.band__stats b { display: block; font-size: 1.5rem; font-weight: 800; font-stretch: 110%; font-variant-numeric: tabular-nums; }
.band__stats span { font-size: 0.82rem; color: #A9B6CC; }
.band__stats .hot b { color: #FF8A5C; }
.band__stats .good b { color: #6EE7A8; }

/* Panels */
.grid2 { display: grid; grid-template-columns: 1.35fr 1fr; gap: 22px; align-items: start; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 20px; margin-bottom: 22px; }
.panel__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.panel__head h2 { font-size: 1.08rem; font-weight: 800; font-stretch: 105%; }
.panel__head a { font-size: 0.88rem; font-weight: 600; color: var(--steel); }
.empty { padding: 26px; text-align: center; color: var(--steel); border: 1.5px dashed var(--line); border-radius: 12px; }

/* Finding rows */
.flist { list-style: none; margin: 0; padding: 0; }
.frow { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 13px 0; border-top: 1px solid var(--fog); }
.frow:first-child { border-top: 0; padding-top: 2px; }
.frow__title { font-weight: 700; }
.frow__meta { font-size: 0.85rem; color: var(--steel); margin-top: 2px; }
.frow.is-fixed .frow__title { color: var(--steel); text-decoration: line-through; }
.sev { display: inline-flex; align-items: center; font-size: 0.75rem; font-weight: 800; font-stretch: 90%; border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.sev--critical { background: var(--leak); color: var(--ink); }
.sev--high { background: var(--leak-soft); color: #B23A0E; }
.sev--medium { background: var(--amber-soft); color: var(--amber); }
.sev--low { background: var(--fog); color: var(--steel); }
.sev--fixed { background: var(--ok-soft); color: var(--ok); }

/* Tables */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 0.8rem; font-weight: 700; font-stretch: 90%; color: var(--steel); padding: 0 12px 10px 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 13px 12px 13px 0; border-bottom: 1px solid var(--fog); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table a.rowlink { font-weight: 700; text-decoration: none; }
.table a.rowlink:hover { text-decoration: underline; }
.tablewrap { overflow-x: auto; }
.minigrade { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; font-weight: 800; font-stretch: 115%; }
.g-A, .g-B { background: var(--ok-soft); color: var(--ok); }
.g-C { background: var(--amber-soft); color: var(--amber); }
.g-D, .g-F { background: var(--leak-soft); color: #B23A0E; }
.dots { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8rem; font-weight: 600; border-radius: 999px; padding: 3px 10px; background: var(--fog); color: var(--steel); white-space: nowrap; }
.pill--ok { background: var(--ok-soft); color: var(--ok); }
.pill--warn { background: var(--amber-soft); color: var(--amber); }
.pill--bad { background: var(--leak-soft); color: #B23A0E; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }

/* Chart */
.chart { width: 100%; height: 150px; display: block; }
.chart__labels { display: flex; justify-content: space-between; font-size: 0.78rem; color: var(--steel); margin-top: 6px; }
.bars { list-style: none; margin: 0; padding: 0; }
.bars li { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; margin-bottom: 12px; font-size: 0.92rem; }
.bars li .track { grid-column: 1 / -1; height: 8px; background: var(--fog); border-radius: 999px; overflow: hidden; }
.bars li .fill { height: 100%; background: var(--ink); border-radius: 999px; }
.bars li b { font-variant-numeric: tabular-nums; }

/* Tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 22px; overflow-x: auto; }
.tabs a { padding: 10px 14px; text-decoration: none; font-weight: 600; color: var(--steel); border-bottom: 2.5px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a[aria-current="page"] { color: var(--ink); border-color: var(--leak); }

/* Toggle */
.toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle__track { width: 42px; height: 24px; border-radius: 999px; background: #C5CFDD; position: relative; transition: background 0.15s; flex: none; }
.toggle__track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform 0.15s; }
.toggle input:checked + .toggle__track { background: var(--ok); }
.toggle input:checked + .toggle__track::after { transform: translateX(18px); }
.toggle input:focus-visible + .toggle__track { outline: 3px solid var(--leak); outline-offset: 2px; }

/* Code / snippet */
.snippet { position: relative; background: var(--ink); color: #D8E0EC; border-radius: 12px; padding: 16px 18px; font-family: var(--mono); font-size: 0.84rem; line-height: 1.6; overflow-x: auto; white-space: pre; }
.snippet + .btn, .copyrow { margin-top: 10px; }
.copyrow { display: flex; gap: 10px; align-items: center; }
.copied { color: var(--ok); font-weight: 700; font-size: 0.88rem; }

/* Onboarding */
.stepper { list-style: none; margin: 0 0 24px; padding: 0; display: flex; gap: 8px; flex-wrap: wrap; counter-reset: s; }
.stepper li { counter-increment: s; display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--steel-2); padding-right: 14px; }
.stepper li::before { content: counter(s); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--fog); color: var(--steel); font-weight: 800; font-size: 0.85rem; }
.stepper li.is-done::before { content: "\2713"; background: var(--ok-soft); color: var(--ok); }
.stepper li.is-now { color: var(--ink); }
.stepper li.is-now::before { background: var(--ink); color: #fff; }
.choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.choice { text-align: left; background: var(--paper); border: 1.5px solid var(--line); border-radius: 12px; padding: 14px; cursor: pointer; }
.choice:hover { border-color: var(--steel-2); }
.choice[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.choice b { display: block; }
.choice span { font-size: 0.85rem; color: var(--steel); }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; max-width: 520px; }
.field span { font-size: 0.85rem; font-weight: 600; color: var(--steel); }
.field input, .field select { font: inherit; padding: 11px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; }
.field input:focus, .field select:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--leak-soft); }

/* Drawer */
.drawer { position: fixed; inset: 0; z-index: 20; }
.drawer__scrim { position: absolute; inset: 0; background: rgba(19,32,58,0.45); }
.drawer__panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(620px, 100%); background: var(--paper); overflow-y: auto; padding: 26px 28px 40px; box-shadow: -20px 0 50px -20px rgba(19,32,58,0.4); }
.drawer__top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.drawer__close { background: var(--fog); border: 0; border-radius: 8px; width: 34px; height: 34px; cursor: pointer; font-size: 1.2rem; }
.drawer h2 { font-size: 1.45rem; font-weight: 800; font-stretch: 108%; margin: 10px 0 6px; }
.drawer h3 { font-size: 1rem; font-weight: 800; margin: 22px 0 8px; }
.drawer ol { margin: 0; padding-left: 20px; }
.drawer ol li { margin-bottom: 6px; }
.drawer__actions { display: flex; gap: 10px; margin-top: 26px; flex-wrap: wrap; }

/* Form Shield list */
.fs-row { display: grid; grid-template-columns: 74px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--fog); }
.fs-row:first-child { border-top: 0; }
.fs-row .who { font-weight: 700; }
.fs-row .detail { font-size: 0.86rem; color: var(--steel); }
.fs-row.is-blocked .who { color: var(--steel); text-decoration: line-through; }
.fs-row time { font-size: 0.85rem; color: var(--steel); font-variant-numeric: tabular-nums; }

/* Settings list */
.setting { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid var(--fog); }
.setting:first-child { border-top: 0; }
.setting p { font-size: 0.88rem; color: var(--steel); margin-top: 2px; }

/* Login */
.login { min-height: 100vh; display: grid; place-items: center; background: var(--bg); padding: 24px; }
.login__card { width: min(420px, 100%); background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 32px; }
.login__card h1 { font-size: 1.5rem; font-weight: 800; font-stretch: 110%; margin: 26px 0 8px; }
.btn--google { width: 100%; margin-top: 24px; background: var(--paper); color: var(--ink); border: 1.5px solid var(--line); padding: 13px 16px; }
.btn--google:hover { background: var(--fog); }
.login__error { color: #C2410C; font-weight: 600; min-height: 1.4em; margin-top: 12px; font-size: 0.9rem; }
.login__fine { font-size: 0.82rem; color: var(--steel); margin-top: 8px; }

/* Responsive */
@media (max-width: 1100px) { .grid2 { grid-template-columns: 1fr; } .grid3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 30; left: 0; top: 0; bottom: 0; width: 260px; transform: translateX(-100%); transition: transform 0.2s; box-shadow: 20px 0 50px -20px rgba(19,32,58,0.4); }
  .side.is-open { transform: none; }
  .bar__menu { display: inline-flex; }
  .bar { padding: 0 16px; }
  .bar__user .who { display: none; }
  .view { padding: 20px 16px 56px; }
  .band { grid-template-columns: 1fr; text-align: left; padding: 22px; }
  .grid3 { grid-template-columns: 1fr; }
  .band__stats div { padding: 0 14px; }
  .hide-sm { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.grid2 > *, .grid3 > *, .main, .panel { min-width: 0; }
@media (max-width: 860px) { .fs-row { grid-template-columns: 1fr auto; } .fs-row time { grid-column: 1 / -1; } }
