/* Good Enough Labs
   Layout: the studio's engineering computation pad. Green grid paper with the pad's printed
   rules and fields, our working in graphite, checks and corrections in red pen. The page reads
   as a worked problem: Given and Find, worked examples (our apps, taped in), then a boxed answer.
   Night turns the pad into a chalkboard. */

@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("assets/fonts/bricolage-grotesque-latin-opsz.woff2") format("woff2");
}
@font-face {
  font-family: "Kalam";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/kalam-latin-400.woff2") format("woff2");
}
@font-face {
  font-family: "Kalam";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("assets/fonts/kalam-latin-700.woff2") format("woff2");
}
@font-face {
  font-family: "Gochi Hand";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/gochi-hand-latin-400.woff2") format("woff2");
}
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("assets/fonts/plus-jakarta-sans-latin-wght.woff2") format("woff2");
}

:root {
  /* The pad */
  --paper: #E7EED8;
  --print: #2C5A3A;
  --rule: rgba(44, 90, 58, 0.34);
  --grid: rgba(56, 108, 66, 0.085);
  --grid-major: rgba(56, 108, 66, 0.165);
  --graphite: #262A27;
  --graphite-soft: #535C51;
  --red: #C4342A;
  --tape: rgba(255, 252, 232, 0.66);
  --tape-edge: rgba(122, 110, 66, 0.20);
  --btn-bg: #262A27;
  --btn-fg: #F3F7EA;
  --btn-shadow: #2C5A3A;
  --shadow: rgba(38, 52, 34, 0.22);

  /* The quality-check card is a plain sheet taped onto the pad. It stays paper in both themes. */
  --sheet-paper: #FFFEF6;
  --sheet-ink: #262A27;
  --sheet-soft: #5B6159;
  --sheet-faint: #A9AD9F;
  --sheet-print: #2C5A3A;
  --sheet-red: #C4342A;
  --sheet-rule: #E2E1D3;

  /* The apps' own worlds. These never change with the theme. */
  --nn-paper: #F7F5F0;
  --nn-ink: #1B1B1F;
  --nn-dot: #D3CEC3;
  --nn-coral: #F5A3A0;
  --meloa-coral: #E56B4A;
  --meloa-coral-deep: #C95335;
  --meloa-cream: #FFF9F5;
  --meloa-blush: #F9DED4;
  --meloa-text: #292724;
  --meloa-text-quiet: #77716B;
  --meloa-surface: #FFFFFF;
  --meloa-shadow: rgba(176, 139, 118, 0.22);
  --pw-dusk: #120E1A;
  --pw-orange: #F05A28;
  --pw-indigo: #5862B0;
  --pw-teal: #2E9485;
  --pw-cream: #FFF8F5;
  --pw-cream-quiet: rgba(255, 248, 245, 0.66);
  --pw-chip: rgba(255, 248, 245, 0.08);
  --pw-chip-edge: rgba(255, 248, 245, 0.16);

  /* Type: typeset in Bricolage Grotesque, written by hand in Kalam (قلم, "pen") */
  --font-lab: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-hand: "Kalam", "Bradley Hand", "Segoe Print", "Comic Sans MS", cursive;
  --font-nn: "Gochi Hand", "Bradley Hand", "Comic Sans MS", cursive;
  --font-app: "Plus Jakarta Sans", "Avenir Next", "Segoe UI", system-ui, -apple-system, sans-serif;

  --step--1: 0.8125rem;
  --step-0: 1.0625rem;
  --step-1: clamp(1.125rem, 1.05rem + 0.35vw, 1.3125rem);
  --step-2: clamp(1.375rem, 1.2rem + 0.7vw, 1.75rem);
  --step-3: clamp(2rem, 1.45rem + 2.4vw, 3.375rem);
  --step-4: clamp(2.75rem, 1.3rem + 6.2vw, 6.75rem);

  --wrap: 78rem;
  --sheet-gap: clamp(88px, 11vw, 152px);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    /* The same working, on a chalkboard */
    --paper: #1D2C23;
    --print: #95C3A0;
    --rule: rgba(149, 195, 160, 0.34);
    --grid: rgba(214, 236, 218, 0.055);
    --grid-major: rgba(214, 236, 218, 0.11);
    --graphite: #EDF2E7;
    --graphite-soft: #B6C6B7;
    --red: #FF8E7F;
    --tape: rgba(255, 252, 232, 0.22);
    --tape-edge: rgba(255, 255, 255, 0.10);
    --btn-bg: #EDF2E7;
    --btn-fg: #1D2C23;
    --btn-shadow: #95C3A0;
    --shadow: rgba(0, 0, 0, 0.45);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #1D2C23;
  --print: #95C3A0;
  --rule: rgba(149, 195, 160, 0.34);
  --grid: rgba(214, 236, 218, 0.055);
  --grid-major: rgba(214, 236, 218, 0.11);
  --graphite: #EDF2E7;
  --graphite-soft: #B6C6B7;
  --red: #FF8E7F;
  --tape: rgba(255, 252, 232, 0.22);
  --tape-edge: rgba(255, 255, 255, 0.10);
  --btn-bg: #EDF2E7;
  --btn-fg: #1D2C23;
  --btn-shadow: #95C3A0;
  --shadow: rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

/* Base */

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

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

body {
  margin: 0;
  color: var(--graphite);
  font-family: var(--font-lab);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--paper);
  /* paper grain, then the pad's grid: five squares to the inch, with a heavier line every inch */
  background-image:
    url("assets/paper-grain.png"),
    linear-gradient(var(--grid-major) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-major) 1px, transparent 1px),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 180px 180px, 100px 100px, 100px 100px, 20px 20px, 20px 20px;
  background-position: 0 0, 0 -1px, -1px 0, 0 -1px, -1px 0;
}

