/* The Root Network's look, matched to its docs (dark mode): #0A0C0F ground,
   #DFE3E4 headings, #9FA3A4 body, #2E9ACD only for active items and section
   labels. Headings want Objektiv Mk1 (licensed — used when present), Sora
   stands in; Inter for text; Paper Mono (OFL, self-hosted) for code. */
@font-face { font-family: "Paper Mono"; src: url("fonts/PaperMono-Variable.v1.ttf") format("truetype"); font-weight: 100 800; font-display: swap; }
:root {
  color-scheme: dark;
  --c-900: #DFE3E4; --c-800: #DFE3E4; --c-700: #C2C6C7; --c-500: #9FA3A4;
  --c-300: #6E7375; --c-200: #2A3036; --c-100: #1D2228; --c-50: #14181D;
  --c-off: #0F1216; --c-near: #0A0C0F;
  --surface: #101418; --surface-2: #14191E; --text-strong: #FFFFFF;
  --c-accent: #2E9ACD; --c-accent-light: #4FB0DD; --c-accent-bg: rgba(46, 154, 205, .10);
  --c-success: #4ADE80; --c-warn: #FBBF24; --c-error: #F87171;
  --c-success-bg: rgba(74, 222, 128, .12); --c-warn-bg: rgba(251, 191, 36, .12); --c-error-bg: rgba(248, 113, 113, .12);
  --c-success-text: #4ADE80; --c-warn-text: #FBBF24; --c-error-text: #F87171;
  --f-sans: "Inter", system-ui, -apple-system, sans-serif;
  --f-display: "Objektiv Mk1", "Sora", "Inter", system-ui, sans-serif;
  --f-serif: "Instrument Serif", Georgia, serif;
  --f-mono: "Paper Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --space-xs: .5rem; --space-sm: 1rem; --space-md: 2rem; --space-lg: 4rem; --space-xl: 6rem;
  --radius: 8px; --radius-lg: 12px; --nav-h: 64px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0 }
[hidden] { display: none !important }
html { font-size: 16px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale }
body { background: var(--c-near); color: var(--c-900); font-family: var(--f-sans); line-height: 1.6; font-size: .9375rem; min-height: 100vh; display: flex; flex-direction: column }
a { color: inherit; text-decoration: none; transition: color .2s }
a:hover { color: var(--c-accent) }
button { font: inherit }
:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; border-radius: 4px }
.mono { font-family: var(--f-mono); font-size: .92em }

