/* Even — shared styles.
 *
 * The design language is the app's: a night ground, one warm accent, cool
 * everything else, and prose that turns serif when Even is speaking to the
 * reader. The page's own signature is the five mood marks, which are the
 * app's geometry rather than an impression of it (tools/make-glyphs.py).
 *
 * Every colour below is Theme.swift's `corridor` token set converted to sRGB
 * hex, so the site and the app cannot drift apart. Two rules come with them:
 *
 *   1. `--dawn` is the warm accent and appears once per section. Twice on one
 *      screen and one of them is wrong. Everything else cool.
 *   2. Figures are monospaced and thin. Every number on this site is a
 *      measurement, and a measurement reads as an instrument, not a score in
 *      a game.
 */

:root {
  --night:      #0A0D14;  /* Palette.night, the page */
  --night-sunk: #060810;  /* Palette.nightSunk, the plot well */
  --raised:     #161C28;  /* Palette.nightRaise, cards */
  --hairline:   #262E3D;  /* Palette.hairline */

  --moon:       #A9C2E8;  /* Palette.moon, the data, and the cool accent */
  --moon-dim:   #4A5A78;  /* Palette.moonDim */
  --dawn:       #E8865C;  /* Palette.dawn, the warm accent. Once per section */

  --bright:     #EEF2F8;  /* Palette.bright */
  --graphite:   #8B93A5;  /* Palette.graphite */
  --faint:      #5A6172;  /* Palette.faint */

  /* The five state hues, in the order the Even scale runs: worst left,
     best right, the same order the score and the check-in dial read. */
  --rose:       #E2A1A6;  /* spent */
  --butter:     #EBD27E;  /* stretched */
  --steady:     #A9C2E8;  /* steady */
  --mint:       #8FC9C6;  /* light */
  --sage:       #A8BE8C;  /* bright */
  --lilac:      #B7A9E0;  /* still learning, and never a state */

  --text:      rgba(238, 242, 248, 0.92);
  --text-dim:  rgba(238, 242, 248, 0.64);
  --text-fade: rgba(238, 242, 248, 0.42);

  --glass-fill:   rgba(169, 194, 232, 0.045);
  --glass-border: rgba(169, 194, 232, 0.12);

  /* Type.narration is `design: .serif`. When the type turns serif, Even is
     reading you: the morning line, the person's own name. Same here. */
  --serif: ui-serif, "New York", Georgia, "Times New Roman", serif;
  --sans:  -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui,
           "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --maxw: 1080px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--sans);
  color: var(--text);
  background: var(--night);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* ---- The ground: soft light, slowly moving ----
 *
 * The first version of this drew the app's actigraphy raster, a stack of
 * 24-hour bars, one row per day. It is the right idea for the *app*, where a
 * scattered plot is an argument about your own sleep. Behind a marketing page
 * it is a wall of grey bars: clinical where the product is warm, and heavy
 * where the promise is that things get lighter (Van, 3 September 2026).
 *
 * What is here instead is the marks' own palette, blown up and blurred: four
 * broad fields of colour drifting across the night ground at a pace nobody
 * watches. Same hues as the five states, so the page and the mascots are one
 * thing, and nothing on it has an edge.
 */
.ground {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: linear-gradient(180deg, var(--night-sunk) 0%, var(--night) 38%, #0D1119 100%);
}
.glow {
  position: fixed;
  inset: -20%;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  /* Strongest at the top of the page and fading out down it, so the light
     reads as coming from somewhere rather than being applied evenly. */
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,0.72) 58%, rgba(0,0,0,0.42) 100%);
  mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,0.72) 58%, rgba(0,0,0,0.42) 100%);
}
.glow span {
  position: absolute;
  display: block;
  border-radius: 50%;
  /* No `filter: blur()`. A radial gradient with a long falloff is already
     soft, and four blurred full-viewport layers is real GPU work on a phone
     for a difference nobody can see. */
  will-change: transform;
}
/* Dawn, high and to one side: the app's one warm accent, and the only warm
   thing on the page. */
