/* dir-a.css, Direction A "Market terminal". A plain two-column hero (copy
   left, mark right) over the dark market panel and its ticker tape. The
   corkboard, sticky notes, string and handwriting were removed 2026-09-05:
   this reads as an exchange, not a garden. */

/* Nav, ported from the 21st.dev "Centered Nav Header" pattern: fixed
   64px row, brand fixed left, links absolutely centred (hidden below the
   900px collapse point), a right cluster pushed with margin-left:auto
   holding a ghost link, a hairline separator, the filled CTA, then the
   mobile trigger (shown only below 900px). One hairline border, no
   shadow, no glass -- scrolling past 40px only swaps the flat background
   (js/zyrs.js toggles .is-scrolled), it never blurs. */
.nav-a{ position: sticky; top: 40px; z-index: 20; background: var(--paper); border-bottom: 1px solid var(--line); transition: background-color .2s ease; }
.nav-a.is-scrolled{ background: var(--card); }
.nav-a-row{ position: relative; display: flex; align-items: center; height: 64px; padding: 0 var(--space-lg); gap: var(--space-md); }
.brand{ display: flex; align-items: center; gap: var(--space-xs); flex: none; }
.brand-mark{ width: 22px; height: 22px; border-radius: 4px; object-fit: contain; flex: none; }
/* .wordmark (shared, zyrs.css) already sets the display font, weight 600
   and the --text-lg size the brand wants -- no separate override needed. */

.nav-links{
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: flex; gap: var(--space-md); font-family: var(--font-mono); font-size: var(--text-2xs);
}
.nav-links a{
  text-decoration: none; color: var(--ink); padding: var(--space-2xs) 0;
  border-bottom: 1px solid transparent; transition: color 120ms ease, border-color 120ms ease;
}
.nav-links a:hover{ color: var(--accent-ink); }
.nav-links a.is-active{ color: var(--ink); border-bottom-color: var(--accent); }

.nav-right{ display: flex; align-items: center; gap: var(--space-sm); margin-left: auto; flex: none; }
.nav-ghost{
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 var(--space-xs);
  font-family: var(--font-mono); font-size: var(--text-2xs); text-decoration: none; color: var(--ink);
  transition: color 120ms ease;
}
.nav-ghost:hover{ color: var(--accent-ink); }
.nav-sep{ width: 1px; height: 20px; background: var(--line); flex: none; }
.btn-nav{ font-size: var(--text-2xs); padding: var(--space-xs) var(--space-md); min-height: 36px; }

.budget-toggle{ display: flex; gap: var(--space-xs); }
.budget-toggle button{
  font-family: var(--font-mono); font-size: var(--text-2xs); padding: var(--space-2xs) var(--space-sm);
  border-radius: 4px; border: 1px solid var(--line); background: transparent; cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease;
}
.budget-toggle button:hover{ border-color: var(--ink-soft); }
.budget-toggle button.is-active{ background: var(--ink); color: var(--paper); border-color: var(--ink); }

.drawer-toggle{ display: none; }
/* Closed and off-canvas above the collapse point no matter what. Only
   the burger under 900px can open it. */
[data-drawer]{ display: none; }
@media (max-width: 900px){
  .nav-links{ display: none; }
  .drawer-toggle{ display: inline-flex; }
  /* Docked at the viewport's right edge always; closed state fades and
     pointer-locks rather than sliding off-canvas, so it (and everything
     inside it) never sits outside the 0-390 viewport bounds. */
  [data-drawer]{
    display: block; position: fixed; inset: 0 0 0 auto; width: 78%; max-width: 320px;
    background: var(--paper); opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity .2s ease, visibility 0s .2s;
    z-index: 30; padding: var(--space-lg); border-left: 1px solid var(--line);
  }
  [data-drawer].is-open{ opacity: 1; visibility: visible; pointer-events: auto; transition: opacity .2s ease, visibility 0s; }
  [data-drawer] a{
    display: flex; align-items: center; min-height: 44px; padding: var(--space-sm) 0;
    font-family: var(--font-mono); text-decoration: none;
  }
}

/* Hero. Flat card colour, no radial glow, two columns at 1024+: copy on
   the left (eyebrow, headline, the three concept paragraphs, the CTA row),
   the mark tile on the right. Single column below 1024. */
