/* Quantum Mining Flywheel — "loam" theme
   Soil-dark grounds, bone text, terracotta for actions, ochre for SOL, moss for live. */

/* Fonts are served from this site (SIL Open Font License, see /fonts/LICENSE-*.txt). */
@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Martian Mono";
  src: url("/fonts/martian-mono.woff2") format("woff2-variations");
  font-weight: 100 800;
  font-stretch: 75% 112.5%;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #17140f;
  --bg-2: #1e1a14;
  --bg-3: #27211a;
  --bg-4: #312a20;
  --line: #3a3128;
  --line-2: #4d4235;
  --text: #ede5d4;
  --text-2: #bfb39c;
  --text-3: #8a7e6c;
  --clay: #c8683d;
  --clay-2: #e07e50;
  --clay-deep: #8f4426;
  --clay-soft: rgba(200, 104, 61, .14);
  --ochre: #d9a443;
  --moss: #8f9d5c;
  --warn: #e0896a;

  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "Martian Mono", ui-monospace, Menlo, Consolas, monospace;
  --r: 6px;
  --side: 232px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh;
  background: var(--bg); color: var(--text);
  font: 400 15px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}
/* faint soil grain */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .5;
  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='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .55 0 0 0 0 .45 0 0 0 0 .33 0 0 0 .06 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
a { color: inherit; }
button, input { font: inherit; color: inherit; }
::selection { background: var(--clay); color: var(--bg); }
:focus-visible { outline: 2px solid var(--ochre); outline-offset: 2px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 99; background: var(--clay); color: var(--bg); padding: 8px 12px; }
small { font-size: .62em; color: var(--text-3); font-weight: 400; letter-spacing: .02em; margin-left: 6px; }

/* ───────── shell ───────── */
.shell { position: relative; z-index: 1; display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  border-right: 1px solid var(--line); background: rgba(23, 20, 15, .92); padding: 20px 14px;
}
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; padding: 4px 8px 22px; }
.brand__mark { width: 28px; height: 28px; color: var(--text); flex-shrink: 0; transition: transform .9s cubic-bezier(.2,.7,.1,1); }
.brand:hover .brand__mark { transform: rotate(72deg); }
.brand__word { display: flex; flex-direction: column; line-height: 1; }
.brand__word b { font-weight: 800; font-size: 13px; letter-spacing: .01em; font-variation-settings: "wdth" 100; text-transform: uppercase; white-space: nowrap; }
.brand__word span { font: 400 9.5px/1 var(--mono); letter-spacing: .3em; text-transform: uppercase; color: var(--clay-2); margin-top: 5px; }

.tabs { display: flex; flex-direction: column; gap: 2px; }
.tabs a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r);
  text-decoration: none; color: var(--text-2); font-weight: 500; font-size: 14px;
}
.tabs svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.tabs a:hover { background: var(--bg-3); color: var(--text); }
.tabs a[aria-current="page"] { background: var(--bg-4); color: var(--text); box-shadow: inset 2px 0 0 var(--clay); }
.tabs a[aria-current="page"] svg { color: var(--clay-2); }

