/* The website's styles: the foundation of the approved redesign (docs/design/redesign/css/, Cursor NOPNYX)
   and today's screens on the same tokens. Every colour, font, font size, radius, size and timing is a custom property
   from theme.css, which web/build.ts writes from config.yaml web.theme: never write one here as a value.
   Spacing is in rem or em; px is kept for borders, outlines, shadows and underline offsets, and for the 960/600/359
   breakpoints (custom properties cannot be used in @media). */

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

/* The sticky header never covers what a link or a focus move scrolls to. */
html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: var(--size-header);
}

body {
  margin: 0;
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-regular), system-ui, sans-serif;
  font-size: var(--type-body-size);
  line-height: var(--type-body-line);
  -webkit-font-smoothing: antialiased;
}

h1,
h2 {
  margin: 0 0 0.75rem;
  color: var(--color-ink);
  font-weight: normal;
}

h1 {
  font-family: var(--font-light), system-ui, sans-serif;
  font-size: var(--type-h1-size);
  line-height: var(--type-h1-line);
  letter-spacing: -0.03em;
}

h2 {
  font-family: var(--font-regular), system-ui, sans-serif;
  font-size: var(--type-h2-size);
  line-height: var(--type-h2-line);
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 0.75rem;
}

a {
  color: inherit;
  text-underline-offset: 4px;
  transition: color var(--motion-press) var(--motion-easing);
}

a:hover {
  color: var(--color-accent-text);
}

/* Focus: a ring for the keyboard only. A screen's heading takes the focus from script, and a field in error takes it
   after a submit: both draw the ring only when the person moved with the keyboard (main.ts marks <html data-modality>);
   with a mouse or a finger the heading shows nothing and the field only its red border. */
:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
}

a:not(.button):focus-visible {
  border-radius: var(--radius-focus);
}

:focus:not(:focus-visible) {
  outline: none;
}

html:not([data-modality="keyboard"]) [tabindex="-1"]:focus,
html:not([data-modality="keyboard"]) [aria-invalid="true"]:focus,
html:not([data-modality="keyboard"]) .input-box:has(input[aria-invalid="true"]:focus) {
  outline: none;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 0.0625rem;
  height: 0.0625rem;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.wrap {
  max-width: var(--size-page);
  margin: 0 auto;
  padding: 0 var(--size-gutter);
}

.narrow {
  max-width: var(--size-narrow);
  margin: 0 auto;
  padding: 0 var(--size-gutter);
}

/* Header: the brand with its logo, the landing's section links and the two languages; nothing is hidden behind
   a menu. */
.top {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--color-line);
  background: var(--color-paper); /* opaque: nothing scrolled under the header shows through it */
}

.top .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.75rem;
  min-height: var(--size-header);
}

.brand {
  display: inline-flex;
  align-items: center;
  color: var(--color-ink);
  font-family: var(--font-regular), system-ui, sans-serif;
  font-size: var(--type-brand-size);
  line-height: var(--type-brand-line);
  letter-spacing: -0.02em;
  text-decoration: none;
}

/* The app's logo before the name (web/src/logo.ts): the ring in the ink, its block always the NOPNYX cyan. */
.brand .logo {
  flex: none;
  width: 0.9em;
  height: 0.9em;
  margin-right: 0.24em;
}

.brand .logo-block {
  color: var(--color-cyan);
}

.top nav {
  margin-left: auto;
  font-size: var(--type-nav-size);
  line-height: var(--type-nav-line);
}

.top nav .link-list {
  gap: 0 1.625rem;
}

.top nav a {
  color: var(--color-muted);
  text-decoration: none;
}

.top nav a:hover {
  color: var(--color-ink);
  text-decoration: underline;
}

/* The «Tus reclamaciones» link sits outside the nav, so it stays on phones where the nav is hidden. */
.top a[data-nav="cases"] {
  display: inline-flex;
  align-items: center;
  min-height: var(--touch);
  color: var(--color-muted);
  font-size: var(--type-nav-size);
  line-height: var(--type-nav-line);
  text-decoration: none;
}

.top a[data-nav="cases"]:hover {
  color: var(--color-ink);
  text-decoration: underline;
}

/* The info pages' header has no nav: their languages go to the right on their own. */
.top .brand + .lang {
  margin-left: auto;
}

.link-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
}

/* Buttons, and links that look like buttons: one primary action, ghost and text-link ones beside it. */
button {
  min-height: var(--touch);
  padding: 0 1.75rem;
  border: 2px solid var(--color-accent);
  border-radius: var(--radius-control);
  background: var(--color-accent);
  color: var(--color-on-accent);
  font-family: var(--font-medium), system-ui, sans-serif;
  font-size: var(--type-action-size);
  line-height: var(--type-action-line);
  cursor: pointer;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: var(--touch);
  margin: 0 0.5rem 0.5rem 0;
  padding: 1rem 1.75rem;
  border: 2px solid var(--color-accent);
  border-radius: var(--radius-control);
  font-family: var(--font-medium), system-ui, sans-serif;
  font-size: var(--type-action-size);
  line-height: var(--type-action-line);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color var(--motion-press) var(--motion-easing),
    border-color var(--motion-press) var(--motion-easing),
    color var(--motion-press) var(--motion-easing),
    transform var(--motion-press) var(--motion-easing);
}

.button:active {
  transform: translateY(0.0625rem);
}

.button-primary {
  border-color: var(--color-accent);
  background: var(--color-accent);
  color: var(--color-on-accent);
}

/* The Cursor NOPNYX mark: a cyan square before the primary action's label. */
.button-primary::before {
  content: '';
  flex: none;
  width: 0.625rem;
  height: 0.625rem;
  background: var(--color-cyan);
}

.button-primary:hover {
  border-color: var(--color-accent-hover);
  background: var(--color-accent-hover);
  color: var(--color-on-accent);
}

.button-secondary {
  border-color: var(--color-control);
  background: var(--color-white);
  color: var(--color-ink);
}

.button-secondary:hover {
  background: var(--color-surface);
  color: var(--color-ink);
}

.button-quiet {
  padding: 0;
  border: 0;
  background: none;
  color: var(--color-accent-text);
  font-size: var(--type-small-size);
  line-height: var(--type-small-line);
  text-decoration: underline;
  text-underline-offset: 5px;
}

.button-quiet:hover {
  color: var(--color-accent-strong);
}

.button:disabled {
  border-color: var(--color-control);
  background: var(--color-raised);
  color: var(--color-muted);
  cursor: progress;
}

.link {
  display: inline-flex;
  align-items: center;
  min-height: var(--touch);
}

/* The language switch: the current one is filled, the one loading is dashed, so state is never colour only. The info
   pages' links are spaced and marked like the app header's buttons. */
.lang {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
}

.lang .button {
  min-width: 3.5rem;
  min-height: var(--touch);
  margin: 0;
  padding: 0 0.75rem;
  border: 1px solid var(--color-control);
  border-radius: var(--radius-chip);
  background: var(--color-white);
  color: var(--color-ink);
  font-family: var(--font-medium), system-ui, sans-serif;
  font-size: var(--type-control-size);
  line-height: var(--type-control-line);
  text-decoration: none;
}

.lang .button:hover {
  background: var(--color-surface);
  color: var(--color-ink);
}

.lang .button[aria-pressed="true"],
.lang .button[aria-current="true"] {
  border-color: var(--color-ink);
  background: var(--color-ink);
  color: var(--color-white);
}

.lang .button[aria-busy="true"] {
  border-style: dashed;
  background: var(--color-surface);
  color: var(--color-ink);
  cursor: progress;
}

.lang .loading {
  margin-left: 0.375rem;
  color: var(--color-muted);
  font-size: var(--type-small-size);
  line-height: var(--type-small-line);
}

/* A language that failed to load, said in words beside the buttons; the colour only backs the text. */
.lang .lang-error {
  margin-left: 0.375rem;
  color: var(--color-danger);
  font-size: var(--type-small-size);
  line-height: var(--type-small-line);
}

/* Footer: home, the info pages, the legal page and the contact address, then the NOPNYX wordmark at the right; no
   rule above it, as in the reference. */
.foot {
  margin-top: 3rem;
  padding: 1.875rem 0 3rem;
  color: var(--color-muted);
  font-size: var(--type-small-size);
  line-height: var(--type-small-line);
  overflow-wrap: anywhere;
}

.foot .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.625rem;
}

/* The links join the row themselves, so the wordmark follows the last one on its line, as in the reference. */
.foot .link-list {
  display: contents;
}

/* The landing's last section ends the page with its own padding. */
main#app:has(> .hero) + .foot {
  margin-top: 0;
}

.foot .np {
  margin-left: auto;
  color: var(--color-ink);
  font-family: var(--font-mono), ui-monospace, monospace;
  font-size: var(--type-brand-tag-size);
  line-height: var(--type-brand-tag-line);
  letter-spacing: 0.3em;
}

