:root {
  color-scheme: dark;
  --bg: #101410;
  --bg-2: #171d18;
  --bg-3: #222922;
  --line: #314036;
  --text: #e7f0e6;
  --muted: #93a396;
  --brass: #d7b15a;
  --brass-2: #f3d48a;
  --ink: #1a1408;
  --up: #3cba7a;
  --down: #e15d4a;
  --info: #8ec8d8;
  --sans: "Segoe UI", Aptos, sans-serif;
  --serif: Georgia, "Iowan Old Style", Palatino, serif;
  --mono: "Cascadia Mono", Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  min-height: 100vh;
  max-width: 100%;
  overflow-x: hidden;
  overflow-wrap: anywhere;
  background:
    radial-gradient(900px 420px at 8% -10%, rgba(215, 177, 90, 0.14), transparent 55%),
    var(--bg);
  color: var(--text);
  font: 16px/1.5 var(--sans);
}
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, #8c6a2f, var(--brass-2), #8c6a2f);
  z-index: 40;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 560; letter-spacing: -0.02em; line-height: 1.15; }
h1 { font-size: clamp(2rem, 4vw, 3.4rem); margin: 0 0 0.4em; }
h1 span { color: var(--muted); font-size: 0.55em; }
h2 { font-size: 1.45rem; margin: 0 0 0.5em; }
a { color: var(--brass-2); }
a:hover { color: white; }
p { margin: 0 0 0.8em; }
code, .num { font-family: var(--mono); }
::selection { background: var(--brass); color: var(--ink); }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }

.skip {
  position: absolute;
  left: 8px;
  top: -40px;
  background: var(--brass);
  color: var(--ink);
  padding: 8px 12px;
  z-index: 50;
}
.skip:focus { top: 8px; }