.side__foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding: 0 8px; }
.live { display: inline-flex; align-items: center; gap: 8px; font: 500 11px/1 var(--mono); color: var(--text-2); }
.live i { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); }
.live[data-state="live"] i { background: var(--moss); box-shadow: 0 0 0 3px rgba(143,157,92,.18); }
.live[data-state="down"] i { background: var(--warn); }
.testchip { font: 500 10px/1.3 var(--mono); color: var(--ochre); border: 1px dashed rgba(217,164,67,.5); border-radius: 4px; padding: 6px 8px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { height: 64px; display: flex; align-items: center; padding: 0 36px; border-bottom: 1px solid var(--line); background: rgba(23,20,15,.85); position: sticky; top: 0; z-index: 10; backdrop-filter: blur(6px); }
.top__brand { display: none; align-items: center; gap: 8px; text-decoration: none; }
.top__word { display: flex; flex-direction: column; line-height: 1; }
.top__word b { font-weight: 800; font-size: 12px; text-transform: uppercase; white-space: nowrap; }
.top__word span { font: 400 9px/1 var(--mono); letter-spacing: .3em; text-transform: uppercase; color: var(--clay-2); margin-top: 4px; }
.top__right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.iconbtn { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--r); color: var(--text-2); }
.iconbtn:hover { background: var(--bg-3); color: var(--text); }
.iconbtn svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 1.8; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; height: 36px; padding: 0 16px; border-radius: var(--r);
  font-size: 13px; font-weight: 600; text-decoration: none; cursor: pointer; border: 1px solid var(--line-2); background: transparent; white-space: nowrap;
}
.btn--ghost:hover { border-color: var(--text-3); background: var(--bg-3); }
.btn--clay { background: var(--clay); border-color: var(--clay); color: #1a120c; }
.btn--clay:hover { background: var(--clay-2); border-color: var(--clay-2); }

main { flex: 1; padding: 40px 36px 120px; max-width: 1280px; width: 100%; }
.view { animation: fade .25s ease-out; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } }

/* ───────── shared type ───────── */
.label { font: 500 10.5px/1 var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--text-3); display: flex; justify-content: space-between; }
.label output { color: var(--text); }
.hint, .note { font-size: 12.5px; color: var(--text-3); }
.note { margin: 14px 0 0; }
.msg { margin: 0; min-height: 18px; font-size: 13px; color: var(--text-2); }
.msg[data-level="error"] { color: var(--warn); }
.input {
  height: 44px; width: 100%; padding: 0 14px; border-radius: var(--r);
  border: 1px solid var(--line-2); background: var(--bg); color: var(--text); font: 400 13px/1 var(--mono);
}
.input::placeholder { color: var(--text-3); }
.input:focus { outline: none; border-color: var(--clay); }
.input[aria-invalid="true"] { border-color: var(--warn); }

