/* ogs.fun site styles. One stylesheet for every page. */

:root {
  --bg: #0b0906;
  --bg1: #110e0a;
  --bg2: #17130d;
  --bg3: #1f1a12;
  --line: rgba(243, 234, 214, 0.09);
  --line2: rgba(243, 234, 214, 0.17);
  --ink: #f3ead6;
  --ink2: #cbbfa5;
  --mute: #988e79;
  --gold: #e8b64a;
  --gold-hi: #f7d57f;
  --gold-lo: #b88a2e;
  --gold-ink: #1a1305;
  --gold-soft: rgba(232, 182, 74, 0.14);
  --pos: #86c99d;
  --neg: #ea9a8b;
  --amber: #e58a3a;
  --serif: 'Instrument Serif', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --sans: 'Geist', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  --gut: clamp(16px, 4vw, 40px);
  --r: 14px;
}

*, *::before, *::after { box-sizing: border-box; }

/* The font shorthand resets numeric variants, so tabular figures are forced for every element. */
*, *::before, *::after {
  font-variant-numeric: tabular-nums !important;
  font-feature-settings: 'tnum' 1 !important;
}

html {
  color-scheme: dark;
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  isolation: isolate;
  font: 400 16px/1.55 var(--sans);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Layered ground: warm glow, fine grid, grain. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(1100px 620px at 82% -12%, rgba(232, 182, 74, 0.13), transparent 62%),
    radial-gradient(800px 520px at -8% 6%, rgba(232, 182, 74, 0.06), transparent 60%),
    linear-gradient(180deg, #0d0a07 0%, #0a0805 100%);
  pointer-events: none;
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.9;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .95 0 0 0 0 .9 0 0 0 0 .8 0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.07'/%3E%3C/svg%3E"),
    linear-gradient(90deg, rgba(243, 234, 214, 0.028) 1px, transparent 1px),
    linear-gradient(0deg, rgba(243, 234, 214, 0.028) 1px, transparent 1px);
  background-size: 160px 160px, 72px 72px, 72px 72px;
  -webkit-mask-image: linear-gradient(180deg, #000 0, #000 55%, rgba(0, 0, 0, 0.45) 100%);
  mask-image: linear-gradient(180deg, #000 0, #000 55%, rgba(0, 0, 0, 0.45) 100%);
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
code { font-family: var(--mono); }
::selection { background: rgba(232, 182, 74, 0.35); color: #fff; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 6px;
}

.sr {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: fixed;
  left: 12px; top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--gold);
  color: var(--gold-ink);
  border-radius: 8px;
  font-weight: 600;
  transition: top 0.2s var(--ease);
}
.skip:focus { top: 12px; }

.wrap {
  width: min(100% - 2 * var(--gut), 1240px);
  margin-inline: auto;
}

main { flex: 1 0 auto; }

/* ---------- icons ---------- */
.ic {
  width: 1em; height: 1em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- typography helpers ---------- */
.eyebrow {
  font: 500 12px/1.2 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}
.label {
  font: 500 12px/1.2 var(--mono);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--mute);
}
.num, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; font-feature-settings: 'tnum' 1; }
.num { letter-spacing: -0.01em; white-space: nowrap; border-radius: 4px; }
.muted { color: var(--mute); }
.ink2 { color: var(--ink2); }
.gold { color: var(--gold); }
.pos { color: var(--pos); }
.neg { color: var(--neg); }
.r { text-align: right; }
.nowrap { white-space: nowrap; }

.num.flash-up { animation: flash-up 1.1s var(--ease) 1; }
.num.flash-down { animation: flash-down 1.1s var(--ease) 1; }
@keyframes flash-up { from { background: rgba(232, 182, 74, 0.28); } to { background: transparent; } }
@keyframes flash-down { from { background: rgba(243, 234, 214, 0.16); } to { background: transparent; } }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 9, 6, 0.86);
  -webkit-backdrop-filter: blur(12px) saturate(120%);
  backdrop-filter: blur(12px) saturate(120%);
  border-bottom: 1px solid var(--line);
}
.bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  min-height: 68px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; }
.brand .word {
  font: 400 30px/1 var(--serif);
  letter-spacing: 0.01em;
  color: var(--ink);
}
.brand .word i { font-style: normal; color: var(--gold); }

.mark {
  position: relative;
  display: block;
  flex: none;
  width: 36px; height: 36px;
}
.mark img { width: 100%; height: 100%; }
.mark .sweep {
  position: absolute;
  inset: 0;
  -webkit-mask: url(/assets/mark.svg) center / contain no-repeat;
  mask: url(/assets/mark.svg) center / contain no-repeat;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 248, 224, 0.95) 50%, transparent 62%);
  background-size: 320% 100%;
  background-position: 100% 0;
  animation: sweep 7s var(--ease-io) 1.2s infinite;
  pointer-events: none;
}
@keyframes sweep {
  0% { background-position: 100% 0; }
  45%, 100% { background-position: 0% 0; }
}

.nav { display: flex; justify-content: center; gap: 4px; }
.nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  font: 500 15px/1 var(--sans);
  color: var(--ink2);
  transition: color 0.2s var(--ease);
}
.nav a::after {
  content: '';
  position: absolute;
  left: 16px; right: 16px; bottom: 6px;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after { transform: scaleX(0.4); }
.nav a[aria-current='page'] { color: var(--ink); }
.nav a[aria-current='page']::after { transform: scaleX(1); }

.hdr-end { display: flex; align-items: center; gap: 16px; }

/* copy buttons: label and flag share one grid cell so the width never jumps */
.copy {
  position: relative;
  display: inline-grid;
  align-items: center;
  justify-items: center;
}
.copy > .lbl, .copy > .flag { grid-area: 1 / 1; display: inline-flex; align-items: center; gap: 8px; transition: opacity 0.2s var(--ease), transform 0.25s var(--ease); }
.copy > .flag { opacity: 0; transform: translateY(6px); color: var(--gold); font-weight: 600; pointer-events: none; }
.copy.copied > .lbl { opacity: 0; transform: translateY(-6px); }
.copy.copied > .flag { opacity: 1; transform: none; }

.ca-pill {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line2);
  border-radius: 999px;
  background: rgba(243, 234, 214, 0.04);
  font: 500 13px/1 var(--mono);
  color: var(--ink2);
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease);
}
.ca-pill:hover { border-color: rgba(232, 182, 74, 0.6); color: var(--ink); background: var(--gold-soft); }
.ca-pill .ic { font-size: 14px; color: var(--gold); }

