/* Tokens: identical to the portfolio (styles.css). Only the accent changes: yellow instead of cyan. */
:root {
  --bg: #fafaf8;
  --surface: #f1f1ec;
  --surface-2: #e9e9e3;
  --ink: #191917;
  --muted: #54544e;
  --faint: #73736b;
  --line: #1919171a;
  --line-strong: #19191738;
  --accent: #a16207;        /* yellow, darkened so text passes contrast on the light page */
  --accent-fill: #facc15;   /* yellow for fills: buttons, bars, the live dot */
  --on-accent: #191917;
  --ok: #047857;
  --font-sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --font-hand: "Caveat", "Comic Sans MS", cursive;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  color-scheme: light;
}
.dark {
  --bg: #0a0a0a;
  --surface: #141413;
  --surface-2: #1d1d1b;
  --ink: #f4f4f2;
  --muted: #a7a7a0;
  --faint: #7c7c75;
  --line: #f4f4f217;
  --line-strong: #f4f4f238;
  --accent: #facc15;
  --accent-fill: #facc15;
  --on-accent: #0a0a0a;
  --ok: #34d399;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  min-height: 100vh; min-height: 100dvh;
  background: var(--bg); color: var(--ink);
  font-family: var(--font-sans); font-size: 1rem; line-height: 1.5;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  transition: background-color .35s, color .35s;
}
::selection { background: var(--accent-fill); color: var(--on-accent); }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
ul, ol { list-style: none; padding: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.mono { font-family: var(--font-mono); }
.tabular { font-variant-numeric: tabular-nums; }

/* Faint dot grid and a warm glow behind the top of the page */
.sky { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.orb { position: absolute; border-radius: 50%; filter: blur(90px); }
.o1 { width: 520px; height: 420px; background: var(--accent-fill); opacity: .07; top: -260px; left: 50%; margin-left: -260px; }
.o2 { display: none; }
.sky::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(var(--line-strong) 1px, transparent 1px); background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 60% 45% at 50% 0%, #000 10%, transparent 75%);
  mask-image: radial-gradient(ellipse 60% 45% at 50% 0%, #000 10%, transparent 75%);
}

.wrap {
  max-width: 30rem; margin: 0 auto; padding: max(44px, env(safe-area-inset-top)) 1.25rem 2.5rem;
  min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; justify-content: center;
}

/* Theme toggle, top right */
.theme {
  position: fixed; top: 1rem; right: 1rem; z-index: 5; width: 2.25rem; height: 2.25rem; border-radius: 999px;
  border: 1px solid var(--line); background: color-mix(in oklab, var(--surface) 70%, transparent);
  display: grid; place-items: center; color: var(--muted);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: border-color .15s, color .15s, transform .3s var(--ease);
}
.theme:hover { border-color: var(--line-strong); color: var(--ink); }
.theme:active { transform: scale(.94); }
.theme svg { width: 1rem; height: 1rem; }
.theme .sun { display: none; }
.dark .theme .sun { display: block; }
.dark .theme .moon { display: none; }

/* ---------- Header ---------- */
.top { display: flex; align-items: center; gap: 1.1rem; }
.avatar { width: 72px; height: 72px; flex: none; border-radius: 999px; object-fit: cover; border: 1px solid var(--line-strong); box-shadow: 0 0 0 4px var(--bg), 0 0 0 5px var(--line); }
h1 { font-weight: 500; font-size: 1.6rem; letter-spacing: -.02em; line-height: 1.15; }
.sq { display: inline-block; width: 6px; height: 6px; border-radius: 1px; background: var(--accent-fill); margin-left: 3px; }
.lede { margin-top: .4rem; font-size: .95rem; color: var(--muted); line-height: 1.55; }

/* ---------- Market card ---------- */
.market {
  margin-top: 2rem; padding: 1.15rem 1.25rem 1.2rem; border-radius: 1rem;
  border: 1px solid var(--line); background: color-mix(in oklab, var(--surface) 50%, transparent);
}
.market-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.state { display: flex; align-items: center; gap: .6rem; font-weight: 500; font-size: .95rem; letter-spacing: -.01em; }
.next { margin: .25rem 0 0 1.1rem; font-size: .8rem; color: var(--muted); }
.clock { text-align: right; font-size: 1.1rem; font-weight: 500; line-height: 1; }
.clock small { display: block; margin-top: 5px; font-size: .6rem; letter-spacing: .2em; text-transform: uppercase; color: var(--faint); }
.pip { width: .5rem; height: .5rem; border-radius: 999px; background: var(--faint); flex: none; position: relative; }
.pip.on { background: var(--accent-fill); }
.pip.on::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--accent-fill); animation: ping 1.8s var(--ease) infinite; }
@keyframes ping { from { transform: scale(1); opacity: .7; } to { transform: scale(2.6); opacity: 0; } }

