/* The Flora skin over every inner page, so the market reads as the same night as the first page:
   warm black, one gold for what you can press, white dialled down by opacity, glass with a hairline,
   Chakra Petch in tracked caps for what labels and names, Onest for what speaks. Loaded after home.css
   and pages.css; it only re-dresses, the layouts stay theirs. Flora has one theme, so the day theme is folded in. */
:root,
:root[data-theme="light"],
:root[data-theme="dark"] {
  --bg: #0b0906;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-2: rgba(255, 255, 255, 0.08);
  --ink: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.62);
  --accent: #e6c27a;
  --accent-ink: #120c04;
  --accent-hover: #f0d498;
  --accent-text: #e6c27a;
  --ember: #c98a2a;
  --stone: rgba(255, 255, 255, 0.4);
  --sage: #8f8a6e;
  --seg-on: rgba(230, 194, 122, 0.22);
  --scrim: 11, 9, 6;
  --day: 0;
  --hair: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  --hair-strong: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  --glass-blur: 18px;
  --display: "Chakra Petch", "Onest", system-ui, sans-serif;
  --text: "Onest", system-ui, sans-serif;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #0b0906; --surface: rgba(255, 255, 255, 0.045); --surface-2: rgba(255, 255, 255, 0.08);
    --ink: rgba(255, 255, 255, 0.92); --muted: rgba(255, 255, 255, 0.62);
    --accent: #e6c27a; --accent-ink: #120c04; --accent-hover: #f0d498; --accent-text: #e6c27a;
    --ember: #c98a2a; --seg-on: rgba(230, 194, 122, 0.22); --scrim: 11, 9, 6; --day: 0;
    color-scheme: dark;
  }
}

/* the night the flower stands in: a low ember glow under the bar, fixed while the page scrolls */
body {
  font-family: var(--text);
  font-size: var(--step-small);
  background:
    radial-gradient(ellipse 70% 42% at 72% -8%, rgba(201, 138, 42, 0.16), rgba(201, 138, 42, 0) 70%),
    radial-gradient(ellipse 50% 30% at 10% 0%, rgba(77, 51, 17, 0.35), rgba(77, 51, 17, 0) 70%),
    var(--bg);
  background-attachment: fixed;
}
::selection { background: var(--accent); color: var(--accent-ink); }

/* the display face: tracked caps, as Flora sets every name and label */
h1, h2, h3, .mark, .btn, .tag-name,
.fact-n, .rule-n, .cats a, .mono, .card-name, .btn-ghost, button.btn, .sell-form legend, .copy, .sum-v, .deal-id {
  font-family: var(--display);
}
h1, h2, h3, .btn, .btn-ghost, button.btn, .cats a, .copy, .sell-form legend {
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-weight: 500;
}
h1 { line-height: 0.98; letter-spacing: -0.01em; }
h2 { line-height: 1.02; }
.lead, p { font-family: var(--text); }

/* actions: gold plates, square corners, and the ghost as glass */
.btn { border-radius: 2px; font-size: 13px; letter-spacing: 0.08em; }
.btn-ghost, .copy { background: rgba(255, 255, 255, 0.05); box-shadow: var(--hair); border-radius: 2px; font-size: 12px; letter-spacing: 0.08em; }
.btn-ghost:hover, .copy:hover { box-shadow: var(--hair-strong); color: var(--accent-text); }
.cats a { background: rgba(255, 255, 255, 0.04); box-shadow: var(--hair); border-radius: 2px; font-size: 12px; letter-spacing: 0.08em; color: var(--muted); }
.cats a:hover, .cats a[aria-current="page"] { color: var(--accent-ink); background: var(--accent); box-shadow: none; }

/* every raised surface is glass with a hairline, never a filled block */
.card, .snip, .cx-item, .sum, .bond, .deal, .row, .door, .step, .step-card, .acc-gate, .hire, .sell-form fieldset, pre, .call {
  box-shadow: var(--hair);
  border-radius: 4px;
}
.mono { background: rgba(230, 194, 122, 0.08); box-shadow: inset 0 0 0 1px rgba(230, 194, 122, 0.3); border-radius: 2px; color: var(--accent-text); letter-spacing: 0.04em; }
pre, code, .call { font-family: "Chakra Petch", ui-monospace, monospace; }
input, select, textarea { font-family: var(--text); background: rgba(255, 255, 255, 0.04); color: var(--ink); box-shadow: var(--hair); border-radius: 2px; }
input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible, button:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; }

