/* ==========================================================================
   Mars Market Onion — "Graphite" theme
   Apple-style dark mode: near-black surfaces, cool slate accent, generous
   whitespace. Inter for text, JetBrains Mono for code and addresses.

   Sections
     1. Tokens (:root)             9. Access / Onion block
     2. Reset & base              10. Breadcrumb / Page hero
     3. Typography                11. Prose + content elements
     4. Entrance animations       12. About / Repo / FAQ / Notices
     5. Header / Nav              13. Screenshots / Wallet
     6. Mobile menu               14. Footer (+ compact onion)
     7. Buttons / Badges          15. Responsive
     8. Hero / Sections / Cards   16. Reduced motion
   ========================================================================== */

:root {
  /* Primary palette */
  --bg:            #0f0f0f;
  --bg2:           #161616;
  --bg3:           #1c1c1e;
  --surface:       #1e1e1e;
  --surface2:      #252525;
  --border:        #2c2c2e;
  --text:          #f5f5f7;
  --text2:         #a1a1a6;
  --text3:         #6e6e73;
  --accent:        #94a3b8;
  --accent-bright: #cbd5e1;
  --green:         #30d158;

  /* Derived */
  --text4:           #48484a;
  --border-hover:    #3a3a3c;
  --border-strong:   #48484a;
  --surface-hover:   rgba(255, 255, 255, 0.04);
  --surface-active:  rgba(255, 255, 255, 0.07);
  --accent-glow:     rgba(148, 163, 184, 0.10);
  --accent-glow-md:  rgba(148, 163, 184, 0.18);
  --accent-glow-lg:  rgba(148, 163, 184, 0.28);
  --accent-border:   rgba(148, 163, 184, 0.30);
  --accent-border-hi: rgba(148, 163, 184, 0.50);
  --accent-on:       #0f0f0f;
  --green-dim:       rgba(48, 209, 88, 0.12);
  --green-border:    rgba(48, 209, 88, 0.30);
  --glow:            0 0 0 1px rgba(148, 163, 184, 0.06), 0 0 32px -10px rgba(148, 163, 184, 0.22);
  --glow-hover:      0 0 0 1px rgba(148, 163, 184, 0.10), 0 0 40px -10px rgba(148, 163, 184, 0.34);
  --shadow-sm:       0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md:       0 12px 32px -12px rgba(0, 0, 0, 0.6);
  --shadow-lg:       0 24px 64px -24px rgba(0, 0, 0, 0.8);
  --focus-ring:      0 0 0 2px var(--bg), 0 0 0 4px var(--accent);

  /* Fonts */
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Shape & layout */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius:    14px;
  --radius-lg: 20px;
  --max-w:     1120px;
  --gap:       clamp(1.5rem, 4vw, 3rem);
  --nav-top:   14px;                                   /* gap between viewport top and the capsule */
  --nav-cap:   56px;                                   /* capsule height */
  --nav-h:     calc(var(--nav-top) + var(--nav-cap));  /* space reserved by the floating header */

  /* Motion */
  --t:        .15s;
  --ease:     ease;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

/* --------------------------------------------------------------------------
   2. Reset & base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth; -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  overflow-x: hidden; color-scheme: dark; background: var(--bg);
}
body {
  min-height: 100vh; display: flex; flex-direction: column;
  font-family: var(--sans); font-size: 1rem; line-height: 1.6;
  color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  padding-top: calc(var(--nav-h) + 18px);
  overflow-x: hidden;
  animation: page-in .4s var(--ease-out) backwards; /* not "both": a filling transform animation keeps body as the containing block of the fixed header (Chromium) */
}
@keyframes page-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.main { flex: 1 0 auto; }

