/* Oasthold — neon sign over a dark oast. One accent (ember), white tube for the sign, a centred instrument dial. */
:root {
  --ground: #0B0907; --ink: #F4EADB; --ember: #FF3D0A; --tube: #F2F6FF;
  --soot: rgba(244, 234, 219, .08); --soot2: rgba(244, 234, 219, .16); --dim: rgba(244, 234, 219, .58); --dim2: rgba(244, 234, 219, .36);
  --glow: 0 0 6px rgba(255, 61, 10, .9), 0 0 18px rgba(255, 61, 10, .55), 0 0 42px rgba(255, 61, 10, .25);
  --tubeglow: 0 0 5px rgba(242, 246, 255, .9), 0 0 14px rgba(242, 246, 255, .45);
  --display: 'Tilt Neon', 'Barlow', system-ui, sans-serif; --body: 'Barlow', system-ui, -apple-system, sans-serif;
  --sign-h: 58px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--body); }
body { min-height: 100vh; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
code { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: .86em; word-break: break-all; }
.num { font-family: var(--body); font-variant-numeric: tabular-nums; font-weight: 600; }

/* ---------- the sign (fixed chrome, buy control) ---------- */
#sign {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40; height: calc(var(--sign-h) + env(safe-area-inset-top, 0px));
  padding: calc(8px + env(safe-area-inset-top, 0px)) 14px 8px; display: flex; align-items: center; gap: 10px;
  background: linear-gradient(180deg, rgba(11, 9, 7, .98), rgba(11, 9, 7, .92)); border-bottom: 1px solid var(--soot);
  backdrop-filter: blur(8px);
}
.sign-name { display: flex; align-items: center; gap: 8px; font-family: var(--display); font-size: 20px; letter-spacing: .02em; color: var(--tube); text-shadow: var(--tubeglow); min-width: 0; }
.sign-name img { width: 30px; height: 30px; border-radius: 50%; flex: none; }
.sign-name span { white-space: nowrap; }
.sign-tube {
  margin-left: auto; display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 999px;
  border: 2px solid var(--ember); color: var(--ember); box-shadow: var(--glow), inset 0 0 12px rgba(255, 61, 10, .18); text-shadow: 0 0 8px rgba(255, 61, 10, .8);
  font-family: var(--display); font-size: 15px; white-space: nowrap; flex: none; transition: transform .2s;
}
.sign-tube:hover { transform: translateY(-1px); }
.sign-tube b { font-weight: 400; } .sign-tube em { font-style: normal; font-family: var(--body); font-weight: 600; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); text-shadow: none; opacity: .8; }
.sign-tube.lit { animation: buzz 3.2s infinite; }
@keyframes buzz { 0%, 92%, 100% { opacity: 1; } 94% { opacity: .55; } 96% { opacity: 1; } 98% { opacity: .8; } }
.sign-tap { height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--soot2); background: transparent; color: var(--dim); font-weight: 600; font-size: 13px; white-space: nowrap; flex: none; }
.sign-tap.on { color: var(--ink); border-color: var(--tube); box-shadow: var(--tubeglow); }
@media (max-width: 560px) { .sign-name span { display: none; } .sign-tube { padding: 0 12px; } }
@media (max-width: 400px) { .sign-tube em { display: none; } }

/* ---------- the oast (main layout) ---------- */
#oast {
  max-width: 1180px; margin: 0 auto; padding: calc(var(--sign-h) + env(safe-area-inset-top, 0px) + 18px) 16px calc(28px + env(safe-area-inset-bottom, 0px));
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px;
}
.cowl-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.cowl-nav a { padding: 7px 13px; border-radius: 999px; border: 1px solid var(--soot); color: var(--dim); font-weight: 600; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; }
.cowl-nav a.here { color: var(--tube); border-color: var(--tube); box-shadow: var(--tubeglow); }
.dial-pane, .lever-pane, .dispatch-pane { min-width: 0; }