h1, h2, h3, p, ul, dl, dd { margin: 0; }
[hidden] { display: none !important; }
ul { padding: 0; list-style: none; }
h1, h2, h3 { text-wrap: balance; color: var(--graphite); }
h2 {
  font-size: var(--step-3);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.03em;
}
h3 {
  font-size: var(--step-2);
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -0.012em;
}
p { text-wrap: pretty; }
img { max-width: 100%; display: block; }
a { color: inherit; }

::selection { background: var(--red); color: var(--btn-fg); }

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

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
@media (min-width: 720px) {
  .wrap {
    padding-left: max(40px, env(safe-area-inset-left, 0px));
    padding-right: max(40px, env(safe-area-inset-right, 0px));
  }
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 10;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 600;
  text-decoration: none;
}
.skip:focus { top: calc(env(safe-area-inset-top, 0px) + 12px); }

/* The pad's printed vocabulary */

.label,
.field__label,
.givens dt,
.answer__label,
.spec dt,
.tb__label {
  font-family: var(--font-lab);
  font-size: 0.75rem;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--print);
}

/* Hand-drawn marks, drawn by main.js into each [data-sketch] element */
[data-sketch] { position: relative; }
.sketch {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.sketch path {
  fill: none;
  stroke: var(--graphite);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sketch--red path { stroke: var(--red); stroke-width: 2.4; }
.sketch--draw path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
.sketch--draw.is-drawn path { stroke-dashoffset: 0; transition: stroke-dashoffset 0.5s cubic-bezier(0.55, 0.1, 0.35, 1); }

/* Buttons and links */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 48px;
  padding: 0.7em 1.25em;
  border: 1.5px solid var(--btn-bg);
  border-radius: 8px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  box-shadow: 3px 3px 0 0 var(--btn-shadow);
  font: 620 1rem/1.2 var(--font-lab);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease, color 0.12s ease;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 0 var(--btn-shadow); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 0 var(--btn-shadow); }
.btn--small { min-height: 40px; padding: 0.5em 1em; font-size: 0.9375rem; }
.btn--ghost {
  background: transparent;
  color: var(--graphite);
  border-color: var(--graphite);
  box-shadow: 3px 3px 0 0 var(--rule);
}
.btn--ghost:hover { box-shadow: 4px 4px 0 0 var(--rule); }
.btn--paper {
  background: transparent;
  color: var(--sheet-ink);
  border-color: var(--sheet-ink);
  box-shadow: 2px 2px 0 0 var(--sheet-faint);
}

.text-link {
  color: var(--graphite);
  font-weight: 620;
  text-decoration: underline;
  text-decoration-color: var(--red);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.22em;
}
.text-link:hover { color: var(--red); }

/* The pad header */

.pad-header { border-bottom: 4px double var(--print); }
.pad-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--graphite);
}
.brand__mark { width: 36px; height: 36px; flex: none; overflow: visible; }
.mark-box { fill: none; stroke: var(--graphite); stroke-width: 2.6; }
.mark-tick {
  fill: none;
  stroke: var(--red);
  stroke-width: 4.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.brand__name {
  font-size: 1.1875rem;
  font-weight: 740;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav__link {
  display: none;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--graphite-soft);
  font-weight: 580;
  text-decoration: none;
}
.site-nav__link:hover { color: var(--graphite); text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 0.3em; }
.site-nav .btn { white-space: nowrap; margin-left: 8px; }
@media (min-width: 900px) { .site-nav__link { display: inline-block; } }
.label-short { display: none; }
@media (max-width: 479px) {
  .label-long { display: none; }
  .label-short { display: inline; }
}
@media (max-width: 380px) {
  .brand { gap: 8px; }
  .brand__mark { width: 32px; height: 32px; }
  .brand__name { font-size: 1.0625rem; }
  .site-nav .btn { margin-left: 0; padding-inline: 0.85em; }
}

/* Sheets and their printed fields */

.sheet { padding-top: var(--sheet-gap); }
.fields {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 28px;
  margin-bottom: clamp(28px, 4vw, 44px);
  padding-bottom: 10px;
  border-bottom: 4px double var(--print);
}
.field { display: inline-flex; align-items: baseline; gap: 10px; min-width: 0; }
.field__value {
  min-width: 5.5rem;
  padding: 0 6px 1px 4px;
  border-bottom: 1px solid var(--print);
  font-family: var(--font-hand);
  font-size: 1.3125rem;
  line-height: 1.2;
  color: var(--graphite);
}
.field--wide .field__value { min-width: min(15rem, 52vw); }

.sheet__head {
  display: grid;
  gap: 16px;
  max-width: 46rem;
  margin-bottom: clamp(40px, 6vw, 72px);
}
.sheet__lead {
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--graphite-soft);
  max-width: 36em;
}