img, video, svg { max-width: 100%; display: block; }
img { height: auto; }
a { color: var(--accent); text-decoration: none; transition: color var(--t) var(--ease), opacity var(--t) var(--ease), border-color var(--t) var(--ease), background var(--t) var(--ease); }
a:hover { color: var(--accent-bright); }
ul, ol { list-style: none; }
code, pre, kbd, samp { font-family: var(--mono); font-size: .875em; }
strong, b { font-weight: 600; color: var(--text); }
::selection { background: var(--accent); color: var(--accent-on); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* --------------------------------------------------------------------------
   3. Typography
   -------------------------------------------------------------------------- */
h1, h2, h3, h4 { font-weight: 700; color: var(--text); line-height: 1.15; letter-spacing: -.02em; text-wrap: balance; }
h1 { font-size: clamp(2.25rem, 5vw, 3.5rem);  line-height: 1.06; margin-bottom: 1.25rem; }
h2 { font-size: clamp(1.625rem, 3.2vw, 2.25rem); line-height: 1.12; margin-bottom: .875rem; }
h3 { font-size: 1.25rem;   letter-spacing: -.015em; line-height: 1.25; margin-bottom: .625rem; }
h4 { font-size: 1.0625rem; letter-spacing: -.01em;  line-height: 1.3;  margin-bottom: .5rem; }
h5, h6 { font-size: .875rem; font-weight: 600; color: var(--text); line-height: 1.4; margin-bottom: .375rem; }
p { max-width: 72ch; }
p, li { text-wrap: pretty; overflow-wrap: break-word; }
.lead { font-size: 1.125rem; color: var(--text2); line-height: 1.65; }
.text-muted, .muted { color: var(--text3); }
.text-secondary { color: var(--text2); }
small, .small { font-size: .8125rem; color: var(--text3); line-height: 1.55; }
.eyebrow { font-family: var(--mono); font-size: .7rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: .75rem; }
:where(.prose, .faq-a, .notice-card, .tutorial-desc, .card-desc) :is(p, ul, ol, pre, blockquote, hr, table, .table-wrap, figure) + h2 { margin-top: 2.5rem; }
:where(.prose, .faq-a, .notice-card, .tutorial-desc, .card-desc) :is(p, ul, ol, pre, blockquote, hr, table, .table-wrap, figure) + h3 { margin-top: 1.75rem; }
:where(.prose, .faq-a, .notice-card, .tutorial-desc, .card-desc) :is(p, ul, ol, pre, blockquote, hr, table, .table-wrap, figure) + h4 { margin-top: 1.25rem; }

.container { width: 100%; max-width: var(--max-w); margin-inline: auto; padding-inline: clamp(1rem, 5vw, 2rem); }

.skip-link { position: absolute; left: -999px; top: 8px; z-index: 1000; background: var(--accent-bright); color: var(--accent-on); padding: .5rem 1rem; border-radius: var(--radius-xs); font-weight: 600; }
.skip-link:focus { left: 8px; }

.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-12 { margin-top: 3rem; }
.sub-heading { font-size: 1rem; font-weight: 600; margin-bottom: 1rem; color: var(--text); }

/* --------------------------------------------------------------------------
   4. Entrance animations
   -------------------------------------------------------------------------- */
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.reveal { animation: rise .4s var(--ease-out) both; }
.reveal-d1 { animation-delay: .05s; }
.reveal-d2 { animation-delay: .1s; }
.reveal-d3 { animation-delay: .15s; }
.pre-reveal { opacity: 0; }
.in-view { animation: rise .35s var(--ease-out) both; }

/* --------------------------------------------------------------------------
   5. Header / Nav — floating glass capsule
   Detached, fully rounded bar hovering --nav-top below the viewport edge.
   Logo left, pill nav track centre (sliding .nav-indicator), status chip right.
   States: .site-header.scrolled ; .nav-list.has-indicator (JS present)
   -------------------------------------------------------------------------- */
.site-header {
  position: fixed; top: var(--nav-top); left: 0; right: 0; z-index: 100;
  padding: 0 clamp(12px, 2.5vw, 24px);
  pointer-events: none;
}
.nav {
  position: relative; isolation: isolate; pointer-events: auto;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  width: 100%; max-width: var(--max-w); margin-inline: auto;
  height: var(--nav-cap); padding: 0 10px 0 6px;
  border-radius: 999px;
}
/* Glass body lives on a pseudo-element so backdrop-filter never becomes the
   containing block of the fixed mobile sheet nested inside .nav. */
.nav::before {
  content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: rgba(22, 22, 22, 0.72);
  -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 8px 32px rgba(0, 0, 0, 0.35);
  transition: background var(--t) var(--ease), border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
/* Faint top-left sheen: reads as curved glass rather than a flat tint */
.nav::after {
  content: ''; position: absolute; inset: 1px; z-index: -1; border-radius: inherit; pointer-events: none;
  background:
    radial-gradient(140% 160% at 6% 0%, rgba(203, 213, 225, 0.07) 0%, rgba(203, 213, 225, 0.02) 32%, transparent 52%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.025) 0%, transparent 55%);
}
.site-header.scrolled .nav::before {
  background: rgba(22, 22, 22, 0.86);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 12px 40px rgba(0, 0, 0, 0.45);
}

.nav-logo { display: inline-flex; align-items: center; gap: .5rem; color: var(--text); font-weight: 600; letter-spacing: -.01em; flex-shrink: 0; min-height: 32px; transition: opacity var(--t) var(--ease); }
.nav-logo:hover { color: var(--text); opacity: .8; }
.nav-logo img { height: 28px; width: auto; object-fit: contain; }
.nav .nav-logo { justify-self: start; height: 40px; padding-left: 6px; border-radius: 999px; }
.nav .nav-logo:focus-visible { outline: none; box-shadow: var(--focus-ring); }

/* Centre: pill track + links */
.nav-menu { justify-self: center; min-width: 0; }
.nav-list {
  position: relative; display: flex; align-items: center; gap: 2px;
  padding: 3px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.025); border: 1px solid rgba(255, 255, 255, 0.05);
}
.nav-link {
  position: relative; z-index: 1; display: inline-flex; align-items: center;
  height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid transparent;
  color: var(--text2); font-size: 13px; font-weight: 500; letter-spacing: -.005em; line-height: 1; white-space: nowrap;
  transition: color var(--t) var(--ease), background var(--t) var(--ease), border-color var(--t) var(--ease);
}
.nav-link:hover { color: var(--text); }
.nav-link.active, .nav-link[aria-current="page"] { color: var(--text); }
.nav-link:focus-visible { outline: none; box-shadow: var(--focus-ring); }
/* No-JS fallback: the active link paints its own pill until the indicator takes over */
.nav-list:not(.has-indicator) .nav-link.active,
.nav-list:not(.has-indicator) .nav-link[aria-current="page"] { background: var(--surface2); border-color: var(--border); box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.08); }
.nav-indicator {
  position: absolute; top: 3px; left: 0; z-index: 0; height: 36px; width: 0;
  border-radius: 999px; pointer-events: none;
  background: var(--surface2); border: 1px solid var(--border);
  box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.08);
  opacity: 0; transform: translateX(0);
  transition: transform .2s cubic-bezier(.2, .8, .2, 1), width .2s cubic-bezier(.2, .8, .2, 1), opacity var(--t) var(--ease);
}
.nav-indicator.is-visible { opacity: 1; }

/* Right: status chip + hamburger */
.nav-end { justify-self: end; display: inline-flex; align-items: center; gap: 8px; }
.nav-status {
  display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px 0 10px;
  border-radius: 999px; border: 1px solid var(--border); background: rgba(255, 255, 255, 0.02);
  font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; line-height: 1;
  color: var(--text2); white-space: nowrap; user-select: none;
}
.nav-status-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--green); flex-shrink: 0;
  box-shadow: 0 0 0 0 rgba(48, 209, 88, 0.5);
  animation: nav-pulse 2.4s ease-out infinite;
}
@keyframes nav-pulse { 0% { box-shadow: 0 0 0 0 rgba(48, 209, 88, 0.45); } 70% { box-shadow: 0 0 0 6px rgba(48, 209, 88, 0); } 100% { box-shadow: 0 0 0 0 rgba(48, 209, 88, 0); } }