.glow .g1 {
  width: 62vw; height: 52vw; top: -16vw; right: -8vw;
  background: radial-gradient(circle, rgba(232, 134, 92, 0.30), rgba(232, 134, 92, 0.08) 42%, transparent 72%);
  animation: drift1 64s ease-in-out infinite alternate;
}
/* Sage and mint, the two states above the middle, low and on the left. */
.glow .g2 {
  width: 58vw; height: 48vw; top: 24vw; left: -18vw;
  background: radial-gradient(circle, rgba(168, 190, 140, 0.24), rgba(168, 190, 140, 0.06) 42%, transparent 72%);
  animation: drift2 78s ease-in-out infinite alternate;
}
.glow .g3 {
  width: 50vw; height: 44vw; top: 62vw; right: -6vw;
  background: radial-gradient(circle, rgba(143, 201, 198, 0.22), rgba(143, 201, 198, 0.06) 42%, transparent 72%);
  animation: drift3 92s ease-in-out infinite alternate;
}
/* Moon blue, the middle of the ladder, holding the centre. */
.glow .g4 {
  width: 66vw; height: 40vw; top: 4vw; left: 8vw;
  background: radial-gradient(circle, rgba(169, 194, 232, 0.16), rgba(169, 194, 232, 0.04) 44%, transparent 74%);
  animation: drift4 86s ease-in-out infinite alternate;
}
@keyframes drift1 { to { transform: translate3d(-7vw, 5vw, 0) scale(1.12); } }
@keyframes drift2 { to { transform: translate3d(9vw, -6vw, 0) scale(1.09); } }
@keyframes drift3 { to { transform: translate3d(-6vw, -8vw, 0) scale(1.14); } }
@keyframes drift4 { to { transform: translate3d(5vw, 7vw, 0) scale(1.07); } }

/* ---- Typography helpers ---- */
.eyebrow {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-fade);
  font-variant-numeric: tabular-nums;
}
.dawn  { color: var(--dawn); }
.cool  { color: var(--moon); }

a { color: var(--moon); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Every figure on this site is a measurement. */
.fig {
  font-variant-numeric: tabular-nums;
  font-weight: 200;
  letter-spacing: -0.01em;
}

/* ---- Layout ---- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
section { padding: 92px 0; }

/* ---- Nav ---- */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(10, 13, 20, 0.68);
  border-bottom: 1px solid rgba(169, 194, 232, 0.07);
}
.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.nav .brand {
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: 0.4em;
  color: var(--bright);
  padding-left: 0.4em;
}
a.brand:hover { text-decoration: none; }
.nav .links { display: flex; gap: 24px; }
.nav .links a {
  color: var(--text-dim);
  font-size: 0.86rem;
}
.nav .links a:hover { color: var(--bright); text-decoration: none; }
@media (max-width: 700px) {
  .nav .links { gap: 16px; }
  .nav .links a.hide-sm { display: none; }
}

/* ---- Hero ---- */
.hero { text-align: center; padding: 100px 0 44px; position: relative; }
.hero .eyebrow { margin-bottom: 24px; }
/* The app's masthead is SF Pro tracked wide, so the wordmark is sans here
   too. The serif is the narration voice and belongs to prose. */
.wordmark {
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(3.2rem, 12vw, 6.4rem);
  letter-spacing: 0.36em;
  padding-left: 0.36em;
  line-height: 1;
  background: linear-gradient(172deg, var(--bright) 34%, var(--moon));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
/* The headline, not a subtitle. The wordmark above it is the brand; this is
   the sentence a stranger decides on, so it carries the weight the sibling
   sites give their lede and then some. */
.hero .lede {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3.4vw, 2.3rem);
  font-weight: 500;
  color: var(--bright);
  margin: 26px auto 0;
  max-width: 21ch;
  line-height: 1.24;
  letter-spacing: -0.01em;
}
.hero .tagline {
  margin: 20px auto 0;
  max-width: 44ch;
  color: var(--text-dim);
  font-size: 1.02rem;
}

/* ---- Buttons ---- */
.cta-row {
  margin-top: 40px;
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}
.cta-note { margin-top: 18px; font-size: 0.82rem; color: var(--text-fade); }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: 999px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.btn-primary {
  background: var(--dawn);
  color: #1B0F09;
  box-shadow: 0 0 30px rgba(232, 134, 92, 0.18);
}
.btn-primary:hover {
  transform: translateY(-2px);
  text-decoration: none;
  box-shadow: 0 6px 34px rgba(232, 134, 92, 0.3);
}
.btn-ghost {
  border: 1px solid var(--glass-border);
  color: var(--text);
  background: var(--glass-fill);
}
.btn-ghost:hover { text-decoration: none; border-color: rgba(169, 194, 232, 0.28); }