/* Given / Find */

.givens { display: grid; }
.givens__row {
  display: grid;
  grid-template-columns: 4.25rem minmax(0, 1fr);
  align-items: baseline;
  gap: 4px 14px;
  padding: 3px 0;
}
.givens dd {
  font-family: var(--font-hand);
  font-size: 1.4375rem;
  line-height: 1.32;
  color: var(--graphite);
}
.givens--small dd { font-size: 1.1875rem; }
.givens--small .givens__row { padding: 1px 0; }

/* Sheet 1 */

.hero { padding-top: 0; }
.hero__grid {
  display: grid;
  gap: 40px 72px;
  padding-block: clamp(28px, 5vw, 64px) 0;
}
.hero__top { display: grid; gap: clamp(18px, 2.4vw, 28px); min-width: 0; }
@media (min-width: 1000px) {
  .hero__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-rows: auto auto 1fr; align-items: start; }
  .hero__top { grid-column: 1 / -1; }
  .hero__main { grid-column: 1; grid-row: 2; }
  .check { grid-column: 2; grid-row: 2 / span 2; }
  .sum { grid-column: 1; grid-row: 3; }
}
.hero__main { display: grid; gap: 28px; min-width: 0; align-content: start; }

.hero__title {
  font-size: var(--step-4);
  font-weight: 760;
  line-height: 0.98;
  letter-spacing: -0.04em;
  margin-top: 4px;
}
.edit { white-space: nowrap; }
.edit__old {
  display: inline-block;
  color: var(--graphite-soft);
}
html:not(.js) .edit__old { text-decoration: line-through 0.07em var(--red); }
.edit__new {
  display: inline-block;
  margin-left: 0.04em;
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 1.1em;
  letter-spacing: -0.01em;
  color: var(--red);
  transform: rotate(-4deg) translateY(-0.02em);
  animation: write-in 0.6s ease-out 0.95s both;
}
@keyframes write-in {
  from { clip-path: inset(-30% 100% -30% -10%); }
  to { clip-path: inset(-30% -10% -30% -10%); }
}