/* The NOPNYX cursor after the wordmark, cyan like the brand's. */
.foot .np i {
  display: inline-block;
  width: 0.6em;
  height: 1em;
  margin-left: 0.25em;
  background: var(--color-cyan);
  vertical-align: -0.08em;
}

/* The boot states: shown before the app has loaded, or when loading failed. */
#boot-loading,
#boot-error {
  max-width: var(--size-narrow);
  margin: 2.5rem auto;
  padding: 0 var(--size-gutter);
  color: var(--color-muted);
}

#boot-error p {
  color: var(--color-ink);
}

/* The static privacy and support pages: a readable measure, one section per language. */
main.info {
  max-width: var(--size-narrow);
  margin: 0 auto;
  padding: 2.5rem var(--size-gutter) 4rem;
}

main.info section + section {
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--color-line);
}

.info-links {
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.info-links li + li {
  margin-top: 0.25rem;
}

.info-links a {
  display: inline-flex;
  align-items: center;
  min-height: var(--touch);
}

/* The app screens, on the narrow measure under the header. --color-danger is kept for errors, never for an amount. */
main#app {
  max-width: var(--size-narrow);
  margin: 0 auto;
  padding: 2.5rem var(--size-gutter) 0;
  overflow-wrap: anywhere;
}

/* Forms: every field is a label, its control, an optional hint and an error slot. */
.form {
  display: grid;
  gap: 1rem;
  margin: 0 0 1.5rem;
}

.form > .button {
  justify-self: start;
}

.form-errors {
  padding: 0.75rem 1rem;
  border-left: 0.25rem solid var(--color-ink);
  border-radius: var(--radius-control);
  background: var(--color-surface);
}

.form-errors p:last-child {
  margin-bottom: 0;
}

.field {
  display: grid;
  gap: 0.625rem;
  margin: 0;
}

.field > * {
  min-width: 0;
}

.field > label {
  color: var(--color-ink);
  font-family: var(--font-medium), system-ui, sans-serif;
}

input[type="text"],
input[type="date"] {
  width: 100%;
  min-height: var(--touch);
  padding: 0.75rem 1rem;
  border: 2px solid var(--color-control);
  border-radius: var(--radius-control);
  background: var(--color-white);
  color: var(--color-ink);
  font: inherit;
}

input[type="radio"],
input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--color-accent);
}

/* A field's helper and error text keep the body's line height, as the reference's .fmt and .err inherit it. */
.field-hint {
  margin: 0;
  color: var(--color-muted);
  font-size: var(--type-small-size);
  line-height: var(--type-body-line);
}

/* An error is a tinted box with a «!» badge before its sentence, so it never rests on colour alone. */
.field-error {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin: 0.25rem 0 0;
  padding: 0.875rem 1rem;
  border-radius: var(--radius-notice);
  background: var(--color-danger-tint);
  color: var(--color-danger);
  font-size: var(--type-small-size);
  line-height: var(--type-body-line);
}

.field-error::before {
  content: '!';
  display: grid;
  flex: none;
  place-items: center;
  width: var(--size-badge);
  height: var(--size-badge);
  border-radius: 50%;
  background: var(--color-danger);
  color: var(--color-white);
  font-family: var(--font-mono-medium), ui-monospace, monospace;
  font-size: var(--type-badge-size);
  line-height: var(--type-badge-line);
}

/* A shape as well as a colour: the left bar marks the field in error. */
input[aria-invalid="true"],
fieldset[aria-invalid="true"] {
  border-color: var(--color-danger);
  box-shadow: inset 0.25rem 0 0 var(--color-danger);
}

.field-choice {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.field-choice[aria-invalid="true"] {
  padding-left: 1rem;
}

.field-choice > legend {
  margin-bottom: 0.25rem;
  padding: 0;
  color: var(--color-ink);
  font-family: var(--font-medium), system-ui, sans-serif;
}

.choice {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-height: var(--touch);
}

/* A checkbox beside the first line of its label; the hint and the error go under the label, indented with it. */
.field-check {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 0.25rem 0.875rem;
  min-height: var(--touch);
}

.field-check > input {
  grid-row: 1;
  grid-column: 1;
  margin-top: 0.125rem;
}

.field-check > label,
.field-check > .field-hint,
.field-check > .field-error {
  grid-column: 2;
}

.invoice {
  display: grid;
  gap: 1rem;
  min-width: 0;
  margin: 0;
  padding: 1.25rem;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-panel);
  background: var(--color-white);
}

.invoice > legend {
  padding: 0 0.25rem;
  color: var(--color-ink);
  font-family: var(--font-medium), system-ui, sans-serif;
}

/* Support text and notices. A notice is marked by its left bar, never by its text colour alone. */
.note {
  color: var(--color-muted);
  font-size: var(--type-small-size);
  line-height: var(--type-small-line);
}

.notice {
  padding: 0.75rem 1rem;
  border-left-style: solid;
  border-left-width: 0.25rem;
  border-radius: var(--radius-control);
  background: var(--color-surface);
  color: var(--color-ink);
}

.notice-info {
  border-left-color: var(--color-control);
}

.notice-error {
  border-left-color: var(--color-danger);
  background: var(--color-danger-tint);
}

.panel {
  margin: 0 0 1rem;
  padding: 1.25rem;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-panel);
  background: var(--color-white);
}

/* Amounts: the headline figures and the label/value rows. Never in --color-danger. */
.figure {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin: 0 0 1rem;
}

.figure-label {
  color: var(--color-muted);
  font-family: var(--font-mono-medium), ui-monospace, monospace;
  font-size: var(--type-label-size);
  line-height: var(--type-label-line);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.figure-value {
  color: var(--color-ink);
  font-family: var(--font-mono), ui-monospace, monospace;
  font-size: var(--type-money-size);
  line-height: var(--type-money-line);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.rows {
  margin: 0 0 1rem;
}

.row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--color-line);
}

.row dd {
  margin: 0;
  font-family: var(--font-mono), ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.row-strong {
  color: var(--color-ink);
  font-family: var(--font-medium), system-ui, sans-serif;
}

.disclosure {
  margin: 0 0 1rem;
  border-top: 1px solid var(--color-line);
  border-bottom: 1px solid var(--color-line);
}

.disclosure > summary {
  padding: 0.75rem 0;
  color: var(--color-accent-text);
  font-family: var(--font-medium), system-ui, sans-serif;
  cursor: pointer;
}

.list {
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}

.list > li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--color-line);
}

.confirm {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: 0.75rem 0 0;
  padding: 0.75rem 1rem 0.25rem;
  border-radius: var(--radius-control);
  background: var(--color-surface);
}

.confirm > p {
  flex-basis: 100%;
}

/* The letter as it will be printed: every block in full, on its own sheet. */
.letter-paper {
  margin: 0 0 1rem;
  padding: 1.5rem;
  border: 1px solid var(--color-control);
  border-radius: var(--radius-panel);
  background: var(--color-white);
}

.letter-line {
  margin: 0 0 0.625rem;
  white-space: pre-line;
}

/* The subject and the signature stand a little apart from the lines before them (mora.css .paper p.strong). */
.letter-strong {
  margin-top: 1rem;
  color: var(--color-ink);
  font-family: var(--font-medium), system-ui, sans-serif;
}

/* The letter's invoice and amount rows: the label wraps in its own column and the amount stays on its first line,
   right-aligned, as the reference's table cells do. */
.letter-paper .rows {
  margin: 0.625rem 0 1rem;
}

.letter-paper .row {
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 0 0.75rem;
}

.letter-paper .row dt {
  flex: 1 1 auto;
  min-width: 0;
}

.letter-paper .row dd {
  flex: none;
  white-space: nowrap;
}

.letter-paper .row-strong {
  border-bottom: 0;
}

.letter-small {
  color: var(--color-muted);
  font-size: var(--type-small-size);
  line-height: var(--type-small-line);
}

/* The landing (docs/design/redesign/css/mora.css): full width under the header, each block on the page measure. */
main#app:has(> .hero) {
  max-width: none;
  padding: 0;
}