.hero{
  position: relative;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  padding: var(--space-2xl) 0;
}
.hero-grid{
  display: grid; grid-template-columns: 1fr; gap: var(--space-xl); align-items: start;
}
@media (min-width: 1024px){
  .hero-grid{ grid-template-columns: 1.8fr 0.6fr; gap: var(--space-2xl); }
}
.hero-copy .eyebrow{ margin-bottom: var(--space-sm); }
.hero-lede{ color: var(--ink); max-width: 62ch; margin-top: var(--space-md); }
.hero-copy h1 + .hero-lede,
.hero-copy h1 + .how-strip{ margin-top: var(--space-lg); }
.hero-lede{ color: var(--ink); max-width: 42ch; margin-top: var(--space-md); font-size: var(--text-base); }
.how-strip{
  list-style: none; padding: 0; margin: var(--space-lg) 0 0; max-width: 70ch;
  display: grid; grid-template-columns: 1fr; gap: var(--space-sm);
}
@media (min-width: 768px){
  .how-strip{ grid-template-columns: repeat(3, 1fr); gap: var(--space-md); }
}
.how-strip li{ display: flex; gap: var(--space-sm); align-items: flex-start; margin: 0; }
.how-strip-n{
  font-family: var(--font-mono); font-weight: 700; font-size: var(--text-base); color: var(--accent);
  flex: none; line-height: 1.4;
}
.how-strip span:not(.how-strip-n){ font-size: var(--text-base); color: var(--ink); }

.who-grid{
  display: grid; grid-template-columns: 1fr; gap: var(--space-lg);
  margin-top: var(--space-lg);
}
@media (min-width: 768px){
  .who-grid{ grid-template-columns: repeat(3, 1fr); }
}
.who-col{ font-size: var(--text-base); }
.who-col a{ color: var(--accent-ink); }
.hero-note{ color: var(--ink); max-width: 62ch; margin-top: var(--space-md); }
.hero-mark{ display: flex; align-items: center; justify-content: center; }

.concept-list{
  list-style: none; padding: 0; margin: var(--space-lg) 0 0; max-width: 62ch;
  border-top: 1px solid var(--line);
}
.concept-list li{
  display: grid; grid-template-columns: 2.75rem 1fr; gap: var(--space-sm);
  padding: var(--space-md) 0; border-bottom: 1px solid var(--line);
  align-items: start;
}
.concept-n{
  font-family: var(--font-mono); font-size: var(--text-2xs); color: var(--accent);
  letter-spacing: .08em; padding-top: 3px;
}
.concept-list p{ margin: 0; color: var(--ink); max-width: 62ch; font-size: var(--text-base); line-height: 1.45; }

/* The mark is a cut-out PNG with real transparency, so it sits directly on
   the board with a contact shadow rather than inside a card. A box-shadow
   would draw a rectangle around a round object; drop-shadow follows alpha. */
.mark-tile{
  position: relative; z-index: 2; background: none; padding: var(--space-xs);
  display: flex; align-items: center; justify-content: center;
  --tilt-x: 0deg; --tilt-y: 0deg;
}
@media (hover: hover) and (pointer: fine){
  .hero-mark{ perspective: 900px; }
  .mark-tile{
    transform: rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
    transform-style: preserve-3d;
    transition: transform .45s ease;
  }
  .mark-tile.is-tilting{ transition: none; }
}
@media (prefers-reduced-motion: reduce){
  .hero-mark{ perspective: none; }
  .mark-tile{ transform: none; transition: none; }
}
.mark-tile img{
  display: block; width: 160px; max-width: 100%; height: auto; object-fit: contain;
  filter: drop-shadow(0 18px 22px rgba(26,36,25,.20));
}
/* Live three.js mark (js/zyrs-mark3d.js). Same footprint as the PNG it
   replaces; the canvas only ever gets appended once a first WebGL frame
   is ready, and the PNG is toggled off via [hidden], never removed. */
/* The fallback PNG is hidden by setting img.hidden once the 3D scene has
   rendered a frame. The [hidden] attribute alone loses to the .mark-tile img
   display rule above on specificity, which left both the PNG and the canvas
   on screen side by side. Hide it from the parent's active class instead. */
.mark-tile.mark-3d-active img{ display: none; }