.hero__lead { font-size: var(--step-1); line-height: 1.5; max-width: 34em; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* Leads, added up the way you'd add them on a pad */
.sum { display: grid; max-width: 32rem; min-width: 0; }
.sum__label { margin-bottom: 6px; }
.sum__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1.2rem 7.2rem;
  align-items: center;
  column-gap: 8px;
  padding: 9px 0;
}
.sum__who { display: grid; min-width: 0; }
.sum__name { font-weight: 650; }
.sum__role { color: var(--graphite-soft); font-size: 0.9375rem; line-height: 1.35; }
.sum__op {
  grid-column: 2;
  font-family: var(--font-hand);
  font-size: 1.6rem;
  line-height: 1;
  text-align: center;
}
.sum__years {
  grid-column: 3;
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.1;
  text-align: right;
  white-space: nowrap;
}
.sum__row--last { border-bottom: 2px solid var(--graphite); }
.sum__total {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
  padding-top: 12px;
}
.sum__note { font-family: var(--font-hand); font-size: 1.1875rem; color: var(--graphite-soft); }
.sum__years--total {
  display: inline-block;
  padding: 2px 10px;
  font-size: 1.875rem;
  color: var(--graphite);
}

/* The quality check */

.check { position: relative; min-width: 0; width: 100%; max-width: 31rem; }
@media (min-width: 1000px) { .check { margin-top: 6px; } }
.check__paper {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 22px 20px 16px;
  border-radius: 3px;
  background: var(--sheet-paper);
  color: var(--sheet-ink);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05), 0 18px 34px -18px var(--shadow);
  transform: rotate(1.1deg);
}
.check__paper::before,
.check__paper::after,
.taped::before,
.taped::after {
  content: "";
  position: absolute;
  z-index: 5;
  top: -13px;
  width: clamp(72px, 22%, 112px);
  height: 26px;
  background: var(--tape);
  border-left: 1px dashed var(--tape-edge);
  border-right: 1px dashed var(--tape-edge);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  pointer-events: none;
}
.check__paper::before,
.taped::before { left: 14%; transform: rotate(-4deg); }
.check__paper::after,
.taped::after { right: 12%; transform: rotate(5deg); }

.check__head { display: grid; gap: 2px; }
.check__head .label { color: var(--sheet-print); }
.check__prompt {
  font-family: var(--font-hand);
  font-size: 1.5rem;
  line-height: 1.2;
  color: var(--sheet-ink);
}

.check__pad {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 0.82;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cg transform='rotate(45 16 16)'%3E%3Crect x='13' y='-1' width='6' height='21' rx='1' fill='%23F2C14E' stroke='%23262A27' stroke-width='1.2'/%3E%3Cpath d='M13 20 L16 28 L19 20 Z' fill='%23F3E2C3' stroke='%23262A27' stroke-width='1.2'/%3E%3Cpath d='M15.1 25.6 L16 28 L16.9 25.6 Z' fill='%23262A27'/%3E%3C/g%3E%3C/svg%3E") 7 24, crosshair;
  /* corner marks show where the drawing area is */
  background:
    linear-gradient(var(--sheet-faint), var(--sheet-faint)) top left / 16px 1.5px no-repeat,
    linear-gradient(var(--sheet-faint), var(--sheet-faint)) top left / 1.5px 16px no-repeat,
    linear-gradient(var(--sheet-faint), var(--sheet-faint)) top right / 16px 1.5px no-repeat,
    linear-gradient(var(--sheet-faint), var(--sheet-faint)) top right / 1.5px 16px no-repeat,
    linear-gradient(var(--sheet-faint), var(--sheet-faint)) bottom left / 16px 1.5px no-repeat,
    linear-gradient(var(--sheet-faint), var(--sheet-faint)) bottom left / 1.5px 16px no-repeat,
    linear-gradient(var(--sheet-faint), var(--sheet-faint)) bottom right / 16px 1.5px no-repeat,
    linear-gradient(var(--sheet-faint), var(--sheet-faint)) bottom right / 1.5px 16px no-repeat;
}
.check__ink {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.check__stroke {
  fill: none;
  stroke: var(--sheet-ink);
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: opacity 0.25s ease;
}
.check__stroke.is-faded { opacity: 0.3; }
.check__ideal {
  fill: none;
  stroke: var(--sheet-red);
  stroke-width: 1.6;
  stroke-dasharray: 6 6;
  opacity: 0;
  transition: opacity 0.4s ease 0.15s;
}
.check__ideal.is-shown { opacity: 0.9; }
.check__hint {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-hand);
  font-size: 1.375rem;
  color: var(--sheet-faint);
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.check__hint.is-hidden { opacity: 0; }

.check__result {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 92px;
}
.check__score {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: 86px;
  height: 78px;
}
.check__score .sketch path { stroke: var(--sheet-red); stroke-width: 2.6; }
.check__number {
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 2.5rem;
  line-height: 1;
  color: var(--sheet-red);
  font-variant-numeric: tabular-nums;
}
.check__words { display: grid; gap: 2px; min-width: 0; }
.check__verdict { font-weight: 650; font-size: 1.0625rem; line-height: 1.35; }
.check__note {
  font-family: var(--font-hand);
  font-size: 1.1875rem;
  line-height: 1.3;
  color: var(--sheet-soft);
}
.check__note:empty { display: none; }
.check__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding-top: 12px;
  border-top: 1px solid var(--sheet-rule);
}
.check__credit { font-size: 0.8125rem; line-height: 1.4; color: var(--sheet-soft); }
.check__credit a { color: var(--sheet-ink); font-weight: 620; text-decoration-color: var(--sheet-red); text-underline-offset: 0.18em; }
.check :focus-visible { outline-color: var(--sheet-red); }