.live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 156px;
  font: 500 12px/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink2);
}
.live i {
  position: relative;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--mute);
  flex: none;
  transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.live[data-live='sse'] i { background: var(--gold); box-shadow: 0 0 0 0 rgba(232, 182, 74, 0.55); animation: pulse 2.4s var(--ease) infinite; }
.live[data-live='sse'] { color: var(--ink); }
.live[data-live='poll'] i { background: transparent; box-shadow: inset 0 0 0 2px var(--amber); }
.live[data-live='poll'] { color: var(--amber); }
.live[data-live='down'] i { background: var(--mute); }
.live[data-live='down'] { color: var(--mute); }
.live[data-live='init'] i { animation: blink 1.2s ease-in-out infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(232, 182, 74, 0.5); }
  70%, 100% { box-shadow: 0 0 0 8px rgba(232, 182, 74, 0); }
}
@keyframes blink { 50% { opacity: 0.3; } }

.net-banner {
  position: relative;
  z-index: 40;
  border-bottom: 1px solid var(--line);
  background: rgba(229, 138, 58, 0.1);
  color: var(--ink);
  font: 500 14px/1.4 var(--sans);
}
.net-banner .wrap { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.net-banner i { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); flex: none; animation: blink 1.2s ease-in-out infinite; }
.net-banner[hidden] { display: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid var(--line2);
  border-radius: 999px;
  font: 500 15px/1 var(--sans);
  color: var(--ink);
  background: rgba(243, 234, 214, 0.04);
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), color 0.25s var(--ease);
}
.btn:hover { transform: translateY(-1px); border-color: rgba(232, 182, 74, 0.6); background: var(--gold-soft); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn .ic { font-size: 16px; transition: transform 0.25s var(--ease); }
.btn:hover .ic.go { transform: translateX(3px); }
.btn-gold {
  background: linear-gradient(180deg, var(--gold-hi), var(--gold) 70%, #d6a23c);
  color: var(--gold-ink);
  border-color: transparent;
  font-weight: 600;
  box-shadow: 0 8px 28px -10px rgba(232, 182, 74, 0.55);
}
.btn-gold:hover { background: linear-gradient(180deg, #ffe39a, #f0bf55 70%, #dcaa44); border-color: transparent; box-shadow: 0 12px 34px -10px rgba(232, 182, 74, 0.7); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 14px; }

.link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--gold);
  border-bottom: 1px solid rgba(232, 182, 74, 0.35);
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.link:hover { border-color: var(--gold); color: var(--gold-hi); }
.link .ic { font-size: 13px; }

.tx {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  font: 500 13px/1 var(--mono);
  color: var(--ink2);
  transition: color 0.2s var(--ease);
}
.tx:hover { color: var(--gold); }
.tx .ic { font-size: 12px; }

/* ---------- hero ---------- */
.hero { --h1: clamp(68px, 11vw, 140px); position: relative; overflow-x: clip; padding-top: clamp(32px, 5vw, 64px); }
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.9fr);
  align-items: center;
  gap: clamp(24px, 5vw, 72px);
}
.hero h1 {
  margin-top: 20px;
  font: 400 var(--h1)/0.92 var(--serif);
  letter-spacing: -0.02em;
}
.hero h1 span { display: block; }
.hero h1 em { font-style: italic; color: var(--gold); padding-right: 0.06em; }
.lede {
  margin-top: 28px;
  max-width: 34em;
  font: 400 clamp(17px, 1.6vw, 20px)/1.5 var(--sans);
  color: var(--ink2);
  text-wrap: pretty;
}
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 32px; }

.ca-block {
  display: flex;
  align-items: stretch;
  max-width: 100%;
  border: 1px solid var(--line2);
  border-radius: 14px;
  background: rgba(243, 234, 214, 0.035);
  overflow: hidden;
}
.ca-block code {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  font: 500 14px/1.35 var(--mono);
  color: var(--ink);
  overflow-wrap: anywhere;
  word-break: break-all;
  user-select: all;
  min-width: 0;
}
.ca-block .copy {
  flex: none;
  min-width: 92px;
  padding: 0 16px;
  border-left: 1px solid var(--line2);
  background: rgba(232, 182, 74, 0.08);
  font: 500 14px/1 var(--sans);
  color: var(--gold);
  transition: background 0.2s var(--ease);
}
.ca-block .copy:hover { background: rgba(232, 182, 74, 0.18); }
.ca-block .copy .ic { font-size: 14px; }
.ca-block.big { width: fit-content; }
.ca-block.big code { font-size: clamp(14px, 2.2vw, 22px); padding: 18px 22px; }
.ca-block.big .copy { min-width: 112px; font-size: 15px; }

.hero-token { display: inline-flex; align-items: center; gap: 10px; margin-top: 16px; font: 400 14px/1.4 var(--sans); color: var(--mute); }
.tdot { width: 8px; height: 8px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 2px var(--mute); }
.tdot.on { background: var(--gold); box-shadow: 0 0 0 0 rgba(232, 182, 74, 0.5); animation: pulse 2.4s var(--ease) infinite; }

.hero-side { min-width: 0; }
.hero-mark {
  position: relative;
  justify-self: center;
  width: min(100%, 280px);
  aspect-ratio: 1;
}
.hero-mark::before {
  content: '';
  position: absolute;
  inset: -22%;
  background: radial-gradient(closest-side, rgba(232, 182, 74, 0.22), rgba(232, 182, 74, 0.06) 55%, transparent 72%);
  z-index: -1;
}
.hero-mark .mark { width: 100%; height: 100%; animation: float 9s ease-in-out infinite; }
.hero-mark .mark img { filter: drop-shadow(0 24px 50px rgba(232, 182, 74, 0.22)); }
@keyframes float { 50% { transform: translateY(-8px) rotate(-1.2deg); } }

