/* ==========================================================================
   Survivor Board — design system
   Warm-neutral dark. Hairlines over fills, one accent, tabular numerals.
   ========================================================================== */

:root {
  /* surfaces */
  --bg: #0e0f0e;
  --panel: #151716;
  --panel-2: #1b1e1c;
  --panel-3: #232725;
  --line: #272b28;
  --line-2: #343a36;

  /* ink */
  --ink: #e9e7e1;
  --ink-2: #a3a79f;
  --ink-3: #71766e;

  /* brand + semantics */
  --accent: #d6474c;
  --accent-dim: #8f2f34;
  --link: #92aede;
  --good: #63a173;
  --good-bg: #16241a;
  --good-line: #274a30;
  --warn: #c8a63c;
  --warn-bg: #241f10;
  --warn-line: #4a3f16;
  --bad: #c96b64;
  --bad-bg: #241514;
  --bad-line: #4a2422;

  /* geometry */
  --r: 10px;
  --r-sm: 6px;
  --r-xs: 3px;
  --ctl: 30px;
  --shell: 1680px;
  --pad: clamp(16px, 2.2vw, 28px);

  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  --sans: ui-sans-serif, -apple-system, "Segoe UI Variable Text", "Segoe UI",
    Inter, Roboto, system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  color-scheme: dark;
  font: 13px/1.45 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--link);
}

::selection {
  background: var(--accent-dim);
  color: #fff;
}

:focus-visible {
  outline: 2px solid #6d8ec4;
  outline-offset: 1px;
}

* {
  scrollbar-color: #333834 transparent;
  scrollbar-width: thin;
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-thumb {
  background: #333834;
  border: 3px solid var(--bg);
  border-radius: 6px;
}

*::-webkit-scrollbar-thumb:hover {
  background: #454b46;
}

/* --------------------------------------------------------------- typography */

h1,
h2,
h3 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(20px, 2.4vw, 26px);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--ink-3);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.lede,
.note,
.hint,
.method,
.foot {
  color: var(--ink-2);
  margin: 0;
}

.lede {
  margin-top: 8px;
  max-width: 62ch;
}

.hint,
.foot,
.method {
  font-size: 12px;
  color: var(--ink-3);
}

.num,
.stat b,
.week-table td,
.ticket-table td,
.sg td {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* ------------------------------------------------------------------- layout */

.shell {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--pad);
}

body.gated:not(.in) .shell {
  display: none;
}

.tabs a[hidden] {
  display: none;
}

.page-head {
  padding: 22px 0 16px;
}

.section {
  margin: 30px 0 0;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
  margin: 0 0 10px;
}

.section-head .hint {
  flex-basis: 100%;
  max-width: 72ch;
  margin: 0;
}

.section-head h2 {
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.foot {
  padding: 22px 0 48px;
  max-width: 96ch;
}

/* ------------------------------------------------------------------- topbar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.topbar-in {
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--pad);
  height: 52px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark {
  width: 18px;
  height: 18px;
  border-radius: var(--r-xs);
  background: var(--accent);
  box-shadow: inset 0 0 0 3px #0e0f0e, 0 0 0 1px var(--accent-dim);
}

.brand-name {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.brand-name b {
  font-weight: 650;
  color: var(--ink-3);
}

.tabs {
  display: flex;
  gap: 2px;
  margin-left: 8px;
}

.tabs a {
  position: relative;
  padding: 6px 10px;
  border-radius: var(--r-sm);
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 550;
  text-decoration: none;
}

.tabs a:hover {
  background: var(--panel-2);
  color: var(--ink);
}

.tabs a.on {
  color: var(--ink);
  background: var(--panel-2);
}

.tabs a.on::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: -12px;
  height: 2px;
  background: var(--accent);
}

.account {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  font-size: 12px;
}

.topbar-in:has(.howto-launch) .account {
  margin-left: 0;
}

.account .who {
  color: var(--ink-2);
  text-decoration: none;
}

.account .who:hover {
  color: var(--ink);
}

.pass-pill {
  padding: 2px 8px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.pass-pill.on {
  border-color: var(--good-line);
  background: var(--good-bg);
  color: var(--good);
}

.pass-pill:hover {
  color: var(--ink);
}

.avatar {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--panel-3);
  border: 1px solid var(--line-2);
  color: var(--ink);
  font-size: 11px;
  font-weight: 650;
  text-transform: uppercase;
}

/* ---------------------------------------------------------------- controls */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: var(--ctl);
  padding: 0 12px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: var(--panel-2);
  color: var(--ink);
  font: inherit;
  font-weight: 550;
  cursor: pointer;
  white-space: nowrap;
}