.mark-tile canvas{
  display: block; width: 160px; max-width: 100%; height: 160px;
  filter: drop-shadow(0 18px 22px rgba(26,36,25,.20));
}


/* Budget control: lives at the top of "Now buying", where the number it
   sets actually applies. One row holds the presets and the slider
   together, since both set the same value. */
.budget-control{ background: var(--pale-green); border-radius: 0; padding: var(--space-sm); grid-column: 1 / -1; }
.budget-sentence{ font-family: var(--font-mono); font-size: var(--text-2xs); color: var(--ink); margin-top: var(--space-xs); }
.budget-control-row{
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-md);
  margin-top: var(--space-md); padding-top: var(--space-md); border-top: 1px solid var(--line);
}

/* Now buying card */
.now-buying{
  display: grid; grid-template-columns: repeat(12, 1fr); gap: 1px; background: var(--paper);
  border: 1px solid var(--line); border-radius: 0;
}
.now-buying > *{ background: var(--pale-green); padding: var(--space-sm); min-width: 0; grid-column: span 4; }
.now-buying > .gc-full,
.now-buying > .budget-control{ grid-column: 1 / -1; }
@media (max-width: 640px){ .now-buying > *{ grid-column: span 12; } }
.now-buying .num{ font-family: var(--font-mono); font-size: var(--text-lg); color: var(--ink); }
.now-buying .num-label{ font-family: var(--font-mono); font-size: var(--text-2xs); text-transform: uppercase; color: var(--ink-soft); letter-spacing: .08em; }

.endgame-card{ background: var(--card); border-radius: var(--radius); padding: var(--space-xl); display: grid; gap: var(--space-md); grid-template-columns: repeat(3,1fr); }
.endgame-card p{ color: var(--ink); margin: 0; max-width: none; }
.endgame-card .eyebrow{ margin-bottom: var(--space-xs); }
@media (max-width: 768px){ .endgame-card{ grid-template-columns: 1fr; } }

.step-grid{ display: grid; grid-template-columns: repeat(2,1fr); gap: var(--space-lg); }
@media (max-width: 768px){ .step-grid{ grid-template-columns: 1fr; } }
.step{ border: 1px solid var(--line); border-radius: 4px; padding: var(--space-md); }
.step .verify{ margin-top: var(--space-sm); font-family: var(--font-mono); font-size: var(--text-2xs); color: var(--ink-soft); }

.side-panel{ background: var(--pale-green); border-radius: 0; padding: var(--space-md); font-family: var(--font-mono); font-size: var(--text-2xs); color: var(--ink); }
.side-panel .kv{ display: grid; gap: 1px; background: var(--paper); margin: var(--space-sm) 0 0; }
.side-panel .kv > div{ background: var(--pale-green); padding: var(--space-xs); display: flex; justify-content: space-between; gap: var(--space-sm); }
.side-panel dt{ color: var(--ink-soft); text-transform: uppercase; letter-spacing: .08em; }
.side-panel dd{ margin: 0; font-weight: 700; }
.queue-layout{ display: grid; grid-template-columns: 2fr 1fr; gap: var(--space-lg); }
@media (max-width: 900px){ .queue-layout{ grid-template-columns: 1fr; } }

/* Queue table. Company: ticker (mono, accent) stacked over
   the company name (body font -- prose, not a figure). Size: the full
   dollar figure with a thin proportional bar underneath, scaled against
   the largest company on the whole queue so size reads at a glance. Rank
   stays small, muted and right aligned, at the end of the row rather than
   leading it, since a human scans company then cost before rank. */
.company-cell{ display: flex; flex-direction: column; gap: 4px; }
.company-ticker{ font-family: var(--font-mono); font-weight: 700; color: var(--accent); }
.company-ticker a{ color: inherit; text-decoration: none; }
.company-ticker a:hover{ text-decoration: underline; }
.company-name{ font-family: var(--font-body); font-size: var(--text-2xs); color: var(--ink); }
.company-name a{ color: inherit; text-decoration: none; }
.company-name a:hover{ color: var(--accent-ink); text-decoration: underline; }

