/* ===========================================================================
   Classroom Activities: the catalogue, and the page a class is run from.
   ========================================================================= */

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--teal-700); text-decoration: underline; cursor: pointer; }

/* --- Catalogue hero ---------------------------------------------------------- */

.act-hero {
  background:
    radial-gradient(900px 400px at 15% -10%, rgb(111 192 200 / 0.35), transparent 65%),
    radial-gradient(700px 420px at 95% 10%, rgb(245 166 35 / 0.18), transparent 60%),
    var(--night-800, #0a2126);
  color: #fff; padding: var(--sp-5) 0 var(--sp-6);
}
.act-hero .crumbs, .act-hero .crumbs a { color: #9fc3c7; }
.act-hero h1 { color: #fff; margin: 0.2em 0 0.3em; }
.act-hero__lede { color: #cfe3e5; max-width: 60ch; font-size: 1.05rem; }
.act-hero__search { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: var(--sp-4); }
.act-hero__search label { flex: 1 1 340px; }
.act-hero__search input {
  width: 100%; font: inherit; padding: 0.85em 1.1em; border-radius: 99px; border: 2px solid rgb(255 255 255 / 0.25);
  background: rgb(255 255 255 / 0.1); color: #fff;
}
.act-hero__search input::placeholder { color: #a9c8cc; }
.act-hero__search input:focus { outline: 2px solid var(--amber-400); outline-offset: 2px; background: rgb(255 255 255 / 0.16); }

/* --- Browse rows -------------------------------------------------------------- */

.act-section { padding-top: var(--sp-5); }
.act-browse { margin-bottom: var(--sp-5); }
.act-browse__head { display: flex; flex-wrap: wrap; gap: 0.2rem 0.8rem; align-items: baseline; margin-bottom: 0.9rem; }
.act-browse__head h2 { margin: 0; font-size: 1.2rem; }
.act-browse__head p { margin: 0; font-size: 0.9rem; }

.act-species-row {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 0.7rem;
}
.act-species {
  --animal: var(--teal-700);
  display: grid; justify-items: center; gap: 0.25rem; padding: 0.9rem 0.5rem 0.7rem; cursor: pointer;
  background: var(--white); border: 2px solid var(--line); border-radius: 16px; color: var(--ink-soft);
  font: 600 0.82rem/1.2 var(--sans); text-align: center; transition: transform 0.18s, border-color 0.18s, background 0.18s;
}
.act-species__mark { width: 42px; height: 42px; color: var(--animal); transition: transform 0.25s; }
.act-species__count { font-size: 0.72rem; color: var(--ink-faint); }
.act-species:hover { transform: translateY(-3px); border-color: var(--animal); }
.act-species:hover .act-species__mark { transform: scale(1.08) rotate(-3deg); }
.act-species.is-on {
  border-color: var(--animal); background: color-mix(in srgb, var(--animal) 12%, #fff); color: var(--ink);
  box-shadow: 0 6px 18px -10px var(--animal);
}
.act-species.is-empty { opacity: 0.35; }

.act-kind-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 215px), 1fr)); gap: 0.7rem; }
.act-kind {
  --accent: var(--teal-700);
  display: grid; grid-template-columns: auto 1fr; gap: 0.15rem 0.7rem; align-items: center; text-align: left;
  padding: 0.8rem 0.9rem; cursor: pointer; background: var(--white); border: 2px solid var(--line);
  border-left: 5px solid var(--accent); border-radius: 12px; font: inherit; color: inherit;
  transition: transform 0.18s, border-color 0.18s, background 0.18s;
}
.act-kind__mark { width: 26px; height: 26px; grid-row: span 2; color: var(--accent); }
.act-kind__name { font-weight: 650; font-size: 0.92rem; line-height: 1.2; }
.act-kind__count { font-size: 0.76rem; color: var(--ink-faint); }
.act-kind:hover { transform: translateY(-2px); }
.act-kind.is-on { background: color-mix(in srgb, var(--accent) 12%, #fff); border-color: var(--accent); }
.act-kind.is-empty { opacity: 0.4; }

/* --- Bar, pills, filters ------------------------------------------------------ */

.act-bar {
  position: sticky; top: var(--header-h, 64px); z-index: 4;
  display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; justify-content: space-between;
  padding: 0.7rem 0; margin-bottom: 1rem; background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(6px); border-bottom: 1px solid var(--line);
}
.act-count { margin: 0; font-weight: 650; }
.act-bar__pills { display: flex; flex-wrap: wrap; gap: 0.35rem; flex: 1 1 auto; }
.act-bar__tools { display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; }
.act-sort select { font: inherit; font-size: 0.85rem; padding: 0.45em 0.6em; border-radius: 8px; border: 1px solid var(--line); background: var(--white); }
.act-pill {
  display: inline-flex; align-items: center; gap: 0.4em; font: 600 0.8rem/1 var(--sans); cursor: pointer;
  background: var(--teal-700); color: #fff; border: 0; border-radius: 99px; padding: 0.45em 0.7em;
}
.act-pill span { opacity: 0.7; }
.act-pill:hover { background: var(--teal-800); }

.act-filters {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 1rem 1.5rem;
  background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 1.1rem 1.3rem; margin-bottom: 1.2rem;
}
.act-filter { border: 0; padding: 0; margin: 0; min-width: 0; }
.act-filter legend {
  padding: 0; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-faint); margin-bottom: 0.5rem;
}
.act-filter__chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.act-chip {
  display: inline-flex; align-items: center; gap: 0.3em; font: 600 0.82rem/1 var(--sans);
  padding: 0.42em 0.7em; border-radius: 99px; background: var(--paper-warm, #f5ede0); color: var(--ink-soft);
  border: 1px solid transparent; text-decoration: none;
}
.act-chip--pick { cursor: pointer; }
.act-chip--pick span { opacity: 0.55; font-size: 0.9em; }
.act-chip--pick:hover { border-color: var(--teal-600); }
.act-chip--pick.is-on { background: var(--teal-700); color: #fff; }
.act-chip--pick.is-empty { opacity: 0.35; }

/* --- Cards --------------------------------------------------------------------- */

.act-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 285px), 1fr)); gap: 1.1rem; }
@keyframes act-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.act-card {
  --accent: var(--teal-700);
  display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line);
  border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-sm); position: relative;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.act-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--accent); }