.btn:hover {
  background: var(--panel-3);
  border-color: #414741;
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
}

.btn-primary:hover {
  background: #e0555a;
  border-color: #e0555a;
}

.btn-quiet {
  background: transparent;
}

.btn-quiet:hover {
  background: var(--panel-2);
}

/* legacy hook kept for JS-rendered buttons */
.ghost {
  height: var(--ctl);
  padding: 0 12px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

.ghost:hover {
  background: var(--panel-2);
}

select,
input[type="number"],
input[type="text"],
input[type="password"],
input[type="email"] {
  height: var(--ctl);
  padding: 0 9px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: var(--panel-2);
  color: var(--ink);
  font: inherit;
}

select {
  padding-right: 26px;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7'%3E%3Cpath fill='%2371766e' d='M0 0h10L5 7z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
}

select:hover,
input:hover {
  border-color: #414741;
}

/* Chrome repaints autofilled fields light; keep them on-theme */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ink);
  box-shadow: 0 0 0 100px var(--panel-2) inset;
  caret-color: var(--ink);
}

select:disabled {
  color: var(--ink-3);
  background-color: var(--panel);
}

input[type="checkbox"] {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--accent);
}

/* toolbar: label above control, grouped on a panel */

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px 18px;
  padding: 14px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.field > span,
.field > label {
  color: var(--ink-3);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.field select,
.field input {
  min-width: 92px;
}

.toolbar-sep {
  align-self: stretch;
  width: 1px;
  background: var(--line);
}

.toolbar-end {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin-left: auto;
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  height: var(--ctl);
  color: var(--ink-2);
  font-size: 12px;
  cursor: pointer;
}

.check:hover {
  color: var(--ink);
}

.legend {
  display: flex;
  align-items: center;
  gap: 8px 10px;
  flex-wrap: wrap;
  margin: 0;
  color: var(--ink-3);
  font-size: 12px;
}

.legend .ramp {
  display: inline-block;
  width: 52px;
  height: 8px;
  border-radius: 99px;
}

.ramp-cell {
  background: linear-gradient(90deg, rgb(110 42 44), rgb(27 31 29), rgb(32 104 57));
}

.ramp-head {
  background: linear-gradient(90deg, rgb(116 44 46), rgb(110 91 36), rgb(42 116 66));
}

/* readout: small inline metric */

.readout {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 0 0 3px;
}

.readout span {
  color: var(--ink-3);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.readout strong {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.readout em {
  max-width: 16ch;
  color: var(--ink-3);
  font-size: 11px;
  font-style: normal;
  line-height: 1.3;
}

.model-notes {
  flex: 1 1 280px;
  min-width: min(100%, 280px);
  max-width: 520px;
}

.model-notes dl {
  display: grid;
  gap: 4px 14px;
  margin: 0;
  padding: 6px 0 2px;
}

.model-notes dl > div {
  display: grid;
  grid-template-columns: minmax(7.5rem, 9.5rem) 1fr;
  gap: 8px;
  align-items: baseline;
}

.model-notes dt {
  margin: 0;
  color: var(--ink);
  font-size: 11px;
  font-weight: 650;
}

.model-notes dd {
  margin: 0;
  color: var(--ink-3);
  font-size: 11px;
  line-height: 1.35;
}

/* disclosure for display filters */

.disclosure {
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--panel-2);
}

.disclosure > summary {
  display: flex;
  align-items: center;
  gap: 7px;
  height: var(--ctl);
  padding: 0 11px;
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 550;
  cursor: pointer;
  list-style: none;
}

.disclosure > summary::-webkit-details-marker {
  display: none;
}

.disclosure > summary::before {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.5px solid var(--ink-3);
  border-bottom: 1.5px solid var(--ink-3);
  transform: rotate(-45deg);
  transition: transform 0.12s ease;
}

.disclosure[open] > summary::before {
  transform: rotate(45deg);
}

.disclosure > summary:hover {
  color: var(--ink);
}

.filter-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 2px 18px;
  padding: 4px 12px 12px;
  border-top: 1px solid var(--line);
  margin-top: -1px;
}

.filter-list label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  color: var(--ink-2);
  cursor: pointer;
}

.filter-list label:hover {
  color: var(--ink);
}

.plan-constraints {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.rebuy-spend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 18px;
  padding: 14px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
}

.rebuy-spend-head {
  display: grid;
  gap: 4px;
  min-width: 220px;
}

.rebuy-spend-head .hint {
  padding: 0;
  max-width: 42ch;
}

