/* ============================================================
   LEMNICOIN DESIGN SYSTEM
   One palette, one type system, one nav, one set of components —
   replacing the three competing themes (neon-cyan masthead,
   muted-teal content pages, pink buy/swap) that had accumulated
   across the site. Quiet-luxury direction: obsidian + brushed
   silver + a single teal signal color, with a hairline gold used
   only for rare, deliberate emphasis.

   Loaded by index.php. Content fragments inherit this — they no
   longer need to redeclare base typography/color.
   ============================================================ */

/* Self-hosted Trebuchet MS — same font files style-luxury.css has always
   shipped (fonts/trebuc*.ttf), used here intentionally and explicitly for
   just the hero title below, rather than via that file's old blanket
   `body, html, p, div, span, li, a { font-family: "Trebuchet MS" !important; }`
   rule, which is what was actually rendering it on production all along
   despite lemni-masthead.css's .lemni-brand-title claiming Playfair Display. */
@font-face {
  font-family: "Trebuchet MS";
  src: url("../fonts/trebuc.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
}

:root {
  /* ---- Surface (dark, layered depth) ---- */
  --ink-950: #0d0d16;   /* deepest bg — the original site's blue-tinted black */
  --ink-900: #111122;   /* section / card bg — the original content card */
  --ink-800: #1a1a2e;   /* raised surface — cards, panels */
  --ink-700: #23233d;   /* hover / active surface */
  --hairline: rgba(255, 255, 255, 0.08);
  --hairline-strong: rgba(255, 255, 255, 0.14);

  /* ---- Ink (text) ---- */
  --ink-on: #f3f4f7;    /* primary text — warm-white, not pure white */
  --ink-dim: #9aa3b6;   /* secondary text */
  --ink-faint: #5f6679; /* tertiary / fineprint */
  --ink-link: #c8ccd4;

  /* ---- Signal (the site's one accent — teal) ---- */
  --signal: #3ecfcf;
  --signal-bright: #6fe3e3;
  --signal-soft: rgba(62, 207, 207, 0.08);
  --signal-mid: rgba(62, 207, 207, 0.18);
  --signal-border: rgba(62, 207, 207, 0.32);

  /* ---- Chrome (brushed silver — nav, bezels, dividers) ---- */
  --silver-1: #eef1f6;
  --silver-2: #aab2c4;
  --silver-3: #6b7486;

  /* ---- Gold (reserved — active states, rare premium emphasis only) ---- */
  --gold: #d9b878;
  --gold-soft: rgba(217, 184, 120, 0.14);

  /* ---- Electric cyan (the original site accent — nav + cursor light) ---- */
  --accent-cyan: #00D4FF;

  /* ---- dApp panel chrome (App.css .dark-theme .card) ----
     The indigo hairline the dApp frames every panel with. Teal above
     stays the site's signal colour and the surfaces stay the original
     blue-tinted darks; this is the chrome around them. ---- */
  --accent-indigo: #667eea;
  --panel-border: rgba(102, 126, 234, 0.20);

  /* ---- Semantic ---- */
  --danger: #e05252;
  --danger-soft: rgba(224, 82, 82, 0.12);
  --warning: #d68a2c;
  --warning-soft: rgba(214, 138, 44, 0.10);
  --success: #4caf50;
  --success-soft: rgba(76, 175, 80, 0.10);

  /* ---- Type ---- */
  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-serif: "EB Garamond", Georgia, serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", Consolas, "SF Mono", monospace;

  /* ---- Spacing (4px base) ---- */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 20px; --sp-6: 24px; --sp-7: 32px; --sp-8: 40px;
  --sp-9: 56px; --sp-10: 72px; --sp-11: 96px;

  /* ---- Radius ---- */
  --radius-sm: 6px; --radius-md: 10px; --radius-lg: 16px; --radius-pill: 999px;

  /* ---- Elevation ---- */
  --shadow-1: 0 2px 10px rgba(0,0,0,0.30);
  --shadow-2: 0 10px 30px rgba(0,0,0,0.40);
  --shadow-3: 0 18px 48px rgba(0,0,0,0.50);

  /* ---- Motion ----
     UI interactions stay fast + ease-out (feedback should feel instant).
     Hero/entrance moments are allowed to be slow and deliberate —
     that's a feature of a Persuade-mode masthead, not a bug. */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --dur-fast: 120ms;
  --dur-base: 180ms;
  --dur-slow: 260ms;

  --header-h: 72px;
}

/* ============================================================
   RESET + BASE
   ============================================================ */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body {
  margin: 0; padding: 0;
  background: var(--ink-950);
  color: var(--ink-on);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body { overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--signal); text-decoration: none; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap;
}

/* ============================================================
   DESKTOP SCALE
   Reclaim screen real estate on desktop: halve the empty side
   margins around the 1100px reading column and inflate the type
   by the same factor, so every line carries exactly the content
   it did before — just larger. The root font-size grows with the
   viewport (at 1101px wide it equals the default 16px, so there
   is no jump at the breakpoint), and the reading columns below
   are capped in rem, so they ride the same scale. Nothing at or
   below 1100px — phones and tablets — is touched.
   ============================================================ */
@media (min-width: 1101px) {
  html { font-size: calc(8px + 0.72727vw); }

  /* The masthead rides the same scale, so the wordmark stays the largest
     type on the page — section titles are capped below it (1.8rem). The
     rem values match the px clamps at the 1101px boundary: no jump.
     (.lemni-masthead prefix outranks the base clamp rules further down.) */
  .lemni-masthead .lemni-brand-title { font-size: 2.48rem; }
  .lemni-masthead .lemni-tagline { font-size: 1.3rem; }
  .lemni-masthead .lemni-subtagline { font-size: 0.8rem; }
  .lemni-masthead .lemni-protection-line { font-size: 0.75rem; }
  .lemni-masthead .lemni-blockaid-notice { font-size: 0.78rem; }
}

/* Respect reduced-motion: keep opacity fades, drop movement. */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
  .fade-slow, .fade-med, .fade-luxury-text, .lemni-logo {
    transition: opacity 200ms ease !important;
    transform: none !important;
  }
}