/* Hamburger (mobile only) */
.nav-toggle {
  display: none; position: relative; width: 40px; height: 40px; flex-shrink: 0;
  background: transparent; border: 1px solid transparent; border-radius: 999px;
  cursor: pointer; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  transition: background var(--t) var(--ease), border-color var(--t) var(--ease);
}
.nav-toggle:hover { background: var(--surface-hover); border-color: var(--border); }
.nav-toggle:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.nav-toggle span {
  display: block; width: 18px; height: 1.5px; background: var(--text); border-radius: 2px;
  transition: transform var(--t) var(--ease), opacity var(--t) var(--ease);
  transform-origin: center;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; transform: scaleX(.2); }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* --------------------------------------------------------------------------
   6. Mobile menu backdrop (sheet itself is styled in the 768px media query)
   -------------------------------------------------------------------------- */
.nav-backdrop {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(15, 15, 15, 0.6);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity var(--t) var(--ease), visibility 0s linear var(--t);
}
.nav-backdrop.is-open { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity var(--t) var(--ease), visibility 0s; }

/* --------------------------------------------------------------------------
   7. Buttons
   -------------------------------------------------------------------------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .7rem 1.25rem; border-radius: 999px;
  font-family: var(--sans); font-size: .875rem; font-weight: 600; line-height: 1; letter-spacing: -.005em;
  cursor: pointer; border: 1px solid transparent; white-space: nowrap; text-decoration: none;
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease), background var(--t) var(--ease), color var(--t) var(--ease), border-color var(--t) var(--ease);
}
.btn-primary { background: var(--text); color: var(--accent-on); border-color: var(--text); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: #ffffff; color: var(--accent-on); box-shadow: 0 0 0 1px rgba(255,255,255,.1), 0 8px 24px -8px rgba(245,245,247,.35); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); box-shadow: var(--shadow-sm); }
.btn-outline { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-outline:hover { color: var(--text); border-color: var(--accent); background: var(--surface-hover); box-shadow: var(--glow); transform: translateY(-1px); }
.btn-outline:active { transform: translateY(0); background: var(--surface-active); }
.btn-lg { padding: .95rem 1.75rem; font-size: .9375rem; }
.btn-block { width: 100%; }
.btn-arrow { display: inline-block; transition: transform var(--t) var(--ease); }
.btn:hover .btn-arrow { transform: translateX(3px); }
.cta-row { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; margin-top: 3rem; }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .75rem; border-radius: 999px; font-family: var(--mono); font-size: .6875rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; line-height: 1.2; border: 1px solid var(--border); background: var(--surface); color: var(--text2); }
.badge-accent, .badge-red, .badge-blue { background: var(--accent-glow); color: var(--accent-bright); border-color: var(--accent-border); margin-bottom: 1rem; }
.badge-green { background: var(--green-dim); color: var(--green); border-color: var(--green-border); }
.badge-dot { width: 7px; height: 7px; background: var(--green); border-radius: 50%; flex-shrink: 0; box-shadow: 0 0 0 0 rgba(48,209,88,.5); animation: pulse-ring 2.4s ease-out infinite; }
@keyframes pulse-ring { 0% { box-shadow: 0 0 0 0 rgba(48,209,88,.45); } 70% { box-shadow: 0 0 0 7px rgba(48,209,88,0); } 100% { box-shadow: 0 0 0 0 rgba(48,209,88,0); } }

/* --------------------------------------------------------------------------
   8. Hero (index)
   -------------------------------------------------------------------------- */
.hero {
  position: relative; overflow: hidden;
  padding: clamp(4rem, 10vw, 7.5rem) 0 clamp(3.5rem, 8vw, 6rem);
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg2) 0%, var(--bg) 100%);
}
.hero-bg { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.hero-bg::before {
  content: ''; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 0%, #000 10%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 70% at 50% 0%, #000 10%, transparent 75%);
}
.hero-orb { position: absolute; border-radius: 50%; filter: blur(60px); }
.hero-orb--1 { width: 640px; height: 640px; top: -320px; left: -200px; background: radial-gradient(circle, rgba(148,163,184,.16), transparent 65%); }
.hero-orb--2 { display: none; }
.hero-grid-lines { display: none; }

.hero .container { position: relative; z-index: 1; }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: var(--gap); align-items: center; }
.hero-tag { font-family: var(--mono); font-size: .72rem; font-weight: 600; color: var(--accent); letter-spacing: .14em; margin-bottom: 1.125rem; display: flex; align-items: center; gap: .625rem; animation: rise .5s var(--ease-out) both; }
.hero-tag::before { content: ''; width: 24px; height: 1px; background: var(--accent); opacity: .7; }
.hero h1 { font-size: clamp(2.125rem, 5.2vw, 3.75rem); font-weight: 700; line-height: 1.05; letter-spacing: -.03em; margin-bottom: 1.375rem; animation: rise .5s var(--ease-out) .05s both; }
.hero h1 mark { background: linear-gradient(92deg, var(--accent-bright) 0%, var(--accent) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-lead { font-size: clamp(1rem, 1.6vw, 1.125rem); color: var(--text2); max-width: 46ch; margin-bottom: 2.25rem; line-height: 1.65; animation: rise .5s var(--ease-out) .1s both; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; animation: rise .5s var(--ease-out) .15s both; }

.hero-card {
  position: relative; min-width: 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.75rem; display: flex; flex-direction: column; gap: 1.125rem;
  box-shadow: var(--shadow-md), var(--glow);
  animation: rise .5s var(--ease-out) .12s both;
}
.hero-card-title { font-family: var(--mono); font-size: .6875rem; color: var(--text3); letter-spacing: .12em; font-weight: 600; }
.step-list { display: flex; flex-direction: column; gap: .8rem; counter-reset: steps; }
.step-item { counter-increment: steps; display: flex; gap: .875rem; align-items: flex-start; }
.step-item::before {
  content: counter(steps, decimal-leading-zero); font-family: var(--mono); font-size: .68rem; font-weight: 600;
  color: var(--accent-bright); background: var(--accent-glow); border: 1px solid var(--accent-border); border-radius: 6px;
  min-width: 28px; height: 24px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px;
}
.step-item-text { font-size: .875rem; color: var(--text2); line-height: 1.5; }
.step-item-text strong { color: var(--text); }

/* Sections */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; position: relative; }
.section + .section { border-top: 1px solid var(--border); }
.section-alt { background: var(--bg2); }
.section-tag { font-family: var(--mono); font-size: .7rem; font-weight: 600; color: var(--accent); letter-spacing: .14em; margin-bottom: .75rem; display: flex; align-items: center; gap: .6rem; }
.section-tag::before { content: ''; width: 18px; height: 1px; background: var(--accent); opacity: .7; }
.section-title { font-size: clamp(1.625rem, 3.2vw, 2.25rem); font-weight: 700; letter-spacing: -.02em; margin-bottom: .875rem; line-height: 1.12; }
.section-desc { font-size: 1rem; color: var(--text2); max-width: 56ch; line-height: 1.6; }

/* Cards */
.cards-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.125rem; margin-top: 2.5rem; }
.cards-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.125rem; margin-top: 2.5rem; }
.card, .repo-card, .wallet-card, .tutorial-step, .screenshot-card, .side-card, .notice-card {
  position: relative; min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease), border-color var(--t) var(--ease), background var(--t) var(--ease);
}
.card, .wallet-card { padding: 1.625rem; }
.card:hover, .repo-card:hover, .wallet-card:hover, .tutorial-step:hover, .screenshot-card:hover, .side-card:hover {
  border-color: var(--border-hover);
  background: var(--surface2);
  box-shadow: var(--glow);
}
.card-icon {
  width: 42px; height: 42px; border-radius: 10px;
  background: var(--bg3); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; color: var(--accent-bright); margin-bottom: 1.125rem;
  transition: border-color var(--t) var(--ease), background var(--t) var(--ease), color var(--t) var(--ease);
}
.card:hover .card-icon { border-color: var(--accent-border); background: var(--accent-glow); }
.card-title { font-size: 1.0625rem; font-weight: 600; margin-bottom: .5rem; letter-spacing: -.015em; color: var(--text); }
.card-desc { font-size: .9rem; color: var(--text2); line-height: 1.6; }
.card-link { display: inline-flex; align-items: center; gap: .375rem; margin-top: 1rem; font-size: .8125rem; font-weight: 600; color: var(--accent); transition: color var(--t) var(--ease), gap var(--t) var(--ease); }
.card-link:hover { color: var(--accent-bright); gap: .6rem; }