.seg {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  overflow: hidden;
}

.seg button {
  margin: 0;
  padding: 8px 16px;
  border: 0;
  border-right: 1px solid var(--line-2);
  border-radius: 0;
  background: var(--panel-2);
  color: var(--ink-2);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.seg button:last-child {
  border-right: 0;
}

.seg button:hover {
  color: var(--ink);
  background: var(--panel-3);
}

.seg button.on {
  background: color-mix(in srgb, var(--accent) 18%, var(--panel-2));
  color: var(--ink);
}

.plan-constraints .disclosure > summary {
  justify-content: flex-start;
}

.plan-constraints .disclosure .hint {
  padding: 0 12px 8px;
}

#lock-status {
  padding: 0 12px 8px;
  white-space: pre-line;
}

.plan-constraints .disclosure > .btn {
  margin: 0 12px 12px;
}

.saved-teams {
  display: grid;
  gap: 12px;
  padding: 4px 12px 12px;
}

.saved-now {
  padding: 14px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
}

.saved-now .eyebrow {
  margin-bottom: 2px;
}

.saved-now .hint {
  margin: 0 0 10px;
}

.conf-label,
.div-label {
  margin: 0 0 6px;
  color: var(--ink-3);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.div-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 12px;
}

.div-group .team-toggles {
  flex-direction: column;
  align-items: stretch;
}

.team-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.team-toggles label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: var(--panel-2);
  color: var(--ink-2);
  font-size: 12px;
  cursor: pointer;
}

.team-toggles label:hover {
  color: var(--ink);
  border-color: #414741;
}

.team-toggles label:has(input:checked) {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, var(--panel-2));
  color: var(--ink);
}

#lock-weeks {
  display: grid;
  gap: 10px;
  padding: 0 12px 10px;
}

.lock-week {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--panel);
}

.lock-week-head {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin-bottom: 8px;
}

.lock-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0;
}

.lock-row .lock-team {
  min-width: 92px;
}

.lock-row .lock-count {
  width: 72px;
  min-width: 0;
}

.lock-week > .btn {
  margin-top: 6px;
}

/* ------------------------------------------------------------------ KPI row */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px;
  margin: 18px 0 0;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
}

.stats:empty {
  display: none;
}

.stat {
  padding: 14px 16px;
  background: var(--panel);
}

.stat b {
  display: block;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.stat span {
  display: block;
  margin-top: 4px;
  color: var(--ink-3);
  font-size: 11px;
}

/* -------------------------------------------------------------------- chips */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  padding: 10px 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-size: 12px;
  color: var(--ink-2);
}

.chip b {
  display: block;
  margin-bottom: 2px;
  color: var(--ink);
  font-size: 13px;
  letter-spacing: 0.02em;
}

/* -------------------------------------------------------------------- pills */

.status {
  display: inline-block;
  padding: 2px 7px;
  border: 1px solid transparent;
  border-radius: var(--r-xs);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.status.alive {
  background: var(--good-bg);
  border-color: var(--good-line);
  color: var(--good);
}

.status.rebuy {
  background: var(--warn-bg);
  border-color: var(--warn-line);
  color: var(--warn);
}

.status.dead {
  background: var(--bad-bg);
  border-color: var(--bad-line);
  color: var(--bad);
}

/* ------------------------------------------------------------------- tables */

.table-wrap,
.grid-wrap {
  overflow: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
}

.table-wrap:empty,
.grid-wrap:empty {
  display: none;
}

.week-table,
.ticket-table {
  width: 100%;
  min-width: 720px;
  border-collapse: separate;
  border-spacing: 0;
}

.week-table th,
.ticket-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 9px 12px;
  background: var(--panel-2);
  border-bottom: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: left;
  white-space: nowrap;
}

.week-table td,
.ticket-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.week-table tbody tr:last-child td,
.ticket-table tbody tr:last-child td {
  border-bottom: 0;
}

.week-table tr.rebuy td {
  background: color-mix(in srgb, var(--warn) 5%, transparent);
}

.week-table tr.dead td {
  color: var(--ink-3);
}

.week-table tbody tr:hover td {
  background: color-mix(in srgb, var(--panel-2) 70%, transparent);
}

.week-table tr.current td {
  box-shadow: inset 2px 0 0 var(--accent);
}

.week-table tr.locked td {
  box-shadow: inset 2px 0 0 var(--ink-3);
}

.ticket-table td:first-child,
.week-table td:first-child {
  color: var(--ink-2);
}

.week-table .note,
.week-table .insight {
  color: var(--ink-2);
  font-size: 12px;
  max-width: 22ch;
}