.size-cell{ display: flex; flex-direction: column; gap: var(--space-2xs); min-width: 96px; }
.size-figure{ font-family: var(--font-mono); }
.size-bar{ display: block; height: 4px; border-radius: 4px; background: var(--pale-green); overflow: hidden; }
.size-bar i{ display: block; height: 100%; background: var(--accent-soft); }

.col-rank{ text-align: right; color: var(--ink-soft); }
.sort-btn.is-end{ justify-content: flex-end; text-align: right; }

/* Price typography: numeric columns read right to left, like a broker
   statement, so figures of different lengths still line up on the ones
   place. Headers align to match without any markup change. */
.col-size, .col-cost, .col-days{ text-align: right; }
table.queue th[data-sort-key="price"] .sort-btn,
table.queue th[data-sort-key="pctchange"] .sort-btn,
table.queue th[data-sort-key="volume"] .sort-btn,
table.queue th[data-sort-key="cap"] .sort-btn,
table.queue th[data-sort-key="costOf5pct"] .sort-btn{ justify-content: flex-end; text-align: right; }

/* The stake is the filled share of the 5% disclosure threshold. */
.stake-gauge{ position: relative; width: 96px; height: 96px; margin: 0 auto 4px; }
.stake-gauge svg{ display: block; }
.stake-track, .stake-arc{ fill: none; stroke-width: 4; }
.stake-track{ stroke: var(--line); }
.stake-arc{ stroke: var(--accent); transform: rotate(-90deg); transform-origin: 48px 48px; transition: stroke-dashoffset 400ms cubic-bezier(.2,.7,.2,1); }
.stake-value{ position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-mono); font-size: var(--text-lg); font-variant-numeric: tabular-nums; line-height: 24px; }
.now-buying > .gc-full:has(.stake-gauge){ text-align: center; background: var(--paper); }
.now-buying .num{ margin-top: 4px; line-height: 24px; }
.quote-ohlc{ row-gap: 8px; }
@media (prefers-reduced-motion: reduce){ .stake-arc{ transition: none; } }

.mark-tile.reveal{ transition: opacity 480ms cubic-bezier(.2,.7,.2,1), transform 480ms cubic-bezier(.2,.7,.2,1); }

.mark-tile.in.is-tilting{ transition: none; }

