/* mitaine.app · the mitaine brand: knitted cream, fir green, terracotta; Fredoka and Nunito. */

@font-face {
  font-family: "Fredoka";
  src: url("/assets/fonts/Fredoka-Variable.ttf") format("truetype");
  font-weight: 300 700;
  font-stretch: 75% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("/assets/fonts/Nunito-Variable.ttf") format("truetype");
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  --paper: #f7efe3;
  --card: #fffcf8;
  --ink: #2f4b3b;
  --ink-soft: #5b6860;
  --on-ink: #f7efe3;
  --tint: #e5e0d6;
  --rule: #c7c5c0;
  --track: #d4d0ca;
  --thread: #a44a29;
  --on-thread: #fffcf8;
  --mustard: #d39a2c;
  --lagoon: #3f8c92;
  /* The brand's stitch (56-unit tile at 14 px), a shade darker than its
     ground. Only three places are knitted: the hero (on the paper), the
     library band (--band, a pale fir green) and the footer. */
  --knit: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 56 56'%3E%3Cpath d='M14 10L25 44M42 10L31 44' fill='none' stroke='%23ebdfcc' stroke-width='13' stroke-linecap='round'/%3E%3C/svg%3E");
  --knit-foot: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 56 56'%3E%3Cpath d='M14 10L25 44M42 10L31 44' fill='none' stroke='%2333503f' stroke-width='13' stroke-linecap='round'/%3E%3C/svg%3E");
  --band: #e6ebdd;
  --knit-band: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 56 56'%3E%3Cpath d='M14 10L25 44M42 10L31 44' fill='none' stroke='%23dae1d0' stroke-width='13' stroke-linecap='round'/%3E%3C/svg%3E");
  --shadow: 0 1px 2px rgba(47, 75, 59, 0.06), 0 10px 28px rgba(47, 75, 59, 0.08);
  --shadow-lift: 0 18px 40px rgba(47, 75, 59, 0.16);
  --display: "Fredoka", "Avenir Next Rounded", "Arial Rounded MT Bold", sans-serif;
  --text: "Nunito", "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  --gutter: max(20px, env(safe-area-inset-left, 0px));
  --wide: 1160px;
  --measure: 66ch;
  --radius: 22px;
  --radius-small: 14px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121e18;
    --card: #1b2b22;
    --ink: #f7efe3;
    --ink-soft: #aeb8b1;
    --on-ink: #121e18;
    --tint: #313f37;
    --rule: #3e4b44;
    --track: #434f48;
    --thread: #e2825f;
    --on-thread: #121e18;
    --mustard: #e0ae4a;
    --lagoon: #5aaab0;
    --knit: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 56 56'%3E%3Cpath d='M14 10L25 44M42 10L31 44' fill='none' stroke='%231a2a21' stroke-width='13' stroke-linecap='round'/%3E%3C/svg%3E");
    --knit-foot: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 56 56'%3E%3Cpath d='M14 10L25 44M42 10L31 44' fill='none' stroke='%23f3eadc' stroke-width='13' stroke-linecap='round'/%3E%3C/svg%3E");
    --band: #18271f;
    --knit-band: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 56 56'%3E%3Cpath d='M14 10L25 44M42 10L31 44' fill='none' stroke='%231f3027' stroke-width='13' stroke-linecap='round'/%3E%3C/svg%3E");
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 28px rgba(0, 0, 0, 0.3);
    --shadow-lift: 0 18px 40px rgba(0, 0, 0, 0.45);
    color-scheme: dark;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.55;
  font-feature-settings: "kern";
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
  max-width: 100%;
}
img {
  height: auto;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover {
  color: var(--thread);
}

:focus-visible {
  outline: 2.5px solid var(--thread);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--ink);
  color: var(--on-ink);
  padding: 8px 14px;
  border-radius: 999px;
  z-index: 10;
}
.skip:focus {
  left: var(--gutter);
}

.wrap {
  width: 100%;
  max-width: calc(var(--wide) + 2 * var(--gutter));
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.04;
  text-wrap: balance;
  margin: 0;
}

/* ── Header ─────────────────────────────────────────────────────────── */