.week-table .adj {
  color: var(--ink-3);
  font-size: 11px;
}

.ticket-table .hold {
  background: var(--good-bg);
  color: var(--good);
  font-weight: 600;
}

.ticket-table td {
  padding: 4px;
}

.ticket-table select.pick {
  width: 100%;
  min-width: 62px;
  max-width: 84px;
  height: 28px;
  padding: 0 4px;
  border: 1px solid transparent;
  border-radius: var(--r-xs);
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 12px;
}

.ticket-table select.pick:focus {
  outline: 0;
  border-color: var(--line-2);
  background: var(--panel);
}

.ticket-table td.win {
  background: var(--good-bg);
  color: var(--good);
}

.ticket-table td.loss {
  background: var(--bad-bg);
  color: var(--bad);
}

.ticket-table td.locked select.pick {
  font-weight: 650;
}

.ticket-table tr.dead td {
  opacity: 0.55;
}

.track-week tbody tr {
  cursor: pointer;
}

.slate-bar {
  display: grid;
  gap: 12px;
  margin: 16px 0 0;
  padding: 14px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
}

.slate-weeks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}

.slate-weeks > span {
  color: var(--ink-3);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.week-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.week-chip {
  min-width: 28px;
  height: 26px;
  padding: 0 7px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-xs);
  background: var(--panel-2);
  color: var(--ink-2);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.week-chip:hover {
  color: var(--ink);
}

.week-chip.on {
  background: color-mix(in srgb, var(--warn) 18%, var(--panel-2));
  border-color: var(--warn-line);
  color: var(--ink);
}

.slate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.slate-actions .btn {
  font-size: 12px;
}

.week-table .check-col,
.week-table .lock-col {
  width: 1%;
  white-space: nowrap;
}

.week-table .check-col {
  text-align: center;
}

.lock-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-2);
  font-size: 12px;
  cursor: pointer;
}

.lock-cell input {
  margin: 0;
  accent-color: var(--warn);
}

.lock-cell:has(input:disabled) {
  opacity: 0.55;
  cursor: default;
}

/* result toggle */

.res {
  height: 24px;
  margin-right: 4px;
  padding: 0 9px;
  background: var(--panel-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-xs);
  color: var(--ink-2);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.res:hover:not(:disabled) {
  color: var(--ink);
  border-color: #414741;
}

.res.on.win {
  background: var(--good-bg);
  border-color: var(--good-line);
  color: var(--good);
  font-weight: 600;
}

.res.on.loss {
  background: var(--bad-bg);
  border-color: var(--bad-line);
  color: var(--bad);
  font-weight: 600;
}

.res:disabled {
  cursor: default;
}

.res:disabled:not(.on) {
  opacity: 0.4;
}

.res-read {
  display: inline-block;
  min-width: 2.6rem;
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 650;
}

.res-read.win {
  color: var(--good);
}

.res-read.loss {
  color: var(--bad);
}

.pick-locked {
  display: inline-block;
  font-weight: 650;
}

/* ---------------------------------------------------------------- the grid */

.sg {
  border-collapse: separate;
  border-spacing: 0;
  min-width: 1280px;
  font-size: 12px;
}

.sg th,
.sg td {
  padding: 0;
  border-right: 1px solid #1f2321;
  border-bottom: 1px solid #1f2321;
  text-align: center;
  white-space: nowrap;
}

.sg thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  padding: 7px 6px;
  background: var(--panel-2);
  color: var(--ink-3);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  user-select: none;
}

.sg thead th:hover {
  color: var(--ink);
}

.sg .info {
  display: inline-grid;
  place-items: center;
  width: 13px;
  height: 13px;
  margin-left: 3px;
  padding: 0;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  font: 700 9px/1 var(--sans);
  letter-spacing: 0;
  text-transform: none;
  opacity: 0.65;
  cursor: help;
  vertical-align: 1px;
}

.sg .info:hover,
.sg .info:focus-visible {
  opacity: 1;
  color: var(--ink);
}

.col-tip {
  position: fixed;
  z-index: 50;
  max-width: 240px;
  padding: 8px 10px;
  background: var(--panel-3);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  color: var(--ink);
  font-size: 12px;
  line-height: 1.4;
  box-shadow: 0 10px 28px rgb(0 0 0 / 45%);
  pointer-events: none;
}

.sg thead th:nth-child(-n + 4),
.sg tbody td:nth-child(-n + 4) {
  position: sticky;
  z-index: 2;
  background: var(--panel);
}

