/* Run AI on your own computer: planner demo styles, PrivacySafe Foundation dark theme. */
:root {
  --bg: #001235;
  --surface: #04294B;
  --ink: #FFFFFF;
  --body: #BBD6E8;
  --muted: #8FB3CC;
  --line: rgba(214, 238, 240, .2);
  --accent: #4FD1A5;
  --accent-ink: #001235;
  --lav: #63B3E8;
  --copper: #D9824F;
  --pass: #4FD1A5; --pass-bg: #0A3B3F;
  --warn: #F2B25C; --warn-bg: #3D3213;
  --fail: #FF8A80; --fail-bg: #43212B;
  --panel: #001235; --panel-ink: #D6EEF0;
  --font: "Inter", "Liberation Sans", "Helvetica Neue", Helvetica, Arial, "DejaVu Sans", Roboto, "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", "DejaVu Sans Mono", "Liberation Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; color: var(--ink); font-family: var(--font); font-size: 19px; line-height: 1.6; -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(circle at 14% 6%, rgba(32, 119, 182, .22), transparent 30rem),
    radial-gradient(circle at 86% 12%, rgba(56, 164, 162, .18), transparent 32rem),
    var(--bg);
}
.wrap { max-width: 1180px; margin: 0 auto; padding: 40px 24px 64px; }
.back { margin: 0 0 18px; font-size: 17px; }
a { color: var(--lav); text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px; }
a:hover, a:focus-visible { color: var(--panel-ink); text-decoration-style: solid; }
:focus-visible { outline: 3px solid var(--lav); outline-offset: 3px; border-radius: 6px; }
h1 { font-weight: 700; font-size: clamp(2rem, 4.5vw, 3.2rem); line-height: 1.05; letter-spacing: -.02em; margin: 0 0 12px; }
h2 { font-weight: 700; font-size: 20px; margin: 0 0 12px; letter-spacing: -.01em; }
h3.sub { font-size: 16px; margin: 18px 0 8px; font-weight: 700; }
.lede { color: var(--muted); margin: 0 0 28px; }
.presets { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.btn { font: inherit; font-size: 15.2px; cursor: pointer; border-radius: 10px; padding: 9px 16px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); }
.btn:hover, .btn:focus-visible { border-color: var(--accent); }
.btn.copy { font-size: 13px; padding: 4px 12px; border-radius: 8px; flex: 0 0 auto; }
.btn.copy.done { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 900px) { .grid { grid-template-columns: minmax(0, 1fr); } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px; margin-bottom: 24px; }
fieldset { border: 0; padding: 0; margin: 0 0 20px; min-width: 0; }
fieldset[hidden] { display: none; }
legend { font-weight: 600; font-size: 16px; padding: 0; margin-bottom: 8px; }
.val { font-family: var(--mono); font-size: 15px; color: var(--accent); }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg label { position: relative; display: block; border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; background: var(--bg); font-size: 15.2px; line-height: 1.3; cursor: pointer; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg label:has(input:checked) { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.seg label:has(input:focus-visible) { outline: 3px solid var(--lav); outline-offset: 2px; }
.seg small { display: block; font-family: var(--mono); font-size: 11.5px; opacity: .8; font-weight: 400; }
input[type="range"] { width: 100%; accent-color: var(--accent); }
select { font: inherit; font-size: 16px; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; width: 100%; }
.hint { font-size: 15px; color: var(--muted); margin: 8px 0 0; line-height: 1.5; }
.note { font-size: 15.2px; color: var(--muted); margin: 12px 0 0; }
.mono { font-family: var(--mono); font-size: .92em; color: var(--panel-ink); }
ul.plain { margin: 0; padding-left: 20px; font-size: 16px; color: var(--body); }
ul.plain li { margin: 6px 0; }
ul.plain strong { color: var(--ink); }

.verdict { border-radius: 12px; padding: 14px 16px; margin-bottom: 16px; border: 1px solid var(--line); background: var(--bg); }
.verdict strong { font-size: 18.4px; display: block; }
.verdict span { font-size: 16.5px; }
.verdict.good { background: var(--pass-bg); border-color: var(--pass); }
.verdict.warn { background: var(--warn-bg); border-color: var(--warn); }
.verdict.bad { background: var(--fail-bg); border-color: var(--fail); }
.bar-label { font-size: 14px; color: var(--muted); margin: 8px 0 4px; }
.track { position: relative; height: 26px; border-radius: 13px; overflow: hidden; background: rgba(214, 238, 240, .08); border: 1px solid var(--line); }
.zone { position: absolute; top: 0; bottom: 0; }
.zone.fast { left: 0; background: rgba(79, 209, 165, .32); }
.zone.slow { background: rgba(242, 178, 92, .30); }
.use { position: absolute; top: 0; bottom: 0; }
.use.w { background: var(--accent); }
.use.k { background: var(--lav); }
.use.o { background: var(--copper); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13.5px; color: var(--muted); margin: 10px 0 14px; }
.sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.sw.w { background: var(--accent); } .sw.k { background: var(--lav); } .sw.o { background: var(--copper); }
.sw.f { background: rgba(79, 209, 165, .45); } .sw.s { background: rgba(242, 178, 92, .45); }
table { width: 100%; border-collapse: collapse; font-size: 15.2px; }
th { text-align: left; font-weight: 600; font-size: 14px; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--line); }
td { padding: 8px; border-bottom: 1px solid var(--line); }
td.num, th.num { text-align: right; font-family: var(--mono); font-size: 13.6px; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tr.tot td { font-weight: 700; border-top: 1px solid var(--line-strong, rgba(214, 238, 240, .35)); }
.tablewrap { overflow-x: auto; }
.tag { display: inline-block; border-radius: 6px; padding: 0 8px; font-size: 13px; border: 1px solid; white-space: nowrap; }
.tag.good { color: var(--pass); border-color: var(--pass); background: var(--pass-bg); }
.tag.warn { color: var(--warn); border-color: var(--warn); background: var(--warn-bg); }
.tag.bad { color: var(--fail); border-color: var(--fail); background: var(--fail-bg); }

.speed .big { font-size: 52px; font-weight: 700; line-height: 1.05; letter-spacing: -.02em; }
.speed .big small { font-size: 17px; font-weight: 400; color: var(--muted); margin-left: 10px; letter-spacing: 0; }
.meter { position: relative; height: 14px; border-radius: 7px; background: rgba(214, 238, 240, .1); margin: 14px 0 6px; }
.meter-fill { height: 14px; border-radius: 7px; background: var(--accent); }
.meter-mark { position: absolute; top: -6px; width: 2px; height: 26px; background: var(--ink); }

.cmd { margin-bottom: 14px; }
.cmd-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 6px; font-size: 15px; font-weight: 600; }
pre { margin: 0; background: var(--panel); color: var(--panel-ink); border-radius: 10px; padding: 12px 16px; font-family: var(--mono); font-size: 13.2px; line-height: 1.6; overflow-x: auto; white-space: pre; border: 1px solid var(--line); }
pre .c { color: var(--muted); }
.term { font-size: 12.6px; }
.foot { margin: 8px 0 0; color: var(--muted); font-size: 14.4px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
