/* Flare Portal UI. Self-hosted fonts (no third-party requests), no inline styles (strict CSP). */
@font-face { font-family: "IBM Plex Sans"; src: url("/fonts/IBMPlexSans-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("/fonts/IBMPlexSans-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("/fonts/IBMPlexSans-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/fonts/IBMPlexMono-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --ink: #17211F; --ink-2: #2E3A37; --muted: #5B6663; --line: #E3E7E4; --line-2: #EEF1EF; --field: #C9D1CD;
  --ground: #F4F6F4; --surface: #FFFFFF;
  --accent: #0E6B5C; --accent-ink: #0A4F44; --accent-soft: #E3F1EE;
  --crit: #8F1D14; --crit-bg: #FDECEA; --crit-line: #B42318;
  --high: #8A3A06; --high-bg: #FEF0E2;
  --med: #2D4760; --med-bg: #EAF0F6;
  --low: #3D4744; --low-bg: #EEF1EF;
  --radius: 12px; --radius-s: 8px;
  --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); } a:hover { color: var(--accent-ink); }
h1, h2, h3, h4 { margin: 0; line-height: 1.3; }
h1 { font-size: 28px; font-weight: 600; letter-spacing: -0.01em; }
h2 { font-size: 18px; font-weight: 600; }
h3 { font-size: 16px; font-weight: 600; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid #5FB3A5; outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }
.boot { padding: 48px; color: var(--muted); }
.mono { font-family: var(--mono); font-size: 13px; overflow-wrap: anywhere; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack-s { display: flex; flex-direction: column; gap: 6px; }
.stack-l { display: flex; flex-direction: column; gap: 24px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.row-between { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.grid-wide { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.split { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.split > .main-col { flex: 999 1 420px; min-width: 0; }
.split > .side-col { flex: 1 1 280px; min-width: 0; }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card.pad-l { padding: 24px; }
.card.soft { background: var(--accent-soft); border-color: transparent; color: var(--accent-ink); }
.card.soft h3, .card.soft h2 { color: var(--accent-ink); }
.card.danger { border-color: #F2C3BE; }
.section-title { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: var(--radius-s); border: 1px solid var(--field); background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 500; cursor: pointer; text-decoration: none; }
.btn:hover { border-color: #A9B3AF; color: var(--ink); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #FFFFFF; }
.btn.primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); color: #FFFFFF; }
.btn.dark { background: var(--ink); border-color: var(--ink); color: #FFFFFF; }
.btn.danger { border-color: var(--crit-line); color: var(--crit); }
.btn.danger.solid { background: var(--crit-line); color: #FFFFFF; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.small { min-height: 36px; padding: 0 12px; font-size: 13px; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.icon-btn { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: none; background: transparent; border-radius: var(--radius-s); cursor: pointer; }
.icon-btn:hover { background: var(--line-2); }

/* Forms */
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; }
.input, select.input, textarea.input { min-height: 44px; padding: 0 12px; border: 1px solid var(--field); border-radius: var(--radius-s); background: var(--surface); font-size: 15px; font-weight: 400; width: 100%; }
textarea.input { padding: 10px 12px; min-height: 88px; resize: vertical; }
.input.code { font-family: var(--mono); letter-spacing: 0.2em; font-size: 20px; text-align: center; max-width: 240px; }
.input.mono { font-family: var(--mono); font-size: 14px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.5; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; accent-color: var(--accent); }
.hint { font-size: 13px; color: var(--muted); font-weight: 400; }
.error { padding: 12px 14px; border-radius: var(--radius-s); background: var(--crit-bg); color: var(--crit); font-size: 14px; }
.notice { padding: 12px 14px; border-radius: var(--radius-s); background: var(--accent-soft); color: var(--accent-ink); font-size: 14px; }
.warn { padding: 12px 14px; border-radius: var(--radius-s); background: var(--high-bg); color: var(--high); font-size: 14px; }

/* Pills */
.pill { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; flex: none; }
.pill.critical { background: var(--crit-bg); color: var(--crit); }
.pill.high { background: var(--high-bg); color: var(--high); }
.pill.medium { background: var(--med-bg); color: var(--med); }
.pill.low, .pill.neutral { background: var(--low-bg); color: var(--low); font-weight: 500; }
.pill.ok { background: var(--accent-soft); color: var(--accent-ink); }

/* Auth pages */
.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 32px 16px; }
.auth-box { width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; }
.brand svg { flex: none; }
.auth-foot { font-size: 13px; color: var(--muted); text-align: center; }

/* App shell */
.shell { min-height: 100vh; display: flex; flex-wrap: wrap; }
.side { flex: 1 1 220px; max-width: 260px; padding: 24px 16px; background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.side .ws { display: flex; flex-direction: column; padding: 0 8px 18px; gap: 2px; }
.side .ws select { border: none; padding: 0; font-size: 12px; color: var(--muted); background: transparent; min-height: 24px; max-width: 200px; }
.nav-link { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border-radius: var(--radius-s); color: var(--ink-2); text-decoration: none; font-size: 14px; }
.nav-link:hover { background: var(--line-2); color: var(--ink); }
.nav-link[aria-current="page"] { background: var(--accent-soft); color: var(--accent-ink); font-weight: 500; }
.nav-groups { display: flex; flex-direction: column; gap: 14px; }
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-label { padding: 0 12px 2px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.nav-toggle { display: none; }
.area-card > summary { cursor: pointer; list-style: none; }
.area-card > summary::-webkit-details-marker { display: none; }
.area-card > summary h2::before { content: "▸ "; color: var(--muted); }
.area-card[open] > summary h2::before { content: "▾ "; }
.area-card[open] > summary { margin-bottom: 12px; }
.filters { align-items: flex-end; }
.filters .field { min-width: 160px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tabs button { background: none; border: none; border-bottom: 2px solid transparent; padding: 10px 14px; min-height: 44px; cursor: pointer; color: var(--ink-2); font-size: 14px; }
.tabs button[aria-selected="true"] { border-bottom-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.nav-sep { height: 1px; background: var(--line); margin: 12px 8px; }
.side-foot { margin-top: auto; padding: 16px 12px 0; font-size: 12px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
.content { flex: 999 1 560px; min-width: 0; padding: 32px clamp(16px, 4vw, 48px) 64px; display: flex; flex-direction: column; gap: 24px; }
.page-head { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; justify-content: space-between; }
.narrow { max-width: 980px; width: 100%; }
@media (max-width: 760px) {
  .side { max-width: none; flex-basis: 100%; border-right: none; border-bottom: 1px solid var(--line); flex-direction: row; flex-wrap: wrap; padding: 12px; }
  .side .ws { flex-basis: 100%; padding-bottom: 8px; }
  .side .nav-sep, .side-foot { display: none; }
  .side { align-items: center; }
  .side .ws { flex-basis: auto; flex: 1; padding-bottom: 0; }
  .nav-toggle { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); cursor: pointer; font-size: 14px; }
  .nav-groups { display: none; flex-basis: 100%; padding-top: 8px; }
  .nav-toggle[aria-expanded="true"] + .nav-groups { display: flex; }
  .nav-link { min-height: 40px; }
}

/* Overview */
.score { display: flex; align-items: center; gap: 20px; }
.score svg { flex: none; }
.finding { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 76px; padding: 16px 18px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); cursor: pointer; text-align: left; }
.finding:hover { border-color: #C9D1CD; }
.finding[aria-pressed="true"] { border: 2px solid var(--accent); padding: 15px 17px; }
.finding .body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.finding .title { font-size: 15px; font-weight: 500; }
.finding .accepted { opacity: 0.75; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--accent); }
.status-dot.off { background: transparent; border: 2px solid #A9B3AF; }
.status-dot.err { background: var(--crit-line); }
.status-dot.warn { background: #D9822B; padding: 0; border: 0; margin: 0; }
a.sys { text-decoration: none; color: inherit; }
a.sys:hover strong { text-decoration: underline; }
.sys { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.sys .body { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* Steps */
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.steps li { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px; border-radius: 999px; font-size: 13px; background: var(--surface); color: var(--muted); border: 1px solid var(--line); }
.steps li.cur { background: var(--accent); color: #FFFFFF; border-color: var(--accent); font-weight: 500; }
.steps li.done { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }
.choice { text-align: left; min-height: 140px; padding: 20px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); cursor: pointer; display: flex; flex-direction: column; gap: 8px; }
.choice[aria-pressed="true"] { border: 2px solid var(--accent); padding: 19px; }
.choice .name { font-size: 17px; font-weight: 600; }

/* Tables and lists */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th, table.t td { text-align: left; padding: 12px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
table.t thead th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); font-weight: 600; border-bottom-color: var(--line); }
table.t th:first-child, table.t td:first-child { padding-left: 0; }
.list-row { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 12px 0; border-top: 1px solid var(--line-2); align-items: center; }
.list-row:first-child { border-top: none; }
.list-row .grow { flex: 1 1 240px; min-width: 0; }
.kv { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 10px 16px; padding: 16px; border-radius: 10px; background: var(--ground); font-size: 13px; align-items: center; }
.codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; padding: 16px; background: var(--ground); border-radius: 10px; font-family: var(--mono); font-size: 15px; }
.qr { width: 184px; height: 184px; background: #FFFFFF; padding: 8px; border: 1px solid var(--line); border-radius: 8px; }
.toggle-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line-2); }
.toggle-row:first-of-type { border-top: none; }
.toggle-row .grow { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.toggle-row select { width: auto; min-width: 120px; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #FFFFFF; padding: 12px 18px; border-radius: 10px; font-size: 14px; z-index: 20; max-width: calc(100vw - 32px); }
.empty { padding: 20px; border: 1px dashed var(--field); border-radius: var(--radius); color: var(--muted); font-size: 14px; }
.spark { display: block; }

.big { font-size: 28px; font-weight: 600; line-height: 1.1; }
a.card { text-decoration: none; color: var(--ink); display: flex; }
a.card:hover { border-color: #C9D1CD; color: var(--ink); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.toggle-row input[type=number] { width: 90px; }
fieldset { border: none; margin: 0; padding: 0; }
legend { padding: 0; margin-bottom: 6px; font-weight: 500; }
ul, ol { margin: 0; padding-left: 20px; }

/* AI assistants: setup snippets and one-time keys */
.code-block { margin: 0; padding: 12px 14px; border-radius: var(--radius-s); background: var(--ground); border: 1px solid var(--line); font: 13px/1.5 "IBM Plex Mono", ui-monospace, monospace; overflow-x: auto; white-space: pre; max-width: 100%; }
.token-text { word-break: break-all; font-size: 13px; padding: 8px 10px; background: var(--ground); border-radius: var(--radius-s); }
.t select { min-width: 9.5rem; }

/* Incident response */
.nav-alarm { color: var(--crit); margin-top: 8px; }
.incident-banner { display: block; padding: 14px 16px; border-radius: var(--radius-s); background: var(--crit-bg); color: var(--crit); border: 1px solid var(--crit-line); text-decoration: none; }
.incident-step.done { opacity: .7; }
.incident-step.done h3 { text-decoration: line-through; }
ol.plain { list-style: none; padding: 0; margin: 0; }
.code-block.wrap { white-space: pre-wrap; }
.nav-link.nav-alarm[aria-current="page"] { color: var(--crit); background: var(--crit-bg); }

/* Billing plans */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.plan.featured { border: 2px solid var(--accent); }
.plan .price { margin: 0; display: flex; align-items: baseline; gap: 4px; }
.plan .price strong { font-size: 30px; font-weight: 600; letter-spacing: -0.01em; }
.plan button { margin-top: auto; }
.narrow-card { max-width: 760px; }
.segmented { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--surface); }
.segmented .seg { border: 0; background: transparent; border-radius: 999px; padding: 8px 14px; min-height: 40px; font: inherit; font-size: 14px; cursor: pointer; color: var(--ink-2, inherit); }
.segmented .seg[aria-pressed="true"] { background: var(--accent); color: #fff; font-weight: 600; }

.captcha:empty { display: none; }

@media print { .no-print, .side, nav { display: none !important; } .shell { display: block; } body { background: #fff; } .card { break-inside: avoid; box-shadow: none; } }

.cols { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .cols { grid-template-columns: 1fr; } }
.exp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 4px 24px; }
details.blind { border-top: 1px solid var(--line); padding-top: 12px; }
details.blind summary { cursor: pointer; font-weight: 600; }
details.blind ul { margin-top: 8px; }

.urgent-banner { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px; border-radius: var(--radius); background: var(--crit-bg); color: var(--crit); border: 2px solid var(--crit-line); }
.urgent-banner p { margin: 0; color: var(--ink-2); }
.urgent-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 18px; }
.urgent-head strong { color: var(--crit); }
.urgent-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.urgent-list li { display: flex; align-items: center; gap: 12px; background: var(--surface); border-radius: var(--radius-s); padding: 10px 12px; }
.urgent-list .body { flex: 1; min-width: 0; display: flex; flex-direction: column; color: var(--ink); }
.urgent-banner a { color: var(--crit); font-weight: 600; }
.inline-panel .panel { margin: -4px 0 8px; }
.urgent-list li.urgent-detail { display: block; padding: 0; background: none; }
.urgent-detail .panel { color: var(--ink); }
.finding[aria-expanded="true"] svg:last-child { transform: rotate(90deg); }
.score-legend { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; color: var(--muted); }
.score-legend .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.score-legend .dot.good { background: #1F8A70; }
.score-legend .dot.bad { background: #C8402F; }
.trend { font-weight: 600; color: var(--muted); }
.trend.up { color: #1F8A70; }
.trend.down { color: #C8402F; }
.quiet-banner { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; padding: 16px 20px; border-radius: var(--radius); background: var(--accent-soft); color: var(--accent-ink); border: 1px solid #BFE0D7; }
.quiet-banner strong { font-size: 17px; }

/* Sign-in pages: no focus ring on the programmatically focused container (keyboard focus on
   fields and buttons is unchanged), a white card, and soft light-green shapes behind it. */
main[tabindex="-1"]:focus, main[tabindex="-1"]:focus-visible { outline: none; }
.auth { position: relative; overflow: hidden; isolation: isolate;
  background:
    radial-gradient(circle at 78% 18%, transparent 0 150px, #D3EDE4 151px 182px, transparent 183px),
    radial-gradient(circle at 86% 74%, #DCF0E9 0 60px, transparent 61px),
    radial-gradient(circle at 12% 82%, transparent 0 90px, #E0F2EC 91px 108px, transparent 109px),
    radial-gradient(circle at 22% 12%, #D6EEE6 0 6px, transparent 7px),
    radial-gradient(circle at 27% 16%, #D6EEE6 0 4px, transparent 5px),
    radial-gradient(circle at 70% 90%, #D6EEE6 0 5px, transparent 6px),
    linear-gradient(160deg, #F7FBF9 0%, #EEF6F2 100%); }
.auth::before { content: ""; position: absolute; z-index: -1; pointer-events: none; width: 560px; height: 560px; top: -220px; left: -180px;
  border-radius: 46% 54% 60% 40% / 50% 42% 58% 50%; background: linear-gradient(140deg, #CDEBE1, #E6F5F0); transform: rotate(-12deg); }
.auth::after { content: ""; position: absolute; z-index: -1; pointer-events: none; width: 380px; height: 380px; right: -110px; bottom: -150px;
  border-radius: 58% 42% 45% 55% / 48% 60% 40% 52%; background: linear-gradient(200deg, #D8F0E8, #F0F8F5); }
.auth .auth-box { position: relative; background: var(--surface); border-radius: 18px; padding: 36px 32px;
  box-shadow: 0 1px 2px rgba(23,33,31,.04), 0 16px 48px rgba(14,107,92,.12); }
@media (max-width: 520px) { .auth .auth-box { padding: 28px 20px; } .auth::before { width: 340px; height: 340px; top: -170px; } .auth::after { display: none; } }
.try-it summary { cursor: pointer; }
.msg-block { margin: 0; padding: 14px 16px; border-radius: var(--radius-s); background: var(--ground); border: 1px solid var(--line); font: 14px/1.55 var(--font); white-space: pre-wrap; }
[hidden] { display: none !important; }
.area-row { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.area-row:last-child { border-bottom: none; }
.stack-xs { display: flex; flex-direction: column; gap: 2px; }
.advanced > summary { cursor: pointer; color: var(--ink-2); padding: 8px 0; }
.area-row > .grow { flex: 1 1 260px; min-width: 0; }
ul.plain { list-style: none; padding: 0; margin: 0; }
.hero-line { font-size: 20px; font-weight: 600; display: flex; align-items: center; gap: 10px; padding: 18px 20px; border-radius: var(--radius); background: var(--accent-soft); color: var(--accent-ink); }
.hero-line.attn { background: var(--high-bg); color: var(--high); }
.hero-line .sub { display: block; font-size: 14px; font-weight: 400; margin-top: 2px; }
.nav-fold > summary { cursor: pointer; list-style: none; padding: 8px 12px; }
.nav-fold > summary::-webkit-details-marker { display: none; }
.nav-fold > summary::after { content: " ▸"; }
.nav-fold[open] > summary::after { content: " ▾"; }
.link-btn { background: none; border: none; padding: 0; color: inherit; text-decoration: underline; cursor: pointer; font: inherit; }
details.more > summary { cursor: pointer; color: var(--ink-2); font-size: 14px; padding: 6px 0; }
.status-line { margin-top: -12px; }
.staging-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; background: #B45309; color: #fff; text-align: center; font-size: 12px; font-weight: 600; letter-spacing: .04em; padding: 4px 8px; }
body.is-staging { padding-top: 24px; }
.ok-text { color: var(--accent-ink); font-weight: 600; }
.help-shot { margin: 4px 0; display: grid; gap: 6px; }
.help-shot img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--surface, #fff); }

/* Set up Flare: progress bar and steps that turn green */
.stack-xs { display: flex; flex-direction: column; gap: 2px; }
.setup-pct { font-size: 28px; font-weight: 600; color: var(--accent); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.progress { height: 8px; border-radius: 999px; background: var(--line-2); overflow: hidden; }
.progress-bar { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), #2E9C86); transition: width .4s ease; }
.progress-bar.w0 { width: 2%; } .progress-bar.w10 { width: 10%; } .progress-bar.w20 { width: 20%; } .progress-bar.w30 { width: 30%; } .progress-bar.w40 { width: 40%; }
.progress-bar.w50 { width: 50%; } .progress-bar.w60 { width: 60%; } .progress-bar.w70 { width: 70%; } .progress-bar.w80 { width: 80%; } .progress-bar.w90 { width: 90%; } .progress-bar.w100 { width: 100%; }
.setup-steps { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.setup-step { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); }
.setup-step.done { background: var(--accent-soft); border-color: transparent; }
.setup-step.current { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(14,107,92,.12); }
.setup-dot { width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 13px; font-weight: 600; background: var(--line-2); color: var(--muted); }
.setup-step.current .setup-dot { background: var(--accent); color: #fff; }
.setup-step.done .setup-dot { background: var(--accent); color: #fff; }
.setup-dot svg { width: 16px; height: 16px; }
.setup-name { font-weight: 600; font-size: 14px; color: var(--ink); text-decoration: none; }
a.setup-name:hover { color: var(--accent); }
.setup-step .btn { align-self: flex-start; margin-top: auto; }
@media (max-width: 960px) { .setup-steps { grid-template-columns: 1fr; } .setup-step { flex-direction: row; align-items: center; } .setup-step .btn { margin: 0 0 0 auto; } }

/* Modern polish: soft depth, icons in the menu, hover feedback */
.card { box-shadow: 0 1px 2px rgba(23,33,31,.04), 0 2px 8px rgba(23,33,31,.04); }
.nav-link svg { flex: 0 0 auto; color: var(--muted); }
.nav-link:hover svg, .nav-link[aria-current="page"] svg { color: var(--accent); }
.nav-link[aria-current="page"] { box-shadow: inset 3px 0 0 var(--accent); }
.nav-link.nav-alarm svg { color: currentColor; }
.nav-label { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.side-foot .me { display: flex; align-items: center; gap: 10px; min-width: 0; }
.avatar { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; font-size: 13px; }
.me-email { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.finding { transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; box-shadow: 0 1px 2px rgba(23,33,31,.04); }
.finding:hover { border-color: #C3D9D3; box-shadow: 0 4px 14px rgba(23,33,31,.08); }
.btn { transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease; }
.btn.primary:hover { box-shadow: 0 4px 12px rgba(14,107,92,.25); }
.hero-line { align-items: flex-start; }
.hero-icon { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.7); }
.input, select.input, textarea.input { transition: border-color .15s ease, box-shadow .15s ease; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(14,107,92,.12); outline: none; }
@media (prefers-reduced-motion: reduce) { .finding, .btn, .progress-bar { transition: none; } }
@media (max-width: 600px) {
  .finding { display: grid; grid-template-columns: 1fr auto; row-gap: 8px; }
  .finding > .pill { grid-column: 1; justify-self: start; }
  .finding > .body { grid-column: 1; grid-row: 2; }
  .finding > svg { grid-column: 2; grid-row: 1 / span 2; }
}
.setup .link-btn { font-size: 12px; color: var(--muted); }

/* Score card */
.card.score { grid-column: 1 / -1; display: flex; align-items: center; gap: 28px; flex-wrap: wrap; padding: 24px; }
.score-body { flex: 1 1 260px; }
.score-say { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.score-chart { flex: 0 1 260px; }
.score-spark { width: 100%; height: 48px; display: block; }
.pill.band-good { background: var(--accent-soft); color: var(--accent-ink); }
.pill.band-fair { background: var(--high-bg); color: var(--high); }
.pill.band-risk { background: var(--crit-bg); color: var(--crit); }
@media (max-width: 600px) { .card.score { gap: 16px; } .score-ring { width: 96px; height: 96px; } }

/* Sign-in: a brand panel on the left on wide screens, the form on the right */
.auth-side { display: none; }
@media (min-width: 961px) {
  .auth { display: grid; grid-template-columns: minmax(380px, 46%) 1fr; align-items: stretch; padding: 0; }
  .auth::before, .auth::after { display: none; }
  .auth > .auth-box { align-self: center; justify-self: center; margin: 48px; }
  .auth-side { display: flex; flex-direction: column; justify-content: space-between; gap: 40px; padding: 48px 56px; color: #E6F5F0;
    background: radial-gradient(circle at 85% 12%, rgba(127,209,191,.18) 0 180px, transparent 181px), radial-gradient(circle at 10% 95%, rgba(127,209,191,.12) 0 140px, transparent 141px), linear-gradient(160deg, #0C2621 0%, #0E3A31 100%); }
  .auth-side .brand { color: #fff; font-size: 18px; }
  .auth-side-title { font-size: 34px; line-height: 1.15; font-weight: 600; letter-spacing: -0.02em; color: #fff; max-width: 420px; }
  .auth-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; font-size: 15px; }
  .auth-points li { display: flex; align-items: center; gap: 10px; }
  .auth-tick { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: rgba(127,209,191,.18); color: #7FD1BF; flex: none; }
  .auth-alert { display: grid; gap: 8px; max-width: 380px; padding: 16px 18px; border-radius: 14px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); color: #CFE7DF; box-shadow: 0 16px 40px rgba(0,0,0,.25); }
  .auth-alert-head { display: flex; align-items: center; gap: 10px; font-weight: 600; color: #fff; font-size: 14px; }
}
.summary-grid { grid-template-columns: 1fr 1fr; }
@media (max-width: 700px) { .summary-grid { grid-template-columns: 1fr; } }
.score-empty { display: block; padding: 12px 0; border-top: 1px dashed var(--line); }
@media (min-width: 961px) {
  .auth > .auth-box .brand { display: none; }
  .auth-side { background: radial-gradient(circle at 88% 8%, rgba(127,209,191,.08) 0 200px, transparent 201px), radial-gradient(circle at 6% 98%, rgba(127,209,191,.07) 0 150px, transparent 151px), linear-gradient(160deg, #0C2621 0%, #0E3A31 100%); }
}

/* Your connected apps */
.app-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.app-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); flex-wrap: wrap; }
.app-row.new { border-color: #E9B07A; background: #FFFAF4; }
.app-row.rejected { border-color: var(--crit-line); background: var(--crit-bg); }
.app-row .grow { flex: 1 1 200px; }
.app-name { gap: 8px; }
.app-badge { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 600; background: var(--accent-soft); color: var(--accent-ink); flex: none; }
.app-badge.unknown, .app-badge.testing { background: var(--high-bg); color: var(--high); }
.app-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px 12px; }
.app-notice { display: flex; flex-direction: column; gap: 2px; padding: 14px 18px; border-radius: var(--radius); background: var(--high-bg); color: var(--high); text-decoration: none; border: 1px solid #F2C9A0; }
.app-notice.crit { background: var(--crit-bg); color: var(--crit); border-color: var(--crit-line); }
.app-notice:hover { filter: brightness(.98); }
/* Your account: grouped settings rows */
.acc-group { padding: 0; }
.acc-row { padding: 16px 20px; }
.acc-row + .acc-row { border-top: 1px solid var(--line); }
.acc-line { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.acc-text { display: flex; flex-direction: column; gap: 2px; flex: 1 1 280px; min-width: 0; }
.acc-line .acc-select { width: auto; min-width: 180px; flex: 0 0 auto; }
.acc-panel:not(:empty) { margin-top: 14px; }
.acc-form { max-width: 420px; }
.acc-row.danger strong { color: var(--crit); }
/* Setup: one line on the Overview, its own page */
.setup-line { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.setup-line-text { flex: 1 1 220px; }
.setup-line-bar { flex: 0 1 180px; }
.setup-list { list-style: none; margin: 0; }
.setup-row .setup-dot { flex: 0 0 auto; }
.setup-row.done .setup-dot, .setup-row.current .setup-dot { background: var(--accent); color: #fff; }
.setup-row.current { background: var(--accent-soft); }
/* Maintenance page */
.maint { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--ground, #F4F6F4); }
.maint-card { max-width: 520px; width: 100%; }
.maint .brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; }
.status-link { display: block; margin-top: 8px; text-align: center; }
.help-row { padding-top: 4px; }
.glance-title { margin-top: 8px; }
.segmented a.seg { text-decoration: none; display: inline-flex; align-items: center; }
.guide-tabs { align-self: flex-start; }

/* Ops portal (its own address): a plain frame around the operator pages. */
.ops-shell { min-height: 100vh; background: var(--bg, #F6F8F7); }
.ops-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 24px; border-bottom: 1px solid var(--line, #E3E8E6); background: var(--surface, #fff); position: sticky; top: 0; z-index: 2; }
.ops-content { max-width: 1200px; margin: 0 auto; padding: 24px 16px 64px; }