.sg thead th:nth-child(1) { left: 0; }
.sg tbody td:nth-child(1) { left: 0; }
.sg thead th:nth-child(2) { left: 54px; }
.sg tbody td:nth-child(2) { left: 54px; }
.sg thead th:nth-child(3) { left: 108px; }
.sg tbody td:nth-child(3) { left: 108px; }
.sg thead th:nth-child(4) { left: 162px; z-index: 3; }
.sg tbody td:nth-child(4) {
  left: 162px;
  z-index: 3;
  border-right: 1px solid var(--line-2);
}

.sg thead th:nth-child(-n + 4) {
  z-index: 4;
  background: var(--panel-2);
}

.sg thead th:nth-child(4) {
  border-right: 1px solid var(--line-2);
}

.sg .num {
  width: 54px;
  padding: 7px 8px;
  color: var(--ink-2);
}

.sg .ev-col {
  color: var(--ink);
  font-weight: 600;
}

.sg .team-col {
  min-width: 56px;
  padding: 3px 4px;
}

/* team chip: tinted by brand color, not a solid block */
.sg .badge,
.roster .badge {
  --team: #4a4f4a;
  display: block;
  padding: 6px 7px;
  border-radius: var(--r-xs);
  background: var(--panel-3);
  background: color-mix(in srgb, var(--team) 26%, var(--panel-2));
  box-shadow: inset 3px 0 0 var(--team);
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
}

.sg .badge:hover,
.roster .badge:hover {
  background: color-mix(in srgb, var(--team) 40%, var(--panel-2));
}

.sg .badge.used,
.roster .badge.used {
  background: transparent;
  box-shadow: inset 3px 0 0 #343834;
  color: var(--ink-3);
  text-decoration: line-through;
}

.sg .week-head {
  min-width: 58px;
  line-height: 1.15;
  padding: 5px 2px;
}

.sg .week-head .wn {
  display: block;
  font-size: 12px;
  font-weight: 650;
}

.sg .week-head .we {
  display: block;
  font-size: 10px;
  font-weight: 500;
  opacity: 0.72;
}

.sg .week-head.current {
  box-shadow: inset 0 -2px 0 var(--ink);
}

.sg .cell {
  display: block;
  width: 58px;
  min-height: 40px;
  padding: 4px 2px 3px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: 11px/1.25 var(--sans);
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}

.sg .cell .meta {
  font-size: 10px;
}

.sg .cell:hover {
  box-shadow: inset 0 0 0 1px var(--ink-2);
}

.sg .cell .opp {
  font-weight: 650;
  letter-spacing: 0.02em;
}

.sg .cell div:last-child {
  color: color-mix(in srgb, var(--ink) 70%, transparent);
}

.sg .cell.bye {
  background: #131513;
  color: #4c504b;
  font-size: 10px;
  letter-spacing: 0.08em;
  cursor: default;
}

.sg .cell.dim {
  opacity: 0.26;
}

.sg tbody tr.used .cell {
  opacity: 0.34;
}

.sg tbody td.current {
  box-shadow: inset 0 0 0 1px #6d8ec4;
}

/* -------------------------------------------------------------------- sheet */

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 40;
  width: min(420px, 100%);
  height: 100%;
  overflow: auto;
  padding: 20px 22px 40px;
  background: var(--panel);
  border-left: 1px solid var(--line-2);
}

.backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgb(0 0 0 / 55%);
}

