/* Spanglish — editorial, mobile first.
 *
 * Warm paper, serif for the Spanish, sans for the interface. Colour is used
 * sparingly and almost always to mean something: register on a text, state on a
 * control. Nothing decorative competes with the prose, because the prose is the
 * product.
 *
 * Class names are unchanged from the first pass so existing markup keeps working.
 */

:root {
  --paper:     #f6f0e4;   /* cream, not near-white — depth before any colour */
  --surface:   #fffdf8;
  --raised:    #fffdf8;
  --line:      #e2d8c4;
  --line-soft: #ece4d4;

  --ink:       #17150f;   /* pushed darker; the gap to paper is what reads as crisp */
  --ink-soft:  #574f42;
  --ink-faint: #6f675a;   /* was #8b8272 — 3.3:1 against paper, under WCAG AA */

  --accent:      #b23a1e;   /* brick. links, actions, the wordmark */
  --accent-soft: #fbe8e1;
  --ok:          #2f6146;
  --ok-soft:     #eaf1ec;
  --warn:        #8a5a12;
  --warn-soft:   #fbf1dd;
  /* Tapped word. The old #fbf0cf measured 1.00:1 against the cream paper it was
     printed on: identical luminance, separated only by a faint hue shift, which
     is exactly what disappears on a phone in daylight. Readers said they could
     barely see it and they were right.
     This is a 1.41:1 step off the paper while leaving ink at 11.4:1 on top of
     it. Darker starts reading orange rather than highlighter. */
  --mark:        #f9c638;
  --mark-line:   #a9741a;   /* 3.56:1 on paper — the underline does real work */
  --mark-press:  #fde79a;   /* the moment of the tap, before it settles */

  --radius:  10px;
  --radius-pill: 999px;   /* buttons. reads friendlier than a 10px corner */
  --measure: 33em;

  --shadow: 0 1px 2px rgba(28,26,22,.04), 0 1px 8px rgba(28,26,22,.03);

  /* Charter and Iowan ship with macOS/iOS, Cambria with Windows and Office.
     All three are better text faces than Georgia, which is only the fallback
     now rather than the default — it was the strongest dated signal in here. */
  --serif: "Iowan Old Style", Charter, "Bitstream Charter", Cambria,
           "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans:  ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* A real scale. The old one ran 11px–32px with almost everything bunched
     between 12 and 18, so nothing on a page ever announced itself. Editorial
     layout lives on the distance between the largest thing and the smallest. */
  --t-micro: 10.5px;
  --t-kick:  11.5px;
  --t-fine:  13px;
  /* 1rem, not 16px. A px value silently overrides the reader's own browser
     font-size setting — someone who set 20px because they need it should get it. */
  --t-base:  1rem;
  --t-lead:  clamp(17px, 1.1vw + 15px, 19px);
  --t-h3:    clamp(19px, 1.4vw + 16px, 22px);
  --t-h2:    clamp(24px, 2.4vw + 18px, 31px);
  --t-h1:    clamp(31px, 4.2vw + 20px, 47px);
  --t-mega:  clamp(46px, 8vw + 22px, 78px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:     #17150f;
    --surface:   #1f1d16;
    --raised:    #26231b;
    --line:      #35311f;
    --line-soft: #2a2719;

    --ink:       #ece7dc;
    --ink-soft:  #a9a294;
    --ink-faint: #8c8474;   /* lifted from #7b7466 — 3.9:1 on dark paper, under AA */

    --accent:      #e08a70;
    --accent-soft: #35211a;
    --ok:          #7dc0a0;
    --ok-soft:     #1c2a22;
    --warn:        #dda856;
    --warn-soft:   #2e2413;
    /* Dark mode can't use a highlighter yellow behind light text and stay
       readable, so the weight goes into a saturated amber underline with a
       muted wash behind it. */
    --mark:        #5a4512;
    --mark-line:   #e8b93c;
    --mark-press:  #6d5417;

    --shadow: none;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: var(--t-base)/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-underline-offset: 2px; }

/* ---------------------------------------------------------------- access
   Added after an audit, 2026-08-09. Everything here is about people the design
   otherwise quietly excluded. */

/* Keyboard users need to see where they are. focus-visible only, so it doesn't
   fire on every mouse click. */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible,
summary:focus-visible,
.opt input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}