@media (min-width: 961px) {
  .hero-side { display: grid; gap: clamp(22px, 2.4vw, 34px); justify-items: stretch; }
  .hero-actions { flex-direction: column; align-items: stretch; margin-top: 0; }
  .hero-actions .ca-block { width: 100%; }
  .hero-actions .ca-block code { flex: none; width: calc(23ch + 32px); font-size: 15px; align-items: center; }
  .hero-actions .ca-block .copy { flex: 1; }
  .hero-actions .btn { width: 100%; }
}

/* status strip */
.strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: clamp(32px, 4.5vw, 56px);
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: linear-gradient(180deg, rgba(243, 234, 214, 0.04), rgba(243, 234, 214, 0.015));
}
.strip > div { padding: 20px 22px; border-left: 1px solid var(--line); min-width: 0; }
.strip > div:first-child { border-left: 0; }
.strip .val { margin-top: 10px; font: 500 26px/1.1 var(--mono); letter-spacing: -0.02em; }
.strip .val small { font-size: 14px; font-weight: 400; color: var(--mute); letter-spacing: 0; margin-left: 6px; }
.strip .sub { margin-top: 8px; font: 400 14px/1.4 var(--sans); color: var(--mute); min-height: 20px; }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  padding: 0 14px 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(232, 182, 74, 0.45);
  background: var(--gold-soft);
  font: 500 15px/1 var(--sans);
  color: var(--gold-hi);
  margin-top: 6px;
}
.status-pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); flex: none; }
.status-pill[data-s='hunting'] i { animation: pulse 2.4s var(--ease) infinite; }
.status-pill[data-s='in_position'] { background: rgba(232, 182, 74, 0.24); color: #ffe7a8; }
.status-pill[data-s='paused'], .status-pill[data-s='waiting_launch'] { border-color: var(--line2); background: rgba(243, 234, 214, 0.05); color: var(--ink2); }
.status-pill[data-s='paused'] i, .status-pill[data-s='waiting_launch'] i { background: var(--mute); }
.status-pill[data-s='dry_run'], .status-pill[data-s='no_funds'], .status-pill[data-s='stream_down'] { border-color: rgba(229, 138, 58, 0.5); background: rgba(229, 138, 58, 0.1); color: #f2b27a; }
.status-pill[data-s='dry_run'] i, .status-pill[data-s='no_funds'] i, .status-pill[data-s='stream_down'] i { background: var(--amber); }

/* ---------- sections ---------- */
.sec { padding-top: clamp(56px, 7vw, 92px); }
.sec-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 24px;
  margin-bottom: 28px;
}
.sec-head h2 { margin-top: 12px; font: 400 clamp(36px, 4.6vw, 56px)/1 var(--serif); letter-spacing: -0.015em; }
.sec-head .meta { font: 400 14px/1.4 var(--sans); color: var(--mute); display: inline-flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.sec-note { max-width: 46em; margin: -8px 0 24px; color: var(--ink2); font-size: 16px; text-wrap: pretty; }

.panel {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: linear-gradient(180deg, rgba(243, 234, 214, 0.045), rgba(243, 234, 214, 0.015));
}

.js .reveal-on { opacity: 0; transform: translateY(20px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.js .reveal-on.in, .js.rv-all .reveal-on { opacity: 1; transform: none; }

.rise { opacity: 0; transform: translateY(16px); animation: rise 0.9s var(--ease) forwards; animation-delay: calc(var(--i, 0) * 80ms + 60ms); }
@keyframes rise { to { opacity: 1; transform: none; } }

.enter { animation: enter 0.6s var(--ease) both; animation-delay: calc(var(--d, 0) * 55ms); }
@keyframes enter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* skeletons */
.sk {
  display: inline-block;
  min-width: 4.5em;
  min-height: 1em;
  border-radius: 6px;
  color: transparent !important;
  background: linear-gradient(100deg, rgba(243, 234, 214, 0.05) 30%, rgba(243, 234, 214, 0.13) 50%, rgba(243, 234, 214, 0.05) 70%);
  background-size: 250% 100%;
  animation: shimmer 1.6s linear infinite;
  user-select: none;
}
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.sk-card { min-height: 280px; border: 1px solid var(--line); border-radius: var(--r); background: rgba(243, 234, 214, 0.03); position: relative; overflow: hidden; }
.sk-card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(243, 234, 214, 0.07) 50%, transparent 70%); background-size: 250% 100%; animation: shimmer 1.6s linear infinite; }
.sk-row { height: 64px; border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.sk-row::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(243, 234, 214, 0.06) 50%, transparent 70%); background-size: 250% 100%; animation: shimmer 1.6s linear infinite; }

.empty {
  padding: 36px 24px;
  border: 1px dashed var(--line2);
  border-radius: var(--r);
  color: var(--ink2);
  text-align: left;
  font-size: 16px;
  text-wrap: pretty;
}
.empty strong { color: var(--ink); font-weight: 500; }
.empty[hidden] { display: none; }

/* ---------- coin avatar ---------- */
.coin {
  position: relative;
  flex: none;
  width: 44px; height: 44px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg3);
  border: 1px solid var(--line);
}
.coin img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.coin b {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font: 600 16px/1 var(--mono);
  color: var(--gold);
}
.coin.has-img b { display: none; }
.coin.sm { width: 36px; height: 36px; border-radius: 10px; }