.timeline { --label: 64px; position: relative; margin-top: 1rem; padding-top: .9rem; border-top: 1px solid var(--line); }
.sessions { display: grid; gap: 7px; }
.sessions li { display: flex; align-items: center; gap: 10px; }
.sessions li span { flex: none; width: calc(var(--label) - 10px); font: 500 .62rem/1 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.track { position: relative; flex: 1; height: 7px; border-radius: 7px; background: var(--surface-2); }
.track b { position: absolute; top: 0; bottom: 0; border-radius: 7px; background: var(--line-strong); }
.sessions li.open span { color: var(--ink); }
.sessions li.open .track b { background: var(--accent-fill); box-shadow: 0 0 10px color-mix(in oklab, var(--accent-fill) 45%, transparent); }
.axis { display: flex; justify-content: space-between; margin: 8px 0 0 var(--label); font-size: .56rem; color: var(--faint); }
.now {
  position: absolute; top: 8px; bottom: 18px; width: 0; pointer-events: none;
  left: calc(var(--label) + (100% - var(--label)) * var(--at-n, 0));
  border-left: 1.5px solid var(--ink);
}
.now::before { content: ""; position: absolute; top: -3px; left: -4.5px; width: 7.5px; height: 7.5px; border-radius: 50%; background: var(--ink); }

/* ---------- Cards (portfolio card pattern) ---------- */
.links { display: grid; gap: .85rem; margin-top: 1rem; }
.row {
  --x: 50%; --y: 50%; --glow: 0;
  position: relative; display: flex; align-items: center; gap: 1.1rem; width: 100%;
  padding: 1.15rem 1.15rem 1.15rem 1rem; border-radius: 1rem; text-align: left;
  border: 1px solid var(--line); background: color-mix(in oklab, var(--surface) 50%, transparent);
  transition: transform .3s var(--ease), border-color .3s var(--ease);
  isolation: isolate;
}
.row::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1;
  background: radial-gradient(340px circle at var(--x) var(--y), color-mix(in oklab, var(--accent-fill) 12%, transparent), transparent 70%);
  opacity: var(--glow); transition: opacity .4s;
}
@media (hover: hover) {
  .row:hover { border-color: var(--line-strong); transform: translateY(-3px); }
  .row:hover .plus { background: var(--accent-fill); border-color: var(--accent-fill); transform: rotate(90deg); }
  .row:hover .plus::before, .row:hover .plus::after { background: var(--on-accent); }
}
.row:active, .row.pressed { transform: scale(.985); transition-duration: .12s; }

.tile {
  flex: none; width: 58px; height: 58px; border-radius: .8rem; position: relative; overflow: hidden;
  display: grid; place-content: center; text-align: center;
  background: var(--surface-2); border: 1px solid var(--line);
}
.tile b { font-weight: 600; font-size: 1.05rem; letter-spacing: -.02em; line-height: 1; }
.tile small { display: block; margin-top: 4px; font-family: var(--font-mono); font-size: .52rem; letter-spacing: .18em; text-transform: uppercase; color: var(--faint); }
.t-black b { font-family: var(--font-mono); font-weight: 500; font-size: .9rem; letter-spacing: 0; color: var(--accent); }
.t-slate canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.t-cyan svg { width: 58px; height: 30px; display: block; }
.pulse-ghost { fill: none; stroke: var(--faint); stroke-opacity: .45; stroke-width: 1.3; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.pulse { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; stroke-dasharray: 34 200; animation: sweep 2.4s linear infinite; }
@keyframes sweep { from { stroke-dashoffset: 34; } to { stroke-dashoffset: -90; } }
.rec { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--accent-fill); margin-right: 4px; vertical-align: 1px; animation: blink 1.4s steps(2) infinite; }
@keyframes blink { 50% { opacity: .15; } }