/* Tutorial steps */
.tutorial-grid { display: flex; flex-direction: column; gap: 1rem; margin-top: 2.25rem; }
.tutorial-step { display: flex; gap: 1.5rem; padding: 1.5rem; align-items: flex-start; }
.tutorial-step > div:not(.tutorial-num) { min-width: 0; flex: 1 1 auto; }
.tutorial-num {
  font-family: var(--mono); font-size: .875rem; font-weight: 600; color: var(--text);
  background: var(--bg3); border: 1px solid var(--border-strong); border-radius: 10px;
  width: 40px; min-width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; flex: 0 0 40px;
  transition: border-color var(--t) var(--ease), color var(--t) var(--ease), background var(--t) var(--ease);
}
.tutorial-step:hover .tutorial-num { border-color: var(--accent); color: var(--accent-bright); background: var(--accent-glow); }
.tutorial-title { font-size: 1.0625rem; font-weight: 600; margin-bottom: .45rem; letter-spacing: -.015em; color: var(--text); }
.tutorial-desc { font-size: .9rem; color: var(--text2); line-height: 1.65; }

/* Table */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg2); max-width: 100%; }
.table-wrap .data-table { min-width: 560px; }
table { border-collapse: collapse; width: 100%; }
.data-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
th, .data-table th { font-family: var(--mono); font-size: .66rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--text3); text-align: left; padding: .875rem 1.25rem; border-bottom: 1px solid var(--border); background: var(--surface); }
td, .data-table td { padding: .9rem 1.25rem; border-bottom: 1px solid var(--border); color: var(--text2); vertical-align: middle; transition: background var(--t) var(--ease); }
.data-table td:first-child { color: var(--text); font-weight: 600; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: var(--surface-hover); }

/* --------------------------------------------------------------------------
   9. Access / Onion block
   -------------------------------------------------------------------------- */
.access-section {
  position: relative; overflow: hidden; contain: layout;
  padding: clamp(3.5rem, 8vw, 6rem) 0;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
}
.access-section .container { position: relative; z-index: 2; }
.access-slideshow { position: absolute; inset: 0; overflow: hidden; z-index: 0; pointer-events: none; }
.access-slide {
  position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0;
  filter: blur(12px) brightness(.28) saturate(.35); transform: scale(1.08);
  transition: opacity 1s ease;
}
.access-slide.active { opacity: 1; }
.access-glow {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(ellipse 55% 60% at 50% 100%, rgba(148,163,184,.14), transparent 65%),
    linear-gradient(180deg, rgba(15,15,15,.7) 0%, rgba(15,15,15,.45) 50%, rgba(15,15,15,.85) 100%);
}
.access-card {
  position: relative; max-width: 720px; margin-inline: auto; text-align: center; min-width: 0;
  background: rgba(22,22,22,.78); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: clamp(1.75rem, 4vw, 3rem);
  -webkit-backdrop-filter: blur(20px) saturate(140%); backdrop-filter: blur(20px) saturate(140%);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(148,163,184,.06), 0 0 120px -40px var(--accent-glow-lg);
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.access-card:hover { border-color: var(--border-hover); }
.access-badge {
  display: inline-flex; align-items: center; gap: .5rem; font-family: var(--mono); font-size: .68rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--green); background: var(--green-dim); border: 1px solid var(--green-border);
  padding: .35rem .9rem; border-radius: 999px; margin-bottom: 1.5rem;
}
.access-eyebrow { font-family: var(--mono); font-size: .72rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin-bottom: .625rem; }
.access-title { font-size: clamp(1.625rem, 3.8vw, 2.5rem); font-weight: 700; letter-spacing: -.02em; margin-bottom: .75rem; }
.access-sub { color: var(--text2); margin-bottom: 2rem; max-width: 48ch; margin-inline: auto; font-size: .95rem; line-height: 1.6; }

