/* APSC 151 · Deep Core. Always dark: the inside of a borehole, earth browns with a hi-vis drill
   orange and a chrysocolla-teal for ore. Loaded after css/site.css and css/brand.css; it redefines
   the site tokens for this page so the site header, footer and feedback dialog match. Every game
   rule is scoped to .dc (its <main>) or to the page's own overlay, because site.css has its own
   .qcard, .btn and .opt rules. Contrast of every text pairing is checked by tools/check-contrast.js. */

/* Big Shoulders Stencil Display (display face, like the stencilled lid of a core box), self-hosted,
   SIL OFL 1.1 (fonts/OFL-big-shoulders.txt). */
@font-face {
  font-family: "Big Shoulders Stencil Display"; font-style: normal; font-weight: 800; font-display: swap;
  src: url("../fonts/big-shoulders-stencil-display-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Big Shoulders Stencil Display"; font-style: normal; font-weight: 800; font-display: swap;
  src: url("../fonts/big-shoulders-stencil-display-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* html.dcore:root outranks site.css's dark-mode :root:not([data-theme="light"]) block. */
html.dcore:root {
  --dc-bg: #14100c;
  --dc-panel: #1f1912;
  --dc-panel-2: #2a2219;
  --dc-deep: #120e0a;
  --dc-line: #4a3c2c;
  --dc-ink: #f3ece1;
  --dc-soft: #d9ccb8;
  --dc-faint: #bfae96;
  --dc-accent: #ff9a3c;
  --dc-accent-ink: #261200;
  --dc-accent-deep: #9a4a0e;
  --dc-ore: #5fd3c4;
  --dc-good: #84dca0;
  --dc-bad: #ff9180;
  --dc-display: "Big Shoulders Stencil Display", "Atkinson Hyperlegible Next", system-ui, sans-serif;

  --paper: #14100c;
  --surface: #1a150f;
  --rule: #3a2f23;
  --rule-strong: #6a5641;
  --ink: #f3ece1;
  --ink-soft: #d9ccb8;
  --ink-faint: #bfae96;
  --accent: #ff9a3c;
  --accent-ink: #261200;
  --accent-soft: #3a2410;
  --gold: #ff9a3c;
  --gold-ink: #ff9a3c;
  --good: #84dca0;
  --good-soft: #13301d;
  --bad: #ff9180;
  --bad-soft: #3a1712;
  --brand-ez: #ff9a3c;
  color-scheme: dark;
}
html.dcore body { background: var(--dc-bg); color: var(--dc-ink); }

.dc { max-width: 1040px; margin: 0 auto; padding: var(--s4) var(--s4) var(--s7); }
.dc h1, .dc h2, .dc p { margin: 0; }
.dc :focus-visible, .dc-over :focus-visible { outline: 3px solid var(--dc-accent); outline-offset: 2px; }
.dc h1[tabindex="-1"]:focus, .dc h2[tabindex="-1"]:focus { outline: none; }
.dc-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- HUD and drill gauge ---------- */
.dc-hud { position: relative; border: 1px solid var(--dc-line); border-radius: var(--radius); background: var(--dc-panel); overflow: hidden; }
.dc-gauge { display: block; width: 100%; height: 36px; border-bottom: 1px solid var(--dc-line); background: linear-gradient(180deg, #19130d, #231b13); }
.dc-tick { stroke: #5a4935; stroke-width: 1.5; }
.dc-tick.big { stroke: var(--dc-faint); stroke-width: 2; }
.dc-ruler { animation: dc-run 2.4s linear infinite; }
.dc-gauge.fast .dc-ruler { animation-duration: 1.2s; }
.dc-gauge.fastest .dc-ruler { animation-duration: .6s; }
.dc-gauge.fast .dc-tick.big, .dc-gauge.fastest .dc-tick.big { stroke: var(--dc-accent); }
@keyframes dc-run { to { transform: translateX(-60px); } }
.dc-gauge-cap { fill: #231b13; }
.dc-gbit-body { fill: #6a5641; stroke: var(--dc-accent); stroke-width: 2; }
.dc-gbit-teeth { fill: var(--dc-accent); }
.dc-gbit-hub { fill: var(--dc-deep); }
.dc-gbit-spin { animation: dc-spin 1.2s linear infinite; transform-box: fill-box; transform-origin: center; }
.dc-gauge.fast .dc-gbit-spin { animation-duration: .6s; }
.dc-gauge.fastest .dc-gbit-spin { animation-duration: .3s; }
@keyframes dc-spin { to { rotate: 360deg; } }
.dc-gauge.kick .dc-gbit-body { animation: dc-glow .6s ease-out; }
@keyframes dc-glow { 0% { fill: var(--dc-ore); } 100% { fill: #6a5641; } }
.dc-gauge.stall .dc-ruler, .dc-gauge.stall .dc-gbit-spin { animation-play-state: paused; }
.dc-gauge.stall { animation: dc-shudder .45s ease-out; }
@keyframes dc-shudder { 0%, 100% { transform: none; } 25% { transform: translateY(2px); } 50% { transform: translateY(-2px); } 75% { transform: translateY(1px); } }

.dc-hud-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s4); padding: var(--s2) var(--s3); }
.dc-rank { display: flex; align-items: center; gap: var(--s2); background: none; border: 0; color: inherit; font: inherit; padding: var(--s1); border-radius: var(--radius-sm); cursor: pointer; margin-right: auto; text-align: left; }
.dc-rank:hover { background: var(--dc-panel-2); }
.dc-rank-badge, .dc-ru-badge {
  display: grid; place-items: center; width: 36px; height: 36px; flex: none;
  font-family: var(--dc-display); font-weight: 800; font-size: 1.2rem; color: var(--dc-accent-ink);
  background: linear-gradient(160deg, #ffc58f, var(--dc-accent) 55%, #c4650f);
  clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0 50%);
}
.dc-rank-txt { display: grid; gap: 4px; min-width: 120px; }
.dc-rank-name { font-family: var(--dc-display); font-weight: 800; font-size: 1.15rem; letter-spacing: .03em; text-transform: uppercase; line-height: 1; }
.dc-bar { display: block; height: 6px; border-radius: 99px; background: #3a2f23; overflow: hidden; }
.dc-bar.wide { width: min(320px, 100%); height: 8px; margin: var(--s2) 0; }
.dc-bar-fill { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--dc-accent-deep), var(--dc-accent)); border-radius: inherit; transition: width .4s var(--ease-out); }
.dc-bar.good .dc-bar-fill { background: linear-gradient(90deg, #2f8a7f, var(--dc-ore)); }
.dc-stat { display: grid; justify-items: center; line-height: 1.1; min-width: 56px; }
.dc-stat-k { font-size: var(--fs-xs); color: var(--dc-faint); }
.dc-stat-v { font-family: var(--dc-display); font-weight: 800; font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.dc-stat-v.ore { color: var(--dc-ore); }
.dc-stat.hot .dc-stat-v { color: var(--dc-accent); }
.dc-sound { font: inherit; font-size: var(--fs-sm); color: var(--dc-soft); background: var(--dc-panel-2); border: 1px solid var(--dc-line); border-radius: 99px; padding: 6px 12px; cursor: pointer; min-height: 36px; }
.dc-sound[aria-pressed="true"] { color: var(--dc-accent); border-color: var(--dc-accent-deep); }

/* ---------- tabs ---------- */
.dc-tabs { display: flex; gap: var(--s1); overflow-x: auto; margin: var(--s3) 0 var(--s4); padding-bottom: 2px; scrollbar-width: thin; }
.dc-tab { flex: none; display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: var(--fs-sm); font-weight: 700; color: var(--dc-soft); background: transparent; border: 1px solid transparent; border-radius: 99px; padding: 8px 14px; min-height: 40px; cursor: pointer; }
.dc-tab:hover { color: var(--dc-ink); background: var(--dc-panel); }
.dc-tab.on { color: var(--dc-accent-ink); background: var(--dc-accent); }
.dc-count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; background: var(--dc-ore); color: #062420; font-size: var(--fs-xs); }
.dc-tab.on .dc-count { background: var(--dc-accent-ink); color: var(--dc-accent); }

/* ---------- shared ---------- */
.dc-panel { background: var(--dc-panel); border: 1px solid var(--dc-line); border-radius: var(--radius); padding: var(--s5) var(--s4); }
.dc-panel + .dc-panel, .dc-row + .dc-panel, .dc-panel + .dc-row { margin-top: var(--s4); }
.dc-title { font-family: var(--dc-display); font-weight: 800; font-size: clamp(2.1rem, 8vw, 3.2rem); line-height: .95; letter-spacing: .02em; text-transform: uppercase; color: var(--dc-ink); }
.dc-title.small { font-size: clamp(1.7rem, 6vw, 2.2rem); }
h1.dc-title { margin-bottom: var(--s3); }
.dc-eyebrow { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--dc-accent); }
.dc-lede { color: var(--dc-soft); max-width: 64ch; }
.dc-intro { margin-bottom: var(--s4); }
.dc-hint, .dc-meta { color: var(--dc-faint); font-size: var(--fs-sm); }
.dc-sub { font-family: var(--dc-display); font-weight: 800; font-size: 1.45rem; text-transform: uppercase; letter-spacing: .03em; margin: var(--s5) 0 var(--s2) !important; }
.dc-row { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s4); }
.dc-btn { font: inherit; font-weight: 700; color: var(--dc-ink); background: var(--dc-panel-2); border: 1px solid var(--dc-line); border-radius: 10px; padding: 10px 18px; min-height: 44px; cursor: pointer; }
.dc-btn:hover:not(:disabled) { border-color: var(--dc-accent); }
.dc-btn.primary { color: var(--dc-accent-ink); background: var(--dc-accent); border-color: var(--dc-accent); }
.dc-btn.primary:hover:not(:disabled) { filter: brightness(1.08); }
.dc-btn.ghost { background: transparent; }
.dc-btn.ghost[aria-pressed="true"] { border-color: var(--dc-accent); color: var(--dc-accent); }
.dc-btn.danger { color: var(--dc-bad); border-color: #7a3a2a; }
.dc-btn:disabled { opacity: .45; cursor: not-allowed; }
.dc-link { font: inherit; font-weight: 700; color: var(--dc-accent); background: none; border: 0; padding: 4px 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; min-height: 32px; }
.dc-note { color: var(--dc-soft); font-size: var(--fs-sm); }
.dc-note.good { color: var(--dc-good); }
.dc-list { margin: var(--s4) 0 0; padding-left: 1.2em; color: var(--dc-soft); display: grid; gap: var(--s1); }
.dc-moved { margin-bottom: var(--s4); border-color: #2f6b63; color: var(--dc-soft); }

/* ---------- countdown ---------- */
.dc-count-card { background: linear-gradient(135deg, #2c1d0f, var(--dc-panel) 60%); display: grid; gap: var(--s1); justify-items: start; }
.dc-count-text { font-family: var(--dc-display); font-weight: 800; font-size: clamp(1.45rem, 4.8vw, 2rem); line-height: 1.05; letter-spacing: .02em; text-transform: uppercase; }
.dc-plan { list-style: none; padding: 0; margin: var(--s3) 0 0; display: grid; gap: var(--s2); width: 100%; }
.dc-plan li { display: grid; gap: 2px; padding: var(--s2) var(--s3); border-left: 3px solid var(--dc-line); }
.dc-plan li.now { border-left-color: var(--dc-accent); background: rgb(255 154 60 / .07); }
.dc-plan-day { font-weight: 700; color: var(--dc-accent); font-size: var(--fs-sm); }
.dc-plan li span:last-child { color: var(--dc-soft); }

/* ---------- borehole map ---------- */
.dc-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: var(--s2); margin: 0 0 var(--s4); }
.dc-facts div { background: var(--dc-panel); border: 1px solid var(--dc-line); border-radius: 10px; padding: var(--s2) var(--s3); }
.dc-facts dt { font-size: var(--fs-xs); color: var(--dc-faint); }
.dc-facts dd { margin: 2px 0 0; font-family: var(--dc-display); font-weight: 800; font-size: 1.5rem; letter-spacing: .02em; }
.dc-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2); margin: var(--s4) 0 var(--s3); }
.dc-switch { display: flex; align-items: center; gap: var(--s2); padding: var(--s2) var(--s3); background: var(--dc-panel); border: 1px solid var(--dc-line); border-radius: 10px; cursor: pointer; font-weight: 700; min-height: 44px; }
.dc-switch input { width: 20px; height: 20px; accent-color: var(--dc-accent); flex: none; margin: 0; }

.dc-hole { position: relative; }
.dc-surface { display: flex; align-items: flex-end; gap: var(--s3); padding: 0 var(--s2); }
.dc-rig { width: 92px; height: auto; flex: none; margin-left: 4px; }
.dc-rig-frame { fill: none; stroke: var(--dc-faint); stroke-width: 2.5; stroke-linecap: round; }
.dc-rig-pipe { fill: #8a7a66; }
.dc-rig-motor { fill: var(--dc-accent); }
.dc-ground { stroke: #6a8a4a; stroke-width: 4; }
.dc-surface-txt { color: var(--dc-faint); font-size: var(--fs-xs); padding-bottom: 6px; }

.dc-strata { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.dc-st { position: relative; width: 100%; display: grid; grid-template-columns: 100px 1fr auto; align-items: stretch; gap: var(--s3); text-align: left; font: inherit; color: inherit; background: var(--dc-panel); border: 1px solid var(--dc-line); border-radius: 6px; padding: 0 var(--s3) 0 0; min-height: 88px; overflow: hidden; }
button.dc-st { cursor: pointer; }
button.dc-st:hover { border-color: var(--dc-accent); }
.dc-st.cored { border-color: #2f6b63; }
.dc-st.next { border-color: var(--dc-accent); box-shadow: 0 0 0 1px var(--dc-accent) inset; }
.dc-st.locked { opacity: .78; }
.dc-st.locked .dc-rock { filter: grayscale(.85) brightness(.55); }
.dc-rock { position: relative; display: block; min-height: 100%; }
.dc-rock.big { width: 72px; height: 72px; min-height: 0; border-radius: 10px; flex: none; }
/* The drill string runs down through every stratum already drilled. */
.dc-st.drilled .dc-rock::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 6px; margin-left: -3px; background: linear-gradient(90deg, #6d5d4b, #b7a68f, #6d5d4b); }
.dc-st.next .dc-rock::before { bottom: 38%; }
.dc-depth { position: absolute; left: 6px; top: 6px; z-index: 1; padding: 1px 6px; border-radius: 4px; background: #16110c; color: var(--dc-soft); font-family: var(--mono); font-size: .72rem; font-variant-numeric: tabular-nums; }
.dc-cored { position: absolute; right: 6px; bottom: 6px; z-index: 1; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--dc-ore); color: #062420; font-weight: 700; font-size: .85rem; }
.dc-bit { position: absolute; left: 50%; top: 62%; width: 26px; height: 32px; margin: -16px 0 0 -13px; z-index: 1; animation: dc-bob 1.1s ease-in-out infinite; }
.dc-bit-shank { fill: #b7a68f; }
.dc-bit-head { fill: var(--dc-accent); stroke: #3a1d05; stroke-width: 1.2; }
.dc-bit-flute { stroke: #3a1d05; stroke-width: 1.4; fill: none; }
@keyframes dc-bob { 50% { transform: translateY(4px); } }
.dc-st-body { display: grid; gap: 3px; align-content: center; min-width: 0; padding: var(--s3) 0; }
.dc-st-name { font-family: var(--dc-display); font-weight: 800; font-size: 1.35rem; text-transform: uppercase; letter-spacing: .03em; line-height: 1; }
.dc-st-topic { color: var(--dc-soft); font-size: var(--fs-sm); }
.dc-st-meta { display: flex; flex-wrap: wrap; gap: 2px var(--s3); color: var(--dc-faint); font-size: var(--fs-xs); }
.dc-st-meta span:first-child { color: var(--dc-ink); font-weight: 700; }
.dc-st-body .dc-bar { margin-top: 3px; max-width: 360px; }
.dc-st-hint { color: var(--dc-accent); font-size: var(--fs-xs); font-weight: 700; }
.dc-st-state { align-self: center; flex: none; font-size: var(--fs-xs); font-weight: 700; color: var(--dc-faint); text-transform: uppercase; letter-spacing: .06em; }
.dc-st.cored .dc-st-state { color: var(--dc-ore); }
.dc-st.next .dc-st-state { color: var(--dc-accent); }

.dc-bedrock { width: 100%; margin-top: 3px; display: grid; grid-template-columns: 100px 1fr auto; gap: var(--s3); align-items: center; text-align: left; font: inherit; color: inherit; cursor: pointer; min-height: 96px; padding: 0 var(--s3) 0 0; border: 1px solid var(--dc-accent-deep); border-radius: 6px 6px var(--radius) var(--radius);
  background: radial-gradient(circle at 20% 30%, rgb(255 255 255 / .05) 1.5px, transparent 2px) 0 0 / 13px 11px, radial-gradient(circle at 70% 60%, rgb(0 0 0 / .35) 2px, transparent 3px) 0 0 / 17px 15px, #241b14; }
.dc-bedrock:hover { border-color: var(--dc-accent); }
.dc-bed-depth { align-self: stretch; display: grid; place-items: center; background: #0f0b08; color: var(--dc-accent); font-family: var(--mono); font-weight: 700; font-size: var(--fs-sm); }
.dc-bedrock .dc-st-state { color: var(--dc-accent); }

/* ---------- station intro ---------- */
.dc-station-head { display: flex; gap: var(--s4); align-items: center; }
.dc-progress-line { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: var(--s3); margin-top: var(--s4); font-weight: 700; }
.dc-progress-line .dc-bar { height: 10px; }
.dc-review { margin-top: var(--s4); }
.dc-review summary, .dc-patients summary { cursor: pointer; font-weight: 700; color: var(--dc-ink); min-height: 32px; }
.dc-review .dc-list { margin-top: var(--s2); }

/* ---------- field briefing: a core tray that fills with the stratum's rock as you read ---------- */
.dc-bhead { display: flex; align-items: center; gap: var(--s2); margin-bottom: var(--s2); }
.dc-bhead .dc-eyebrow { flex: 1; min-width: 0; }
.dc-bcount { font-family: var(--dc-display); font-weight: 800; font-size: 1.25rem; letter-spacing: .02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dc-tray { display: flex; gap: 4px; padding: 4px; margin-bottom: var(--s3); background: var(--dc-deep); border: 1px solid var(--dc-line); border-radius: 6px; }
.dc-tray-box { flex: 1; min-width: 18px; height: 24px; padding: 0; border: 1px solid var(--dc-line); border-radius: 3px; background: var(--dc-panel); cursor: pointer; }
.dc-tray-box.past { opacity: .6; }
.dc-tray-box.on { box-shadow: 0 0 0 2px var(--dc-accent); border-color: var(--dc-accent); }
.dc-tray-box:hover:not(.on) { border-color: var(--dc-faint); }
.dc-brief { border-left-width: 6px; }
.dc-blist { margin: var(--s4) 0 0; padding-left: 1.2em; color: var(--dc-soft); display: grid; gap: var(--s2); max-width: 72ch; list-style: square; }
.dc-blist li::marker { color: var(--dc-accent); }
.dc-blist.goals { list-style: none; padding-left: 0; }
.dc-blist.goals li { position: relative; padding-left: 1.8em; }
.dc-blist.goals li::before { content: ""; position: absolute; left: 0; top: .25em; width: .95em; height: .95em; border: 2px solid var(--dc-ore); border-radius: 2px; }
.dc-bnote { margin-top: var(--s4); padding: var(--s3) var(--s4); border-radius: var(--radius-sm); background: var(--dc-panel-2); border: 1px solid var(--dc-line); max-width: 72ch; }
.dc-bnote > p + p { margin-top: var(--s1); color: var(--dc-soft); }
.dc-bnote.trap { border-left: 4px solid var(--dc-bad); }
.dc-bnote.trap .dc-eyebrow { color: var(--dc-bad); }
.dc-bnote.check { border-left: 4px solid var(--dc-ore); }
.dc-bnote.check .dc-eyebrow { color: var(--dc-ore); }
.dc-bnote .dc-btn { margin-top: var(--s3); }
.dc-btn.small { min-height: 40px; padding: 8px 14px; font-size: var(--fs-sm); }
.dc-bans { margin-top: var(--s3); padding-top: var(--s2); border-top: 1px dashed var(--dc-line); color: var(--dc-ink); }
.dc-bans:focus { outline: none; }
.dc-brief .dc-hint { margin-top: var(--s4); }
.dc-decknav { justify-content: space-between; }

/* ---------- question card ---------- */
.dc-qtop { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s3); margin-bottom: var(--s2); }
.dc-qtop > div { display: grid; gap: 2px; }
.dc-qsub { font-size: var(--fs-xs); color: var(--dc-faint); }
.dc-progress, .dc-clock { font-family: var(--dc-display); font-weight: 800; font-size: 1.45rem; letter-spacing: .02em; font-variant-numeric: tabular-nums; text-align: right; }
.dc-clock.low { color: var(--dc-bad); }
.dc-track { height: 6px; border-radius: 99px; background: #3a2f23; overflow: hidden; margin-bottom: var(--s3); }
.dc-track-fill { display: block; height: 100%; background: repeating-linear-gradient(90deg, var(--dc-accent) 0 10px, #c4650f 10px 14px); transition: width .4s var(--ease-out); }
.dc-meter { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--s3); margin-bottom: var(--s3); font-size: var(--fs-sm); }
.dc-meter-k { font-weight: 700; color: var(--dc-soft); }
.dc-meter-bar { position: relative; height: 12px; border-radius: 3px; background: #2a1f15; overflow: hidden; border: 1px solid var(--dc-line); }
.dc-meter-fill { display: block; height: 100%; background: repeating-linear-gradient(-45deg, #9bd7c4 0 6px, var(--dc-ore) 6px 12px); transition: width .45s var(--ease-out); }
.dc-meter-fill.low { background: repeating-linear-gradient(-45deg, #ff6b4a 0 6px, var(--dc-bad) 6px 12px); }
.dc-meter-v { color: var(--dc-faint); min-width: 8ch; text-align: right; }

.dc .qcard { padding: var(--s5) var(--s4); }
.dc-qmeta { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; font-size: var(--fs-xs); color: var(--dc-faint); margin-bottom: var(--s3) !important; }
.dc-tag { border: 1px solid var(--dc-line); border-radius: 99px; padding: 2px 8px; color: var(--dc-soft); }
.dc-tag.d-a { border-color: var(--dc-accent-deep); color: var(--dc-accent); }
.dc .qtext { font-family: var(--sans); font-size: clamp(1.1rem, 3.6vw, 1.3rem); font-weight: 700; line-height: 1.35; color: var(--dc-ink); margin: 0; padding: 0; max-width: 62ch; }
.dc-answer { margin-top: var(--s4); }
.dc-opts { display: grid; gap: var(--s2); }
.dc-opts.tf { grid-template-columns: 1fr 1fr; }
.dc-opt { display: flex; align-items: flex-start; gap: var(--s3); width: 100%; text-align: left; font: inherit; color: var(--dc-ink); background: var(--dc-panel-2); border: 1px solid var(--dc-line); border-radius: 10px; padding: 12px 14px; min-height: 48px; cursor: pointer; transition: border-color .15s, background .15s; }
.dc-opt:hover:not(:disabled) { border-color: var(--dc-accent); }
.dc-opt.picked { border-color: var(--dc-accent); background: rgb(255 154 60 / .10); }
.dc-opt.right { border-color: var(--dc-good); background: rgb(132 220 160 / .12); }
.dc-opt.wrong { border-color: var(--dc-bad); background: rgb(255 145 128 / .10); }
.dc-opt:disabled { cursor: default; color: var(--dc-ink); }
.dc-key { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 6px; border: 1px solid var(--dc-line); font-size: var(--fs-xs); font-weight: 700; color: var(--dc-faint); }
.dc-opt.right .dc-key { border-color: var(--dc-good); color: var(--dc-good); }
.dc-opt.wrong .dc-key { border-color: var(--dc-bad); color: var(--dc-bad); }
.dc-opt.picked .dc-key { border-color: var(--dc-accent); color: var(--dc-accent); }

.dc-seq { list-style: none; margin: var(--s3) 0; display: grid; gap: var(--s2); min-height: 48px; border: 1px dashed var(--dc-line); border-radius: 10px; padding: var(--s2); }
.dc-pool { display: flex; flex-wrap: wrap; gap: var(--s2); }
.dc-chip { display: flex; align-items: center; gap: var(--s2); text-align: left; font: inherit; font-size: var(--fs-sm); color: var(--dc-ink); background: var(--dc-panel-2); border: 1px solid var(--dc-line); border-radius: 10px; padding: 10px 12px; min-height: 44px; cursor: pointer; }
.dc-chip.placed { width: 100%; border-color: var(--dc-accent-deep); }
.dc-chip:hover:not(:disabled) { border-color: var(--dc-accent); }
.dc-chip:disabled { cursor: default; }
.dc-chip.right { border-color: var(--dc-good); }
.dc-chip.wrong { border-color: var(--dc-bad); }
.dc-chip-n { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--dc-accent); color: var(--dc-accent-ink); font-weight: 700; font-size: var(--fs-xs); }
.dc-key-list { margin: var(--s2) 0 var(--s3); }
.dc-key-list ol { margin: var(--s1) 0 0; padding-left: 1.4em; color: var(--dc-good); font-size: var(--fs-sm); display: grid; gap: 2px; }

.dc-match { display: grid; gap: var(--s2); }
.dc-m-row { display: grid; gap: var(--s1) var(--s3); align-items: center; padding: var(--s2) var(--s3); background: var(--dc-panel-2); border: 1px solid var(--dc-line); border-radius: 10px; }
@media (min-width: 640px) { .dc-m-row { grid-template-columns: minmax(140px, 32%) 1fr; } }
.dc-m-row.right { border-color: var(--dc-good); }
.dc-m-row.wrong { border-color: var(--dc-bad); }
.dc-m-left { font-weight: 700; }
.dc-m-fix { grid-column: 1 / -1; color: var(--dc-good); font-size: var(--fs-sm); }
.dc-select, .dc-input { width: 100%; min-width: 0; font: inherit; color: var(--dc-ink); background: var(--dc-deep); border: 1px solid var(--rule-strong); border-radius: 8px; padding: 10px; min-height: 44px; }
.dc-select { font-size: var(--fs-sm); }
.dc-input { font-size: 1.1rem; font-family: var(--mono); }
.dc-input:disabled { opacity: .8; }
.dc-numrow { display: flex; align-items: center; gap: var(--s2); max-width: 340px; margin-top: var(--s4); }
.dc-unit { font-family: var(--mono); color: var(--dc-soft); flex: none; }
.dc-pin { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--dc-accent); color: var(--dc-accent-ink); font-family: var(--dc-display); font-weight: 800; }
.dc-given { display: flex; flex-wrap: wrap; gap: var(--s2); margin: var(--s4) 0 0; }
.dc-given div { background: var(--dc-deep); border: 1px solid var(--dc-line); border-radius: 8px; padding: 4px 10px; }
.dc-given dt { font-size: var(--fs-xs); color: var(--dc-faint); }
.dc-given dd { margin: 0; font-family: var(--mono); font-size: var(--fs-sm); }
.dc-work { margin-top: var(--s3); padding: var(--s3); border-left: 3px solid var(--dc-bad); background: var(--dc-deep); border-radius: 0 8px 8px 0; }
.dc-work.ok { border-left-color: var(--dc-good); }
.dc-steps { margin: var(--s2) 0 0; padding-left: 1.4em; display: grid; gap: 3px; color: var(--dc-soft); font-family: var(--mono); font-size: var(--fs-sm); overflow-wrap: anywhere; }

.dc-figure { margin: var(--s4) 0 0; padding: var(--s3); background: var(--dc-deep); border: 1px solid var(--dc-line); border-radius: 10px; }
.dc-fig { display: block; width: 100%; max-width: 520px; height: auto; margin: 0 auto; }
.fig-axis { fill: none; stroke: #8a7a66; stroke-width: 2; }
.fig-line { fill: none; stroke: #f3ece1; stroke-width: 1.5; }
.fig-a { fill: #6b4a2a; } .fig-b { fill: #3f5a6b; } .fig-c { fill: #7a3f2e; } .fig-d { fill: #8a5a2a; } .fig-e { fill: #335d4f; }
.fig-pin circle { fill: var(--dc-accent); stroke: var(--dc-deep); stroke-width: 2; }
.fig-pin text { font-family: var(--dc-display); font-weight: 800; font-size: 13px; fill: var(--dc-accent-ink); }
.fig-lab { font-size: 12px; font-weight: 700; fill: var(--dc-soft); }
.fig-small { font-size: 10.5px; fill: var(--dc-soft); }
.fig-water { fill: #24506b; }
.fig-shell { fill: #a08a62; }
.fig-filter { fill: #d2bf8e; }
.fig-core { fill: #6b5a8a; }
.fig-riprap { fill: none; stroke: #c9c2b4; stroke-width: 9; stroke-linecap: round; stroke-dasharray: 1 13; }
.fig-soil { fill: #4a3a28; }
.fig-fill { fill: #7a6446; }
.fig-gravel { fill: #a89a82; }
.fig-concrete { fill: #b9b3a8; stroke: #e6e1d8; stroke-width: 1; }
.fig-pipe { stroke: #24506b; stroke-width: 7; stroke-linecap: round; }
.fig-press { fill: rgb(255 154 60 / .18); stroke: var(--dc-accent); stroke-width: 1.5; }
.fig-arrow { fill: none; stroke: var(--dc-accent); stroke-width: 2; }
.fig-softclay { fill: #3a2c20; }
.fig-slip { fill: none; stroke: var(--dc-bad); stroke-width: 2.5; stroke-dasharray: 7 4; }
.fig-pipeflow { fill: none; stroke: #7cc4ea; stroke-width: 3; stroke-dasharray: 4 4; }
.fig-dim { stroke: #8a7a66; stroke-width: 1.5; stroke-dasharray: 3 3; }

.dc-fb:empty { display: none; }
.dc-fb { margin-top: var(--s4); padding: var(--s3) var(--s4); border-radius: 10px; background: var(--dc-deep); border: 1px solid var(--dc-line); display: grid; gap: var(--s2); }
.dc-verdict { font-family: var(--dc-display); font-weight: 800; font-size: 1.6rem; text-transform: uppercase; letter-spacing: .03em; }
.dc-verdict.ok { color: var(--dc-good); }
.dc-verdict.no { color: var(--dc-bad); }
.dc-why, .dc-trap { color: var(--dc-soft); line-height: 1.5; }
.dc-why strong { color: var(--dc-good); }
.dc-trap strong { color: var(--dc-accent); }
.dc-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--s2); margin-top: var(--s4); }
.dc-foot:empty { display: none; }

/* a clean strike on a right answer, a jolt on a wrong one */
.dc .strike { animation: dc-strike .6s ease-out; }
@keyframes dc-strike { 0% { box-shadow: 0 0 0 0 rgb(95 211 196 / .55); } 100% { box-shadow: 0 0 0 18px rgb(95 211 196 / 0); } }
.dc .jolt { animation: dc-jolt .5s ease-out; }
@keyframes dc-jolt { 0%, 100% { transform: none; } 15% { transform: translate(-6px, 2px) rotate(-.4deg); } 35% { transform: translate(6px, -2px) rotate(.3deg); } 55% { transform: translate(-3px, 1px); } 75% { transform: translate(2px, 0); } }

/* ---------- results, bars, repair ---------- */
.dc-score { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s2) var(--s4); margin: var(--s4) 0 var(--s2); color: var(--dc-soft); }
.dc-big { font-family: var(--dc-display); font-weight: 800; font-size: 3.2rem; line-height: 1; color: var(--dc-accent); }
.result .dc-lede, .result .dc-note { margin-top: var(--s2); }
.dc-newspec { display: flex; gap: var(--s4); align-items: center; margin-top: var(--s4); padding: var(--s3) var(--s4); background: var(--dc-deep); border: 1px solid #2f6b63; border-radius: 10px; }
.dc-spec-name strong { font-family: var(--dc-display); font-weight: 800; font-size: 1.5rem; letter-spacing: .03em; text-transform: uppercase; }
.dc-formula { font-family: var(--mono); color: var(--dc-ore); }
.dc-gem { flex: none; }
.dc-rlist, .dc-patients { list-style: none; padding: 0; margin: var(--s3) 0 0; display: grid; gap: var(--s3); }
.dc-rlist li { padding: var(--s3); border-left: 3px solid var(--dc-accent-deep); background: var(--dc-deep); border-radius: 0 8px 8px 0; display: grid; gap: var(--s1); }
.dc-r-q { font-weight: 700; }
.dc-r-a { color: var(--dc-good); }
.dc-bars { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s2); }
.dc-bars li { display: grid; grid-template-columns: 1fr; gap: 4px; }
@media (min-width: 640px) { .dc-bars li { grid-template-columns: minmax(200px, 38%) 1fr auto; align-items: center; gap: var(--s3); } }
.dc-bars-label { font-size: var(--fs-sm); }
.dc-bars-track { height: 10px; border-radius: 99px; background: #2a1f15; overflow: hidden; }
.dc-bars-fill { display: block; height: 100%; width: 0; background: var(--dc-accent); border-radius: inherit; }
.dc-bars-fill.good { background: var(--dc-ore); }
.dc-bars-fill.low { background: #b5432a; }
.dc-bars-v { font-size: var(--fs-sm); color: var(--dc-faint); font-variant-numeric: tabular-nums; }
.dc-weak { margin: 0; padding-left: 1.3em; display: grid; gap: var(--s2); color: var(--dc-soft); }
.dc-ward h2 { display: flex; align-items: center; gap: var(--s2); font-family: var(--dc-display); font-weight: 800; font-size: 1.35rem; text-transform: uppercase; letter-spacing: .03em; }
.dc-swatch { display: inline-block; width: 22px; height: 22px; border-radius: 5px; flex: none; }
.dc-patients li { padding: var(--s2) var(--s3); background: var(--dc-deep); border-radius: 8px; }
.dc-patients summary { display: flex; gap: var(--s2); align-items: baseline; font-weight: 400; }
.dc-patients details[open] summary { margin-bottom: var(--s2); }
.dc-ward-body { display: grid; gap: var(--s1); }
.dc-dots { display: inline-flex; gap: 3px; flex: none; }
.dc-dots span { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--dc-ore); }
.dc-dots span.on { background: var(--dc-ore); }
.dc-due { flex: none; font-size: var(--fs-xs); font-weight: 700; color: var(--dc-accent-ink); background: var(--dc-accent); padding: 1px 7px; border-radius: 99px; margin-left: auto; }

/* ---------- exam prep, calcs and exam ---------- */
.dc-cards { display: grid; gap: var(--s4); margin-top: var(--s4); }
@media (min-width: 760px) { .dc-cards { grid-template-columns: repeat(2, 1fr); } }
.dc-cards .dc-panel + .dc-panel { margin-top: 0; }
.dc-mode { display: flex; flex-direction: column; gap: var(--s3); }
.dc-mode h2 { font-family: var(--dc-display); font-weight: 800; font-size: 1.8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--dc-accent); }
.dc-mode p { color: var(--dc-soft); }
.dc-mode .dc-meta { color: var(--dc-faint); }
.dc-mode .dc-btn { margin-top: auto; align-self: flex-start; }
.dc-chips { display: flex; flex-wrap: wrap; gap: var(--s2); margin: var(--s2) 0 var(--s4); }
.dc-pill { font: inherit; font-size: var(--fs-sm); font-weight: 700; color: var(--dc-soft); background: var(--dc-panel); border: 1px solid var(--dc-line); border-radius: 99px; padding: 6px 12px; min-height: 40px; cursor: pointer; }
.dc-pill:hover { border-color: var(--dc-accent); }
.dc-pill.on { color: var(--dc-accent-ink); background: var(--dc-accent); border-color: var(--dc-accent); }
.dc-exam { display: grid; gap: var(--s4); }
@media (min-width: 880px) { .dc-exam { grid-template-columns: 1fr 300px; align-items: start; } }
.dc-nav { position: sticky; top: var(--s3); padding: var(--s4); }
.dc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 6px; }
.dc-gq { position: relative; font: inherit; font-size: var(--fs-sm); font-weight: 700; color: var(--dc-soft); background: var(--dc-panel-2); border: 1px solid var(--dc-line); border-radius: 8px; min-height: 40px; cursor: pointer; }
.dc-gq.calc { border-style: dashed; }
.dc-gq.done { color: var(--dc-accent-ink); background: #d9852f; border-color: #d9852f; }
.dc-gq.flag { box-shadow: 0 0 0 2px var(--dc-bg), 0 0 0 4px var(--dc-accent); }
.dc-gq.on { outline: 2px solid var(--dc-ink); outline-offset: 1px; }
.dc-nav .dc-hint { margin-top: var(--s3); }

/* ---------- field notes and profile ---------- */
.dc-notes { display: grid; gap: var(--s4); }
@media (min-width: 820px) { .dc-notes { grid-template-columns: 1fr 1fr; } }
.dc-notes .dc-panel + .dc-panel { margin-top: 0; }
.dc-ncard-head { display: flex; align-items: center; gap: var(--s2); }
.dc-ncard h2 { font-family: var(--dc-display); font-weight: 800; font-size: 1.4rem; text-transform: uppercase; letter-spacing: .03em; line-height: 1.05; margin: var(--s2) 0 var(--s3); }
.dc-ncard ul { margin: 0; padding-left: 1.2em; display: grid; gap: var(--s2); color: var(--dc-soft); line-height: 1.5; }
.dc-formulas { font-family: var(--mono); font-size: var(--fs-sm); }
.dc-prof-rank { display: flex; gap: var(--s4); align-items: center; }
.dc-prof-rank .dc-ru-badge { width: 68px; height: 68px; font-size: 2.1rem; }
.dc-prof-rank h2 { font-family: var(--dc-display); font-weight: 800; font-size: 2.1rem; text-transform: uppercase; letter-spacing: .02em; line-height: 1; }
.dc-dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: var(--s3); margin: var(--s5) 0 var(--s3); }
.dc-dl div { background: var(--dc-panel-2); border: 1px solid var(--dc-line); border-radius: 10px; padding: var(--s3); }
.dc-dl dt { font-size: var(--fs-xs); color: var(--dc-faint); }
.dc-dl dd { margin: 2px 0 0; font-family: var(--dc-display); font-weight: 800; font-size: 1.6rem; letter-spacing: .02em; }
.dc-dl dd.dc-big { font-size: 2.5rem; }
.dc-case { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: var(--s3); }
.dc-case li { display: grid; justify-items: center; text-align: center; gap: 2px; padding: var(--s3) var(--s2); background: var(--dc-deep); border: 1px solid #2f6b63; border-radius: 10px; }
.dc-case li.locked { border-color: var(--dc-line); }
.dc-case strong { font-family: var(--dc-display); font-weight: 800; font-size: 1.15rem; letter-spacing: .03em; text-transform: uppercase; }
.dc-case span { font-size: var(--fs-xs); color: var(--dc-faint); }
.dc-case li:not(.locked) > span:first-of-type { font-family: var(--mono); color: var(--dc-ore); }

/* ---------- overlays ---------- */
.dc-over { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: var(--s4); background: rgb(8 5 3 / .84); overflow-y: auto; }
.dc-over[hidden] { display: none; }
.dc-over-card { width: min(480px, 100%); text-align: center; display: grid; gap: var(--s3); justify-items: center; background: var(--dc-panel); border: 1px solid var(--dc-line); border-radius: 16px; padding: var(--s6) var(--s5); color: var(--dc-ink); animation: dc-pop .45s var(--ease-out); }
.dc-over-card p { margin: 0; color: var(--dc-soft); }
.dc-over-card .dc-row { justify-content: center; margin-top: var(--s2); }
.dc-over-card .dc-title { font-size: clamp(2.3rem, 9vw, 3.3rem); margin: 0; }
.dc-over-card .dc-eyebrow { color: var(--dc-accent); }
.rankup { border-color: var(--dc-accent-deep); box-shadow: 0 0 70px rgb(255 154 60 / .25); }
.rankup .dc-ru-badge { width: 88px; height: 88px; font-size: 2.8rem; }
.snapped { border-color: #7a3a2a; box-shadow: 0 0 60px rgb(255 120 90 / .2); }
.snapped .dc-title { color: var(--dc-bad); }
.howto { text-align: left; justify-items: stretch; }
.howto .dc-row { justify-content: flex-start; }
.dc-howto { margin: 0; padding-left: 1.3em; display: grid; gap: var(--s2); color: var(--dc-soft); line-height: 1.45; }
.dc-howto strong { color: var(--dc-ink); }
@keyframes dc-pop { from { transform: scale(.85); opacity: 0; } to { transform: none; opacity: 1; } }

/* rock chips when a station is cored or a rank is reached */
.dc-burst { position: fixed; left: 50%; top: 45%; width: 0; height: 0; z-index: 60; pointer-events: none; }
.dc-chip-rock { position: absolute; left: -6px; top: -5px; width: 12px; height: 10px; animation: dc-burst 1.1s var(--ease-out) forwards; clip-path: polygon(10% 0, 90% 20%, 100% 80%, 30% 100%, 0 50%); }
.dc-chip-rock.k1 { clip-path: polygon(0 0, 100% 30%, 60% 100%); }
.dc-chip-rock.k2 { width: 8px; height: 8px; clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
@keyframes dc-burst { from { transform: translate(0, 0) rotate(0); opacity: 1; } to { transform: translate(var(--dx), var(--dy)) rotate(var(--r)); opacity: 0; } }

@media (max-width: 560px) {
  .dc-panel { padding: var(--s4) var(--s3); }
  .dc-stat { min-width: 44px; }
  .dc-st, .dc-bedrock { grid-template-columns: 64px 1fr; }
  .dc-st-state { display: none; }
  .dc-depth { left: 3px; top: 4px; font-size: .64rem; padding: 0 3px; }
  .dc-st-name { font-size: 1.2rem; }
  .dc-rig { width: 70px; }
  .dc-station-head { align-items: flex-start; }
  .dc-rock.big { width: 54px; height: 54px; }
  .dc-newspec { flex-direction: column; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .dc-ruler, .dc-gbit-spin, .dc-bit, .dc-over-card, .dc .strike, .dc .jolt, .dc-gauge.stall, .dc-gauge.kick .dc-gbit-body { animation: none !important; }
  .dc-bar-fill, .dc-meter-fill, .dc-track-fill { transition: none; }
}

/* ---------- print: the Field notes on paper ---------- */
@media print {
  html.dcore body { background: #fff; color: #000; }
  .site-header, .site-foot, .dc-hud, .dc-tabs, .noprint, .skip, .dc-over, [class^="fb-"], dialog { display: none !important; }
  .dc { max-width: none; padding: 0; }
  .dc-panel { background: #fff !important; border: 1px solid #999; break-inside: avoid; }
  .dc-title, .dc-ncard h2, .dc-eyebrow, .dc-lede, .dc-hint, .dc-ncard ul { color: #000 !important; }
  .dc-notes { grid-template-columns: 1fr 1fr; gap: 8px; }
  .dc-ncard ul { font-size: 10pt; gap: 3px; }
  .dc-swatch { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}