/* Sheet 2: worked examples */

.examples { display: grid; gap: clamp(80px, 10vw, 136px); }
.example {
  display: grid;
  gap: 40px 64px;
  align-items: start;
}
@media (min-width: 1000px) {
  .example { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
}

.taped { position: relative; min-width: 0; }
@media (min-width: 1000px) {
  .taped { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 40px); }
}
.example:nth-child(1) .taped { transform: rotate(-0.6deg); }
.example:nth-child(2) .taped { transform: rotate(0.5deg); }
.example:nth-child(3) .taped { transform: rotate(-0.4deg); }

.window {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: clamp(14px, 2vw, 22px);
  min-width: 0;
  box-shadow: 0 18px 36px -20px var(--shadow);
}

.example__work { display: grid; gap: 16px; min-width: 0; }
.example__name {
  font-size: var(--step-3);
  font-weight: 720;
  line-height: 1;
  letter-spacing: -0.032em;
}
.example__solution { max-width: 34em; }

.spec { display: grid; border-top: 1px solid var(--rule); margin-top: 2px; }
.spec > div {
  display: grid;
  grid-template-columns: 8.5em minmax(0, 1fr);
  gap: 4px 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--rule);
}
.spec dt { padding-top: 0.32em; }
.spec dd { font-size: 0.96875rem; line-height: 1.5; }
@media (max-width: 460px) {
  .spec > div { grid-template-columns: minmax(0, 1fr); }
}

.answer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 28px;
  margin-top: 6px;
}
.answer__line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.answer__box {
  display: inline-block;
  padding: 2px 10px;
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.3;
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 620;
  font-size: 0.9375rem;
}
.status--soon { color: var(--graphite-soft); }
.status__mark { display: inline-block; flex: none; width: 22px; height: 22px; }

.example__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 24px;
  margin-top: 8px;
}

/* Ninety-Nine: a dotted notebook page with real screenshots */

