/* Ragorilla's one stylesheet, in three parts: 1 design system, 2 the toy, 3 page layouts.
 * One file on purpose: fewer requests on the first paint. */

/* ============ 1. DESIGN SYSTEM ============ */

/* The design system. Everything comes from MOKO: his fur, his cream heart face, the ink of his pupils. */

:root {
  --fur: #A4602F;
  --fur-deep: #7C4320;
  --fur-soft: #C9854A;
  --cream: #F0D3A0;
  --milk: #FFF9EC;
  --ink: #2B1714;
  --honey: #F0B429;
  --honey-deep: #C2871A;
  --clay: #AC432E;

  --page: #FBECD2;
  --page-2: #F4DCB5;
  --text: #2B1714;
  --text-2: #5C3A2A;
  --surface: #FFF6E4;
  --edge: #E4C292;
  --link: #8A3F1C;
  --focus: #2B1714;
  --ridge-1: #F3D5A8;
  --ridge-2: #E9BD86;
  --ridge-3: #DBA368;
  --sun: #FFF6E2;
  --wood: #8A4D29;
  --wood-light: #A96538;
  --wood-dark: #5B3120;
  --letter: var(--fur);
  --letter-side: #673620;
  --head-bg: #FBECD2;
  --shadow: rgba(74, 36, 18, .55);

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", "Segoe UI Black", system-ui, -apple-system, sans-serif;

  --head: 74px;
  --side: clamp(18px, 5vw, 72px);
  --moko: clamp(188px, 23vw, 390px);   /* one metre of MOKO, on every page */
  --plank: 26px;
  --round: 30px 26px 32px 24px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --page: #201210;
  --page-2: #2C1A15;
  --text: #F9E9CC;
  --text-2: #D9B78C;
  --surface: #38211A;
  --edge: #563327;
  --link: #F3C073;
  --focus: #F0B429;
  --ridge-1: #2A1713;
  --ridge-2: #351D16;
  --ridge-3: #43251A;
  --sun: #3A2119;
  --wood: #7A4224;
  --wood-light: #96572F;
  --wood-dark: #4A281A;
  --letter: #C9854A;
  --letter-side: #6B3820;
  --head-bg: #201210;
  --shadow: rgba(0, 0, 0, .8);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--page);
  scroll-padding-top: var(--head);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: hidden;
  overflow-x: clip;
}
html:not(.calm) { scroll-behavior: smooth; }

body {
  position: relative;   /* the toy's layer lies on the page, in page pixels */
  display: flow-root;
  margin: 0;
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--font);
  -webkit-tap-highlight-color: transparent;
}

h1, h2, h3, .display {
  font-family: var(--display);
  font-weight: 900;
  font-synthesis: none;
  line-height: 1.02;
  letter-spacing: -.015em;
  text-wrap: balance;
  margin: 0;
}
h2 { font-size: clamp(2.2rem, 5.6vw, 4.5rem); }
h3 { font-size: clamp(1.4rem, 2.3vw, 2rem); line-height: 1.1; }
p { margin: 0 0 1em; text-wrap: pretty; }
img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }

a { color: var(--link); text-decoration-thickness: .12em; text-underline-offset: .2em; }
button { font: inherit; color: inherit; cursor: pointer; }

/* Anything you can press is above MOKO, so he can never take the click. */
a, button, summary, input, select, textarea { position: relative; z-index: 5; }

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

.sr {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  z-index: 30;
  left: 12px;
  top: -80px;
  padding: 10px 18px;
  border-radius: 16px;
  background: var(--ink);
  color: var(--milk);
}
.skip:focus { top: 12px; }