.grid-bg { position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--c-100) 1px, transparent 1px), linear-gradient(90deg, var(--c-100) 1px, transparent 1px);
  background-size: 64px 64px; background-position: -1px -1px;
  mask-image: radial-gradient(ellipse 70% 50% at 50% 30%, #000 30%, transparent 80%); opacity: .5 }

.nav { position: sticky; top: 0; z-index: 50; height: var(--nav-h); border-bottom: 1px solid var(--c-100); background: rgba(10, 12, 15, .86); backdrop-filter: saturate(140%) blur(8px); -webkit-backdrop-filter: saturate(140%) blur(8px) }
.nav-inner { max-width: 1200px; margin: 0 auto; padding: 0 var(--space-md); height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem }
.brand-wrap { position: relative }
.brand-toggle { display: inline-flex; align-items: center; gap: .45rem; padding: 4px 8px; border-radius: 6px; border: 0; background: none; cursor: pointer; font-family: var(--f-display); font-weight: 700; font-size: 1rem; letter-spacing: -.015em; color: var(--c-900); white-space: nowrap }
.brand-toggle:hover { background: var(--c-50) }
.bt-muted { color: var(--c-300); font-weight: 400 }
.brand-logo { height: 16px; width: auto; display: block }
.hero-logo { height: 78px; width: auto; margin: 0 auto var(--space-md); display: block }
.bt-page { color: var(--c-900); font-weight: 600 }
.caret { display: inline-flex; font-size: .68rem; color: var(--c-300); transition: transform .2s }
.brand-toggle[aria-expanded="true"] .caret { transform: rotate(180deg) }
.brand-menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 70; background: var(--surface); border: 1px solid var(--c-100); border-radius: 8px; padding: 6px; min-width: 280px; box-shadow: 0 6px 18px rgba(0, 0, 0, .55); display: flex; flex-direction: column; gap: 2px }
.bm-item { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "name current" "host host" "desc desc"; gap: 2px 8px; padding: 8px 10px; border-radius: 6px; color: var(--c-900) }
a.bm-item:hover { background: var(--c-50); color: var(--c-900) }
.bm-item.current { background: var(--c-50) }
.bm-name { grid-area: name; font-family: var(--f-display); font-weight: 700; font-size: .9rem }
.bm-host { grid-area: host; font-family: var(--f-mono); font-size: .72rem; color: var(--c-300) }
.bm-desc { grid-area: desc; font-size: .8rem; color: var(--c-700) }
.bm-current { grid-area: current; font-size: .62rem; color: var(--c-300); text-transform: uppercase; letter-spacing: .04em; align-self: center }
.wallet { display: flex; align-items: center; gap: .5rem }
.addr { font-family: var(--f-mono); font-size: .82rem; background: var(--c-50); border: 1px solid var(--c-100); border-radius: 6px; padding: 2px 8px; color: var(--c-700) }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .65rem 1.25rem; border-radius: var(--radius); font-size: .875rem; font-weight: 500; border: 1px solid transparent; cursor: pointer; transition: all .2s; background: none; color: var(--c-900) }
.btn:disabled { opacity: .6; cursor: default }
.btn-primary { background: var(--c-accent); color: #fff }
.btn-primary:hover:not(:disabled) { background: var(--c-accent-light) }
.btn-outline { border-color: var(--c-100); background: var(--surface) }
.btn-outline:hover:not(:disabled) { border-color: var(--c-900) }
.btn-ghost { color: var(--c-500) }
.btn-ghost:hover { color: var(--c-900); background: rgba(255, 255, 255, .05) }
.btn-sm { padding: .4rem .85rem; font-size: .8125rem }
.btn-lg { padding: .85rem 1.6rem; font-size: 1rem }
.btn img { border-radius: 4px }

main { flex: 1 }
.container { max-width: 1200px; margin: 0 auto; padding: 0 var(--space-md); width: 100% }
.hero { padding: var(--space-xl) 0 var(--space-lg); text-align: center }
.eyebrow { font-size: .75rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--c-300); margin-bottom: var(--space-sm) }
h1 { font-family: var(--f-display); font-weight: 700; letter-spacing: -.025em; line-height: 1.05; font-size: clamp(2.4rem, 7vw, 5rem) }
h1 em { font-family: var(--f-serif); font-style: italic; font-weight: 400; letter-spacing: -.01em }
.lead { margin: var(--space-md) auto 0; max-width: 62ch; font-size: 1.0625rem; color: var(--c-500); line-height: 1.65 }
.hero-actions { margin-top: var(--space-md); display: flex; gap: var(--space-sm); justify-content: center; align-items: center; flex-wrap: wrap }
.picker { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: center; flex-basis: 100% }
.connected { display: inline-flex; align-items: center; gap: .5rem; font-weight: 500 }
.connected .dot { width: .55rem; height: .55rem; border-radius: 50%; background: var(--c-success) }
.fine { margin-top: var(--space-sm); font-size: .8125rem; color: var(--c-500) }
.fine.error { color: var(--c-error-text) }