.window--nn {
  aspect-ratio: 5 / 4;
  background-color: var(--nn-paper);
  background-image: radial-gradient(circle, var(--nn-dot) 1.25px, transparent 1.75px);
  background-size: 22px 22px;
  background-position: 11px 11px;
  color: var(--nn-ink);
}
.nn-hook {
  position: absolute;
  left: 7%;
  top: 7.5%;
  z-index: 4;
  font-family: var(--font-nn);
  font-size: clamp(1.75rem, 1rem + 3.2vw, 3.4rem);
  line-height: 1;
  color: var(--nn-ink);
}
.nn-hook::after {
  content: "";
  display: block;
  height: 0.16em;
  margin-top: 0.06em;
  border-radius: 99px;
  background: var(--nn-coral);
  transform: rotate(-1.2deg);
}
.phone {
  position: absolute;
  width: 31%;
  aspect-ratio: 660 / 1434;
  border: clamp(3px, 0.55vw, 7px) solid var(--nn-ink);
  border-radius: 14% / 6.45%;
  background: var(--nn-ink);
  overflow: hidden;
  box-shadow: 0 1.2vw 2.6vw rgba(27, 27, 31, 0.16);
}
.phone img { width: 100%; height: 100%; object-fit: cover; }
.phone--center { left: 32.5%; width: 35%; bottom: -26%; z-index: 3; }
.phone--left { left: 5%; bottom: -38%; transform: rotate(-8deg); z-index: 2; }
.phone--right { left: 64%; bottom: -38%; transform: rotate(8deg); z-index: 2; }
@media (max-width: 640px) {
  .window--nn { aspect-ratio: 4 / 4.3; }
  .phone { width: 38%; }
  .phone--center { left: 29%; width: 42%; bottom: -24%; }
  .phone--left { left: -5%; bottom: -34%; }
  .phone--right { left: 67%; bottom: -34%; }
  .nn-hook { top: 7%; }
}

/* Meloa: warm cream, terracotta, and the app's own reminder cards */

.window--meloa {
  display: grid;
  gap: 28px;
  align-content: center;
  padding: clamp(24px, 5.5%, 52px);
  background: var(--meloa-cream);
  color: var(--meloa-text);
  font-family: var(--font-app);
}
@media (min-width: 640px) {
  .window--meloa {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
    align-items: center;
    gap: 32px;
  }
}
@media (min-width: 1000px) { .window--meloa { aspect-ratio: 5 / 4; } }
.meloa-copy { display: grid; gap: 18px; align-content: center; }
.meloa-icon { width: 60px; height: 60px; border-radius: 22.5%; box-shadow: 0 8px 18px var(--meloa-shadow); }
.meloa-line {
  font-size: clamp(1.625rem, 1.2rem + 1.5vw, 2.375rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.meloa-ui { position: relative; isolation: isolate; display: grid; gap: 14px; }
.meloa-arc {
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 50%;
  width: 128%;
  height: auto;
  aspect-ratio: 1;
  transform: translate(-50%, -42%);
  overflow: visible;
  fill: none;
  stroke: var(--meloa-blush);
  stroke-width: 116;
  stroke-linecap: round;
}
.meloa-note svg,
.meloa-card svg {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.meloa-note,
.meloa-card { background: var(--meloa-surface); border-radius: 20px; box-shadow: 0 10px 26px var(--meloa-shadow); }
.meloa-note { display: flex; align-items: center; gap: 12px; padding: 14px 16px; transform: rotate(-1.5deg); }
.meloa-note__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 50%;
  background: var(--meloa-coral);
  color: var(--meloa-surface);
}
.meloa-note__icon svg { fill: currentColor; }
.meloa-note__text,
.meloa-card__who { display: grid; line-height: 1.3; min-width: 0; }
.meloa-note__text strong,
.meloa-card__who strong { font-size: 0.96875rem; font-weight: 700; }
.meloa-note__text small,
.meloa-card__who small { font-size: 0.8125rem; color: var(--meloa-text-quiet); }
.meloa-card { display: grid; gap: 14px; padding: 18px; }
.meloa-card__head { display: flex; align-items: center; gap: 12px; }
.meloa-avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 50%;
  background: var(--meloa-blush);
  color: var(--meloa-coral-deep);
  font-weight: 800;
}
.meloa-card__note {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--meloa-cream);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--meloa-text);
}
.meloa-card__note svg { color: var(--meloa-coral); width: 16px; height: 16px; }
.meloa-card__call {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  border-radius: 16px;
  background: var(--meloa-coral);
  color: var(--meloa-surface);
  font-weight: 700;
  font-size: 0.96875rem;
}
.meloa-card__call svg { fill: currentColor; stroke: none; width: 17px; height: 17px; }

/* Pauseway: dusk, an orange halo and the Open Pause mark, breathing */

