/* handshape.nz — shared by the home page and the pages under it.

   The home page is a marketing page and the pages under it are prose, so
   this file has two halves. Everything down to "Inside pages" belongs to the
   front door; the privacy page uses `.wrap--prose`, `.card`, `.points` and
   the handful of things at the bottom, and is deliberately left plain.

   No JavaScript anywhere on this site: the Content-Security-Policy is
   `default-src 'none'` with `style-src 'self'`, and `site.test.js` fails the
   build if a <script> appears. Everything here is therefore CSS that stands
   on its own — no scroll-triggered anything, no counters that count up. */

:root {
  --ink:        #15191c;
  --ink-soft:   #4a5358;
  --paper:      #ffffff;
  --ground:     #f4f2ee;
  --rule:       #dcd9d3;
  --accent:     #0e5f73;
  --accent-ink: #0b4a5a;

  /* Two washes rather than two more inks. The accent still means "this is
     the app talking" and the warm one means "this is a person talking" —
     they tint a background and never a word, so neither can be mistaken for
     a link. */
  --accent-wash: #e4eff1;
  --warm:        #a6511c;
  --warm-wash:   #f6ece2;

  --serif: ui-serif, "New York", Iowan Old Style, Palatino, Georgia, serif;
  --sans:  ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink:        #eceae6;
    --ink-soft:   #a3aab0;
    --paper:      #181d21;
    --ground:     #11171a;
    --rule:       #2c343a;
    --accent:     #5cb8cd;
    --accent-ink: #8ed0de;

    --accent-wash: #16242a;
    --warm:        #e8a276;
    --warm-wash:   #241a14;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* One measure for everything. Wider than the 44rem this started at, because
   a screenshot beside a paragraph needs room that a paragraph alone does
   not; the privacy page narrows it again with `--prose`. */
.wrap {
  max-width: 64rem;
  margin: 0 auto;
  padding-inline: 1.5rem;
}

a { color: var(--accent-ink); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

/* ---- Hero -------------------------------------------------------- */

/* The wash fades out rather than stopping, so the phones at the bottom of
   the hero sit on the page rather than on a coloured panel with an edge. */
.hero {
  padding: clamp(2.5rem, 8vw, 5rem) 0 0;
  text-align: center;
  background: linear-gradient(180deg, var(--accent-wash) 0%, var(--ground) 72%);
}

/* The app icon itself, rather than a tinted silhouette of it.
   The artwork is line art with a white fill — masking it would collapse the
   interior line work into a featureless blob — and carrying its own ground
   means it needs no tinting to survive the dark theme.
   22.37% is the usual approximation of the iOS squircle; rounding in CSS
   rather than baking it in keeps the same file usable as the og:image. */
.mark {
  width: clamp(88px, 22vw, 116px);
  height: clamp(88px, 22vw, 116px);
  margin: 0 auto 1.25rem;
  background: url(/icon-512.png) center / contain no-repeat;
  border-radius: 22.37%;
}

h1 {
  font-family: var(--serif);
  font-size: clamp(2.8rem, 10vw, 4.4rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
  margin: 0;
}

.tagline {
  font-family: var(--serif);
  font-size: clamp(1.35rem, 4.4vw, 2rem);
  line-height: 1.25;
  margin: 1.1rem auto 0;
  max-width: 22ch;
  text-wrap: balance;
}

.hero-sub {
  margin: 1.1rem auto 0;
  max-width: 44ch;
  color: var(--ink-soft);
  text-wrap: pretty;
}

.status {
  display: inline-block;
  margin-top: 1.6rem;
  padding: 0.3rem 0.85rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--paper);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ---- The three phones under the hero ------------------------------ */

/* Overlapped rather than in a row, and the middle one lifted: three phones
   side by side at equal size is a product grid, and the point of this one is
   that it is a *phone*. The sides are tucked behind by a negative margin, so
   the group reads as one object. */
.stage {
  display: flex;
  justify-content: center;
  /* `flex-start`, emphatically. With `flex-end` the group is pushed to the
     bottom of the box and `overflow: hidden` then crops the *tops* — three
     phones with their screens cut off and their home rows showing. */
  align-items: flex-start;
  margin-top: clamp(2rem, 6vw, 3.5rem);
  /* Cropped at the bottom: the phones run off the page rather than ending,
     which is what stops the hero needing a full 1,300px of vertical room
     for them. The mask turns the crop into a fade, so it reads as the phones
     carrying on past the fold rather than as a line drawn across them. */
  max-height: min(46vh, 420px);
  overflow: hidden;
  padding-inline: 1rem;
  -webkit-mask-image: linear-gradient(180deg, #000 68%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 68%, transparent 100%);
}

.stage-phone { margin: 0; }

.stage-phone img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
  border-radius: 20px;
  /* A shadow *and* a border. The shots are a white-ish app photographed on a
     white-ish page, so without the edge they dissolve into it; the shadow is
     what makes the middle one read as being in front. */
  box-shadow: 0 18px 40px -22px rgba(0, 0, 0, 0.45);
  background: var(--paper);
}

.stage-phone--lead {
  width: clamp(200px, 30vw, 290px);
  position: relative;
  z-index: 1;
}

.stage-phone--side {
  width: clamp(160px, 24vw, 232px);
  /* Dropped rather than raised, now that the group hangs from its top edge:
     the middle phone stands proudest and the other two sit back from it. */
  margin-top: clamp(1rem, 3vw, 2.2rem);
  opacity: 0.92;
}

.stage-phone--side:first-child { margin-right: -3%; }
.stage-phone--side:last-child  { margin-left: -3%; }

/* Below about a tablet there is no room for three, and shrinking them to fit
   produces three pictures of an app that nobody can read. One, legible. */
@media (max-width: 40rem) {
  .stage-phone--side { display: none; }
  .stage-phone--lead { width: min(70vw, 280px); }
}

/* ---- Full-width bands --------------------------------------------- */

.band {
  margin-top: clamp(3rem, 8vw, 5rem);
  padding: clamp(2.5rem, 7vw, 4rem) 0;
  background: var(--paper);
  border-block: 1px solid var(--rule);
}

/* Two bands in a row are one run of colour: the margin between them
   showed as a strip of the page between the washes. */
.band + .band {
  margin-top: 0;
  border-top: 0;
}

.band--feature { background: var(--accent-wash); text-align: center; }
.band--pledge  { background: var(--warm-wash); }

.band-title {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin: 0.3rem 0 0;
  max-width: 24ch;
  text-wrap: balance;
}

.band-lede {
  font-size: clamp(1.05rem, 2.6vw, 1.2rem);
  margin: 0.9rem 0 0;
  max-width: 54ch;
  text-wrap: pretty;
}

/* ---- Feature rows --------------------------------------------------- */

.features {
  display: grid;
  gap: clamp(3.5rem, 10vw, 6rem);
  margin-top: clamp(3.5rem, 9vw, 6rem);
}

.feature {
  display: grid;
  grid-template-columns: 1fr minmax(200px, 268px);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: center;
}

/* The picture leads on every second row.
   The track sizes are swapped as well as the placement, which `order` alone
   could not do: the columns are "wide, narrow", so reordering on its own put
   the phone in the wide track and squeezed four paragraphs into 268px. Grid
   placement keeps the markup in reading order — text first, for anyone who
   never sees the columns at all — while the narrow track stays with the
   phone wherever it sits. */
.feature--flip { grid-template-columns: minmax(200px, 268px) 1fr; }
.feature--flip .feature-text { grid-column: 2; }
.feature--flip .feature-shot { grid-column: 1; grid-row: 1; }

.feature-text { max-width: 34rem; }

.feature-text h2 {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 4.4vw, 2.3rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin: 0.35rem 0 0.9rem;
  text-wrap: balance;
}

.feature-text p { margin: 0 0 0.9rem; text-wrap: pretty; }

/* A screenshot's <picture> only chooses the light or the dark capture. It
   takes no part in layout, so every rule written for the <img> still holds. */
picture { display: contents; }

.feature-shot { margin: 0; }

/* The medium widget on a slice of home screen, centred under the sign of the
   day's lede. Phone-sized: a widget drawn wider than a phone would read as a
   banner. */
.widget-shot {
  margin: clamp(1.5rem, 4vw, 2.2rem) auto 0;
  max-width: 28rem;
}

.widget-shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 20px;
  box-shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.4);
}

.feature-shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
  border-radius: 20px;
  box-shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.4);
  background: var(--paper);
}