section.sites, section.how { padding: var(--space-md) 0 }
.section-head { display: flex; align-items: baseline; gap: var(--space-sm); margin-bottom: var(--space-md) }
.section-head .num { font-family: var(--f-mono); font-size: .78rem; color: var(--c-300); letter-spacing: .06em }
.section-head h2 { font-family: var(--f-display); font-size: 1.4rem; font-weight: 700; letter-spacing: -.015em }
.card-grid { display: grid; gap: var(--space-md); grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)) }
.card { background: var(--surface); border: 1px solid var(--c-100); border-radius: var(--radius-lg); padding: var(--space-md); display: flex; flex-direction: column; gap: .5rem; position: relative; transition: border-color .2s, box-shadow .2s, transform .2s }
.card:hover { border-color: var(--c-accent); box-shadow: 0 8px 24px rgba(46, 154, 205, .25); transform: translateY(-1px); color: inherit }
.card .status { position: absolute; top: var(--space-md); right: var(--space-md); font-size: .65rem; letter-spacing: .1em; text-transform: uppercase; color: var(--c-300); font-weight: 600 }
.card .status.open { color: var(--c-success-text) }
.card h3 { font-family: var(--f-display); font-size: 1.0625rem; font-weight: 700 }
.card .url { font-family: var(--f-mono); font-size: .78rem; color: var(--c-500) }
.card p { color: var(--c-500); font-size: .9rem }
.locked-note { margin-top: var(--space-sm); color: var(--c-500); font-size: .875rem }
.how-list { display: grid; gap: .6rem; max-width: 72ch; padding-left: 1.2rem; color: var(--c-700) }
.noscript { padding: var(--space-sm) var(--space-md); color: var(--c-500) }

footer { border-top: 1px solid var(--c-100); padding: var(--space-md) 0; color: var(--c-500); font-size: .8125rem; margin-top: var(--space-lg) }
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 0 var(--space-md); display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--space-sm) }

@media (max-width: 640px) {
  .nav-inner, .container, .footer-inner { padding: 0 1rem }
  .bt-muted { display: none }
  .hero { padding: var(--space-lg) 0 var(--space-md) }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important }
}

/* ── TRN type scale + accents ── */
body { color: var(--c-500) }
h1, h2, h3, .section-head h2, .card h3, .bm-name { font-family: var(--f-display); color: var(--c-900); font-weight: 600 }
h1 { font-size: clamp(2.25rem, 6vw, 3.5rem); line-height: 1.1; letter-spacing: -.9px }
h1 em { color: var(--c-900) }
.section-head h2 { font-size: 24px; line-height: 32px; letter-spacing: -.6px }
.lead { font-size: 18px; line-height: 28px; color: var(--c-500) }
.eyebrow, .section-head .num, .bm-current { color: var(--c-accent); font-size: 14px; line-height: 20px; font-weight: 600; letter-spacing: 0; text-transform: none }
.btn-primary { background: var(--c-900); color: var(--c-near) }
.btn-primary:hover:not(:disabled) { background: var(--text-strong) }
.btn-outline { border-color: var(--c-200); background: transparent; color: var(--c-900) }
.btn-outline:hover:not(:disabled) { border-color: var(--c-500) }
.btn-ghost { color: var(--c-500) }
.btn-ghost:hover { color: var(--c-900); background: var(--c-50) }
.bm-item.current { background: var(--c-accent-bg) }
.bm-item.current .bm-name { color: var(--c-accent) }
a.bm-item:hover { background: var(--c-50) }
.brand-toggle { color: var(--c-900) }
.brand-toggle:hover { background: var(--c-50) }
.card { background: var(--surface); border-color: var(--c-100) }
.card:hover { border-color: var(--c-200); box-shadow: 0 8px 24px rgba(0, 0, 0, .45); color: inherit }
.card .status.open { color: var(--c-accent) }
.card .url { color: var(--c-300) }
.addr { background: var(--surface-2); border-color: var(--c-200); color: var(--c-900) }
.connected { color: var(--c-900) }
.how-list { color: var(--c-500) }
.grid-bg { opacity: .35 }
.mono { font-family: var(--f-mono) }
.brand-mark { width: 22px; height: 22px; display: block; border-radius: 50% }