/* ============================================================
   LAYOUT PRIMITIVES — replace Bootstrap's .container/.row/.col-*
   ============================================================ */
.site-shell { max-width: 1280px; margin: 0 auto; padding: 0 var(--sp-5); }
.site-main { padding: 0 var(--sp-5); }
.flex-center { display: flex; align-items: center; justify-content: center; }
.content-shell {
  /* 68.75rem = 1100px at the 16px root; grows with the desktop scale. */
  max-width: 68.75rem; margin: var(--sp-9) auto var(--sp-10); width: 100%;
}
@media (max-width: 640px) {
  .site-shell, .site-main { padding: 0 var(--sp-4); }
  .content-shell { margin: var(--sp-6) auto var(--sp-8); }
}

/* ============================================================
   HEADER + NAV
   Desktop: horizontal bar. Mobile (<=960px): hamburger + full
   slide-down panel, top-level rows, tap-to-expand submenus.
   Keeps the existing JS contract: .menuzord-menu > li.has-dropdown,
   li.has-dropdown.open > ul.dropdown, li.active — unchanged.
   ============================================================ */
.header {
  position: sticky; top: 0; z-index: 500;
  /* The same flat --ink-950 as the masthead, body and footer — the nav
     is a region of the page, not a plate floating over it. Opaque, so
     nothing of what scrolls underneath tints it. The backdrop-filter is
     a no-op behind an opaque fill but is kept deliberately: the mobile
     drawer below is sized in vh precisely because .header carries one,
     and dropping it would quietly invalidate that. */
  background: var(--ink-950);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  /* No shadow under the nav either: at rgba(0,0,0,0.6) it darkened the
     first 18px of the masthead to (9,9,15), reading as a second black
     just below the bar. Nothing separates the nav from the page now —
     that is the point. */
}
/* min-height, not height: at mid widths the larger nav type may wrap to a
   second row, and a fixed height clips the wrapped items against the top
   of the bar. Growing is graceful; clipping is not. */
.header-nav-wrapper { min-height: var(--header-h); display: flex; align-items: center; padding: var(--sp-2) 0; }
.header-bar { display: flex; align-items: center; justify-content: space-between; width: 100%; }

.header-brand {
  display: flex; align-items: center; gap: var(--sp-2);
  font-family: var(--font-display); letter-spacing: 0.18em;
  font-size: 15px; color: var(--ink-on); text-decoration: none; white-space: nowrap;
}
.header-brand img { height: 28px; width: auto; }
/* Desktop: no brand chip in the bar — the menu owns the full width and
   sits centered, as it originally did ("Home" is the way back). The brand
   still anchors the mobile bar, where the menu lives behind the hamburger. */
@media (min-width: 961px) {
  .header-brand { display: none; }
  .header-bar { justify-content: center; }
}