/* ---------- position cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: 16px; }
.hold { padding: 22px; display: flex; flex-direction: column; gap: 18px; transition: border-color 0.3s var(--ease), transform 0.3s var(--ease); }
.hold:hover { border-color: rgba(232, 182, 74, 0.35); transform: translateY(-2px); }
.pos-top { display: flex; align-items: center; gap: 14px; }
.pos-id { min-width: 0; flex: 1; }
.pos-id h3 { font: 500 18px/1.2 var(--sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pos-id p { margin-top: 4px; display: flex; align-items: baseline; gap: 4px 10px; font-size: 14px; color: var(--mute); min-width: 0; }
.pos-id .sym { flex: none; font: 500 13px var(--mono); color: var(--ink2); }
.pos-id .of { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pos-id .of b { font-weight: 500; color: var(--ink2); }
.pos-mult { text-align: right; flex: none; }
.pos-mult .num { display: block; font-size: 28px; line-height: 1; font-weight: 500; }
.pos-mult .label { display: block; margin-top: 6px; }

.pnl-line { display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; gap: 12px; padding: 14px 0; border-block: 1px solid var(--line); }
.pnl-line .val { white-space: nowrap; }
.pnl-line .num { font-size: 20px; font-weight: 500; }
.pnl-line .num.sub { font-size: 15px; justify-self: end; }

.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 20px; margin: 0; }
.kv div { min-width: 0; }
.kv dt { font: 500 12px/1.2 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--mute); }
.kv dd { margin: 6px 0 0; font: 500 16px/1.25 var(--mono); color: var(--ink); }

.track { padding-top: 40px; }
.track-bar { position: relative; height: 8px; border-radius: 8px; background: rgba(243, 234, 214, 0.08); }
.track-bar .fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 8px; background: linear-gradient(90deg, var(--gold-lo), var(--gold-hi)); transition: width 0.9s var(--ease); }
.track-bar .tick { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: rgba(243, 234, 214, 0.5); border-radius: 2px; }
.track-bar .cursor { position: absolute; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: var(--ink); border: 3px solid var(--gold); box-shadow: 0 0 0 4px rgba(232, 182, 74, 0.18); transition: left 0.9s var(--ease); }
.track-bar .bubble { position: absolute; bottom: 18px; transform: translateX(-50%); font: 500 12px/1 var(--mono); padding: 4px 7px; border-radius: 6px; background: var(--bg3); border: 1px solid var(--line2); color: var(--ink); transition: left 0.9s var(--ease); white-space: nowrap; }
.track-lbl { display: flex; justify-content: space-between; gap: 8px; margin-top: 12px; font: 500 12px/1.2 var(--mono); color: var(--mute); }

.pos-foot { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; padding-top: 4px; }
.clock .cd { display: block; margin-top: 6px; font: 500 22px/1 var(--mono); letter-spacing: -0.02em; }
.clock .why { display: block; margin-top: 6px; font-size: 13px; color: var(--mute); }
.left-bar { margin-top: 12px; height: 4px; border-radius: 4px; background: rgba(243, 234, 214, 0.08); overflow: hidden; }
.left-bar i { display: block; height: 100%; width: 0; background: var(--ink2); border-radius: 4px; transition: width 0.9s var(--ease); }
.pos-foot .tl .num { display: block; margin-top: 6px; font-size: 22px; font-weight: 500; line-height: 1; }

/* ---------- list rows (approaching) ---------- */
.alist { container-type: inline-size; container-name: alist; }
.ahead, .arow-main {
  display: grid;
  grid-template-columns: minmax(160px, 1.1fr) minmax(120px, 0.8fr) 90px minmax(160px, 1fr) 410px 124px 16px;
  align-items: center;
  gap: 12px;
  padding-inline: 16px;
}
.ahead { padding-block: 10px; border-bottom: 1px solid var(--line2); }
.ahead span { font: 500 12px/1.2 var(--mono); letter-spacing: 0.09em; text-transform: uppercase; color: var(--mute); }
.arow { border-bottom: 1px solid var(--line); transition: background 0.25s var(--ease); }
.arow:hover { background: rgba(243, 234, 214, 0.025); }
.arow.open { background: rgba(243, 234, 214, 0.035); }
.arow-main { min-height: 76px; padding-block: 14px; cursor: pointer; }
.arow-main:focus-visible { outline-offset: -2px; }
.c-coin { display: flex; align-items: center; gap: 12px; min-width: 0; }
.c-coin .t { min-width: 0; }
.c-coin .nm { display: block; font: 500 15px/1.25 var(--sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-coin .sy { display: block; font: 500 13px/1.3 var(--mono); color: var(--mute); }
.c-prog .pct { font: 500 14px/1 var(--mono); }
.bar-sm { margin-top: 8px; height: 6px; border-radius: 6px; background: rgba(243, 234, 214, 0.09); overflow: hidden; }
.bar-sm i { display: block; height: 100%; width: 0; border-radius: 6px; background: linear-gradient(90deg, var(--gold-lo), var(--gold-hi)); transition: width 0.9s var(--ease); }
.c-mc { font: 500 14px/1.2 var(--mono); text-align: right; }
.ahead span:nth-child(3) { text-align: right; }
.c-og { min-width: 0; font-size: 14px; line-height: 1.35; }
.c-og .nm { display: block; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-og .meta { display: block; color: var(--mute); font: 400 13px/1.35 var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-og .none { color: var(--mute); }
.c-chk { display: flex; flex-wrap: wrap; gap: 6px; }
.c-chev { color: var(--mute); font-size: 16px; transition: transform 0.3s var(--ease), color 0.2s var(--ease); }
.arow.open .c-chev { transform: rotate(180deg); color: var(--gold); }

.chk {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 10px 0 8px;
  border-radius: 999px;
  border: 1px solid var(--line2);
  font: 500 12px/1 var(--sans);
  color: var(--ink2);
  white-space: nowrap;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), color 0.3s var(--ease);
}
.chk .ic { font-size: 12px; stroke-width: 2; }
.chk[data-p='pass'] { color: var(--gold-hi); border-color: rgba(232, 182, 74, 0.55); background: var(--gold-soft); }
.chk[data-p='fail'] { color: var(--ink); border-color: rgba(243, 234, 214, 0.34); background: repeating-linear-gradient(135deg, rgba(243, 234, 214, 0.07) 0 4px, transparent 4px 8px); }
.chk[data-p='pending'] { color: var(--ink2); border-style: dashed; border-color: rgba(243, 234, 214, 0.3); }

.verdict {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--line2);
  font: 600 13px/1.1 var(--sans);
  white-space: nowrap;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.verdict .ic { font-size: 13px; stroke-width: 2; }
.verdict[data-v='pass'], .verdict[data-v='bought'] { background: var(--gold); color: var(--gold-ink); border-color: transparent; }
.verdict[data-v='fail'], .verdict[data-v='skipped'] { color: var(--ink2); border-color: rgba(243, 234, 214, 0.28); }
.verdict[data-v='none'], .verdict[data-v='observed'] { color: var(--mute); border-style: dashed; }
.verdict[data-v='self'] { color: var(--gold-hi); border-color: var(--gold); background: var(--gold-soft); }
.verdict[data-v='scout'] { color: var(--ink2); }
.verdict[data-v='scout']::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); animation: blink 1.1s ease-in-out infinite; }
.verdict[data-v='error'] { color: var(--amber); border-color: rgba(229, 138, 58, 0.5); }

.arow-detail { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.4s var(--ease); }
.arow.open .arow-detail { grid-template-rows: 1fr; }
.arow-detail > div { overflow: hidden; min-height: 0; visibility: hidden; transition: visibility 0s linear 0.4s; }
.arow.open .arow-detail > div { visibility: visible; transition-delay: 0s; }
.detail-in { padding: 6px 16px 22px; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px 40px; }
.detail-in h4 { font: 500 12px/1.2 var(--mono); letter-spacing: 0.09em; text-transform: uppercase; color: var(--mute); margin-bottom: 12px; }
.checks { display: grid; gap: 10px; }
.checks li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 4px 10px; align-items: start; font-size: 15px; }
.checks li .ic { margin-top: 4px; font-size: 14px; stroke-width: 2; }
.checks li[data-p='pass'] .ic { color: var(--gold); }
.checks li[data-p='fail'] .ic { color: var(--ink2); }
.checks li[data-p='pending'] .ic { color: var(--mute); }
.checks li .d { grid-column: 2; font: 400 13px/1.4 var(--mono); color: var(--mute); }
.detail-og p { font-size: 15px; color: var(--ink2); }
.detail-og p + p { margin-top: 8px; }