/* One column, text then picture, whichever way the row runs on a wide
   window. The grid placement above has to be undone explicitly or the
   flipped rows keep trying to put the phone in a column that no longer
   exists. */
@media (max-width: 46rem) {
  .feature,
  .feature--flip { grid-template-columns: 1fr; justify-items: center; }
  .feature--flip .feature-text,
  .feature--flip .feature-shot { grid-column: 1; grid-row: auto; }
  .feature-shot { width: min(72vw, 280px); }
}

/* ---- The Mac ---------------------------------------------------------- */

/* A window wants more width than a phone, so the shot breaks out of `.wrap`
   to a wider measure of its own. The PNG carries macOS's own window shadow
   on a transparent ground, so it gets no border or CSS shadow — a second
   edge around a window that already has one reads as a picture frame. */
.mac, .ipad, .platform { margin-top: clamp(3.5rem, 9vw, 6rem); }

.mac .band-lede, .ipad .band-lede { text-align: center; }

/* Dark mode, for a reader in light mode only: a dark band so the dark
   captures sit on what they were made for. Its own colours rather than the
   theme's, since the theme here is light. */
.dark-mode {
  margin-top: clamp(3.5rem, 9vw, 6rem);
  padding: clamp(2.5rem, 7vw, 4rem) 0;
  background: #11171a;
  color: #eceae6;
}