.top {
  padding-top: max(18px, env(safe-area-inset-top, 0px));
  padding-bottom: 18px;
}
.top .wrap {
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.brand img {
  height: 40px;
  width: auto;
}
.on-dark {
  display: none !important;
}
@media (prefers-color-scheme: dark) {
  .on-light {
    display: none !important;
  }
  .on-dark {
    display: block !important;
  }
}
/* The footer is fir green in light mode, cream in dark mode. */
.foot .on-light {
  display: none !important;
}
.foot .on-dark {
  display: block !important;
}
@media (prefers-color-scheme: dark) {
  .foot .on-light {
    display: block !important;
  }
  .foot .on-dark {
    display: none !important;
  }
}
.brand:hover {
  color: inherit;
}
.nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 0.97rem;
}
.nav a {
  text-decoration: none;
}
.nav a:hover {
  text-decoration: underline;
}
.lang {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  border: 1.5px solid var(--rule);
  border-radius: 999px;
  padding: 4px 11px;
}
@media (max-width: 720px) {
  .nav .hide-small {
    display: none;
  }
}

/* ── Hero ───────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  padding: 28px 0 56px;
}
/* The hero is knitted, up behind the header, and fades into the plain
   paper at its foot. */
.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -200px 0 0;
  background: var(--knit) 0 0 / 14px 14px;
  -webkit-mask-image: linear-gradient(#000 calc(100% - 112px), transparent);
  mask-image: linear-gradient(#000 calc(100% - 112px), transparent);
}
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 56px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.6rem, 6vw, 5.2rem);
  line-height: 1;
}
.hero h1 em {
  font-style: normal;
  color: var(--thread);
}
.hero .lede {
  font-size: clamp(1.08rem, 1.6vw, 1.25rem);
  color: var(--ink-soft);
  max-width: 36ch;
  margin: 22px 0 30px;
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
}
.store {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--on-ink);
  font-weight: 600;
  text-decoration: none;
}
.store:hover {
  color: var(--on-ink);
}
.store.soon {
  background: transparent;
  color: var(--ink);
  border: 1.5px dashed var(--ink-soft);
  cursor: default;
}
.store img {
  height: 52px;
  width: auto;
}
.store.badge {
  padding: 0;
  background: none;
}
.cta-note {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

@media (max-width: 880px) {
  .hero .wrap {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

/* The counter card: the app's counting dock, working. */
.counter {
  position: relative;
  background: var(--card);
  border-radius: 32px;
  box-shadow: var(--shadow-lift);
  padding: 26px 26px 24px;
  max-width: 420px;
  justify-self: end;
  width: 100%;
}
@media (max-width: 880px) {
  .counter {
    justify-self: start;
  }
}
.counter .try {
  position: absolute;
  top: -14px;
  left: 26px;
  background: var(--thread);
  color: var(--on-thread);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 4px 13px 5px;
  border-radius: 999px;
}
.counter .project {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 18px;
}
.counter .project b {
  font-family: var(--display);
  font-size: 1.2rem;
  letter-spacing: -0.015em;
}
.chip {
  background: var(--tint);
  border-radius: var(--radius-small);
  padding: 8px 12px 9px;
  font-size: 0.85rem;
  color: var(--ink-soft);
  line-height: 1.2;
  min-width: 92px;
}
.chip strong {
  display: block;
  font-family: var(--display);
  font-size: 1.25rem;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.counter .row-label {
  font-size: 0.95rem;
  color: var(--ink-soft);
}
.counter .count {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}
.counter output {
  font-family: var(--display);
  font-weight: 600;
  font-size: 5.6rem;
  line-height: 0.9;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  min-width: 2ch;
  display: inline-block;
}
.counter output.tick {
  animation: tick 0.22s cubic-bezier(0.23, 1, 0.32, 1);
}
@keyframes tick {
  from {
    transform: translateY(10px);
    opacity: 0.4;
  }
}
.counter .of {
  font-family: var(--display);
  font-size: 1.5rem;
  color: var(--ink-soft);
  padding-bottom: 6px;
}
.counter .buttons {
  margin-left: auto;
  display: flex;
  gap: 12px;
  align-items: center;
}
.counter button {
  font: inherit;
  border: 0;
  cursor: pointer;
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: transform 0.12s cubic-bezier(0.23, 1, 0.32, 1);
  -webkit-tap-highlight-color: transparent;
}
.counter button:active {
  transform: scale(0.94);
}
.counter .minus {
  width: 52px;
  height: 52px;
  background: var(--tint);
  color: var(--ink);
  font-size: 1.6rem;
  font-weight: 600;
}
.counter .plus {
  width: 78px;
  height: 78px;
  background: var(--ink);
  color: var(--on-ink);
  font-family: var(--display);
  font-size: 1.55rem;
  font-weight: 600;
}
.counter .stitches {
  margin-top: 20px;
  height: 22px;
  width: 100%;
}
.counter .stitches path {
  fill: none;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke: var(--track);
  transition: stroke 0.18s ease-out;
}
.counter .stitches path.on {
  stroke: var(--thread);
}
.counter .note {
  margin: 14px 0 0;
  min-height: 1.5em;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

/* ── Rows: how it works, step by step ───────────────────────────────── */

.section {
  padding: 84px 0;
}
/* The library is a knitted band, in its own pale colour. */
#library {
  margin: 28px 0;
  background: var(--band) var(--knit-band) 0 0 / 14px 14px;
}
.section-head {
  max-width: 46rem;
  margin-bottom: 52px;
}
.section-head h2 {
  font-size: clamp(2rem, 4.2vw, 3.3rem);
}
.section-head p {
  max-width: 52ch;
  color: var(--ink-soft);
  margin: 16px 0 0;
  font-size: 1.1rem;
}

.rows {
  counter-reset: rang;
  list-style: none;
  max-width: 1000px;
  margin: 0;
  padding: 0 0 0 52px;
  position: relative;
}
/* The running thread down the side, from row to row. */
.rows::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 10px;
  bottom: 40px;
  width: 3px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='3' height='18'%3E%3Cline x1='1.5' y1='1.5' x2='1.5' y2='10' stroke='%23b4532f' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: repeat-y;
}
.row {
  counter-increment: rang;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 300px);
  gap: 48px;
  align-items: center;
  padding-bottom: 88px;
}
.row:last-child {
  padding-bottom: 0;
}
.row .text {
  position: relative;
}
.row .text::before {
  /* A numbered stitch marker on the thread, level with the title. */
  content: counter(rang);
  position: absolute;
  left: -51px;
  top: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--paper);
  border: 2.5px solid var(--thread);
  color: var(--thread);
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 25px;
  text-align: center;
}
.row h3 {
  font-size: clamp(1.55rem, 2.6vw, 2.1rem);
  margin: 0 0 14px;
}
.row p {
  margin: 0;
  max-width: 44ch;
}
.row .text p + p {
  margin-top: 12px;
  color: var(--ink-soft);
}
.shot {
  border-radius: 30px;
  overflow: hidden;
  box-shadow: var(--shadow-lift);
  background: var(--card);
  aspect-ratio: 10 / 15;
  max-width: 300px;
}
.shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}
/* The part of the screen that tells the story. */
.shot.bottom img {
  object-position: bottom;
}
.row:nth-child(even) .shot {
  transform: rotate(1.4deg);
}
.row:nth-child(odd) .shot {
  transform: rotate(-1.2deg);
}
.banner {
  max-width: 460px;
  width: 100%;
  border-radius: 5.5% / 19%;
  overflow: hidden;
  box-shadow: var(--shadow-lift);
}
.row.wide {
  grid-template-columns: minmax(0, 1fr) minmax(0, 460px);
}

