/* NOBORI. One material language: night-indigo dyed paper, cream print sheets with an ink keyline,
   vermilion ink blocks. Nothing glows, nothing blurs: everything is printed. */
:root {
  --night: #0e2037;
  --indigo: #14304f;
  --indigo-2: #1c426b;
  --slate: #7f96b3;
  --mist: #b7c5d8;
  --paper: #f2e6ca;
  --paper-2: #e9d9b6;
  --ink: #15120f;
  --ink-2: #4a4338;
  --crane: #d8412b;
  --fox: #d9a23a;
  --carp: #3f7d58;
  --bare: #8e8a80;
  --display: "Dela Gothic One", "Shippori Antique B1", sans-serif;
  --body: "Shippori Antique B1", "Hiragino Sans", sans-serif;
  --mono: "DM Mono", ui-monospace, monospace;
  --w: 1180px;
  --off: 6px; /* the off-register offset of a mounted sheet */
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--paper); font: 400 1.0625rem/1.65 var(--body);
  background: var(--night) url(img/indigo.webp) 0 0 / 420px;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.02; margin: 0; letter-spacing: 0.01em; }
h2 { font-size: clamp(2.1rem, 1.2rem + 3.6vw, 4.2rem); }
h3 { font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.7rem); line-height: 1.15; }
p { margin: 0 0 1em; }
.wrap { width: min(var(--w), 100% - 2.5rem); margin-inline: auto; }
.num { font-family: var(--mono); font-feature-settings: "tnum"; letter-spacing: -0.01em; }
.lede { font-size: clamp(1.1rem, 1rem + 0.5vw, 1.35rem); color: var(--mist); max-width: 38em; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 99; background: var(--paper); color: var(--ink); padding: .5rem 1rem; }
:focus-visible { outline: 3px solid var(--fox); outline-offset: 3px; }

/* ---------- the sheet: every box on the site is this print ---------- */
.sheet {
  position: relative; color: var(--ink);
  background: var(--paper) url(img/washi.webp) 0 0 / 380px;
  box-shadow: var(--off) var(--off) 0 0 #081424;
  padding: clamp(1.1rem, 0.8rem + 1.4vw, 2rem);
}
.sheet::before { /* keyline, printed a hair off the edge */
  content: ""; position: absolute; inset: 7px; border: 1.5px solid var(--ink); pointer-events: none;
}
.sheet.tight { padding: .9rem 1.1rem; }
.sheet .lede, .sheet p { color: var(--ink-2); }
.sheet h3 { color: var(--ink); }
.plate { /* a mounted picture */
  position: relative; background: var(--paper) url(img/washi.webp) 0 0 / 380px; padding: 10px;
  box-shadow: var(--off) var(--off) 0 0 #081424;
}
.plate img { width: 100%; outline: 1.5px solid var(--ink); outline-offset: -1px; }

/* ---------- ink blocks: buttons ---------- */
.btn {
  display: inline-block; font: 400 1.02rem/1 var(--display); letter-spacing: .04em; text-decoration: none;
  color: var(--paper); padding: 1.05em 1.5em 1em; position: relative; border: 0; cursor: pointer;
  background: var(--crane) url(img/grain-red.webp) center / cover;
  clip-path: polygon(0.6% 6%, 12% 1.5%, 31% 4%, 52% 0.5%, 74% 3.5%, 99.2% 1%, 100% 38%, 99% 70%, 99.6% 96%, 80% 99%, 55% 96.5%, 30% 99.5%, 9% 97%, 0.4% 99%, 1% 60%, 0 30%);
  transition: transform .18s cubic-bezier(.2, .7, .2, 1);
}
.btn:hover { transform: translate(-2px, -2px); }
.btn:active { transform: translate(1px, 1px); }
.btn.paper { background: var(--paper) url(img/washi.webp) 0 0 / 380px; color: var(--ink); }
.btn.paper::after { content: ""; position: absolute; inset: 5px; border: 1.5px solid var(--ink); }
.btn.small { font-size: .82rem; padding: .8em 1.1em .75em; }

/* ---------- the stamp: labels ---------- */
.stamp {
  display: inline-block; font: 500 .72rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase;
  color: #ad2c18; border: 1.5px solid #ad2c18; padding: .5em .7em .42em; transform: rotate(-1.2deg);
}
.stamp.on-night { color: var(--fox); border-color: var(--fox); }
.tag { font: 500 .78rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--slate); }

