/* Token Bar landing page: macOS dark popover system.
   The page mirrors the app: translucent charcoal surfaces, soft rounded
   corners, system type, bright macOS blue active controls, restrained
   source accents (Codex green, OpenCode blue, Claude orange).
   Static only: local system stacks, inline SVG, no external fonts,
   assets, scripts, or network. */

:root {
  --canvas: #17181c;
  --panel: rgba(255, 255, 255, 0.045);
  --raised: rgba(255, 255, 255, 0.07);
  --hairline: rgba(255, 255, 255, 0.12);
  --text: #f5f5f7;
  --muted: #aab3bf;
  --blue: #0a84ff;
  --blue-link: #7aa7ff;
  --codex: #30d158;
  --opencode: #0a84ff;
  --claude: #ff9f0a;
  --focus: #8ab8ff;
  --radius: 12px;
  --max: 68rem;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Helvetica, Arial, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  /* Last-resort overflow guard: clip (not hidden) adds no scroll container,
     so the sticky header keeps sticking to the viewport. */
  overflow-x: clip;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--blue);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-weight: 700;
  z-index: 10;
}

.skip:focus { top: 0.75rem; }

a { color: var(--blue-link); text-underline-offset: 0.15em; overflow-wrap: anywhere; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

section[id] { scroll-margin-top: 4.5rem; }

.mono { font-family: var(--mono); font-size: 0.92em; }

/* Header: translucent charcoal bar, like a macOS window top. */

.topbar {
  border-bottom: 1px solid var(--hairline);
  background: rgba(23, 24, 28, 0.82);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  position: sticky;
  top: 0;
  z-index: 5;
}

.topbar-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.7rem;
  padding-bottom: 0.7rem;
}

.topbar-inner > * { min-width: 0; }

.brand {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-mark { display: inline-flex; }

.ver {
  display: inline-block;
  border: 1px solid var(--hairline);
  background: var(--raised);
  color: var(--muted);
  border-radius: 999px;
  padding: 0.05rem 0.6rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 400;
}

.nav-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin: 0;
  padding: 0;
  font-size: 0.95rem;
}

/* Hero */

.hero { padding: 3rem 0 1rem; }

.hero-grid {
  display: grid;
  /* minmax(0, ...) keeps wide children (pre, buttons, mono figures) from
     forcing the track past the viewport. Identical rendering when content
     fits, so desktop is unchanged. */
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 2.5rem;
  align-items: start;
}

.hero-copy,
.hero-popover,
.cta-row,
.verify,
.popover { min-width: 0; }

h1, .lede, .cta-meta, .pop-number { overflow-wrap: break-word; }

.kicker {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 0.75rem;
}

h1 {
  font-family: var(--display);
  font-size: clamp(2rem, 4.6vw, 3.1rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin: 0 0 1rem;
  max-width: 18ch;
}

.lede { font-size: 1.12rem; max-width: 38rem; color: var(--text); }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.5rem 0 0.6rem;
}

.btn {
  display: inline-block;
  min-width: 0;
  max-width: 100%;
  padding: 0.8rem 1.3rem;
  border-radius: 10px;
  border: 1px solid var(--blue);
  color: #fff;
  background: transparent;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.98rem;
}

.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn:hover { text-decoration: underline; text-underline-offset: 0.2em; }

.cta-meta {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 1rem;
}

.checksum-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  margin: 0 0 1.25rem;
  padding: 0;
  font-size: 0.93rem;
}

.verify {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  min-width: 0;
  max-width: 100%;
  font-size: 0.83rem;
}

.verify code {
  font-family: var(--mono);
  color: var(--text);
  white-space: pre;
}

.note { color: var(--muted); font-size: 0.93rem; }
.note strong { color: var(--text); }

/* macOS popover specimen: the signature visual.
   Glassy charcoal card, 400pt-app proportions, real control patterns:
   eyebrow labels, blue active chips, source dots, ring + stacked bar. */

.hero-popover { padding-top: 0.5rem; }

.popover {
  background: rgba(44, 44, 46, 0.72);
  -webkit-backdrop-filter: saturate(1.5) blur(20px);
  backdrop-filter: saturate(1.5) blur(20px);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  padding: 1rem 1.1rem 0.9rem;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  font-variant-numeric: tabular-nums;
  max-width: 26rem;
}

.pop-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 0.7rem;
}

.pop-eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

.pop-sub { font-size: 1.02rem; font-weight: 700; margin: 0.1rem 0 0; }
.pop-view { font-size: 0.78rem; color: var(--muted); margin: 0.1rem 0 0; }

.pop-actions { display: flex; gap: 0.4rem; }

.pop-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.9rem;
  height: 1.9rem;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--raised);
  color: var(--text);
}

.pop-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0.65rem 0 0.35rem;
}

.pop-chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  font-size: 0.78rem;
}

.pop-chips li {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 9px;
  padding: 0.32rem 0.6rem;
  color: var(--text);
}

.pop-chips li.on { background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 700; }

.dot { display: inline-block; width: 0.5rem; height: 0.5rem; border-radius: 50%; }
.dot.codex { background: var(--codex); }
.dot.opencode { background: var(--opencode); }
.dot.claude { background: var(--claude); }

.pop-hero {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-top: 0.9rem;
  padding: 0.9rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--hairline);
  border-radius: 12px;
}