.kicker {
  margin: 0;
  color: var(--color-muted);
  font-family: var(--font-mono-medium), ui-monospace, monospace;
  font-size: var(--type-label-size);
  line-height: var(--type-label-line);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.money {
  font-family: var(--font-mono), ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

/* The call to action: its arrow carries the cursor's cyan, like the square before the label. */
.button-primary .arrow {
  color: var(--color-cyan);
  font-family: var(--font-regular), system-ui, sans-serif;
  font-size: var(--type-symbol-size);
  line-height: var(--type-symbol-line);
}

/* Hero: the promise and its action on the left, the worked example on the right. */
.hero {
  border-bottom: 1px solid var(--color-line);
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 3.5rem;
  align-items: center;
  padding-top: 4rem;
  padding-bottom: 4.5rem;
}

.hero .wrap > * {
  min-width: 0;
}

.hero h1 {
  margin: 1rem 0 1.375rem;
  font-family: var(--font-light), system-ui, sans-serif;
  font-size: var(--type-display-size);
  line-height: var(--type-display-line);
  letter-spacing: -0.04em;
}

.hero .lead {
  max-width: 32ch;
  margin-bottom: 1.875rem;
  font-size: var(--type-lead-size);
  line-height: var(--type-lead-line);
}

.hero .lead b {
  color: var(--color-accent-text);
  font-family: var(--font-medium), system-ui, sans-serif;
  font-weight: normal;
}

.hero .cta {
  margin: 0;
}

.hero .scope {
  margin: 1.125rem 0 0;
  color: var(--color-muted);
  font-size: var(--type-small-size);
  line-height: var(--type-small-line);
}

/* The three steps in short, under the action; the same icons as the full steps. */
.mini-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.625rem;
  margin: 1.75rem 0 0;
  padding: 0;
  list-style: none;
}

.mini-steps li {
  display: grid;
  align-content: start;
  padding: 0.875rem;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-control);
  background: var(--color-white);
  font-size: var(--type-mini-step-size);
  line-height: var(--type-mini-step-line);
}

/* The icon, then the number close above its words, as in the reference's tiles. */
.mini-steps .step-icon {
  margin-bottom: 0.625rem;
}

.mini-steps b {
  margin-bottom: 0.25rem;
  color: var(--color-accent-text);
  font-family: var(--font-mono-medium), ui-monospace, monospace;
  font-size: var(--type-step-number-size);
  line-height: var(--type-step-number-line);
  font-weight: normal;
  letter-spacing: 0.08em;
}

/* A step's icon: a tinted box with the cursor's cyan as its underline. */
.step-icon {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-icon);
  background: var(--color-accent-tint);
  box-shadow: inset 0 -3px 0 var(--color-cyan);
  color: var(--color-accent-text);
}

.step-icon .icon {
  width: 1.625rem;
  height: 1.625rem;
}

/* The worked example: an invoice that ages into what is owed today. Without .is-aging it shows its final state.
   Its side margins keep the card about 380 px wide in the hero's right column, as in the reference. */
.example {
  position: relative;
  margin: 0 2.5rem;
  padding: 1.625rem 1.75rem 1.75rem;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-card);
  background: var(--color-white);
}

/* Paper lifted off the page: the worked example and the result's card. */
.example,
.claim-card {
  box-shadow:
    0 1px 0 var(--color-shadow-near),
    0 14px 36px -14px var(--color-shadow-far);
}

.example .tag {
  position: absolute;
  top: -0.8125rem;
  left: 1.5rem;
  padding: 0.4375rem 0.625rem;
  border-radius: var(--radius-tag);
  background: var(--color-ink);
  color: var(--color-white);
  font-family: var(--font-mono-medium), ui-monospace, monospace;
  font-size: var(--type-tag-size);
  line-height: var(--type-tag-line);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* The stamp: how late, at a glance, with the cursor's cyan square before it. */
.stamp {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4375rem 0.625rem 0.375rem;
  border: 2px solid var(--color-accent);
  border-radius: var(--radius-stamp);
  background: var(--color-white);
  color: var(--color-accent-text);
  font-family: var(--font-mono-medium), ui-monospace, monospace;
  font-size: var(--type-label-size);
  line-height: var(--type-label-line);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  --stamp-tilt: 6deg;
  transform: rotate(var(--stamp-tilt));
}

.stamp::before {
  content: '';
  flex: none;
  width: 0.5rem;
  height: 0.5rem;
  background: var(--color-cyan);
}

.example .stamp {
  position: absolute;
  top: -1rem;
  right: 1.125rem;
}

/* The invoice row, the element after the stamp: what is unpaid and since when, and its amount. The narrow gap lets
   the due date break after its day, as in the reference. */
.example > .stamp + * {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 0 0.25rem;
  margin: 0;
  padding-bottom: 1rem;
  border-bottom: 1px dashed var(--color-control);
  color: var(--color-muted);
  font-size: var(--type-small-size);
  line-height: var(--type-small-line);
}

.example > .stamp + * b {
  display: block;
  color: var(--color-ink);
  font-family: var(--font-medium), system-ui, sans-serif;
  font-size: var(--type-body-size);
  line-height: var(--type-body-line);
  font-weight: normal;
}

.example > .stamp + * > :last-child {
  grid-row: 1;
  grid-column: 2;
  color: var(--color-ink);
  font-size: var(--type-amount-size);
  line-height: var(--type-amount-line);
}

/* The track from the due date to today: a line, its fill and the cyan mark of today. */
.track {
  position: relative;
  height: 3rem;
  margin: 1.5rem 0 0.5rem;
}

.track-from,
.track-today {
  position: absolute;
  top: 0;
  color: var(--color-muted);
  font-family: var(--font-mono-medium), ui-monospace, monospace;
  font-size: var(--type-label-size);
  line-height: var(--type-label-line);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.track-from {
  left: 0;
}

.track-today {
  right: 0;
}

.track-rule {
  position: absolute;
  top: 1.375rem;
  right: 0;
  left: 0;
  border-top: 2px solid var(--color-raised);
}

.track-fill {
  position: absolute;
  top: 1.3125rem;
  left: 0;
  width: 100%;
  height: 0.25rem;
  border-radius: var(--radius-track);
  background: var(--color-accent);
}

.track-dot {
  position: absolute;
  top: 0.875rem;
  left: calc(100% - 0.5625rem);
  width: 1.125rem;
  height: 1.125rem;
  border-radius: var(--radius-dot);
  background: var(--color-cyan);
}

.track-late {
  position: absolute;
  right: 0;
  bottom: -0.125rem;
  left: 0;
  margin: 0;
  color: var(--color-ink);
  font-size: var(--type-small-size);
  line-height: var(--type-small-line);
  text-align: center;
}

.track-late b {
  font-family: var(--font-medium), system-ui, sans-serif;
  font-weight: normal;
}

/* What is owed today: its label, the total, what the delay adds and how the total adds up. */
.example .track + p {
  margin: 1.375rem 0 0;
  color: var(--color-muted);
  font-size: var(--type-small-size);
  line-height: var(--type-small-line);
}

.example [data-amount="example-total"] {
  display: block;
  margin-top: 0.25rem;
  color: var(--color-ink);
  font-size: var(--type-total-size);
  line-height: var(--type-total-line);
}

/* What the delay adds, as a tinted chip: on the example and on the result's card. */
.example [data-example="extra"],
.claim-card .extra {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.625rem;
  margin: 0.75rem 0 0;
  padding: 0.625rem 0.875rem;
  border-radius: var(--radius-chip);
  background: var(--color-accent-tint);
  color: var(--color-accent-strong);
  font-size: var(--type-extra-size);
  line-height: var(--type-extra-line);
}

.example [data-example="extra"] b,
.claim-card .extra b {
  font-family: var(--font-mono-medium), ui-monospace, monospace;
  font-size: var(--type-extra-amount-size);
  line-height: var(--type-extra-amount-line);
  font-weight: normal;
  white-space: nowrap;
}

.example [data-example="sum"] {
  margin: 0.75rem 0 0;
  color: var(--color-muted);
  font-size: var(--type-small-size);
  line-height: var(--type-small-line);
}

/* The example ages once: the fill and today's mark run to the end, then the stamp settles. */
.example.is-aging .track-fill {
  animation: track-fill var(--motion-age) var(--motion-easing) both;
}

.example.is-aging .track-dot {
  animation: track-dot var(--motion-age) var(--motion-easing) both;
}

.example.is-aging .stamp {
  animation: stamp-settle var(--motion-settle) var(--motion-easing) var(--motion-age) both;
}

@keyframes track-fill {
  from {
    width: 0;
  }

  to {
    width: 100%;
  }
}

@keyframes track-dot {
  from {
    left: -0.5625rem;
  }

  to {
    left: calc(100% - 0.5625rem);
  }
}

@keyframes stamp-settle {
  from {
    opacity: 0;
    transform: rotate(14deg) scale(1.4);
  }

  to {
    opacity: 1;
    transform: rotate(var(--stamp-tilt)) scale(1);
  }
}

/* The phone's compact example, inside the first screen: the invoice, an arrow, what is owed today. Phone only. */
.example-strip {
  display: none;
}

.strip-tag {
  position: absolute;
  top: -0.6875rem;
  left: 0.875rem;
  padding: 0.375rem 0.5rem;
  border-radius: var(--radius-tag);
  background: var(--color-ink);
  color: var(--color-white);
  font-family: var(--font-mono-medium), ui-monospace, monospace;
  font-size: var(--type-tag-phone-size);
  line-height: var(--type-tag-phone-line);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* The two ends, the elements after the tag and after the arrow: a label, then the amount. */
.example-strip > .strip-tag + *,
.example-strip > .arrow + * {
  min-width: 0;
  color: var(--color-muted);
  font-size: var(--type-body-phone-size);
  line-height: var(--type-body-phone-line);
}

.example-strip > .strip-tag + * > :last-child,
.example-strip > .arrow + * > :last-child {
  display: block;
  margin-top: 0.125rem;
  color: var(--color-ink);
  font-size: var(--type-strip-amount-size);
  line-height: var(--type-strip-amount-line);
}

.example-strip > .arrow + * > :last-child {
  color: var(--color-accent-text);
  font-family: var(--font-mono-medium), ui-monospace, monospace;
}

.example-strip > .arrow {
  color: var(--color-accent-text);
  font-size: var(--type-symbol-size);
  line-height: var(--type-symbol-line);
}

.strip-more {
  grid-column: 1 / -1;
  margin: 0.375rem 0 0;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--color-control);
  color: var(--color-accent-strong);
  font-size: var(--type-body-phone-size);
  line-height: var(--type-body-phone-line);
}

/* The landing's sections: a kicker, a title and the block. */
.section {
  padding: 5rem 0;
  border-bottom: 1px solid var(--color-line);
}

.section h2 {
  max-width: 24ch;
  margin: 0.625rem 0 0.75rem;
  font-family: var(--font-light), system-ui, sans-serif;
  font-size: var(--type-section-title-size);
  line-height: var(--type-section-title-line);
  letter-spacing: -0.03em;
}

.section h3 {
  color: var(--color-ink);
  font-family: var(--font-regular), system-ui, sans-serif;
  font-weight: normal;
  letter-spacing: -0.01em;
}

.section .sub,
[data-rates="now"] {
  max-width: 52ch;
  color: var(--color-muted);
  font-size: var(--type-intro-size);
  line-height: var(--type-intro-line);
}

/* How it works: three steps, each with its icon. */
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  margin: 2.5rem 0 0;
  padding: 0;
  list-style: none;
}

.steps li {
  padding: 1.625rem;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-panel);
  background: var(--color-white);
}