/* ---------- the dial ---------- */
.dial-face { position: relative; width: min(100%, 420px); margin: 0 auto; aspect-ratio: 1; }
.dial-face svg { width: 100%; height: 100%; display: block; overflow: visible; }
.dial-track { fill: none; stroke: var(--soot2); stroke-width: 10; stroke-linecap: round; }
.dial-heat { fill: none; stroke: var(--ember); stroke-width: 10; stroke-linecap: round; filter: drop-shadow(0 0 6px rgba(255, 61, 10, .8)); transition: stroke-dashoffset .9s cubic-bezier(.2, .8, .2, 1); }
.dial-clock { fill: none; stroke: var(--tube); stroke-width: 3; stroke-linecap: round; opacity: .9; filter: drop-shadow(0 0 4px rgba(242, 246, 255, .7)); transition: stroke-dashoffset 1s linear; }
.dial-tick { stroke: var(--dim2); stroke-width: 2; }
.dial-tick.past { stroke: var(--ember); }
.dial-tick.here { stroke: var(--tube); stroke-width: 3; }
.dial-lbl { fill: var(--dim2); font-family: var(--body); font-size: 11px; font-weight: 600; text-anchor: middle; }
.dial-lbl.past { fill: var(--ember); }
.dial-needle { stroke: var(--tube); stroke-width: 3; stroke-linecap: round; filter: drop-shadow(0 0 5px rgba(242, 246, 255, .9)); transform-origin: 200px 200px; transition: transform .9s cubic-bezier(.2, .8, .2, 1); }
.dial-pivot { fill: var(--ground); stroke: var(--tube); stroke-width: 3; }
.dial-face.sealing .dial-heat { animation: sealpulse 1.1s ease-in-out infinite; }
.dial-face.scorched .dial-heat { stroke: var(--ember); animation: scorchflare 1.6s ease-in-out infinite; }
@keyframes sealpulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes scorchflare { 0%, 100% { filter: drop-shadow(0 0 6px rgba(255, 61, 10, .8)); } 50% { filter: drop-shadow(0 0 22px rgba(255, 61, 10, 1)); } }
.dial-core { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -52%); text-align: center; width: 60%; pointer-events: none; }
.dial-core .dc-round { font-family: var(--body); font-weight: 700; font-size: clamp(64px, 20vw, 96px); line-height: .95; letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.dial-core .dc-word { font-family: var(--display); font-size: 17px; color: var(--tube); text-shadow: var(--tubeglow); margin-top: 4px; }
.dial-core .dc-sub { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); margin-top: 8px; }
.dial-core .dc-sub b { color: var(--ember); text-shadow: 0 0 8px rgba(255, 61, 10, .7); }
.dial-core.cold .dc-round { color: var(--dim2); }
.gauge-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.gauge { padding: 12px 12px 10px; border: 1px solid var(--soot); border-radius: 12px; background: rgba(244, 234, 219, .025); min-width: 0; }
.gauge i { display: block; font-style: normal; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--dim2); }
.gauge .num { display: block; font-size: 22px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gauge .num.ember { color: var(--ember); text-shadow: 0 0 10px rgba(255, 61, 10, .6); }
.gauge small { display: block; color: var(--dim2); font-size: 11px; margin-top: 2px; }

/* ---------- the lever (action) ---------- */
.lever { border: 1px solid var(--soot2); border-radius: 16px; padding: 16px; background: rgba(244, 234, 219, .03); display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; min-width: 0; }
.lever-h { font-family: var(--display); font-size: 22px; color: var(--tube); text-shadow: var(--tubeglow); }
.lever-p { color: var(--dim); font-size: 14px; line-height: 1.5; margin: 0; }
.lever-p b { color: var(--ink); }
.lever-field { display: flex; align-items: stretch; gap: 8px; min-width: 0; }
.lever-field input { flex: 1 1 0; width: 0; min-width: 0; height: 52px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--soot2); background: var(--ground); color: var(--ink); font: 600 22px var(--body); font-variant-numeric: tabular-nums; outline: none; }
.lever-field input:focus { border-color: var(--tube); box-shadow: var(--tubeglow); }
.lever-field .lf-unit { display: flex; align-items: center; padding: 0 12px; border-radius: 12px; border: 1px solid var(--soot); color: var(--dim2); font-weight: 600; font-size: 13px; white-space: nowrap; }
.lever-quick { display: flex; gap: 6px; flex-wrap: wrap; }
.lever-quick button { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--soot2); background: transparent; color: var(--dim); font-size: 13px; font-weight: 600; }
.lever-quick button.on { color: var(--tube); border-color: var(--tube); }
.lever-acts { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.tube-btn { height: 54px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-radius: 14px; border: 2px solid var(--ember); background: rgba(255, 61, 10, .06); color: var(--ember); font-family: var(--display); font-size: 22px; letter-spacing: .04em; box-shadow: var(--glow); text-shadow: 0 0 8px rgba(255, 61, 10, .8); transition: transform .15s; }
.tube-btn:hover:not(:disabled) { transform: translateY(-1px); }
.tube-btn.white { border-color: var(--tube); color: var(--tube); background: rgba(242, 246, 255, .04); box-shadow: var(--tubeglow); text-shadow: 0 0 8px rgba(242, 246, 255, .8); }
.tube-btn:disabled { opacity: .35; box-shadow: none; text-shadow: none; cursor: default; }
.lever-note { font-size: 13px; color: var(--dim2); line-height: 1.5; }
.lever-note.warm { color: var(--ember); }
.lever-mine { padding: 10px 12px; border-radius: 12px; border: 1px dashed var(--soot2); font-size: 14px; color: var(--dim); }
.lever-mine b { color: var(--ink); }
.lever-cold { color: var(--dim); font-size: 14px; line-height: 1.5; }

/* ---------- the dispatch (log column) ---------- */
.dispatch { border: 1px solid var(--soot); border-radius: 16px; overflow: hidden; }
.dispatch-h { display: flex; align-items: baseline; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--soot); font-family: var(--display); font-size: 17px; color: var(--tube); text-shadow: var(--tubeglow); }
.dispatch-h small { font-family: var(--body); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim2); text-shadow: none; }
.dispatch-line { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; gap: 10px; align-items: baseline; padding: 9px 14px; border-bottom: 1px solid var(--soot); font-size: 13px; }
.dispatch-line:last-child { border-bottom: 0; }
.dispatch-line .dl-when { color: var(--dim2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.dispatch-line .dl-what { color: var(--dim); min-width: 0; overflow-wrap: anywhere; }
.dispatch-line .dl-what a { color: var(--ink); border-bottom: 1px dotted var(--soot2); }
.dispatch-line .dl-what b { color: var(--ink); font-weight: 600; }
.dispatch-line .dl-amt { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dispatch-line.ember .dl-what, .dispatch-line.ember .dl-amt { color: var(--ember); }
.dispatch-line.tube .dl-what { color: var(--tube); }
.dispatch-quiet { padding: 18px 14px; color: var(--dim2); font-size: 13px; line-height: 1.5; }
.primer { margin-top: 14px; border: 1px solid var(--soot); border-radius: 16px; padding: 14px; display: grid; gap: 8px; }
.primer-h { font-family: var(--display); font-size: 16px; color: var(--tube); text-shadow: var(--tubeglow); }
.primer-row { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--dim); border-bottom: 1px solid var(--soot); padding-bottom: 6px; }
.primer-row:last-child { border-bottom: 0; padding-bottom: 0; }
.primer-row b { color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ladder { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 4px; margin-top: 4px; }
.ladder span { display: block; text-align: center; font-size: 10px; color: var(--dim2); padding: 4px 0; border-radius: 6px; border: 1px solid var(--soot); font-variant-numeric: tabular-nums; }
.ladder span.past { color: var(--ember); border-color: rgba(255, 61, 10, .5); }
.ladder span.here { color: var(--tube); border-color: var(--tube); }

/* ---------- ledger / parcel / rules ---------- */
.roll { display: grid; gap: 10px; }
.roll-card { border: 1px solid var(--soot); border-radius: 14px; padding: 14px; display: grid; gap: 8px; }
.roll-card .rc-h { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; font-family: var(--display); font-size: 18px; color: var(--tube); text-shadow: var(--tubeglow); }
.roll-card .rc-h small { font-family: var(--body); font-size: 12px; color: var(--dim2); text-shadow: none; letter-spacing: .06em; text-transform: uppercase; }
.roll-card .rc-g { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.roll-card .rc-g div { min-width: 0; } .roll-card i { display: block; font-style: normal; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim2); }
.roll-card .num { font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.roll-card .num.ember { color: var(--ember); }
.roll-card p { margin: 0; color: var(--dim); font-size: 13px; line-height: 1.5; }
.page-h { font-family: var(--display); font-size: clamp(28px, 6vw, 40px); color: var(--tube); text-shadow: var(--tubeglow); margin: 4px 0 6px; line-height: 1.1; }
.page-p { color: var(--dim); font-size: 15px; line-height: 1.55; margin: 0 0 14px; max-width: 62ch; }
.rules { display: grid; gap: 14px; max-width: 70ch; }
.rules h3 { font-family: var(--display); font-size: 20px; color: var(--tube); text-shadow: var(--tubeglow); margin: 6px 0 2px; }
.rules p { margin: 0; color: var(--dim); font-size: 15px; line-height: 1.6; }
.rules p b { color: var(--ink); }

/* ---------- the plate (footer: reference, not selling) ---------- */
.plate { border-top: 1px solid var(--soot); padding-top: 14px; display: grid; gap: 6px; font-size: 12px; color: var(--dim2); }
.plate .pl-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.plate .pl-k { letter-spacing: .08em; text-transform: uppercase; font-weight: 600; }
.plate code { color: var(--dim); }
.plate a { color: var(--dim); border-bottom: 1px dotted var(--soot2); }
.plate .pl-copy { padding: 2px 8px; border-radius: 999px; border: 1px solid var(--soot2); background: transparent; color: var(--dim); font-size: 11px; }
.plate .pl-sign { font-family: var(--display); color: var(--tube); text-shadow: var(--tubeglow); font-size: 14px; }

/* ---------- hatch (modal) ---------- */
#hatch { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .7); display: flex; align-items: flex-end; justify-content: center; padding: 0 0 env(safe-area-inset-bottom, 0px); }
#hatch[hidden] { display: none; }
.hatch-box { width: 100%; max-width: 520px; background: #14100C; border: 1px solid var(--soot2); border-radius: 18px 18px 0 0; padding: 14px 16px 22px; }
.hatch-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-family: var(--display); font-size: 20px; color: var(--tube); text-shadow: var(--tubeglow); }
.hatch-shut { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--soot2); background: transparent; font-size: 20px; line-height: 1; }
.hatch-body { display: grid; gap: 12px; }
.hatch-body p { margin: 0; color: var(--dim); font-size: 14px; line-height: 1.5; } .hatch-body p b { color: var(--ink); }
.wallet-list { display: grid; gap: 8px; }
.wallet-list button { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 12px; border: 1px solid var(--soot2); background: transparent; text-align: left; }
.wallet-list img { width: 26px; height: 26px; border-radius: 6px; }
.ember-note { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 70; padding: 10px 16px; border-radius: 999px; background: #14100C; border: 1px solid var(--ember); color: var(--ink); font-size: 14px; box-shadow: var(--glow); max-width: calc(100vw - 32px); }
@media (min-width: 600px) { #hatch { align-items: center; padding: 16px; } .hatch-box { border-radius: 18px; } }

/* ---------- wider: a larger measure, then the recomposition ---------- */
@media (min-width: 720px) {
  #oast { padding-top: calc(var(--sign-h) + env(safe-area-inset-top, 0px) + 26px); gap: 22px; }
  .dial-face { width: min(100%, 500px); }
  .gauge .num { font-size: 26px; }
  .lever { padding: 20px; }
}
@media (min-width: 1000px) {
  #oast {
    grid-template-columns: minmax(0, 620px) minmax(320px, 1fr); column-gap: 32px; align-items: start;
    grid-template-areas: "nav nav" "dial dispatch" "lever dispatch" "plate plate";
  }
  .cowl-nav { grid-area: nav; }
  .dial-pane { grid-area: dial; }
  .lever-pane { grid-area: lever; }
  .dispatch-pane { grid-area: dispatch; position: sticky; top: calc(var(--sign-h) + env(safe-area-inset-top, 0px) + 20px); }
  .plate { grid-area: plate; }
  .dial-face { width: min(100%, 560px); }
  .dial-core .dc-round { font-size: 118px; }
  .dial-core .dc-word { font-size: 20px; }
  .gauge .num { font-size: 28px; }
  .lever-h { font-size: 26px; }
  .tube-btn { height: 60px; font-size: 24px; }
  .page-h { font-size: 48px; }
  .sign-name { font-size: 22px; } .sign-tube { font-size: 16px; }
}