.drawer .close {
  float: right;
  height: 26px;
  padding: 0 10px;
  background: var(--panel-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  color: var(--ink-2);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.drawer .close:hover {
  color: var(--ink);
}

.drawer-more {
  margin-top: 14px;
}

.drawer-more .sources {
  padding: 8px 12px 12px;
}

.drawer h3 {
  margin: 2px 0 4px;
  font-size: 17px;
}

.drawer h2 {
  margin: 22px 0 8px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.drawer dl {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 0;
  margin: 14px 0 0;
}

.drawer dt,
.drawer dd {
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
  margin: 0;
}

.drawer dt {
  color: var(--ink-3);
}

.drawer dd {
  font-variant-numeric: tabular-nums;
}

.sources {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.sources th {
  padding: 0 0 6px;
  color: var(--ink-3);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: left;
}

.sources td {
  padding: 6px 8px 6px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
}

.sources .num {
  text-align: right;
  color: var(--ink);
}

.spark {
  display: block;
  width: 100%;
  height: 72px;
  margin: 8px 0 12px;
}

.spark path {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.8;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.spark circle {
  fill: var(--accent, #d6474c);
}

.spark text {
  fill: var(--ink-3);
  font-size: 9px;
}

.spark .spark-now {
  fill: var(--ink);
  font-size: 10px;
  font-weight: 650;
}

.sources .safer {
  color: var(--good);
}

.sources .softer {
  color: var(--bad);
}

/* ------------------------------------------------------------ entry panels */

.entry-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.entry-tabs .tab {
  min-width: 50px;
  padding: 7px 9px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--ink);
  font: inherit;
  font-weight: 650;
  text-align: center;
  cursor: pointer;
}

.entry-tabs .tab:hover {
  border-color: var(--line-2);
  background: var(--panel-2);
}

.entry-tabs .tab small {
  display: block;
  margin-top: 2px;
  color: var(--ink-3);
  font-size: 9px;
  font-weight: 550;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.entry-tabs .tab.on {
  border-color: var(--accent-dim);
  background: color-mix(in srgb, var(--accent) 14%, var(--panel));
}

.entry-tabs .tab.alive small {
  color: var(--good);
}

.entry-tabs .tab.rebuy small {
  color: var(--warn);
}

.entry-tabs .tab.dead {
  opacity: 0.5;
}

.entry-tabs .tab.dead small {
  color: var(--bad);
}

.entry-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.entry-head input {
  min-width: 160px;
  font-size: 14px;
  font-weight: 600;
}

.entry-head .note {
  flex: 1 1 100%;
  font-size: 12px;
  color: var(--ink-3);
}

.roster {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0 0 16px;
}

.roster .badge {
  display: inline-block;
  min-width: 40px;
  text-align: center;
  cursor: default;
}

/* ------------------------------------------------------------------ account */

.account-shell {
  max-width: 440px;
  margin: 0 auto;
  padding: 48px var(--pad) 72px;
}

.auth-hero {
  margin: 0 0 22px;
}

.auth-hero h1 {
  margin: 0;
}

.auth-hero .lede {
  margin-top: 8px;
}

.account-card {
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
}

.auth-card {
  display: grid;
  gap: 16px;
}

.auth-seg {
  width: 100%;
}

.auth-seg button {
  flex: 1;
}

.auth-card .field {
  margin: 0;
  color: var(--ink-3);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.auth-card .field .hint {
  margin-left: 6px;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
}

.auth-card input {
  width: 100%;
  text-transform: none;
  letter-spacing: normal;
  font-weight: 400;
  font-size: 13px;
}

.auth-card .btn {
  width: 100%;
  height: 36px;
  margin-top: 4px;
}

.google-slot {
  display: grid;
  justify-items: stretch;
  gap: 16px;
}

.google-slot[hidden] {
  display: none;
}

#google-btn {
  display: grid;
  justify-items: stretch;
  min-height: 40px;
}

#google-btn iframe,
#google-btn > div {
  width: 100% !important;
}

.auth-split {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-split::before,
.auth-split::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.auth-msg {
  margin: 0 0 16px;
  padding: 10px 12px;
  background: var(--bad-bg);
  border: 1px solid var(--bad-line);
  border-radius: var(--r-sm);
  color: var(--bad);
}

.auth-msg.ok {
  background: var(--good-bg);
  border-color: var(--good-line);
  color: var(--good);
}

.pass-card {
  display: grid;
  gap: 18px;
}

.pass-card.is-buy {
  border-top: 2px solid var(--accent);
}

.pass-amount {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.pass-amount b {
  color: var(--ink);
  font-size: 36px;
  font-weight: 650;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.pass-amount span {
  color: var(--ink-3);
  font-size: 12px;
}

.pass-list {
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--ink-2);
}

.pass-list li {
  position: relative;
  margin: 0;
  padding: 7px 0 7px 22px;
}

.pass-list li + li {
  border-top: 1px solid var(--line);
}

.pass-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 13px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.pass-code {
  display: grid;
  gap: 6px;
  color: var(--ink-3);
  font-size: 12px;
}

.pass-code input {
  width: 100%;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
}

.pass-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pass-actions .btn {
  min-height: 36px;
}

.pass-actions .btn-primary {
  flex: 1;
}

.pass-card > .hint {
  margin: 0;
}

.btn:disabled {
  opacity: 0.65;
  cursor: wait;
}

.pool-card {
  margin: 0 0 12px;
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
}

.pool-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.pool-name {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  font-weight: 600;
}

.pool-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px 14px;
}

.pool-fields label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: var(--ink-3);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.pool-math {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 12px 0;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

.ticket-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ticket-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--panel-2);
  color: var(--ink);
  font-size: 12px;
}

.ticket-check.off {
  opacity: 0.45;
}

.ticket-check small {
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#add-pool {
  margin-top: 4px;
}

.admin-wrap .table-wrap {
  margin-top: 18px;
}

.traffic-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0 18px;
}

.traffic-stats div {
  display: grid;
  gap: 4px;
}

.traffic-stats b {
  font-size: 28px;
  letter-spacing: -0.04em;
}

.traffic-stats span {
  color: var(--ink-3);
  font-size: 12px;
}

@media (max-width: 860px) {
  .traffic-stats {
    grid-template-columns: 1fr 1fr;
  }
}

/* ------------------------------------------------------------------ responsive */

@media (max-width: 860px) {
  .div-grid {
    grid-template-columns: 1fr 1fr;
  }

  .topbar-in {
    height: auto;
    flex-wrap: wrap;
    gap: 10px 16px;
    padding: 10px var(--pad);
  }

  .tabs {
    margin-left: 0;
    order: 3;
    flex-basis: 100%;
  }

  .tabs a.on::after {
    bottom: -10px;
  }

  .account {
    margin-left: auto;
  }

  .topbar-in:has(.howto-launch) .account {
    margin-left: 0;
  }

  .account-shell {
    padding-top: 28px;
  }

  .toolbar-end {
    margin-left: 0;
  }

  .page-head {
    padding: 16px 0 12px;
  }

  .sg thead th:nth-child(3),
  .sg tbody td:nth-child(3) {
    display: none;
  }

  .sg thead th:nth-child(4),
  .sg tbody td:nth-child(4) {
    left: 108px;
  }

  .sg .cell {
    width: 52px;
    font-size: 10px;
  }
}

/* ----------------------------------------------------------------- backtest */

.page-backtest .section {
  margin-top: 36px;
}

.page-backtest .week-table td.good {
  color: var(--good);
}

.page-backtest .week-table td.bad {
  color: var(--bad);
}

.bt-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin: 12px 0 10px;
}

.bt-swatch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-2);
  font-size: 12px;
}

.bt-swatch::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--ink-3);
}