.dark-mode .eyebrow { color: #8ed0de; }
.dark-mode .band-lede { text-align: center; }

.dark-shots {
  display: grid;
  grid-template-columns: 1fr 1fr 3.4fr;
  gap: clamp(1rem, 3vw, 2rem);
  align-items: center;
  max-width: 76rem;
  margin: clamp(1.5rem, 4vw, 2.5rem) auto 0;
  padding-inline: 1rem;
}

.dark-shots figure { margin: 0; }

.dark-shots img {
  display: block;
  width: 100%;
  height: auto;
}

.dark-phone img {
  border: 1px solid #2c343a;
  border-radius: 20px;
}

/* Phones side by side, the Mac under them. */
@media (max-width: 760px) {
  .dark-shots { grid-template-columns: 1fr 1fr; }
  .dark-mac { grid-column: 1 / -1; }
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .dark-mode { display: none; }
}

.mac-shot {
  margin: clamp(1.5rem, 4vw, 2.5rem) auto 0;
  max-width: 76rem;
  padding-inline: 1rem;
}

.mac-shot img {
  display: block;
  width: 100%;
  height: auto;
}

/* The iPad's screen, which — unlike the Mac's window, captured with its own
   shadow — comes off the simulator as a bare rectangle. Rounded and lifted
   so it reads as a device's screen rather than a picture of a web page. */
.ipad-shot {
  margin: clamp(1.5rem, 4vw, 2.5rem) auto 0;
  max-width: 62rem;
  padding-inline: 1rem;
}

.ipad-shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
  border-radius: clamp(12px, 2.4vw, 28px);
  box-shadow: 0 18px 50px -20px rgb(0 0 0 / 0.35);
}

/* Four points, so two by two rather than three and an orphan. */
.mac .notes, .ipad .notes {
  margin-top: clamp(1.5rem, 4vw, 2.5rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  column-gap: 2.5rem;
}

/* ---- Small parts ---------------------------------------------------- */

.eyebrow {
  margin: 0;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-ink);
}

.eyebrow--centred { text-align: center; }

.section-title {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin: 0.3rem auto 0;
  max-width: 20ch;
  text-align: center;
  text-wrap: balance;
}

/* A tick that is a shape rather than a bullet the browser chose. Drawn with
   a character rather than an image so it inherits the ink colour and scales
   with the text; `aria-hidden` is not available on a pseudo-element, but
   decorative CSS content is already ignored by the screen readers that
   matter here. */