/* ---- Hero device strip ---- */
.shots {
  margin-top: 70px;
  display: flex;
  gap: 22px;
  justify-content: center;
  align-items: flex-end;
  flex-wrap: wrap;
}
/* <picture> is transparent to layout, so the <img> stays the flex item and
   .raise and flex-end alignment keep working. */
.shots picture { display: contents; }
.shot {
  width: 210px;
  height: auto;
  border-radius: 30px;
  border: 1px solid rgba(169, 194, 232, 0.10);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.68);
  display: block;
  background: var(--night-sunk);
}
.shot.raise { margin-bottom: 34px; }
@media (max-width: 720px) {
  .shot { width: 150px; }
  .shot.raise { margin-bottom: 20px; }
}

/* ---- Glass card ---- */
.glass {
  background: var(--glass-fill);
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* ---- Section heads ---- */
.section-head { text-align: center; margin-bottom: 54px; }
.section-head h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.8rem, 4vw, 2.55rem);
  color: var(--bright);
  margin-top: 14px;
  line-height: 1.26;
}
.section-head p { color: var(--text-dim); max-width: 54ch; margin: 18px auto 0; }

/* ---- The claim: prose beside one tall screenshot ---- */
.claim { display: grid; grid-template-columns: 1fr 300px; gap: 56px; align-items: center; }
.claim.reverse { grid-template-columns: 300px 1fr; }
.claim h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.7rem, 3.8vw, 2.35rem);
  color: var(--bright);
  margin-top: 14px;
  line-height: 1.3;
}
.claim p { color: var(--text-dim); margin-top: 18px; max-width: 48ch; }
.claim .after { margin-top: 26px; }
.shot-lg {
  width: 100%;
  height: auto;
  border-radius: 32px;
  border: 1px solid rgba(169, 194, 232, 0.10);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.7);
  display: block;
}
@media (max-width: 820px) {
  .claim, .claim.reverse {
    grid-template-columns: 1fr;
    gap: 40px;
    justify-items: center;
    text-align: center;
  }
  .claim p { margin-left: auto; margin-right: auto; }
  .claim figure { max-width: 260px; }
}