.chrome {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(16, 20, 16, 0.96);
  backdrop-filter: blur(12px);
}
.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 20px;
  background: transparent;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: var(--text);
  text-decoration: none;
  margin-right: 8px;
  min-width: 0;
  flex: 1 1 auto;
}
.brand span {
  font-family: var(--serif);
  font-size: 1.35rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.brand small {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.brand svg { width: 26px; height: 26px; align-self: center; }
.brand svg path { fill: none; stroke-width: 3; stroke-linecap: round; }
.brand svg path:nth-child(1) { stroke: var(--down); }
.brand svg path:nth-child(2) { stroke: var(--brass); }
.brand svg path:nth-child(3) { stroke: var(--up); }
.nav { display: flex; gap: 4px; flex: 1; align-items: center; flex-wrap: wrap; }
.nav a, .nav-group > summary {
  color: var(--muted);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 999px;
  white-space: nowrap;
  font: inherit;
}
.nav a.active, .admin-nav a.active, .filters a.active,
.nav-group.has-active > summary { background: var(--brass); color: var(--ink); }
.nav-group {
  position: relative;
}
.nav-group > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-group > summary::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: 0.7;
}
.nav-sub {
  display: none;
  position: absolute;
  top: calc(100% - 2px);
  left: 0;
  min-width: 188px;
  padding: 6px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
  z-index: 30;
  flex-direction: column;
  gap: 2px;
}
.nav-sub a {
  display: block;
  border-radius: 8px;
  white-space: normal;
}
.nav-group:hover > .nav-sub,
.nav-group:focus-within > .nav-sub,
.nav-group[open] > .nav-sub { display: flex; }
.account { display: flex; align-items: center; gap: 10px; margin-left: auto; min-width: 0; }
.account a { color: inherit; text-decoration: none; text-align: right; min-width: 0; }
.account strong, .account .num {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav-toggle { display: none; flex-shrink: 0; }

.admin-nav {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 8px 20px;
  border-bottom: 1px solid var(--line);
  background: #141a15;
}
.admin-nav a { color: var(--muted); text-decoration: none; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }

.shell { width: min(1180px, calc(100% - 32px)); max-width: 100%; margin: 28px auto 48px; }
.site-footer {
  width: min(1180px, calc(100% - 32px));
  max-width: 100%;
  margin: 0 auto 32px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 8px; }

.hero { max-width: 760px; margin-bottom: 28px; }
.eyebrow { color: var(--brass); letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.75rem; margin-bottom: 8px; }
.lead { font-size: 1.15rem; color: #d5e0d4; }
.hero-actions, .filters, .inline-form, .title-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.title-row { justify-content: space-between; }
.quote-line { display: flex; flex-wrap: wrap; gap: 16px; }
form.filters { width: 100%; max-width: 100%; }
form.filters > label { flex: 1 1 180px; min-width: 0; max-width: 100%; }

.grid-3, .grid-2, .stat-grid { display: grid; gap: 14px; margin: 18px 0; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: 1.2fr 0.8fr; }
.stat-grid { grid-template-columns: repeat(4, 1fr); }
.card, .panel, .stat {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
}
.stat span { display: block; color: var(--muted); font-size: 0.85rem; }
.stat b { font-size: 1.25rem; overflow-wrap: anywhere; }
.panel.narrow, .install-wrap { max-width: 560px; margin: 40px auto; }

.session-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 6px 16px;
  border-bottom: 1px solid var(--line);
  scrollbar-width: thin;
}
.session-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  white-space: nowrap;
  color: var(--muted);
  font-size: 0.75rem;
}
.session-chip strong { color: var(--text); font-size: 0.78rem; }
.session-chip.is-open { border-color: #2d6a45; }
.session-chip.is-closed { border-color: #5a3530; }
.session-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
  align-self: center;
  flex: 0 0 auto;
}
.session-chip.is-open .session-dot { background: var(--up); }
.session-chip.is-closed .session-dot { background: var(--down); }

.tape {
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #121814;
}
.tape-track {
  display: flex;
  width: max-content;
  animation: tape-x 42s linear infinite;
}
.tape-seq { display: flex; align-items: stretch; }
.tape-item {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 7px 18px;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
  border-right: 1px solid var(--line);
}
.tape-item:hover { background: #1a221c; }
.tape-sym { font-weight: 650; letter-spacing: 0.04em; }
.tape-px { color: var(--brass-2); }
.tape:hover .tape-track,
.tape:focus-within .tape-track { animation-play-state: paused; }
@keyframes tape-x {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@keyframes tape-y {
  from { transform: translateY(0); }
  to { transform: translateY(-50%); }
}

.ticker { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 22px; }
.ticker-item {
  display: grid;
  gap: 2px;
  padding: 12px;
  border-radius: 12px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}

.btn {
  border: 1px solid var(--line);
  background: var(--bg-3);
  color: var(--text);
  border-radius: 999px;
  padding: 9px 14px;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
.btn-brass { background: var(--brass); color: var(--ink); border-color: transparent; font-weight: 650; }
.btn-ghost { background: transparent; }
.btn-danger { background: transparent; color: #ffb1a6; border-color: #8d3d32; }
.btn-small { padding: 4px 10px; font-size: 0.85rem; }
.btn:hover { filter: brightness(1.08); }

label { display: grid; gap: 6px; font-size: 0.92rem; }
input, select, textarea {
  width: 100%;
  max-width: 100%;
  background: #0e130f;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
}
textarea { resize: vertical; }
.check { display: flex; align-items: flex-start; gap: 8px; }
.check input { width: auto; margin-top: 3px; }
.stack { display: grid; gap: 12px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.help, .muted { color: var(--muted); }
.links, .oauth { display: grid; gap: 8px; margin-top: 14px; }
.filters { margin: 12px 0; }
.filters a { color: var(--muted); text-decoration: none; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); }
.filters a small {
  margin-left: 2px;
  font-family: var(--mono);
  font-size: 0.78em;
  opacity: 0.75;
}

.table-wrap { overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.table th { color: var(--muted); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 600; }
.table .num, td.num, th.num { text-align: right; }
.th-sort {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}
.th-sort-name { display: block; }
.th-sort-btns { display: inline-flex; gap: 3px; }
.th-sort-btn {
  width: 20px;
  height: 16px;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: #1a221c;
  color: #6f8574;
  cursor: pointer;
  position: relative;
  display: inline-block;
  text-decoration: none;
}
.th-sort-btn::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid currentColor;
  transform: translate(-50%, -40%);
}
.th-sort-btn.is-up::before {
  border-top: 0;
  border-bottom: 6px solid currentColor;
  transform: translate(-50%, -60%);
}
.th-sort-btn:hover { color: var(--text); background: #243028; }
.th-sort-btn.is-on { color: var(--brass-2); background: #2a2618; }
.up { color: var(--up); }
.down { color: var(--down); }

.tag {
  display: inline-block;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.75rem;
  border: 1px solid var(--line);
  color: var(--muted);
}
.tag.high { color: #ffd0c8; border-color: #8d3d32; }
.tag.medium { color: var(--brass-2); border-color: #6d5a2e; }
.tag.low { color: var(--info); }

.flash { border-radius: 10px; padding: 10px 12px; margin: 0 0 10px; overflow-wrap: anywhere; }
.flash.ok { background: rgba(60, 186, 122, 0.12); }
.flash.err { background: rgba(225, 93, 74, 0.14); }
.flash.info { background: rgba(215, 177, 90, 0.12); }
.banner, .empty {
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 12px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.terminal { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 14px; align-items: start; }
.chart-wrap { height: 460px; }
.chart-wrap canvas { width: 100%; height: 100%; display: block; }
.chart-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.ticket, .riskbox { display: grid; gap: 10px; }
.side-toggle { border: 0; padding: 0; display: flex; gap: 12px; }
.side-toggle legend { padding: 0; margin-bottom: 6px; }
.riskbox { background: #121814; border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.riskbox dl, .kv { margin: 0; }
.riskbox dl div, .kv div { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; border-bottom: 1px solid var(--line); }
.riskbox dt, .kv dt { color: var(--muted); flex: 0 1 auto; }
.riskbox dd, .kv dd { margin: 0; min-width: 0; text-align: right; overflow-wrap: anywhere; }
.trade-list { display: grid; gap: 14px; }
.trade-card {
  display: grid;
  gap: 10px;
  background: #121814;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
}
.trade-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  flex-wrap: wrap;
}
.trade-card-head a {
  color: inherit;
  text-decoration: none;
  font-size: 1.15rem;
  font-weight: 650;
}
.trade-card-head a:hover { color: var(--brass-2); }
.trade-card-head .muted { display: block; font-weight: 400; }
.trade-card-head > b { font-size: 1.25rem; }
.value-compare {
  display: grid;
  grid-template-columns: 1fr auto 1fr 1fr;
  gap: 10px;
  align-items: start;
}
.value-compare span, .value-compare small { display: block; color: var(--muted); font-size: 0.78rem; }
.value-compare b { font-size: 1.1rem; }
.value-arrow { margin: 1.35em 0 0; color: var(--muted); }
.value-bars { width: min(100%, 420px); height: 28px; }
.value-bars .bar-entry { fill: #4a5c4e; }
.value-bars .bar-now.up { fill: var(--up); }
.value-bars .bar-now.down { fill: var(--down); }
.value-bars .bar-now.muted { fill: #6d7f70; }
.why-dl { margin: 0; }
.why-dl div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
  border-bottom: 1px solid var(--line);
}
.why-dl dt { color: var(--muted); }
.why-dl dd { margin: 0; min-width: 0; text-align: right; overflow-wrap: anywhere; }
.trade-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.range-compare {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 10px;
  background: #0e130f;
  border-radius: 10px;
}
.range-compare span, .range-compare small { display: block; color: var(--muted); font-size: 0.78rem; }
.range-compare b { font-size: 1.05rem; }
.coach-log {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.coach-log li {
  border-left: 3px solid var(--brass);
  padding: 6px 10px;
  background: #0e130f;
  border-radius: 0 8px 8px 0;
}
.coach-log li p { margin: 0 0 0.25em; }
.coach-log li p:last-child { margin: 0; }
.coach-log .coach-giveback { border-left-color: var(--down); }
.coach-log .coach-high { border-left-color: var(--up); }
.coach-log .coach-low { border-left-color: var(--down); }
.coach-log .coach-protect, .coach-log .coach-first_plus { border-left-color: var(--brass); }
.coach-log .coach-first_minus { border-left-color: var(--down); }
.ticket-host { padding: 0; overflow: hidden; }
.ticket-host > p { padding: 16px; }
.ticket-panel {
  display: grid;
  gap: 12px;
  padding: 14px 14px 12px;
  background: #141b16;
  min-width: 0;
}
.ticket-panel > * { min-width: 0; max-width: 100%; }
.ticket-head {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 28px;
}
.ticket-head h2 {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  font-weight: 650;
}
.ticket-class {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 4px;
  background: #2a4d38;
  color: #cfe8d4;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  vertical-align: 2px;
}
.ticket-about { position: absolute; right: 0; top: 0; }
.ticket-about summary {
  list-style: none;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
}
.ticket-about summary::-webkit-details-marker { display: none; }
.ticket-about-pop {
  position: absolute;
  right: 0;
  top: 28px;
  z-index: 5;
  width: 230px;
  padding: 10px;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 0.85rem;
}
.ticket-about-pop p { margin: 0 0 0.45em; }
.ticket-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: #0e130f;
  border-radius: 8px;
  padding: 3px;
}
.ticket-tabs button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.82rem;
  padding: 8px 6px;
  border-radius: 6px;
  cursor: pointer;
  white-space: normal;
  line-height: 1.2;
}
.ticket-tabs button[aria-selected="true"] {
  background: #243028;
  color: var(--text);
}
.ticket-sizers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ticket-sizer-label, .ticket-flag {
  color: var(--muted);
  font-size: 0.78rem;
}
.ticket-sizer-label { display: flex; justify-content: space-between; gap: 6px; margin-bottom: 4px; }
.ticket-sizer-label small { color: #6f8574; }
.ticket-spin {
  display: grid;
  grid-template-columns: auto 1fr 22px;
  align-items: stretch;
  background: #0c100d;
  border: 1px solid #2c3a30;
  border-radius: 6px;
  min-height: 36px;
}
.ticket-spin.is-off { opacity: 0.38; }
.ticket-spin input {
  border: 0;
  background: transparent;
  padding: 6px 4px;
  border-radius: 0;
  min-width: 0;
  font-family: var(--mono);
  font-size: 0.92rem;
}
.ticket-lock {
  width: 18px;
  display: grid;
  place-items: center;
}
.ticket-lock::before {
  content: "";
  width: 8px;
  height: 7px;
  border: 1.5px solid #6d8574;
  border-radius: 2px;
  box-shadow: 0 -4px 0 -2px #6d8574;
}
.ticket-pending .ticket-spin, .ticket-trail-field, .ticket-protect .ticket-spin { grid-template-columns: 1fr 22px; }
.ticket-spin-btns { display: grid; grid-template-rows: 1fr 1fr; border-left: 1px solid #2c3a30; }
.ticket-spin-btns button {
  border: 0;
  background: #152018;
  padding: 0;
  cursor: pointer;
  position: relative;
}
.ticket-spin-btns button:hover { background: #1d2a22; }
.ticket-spin-btns button:first-child { border-bottom: 1px solid #2c3a30; }
.ticket-spin-btns button::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
}
.ticket-spin-btns button:first-child::before {
  border-bottom: 5px solid var(--muted);
  transform: translate(-50%, -70%);
}
.ticket-spin-btns button:last-child::before {
  border-top: 5px solid var(--muted);
  transform: translate(-50%, -30%);
}
.ticket-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px 12px;
  margin: 0;
  font-size: 0.72rem;
}
.ticket-meta div { display: grid; gap: 2px; min-width: 0; }
.ticket-meta dt { color: var(--muted); font-weight: 500; }
.ticket-meta dd {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.ticket-protect {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px 8px;
  align-items: center;
}
.ticket-flag { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.ticket-flag input { width: auto; }
.ticket-flag-right { grid-column: 3; justify-content: flex-end; }
.ticket-pending[hidden],
.ticket-spin[hidden] { display: none; }
.ticket-protect-mid {
  margin: 0;
  font-size: 0.72rem;
  text-align: center;
}
.ticket-dir {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  gap: 18px;
  padding: 2px 0 4px;
}
.ticket-dir label { display: flex; align-items: center; gap: 6px; font-size: 0.85rem; }
.ticket-dir input { width: auto; accent-color: var(--up); }
.ticket-trail { margin-top: 2px; }
.ticket-note summary { cursor: pointer; color: var(--muted); font-size: 0.85rem; }
.ticket-note textarea { margin-top: 6px; }
.ticket-exec {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  width: 100%;
  min-width: 0;
}
.ticket-sell, .ticket-buy {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: 0;
  border-radius: 6px;
  padding: 10px 8px;
  cursor: pointer;
  font: inherit;
  min-width: 0;
  min-height: 56px;
}
.ticket-sell { background: #0a0c0b; color: #f3f6f3; }
.ticket-buy { background: var(--up); color: #062214; }
.ticket-exec-label { font-size: 0.82rem; opacity: 0.9; }
.ticket-px {
  font-family: var(--mono);
  font-size: clamp(0.92rem, 1.4vw, 1.12rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ticket-px .tail { font-size: 0.78em; opacity: 0.75; }
.price { font-family: var(--serif); font-size: 1.8rem; color: var(--brass-2); }
.prose h2 { margin-top: 1.2em; }
.video { position: relative; padding-top: 56.25%; margin: 12px 0 18px; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 12px; }
.note { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; }
img, video { max-width: 100%; height: auto; }
canvas { max-width: 100%; }
.note img { border-radius: 10px; }
.plain { list-style: none; padding: 0; }
code { word-break: break-all; }
.pay-grid { display: grid; grid-template-columns: minmax(220px, 280px) minmax(0, 1fr); gap: 18px; align-items: start; margin: 16px 0; }
.qr-card { background: #fff; border-radius: 14px; padding: 12px; }
.qr-card .qr { width: 100%; height: auto; display: block; }
.qr-card p { color: #243024; margin: 10px 0 0; font-size: 0.85rem; }
.operator-block { margin-top: 16px; }
.operator-block h2, .pay-grid + h2 { margin-top: 0; }
.mail { white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--mono); font-size: 0.85rem; }
.wysiwyg { min-height: 220px; background: #0e130f; border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.wysiwyg-bar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.install-body { background: var(--bg); }

svg.spark polyline { fill: none; stroke-width: 1.6; }
svg.spark.up polyline { stroke: var(--up); }
svg.spark.down polyline { stroke: var(--down); }
svg.equity { width: 100%; height: auto; }
svg.equity polyline { fill: none; stroke-width: 2; }
svg.equity.up polyline { stroke: var(--up); }
svg.equity.down polyline { stroke: var(--down); }
svg.equity.up .area { fill: rgba(60, 186, 122, 0.16); }
svg.equity.down .area { fill: rgba(225, 93, 74, 0.14); }
svg.equity text, svg.compare text { fill: var(--muted); font-size: 12px; font-family: var(--sans); }
svg.compare { width: min(100%, 420px); height: auto; }
svg.compare .winbar { fill: var(--up); }
svg.compare .lossbar { fill: var(--down); }

.exam-q {
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  gap: 8px;
}
.exam-ans { display: flex; gap: 8px; align-items: center; }
.exam-ans input:not([type="radio"]) { flex: 1; }
.exam-review { padding-left: 1.2em; display: grid; gap: 10px; }
.certificate {
  max-width: 680px;
  margin: 12px auto 32px;
  padding: 36px 28px;
  text-align: center;
  border: 1px solid var(--brass);
  border-radius: 16px;
  background: var(--bg-2);
}
.certificate-name, .certificate-exam {
  font-family: var(--serif);
  font-size: 1.7rem;
  margin: 0.25em 0 0.4em;
}
.banner.ok { background: rgba(60, 186, 122, 0.12); color: var(--text); }

@media (max-width: 980px) {
  .grid-3, .ticker, .stat-grid { grid-template-columns: 1fr 1fr; }
  .pay-grid { grid-template-columns: 1fr; }
  .grid-2, .terminal { grid-template-columns: 1fr; }
  .chart-wrap { height: 320px; }
  .ticket-meta { grid-template-columns: 1fr 1fr; }
  .value-compare { grid-template-columns: 1fr 1fr; }
  .value-arrow { display: none; }
  .range-compare { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  h1 { font-size: clamp(1.55rem, 8vw, 2.4rem); }
  .nav-toggle { display: inline-flex; margin-left: auto; }
  .nav { display: none; width: 100%; flex-basis: 100%; flex-direction: column; align-items: stretch; }
  .nav.is-open { display: flex; }
  .nav-group { width: 100%; }
  .nav-group > summary { width: 100%; }
  .nav-sub {
    position: static;
    display: none;
    min-width: 0;
    box-shadow: none;
    border: 0;
    background: transparent;
    padding: 0 0 0 12px;
  }
  .nav-group[open] > .nav-sub { display: flex; }
  .nav-group:hover > .nav-sub,
  .nav-group:focus-within > .nav-sub { display: none; }
  .nav-group[open]:hover > .nav-sub,
  .nav-group[open]:focus-within > .nav-sub { display: flex; }
  .topbar { flex-wrap: wrap; padding: 10px 12px; }
  .brand small { display: none; }
  .account { width: 100%; justify-content: space-between; }
  .grid-3, .ticker, .stat-grid { grid-template-columns: 1fr; }
  .shell, .site-footer { width: min(100% - 20px, 1180px); }
  .session-bar { flex-wrap: wrap; overflow: visible; gap: 6px; padding: 6px 12px; }
  .session-chip { white-space: nowrap; max-width: 100%; }
  .session-chip span:nth-of-type(2) { display: none; }
  .tape { height: 36px; }
  .tape-track {
    flex-direction: column;
    width: 100%;
    animation-name: tape-y;
    animation-duration: 28s;
  }
  .tape-seq { flex-direction: column; width: 100%; }
  .tape-item {
    height: 36px;
    width: 100%;
    justify-content: space-between;
    padding: 0 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    box-sizing: border-box;
  }
  .ticket-sizers { grid-template-columns: 1fr; }
  .ticket-protect { grid-template-columns: 1fr; }
  .ticket-flag-right { grid-column: 1; justify-content: flex-start; }
  .ticket-meta { grid-template-columns: 1fr; }
  form.filters { display: grid; grid-template-columns: 1fr; align-items: stretch; }
  form.filters > label { flex: none; }
  .cookie-bar p { flex: 1 1 100%; }
  .prose, .help, p, li, td, th, h1, h2, h3 { overflow-wrap: anywhere; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
  .tape-track { animation: none !important; }
  .tape-seq[aria-hidden="true"] { display: none; }
  .tape { overflow-x: auto; height: auto; }
  .tape-track, .tape-seq { flex-direction: row; width: max-content; }
}
.cookie-bar[hidden], .pwa-bar[hidden] { display: none !important; }
.cookie-bar {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 30;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: #1a221c;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  max-width: 920px;
  margin: 0 auto;
}
.pwa-bar { z-index: 29; }
body:has([data-cookie-bar]:not([hidden])) .pwa-bar { bottom: 118px; }
.cookie-bar p { margin: 0; color: var(--muted); font-size: 0.92rem; flex: 1 1 280px; }
.cookie-bar-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pwa-install { margin: 0 0 12px; }
.cookie-video {
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: var(--bg-2);
}
@media print {
  .chrome, .admin-nav, .site-footer, .skip, .flash, .no-print, .cookie-bar, .pwa-bar { display: none !important; }
  body, body::before { background: #fff !important; color: #111; }
  .shell { width: auto; margin: 0; }
  .certificate {
    border-color: #333;
    background: #fff;
    color: #111;
  }
  .help, .muted { color: #444; }
}
