/* Handrail — site styles. No external fonts, scripts or trackers: a privacy tool's own
   site should not phone home either. */

:root {
  --bg: #0b0d10;
  --bg-2: #0f1216;
  --surface: #13171c;
  --surface-2: #181d24;
  --border: #242b35;
  --border-strong: #323b47;
  --text: #e9edf2;
  --muted: #9aa5b3;
  --faint: #6b7684;
  --accent: #f2b441;
  --accent-ink: #1a1307;
  --accent-soft: rgba(242, 180, 65, 0.12);
  --green: #6fd3a2;
  --green-soft: rgba(111, 211, 162, 0.12);
  --amber: #f0a64b;
  --amber-soft: rgba(240, 166, 75, 0.13);
  --blue: #8fb4ff;
  --blue-soft: rgba(143, 180, 255, 0.12);
  --red: #ff8f8f;
  --code-bg: #0a0c0f;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 12px 40px rgba(0, 0, 0, 0.35);
  --maxw: 1120px;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #fbfaf7;
    --bg-2: #f5f3ee;
    --surface: #ffffff;
    --surface-2: #faf8f4;
    --border: #e7e2d8;
    --border-strong: #d6cfc2;
    --text: #15181c;
    --muted: #57606d;
    --faint: #7f8894;
    --accent: #b8741a;
    --accent-ink: #ffffff;
    --accent-soft: rgba(184, 116, 26, 0.1);
    --green: #1b7f55;
    --green-soft: rgba(27, 127, 85, 0.09);
    --amber: #a8620f;
    --amber-soft: rgba(168, 98, 15, 0.1);
    --blue: #2f5fc4;
    --blue-soft: rgba(47, 95, 196, 0.08);
    --red: #b42318;
    --code-bg: #16181c;
    --shadow: 0 1px 2px rgba(20, 16, 8, 0.04), 0 10px 30px rgba(20, 16, 8, 0.06);
    color-scheme: light;
  }
}

:root[data-theme="light"] {
  --bg: #fbfaf7;
  --bg-2: #f5f3ee;
  --surface: #ffffff;
  --surface-2: #faf8f4;
  --border: #e7e2d8;
  --border-strong: #d6cfc2;
  --text: #15181c;
  --muted: #57606d;
  --faint: #7f8894;
  --accent: #b8741a;
  --accent-ink: #ffffff;
  --accent-soft: rgba(184, 116, 26, 0.1);
  --green: #1b7f55;
  --green-soft: rgba(27, 127, 85, 0.09);
  --amber: #a8620f;
  --amber-soft: rgba(168, 98, 15, 0.1);
  --blue: #2f5fc4;
  --blue-soft: rgba(47, 95, 196, 0.08);
  --red: #b42318;
  --code-bg: #16181c;
  --shadow: 0 1px 2px rgba(20, 16, 8, 0.04), 0 10px 30px rgba(20, 16, 8, 0.06);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; }
code, pre, kbd { font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; }
p code, li code, td code, .muted code {
  font-size: 0.88em;
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 0.08em 0.38em;
  border-radius: 5px;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
@media (max-width: 560px) { .wrap { padding: 0 16px; } }

/* ── Navigation ── */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav .wrap { display: flex; align-items: center; gap: 28px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; letter-spacing: -0.01em; font-size: 17px; }
.brand svg { color: var(--accent); }
.nav-links { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.nav-links a { text-decoration: none; color: var(--muted); font-size: 14.5px; }
.nav-links a:hover { color: var(--text); }
.theme-btn {
  background: none; border: 1px solid var(--border); color: var(--muted);
  width: 34px; height: 34px; border-radius: 8px; cursor: pointer; display: grid; place-items: center;
}
.theme-btn:hover { color: var(--text); border-color: var(--border-strong); }
@media (max-width: 720px) { .nav-links a.opt { display: none; } }

/* ── Hero ── */
.hero {
  position: relative; overflow: hidden;
  padding: 92px 0 72px;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(900px 380px at 18% -10%, var(--accent-soft), transparent 70%),
    linear-gradient(var(--bg), var(--bg-2));
}
.hero::before {
  /* the rail: two posts and a bar, drawn as a faint grid of horizontal rules */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(to right, var(--border) 1px, transparent 1px);
  background-size: 72px 100%;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.5), transparent 75%);
  opacity: 0.35;
}
.hero .wrap { position: relative; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--muted);
  border: 1px solid var(--border); background: var(--surface);
  padding: 5px 12px; border-radius: 999px; margin-bottom: 26px;
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
h1 {
  font-size: clamp(38px, 6.2vw, 68px); line-height: 1.02; letter-spacing: -0.035em;
  margin: 0 0 22px; max-width: 16ch; font-weight: 750;
}
h1 em { font-style: normal; color: var(--accent); }
.lede { font-size: clamp(17px, 2vw, 20px); color: var(--muted); max-width: 60ch; margin: 0 0 36px; }
.lede strong { color: var(--text); font-weight: 600; }