.menuzord-menu {
  display: flex; align-items: center; justify-content: center; gap: var(--sp-1);
  list-style: none; margin: 0; padding: 0; flex-wrap: wrap;
}
.menuzord-menu > li { position: relative; }
.menuzord-menu > li > a {
  display: inline-flex; align-items: center; gap: 4px;
  padding: var(--sp-2) var(--sp-3);
  color: #E0E5FF;
  /* The original nav typography: 17px light uppercase with generous
     tracking — the 13px it was reduced to read as an afterthought. */
  font-size: 17px; font-weight: 300;
  letter-spacing: 0.08em; text-transform: uppercase;
  border-radius: var(--radius-sm);
  transition: color 0.25s ease, text-shadow 0.25s ease;
}
.menuzord-menu > li > a:hover {
  color: var(--accent-cyan);
  text-shadow: 0 0 10px rgba(0, 212, 255, 0.55);
}
.menuzord-menu > li.active > a {
  color: var(--accent-cyan);
  text-shadow: 0 0 10px rgba(0, 212, 255, 0.55);
}
/* ::before, not ::after — the dropdown caret below also lives on ::after, and a nav
   item that is simultaneously .active AND .has-dropdown (e.g. "Instructions" while
   viewing a page under it) would merge both rules onto the same pseudo-element. Since
   they'd share equal specificity, the caret's `transform: rotate(90deg)` (meant for
   its own "›" glyph) would apply to this bar too, rotating the horizontal underline
   into a vertical one. Separate pseudo-elements avoid the collision entirely. */
.menuzord-menu > li.active > a::before {
  content: ""; position: absolute; left: var(--sp-3); right: var(--sp-3); bottom: 2px;
  height: 2px; background: var(--accent-cyan);
}
.menuzord-menu > li.has-dropdown > a::after {
  content: "\203A"; display: inline-block; font-size: 12px; transform: rotate(90deg);
  color: var(--silver-3); transition: transform var(--dur-base) var(--ease-out);
}
.menuzord-menu > li.has-dropdown.open > a::after { transform: rotate(-90deg); }

/* Dropdown panel — brushed-silver framed, as before, refined */
@keyframes lemniDropdownIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
.menuzord-menu ul.dropdown {
  display: none; position: absolute; top: 100%; left: 0; margin-top: var(--sp-2);
  min-width: 230px; padding: var(--sp-2) 0; z-index: 600; list-style: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0) 40%), var(--ink-900);
  border: 1px solid rgba(180,190,210,0.45);
  border-radius: var(--radius-md);
  box-shadow: -1px -1px 1px rgba(255,255,255,0.25), 1px 1px 2px rgba(0,0,0,0.5),
              0 0 0 1px rgba(160,170,190,0.25), inset 0 1px 1px rgba(255,255,255,0.1),
              var(--shadow-3);
}
.menuzord-menu > li.has-dropdown.open > ul.dropdown { display: block; animation: lemniDropdownIn var(--dur-slow) var(--ease-out); }
.menuzord-menu ul.dropdown > li { margin: 0; }
.menuzord-menu ul.dropdown > li > a {
  display: block; position: relative; margin: 1px var(--sp-2); padding: var(--sp-2) var(--sp-4);
  border-radius: var(--radius-sm); color: var(--ink-link) !important; font-size: 13px;
  letter-spacing: 0.02em; white-space: nowrap;
  transition: background var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out);
}
.menuzord-menu ul.dropdown > li > a:hover {
  background: linear-gradient(180deg, var(--silver-1) 0%, var(--silver-2) 100%) !important;
  color: var(--ink-950) !important;
}
.menuzord-menu ul.dropdown > li.has-dropdown { position: relative; }
.menuzord-menu ul.dropdown > li.has-dropdown > a::after {
  content: "\203A"; position: absolute; right: var(--sp-3); top: 50%; transform: translateY(-50%);
  color: var(--silver-3); font-size: 14px;
}
.menuzord-menu ul.dropdown > li.has-dropdown > ul.dropdown { top: -7px; left: 100%; margin-top: 0; }
.menuzord-menu ul.dropdown > li.has-dropdown:hover > ul.dropdown,
.menuzord-menu ul.dropdown > li.has-dropdown.open > ul.dropdown { display: block; animation: lemniDropdownIn var(--dur-slow) var(--ease-out); }
.menuzord-menu ul.dropdown > li.has-dropdown.flip-left > ul.dropdown { left: auto; right: 100%; }
.menuzord-menu ul.dropdown > li.has-dropdown.flip-left > a::after { content: "\2039"; }