.window--pw {
  display: grid;
  gap: 28px;
  padding: clamp(24px, 5.5%, 52px);
  background: var(--pw-dusk);
  color: var(--pw-cream);
  font-family: var(--font-app);
}
@media (min-width: 640px) {
  .window--pw { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: center; }
}
@media (min-width: 1000px) { .window--pw { aspect-ratio: 5 / 4; } }
.pw-copy { display: grid; gap: 26px; align-content: center; }
.pw-lines {
  font-size: clamp(1.625rem, 1.2rem + 1.5vw, 2.375rem);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.025em;
}
.pw-lines span { display: block; }
.pw-pillars { display: flex; flex-wrap: wrap; gap: 8px; }
.pw-pillars li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border-radius: 99px;
  background: var(--pw-chip);
  border: 1px solid var(--pw-chip-edge);
  font-size: 0.875rem;
  font-weight: 600;
}
.pw-pillars li::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--pillar); }
.pw-breath { display: grid; justify-items: center; gap: 10px; text-align: center; }
.pw-orb { position: relative; display: grid; place-items: center; width: min(100%, 15rem); aspect-ratio: 1; }
.pw-halo {
  position: absolute;
  inset: -12%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240, 90, 40, 0.5) 0%, rgba(240, 90, 40, 0.18) 38%, rgba(240, 90, 40, 0) 68%);
  animation: halo 10s ease-in-out infinite;
}
.pw-glyph { position: relative; width: 62%; height: auto; overflow: visible; animation: breathe 10s ease-in-out infinite; }
.pw-glyph path { fill: none; stroke: var(--pw-orange); stroke-width: 160; stroke-linecap: round; }
.pw-phase { display: grid; font-size: 1.125rem; font-weight: 700; min-height: 1.6em; }
.pw-phase > span { grid-area: 1 / 1; }
.pw-phase__in { animation: phase-in 10s linear infinite; }
.pw-phase__out { animation: phase-out 10s linear infinite; }
.pw-caption { font-size: 0.875rem; color: var(--pw-cream-quiet); }
@keyframes breathe { 0%, 100% { transform: scale(0.8); } 50% { transform: scale(1); } }
@keyframes halo { 0%, 100% { opacity: 0.45; transform: scale(0.82); } 50% { opacity: 1; transform: scale(1.05); } }
@keyframes phase-in { 0%, 47% { opacity: 1; } 50%, 97% { opacity: 0; } 100% { opacity: 1; } }
@keyframes phase-out { 0%, 47% { opacity: 0; } 50%, 97% { opacity: 1; } 100% { opacity: 0; } }

/* Sheet 3: what we build */

.services__grid { display: grid; gap: 36px 72px; }
@media (min-width: 1000px) {
  .services__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .services__head {
    position: sticky;
    top: calc(env(safe-area-inset-top, 0px) + 32px);
    align-self: start;
    margin-bottom: 0;
  }
}
.checklist { border-top: 1px solid var(--rule); }
.checklist li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 16px;
  padding: 24px 0;
  border-bottom: 1px solid var(--rule);
}
.checklist__box { display: block; width: 26px; height: 26px; margin-top: 5px; }
.checklist__text { display: grid; gap: 8px; min-width: 0; }
.checklist p { color: var(--graphite-soft); max-width: 36em; }

