/* SecureRoot Risk Advisory brand theme (mirrors secureroot.co):
   Midnight Navy base, Deep Slate surfaces, Indigo Blue as the single main accent,
   Cornflower light for accent text, secondary accents used sparingly.
   Manrope for headings/UI, Karla for body. Fonts are self-hosted (CSP: 'self'). */
@font-face { font-family: 'Manrope'; src: url('/fonts/manrope-latin-wght-normal.woff2') format('woff2'); font-weight: 200 800; font-display: swap; }
@font-face { font-family: 'Karla'; src: url('/fonts/karla-latin-wght-normal.woff2') format('woff2'); font-weight: 200 800; font-display: swap; }

:root {
  --bg: #0F172A;          /* Midnight Navy */
  --panel: #1E293B;       /* Deep Slate */
  --raised: #162033;
  --ink: #F1F5F9;         /* Cloud Gray */
  --body: #CBD5E1;        /* Pale Sky, body text on dark */
  --muted: #94A3B8;
  --line: #334155;
  --brand: #2563EB;       /* Indigo Blue */
  --brand-hover: #3B82F6; /* Cornflower */
  --brand-ink: #FFFFFF;
  --accent-text: #60A5FA; /* Cornflower light: accent text only */
  --ok: #4ADE80; --warn: #FDBA74; --bad: #F87171; --info: #60A5FA;
  --c1: #2563EB; --c2: #3B82F6; --c3: #22D3EE; --c4: #64748B;
  --font-display: 'Manrope', system-ui, sans-serif;
  --font-body: 'Karla', system-ui, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.6 var(--font-body); background: var(--bg); color: var(--body);
  background-image: radial-gradient(60rem 30rem at 85% -10%, rgba(37, 99, 235, .08), transparent 70%); background-repeat: no-repeat; }
h1, h2, h3, figcaption, button, .metric b, .brand, label, summary, select { font-family: var(--font-display); }
h2, h3, b, strong { color: var(--ink); }
a { color: var(--accent-text); }

.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 20px; background: rgba(15, 23, 42, .92);
  border-bottom: 1px solid var(--line); flex-wrap: wrap; position: sticky; top: 0; z-index: 5; backdrop-filter: blur(6px); }
.brand { display: flex; align-items: center; gap: 14px; color: var(--ink); font-weight: 600; }
.brand img { height: 34px; width: auto; display: block; }
.brand .divider { width: 1px; height: 26px; background: var(--line); }
.brand .app-name { font-size: .95rem; letter-spacing: .01em; }
.eyebrow { font-family: var(--font-display); font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-text); font-weight: 700; }

main { max-width: 75rem; margin: 0 auto; padding: 20px 16px 48px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 20px; margin-bottom: 18px;
  box-shadow: 0 4px 17px rgba(0, 0, 0, .18); }
h2 { margin: 0 0 8px; font-size: 1.3rem; font-weight: 700; letter-spacing: -.01em; }
h3 { margin: 0 0 8px; font-size: 1.05rem; font-weight: 700; }
.muted { color: var(--muted); } .small { font-size: .875rem; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 14px 0; }
.metric { background: var(--raised); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.metric b { display: block; font-size: 1.75rem; font-weight: 800; color: var(--ink); }
.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
figure { margin: 0; background: var(--raised); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
figcaption { font-weight: 700; color: var(--ink); margin-bottom: 8px; }
svg text { fill: var(--body); font-size: 11px; font-family: var(--font-display); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }

button, .btn { font: 600 .9rem/1.2 var(--font-display); border-radius: 8px; padding: 9px 16px; border: 1px solid var(--line);
  background: transparent; color: var(--ink); cursor: pointer; transition: background-color .15s, border-color .15s; }
button:hover { border-color: var(--brand-hover); }
button.primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
button.primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
button.ghost { background: transparent; }
button.danger { color: var(--bad); }
button:disabled { opacity: .45; cursor: not-allowed; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }

input, select, textarea { font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; width: 100%; }
input::placeholder, textarea::placeholder { color: #64748B; }
textarea { min-height: 60px; }
label { color: var(--ink); font-size: .9rem; font-weight: 600; }

.domain h2 { margin-top: 4px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.control { border-top: 1px solid var(--line); padding: 16px 0; }
.domain h2 + .control { border-top: 0; }
.ctl-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.ctl-head h3 { margin: 0; }
.ref { font-family: var(--font-display); font-size: .8rem; color: var(--accent-text); }
summary { cursor: pointer; color: var(--muted); }
.grid2 { display: grid; grid-template-columns: 220px 1fr; gap: 10px 14px; margin-top: 10px; align-items: center; }
@media (max-width: 640px) { .grid2 { grid-template-columns: 1fr; } .brand .divider, .brand .app-name { display: none; } }
.evidence { margin-top: 12px; background: var(--raised); border: 1px dashed var(--line); border-radius: 10px; padding: 12px; }
.files { list-style: none; padding: 0; margin: 8px 0; }
.files li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0; flex-wrap: wrap; border-bottom: 1px solid rgba(51, 65, 85, .5); }
.tag { display: inline-block; font: 600 .72rem/1.4 var(--font-display); border-radius: 999px; padding: 2px 9px; border: 1px solid currentColor; }
.tag.ok { color: var(--ok); } .tag.warn { color: var(--warn); } .tag.bad { color: var(--bad); } .tag.info { color: var(--info); }
.review { margin-top: 10px; border-left: 3px solid var(--brand); padding: 10px 14px; background: var(--panel); border-radius: 0 8px 8px 0; }
.review ul { margin: 4px 0 8px 18px; padding: 0; }
.err { color: var(--bad); font-size: .875rem; }
.mode { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: space-between; }
.login { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.login input { width: 190px; }
.login select { width: auto; min-width: 220px; }
dialog { max-width: 540px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); color: var(--body); padding: 22px; }
dialog::backdrop { background: rgba(2, 6, 23, .7); }
code { color: var(--accent-text); }
footer.site { max-width: 75rem; margin: 0 auto; padding: 0 16px 32px; color: var(--muted); font-size: .85rem; }
.hidden { display: none !important; }