/* Hamburger (mobile only) */
.nav-toggle {
  display: none; width: 40px; height: 40px; border: none; background: none; cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 0;
  -webkit-tap-highlight-color: transparent;
}
.nav-toggle span {
  display: block; width: 22px; height: 1.5px; background: var(--ink-on); border-radius: 2px;
  transition: transform var(--dur-base) var(--ease-out), opacity var(--dur-base) var(--ease-out);
}
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

@media (max-width: 960px) {
  .nav-toggle { display: flex; }
  .menuzord-menu {
    display: none; position: fixed; z-index: 400;
    /* top/left/right (not `inset` with bottom:0) + an explicit height in vh — .header
       has backdrop-filter, which per spec makes IT the containing block for a `position:
       fixed` descendant instead of the viewport. That silently shrank `bottom:0`'s 100%-
       of-container height down to .header's own ~72px, clipping everything after the
       first item or two. `vh` units aren't affected by which element is the containing
       block, so this renders correctly regardless. */
    top: var(--header-h); left: 0; right: 0; height: calc(100vh - var(--header-h));
    flex-direction: column; flex-wrap: nowrap; /* the base rule sets flex-wrap:wrap for
      the desktop row; left uncontested here, column+wrap makes flexbox start a NEW
      COLUMN whenever it runs out of vertical space instead of one scrolling list —
      which is what was rendering as a horizontal layout. nowrap forces a single column. */
    align-items: stretch; justify-content: flex-start; gap: 0; overflow-y: auto;
    background: var(--ink-950); padding: var(--sp-4) 0 var(--sp-9);
    -webkit-overflow-scrolling: touch;
  }
  .nav-open .menuzord-menu { display: flex; }
  .menuzord-menu > li { width: 100%; border-bottom: 1px solid var(--hairline); }
  .menuzord-menu > li > a {
    width: 100%; padding: var(--sp-4) var(--sp-5); font-size: 15px; border-radius: 0;
    justify-content: space-between;
  }
  .menuzord-menu > li.active > a::before { display: none; }
  /* Submenus become inline accordions, not floating panels */
  .menuzord-menu ul.dropdown {
    position: static; display: none; min-width: 0; margin: 0; padding: 0;
    border: none; border-radius: 0; box-shadow: none;
    background: var(--ink-900);
  }
  .menuzord-menu > li.has-dropdown.open > ul.dropdown { animation: none; }
  .menuzord-menu ul.dropdown > li > a { margin: 0; padding: var(--sp-3) var(--sp-5) var(--sp-3) var(--sp-7); font-size: 14.5px; }
  .menuzord-menu ul.dropdown > li.has-dropdown > ul.dropdown { padding-left: var(--sp-3); }
  .menuzord-menu ul.dropdown > li.has-dropdown.flip-left > ul.dropdown { left: 0; right: auto; }
  body.nav-open { overflow: hidden; }
}

/* ============================================================
   MASTHEAD
   ============================================================ */
.lemni-masthead {
  position: relative; width: 100%; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  gap: var(--sp-10); padding: var(--sp-9) 5% var(--sp-10);
  /* Flat --ink-950, no radial and no vignette below: the masthead runs
     edge to edge against the nav above it and the page below, so any
     gradation here reads as a different black rather than as depth. */
  background: var(--ink-950);
}
.lemni-masthead-left { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; }
.lemni-logo {
  width: clamp(150px, 22vw, 320px); filter: drop-shadow(0 0 16px rgba(0,0,0,0.5));
  /* Old entrance: a pure, unhurried 1.8s fade (the .fade-med class on the
     element adds the gentle rise; this rule, declared later, owns the
     timing). .visible is added by index.php shortly after load. */
  opacity: 0;
  transition: opacity 1.8s ease, transform 1.8s ease;
}
.lemni-logo.visible { opacity: 1; transform: none; }
.lemni-masthead-right { flex: 1 1 auto; min-width: 0; max-width: 560px; display: flex; flex-direction: column; justify-content: center; text-align: left; }
.lemni-brand-title {
  /* Trebuchet MS, not Playfair Display — this is what the live site actually
     renders (confirmed via a devtools computed-style dump against production:
     font-weight 400, letter-spacing 21.6px at 48px = exactly the 0.45em this
     already had). lemni-masthead.css's own rule here claims Playfair Display,
     but style-luxury.css's blanket !important override on every div has been
     quietly winning in practice the whole time — so matching it here is
     matching the real, established brand look, not undoing a deliberate one. */
  font-family: "Trebuchet MS", Arial, sans-serif;
  font-size: clamp(24px, 3.6vw, 48px); letter-spacing: clamp(0.18em, 0.45em, 0.45em);
  color: var(--ink-on); margin: 0 0 var(--sp-4); white-space: nowrap;
}
.lemni-tagline {
  font-family: var(--font-serif); font-style: italic;
  font-size: clamp(16px, 1.9vw, 23px); color: var(--silver-1); margin: 0;
}
.lemni-subtagline {
  font-family: var(--font-sans); font-size: clamp(13px, 1.05vw, 15px);
  letter-spacing: 0.01em; line-height: 1.5; color: var(--ink-dim); margin-top: var(--sp-6);
}
.lemni-protection-line {
  font-family: var(--font-sans); font-size: clamp(12px, 0.95vw, 14px);
  color: var(--ink-faint); margin-top: var(--sp-1);
}
.lemni-vignette {
  position: absolute; inset: 0; pointer-events: none;
  background: none;
}
.lemni-masthead > *:not(.lemni-vignette) { position: relative; z-index: 2; }