.pop-total { flex: 1; min-width: 0; }
.pop-caption {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

.pop-number {
  font-family: var(--display);
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}

.pop-cost { font-size: 0.9rem; font-weight: 700; margin: 0.1rem 0 0; }
.pop-meta { font-size: 0.76rem; color: var(--muted); margin: 0.15rem 0 0; }

.pop-ring { text-align: center; }
.pop-ring-caption { font-size: 0.68rem; color: var(--muted); margin: 0.3rem 0 0; }

.pop-mix {
  display: flex;
  height: 0.55rem;
  border-radius: 999px;
  overflow: hidden;
  margin: 0.9rem 0 0.5rem;
  background: rgba(255, 255, 255, 0.08);
  gap: 2px;
}

.pop-mix .seg { width: var(--w); min-width: 0; }
.pop-mix .seg.codex { background: var(--codex); }
.pop-mix .seg.opencode { background: var(--opencode); }
.pop-mix .seg.claude { background: var(--claude); }

.pop-legend {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  margin: 0;
  padding: 0;
  font-size: 0.76rem;
  color: var(--muted);
}

.pop-legend li { display: inline-flex; align-items: center; gap: 0.35rem; }

.pop-trend {
  display: flex;
  align-items: flex-end;
  gap: 0.3rem;
  height: 3rem;
  border-top: 1px solid var(--hairline);
  margin-top: 0.7rem;
  padding-top: 0.6rem;
}

.pop-trend span {
  flex: 1;
  min-width: 0;
  height: var(--h);
  min-height: 0.25rem;
  border-radius: 3px 3px 0 0;
  background: var(--blue);
  opacity: 0.85;
}

.pop-details {
  margin: 0.7rem 0 0;
  padding: 0.6rem 0.8rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--hairline);
  border-radius: 9px;
  font-size: 0.85rem;
  font-weight: 600;
}

.pop-foot { font-size: 0.76rem; color: var(--muted); margin: 0.55rem 0 0; }

.popover-note {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0.6rem 0 0;
}

/* Trust markers */

.trust {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 2rem 0 0;
  padding: 0;
}

.trust li {
  padding: 0.8rem 1rem;
  min-width: 0;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--panel);
}

.trust strong { display: block; font-size: 0.85rem; }
.trust span { font-size: 0.86rem; color: var(--muted); }

/* Sections */

main section { padding: 2rem 0 0.5rem; }

.sec-kicker {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.4rem;
}

h2 {
  font-family: var(--display);
  font-size: 1.55rem;
  letter-spacing: -0.015em;
  margin: 0 0 0.75rem;
}

h3 { font-size: 1.02rem; margin: 0 0 0.35rem; }

.source-strip {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  padding: 0;
  margin: 1rem 0;
}

.source-strip li {
  padding: 1rem 1.1rem;
  min-width: 0;
  border: 1px solid var(--hairline);
  border-top: 3px solid var(--blue);
  border-radius: var(--radius);
  background: var(--panel);
}

.source-strip li.src-codex { border-top-color: var(--codex); }
.source-strip li.src-opencode { border-top-color: var(--opencode); }
.source-strip li.src-claude { border-top-color: var(--claude); }

.source-strip h3 { display: flex; align-items: center; gap: 0.45rem; margin-top: 0; }
.source-strip p { font-size: 0.92rem; color: var(--muted); margin-bottom: 0; }
.source-strip p .mono { color: var(--text); }

.fine { font-size: 0.9rem; color: var(--muted); }

.proof-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.5rem 2rem;
}

.proof-grid > div { min-width: 0; }

.proof-grid p { color: var(--muted); font-size: 0.95rem; }
.proof-grid p strong, .proof-grid p .mono { color: var(--text); }

/* Install band */

.steps {
  margin: 1rem 0 0;
  padding: 1.1rem 1.25rem 1.1rem 2.75rem;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--panel);
  display: grid;
  gap: 0.6rem;
  font-size: 0.95rem;
}

.steps li::marker { color: var(--blue-link); font-weight: 700; }
.steps li { color: var(--muted); }
.steps li strong { color: var(--text); }
.steps li .mono { color: var(--text); }

/* FAQ */

.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.75rem 2rem;
  margin-top: 1rem;
}

.faq-grid > div {
  min-width: 0;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 1rem 1.1rem;
}

.faq-grid p { color: var(--muted); font-size: 0.93rem; margin: 0; }

/* Privacy + footer */

.bounds { display: grid; gap: 0.4rem; padding-left: 1.25rem; color: var(--muted); }
.bounds li::marker { color: var(--blue-link); }

.footer {
  border-top: 1px solid var(--hairline);
  margin-top: 2rem;
  padding: 1.5rem 0 2.5rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.footer p { overflow-wrap: anywhere; }

/* Responsive */

@media (max-width: 56rem) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  .hero-popover { padding-top: 0; }
  .popover { max-width: 100%; }
  .trust { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .source-strip { grid-template-columns: minmax(0, 1fr); }
  .proof-grid { grid-template-columns: minmax(0, 1fr); }
  .faq-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 36rem) {
  .hero { padding-top: 2rem; }
  .cta-row { min-width: 0; }
  .cta-row .btn { width: 100%; text-align: center; }
  .trust { grid-template-columns: minmax(0, 1fr); }
  .pop-number { font-size: 1.45rem; }
}

/* Reduced motion */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none;
    scroll-behavior: auto;
    transition: none;
  }
}