/* ---------- nav: a strip of paper pinned across the top ---------- */
.nav {
  position: sticky; top: 0; z-index: 40; background: var(--paper) url(img/washi.webp) 0 0 / 380px; color: var(--ink);
  border-bottom: 1.5px solid var(--ink); box-shadow: 0 5px 0 0 #081424;
}
.nav .wrap { display: flex; align-items: center; gap: 1.4rem; height: 62px; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; font: 400 1.35rem/1 var(--display); letter-spacing: .06em; }
.brand img { width: 36px; height: 36px; }
.nav nav { margin-left: auto; display: flex; gap: 1.5rem; align-items: center; }
.nav nav a { text-decoration: none; font-size: .95rem; padding: .3rem 0; border-bottom: 2px solid transparent; }
.nav nav a:hover, .nav nav a[aria-current] { border-bottom-color: var(--crane); }
.nav .btn { font-size: .8rem; padding: .8em 1.1em .72em; }
@media (max-width: 860px) {
  .nav nav a:not(.keep) { display: none; }
  .nav .wrap { height: 56px; }
}

/* ---------- hero ---------- */
.hero { position: relative; isolation: isolate; min-height: min(92vh, 900px); display: grid; align-items: end; }
.hero picture, .hero .art { position: absolute; inset: 0; z-index: -1; }
.hero .art img { width: 100%; height: 100%; object-fit: cover; object-position: 72% 50%; }
.hero .art::after { /* the print fades into the dyed paper below, as a wiped bokashi band */
  content: ""; position: absolute; inset: auto 0 0 0; height: 34%;
  background: linear-gradient(to bottom, rgba(14, 32, 55, 0), var(--night) 92%);
}
.hero .art::before { /* and a second wiped band from the left, so the words sit on night sky */
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to right, rgba(14, 32, 55, .96) 0%, rgba(14, 32, 55, .9) 30%, rgba(14, 32, 55, 0) 62%);
}
.hero .copy { padding: clamp(5rem, 16vh, 11rem) 0 clamp(2.5rem, 7vh, 5rem); max-width: 40rem; }
.hero h1 {
  font-size: clamp(2.6rem, 14.6vw, 11.5rem); letter-spacing: .02em; color: var(--paper);
  text-shadow: 5px 5px 0 #081424; margin: .15em 0 .12em -0.04em;
}
.hero .line { font: 400 clamp(1.4rem, 1rem + 1.6vw, 2.2rem)/1.2 var(--display); color: var(--paper); margin-bottom: .7em; }
.hero .lede { color: #e2e8f0; text-shadow: 0 0 0 transparent; }
.cta { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 1.6rem; align-items: center; }
.hero .facts { display: flex; flex-wrap: wrap; gap: .5rem 1.6rem; margin-top: 2rem; padding: 0; list-style: none; }
.hero .facts li { font: 500 .78rem/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mist); }
.hero .facts li::before { content: ""; display: inline-block; width: 8px; height: 8px; background: var(--crane); margin-right: .6em; }
.hero .facts li:nth-child(2)::before { background: var(--fox); }
.hero .facts li:nth-child(3)::before { background: var(--carp); }
@media (max-width: 720px) {
  .hero { min-height: 0; display: block; }
  .hero .art::before { display: none; }
  .hero .art { position: relative; height: 104vw; width: 100%; overflow: hidden; }
  .hero .art img { object-position: 50% 50%; }
  .hero .art::after { height: 30%; }
  .hero .copy { padding: 0 0 2.5rem; margin-top: -4.5rem; position: relative; }
}

/* ---------- sections ---------- */
section { padding: clamp(3.5rem, 9vw, 7.5rem) 0; position: relative; }
.head { position: relative; display: grid; gap: 1rem; margin-bottom: clamp(2rem, 5vw, 3.5rem); max-width: 60rem; padding-left: clamp(3rem, 5.4vw, 4.6rem); min-height: 9rem; }
.head .pole { position: absolute; left: 0; top: -1.4rem; width: clamp(26px, 3vw, 42px); height: auto; }
.head .lede { max-width: 36em; }
.band { /* the cloud band between sections */
  height: clamp(110px, 17vw, 240px); background: url(img/clouds-2400.webp) center / cover; border-block: 1.5px solid #081424;
}
@media (max-width: 720px) { .band { background-image: url(img/clouds-1200.webp); } }