.ticks {
  list-style: none;
  margin: 1.2rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.ticks li {
  position: relative;
  padding-left: 1.7rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.ticks li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: -0.05em;
  font-weight: 700;
  color: var(--accent);
}

/* ---- The shared result ---------------------------------------------- */

/* Set the way it actually arrives in a message: a monospaced block, three
   short lines, no styling pretending to be a screenshot of one. */
.share-card {
  margin: 1.1rem 0 0.6rem;
  padding: 1rem 1.2rem;
  background: var(--ground);
  border: 1px solid var(--rule);
  border-radius: 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--ink-soft);
}

.share-hands {
  font-family: var(--sans);
  font-size: 1.5rem;
  letter-spacing: 0.08em;
  line-height: 1.4;
}

.share-note {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
  text-wrap: pretty;
}

/* ---- Notes inside a band -------------------------------------------- */

.notes {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.6rem;
}

.notes li { display: grid; gap: 0.3rem; align-content: start; }

.notes b {
  font-family: var(--serif);
  font-size: 1.12rem;
  font-weight: 600;
}

.notes span { color: var(--ink-soft); font-size: 0.95rem; text-wrap: pretty; }

/* ---- The tile grid --------------------------------------------------- */

.grid {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1rem;
}

.tile {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 1.3rem 1.4rem;
}

.tile h3 {
  font-family: var(--serif);
  font-size: 1.12rem;
  font-weight: 600;
  margin: 0 0 0.35rem;
}

.tile p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; text-wrap: pretty; }

.band--pledge { text-align: center; }
.band--pledge .band-title,
.band--pledge .band-lede { margin-inline: auto; }

.pledge-why {
  margin: 1.1rem auto 0;
  max-width: 58ch;
  color: var(--ink-soft);
  text-wrap: pretty;
}

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

.card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 1.6rem clamp(1.1rem, 4vw, 1.9rem);
  margin-top: 2.5rem;
}

/* Inside a card an h2 is a label for what follows, not a headline. The
   privacy page overrides this below, where they are real headings. */
.card h2 {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 1.1rem;
}

.card p { margin: 0 0 0.9rem; }
.card p:last-child { margin-bottom: 0; }

.points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.15rem;
}

.points li { display: grid; gap: 0.2rem; }

.points b {
  font-family: var(--serif);
  font-size: 1.08rem;
  font-weight: 600;
}

.points span { color: var(--ink-soft); font-size: 0.95rem; }

/* ---- Attribution ----------------------------------------------------- */

.credit { margin-top: clamp(3rem, 8vw, 5rem); }
.credit p { margin: 0 0 0.9rem; font-size: 0.95rem; color: var(--ink-soft); }
.credit p:last-child { margin-bottom: 0; }
.credit .work { color: var(--ink); font-family: var(--serif); font-size: 1.05rem; }

/* The independence notice. Quiet by size and colour rather than boxed: it is
   a standing fact about the project, not a warning, and a banner would read
   as one. It sits with the attribution because that is what it is about. */
.note {
  max-width: 34rem;
  margin: 1.5rem auto 0;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--ink-soft);
  text-wrap: pretty;
}

footer {
  margin-top: 2.5rem;
  padding-bottom: 3.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

footer p { margin: 0.4rem 0; }

/* ---- Today's challenge -------------------------------------------------- */

/* The call to action on the home page, and the page it opens. Both live here
   rather than inline in the Worker: the challenge page is meant to look like
   part of this site, and a second copy of the palette is how it would stop. */

.band--today { background: var(--accent-wash); text-align: center; }

/* ── Today's sign and today's challenge ────────────────────────────────────
   Siblings: the two things that are different today, as two cards of one
   shape — a label, the thing itself, a way on at the foot. Side by side on a
   desk, the sign first; stacked on a phone, where two stacked bands of accent
   wash would have pushed the features below the fold. The sign card is put
   here by `src/home.js` and is absent whenever the day is undecided, so the
   challenge card must stand on its own too: it centres at a single card's
   width rather than taking the whole row. */
.today {
  display: grid;
  gap: clamp(1rem, 3vw, 1.5rem);
  justify-content: center;
  grid-template-columns: minmax(0, 34rem);
}

@media (min-width: 52rem) {
  .today:has(.today-sign) { grid-template-columns: repeat(2, minmax(0, 28rem)); }
}

.today-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(1.5rem, 4vw, 2.2rem) clamp(1.2rem, 3vw, 2rem);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 20px;
  box-shadow: 0 18px 40px -28px rgba(0, 0, 0, 0.35);
}