/* container query reflow for the approaching list */
@container alist (max-width: 1190px) {
  .ahead { display: none; }
  .arow-main {
    grid-template-columns: minmax(0, 1.4fr) minmax(120px, 0.8fr) 74px minmax(0, 1.4fr) 24px;
    grid-template-areas:
      'coin prog mc  og  chev'
      'chk  chk  chk verd verd';
    row-gap: 14px;
  }
  .c-coin { grid-area: coin; }
  .c-prog { grid-area: prog; }
  .c-mc { grid-area: mc; }
  .c-og { grid-area: og; }
  .c-chk { grid-area: chk; }
  .c-verd { grid-area: verd; justify-self: end; }
  .c-chev { grid-area: chev; }
}
@container alist (max-width: 720px) {
  .arow-main {
    grid-template-columns: minmax(0, 1fr) auto 20px;
    grid-template-areas:
      'coin verd chev'
      'prog mc   mc'
      'og   og   og'
      'chk  chk  chk';
    gap: 14px 12px;
  }
  .c-verd { justify-self: end; }
  .c-mc { text-align: right; }
  .detail-in { grid-template-columns: 1fr; }
}

/* ---------- tables ---------- */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th {
  padding: 10px 14px;
  text-align: left;
  font: 500 12px/1.2 var(--mono);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--mute);
  border-bottom: 1px solid var(--line2);
  white-space: nowrap;
}
.tbl td { padding: 14px; border-bottom: 1px solid var(--line); font-size: 15px; vertical-align: middle; }
.tbl th.r, .tbl td.r { text-align: right; }
.tbl tbody tr { transition: background 0.25s var(--ease); }
.tbl tbody tr:hover { background: rgba(243, 234, 214, 0.025); }
.tbl .tk { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; min-width: 0; }
.tbl .tk b { font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
.tbl .tk span { color: var(--mute); font: 500 13px var(--mono); }
.tbl .reason { color: var(--ink2); }
.tbl .sm { font: 400 14px/1.4 var(--sans); }
.tbl td .ago { color: var(--mute); font: 500 13px var(--mono); white-space: nowrap; }

.side { display: inline-flex; align-items: center; min-height: 24px; padding: 0 9px; border-radius: 6px; font: 600 12px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; border: 1px solid var(--line2); color: var(--ink2); }
.side[data-side='buy'] { color: var(--gold-hi); border-color: rgba(232, 182, 74, 0.5); background: var(--gold-soft); }

@media (max-width: 760px) {
  .tbl:not(.keep) thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .tbl:not(.keep), .tbl:not(.keep) tbody { display: block; }
  .tbl:not(.keep) tr { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
  .tbl:not(.keep) td { display: block; padding: 0; border: 0; min-width: 0; }
  .tbl:not(.keep) td::before { content: attr(data-label); display: block; margin-bottom: 4px; font: 500 12px/1.2 var(--mono); letter-spacing: 0.09em; text-transform: uppercase; color: var(--mute); }
  .tbl:not(.keep) td.full { grid-column: 1 / -1; }
  .tbl:not(.keep) td.nolabel::before { display: none; }
  .tbl:not(.keep) td.r { text-align: left; }
  .rule-table td { padding: 12px 8px; font-size: 15px; }
  .rule-table td.v { white-space: normal; }
}

/* ---------- stat tiles (home mini stats) ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: linear-gradient(180deg, rgba(243, 234, 214, 0.04), rgba(243, 234, 214, 0.015)); }
.stat { position: relative; display: block; padding: 24px 24px 22px; border-left: 1px solid var(--line); transition: background 0.3s var(--ease); min-width: 0; }
.stat:first-child { border-left: 0; }
.stat:hover { background: var(--gold-soft); }
.stat .val { display: block; margin-top: 14px; font: 500 30px/1.05 var(--mono); letter-spacing: -0.03em; }
.stat .sub { display: block; margin-top: 10px; font: 400 14px/1.45 var(--sans); color: var(--mute); }
.stat .sub .num { color: var(--ink2); }
.stat .go { position: absolute; top: 20px; right: 20px; font-size: 14px; color: var(--mute); transition: transform 0.3s var(--ease), color 0.3s var(--ease); }
.stat:hover .go { transform: translate(2px, -2px); color: var(--gold); }

/* ---------- rules ---------- */
.rules-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr); gap: 32px clamp(32px, 6vw, 96px); align-items: start; }
.rules-list { counter-reset: r; border-top: 1px solid var(--line2); }
.rules-list li { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 4px 16px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.rules-list .n { font: 500 13px/1.8 var(--mono); color: var(--gold); letter-spacing: 0.08em; }
.rules-list h3 { font: 500 17px/1.3 var(--sans); }
.rules-list p { margin-top: 4px; color: var(--ink2); font-size: 16px; text-wrap: pretty; }
.rules-list .num { color: var(--ink); }

/* ---------- portfolio ---------- */
.page-head { padding-top: clamp(40px, 6vw, 80px); }
.page-head h1 { margin-top: 16px; font: 400 clamp(52px, 8vw, 104px)/0.96 var(--serif); letter-spacing: -0.02em; }
.page-head h1 em { font-style: italic; color: var(--gold); }
.page-head p { margin-top: 20px; max-width: 38em; color: var(--ink2); font-size: clamp(16px, 1.5vw, 19px); text-wrap: pretty; }
.page-head .actions { margin-top: 24px; display: flex; gap: 12px; flex-wrap: wrap; }

.pnl-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.pnl-card { padding: 22px; }
.pnl-card .val { display: block; margin-top: 14px; font: 500 32px/1 var(--mono); letter-spacing: -0.03em; }
.pnl-card .val small { font: 400 14px var(--sans); letter-spacing: 0; color: var(--mute); margin-left: 8px; }
.pnl-card .usd { display: block; margin-top: 10px; font: 500 16px/1 var(--mono); color: var(--ink2); }
.pnl-card .tw { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 14px; color: var(--mute); }
.pnl-card .tw .num { color: var(--ink2); }
.unreal { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-top: 16px; padding: 16px 22px; }
.unreal .num { font-size: 18px; font-weight: 500; }

.chart-panel { padding: 22px 22px 14px; }
.chart-wrap { position: relative; height: 340px; margin-top: 8px; }
.chart-wrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.chart-tip { position: absolute; z-index: 2; pointer-events: none; padding: 8px 10px; border-radius: 8px; background: var(--bg3); border: 1px solid var(--line2); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); font: 500 13px/1.4 var(--mono); white-space: nowrap; opacity: 0; transform: translateY(4px); transition: opacity 0.15s var(--ease), transform 0.15s var(--ease); }
.chart-tip.on { opacity: 1; transform: none; }
.chart-tip small { display: block; color: var(--mute); font-size: 12px; }
.chart-empty { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 24px; color: var(--ink2); pointer-events: none; }
.chart-empty[hidden] { display: none; }