.onion-display {
  position: relative; display: flex; align-items: stretch; min-width: 0;
  border: 1px solid var(--accent-border); border-radius: var(--radius); overflow: hidden;
  background: var(--bg); margin-bottom: 1.75rem; max-width: 660px; margin-inline: auto;
  box-shadow: var(--glow), inset 0 1px 0 rgba(255,255,255,.03);
  transition: box-shadow var(--t) var(--ease), border-color var(--t) var(--ease);
}
.onion-display:hover { border-color: var(--accent-border-hi); box-shadow: var(--glow-hover), inset 0 1px 0 rgba(255,255,255,.04); }
.onion-address {
  flex: 1; min-width: 0; padding: 1.125rem 1.25rem; font-family: var(--mono); font-size: clamp(.78rem, 1.9vw, 1rem); font-weight: 500;
  color: var(--accent-bright); overflow-wrap: anywhere; word-break: break-all; text-align: left; line-height: 1.6; user-select: all; background: transparent; display: block;
}
.copy-btn {
  display: flex; align-items: center; justify-content: center; gap: .5rem; padding: 1rem 1.375rem;
  background: var(--surface); border: none; border-left: 1px solid var(--accent-border);
  color: var(--text); cursor: pointer; font-family: var(--sans); font-size: .8125rem; font-weight: 600;
  transition: background var(--t) var(--ease), color var(--t) var(--ease), border-color var(--t) var(--ease), transform var(--t) var(--ease); white-space: nowrap; flex-shrink: 0;
}
.copy-btn:hover { background: var(--accent-bright); color: var(--accent-on); border-color: var(--accent-bright); }
.copy-btn:active { transform: scale(.97); }
.copy-icon { position: relative; width: 16px; height: 16px; display: inline-block; flex-shrink: 0; }
.copy-icon svg { position: absolute; inset: 0; width: 100%; height: 100%; transition: transform var(--t) var(--ease), opacity var(--t) var(--ease); }
.copy-icon .icon-check { opacity: 0; transform: scale(.4); }
.copy-btn.copied { background: var(--green); color: var(--accent-on); border-color: var(--green); animation: copied-pulse .3s var(--ease-out); }
.copy-btn.copied .icon-copy { opacity: 0; transform: scale(.4); }
.copy-btn.copied .icon-check { opacity: 1; transform: scale(1); }
.copy-btn.copied [data-copy-label] { animation: label-pop var(--t) var(--ease); }
@keyframes copied-pulse { 0% { transform: scale(1); } 40% { transform: scale(1.03); } 100% { transform: scale(1); } }
@keyframes label-pop { 0% { transform: translateY(4px); opacity: 0; } 100% { transform: translateY(0); opacity: 1; } }

.access-steps { display: flex; flex-direction: column; gap: .25rem; text-align: left; max-width: 480px; margin-inline: auto; margin-bottom: 1.5rem; counter-reset: steps; }
.access-steps li { counter-increment: steps; position: relative; display: block; padding: .625rem 0 .625rem 2.5rem; font-size: .9rem; color: var(--text2); line-height: 1.55; border-bottom: 1px solid var(--border); }
.access-steps li:last-child { border-bottom: none; }
.access-steps li::before {
  content: counter(steps); position: absolute; left: 0; top: .6rem;
  font-family: var(--mono); font-size: .68rem; font-weight: 600; color: var(--accent-bright);
  background: var(--accent-glow); border: 1px solid var(--accent-border); border-radius: 50%;
  width: 24px; height: 24px; display: flex; align-items: center; justify-content: center;
}
.access-disclaimer { font-size: .75rem; color: var(--text3); max-width: 50ch; margin-inline: auto; line-height: 1.6; }
.access-section--teaser .access-glow { background: linear-gradient(180deg, rgba(15,15,15,.75) 0%, rgba(15,15,15,.5) 50%, rgba(15,15,15,.9) 100%); }
.access-card--teaser .access-badge { color: var(--accent-bright); background: var(--accent-glow); border-color: var(--accent-border); }
.access-card--teaser .badge-dot { background: var(--accent); animation: none; box-shadow: 0 0 10px var(--accent-glow-lg); }
.teaser-hint { display: inline-flex; align-items: center; gap: .625rem; font-size: .875rem; color: var(--text2); background: var(--bg); border: 1px dashed var(--border-strong); border-radius: var(--radius); padding: .9rem 1.25rem; margin-top: 1rem; max-width: 100%; text-align: left; }
.teaser-hint svg { color: var(--accent); flex-shrink: 0; }

/* --------------------------------------------------------------------------
   10. Breadcrumb / Page hero
   -------------------------------------------------------------------------- */
.breadcrumb { padding: .875rem 0; border-bottom: 1px solid var(--border); background: var(--bg); }
.breadcrumb-list { display: flex; align-items: center; flex-wrap: wrap; gap: .625rem; font-size: .75rem; color: var(--text3); font-family: var(--mono); letter-spacing: .02em; }
.breadcrumb-list a { color: var(--text3); }
.breadcrumb-list a:hover { color: var(--text); }
.breadcrumb-list li:last-child { color: var(--text2); }
.breadcrumb-sep { color: var(--text4); }

.page-hero {
  position: relative; overflow: hidden;
  padding: clamp(3rem, 7vw, 5rem) 0;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg2), var(--bg));
}
.page-hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 50% 80% at 0% 50%, rgba(148,163,184,.08), transparent 60%);
}
.page-hero .container { position: relative; }
.page-hero h1 { font-size: clamp(1.875rem, 4.5vw, 3rem); font-weight: 700; letter-spacing: -.025em; margin-bottom: .75rem; }
.page-hero .lead { font-size: 1.0625rem; color: var(--text2); max-width: 56ch; line-height: 1.65; }
.page-hero .badge { margin-bottom: 1.125rem; }

/* --------------------------------------------------------------------------
   11. Prose + content elements
   -------------------------------------------------------------------------- */
