/* 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 for code.

   Sora, Inter and Paper Mono are OFL and self-hosted from fonts/: a Google
   Fonts stylesheet blocked first paint until fonts.googleapis.com answered and
   sent every visitor's IP to Google. The Inter and Sora files are Google's own
   subsets with their unicode-ranges, so a subset loads only when the page uses
   its characters (a wallet's name can be in any script); the pages preload the
   two latin ones. */
@font-face { font-family: "Paper Mono"; src: url("../fonts/PaperMono-Variable.v1.ttf") format("truetype"); font-weight: 100 800; font-display: swap; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("../fonts/Inter-cyrillic-ext.v20.woff2") format("woff2"); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("../fonts/Inter-cyrillic.v20.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("../fonts/Inter-greek-ext.v20.woff2") format("woff2"); unicode-range: U+1F00-1FFF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("../fonts/Inter-greek.v20.woff2") format("woff2"); unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("../fonts/Inter-vietnamese.v20.woff2") format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("../fonts/Inter-latin-ext.v20.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("../fonts/Inter-latin.v20.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Sora"; font-style: normal; font-weight: 600 700; font-display: swap; src: url("../fonts/Sora-latin-ext.v17.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Sora"; font-style: normal; font-weight: 600 700; font-display: swap; src: url("../fonts/Sora-latin.v17.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
: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;
  max-height: calc(100vh - var(--nav-h) - 12px); max-height: calc(100dvh - var(--nav-h) - 12px); overflow-y: auto; overscroll-behavior: contain }
.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-500) }
.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); white-space: nowrap }
.wallet .btn { white-space: nowrap }

.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, .btn[aria-disabled="true"] { opacity: .6; cursor: default }
/* The button that started a sign-in says what it is waiting for, so it stays readable. */
.btn.waiting { opacity: 1; cursor: progress }
.btn-primary { background: var(--c-accent); color: #fff }
.btn-primary:hover:not(:disabled):not([aria-disabled="true"]) { background: var(--c-accent-light) }
.btn-outline { border-color: var(--c-100); background: var(--surface) }
.btn-outline:hover:not(:disabled):not([aria-disabled="true"]) { 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) }
.inline-link { color: var(--c-900); text-decoration: underline; text-decoration-color: var(--c-300); text-underline-offset: 2px }
.inline-link:hover { color: var(--c-accent); text-decoration-color: currentColor }

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-500); 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) }

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 }
  .hide-mobile { display: none !important }
  .hero { padding: var(--space-lg) 0 var(--space-md) }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important }
}
/* The site list and the brand menu are built by root.js; without it they would stand empty. */
@media (scripting: none) {
  .sites, .caret { display: none }
}

/* ── TRN type scale + accents ── */
body { color: var(--c-500) }
h1, h2, h3, .section-head h2, .card h3 { 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):not([aria-disabled="true"]) { background: var(--text-strong) }
.btn-outline { border-color: var(--c-200); background: transparent; color: var(--c-900) }
.btn-outline:hover:not(:disabled):not([aria-disabled="true"]) { 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) }
.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% }