.install {
  display: flex; align-items: stretch; max-width: 640px;
  background: var(--code-bg); color: #e9edf2;
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.install code { flex: 1; padding: 16px 18px; font-size: 15px; white-space: nowrap; overflow-x: auto; }
.install code .p { color: #6b7684; user-select: none; margin-right: 10px; }
.copy {
  border: 0; border-left: 1px solid #2a313b; background: #151a20; color: #c8d0da;
  padding: 0 18px; cursor: pointer; font: inherit; font-size: 13.5px; display: flex; align-items: center; gap: 8px;
}
.copy:hover { background: #1b2129; color: #fff; }
.copy.done { color: #6fd3a2; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 18px; color: var(--faint); font-size: 14px; }
.hero-meta a { color: var(--muted); }
.then { margin-top: 26px; color: var(--muted); font-size: 15px; }
.then code { color: var(--text); }

/* ── Sections ── */
section { padding: 88px 0; border-bottom: 1px solid var(--border); }
section.alt { background: var(--bg-2); }
.kicker { color: var(--accent); font-weight: 650; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 12px; }
h2 { font-size: clamp(28px, 3.6vw, 40px); line-height: 1.12; letter-spacing: -0.025em; margin: 0 0 16px; max-width: 24ch; }
.section-lede { color: var(--muted); font-size: 18px; max-width: 64ch; margin: 0 0 44px; }
h3 { font-size: 18px; letter-spacing: -0.01em; margin: 0 0 8px; }

/* request vs enforcement */
.versus { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 820px) { .versus { grid-template-columns: 1fr; } }
.vs-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; }
.vs-card.good { border-color: color-mix(in srgb, var(--green) 45%, var(--border)); box-shadow: 0 0 0 4px var(--green-soft); }
.vs-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.vs-card ul { margin: 16px 0 0; padding-left: 20px; color: var(--muted); }
.vs-card li { margin: 6px 0; }
.snippet {
  background: var(--code-bg); color: #d7dde5; border-radius: var(--radius-sm);
  padding: 14px 16px; font-size: 13.5px; overflow-x: auto; margin: 0; border: 1px solid #1f252d;
}
.snippet .c { color: #6b7684; }
.snippet .k { color: #f2b441; }
.snippet .s { color: #9fd7b8; }

/* extend guide: one step per row, samples full width */
.guide { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; gap: 22px; }
.guide-step {
  counter-increment: step; position: relative; min-width: 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px 28px 28px 84px;
}
.guide-step::before {
  content: counter(step); position: absolute; left: 28px; top: 26px;
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 15px;
}
.guide-head { max-width: 72ch; margin-bottom: 18px; }
.guide-head h3 { margin: 4px 0 8px; font-size: 20px; }
.guide-head p { margin: 0; color: var(--muted); }
.guide-step > .snippet, .guide-step .files { margin-top: 14px; }
.guide-step .snippet .p { color: #6b7684; user-select: none; }
.files { display: grid; gap: 14px; min-width: 0; }
.file { min-width: 0; }
.file-name {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; color: var(--muted);
  padding: 0 2px 6px;
}
.guide-note { color: var(--muted); font-size: 15px; margin: 16px 0 0; max-width: 80ch; }
.guide-list { margin: 16px 0 0; padding-left: 20px; color: var(--muted); display: grid; gap: 8px; max-width: 80ch; }
.guide-list strong { color: var(--text); font-weight: 600; }
@media (max-width: 620px) {
  .guide-step { padding: 20px 16px; }
  .guide-step::before { position: static; margin-bottom: 12px; }
}

/* features */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 960px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-3 { grid-template-columns: 1fr; } }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.feature .icon {
  width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); margin-bottom: 16px;
}
.feature p { color: var(--muted); margin: 0; font-size: 15px; }

/* badges */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px;
  border: 1px solid transparent; white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.b-enforced { color: var(--green); background: var(--green-soft); border-color: color-mix(in srgb, var(--green) 30%, transparent); }
.b-partial { color: var(--amber); background: var(--amber-soft); border-color: color-mix(in srgb, var(--amber) 30%, transparent); }
.b-advisory { color: var(--blue); background: var(--blue-soft); border-color: color-mix(in srgb, var(--blue) 30%, transparent); }
.b-neutral { color: var(--muted); background: var(--surface-2); border-color: var(--border); }
.b-neutral::before { display: none; }

/* packs */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.chip {
  border: 1px solid var(--border); background: var(--surface); color: var(--muted);
  padding: 7px 14px; border-radius: 999px; cursor: pointer; font: inherit; font-size: 14px;
}
.chip:hover { color: var(--text); border-color: var(--border-strong); }
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip .n { opacity: 0.6; margin-left: 4px; }
.packs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 820px) { .packs { grid-template-columns: 1fr; } }
.pack { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.pack[hidden] { display: none; }
.pack-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pack-id { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; color: var(--muted); }
.pack h3 { margin: 0; }
.pack p { margin: 0; color: var(--muted); font-size: 15px; }
.pack details { border-top: 1px dashed var(--border); padding-top: 10px; margin-top: 2px; }
.pack summary { cursor: pointer; color: var(--text); font-size: 14px; font-weight: 550; list-style: none; }
.pack summary::-webkit-details-marker { display: none; }
.pack summary::after { content: " +"; color: var(--faint); }
.pack details[open] summary::after { content: " –"; }
.pack dl { margin: 12px 0 0; font-size: 14px; }
.pack dt { font-weight: 600; margin-top: 10px; color: var(--text); }
.pack dd { margin: 4px 0 0; color: var(--muted); }
.pack dd ul { margin: 0; padding-left: 18px; }
.pack .cmd { margin-top: auto; padding-top: 6px; font-size: 13px; color: var(--faint); }
.pack .cmd code { background: none; border: 0; padding: 0; color: var(--muted); }

/* profiles */
.profiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 900px) { .profiles { grid-template-columns: 1fr; } }
.profile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; }
.profile.rec { border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); box-shadow: 0 0 0 4px var(--accent-soft); }
.profile .name { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; display: flex; align-items: center; gap: 10px; }
.profile p { color: var(--muted); font-size: 15px; margin: 8px 0 16px; }
.profile .members { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.profile .members span { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; background: var(--surface-2); border: 1px solid var(--border); padding: 3px 8px; border-radius: 6px; }
.profile .members span.new { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); color: var(--accent); }
.profile pre { margin-top: auto; }

/* how it works */
.flow { display: grid; grid-template-columns: 1.05fr 1fr; gap: 36px; align-items: start; }
@media (max-width: 900px) { .flow { grid-template-columns: 1fr; } }
.tree { font-size: 13.5px; line-height: 1.75; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: s; position: relative; padding: 0 0 22px 46px; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: -1px;
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--border-strong); font-size: 13.5px; font-weight: 650; color: var(--accent);
}
.steps li p { color: var(--muted); margin: 4px 0 0; font-size: 15px; }

.verify { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 44px; }
@media (max-width: 760px) { .verify { grid-template-columns: 1fr; } }
.verify .feature p { margin-top: 4px; }

/* limits */
.limits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 900px) { .limits { grid-template-columns: 1fr; } }
.limit { border-left: 3px solid var(--amber); padding: 4px 0 4px 18px; }
.limit p { color: var(--muted); margin: 6px 0 0; font-size: 15px; }