.steps .step-icon {
  width: 4rem;
  height: 4rem;
  border-radius: var(--radius-panel);
}

.steps .step-icon .icon {
  width: 2.25rem;
  height: 2.25rem;
}

.step-n,
.ladder-n {
  margin: 1.25rem 0 0;
  color: var(--color-accent-text);
  font-family: var(--font-mono-medium), ui-monospace, monospace;
  font-size: var(--type-label-size);
  line-height: var(--type-label-line);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.steps h3 {
  margin: 0.625rem 0 0.5rem;
  font-size: var(--type-card-title-size);
  line-height: var(--type-card-title-line);
}

.steps p:last-child,
.ladder p:last-child {
  margin: 0;
  color: var(--color-muted);
  font-size: var(--type-small-size);
  line-height: var(--type-small-line);
}

/* The letters: a ladder that rises from the kindest to the firmest. */
.ladder {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  margin: 2.5rem 0 0;
  padding: 0;
  list-style: none;
}

.ladder li {
  padding: 1.375rem;
  border: 1px solid var(--color-line);
  background: var(--color-white);
}

.ladder li:nth-child(1) {
  border-radius: var(--radius-panel) 0 0 var(--radius-panel);
}

.ladder li:nth-child(2) {
  padding-top: 2.875rem;
  border-left: 0;
}

.ladder li:nth-child(3) {
  padding-top: 4.375rem;
  border-left: 0;
  border-radius: 0 var(--radius-panel) var(--radius-panel) 0;
  background: var(--color-accent-tint);
}

.ladder-n {
  margin: 0;
  letter-spacing: 0.08em;
}

.ladder h3 {
  margin: 0.625rem 0 0.375rem;
  font-size: var(--type-card-title-small-size);
  line-height: var(--type-card-title-small-line);
}

/* The doubts: closed questions, two columns; the + and − are drawn, the open state is the browser's. */
.faq {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 0.875rem;
  margin-top: 2.25rem;
}

.faq .disclosure {
  margin: 0;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-control);
  background: var(--color-white);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--size-question);
  padding: 0.875rem 1.25rem;
  color: var(--color-ink);
  font-family: var(--font-regular), system-ui, sans-serif;
  font-size: var(--type-question-size);
  line-height: var(--type-question-line);
  list-style: none;
  cursor: pointer;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '+';
  display: grid;
  flex: none;
  place-items: center;
  box-sizing: content-box;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--color-control);
  border-radius: 50%;
  color: var(--color-accent-text);
  font-family: var(--font-light), system-ui, sans-serif;
  font-size: var(--type-symbol-size);
  line-height: var(--type-symbol-line);
}

.faq details[open] summary::after {
  content: '−';
}

.faq .disclosure > p {
  margin: 0;
  padding: 0 1.25rem 1.25rem;
  color: var(--color-muted);
  font-size: var(--type-small-size);
  line-height: var(--type-small-line);
}

/* Where the numbers come from: the text on the left, the half-year rates chart on the right. */
.wrap:has(> .rates-chart) {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
  column-gap: 2.5rem;
}

.wrap:has(> .rates-chart) > :not(.rates-chart) {
  grid-column: 1;
}

/* The source line sits right under the paragraph; the current rate is bold in it. */
[data-rates="now"] {
  margin-bottom: 0;
}

[data-rates="now"] b {
  color: var(--color-ink);
  font-family: var(--font-medium), system-ui, sans-serif;
  font-weight: bold;
}

.rates-source {
  margin: 0;
  color: var(--color-muted);
  font-size: var(--type-small-size);
  line-height: var(--type-small-line);
}

.rates-source a {
  display: inline-flex;
  align-items: center;
  min-height: var(--touch);
}

/* The bars, as in the reference: each column is the chart's whole height and a bar is that share of it, so its value
   above squeezes the tallest ones a little; the chart's bottom margin holds the half-year labels. */
.rates-chart {
  display: grid;
  grid-row: 1 / span 4;
  grid-column: 2;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  gap: 0.375rem;
  height: var(--size-chart);
  margin-bottom: 2.5rem;
  border-bottom: 2px solid var(--color-ink);
}

.rates-bar {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
  min-width: 0;
}

.rates-value {
  margin-bottom: 0.375rem;
  font-family: var(--font-mono-medium), ui-monospace, monospace;
  font-size: var(--type-chart-value-size);
  line-height: var(--type-chart-value-line);
  text-align: center;
  white-space: nowrap;
}

.rates-fill {
  flex: 0 1 auto;
  min-height: 0;
  height: var(--rate-height);
  border-radius: var(--radius-bar) var(--radius-bar) 0 0;
  background: var(--color-accent-soft);
}

.rates-bar.now .rates-fill {
  background: var(--color-accent);
}

.rates-label {
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  margin-top: 0.5rem;
  color: var(--color-muted);
  font-family: var(--font-mono), ui-monospace, monospace;
  font-size: var(--type-chart-label-size);
  line-height: var(--type-chart-label-line);
  text-align: center;
}

/* The final call: one dark box, the question and the action. */
.final {
  padding: 5rem 0;
}

.final-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 2.75rem;
  border-radius: var(--radius-feature);
  background: var(--color-ink);
  color: var(--color-white);
}

.final h2 {
  max-width: 20ch;
  margin: 0;
  color: var(--color-white);
  font-family: var(--font-light), system-ui, sans-serif;
  font-size: var(--type-final-title-size);
  line-height: var(--type-final-title-line);
  letter-spacing: -0.03em;
}

.final .button-primary {
  margin: 0;
  border-color: var(--color-white);
  background: var(--color-white);
  color: var(--color-ink);
}

.final .button-primary:hover {
  border-color: var(--color-surface);
  background: var(--color-surface);
  color: var(--color-ink);
}

.final .button-primary .arrow {
  color: var(--color-accent-text);
}

/* The two questions (docs/design/redesign/css/mora.css .ask, its final cascade). The form flows as a block, as in the
   reference, so the fields' margins collapse the same way. The bottom padding plus the footer's top margin give the
   reference's 120 px. */
.ask {
  padding-bottom: 4.5rem;
}

.ask .form {
  display: block;
  margin: 0;
}

.ask .form-errors {
  margin-bottom: 1rem;
}

/* The way back, and how far along the questions are: one bar per question on a three-column track. */
.progress {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2.25rem;
}

/* The way back a step (components.ts backLink): on the questions' progress row and above the result. */
.back {
  display: inline-flex;
  align-items: center;
  min-width: var(--touch);
  min-height: var(--touch);
  color: var(--color-ink);
  font-family: var(--font-regular), system-ui, sans-serif;
  font-size: var(--type-back-size);
  line-height: var(--type-back-line);
  text-decoration: underline;
  text-underline-offset: 5px;
}

/* It stays ink on hover, unlike other links: its underline already marks it. */
.back:hover {
  color: var(--color-ink);
}