/* Skip past the header straight to the text. Invisible until tabbed to. */
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  padding: 10px 16px; background: var(--ink); color: var(--paper);
  border-radius: 0 0 var(--radius) 0; text-decoration: none;
}
.skip:focus { left: 0; }

/* The skip link's landing pad is the page wrapper, which carries tabindex="-1"
   so it can receive focus. Left to the rule above it would draw a 2px box
   around the whole page — that reads as a rendering fault, not a cue. The jump
   itself is the feedback. */
#main:focus, #main:focus-visible { outline: none; }

/* Some people get motion sick. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .dots i.now { transform: none; }
  .level i { transition: none; }
}

/* For the places where colour alone would carry the meaning. */
.sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------------------------------------------------------------- register
   Each register owns a colour, used three ways: --reg for labels and rules,
   --reg-soft as the card wash, --reg-line for its edge. This is what makes a
   list of eight texts look like eight different things without a photograph. */

[data-reg]            { --reg: #6b6357; --reg-soft: #efe9dc; --reg-line: #ddd3c0; }
[data-reg="cronica"]  { --reg: #b23a1e; --reg-soft: #fbe4da; --reg-line: #f0c6b5; }
[data-reg="opinion"]  { --reg: #855b08; --reg-soft: #fbeecd; --reg-line: #ecd399; }  /* darkened for 4.5:1 */
[data-reg="ensayo"]   { --reg: #1a6a58; --reg-soft: #ddefe8; --reg-line: #b3d9cc; }
[data-reg="prensa"]   { --reg: #27497c; --reg-soft: #e0eaf7; --reg-line: #b6cbe6; }
[data-reg="narrativa"]{ --reg: #7a3765; --reg-soft: #f6e3ef; --reg-line: #e3bfd6; }
[data-reg="tecnico"]  { --reg: #3c5162; --reg-soft: #e3eaf0; --reg-line: #bfcedb; }
[data-reg="coloquial"]{ --reg: #556f1c; --reg-soft: #eaf2d5; --reg-line: #cadda2; }

@media (prefers-color-scheme: dark) {
  [data-reg]            { --reg: #b5ad9c; --reg-soft: #2b2820; --reg-line: #3d3a2c; }
  [data-reg="cronica"]  { --reg: #f0987c; --reg-soft: #3a2018; --reg-line: #553023; }
  [data-reg="opinion"]  { --reg: #e5b95a; --reg-soft: #362a10; --reg-line: #4e3d17; }
  [data-reg="ensayo"]   { --reg: #79c9ae; --reg-soft: #163029; --reg-line: #22463c; }
  [data-reg="prensa"]   { --reg: #8bb6e0; --reg-soft: #16283c; --reg-line: #223c58; }
  [data-reg="narrativa"]{ --reg: #d494c1; --reg-soft: #31202c; --reg-line: #482f40; }
  [data-reg="tecnico"]  { --reg: #a3b4c5; --reg-soft: #1f272e; --reg-line: #2e3942; }
  [data-reg="coloquial"]{ --reg: #b0cc71; --reg-soft: #232d13; --reg-line: #35431d; }
}

/* ---------------------------------------------------------------- chrome */

.bar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 16px;
  background: var(--paper);                                      /* fallback first */
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(8px);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
  font-size: 13px; color: var(--ink-soft);
}

.bar a { color: var(--ink-soft); text-decoration: none; }
.bar a:hover { color: var(--ink); }

.wordmark {
  font-family: var(--serif);
  font-size: 17px; letter-spacing: -.01em; color: var(--ink);
  text-decoration: none;
}
.wordmark em { font-style: italic; color: var(--accent); }

.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 20px;
  background: var(--reg-soft, var(--surface));
  color: var(--reg, var(--ink-soft));
  border: 1px solid color-mix(in srgb, var(--reg, var(--line)) 25%, transparent);
  font-size: 12px; white-space: nowrap;
}

.wrap { max-width: var(--measure); margin: 0 auto; padding: 24px 20px 132px; }
.wide { max-width: 44em; }

h1 { font-size: var(--t-h2); line-height: 1.12; margin: 0 0 8px;
     font-weight: 600; letter-spacing: -.02em; }

/* The reading screen and the landing page carry the big display type. Elsewhere
   a page title is furniture and shouldn't shout. */
article + *, .wrap > h1 { text-wrap: balance; }

/* Section labels. Generous space above — the old stack was uniformly dense and
   nothing separated "unfinished" from "to read" from "read". */
h2 { font-size: var(--t-kick); margin: 46px 0 14px; font-weight: 600;
     color: var(--ink-faint); text-transform: uppercase; letter-spacing: .1em;
     display: flex; align-items: center; gap: 10px; }
h2::after { content: ""; flex: 1; height: 1px; background: var(--line); }
h2:first-of-type { margin-top: 6px; }

.standfirst {
  font-family: var(--serif);
  font-size: 17px; line-height: 1.5; color: var(--ink-soft);
  margin: 0 0 20px;
}

.muted { color: var(--ink-soft); }
.faint { color: var(--ink-faint); font-size: 13px; }

.icon { width: 16px; height: 16px; vertical-align: -3px; fill: none;
        stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

/* ---------------------------------------------------------------- article */

article {
  font-family: var(--serif);
  font-size: 18.5px;
  line-height: 1.72;
  letter-spacing: -.003em;
}

article p { margin: 0 0 1.15em; }
article p:first-of-type::first-letter {
  float: left; font-size: 3.1em; line-height: .84; padding: .05em .09em 0 0;
  color: var(--accent);
}

.pullquote {
  font-family: var(--serif);
  font-size: 21px; line-height: 1.4; font-style: italic;
  color: var(--ink);
  border-left: 3px solid var(--reg, var(--accent));
  padding: 2px 0 2px 18px;
  margin: 30px 0;
}

/* Tap targets need thumb-sized height without loosening the line spacing, so the
   padding is negative-margined back out. */
.w {
  display: inline-block;
  padding: 4px 2px; margin: -4px 0;
  border-radius: 3px; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background .1s ease-out;
}

/* The wash carries the contrast and a 2px rule underneath confirms it.
   Deliberately NOT font-weight: bolding a word changes its width, which
   re-wraps the paragraph and shifts the remaining text under the reader's
   finger. On a screen where you tap twenty words in sequence that is a
   mis-tap generator, and it gets worse the more you mark. Colour and the
   underline cost nothing in layout. */
.w.marked {
  background: var(--mark);
  box-shadow: 0 2px 0 var(--mark-line);
}

.w:active { background: var(--mark-press); }

.progress { position: fixed; top: 0; left: 0; height: 2px; z-index: 30;
            background: var(--accent); width: 0; transition: width .15s linear; }

/* ---------------------------------------------------------------- controls */

.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: var(--surface);                                    /* fallback first */
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
}
.dock .hint { font-size: 12px; color: var(--ink-faint); line-height: 1.35; }

button, .btn {
  font: inherit; font-size: 15px;
  padding: 11px 22px; min-height: 44px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: var(--surface); color: var(--ink);
  cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  white-space: nowrap;
  transition: background .12s, border-color .12s, transform .06s;
}
/* The segmented control and anything explicitly squared opts back out. */
.seg button, .seg .btn { border-radius: 0; }
button:hover, .btn:hover { border-color: var(--ink-faint); }
button:active, .btn:active { transform: scale(.985); }

button.primary, .btn.primary {
  background: var(--ink); color: var(--paper); border-color: var(--ink);
}
button.primary:hover, .btn.primary:hover { background: #000; }
@media (prefers-color-scheme: dark) {
  button.primary:hover, .btn.primary:hover { background: #fff; }
}

button:disabled { opacity: .45; cursor: default; }

textarea, input[type=text], input[type=email], input[type=password] {
  width: 100%; font: inherit; font-size: 16px; line-height: 1.6;
  padding: 12px 13px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); color: var(--ink);
}
textarea:focus, input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* ---------------------------------------------------------------- cards */

.card {
  display: block; position: relative;
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 15px 17px;
  margin-bottom: 10px;
  color: inherit; text-decoration: none;
  box-shadow: var(--shadow);
  transition: border-color .12s, transform .06s;
}
a.card:hover { border-color: var(--ink-faint); }
a.card:active { transform: scale(.995); }

/* Tinted card — the register wash is what gives the library its rhythm. */
.card.tinted {
  background: var(--reg-soft);
  border-color: var(--reg-line);
}
a.card.tinted:hover { border-color: var(--reg); }

.card h3 { margin: 0 0 4px; font-size: 17.5px; font-weight: 600; line-height: 1.26;
           font-family: var(--serif); letter-spacing: -.012em; }
.card .dek { margin: 6px 0 11px; font-size: 14.5px; line-height: 1.5;
             font-family: var(--serif); color: var(--ink-soft); }
.card .meta { font-size: 12px; color: var(--ink-faint);
              display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.card.tinted .meta { color: var(--ink-soft); }
.card.tinted .meta { color: color-mix(in srgb, var(--reg) 70%, var(--ink)); }

/* The kicker: register and level, set small and in the register's own colour. */
.kicker {
  font-size: 11px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase;
  color: var(--reg, var(--ink-faint));
  display: flex; align-items: center; gap: 8px; margin-bottom: 7px;
}

/* Difficulty as four segments — glanceable, and you can see a text sitting
   slightly above where you are. */
.level { display: inline-flex; gap: 2.5px; vertical-align: -1px; }
.level i { width: 11px; height: 4px; border-radius: 1px; background: currentColor; opacity: .22; }
.level i.on { opacity: 1; }

/* Hero — the next text should look like an answer, not one of eight options. */
.hero { padding: 0; overflow: hidden; background: var(--surface); border-color: var(--reg-line); }
/* Cover photographs, served from assets/photos/ by lib/photo.php. When that
   folder is empty every caller falls back to the 5px register band below, so
   the cards stay correct with no images installed at all. */
.hero .band, .specimen .band { height: 5px; background: var(--reg); }

.photo { display: block; width: 100%; height: 100%; object-fit: cover; }

.cover-wrap, .headpiece { position: relative; }

.cover-wrap {
  height: 132px; overflow: hidden;
  border-bottom: 1px solid var(--reg-line);
  background: var(--reg-soft);      /* holds the space while the image loads */
}

/* Above the article. Taller, because here it sets a scene rather than labelling
   a card, and it is the first thing on the page. */
.headpiece {
  height: 165px; overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--reg-soft);
  margin: 0 0 22px;
}

/* Attribution, for licences that require it. Sits on the image, so it cannot
   be separated from the photo it belongs to. */
.credit {
  position: absolute; right: 7px; bottom: 6px;
  padding: 2px 7px; border-radius: 4px;
  background: rgba(12,10,6,.55);
  color: #fff; font-size: 10.5px; letter-spacing: .01em;
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
.credit a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }

@media (min-width: 700px) {
  .cover-wrap { height: 152px; }
  .headpiece  { height: 215px; }
}

@media print {
  .headpiece, .cover-wrap { display: none; }
}
.hero .inner { padding: 22px 22px 18px; }
/* The one text you should read next. It gets display type; the eight in the
   list below do not. That gap is the whole point of promoting it. */
.hero h3 { font-size: var(--t-h2); line-height: 1.08; margin-bottom: 6px;
           letter-spacing: -.022em; text-wrap: balance; }
.hero .dek { font-size: var(--t-lead); line-height: 1.45; }
.hero .facts {
  display: flex; gap: 20px; align-items: flex-end;
  border-top: 1px solid var(--line-soft); margin-top: 14px; padding-top: 13px;
}
.hero .facts .k { font-size: 10.5px; letter-spacing: .09em; text-transform: uppercase;
                  color: var(--ink-faint); }
.hero .facts .v { font-family: var(--serif); font-size: 17px; color: var(--ink); }
.hero .facts .go { margin-left: auto; }

.stat { background: var(--surface); border: 1px solid var(--line-soft);
        border-radius: var(--radius); padding: 13px 15px; flex: 1; min-width: 130px; }
.stat .k { font-size: 12px; color: var(--ink-soft); }
.stat .v { font-size: 27px; font-weight: 600; letter-spacing: -.02em; margin-top: 1px; }

.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.note { border-left: 3px solid var(--warn); background: var(--warn-soft);
        padding: 13px 15px; margin: 0 0 22px; color: var(--warn); }
.note p { margin: 0; }
.note p + p { margin-top: 5px; font-size: 14px; opacity: .9; }

.empty { border: 1px dashed var(--line); border-radius: var(--radius);
         padding: 30px 22px; text-align: center; color: var(--ink-soft); }

.del { background: var(--accent-soft); color: var(--accent);
       text-decoration: line-through; padding: 1px 5px; border-radius: 4px; }
.ins { background: var(--ok-soft); color: var(--ok); padding: 1px 5px; border-radius: 4px; }

/* ---------------------------------------------------------------- forms */

/* Segmented control — typed / spoken. */
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius);
       overflow: hidden; background: var(--surface); }
.seg button { border: 0; border-radius: 0; min-height: 40px; padding: 9px 16px;
              font-size: 14px; background: transparent; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--ink); color: var(--paper); }

/* Choice chips — the 1..5 scales on the self-report. */
.opts { display: flex; gap: 7px; flex-wrap: wrap; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt span { display: inline-flex; align-items: center; gap: 7px;
            padding: 10px 16px; border: 1px solid var(--line);
            border-radius: var(--radius-pill); background: var(--surface);
            font-size: 14px; cursor: pointer; transition: all .12s; }
/* The emoji stays legible when the chip inverts on selection. */
.opt .em { font-size: 15px; line-height: 1; }
.opt span:hover { border-color: var(--ink-faint); }
.opt input:checked + span { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.opt input:focus-visible + span { box-shadow: 0 0 0 3px var(--accent-soft); }

/* Progress dots along the question sequence. */
.dots { display: inline-flex; gap: 6px; align-items: center; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line);
          transition: transform .15s, background .15s; }
.dots i.done { background: var(--ok); }
.dots i.now  { background: var(--accent); transform: scale(1.45); }

/* ---------------------------------------------------------------- review */

.scores { display: flex; gap: 10px; margin-bottom: 20px; }
.scores .stat { text-align: left; }
.scores .v { font-size: 32px; }

.fix { border: 1px solid var(--reg-line, var(--line)); border-left: 4px solid var(--reg, var(--accent));
       border-radius: 0 var(--radius) var(--radius) 0; background: var(--surface);
       padding: 16px 18px; margin-bottom: 4px; }
.fix .change { font-family: var(--serif); font-size: 17px; line-height: 1.6; margin: 0 0 9px; }
.fix .why { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--ink-soft); }

/* Accordion — one row per question, closed by default. */
.acc { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
       background: var(--surface); }
.acc .row-h { display: flex; justify-content: space-between; align-items: center; gap: 10px;
              padding: 13px 15px; cursor: pointer; font-size: 14px; }
.acc .row-h:hover { background: var(--line-soft); }
.acc .row-b { padding: 0 15px 15px; font-size: 14.5px; line-height: 1.7; color: var(--ink-soft); }
.acc .item + .item { border-top: 1px solid var(--line); }
.acc .chev { transition: transform .15s; color: var(--ink-faint); }
.acc .item.open .chev { transform: rotate(90deg); }
.acc .sc { font-variant-numeric: tabular-nums; }

/* Glossary from the words tapped while reading. */
.gloss { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
         background: var(--surface); }
.gloss div { display: flex; justify-content: space-between; gap: 14px;
             padding: 10px 15px; font-size: 14.5px; }
.gloss div + div { border-top: 1px solid var(--line-soft); }
.gloss .es { font-family: var(--serif); }
.gloss .en { color: var(--ink-faint); text-align: right; }

/* ---------------------------------------------------------------- lander
   The landing page described a reading app without showing a word of Spanish.
   Its job now is to demonstrate rather than describe, so the specimen is the
   centrepiece and the sign-in card steps back. */

.lander { padding-top: 30px; }

.lander .lede {
  display: grid; grid-template-columns: 1fr; gap: 28px;
  align-items: start; margin-bottom: 40px;
}

/* Display type, in the serif the product is actually set in. The headline was
   31px sans, which is a heading, not a masthead. */
/*
 * Masthead scale, not heading scale.
 *
 * Was --t-h1 (tops out at 47px). Eppika's landing headline runs around 60px and
 * the difference is not subtlety versus shouting — it is whether the page looks
 * like it believes in itself. A 400-weight serif at 62px reads as confident
 * rather than loud, which a heavy sans at the same size would not.
 */
.display {
  font-family: var(--serif);
  font-size: clamp(38px, 6.2vw + 18px, 62px);
  line-height: .98;
  letter-spacing: -.032em;
  font-weight: 400;
  margin: 0 0 16px;
  max-width: 12em;
  text-wrap: balance;
}
.lander .standfirst { max-width: 30em; font-size: var(--t-lead); margin: 0; }

/* House illustration. Drawn from the same custom properties as the reading
   screen, so it cannot drift away from the thing it depicts. */
.illus { display: block; width: 100%; height: auto; max-width: 300px; }
.illus-wrap { display: flex; justify-content: center; margin: 0 0 22px; }
.illus-wrap.tight { max-width: 220px; margin: 0 auto 20px; }
.hide-narrow { display: none; }
@media (min-width: 820px) { .hide-narrow { display: flex; } }

/* ---------------------------------------------------------------- onboarding
   One question per screen with a visible sense of how much is left. A wall of
   sixty-six words with no preamble is faster and considerably more forbidding. */

.steps-bar { display: flex; gap: 5px; margin: 0 0 26px; }
.steps-bar i {
  flex: 1; height: 4px; border-radius: 2px; background: var(--line);
}
.steps-bar i.done { background: var(--accent); }
.steps-bar i.now  { background: var(--accent); opacity: .45; }

.stage { max-width: 34em; margin: 0 auto; text-align: center; }
.stage h1 { text-wrap: balance; }
.stage .standfirst { margin-left: auto; margin-right: auto; }

/* Full-width choice rows — a thumb target, not a link. */
.rows { display: flex; flex-direction: column; gap: 9px; margin: 24px 0; text-align: left; }
.rows a, .rows button {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  width: 100%; padding: 16px 18px; min-height: 60px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); color: var(--ink);
  font-size: var(--t-lead); text-align: left; white-space: normal;
}
.rows a:hover, .rows button:hover { border-color: var(--accent); background: var(--accent-soft); }
.rows .em { font-size: 22px; line-height: 1; flex: none; }

/* The placement verdict. One number, set as large as the masthead — this is the
   app telling you something true that no competitor can, and it was previously
   rendered as a row in a stats table. */
.verdict { margin: 6px 0 20px; }
.verdict .kicker { color: var(--accent); margin-bottom: 4px; }
.verdict .figure {
  font-family: var(--serif);
  font-size: clamp(56px, 11vw + 14px, 104px);
  line-height: .9; letter-spacing: -.04em;
  font-variant-numeric: tabular-nums;
}
.verdict .unit {
  font-family: var(--serif); font-size: var(--t-h3);
  color: var(--ink-soft); margin-top: 6px;
}

@media (min-width: 820px) {
  .lander .lede { grid-template-columns: minmax(0, 1.35fr) minmax(320px, .85fr); gap: 46px; }
}

/* The specimen. Same card shape, same register colour, same mark styling as a
   real text — it cannot drift from the thing it is advertising. */
.specimen {
  position: relative; overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--reg-line); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.specimen .inner { padding: 22px 24px 20px; }
.specimen h3 {
  font-family: var(--serif); font-size: var(--t-h3); font-weight: 600;
  line-height: 1.15; letter-spacing: -.018em; margin: 0 0 12px;
}
.specimen article { font-size: 17.5px; line-height: 1.7; }
.specimen article p { margin: 0; }
/* No drop cap here — it is an excerpt, not the opening of a piece. */
.specimen article p:first-of-type::first-letter { float: none; font-size: inherit; color: inherit; padding: 0; }
.specimen .w { cursor: default; }

.specimen .readout {
  display: flex; align-items: center; gap: 9px;
  margin-top: 16px; padding-top: 13px;
  border-top: 1px solid var(--line-soft);
  font-size: var(--t-fine); color: var(--ink-soft);
}
.specimen .mark-key {
  width: 22px; height: 12px; border-radius: 3px; flex: none;
  background: var(--mark); box-shadow: 0 1.5px 0 var(--mark-line);
}

.spec-note { font-size: var(--t-fine); color: var(--ink-faint);
             margin: 12px 0 0; max-width: 42em; }

/* The loop, in three steps. */
.steps { list-style: none; padding: 0; margin: 44px 0 0;
         display: grid; gap: 16px; }
.steps li { display: flex; gap: 13px; align-items: flex-start; }
.steps .n {
  flex: none; width: 25px; height: 25px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--ink); color: var(--paper);
  font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.steps b { display: block; font-size: 15px; font-weight: 600; margin-bottom: 1px; }
.steps span:not(.n) { font-size: 14px; line-height: 1.5; color: var(--ink-faint); }

.features { display: grid; gap: 22px; margin: 44px 0 0;
            border-top: 1px solid var(--line); padding-top: 26px; }
.feature .ic { color: var(--accent); display: block; margin-bottom: 7px; }
.feature b { display: block; font-size: 15px; font-weight: 600; margin-bottom: 3px; }
.feature .faint { font-size: 14px; line-height: 1.5; }

@media (min-width: 700px) {
  .steps    { grid-template-columns: repeat(3, 1fr); gap: 22px; }
  .features { grid-template-columns: repeat(3, 1fr); gap: 30px; }
}

/* ---------------------------------------------------------------- masthead
   The library used to open with a section label and a stack of cards. This is
   the page you see most, and it said nothing about you. Now it leads with where
   your Spanish actually is, at a size that means it. */

.masthead {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  padding: 6px 0 30px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
}

.masthead .level-now { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }

.masthead .cefr {
  font-family: var(--serif);
  font-size: var(--t-mega);
  line-height: .84;
  letter-spacing: -.035em;
  color: var(--ink);
}

.masthead .theta {
  font-variant-numeric: tabular-nums;
  font-size: var(--t-fine); color: var(--ink-faint);
}
.masthead .theta b { color: var(--ink-soft); font-weight: 600; }

.masthead .trend { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.masthead .delta { font-size: var(--t-fine); font-variant-numeric: tabular-nums; }
.masthead .delta.up   { color: var(--ok); }
.masthead .delta.down { color: var(--ink-faint); }

.masthead .caption { font-size: var(--t-fine); color: var(--ink-faint); margin: 0; max-width: 40em; }
.masthead .caption b { color: var(--ink-soft); font-weight: 600; }

.masthead .tallies { display: flex; gap: 26px; flex-wrap: wrap; }
.masthead .tally .n {
  font-size: var(--t-h3); font-weight: 600; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums; line-height: 1.1;
}
.masthead .tally .k {
  font-size: var(--t-micro); text-transform: uppercase; letter-spacing: .1em;
  color: var(--ink-faint); margin-top: 2px;
}

.reach-block { margin-top: 20px; text-align: left; }
.reach-block .reach-n {
  font-family: var(--serif);
  font-size: var(--t-h2); line-height: 1;
  letter-spacing: -.03em; font-variant-numeric: tabular-nums;
}
.reach-block .k {
  font-size: var(--t-micro); text-transform: uppercase; letter-spacing: .1em;
  color: var(--ink-faint); margin: 3px 0 10px;
}
.reach-block .caption { margin-top: 9px; }

@media (min-width: 700px) {
  .masthead { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; gap: 34px; }
  .masthead .side { justify-self: stretch; }
  .masthead .tallies { justify-content: flex-start; }
}

/* ---------------------------------------------------------------- charts */

.spark { display: block; overflow: visible; }
.spark .line { fill: none; stroke: var(--ink-soft); stroke-width: 1.6;
               stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.spark .area { fill: var(--line-soft); opacity: .7; stroke: none; }
.spark .dot  { fill: var(--accent); }
.spark.up .line { stroke: var(--ok); }
.spark.up .area { fill: var(--ok-soft); }

/* Vocabulary reach. Log scale — the interesting distance is 1k to 4k, not
   16k to 19k, which is also why frequency lists are read in bands. */
.reach { margin-top: 4px; }
.reach .track {
  position: relative; height: 7px; border-radius: 4px;
  background: var(--line-soft); border: 1px solid var(--line);
}
.reach .fill {
  position: absolute; inset: 0 auto 0 0; border-radius: 4px 0 0 4px;
  background: linear-gradient(90deg, var(--ok-soft), var(--ok));
}
.reach .pin {
  position: absolute; top: 50%; width: 3px; height: 17px;
  transform: translate(-50%, -50%); border-radius: 2px;
  background: var(--ink);
}
.reach .ticks { position: relative; height: 15px; margin-top: 5px; }
.reach .tick { position: absolute; transform: translateX(-50%); }
.reach .tick span { font-size: var(--t-micro); color: var(--ink-faint);
                    font-variant-numeric: tabular-nums; }

/* The four axes. A blended number says something was hard but never why. */
.axes { display: grid; gap: 9px; }
.axis { display: grid; grid-template-columns: 8.5em 1fr 2.6em; gap: 11px; align-items: center; }
.axis .k { font-size: var(--t-fine); color: var(--ink-soft); }
.axis .track { height: 6px; border-radius: 3px; background: var(--line-soft); overflow: hidden; }
.axis .fill  { height: 100%; border-radius: 3px; background: var(--reg, var(--ink-soft)); }
.axis .v { font-size: var(--t-fine); color: var(--ink-faint);
           font-variant-numeric: tabular-nums; text-align: right; }

/* Score rings. Two of them, never averaged into one. */
.rings { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 22px; }
.ring { position: relative; text-align: center; flex: 0 0 auto; }
.ring svg { display: block; }
.ring .bg { fill: none; stroke: var(--line-soft); stroke-width: 7; }
.ring .fg { fill: none; stroke: var(--ink); stroke-width: 7; stroke-linecap: round;
            transition: stroke-dashoffset .9s cubic-bezier(.22,.9,.3,1); }
.ring.tone-ok   .fg { stroke: var(--ok); }
.ring.tone-warn .fg { stroke: var(--warn); }
.ring .val {
  position: absolute; left: 0; right: 0; top: 50%;
  transform: translateY(-62%);
  font-variant-numeric: tabular-nums; letter-spacing: -.03em;
}
.ring .val .n  { font-size: 27px; font-weight: 600; }
.ring .val .pc { font-size: 13px; color: var(--ink-faint); margin-left: 1px; }
.ring .lbl { font-size: var(--t-micro); text-transform: uppercase; letter-spacing: .1em;
             color: var(--ink-faint); margin-top: 7px; }

/* A plain titled panel. Not the accordion — these contents are the point, so
   they don't hide behind a tap. */
.panel { border: 1px solid var(--line); border-radius: var(--radius);
         background: var(--surface); padding: 15px 17px; margin-bottom: 22px; }
.panel-h { display: flex; justify-content: space-between; align-items: baseline;
           gap: 10px; margin-bottom: 13px;
           font-size: var(--t-micro); text-transform: uppercase; letter-spacing: .1em;
           color: var(--ink-faint); }

/* Where the words you tapped sit in the frequency list. This is the measurement
   theta_lexical is defined from, and it had never been shown to the reader. */
.bands { display: flex; gap: 7px; align-items: flex-end; height: 104px; margin-top: 6px; }
.bands .col { flex: 1; display: flex; flex-direction: column; align-items: center;
              height: 100%; justify-content: flex-end; }
.bands .bar-wrap { width: 100%; flex: 1; display: flex; align-items: flex-end; }
.bands .bar { width: 100%; min-height: 2px; border-radius: 3px 3px 0 0;
              background: var(--reg, var(--accent)); opacity: .85; }
.bands .n { font-size: var(--t-fine); font-variant-numeric: tabular-nums;
            color: var(--ink-soft); margin-top: 5px; }
.bands .k { font-size: var(--t-micro); color: var(--ink-faint); margin-top: 1px; }

/* ---------------------------------------------------------------- desktop */

@media (min-width: 700px) {
  .wrap { padding: 36px 24px 150px; }
  article { font-size: 19.5px; line-height: 1.78; }
  h1 { font-size: 31px; }
  .standfirst { font-size: 18px; }
  .dock { padding: 14px 26px; }
  .w { padding: 3px 1px; margin: -3px 0; }
  .w:hover { background: var(--line-soft); }
  .w.marked:hover { background: var(--mark); }
}