/* CTA + footer */
.cta { text-align: center; }
.cta h2 { margin-left: auto; margin-right: auto; }
.cta .install { margin: 28px auto 0; text-align: left; }
.footer { padding: 36px 0 48px; color: var(--faint); font-size: 14px; }
.footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; }
.footer a { color: var(--muted); text-decoration: none; }
.footer a:hover { color: var(--text); }
.footer .fine { flex-basis: 100%; font-size: 13px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 600; font-size: 15px;
  padding: 11px 18px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface);
}
.btn:hover { border-color: var(--text); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.06); }

/* ── Docs ── */
.docs { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 56px; padding: 48px 0 96px; }
@media (max-width: 900px) { .docs { grid-template-columns: 1fr; gap: 24px; } .toc { position: static !important; } }
.toc { position: sticky; top: 84px; align-self: start; font-size: 14px; }
.toc .t { color: var(--faint); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; margin: 18px 0 8px; font-weight: 650; }
.toc a { display: block; text-decoration: none; color: var(--muted); padding: 4px 0; }
.toc a:hover { color: var(--text); }
.doc h1 { font-size: clamp(32px, 4.5vw, 44px); max-width: none; margin-bottom: 12px; }
.doc h2 { font-size: 26px; margin: 56px 0 14px; max-width: none; padding-top: 8px; }
.doc h3 { font-size: 18px; margin: 30px 0 10px; }
.doc p, .doc li { color: color-mix(in srgb, var(--text) 86%, var(--muted)); }
.doc .lead { font-size: 18px; color: var(--muted); }
.doc pre { margin: 14px 0 18px; }
.doc table { width: 100%; border-collapse: collapse; margin: 14px 0 22px; font-size: 14.5px; }
.doc th, .doc td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.doc th { color: var(--muted); font-weight: 600; font-size: 13px; }
.doc td:first-child { white-space: nowrap; }
.note { border: 1px solid var(--border); border-left: 3px solid var(--accent); background: var(--surface); padding: 14px 18px; border-radius: var(--radius-sm); margin: 18px 0; }
.note p { margin: 0; }
.note.warn { border-left-color: var(--amber); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Grid children default to min-width: auto, so a long line in a <pre> would widen the
   whole card (and the page) instead of scrolling inside the code block. */
.versus > *, .grid-3 > *, .flow > *, .packs > *, .profiles > *, .verify > *, .limits > *, .docs > * { min-width: 0; }

/* Phones: show the whole install command instead of a clipped, sideways-scrolling line */
@media (max-width: 560px) {
  .install { flex-direction: column; }
  .install code { white-space: normal; overflow-wrap: anywhere; font-size: 14px; }
  .copy { border-left: 0; border-top: 1px solid #2a313b; padding: 10px 18px; justify-content: center; }
}
/* Inline commands in running text never split across lines */
.then code, .section-lede code, .feature p code { white-space: nowrap; }

/* The page you are on */
.nav-links a[aria-current="page"] { color: var(--text); font-weight: 600; }