/* A no-break space after the arrow keeps the underline unbroken under «← Atrás», as in the reference. */
.back-arrow::after {
  content: '\a0';
}

.progress .meter {
  display: grid;
  flex: 1;
  gap: 0.5rem;
}

.progress .meter-text {
  color: var(--color-muted);
  font-family: var(--font-mono-medium), ui-monospace, monospace;
  font-size: var(--type-progress-size);
  line-height: var(--type-progress-line);
  letter-spacing: 0.06em;
}

.progress .bars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.375rem;
}

.progress .bars i {
  height: var(--size-meter);
  border-radius: var(--radius-meter);
  background: var(--color-raised);
}

.progress .bars i.on {
  background: var(--color-accent);
}

.ask h1 {
  margin: 0 0 0.75rem;
  font-size: var(--type-h1-size);
  line-height: var(--type-h1-line);
}

.ask .hint {
  margin: 0 0 1.125rem;
  color: var(--color-muted);
  font-size: var(--type-ask-hint-size);
  line-height: var(--type-ask-hint-line);
}

.ask .field {
  align-content: start;
  margin-bottom: 0.625rem;
}

.ask .field > label {
  font-size: var(--type-field-label-size);
  line-height: var(--type-field-label-line);
}

/* The amount box holds the typed figure and its €; a date is its own box. Both are the reference's tall fields. */
.input-box,
.ask input[type="date"] {
  min-height: var(--size-field);
  border: 2px solid var(--color-control);
  border-radius: var(--radius-control);
  background: var(--color-white);
}

.input-box {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0 1.25rem;
}

.input-box input {
  flex: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--color-ink);
  font-family: var(--font-mono), ui-monospace, monospace;
  font-size: var(--type-input-amount-size);
  line-height: var(--type-input-amount-line);
  font-variant-numeric: tabular-nums;
}

.input-box input::placeholder,
.claimit .field input::placeholder {
  color: var(--color-placeholder);
}

.ask input[type="date"] {
  padding: 0 1.25rem;
  font-family: var(--font-mono), ui-monospace, monospace;
  font-size: var(--type-input-date-size);
  line-height: var(--type-input-date-line);
}

.input-box .unit {
  color: var(--color-muted);
  font-family: var(--font-mono), ui-monospace, monospace;
  font-size: var(--type-unit-size);
  line-height: var(--type-unit-line);
}

/* A focused field: the reference's border and halo. The keyboard ring is moved from the amount input to its box. */
.input-box:focus-within,
.ask input[type="date"]:focus {
  border-color: var(--color-accent-text);
  box-shadow: 0 0 0 4px var(--color-accent-tint);
}

.input-box input:focus-visible {
  outline: none;
}

.input-box:has(input:focus-visible) {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
}

/* A field in error: its border turns, and the error box under it carries the «!» and the sentence. */
.input-box:has(input[aria-invalid="true"]),
.ask input[type="date"][aria-invalid="true"] {
  border-color: var(--color-danger);
}

.input-box input[aria-invalid="true"],
.ask input[type="date"][aria-invalid="true"]:not(:focus) {
  box-shadow: none;
}

/* An action that reads as a link: «¿Dónde la encuentro?» beside it, and «No acordamos fecha». */
.text-link {
  display: inline-flex;
  align-items: center;
  min-height: var(--touch);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--color-accent-text);
  font-family: var(--font-medium), system-ui, sans-serif;
  font-size: var(--type-text-link-size);
  line-height: var(--type-text-link-line);
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 5px;
}

.text-link:hover {
  color: var(--color-accent-strong);
}

/* The two links share one row at 1280; the open example takes the whole row and pushes the other link under it. */
.linkrow {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0 1.75rem;
}

.where {
  flex: 0 1 auto;
  margin: 0;
  border: 0;
}

.where[open] {
  flex-basis: 100%;
}

.where summary {
  display: flex;
  align-items: center;
  min-height: var(--touch);
  padding: 0;
  color: var(--color-accent-text);
  font-family: var(--font-medium), system-ui, sans-serif;
  font-size: var(--type-text-link-size);
  line-height: var(--type-text-link-line);
  list-style: none;
  text-decoration: underline;
  text-underline-offset: 5px;
  cursor: pointer;
}

.where summary::-webkit-details-marker {
  display: none;
}

.where[open] summary {
  margin-bottom: 0.5rem;
}

.where > p {
  margin: 0;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-notice);
  background: var(--color-surface);
}

.where > p b,
.found b,
.choice-card b {
  font-family: var(--font-medium), system-ui, sans-serif;
  font-weight: normal;
}

/* «Sin fecha acordada»: the chip above the delivery question, with the way back to an agreed date. Its link is the
   reference's 40 px inline link, so the chip keeps the reference's height. */
.modechip {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
  margin: 0 0 0.875rem;
  padding: 0.375rem 0.875rem;
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  color: var(--color-muted);
  font-size: var(--type-small-size);
  line-height: var(--type-body-line);
}

.modechip .text-link {
  min-height: var(--size-chip-link);
}

/* The legal deadline, worked out as the delivery date is typed: a tick, then the date. The tick is drawn out of the
   flow, in the left padding, so the sentence and its bold date wrap as one line of text. */
.found {
  position: relative;
  margin: 0.625rem 0 1.375rem;
  padding: 1rem 1.125rem 1rem 3.5rem;
  border-radius: var(--radius-control);
  background: var(--color-accent-tint);
  color: var(--color-accent-strong);
  font-size: var(--type-small-size);
  line-height: var(--type-small-line);
  animation: found-enter var(--motion-screen) var(--motion-easing) both;
}

.found::before {
  content: '';
  position: absolute;
  top: 1rem;
  left: 1.375rem;
  width: 0.875rem;
  height: 1.5rem;
  border-right: 3px solid var(--color-accent);
  border-bottom: 3px solid var(--color-accent);
  transform: rotate(45deg) translateY(-0.25rem);
}

@keyframes found-enter {
  from {
    opacity: 0;
    transform: translateY(0.5rem);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* «¿Ya te ha pagado?»: a rule above, the legend as a line of its own (floated, so it does not sit in the border), then
   two radio cards side by side, on the phone too. */
.field-cards {
  border-top: 1px solid var(--color-line);
}

.ask .field-cards {
  margin: 0.875rem 0 1.25rem;
  padding: 1rem 0 0;
}

.field-cards > legend {
  float: left;
  width: 100%;
  margin: 0;
  padding: 0;
  font-family: var(--font-regular), system-ui, sans-serif;
  font-size: var(--type-legend-size);
  line-height: var(--type-legend-line);
  letter-spacing: -0.01em;
}

.choice-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  clear: both;
}

.choice-card {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  min-height: var(--size-choice);
  padding: 0.75rem 1rem;
  border: 2px solid var(--color-control);
  border-radius: var(--radius-panel);
  background: var(--color-white);
  color: var(--color-ink);
  font-size: var(--type-choice-size);
  line-height: var(--type-choice-line);
  cursor: pointer;
}

.choice-card input {
  flex: none;
  width: var(--size-radio);
  height: var(--size-radio);
  margin: 0;
  accent-color: var(--color-accent-text);
}

.choice-card small {
  display: block;
  margin-top: 0.25rem;
  color: var(--color-muted);
  font-size: var(--type-small-size);
  line-height: var(--type-small-line);
}

/* The chosen card: its border and tint change, and its radio dot keeps the state visible without colour. */
.choice-card:has(input:checked) {
  border-color: var(--color-accent-text);
  background: var(--color-accent-tint);
}

.choice-card:has(input:focus-visible) {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
}

/* The payment date belongs to «Sí, pero tarde»: under the cards, the button below it, at the reference's spacing. */
.ask .field-cards:has(+ .field:not([hidden])) {
  margin-bottom: 0;
}

.ask .field-cards + .field {
  margin: 1.125rem 0 1.875rem;
}

/* No vertical padding, as the reference's .btn: a label on two lines still fits the 60 px. */
.ask .cta {
  width: 100%;
  min-height: var(--size-action);
  margin: 0;
  padding-top: 0;
  padding-bottom: 0;
}

/* The reassurance under the first question, with its lock. */
.private {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin: 1.375rem 0 0;
  color: var(--color-muted);
  font-size: var(--type-small-size);
  line-height: var(--type-small-line);
}

.private .icon {
  flex: none;
  width: var(--size-icon-small);
  height: var(--size-icon-small);
}

/* The result (docs/design/redesign/css/mora.css .claim, .claimit): the claim as a paper card with its stamp, then
   «Ahora, reclámaselo» right under it. The card's shadow and its «+amount» chip are shared with the example above. */
.claim-card {
  position: relative;
  margin: 0;
  padding: 2rem 2.25rem;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-claim);
  background: var(--color-white);
  container-type: inline-size;
}

.claim-card .stamp {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
}