@media (max-width: 760px) {
  .rows {
    padding-left: 48px;
  }
  .rows::before {
    left: 13px;
  }
  .row .text::before {
    left: -49px;
  }
  .row,
  .row.wide {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-bottom: 64px;
  }
  .shot {
    max-width: 250px;
  }
}

/* ── Supplies: the materials box of a pattern ───────────────────────── */

.supplies {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px 32px;
  max-width: 720px;
}
.supplies h2 {
  font-size: 1.6rem;
  margin-bottom: 12px;
}
.supplies dl {
  margin: 0;
}
.supplies div {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 7px 0;
}
.supplies dt {
  font-weight: 600;
  white-space: nowrap;
}
/* Dotted leader, like a printed list of supplies. */
.supplies div::after {
  content: "";
  order: 1;
  flex: 1 1 24px;
  border-bottom: 2px dotted var(--rule);
  transform: translateY(-4px);
  min-width: 24px;
}
.supplies dd {
  order: 2;
  margin: 0;
  text-align: right;
  color: var(--ink-soft);
}
@media (max-width: 600px) {
  .supplies div {
    flex-wrap: wrap;
  }
  .supplies div::after {
    display: none;
  }
  .supplies dd {
    text-align: left;
    width: 100%;
  }
}

/* ── Library ────────────────────────────────────────────────────────── */