/* Pass 5: the market landscape occupies the opening, copy sits on paper. */
.floor-opening{ position: relative; background: var(--paper); border-bottom: 1px solid var(--line); }
.floor-toolbar{ display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 8px; padding-bottom: 8px; }
.floor-toolbar > div{ display: flex; gap: 8px; }
.floor-toolbar button, .floor-target{ font-family: var(--font-mono); font-size: .875rem; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 4px; min-height: 44px; padding: 8px 12px; cursor: pointer; }
.floor-toolbar button[aria-pressed="true"]{ border-color: var(--accent); }
.floor-stage{ position: relative; width: calc(100% - 48px); max-width: 1440px; height: clamp(320px, 46vh, 560px); margin: 0 auto; isolation: isolate; }
.floor-stage > svg, .floor-stage > canvas, .floor-labels{ position: absolute; inset: 0; width: 100%; height: 100%; }
.floor-stage > canvas{ display: none; }
.floor-stage.is-3d > canvas{ display: block; }
.floor-stage.is-3d > svg{ visibility: hidden; }
.floor-labels{ pointer-events: none; }
.floor-tile{ position: absolute; display: flex; align-items: center; justify-content: center; pointer-events: auto; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--paper); cursor: pointer; font-family: var(--font-mono); font-size: .875rem; line-height: 1.15; }
.floor-tile span{ display: block; padding: 3px 4px; white-space: pre; background: var(--dark); border: 1px solid transparent; border-radius: 2px; }
.floor-tile[aria-pressed="true"] span{ border-color: var(--paper); }
.floor-tile:focus-visible{ z-index: 30 !important; outline: 2px solid var(--paper); outline-offset: -3px; }
.floor-stage.is-3d .floor-tile{ transform: translate(-50%, -50%); min-height: 36px; }
.floor-stage.is-3d .floor-tile[hidden]{ display: flex !important; }
.floor-stage.is-3d .floor-tile[hidden]:not(:hover):not([aria-pressed="true"]):not(:focus-visible) > span{ visibility: hidden; }
.floor-edge{ position: relative; z-index: 2; display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: -168px; padding-top: 144px; padding-bottom: 16px; background: linear-gradient(to bottom, transparent 0%, #F1F5EC 40%); pointer-events: none; }
.floor-copy, .floor-evidence{ pointer-events: auto; }
.floor-copy h1{ font-size: clamp(2.25rem, 3.8vw, 3.5rem); max-width: 17ch; }
.floor-copy .cta-row{ margin-top: 12px; }
.floor-evidence{ align-self: center; min-width: 0; }
.floor-target{ border-color: var(--accent); text-align: left; font-weight: 700; }
.floor-quote{ display: block; margin-top: 8px; min-height: 42px; font-family: var(--font-mono); font-size: .875rem; color: var(--ink); }
.floor-legend, .floor-stamp{ margin: 8px 0 0; font-family: var(--font-mono); font-size: .875rem; color: var(--ink-soft); }
.floor-facts{ padding-bottom: 12px; }
.floor-facts .stat-row{ margin: 0; padding: 0; }
@media (max-width: 767px){
  .floor-stage{ width: calc(100% - 32px); height: clamp(280px, 40vh, 400px); }
  .floor-edge{ grid-template-columns: 1fr; gap: 16px; margin-top: 0; padding-top: 48px; width: 100%; background: linear-gradient(to bottom, transparent 0%, #F1F5EC 40%); }
  .floor-copy{ display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
  .floor-copy h1{ max-width: 18ch; font-size: 2.25rem; }
  .floor-tile:not(.is-prominent):not([aria-pressed="true"]):not(:focus-visible) span{ position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); padding: 0; border: 0; }
  .floor-toolbar{ gap: 8px; }
}

/* Wallet stays inside the existing 40px chrome; the closed panel has no footprint. */
.wallet-bar{ grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) 132px; }
.wallet-bar .mkt-bar-status{ min-width: 0; }
.wallet-bar [data-mkt-status]{ overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wallet-toggle, .wallet-panel button{
  color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 4px;
  font: 14px/1.4 var(--font-body); padding: 8px 12px; cursor: pointer;
  text-transform: none; letter-spacing: normal;
}
.wallet-toggle{ width: 132px; min-height: 32px; padding: 4px 8px; }
.wallet-toggle:hover, .wallet-panel button:hover{ border-color: var(--accent); background: var(--pale-green); }
.wallet-toggle:disabled, .wallet-panel button:disabled{ color: var(--ink-soft); cursor: default; background: var(--paper); }
.wallet-panel{
  position: fixed; inset: auto 16px 16px auto; margin: 0; width: 352px; max-width: calc(100vw - 32px);
  max-height: calc(100dvh - 64px); padding: 16px; overflow-y: auto; overscroll-behavior: contain;
  color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 4px;
  font: 14px/1.5 var(--font-body);
}
.wallet-panel::backdrop{ background: transparent; }
.wallet-panel [hidden]{ display: none; }
.wallet-head{ display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.wallet-panel p{ margin: 12px 0; overflow-wrap: anywhere; }
.wallet-panel p:empty, .wallet-panel output:empty{ display: none; }
.wallet-list{ display: grid; gap: 8px; margin-top: 12px; }
.wallet-list button{ display: flex; align-items: center; gap: 8px; text-align: left; overflow-wrap: anywhere; min-width: 0; }
.wallet-list img{ flex: 0 0 24px; object-fit: contain; border-radius: 4px; }
.wallet-list span{ min-width: 0; }
.wallet-panel button{ min-height: 44px; }
.wallet-actions{ display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.wallet-numeric{ font-family: var(--font-mono); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.wallet-panel output{ display: block; }
.wallet-status{ color: var(--ink-soft); }
.wallet-toggle:focus-visible, .wallet-panel button:focus-visible{ outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 768px){
  .wallet-bar{ grid-template-columns: minmax(0, 1fr) auto 132px; gap: 8px; padding: 0 16px; }
  .wallet-bar .mkt-bar-ago{ display: none; }
  .wallet-panel{ inset: auto 0 0; width: 100%; max-width: 100%; max-height: 75dvh; border-radius: 4px 4px 0 0; padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
}
@media (max-width: 640px){
  .wallet-bar{ grid-template-columns: minmax(0, 1fr) 132px; }
  .wallet-bar .mkt-bar-quote{ display: none; }
}