/* The result arrives once: the total counts up, then the stamp settles. */
.claim-card.is-arriving .stamp {
  animation: stamp-settle var(--motion-settle) var(--motion-easing) var(--motion-count-up) both;
}

.claim-card h1 {
  margin: 0.5rem 0 0;
  font-family: var(--font-regular), system-ui, sans-serif;
  font-size: var(--type-result-title-size);
  line-height: var(--type-result-title-line);
  letter-spacing: normal;
}

/* The total stays on one line and fits its card: the token is the size, unless the total's characters
   (--total-chars, set by result.ts; --mono-advance em each) would be wider than the card's content box. */
.claim-card .money-huge {
  display: block;
  margin-top: 0.375rem;
  color: var(--color-ink);
  font-size: min(var(--type-result-total-size), calc(100cqi / (var(--total-chars) * var(--mono-advance))));
  line-height: var(--type-result-total-line);
  white-space: nowrap;
  overflow-wrap: normal;
}

.claim-card .extra {
  padding: 0.75rem 1rem;
  font-size: var(--type-result-extra-size);
  line-height: var(--type-result-extra-line);
}

.claim-card .extra b {
  font-size: var(--type-result-extra-amount-size);
  line-height: var(--type-result-extra-amount-line);
}

/* How much more each further day costs, after the calendar icon. */
.claim-card .daily {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1rem 0 0;
  font-size: var(--type-result-daily-size);
  line-height: var(--type-result-daily-line);
}

.claim-card .daily .icon {
  flex: none;
  width: var(--size-daily-icon);
  height: var(--size-daily-icon);
  color: var(--color-accent-text);
}

.claim-card .daily b {
  color: var(--color-accent-text);
  font-family: var(--font-mono-medium), ui-monospace, monospace;
  font-weight: normal;
  white-space: nowrap;
}

/* «Ahora, reclámaselo»: the letter's three details on a tinted panel, marked by the cursor's cyan on its left edge. */
.claimit {
  margin-top: 1.75rem;
  padding: 2rem 2.25rem;
  border: 1px solid var(--color-accent-soft);
  border-radius: var(--radius-claim);
  background: var(--color-accent-tint);
  box-shadow: inset 4px 0 0 var(--color-cyan);
}

.claimit h2 {
  margin: 0 0 0.375rem;
  font-family: var(--font-light), system-ui, sans-serif;
  font-size: var(--type-panel-title-size);
  line-height: var(--type-panel-title-line);
  letter-spacing: -0.02em;
}

.claimit .lead {
  margin-bottom: 1.375rem;
  color: var(--color-accent-strong);
  font-size: var(--type-panel-lead-size);
  line-height: var(--type-panel-lead-line);
}

.claimit .form {
  margin: 0;
}

.claimit .grid3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

/* Each field is its label, an input of one fixed height, then its hint: a hint under one input never moves another. */
.claimit .field {
  align-content: start;
}

.claimit .field input {
  height: var(--size-field-text);
  min-height: var(--size-field-text);
  padding: 0 1.25rem;
  font-size: var(--type-input-text-size);
  line-height: var(--type-input-text-line);
}

.claimit .field-check input {
  width: var(--size-check);
  height: var(--size-check);
  min-height: var(--size-check);
  padding: 0;
}

/* «Ver mi carta» and the reassurance that nothing is sent, on one line while they fit. */
.claim-go {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  margin-top: 0.5rem;
}

.claim-go .private {
  margin: 0;
}

/* The result takes the page measure, as in the reference: the total stays on one line beside the stamp. */
main#app:has(> .claim-card) {
  max-width: var(--size-page);
}

/* «← Cambiar los datos» stands apart from the card, as the reference's progress row does. */
main#app:has(> .claim-card) > .back {
  margin-bottom: 2.5rem;
}

/* «Cómo sale esta cifra» (mora.css .proof, .sum, .hbars): the rows that add up to the total, then the interest per
   half-year as bars, then where the rates come from. */
.proof {
  margin-top: 3rem;
}

.proof h2 {
  margin: 0 0 1.125rem;
  font-family: var(--font-light), system-ui, sans-serif;
  font-size: var(--type-proof-title-size);
  line-height: var(--type-proof-title-line);
  letter-spacing: -0.02em;
}

.proof h3 {
  margin: 2.25rem 0 0.375rem;
  color: var(--color-ink);
  font-family: var(--font-regular), system-ui, sans-serif;
  font-size: var(--type-proof-subtitle-size);
  font-weight: normal;
  line-height: var(--type-proof-subtitle-line);
}

.proof .small,
.proof .bars-invoice {
  margin-bottom: 1.125rem;
  color: var(--color-muted);
  font-size: var(--type-small-size);
  line-height: var(--type-small-line);
}

/* The sum: one row per figure, the sign in a circle, the amount on the right; the total row is ink. */
.sum {
  overflow: hidden;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-sum);
  background: var(--color-white);
}

.sum .row {
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.875rem;
  padding: 1.125rem 1.5rem;
  border-bottom: 1px solid var(--color-line);
}

.sum .op {
  display: grid;
  place-items: center;
  width: var(--size-op);
  height: var(--size-op);
  border-radius: 50%;
  background: var(--color-surface);
  color: var(--color-ink);
  font-family: var(--font-mono), ui-monospace, monospace;
  font-size: var(--type-sum-op-size);
  line-height: var(--type-sum-op-line);
}

.sum .row-text {
  font-size: var(--type-sum-label-size);
  line-height: var(--type-sum-label-line);
}

.sum .row-text small {
  display: block;
  color: var(--color-muted);
  font-size: var(--type-small-size);
  line-height: var(--type-body-line);
}

.sum .money {
  font-size: var(--type-sum-money-size);
  line-height: var(--type-sum-money-line);
  text-align: right;
}

.sum .row-plus .money {
  color: var(--color-accent-text);
}

.sum .row-total {
  border-bottom: 0;
  background: var(--color-ink);
  color: var(--color-white);
}

.sum .row-total .op {
  background: var(--color-on-ink-veil);
  color: var(--color-white);
}

.sum .row-total small {
  color: var(--color-on-ink-muted);
}

.sum .row-total .money {
  font-size: var(--type-sum-total-money-size);
  line-height: var(--type-sum-total-money-line);
}

/* The bars: the half-year's dates and rate, its bar relative to the widest, its interest. Drawn still, never animated. */
.hbars {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.proof .hbars + .bars-invoice {
  margin-top: 1.5rem;
}

.hbars li {
  display: grid;
  grid-template-columns: var(--size-bar-when) minmax(0, 1fr) var(--size-bar-money);
  align-items: center;
  gap: 1rem;
}

/* The dates and the rate keep the body's line height, as the reference's inherit it. */
.hbars .when {
  font-size: var(--type-small-size);
  line-height: var(--type-body-line);
}

.hbars .when small {
  display: block;
  color: var(--color-muted);
  font-size: var(--type-small-size);
  line-height: var(--type-body-line);
}

.hbars .bar-track {
  display: block;
  overflow: hidden;
  height: var(--size-bar-track);
  border-radius: var(--radius-bar-track);
  background: var(--color-surface);
}

/* breakdown.ts sets --bar-width on each fill; the 0% only stands in until it does. */
.hbars .bar-fill {
  --bar-width: 0%;
  display: block;
  width: var(--bar-width);
  height: 100%;
  border-radius: var(--radius-bar-track);
  background: var(--color-accent);
}

.hbars .money {
  font-size: var(--type-bar-money-size);
  line-height: var(--type-bar-money-line);
  text-align: right;
}

/* The law and the BOE publications, then the add-another-invoice action and the guide line. */
.basis {
  margin-top: 1.25rem;
  color: var(--color-muted);
  font-size: var(--type-small-size);
  line-height: var(--type-small-line);
}

/* The BOE links run inside the sentence and wrap with it, line by line (an inline link is exempt from the touch size). */
.basis .link {
  display: inline;
}

.add-invoice {
  margin-top: 1.75rem;
}

/* Pinned here as well as on .text-link: the one action after the figure keeps its touch height. */
.add-invoice .text-link {
  min-height: var(--touch);
}

.guide {
  margin-top: 1.625rem;
  color: var(--color-muted);
  font-size: var(--type-small-size);
  line-height: var(--type-small-line);
}

/* The letters (docs/design/redesign/css/mora.css .picker, .lsplit): the sequence, a compact three-button picker, then
   the chosen letter beside its introduction and its actions. The panel takes the page measure, as the result does. */
main#app:has(> .lsplit) {
  max-width: var(--size-page);
  padding-top: 2.75rem;
}

/* «Tu carta» (mora.css h1.lt): apart from the kicker above it and from the sequence below it. */
h1.lt {
  margin: 0.5rem 0 1.25rem;
}