.prose { max-width: 68ch; min-width: 0; }
.prose h2 { font-size: 1.375rem; margin: 2.5rem 0 .875rem; padding-left: 1rem; border-left: 2px solid var(--accent); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.125rem; margin: 1.75rem 0 .5rem; }
.prose p { color: var(--text2); margin-bottom: 1rem; line-height: 1.75; }
.prose ul, .prose ol { margin-bottom: 1rem; }
.prose ul li, .prose ol li { color: var(--text2); padding: .3rem 0 .3rem 1.5rem; position: relative; line-height: 1.6; }
.prose ul li::before { content: ''; position: absolute; left: 0; top: .95em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.prose ol { counter-reset: prose-ol; }
.prose ol li { counter-increment: prose-ol; }
.prose ol li::before { content: counter(prose-ol) '.'; position: absolute; left: 0; top: .3rem; font-family: var(--mono); font-size: .8em; color: var(--accent); }
.prose a { color: var(--accent-bright); border-bottom: 1px solid var(--accent-border); transition: border-color var(--t) var(--ease), color var(--t) var(--ease); }
.prose a:hover { color: var(--text); border-bottom-color: var(--text); }
.prose blockquote p { color: inherit; }
.prose img { border-radius: var(--radius-sm); border: 1px solid var(--border); }
.prose-meta { margin-top: 2rem; font-size: .8125rem; color: var(--text3); font-family: var(--mono); }

blockquote {
  margin: 1.5rem 0; padding: .25rem 0 .25rem 1.25rem;
  border-left: 2px solid var(--accent);
  color: var(--text2); font-size: 1.0625rem; line-height: 1.6;
}
blockquote p { color: inherit; margin-bottom: .5rem; }
blockquote p:last-child { margin-bottom: 0; }
blockquote cite, blockquote footer { display: block; margin-top: .625rem; font-size: .8125rem; font-style: normal; color: var(--text3); }
blockquote cite::before { content: '\2014\00a0'; }
blockquote.quote--italic, .quote--italic { font-style: italic; }

hr { border: 0; height: 1px; margin: 2.5rem 0; background: var(--border); }
hr.hr-soft { background: var(--bg3); margin: 1.5rem 0; }

pre {
  position: relative; margin: 1.5rem 0; padding: 1rem 1.125rem; max-width: 100%;
  background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text2); font-size: .8125rem; line-height: 1.6; tab-size: 2;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: thin; scrollbar-color: var(--surface2) transparent;
  transition: border-color var(--t) var(--ease);
}
pre:hover { border-color: var(--border-hover); }
pre:focus-visible { outline: none; border-color: var(--accent-border); box-shadow: var(--focus-ring); }
pre::-webkit-scrollbar { height: 6px; }
pre::-webkit-scrollbar-thumb { background: var(--surface2); border-radius: 3px; }
pre code { display: block; padding: 0; border: 0; border-radius: 0; background: transparent; color: inherit; font-size: inherit; white-space: pre; }
pre[data-title]::before { content: attr(data-title); display: block; margin: -.25rem 0 .75rem; font-size: .6875rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text4); }
code:not(pre code):not(.onion-address) {
  padding: .125em .4em; border-radius: 5px;
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--text); font-size: .85em; font-weight: 500; overflow-wrap: anywhere;
}
kbd {
  font-family: var(--mono); font-size: .75em; padding: .1em .45em;
  border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 5px;
  background: var(--bg3); color: var(--text2);
}

/* --------------------------------------------------------------------------
   12. About / Repo / FAQ / Notices
   -------------------------------------------------------------------------- */
.about-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 3rem; align-items: start; }
.about-side { display: flex; flex-direction: column; gap: 1.25rem; position: sticky; top: calc(var(--nav-h) + 1.5rem); min-width: 0; }
.side-card { padding: 1.5rem; }
.side-card-title { font-family: var(--mono); font-size: .68rem; color: var(--text3); letter-spacing: .12em; margin-bottom: 1rem; font-weight: 600; }
.fact-list { display: flex; flex-direction: column; }
.fact-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; font-size: .8125rem; padding: .55rem 0; border-bottom: 1px solid var(--border); }
.fact-row:last-child { border-bottom: none; }
.fact-key { color: var(--text3); }
.fact-val { color: var(--text); font-weight: 600; font-family: var(--mono); text-align: right; }
.fact-val--accent { color: var(--accent-bright); }
.fact-val--green { color: var(--green); }
.side-links { display: flex; flex-direction: column; gap: .5rem; }
.side-links a { font-size: .875rem; color: var(--text2); display: inline-block; transition: color var(--t) var(--ease), transform var(--t) var(--ease); }
.side-links a:hover { color: var(--text); transform: translateX(2px); }

.repo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 1.125rem; margin-top: 2.5rem; }
.repo-card { padding: 1.375rem; display: flex; flex-direction: column; gap: .625rem; color: inherit; }
.repo-card:hover { color: inherit; }
.repo-card-top { display: flex; align-items: flex-start; gap: .625rem; min-width: 0; }
.repo-glyph { font-size: 1.1rem; line-height: 1.3; flex-shrink: 0; color: var(--accent-bright); }
.repo-glyph--lg { font-size: 1.25rem; }
.repo-name { font-weight: 600; font-size: .9375rem; color: var(--text); line-height: 1.3; letter-spacing: -.01em; overflow-wrap: anywhere; transition: color var(--t) var(--ease); }
.repo-card:hover .repo-name { color: var(--accent-bright); }
.repo-desc { font-size: .85rem; color: var(--text2); line-height: 1.6; flex: 1; }
.repo-meta { display: flex; flex-wrap: wrap; gap: .875rem; font-family: var(--mono); font-size: .68rem; color: var(--text3); letter-spacing: .02em; }