/* the foot: tracked small caps, like the closing frame's legal line */
.foot { font-family: var(--display); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

/* the Connect AI head: the living synapse beside the words */
.cx-head { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; }
.synapse { position: relative; aspect-ratio: 4 / 5; max-height: 72svh; width: 100%; border-radius: 4px; overflow: hidden; box-shadow: var(--hair); background: #000; }
.synapse canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
@media (max-width: 860px) {
  .cx-head { grid-template-columns: minmax(0, 1fr); }
  .synapse { aspect-ratio: 1 / 1; max-height: 60svh; }
}

/* ── The top bar: the first page's header, measured off it at 1440 so the two are one ───────────── */
.hn { position: relative; z-index: 50; display: flex; justify-content: center; padding: 16px clamp(20px, 2.8vw, 40px) 0; margin-bottom: 8px; }
.hn-over { position: absolute; top: 0; left: 0; right: 0; }
.hn-row { display: flex; width: 100%; max-width: 1360px; align-items: center; justify-content: space-between; gap: 16px; }
.hn-left { display: flex; flex: 1 1 auto; max-width: 918px; align-items: center; justify-content: space-between; gap: 24px; }
.hn-logo, .hn-nav, .hn-connect, .hn-x, .hn-menu {
  height: 49px; border-radius: 4px; border: 0;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.hn-logo { background: rgba(255, 255, 255, 0.06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1); display: flex; align-items: center; gap: 10px; padding: 7px 16px 7px 6px; text-decoration: none; overflow: clip; }
.hn-tile { background: var(--accent); border-radius: 2px; position: relative; width: 34px; height: 34px; flex: none; overflow: clip; }
.hn-glyph { position: absolute; top: 5px; left: 5px; width: 24px; height: 24px; }
.hn-glyph g { transform-origin: center; transition: rotate 250ms cubic-bezier(0.2, 0.7, 0.1, 1); }
.hn-logo:hover .hn-glyph g { rotate: 45deg; }
.hn-wordmark { font: 500 15px/18px var(--display); letter-spacing: 1.2px; text-transform: uppercase; color: #fff; }
.hn-nav { background: rgba(255, 255, 255, 0.05); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1); position: relative; display: flex; align-items: center; gap: 32px; padding: 0 24px; overflow: clip; }
.hn-bar { background: var(--accent); position: absolute; top: 1px; bottom: 1px; width: 3px; }
.hn-bar--left { left: 0; border-radius: 4px 0 0 4px; }
.hn-bar--right { right: 0; border-radius: 0 4px 4px 0; }
/* a link fills with gold from the left under the hand, as on the first page */
.hn-link {
  font: 400 14px/15.4px var(--display); letter-spacing: 1.12px; text-transform: uppercase; text-decoration: none; white-space: nowrap;
  color: transparent; background: linear-gradient(90deg, var(--accent) 50%, rgba(255, 255, 255, 0.8) 50%) 100% 0 / 200% 100% no-repeat;
  -webkit-background-clip: text; background-clip: text; transition: background-position 420ms cubic-bezier(0.2, 0.7, 0.1, 1);
}
.hn-link:hover, .hn-link[aria-current="page"] { background-position: 0 0; }
.hn-tail { display: flex; align-items: center; gap: 7px; }
.hn-x { width: 49px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12); color: rgba(255, 255, 255, 0.8); transition: color 150ms; }
.hn-x:hover { color: var(--accent); }
.hn-connect { background: rgba(255, 255, 255, 0.06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12); position: relative; display: flex; align-items: center; gap: 12px; padding: 0 20px; cursor: pointer; color: #fff; }
.hn-connect-label { font: 400 14px/15.4px var(--display); letter-spacing: 1.12px; text-transform: uppercase; color: rgba(255, 255, 255, 0.92); white-space: nowrap; }
.hn-connect .cc { background: var(--accent); border-radius: 2px; font: 500 11px/12.1px var(--display); letter-spacing: 0.66px; color: var(--accent-ink); padding: 4px 8px; white-space: nowrap; transition: background-color 250ms, color 250ms, box-shadow 250ms; }
.hn-connect:hover .cc { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.hn-menu { display: none; width: 49px; position: relative; background: rgba(255, 255, 255, 0.06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12); cursor: pointer; padding: 0; }
.hn-menu-bar { position: absolute; left: 15px; width: 18px; height: 2px; background: rgba(255, 255, 255, 0.8); transition: background-color 150ms, transform 250ms, top 250ms; }
.hn-menu-bar:first-child { top: 19px; } .hn-menu-bar:last-child { top: 27px; }
.hn-menu:hover .hn-menu-bar { background: var(--accent); }
.nm-open .hn-menu-bar:first-child { top: 23px; transform: rotate(45deg); }
.nm-open .hn-menu-bar:last-child { top: 23px; transform: rotate(-45deg); }
@media (max-width: 1100px) { .hn-nav { gap: 20px; padding: 0 18px; } .hn-link { font-size: 13px; letter-spacing: 0.9px; } }
@media (max-width: 887px) { .hn-nav { display: none; } .hn-menu { display: block; } }
@media (max-width: 600px) { .hn-connect { display: none; } .hn { padding-top: 12px; } }

/* the narrow menu: black glass over the page, numbered links set large */
.nm { position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, 0.95); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); padding: 110px var(--m) 32px; display: flex; flex-direction: column; justify-content: space-between; overflow-y: auto; }
.nm[hidden] { display: none; }
.nm-open body { overflow: hidden; }
.nm-nav { display: flex; flex-direction: column; }
.nm-link { display: flex; align-items: baseline; gap: 18px; padding: 22px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.14); text-decoration: none; }
.nm-link:first-child { border-top: 1px solid rgba(255, 255, 255, 0.14); }
.nm-index { font: 400 12px/1 var(--display); letter-spacing: 1px; color: var(--accent); width: 22px; flex: none; transition: translate 150ms; }
.nm-link:hover .nm-index { translate: 4px 0; }
.nm-label { font: 400 clamp(1.75rem, 1rem + 4vw, 2.75rem)/1 var(--display); text-transform: uppercase; color: #fff; }
.nm-link[aria-current="page"] .nm-label { color: var(--accent); }
.nm-foot { display: flex; flex-direction: column; gap: 20px; padding-top: 32px; }
.nm-foot .btn { width: 100%; justify-content: center; }
.nm-x { align-self: center; font: 400 13px/1 var(--display); letter-spacing: 1px; text-transform: uppercase; color: rgba(255, 255, 255, 0.62); text-decoration: none; }
