:root {
  --paper: #f7f5ef;
  --ink: #18181b;
  --muted: #5f5f66;
  --line: rgba(24, 24, 27, 0.12);
  --gold: #ffc904;
  --gold-dark: #725800;
  --focus: #b68700;
  --shell: 80rem;
  color-scheme: light;
  font-family: Montserrat, Aptos, "Segoe UI", Arial, Helvetica, sans-serif;
  background: var(--paper);
  color: var(--ink);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--paper); }
body { margin: 0; min-width: 320px; background: var(--paper); color: var(--ink); text-rendering: optimizeLegibility; }
::selection { background: var(--gold); color: var(--ink); }
a { color: inherit; }
button, input { font: inherit; }
.shell { width: min(100% - 2.5rem, var(--shell)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.mission-grid { position: fixed; inset: 0; pointer-events: none; opacity: .48; background-image: linear-gradient(to right, rgb(24 24 27 / .035) 1px, transparent 1px), linear-gradient(to bottom, rgb(24 24 27 / .035) 1px, transparent 1px); background-size: 32px 32px; mask-image: linear-gradient(to bottom, #000 0%, transparent 74%); }

.site-header { position: relative; z-index: 3; border-bottom: 1px solid var(--line); background: rgb(247 245 239 / .92); backdrop-filter: blur(18px); }
.header-inner { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: var(--gold); background: var(--ink); font-size: .82rem; font-weight: 900; letter-spacing: -.03em; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: .9rem; letter-spacing: -.02em; }
.brand small { margin-top: .15rem; color: #71717a; font-size: .69rem; }
nav { display: flex; align-items: center; gap: 1.25rem; }
nav a, .public-safe { color: #5f5f66; font-size: .75rem; font-weight: 650; text-decoration: none; }
nav a:hover, .public-safe:hover { color: var(--ink); }
.public-safe { display: inline-flex; gap: .35rem; align-items: center; }

main { position: relative; }
.hero { padding-block: 5rem 4rem; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr); align-items: end; gap: 4rem; }
.eyebrow { margin: 0 0 .8rem; color: var(--gold-dark); font-size: .66rem; line-height: 1.4; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.hero h1 { max-width: 800px; margin: 0; font-size: clamp(3rem, 7vw, 6.6rem); line-height: .89; letter-spacing: -.068em; text-wrap: balance; }
.hero-note { padding-left: 1.25rem; border-left: 2px solid var(--gold); }
.hero-note > p:first-child { max-width: 30rem; margin: 0; color: var(--muted); font-size: 1rem; line-height: 1.75; }
.assurance { display: flex; align-items: center; gap: .5rem; margin: 1rem 0 0; color: #71717a; font-size: .75rem; font-weight: 600; }
.assurance span { color: #047857; }

.search-wrap { position: relative; max-width: 42rem; margin-top: 4rem; }
.search-icon { position: absolute; left: .8rem; top: .55rem; color: #52525b; font-size: 1.65rem; line-height: 1; }
#site-search { width: 100%; height: 3.5rem; padding: 0 4rem 0 3rem; border: 0; border-bottom: 2px solid var(--ink); outline: 0; background: transparent; color: var(--ink); font-size: 1rem; }
#site-search:focus { border-color: var(--focus); }
#site-search::placeholder { color: #71717a; }
#clear-search { position: absolute; right: .35rem; top: .5rem; width: 2.5rem; height: 2.5rem; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #52525b; font-size: 1.45rem; cursor: pointer; }
#clear-search:hover { background: rgb(24 24 27 / .06); }
#search-shortcut { position: absolute; right: .8rem; top: .75rem; padding: .22rem .5rem; border: 1px solid #d4d4d8; border-radius: .3rem; background: rgb(255 255 255 / .65); color: #71717a; font-size: .7rem; }
#search-status { min-height: 1rem; margin: .75rem 0 0; color: #71717a; font-size: .75rem; }

.groups { padding-bottom: 6rem; }
.link-group { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 3rem; padding-block: 4rem; scroll-margin-top: 5rem; }
.link-group + .link-group { border-top: 1px solid var(--line); }
.group-intro h2 { margin: 0; font-size: 1.55rem; letter-spacing: -.035em; }
.group-intro > p:not(.eyebrow):not(.guardrail) { max-width: 24rem; margin: .8rem 0 0; color: var(--muted); font-size: .875rem; line-height: 1.7; }
.guardrail { margin: 1.5rem 0 0; padding-left: 1rem; border-left: 2px solid var(--gold); color: #3f3f46; font-size: .76rem; font-weight: 700; line-height: 1.6; }
.guardrail span { color: var(--gold-dark); }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 1.75rem; }
.card { min-height: 10.25rem; display: flex; flex-direction: column; padding: 1.25rem .25rem; border-top: 1px solid #d4d4d8; text-decoration: none; transition: border-color 150ms ease, transform 150ms ease; }
.card:hover { border-color: var(--ink); }
.card:focus-visible, .brand:focus-visible, nav a:focus-visible, .public-safe:focus-visible, button:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.icon-token { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: var(--gold); font-size: .72rem; font-weight: 850; letter-spacing: .02em; transition: transform 150ms ease; }
.arrow { color: #a1a1aa; transition: transform 150ms ease, color 150ms ease; }
.card:hover .icon-token { transform: translateY(-2px); }
.card:hover .arrow { color: var(--ink); transform: translate(2px, -2px); }
.card-copy { display: block; margin-top: 1.1rem; }
.card-copy strong { display: block; font-size: .92rem; letter-spacing: -.01em; }
.card-copy > span:not(.title-line) { display: block; margin-top: .4rem; color: var(--muted); font-size: .82rem; line-height: 1.5; }
.title-line { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; }
.title-line strong { display: inline; }
.tag { display: inline-flex; padding: .15rem .45rem; border: 1px solid; border-radius: 999px; font-size: .56rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.tag-gold { border-color: rgb(182 135 0 / .25); background: rgb(255 201 4 / .2); color: #5d4700; }
.tag-green { border-color: rgb(4 120 87 / .15); background: #ecfdf5; color: #065f46; }
.tag-quiet { border-color: #d4d4d8; background: #f4f4f5; color: #52525b; }
.card small { margin-top: auto; padding-top: 1rem; color: #a1a1aa; font-size: .66rem; font-weight: 650; letter-spacing: .025em; }
.card[hidden], .link-group[hidden] { display: none; }
.no-results { padding: 5rem 0; border-top: 1px solid var(--line); text-align: center; }
.no-results > span { color: #a1a1aa; font-size: 2rem; }
.no-results h2 { margin: 1rem 0 0; font-size: 1.3rem; }
.no-results button { margin-top: 1rem; padding: .25rem 0; border: 0; border-bottom: 2px solid var(--gold); background: transparent; color: var(--gold-dark); font-weight: 750; cursor: pointer; }

footer { position: relative; background: var(--ink); color: #f4f4f5; }
.footer-grid { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 3rem; padding-block: 3rem; }
footer h2 { max-width: 44rem; margin: .6rem 0 0; font-size: 1.55rem; letter-spacing: -.03em; }
footer .eyebrow { color: var(--gold); }
footer p:not(.eyebrow) { max-width: 44rem; margin: .8rem 0 0; color: #a1a1aa; font-size: .82rem; line-height: 1.65; }
.footer-grid > p { white-space: nowrap; }

@media (max-width: 1050px) {
  nav { display: none; }
  .hero-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .link-group { grid-template-columns: 1fr; gap: 2rem; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .shell { width: min(100% - 2rem, var(--shell)); }
  .brand small { display: none; }
  .public-safe { font-size: .7rem; }
  .hero { padding-block: 3.5rem 3rem; }
  .hero h1 { font-size: clamp(2.7rem, 15vw, 4.4rem); }
  .hero-note { padding-left: 1rem; }
  .search-wrap { margin-top: 3rem; }
  .link-group { padding-block: 3rem; }
  .cards { grid-template-columns: 1fr; }
  .card { min-height: 9.5rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .footer-grid > p { white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
