/* ===========================================================
   TRIAGED — shared stylesheet
   Used by every page. Edit here once, changes apply everywhere.

   COLOURS are defined twice: once under :root for light mode,
   and again in the two dark-mode blocks below it. If you
   change a colour, change it in all three places or the site
   will look wrong for some visitors.

   Individual die colours are NOT here. They live with each die
   in the dice-<version>.js files.
   =========================================================== */

:root {
  /* the table the dice are rolled on */
  --ground:     #e8e3d9;
  --surface:    #f8f5f0;
  --surface-2:  #ded7cb;
  --ink:        #241f1a;
  --ink-soft:   #5a5149;
  --ink-faint:  #8a8076;
  --rule:       #d2cabd;
  --rule-soft:  #e0d9ce;
  --accent:     #9a6410;
  --accent-ink: #fffaf2;

  --lift:  0 1px 0 rgba(255,255,255,.7), 0 2px 5px rgba(50,38,25,.08), 0 10px 24px rgba(50,38,25,.07);
  --lift-2:0 1px 0 rgba(255,255,255,.8), 0 4px 10px rgba(50,38,25,.12), 0 18px 36px rgba(50,38,25,.12);
  --cast:  0 8px 14px rgba(50,38,25,.16);

  --fs-display: clamp(2.9rem, 13vw, 5.5rem);
  --fs-h2:      clamp(1.3rem, 3.8vw, 1.75rem);
  --fs-body:    1.0625rem;
  --fs-small:   .8125rem;
  --fs-micro:   .6875rem;

  --ui:    "Rubik", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --mono:  "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground:     #1a1714;
    --surface:    #262220;
    --surface-2:  #332e2a;
    --ink:        #f1ece4;
    --ink-soft:   #b6ada2;
    --ink-faint:  #867d73;
    --rule:       #3b3531;
    --rule-soft:  #2f2a27;
    --accent:     #e0a84e;
    --accent-ink: #20190e;

    --lift:  0 1px 0 rgba(255,255,255,.04), 0 2px 6px rgba(0,0,0,.45), 0 12px 28px rgba(0,0,0,.35);
    --lift-2:0 1px 0 rgba(255,255,255,.06), 0 4px 12px rgba(0,0,0,.55), 0 20px 40px rgba(0,0,0,.45);
    --cast:  0 8px 16px rgba(0,0,0,.5);
  }
}

:root[data-theme="dark"] {
  --ground:     #1a1714;
  --surface:    #262220;
  --surface-2:  #332e2a;
  --ink:        #f1ece4;
  --ink-soft:   #b6ada2;
  --ink-faint:  #867d73;
  --rule:       #3b3531;
  --rule-soft:  #2f2a27;
  --accent:     #e0a84e;
  --accent-ink: #20190e;

  --lift:  0 1px 0 rgba(255,255,255,.04), 0 2px 6px rgba(0,0,0,.45), 0 12px 28px rgba(0,0,0,.35);
  --lift-2:0 1px 0 rgba(255,255,255,.06), 0 4px 12px rgba(0,0,0,.55), 0 20px 40px rgba(0,0,0,.45);
  --cast:  0 8px 16px rgba(0,0,0,.5);
}

/* each die picks its own colour out of the data file */
.die { --die: var(--die-light); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .die { --die: var(--die-dark); }
}
:root[data-theme="dark"] .die { --die: var(--die-dark); }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .strip li { --chip: var(--chip-dark); }
}
:root[data-theme="dark"] .strip li { --chip: var(--chip-dark); }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  background-color: var(--ground);
  /* a faint grain, so the page reads as a surface rather than a screen */
  background-image:
    radial-gradient(circle at 12% 18%, rgba(255,255,255,.05) 0 40%, transparent 41%),
    radial-gradient(circle at 78% 62%, rgba(0,0,0,.025) 0 35%, transparent 36%);
  background-size: 7px 7px, 11px 11px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }
[hidden] { display: none !important; }

.wrap {
  max-width: 64rem;
  margin: 0 auto;
  padding-inline: 20px;
  padding-block: 0 4rem;
}

a { color: var(--accent); text-underline-offset: 3px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute; left: -9999px;
  background: var(--accent); color: var(--accent-ink);
  padding: .5rem 1rem; border-radius: 8px; z-index: 100;
  font-family: var(--ui); font-weight: 600;
}
.skip:focus { left: 1rem; top: 1rem; }