.solved {
  display: grid;
  gap: 18px;
  margin-top: clamp(72px, 9vw, 112px);
}
.solved__title {
  font-size: var(--step-3);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.03em;
}
.solved__intro { font-family: var(--font-hand); font-size: 1.4375rem; color: var(--graphite-soft); margin-top: 6px; }
.industries {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3em 0.95em;
  max-width: 62rem;
  font-size: clamp(1.375rem, 1rem + 1.7vw, 2.5rem);
  font-weight: 640;
  line-height: 1.22;
  letter-spacing: -0.022em;
}
.industries li { display: inline-flex; align-items: baseline; gap: 0.3em; min-width: 0; }
.industries li::before {
  content: "";
  flex: none;
  align-self: center;
  width: 0.62em;
  height: 0.62em;
  background: var(--red);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cpath d='M7 21.4c3 1.7 5.7 4.3 8 7.9 4-7.9 9.2-14.3 15.8-19.3' fill='none' stroke='%23000' stroke-width='5.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cpath d='M7 21.4c3 1.7 5.7 4.3 8 7.9 4-7.9 9.2-14.3 15.8-19.3' fill='none' stroke='%23000' stroke-width='5.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.solved__body {
  max-width: 38em;
  color: var(--graphite-soft);
  font-size: var(--step-1);
  line-height: 1.55;
  margin-top: 8px;
}

/* Sheet 4: the people */

.people { display: grid; gap: 52px 64px; }
@media (min-width: 860px) { .people { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.person {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 26px;
  align-items: start;
}
@media (max-width: 520px) { .person { grid-template-columns: minmax(0, 1fr); gap: 18px; } }
.person__portrait,
.person__photo { width: 124px; height: 124px; flex: none; }
.person__photo { border-radius: 50%; object-fit: cover; }
.person__portrait { display: grid; place-items: center; }
.person__portrait span {
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 2.625rem;
  line-height: 1;
  color: var(--graphite);
}
.person__text { display: grid; gap: 10px; min-width: 0; }
.person__role { color: var(--graphite-soft); font-weight: 580; }
.person__years { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; color: var(--graphite-soft); }
.person__number {
  display: inline-block;
  padding: 0 10px;
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 2.25rem;
  line-height: 1.15;
  color: var(--graphite);
}
.person__text p:last-child { max-width: 34em; }

/* Sheet 5: method */

.principles { display: grid; gap: 32px 64px; }
@media (min-width: 760px) { .principles { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.principles li {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 6px 14px;
  padding-top: 22px;
  border-top: 1px solid var(--rule);
}
.principles__tick { grid-row: span 2; display: block; width: 24px; height: 24px; margin-top: 6px; }
.principles h3 { font-size: var(--step-2); }
.principles p { color: var(--graphite-soft); max-width: 32em; }

/* Sheet 6: the answer, boxed */

.final-sheet { padding-bottom: clamp(88px, 10vw, 128px); }
.final {
  display: grid;
  gap: 22px;
  padding: clamp(28px, 5vw, 60px) clamp(22px, 5vw, 60px) clamp(36px, 5.5vw, 64px);
  margin-top: 10px;
}
.final__therefore {
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 2.75rem;
  line-height: 0.9;
  color: var(--graphite);
}
.final__title {
  font-size: var(--step-4);
  font-weight: 760;
  line-height: 0.98;
  letter-spacing: -0.04em;
  max-width: 14ch;
}
.final__lead { font-size: var(--step-1); line-height: 1.5; max-width: 34em; }
.final__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-top: 6px; }
.final__email {
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.2;
  user-select: all;
  -webkit-user-select: all;
  overflow-wrap: anywhere;
}
.final__status { min-height: 1.6em; font-weight: 620; color: var(--graphite-soft); }
.final__checked {
  position: absolute;
  right: clamp(4px, 3vw, 36px);
  bottom: -46px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 1.375rem;
  color: var(--red);
  transform: rotate(-5deg);
}
.final__tick { display: inline-block; width: 26px; height: 26px; }

/* Footer: the pad's title block */

.site-footer .wrap { padding-block: 0 clamp(40px, 6vw, 72px); }
.titleblock {
  display: grid;
  gap: 1.5px;
  background: var(--print);
  border: 1.5px solid var(--print);
}
@media (min-width: 760px) {
  .titleblock { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); }
  .tb--brand { grid-row: span 2; }
}
.tb {
  display: grid;
  gap: 6px;
  align-content: start;
  min-width: 0;
  padding: 14px 18px 16px;
  background: var(--paper);
  font-size: 0.96875rem;
  line-height: 1.45;
}
.tb--brand { gap: 12px; padding: 20px 22px; }
.tb__tagline { font-size: var(--step-1); font-weight: 650; letter-spacing: -0.012em; line-height: 1.3; }
.tb__small { color: var(--graphite-soft); font-size: 0.9375rem; }
.tb__hand { font-family: var(--font-hand); font-size: 1.25rem; line-height: 1.3; }
.tb__checked { display: inline-flex; align-items: center; gap: 8px; }
.tb__tick { display: inline-block; width: 22px; height: 22px; }
.tb .text-link { overflow-wrap: anywhere; }
.brand--footer .brand__mark { width: 30px; height: 30px; }

/* Motion preferences */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .sketch--draw path { stroke-dashoffset: 0; }
  .pw-glyph { transform: scale(0.92); }
  .pw-phase { display: none; }
}