.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.box { padding: 26px; }
.box h2 { font: 400 clamp(30px, 3.4vw, 40px)/1.05 var(--serif); letter-spacing: -0.01em; margin-top: 10px; }
.box .big { display: block; margin-top: 22px; font: 500 40px/1 var(--mono); letter-spacing: -0.03em; }
.box .big-sub { display: block; margin-top: 10px; font: 500 16px/1.3 var(--mono); color: var(--ink2); }
.box .rows { margin-top: 22px; border-top: 1px solid var(--line); }
.box .rows > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.box .rows dt { color: var(--ink2); }
.box .rows dd { margin: 0; font: 500 15px/1.3 var(--mono); text-align: right; }
.box .rows .total dt { color: var(--ink); font-weight: 500; }
.box .rows .total dd { color: var(--gold-hi); }
.box .rows[class] dl, .box dl.rows { margin-bottom: 0; }
.box dl.rows { margin-left: 0; margin-right: 0; }
.burn-bar { margin-top: 18px; height: 8px; border-radius: 8px; background: rgba(243, 234, 214, 0.08); overflow: hidden; }
.burn-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold-lo), var(--gold-hi)); border-radius: 8px; transition: width 1s var(--ease); min-width: 2px; }
.burn-list { margin-top: 24px; }
.burn-list h3 { font: 500 12px/1.2 var(--mono); letter-spacing: 0.09em; text-transform: uppercase; color: var(--mute); margin-bottom: 4px; }
.box .tbl td, .box .tbl th { padding-inline: 8px; }
.box .tbl th:first-child, .box .tbl td:first-child { padding-left: 0; }
.box .tbl th:last-child, .box .tbl td:last-child { padding-right: 0; }
.box .tbl .tx { white-space: nowrap; }
.mc-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: end; }