/* ---------- site navigation ---------- */

.sitenav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--ground);
  border-bottom: 1px solid var(--rule);
}

.sitenav-inner {
  max-width: 64rem;
  margin: 0 auto;
  padding-inline: 20px;
  padding-block: .55rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.sitenav .brand {
  font-family: var(--ui);
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: -.02em;
  color: var(--ink);
  text-decoration: none;
  flex: 0 0 auto;
}

.sitenav ul {
  list-style: none; display: flex; gap: .3rem;
  margin: 0; padding: 0; overflow-x: auto; scrollbar-width: none;
}
.sitenav ul::-webkit-scrollbar { display: none; }
.sitenav li { flex: 0 0 auto; }

.sitenav a.nav {
  display: block;
  font-family: var(--ui);
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: .3rem .7rem;
  white-space: nowrap;
}
.sitenav a.nav:hover { border-color: var(--rule); color: var(--ink); }
.sitenav a.nav[aria-current="page"] {
  background: var(--ink);
  color: var(--ground);
  font-weight: 600;
}

/* ---------- masthead ---------- */

.mast { padding-block: 3rem 1.5rem; }

.eyebrow {
  font-family: var(--mono);
  font-size: var(--fs-micro);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 1.1rem;
}

h1 {
  font-family: var(--ui);
  font-weight: 800;
  font-size: var(--fs-display);
  line-height: .88;
  letter-spacing: -.045em;
  margin: 0;
  text-wrap: balance;
}

.tagline {
  font-family: var(--serif);
  font-size: clamp(1.125rem, 2.8vw, 1.4rem);
  font-style: italic;
  color: var(--ink-soft);
  max-width: 34ch;
  margin: .85rem 0 0;
  text-wrap: balance;
}

/* the eleven categories, as eleven dice — a signature, and a count */
.strip {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}
.strip li {
  --chip: var(--chip-light);
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 28%;
  background: var(--chip);
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,.3),
    inset 0 -2px 0 rgba(0,0,0,.2),
    0 2px 0 color-mix(in srgb, var(--chip) 62%, #000),
    0 3px 5px rgba(0,0,0,.18);
}

.intro { max-width: 60ch; margin: 1.6rem 0 0; }
.intro p { margin: 0 0 .85rem; }

.credit {
  margin-top: 1.6rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--rule);
  font-family: var(--ui);
  font-size: var(--fs-small);
  color: var(--ink-faint);
  max-width: 60ch;
}
.credit p { margin: 0 0 .3rem; }

/* ---------- landing page cards ---------- */

.versions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1rem;
  list-style: none;
  margin: 2.25rem 0 0;
  padding: 0;
}

.vcard {
  display: flex;
  flex-direction: column;
  gap: .55rem;
  background: var(--surface);
  border: 1px solid var(--rule-soft);
  border-radius: 14px;
  padding: 1.4rem 1.3rem 1.2rem;
  box-shadow: var(--lift);
  text-decoration: none;
  color: var(--ink);
  transition: box-shadow .2s, transform .2s;
}
.vcard:hover { box-shadow: var(--lift-2); transform: translateY(-3px); }
.vcard.is-pending { opacity: .74; }

.vcard h2 {
  font-family: var(--ui);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -.025em;
  margin: 0;
}
.vcard p { margin: 0; font-size: .9375rem; color: var(--ink-soft); }

.vcard .meta {
  margin-top: auto;
  padding-top: .75rem;
  border-top: 1px solid var(--rule-soft);
  font-family: var(--mono);
  font-size: var(--fs-micro);
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.status {
  display: inline-block;
  align-self: flex-start;
  font-family: var(--mono);
  font-size: var(--fs-micro);
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .2rem .5rem;
  border-radius: 5px;
  background: var(--surface-2);
  color: var(--ink-faint);
}
.status.is-live { background: var(--accent); color: var(--accent-ink); }

/* ---------- control bar ---------- */

.controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .6rem;
  padding-block: 2rem 1.25rem;
}

.progress { flex: 1 1 10rem; min-width: 9rem; }

.progress-label {
  font-family: var(--mono);
  font-size: var(--fs-micro);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  display: block;
  margin-bottom: .45rem;
}