/* ---- The loop: five stages, numbered ---- */
.loop { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
@media (max-width: 900px) { .loop { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .loop { grid-template-columns: 1fr; } }
.stage { padding: 24px 22px 26px; position: relative; }
.stage .n {
  font-family: var(--sans);
  font-variant-numeric: tabular-nums;
  font-weight: 200;
  font-size: 2.1rem;
  color: var(--moon-dim);
  line-height: 1;
}
.stage h3 {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--moon);
  margin: 16px 0 10px;
}
.stage p { color: var(--text-dim); font-size: 0.92rem; }

/* ---- The five component strains ---- */
.strains { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
@media (max-width: 900px) { .strains { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .strains { grid-template-columns: 1fr; } }
.strain {
  padding: 22px 20px 24px;
  border-radius: 18px;
  background: rgba(169, 194, 232, 0.035);
  border: 1px solid rgba(169, 194, 232, 0.09);
}
/* The dot is the part's colour, so it belongs on the same line as the part's
   name, not floating on its own line above it.
 *
 * Plain `inline-block` rather than a flex row. The flex version worked; it
 * was replaced because it did not need to be flex. In
 * `<h3><span class="dot"></span>Sleep</h3>` the heading's own text is an
 * *anonymous* flex item, and `gap` between a real item and an anonymous one
 * is a thinner part of the spec than an inline-block and a right margin,
 * which every engine has agreed on for twenty years. Its worst failure mode
 * is a missing margin rather than an overlap.
 *
 * For the record, because the wrong lesson is easy to draw here: a report
 * that this overlapped on the live site turned out to be a stale stylesheet
 * in one browser profile, not a rendering bug. The real fault it uncovered
 * was in `_headers`, and it is fixed there. */
.strain h3 { font-size: 1.02rem; font-weight: 600; color: var(--bright); }
.strain .dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 9px;
  /* Against the middle of the lowercase, which reads level with the caps at
     this size. `middle` rather than a baseline nudge, so it holds if the
     heading's size ever changes. */
  vertical-align: middle;
}
.strain p { color: var(--text-dim); font-size: 0.9rem; margin-top: 8px; }
.strain .src {
  display: block;
  margin-top: 12px;
  font-size: 0.72rem;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

/* ---- The sessions bento ----
 *
 * One tall card for the library, which is the thing itself, and four smaller
 * ones beside it for the sessions worth showing individually. Three equal
 * cards could not carry five sessions without either dropping three of them
 * or shrinking the library to the same weight as a single session, and the
 * library is not one of five: it is the shelf the other four sit on.
 *
 * The small cards run image beside text rather than above it, which is what
 * keeps two rows of them the same height as one tall card without either
 * cropping a phone or leaving a hole under it.
 */
/* The screenshots carry this section, so the cards are mostly picture: a
   role, a heading, and on the library one line. The paragraphs that were
   here first said in prose what each phone already showed.
 *
 * Every image fills its card. A phone sitting at its natural size inside a
 * wider card leaves a ragged column of dead space beside it, and then the
 * caption underneath has to decide whether to line up with the phone or with
 * the card. Filling the card removes the question: image and caption share
 * one left edge and one right edge.
 *
 * The 2:1:1 ratio is not arbitrary. A card's height is its width times the
 * screenshot's 2.174 aspect, plus its caption and padding; setting the
 * feature's height equal to two minis plus the gap, under a fixed total
 * width, lands on almost exactly two to one. */
.bento {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 18px;
}
.bento .card {
  padding: 24px 24px 26px;
  display: flex;
  flex-direction: column;
}
/* The library: two rows tall, phone above the words. */
/* Two rows tall. `margin-top: auto` on the caption keeps it at the foot of
   the card, so the library's caption and the second row's captions sit on
   roughly one line however the rounding falls. */
.bento .feature { grid-row: span 2; }
.bento .feature > div { margin-top: auto; }
.bento .feature img {
  width: 100%;
  height: auto;
  margin: 0 0 22px;
  border-radius: 20px;
  border: 1px solid rgba(169, 194, 232, 0.09);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.55);
}
/* The four: the same card, one size down. */
.bento .mini img {
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: 18px;
  border-radius: 15px;
  border: 1px solid rgba(169, 194, 232, 0.09);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}
.bento .role {
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--moon);
  margin-bottom: 8px;
}
.bento h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.24rem;
  color: var(--bright);
  line-height: 1.28;
}
.bento .mini h3 { font-size: 1.04rem; }
.bento p { color: var(--text-dim); font-size: 0.93rem; margin-top: 10px; text-align: left; }
/* The caption sits at the foot of a mini, so four of them line up across the
   two rows however tall each phone renders. */
.bento .mini > div { margin-top: auto; }

@media (max-width: 940px) {
  /* Two across, the library still double height beside the first pair. */
  .bento { grid-template-columns: 1.35fr 1fr; }
}
@media (max-width: 700px) {
  .bento { grid-template-columns: 1fr; max-width: 440px; margin: 0 auto; }
  .bento .feature { grid-row: auto; }
  .bento .mini img { width: 100%; }
}

/* ---- Band ---- */
.band { text-align: center; padding: 44px 32px; }
.band .eyebrow { margin-bottom: 18px; }
.band h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.55rem, 3.6vw, 2.15rem);
  color: var(--bright);
  line-height: 1.35;
  max-width: 24ch;
  margin: 0 auto;
}
.band p { color: var(--text-dim); margin: 18px auto 0; max-width: 56ch; }

