/* ==========================================================================
   Color Exploration — dark neutral chrome (bg ≈ L* 15–18), content owns chroma
   ========================================================================== */

:root {
  /* color */
  --bg: #232326;          /* ~L* 15 */
  --bg-raised: #0c0c0e;   /* panels — darker than the page, tuned 2026-07-15 */
  --bg-inset: #1c1c1f;    /* instrument wells */
  --border: #3a3a41;
  --border-soft: #333338;
  --text: #e9e9ec;
  --text-dim: #a3a3ab;
  --text-faint: #77777f;
  --accent: #d8d8de;      /* chrome stays desaturated */
  --highlight: #a6a6a6;   /* focus ring, practice accent, active nav */

  /* typography */
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --claim-size: 40px;     /* upper bound of the claim's clamp() */
  --claim-weight: 750;
  --prose-size: 15px;     /* explanation + practice paragraphs */
  --caption-size: 13px;   /* in-instrument notes */
  --line-height: 1.55;

  /* spacing */
  --content-width: 1200px;
  --pad-x-max: 56px;      /* upper bound of side padding clamp() */
  --main-top: 48px;
  --block-gap: 32px;      /* vertical rhythm between fact card / instrument / practice */
  --inst-pad: 24px;       /* upper bound of instrument padding clamp() */
  --grid-gap: 16px;
  --radius: 16px;
  --radius-sm: 10px;      /* tracks --radius at ~0.6× */

  --transition: 200ms cubic-bezier(.25,.1,.25,1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: var(--line-height);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--highlight);
  outline-offset: 2px;
}

/* ---------- Header / nav ---------- */

.site-header {
  padding: 28px clamp(20px, 5vw, var(--pad-x-max)) 0;
  border-bottom: 1px solid var(--border-soft);
  position: sticky;
  top: 0;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(12px);
  z-index: 50;
}

.site-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .01em;
  text-decoration: none;
}

.site-tagline {
  margin: 2px 0 14px;
  color: var(--text-dim);
  font-size: 13.5px;
}

.module-nav {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  margin: 0 -6px;
}

.module-nav a {
  text-decoration: none;
  color: var(--text-dim);
  font-size: 13.5px;
  font-weight: 550;
  padding: 8px 12px 10px;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color var(--transition);
}

.module-nav a:hover { color: var(--text); }

.module-nav a[aria-current="page"] {
  color: var(--text);
  border-bottom-color: var(--highlight);
}

.nav-num {
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 11px;
  margin-right: 2px;
}

/* ---------- Views ---------- */

main {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: var(--main-top) clamp(20px, 5vw, var(--pad-x-max)) 80px;
}

.view[hidden] { display: none; }

/* ---------- Hub ---------- */

.hub-intro {
  max-width: 620px;
  color: var(--text-dim);
  font-size: calc(var(--prose-size) + 2px);
  margin: 8px 0 32px;
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--grid-gap);
}

.hub-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px 22px 18px;
  background: var(--bg-raised);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  text-decoration: none;
  transition: border-color var(--transition), transform var(--transition);
}

.hub-card:hover {
  border-color: #55555e;
  transform: translateY(-2px);
}

.hub-num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.hub-card h2 {
  margin: 0;
  font-size: 19px;
  line-height: 1.25;
}

.hub-card p {
  margin: 0;
  color: var(--text-dim);
  font-size: calc(var(--prose-size) - 1px);
  flex: 1;
}

.hub-cta {
  color: var(--text);
  font-size: 13.5px;
  font-weight: 600;
  margin-top: 6px;
}

/* ---------- Fact card ---------- */

.fact-card { max-width: 860px; margin-bottom: var(--block-gap); }

.module-kicker {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0 0 10px;
}

.claim {
  font-size: clamp(24px, 3.4vw, var(--claim-size));
  line-height: 1.22;
  font-weight: var(--claim-weight);
  letter-spacing: -0.015em;
  margin: 0 0 14px;
}

.deeper {
  border-left: 2px solid var(--border);
  padding-left: 16px;
}

.deeper summary {
  cursor: pointer;
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 600;
  user-select: none;
  list-style: none;
}
.deeper summary::-webkit-details-marker { display: none; }
.deeper summary::before { content: "▸ "; color: var(--text-faint); }
.deeper[open] summary::before { content: "▾ "; }

