/* Chilero Coffee: Learn pages (/learn/ and one page per process).
   Loads after site.css and pages.css, and only adds what these pages need. */

.learn-section { padding-top: 8px; }
.learn-section + .learn-section { padding-top: 0; }
.learn-section h2 { font-size: clamp(1.75rem, 5.5vw, 2.75rem); }
.learn-flow > * + * { margin-top: 56px; }
@media (min-width: 768px) { .learn-flow > * + * { margin-top: 72px; } }

/* Small pixel heading over a block, like the cards' "STEP 4 · DEPULP". */
.eyebrow {
  font-family: var(--font-mono);
  font-size: .875rem;
  color: var(--cyan-lt);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin: 0 0 8px;
}

/* ---------- Hub: the four processes ---------- */

.proc-grid { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 22px; }
@media (min-width: 640px) { .proc-grid { grid-template-columns: 1fr 1fr; gap: 28px; } }
@media (min-width: 1100px) { .proc-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.proc {
  display: flex; flex-direction: column;
  height: 100%;
  color: var(--text);
  text-decoration: none;
  transition: transform .12s var(--ease), box-shadow .12s var(--ease);
}
.proc:hover { color: var(--text); transform: translate(-1px, -1px); box-shadow: var(--shadow-lg); }
.proc:hover .proc__go { color: var(--yellow); }
.proc__img { aspect-ratio: 4 / 5; width: 100%; object-fit: cover; border-bottom: var(--outline); background: #000; image-rendering: pixelated; }
.proc__body { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 18px; flex: 1; }
.proc__name { font-family: var(--font-head); font-weight: 900; font-size: 1.5rem; line-height: 1.1; }
.proc__what { color: var(--muted); margin: 0; }
.proc__cup { margin: 4px 0 0; font-size: .9375rem; }
.proc__cup b { font-family: var(--font-mono); font-weight: 500; font-size: .8125rem; text-transform: uppercase; letter-spacing: .06em; color: var(--cyan-lt); margin-right: 6px; }
.proc__go { margin-top: auto; padding-top: 8px; font-family: var(--font-head); font-weight: 800; text-transform: uppercase; letter-spacing: .02em; color: var(--cyan-lt); }
.proc .tag { align-self: flex-start; }

/* ---------- "The usual start": three steps every process shares ---------- */

.start { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 16px; counter-reset: start; }
@media (min-width: 768px) { .start { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; } }
.start li { padding: 18px 20px 6px; }
.start h3 { font-size: 1.375rem; margin-bottom: .3em; display: flex; align-items: center; gap: 10px; }
.start h3::before {
  counter-increment: start; content: counter(start);
  font-family: var(--font-pixel); font-size: .625rem; font-weight: 400;
  color: #000; background: var(--yellow); border: var(--outline);
  padding: 5px 6px 4px;
}
.start .big { font-family: var(--font-head); font-weight: 900; font-size: 2rem; color: var(--yellow); line-height: 1; margin: 6px 0 2px; }

/* ---------- Compare table ---------- */

.compare-wrap { margin-top: 24px; overflow-x: auto; border: var(--outline); box-shadow: var(--shadow); background: var(--surface); }
.compare { width: 100%; min-width: 720px; border-collapse: collapse; font-size: 1rem; }
.compare th, .compare td { padding: 14px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.compare thead th { font-family: var(--font-mono); font-weight: 500; font-size: .8125rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: #0E1013; border-bottom: 2px solid var(--line); }
.compare tbody th { font-family: var(--font-head); font-weight: 900; font-size: 1.125rem; white-space: nowrap; }
.compare tbody th a { color: var(--text); }
.compare tbody tr:last-child > * { border-bottom: 0; }
.compare .mono { white-space: nowrap; }

/* ---------- Words to know ---------- */

.words { margin: 24px 0 0; display: grid; gap: 16px; }
@media (min-width: 768px) { .words { grid-template-columns: 1fr 1fr; gap: 20px 32px; } }
.words div { padding: 14px 18px 4px; border-left: 4px solid var(--cyan); background: var(--surface); }
.words dt { font-family: var(--font-head); font-weight: 900; font-size: 1.25rem; }
.words dd { margin: 2px 0 10px; color: var(--muted); }

/* ---------- Process page: animation + steps ---------- */

.watch { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; margin-top: 24px; }
@media (min-width: 1000px) {
  .watch { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: start; gap: 36px; }
  .watch .anim { position: sticky; top: calc(var(--bar-h) + 20px); }
}

.anim { padding: 10px; }
.anim__stage { background: #000; border: 2px solid var(--line); }
.anim__stage canvas { display: block; width: 100%; aspect-ratio: 16 / 9; image-rendering: pixelated; }
.anim__ctrl { display: flex; align-items: center; gap: 10px; padding: 12px 4px 4px; }
.anim__btn {
  flex: none;
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  border: var(--outline);
  background: var(--red);
  color: var(--text);
  font: .75rem var(--font-pixel);
  box-shadow: 3px 3px 0 var(--cyan);
  cursor: pointer;
}
.anim__btn:hover { background: var(--dot); }
.anim__btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--cyan); }
.anim__btn--ghost { background: var(--surface); box-shadow: 3px 3px 0 var(--line); }
.anim__btn--ghost:hover { background: #1B1E24; }
.anim__range { flex: 1; min-width: 0; accent-color: var(--red); height: 28px; }
.anim__time { font: .6875rem var(--font-pixel); color: var(--yellow); min-width: 46px; text-align: right; }
.anim__cap { margin: 10px 4px 4px; padding-top: 12px; border-top: 1px solid var(--line); min-height: 7.5em; }
.anim__cap h3 { font-size: 1.25rem; margin-bottom: .35em; }
.anim__cap p { margin: 0; color: var(--muted); }
@media (min-width: 1000px) { .anim__cap { display: none; } }
.anim noscript p { margin: 12px 4px 4px; color: var(--muted); }

.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; counter-reset: step; }
.step {
  position: relative;
  padding: 14px 16px 2px 58px;
  background: var(--surface);
  border: 2px solid var(--line);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 14px; top: 14px;
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  font: .625rem var(--font-pixel);
  color: var(--muted);
  border: 2px solid var(--line);
}
.step h3 { font-size: 1.125rem; margin: 2px 0 .3em; }
.step p { color: var(--muted); font-size: 1rem; }
.step button {
  all: unset;
  cursor: pointer;
  font: inherit;
  color: var(--text);
}
/* The whole step is clickable: the title button's ::after covers the card. */
.step button::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.steps:not(.steps--static) .step { cursor: pointer; }
.steps:not(.steps--static) .step:hover { border-color: var(--cyan-lt); }
.step:hover button { color: var(--yellow); }
.step button:focus-visible { outline: none; }
.step:has(button:focus-visible) { outline: 3px solid var(--yellow); outline-offset: 2px; }
.step.is-active, .steps:not(.steps--static) .step.is-active:hover { border-color: #000; box-shadow: var(--shadow); }
.step.is-active::before { background: var(--yellow); color: #000; border-color: #000; }
.step.is-active p { color: var(--text); }
.steps--static .step { border-color: var(--line); }

/* Facts under a step: "12–48 hours" */
.facts { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 14px; }
/* Long ones ("In the cup: intense: winey, boozy, tropical fruit") may wrap on phones. */
.facts .tag { white-space: normal; }

/* ---------- In the cup ---------- */

/* One line: "In the cup" tag + the flavour */
.cup { margin: 20px 0 0; max-width: 62ch; color: var(--muted); line-height: 1.6; }
.cup .tag { margin-right: 8px; vertical-align: 1px; }


/* ---------- Other processes (bottom of a process page) ---------- */

.others { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 16px; }
@media (min-width: 640px) { .others { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.other { display: flex; align-items: center; gap: 14px; padding: 12px 14px; color: var(--text); text-decoration: none; height: 100%; }
.other:hover { color: var(--text); box-shadow: var(--shadow-lg); transform: translate(-1px, -1px); }
.other img { width: 56px; aspect-ratio: 4 / 5; object-fit: cover; border: var(--outline); flex: none; image-rendering: pixelated; }
.other span { display: flex; flex-direction: column; }
.other b { font-family: var(--font-head); font-weight: 900; font-size: 1.125rem; }
.other small { color: var(--muted); font-size: .875rem; }

/* Our coffee made this way: the main thing on the page after the steps */
.ours { display: flex; gap: 18px; align-items: center; padding: 16px; margin-top: 24px; max-width: 760px; color: var(--text); text-decoration: none; }
@media (min-width: 640px) { .ours { gap: 28px; padding: 20px; } }
.ours:hover { color: var(--text); box-shadow: var(--shadow-lg); transform: translate(-1px, -1px); }
.ours img { width: 112px; height: 112px; object-fit: cover; border: var(--outline); flex: none; }
@media (min-width: 640px) { .ours img { width: 160px; height: 160px; } }
.ours__body { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.ours b { font-family: var(--font-head); font-weight: 900; font-size: clamp(1.375rem, 4vw, 1.875rem); line-height: 1.15; }
.ours__desc { color: var(--muted); }
.ours__btn { margin-top: 8px; }
.ours:hover .ours__btn { box-shadow: var(--shadow-lg); }
figure.anim { margin: 0; }

/* ======================================================================
   How to taste coffee (learn/taste/)
   ====================================================================== */

/* Pixel icons (learn/assets/taste/*.svg, 12 × 12 grid): always crisp. */
.myth__icon, .q__icon, .fam__name img { image-rendering: pixelated; }

/* ---------- The myth ---------- */
.myth { display: flex; gap: 18px; align-items: flex-start; padding: 20px 22px 6px; margin-top: 28px; max-width: 760px; }
.myth__icon { width: 48px; height: 48px; flex: none; margin-top: 4px; }
.myth h2 { font-size: clamp(1.375rem, 4vw, 1.75rem); margin-bottom: .35em; }
.myth p { color: var(--muted); }

/* ---------- Four questions ---------- */
.q-grid { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 22px; }
@media (min-width: 768px) { .q-grid { grid-template-columns: 1fr 1fr; gap: 28px; } }
.q { --q: var(--cyan-lt); position: relative; padding: 18px 20px 6px 20px; }
.q__icon { width: 48px; height: 48px; float: right; margin: 0 0 8px 12px; }
.q__what { font-family: var(--font-mono); font-size: .8125rem; text-transform: uppercase; letter-spacing: .08em; color: var(--cyan-lt); margin: 0 0 4px; }
.q h3 { font-size: 1.375rem; margin-bottom: .35em; }
.q > p:not(.q__what):not(.scale__ends) { color: var(--muted); }
.q__wheel a { font-family: var(--font-head); font-weight: 800; text-transform: uppercase; letter-spacing: .02em; }
/* The low → high scale: 8 pixel blocks getting brighter. An illustration only. */
.scale { clear: both; display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; margin: 6px 0 8px; }
.scale span { height: 16px; border: 2px solid #000; background: var(--q); }
.scale span:nth-child(1) { opacity: .14; } .scale span:nth-child(2) { opacity: .26; }
.scale span:nth-child(3) { opacity: .38; } .scale span:nth-child(4) { opacity: .5; }
.scale span:nth-child(5) { opacity: .62; } .scale span:nth-child(6) { opacity: .74; }
.scale span:nth-child(7) { opacity: .87; }
.scale__ends { display: flex; justify-content: space-between; gap: 12px; font-size: .9375rem; max-width: none; }
.scale__ends span:last-child { text-align: right; }
.scale__ends b { display: block; font-family: var(--font-mono); font-weight: 500; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.q-note { margin: 24px 0 0; font-family: var(--font-head); font-weight: 800; font-size: 1.125rem; }

/* ---------- The wheel: without JavaScript, a list of families ---------- */
.wheel { margin-top: 28px; }
.fams { list-style: none; padding: 0; margin: 0; display: grid; gap: 22px; }
@media (min-width: 640px) { .fams { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .fams { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.fam { background: var(--surface); border: var(--outline); box-shadow: var(--shadow); }
.fam__name { display: flex; align-items: center; gap: 10px; margin: 0; padding: 10px 14px; font-size: 1.25rem; background: var(--fam); color: var(--fam-fg); border-bottom: var(--outline); }
.fam__name img { width: 32px; height: 32px; }
.fam__groups { list-style: none; padding: 12px 16px 4px; margin: 0; }
.fam__groups h4 { font-family: var(--font-mono); font-weight: 500; font-size: .8125rem; text-transform: uppercase; letter-spacing: .06em; color: var(--cyan-lt); margin: 0 0 6px; }
.fam__notes { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.fam__notes li { padding: 2px 8px; border: 2px solid var(--line); font-size: .9375rem; }
.fam__hint { margin: -6px 0 12px; font-size: .875rem; color: var(--muted); }

/* ---------- The wheel: with JavaScript, a dial you spin (learn/js/taste-wheel.js) ---------- */
.fam__desc { margin: 0; padding: 10px 16px 0; color: var(--muted); font-size: .9375rem; }

.dial { display: grid; gap: 20px; align-items: start; }
@media (min-width: 900px) {
  .dial { grid-template-columns: auto minmax(0, 1fr); gap: 36px; }
  .dial__detail { align-self: center; }
}
.dial__stage {
  position: relative; overflow: hidden;
  max-width: 100%;
  cursor: grab; touch-action: none;
  -webkit-user-select: none; user-select: none;
  -webkit-tap-highlight-color: transparent;
}
/* Phones: sideways swipes turn the dial, up and down still scroll the page. */
.dial[data-mode="top"] .dial__stage { touch-action: pan-y; margin: 0 calc(-1 * var(--gutter)); max-width: none; }
.dial__stage.is-dragging { cursor: grabbing; }
.dial__stage:focus-visible { outline: 3px solid var(--cyan-lt); outline-offset: 4px; }
.dial__svg { display: block; overflow: visible; }
.dial__svg image { image-rendering: pixelated; pointer-events: none; }
.dial__svg text { pointer-events: none; font-family: var(--font-head); font-weight: 900; fill: var(--fg); }

.dial__fam path, .dial__grp path { fill: var(--c); stroke: #000; stroke-width: 2px; transition: filter .2s var(--ease); }
.dial__fam, .dial__grp { cursor: pointer; }
.dial__fam:hover path, .dial__grp:hover path { filter: brightness(1.14); }
.dial__grp-name { font-weight: 800; }
/* The slice at the pointer lights up while the wheel turns; the picked one pops out with a yellow edge. */
.dial__grp.is-under path, .dial__fam.is-under path { filter: brightness(1.12); }
.dial__grp { transition: transform .35s cubic-bezier(.34, 1.45, .64, 1); }
.dial__grp.is-picked { transform: translate(var(--px), var(--py)); }
.dial__grp.is-picked path { stroke: var(--yellow); stroke-width: 4px; paint-order: stroke; filter: brightness(1.18); }
.dial__fam.is-picked path { stroke: var(--yellow); stroke-width: 4px; filter: brightness(1.15); }
.dial__hub { fill: var(--black); stroke: #000; stroke-width: 2px; }
.dial__needle { fill: var(--yellow); stroke: #000; stroke-width: 2px; stroke-linejoin: round; filter: drop-shadow(2px 2px 0 var(--cyan)); }
/* Our coffees on the wheel: the Chilero C on a black disc with a yellow ring, so it stands out on red slices too,
   with a soft yellow pulse to catch the eye. */
.dial__ours { pointer-events: none; }
.dial__ours-disc { fill: var(--black); stroke: var(--yellow); stroke-width: 2.5px; filter: drop-shadow(2px 2px 0 #000); }
.dial__svg .dial__ours image { image-rendering: auto; }
.dial__ours-ping { fill: none; stroke: var(--yellow); stroke-width: 2px; transform-box: fill-box; transform-origin: center; animation: ours-ping 2.2s var(--ease) infinite; }
@keyframes ours-ping { 0% { transform: scale(1); opacity: .9; } 70%, 100% { transform: scale(1.9); opacity: 0; } }

/* ---------- Details panel ---------- */
.dial__detail { padding: 20px 22px 18px; min-height: 340px; }
@media (min-width: 900px) { .dial__detail { min-height: 420px; } }
.dial__detail.is-new > * { animation: dd-in .35s var(--ease) backwards; }
.dial__detail.is-new > :nth-child(2) { animation-delay: 30ms; }
.dial__detail.is-new > :nth-child(3) { animation-delay: 60ms; }
.dial__detail.is-new > :nth-child(n+4) { animation-delay: 90ms; }
@keyframes dd-in { from { opacity: 0; transform: translateX(14px); } }
.dial__detail img { image-rendering: pixelated; }
.dial__detail img.dd__c { width: 18px; height: 18px; flex: none; image-rendering: auto; }
.dd__focus { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: -4px 0 14px; padding: 8px 10px; background: #000; color: var(--yellow); font-family: var(--font-mono); font-size: .875rem; max-width: none; }
.dd__focus img { width: 10px; height: 12px; }
.dial__detail { position: relative; }
.dd__restart { position: absolute; top: 14px; right: 18px; margin: 0; font-family: var(--font-mono); font-size: .8125rem; text-transform: uppercase; letter-spacing: .06em; }
.dd__restart + .dd__focus { margin-top: 22px; }
.dd__crumb { font-family: var(--font-mono); font-size: .8125rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 4px; }
.dd__link { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; color: var(--cyan-lt); text-decoration: underline; text-underline-offset: 3px; font: inherit; text-transform: inherit; letter-spacing: inherit; }
.dd__link:hover { color: var(--yellow); }
.dd__link:focus-visible { outline: 3px solid var(--cyan-lt); outline-offset: 2px; }
.dd__link img { width: 18px; height: 18px; }
.dd__title { display: flex; align-items: center; gap: 12px; font-size: clamp(1.75rem, 4vw, 2.25rem); line-height: 1.05; margin: 0 0 10px; }
.dd__title img { width: 40px; height: 40px; }
.dd__lead { color: var(--muted); }
.dd__label { display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: .8125rem; text-transform: uppercase; letter-spacing: .06em; color: var(--cyan-lt); margin: 16px 0 8px; max-width: none; }
.dd__label img { width: 10px; height: 12px; }
.dd__notes { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.dd__notes li { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 2px solid var(--line); font-family: var(--font-head); font-weight: 800; font-size: 1.0625rem; }
.dd__notes li.is-ours { border-color: #000; background: var(--yellow); color: #000; box-shadow: 3px 3px 0 var(--cyan); }
.dd__ours { display: inline-flex; align-items: center; gap: 5px; padding: 1px 6px; background: #000; color: var(--yellow); font-family: var(--font-mono); font-weight: 500; font-size: .75rem; }
.dd__ours img { width: 10px; height: 12px; }
.dd__hint { margin: 12px 0 0; color: var(--muted); font-size: .9375rem; }
.dd__groups { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.dd__groups button { all: unset; box-sizing: border-box; cursor: pointer; display: block; width: 100%; padding: 8px 12px; border: 2px solid var(--line); transition: border-color .15s var(--ease), transform .15s var(--ease); }
.dd__groups button:hover { border-color: var(--cyan-lt); transform: translateX(3px); }
.dd__groups button:focus-visible { outline: 3px solid var(--cyan-lt); outline-offset: 2px; }
.dd__groups b { display: flex; align-items: center; gap: 6px; font-family: var(--font-head); font-weight: 900; }
.dd__groups b img { width: 10px; height: 12px; }
.dd__groups small { display: block; color: var(--muted); font-size: .875rem; }
.dd__coffees { margin-top: 18px; padding-top: 4px; border-top: 1px solid var(--line); }
.dd__coffees.is-here .dd__label { color: var(--yellow); }
.dd__coffee-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.dd__coffee-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.dd__coffee-list a { font-family: var(--font-head); font-weight: 900; margin-right: 4px; }
.dd__chip { all: unset; box-sizing: border-box; cursor: pointer; padding: 2px 8px; border: 2px solid var(--line); font-size: .875rem; color: var(--text); }
.dd__chip:hover { border-color: var(--yellow); color: var(--yellow); }
.dd__chip:focus-visible { outline: 3px solid var(--cyan-lt); outline-offset: 2px; }
.dd__chip.is-static { cursor: default; border-color: #000; background: var(--yellow); color: #000; }
.dd__nav { display: flex; justify-content: space-between; gap: 12px; margin: 22px 0 0; max-width: none; }

/* ---------- Process → taste (four of the "other process" cards) ---------- */
@media (min-width: 640px) { .others--4 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .others--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---------- The Oops corner ---------- */
.oops { margin-top: 24px; display: grid; gap: 22px; }
@media (min-width: 900px) { .oops { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; } }
.oops__panel { padding: 18px 20px 8px; }
.oops__panel h3 { font-size: 1.375rem; margin-bottom: .5em; }
.oops__panel h3 span { display: block; font-family: var(--font-mono); font-weight: 500; font-size: .875rem; text-transform: uppercase; letter-spacing: .06em; color: var(--yellow); margin-top: 4px; }
.oops__panel ul { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 10px; }
.oops__panel li { color: var(--muted); }
.oops__panel li b { display: block; color: var(--text); font-family: var(--font-head); font-weight: 900; }
.oops__us { font-size: .9375rem; color: var(--text); border-top: 1px solid var(--line); padding-top: 10px; }
.oops__panel--you li, .oops__panel--you h3 span { color: var(--text); }
.oops__panel--you h3 span { color: #000; background: var(--yellow); border: var(--outline); display: inline-block; padding: 2px 8px; }
.oops__panel--you li { background: rgba(0, 0, 0, .55); padding: 8px 10px; }

/* ---------- Credit line ---------- */
.credit { margin: 40px 0 0; font-size: .875rem; color: var(--muted); }

/* ---------- Learn hub: "Next: taste it" card ---------- */
.ours img.ours__icon { padding: 18px; background: #000; image-rendering: pixelated; object-fit: contain; }
@media (min-width: 640px) { .ours img.ours__icon { padding: 28px; } }

/* ======================================================================
   The Coffee learning path: 1 Plant → 2 Process → 3 Taste
   ====================================================================== */

/* ---------- Path bar (top of every step page; same markup everywhere, see README) ---------- */
.path { margin: 0 0 22px; }
/* Phones: the decorative bean in the page head would sit on top of the path bar. */
@media (max-width: 639px) { .page-head:has(.path) .bean--1 { display: none; } }
.path__list { list-style: none; padding: 0; margin: 0; display: flex; align-items: center; flex-wrap: nowrap; }
.path__list li { display: flex; align-items: center; }
/* The dotted road between two steps; cyan once you've walked it. */
.path__list li + li::before { content: ""; width: 20px; border-top: 3px dotted var(--line); margin: 0 6px; }
.path__list li:has(.is-done, .is-current) + li:has(.is-done, .is-current)::before { border-top-color: var(--cyan); }
.path__step {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 4px 10px 4px 4px;
  border: 2px solid var(--line);
  color: var(--muted); text-decoration: none;
  font-family: var(--font-head); font-weight: 800; font-size: .875rem; text-transform: uppercase; letter-spacing: .02em;
  white-space: nowrap;
  transition: border-color .12s var(--ease), color .12s var(--ease);
}
.path__step:hover { color: var(--text); border-color: var(--cyan-lt); }
.path__num { font-family: var(--font-pixel); font-weight: 400; font-size: .5625rem; line-height: 1; padding: 4px 5px 3px; border: 2px solid var(--line); }
.path__step.is-done { color: var(--text); border-color: var(--cyan); }
.path__step.is-done .path__num { background: var(--cyan); color: #000; border-color: #000; }
.path__step.is-current { color: #000; background: var(--yellow); border-color: #000; box-shadow: 3px 3px 0 var(--cyan); }
.path__step.is-current .path__num { background: #000; color: var(--yellow); border-color: #000; }
@media (max-width: 419px) {
  .path__list li + li::before { width: 10px; margin: 0 4px; }
  .path__step { gap: 5px; padding: 3px 7px 3px 3px; font-size: .75rem; }
  .path__num { font-size: .5rem; padding: 3px 4px 2px; }
}

/* ---------- Next step (bottom of every step page) ---------- */
.next-step { display: flex; align-items: center; gap: 18px; margin-top: 48px; padding: 18px 20px; max-width: 760px; color: var(--text); text-decoration: none; transition: transform .12s var(--ease), box-shadow .12s var(--ease); }
a.next-step:hover { color: var(--text); transform: translate(-1px, -1px); box-shadow: var(--shadow-lg); }
a.next-step:hover .next-step__go { box-shadow: var(--shadow-lg); }
.next-step__icon { width: 64px; height: 64px; flex: none; image-rendering: pixelated; }
.next-step__body { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.next-step__kicker { font-family: var(--font-mono); font-size: .8125rem; text-transform: uppercase; letter-spacing: .08em; color: var(--cyan-lt); }
.next-step__name { font-family: var(--font-head); font-weight: 900; font-size: clamp(1.375rem, 4vw, 1.75rem); line-height: 1.1; }
.next-step__line { color: var(--muted); }
.next-step__go { flex: none; }
.next-step__links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 8px; font-family: var(--font-head); font-weight: 800; }
.next-step--done { border-color: #000; }
.next-step--done .next-step__kicker { color: var(--yellow); }
@media (max-width: 520px) { .next-step { gap: 14px; padding: 16px; } .next-step__icon { width: 48px; height: 48px; } .next-step__go { display: none; } }

/* ---------- Hub: the path map (a retro level map) ---------- */
.map {
  position: relative;
  margin-top: 8px; padding: 34px 18px 28px;
  border: var(--outline); box-shadow: var(--shadow);
  background-color: #0B0D10;
  background-image:
    linear-gradient(to right, rgba(20, 169, 204, .08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(20, 169, 204, .08) 1px, transparent 1px);
  background-size: 24px 24px;
}
.map__trail { display: none; }
.map__stops { position: relative; list-style: none; padding: 0; margin: 0; display: grid; gap: 40px; }
/* Phones: the trail is a dotted line down the left. */
.map__stops::before { content: ""; position: absolute; left: 34px; top: 40px; bottom: 40px; border-left: 4px dotted var(--yellow); opacity: .85; }
.map__stop { position: relative; }
.map__flag {
  position: absolute; z-index: 2; top: -22px; left: 12px;
  font-family: var(--font-pixel); font-size: .5rem; line-height: 1; text-transform: uppercase;
  padding: 5px 6px 4px; background: var(--red); color: var(--text); border: 2px solid #000;
}
.map__flag--end { left: auto; right: 12px; top: -30px; padding: 0; background: none; border: 0; }
.map__flag--end img { width: 40px; height: 40px; image-rendering: pixelated; display: block; }
.stop {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 56px minmax(0, 1fr); column-gap: 14px; row-gap: 4px; align-items: start;
  padding: 18px 16px 16px; color: var(--text); text-decoration: none;
  transition: transform .12s var(--ease), box-shadow .12s var(--ease);
}
.stop:hover { color: var(--text); transform: translate(-1px, -1px); box-shadow: var(--shadow-lg); }
.stop:hover .stop__go { box-shadow: var(--shadow-lg); }
.stop__num { position: absolute; top: -12px; left: -12px; font-family: var(--font-pixel); font-size: .75rem; line-height: 1; padding: 6px 7px 5px; background: var(--yellow); color: #000; border: 2px solid #000; }
.stop__icon { grid-row: 1 / span 3; width: 56px; height: 56px; image-rendering: pixelated; }
.stop__name { font-family: var(--font-head); font-weight: 900; font-size: 1.625rem; line-height: 1.1; }
.stop__line { color: var(--muted); }
.stop__go { justify-self: start; margin-top: 8px; }
.map__note { margin: 20px 0 0; font-family: var(--font-mono); color: var(--muted); }
/* Big screens: three stops in a row, the middle one lower, a dotted trail winding between them. */
@media (min-width: 900px) {
  .map { padding: 56px 32px 40px; }
  .map__trail { display: block; position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
  .map__trail path { fill: none; stroke: var(--yellow); stroke-width: 6; stroke-dasharray: 2 14; stroke-linecap: square; vector-effect: non-scaling-stroke; opacity: .9; }
  .map__stops { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; align-items: start; }
  .map__stops::before { display: none; }
  .map__stop:nth-child(2) { margin-top: 120px; }
  .stop { grid-template-columns: 1fr; text-align: left; padding: 22px 20px 20px; }
  .stop__icon { grid-row: auto; width: 72px; height: 72px; margin-bottom: 6px; }
}

/* ======================================================================
   Plant 101: learn/varieties/
   ====================================================================== */

/* ---------- Apples and pears ---------- */
.fruit { margin-top: 24px; display: grid; gap: 22px; }
@media (min-width: 768px) { .fruit { grid-template-columns: 1fr 1fr; gap: 28px; } }
.fruit__card { padding: 18px 20px 6px; }
.fruit__pics { display: flex; gap: 10px; margin: 0 0 10px; }
.fruit__pics img { width: 56px; height: 56px; image-rendering: pixelated; }
.fruit__card h3 { font-size: 1.375rem; margin-bottom: .45em; }
.fruit__tag { display: inline-block; margin-right: 8px; padding: 3px 6px 2px; vertical-align: 4px; background: var(--yellow); color: #000; border: 2px solid #000; font-family: var(--font-pixel); font-weight: 400; font-size: .5625rem; line-height: 1; text-transform: uppercase; }
.fruit__card p { color: var(--muted); }
.fruit__card b { color: var(--text); }
.fruit__sum { margin: 24px 0 0; font-family: var(--font-head); font-weight: 900; font-size: clamp(1.25rem, 3.6vw, 1.625rem); line-height: 1.2; max-width: none; }

/* ---------- Choose your coffee: a character select screen (arcade style, like the game) ---------- */
.arcade { margin-top: 24px; padding: 10px; }
.arcade__screen {
  background-color: #000;
  background-image: repeating-linear-gradient(to bottom, rgba(255, 255, 255, .035) 0 2px, transparent 2px 4px);
  border: 2px solid var(--line);
  padding: 22px 14px 24px;
}
.arcade__title { margin: 0 auto 20px; text-align: center; font-family: var(--font-pixel); font-size: .75rem; color: var(--yellow); text-transform: uppercase; letter-spacing: .08em; animation: arcade-blink 1.2s steps(2, jump-none) infinite; max-width: none; }
@keyframes arcade-blink { 50% { opacity: .35; } }
.fighters { display: grid; gap: 18px; align-items: center; }
@media (min-width: 820px) { .fighters { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 22px; align-items: stretch; } .vs { align-self: center; } }
.fighter { --f: var(--red); position: relative; padding: 18px 16px 16px; border: 3px solid var(--line); background: rgba(19, 21, 25, .85); transition: border-color .15s var(--ease), box-shadow .15s var(--ease); }
.fighter--robusta { --f: var(--cyan); }
.fighter__player { position: absolute; top: -12px; left: 12px; margin: 0; padding: 4px 6px 3px; font-family: var(--font-pixel); font-size: .5625rem; line-height: 1; background: var(--f); color: #000; border: 2px solid #000; }
.fighter__img { display: block; width: 96px; height: 120px; margin: 4px auto 10px; image-rendering: pixelated; }
.fighter__name { margin: 0; text-align: center; font-family: var(--font-pixel); font-weight: 400; font-size: 1rem; color: var(--yellow); text-transform: uppercase; letter-spacing: .04em; }
.fighter__latin { margin: 6px auto 14px; text-align: center; font-size: .8125rem; font-style: italic; color: var(--muted); }
.stats { margin: 0 0 14px; display: grid; gap: 7px; }
.stats div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stats dt { font-family: var(--font-mono); font-size: .8125rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text); }
.stats dd { margin: 0; }
.stat { display: inline-flex; gap: 3px; }
.stat i { width: 16px; height: 14px; border: 2px solid var(--line); background: #000; }
.stat i.is-on { background: var(--f); border-color: #000; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .25); }
.fighter__lines { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.fighter__lines li { position: relative; padding-left: 18px; color: var(--muted); font-size: .9375rem; line-height: 1.45; }
.fighter__lines li::before { content: ""; position: absolute; left: 2px; top: .55em; width: 8px; height: 8px; background: var(--f); }
.fighter__pick { margin: 4px 0 14px; width: 100%; min-height: 44px; border: 2px solid #000; background: var(--surface); color: var(--text); font-family: var(--font-pixel); font-size: .625rem; text-transform: uppercase; cursor: pointer; box-shadow: 3px 3px 0 var(--f); }
.fighter__pick:hover { background: #1B1E24; }
.fighter__pick[aria-pressed="true"] { background: var(--f); color: #000; }
/* Picked: the arcade selection frame. */
.fighter.is-picked { border-color: var(--yellow); box-shadow: 0 0 0 3px #000, 6px 6px 0 3px var(--f); }
.fighter.is-picked .fighter__img { animation: fighter-hop .5s steps(2, jump-none) 3; }
@keyframes fighter-hop { 50% { translate: 0 -6px; } }
/* With JavaScript: only the characters until one is chosen; then its stats slide in and the other one dims. */
.fighter__details[hidden] { display: none; }
.fighters.is-choosing, .fighters.has-pick { align-items: start; }
.fighters.is-choosing .fighter__pick { animation: pick-pulse 1.2s steps(2, jump-none) infinite; }
@keyframes pick-pulse { 50% { box-shadow: 3px 3px 0 var(--yellow); } }
.fighter.is-picked .fighter__details { animation: details-in .4s var(--ease) backwards; }
@keyframes details-in { from { opacity: 0; transform: translateY(10px); } }
.fighters.has-pick .fighter:not(.is-picked) { opacity: .55; transition: opacity .2s var(--ease); }
.fighters.has-pick .fighter:not(.is-picked):hover, .fighters.has-pick .fighter:not(.is-picked):focus-within { opacity: 1; }
.vs { margin: 0; text-align: center; font-family: var(--font-pixel); font-size: 1.75rem; color: var(--red); text-shadow: 3px 3px 0 var(--yellow); max-width: none; }
@media (min-width: 820px) { .vs { font-size: 2.25rem; } }
.bonus { margin-top: 22px; display: grid; gap: 14px; }
@media (min-width: 768px) { .bonus { grid-template-columns: 1fr 1fr; gap: 22px; } }
.bonus__item { margin: 0; padding: 14px 16px; border: 2px dashed var(--yellow); color: var(--text); max-width: none; }
.bonus__tag { display: inline-block; margin-right: 6px; padding: 3px 5px 2px; vertical-align: 2px; background: var(--yellow); color: #000; font-family: var(--font-pixel); font-size: .5rem; line-height: 1; text-transform: uppercase; }

/* ---------- The Arabica family tree: generations top to bottom, a dotted trunk between them ---------- */
.tree { list-style: none; padding: 0; margin: 28px 0 0; }
.tree__gen { position: relative; padding-top: 44px; }
.tree__gen:first-child { padding-top: 0; }
.tree__gen + .tree__gen::before { content: ""; position: absolute; top: 6px; left: 50%; height: 30px; border-left: 4px dotted var(--yellow); translate: -2px 0; }
.tree__label { margin: 0 0 12px; text-align: center; font-family: var(--font-mono); font-weight: 500; font-size: .8125rem; text-transform: uppercase; letter-spacing: .08em; color: var(--cyan-lt); }
.tree__cards { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: 16px; }
.kin { display: flex; gap: 14px; align-items: flex-start; width: 100%; padding: 14px 16px; background: var(--surface); border: 2px solid var(--line); }
@media (min-width: 640px) { .kin { width: 300px; } .kin--wide { width: 460px; } }
.kin__icon { width: 44px; height: 44px; flex: none; image-rendering: pixelated; }
.kin__body { display: flex; flex-direction: column; gap: 2px; }
.kin__kicker { font-family: var(--font-mono); font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--cyan-lt); }
.kin__name { font-family: var(--font-head); font-weight: 900; font-size: 1.25rem; line-height: 1.15; }
.kin__line { color: var(--muted); font-size: .9375rem; line-height: 1.45; }
.kin--star { border-color: #000; box-shadow: var(--shadow); }
.kin--star .kin__kicker { color: var(--yellow); }
.kin__ours { margin-top: 6px; font-family: var(--font-head); font-weight: 800; font-size: .9375rem; white-space: nowrap; }

/* ---------- Plant, place, process, roast ---------- */
.four { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 18px; }
@media (min-width: 560px) { .four { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .four { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; } }
.four__tile { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; }
.four__tile img { width: 48px; height: 48px; image-rendering: pixelated; margin-bottom: 6px; }
.four__tile b { font-family: var(--font-head); font-weight: 900; font-size: 1.375rem; }
.four__tile span { color: var(--muted); font-size: .9375rem; }
.four__tile em { font-style: normal; color: var(--yellow); font-weight: 700; }
.four__tile.is-here { border-color: #000; background: #1B1E24; }

/* ---------- Plants get sick too ---------- */
.sick { display: flex; gap: 18px; align-items: flex-start; padding: 20px 22px 8px; margin-top: 24px; max-width: 760px; }
.sick__icon { width: 56px; height: 56px; flex: none; image-rendering: pixelated; }
.sick p { color: var(--muted); }
.sick .sick__us { color: var(--text); border-top: 1px solid var(--line); padding-top: 12px; }

/* ---------- Our coffees on the plant page ---------- */
.plant-coffees { list-style: none; padding: 0; margin: 0; display: grid; gap: 0 28px; }
@media (min-width: 900px) { .plant-coffees { grid-template-columns: 1fr 1fr; } }
.plant-coffees .ours { max-width: none; height: calc(100% - 24px); }
.ours__plant { display: flex; flex-wrap: wrap; gap: 6px; }
.ours__plant .tag { white-space: normal; }