/* ---- The institutions plate ---- */
.plate { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px 32px; margin-top: 38px; text-align: left; }
@media (max-width: 760px) { .plate { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .plate { grid-template-columns: 1fr; } }
/* `margin: 0` is load-bearing. These are <p> elements inside .band, so they
   inherit `.band p { margin: 18px auto 0 }`, and an auto inline margin on a
   grid item both centres it in its track and stops it stretching to fill one.
   The long names in the first row nearly filled their columns and looked
   left-aligned; the short ones in the second row did not, so the two rows
   appeared to start at different places. They were all centred. */
.plate .name {
  margin: 0;
  max-width: none;
  font-family: var(--serif);
  font-size: 1.06rem;
  color: var(--bright);
  line-height: 1.3;
}
.plate .use { display: block; font-size: 0.84rem; color: var(--text-fade); margin-top: 5px; }

/* ---- What leaves the phone: two columns ---- */
.ledger { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 34px; text-align: left; }
@media (max-width: 700px) { .ledger { grid-template-columns: 1fr; } }
.ledger div { padding: 24px 24px 26px; border-radius: 18px; border: 1px solid rgba(169, 194, 232, 0.09); }
.ledger .goes { background: rgba(169, 194, 232, 0.035); }
.ledger .stays { background: rgba(143, 201, 198, 0.045); border-color: rgba(143, 201, 198, 0.14); }
.ledger h3 { font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; margin-bottom: 14px; }
.ledger .goes h3 { color: var(--moon); }
.ledger .stays h3 { color: var(--mint); }
.ledger ul { list-style: none; }
.ledger li { color: var(--text-dim); font-size: 0.92rem; padding: 6px 0 6px 20px; position: relative; }
.ledger li::before { content: "\2022"; position: absolute; left: 4px; color: var(--faint); }

/* ---- Footer ---- */
footer {
  border-top: 1px solid rgba(169, 194, 232, 0.07);
  padding: 54px 0 70px;
  margin-top: 40px;
}
footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  flex-wrap: wrap;
}
footer .brand { font-weight: 700; letter-spacing: 0.36em; color: var(--bright); font-size: 1rem; }
footer .fnote { color: var(--text-fade); font-size: 0.82rem; margin-top: 12px; max-width: 38ch; }
footer nav { display: flex; flex-direction: column; gap: 10px; }
footer nav a { color: var(--text-dim); font-size: 0.9rem; }
footer nav a:hover { color: var(--bright); text-decoration: none; }
footer .cols { display: flex; gap: 60px; flex-wrap: wrap; }

/* ---- Document pages: legal, support, the topic pages ---- */
.doc { max-width: 760px; margin: 0 auto; padding: 68px 24px 100px; }
.doc.wide { max-width: 900px; }
.doc .eyebrow { margin-bottom: 16px; }
.doc h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2rem, 6vw, 2.9rem);
  color: var(--bright);
  line-height: 1.18;
  margin-bottom: 10px;
}
.doc .updated { color: var(--text-fade); font-size: 0.85rem; margin-bottom: 38px; }
.doc h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.42rem;
  color: var(--bright);
  margin: 44px 0 12px;
  line-height: 1.3;
}
.doc h3 { font-size: 1.02rem; font-weight: 600; color: var(--text); margin: 26px 0 8px; }
.doc p, .doc li { color: var(--text-dim); margin-bottom: 14px; }
.doc ul, .doc ol { padding-left: 22px; margin-bottom: 18px; }
.doc li { margin-bottom: 8px; }
.doc strong { color: var(--text); font-weight: 600; }
.doc .back { display: inline-block; margin-bottom: 36px; font-size: 0.88rem; color: var(--text-dim); }
.doc .lead {
  font-family: var(--serif);
  font-size: 1.14rem;
  line-height: 1.6;
  color: var(--text);
  padding: 24px 26px;
  border-radius: 18px;
  margin-bottom: 34px;
}
.doc figure { margin: 34px 0; }
.doc figure img { border-radius: 26px; }
.doc figcaption { color: var(--text-fade); font-size: 0.82rem; margin-top: 12px; text-align: center; }
.doc .center, .doc.center { text-align: center; }
.doc.center h1, .doc.center h2 { text-align: center; }

/* A pull figure inside a document: one measurement, set large. */
.pull { text-align: center; margin: 40px 0; }
.pull .n {
  font-family: var(--sans);
  font-variant-numeric: tabular-nums;
  font-weight: 200;
  font-size: clamp(3.4rem, 12vw, 5.4rem);
  line-height: 1;
  color: var(--bright);
}
.pull .n small { font-size: 0.3em; color: var(--text-fade); font-weight: 400; margin-left: 0.3em; }
.pull .cap { color: var(--text-dim); font-size: 0.95rem; margin-top: 14px; max-width: 40ch; margin-inline: auto; }