.track {
  height: 6px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.14);
}
.bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 999px;
  transition: width .4s cubic-bezier(.2,.8,.3,1);
}

.btn {
  font-family: var(--ui);
  font-size: .875rem;
  font-weight: 600;
  border-radius: 10px;
  padding: .55rem 1.1rem;
  cursor: pointer;
  border: 0;
  transition: transform .12s, box-shadow .12s, filter .15s;
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 3px 0 color-mix(in srgb, var(--accent) 62%, #000), var(--cast);
}
.btn-ghost {
  background: var(--surface);
  color: var(--ink-soft);
  box-shadow: 0 3px 0 var(--rule), var(--cast);
}
.btn:hover:not(:disabled) { filter: brightness(1.05); }
.btn:active:not(:disabled) { transform: translateY(3px); box-shadow: none; }
.btn:disabled { opacity: .38; cursor: default; box-shadow: none; transform: translateY(3px); }

/* ---------- the board ---------- */

.dice {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
  gap: .9rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.die {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: .8rem;
  background: color-mix(in srgb, var(--die) 5%, var(--surface));
  border: 1px solid var(--rule-soft);
  border-radius: 14px;
  padding: 1rem 1.1rem 1.1rem;
  box-shadow: var(--lift);
  cursor: default;
  transition: box-shadow .2s, transform .2s, opacity .25s;
}

.die.is-waiting { opacity: .45; }

.die.is-next {
  cursor: pointer;
  box-shadow: var(--lift-2), 0 0 0 2px var(--die);
}
.die.is-next:hover { transform: translateY(-3px); }

.die-head { display: flex; align-items: center; gap: .5rem; }

.die-num {
  font-family: var(--mono);
  font-size: var(--fs-micro);
  color: var(--die);
  letter-spacing: .08em;
}

.die-name {
  font-family: var(--ui);
  font-weight: 600;
  font-size: .9375rem;
  letter-spacing: -.015em;
  line-height: 1.25;
  margin: 0;
  flex: 1;
  color: var(--ink);
}

.die-note {
  margin: -.35rem 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: .8125rem;
  line-height: 1.4;
  color: var(--ink-faint);
}

.die-body { display: flex; align-items: center; gap: 1rem; min-height: 4.25rem; }

/* --- the die itself: a solid object, lit from above --- */

.pips {
  flex: 0 0 auto;
  width: 4rem;
  height: 4rem;
  border-radius: 24%;
  background: linear-gradient(150deg,
    color-mix(in srgb, var(--die) 82%, #fff) 0%,
    var(--die) 55%,
    color-mix(in srgb, var(--die) 88%, #000) 100%);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  padding: 9px;
  gap: 2px;
  box-shadow:
    inset 0 3px 0 rgba(255,255,255,.32),
    inset 3px 0 0 rgba(255,255,255,.14),
    inset -3px 0 0 rgba(0,0,0,.12),
    inset 0 -4px 0 rgba(0,0,0,.18),
    0 5px 0 color-mix(in srgb, var(--die) 60%, #000),
    var(--cast);
  transform-origin: 50% 90%;
}

.pips i { display: flex; align-items: center; justify-content: center; }
.pips span {
  display: block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #fbf8f3;
  box-shadow: inset 0 -1px 1px rgba(0,0,0,.35), 0 1px 0 rgba(255,255,255,.4);
}

.die.is-next .pips { animation: bob 2.4s ease-in-out infinite; }
.die.is-rolling .pips { animation: tumble .5s cubic-bezier(.33,.05,.3,1); }

@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-3px) rotate(-1.5deg); }
}

@keyframes tumble {
  0%   { transform: translateY(0) rotate(0deg) scale(1); }
  20%  { transform: translateY(-20px) rotate(-26deg) scale(1.08); }
  45%  { transform: translateY(-9px) rotate(22deg) scale(1.04); }
  70%  { transform: translateY(-14px) rotate(-12deg) scale(1.05); }
  88%  { transform: translateY(0) rotate(3deg) scale(.97); }
  100% { transform: translateY(0) rotate(0deg) scale(1); }
}

.die-value {
  font-family: var(--ui);
  font-size: 1.0625rem;
  font-weight: 500;
  line-height: 1.32;
  letter-spacing: -.01em;
  margin: 0;
  text-wrap: balance;
}
.die-value.is-empty {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: .9375rem;
  color: var(--ink-faint);
}

.die-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  border-top: 1px solid var(--rule-soft);
  padding-top: .6rem;
}

.reroll {
  font-family: var(--mono);
  font-size: var(--fs-micro);
  letter-spacing: .08em;
  text-transform: uppercase;
  background: none;
  border: 0;
  padding: .1rem 0;
  color: var(--ink-faint);
  cursor: pointer;
  border-bottom: 1px solid var(--rule);
}
.reroll:hover { color: var(--die); border-color: var(--die); }

/* ---------- scenario summary ---------- */

.scenario {
  margin-top: 2.25rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 1.75rem 1.5rem;
  box-shadow: var(--lift-2);
}

.scenario h2 {
  font-family: var(--ui);
  font-weight: 800;
  font-size: var(--fs-h2);
  letter-spacing: -.03em;
  margin: 0 0 .4rem;
}

.scenario .hint { font-size: .9375rem; color: var(--ink-soft); margin: 0 0 1.4rem; max-width: 56ch; }

.sheet { display: grid; margin: 0 0 1.4rem; }

.sheet div {
  display: grid;
  grid-template-columns: minmax(7rem, 11rem) 1fr;
  gap: .2rem 1rem;
  padding: .55rem 0;
  border-top: 1px solid var(--rule-soft);
}
.sheet div:last-child { border-bottom: 1px solid var(--rule-soft); }

.sheet dt {
  font-family: var(--mono);
  font-size: var(--fs-micro);
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding-top: .22rem;
}
.sheet dd {
  margin: 0;
  font-family: var(--ui);
  font-weight: 500;
  font-size: .9375rem;
}

@media (max-width: 30rem) {
  .sheet div { grid-template-columns: 1fr; }
}

.scenario-actions { display: flex; flex-wrap: wrap; gap: .6rem; }

/* ---------- prose ---------- */

.note {
  margin-top: 2.5rem;
  border-top: 1px solid var(--rule);
  padding-top: 1.4rem;
  max-width: 60ch;
}
.note h2 {
  font-family: var(--ui);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -.02em;
  margin: 0 0 .5rem;
}
.note p { font-size: .9375rem; color: var(--ink-soft); margin: 0 0 .6rem; }

.prose { max-width: 64ch; }
.prose h2 {
  font-family: var(--ui);
  font-weight: 700;
  font-size: var(--fs-h2);
  letter-spacing: -.03em;
  margin: 2.4rem 0 .6rem;
}
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-family: var(--ui); font-weight: 600; font-size: 1.0625rem; margin: 1.6rem 0 .4rem; }
.prose p, .prose li { color: var(--ink-soft); }
.prose p { margin: 0 0 .95rem; }
.prose ul { margin: 0 0 1.1rem; padding-left: 1.2rem; }
.prose li { margin-bottom: .45rem; }
.prose strong { color: var(--ink); font-weight: 600; }

.cite-block {
  background: var(--surface);
  border: 1px solid var(--rule-soft);
  border-radius: 12px;
  padding: 1.1rem 1.25rem;
  margin: 0 0 1rem;
  box-shadow: var(--lift);
}
.cite-block p { margin: 0 0 .4rem; font-size: .9375rem; }
.cite-block p:last-child { margin-bottom: 0; }
.cite-block .label {
  font-family: var(--mono);
  font-size: var(--fs-micro);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  display: block;
  margin-bottom: .5rem;
}

/* ---------- pending state ---------- */

.pending-panel {
  margin-top: 2rem;
  border: 2px dashed var(--rule);
  border-radius: 16px;
  padding: 3.25rem 1.5rem;
  text-align: center;
  background: var(--surface);
}
.pending-panel h2 {
  font-family: var(--ui);
  font-weight: 700;
  font-size: var(--fs-h2);
  letter-spacing: -.03em;
  margin: 0 0 .5rem;
}
.pending-panel p { color: var(--ink-soft); font-size: .9375rem; max-width: 44ch; margin: 0 auto; }

/* ---------- footer ---------- */

.sitefoot {
  border-top: 1px solid var(--rule);
  margin-top: 3rem;
  padding-block: 1.5rem 3rem;
  font-family: var(--ui);
  font-size: var(--fs-small);
  color: var(--ink-faint);
}
.sitefoot .wrap { padding-block: 0; }
.sitefoot p { margin: 0 0 .35rem; }
.sitefoot a { color: var(--ink-faint); }

/* ---------- motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .die.is-rolling .pips,
  .die.is-next .pips { animation: none; }
  .die.is-next:hover, .vcard:hover { transform: none; }
}

/* ===========================================================
   AWARD ROSETTE (front page)
   Gold ring and ribbon colours are set here, for light mode
   and again for dark mode, as elsewhere in this file.
   =========================================================== */

:root {
  --ros-gold:      #b8862b;
  --ros-gold-deep: #94681a;
  --ros-tail:      #7d2c3b;
  --ros-tail-2:    #62202d;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ros-gold:      #d9a948;
    --ros-gold-deep: #b3842c;
    --ros-tail:      #a9475a;
    --ros-tail-2:    #8a3748;
  }
}
:root[data-theme="dark"] {
  --ros-gold:      #d9a948;
  --ros-gold-deep: #b3842c;
  --ros-tail:      #a9475a;
  --ros-tail-2:    #8a3748;
}