/* ---- header ---- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--head);
  background: var(--head-bg);
}
.head-in {
  height: 100%;
  padding: 0 var(--side);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.home { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.home img { width: 46px; height: 46px; }
.home .mark { width: auto; height: 24px; }

.menu { display: flex; align-items: center; gap: 22px; }
.menu ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; }
.menu a {
  display: inline-block;
  padding: 10px 15px;
  border-radius: 18px 15px 19px 14px;
  color: var(--text);
  text-decoration: none;
  font-weight: 650;
}
.menu a:hover { background: var(--page-2); }
.menu a[aria-current="page"] { background: var(--fur-deep); color: var(--milk); }

.settings { display: flex; gap: 8px; }
html:not(.js) .settings { display: none; }
.hero, .sandbox, .quest, .lost, .nook, .pen, .page-top, .is-dragging body {   /* a missed grab shouldn't highlight the page */
  -webkit-user-select: none;
  user-select: none;
}
.set {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 17px 15px 18px 14px;
  background: var(--page-2);
}
.set svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.set .solid { fill: currentColor; stroke: none; }
.set .if-on { display: none; }
.set[aria-pressed="true"] .if-on { display: inline; }
.set[aria-pressed="true"] .if-off { display: none; }
.set-name { display: none; }
.set-sound { width: auto; min-width: 124px; padding: 0 13px; grid-auto-flow: column; justify-content: center; gap: 8px; }
.set-words { font-size: .86rem; font-weight: 700; white-space: nowrap; }
.set-sound[aria-pressed="true"] { background: var(--honey); color: var(--ink); }

.menu-btn {
  display: none;
  min-width: 76px;
  height: 44px;
  border: 0;
  border-radius: 18px 15px 19px 14px;
  background: var(--fur-deep);
  color: var(--milk);
  font-weight: 700;
}

/* ---- buttons ---- */