.act-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.act-card.is-picked { outline: 3px solid var(--amber-500); outline-offset: 3px; }
.act-card__link { display: block; padding: 1.1rem 1.1rem 0.6rem; text-decoration: none; color: inherit; flex: 1; }
.act-card__type {
  display: inline-flex; align-items: center; gap: 0.4em; color: var(--accent);
  font: 700 0.7rem/1 var(--sans); letter-spacing: 0.07em; text-transform: uppercase; margin-bottom: 0.6rem;
}
.act-icon { width: 1.3em; height: 1.3em; flex: none; }
.act-card h3 { font-size: 1.1rem; line-height: 1.28; margin: 0 0 0.35rem; }
.act-card__link:hover h3 { color: var(--teal-700); }
.act-card p { margin: 0; color: var(--ink-soft); font-size: 0.9rem; line-height: 1.5; }
.act-card__foot {
  display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; padding: 0.7rem 1.1rem 1rem;
  border-top: 1px solid var(--line-soft, #eee8dc); margin-top: 0.6rem;
}
.act-card__bits { font-size: 0.76rem; color: var(--ink-faint); margin-left: auto; }
.act-card__done { font-size: 0.72rem; font-weight: 700; color: var(--good, #2f9e6b); width: 100%; }

.act-animal {
  --animal: var(--teal-700);
  display: inline-flex; align-items: center; gap: 0.35em; font: 650 0.78rem/1 var(--sans);
  color: color-mix(in srgb, var(--animal) 75%, #000); background: color-mix(in srgb, var(--animal) 12%, #fff);
  border-radius: 99px; padding: 0.35em 0.7em 0.35em 0.45em; text-decoration: none;
}
a.act-animal:hover { background: color-mix(in srgb, var(--animal) 22%, #fff); }
.act-animal__mark { width: 1.35em; height: 1.35em; color: var(--animal); flex: none; }
.act-animal--sm { font-size: 0.72rem; }

.act-empty { text-align: center; padding: 3rem 1rem; color: var(--ink-faint); }

.act-log { margin-top: var(--sp-6); background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 1.3rem 1.5rem; }
.act-log h2 { margin-top: 0; }
.act-log__list { list-style: none; padding: 0; margin: 0.8rem 0 0; display: grid; gap: 0.5rem; }
.act-log__list li { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: space-between; padding-bottom: 0.5rem; border-bottom: 1px solid var(--line); }
.act-log__list li:last-child { border-bottom: 0; }

/* --- One activity --------------------------------------------------------------- */

.act-page { --accent: var(--teal-700); }
.act-top {
  position: relative; overflow: hidden; color: #fff; padding: var(--sp-5) 0 var(--sp-5);
  background:
    radial-gradient(800px 380px at 88% -20%, color-mix(in srgb, var(--accent) 60%, transparent), transparent 70%),
    linear-gradient(160deg, color-mix(in srgb, var(--accent) 92%, #000) 0%, var(--night-800, #0a2126) 78%);
}
.act-top .crumbs, .act-top .crumbs a { color: rgb(255 255 255 / 0.72); }
.act-top__grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.5rem; align-items: center; }
.act-top h1 { color: #fff; margin: 0.15em 0 0.25em; font-size: clamp(1.7rem, 1.2rem + 2.2vw, 2.8rem); }
.act-top__lede { color: rgb(255 255 255 / 0.85); max-width: 58ch; font-size: 1.05rem; margin-bottom: 1rem; }
.act-top__type {
  display: inline-flex; align-items: center; gap: 0.45em; text-decoration: none;
  background: rgb(255 255 255 / 0.15); color: #fff; border-radius: 99px; padding: 0.4em 0.9em 0.4em 0.7em;
  font: 700 0.72rem/1 var(--sans); letter-spacing: 0.08em; text-transform: uppercase;
}
.act-top__type:hover { background: rgb(255 255 255 / 0.26); color: #fff; }
.act-top__mark { width: 1.3em; height: 1.3em; }
.act-top__animals { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.9rem; }
.act-top .act-animal { background: rgb(255 255 255 / 0.14); color: #fff; }
.act-top .act-animal:hover { background: rgb(255 255 255 / 0.26); }
.act-top .act-animal__mark { color: #fff; }
.act-facts { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem 1.2rem; padding: 0; margin: 0; }
.act-facts li { color: rgb(255 255 255 / 0.8); font-size: 0.86rem; display: flex; align-items: center; gap: 0.4em; }
.act-facts li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--amber-400); }
.act-top__art { position: relative; display: grid; place-items: center; width: clamp(110px, 16vw, 190px); }
.act-top__silhouette { width: 100%; height: auto; color: rgb(255 255 255 / 0.16); }
.act-top__badge {
  position: absolute; right: -6%; bottom: -4%; width: 34%; height: auto; color: var(--accent);
  background: #fff; border-radius: 50%; padding: 0.55rem; box-shadow: 0 8px 20px -10px #000;
}
.act-top__actions { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin-top: var(--sp-4); }
.act-top__actions .btn--ghost { background: rgb(255 255 255 / 0.12); border-color: rgb(255 255 255 / 0.3); color: #fff; }
.act-top__actions .btn--ghost:hover { background: rgb(255 255 255 / 0.22); color: #fff; }
.act-top__log { font-size: 0.85rem; color: var(--amber-200, #fbd79a); font-weight: 600; }

.act-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 350px); gap: clamp(1.2rem, 3vw, 2.5rem);
  align-items: start; padding-top: var(--sp-5); padding-bottom: var(--sp-6);
}
.act-hook {
  font-size: 1.15rem; line-height: 1.55; color: var(--ink-soft); border-left: 4px solid var(--accent);
  padding-left: 1rem; margin: 0 0 1.4rem;
}
.act-body :is(h2, h3) { font-size: 1.15rem; }
/* Tables come out of the blog and can be any width. On a phone the column
   must not stretch to fit one: let the table scroll on its own instead of
   pushing the whole page sideways. */
.act-body table { width: 100%; }
.act-body :is(table, pre) { display: block; max-width: 100%; overflow-x: auto; }
.act-body img { max-width: 100%; height: auto; }
.act-panel {
  margin-top: var(--sp-5); background: var(--white); border: 1px solid var(--line); border-radius: 16px;
  padding: 1.3rem 1.5rem;
}
.act-panel h2 { font-size: 1.05rem; margin: 0 0 0.8rem; display: flex; align-items: center; gap: 0.5em; }
.act-panel__mark { width: 1.2em; height: 1.2em; color: var(--accent); }
.act-panel--questions { border-left: 5px solid var(--accent); }
.act-qlist { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.6rem; }
.act-qlist li {
  background: color-mix(in srgb, var(--accent) 7%, #fff); border-radius: 10px; padding: 0.7em 0.9em;
  font-size: 0.97rem; line-height: 1.45;
}
.act-source { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin: 1rem 0 0; }

.act-run {
  position: sticky; top: calc(var(--header-h, 64px) + 1rem);
  background: var(--white); border: 1px solid var(--line); border-top: 5px solid var(--accent);
  border-radius: 16px; padding: 1.2rem 1.3rem; box-shadow: var(--shadow-md);
}
.act-run__top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.act-run__top h2 { margin: 0; font-size: 1.2rem; }
.act-run.is-complete { border-color: var(--good, #2f9e6b); }
.act-ring { position: relative; width: 52px; height: 52px; flex: none; display: grid; place-items: center; }
.act-ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.act-ring__track { fill: none; stroke: var(--line); stroke-width: 4; }
.act-ring__fill { fill: none; stroke: var(--accent); stroke-width: 4; stroke-linecap: round; transition: stroke-dashoffset 0.4s; }
.act-ring span { font: 700 0.72rem var(--sans); color: var(--ink-soft); }
.act-run.is-complete .act-ring__fill { stroke: var(--good, #2f9e6b); }
.act-run__block { margin-top: 1.2rem; }
.act-run__block h3 {
  font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); margin: 0 0 0.6rem;
}
.act-check { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; counter-reset: step; }
.act-check label { display: flex; gap: 0.6rem; align-items: flex-start; cursor: pointer; font-size: 0.93rem; line-height: 1.45; }
.act-check input { margin-top: 0.2em; width: 1.05rem; height: 1.05rem; accent-color: var(--accent); flex: none; }
.act-check li.is-done > label > span, .act-check li.is-done .act-step__body { color: var(--ink-faint); }
.act-check li.is-done .act-step__body span { text-decoration: line-through; }
.act-check--steps li { counter-increment: step; background: color-mix(in srgb, var(--accent) 5%, #fff); border-radius: 10px; padding: 0.55em 0.7em; }
.act-check--steps label { align-items: flex-start; }
.act-step__body { display: grid; gap: 0.15rem; }
.act-step__body b { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--accent); }
.act-run__timer { display: flex; align-items: center; gap: 0.6rem; margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.act-run__clock { font: 700 1.3rem/1 var(--mono, monospace); font-variant-numeric: tabular-nums; }
.act-run__reset { margin-top: 0.9rem; font-size: 0.82rem; }

/* --- Project it ------------------------------------------------------------------ */

.act-stage {
  width: min(100%, 100vw); max-width: none; height: 100vh; max-height: 100vh; border: 0; padding: 0;
  background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 88%, #000), var(--night-900, #05161a));
  color: #fff;
}
.act-stage::backdrop { background: #05161a; }
.act-stage__inner { display: grid; grid-template-rows: auto 1fr auto; height: 100%; }
.act-stage__head { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.6rem; color: rgb(255 255 255 / 0.75); }
.act-stage__where { font: 700 0.9rem var(--sans); letter-spacing: 0.08em; }
.act-stage__clock { margin-left: auto; font: 700 1.1rem var(--mono, monospace); font-variant-numeric: tabular-nums; }
.act-stage__close { background: rgb(255 255 255 / 0.15); border: 0; color: #fff; width: 2.2rem; height: 2.2rem; border-radius: 50%; cursor: pointer; font-size: 1rem; }
.act-stage__close:hover { background: rgb(255 255 255 / 0.3); }
.act-stage__body { display: grid; align-content: center; gap: 1rem; padding: 1rem clamp(1.5rem, 7vw, 7rem); text-align: center; }
.act-stage__eyebrow { margin: 0; font: 700 clamp(0.9rem, 0.6rem + 0.9vw, 1.4rem) var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--amber-400, #f5a623); }
.act-stage__title { margin: 0; font-size: clamp(2rem, 1rem + 5vw, 4.5rem); line-height: 1.05; color: #fff; }
.act-stage__step { margin: 0; font-size: clamp(1.5rem, 0.9rem + 3.2vw, 3.2rem); line-height: 1.25; }
.act-stage__list { list-style: none; padding: 0; margin: 0 auto; display: grid; gap: 0.6rem; font-size: clamp(1.1rem, 0.8rem + 1.6vw, 2rem); max-width: 30ch; }
.act-stage__list li { background: rgb(255 255 255 / 0.12); border-radius: 12px; padding: 0.5em 0.8em; }
.act-stage__list--q li { background: none; border-left: 4px solid var(--amber-400, #f5a623); border-radius: 0; text-align: left; }
.act-stage__foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.2rem 1.6rem 1.6rem; }
.act-stage__dots { display: flex; gap: 0.4rem; flex-wrap: wrap; justify-content: center; }
.act-stage__dot { width: 12px; height: 12px; border-radius: 50%; border: 0; background: rgb(255 255 255 / 0.3); cursor: pointer; padding: 0; }
.act-stage__dot.is-on { background: var(--amber-400, #f5a623); transform: scale(1.25); }
.act-stage .btn--ghost { background: rgb(255 255 255 / 0.12); border-color: rgb(255 255 255 / 0.3); color: #fff; }

/* --- Narrow screens --------------------------------------------------------------- */

@media (max-width: 900px) {
  /* minmax(0, …), not 1fr: a plain 1fr has a min-content floor, and one wide
     table in the blog text would drag the whole page past the screen edge. */
  .act-layout { grid-template-columns: minmax(0, 1fr); }
  .act-run { position: static; }
  .act-top__grid { grid-template-columns: 1fr; }
  .act-top__art { display: none; }
  .act-bar { position: static; backdrop-filter: none; }
}
@media (max-width: 560px) {
  .act-species-row { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
  .act-species__mark { width: 34px; height: 34px; }
  .act-bar__tools { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .act-card, .act-species, .act-kind { transition: none; animation: none !important; }
}

/* --- Printing: the teacher's sheet --------------------------------------------------- */

@media print {
  .site-header, .site-footer, .crumbs, .act-hero__search, .act-bar, .act-filters, .act-browse,
  .act-top__actions, .act-top__art, .act-run__timer, .act-run__reset, .act-ring,
  .section--paper, .skip-link, .act-stage { display: none !important; }
  .act-top { background: none; color: #000; padding: 0 0 1rem; }
  .act-top h1, .act-top__lede, .act-facts li { color: #000; }
  .act-top .act-animal { background: none; color: #000; border: 1px solid #999; }
  .act-layout { display: block; }
  .act-run { position: static; box-shadow: none; border: 1px solid #999; margin-top: 1rem; break-inside: avoid; }
  .act-check input { -webkit-appearance: none; appearance: none; border: 1px solid #555; border-radius: 3px; }
  body { background: #fff; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.75em; color: #555; }
}

/* --- The workspace: running it with a class ----------------------------------- */

.act-workspace {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--accent) 8%, var(--paper)) 0%, var(--paper) 55%);
  border-top: 1px solid var(--line); padding: var(--sp-6) 0 var(--sp-7);
}
.ws-head { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: flex-end; margin-bottom: var(--sp-4); }
.ws-head h2 { margin: 0.1em 0 0.3em; }
.ws-head p { max-width: 62ch; margin: 0; }
.ws-sessions { display: flex; gap: 0.5rem; align-items: center; }
.ws-sessions select {
  font: inherit; font-size: 0.88rem; padding: 0.5em 0.7em; border-radius: 8px; border: 1px solid var(--line);
  background: var(--white); max-width: 15rem;
}
.ws-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); gap: 1.1rem; margin-bottom: 1.1rem; }
.ws-card {
  background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 1.2rem 1.3rem;
  box-shadow: var(--shadow-sm); margin-bottom: 1.1rem;
}
.ws-grid > .ws-card { margin-bottom: 0; }
.ws-card h3 { margin: 0 0 0.8rem; font-size: 1.02rem; }
.ws-card__head { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; justify-content: space-between; margin-bottom: 0.7rem; }
.ws-card__head h3 { margin: 0; }
.ws-card__tools { display: flex; gap: 0.4rem; }

.ws-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 0.7rem; }
.ws-fields label, .ws-note { display: grid; gap: 0.25rem; font: 600 0.8rem/1.3 var(--sans); color: var(--ink-soft); }
.ws-fields input, .ws-note textarea, .ws-add input, .ws-table input {
  font: 400 0.95rem/1.4 var(--sans); color: var(--ink); padding: 0.55em 0.7em; border: 1px solid var(--line);
  border-radius: 8px; background: var(--white); width: 100%;
}
.ws-fields input:focus, .ws-note textarea:focus, .ws-add input:focus, .ws-table input:focus {
  outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent;
}
.ws-groups { margin: 0.9rem 0 0.7rem; font-weight: 650; color: var(--accent); }

.ws-add { display: flex; gap: 0.4rem; }
.ws-add input { min-width: 12rem; }
.ws-suggest { margin: 0 0 0.7rem; font-size: 0.82rem; color: var(--ink-faint); }
.ws-chip {
  font: 600 0.78rem/1 var(--sans); background: color-mix(in srgb, var(--accent) 10%, #fff); color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, #fff); border-radius: 99px; padding: 0.35em 0.7em;
  cursor: pointer; margin: 0.15rem 0.15rem 0 0;
}
.ws-chip:hover { background: color-mix(in srgb, var(--accent) 20%, #fff); }
.ws-counters { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.ws-counter {
  display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; justify-content: space-between;
  background: color-mix(in srgb, var(--accent) 5%, #fff); border-radius: 10px; padding: 0.5rem 0.7rem;
}
.ws-counter__name { font-weight: 600; font-size: 0.92rem; }
.ws-counter__controls { display: flex; align-items: center; gap: 0.3rem; }
.ws-step {
  width: 2rem; height: 2rem; border-radius: 50%; border: 1px solid var(--line); background: var(--white);
  font: 700 1.1rem/1 var(--sans); color: var(--accent); cursor: pointer;
}
.ws-step:hover { background: color-mix(in srgb, var(--accent) 12%, #fff); }
.ws-counter__value {
  width: 4.2rem; text-align: center; font: 700 1.05rem var(--mono, monospace); padding: 0.35em;
  border: 1px solid var(--line); border-radius: 8px; background: var(--white);
}
.ws-counter__x, .ws-table__x {
  background: none; border: 0; color: var(--ink-faint); cursor: pointer; font-size: 0.9rem; padding: 0.2rem 0.35rem;
}
.ws-counter__x:hover, .ws-table__x:hover { color: var(--bad, #c4483f); }
.ws-counter--total { background: none; font-weight: 700; border-top: 1px dashed var(--line); border-radius: 0; }

.ws-tablewrap { overflow-x: auto; }
.ws-table { width: 100%; border-collapse: collapse; min-width: 34rem; }
.ws-table th, .ws-table td { border: 1px solid var(--line); padding: 0.25rem; vertical-align: top; }
.ws-table th { background: color-mix(in srgb, var(--accent) 7%, #fff); position: relative; padding-right: 1.7rem; }
.ws-table th .ws-table__x { position: absolute; top: 50%; right: 0.15rem; transform: translateY(-50%); }
.ws-table th input { font-weight: 700; border-color: transparent; background: none; }
.ws-table td input { border-color: transparent; }
.ws-table td input:hover, .ws-table th input:hover { border-color: var(--line); }
.ws-table__gutter { width: 2.4rem; text-align: center; background: none; border-color: transparent; }

.ws-notes { display: grid; gap: 0.8rem; }
.ws-note span { font-weight: 600; color: var(--ink-soft); }
.ws-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin-top: 1.2rem; }
.ws-saved { font-size: 0.86rem; font-weight: 650; color: var(--good, #2f9e6b); }

@media print {
  .act-workspace { background: none; border: 0; padding: 0; break-before: page; }
  .ws-head p, .ws-sessions, .ws-actions, .ws-card__tools, .ws-add, .ws-suggest,
  .ws-step, .ws-counter__x, .ws-table__x, .ws-table__gutter, [data-ws-makegroups] { display: none !important; }
  .ws-card { box-shadow: none; border-color: #999; break-inside: avoid; }
  .ws-note textarea, .ws-fields input, .ws-table input { border-color: #999; }
}

/* --- Make your own -------------------------------------------------------------- */

.act-hero--make { background:
    radial-gradient(900px 400px at 20% -10%, rgb(245 166 35 / 0.28), transparent 62%),
    radial-gradient(700px 420px at 92% 0%, rgb(111 192 200 / 0.3), transparent 60%),
    var(--night-800, #0a2126); }
.act-hero__make { margin: 0.6rem 0 0; }
.act-hero__make a { color: var(--amber-400, #f5a623); font-weight: 650; }

.act-make-cta {
  display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between;
  margin-top: var(--sp-6); padding: 1.4rem 1.6rem; border-radius: 16px;
  background: linear-gradient(120deg, var(--teal-700), var(--teal-800)); color: #fff;
}
.act-make-cta h2 { margin: 0 0 0.2rem; color: #fff; font-size: 1.2rem; }
.act-make-cta p { margin: 0; color: rgb(255 255 255 / 0.85); }

.mk-bar { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin-bottom: 1.2rem; }
.mk-bar select {
  font: inherit; font-size: 0.9rem; padding: 0.5em 0.7em; border-radius: 8px; border: 1px solid var(--line);
  background: var(--white); max-width: 18rem;
}
.mk-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px); gap: clamp(1rem, 3vw, 2rem); align-items: start; }
.mk-form { display: grid; gap: 1.1rem; }
.mk-form .ws-card { margin-bottom: 0; }
.mk-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 0.8rem; }
.mk-fields label, .mk-note, .mk-own { display: grid; gap: 0.25rem; font: 600 0.8rem/1.3 var(--sans); color: var(--ink-soft); }
.mk-wide { grid-column: 1 / -1; }
.mk-fields input, .mk-fields select, .mk-fields textarea, .mk-note textarea, .mk-own input,
.mk-row input, .mk-row textarea {
  font: 400 0.95rem/1.45 var(--sans); color: var(--ink); padding: 0.55em 0.7em; border: 1px solid var(--line);
  border-radius: 8px; background: var(--white); width: 100%;
}
.mk-fields input:focus, .mk-note textarea:focus, .mk-own input:focus, .mk-row input:focus, .mk-row textarea:focus {
  outline: 2px solid var(--teal-600); outline-offset: -1px; border-color: transparent;
}

.mk-kinds { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 0.5rem; }
.mk-kind {
  --accent: var(--teal-700);
  display: flex; align-items: center; gap: 0.5rem; padding: 0.6rem 0.7rem; cursor: pointer;
  border: 2px solid var(--line); border-left: 5px solid var(--accent); border-radius: 10px;
  font: 600 0.88rem/1.2 var(--sans);
}
.mk-kind input { position: absolute; opacity: 0; width: 0; height: 0; }
.mk-kind__mark { width: 22px; height: 22px; color: var(--accent); flex: none; }
.mk-kind:has(input:checked) { background: color-mix(in srgb, var(--accent) 12%, #fff); border-color: var(--accent); }
.mk-kind:has(input:focus-visible) { outline: 2px solid var(--teal-600); outline-offset: 2px; }

.mk-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.8rem; }
.mk-chip {
  --animal: var(--teal-700);
  display: inline-flex; align-items: center; gap: 0.35em; cursor: pointer; font: 600 0.82rem/1 var(--sans);
  padding: 0.45em 0.75em; border-radius: 99px; border: 1px solid var(--line); background: var(--white);
  color: var(--ink-soft);
}
.mk-chip input { position: absolute; opacity: 0; width: 0; height: 0; }
.mk-chip__mark { width: 1.3em; height: 1.3em; color: var(--animal); }
.mk-chip:has(input:checked) { background: color-mix(in srgb, var(--animal) 14%, #fff); border-color: var(--animal); color: var(--ink); }
.mk-chip:has(input:focus-visible) { outline: 2px solid var(--teal-600); outline-offset: 2px; }
.mk-own__list { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.5rem; }
.mk-own__tag {
  font: 600 0.8rem/1 var(--sans); background: var(--teal-700); color: #fff; border: 0; border-radius: 99px;
  padding: 0.45em 0.7em; cursor: pointer;
}

.mk-rows { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; counter-reset: mk; }
.mk-row { display: flex; gap: 0.5rem; align-items: flex-start; }
.mk-row__grid { display: grid; gap: 0.35rem; flex: 1; }
.mk-row__tools { display: flex; gap: 0.2rem; }
.mk-row input, .mk-row textarea { flex: 1; }
.icon-btn {
  border: 1px solid var(--line); background: var(--white); border-radius: 6px; width: 28px; height: 28px;
  cursor: pointer; color: var(--ink-faint); font-size: 0.85rem;
}
.icon-btn:hover { background: var(--teal-50, #eef7f8); color: var(--teal-700); }

.mk-side { position: sticky; top: calc(var(--header-h, 64px) + 1rem); }
.mk-preview {
  background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 1.1rem 1.2rem;
  box-shadow: var(--shadow-sm);
}
.mk-card { box-shadow: none; }
.mk-card .act-card__type { color: var(--ink-faint); }
.mk-preview__sheet { margin-top: 1rem; border-top: 1px solid var(--line); padding-top: 0.9rem; font-size: 0.92rem; }
.mk-preview__sheet h4 { margin: 0.9rem 0 0.3rem; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-faint); }
.mk-preview__sheet ul, .mk-preview__sheet ol { margin: 0; padding-left: 1.1rem; display: grid; gap: 0.25rem; }
.mk-sheet__tools { display: flex; flex-wrap: wrap; gap: 0.3rem; margin: 0; }
.mk-actions { margin-top: 1.4rem; }
.mk-errors { width: 100%; margin: 0.4rem 0 0; color: var(--bad, #c4483f); font-weight: 650; }
.ws-saved.is-bad { color: var(--bad, #c4483f); }
.mk-privacy { margin-top: 0.8rem; max-width: 70ch; }

@media (max-width: 900px) {
  .mk-layout { grid-template-columns: 1fr; }
  .mk-side { position: static; order: -1; }
}
@media print {
  .mk-bar, .mk-actions, .mk-privacy, .mk-kinds, .mk-chips, .mk-own, .mk-row__tools,
  .act-hero--make .act-hero__lede, .mk-form { display: none !important; }
  .mk-layout { display: block; }
  .mk-side { position: static; }
  .mk-preview { border: 0; box-shadow: none; padding: 0; }
}

/* --- Pages ------------------------------------------------------------------
   Ninety-eight cards in one column is a thumb marathon with no sense of how
   far in you are and nowhere to stop. A page has an end. */
.act-pager {
  display: flex; align-items: center; justify-content: space-between; gap: 0.8rem;
  margin-top: 1.6rem; padding-top: 1.1rem; border-top: 1px solid var(--line);
}
/* Named for the pager, not "a page": `.act-page` was already the activity
   <article> itself, and styling a button under that name turned every activity
   page into an inline-flex row that shrink-wrapped its own sections. The text
   ended up twenty pixels wide. Two different things cannot share a class. */
.act-pager__btn {
  display: inline-flex; align-items: center; gap: 0.4em;
  font: 650 0.9rem/1 var(--sans); cursor: pointer;
  padding: 0.7em 1.1em; border-radius: 99px;
  background: var(--white); color: var(--teal-700); border: 1.5px solid var(--line);
}
.act-pager__btn:hover:not([disabled]) { border-color: var(--teal-600); background: var(--teal-100); }
.act-pager__btn[disabled] { opacity: 0.4; cursor: default; }
.act-pager__where {
  margin: 0; text-align: center; font-size: 0.86rem; color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}
@media (max-width: 520px) {
  .act-pager { gap: 0.4rem; }
  .act-pager__btn { padding: 0.7em 0.9em; }
  .act-pager__where .muted { display: block; }
}

/* --- How to use: the walk-through and the questions --------------------------
   The mocked screens are markup, not screenshots: they stay legible on a phone,
   they cannot go stale, and they weigh nothing. */
.guide h1 { margin-bottom: 0.5rem; }
.guide .lede { margin-bottom: var(--sp-5); }

.sim { margin: 0 0 var(--sp-5); }
.sim-steps { list-style: none; margin: 0; padding: 0; }
.sim-step { display: grid; grid-template-columns: 15rem 1fr; gap: clamp(1.2rem, 4vw, 2.5rem); align-items: center; }
.sim-step + .sim-step { margin-top: var(--sp-5); }
@keyframes sim-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.sim-device {
  padding: 0.7rem 0.55rem 1.1rem;
  background: linear-gradient(160deg, #1d3238, #0d1f24);
  border-radius: 26px; box-shadow: var(--shadow-lg);
}
.sim-device::before {
  content: ""; display: block; width: 3rem; height: 0.28rem; margin: 0 auto 0.6rem;
  background: rgb(255 255 255 / 0.3); border-radius: 99px;
}
.sim-screen {
  display: grid; gap: 0.45rem; min-height: 15.5rem; align-content: start;
  padding: 0.7rem; background: var(--paper); border-radius: 16px;
  font-size: 0.72rem; line-height: 1.35;
}

.sim-row { display: flex; gap: 0.35rem; }
.sim-search {
  flex: 1; padding: 0.45em 0.7em; border-radius: 99px;
  background: var(--white); border: 1px solid var(--line); color: var(--ink-faint);
}
.sim-chips { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.sim-chip {
  padding: 0.25em 0.6em; border-radius: 99px; background: var(--white);
  border: 1px solid var(--line); font-size: 0.68rem;
}
.sim-chip.is-on { background: var(--teal-700); border-color: var(--teal-700); color: #fff; }
.sim-card {
  display: grid; gap: 0.1rem; padding: 0.5rem 0.6rem; border-radius: 10px;
  background: var(--white); border: 1px solid var(--line); border-left: 4px solid var(--teal-600);
}
.sim-card span { color: var(--ink-faint); font-size: 0.66rem; }
.sim-card--lit { outline: 2px solid var(--amber-500); outline-offset: 1px; }
.sim-hero {
  display: grid; gap: 0.3rem; padding: 0.7rem; border-radius: 12px;
  background: linear-gradient(150deg, #4a3a6b, #16333a); color: #fff;
}
.sim-hero span { color: rgb(255 255 255 / 0.75); font-size: 0.66rem; }
.sim-btn {
  justify-self: start; margin-top: 0.2rem; padding: 0.4em 0.9em; border-radius: 99px;
  background: var(--amber-500); color: #3a1c04; font-weight: 700; font-size: 0.68rem;
}
.sim-btn--ghost { background: none; border: 1.5px solid var(--teal-600); color: var(--teal-700); }
.sim-line { height: 0.45rem; border-radius: 99px; background: var(--line); }
.sim-line--short { width: 60%; }
.sim-panel {
  display: grid; gap: 0.3rem; padding: 0.6rem; border-radius: 10px;
  background: var(--white); border: 1px solid var(--line);
}
.sim-panel span { color: var(--ink-soft); font-size: 0.68rem; }
.sim-check { position: relative; padding-left: 1.2rem; color: var(--ink-soft); font-size: 0.68rem; }
.sim-check::before {
  content: ""; position: absolute; left: 0; top: 0.1em; width: 0.85rem; height: 0.85rem;
  border-radius: 4px; border: 1.5px solid var(--line);
}
.sim-check.is-done { color: var(--ink); }
.sim-check.is-done::before {
  background: var(--good, #2f9e6b); border-color: var(--good, #2f9e6b);
}
.sim-check.is-done::after {
  content: ""; position: absolute; left: 0.28rem; top: 0.22em; width: 0.22rem; height: 0.45rem;
  border: 2px solid #fff; border-top: 0; border-left: 0; transform: rotate(42deg);
}
.sim-ring {
  justify-self: end; display: grid; place-items: center;
  width: 2.6rem; height: 2.6rem; border-radius: 50%;
  background: conic-gradient(var(--teal-600) 0 66%, var(--line) 0);
  font-weight: 700; font-size: 0.62rem;
}
.sim-ring span {
  display: grid; place-items: center; width: 2rem; height: 2rem;
  background: var(--paper); border-radius: 50%;
}
.sim-maths { color: var(--teal-700); font-weight: 600; }
.sim-count {
  display: flex; align-items: center; gap: 0.35rem;
  padding-top: 0.3rem; border-top: 1px solid var(--line-soft, #eee8dc);
}
.sim-count span:first-child { flex: 1; color: var(--ink-soft); }
.sim-count b { min-width: 1.4rem; text-align: center; font-variant-numeric: tabular-nums; }
.sim-pm {
  display: grid; place-items: center; width: 1.2rem; height: 1.2rem; border-radius: 50%;
  background: var(--paper-warm); color: var(--ink-soft); font-weight: 700;
}
.sim-offline {
  display: grid; gap: 0.3rem; padding: 0.65rem; border-radius: 12px;
  background: linear-gradient(135deg, var(--teal-800), var(--teal-600)); color: #fff;
}
.sim-offline span { color: rgb(255 255 255 / 0.85); font-size: 0.68rem; }
.sim-meter { display: block; height: 0.3rem; border-radius: 99px; background: rgb(255 255 255 / 0.25); }
.sim-meter i { display: block; width: 100%; height: 100%; border-radius: inherit; background: var(--amber-400); }
.sim-net {
  padding: 0.4rem 0.5rem; border-radius: 8px; text-align: center;
  background: var(--amber-100); color: #6a3b06; font-size: 0.66rem; font-weight: 600;
}

.sim-say__n {
  margin: 0 0 0.3rem; font: 700 0.72rem/1 var(--sans); letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--teal-600);
}
.sim-say h3 { margin: 0 0 0.5rem; font-size: var(--step-2); line-height: 1.15; }
.sim-say p { margin: 0; color: var(--ink-soft); line-height: 1.6; max-width: 46ch; }

.sim-controls {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  margin-top: 1.5rem; padding-top: 1.1rem; border-top: 1px solid var(--line);
}
.sim-dots { display: flex; gap: 0.4rem; }
.sim-dot {
  width: 0.55rem; height: 0.55rem; padding: 0; border: 0; border-radius: 50%;
  background: var(--line); cursor: pointer; transition: background 0.2s, transform 0.2s;
}
.sim-dot.is-on { background: var(--teal-700); transform: scale(1.35); }

.guide-go { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-bottom: var(--sp-6); }

.faq h2 { margin-bottom: 0.9rem; }
.faq__item {
  border-bottom: 1px solid var(--line);
}
.faq__item summary {
  padding: 0.95rem 2rem 0.95rem 0; cursor: pointer; position: relative;
  font-weight: 650; list-style: none;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "+"; position: absolute; right: 0.3rem; top: 0.8rem;
  font-size: 1.3rem; font-weight: 400; color: var(--teal-600); line-height: 1;
}
.faq__item[open] summary::after { content: "–"; }
.faq__item summary:hover { color: var(--teal-700); }
.faq__item p { margin: 0 0 1.1rem; color: var(--ink-soft); line-height: 1.65; max-width: 62ch; }

@media (max-width: 680px) {
  .sim-step { grid-template-columns: 1fr; gap: 1.2rem; }
  .sim-device { max-width: 15rem; margin: 0 auto; }
}

/* --- The passport -----------------------------------------------------------
   A blank page is the point of a passport, so every stamp is on it from the
   start. An earned one is inked: full colour, set a couple of degrees off
   square the way a hand-held stamp lands. An unearned one is the empty ring
   waiting for it. */
.passport h1 { margin-bottom: 0.4rem; }
.passport .lede { margin-bottom: var(--sp-5); }

.passport__tally { margin-bottom: var(--sp-5); }
.passport__count {
  margin: 0 0 0.5rem; font-family: var(--display); font-size: var(--step-2);
  line-height: 1.2; color: var(--teal-800);
}
.passport__bar {
  height: 0.5rem; border-radius: 99px; background: var(--line); overflow: hidden;
}
.passport__bar span {
  display: block; height: 100%; width: 0; border-radius: inherit;
  background: linear-gradient(90deg, var(--teal-600), var(--amber-500));
  transition: width 0.4s ease;
}
.passport.is-complete .passport__count { color: var(--amber-600); }

.stamp-block { margin-bottom: var(--sp-6); }
.stamp-block h2 { margin: 0 0 0.25rem; font-size: var(--step-1); }
.stamp-block > .muted { margin: 0 0 1.2rem; }

.stamps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.stamp {
  display: grid; grid-template-columns: 7.5rem 1fr; gap: 1.2rem; align-items: center;
  padding: 1rem 1.2rem; background: var(--white);
  border: 1px solid var(--line); border-radius: var(--r-md);
}

/* The ink. Dashed and grey until earned, then a real stamp. */
.stamp__ink {
  display: grid; place-items: center; gap: 0.15rem;
  width: 7.5rem; height: 7.5rem; padding: 0.4rem;
  border: 2.5px dashed var(--line); border-radius: 50%;
  color: var(--ink-faint); text-align: center;
  transform: rotate(0deg);
  transition: transform 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}
.stamp__mark { width: 2.1rem; height: 2.1rem; }
.stamp__name {
  font-family: var(--display); font-size: 0.72rem; font-weight: 700;
  line-height: 1.15; letter-spacing: 0.02em; text-transform: uppercase;
  max-width: 6rem;
}
.stamp__when { font-size: 0.6rem; letter-spacing: 0.04em; opacity: 0.85; }

.stamp.is-earned .stamp__ink {
  border-style: double; border-width: 4px;
  border-color: var(--accent, var(--teal-700));
  color: var(--accent, var(--teal-700));
  transform: rotate(-4deg);
}
.stamp:nth-child(even).is-earned .stamp__ink { transform: rotate(3deg); }
.stamp:nth-child(3n).is-earned .stamp__ink { transform: rotate(-2deg); }
.stamp.is-earned { border-color: var(--teal-300); }
.stamp.is-earned .stamp__say h3 { color: var(--teal-800); }

/* A badge stamps in the colour of the place it belongs to, which the row sets
   as --prop. The teal here is only the fallback for a badge shown outside the
   map; inside it, the row always wins. (It has to be set on .stamp rather than
   left to inherit: a bare `.stamp { --accent: ... }` would override the row,
   which is how every badge once came out teal.) */
.stamp { --accent: var(--prop, var(--teal-700)); }

@keyframes stamp-down {
  0% { transform: scale(1.5) rotate(-12deg); opacity: 0; }
  60% { transform: scale(0.94) rotate(-4deg); opacity: 1; }
  100% { transform: scale(1) rotate(-4deg); }
}
.stamp.is-new .stamp__ink { animation: stamp-down 0.5s ease both; }

.stamp__say h3 { margin: 0 0 0.15rem; font-size: var(--step-0); }
.stamp__say p { margin: 0; color: var(--ink-soft); font-size: var(--step--1); line-height: 1.55; }
.stamp__how { margin-top: 0.4rem !important; color: var(--teal-700) !important; font-weight: 600; }
.stamp__how--none { color: var(--ink-faint) !important; font-weight: 500; }
.stamp.is-earned .stamp__how { display: none; }

/* --- The passport map ----------------------------------------------------- */
/* One row per place, its badges beside it. A grid rather than a list because
   the whole point is to take the ecosystem in at once: five places, every
   badge each can give you, and how far along you are with each. Each row sets
   --accent to its property's colour, so an earned badge is stamped in the
   colour of the place it came from and matches that property everywhere else
   on the site. */
.pass-map { display: grid; gap: 0.9rem; margin-bottom: var(--sp-5); }

.pass-row {
  --accent: var(--prop, var(--teal-700));
  display: grid; grid-template-columns: 13.5rem 1fr; gap: 1.2rem;
  padding: 1rem 1.1rem;
  background: var(--white); border: 1px solid var(--line);
  border-left: 4px solid var(--prop, var(--line));
  border-radius: var(--r-md);
}
.pass-row__who { display: flex; gap: 0.7rem; align-items: flex-start; }
.pass-row__id { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.pass-row__kind {
  font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.1em;
  font-weight: 700; color: var(--prop, var(--ink-faint));
}
.pass-row__name {
  font-family: var(--display); font-size: 0.95rem; line-height: 1.2;
  color: var(--ink); text-wrap: balance;
}
.pass-row__tally {
  font-size: 0.74rem; color: var(--ink-faint); font-variant-numeric: tabular-nums;
  margin-top: 0.15rem;
}
.pass-row.is-done .pass-row__tally { color: var(--prop); font-weight: 700; }
.pass-row__site {
  font-size: 0.74rem; font-weight: 600; color: var(--prop);
  text-decoration: none; margin-top: 0.2rem;
}
.pass-row__site:hover { text-decoration: underline; }

/* The dense part: badges as small tiles, not as wide cards. */
.pass-row__badges,
.pass-cap__badge {
  display: grid; gap: 0.5rem;
  grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr));
}
.pass-row .stamp,
.pass-cap .stamp {
  display: block; text-align: center;
  padding: 0.8rem 0.55rem; gap: 0;
  background: var(--paper); border-color: var(--line);
}
.pass-row .stamp__ink,
.pass-cap .stamp__ink {
  width: 4.2rem; height: 4.2rem; margin: 0 auto 0.5rem; padding: 0;
  border-width: 2px;
}
.pass-row .stamp.is-earned .stamp__ink,
.pass-cap .stamp.is-earned .stamp__ink { border-width: 3px; }
.pass-row .stamp__mark,
.pass-cap .stamp__mark { width: 1.75rem; height: 1.75rem; }
/* The name is printed under the badge, not inside it: at this size a circle
   cannot hold "Took It To Class" without shrinking the type past reading. */
.pass-row .stamp__ink .stamp__name,
.pass-cap .stamp__ink .stamp__name { display: none; }
.pass-row .stamp__when,
.pass-cap .stamp__when { font-size: 0.55rem; line-height: 1; }
.pass-row .stamp__say h3,
.pass-cap .stamp__say h3 {
  font-size: 0.8rem; line-height: 1.2; margin-bottom: 0.25rem; text-wrap: balance;
}
.pass-row .stamp.is-earned .stamp__say h3 { color: var(--prop); }
.pass-row .stamp__say p,
.pass-cap .stamp__say p { font-size: 0.7rem; line-height: 1.4; }
.pass-row .stamp__how,
.pass-cap .stamp__how {
  font-size: 0.68rem; color: var(--prop) !important; margin-top: 0.3rem !important;
}
.pass-row .stamp__how--none { color: var(--ink-faint) !important; }
.pass-row .stamp.is-earned { border-color: color-mix(in srgb, var(--prop) 40%, var(--line)); }

/* The capstone. Not in a row, because it does not belong to one place — it is
   what the whole passport adds up to. */
.pass-cap {
  --accent: var(--amber-600); --prop: var(--amber-600);
  display: grid; grid-template-columns: 10rem 1fr; gap: 1.3rem; align-items: center;
  margin-top: 0.4rem; padding: 1.1rem 1.2rem;
  border: 2px solid var(--amber-200); border-radius: var(--r-md);
  background: linear-gradient(120deg, var(--amber-100), var(--white) 70%);
}
.pass-cap__badge { grid-template-columns: 1fr; }
.pass-cap .stamp { background: transparent; border: 0; padding: 0; }
.pass-cap__say .pass-row__name { font-size: var(--step-1); }
.pass-cap__say p { margin: 0.3rem 0 0; color: var(--ink-soft); font-size: var(--step--1); }
.pass-cap__left { font-weight: 700; color: var(--amber-600) !important; }

@media (max-width: 760px) {
  .pass-row { grid-template-columns: 1fr; gap: 0.8rem; }
  .pass-row__badges { grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr)); }
  .pass-cap { grid-template-columns: 1fr; text-align: center; }
  .pass-cap__badge { max-width: 8rem; margin: 0 auto; }
}

.codebox {
  margin-top: var(--sp-5); padding: 1.3rem 1.4rem;
  background: var(--paper-warm); border-radius: var(--r-lg);
}
.codebox h2 { margin: 0 0 0.25rem; font-size: var(--step-1); }
.codebox > .muted { margin: 0 0 1rem; }
.codebox__form { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.codebox__form label { flex: 1 1 14rem; }
.codebox__form input {
  width: 100%; font: inherit; font-family: var(--mono); letter-spacing: 0.08em;
  text-transform: uppercase; padding: 0.8em 1em;
  border: 2px solid var(--line); border-radius: var(--r-pill); background: var(--white);
}
.codebox__form input:focus { outline: 2px solid var(--teal-600); outline-offset: 1px; }
.codebox__say { margin: 0.8rem 0 0; font-size: var(--step--1); font-weight: 600; min-height: 1.2em; }
.codebox__say.is-good { color: var(--good, #2f9e6b); }
.codebox__say.is-bad { color: var(--bad, #c4483f); }
.passport__note { margin-top: var(--sp-5); }

@media (max-width: 560px) {
  .stamp { grid-template-columns: 5.6rem 1fr; gap: 0.9rem; padding: 0.9rem; }
  .stamp__ink { width: 5.6rem; height: 5.6rem; }
  .stamp__mark { width: 1.6rem; height: 1.6rem; }
  .stamp__name { font-size: 0.6rem; max-width: 4.6rem; }
  .stamp__when { font-size: 0.52rem; }
}
@media (prefers-reduced-motion: reduce) {
  .stamp.is-new .stamp__ink { animation: none; }
}

/* What the passport is, said before somebody has to guess. */
.how-passport {
  margin-bottom: var(--sp-6);
  padding: 1.2rem 1.4rem;
  background: var(--paper-warm);
  border-radius: var(--r-lg);
}
.how-passport h2 { margin: 0 0 0.8rem; font-size: var(--step-1); }
.how-passport ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.8rem; }
.how-passport li {
  padding-left: 1.4rem;
  position: relative;
  color: var(--ink-soft);
  font-size: var(--step--1);
  line-height: 1.6;
}
.how-passport li::before {
  content: "";
  position: absolute; left: 0; top: 0.52em;
  width: 0.6rem; height: 0.6rem; border-radius: 50%;
  border: 2px solid var(--teal-600);
}
.how-passport strong { color: var(--ink); }

/* The walk-through's passport screen. */
.sim-pass { display: grid; gap: 0.35rem; }
.sim-stamps { display: flex; gap: 0.4rem; }
.sim-stamp {
  flex: 1; display: grid; place-items: center; aspect-ratio: 1;
  border: 2px dashed var(--line); border-radius: 50%;
  font-size: 0.52rem; font-weight: 700; line-height: 1.15; text-align: center;
  color: var(--ink-faint); text-transform: uppercase;
}
.sim-stamp.is-on {
  border-style: double; border-width: 3px;
  border-color: var(--teal-700); color: var(--teal-700);
  transform: rotate(-4deg);
}