.bt-swatch.engine::before { background: var(--accent); }
.bt-swatch.posted::before { background: var(--ink-2); }
.bt-swatch.public::before { background: var(--link); }
.bt-swatch.spread::before { background: var(--good); }

.bt-chart {
  display: grid;
  grid-template-columns: repeat(13, minmax(0, 1fr));
  gap: 8px;
  height: 180px;
  margin: 8px 0 18px;
  padding: 12px 8px 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
}

.bt-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  height: 100%;
}

.bt-bars {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  flex: 1;
  width: 100%;
}

.bt-bars i {
  display: block;
  width: 22%;
  min-height: 1px;
  background: var(--ink-3);
}

.bt-bars i.engine { background: var(--accent); }
.bt-bars i.posted { background: var(--ink-2); }
.bt-bars i.public { background: var(--link); }
.bt-bars i.spread { background: var(--good); }

.bt-col > span {
  margin-top: 6px;
  color: var(--ink-3);
  font-size: 11px;
}

.table-wrap {
  overflow-x: auto;
}

.page-backtest .bt-sub {
  margin: 22px 0 6px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--ink);
}

.page-backtest .section > .hint + .hint,
.page-backtest .section > .method {
  margin-top: 10px;
  max-width: 72ch;
}

.page-backtest .section > .hint {
  max-width: 72ch;
}

.bt-hline {
  display: grid;
  grid-template-columns: minmax(7.5rem, 10rem) minmax(0, 1fr) 2.6rem 2.8rem;
  gap: 10px;
  align-items: center;
  padding: 5px 10px;
  border-bottom: 1px solid var(--line);
}

.bt-hline:first-child {
  margin-top: 10px;
  border-top: 1px solid var(--line);
}

.bt-hline.on {
  background: var(--good-bg);
}

.bt-hline-lab {
  color: var(--ink-2);
  font-size: 12px;
}

.bt-hline.on .bt-hline-lab {
  color: var(--ink);
}

.bt-hline-track {
  height: 8px;
  background: var(--panel-3);
  border-radius: 99px;
  overflow: hidden;
}

.bt-hline-track i {
  display: block;
  height: 100%;
  background: var(--ink-2);
}

.bt-hline.on .bt-hline-track i {
  background: var(--good);
}

.bt-hline-n,
.bt-hline-sub {
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: var(--ink-3);
  text-align: right;
}

.bt-hline.on .bt-hline-n {
  color: var(--ink);
}