.award-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  background: var(--surface);
  border: 1px solid var(--rule-soft);
  border-radius: 14px;
  padding: 1.5rem 1.25rem 1.4rem;
  box-shadow: var(--lift);
  text-align: center;
}

.rosette {
  position: relative;
  width: 100%;
  max-width: 15rem;
  container-type: inline-size;
}

.rosette-art {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 6px 10px rgba(40, 28, 12, .22));
}
.ros-tail   { fill: var(--ros-tail); }
.ros-tail-2 { fill: var(--ros-tail-2); }
.ros-ring   { fill: var(--ros-gold); }
.ros-ring-2 { fill: var(--ros-gold-deep); }
.ros-face   { fill: var(--surface); }
.ros-line   { fill: none; stroke: var(--ros-gold); stroke-width: 1.5; }

/* the words sit over the centre of the rosette */
.rosette-text {
  position: absolute;
  left: 50%;
  top: 36.7%;
  width: 48%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .2em;
}

.rosette-kicker {
  font-family: var(--ui);
  font-weight: 800;
  font-size: 1.05rem;
  font-size: 7.4cqw;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ros-gold-deep);
  line-height: 1;
}

.rosette-category {
  font-family: var(--serif);
  font-style: italic;
  font-size: .8rem;
  font-size: 5.4cqw;
  line-height: 1.2;
  color: var(--ink);
  text-wrap: balance;
}