.text { min-width: 0; flex: 1; display: grid; gap: .3rem; }
.text strong { font-weight: 500; font-size: 1.1rem; letter-spacing: -.01em; line-height: 1.3; }
.text > span { font-size: .875rem; color: var(--muted); line-height: 1.55; }

.plus { flex: none; position: relative; width: 2rem; height: 2rem; border-radius: 999px; border: 1px solid var(--line-strong); transition: background .3s, border-color .3s, transform .45s var(--ease); }
.plus::before, .plus::after { content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 1.5px; margin: -.75px 0 0 -5px; background: var(--ink); border-radius: 2px; transition: background .3s; }
.plus::after { transform: rotate(90deg); }

/* ---------- Footer ---------- */
.foot { margin-top: 2rem; text-align: center; }
.socials { display: flex; justify-content: center; flex-wrap: wrap; gap: .5rem; }
.socials a {
  display: inline-block; padding: .5rem 1rem; border-radius: 999px; font-size: .875rem; font-weight: 500;
  border: 1px solid var(--line); color: var(--muted); transition: border-color .15s, color .15s, transform .3s var(--ease);
}
.socials a:hover { border-color: var(--line-strong); color: var(--ink); }
.socials a.primary { background: var(--accent-fill); border-color: var(--accent-fill); color: var(--on-accent); }
.socials a.primary:hover { transform: scale(1.03); }
.meta { margin-top: 1.25rem; font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.risk { margin: .6rem auto 0; max-width: 22rem; font-size: .7rem; line-height: 1.55; color: var(--faint); }

/* ---------- Sheet (portfolio dialog pattern) ---------- */
.sheet {
  width: min(32rem, calc(100% - 24px)); max-height: calc(100dvh - 32px); margin: auto;
  padding: 0; border: 0; border-radius: 1rem; background: transparent; overflow: visible; color: var(--ink);
}
.sheet::backdrop { background: color-mix(in oklab, var(--bg) 70%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.sheet[open]::backdrop { animation: fade .22s ease-out; }
@keyframes fade { from { opacity: 0; } }
.sheet-inner {
  position: relative; max-height: calc(100dvh - 32px); overflow: auto; border-radius: 1rem;
  background: var(--surface); border: 1px solid var(--line-strong);
  box-shadow: 0 40px 80px -30px #000000b3; padding: 0 0 1.5rem;
}
.close {
  position: absolute; top: 1.1rem; right: 1.1rem; z-index: 2; width: 2rem; height: 2rem; border-radius: 999px;
  border: 1px solid var(--line); font-size: 1.15rem; line-height: 1; color: var(--muted); background: var(--surface);
  transition: border-color .15s, color .15s;
}
.close:hover { border-color: var(--line-strong); color: var(--ink); }
.hero { padding: 1.5rem 1.5rem 1.25rem; border-bottom: 1px solid var(--line); }
.eyebrow { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.hero h2 { margin-top: .5rem; padding-right: 2.25rem; font-weight: 500; font-size: 1.5rem; letter-spacing: -.02em; line-height: 1.2; text-wrap: balance; }

.speed { margin-top: 1.1rem; padding: .9rem 1rem; border-radius: .75rem; background: var(--surface-2); border: 1px solid var(--line); }
.speed-label { font-size: .62rem; letter-spacing: .2em; text-transform: uppercase; color: var(--faint); }
.speed p:last-child { margin-top: .35rem; font-size: .95rem; line-height: 1.55; color: var(--muted); }
.speed b { color: var(--accent); font-family: var(--font-mono); font-weight: 500; }
.shot { margin: 1.1rem 0 0; border-radius: .75rem; overflow: hidden; border: 1px solid var(--line-strong); background: #0a0a0a; }
.shot img { display: block; width: 100%; height: auto; }
.pulse-wrap { margin-top: 1.1rem; border-radius: .75rem; background: var(--surface-2); border: 1px solid var(--line); padding: 10px 0 8px; }
.pulse-wrap svg { width: 100%; height: 56px; display: block; }
.pulse.big { stroke-dasharray: 90 1000; animation: sweep-big 3s linear infinite; }
@keyframes sweep-big { from { stroke-dashoffset: 90; } to { stroke-dashoffset: -540; } }
.scan { padding: 4px 14px 0; font-size: .72rem; color: var(--faint); }
.scan b { font-weight: 500; color: var(--ink); transition: opacity .2s; }

.body { padding: 1.25rem 1.5rem 0; }
.intro { font-size: 1rem; line-height: 1.7; color: var(--muted); }
.points { margin-top: 1.25rem; border-top: 1px solid var(--line); }
.points li { position: relative; padding: 1rem 0 1rem 1.4rem; border-bottom: 1px solid var(--line); font-size: .9rem; line-height: 1.65; color: var(--muted); }
.points li::before { content: "↳"; position: absolute; left: 0; top: 1rem; color: var(--accent); font-size: .9rem; }
.points strong { color: var(--ink); font-weight: 500; }
.options { margin-top: 1.25rem; display: grid; gap: .6rem; }
.options div { position: relative; padding: 1rem 1rem 1rem 2.6rem; border-radius: .75rem; background: var(--surface-2); border: 1px solid var(--line); }
.options span { position: absolute; left: 1rem; top: 1.05rem; font-size: .75rem; color: var(--accent); }
.options strong { font-weight: 500; font-size: 1rem; }
.options p { font-size: .875rem; color: var(--muted); margin-top: .2rem; line-height: 1.6; }

.actions { margin-top: 1.5rem; padding: 0 1.5rem; display: flex; flex-wrap: wrap; gap: .75rem; }
.btn { display: inline-flex; justify-content: center; align-items: center; gap: .5rem; flex: 1 1 auto; border-radius: 999px; padding: .75rem 1.25rem; font-size: .9rem; font-weight: 500; }
.btn-dark { background: var(--accent-fill); color: var(--on-accent); transition: transform .3s var(--ease); }
.btn-dark:hover { transform: scale(1.03); }
.btn-dark:active { transform: scale(.98); }
.btn-light { border: 1px solid var(--line); color: var(--muted); transition: border-color .15s, color .15s; }
.btn-light:hover { border-color: var(--line-strong); color: var(--ink); }

@media (max-width: 520px) {
  .sheet { width: 100%; max-width: none; margin: auto 0 0; border-radius: 1.25rem 1.25rem 0 0; max-height: 92dvh; }
  .sheet-inner { border-radius: 1.25rem 1.25rem 0 0; max-height: 92dvh; padding-bottom: max(1.25rem, env(safe-area-inset-bottom)); }
}

/* ---------- Entrance ---------- */
.rise { animation: rise .7s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 60ms); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); filter: blur(4px); } }

@media (prefers-reduced-motion: reduce) {
  .rise, .pulse, .pip.on::after, .rec { animation: none; }
  .pulse { stroke-dasharray: none; }
}

.intro + .intro { margin-top: .9rem; }
.intro strong { color: inherit; font-weight: 700; }

/* Entrance stagger (set here, not inline, so the CSP can block inline styles) */
[data-i="1"] { --i: 1; }
[data-i="2"] { --i: 2; }
[data-i="3"] { --i: 3; }
[data-i="4"] { --i: 4; }
[data-i="5"] { --i: 5; }
[data-i="6"] { --i: 6; }