.gap-row {
  display: grid;
  grid-template-columns: minmax(8.5rem, 14rem) minmax(0, 1fr) 3.2rem;
  gap: 10px;
  align-items: center;
  padding: 4px 0;
}

.gap-row:first-child {
  margin-top: 12px;
}

.gap-name {
  color: var(--ink-2);
  font-size: 12px;
}

.gap-track {
  position: relative;
  height: 8px;
  background: var(--panel-3);
  border-radius: 99px;
  overflow: hidden;
}

.gap-zero {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--line-2);
}

.gap-track i {
  position: absolute;
  top: 0;
  bottom: 0;
}

.gap-track i.pos { background: var(--good); }
.gap-track i.neg { background: var(--bad); }

.gap-n {
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  text-align: right;
}

.gap-n.pos { color: var(--good); }
.gap-n.neg { color: var(--bad); }

.insight-notes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1px;
  margin: 18px 0;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
}

.insight-note {
  padding: 12px 14px;
  background: var(--panel);
}

.insight-note-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}

.insight-note-top b {
  font-size: 13px;
  font-weight: 600;
}

.insight-note-top span {
  flex: none;
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  color: var(--ink-3);
}

.insight-note-top span.good { color: var(--good); }
.insight-note-top span.bad { color: var(--bad); }

.insight-note p {
  margin: 6px 0 0;
  color: var(--ink-2);
  font-size: 12px;
  max-width: 46ch;
}

@media (max-width: 640px) {
  .bt-hline {
    grid-template-columns: minmax(0, 1fr) 2.4rem 2.6rem;
  }

  .bt-hline-lab {
    grid-column: 1 / -1;
  }

  .gap-row {
    grid-template-columns: minmax(0, 1fr) 3rem;
  }

  .gap-name {
    grid-column: 1 / -1;
  }
}

/* ------------------------------------------------------------------ How to use */

.howto-launch {
  margin-left: auto;
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: var(--panel-2);
  color: var(--ink-2);
  font: inherit;
  font-size: 12px;
  font-weight: 550;
  cursor: pointer;
}

.howto-launch:hover {
  color: var(--ink);
  border-color: var(--warn-line);
}

html.howto-on,
body.howto-on {
  overflow: hidden !important;
}

#howto {
  position: fixed;
  inset: 0;
  z-index: 80;
  pointer-events: none;
}

#howto[hidden] {
  display: none;
}

.howto-dim {
  position: absolute;
  inset: 0;
  background: rgba(6, 7, 6, 0.62);
  pointer-events: auto;
}

.howto-spot {
  position: fixed;
  border: 2px solid var(--warn);
  border-radius: 6px;
  box-shadow: 0 0 0 9999px rgba(6, 7, 6, 0.62), 0 0 0 1px #1a1608;
  pointer-events: none;
}

#howto:has(#howto-spot:not([hidden])) .howto-dim {
  background: transparent;
}

.howto-card {
  position: fixed;
  left: var(--pad);
  bottom: var(--pad);
  width: min(380px, calc(100vw - 32px));
  padding: 16px 16px 14px;
  background: #161410;
  border: 1px solid #3d3620;
  border-left: 3px solid var(--warn);
  border-radius: 2px 8px 8px 2px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  pointer-events: auto;
}

.howto-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.howto-face {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 2px;
  background:
    linear-gradient(180deg, #3a3420 0%, #241f10 100%);
  box-shadow: inset 0 0 0 1px #4a3f16;
  position: relative;
}

.howto-face::before {
  content: "";
  position: absolute;
  inset: 9px 10px 14px;
  border: 1.5px solid var(--warn);
  border-radius: 50%;
}

.howto-face::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  height: 6px;
  border: 1.5px solid var(--warn);
  border-top: 0;
  border-radius: 0 0 8px 8px;
}

.howto-kicker,
.howto-step {
  margin: 0;
  color: var(--warn);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.howto-step {
  color: #8a7a3c;
  margin-top: 2px;
}

.howto-card.is-right {
  left: auto;
  right: var(--pad);
}

.howto-card h2 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.howto-body {
  margin: 0 0 14px;
  color: #c8c3b4;
  font-size: 13px;
  line-height: 1.5;
}

.howto-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.howto-next {
  background: var(--warn);
  border-color: var(--warn);
  color: #1a1608;
  font-weight: 700;
}

.howto-next:hover {
  filter: brightness(1.06);
}

.howto-back:disabled {
  opacity: 0.35;
  cursor: default;
}

@media (max-width: 720px) {
  .howto-card {
    left: 12px;
    right: 12px;
    width: auto;
    bottom: 12px;
  }
}