.lemni-blockaid-notice {
  display: block; max-width: 300px; font-size: clamp(12px, 1vw, 14px);
  font-weight: 500; line-height: 1.5; color: var(--danger); margin-top: var(--sp-6);
  transition: color var(--dur-base) var(--ease-out);
}
.lemni-blockaid-notice:hover { color: #ff7a7a; text-decoration: underline; }

.buy-lemni-btn {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  margin-top: var(--sp-6); padding: var(--sp-2) var(--sp-5);
  border-radius: var(--radius-pill); background: var(--ink-900); text-decoration: none; cursor: pointer;
  width: fit-content;
  box-shadow: -1px -1px 1px rgba(255,255,255,0.3), 1px 1px 2px rgba(0,0,0,0.55),
              0 0 0 1px rgba(160,170,190,0.35), inset 0 1px 1px rgba(255,255,255,0.1);
  transition: box-shadow var(--dur-slow) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.buy-lemni-btn:hover { box-shadow: -1px -1px 2px rgba(255,255,255,0.4), 1px 1px 3px rgba(0,0,0,0.6), 0 0 0 1px rgba(180,190,210,0.5), inset 0 1px 1px rgba(255,255,255,0.15), 0 0 14px rgba(180,190,210,0.15); }
.buy-lemni-btn:active { transform: scale(0.97); }
.buy-lemni-logo { font-size: 22px; font-weight: 600; color: var(--signal); line-height: 1; }
.buy-lemni-text { font-family: var(--font-sans); font-size: 13px; letter-spacing: 0.03em; color: var(--silver-2); }

@media (max-width: 900px) {
  .lemni-masthead { flex-direction: column; text-align: center; padding: var(--sp-7) var(--sp-5) var(--sp-8); gap: var(--sp-6); }
  .lemni-masthead-right { text-align: center; max-width: 100%; align-items: center; }
  .lemni-blockaid-notice, .buy-lemni-btn { margin-left: auto; margin-right: auto; }
}
/* Phones: the wordmark must never break across lines — it is the one
   element that has to arrive whole. Scale it to the viewport and ease the
   tracking so it fits a 320px screen on a single line. */
@media (max-width: 640px) {
  .lemni-brand-title {
    white-space: nowrap;
    font-size: clamp(17px, 6.5vw, 26px);
    letter-spacing: 0.2em;
  }
}

/* Fade-in utilities — the original slow entrance, restored. Elements
   start hidden; index.php adds .visible ~120ms after window load and
   each piece glides into place over 1.95–3.3 seconds (the timings the
   site always had, from lemni-masthead.css). This shell renders nothing
   without JavaScript anyway (all content arrives via AJAX), so gating
   the entrance on the same script costs nothing. */
.fade-slow {
  opacity: 0; transform: translateY(15px);
  transition: opacity 3.3s ease, transform 3.3s ease;
}
.fade-med {
  opacity: 0; transform: translateY(12px);
  transition: opacity 2.4s ease, transform 2.4s ease;
}
.fade-luxury-text {
  opacity: 0; transform: translateX(20px);
  transition: opacity 1.95s ease, transform 1.95s ease;
}
.fade-slow.visible, .fade-med.visible, .fade-luxury-text.visible {
  opacity: 1; transform: translate(0, 0);
}
/* The logo carries .fade-med in the markup; this later declaration keeps
   its fade at the original 1.8s rather than .fade-med's 2.4s. */
.lemni-logo { transition: opacity 1.8s ease, transform 1.8s ease; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--hairline); background: var(--ink-950);
  padding: var(--sp-9) 5% var(--sp-7); margin-top: var(--sp-10);
}
.site-footer-grid {
  max-width: 1280px; margin: 0 auto; display: flex; flex-wrap: wrap;
  justify-content: space-between; gap: var(--sp-8);
}
.site-footer-brand { font-family: var(--font-display); letter-spacing: 0.14em; font-size: 14px; color: var(--ink-on); margin-bottom: var(--sp-2); }
.site-footer-tag { font-family: var(--font-serif); font-style: italic; color: var(--ink-faint); font-size: 13px; max-width: 280px; }
.site-footer-col h4 {
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--silver-2);
  margin: 0 0 var(--sp-3); font-weight: 500;
}
.site-footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-2); }
.site-footer-col a { color: var(--ink-dim); font-size: 13px; transition: color var(--dur-base) var(--ease-out); }
.site-footer-col a:hover { color: var(--signal); }
.site-footer-bottom {
  max-width: 1280px; margin: var(--sp-8) auto 0; padding-top: var(--sp-5); border-top: 1px solid var(--hairline);
  /* Two centered lines (copyright, then the tagline) — they used to be
     pinned to opposite edges on desktop. Mobile already looked like this. */
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--sp-3);
  color: var(--ink-faint); font-size: 12px;
}
@media (max-width: 640px) {
  .site-footer-grid { flex-direction: column; gap: var(--sp-6); }
}