.award-name {
  margin: 0;
  font-family: var(--ui);
  font-weight: 600;
  font-size: .9375rem;
  letter-spacing: -.01em;
  color: var(--ink);
}

/* ---------- rosette in the page header ----------
   On phones it sits below the introduction. On computers the
   header splits into two columns and the rosette sits top right,
   beside the title. */

.mast .award-card {
  background: none;
  border: 0;
  box-shadow: none;
  padding: 0;
  margin: 1.75rem auto 0;
  max-width: 13rem;
}
.mast .rosette { max-width: 12rem; }

@media (min-width: 52rem) {
  /* only headers that contain a rosette split into two columns */
  .mast:has(> .award-card) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 14rem;
    column-gap: 2.5rem;
    align-items: start;
  }
  .mast:has(> .award-card) > * { grid-column: 1; }
  .mast > .award-card {
    grid-column: 2;
    grid-row: 1 / span 4;
    margin: .5rem 0 0;
    max-width: none;
  }
  .mast .rosette { max-width: 14rem; }
}

/* the version cards: two across on wider screens */
@media (min-width: 40rem) {
  .versions-grid { grid-template-columns: repeat(2, 1fr); }
}


/* ===========================================================
   FRONT PAGE: the learning process, section headings and
   the "Where it started" block
   =========================================================== */

/* colours for the seven step dice, light and dark */
:root {
  --step-1: #3d5b98; --step-2: #77407a; --step-3: #0f6f68; --step-4: #a34528;
  --step-5: #56662e; --step-6: #9c6c18; --step-7: #683d59;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --step-1: #8aa5e0; --step-2: #ca8fcd; --step-3: #5fc0b7; --step-4: #e8947a;
    --step-5: #a9bc6d; --step-6: #e0b258; --step-7: #c48daf;
  }
}
:root[data-theme="dark"] {
  --step-1: #8aa5e0; --step-2: #ca8fcd; --step-3: #5fc0b7; --step-4: #e8947a;
  --step-5: #a9bc6d; --step-6: #e0b258; --step-7: #c48daf;
}