/* how it is played: switchbacks */
.steps { display: grid; gap: clamp(2.5rem, 6vw, 5rem); counter-reset: step; }
.step { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(1.5rem, 4vw, 4rem); align-items: center; }
.step:nth-child(even) .plate { order: 2; }
.step { counter-increment: step; }
.step:nth-child(odd) { grid-template-columns: 1.4fr 1fr; }
.step:nth-child(even) { grid-template-columns: 1fr 1.4fr; }
.step .plate::after { /* the printer's seal: the rule's number */
  content: counter(step); position: absolute; left: -16px; top: -16px; width: 54px; height: 54px; display: grid; place-items: center;
  font: 400 1.5rem/1 var(--display); color: var(--paper); background: var(--crane) url(img/grain-red.webp) center / cover;
  transform: rotate(-4deg); box-shadow: 3px 3px 0 0 #081424;
}
.step h3 { font-size: clamp(1.6rem, 1.2rem + 1.8vw, 2.6rem); color: var(--paper); margin-bottom: .5em; }
.step p { color: var(--mist); max-width: 30em; }
.step .how { font: 400 .88rem/1.55 var(--mono); color: var(--mist); border-left: 3px solid var(--fox); padding-left: .9rem; margin-top: 1.1rem; }
@media (max-width: 800px) {
  .step, .step:nth-child(odd), .step:nth-child(even) { grid-template-columns: 1fr; }
  .step .plate::after { left: -8px; top: -12px; width: 46px; height: 46px; font-size: 1.25rem; }
  .step:nth-child(even) .plate { order: 0; }
}