.covers {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(150px, 1fr);
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 6px var(--gutter) 26px;
  margin: 0 calc(-1 * var(--gutter));
  scrollbar-width: thin;
}
.covers > div {
  display: flex;
  scroll-snap-align: start;
}
.cover {
  flex: 1;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin: 0;
}
.cover svg {
  width: 100%;
  height: auto;
  aspect-ratio: 6 / 5;
}
.cover figcaption {
  padding: 12px 16px 16px;
  line-height: 1.3;
}
.cover b {
  display: block;
  font-family: var(--display);
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.cover span {
  font-size: 0.88rem;
  color: var(--ink-soft);
}
.made-to-measure {
  margin-top: 28px;
  max-width: 60ch;
  font-size: 1.08rem;
}
.made-to-measure strong {
  color: var(--thread);
}

/* ── Prices: two haberdashery tags ──────────────────────────────────── */

.tags {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  max-width: 940px;
}
@media (max-width: 760px) {
  .tags {
    grid-template-columns: 1fr;
  }
}
.tag {
  position: relative;
  background: var(--card);
  border-radius: 18px 26px 26px 18px;
  box-shadow: var(--shadow);
  padding: 34px 32px 30px 70px;
}
/* The punched hole, with its thread. */
.tag::before {
  content: "";
  position: absolute;
  left: 26px;
  top: 34px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--paper);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.25);
}
.tag .string {
  position: absolute;
  left: 4px;
  top: -18px;
  width: 44px;
  height: 64px;
  pointer-events: none;
}
.tag h3 {
  font-size: 1.9rem;
}
.tag .price {
  font-family: var(--display);
  font-size: 1.15rem;
  margin: 6px 0 18px;
  color: var(--ink-soft);
}
.tag ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.tag li {
  padding: 6px 0 6px 26px;
  position: relative;
}
.tag li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 13px;
  height: 8px;
  border-left: 2.5px solid var(--thread);
  border-bottom: 2.5px solid var(--thread);
  transform: rotate(-45deg);
}
.tag.premium {
  background: var(--ink);
  color: var(--on-ink);
}
.tag.premium .price {
  color: inherit;
  opacity: 0.8;
}
.tag.premium li::before {
  border-color: var(--mustard);
}
.plans {
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid color-mix(in srgb, var(--on-ink) 25%, transparent);
}
.plans div {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 5px 0;
}
.plans dt::after {
  content: "";
}
.plans div::after {
  content: "";
  order: 1;
  flex: 1;
  border-bottom: 2px dotted color-mix(in srgb, var(--on-ink) 35%, transparent);
  transform: translateY(-4px);
}
.plans dd {
  order: 2;
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.15rem;
  font-variant-numeric: tabular-nums;
}
.plans small {
  display: block;
  opacity: 0.75;
  font-size: 0.85rem;
}
.fine {
  color: var(--ink-soft);
  font-size: 0.92rem;
  margin-top: 22px;
  max-width: 70ch;
}

/* ── Help ───────────────────────────────────────────────────────────── */

.faq {
  max-width: 780px;
  border-top: 1.5px solid var(--rule);
}
.faq details {
  border-bottom: 1.5px solid var(--rule);
}
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 0;
  font-family: var(--display);
  font-size: 1.22rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "+";
  font-family: var(--text);
  font-weight: 400;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--thread);
  transition: transform 0.2s cubic-bezier(0.23, 1, 0.32, 1);
}
.faq details[open] summary::after {
  transform: rotate(45deg);
}
.faq details > div {
  padding: 0 0 22px;
  max-width: 62ch;
  color: var(--ink-soft);
}
.faq details > div p {
  margin: 0 0 10px;
}
.contact {
  margin-top: 40px;
  font-size: 1.15rem;
}
.contact a {
  font-weight: 600;
}

/* ── Footer ─────────────────────────────────────────────────────────── */

.foot {
  margin-top: 40px;
  background: var(--ink) var(--knit-foot) 0 0 / 14px 14px;
  color: var(--on-ink);
  padding: 0 0 max(28px, env(safe-area-inset-bottom, 0px));
}
/* The cast-off row: the footer's first row of stitches, in terracotta. */
.foot .bind-off {
  height: 14px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 56 56'%3E%3Cpath d='M14 10L25 44M42 10L31 44' fill='none' stroke='%23b4532f' stroke-width='13' stroke-linecap='round'/%3E%3C/svg%3E") 0 0 / 14px 14px repeat-x;
}
.foot .wrap {
  padding-top: 44px;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) repeat(2, minmax(0, 1fr));
  gap: 32px;
}
@media (max-width: 760px) {
  .foot .wrap {
    grid-template-columns: 1fr;
  }
}
.foot .brand img {
  height: 44px;
}
.foot p {
  margin: 12px 0 0;
  opacity: 0.9;
  max-width: 36ch;
}
.foot h2 {
  font-family: var(--text);
  font-size: 0.95rem;
  letter-spacing: 0;
  opacity: 0.8;
  margin-bottom: 10px;
}
.foot ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.foot li {
  padding: 4px 0;
}
.foot a {
  text-decoration: none;
}
.foot a:hover {
  color: inherit;
  text-decoration: underline;
}
.foot .small {
  grid-column: 1 / -1;
  border-top: 1px solid color-mix(in srgb, var(--on-ink) 18%, transparent);
  padding-top: 20px;
  font-size: 0.88rem;
  opacity: 0.85;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
}