/* ---------- ledger ---------- */
.controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin: 28px 0 20px; }
.chips { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 18px;
  border-radius: 999px; border: 1px solid var(--line2);
  font: 500 14px/1 var(--sans); color: var(--ink2);
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease);
}
.chip:hover { border-color: rgba(232, 182, 74, 0.5); color: var(--ink); }
.chip[aria-pressed='true'] { background: var(--gold); color: var(--gold-ink); border-color: transparent; font-weight: 600; }
.chip .num { font-size: 13px; opacity: 0.8; }
.sort { display: inline-flex; align-items: center; gap: 12px; }
.sort label { font: 500 12px/1 var(--mono); letter-spacing: 0.09em; text-transform: uppercase; color: var(--mute); }
.select { position: relative; }
.select select {
  appearance: none; -webkit-appearance: none;
  min-height: 44px; padding: 0 44px 0 16px;
  border-radius: 12px; border: 1px solid var(--line2);
  background: rgba(243, 234, 214, 0.05); color: var(--ink);
  font: 500 14px/1 var(--sans);
  cursor: pointer;
  transition: border-color 0.2s var(--ease);
}
.select select:hover { border-color: rgba(232, 182, 74, 0.5); }
.select select option { background: #17130d; color: var(--ink); }
.select .ic { position: absolute; right: 14px; top: 50%; margin-top: -8px; font-size: 16px; color: var(--gold); pointer-events: none; }

.ledger-sum { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-bottom: 14px; font-size: 14px; color: var(--mute); }
.ledger-sum .num { color: var(--ink2); font-weight: 500; }

.lg { container-type: inline-size; container-name: lg; border: 1px solid var(--line); border-radius: var(--r); background: linear-gradient(180deg, rgba(243, 234, 214, 0.04), rgba(243, 234, 214, 0.012)); overflow: hidden; }
.lg-head, .lg-main {
  display: grid;
  grid-template-columns: minmax(190px, 2.2fr) 116px 104px 104px minmax(130px, 1.1fr) 92px minmax(110px, 1.2fr) 20px;
  align-items: center;
  gap: 14px;
  padding-inline: 18px;
}
.lg-head { padding-block: 12px; border-bottom: 1px solid var(--line2); }
.lg-head span { font: 500 12px/1.2 var(--mono); letter-spacing: 0.09em; text-transform: uppercase; color: var(--mute); }
.lg-row { border-bottom: 1px solid var(--line); transition: background 0.25s var(--ease); }
.lg-row:last-child { border-bottom: 0; }
.lg-row:hover { background: rgba(243, 234, 214, 0.025); }
.lg-row.open { background: rgba(243, 234, 214, 0.04); }
.lg-main { min-height: 72px; padding-block: 14px; cursor: pointer; }
.lg-main:focus-visible { outline-offset: -2px; }
.lg-main .cell { min-width: 0; font: 500 14px/1.3 var(--mono); }
.lg-main .cell::before { content: attr(data-label); display: none; margin-bottom: 4px; font: 500 12px/1.2 var(--mono); letter-spacing: 0.09em; text-transform: uppercase; color: var(--mute); }
.lg-main .cell.l-tok { display: flex; align-items: center; gap: 12px; font-family: var(--sans); }
.lg-main .cell.l-tok::before { display: none !important; }
.lg-main .l-reason { font: 400 14px/1.35 var(--sans); color: var(--ink2); }
.lg-main .l-open { color: var(--ink2); }
.lg-main .pnl-cell .num { display: block; font-size: 15px; font-weight: 500; }
.lg-main .pnl-cell .pc { display: block; margin-top: 2px; font: 500 13px/1.2 var(--mono); }
.badge { display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line2); font: 500 12px/1 var(--sans); color: var(--ink2); }
.badge[data-st='open'] { color: var(--gold-hi); border-color: rgba(232, 182, 74, 0.5); background: var(--gold-soft); }
.badge[data-st='open']::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.lg-detail { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.4s var(--ease); }
.lg-row.open .lg-detail { grid-template-rows: 1fr; }
.lg-detail > div { min-height: 0; overflow: hidden; visibility: hidden; transition: visibility 0s linear 0.4s; }
.lg-row.open .lg-detail > div { visibility: visible; transition-delay: 0s; }
.l-tok .t { min-width: 0; }
.l-tok .nm { display: block; font: 500 15px/1.25 var(--sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.l-tok .sy { font: 500 13px var(--mono); color: var(--mute); margin-left: 4px; }
.l-tok .sub { display: block; font: 400 13px/1.35 var(--sans); color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.l-tok .sub b { font-weight: 500; color: var(--ink2); }
.lg-main .c-chev { color: var(--mute); font-size: 16px; transition: transform 0.3s var(--ease), color 0.2s var(--ease); }
.lg-row.open .c-chev { transform: rotate(180deg); color: var(--gold); }
.lg-head .r { text-align: right; }
.lg-main .cell.r { text-align: right; }
.lg-detail .inner { margin: 0 18px 20px; border: 1px solid var(--line); border-radius: 10px; background: rgba(0, 0, 0, 0.22); padding: 4px 4px 2px; overflow-x: auto; }
.lg-detail .tbl td, .lg-detail .tbl th { padding: 11px 12px; font-size: 14px; }
.lg-detail .tbl .r { text-align: right; }

@container lg (max-width: 1060px) {
  .lg-head { display: none; }
  .lg-main {
    grid-template-columns: repeat(4, minmax(0, 1fr)) 24px;
    grid-template-areas:
      'tok tok tok pnl chev'
      'op  cost pro st  st'
      'rs  rs  rs  rs   rs';
    row-gap: 14px;
  }
  .l-tok { grid-area: tok; }
  .lg-main .cell.r { text-align: left; }
  .lg-main .cell.pnl-cell { grid-area: pnl; text-align: right; }
  .l-open { grid-area: op; }
  .l-cost { grid-area: cost; }
  .l-pro { grid-area: pro; }
  .l-st { grid-area: st; justify-self: end; align-self: end; }
  .l-reason { grid-area: rs; }
  .lg-main .c-chev { grid-area: chev; }
  .lg-main .cell:not(.l-tok):not(.pnl-cell)::before { display: block; }
  .lg-main .l-st::before { display: none !important; }
  .lg-main .l-reason::before { display: block; }
}
@container lg (max-width: 600px) {
  .lg-main {
    grid-template-columns: repeat(2, minmax(0, 1fr)) 24px;
    grid-template-areas:
      'tok tok chev'
      'pnl pnl pnl'
      'op  st  st'
      'cost pro pro'
      'rs rs rs';
  }
  .lg-main .cell.pnl-cell { text-align: left; display: flex; align-items: baseline; gap: 12px; padding: 12px 0; border-block: 1px solid var(--line); }
  .pnl-cell .num, .pnl-cell .pc { display: inline !important; margin: 0 !important; font-size: 18px !important; }
  .l-st { justify-self: start; }
  .lg-detail .inner { margin-inline: 12px; }
}

/* ---------- about ---------- */
.about-grid { display: grid; grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.5fr); gap: 32px clamp(32px, 6vw, 96px); align-items: start; }
.about-grid .stick { position: sticky; top: 108px; }
.steps { counter-reset: step; border-top: 1px solid var(--line2); }
.steps li { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 0 16px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.steps .n { font: 500 13px/2 var(--mono); color: var(--gold); letter-spacing: 0.08em; }
.steps h3 { font: 400 clamp(26px, 3vw, 34px)/1.1 var(--serif); letter-spacing: -0.01em; }
.steps p { margin-top: 10px; color: var(--ink2); font-size: 16px; max-width: 38em; text-wrap: pretty; }
.steps p .num { color: var(--ink); }
.steps ul.sub { margin-top: 12px; display: grid; gap: 8px; }
.steps ul.sub li { display: block; padding: 0 0 0 18px; border: 0; position: relative; color: var(--ink2); font-size: 16px; }
.steps ul.sub li::before { content: ''; position: absolute; left: 0; top: 0.72em; width: 8px; height: 2px; background: var(--gold); border-radius: 2px; }
.steps ul.sub li .num { color: var(--ink); }

.rule-table { margin-top: 8px; }
.rule-table .grp td { padding: 28px 14px 10px; font: 500 12px/1.2 var(--mono); letter-spacing: 0.09em; text-transform: uppercase; color: var(--gold); border-bottom: 1px solid var(--line2); }
.rule-table td.v { text-align: right; font: 500 15px/1.3 var(--mono); white-space: nowrap; }
.rule-table td.k { color: var(--ink2); }
.rule-table td.k b { color: var(--ink); font-weight: 500; }

.quote { position: relative; padding: clamp(24px, 4vw, 44px); }
.quote blockquote { margin: 0; font: 400 clamp(30px, 4.4vw, 56px)/1.1 var(--serif); letter-spacing: -0.015em; }
.quote blockquote span { display: block; }
.quote blockquote span:last-child { color: var(--gold); font-style: italic; }
.quote .by { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; font-size: 15px; color: var(--ink2); }
.quote .by b { color: var(--ink); font-weight: 500; }
.eng { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 14px; color: var(--mute); }
.eng .num { color: var(--ink); font-size: 16px; font-weight: 500; margin-right: 6px; }
.prose { max-width: 40em; color: var(--ink2); font-size: 17px; text-wrap: pretty; }
.prose p + p { margin-top: 14px; }
.prose strong { color: var(--ink); font-weight: 500; }

.addr-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 16px; }
.fee-stat { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 14px; margin-top: 22px; padding: 16px 20px; }
.fee-stat .num { font-size: 20px; font-weight: 500; }
.note { display: flex; gap: 14px; align-items: flex-start; padding: 22px 24px; border: 1px solid rgba(232, 182, 74, 0.35); border-radius: var(--r); background: var(--gold-soft); color: var(--ink); font-size: 16px; }
.note b { font-weight: 600; color: var(--gold-hi); }

/* ---------- 404 ---------- */
.nf { padding-block: clamp(72px, 14vw, 160px); display: grid; justify-items: start; gap: 24px; }
.nf h1 { font: 400 clamp(88px, 18vw, 220px)/0.9 var(--serif); letter-spacing: -0.03em; color: var(--ink); }
.nf h1 em { color: var(--gold); font-style: italic; }
.nf p { max-width: 30em; color: var(--ink2); font-size: 18px; }

/* ---------- footer ---------- */
.site-footer { margin-top: clamp(80px, 11vw, 140px); border-top: 1px solid var(--line); background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.3)); }
.foot { display: grid; grid-template-columns: 1fr auto; gap: 24px 40px; align-items: end; padding-block: 40px 56px; }
.foot .dom { font: 400 38px/1 var(--serif); letter-spacing: -0.01em; }
.foot .dom i { font-style: normal; color: var(--gold); }
.foot .disc { margin-top: 12px; max-width: 32em; color: var(--mute); font-size: 14px; }
.foot .links { display: flex; flex-wrap: wrap; gap: 8px 28px; align-items: center; justify-content: flex-end; }
.foot .links a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 15px; color: var(--ink2); transition: color 0.2s var(--ease); }
.foot .links a:hover { color: var(--gold); }
.foot .links .ic { font-size: 14px; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .pnl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .rules-grid, .about-grid { grid-template-columns: 1fr; }
  .about-grid .stick { position: static; }
}
@media (max-width: 960px) {
  .live b { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .live { gap: 0; min-width: 0; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-mark { position: absolute; top: calc(34px + var(--h1) * 0.92); right: 0; width: calc(var(--h1) * 0.9); justify-self: auto; }
  .hero-mark::before { inset: -30%; }
  .hero-copy { position: relative; z-index: 1; }
  .two-col, .mc-panel { grid-template-columns: 1fr; }
  .strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .strip > div:nth-child(3) { border-left: 0; }
  .strip > div:nth-child(n + 3) { border-top: 1px solid var(--line); }
}
@media (max-width: 760px) {
  .bar { grid-template-columns: 1fr auto; grid-template-areas: 'brand end' 'nav nav'; gap: 0 12px; min-height: 0; padding-top: 6px; }
  .brand { grid-area: brand; }
  .hdr-end { grid-area: end; gap: 12px; }
  .nav { grid-area: nav; justify-content: stretch; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-inline: -8px; }
  .nav a { justify-content: center; padding: 0 4px; font-size: 15px; }
  .nav a::after { left: 22%; right: 22%; bottom: 4px; }
  .live { min-width: 0; }
  .brand .word { font-size: 28px; }
  .foot { grid-template-columns: 1fr; align-items: start; }
  .foot .links { justify-content: flex-start; }
  .detail-in { grid-template-columns: 1fr; }
  .strip .val { font-size: 22px; }
  .chart-wrap { height: 260px; }
  .hold { padding: 18px; }
  .controls { align-items: stretch; }
  .sort { width: 100%; justify-content: space-between; }
  .select { flex: 1; }
  .select select { width: 100%; }
}
@media (max-width: 520px) {
  .strip { grid-template-columns: 1fr; }
  .strip > div { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 4px 16px; padding: 14px 18px; border-left: 0 !important; border-top: 1px solid var(--line); }
  .strip > div:first-child { border-top: 0; }
  .strip .val { margin: 0; text-align: right; }
  .strip .status-pill { margin: 0; justify-self: end; }
  .strip .sub { grid-column: 1 / -1; margin: 0; }
  .live b { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .live { gap: 0; }
  .pnl-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .pnl-card { padding: 16px; }
  .pnl-card .val { font-size: 24px; }
  .stats { grid-template-columns: 1fr; }
  .stat { border-left: 0 !important; border-top: 1px solid var(--line); }
  .stat:first-child { border-top: 0; }
  .box { padding: 20px; }
  .box .big { font-size: 32px; }
  .kv { gap: 12px 14px; }
  .rules-list li, .steps li { grid-template-columns: 40px minmax(0, 1fr); gap: 0 10px; }
  .ca-block, .ca-block.big { flex-direction: column; width: 100%; }
  .ca-block .copy { border-left: 0; border-top: 1px solid var(--line2); min-height: 48px; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }
  .mark .sweep, .hero-mark .mark, .live[data-live='sse'] i, .status-pill i, .sk, .sk-card::after, .sk-row::after, .verdict[data-v='scout']::before, .net-banner i, .live[data-live='init'] i { animation: none !important; }
  .rise, .enter { opacity: 1; transform: none; }
  .js .reveal-on { opacity: 1; transform: none; }
}