.btn {
  --face: var(--honey);
  --under: var(--honey-deep);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 12px 26px;
  border: 0;
  border-radius: 24px 20px 26px 19px;
  background: var(--face);
  color: var(--ink);
  box-shadow: 0 6px 0 var(--under), inset 0 2px 0 rgba(255, 255, 255, .28);
  font: 900 1.08rem/1.1 var(--display);
  font-synthesis: none;
  text-align: center;
  text-decoration: none;
  transform-origin: 50% 100%;
}
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--under); }
.btn-fur { --face: var(--fur-deep); --under: #552C16; color: var(--milk); }
.btn-cream { --face: var(--milk); --under: #D8B682; }
.btn-ink { --face: var(--ink); --under: #120908; color: var(--milk); }
.btn-small { min-height: 46px; padding: 9px 18px; font-size: .98rem; border-radius: 19px 16px 20px 15px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 14px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 15px;
  border-radius: 16px 13px 17px 12px;
  background: var(--page-2);
  font-size: .92rem;
  font-weight: 700;
  line-height: 1.3;
}
.chip::before { content: ""; flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--clay); }

.fill {   /* the owner's blanks */
  display: inline-block;
  padding: 1px 10px;
  border: 2px dashed currentColor;
  border-radius: 10px;
  font: 600 .93em/1.6 ui-monospace, Menlo, Consolas, monospace;
}

/* ---- lettering ---- */

.ltr { display: block; transform-origin: 50% 90%; }
.ltr svg { width: 100%; height: 100%; overflow: visible; }
.l-side { fill: var(--letter-side); fill-rule: evenodd; }
.l-face { fill: var(--letter); fill-rule: evenodd; }
.l-white { fill: var(--milk); }
.l-pupil { fill: var(--ink); }
.mark .l-side { display: none; }
.mark .l-face { fill: var(--text); }

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

.site-foot {
  position: relative;
  padding: 58px var(--side) 34px;
  background: var(--ink);
  color: #E9CFA8;
}
.foot-in {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 28px 40px;
}
.site-foot .home .mark .l-face { fill: var(--cream); }
.site-foot ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.site-foot li a {
  display: inline-block;
  padding: 9px 14px;
  border-radius: 16px 13px 17px 12px;
  color: #F9E9CC;
  text-decoration: none;
}
.site-foot li a:hover { background: #4A281A; }
.site-foot :focus-visible { outline-color: var(--honey); }
.fine { max-width: 1180px; margin: 30px auto 0; font-size: .85rem; line-height: 1.55; color: #C6A47C; }
.fine p { margin: 0 0 4px; }

/* ---- small screens ---- */

@media (max-width: 1000px) {
  :root { --head: 66px; }
  .js .menu-btn { display: block; }
  .js .menu {
    display: none;
    position: absolute;
    left: 10px;
    right: 10px;
    top: calc(var(--head) + 4px);
    padding: 14px;
    border-radius: 26px;
    background: var(--surface);
    box-shadow: 0 18px 44px rgba(30, 12, 6, .3);
  }
  .js .menu.is-open { display: block; }
  .js .menu ul { display: grid; gap: 2px; }
  .js .menu a { display: block; }
  .js .settings { margin-top: 12px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .js .set { width: auto; min-width: 0; height: 68px; padding: 0; grid-auto-flow: row; align-content: center; gap: 4px; }
  .js .set-name { display: block; font-size: .78rem; font-weight: 650; }
  .js .set-words { display: none; }
  html:not(.js) .site-head { position: relative; height: auto; }
  html:not(.js) .head-in { flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
  html:not(.js) .menu ul { flex-wrap: wrap; }
}

@media (max-width: 380px) {
  .home { gap: 7px; }
  .home img { width: 40px; height: 40px; }
  .home .mark { height: 19px; }
  .menu-btn { min-width: 70px; }
}

/* ============ 2. THE TOY ============ */

/* What the toy draws and what it can hit. */

/* The layer has no z-index on purpose: its children stack with the page, under every link and button. */
.toy-layer {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  overflow: hidden;
  overflow-anchor: none;
  pointer-events: none;
}
.toy-layer > * { position: absolute; left: 0; top: 0; pointer-events: none; }
.toy-shadow { z-index: 1; border-radius: 50%; background: radial-gradient(closest-side, var(--shadow), transparent); }
.toy-prop { z-index: 2; }
.toy-moko { z-index: 3; }
.toy-fx { z-index: 3; }
.toy-layer > .toy-grab {
  z-index: 4;
  border-radius: 50%;
  pointer-events: auto;
  touch-action: none;
  cursor: grab;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.is-dragging, .is-dragging body, .is-dragging .toy-grab { cursor: grabbing !important; }
.is-dragging body { -webkit-user-select: none; user-select: none; }

.toy-crate {
  --prop: 80px;
  border: calc(var(--prop) * .11) solid #6B3A22;
  border-radius: calc(var(--prop) * .13);
  background:
    linear-gradient(45deg, transparent 41%, #7C4320 41% 59%, transparent 59%),
    linear-gradient(#B06B3A 0 48%, #8A4D29 48% 52%, #A4602F 52%);
}
.toy-ball {
  border-radius: 50%;
  background:
    linear-gradient(90deg, transparent 40%, #FFF3D6 40% 60%, transparent 60%),
    #C4543A;
  box-shadow: inset -5px -8px 0 rgba(43, 23, 20, .2);
}

/* ---- play areas ---- */

.spot {
  position: absolute;
  left: var(--at, 50%);
  bottom: calc(var(--floor, var(--plank)) - var(--moko) * .01);
  width: var(--moko);
  height: var(--moko);
  margin-left: calc(var(--moko) / -2);
  pointer-events: none;
}
.spot img { width: 100%; height: 100%; }
.toy-live .spot img { visibility: hidden; }

.planks {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--plank);
  display: flex;
}
.plank {
  flex: var(--w, 1) 1 0;
  min-width: 0;
  border: 3px solid var(--wood-dark);
  border-radius: 9px 7px 10px 6px;
  background: var(--wood);
  transform-origin: 50% 50%;
}
.plank svg { width: 100%; height: 100%; }
.plank path { fill: none; stroke: var(--wood-light); stroke-width: 2; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.plank-weak { background: var(--wood-light); }
.plank-weak path { stroke: var(--wood-dark); }

.bar {
  position: absolute;
  height: 18px;
  border-radius: 10px;
  background: var(--wood);
  box-shadow: inset 0 -6px 0 var(--wood-dark);
}
.bar { transform-origin: 50% -180px; }
.bar::before, .bar::after {   /* ropes that go all the way up out of sight; the play area clips them */
  content: "";
  position: absolute;
  bottom: 14px;
  width: 6px;
  height: 1300px;
  border-radius: 3px;
  background: repeating-linear-gradient(165deg, var(--fur-soft) 0 5px, var(--fur-deep) 5px 7px);
  pointer-events: none;
}
.bar::before { left: 18px; }
.bar::after { right: 18px; }

.stack {
  --crate: calc(var(--moko) * .29);
  position: absolute;
  bottom: var(--plank);
  width: calc(var(--crate) * var(--cols, 3));
}
.stack > span {
  position: absolute;
  bottom: calc(var(--crate) * var(--r));
  left: calc(var(--crate) * var(--c));
  width: var(--crate);
  height: var(--crate);
  border: 3px solid var(--wood-dark);
  border-radius: 12px 10px 13px 9px;
  background: var(--wood-light);
}
.stack svg { width: 100%; height: 100%; }
.stack path { fill: none; stroke: var(--wood); stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; }
.stack .nail { stroke: var(--wood-dark); stroke-width: 7; }

/* ---- breaking ---- */

.is-broken {
  opacity: 0 !important;
  pointer-events: none;
  transition: none !important;
  animation: none !important;
}
.is-rebuilt { animation: rebuilt .42s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes rebuilt {
  0% { transform: scale(1.07, .9); }
  100% { transform: none; }
}

/* ---- when the toy isn't there ---- */

[data-toy] { display: none; }
.js:not(.calm):not(.toy-none) [data-toy] { display: inline-flex; visibility: hidden; }
.js.toy-live:not(.calm) [data-toy] { visibility: visible; }

.fetch {
  position: fixed;
  right: max(14px, env(safe-area-inset-right));
  bottom: max(14px, env(safe-area-inset-bottom));
  z-index: 18;
  width: 62px;
  height: 62px;
  min-height: 0;
  padding: 8px;
  border-radius: 24px 20px 26px 19px;
}
.fetch img { width: 100%; height: 100%; }
.js.toy-live:not(.calm) .fetch { visibility: hidden; opacity: 0; }
.js.toy-live.toy-away:not(.calm) .fetch { visibility: visible; opacity: 1; }

.calm *, .calm *::before, .calm *::after {
  animation: none !important;
  transition: none !important;
}
@media (prefers-reduced-motion: reduce) {
  html:not(.js) *, html:not(.js) *::before, html:not(.js) *::after { animation: none !important; transition: none !important; }
}

/* ============ 3. PAGE LAYOUTS ============ */

/* The layouts. Sections never get a z-index: MOKO has to be able to cross them, under the buttons. */

.wrap { max-width: 1180px; margin: 0 auto; }
.word { display: inline-block; transform-origin: 50% 80%; }
.lede { font-size: clamp(1.08rem, 1.5vw, 1.3rem); line-height: 1.55; max-width: 36ch; color: var(--text-2); }

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

.hero {
  position: relative;
  height: calc(100vh - var(--head));
  height: calc(100svh - var(--head));
  min-height: 660px;
  max-height: 1100px;
  overflow: hidden;
}
.scenery {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.scenery svg { width: 100%; height: 100%; }
.sun { fill: var(--sun); }
.ridge-1 { fill: var(--ridge-1); }
.ridge-2 { fill: var(--ridge-2); }
.ridge-3 { fill: var(--ridge-3); }

.hero-in {
  position: relative;
  max-width: 1380px;
  height: 100%;
  margin: 0 auto;
  padding: clamp(16px, 3.2vh, 42px) var(--side) 0;
}
.title { margin: 0; }
.letters { display: flex; flex-wrap: wrap; gap: 0 clamp(4px, .7vw, 10px); }
.letters .ltr { height: var(--cap); width: calc(var(--cap) * var(--a)); }
.title .letters { --cap: clamp(58px, min(10.2vw, 17.5vh), 160px); }
.letters .split { display: none; }

.hero-copy { max-width: min(500px, 40vw); margin-top: clamp(22px, 5vh, 58px); }
.tagline {
  margin: 0 0 16px;
  font: 900 clamp(2.1rem, min(4.7vw, 8vh), 4rem)/.98 var(--display);
  font-synthesis: none;
  letter-spacing: -.02em;
}
.tagline > span { display: block; }
.hero-copy .lede { margin-bottom: 22px; }
.hero-copy .chip { margin-top: 24px; }

.hero .bar { left: 52%; width: 24%; top: max(39%, 230px); }
.hero .spot { --at: 63%; }
.hero .stack { right: var(--side); }

.hint {
  position: absolute;
  left: calc(63% - var(--moko) * .98);
  bottom: calc(var(--moko) * .72);
  width: 120px;
  color: var(--text-2);
  font: 900 1.05rem/1.1 var(--display);
  font-synthesis: none;
  text-align: center;
  rotate: -5deg;
  transition: opacity .3s;
  pointer-events: none;
}
.hint svg { width: 66px; margin: 5px 0 0 48px; fill: none; stroke: currentColor; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.toy-grabbed .hint, .toy-away .hint { opacity: 0; }
html:not(.toy-live) .hint { opacity: 0; }

/* ---- how it plays ---- */

.plays { position: relative; padding: clamp(80px, 11vw, 150px) var(--side) clamp(70px, 9vw, 120px); background: var(--page); }
.section-head { margin-bottom: clamp(30px, 4vw, 54px); }
.section-head p { margin-top: 16px; }

.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(16px, 2vw, 26px); }
.card {
  --card: var(--surface);
  position: relative;
  grid-column: span 5;
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 420px;
  padding: clamp(22px, 2.6vw, 38px);
  border: 3px solid transparent;
  border-radius: 44px 36px 48px 34px;
  background: var(--card);
}
.card:first-child, .card:last-child { grid-column: span 7; }
.card-top p { max-width: 34ch; margin: 12px 0 0; line-height: 1.5; }
.card-pic { position: relative; min-height: 0; align-self: end; }
.card-pic img { width: 100%; height: clamp(220px, 23vw, 300px); object-fit: contain; object-position: 50% 100%; }
.card-move { --card: var(--honey); color: var(--ink); }
.card-grab { --card: var(--cream); color: var(--ink); }
.card-flop { --card: var(--clay); color: #FFF9EC; }
.card-spawn { --card: #4A281A; color: #F9E9CC; }

/* ---- sandbox ---- */

.sandbox {
  position: relative;
  padding: clamp(30px, 5vh, 56px) var(--side);
  background: var(--ink);
  color: #F9E9CC;
}
.sandbox :focus-visible { outline-color: var(--honey); }
.sandbox .lede { color: #D9B78C; }
.sandbox-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 20px 40px;
  align-items: end;
  margin-bottom: 24px;
}
.sandbox h2 { font-size: clamp(2rem, 4.2vw, 3.6rem); }
.sandbox .lede { margin: 12px 0 0; font-size: 1.08rem; }
.pen-tools { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 10px; min-height: 52px; }
.pen-tools .btn { width: 100%; padding-left: 8px; padding-right: 8px; }
.pen-tools .pen-off { grid-column: 1 / -1; }
.pen-off {
  display: inline-block;
  margin: 0;
  padding: 11px 18px;
  border-radius: 18px;
  background: #4A281A;
}
.js:not(.calm):not(.toy-none) .pen-off { display: none; }
.pen {
  position: relative;
  overflow: hidden;
  height: clamp(390px, calc(100svh - var(--head) - 305px), 640px);
  border: 4px solid #5B3120;
  border-top: 0;
  border-radius: 0 0 44px 40px;
  background-color: #35201A;
  background-image: linear-gradient(90deg, transparent calc(100% - 3px), rgba(20, 9, 6, .28) 0);
  background-size: 118px 100%;
  transform-origin: 50% 100%;
}
.pad {
  position: absolute;
  bottom: var(--plank);
  left: 72%;
  width: 17%;
  height: 30px;
  border-radius: 18px 18px 6px 6px;
  background: var(--honey);
  box-shadow: inset 0 -11px 0 var(--honey-deep);
  transform-origin: 50% 100%;
}
.pad::before, .pad::after {   /* the two springs under it */
  content: "";
  position: absolute;
  bottom: 0;
  width: 16%;
  height: 11px;
  background: repeating-linear-gradient(0deg, #4A281A 0 2px, transparent 2px 4px);
}
.pad::before { left: 14%; }
.pad::after { right: 14%; }
.pen .stack { left: 12px; --cols: 2; --crate: calc(var(--moko) * .24); }
.pen .bar { left: 29%; width: 34%; top: 21%; }
.pen-wall {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 14px;
  border-radius: 7px 7px 0 0;
  background: #4A281A;
}
.pen-wall:first-child { left: -4px; }
.pen-wall.right { right: -4px; }
.shelf {
  position: absolute;
  height: 24px;
  border: 3px solid #4A281A;
  border-radius: 10px 8px 11px 7px;
  background: var(--wood-light);
}
.shelf-left { left: 0; width: 18%; top: 32%; }
.shelf-right { right: 0; width: 16%; top: 36%; }
.pen .spot { --at: 45%; }
.pen .planks { bottom: 0; }
.pen .plank { border-color: #4A281A; }

/* ---- progress and questions ---- */

.progress { position: relative; padding: clamp(76px, 10vw, 140px) var(--side); background: var(--page-2); }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 6vw, 90px); align-items: start; }
.steps { list-style: none; margin: 30px 0 0; padding: 0; display: grid; gap: 14px; }
.step {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 4px 16px;
  align-items: center;
  padding: 18px 22px;
  border: 3px solid transparent;
  border-radius: var(--round);
  background: var(--surface);
}
.when {
  display: inline-block;
  padding: 5px 8px;
  border-radius: 12px 10px 13px 9px;
  background: var(--honey);
  color: var(--ink);
  font-size: .86rem;
  font-weight: 800;
  text-align: center;
}
.step:nth-child(n+3) .when { background: var(--page-2); color: var(--text); }
.step p { margin: 0; line-height: 1.4; }

.faq { margin-top: 30px; display: grid; gap: 12px; }
.faq details { border-radius: var(--round); background: var(--surface); }
.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 17px 22px;
  border-radius: inherit;
  list-style: none;
  cursor: pointer;
  font-weight: 750;
  line-height: 1.3;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--page-2);
  font: 700 1.3rem/30px var(--font);
  text-align: center;
  transition: transform .25s;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0; padding: 0 22px 20px; color: var(--text-2); }

/* ---- Quest ---- */

.quest {
  position: relative;
  min-height: max(620px, calc(100vh - var(--head)));
  min-height: max(620px, calc(100svh - var(--head)));
  padding: 70px var(--side);
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--fur-deep);
  color: var(--milk);
}
.quest :focus-visible { outline-color: var(--honey); }
.quest-copy { width: 100%; max-width: 1180px; margin: 0 auto; padding-right: 46%; }
.quest h2 { font-size: clamp(2.7rem, 5.6vw, 5.2rem); }
.quest .lede { margin: 20px 0 26px; color: #F9E9CC; }
.no-link {
  padding: 13px 20px;
  border: 3px dashed #E9C28D;
  border-radius: 22px 18px 24px 17px;
  font-weight: 700;
  line-height: 1.2;
}
.quest .spot { --at: 63%; }
.quest .bar { left: 54%; width: 22%; bottom: calc(var(--moko) * 1.4); background: #D59A5C; box-shadow: inset 0 -6px 0 var(--wood-dark); }
.quest .stack { right: var(--side); --cols: 2; }
.quest .plank { border-color: #552C16; }

/* ---- the smaller pages ---- */

.page-top { position: relative; background: var(--page-2); }
.page-top-in {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--side);
  display: grid;
  grid-template-columns: minmax(0, 9fr) minmax(0, 11fr);
  gap: 20px;
}
.page-title { align-self: center; padding: 48px 0 56px; }
.page-title h1 { font-size: clamp(2.5rem, 5.6vw, 4.8rem); }
.page-title .lede { margin: 18px 0 0; }
.nook { position: relative; overflow: hidden; min-height: max(380px, calc(var(--moko) * 1.55)); }
.nook .spot { --at: 40%; }
.nook .bar { left: 16%; width: 46%; top: 44px; }
.nook .stack { right: 2%; --cols: 2; }

.draft {
  position: sticky;
  top: var(--head);
  z-index: 8;
  padding: 11px var(--side);
  background: var(--honey);
  color: var(--ink);
  line-height: 1.35;
  text-align: center;
}

.doc {
  max-width: 1180px;
  margin: 0 auto;
  padding: 58px var(--side) 100px;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}
.toc { position: sticky; top: calc(var(--head) + 76px); font-size: .95rem; line-height: 1.3; }
.toc h2 { margin: 0 0 10px; font-size: 1.1rem; }
.toc ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; }
.toc a { display: block; padding: 7px 11px; border-radius: 12px; color: var(--text); text-decoration: none; }
.toc a:hover { background: var(--page-2); }
.prose { max-width: 70ch; min-width: 0; }
.prose section { scroll-margin-top: calc(var(--head) + 66px); margin-bottom: 42px; }
.prose h2 { margin: 0 0 14px; font-size: clamp(1.45rem, 2.2vw, 1.95rem); line-height: 1.12; }
.prose h3 { margin: 22px 0 8px; font-size: 1.2rem; }
.prose li { margin-bottom: .4em; }
.prose .updated { color: var(--text-2); font-size: .95rem; }
.placeholder {
  margin: 0;
  padding: 15px 18px;
  border: 2px dashed var(--fur-soft);
  border-radius: 18px;
  color: var(--text-2);
  line-height: 1.5;
}
.prose table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.prose th, .prose td { padding: 10px 12px; border-bottom: 2px solid var(--edge); text-align: left; vertical-align: top; }

.help { max-width: 1180px; margin: 0 auto; padding: 64px var(--side) 100px; }
.help-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.help-card {
  padding: 26px;
  border: 3px solid transparent;
  border-radius: var(--round);
  background: var(--surface);
}
.help-card h2 { margin-bottom: 12px; font-size: 1.6rem; }
.help-card p { margin: 0 0 14px; line-height: 1.5; }
.help-card p:last-child { margin: 0; }
.help-more { margin-top: 64px; max-width: 760px; }
.help-more h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); }

/* an open question in the draft: gone once the owner resolves it */
.check {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 8px 0 4px;
  padding: 5px 11px;
  border-radius: 12px 10px 13px 9px;
  background: var(--page-2);
  color: var(--text);
  font-size: .85rem;
  font-weight: 400;
  line-height: 1.4;
}
.prose .facts { margin: 0 0 18px; line-height: 1.45; }
.facts tbody th { width: 27%; }
.facts td:nth-child(3) { width: 24%; }
.facts td { overflow-wrap: anywhere; }
.prose .fill { white-space: normal; overflow-wrap: anywhere; }

@media (max-width: 700px) {
  .facts thead { display: none; }
  .facts, .facts tbody, .facts tr, .facts th, .facts td { display: block; width: auto; }
  .prose .facts tr { margin-bottom: 12px; padding: 12px 14px; border-radius: 20px 17px 21px 16px; background: var(--surface); }
  .prose .facts th, .prose .facts td { width: auto; padding: 3px 0; border: 0; }
  .facts td::before { content: attr(data-label) ": "; font-weight: 700; }
}

/* ---- 404 ---- */

.lost {
  position: relative;
  height: calc(100vh - var(--head));
  height: calc(100svh - var(--head));
  min-height: 660px;
  max-height: 900px;
}
.lost .hero-in { padding-top: 5vh; }
.lost .title .letters { --cap: clamp(100px, min(19vw, 27vh), 230px); }
.lost-copy { max-width: min(460px, 42vw); margin-top: 28px; }
.lost h2 { margin-bottom: 14px; font-size: clamp(1.8rem, 3.5vw, 3rem); }
.lost .lede { margin-bottom: 20px; }
.lost .spot { --at: 70%; }
.lost .stack { right: var(--side); --cols: 1; }

/* ---- small screens ---- */

@media (max-width: 1000px) {
  :root { --moko: clamp(210px, 31vw, 280px); }
  .card, .card:first-child, .card:last-child { grid-column: span 6; }
  .hero .stack > .wide-only { display: none; }
  .hero .stack { --cols: 2; }
  .doc { grid-template-columns: minmax(0, 1fr); gap: 34px; }
  .toc { position: static; padding: 18px; border-radius: 22px; background: var(--page-2); }
  .help-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  :root { --moko: clamp(170px, 50vw, 210px); --plank: 22px; }

  .hero { min-height: 668px; max-height: 840px; }
  .hero-in { padding-top: 12px; }
  .title .letters { --cap: min(17.6vw, 70px); gap: 0 4px; }
  .letters .split { display: block; flex-basis: 100%; height: 0; }
  .title .letters .ltr { margin-bottom: 2px; }
  .hero-copy { max-width: none; margin-top: 18px; }
  .tagline { font-size: clamp(1.75rem, 8.4vw, 2.2rem); margin-bottom: 8px; }
  .hero-copy .lede { max-width: none; margin-bottom: 16px; font-size: 1rem; line-height: 1.4; }
  .hero-copy .btn { min-height: 48px; padding: 10px 14px; font-size: .95rem; }
  .hero-copy .actions { gap: 12px 10px; }
  .hero-copy .chip { display: none; }
  .hero .bar, .hint { display: none; }
  .hero .spot { --at: 37%; }
  .hero .stack { right: 10px; --crate: calc(var(--moko) * .27); }

  .bento { display: block; }
  .card { min-height: 0; margin-bottom: 16px; }
  .card-pic img { height: 230px; }
  .card-top p { max-width: none; }

  .two { grid-template-columns: minmax(0, 1fr); }
  .step { grid-template-columns: 84px minmax(0, 1fr); padding: 15px; }

  .sandbox { padding-left: 10px; padding-right: 10px; }
  .sandbox-top { grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 0 8px; margin-bottom: 18px; }
  .pen-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pen-tools .btn { min-height: 44px; padding: 8px 10px; font-size: .93rem; }
  .fetch { width: 52px; height: 52px; padding: 6px; }
  .pen { height: clamp(340px, calc(100svh - var(--head) - 320px), 460px); }
  .shelf-left { top: 34%; width: 22%; }
  .shelf-right { top: 40%; width: 22%; }
  .pen .stack { display: none; }
  .pad { left: 74%; width: 22%; }
  .pen .bar { left: 28%; width: 44%; }

  .quest .spot { --at: 62%; }
  .quest .bar { display: none; }
  .quest-copy { padding-right: 0; }
  .quest .stack { left: 8px; right: auto; --cols: 1; }
  .quest .stack > .wide-only { display: none; }
  .quest { align-items: flex-start; padding-bottom: calc(var(--moko) * 1.3); }

  .page-top-in { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .page-title { padding: 34px 0 0; }
  .nook { min-height: calc(var(--moko) * 1.2); }
  .nook .bar { display: none; }
  .nook .stack { --cols: 1; }
  .nook .stack > .wide-only { display: none; }
  .draft { font-size: .9rem; }

  .help-grid { grid-template-columns: minmax(0, 1fr); }

  .lost { min-height: 640px; }
  .lost-copy { max-width: none; margin-top: 14px; }
  .lost .title .letters { --cap: min(27vw, 112px); }
  .lost .spot { --at: 40%; }
}

@media (min-width: 701px) and (max-height: 760px) {
  .hero { min-height: 590px; }
  .hero-copy { margin-top: 16px; }
  .hero-copy .chip { display: none; }
}

@media print {
  .site-head, .site-foot, .nook, .toy-layer, .fetch, .toc { display: none !important; }
  .draft { position: static; }
  .doc { display: block; }
}
