/* yes, if — shared styles for the homepage, console and docs. */
:root {
  --bg: #0b111c;
  --bg-2: #111a2a;
  --bg-3: #16223a;
  --ink: #eef2f6;
  --muted: #8a99ab;
  --dim: #5b6b7e;
  --line: rgba(238, 242, 246, .09);
  --line-2: rgba(238, 242, 246, .16);
  --mint: #3fdcaa;
  --mint-ink: #062a20;
  --teal: #11a07d;
  --amber: #f5b85c;
  --red: #ff7a6b;
  --violet: #a99bff;
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --body: "Inter", system-ui, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100dvh; background: var(--bg); color: var(--ink);
  font-family: var(--body); line-height: 1.55; overflow-x: hidden;
}
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(60vw 50vh at 78% 8%, rgba(63, 220, 170, .09), transparent 70%),
    radial-gradient(50vw 40vh at 0% 100%, rgba(17, 160, 125, .06), transparent 70%);
}
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; }
.wrap { position: relative; z-index: 1; width: min(1180px, 100%); margin-inline: auto; padding-inline: clamp(16px, 4vw, 40px); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.mint { color: var(--mint); }
.num { font-variant-numeric: tabular-nums; }

/* header */
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 22px; }
.logo { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.logo svg { width: 32px; height: 32px; }
.logo span { font-family: var(--display); font-weight: 800; font-size: 1.3rem; letter-spacing: -.03em; }
.logo b { color: var(--mint); font-weight: 800; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { padding: 8px 12px; border-radius: 999px; color: var(--muted); font-size: .9rem; text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); background: rgba(238,242,246,.06); }
@media (max-width: 760px) { .nav .hide-sm { display: none; } }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border: 0; border-radius: 999px;
  background: var(--mint); color: var(--mint-ink); font: 600 .92rem/1 var(--body);
  text-decoration: none; cursor: pointer; white-space: nowrap; transition: transform .15s, background-color .2s;
}
.btn:hover { background: #6be8c0; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line-2); }
.btn-ghost:hover { background: rgba(238,242,246,.06); }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: .84rem; }
.nav .btn { margin-left: 6px; color: var(--mint-ink); }
.nav .btn:hover { color: var(--mint-ink); background: #6be8c0; }

/* type */
.eyebrow { font-family: var(--mono); font-size: .74rem; letter-spacing: .28em; text-transform: uppercase; color: var(--muted); margin: 0 0 18px; }
.h-section { margin: 0; font-family: var(--display); font-weight: 800; font-size: clamp(2rem, 4.4vw, 3.3rem); letter-spacing: -.045em; line-height: 1.02; }
.lede { color: var(--muted); font-size: clamp(1rem, 1.3vw, 1.12rem); max-width: 56ch; }
.lede strong { color: var(--ink); font-weight: 500; }

/* surfaces */
.card {
  position: relative; border: 1px solid var(--line); border-radius: 20px;
  background: linear-gradient(180deg, rgba(17, 26, 42, .9), rgba(11, 17, 28, .9));
  box-shadow: 0 30px 70px -40px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255,255,255,.035);
}
.pad { padding: clamp(18px, 2.4vw, 26px); }
.label { font-family: var(--mono); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 8px; border: 1px solid var(--line); color: var(--muted); font-family: var(--mono); font-size: .72rem; }
.pill { display: inline-flex; align-items: center; padding: 5px 11px; border-radius: 999px; font: 600 .74rem/1 var(--mono); letter-spacing: .06em; }
.a-ALLOW { color: var(--mint); background: rgba(63,220,170,.12); }
.a-STEP_UP { color: var(--amber); background: rgba(245,184,92,.12); }
.a-HOLD { color: var(--violet); background: rgba(169,155,255,.13); }
.a-BLOCK { color: var(--red); background: rgba(255,122,107,.12); }
.notice { border: 1px solid rgba(245,184,92,.25); background: rgba(245,184,92,.06); color: #f3d4a2; border-radius: 12px; padding: 12px 14px; font-size: .86rem; }

/* risk meter */
.meter-row { display: flex; justify-content: space-between; font-family: var(--mono); font-size: .74rem; color: var(--muted); margin-bottom: 8px; }
.bar { position: relative; height: 7px; border-radius: 99px; background: rgba(238,242,246,.07); overflow: visible; }
.bar > i { display: block; height: 100%; border-radius: inherit; background: var(--red); transition: width .7s cubic-bezier(.2,.8,.2,1), background-color .5s; }
.bar .tick { position: absolute; top: -4px; width: 2px; height: 15px; background: var(--ink); opacity: .55; border-radius: 2px; }

/* forms */
input, select { font: inherit; color: inherit; }
.field { display: grid; gap: 6px; }
.field label { font-size: .8rem; color: var(--muted); }
.input, select.input {
  width: 100%; min-height: 42px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 10px;
  background: rgba(11,17,28,.7); color: var(--ink);
}
.input:focus { outline: none; border-color: rgba(63,220,170,.6); }
input[type="range"] { width: 100%; accent-color: var(--mint); }

/* footer */
.site-footer { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 60px; padding-block: 26px 34px; border-top: 1px solid var(--line); color: var(--dim); font-family: var(--mono); font-size: .72rem; letter-spacing: .03em; }
.site-footer a { color: var(--muted); }

/* charts */
.chart { width: 100%; height: auto; overflow: visible; }
.chart text { font-family: var(--mono); font-size: 10px; fill: var(--muted); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 12px; font-size: .8rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }

/* motion */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s cubic-bezier(.2,.8,.2,1), transform .7s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