/* The way on sits at the foot of both, so side by side the two buttons line
   up whatever is above them. */
.today-card .cta { margin-top: auto; padding-top: 1.6rem; }

.today-card .band-title {
  margin-top: 1rem;
  font-size: clamp(1.6rem, 5vw, 2.1rem);
  line-height: 1.15;
}

/* Narrower than the challenge's clip on purpose. That one is a sentence and
   wants reading; this is one sign, and at the top of the page it has to leave
   room for the challenge underneath it. 4:3 declared so the page does not jump
   when the video arrives — these are all 480×360. */
.today-clip {
  margin: 1.2rem auto 0;
  width: 100%;
  max-width: 15rem;
}

.today-clip video {
  display: block;
  width: 100%;
  /* `auto` is what lets `aspect-ratio` work. The element's height="360"
     attribute is a real CSS height, and with width and height both fixed
     the ratio is ignored — a 240-wide clip in a 360-tall portrait box. */
  height: auto;
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  border: 1px solid var(--rule);
  background: var(--ink);
}

/* Serif, because a headword is the dictionary's content and not ours — the
   same split the app makes between a gloss and the caption under it. */
.today-gloss {
  margin: 1rem 0 0;
  font-family: var(--serif);
  font-size: clamp(1.6rem, 5vw, 2.1rem);
  /* The weight of the challenge card's title, which sits level with it. */
  font-weight: 600;
  line-height: 1.15;
  text-wrap: balance;
}

/* Sans, because this sentence is ours. Written by a model from the morning's
   headlines, so it is a sentence and not a label — `text-wrap: pretty` rather
   than `balance`. */
.today-caption {
  margin: 0.5rem auto 0;
  max-width: 26rem;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 1.05rem;
  text-wrap: pretty;
}

.band-title--centred,
.band-lede--centred { margin-inline: auto; }

.cta { margin: 1.6rem 0 0; }
.cta--centred { text-align: center; }

/* What the beta is, under the hero's button. */
.beta-note {
  margin: 0.7rem auto 0;
  max-width: 40ch;
  font-size: 0.9rem;
  color: var(--ink-soft);
  text-wrap: pretty;
}

/* What you are about to download, under the Mac section's button. */
.download-note {
  margin: 0.7rem 0 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

/* The one button-shaped thing on the site. It is a link on the home page and a
   submit on the challenge page, so it is styled by class rather than by
   element — and `button` needs the font and the colour saying explicitly,
   which an anchor inherits. */
.go {
  display: inline-block;
  padding: 0.7rem 1.6rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--accent);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  cursor: pointer;
}

.go:hover { background: var(--accent-ink); }

/* The second choice beside a `.go`: the same shape, outlined, so the main
   action stays the one that stands out. Used for the challenge's hint. */
.go.go--quiet {
  background: transparent;
  border-color: var(--accent);
  color: var(--accent-ink);
  font-weight: 500;
}
.go.go--quiet:hover { background: var(--accent-wash); }

/* `--paper` is the dark theme's near-black, which on the accent would be
   unreadable. The button keeps a light label in both themes because the
   accent stays a mid tone in both. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .go { color: #11171a; }
  :root:not([data-theme="light"]) .go.go--quiet { color: var(--accent-ink); }
}

.wrap--challenge {
  max-width: 40rem;
  padding-block: clamp(2rem, 6vw, 3.5rem) 0;
}

.wrap--challenge .eyebrow { margin-bottom: 0.4rem; }
.wrap--challenge .lede { color: var(--ink-soft); font-family: var(--sans); font-size: 1rem; }

/* The 4:3 slot the app reserves for a clip, so the page does not jump when the
   video arrives. `aspect-ratio` on the element rather than a padding box:
   these are all 480×360 and the shape is known in advance. */
.challenge-video { margin: 2rem 0 0; }

.challenge-video video {
  display: block;
  width: 100%;
  /* `auto` is what lets `aspect-ratio` work. The element's height="360"
     attribute is a real CSS height, and with width and height both fixed
     the ratio is ignored — a 240-wide clip in a 360-tall portrait box. */
  height: auto;
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  border: 1px solid var(--rule);
  background: var(--ink);
}