.pagehead { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.pagehead h1 { margin: 0; font-weight: 800; font-size: 34px; letter-spacing: -.02em; font-variation-settings: "wdth" 90; }

.card { background: var(--bg-2); border: 1px solid var(--line); border-radius: calc(var(--r) + 2px); padding: 22px 24px; min-width: 0; }
.card--flush { padding: 6px 0 0; }
.card--flush .table th:first-child, .card--flush .table td:first-child { padding-left: 24px; }
.card__title { margin: 0 0 16px; font-weight: 700; font-size: 16px; letter-spacing: -.005em; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.cols--wide { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }

/* ───────── MINE ───────── */
.intro { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; align-items: end; margin: 12px 0 28px; }
.display { margin: 0; font-weight: 800; font-size: clamp(36px, 4.6vw, 64px); line-height: .98; letter-spacing: -.03em; font-variation-settings: "wdth" 84; }
.display span { color: var(--clay-2); }
.intro__side { margin: 0; color: var(--text-2); font-size: 14px; line-height: 1.55; }

.console {
  display: grid; grid-template-columns: 300px minmax(0, 1fr) 200px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: calc(var(--r) + 4px); overflow: hidden;
}
.console > * { padding: 22px; min-width: 0; }
.console__rig { border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 16px; }
.console__turn { display: flex; align-items: stretch; }
.console__stats { margin: 0; border-left: 1px solid var(--line); display: flex; flex-direction: column; justify-content: space-between; gap: 18px; }
.console__stats dt { font-size: 12px; color: var(--text-3); }
.console__stats dd { margin: 6px 0 0; font: 500 26px/1 var(--mono); font-variation-settings: "wdth" 85; letter-spacing: -.03em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.console__stats dd small { font-size: 11px; letter-spacing: 0; }
.console__stats div:nth-child(2) dd, .console__stats div:nth-child(3) dd { color: var(--ochre); }

.righead { display: flex; align-items: center; gap: 12px; }
.righead__icon, .rigbar__icon { width: 34px; height: 34px; border: 1.5px solid var(--ochre); border-radius: 4px; display: inline-flex; gap: 3px; padding: 5px; flex-shrink: 0; }
.righead__icon i, .rigbar__icon i { flex: 1; background: rgba(217,164,67,.35); border-radius: 1px; }
.mining .righead__icon i, .mining .rigbar__icon i { animation: rack 1.2s ease-in-out infinite; background: var(--ochre); }
.mining .righead__icon i:nth-child(2), .mining .rigbar__icon i:nth-child(2) { animation-delay: .2s; }
.mining .righead__icon i:nth-child(3), .mining .rigbar__icon i:nth-child(3) { animation-delay: .4s; }
@keyframes rack { 50% { opacity: .35; } }
.righead__text { display: flex; flex-direction: column; line-height: 1.2; }
.righead__text small { margin: 0; font-size: 12px; }
.righead__text b { font-size: 15px; }
#rig-status[data-state="mining"] { color: var(--moss); }
#rig-status[data-state="error"] { color: var(--warn); }

.field { display: flex; flex-direction: column; gap: 8px; }
.holdreq { margin: -4px 0 0; display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border-radius: var(--r); background: rgba(217,164,67,.09); border: 1px solid rgba(217,164,67,.28); }
.holdreq b { font: 600 12px/1.2 var(--mono); color: var(--ochre); letter-spacing: .02em; }
.holdreq > span { font-size: 12px; color: var(--text-2); line-height: 1.4; }
.payclock { color: var(--text) !important; }
.seg { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.seg legend { padding: 0; margin-bottom: 8px; width: 100%; }
.seg label { position: relative; }
.seg input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.seg span { display: flex; align-items: center; justify-content: center; height: 36px; border-radius: var(--r); border: 1px solid var(--line-2); font: 600 12px/1 var(--mono); color: var(--text-2); }
.seg input:checked + span { background: var(--bg-4); border-color: var(--clay); color: var(--text); }
.seg input:focus-visible + span { outline: 2px solid var(--ochre); outline-offset: 2px; }
.seg input:disabled + span { opacity: .35; text-decoration: line-through; }
.seg input:disabled { cursor: not-allowed; }

.tune { border-top: 1px solid var(--line); padding-top: 12px; }
.tune summary { cursor: pointer; font-size: 12.5px; color: var(--text-2); list-style: none; display: block; }
.tune__device { display: block; margin-top: 4px; }
.tune summary::-webkit-details-marker { display: none; }
.tune summary::before { content: "+ "; color: var(--clay-2); font-family: var(--mono); }
.tune[open] summary::before { content: "− "; }
.tune__device { font: 400 10.5px/1.4 var(--mono); color: var(--text-3); }
.sliders { display: grid; gap: 14px; margin-top: 14px; }
.slider { display: flex; flex-direction: column; gap: 10px; }
.slider input { -webkit-appearance: none; appearance: none; width: 100%; height: 16px; background: transparent; cursor: pointer; }
.slider input::-webkit-slider-runnable-track { height: 3px; background: var(--line-2); border-radius: 2px; }
.slider input::-moz-range-track { height: 3px; background: var(--line-2); border-radius: 2px; }
.slider input::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -5.5px; border-radius: 50%; background: var(--clay-2); border: 0; }
.slider input::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--clay-2); border: 0; }
.slider input:disabled { opacity: .4; }

.go {
  min-height: 92px; border: 0; border-radius: var(--r); cursor: pointer;
  background: var(--clay); color: #1a120c; font-weight: 800; font-size: 22px; line-height: 1;
  letter-spacing: -.01em; font-variation-settings: "wdth" 92;
  transition: background .15s, transform .1s;
}
.go:hover { background: var(--clay-2); }
.go:active { transform: translateY(1px); }
.go[data-running="true"] { background: var(--bg-4); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.go[data-running="true"]:hover { box-shadow: inset 0 0 0 1px var(--warn); color: var(--warn); }

/* turn strip */
.turnstrip { flex: 1; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.turnstrip__head { display: flex; justify-content: space-between; align-items: baseline; font-size: 15px; }
.turnstrip__head b { font-weight: 700; }
.turnstrip__head > span { color: var(--text-3); font-size: 12px; }
.turnstrip__head .js-clock { font: 500 18px/1 var(--mono); color: var(--text); margin-right: 4px; font-variant-numeric: tabular-nums; }
.cells { display: grid; grid-template-columns: repeat(60, minmax(0, 1fr)); gap: 3px; height: 44px; }
.turnstrip--lg .cells { grid-template-columns: repeat(30, minmax(0, 1fr)); grid-auto-rows: 1fr; height: auto; flex: 1; min-height: 170px; gap: 4px; }
.cells i { position: relative; border-radius: 2px; background: var(--bg-3); overflow: hidden; }
.cells i::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: var(--h, 0%); background: var(--clay); border-radius: 2px; transition: height .4s ease-out; }
.cells i.past { background: var(--bg-4); }
.cells i.now { background: var(--bg-4); box-shadow: inset 0 0 0 1px var(--ochre); animation: nowcell 1s steps(2, jump-none) infinite; }
@keyframes nowcell { 50% { box-shadow: inset 0 0 0 1px transparent; } }
.turnstrip__foot { font-size: 12px; color: var(--text-3); }

.tokenline { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 16px; flex-wrap: wrap; }
.ca { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-2); max-width: 100%; overflow: hidden; }
.ca__label { font: 700 11px/1 var(--mono); padding: 11px 12px; background: var(--bg-3); color: var(--ochre); }
.ca code { font: 400 12px/1 var(--mono); color: var(--text-2); padding: 11px 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ca__copy { border: 0; border-left: 1px solid var(--line); background: transparent; color: var(--text-2); font: 600 11px/1 var(--mono); padding: 11px 12px; cursor: pointer; }
.ca__copy:hover { color: var(--clay-2); }
.tokenline__split { margin: 0; font: 400 12px/1.4 var(--mono); color: var(--text-3); }

.kv { margin: 0; display: grid; grid-template-columns: 1fr 1fr; }
.kv > div { padding: 12px 0; border-bottom: 1px solid var(--line); }
.kv > div:nth-child(odd) { padding-right: 16px; }
.kv > div:nth-last-child(-n+2) { border-bottom: 0; }
.kv dt { font-size: 12px; color: var(--text-3); }
.kv dd { margin: 6px 0 0; font: 500 17px/1.1 var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kv dd small { font-size: 11px; margin: 0; }
.kv a { color: var(--clay-2); text-decoration: none; }

.facts { margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.facts dt { font-size: 12px; color: var(--text-3); }
.facts dd { margin: 10px 0 6px; font: 500 30px/1 var(--mono); font-variation-settings: "wdth" 85; letter-spacing: -.03em; color: var(--ochre); }
.facts > div > span { font-size: 12px; color: var(--text-3); line-height: 1.35; display: block; }

/* ───────── inner pages ───────── */
.band { display: flex; align-items: stretch; gap: 0; background: var(--bg-2); border: 1px solid var(--line); border-radius: calc(var(--r) + 2px); overflow: hidden; }
.band .turnstrip { padding: 18px 22px; }
.band__stat { width: 210px; flex-shrink: 0; border-left: 1px solid var(--line); padding: 18px 22px; display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.band__stat small { margin: 0; font-size: 12px; }
.band__stat b { font: 500 26px/1 var(--mono); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.band__stat em { font-style: normal; font-size: 12px; color: var(--text-3); }

.statrow { margin: 16px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); background: var(--bg-2); border: 1px solid var(--line); border-radius: calc(var(--r) + 2px); }
.statrow > div { padding: 20px 22px; border-right: 1px solid var(--line); min-width: 0; }
.statrow > div:last-child { border-right: 0; }
.statrow dt { font-size: 12px; color: var(--text-3); }
.statrow dd { margin: 10px 0 0; font: 500 28px/1 var(--mono); font-variation-settings: "wdth" 85; letter-spacing: -.03em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.statrow dd small { font-size: 11px; letter-spacing: 0; }

.table { width: 100%; border-collapse: collapse; font: 400 12.5px/1.3 var(--mono); font-variant-numeric: tabular-nums; }
.table th { text-align: left; font: 500 10.5px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); padding: 0 12px 12px 0; border-bottom: 1px solid var(--line); }
.table td { padding: 11px 12px 11px 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; }
.table .sol { color: var(--ochre); }
.table a { color: var(--text); text-decoration: none; border-bottom: 1px solid var(--line-2); }
.table a:hover { color: var(--clay-2); border-color: var(--clay-2); }
.table .muted { color: var(--text-3); }
.table .empty td { color: var(--text-3); font-family: var(--sans); font-size: 13.5px; white-space: normal; padding: 18px 0; }
.table tr.is-you td { background: var(--clay-soft); }
.table tr.is-new td { animation: rowin 2s ease-out; }
@keyframes rowin { from { background: rgba(217,164,67,.16); } }
.tag { display: inline-block; font: 600 10px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; padding: 4px 6px; border-radius: 3px; background: var(--bg-4); color: var(--text-2); }
.tag--payout { background: rgba(217,164,67,.16); color: var(--ochre); }
.tag--inflow { background: rgba(143,157,92,.18); color: #b5c27e; }
.tag--turn { background: var(--clay-soft); color: var(--clay-2); }
.tag--test { background: transparent; border: 1px dashed var(--line-2); color: var(--text-3); }
.table--events td:nth-child(3) { white-space: normal; color: var(--text-2); }

.filter { display: flex; gap: 4px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); padding: 3px; }
.filter button { border: 0; background: transparent; color: var(--text-2); font: 500 12px/1 var(--mono); padding: 8px 12px; border-radius: 4px; cursor: pointer; }
.filter button[aria-pressed="true"] { background: var(--bg-4); color: var(--text); }

.lookup { max-width: 640px; display: flex; flex-direction: column; gap: 10px; }
.lookup__row { display: flex; gap: 8px; }
.lookup__row .btn { height: 44px; padding: 0 22px; }

.stack { display: flex; height: 14px; border-radius: 3px; overflow: hidden; background: var(--bg-3); }
.stack i { display: block; height: 100%; width: 0; transition: width .6s ease-out; }
.stack__owed { background: var(--ochre); }
.stack__reserve { background: repeating-linear-gradient(-45deg, var(--line-2) 0 2px, transparent 2px 5px); }
.stack__free { background: var(--clay); }
.legend { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; font-size: 13px; color: var(--text-2); }
.legend li { display: block; }
.k { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 10px; vertical-align: -1px; }
.k--owed { background: var(--ochre); }
.k--reserve { background: repeating-linear-gradient(-45deg, var(--text-3) 0 2px, transparent 2px 4px); outline: 1px solid var(--line-2); }
.k--free { background: var(--clay); }
.addr { display: inline-block; margin-top: 18px; font: 400 11.5px/1.4 var(--mono); color: var(--text-3); text-decoration: none; word-break: break-all; }
a.addr[href]:hover { color: var(--clay-2); }

/* dial */
.dial { position: relative; aspect-ratio: 1; width: 100%; max-width: 440px; margin: 0 auto; }
.dial canvas { width: 100%; height: 100%; display: block; }
.dial__center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
.dial__clock { font: 500 36px/1 var(--mono); font-variation-settings: "wdth" 80; letter-spacing: -.04em; }
.dial__id { margin-top: 8px; font: 400 11px/1 var(--mono); color: var(--text-3); }
.dial__tip { position: absolute; pointer-events: none; background: var(--bg-4); border: 1px solid var(--line-2); border-radius: 4px; color: var(--text); padding: 9px 11px; font: 400 11px/1.6 var(--mono); white-space: nowrap; transform: translate(-50%, calc(-100% - 12px)); }
.dial__tip b { color: var(--ochre); font-weight: 600; }

/* guide */
.rules { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; counter-reset: r; }
.rules li { counter-increment: r; background: var(--bg-2); border: 1px solid var(--line); border-radius: calc(var(--r) + 2px); padding: 22px 24px 24px; }
.rules li::before { content: counter(r, decimal-leading-zero); font: 500 11px/1 var(--mono); color: var(--clay-2); }
.rules h3 { margin: 10px 0 8px; font-size: 17px; font-weight: 700; }
.rules p { margin: 0; color: var(--text-2); font-size: 14px; line-height: 1.6; }

/* footer + rig bar */
.foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 22px 36px 90px; border-top: 1px solid var(--line); font-size: 12px; color: var(--text-3); }
.foot__brand { font-weight: 700; color: var(--text-2); }
.foot__x { font-weight: 500; color: var(--clay-2); text-decoration: none; margin-left: 4px; }
.foot__x:hover { text-decoration: underline; }

.rigbar {
  position: fixed; z-index: 30; left: calc(var(--side) + 24px); right: 24px; bottom: 16px;
  display: flex; align-items: center; gap: 14px; padding: 10px 10px 10px 14px;
  background: var(--bg-3); border: 1px solid var(--line-2); border-radius: calc(var(--r) + 4px);
  box-shadow: 0 10px 30px rgba(0,0,0,.45);
}
.rigbar__icon { width: 30px; height: 30px; padding: 4px; }
.rigbar__text { font-size: 13.5px; color: var(--text-2); }
.rigbar__text b { color: var(--text); }
.rigbar__rate { margin-left: auto; font: 500 13px/1 var(--mono); color: var(--ochre); font-variant-numeric: tabular-nums; }
.rigbar .btn { height: 38px; }

/* ───────── responsive ───────── */
@media (max-width: 1180px) {
  .console { grid-template-columns: 280px minmax(0, 1fr); }
  .console__stats { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); flex-direction: row; }
  .console__stats > div { flex: 1; }
  .cols--wide { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  :root { --side: 0px; }
  .shell { grid-template-columns: 1fr; }
  .side { position: sticky; top: 0; z-index: 20; height: auto; flex-direction: row; align-items: center; padding: 0 8px; border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; background: var(--bg); scrollbar-width: none; }
  .side::-webkit-scrollbar { display: none; }
  .side .brand, .side__foot { display: none; }
  .tabs { flex-direction: row; gap: 0; }
  .tabs a { padding: 14px 12px; border-radius: 0; font-size: 13px; }
  .tabs a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--clay); background: transparent; }
  .tabs svg { display: none; }
  .top { position: static; padding: 0 16px; }
  .top__brand { display: inline-flex; }
  main { padding: 24px 16px 120px; }
  .intro { grid-template-columns: 1fr; gap: 14px; }
  .console { grid-template-columns: 1fr; }
  .console__rig { border-right: 0; border-bottom: 1px solid var(--line); }
  .turnstrip--lg .cells { grid-template-columns: repeat(20, minmax(0, 1fr)); min-height: 140px; }
  .cols, .rules { grid-template-columns: 1fr; }
  .statrow { grid-template-columns: 1fr 1fr; }
  .statrow > div:nth-child(2) { border-right: 0; }
  .statrow > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .band { flex-direction: column; }
  .band__stat { width: auto; border-left: 0; border-top: 1px solid var(--line); }
  .cells { grid-template-columns: repeat(30, minmax(0, 1fr)); height: auto; grid-auto-rows: 18px; }
  .facts { grid-template-columns: 1fr 1fr 1fr; }
  .facts dd { font-size: 22px; }
  .rigbar { left: 12px; right: 12px; bottom: 12px; }
  .rigbar__text { font-size: 12.5px; }
  .card { padding: 18px; overflow-x: auto; }
  .foot { padding: 20px 16px 90px; }
}
@media (max-width: 520px) {
  .console__stats { flex-direction: column; }
  .statrow dd { font-size: 22px; }
  .kv { grid-template-columns: 1fr; }
  .kv > div:nth-child(odd) { padding-right: 0; }
  .kv > div:nth-last-child(2) { border-bottom: 1px solid var(--line); }
  .rigbar__rate { display: none; }
  .rigbar .btn { margin-left: auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