/* ── Long texts (legal pages) ───────────────────────────────────────── */

.doc {
  padding: 36px 0 72px;
}
.doc .wrap {
  display: grid;
  grid-template-columns: minmax(0, var(--measure)) minmax(0, 1fr);
  gap: 64px;
}
@media (max-width: 1060px) {
  .doc .wrap {
    grid-template-columns: minmax(0, 1fr);
  }
  .toc {
    display: none;
  }
}
.doc h1 {
  font-size: clamp(2.3rem, 5vw, 3.6rem);
  margin: 12px 0 14px;
}
.doc .meta {
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin: 0 0 32px;
}
.doc main {
  max-width: var(--measure);
  min-width: 0;
}
.doc h2 {
  font-size: 1.65rem;
  margin: 52px 0 14px;
  scroll-margin-top: 24px;
}
.doc h3 {
  font-size: 1.2rem;
  margin: 30px 0 8px;
  letter-spacing: -0.01em;
}
.doc p,
.doc ul,
.doc ol {
  margin: 0 0 14px;
}
.doc li {
  margin-bottom: 6px;
}
.doc ul,
.doc ol {
  padding-left: 1.3em;
}
.doc .counted {
  counter-reset: part;
}
.doc .counted h2 {
  counter-increment: part;
}
.doc .counted h2::before {
  content: counter(part) ". ";
  color: var(--thread);
}
.brief {
  background: var(--card);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  padding: 24px 28px 14px;
  margin: 0 0 36px;
}
.brief h2 {
  font-size: 1.3rem;
  margin: 0 0 10px;
}
.brief h2::before {
  content: none !important;
}
.brief ul {
  padding-left: 1.1em;
}
.facts {
  margin: 0 0 14px;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 6px 20px;
}
.facts dt {
  font-weight: 600;
}
.facts dd {
  margin: 0;
}
@media (max-width: 560px) {
  .facts {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .facts dd {
    margin-bottom: 10px;
  }
}
.table {
  overflow-x: auto;
  margin: 0 0 18px;
}
.table table {
  border-collapse: collapse;
  width: 100%;
  min-width: 560px;
  font-size: 0.95rem;
}
.table th,
.table td {
  text-align: left;
  vertical-align: top;
  padding: 12px 14px 12px 0;
  border-bottom: 1px solid var(--rule);
}
.table th {
  font-size: 0.88rem;
  color: var(--ink-soft);
}
.toc {
  position: sticky;
  top: 24px;
  align-self: start;
  font-size: 0.95rem;
  max-width: 300px;
}
.toc h2 {
  font-family: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--ink-soft);
  margin: 4px 0 10px;
}
.toc ol {
  margin: 0;
  padding-left: 1.2em;
}
.toc li {
  padding: 3px 0;
}
.toc a {
  text-decoration: none;
}
.toc a:hover {
  text-decoration: underline;
}

/* A value still to fill in: loud on purpose, refused by --release. */
.todo {
  background: #ffe28a;
  color: #2f4b3b;
  padding: 0 4px;
  border-radius: 4px;
  font-weight: 600;
}

/* ── Arrival ────────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: no-preference) {
  .rise {
    animation: rise 0.7s cubic-bezier(0.23, 1, 0.32, 1) both;
  }
  .rise:nth-child(2) {
    animation-delay: 0.06s;
  }
  .rise:nth-child(3) {
    animation-delay: 0.12s;
  }
  .rise:nth-child(4) {
    animation-delay: 0.18s;
  }
  .counter.rise {
    animation-delay: 0.22s;
  }
  @keyframes rise {
    from {
      opacity: 0;
      transform: translateY(14px);
    }
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .counter output.tick {
    animation: none;
  }
}