.faq-wrap { max-width: 820px; }
.faq-item { position: relative; padding: 1.75rem 0 1.75rem 1.5rem; border-bottom: 1px solid var(--border); }
.faq-item::before { content: ''; position: absolute; left: 0; top: 2.25rem; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); opacity: .6; transition: opacity var(--t) var(--ease), box-shadow var(--t) var(--ease); }
.faq-item:hover::before { opacity: 1; box-shadow: 0 0 10px var(--accent-glow-lg); }
.faq-item:first-child { padding-top: 0; }
.faq-item:first-child::before { top: .5rem; }
.faq-q { font-size: 1.125rem; font-weight: 600; margin-bottom: .875rem; letter-spacing: -.015em; }
.faq-a p { color: var(--text2); font-size: .95rem; line-height: 1.7; margin-bottom: .75rem; }
.faq-a p:last-child { margin-bottom: 0; }
.faq-a a { color: var(--accent-bright); border-bottom: 1px solid var(--accent-border); }
.faq-a a:hover { color: var(--text); border-bottom-color: var(--text); }
.faq-steps { counter-reset: faq-steps; display: flex; flex-direction: column; gap: .5rem; margin: .875rem 0; }
.faq-steps li { counter-increment: faq-steps; display: flex; gap: .75rem; align-items: flex-start; font-size: .9rem; color: var(--text2); }
.faq-steps li::before { content: counter(faq-steps); font-family: var(--mono); font-size: .68rem; font-weight: 600; color: var(--accent-bright); background: var(--accent-glow); border: 1px solid var(--accent-border); border-radius: 50%; min-width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 2px; }
.faq-list { display: flex; flex-direction: column; gap: .5rem; margin: .875rem 0; }
.faq-list li { font-size: .9rem; color: var(--text2); padding-left: 1.25rem; position: relative; line-height: 1.6; }
.faq-list li::before { content: '▸'; position: absolute; left: 0; color: var(--accent); font-size: .8em; }

.notice-card { padding: 1.5rem 1.625rem 1.5rem 1.75rem; border-color: var(--border); background: var(--bg2); }
.notice-card::before { content: ''; position: absolute; left: -1px; top: 14%; bottom: 14%; width: 2px; background: var(--accent); border-radius: 2px; }
.notice-card--warn { border-color: var(--accent-border); box-shadow: var(--glow); }
.notice-card--warn::before { background: var(--accent-bright); box-shadow: 0 0 14px var(--accent-glow-lg); }
.notice-card--warn .notice-text strong { color: var(--accent-bright); }
.notice-title { font-size: 1.0625rem; margin-bottom: .875rem; }
.notice-text { font-size: .9rem; color: var(--text2); line-height: 1.65; }
.notice-text strong { color: var(--text); }
.notice-text a { color: var(--accent-bright); border-bottom: 1px solid var(--accent-border); }
.notice-text a:hover { color: var(--text); border-bottom-color: var(--text); }
.check-list { display: flex; flex-direction: column; gap: .5rem; }
.check-list li { font-size: .9rem; color: var(--text2); padding-left: 1.5rem; position: relative; line-height: 1.6; }
.check-list li::before { content: '▸'; position: absolute; left: 0; color: var(--accent); }

/* --------------------------------------------------------------------------
   13. Screenshots / Wallet
   -------------------------------------------------------------------------- */
.screenshots-grid { display: grid; grid-template-columns: 1fr; gap: 2.5rem; }
.screenshot-card { overflow: hidden; border-radius: var(--radius-lg); }
.screenshot-img-wrap { position: relative; background: var(--bg); border-bottom: 1px solid var(--border); overflow: hidden; }
.screenshot-img-wrap::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 75%, rgba(15,15,15,.5)); pointer-events: none; }
.screenshot-img-wrap img { width: 100%; height: auto; display: block; transition: transform .3s var(--ease-out); }
.screenshot-card:hover .screenshot-img-wrap img { transform: scale(1.01); }
.screenshot-caption { padding: 1.625rem; }
.screenshot-num { display: inline-block; font-family: var(--mono); font-size: .68rem; color: var(--accent-bright); letter-spacing: .1em; background: var(--accent-glow); border: 1px solid var(--accent-border); padding: .2rem .55rem; border-radius: 6px; }
.screenshot-title { font-size: 1.125rem; margin: .75rem 0 .625rem; }
.screenshot-desc { font-size: .9rem; color: var(--text2); line-height: 1.65; }

.wallet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 1.25rem; margin-top: 2.5rem; }
.wallet-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem; margin-bottom: .875rem; }
.wallet-name { font-size: 1.0625rem; font-weight: 600; letter-spacing: -.015em; color: var(--text); }
.wallet-platform { font-family: var(--mono); font-size: .66rem; color: var(--text3); text-align: right; letter-spacing: .02em; white-space: nowrap; }
.wallet-desc { font-size: .875rem; color: var(--text2); line-height: 1.6; margin-bottom: 1.125rem; }
.wallet-tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.wallet-tag { font-family: var(--mono); font-size: .64rem; font-weight: 600; letter-spacing: .04em; padding: .25rem .55rem; border-radius: 6px; background: var(--bg3); color: var(--text2); border: 1px solid var(--border); transition: color var(--t) var(--ease), border-color var(--t) var(--ease); }
.wallet-card:hover .wallet-tag { color: var(--accent-bright); border-color: var(--accent-border); }

/* --------------------------------------------------------------------------
   14. Footer (+ compact onion block)
   -------------------------------------------------------------------------- */
.site-footer { position: relative; background: var(--bg); border-top: 1px solid var(--border); padding: clamp(2.5rem, 6vw, 4rem) 0 2rem; margin-top: auto; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: var(--gap); margin-bottom: 2.5rem; }
.footer-brand { min-width: 0; }
.footer-tagline { font-size: .85rem; color: var(--text3); margin-top: .875rem; line-height: 1.6; max-width: 34ch; }
.footer-nav-title { font-family: var(--mono); font-size: .66rem; letter-spacing: .12em; color: var(--text3); margin-bottom: .875rem; font-weight: 600; text-transform: uppercase; }
.footer-nav ul li + li { margin-top: .45rem; }
.footer-nav a { font-size: .875rem; color: var(--text2); display: inline-block; transition: color var(--t) var(--ease), transform var(--t) var(--ease); }
.footer-nav a:hover { color: var(--text); transform: translateX(2px); }
.footer-bottom { padding-top: 1.5rem; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: .375rem; }
.footer-bottom p { font-size: .75rem; color: var(--text3); }
.footer-disclaimer { max-width: 72ch; line-height: 1.6; }