.seqline {
  max-width: 56ch;
  margin: -0.5rem 0 1.375rem;
  color: var(--color-muted);
  font-size: var(--type-intro-size);
  line-height: var(--type-body-line);
}

.picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.625rem;
  max-width: var(--size-picker);
  margin-bottom: 1.75rem;
}

.pick {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  min-height: var(--size-pick);
  padding: 0.75rem 1rem;
  border: 2px solid var(--color-control);
  border-radius: var(--radius-panel);
  background: var(--color-white);
  color: var(--color-ink);
  font-family: var(--font-medium), system-ui, sans-serif;
  font-size: var(--type-pick-size);
  line-height: var(--type-pick-line);
  text-align: left;
}

.pick small {
  display: block;
  color: var(--color-muted);
  font-family: var(--font-regular), system-ui, sans-serif;
  font-size: var(--type-pick-small-size);
  line-height: var(--type-pick-small-line);
}

/* The chosen letter: its border, tint and underline change, and aria-pressed carries the state to assistive tech. */
.pick[aria-pressed="true"] {
  border-color: var(--color-accent-text);
  background: var(--color-accent-tint);
  box-shadow: inset 0 -4px 0 var(--color-accent);
}

/* How firm a letter is: three rising bars, as many filled as its place in the sequence. */
.pick .lvl {
  display: flex;
  flex: none;
  align-items: flex-end;
  gap: 0.1875rem;
  height: 1.875rem;
}

.pick .lvl i {
  width: 0.5rem;
  border-radius: var(--radius-track);
  background: var(--color-raised);
}

.pick .lvl i:nth-child(1) {
  height: 0.625rem;
}

.pick .lvl i:nth-child(2) {
  height: 1.25rem;
}

.pick .lvl i:nth-child(3) {
  height: 1.875rem;
}

.pick[data-letter="reminder"] .lvl i:nth-child(-n + 1),
.pick[data-letter="demand"] .lvl i:nth-child(-n + 2),
.pick[data-letter="burofax"] .lvl i:nth-child(-n + 3) {
  background: var(--color-accent);
}

.lsplit {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  grid-template-rows: auto 1fr;
  grid-template-areas:
    "now paper"
    "acts paper";
  gap: 1.25rem 2.5rem;
  align-items: start;
}

.lsplit .now {
  grid-area: now;
}

.lsplit .letter-paper {
  grid-area: paper;
  margin: 0;
  padding: 2.25rem 2.5rem;
  border-color: var(--color-line);
  border-radius: var(--radius-paper);
  font-size: var(--type-letter-text-size);
  line-height: var(--type-letter-text-line);
  box-shadow:
    0 1px 0 var(--color-shadow-near),
    0 14px 36px -14px var(--color-shadow-far);
}

.lsplit .acts {
  grid-area: acts;
}

/* A letter that cannot be built: the reason runs under the introduction, across the panel. */
.lsplit > .notice {
  grid-column: 1 / -1;
}

.now h2 {
  margin: 0.5rem 0;
  font-size: var(--type-letter-name-size);
  line-height: var(--type-letter-name-line);
}

.now p {
  margin: 0;
  font-size: var(--type-small-size);
  line-height: var(--type-body-line);
}

/* «Carta 1 de 3 · …»: the kicker's look at the panel's size, its lines no further apart than the reference's. */
.now .kicker {
  font-size: var(--type-letter-step-size);
  line-height: var(--type-letter-step-line);
}

.now .when {
  margin-top: 0.5rem;
}

/* «Cuándo:» in bold, as the reference's <b> draws it. */
.now .when b {
  font-family: var(--font-medium), system-ui, sans-serif;
  font-weight: bold;
}

.help b,
.receipt-ok b {
  font-family: var(--font-medium), system-ui, sans-serif;
  font-weight: normal;
}

/* The letter's two actions, then the outcome of the last one beside them. */
.doc-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1.125rem;
}

.acts .doc-actions {
  display: grid;
  gap: 0.625rem;
}

.acts .doc-actions .button,
.acts .sent .button {
  width: 100%;
  margin: 0;
}

/* Copied or downloaded: a tick, then the sentence. A failure loses the tick and reads as an error. */
.copied {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  min-height: 3.25rem;
  margin: 0;
  padding: 0 0.875rem;
  border-radius: var(--radius-chip);
  background: var(--color-ok-tint);
  color: var(--color-ok);
  font-family: var(--font-medium), system-ui, sans-serif;
  font-size: var(--type-body-size);
  line-height: var(--type-body-line);
}

.copied:not(.notice-error)::before {
  content: '';
  flex: none;
  width: 0.875rem;
  height: 0.5rem;
  border-bottom: 3px solid currentColor;
  border-left: 3px solid currentColor;
  transform: rotate(-45deg) translateY(-0.125rem);
}

.copied.notice-error {
  border-left: 0.25rem solid var(--color-danger);
  background: var(--color-danger-tint);
  color: var(--color-ink);
}

/* «¿Le llega algo a mi cliente?»: a «?» circle, then the question and its answer as one sentence. */
.help {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  margin: 0.5rem 0 1.375rem;
  padding: 1rem 1.125rem;
  border-radius: var(--radius-control);
  background: var(--color-surface);
  font-size: var(--type-small-size);
  line-height: var(--type-small-line);
}

.help::before {
  content: '?';
  display: grid;
  flex: none;
  place-items: center;
  width: var(--size-help-icon);
  height: var(--size-help-icon);
  border-radius: 50%;
  background: var(--color-ink);
  color: var(--color-white);
  font-family: var(--font-mono-medium), ui-monospace, monospace;
  font-size: var(--type-badge-size);
  line-height: var(--type-badge-line);
}

/* «Marcar como enviada», then the receipt with the date for the next letter and «Deshacer». */
.sent {
  margin-top: 1.125rem;
}

.sentnote {
  margin-top: 0.5rem;
  color: var(--color-muted);
  font-size: var(--type-small-size);
  line-height: var(--type-small-line);
}

.receipt-ok {
  margin-top: 0.75rem;
  padding: 1.125rem 1.25rem;
  border-radius: var(--radius-control);
  background: var(--color-ok-tint);
  color: var(--color-ok);
  font-size: var(--type-body-size);
  line-height: var(--type-body-line);
}

.receipt-ok p {
  margin: 0;
}

/* «Deshacer» ends the receipt's sentence on its last line, as the reference's inline link does. */
.receipt-ok .text-link {
  min-height: var(--touch);
}

/* The guide line, under the panel on the reading measure: the screen's last line. */
.letters-foot {
  max-width: var(--size-narrow);
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-line);
}

/* «Tus reclamaciones»: each saved claim on its own card, its open and delete actions under its text. */
.case-list {
  display: grid;
  gap: 0.75rem;
  margin: 0 0 1.5rem;
}

.case-list > .case-item {
  padding: 1.25rem;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-panel);
  background: var(--color-white);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* Tablet: a tighter header, so brand, nav and languages stay on one line. */