.challenge-video figcaption {
  margin-top: 0.6rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
  text-wrap: pretty;
}

.challenge-form { margin-top: 2rem; display: grid; gap: 0.7rem; justify-items: start; }

.field-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.challenge-form textarea {
  width: 100%;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.5;
  resize: vertical;
}

/* The hint, once asked for. Sans like the rest of the page's own words: it
   is ours, not the dictionary's. */
.hint-card {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px dashed var(--accent);
  border-radius: 12px;
  background: var(--accent-wash);
}
.hint-card h2 {
  margin: 0 0 0.25rem;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.hint-card p { margin: 0; font-family: var(--sans); }
#steps > .hint-card { margin-top: 1.8rem; }

.field-note { margin: 0; font-size: 0.85rem; color: var(--ink-soft); text-wrap: pretty; }

/* What you wrote, then what it said. The dictionary's half is serif because it
   is the dictionary's — the same rule the app's detail page follows. */
.compare { margin-top: 1.8rem; }

.compare h2 {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 0.5rem;
}

.wrote {
  margin: 0;
  padding: 0.9rem 1.1rem;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 12px;
  text-wrap: pretty;
}

.answer {
  margin: 0;
  padding: 0.9rem 1.1rem;
  background: var(--accent-wash);
  border: 1px solid var(--rule);
  border-radius: 12px;
  font-family: var(--serif);
  font-size: 1.15rem;
  text-wrap: pretty;
}

/* ---- Marking your own --------------------------------------------------- */

/* `.marking`, not `.mark` — that one is the app icon in the masthead, a
   116px square with a background image, and a form that inherited it came out
   as a teal rounded rectangle with the icon showing through the buttons. */
.marking { margin-top: 2.2rem; }

.marking h2 {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 0.8rem;
}

.hands { display: grid; gap: 0.5rem; }

/* Five rows rather than five columns. The app can put five hands across a
   phone because each one is a single glyph; here every rung carries a label
   saying what it means, and five of those side by side is five columns of
   two-word stacks nobody reads. */
.hands button {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.2rem 0.9rem;
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  text-align: left;
  cursor: pointer;
}

.hands button:hover { border-color: var(--accent); background: var(--accent-wash); }

.hand-row { font-size: 1.15rem; letter-spacing: 0.06em; line-height: 1.5; }
.hand-row--large { font-size: 2rem; letter-spacing: 0.08em; margin: 0 0 1.2rem; }
.hand-label { color: var(--ink-soft); font-size: 0.95rem; }

.result { margin-top: 2.4rem; }

.result h2 {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 0.7rem;
}

/* Added by `challenge.js` and absent without it, which is why the result
   reads properly either way: the three lines above are the share, and this is
   a shortcut to them rather than the only route. */
.share-actions {
  margin: 1.1rem 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.9rem;
}

.share-said { font-size: 0.9rem; color: var(--ink-soft); }

.go[disabled] { opacity: 0.45; cursor: default; }
.go[disabled]:hover { background: var(--accent); }

.again { margin: 1.4rem 0 0; }

/* Announced but not drawn: the hand rows carry the score for anyone looking at
   them, and this is the same number for anyone who is not. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---- Inside pages ----------------------------------------------------- */

.wrap--prose {
  max-width: 36rem;
  padding-block: clamp(2.5rem, 8vw, 5.5rem) 0;
}

.back { margin: 0 0 2rem; font-size: 0.9rem; }

.page-title {
  font-family: var(--serif);
  font-size: clamp(2rem, 7vw, 2.6rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.1;
  margin: 0;
}

.lede {
  font-family: var(--serif);
  font-size: 1.1rem;
  margin: 0.75rem 0 0;
  text-wrap: pretty;
}

/* Inside pages use h2 as a real heading rather than the home page's small
   card label. More specific than `.card h2`, which is what makes it win. */
.wrap--prose .card h2 {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: normal;
  text-transform: none;
  color: var(--ink);
  margin: 0 0 0.7rem;
}

.wrap--prose .card p { margin: 0 0 0.8rem; }
.wrap--prose .card p:last-child { margin-bottom: 0; }

.updated { font-size: 0.85rem; color: var(--ink-soft); }