/* ---------- the board (the signature) ---------- */
.board { padding: 0; }
.board .top { display: flex; flex-wrap: wrap; gap: .8rem 1.5rem; align-items: baseline; justify-content: space-between; padding: 1.3rem 1.5rem .2rem; }
.board .top h3 { font-size: clamp(1.3rem, 1rem + 1.2vw, 1.9rem); }
.mountain {
  position: relative; margin: .8rem 7px 0; height: 700px; overflow: hidden;
  background: var(--indigo) url(img/board-sky.webp) center bottom / cover; border-block: 1.5px solid var(--ink);
}
.stairs { position: absolute; inset: 0 14px 0 14px; display: grid; grid-template-columns: repeat(36, 1fr); align-items: end; }
.st { position: relative; height: calc(44px + var(--i) * 11px); }
.st .rock { position: absolute; inset: auto 0 0 0; height: 100%; background: #1c426b url(img/indigo.webp) 0 0 / 260px; background-blend-mode: multiply; border-top: 3px solid var(--paper); border-right: 1.5px solid #081424; }
.st:nth-child(odd) .rock { background-color: #23507f; }
.st .flag {
  position: absolute; left: 50%; bottom: 100%; width: 30px; height: 206px; margin-left: -15px; background: center bottom / contain no-repeat;
  transform-origin: 50% 100%; transition: transform .5s cubic-bezier(.2, .8, .2, 1);
}
.st[data-h="0"] .flag { background-image: url(img/banner-bare.webp); height: 120px; opacity: .45; }
.st[data-h="1"] .flag { background-image: url(img/banner-crane.webp); }
.st[data-h="2"] .flag { background-image: url(img/banner-fox.webp); }
.st[data-h="3"] .flag { background-image: url(img/banner-carp.webp); }
.st.took .flag { animation: plant .7s cubic-bezier(.2, .8, .2, 1); }
@keyframes plant { 0% { transform: translateY(-26px) scaleY(.6); } 60% { transform: translateY(2px) scaleY(1.04); } 100% { transform: none; } }
.st .n { position: absolute; left: 0; right: 0; bottom: 6px; text-align: center; font: 500 .7rem/1 var(--mono); color: var(--mist); visibility: hidden; }
.st:nth-child(6n) .n, .st:first-child .n, .st.here .n { visibility: visible; }
.st.here .rock { background-color: #d8412b; }
.st.here .n { color: var(--paper); }
.st.here::after { /* the station hut: where the price rests */
  content: ""; position: absolute; left: 50%; bottom: calc(100% + 206px); width: 46px; height: 46px; margin-left: -23px;
  background: url(img/hut-night.webp) center / contain no-repeat;
}
.st.summit::before {
  content: "SUMMIT"; position: absolute; left: 50%; bottom: calc(100% + 212px); transform: translateX(-50%); z-index: 2;
  font: 500 .62rem/1 var(--mono); letter-spacing: .14em; color: var(--ink); background: var(--fox); padding: .4em .55em .32em; border: 1.5px solid var(--ink);
}
.st.here.summit::before { bottom: calc(100% + 258px); }
.preview-stamp { position: absolute; left: 18px; top: 16px; z-index: 3; background: rgba(8, 20, 36, .82); }
.legend { position: absolute; right: 18px; top: 16px; z-index: 3; display: flex; gap: 1rem; font: 500 .68rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mist); }
.legend i { display: inline-block; width: 22px; height: 22px; margin-right: .45em; vertical-align: middle; background: url(img/hut-night.webp) center / contain no-repeat; }
.under { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1.5px solid var(--ink); margin: 0 7px; }
.under > div { padding: 1rem 1.2rem; border-right: 1.5px solid var(--ink); }
.under > div:last-child { border-right: 0; }
.under dt { font: 500 .68rem/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.under dd { margin: .35rem 0 0; font: 400 clamp(1.2rem, 1rem + 1vw, 1.8rem)/1 var(--display); }
.under dd small { font: 500 .7rem/1 var(--mono); color: var(--ink-2); margin-left: .3em; }
.below { display: grid; grid-template-columns: 1.25fr 1fr; margin: 0 7px 7px; }
.below > div { padding: 1.1rem 1.2rem 1.3rem; }
.below > div + div { border-left: 1.5px solid var(--ink); }
.below h4 { margin: 0 0 .7rem; font: 500 .7rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.moves { list-style: none; margin: 0; padding: 0; height: 11.4rem; overflow: hidden; }
.moves li { display: grid; grid-template-columns: 5.6rem 1fr auto; gap: .8rem; align-items: baseline; padding: .42rem 0; border-bottom: 1px solid rgba(21, 18, 15, .22); font-size: .9rem; }
.moves li .a { font: 500 .78rem/1 var(--mono); }
.moves li .t { font: 500 .78rem/1 var(--mono); color: var(--ink-2); }
.dot { display: inline-block; width: 9px; height: 9px; margin-right: .5em; }
.c1 { background: var(--crane); } .c2 { background: var(--fox); } .c3 { background: var(--carp); }
.clanbars { display: grid; gap: .8rem; }
.clanbar { display: grid; grid-template-columns: 34px 4.2rem 1fr auto; gap: .7rem; align-items: center; font-size: .92rem; }
.clanbar img { width: 34px; height: 34px; }
.clanbar .bar { height: 12px; border: 1.5px solid var(--ink); position: relative; }
.clanbar .bar i { position: absolute; inset: 0 auto 0 0; width: 0; transition: width .6s cubic-bezier(.2, .8, .2, 1); }
.clanbar .v { font: 500 .78rem/1 var(--mono); }
.note { font-size: .82rem; color: var(--ink-2); margin: .9rem 0 0; }
@media (max-width: 900px) {
  .mountain { height: 560px; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scrollbar-width: thin; background-attachment: local; background-size: auto 100%; }
  .stairs { inset: 0 auto 0 0; width: 980px; padding: 0 10px; }
  .st { height: calc(40px + var(--i) * 8px); }
  .st .flag { width: 24px; height: 165px; margin-left: -12px; }
  .st[data-h="0"] .flag { height: 96px; }
  .st.here::after { bottom: calc(100% + 165px); width: 38px; height: 38px; margin-left: -19px; }
  .st.summit::before { bottom: calc(100% + 170px); }
  .st.here.summit::before { bottom: calc(100% + 208px); }
  .preview-stamp { position: sticky; left: 12px; top: 12px; display: inline-block; margin: 12px 0 0 12px; }
  .under { grid-template-columns: 1fr 1fr; }
  .under > div:nth-child(2) { border-right: 0; }
  .under > div:nth-child(-n+2) { border-bottom: 1.5px solid var(--ink); }
  .below { grid-template-columns: 1fr; }
  .below > div + div { border-left: 0; border-top: 1.5px solid var(--ink); }
  .legend { display: none; }
}

/* ---------- clans ---------- */
.clans { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 2.5vw, 2rem); }
.clan { text-align: center; padding-top: 2rem; }
.clan img { width: min(190px, 60%); margin: 0 auto 1.2rem; }
.clan h3 { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.3rem); }
.clan .rule { font: 500 .76rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; margin: .7rem 0 .9rem; }
.clan:nth-child(1) .rule { color: #ad2c18; } .clan:nth-child(2) .rule { color: #7a5208; } .clan:nth-child(3) .rule { color: #2c6042; }
.born { margin-top: clamp(1.5rem, 3vw, 2.5rem); display: grid; grid-template-columns: 1fr 1.1fr; gap: 1.5rem 3rem; align-items: center; }
.field { display: flex; gap: .6rem; flex-wrap: wrap; }
.field input {
  flex: 1 1 16rem; min-width: 0; font: 500 .9rem/1 var(--mono); color: var(--ink); padding: .95em 1em; border: 1.5px solid var(--ink);
  background: transparent; border-radius: 0; box-shadow: inset 2px 2px 0 0 rgba(21, 18, 15, .18);
}
.field input::placeholder { color: #8a7f6c; }
.verdict { min-height: 1.7em; margin: .9rem 0 0; font: 400 1.15rem/1.3 var(--display); }
@media (max-width: 800px) { .clans, .born { grid-template-columns: 1fr; } .clan { padding-top: 1.4rem; } .clan img { width: 130px; } }

/* ---------- ledger tables ---------- */
.ledger { width: 100%; border-collapse: collapse; font-size: .96rem; }
.ledger th, .ledger td { text-align: left; padding: .7rem .8rem .62rem 0; border-bottom: 1px solid rgba(21, 18, 15, .3); vertical-align: top; }
.ledger thead th { font: 500 .7rem/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); border-bottom: 1.5px solid var(--ink); }
.ledger td:first-child, .ledger th:first-child { padding-left: .2rem; }
.ledger td.num, .ledger td .num { white-space: nowrap; }
.ledger tr:last-child td { border-bottom: 0; }
.scroll { overflow-x: auto; }
.token { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.split { display: flex; height: 64px; border: 1.5px solid var(--ink); margin: 1.2rem 0 .6rem; }
.split div { display: grid; place-items: center; font: 400 1rem/1 var(--display); color: var(--paper); }
.split .toll { flex: 2; background: var(--indigo) url(img/indigo.webp) 0 0 / 300px; }
.split .purse { flex: 1; background: var(--fox); color: var(--ink); border-left: 1.5px solid var(--ink); }
@media (max-width: 860px) { .token { grid-template-columns: 1fr; } }

/* ---------- FAQ: strips of paper ---------- */
.faq { display: grid; gap: 1rem 1.6rem; grid-template-columns: 1fr 1fr; align-items: start; }
@media (max-width: 860px) { .faq { grid-template-columns: 1fr; } }
.faq details { padding: 0; }
.faq summary { cursor: pointer; list-style: none; padding: 1.15rem 3.2rem 1.05rem 1.5rem; font: 400 1.12rem/1.25 var(--display); position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 1.4rem; top: .95rem; font: 400 1.5rem/1 var(--display); color: var(--crane); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding: 0 1.5rem 1.2rem; margin: 0; max-width: 44em; }

/* ---------- closing + footer ---------- */
.closing { position: relative; padding: 0; }
.closing img { width: 100%; height: clamp(420px, 50vw, 700px); object-fit: cover; object-position: 62% 100%; }
.closing .say { position: absolute; left: 0; right: 0; top: 5%; text-align: center; padding: 0 1rem; }
.closing h2 { color: var(--paper); text-shadow: 4px 4px 0 #081424; }
.closing p { display: inline-block; color: var(--paper); margin-top: .9rem; font-size: 1.05rem; background: #081424; padding: .35em .9em .3em; }
.closing h2 { font-size: clamp(1.8rem, 1rem + 3.4vw, 3.8rem); }
footer { padding: 3rem 0 4rem; font-size: .9rem; color: var(--mist); border-top: 1.5px solid #081424; }
footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
footer a { color: var(--paper); text-underline-offset: 3px; }
footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
footer .fine { margin-top: 2.2rem; font-size: .8rem; color: var(--slate); max-width: 60em; }
@media (max-width: 720px) { footer .cols { grid-template-columns: 1fr; } }

/* ---------- docs / disclaimer pages ---------- */
.pagehead { position: relative; isolation: isolate; padding: clamp(4rem, 12vw, 8rem) 0 clamp(2rem, 5vw, 3.5rem); border-bottom: 1.5px solid #081424; }
.pagehead .art { position: absolute; inset: 0; z-index: -1; }
.pagehead .art img { width: 100%; height: 100%; object-fit: cover; }
.pagehead .art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to right, rgba(14, 32, 55, .93) 28%, rgba(14, 32, 55, .25) 78%); }
.pagehead h1 { font-size: clamp(2.6rem, 1.5rem + 6vw, 6rem); text-shadow: 4px 4px 0 #081424; }
.pagehead .lede { margin-top: 1rem; color: #e2e8f0; }
.doc { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 4rem); padding: clamp(2rem, 5vw, 4rem) 0 5rem; align-items: start; }
.toc { position: sticky; top: 86px; }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: t; display: grid; gap: .1rem; }
.toc a { display: block; text-decoration: none; font-size: .92rem; padding: .38rem 0 .38rem .2rem; border-bottom: 1px solid rgba(21, 18, 15, .2); counter-increment: t; }
.toc a::before { content: counter(t, decimal-leading-zero); font: 500 .72rem/1 var(--mono); color: #ad2c18; margin-right: .7em; }
.toc a:hover { background: rgba(216, 65, 43, .1); }
.prose { display: grid; gap: clamp(1.4rem, 3vw, 2.2rem); min-width: 0; }
.prose > .sheet { min-width: 0; }
.prose h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); margin-bottom: .8rem; scroll-margin-top: 90px; }
.prose h3 { margin: 1.4rem 0 .5rem; font-size: 1.2rem; }
.prose ul, .prose ol { padding-left: 1.2rem; color: var(--ink-2); margin: 0 0 1em; }
.prose li { margin-bottom: .35em; }
.prose p, .prose li { max-width: 66ch; }
.prose code { font: 500 .86em/1 var(--mono); background: rgba(21, 18, 15, .09); padding: .12em .35em; }
pre.block {
  margin: 1rem 0; padding: 1.1rem 1.2rem; overflow-x: auto; color: var(--paper); font: 400 .84rem/1.6 var(--mono);
  background: var(--indigo) url(img/indigo.webp) 0 0 / 300px; border: 1.5px solid var(--ink); box-shadow: 4px 4px 0 0 var(--ink);
}
pre.block .k { color: var(--fox); } pre.block .c { color: var(--slate); }
.callout { border-left: 6px solid var(--crane); padding: .2rem 0 .2rem 1rem; margin: 1rem 0; color: var(--ink); }
@media (max-width: 900px) { .doc { grid-template-columns: 1fr; } .toc { position: relative; top: auto; } }

/* ---------- motion: one quiet arrival, nothing else ---------- */
.js .rise { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
.js .rise.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .rise { opacity: 1; transform: none; transition: none; }
  .st .flag, .btn, .clanbar .bar i { transition: none; }
  .st.took .flag { animation: none; }
}

/* grid children may shrink */
.token > *, .born > *, .step > *, .clans > *, .below > *, .doc > * { min-width: 0; }

@media (max-width: 480px) {
  .brand { font-size: 1.05rem; gap: .45rem; } .brand img { width: 30px; height: 30px; }
  .nav .wrap { gap: .8rem; } .nav nav { gap: .9rem; }
  .nav .btn { white-space: nowrap; font-size: .7rem; padding: .8em .9em .72em; }
  .moves li { grid-template-columns: 5.2rem 1fr auto; gap: .5rem; white-space: nowrap; }
  .moves li span:nth-child(2) { overflow: hidden; text-overflow: clip; }
}
@media (max-width: 600px) {
  .ledger td.num, .ledger td .num { white-space: normal; }
  pre.block { white-space: pre-wrap; word-break: break-word; }
}