/* ============================================================
   CONTENT PAGE — shared typography for every fragment
   (moved + refined from the old inline block in index.php)
   ============================================================ */
.luxury-card {
  background: var(--ink-900); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1); opacity: 1;
}
.content-page {
  /* 68.75rem = 1100px at the 16px root; grows with the desktop scale. */
  max-width: 68.75rem; margin: 0 auto; background: var(--ink-900);
  padding: var(--sp-9) var(--sp-7) var(--sp-10); border-radius: var(--radius-lg);
  /* The dApp's panel hairline. border-box is set globally by the reset, so
     this adds no width and shifts nothing. */
  border: 1px solid var(--panel-border);
  font-size: 18px; line-height: 1.6;
}
.content-page h1 {
  font-family: var(--font-sans); font-weight: 200; font-size: 1.8rem;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-on);
  margin: 0 0 var(--sp-7); padding-bottom: var(--sp-5); border-bottom: 1px solid var(--hairline);
}
.content-page h2 {
  font-weight: 200; font-size: 1.3rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-on); margin: var(--sp-9) 0 var(--sp-4);
}
.content-page h3 { font-weight: 500; font-size: 0.95rem; letter-spacing: 0.03em; color: var(--silver-1); margin: var(--sp-6) 0 var(--sp-2); }
.content-page p { font-size: 0.95rem; color: var(--ink-dim); line-height: 1.75; margin-bottom: var(--sp-4); }
.content-page strong { color: var(--ink-link); font-weight: 500; }
.content-page a { color: var(--signal); transition: opacity var(--dur-base) var(--ease-out); }
.content-page a:hover { opacity: 0.8; }
.content-page ul, .content-page ol { margin: var(--sp-2) 0 var(--sp-5) var(--sp-4); padding-left: var(--sp-2); }
.content-page li { margin-bottom: var(--sp-2); font-size: 0.95rem; color: var(--ink-dim); line-height: 1.7; }
.content-page li strong { color: var(--ink-link); }
.content-page .section { margin-top: var(--sp-9); scroll-margin-top: var(--sp-5); }
.content-page img { border-radius: var(--radius-md); }
.content-page table { width: 100%; border-collapse: collapse; margin-top: var(--sp-6); font-size: 0.85rem; }
.content-page th, .content-page td { border: 1px solid var(--hairline); padding: var(--sp-3) var(--sp-4); color: var(--ink-dim); }
.content-page th { background: var(--signal-soft); color: var(--signal); font-weight: 500; font-size: 0.72rem; letter-spacing: 0.07em; text-transform: uppercase; }
.content-page .row-dark { background: var(--ink-800); }
.content-page .row-mid { background: var(--signal-soft); }
.content-page .row-final { background: var(--danger-soft); color: var(--danger); font-weight: 500; }
.content-page .row-final td { color: #e8b0a8; }
.content-page .attack-table tr:nth-child(even) { background: var(--ink-800); }

@media (max-width: 900px) {
  .content-page { padding: var(--sp-7) var(--sp-4) var(--sp-8); font-size: 16px; }
  .content-page table { display: block; overflow-x: auto; white-space: nowrap; }
}

/* Tutorials: the caption-language note under each video sits on one
   discreet line on any desktop-nav-width screen. Lives here (not in
   tutorial-video.css) because the shell cache-busts this file, and the
   .content-page p prefix outranks the shell paragraph rule above. */
@media (min-width: 961px) {
  .content-page p.tut-video-note {
    font-size: 0.65rem;
    white-space: nowrap;
    max-width: none;
  }
}
/* Phones: the shell card wraps fragments that often carry a padded card of
   their own, so keep the shell's share of the side inset to a hairline and
   let the text have the width. Desktop is untouched. */
@media (max-width: 640px) {
  .content-page { padding: var(--sp-6) var(--sp-2) var(--sp-7); }
}

/* ============================================================
   BTC-PAGE — shared helpers for long-form Bitcoin docs
   (base h1/h2/h3/p/ul inherits .content-page above)
   ============================================================ */
.btc-page .subtitle, .btc-page .btc-subtitle { color: var(--ink-dim); font-size: 1rem; margin: -8px 0 var(--sp-2); }
.btc-page .tagline { color: var(--signal); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; margin-bottom: var(--sp-1); }
.btc-page .date-line { color: var(--ink-faint); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: var(--sp-7); }
.btc-page h4 { font-weight: 500; font-size: 0.82rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--silver-1); margin-top: var(--sp-6); margin-bottom: var(--sp-2); }
.btc-page .btc-callout, .btc-page .abstract { margin: var(--sp-5) 0; padding: var(--sp-4) var(--sp-6); background: var(--signal-soft); border-left: 3px solid var(--signal); border-radius: 4px; color: var(--ink-link); line-height: 1.7; font-size: 0.92rem; }
.btc-page .btc-callout strong, .btc-page .abstract strong { color: var(--ink-on); }
.btc-page .abstract { font-style: italic; }
.btc-page .callout { margin: var(--sp-5) 0; padding: var(--sp-4) var(--sp-5); border-radius: var(--radius-md); font-size: 0.9rem; line-height: 1.6; font-style: italic; display: flex; gap: var(--sp-3); background: var(--signal-soft); border-left: 3px solid var(--signal); color: var(--ink-link); }
.btc-page .callout-icon { font-style: normal; font-weight: 700; font-size: 1.05rem; flex-shrink: 0; color: var(--signal); }
.btc-page .callout-success { background: var(--success-soft); border-left-color: var(--success); }
.btc-page .callout-success .callout-icon { color: #81c784; }
.btc-page .callout-warning { background: var(--warning-soft); border-left-color: var(--warning); }
.btc-page .callout-warning .callout-icon { color: #f5b56a; }
.btc-page .btc-highlight { margin: var(--sp-9) 0; padding: var(--sp-6) var(--sp-7); text-align: center; font-size: 1.05rem; color: var(--ink-link); line-height: 1.8; background: linear-gradient(135deg, var(--signal-mid), transparent); border: 1px solid var(--signal-border); border-radius: var(--radius-lg); }
.btc-page .btc-caution { margin: var(--sp-5) 0; padding: var(--sp-4) var(--sp-6) 6px; background: var(--warning-soft); border-left: 3px solid var(--warning); border-radius: 4px; }
.btc-page .btc-caution li { color: #cbb98f; }
.btc-page .btc-caution strong { color: #f0e2c4; }
.btc-page .btc-badge { display: inline-block; margin: 0 0 var(--sp-7); padding: var(--sp-2) var(--sp-5); background: var(--signal-soft); border: 1px solid var(--signal-border); border-radius: var(--radius-pill); font-size: 0.8rem; letter-spacing: 0.05em; color: #bfe9e9; }
.btc-page .btc-badge strong { color: var(--ink-on); }
.btc-page .patent-notice { background: var(--warning-soft); border: 1px solid rgba(214,138,44,0.3); border-left: 4px solid var(--warning); padding: var(--sp-5); margin: var(--sp-6) 0; border-radius: var(--radius-md); font-size: 0.9rem; line-height: 1.6; color: #cbb98f; }
.btc-page .patent-notice strong { color: #f5b56a; }
.btc-page .btc-method-tag { display: inline-block; font-size: 0.6rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--signal); border: 1px solid var(--signal-border); padding: 2px 9px; border-radius: 4px; margin-left: var(--sp-2); vertical-align: middle; }
.btc-page .btc-flow { margin: var(--sp-5) 0; padding: var(--sp-4) var(--sp-6) 6px; background: rgba(255,255,255,0.02); border: 1px solid var(--hairline); border-radius: var(--radius-md); }
.btc-page .btc-fineprint { margin-top: var(--sp-9); padding-top: var(--sp-4); border-top: 1px solid var(--hairline); font-size: 0.78rem; line-height: 1.6; color: var(--ink-faint); font-style: italic; }
.btc-page .table-wrapper { overflow-x: auto; margin: var(--sp-5) 0 var(--sp-6); border-radius: var(--radius-md); background: var(--ink-950); border: 1px solid var(--hairline); }
.btc-page table { width: 100%; border-collapse: collapse; font-size: 0.82rem; color: var(--ink-link); min-width: 640px; }
.btc-page table thead { background: var(--signal-soft); }
.btc-page table th { padding: var(--sp-3); text-align: left; color: var(--signal); font-weight: 500; font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; border-bottom: 1px solid var(--signal-border); white-space: nowrap; }
.btc-page table td { padding: 11px var(--sp-3); border-bottom: 1px solid var(--hairline); vertical-align: top; line-height: 1.55; }
.btc-page table tr:hover td { background: var(--signal-soft); }
.btc-page table td:first-child { color: var(--ink-on); font-weight: 500; }
.btc-page table tr.patent-row td { background: var(--success-soft); color: #d8f5e1; }
.btc-page table.numeric td:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.btc-page .bottom-line { margin-top: var(--sp-9); padding: var(--sp-6) var(--sp-7); background: linear-gradient(135deg, var(--signal-mid), transparent); border-radius: var(--radius-md); border-left: 4px solid var(--signal); }
.btc-page .bottom-line-label { font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-on); margin-bottom: var(--sp-3); font-weight: 500; }
.btc-page .closing-italic { font-style: italic; color: var(--ink-dim); font-size: 0.95rem; margin-top: var(--sp-5); text-align: center; line-height: 1.7; }
.btc-page .hash-block { font-family: var(--font-mono); background: var(--signal-soft); border: 1px solid var(--signal-border); padding: var(--sp-3) var(--sp-4); border-radius: var(--radius-sm); font-size: 0.78rem; word-break: break-all; margin: var(--sp-2) 0 var(--sp-4); color: #bfe9e9; }
.btc-page pre { background: var(--ink-950); color: var(--ink-link); padding: var(--sp-5); border-radius: var(--radius-sm); font-family: var(--font-mono); font-size: 0.74rem; line-height: 1.55; overflow-x: auto; border: 1px solid var(--hairline); margin: var(--sp-3) 0 var(--sp-6); white-space: pre; }
.btc-page code { font-family: var(--font-mono); background: rgba(255,255,255,0.06); padding: 1px 6px; border-radius: 3px; font-size: 0.9em; color: #e8c4a0; }
.btc-page pre code { background: none; padding: 0; font-size: inherit; color: inherit; }
.btc-page figure { margin: var(--sp-7) auto; text-align: center; }
.btc-page figure img { max-width: 100%; height: auto; border-radius: var(--radius-md); box-shadow: var(--shadow-2); border: 1px solid var(--hairline); }
.btc-page figcaption { margin-top: var(--sp-3); color: var(--ink-dim); font-style: italic; font-size: 0.82rem; line-height: 1.55; max-width: 700px; margin-left: auto; margin-right: auto; }

/* ============================================================
   BUTTONS (shared component — used by reskinned content pages)
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-6); border-radius: var(--radius-pill);
  font-family: var(--font-sans); font-size: 14px; font-weight: 500; letter-spacing: 0.02em;
  cursor: pointer; border: 1px solid transparent; text-decoration: none;
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-base) var(--ease-out),
              background var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out);
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--signal); color: var(--ink-950); }
.btn-primary:hover { background: var(--signal-bright); }
.btn-ghost { background: transparent; border-color: var(--hairline-strong); color: var(--ink-on); }
.btn-ghost:hover { border-color: var(--signal-border); color: var(--signal); }