/* small uppercase labels outside the citation boxes */
.process-block .label,
.section-heading .label {
  font-family: var(--mono);
  font-size: var(--fs-micro);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  display: block;
  margin-bottom: .6rem;
}

/* ---------- the learning process ---------- */

.process-block {
  background: var(--surface);
  border: 1px solid var(--rule-soft);
  border-radius: 16px;
  padding: 2rem 1.5rem 1.75rem;
  box-shadow: var(--lift);
  margin-top: 1rem;
}

.process-block h2,
.section-heading h2 {
  font-family: var(--ui);
  font-weight: 700;
  font-size: var(--fs-h2);
  letter-spacing: -.03em;
  line-height: 1.15;
  margin: 0 0 .75rem;
  text-wrap: balance;
}

.process-intro {
  max-width: 60ch;
  color: var(--ink-soft);
  margin: 0 0 1.75rem;
}

.process-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: .85rem;
}

/* on phones: die beside the words, to keep the list compact */
.process-grid li {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: .9rem;
  row-gap: .6rem;
  align-items: start;
  background: var(--ground);
  border: 1px solid var(--rule-soft);
  border-radius: 12px;
  padding: 1rem 1.05rem 1.1rem;
}

.process-grid li:nth-child(1) { --step: var(--step-1); }
.process-grid li:nth-child(2) { --step: var(--step-2); }
.process-grid li:nth-child(3) { --step: var(--step-3); }
.process-grid li:nth-child(4) { --step: var(--step-4); }
.process-grid li:nth-child(5) { --step: var(--step-5); }
.process-grid li:nth-child(6) { --step: var(--step-6); }
.process-grid li:nth-child(7) { --step: var(--step-7); }

/* each step number is a small die */
.process-number {
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 24%;
  background: var(--step, var(--accent));
  color: #fffaf2;
  font-family: var(--ui);
  font-weight: 800;
  font-size: .95rem;
  letter-spacing: -.02em;
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,.3),
    inset 0 -3px 0 rgba(0,0,0,.18),
    0 3px 0 color-mix(in srgb, var(--step, var(--accent)) 60%, #000),
    0 5px 9px rgba(0,0,0,.16);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .process-number { color: #1a1714; }
}
:root[data-theme="dark"] .process-number { color: #1a1714; }

.process-grid strong {
  display: block;
  font-family: var(--ui);
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: -.02em;
  color: var(--ink);
  margin-bottom: .25rem;
}

.process-grid p {
  margin: 0;
  font-size: .9rem;
  line-height: 1.45;
  color: var(--ink-soft);
}

/* Reassess loops back to Roll */
.process-grid li:nth-child(4)::after {
  content: "\21BB  Repeat for every die";
  grid-column: 2;
  justify-self: start;
  align-self: flex-start;
  margin-top: auto;
  font-family: var(--mono);
  font-size: var(--fs-micro);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--step-4);
  border: 1px dashed var(--step-4);
  border-radius: 999px;
  padding: .2rem .6rem;
}

.process-close {
  margin: 1.75rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule-soft);
  max-width: 62ch;
  font-style: italic;
  color: var(--ink-soft);
}

/* two across on tablets */
@media (min-width: 34rem) {
  .process-grid { grid-template-columns: repeat(2, 1fr); }
  .process-grid li { display: flex; flex-direction: column; gap: .75rem; }
  .process-block { padding: 2.25rem 2rem 2rem; }
}

/* four across on computers: the build loop on the first row,
   the handover on the second */
@media (min-width: 56rem) {
  .process-grid { grid-template-columns: repeat(4, 1fr); }
  .process-grid li:nth-child(5) { grid-column-start: 1; }
}

/* ---------- section headings ---------- */

.section-heading {
  margin: 3rem 0 0;
  max-width: 60ch;
}
.section-heading p { color: var(--ink-soft); margin: 0; }

/* ---------- where it started ---------- */

.origin-block { margin-top: 2.5rem; padding: 1.5rem; }

.origin-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  margin-bottom: 1.25rem;
}

.origin-title {
  font-family: var(--ui);
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: -.02em;
  margin: 0 0 .6rem;
}

.origin-copy { max-width: 44rem; }