.footer-onion {
  position: relative; max-width: 640px; margin: 0 0 clamp(2.5rem, 6vw, 4rem); padding: 1.25rem 1.375rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--glow);
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.footer-onion:hover { border-color: var(--border-hover); box-shadow: var(--glow-hover); }
.footer-onion-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .875rem; }
.footer-onion-label { display: inline-flex; align-items: center; gap: .5rem; font-family: var(--mono); font-size: .6875rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.footer-onion .onion-display { margin: 0; max-width: none; }
.onion-display--compact .onion-address { padding: .8rem 1rem; font-size: .8125rem; }
.onion-display--compact .copy-btn { padding: .75rem 1.1rem; font-size: .75rem; }
.onion-display--compact .copy-icon { width: 14px; height: 14px; }
.footer-onion-note { margin-top: .75rem; font-size: .75rem; line-height: 1.55; color: var(--text3); }
.footer-onion--teaser { box-shadow: none; }
.footer-onion--teaser .footer-onion-note { margin-top: 0; }

/* --------------------------------------------------------------------------
   15. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 960px) {
  .cards-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-inner { grid-template-columns: 1fr; }
  .about-side { position: static; }
}
@media (max-width: 768px) {
  :root { --nav-top: 12px; --nav-cap: 52px; }
  .site-header { padding: 0 12px; }
  .nav { display: flex; justify-content: space-between; padding: 0 6px 0 4px; }
  .nav .nav-logo { height: 36px; }
  .nav-logo img { height: 26px; }
  .nav-toggle { display: flex; }
  .nav-indicator { display: none; }

  /* Rounded glass sheet directly below the capsule
     (justify-self must be reset: with left/right insets it would centre-shrink a fixed box) */
  .nav-menu {
    position: fixed; top: calc(var(--nav-top) + var(--nav-cap) + 8px); left: 12px; right: 12px; z-index: 95;
    justify-self: auto; width: auto;
    max-height: calc(100vh - var(--nav-top) - var(--nav-cap) - 20px); max-height: calc(100dvh - var(--nav-top) - var(--nav-cap) - 20px);
    overflow-y: auto; overscroll-behavior: contain;
    background: rgba(22, 22, 22, 0.82);
    -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid var(--border); border-radius: 20px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 16px 48px rgba(0, 0, 0, 0.5);
    padding: 8px; margin: 0;
    opacity: 0; transform: translateY(-8px) scale(.985); transform-origin: top center; visibility: hidden; pointer-events: none;
    transition: opacity var(--t) var(--ease), transform .2s cubic-bezier(.2, .8, .2, 1), visibility 0s linear var(--t);
  }
  .nav-menu.open { opacity: 1; transform: none; visibility: visible; pointer-events: auto; transition: opacity var(--t) var(--ease), transform .2s cubic-bezier(.2, .8, .2, 1), visibility 0s; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 2px; padding: 0; border: 0; background: transparent; border-radius: 0; }
  .nav-list li { opacity: 0; transform: translateY(-6px); transition: opacity .2s var(--ease), transform .25s cubic-bezier(.2, .8, .2, 1); }
  .nav-menu.open .nav-list li { opacity: 1; transform: none; }
  .nav-menu.open .nav-list li:nth-child(1) { transition-delay: .02s; }
  .nav-menu.open .nav-list li:nth-child(2) { transition-delay: .036s; }
  .nav-menu.open .nav-list li:nth-child(3) { transition-delay: .052s; }
  .nav-menu.open .nav-list li:nth-child(4) { transition-delay: .07s; }
  .nav-menu.open .nav-list li:nth-child(5) { transition-delay: .086s; }
  .nav-menu.open .nav-list li:nth-child(6) { transition-delay: .102s; }
  .nav-menu.open .nav-list li:nth-child(7) { transition-delay: .12s; }
  .nav-link { display: flex; height: 44px; padding: 0 14px; font-size: 15px; border-radius: 12px; }
  .nav-link:hover { background: var(--surface-hover); }
  .nav-link.active, .nav-link[aria-current="page"],
  .nav-list:not(.has-indicator) .nav-link.active, .nav-list:not(.has-indicator) .nav-link[aria-current="page"] {
    background: var(--surface2); border-color: var(--border); box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.08);
  }
  body.nav-open { overflow: hidden; }

  .hero-card { display: none; }
  .cards-3, .cards-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .footer-brand { grid-column: 1 / -1; }
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .onion-display { flex-direction: column; }
  .copy-btn { border-left: none; border-top: 1px solid var(--accent-border); justify-content: center; padding: .9rem; }
  .onion-display--compact .copy-btn { padding: .7rem; }
  .tutorial-step { gap: 1rem; padding: 1.25rem; }
  .tutorial-num { width: 34px; min-width: 34px; height: 34px; flex-basis: 34px; font-size: .8rem; }
  .wallet-card-top { flex-direction: column; }
  .wallet-platform { text-align: left; white-space: normal; }
  .fact-row { flex-wrap: wrap; }
}
@media (max-width: 360px) {
  .nav-status { display: none; }
}
@media (max-width: 480px) {
  .hero h1 { font-size: 2rem; }
  .page-hero h1 { font-size: 1.75rem; }
  .btn-lg { padding: .85rem 1.4rem; font-size: .9rem; }
  .hero-actions .btn, .cta-row .btn { width: 100%; }
  .footer-grid { grid-template-columns: 1fr; }
  .access-card { padding: 1.5rem 1.125rem; border-radius: var(--radius); }
  .onion-address { font-size: .78rem; padding: 1rem; }
  .teaser-hint { align-items: flex-start; }
  .faq-item { padding-left: 1.25rem; }
  pre { padding: .875rem 1rem; font-size: .78rem; border-radius: var(--radius-xs); }
  blockquote { font-size: 1rem; padding-left: 1rem; }
  .card, .wallet-card, .side-card { padding: 1.25rem; }
  .screenshot-caption { padding: 1.25rem; }
}

/* --------------------------------------------------------------------------
   16. Reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  body, .reveal, .in-view, .pre-reveal, .hero-tag, .hero h1, .hero-lead, .hero-actions, .hero-card { opacity: 1; transform: none; }
  .card:hover, .repo-card:hover, .wallet-card:hover, .tutorial-step:hover, .screenshot-card:hover, .side-card:hover,
  .btn-primary:hover, .btn-outline:hover, .side-links a:hover, .footer-nav a:hover, .btn:hover .btn-arrow, .copy-btn:active { transform: none; }
  .nav-menu, .nav-list li { transform: none; }
  .nav-indicator { transition: none; }
  .nav-status-dot { animation: none; box-shadow: none; }
}