.deeper-body p {
  color: var(--text-dim);
  font-size: var(--prose-size);
  max-width: 700px;
}

/* ---------- Instrument stage ---------- */

.instrument {
  background: var(--bg-raised);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: clamp(16px, 3vw, var(--inst-pad));
  margin-bottom: var(--block-gap);
}

.inst-well {
  background: var(--bg-inset);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 16px;
}

/* ---------- Practice note ---------- */

.practice {
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--highlight);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #29292d, #26262a);
  padding: 18px 22px;
  max-width: 860px;
}

.practice h2 {
  margin: 0 0 8px;
  font-size: 13px;
  font-family: var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.practice p { margin: 0; color: var(--text-dim); font-size: var(--prose-size); }
.practice p + p { margin-top: 10px; }

/* ---------- Module footer nav ---------- */

.module-next {
  display: flex;
  justify-content: space-between;
  margin-top: var(--block-gap);
  gap: 12px;
}

.module-next a {
  text-decoration: none;
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 16px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  transition: color var(--transition), border-color var(--transition);
}

.module-next a:hover { color: var(--text); border-color: #55555e; }

/* ---------- Controls ---------- */

.control { display: block; }

.control-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.control-label output {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--text);
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 26px;
  background: transparent;
  cursor: pointer;
  margin: 0;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 3px;
  background: var(--track, #414149);
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ececf0;
  border: 3px solid #1c1c1f;
  margin-top: -6px;
  box-shadow: 0 1px 4px rgba(0,0,0,.4);
}
input[type="range"]::-moz-range-track {
  height: 6px;
  border-radius: 3px;
  background: var(--track, #414149);
}
input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ececf0;
  border: 3px solid #1c1c1f;
  box-shadow: 0 1px 4px rgba(0,0,0,.4);
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 550;
  color: var(--text-dim);
  cursor: pointer;
  user-select: none;
}
.toggle input { accent-color: #8f8f9a; width: 15px; height: 15px; }
.toggle:hover { color: var(--text); }

.seg {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.seg button {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text-dim);
  font: 550 13px var(--sans);
  padding: 7px 13px;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.seg button + button { border-left: 1px solid var(--border); }
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] {
  background: #3d3d46;
  color: var(--text);
}

.btn {
  appearance: none;
  border: 1px solid var(--border);
  background: #333339;
  color: var(--text);
  font: 600 13px var(--sans);
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition);
}
.btn:hover { background: #3d3d46; }

select, input[type="text"] {
  background: var(--bg-inset);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  font: 500 13.5px var(--sans);
  padding: 7px 10px;
}

input[type="color"] {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  width: 44px;
  height: 34px;
  padding: 2px;
  background: var(--bg-inset);
  cursor: pointer;
}
input[type="color"]::-webkit-color-swatch-wrapper { padding: 2px; }
input[type="color"]::-webkit-color-swatch { border: none; border-radius: 4px; }
input[type="color"]::-moz-color-swatch { border: none; border-radius: 4px; }

.mono { font-family: var(--mono); }

/* ---------- Swatches / tooltip / toast ---------- */

.swatch { cursor: pointer; position: relative; }

.swatch-tooltip {
  position: fixed;
  z-index: 200;
  pointer-events: none;
  background: #17171a;
  border: 1px solid #45454e;
  border-radius: 6px;
  padding: 8px 11px;
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--text);
  box-shadow: 0 6px 24px rgba(0,0,0,.5);
  white-space: nowrap;
}
.swatch-tooltip .tt-dim { color: var(--text-faint); }

.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  background: #17171a;
  border: 1px solid #45454e;
  color: var(--text);
  font: 600 13px var(--sans);
  padding: 10px 18px;
  border-radius: 8px;
  z-index: 300;
  box-shadow: 0 6px 24px rgba(0,0,0,.5);
  animation: toast-in 180ms ease-out;
}
@keyframes toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(8px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ---------- Shared instrument bits ---------- */

.readout {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--text-dim);
}
.readout b { color: var(--text); font-weight: 600; }
.readout .ro-label { color: var(--text-faint); margin-right: 5px; }

.graph-svg { display: block; width: 100%; height: auto; }
.graph-svg .axis { stroke: #3d3d44; stroke-width: 1; }
.graph-svg .gridline { stroke: #303036; stroke-width: 1; }
.graph-svg .tick-label { fill: var(--text-faint); font: 10.5px var(--mono); }
.graph-svg .series-true { stroke-width: 2.5; fill: none; stroke-linejoin: round; }
.graph-svg .series-naive { stroke-width: 1.8; fill: none; stroke-dasharray: 5 4; }

.legend { display: flex; gap: 18px; font-size: 12px; color: var(--text-dim); align-items: center; flex-wrap: wrap; }
.legend .key { display: inline-block; width: 20px; height: 0; border-top: 3px solid; margin-right: 6px; vertical-align: middle; }
.legend .key.dashed { border-top-style: dashed; border-top-width: 2px; }

/* ---------- Module 1 ---------- */

.m1-grid {
  display: grid;
  grid-template-columns: minmax(300px, 5fr) minmax(320px, 6fr);
  gap: 24px;
}

.m1-bigswatch {
  height: 150px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: flex-end;
  padding: 12px;
  transition: background-color 150ms linear;
}

.m1-bigswatch .m1-swlabel {
  font-family: var(--mono);
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(0,0,0,.55);
  color: #fff;
}

.m1-strip-canvas { width: 100%; height: 34px; display: block; border-radius: 4px; }

.m1-stack { display: flex; flex-direction: column; gap: 16px; }

.m1-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 4px; }

.m1-compare-cell { text-align: center; }

.m1-compare-swatch {
  height: 72px;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  transition: background-color 150ms linear;
}

.m1-compare-num { font-family: var(--mono); font-size: 12px; color: var(--text-dim); line-height: 1.8; }
.m1-compare-num b { color: var(--text); font-size: 15px; }

.m1-ratio {
  text-align: center;
  font-size: 14px;
  color: var(--text-dim);
  margin-top: 10px;
}
.m1-ratio b { color: var(--text); font-size: 19px; font-family: var(--mono); }

.m1-graphsec { margin-top: 28px; }

/* Cards absolutely positioned so each sits under its hue's x-position in the
   graph above; left % values are computed from the graph's geometry in JS. */
.m1-peakcards {
  position: relative;
  height: 126px;
  margin-top: 6px;
}

.m1-peakcards .subpx-card {
  position: absolute;
  top: 0;
  width: 96px;
  transform: translateX(-50%);
}

.subpx-card {
  background: var(--bg-inset);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 10px;
  text-align: center;
}
.subpx-bars { display: flex; gap: 3px; justify-content: center; height: 34px; align-items: flex-end; margin-bottom: 6px; }
.subpx-bars span { width: 9px; border-radius: 2px; }
.subpx-name { font-size: 12px; font-weight: 650; }
.subpx-lum { font-family: var(--mono); font-size: 11px; color: var(--text-dim); }

/* ---------- Module 2 ---------- */

.m2-grid {
  display: grid;
  grid-template-columns: minmax(340px, 6fr) minmax(300px, 5fr);
  gap: 24px;
  align-items: start;
}

.m2-canvas-wrap { position: relative; }
.m2-canvas { width: 100%; display: block; border-radius: var(--radius-sm); }

.m2-side { display: flex; flex-direction: column; gap: 18px; }

.m2-mix-swatch {
  height: 64px;
  border-radius: var(--radius-sm);
  transition: background-color 150ms linear;
}

.m2-note { font-size: var(--caption-size); color: var(--text-dim); margin: 0; }
.m2-note em { color: var(--text); font-style: normal; font-weight: 600; }

.m2-linewheel canvas { width: 100%; display: block; }

/* ---------- Module 3 ---------- */

.m3-grid {
  display: grid;
  grid-template-columns: minmax(300px, 5fr) minmax(320px, 6fr);
  gap: 24px;
  align-items: start;
}

.m3-wheel-wrap {
  position: relative;
  width: min(340px, 100%);
  margin: 0 auto;
  touch-action: none;
}
.m3-wheel-wrap canvas { width: 100%; display: block; }

.m3-anchor {
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px rgba(0,0,0,.6), 0 2px 6px rgba(0,0,0,.5);
  transform: translate(-50%, -50%);
  cursor: grab;
}
.m3-anchor.derived {
  width: 15px;
  height: 15px;
  border-width: 2px;
  cursor: default;
  opacity: .95;
}
.m3-anchor:active { cursor: grabbing; }

.m3-chips { display: flex; gap: 8px; margin: 14px 0; flex-wrap: wrap; }
.m3-chip {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.08);
  transition: background-color 150ms linear;
}

.m3-comp-svg { width: 100%; height: auto; display: block; border-radius: var(--radius-sm); }

.m3-controls { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }

/* ---------- Module 4 ---------- */

.m4-grid {
  display: grid;
  grid-template-columns: minmax(340px, 7fr) minmax(260px, 4fr);
  gap: 24px;
  align-items: start;
}

.m4-scene { width: 100%; height: auto; display: block; border-radius: var(--radius-sm); }

.m4-side { display: flex; flex-direction: column; gap: 16px; }

.m4-pin {
  background: var(--bg-inset);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.m4-pin-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.m4-pin-title { font-size: 12px; font-weight: 650; color: var(--text-dim); text-transform: uppercase; letter-spacing: .06em; }
.m4-frozen {
  font: 600 10.5px var(--mono);
  color: #9fe3b4;
  border: 1px solid #3d5a46;
  background: #22301f;
  padding: 2px 7px;
  border-radius: 20px;
}
.m4-pin-row { display: flex; align-items: center; gap: 10px; }
.m4-pin-swatch { width: 42px; height: 42px; border-radius: 6px; flex: none; }
.m4-pin-vals { font-family: var(--mono); font-size: 12px; color: var(--text-dim); line-height: 1.7; }

/* ---------- Module 5 ---------- */

.m5-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 26px;
  align-items: flex-end;
  margin-bottom: 20px;
}

.m5-endpoint { display: flex; align-items: center; gap: 8px; }
.m5-endpoint .lbl { font-size: 13px; font-weight: 600; color: var(--text-dim); }
.m5-endpoint input[type="text"] { width: 92px; font-family: var(--mono); font-size: 12.5px; }

.m5-steps { min-width: 150px; }

.m5-rows { display: flex; flex-direction: column; gap: 8px; margin-bottom: 22px; }

.m5-row {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px;
  align-items: center;
}

.m5-row-label {
  appearance: none;
  border: none;
  background: none;
  text-align: right;
  color: var(--text-dim);
  font: 600 13px var(--sans);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
}
.m5-row-label:hover { color: var(--text); }
.m5-row.selected .m5-row-label { color: var(--text); background: #3d3d46; }

.m5-row-swatches { display: flex; gap: 4px; border-radius: 6px; }
.m5-row.selected .m5-row-swatches { outline: 2px solid #6a6a76; outline-offset: 3px; }

.m5-step {
  flex: 1;
  height: 40px;
  border-radius: 4px;
  transition: background-color 150ms linear;
}

.m5-lower {
  display: grid;
  grid-template-columns: minmax(320px, 6fr) minmax(280px, 5fr);
  gap: 24px;
  align-items: start;
}

.m5-detail { margin-top: 14px; }
.m5-detail-steps { display: flex; gap: 4px; }
.m5-detail-cell { flex: 1; text-align: center; }
.m5-detail-chip { height: 34px; border-radius: 4px; margin-bottom: 6px; }
.m5-detail-cr { font-family: var(--mono); font-size: 10px; line-height: 1.75; color: var(--text-dim); }
.m5-detail-cr .pass { color: #9fe3b4; }
.m5-detail-cr .fail { color: #e08a8a; }

.m5-export-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; flex-wrap: wrap; gap: 10px; }

.m5-export pre {
  background: var(--bg-inset);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 14px;
  font: 12px/1.7 var(--mono);
  color: var(--text-dim);
  overflow: auto;
  max-height: 300px;
  margin: 0;
}

/* ---------- Module 5 (saturation across models) ---------- */

.m7-hue, .m7-pos { flex: 1 1 240px; max-width: 380px; }

/* ---------- Module 6 ---------- */

.m6-controls { display: flex; flex-wrap: wrap; gap: 18px 26px; align-items: center; margin-bottom: 20px; }

.m6-strips { display: flex; flex-direction: column; gap: 14px; margin-bottom: 24px; }

.m6-striprow { display: grid; grid-template-columns: 74px 1fr 110px; gap: 14px; align-items: center; }
.m6-strip-label { text-align: right; font-size: 13px; font-weight: 600; color: var(--text-dim); }
.m6-strip-canvas { width: 100%; height: 44px; display: block; border-radius: 5px; }
.m6-mid { display: flex; align-items: center; gap: 8px; }
.m6-mid-chip { width: 30px; height: 30px; border-radius: 5px; flex: none; }
.m6-mid-hex { font-family: var(--mono); font-size: 11px; color: var(--text-dim); }

.m6-lower { display: grid; grid-template-columns: minmax(320px, 3fr) minmax(260px, 2fr); gap: 24px; align-items: start; }

.m6-timeline { display: flex; flex-direction: column; gap: 6px; }

.m6-era {
  appearance: none;
  text-align: left;
  background: var(--bg-inset);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text-dim);
  cursor: pointer;
  font-family: var(--sans);
  transition: border-color var(--transition), background var(--transition);
}
.m6-era:hover { border-color: #55555e; }
.m6-era[aria-pressed="true"] { border-color: #7a7a88; background: #34343b; color: var(--text); }
.m6-era-head { display: flex; gap: 10px; align-items: baseline; }
.m6-era-year { font-family: var(--mono); font-size: 11px; color: var(--text-faint); min-width: 40px; }
.m6-era-name { font-weight: 700; font-size: 14px; color: var(--text); }
.m6-era-prob { font-size: 12.5px; margin: 4px 0 0 50px; line-height: 1.45; }

.m6-autopsy table { border-collapse: collapse; width: 100%; font-family: var(--mono); font-size: 12px; }
.m6-autopsy th {
  text-align: left; color: var(--text-faint); font-weight: 500;
  padding: 5px 8px; border-bottom: 1px solid var(--border-soft); font-size: 11px;
}
.m6-autopsy td { padding: 6px 8px; border-bottom: 1px solid #2c2c31; color: var(--text-dim); }
.m6-autopsy .m6-a-chip { width: 20px; height: 20px; border-radius: 4px; display: inline-block; vertical-align: middle; }

.inst-h {
  font-size: 12px;
  font-family: var(--mono);
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0 0 10px;
}

/* ---------- Module 6 (color collapse) ---------- */

.m6c-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 26px;
  align-items: flex-end;
  margin-bottom: 22px;
}
.m6c-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.m6c-preset {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--bg-inset);
  color: var(--text-dim);
  font: 550 12.5px var(--sans);
  padding: 6px 11px;
  border-radius: 20px;
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition);
}
.m6c-preset:hover { color: var(--text); border-color: #55555e; }
.m6c-hue, .m6c-ev { flex: 1 1 200px; max-width: 300px; }

.m6c-top {
  display: grid;
  grid-template-columns: minmax(280px, 5fr) minmax(300px, 6fr);
  gap: 26px;
  align-items: start;
  margin-bottom: 26px;
}

.m6c-swatch {
  height: 150px;
  border-radius: var(--radius-sm);
  transition: background-color 120ms linear;
}

.m6c-axis {
  display: flex;
  justify-content: space-between;
  font: 10.5px var(--mono);
  color: var(--text-faint);
  margin-top: 4px;
}

.m6c-plotsec { margin-top: 4px; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border-soft);
  padding: 24px clamp(20px, 5vw, var(--pad-x-max)) 40px;
  color: var(--text-faint);
  font-size: 12.5px;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .m1-grid, .m2-grid, .m3-grid, .m4-grid, .m5-lower, .m6-lower, .m6c-top { grid-template-columns: 1fr; }
  .m6-striprow { grid-template-columns: 64px 1fr; }
  .m6-mid { grid-column: 2; }
  /* too narrow to align cards under the graph — fall back to a plain row */
  .m1-peakcards { position: static; height: auto; display: flex; flex-wrap: wrap; gap: 8px; }
  .m1-peakcards .subpx-card { position: static; transform: none; width: auto; flex: 1 1 90px; }
}