/* ---- Sources table ---- */
.sources { margin-top: 30px; }
.source {
  padding: 20px 22px;
  border-radius: 16px;
  border: 1px solid rgba(169, 194, 232, 0.09);
  background: rgba(169, 194, 232, 0.03);
  margin-bottom: 12px;
}
.source .use { font-family: var(--serif); font-size: 1.06rem; color: var(--bright); }
.source .who { display: block; color: var(--text-dim); font-size: 0.9rem; margin-top: 6px; }
.source .doi {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.78rem;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
  word-break: break-all;
}
.source .doi a { color: var(--moon-dim); }
.source .doi a:hover { color: var(--moon); }

/* ---- FAQ ---- */
.faq { margin-top: 8px; }
.faq details {
  border-bottom: 1px solid rgba(169, 194, 232, 0.09);
  padding: 4px 0;
}
.faq summary {
  cursor: pointer;
  padding: 18px 30px 18px 0;
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--bright);
  list-style: none;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 16px;
  color: var(--faint);
  font-family: var(--sans);
  font-size: 1.2rem;
  font-weight: 300;
}
.faq details[open] summary::after { content: "\2212"; }
.faq details > *:not(summary) { color: var(--text-dim); margin-bottom: 16px; }
.faq details p:last-child { padding-bottom: 6px; }

/* ---- Next-page rail at the foot of a document ---- */
.rail { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 56px; }
@media (max-width: 620px) { .rail { grid-template-columns: 1fr; } }
.rail a {
  display: block;
  padding: 20px 22px;
  border-radius: 18px;
  border: 1px solid rgba(169, 194, 232, 0.10);
  background: rgba(169, 194, 232, 0.03);
  color: var(--bright);
  font-family: var(--serif);
  font-size: 1.06rem;
}
.rail a:hover { text-decoration: none; border-color: rgba(169, 194, 232, 0.26); }
.rail a span {
  display: block;
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 8px;
}

/* ---- The medical note. Quiet, present on every page that needs it. ---- */
.disclaimer {
  margin-top: 40px;
  padding: 18px 22px;
  border-radius: 14px;
  border: 1px solid rgba(169, 194, 232, 0.08);
  color: var(--text-fade);
  font-size: 0.84rem;
  line-height: 1.6;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  /* The light stays, it just stops moving. Removing it would leave a
     different page rather than a calmer one. */
  .glow span { animation: none; }
}

/* ---- The mood marks: the five states, and the check-in dial they sit on ----
 *
 * Generated by tools/make-glyphs.py from the app's own geometry, so the marks
 * on this page are the marks in the app and not a redrawing of them. Each SVG
 * carries its own halo in a frame twice the body's width, which is why the
 * boxes below look generous: a 150px image is a 75px mark with room to glow.
 */
.dial {
  margin-top: 46px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(0px, 1vw, 10px);
  flex-wrap: nowrap;
}
/* Five across at every width, including 320px. A fixed clamp width overflows
   there; flex-basis zero with a cap lets them share whatever room exists. */
.dial figure { flex: 1 1 0; min-width: 0; max-width: 178px; text-align: center; }
.dial img { width: 100%; height: auto; display: block; }
.dial figcaption {
  margin-top: -14px;
  font-size: clamp(0.62rem, 1.5vw, 0.8rem);
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text);
}
.dial .range {
  display: block;
  font-weight: 400;
  letter-spacing: 0.1em;
  font-variant-numeric: tabular-nums;
  color: var(--faint);
  font-size: 0.9em;
  margin-top: 2px;
}
.dial .word-spent     { color: var(--rose); }
.dial .word-stretched { color: var(--butter); }
.dial .word-steady    { color: var(--steady); }
.dial .word-light     { color: var(--mint); }
.dial .word-bright    { color: var(--sage); }

/* A single mark used as a section's ornament, beside a heading. */
.mark-inline { width: 96px; height: 96px; display: block; margin: 0 auto -10px; }
.mark-lg { width: 190px; height: 190px; display: block; margin: 0 auto; }