@media (max-width: 960px) {
  .top .wrap {
    gap: 0.5rem 1.25rem;
  }

  .top nav .link-list {
    gap: 0 1rem;
  }

  .hero .wrap,
  .faq {
    grid-template-columns: minmax(0, 1fr);
  }

  .wrap:has(> .rates-chart) {
    display: block;
  }

  .rates-chart {
    margin-top: 2rem;
  }

  /* The panel's three details stack. */
  .claimit .grid3 {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  /* The letter panel is one column: its introduction, the letter, then its actions. */
  .lsplit {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    grid-template-areas:
      "now"
      "paper"
      "acts";
  }
}

/* Phone, 390 px. The header is one sticky row of brand and languages: the nav's sections are all on the landing, so it
   is the one nav hidden, and nothing goes to a second row. */
@media (max-width: 600px) {
  html {
    scroll-padding-top: var(--size-header-phone);
  }

  body {
    font-size: var(--type-body-phone-size);
    line-height: var(--type-body-phone-line);
  }

  h1 {
    font-size: var(--type-h1-phone-size);
    line-height: var(--type-h1-phone-line);
  }

  .wrap,
  .narrow,
  main#app,
  main.info,
  #boot-loading,
  #boot-error {
    padding-right: var(--size-gutter-phone);
    padding-left: var(--size-gutter-phone);
  }

  .top .wrap {
    flex-wrap: nowrap;
    gap: 0 0.625rem;
    min-height: var(--size-header-phone);
  }

  .lang {
    margin-left: auto;
  }

  /* A loading or failure line goes under the buttons, not beside them. */
  .lang .loading,
  .lang .lang-error {
    flex-basis: 100%;
    margin-left: 0;
    text-align: right;
  }

  .top nav {
    display: none;
  }

  /* The landing on the phone: the compact example replaces the card, the steps stack, the actions fill the width. */
  .hero .wrap {
    gap: 2.25rem;
    padding-top: 1.375rem;
    padding-bottom: 3rem;
  }

  .hero .kicker {
    font-size: var(--type-kicker-phone-size);
    line-height: var(--type-kicker-phone-line);
  }

  .hero h1 {
    margin: 0.5rem 0 0.875rem;
    font-size: var(--type-display-phone-size);
    line-height: var(--type-display-phone-line);
  }

  .hero .lead {
    margin-bottom: 1.125rem;
    font-size: var(--type-body-size);
    line-height: var(--type-lead-line);
  }

  .hero .cta,
  .final .cta {
    width: 100%;
  }

  .hero .scope {
    margin-top: 0.75rem;
  }

  .example {
    display: none;
  }

  .example-strip {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.125rem;
    padding: 0.875rem 1rem;
    border: 1px solid var(--color-line);
    border-radius: var(--radius-panel);
    background: var(--color-white);
    box-shadow:
      0 1px 0 var(--color-shadow-near),
      0 14px 36px -14px var(--color-shadow-far);
  }

  /* The short steps become one connected column: icon, number and words on a line. */
  .mini-steps {
    position: relative;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    margin-top: 1rem;
  }

  .mini-steps::before {
    content: '';
    position: absolute;
    top: 1.5rem;
    bottom: 1.5rem;
    left: 1.1875rem;
    border-left: 2px dashed var(--color-accent-soft);
  }

  .mini-steps li {
    grid-template-columns: auto auto minmax(0, 1fr);
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0;
    border: 0;
    border-radius: 0;
    background: none;
  }

  .mini-steps .step-icon {
    position: relative;
    z-index: 1;
    width: 2.5rem;
    height: 2.5rem;
    margin: 0 0.5rem 0 0;
  }

  .mini-steps b {
    margin-bottom: 0;
  }

  .section {
    padding: 3.5rem 0;
  }

  .section h2 {
    font-size: var(--type-section-title-phone-size);
    line-height: var(--type-section-title-phone-line);
  }

  .steps {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.75rem;
  }

  .steps li {
    display: grid;
    grid-template-columns: 4rem minmax(0, 1fr);
    gap: 0.25rem 1rem;
    padding: 1.25rem;
  }

  .steps .step-icon {
    grid-row: span 3;
  }

  .step-n {
    margin-top: 0.125rem;
  }

  .steps h3 {
    margin: 0.25rem 0;
    font-size: var(--type-card-title-small-size);
    line-height: var(--type-card-title-small-line);
  }

  /* The ladder becomes a staircase going down and in. */
  .ladder {
    grid-template-columns: minmax(0, 1fr);
  }

  .ladder li,
  .ladder li:nth-child(2),
  .ladder li:nth-child(3) {
    padding: 1.25rem;
    border-top: 0;
    border-left: 1px solid var(--color-line);
    border-radius: 0;
  }

  .ladder li:nth-child(1) {
    border-top: 1px solid var(--color-line);
    border-radius: var(--radius-panel) var(--radius-panel) 0 0;
  }

  .ladder li:nth-child(2) {
    margin-left: 1rem;
  }

  .ladder li:nth-child(3) {
    margin-left: 2rem;
    border-radius: 0 0 var(--radius-panel) var(--radius-panel);
  }

  .rates-chart {
    gap: 0.25rem;
    height: var(--size-chart-phone);
  }

  .rates-value {
    font-size: var(--type-chart-value-phone-size);
    line-height: var(--type-chart-value-phone-line);
  }

  .rates-label {
    font-size: var(--type-chart-label-phone-size);
    line-height: var(--type-chart-label-phone-line);
  }

  .final-box {
    padding: 1.75rem 1.375rem;
  }

  /* The white button keeps the hero button's height when its label wraps, as in the reference. */
  .final .button-primary {
    min-height: var(--size-action);
    padding-top: 0;
    padding-bottom: 0;
  }

  .final h2 {
    font-size: var(--type-final-title-phone-size);
    line-height: var(--type-final-title-phone-line);
  }

  /* The questions on the phone: tighter, so the date screen's button lies inside the first screen (390 x 844). */
  main#app:has(> .ask) {
    padding-top: 0.75rem;
  }

  .ask {
    padding-bottom: 3.875rem;
  }

  .progress {
    margin-bottom: 1rem;
  }

  .ask h1 {
    margin-bottom: 0.5rem;
    font-size: var(--type-ask-title-phone-size);
    line-height: var(--type-ask-title-phone-line);
  }

  .ask .hint {
    font-size: var(--type-ask-hint-phone-size);
    line-height: var(--type-ask-hint-phone-line);
  }

  .ask[data-ask="date"] .hint {
    display: none;
  }

  .ask .field {
    gap: 0.375rem;
    margin-bottom: 0.25rem;
  }

  .input-box,
  .ask input[type="date"] {
    min-height: var(--size-field-phone);
  }

  .ask .field-cards {
    gap: 0.5rem;
    margin: 0.5rem 0 1rem;
    padding-top: 0.75rem;
  }

  .field-cards > legend {
    font-size: var(--type-legend-phone-size);
    line-height: var(--type-legend-phone-line);
  }

  /* The owner's rule: the two cards stay side by side on the phone, never one column. */
  .choice-cards {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }

  .choice-card {
    gap: 0.625rem;
    min-height: var(--size-choice-phone);
    padding: 0.625rem 0.75rem;
    font-size: var(--type-choice-phone-size);
    line-height: var(--type-choice-phone-line);
  }

  .choice-card input {
    width: var(--size-radio-phone);
    height: var(--size-radio-phone);
    margin-top: 0.125rem;
  }

  /* The reference's phone note (16 px at 1.25), so the cards keep its height. */
  .choice-card small {
    font-size: var(--type-choice-note-phone-size);
    line-height: var(--type-choice-note-phone-line);
  }

  .ask .field-cards + .field {
    margin-bottom: 1.25rem;
  }

  /* The primary button stays the reference's 60 px whatever its label: one line or two. */
  .ask .cta {
    height: var(--size-action);
  }

  /* The result's card on the phone: the stamp sits above the kicker and leans the other way, and settles there; the
     «+amount» goes on its own line above its sentence. */
  .claim-card {
    padding: 1.375rem 1.125rem;
    border-radius: var(--radius-claim-phone);
  }

  .claim-card .stamp {
    position: static;
    margin-bottom: 0.75rem;
    --stamp-tilt: -2deg;
  }

  .claim-card .money-huge {
    font-size: min(var(--type-result-total-phone-size), calc(100cqi / (var(--total-chars) * var(--mono-advance))));
    line-height: var(--type-result-total-phone-line);
  }

  .claim-card .extra {
    display: block;
  }

  .claim-card .extra b {
    display: block;
    margin-bottom: 0.125rem;
    font-size: var(--type-result-extra-amount-phone-size);
    line-height: var(--type-result-extra-amount-phone-line);
  }

  main#app:has(> .claim-card) > .back {
    margin-bottom: 1rem;
  }

  .claimit {
    padding: 1.375rem 1.125rem;
  }

  .claimit h2 {
    font-size: var(--type-panel-title-phone-size);
    line-height: var(--type-panel-title-phone-line);
  }

  .claim-go .cta {
    width: 100%;
  }

  /* The sum on the phone: the amount goes under its title; the bar takes the row's whole width under its dates. */
  .proof h2 {
    font-size: var(--type-proof-title-phone-size);
    line-height: var(--type-proof-title-phone-line);
  }

  .sum .row {
    grid-template-columns: var(--size-op) minmax(0, 1fr);
    gap: 0.375rem 0.75rem;
    padding: 1rem;
  }

  .sum .money {
    grid-column: 2;
    font-size: var(--type-sum-money-phone-size);
    line-height: var(--type-sum-money-phone-line);
    text-align: left;
  }

  .sum .row-total .money {
    font-size: var(--type-sum-total-money-phone-size);
    line-height: var(--type-sum-total-money-phone-line);
  }

  .hbars li {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.375rem 0.75rem;
  }

  .hbars .bar-track {
    grid-row: 2;
    grid-column: 1 / -1;
    height: var(--size-bar-track-phone);
  }

  /* The three letters stay side by side: the bars above the name, in a taller button. */
  .picker {
    gap: 0.375rem;
  }

  .pick {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.375rem;
    min-height: var(--size-pick-phone);
    padding: 0.625rem;
    font-size: var(--type-pick-phone-size);
    line-height: var(--type-pick-phone-line);
  }

  .lsplit .letter-paper {
    padding: 1.375rem 1.125rem;
  }

  main#app:has(> .lsplit) {
    padding-top: 1.625rem;
  }

  h1.lt {
    font-size: var(--type-letters-title-phone-size);
    line-height: var(--type-letters-title-phone-line);
  }
}

/* The narrowest phones (320 px): less side padding keeps the longer paid-late label on two lines inside the 60 px. */
@media (max-width: 359px) {
  .ask .cta {
    padding-right: 1rem;
    padding-left: 1rem;
  }
}
