/* Shared portfolio UI primitives inherited from the Retire.do foundation. */
:root {
  /* Palette */
  --ink: #172f4f;            /* navy ink (from the logo): all text, dark bands, the copyright strip */
  --ink-soft: #455a75;       /* navy soft, secondary text: 6.8:1 on shell, 6.3:1 on sand and foam */
  --lagoon: #22b0aa;         /* the sea: decoration, dotted routes, never text */
  --lagoon-deep: #055c62;    /* links, outline buttons, selected state, focus: 7.5:1 on shell */
  --lagoon-line: #8fd5cd;    /* link underlines, hover borders */
  --foam: #e3f6f3;           /* cool sections, icon tiles, chips */
  --foam-deep: #c4ebe4;
  --coral: #ff8a66;          /* sunset coral: THE primary button (ink text, 5.8:1), the sun */
  --coral-hover: #ff9b7c;    /* (ink text 6.6:1) */
  --coral-deep: #e2623f;     /* the button lip, dashed frames, list markers */
  --coral-icon: #d9482f;     /* red-coral: the one coral detail of a small icon (4.3:1 on white) */
  --coral-ink: #bf3b23;      /* red-coral ink: eyebrows and small coral words (4.5:1 or more on
                                shell, sand, foam, white and the footer sand; white on it 5.4:1) */
  --coral-tint: #ffe7dd;
  --gold: #ffc65c;           /* the top of the sun */
  --gold-tint: #fff2d4;
  --gold-line: #e8a93a;
  --sand: #fbf1e4;           /* warm sections */
  --sand-deep: #efdcc3;      /* borders on sand, dashed separators */
  --shell: #fffaf3;          /* the page */
  --footer-sand: #f6e8d6;    /* the footer only: a deeper sand, so the footer shows where it starts */
  --white: #ffffff;
  --tile-low: #f5fbfa;       /* the lower half of a countdown tile (ink 12.9:1, ink-soft 6.5:1) */
  --field: #6f8d8f;          /* form and checkbox borders (3.6:1, non-text contrast) */
  --on-dark: #e6ecf4;        /* text on navy ink (11.4:1): dark bands, the copyright strip */
  --on-dark-soft: #c9d4e3;   /* quieter text on navy ink (9.0:1) */
  --danger: #a3261b;
  --danger-tint: #fdeceb;
  --ok: #1d6b3a;
  --ok-tint: #e6f4ea;
  --warn: #8a5a00;
  --sand-light: var(--white); /* legacy name: the light card surface the modules use */
  --sun: var(--coral);        /* legacy name: accent borders */
  --sun-text: var(--coral-ink); /* legacy name: accent words and icons */

  /* Type */
  --display: "Nunito", ui-rounded, "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial,
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Noto Sans SC", sans-serif;
  --body: "Literata", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Noto Serif",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Noto Sans SC", serif;
  --text-s: 0.9rem;          /* 17 px: captions, hints, fine print */
  --text-m: 1rem;            /* 19 px: body */
  --text-l: 1.125rem;        /* 21 px: card text that should stand out */
  --text-xl: 1.25rem;        /* 24 px: leads */
  --h4: 1.125rem;
  --h3: clamp(1.25rem, 1.1rem + 0.6vw, 1.45rem);
  --h2: clamp(1.6rem, 1.2rem + 1.8vw, 2.4rem);
  --h1: clamp(2rem, 1.35rem + 3vw, 3.3rem);
  --display-size: clamp(2.3rem, 1.4rem + 4.2vw, 4rem);
  --measure: 66ch;

  /* Space */
  --space-3xs: 0.25rem;
  --space-2xs: 0.5rem;
  --space-xs: 0.75rem;
  --space-s: 1rem;
  --space-m: 1.5rem;
  --space-l: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --band-space: clamp(3rem, 2rem + 4vw, 5.5rem);
  --content: 66rem;
  --content-narrow: 46rem;
  --wave-height: clamp(1.5rem, 1rem + 2vw, 2.75rem);

  /* Shapes */
  --radius-s: 10px;
  --radius: 18px;
  --radius-l: 28px;
  --radius-xl: 40px;
  --radius-pill: 999px;
  --shadow-s: 0 1px 2px rgb(23 47 79 / 0.06), 0 6px 14px -8px rgb(23 47 79 / 0.3);
  --shadow: 0 1px 2px rgb(23 47 79 / 0.06), 0 16px 32px -20px rgb(23 47 79 / 0.42);
  --shadow-l: 0 2px 4px rgb(23 47 79 / 0.05), 0 30px 50px -30px rgb(23 47 79 / 0.55);
  --lip: 0 4px 0 var(--coral-deep), 0 12px 22px -12px rgb(226 98 63 / 0.9);
  --lip-pressed: 0 1px 0 var(--coral-deep);
  --lip-outline: 0 3px 0 rgb(5 92 98 / 0.22);
  --focus: 3px solid var(--lagoon-deep);
  --focus-on-dark: 3px solid #ffd66e;
  --tap: 2.55rem;            /* 48 px */

  /* Icons drawn by CSS (mask images; they take the text colour) */
  --icon-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='black' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --icon-more: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ccircle cx='16' cy='16' r='14.6' fill='none' stroke='black' stroke-width='2.6'/%3E%3Cpath d='M13.6 10.4l5.6 5.6-5.6 5.6' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --icon-more-on: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cmask id='m'%3E%3Crect width='32' height='32' fill='white'/%3E%3Cpath d='M13.6 10.4l5.6 5.6-5.6 5.6' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/mask%3E%3Ccircle cx='16' cy='16' r='15.9' mask='url(%23m)'/%3E%3C/svg%3E");
  --icon-back: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M15 5l-7 7 7 7' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --icon-info: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10' fill='none' stroke='black' stroke-width='2.2'/%3E%3Cpath d='M12 11v6' stroke='black' stroke-width='2.6' stroke-linecap='round'/%3E%3Ccircle cx='12' cy='7.3' r='1.5'/%3E%3C/svg%3E");
  --icon-ok: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10' fill='none' stroke='black' stroke-width='2.2'/%3E%3Cpath d='M7.5 12.5l3 3 6-6.5' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --icon-alert: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3.2L2.6 19.8h18.8z' fill='none' stroke='black' stroke-width='2.2' stroke-linejoin='round'/%3E%3Cpath d='M12 9.6v4.6' stroke='black' stroke-width='2.6' stroke-linecap='round'/%3E%3Ccircle cx='12' cy='17.1' r='1.4'/%3E%3C/svg%3E");
  --icon-camera: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 8h4l2-3h6l2 3h4v11H3z' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'/%3E%3Ccircle cx='12' cy='13' r='3.6' fill='none' stroke='black' stroke-width='2'/%3E%3C/svg%3E");
  --icon-disc-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cmask id='m'%3E%3Crect width='24' height='24' fill='white'/%3E%3Cpath d='M7 12.5l3.3 3.3L17 9' fill='none' stroke='black' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/mask%3E%3Ccircle cx='12' cy='12' r='11.5' mask='url(%23m)'/%3E%3C/svg%3E");
  --icon-select: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9.5l6 6 6-6' fill='none' stroke='%23055c62' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");

  /* Legacy names the modules use */
  --display-font: var(--display);
  --radius-card: var(--radius-l);

  color-scheme: light;
}

.stack > * + * { margin-block-start: var(--space-s); }
.stack-s > * + * { margin-block-start: var(--space-2xs); }
.stack-l > * + * { margin-block-start: var(--space-m); }
.stack-xl > * + * { margin-block-start: var(--space-xl); }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-s); max-inline-size: none; }
.grid { display: grid; gap: var(--space-m); grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr)); }
.grid-2, .grid-3, .grid-4 { display: grid; gap: var(--space-m); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 40rem) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 60rem) {
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
:is(ul, ol):is(.grid, .grid-2, .grid-3, .grid-4, .cluster) { list-style: none; padding: 0; }
:is(.grid, .grid-2, .grid-3, .grid-4) > li { max-inline-size: none; }
.split { display: grid; gap: var(--space-xl); align-items: start; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 48rem) {
  .split { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: var(--space-xl) clamp(2rem, 5vw, 4rem); }
  .split-reverse > :first-child { order: 2; }
}
.split-center { align-items: center; }
.measure { max-inline-size: var(--measure); }
.center { text-align: center; }
.center > :is(p, li, .lead), .center:is(p, li, .lead) { margin-inline: auto; }
.center.cluster, .center .cluster { justify-content: center; }

/* ---- Type utilities ---------------------------------------------------------------------------- */

.display { font-family: var(--display); font-size: var(--display-size); font-weight: 900; letter-spacing: -0.028em; line-height: 1.04; text-wrap: balance; }
.eyebrow {
  font: 800 var(--text-s)/1.3 var(--display);
  letter-spacing: 0.02em;
  color: var(--coral-ink);
  margin-block-end: var(--space-2xs);
}
.lead { font-size: var(--text-xl); line-height: 1.55; color: var(--ink-soft); margin-block: var(--space-s) var(--space-m); max-inline-size: 44ch; }
.section-head { display: grid; gap: var(--space-2xs); margin-block-end: var(--space-l); max-inline-size: 46rem; }
.section-head > * { margin-block: 0; }
.section-head > .lead { max-inline-size: 44ch; }
.section-head-center { margin-inline: auto; text-align: center; justify-items: center; }
.hint { color: var(--ink-soft); font-size: 0.95rem; line-height: 1.5; }
.fine { color: var(--ink-soft); font-size: var(--text-s); line-height: 1.5; }
.mark { font-family: var(--display); font-weight: 900; font-size: clamp(3rem, 11vw, 5.5rem); letter-spacing: -0.03em; line-height: 1; }

/* ---- Buttons ----------------------------------------------------------------------------------- */

/* The primary: sunset coral with a darker "lip" under it, pressed down when clicked. Variants only
   change the custom properties, so a module rule that sets background or color still wins. */
.button {
  --button-bg: var(--coral);
  --button-bg-hover: var(--coral-hover);
  --button-ink: var(--ink);
  --button-border: transparent;
  --button-shadow: var(--lip);
  --button-shadow-pressed: var(--lip-pressed);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-block-size: 3rem;
  padding-block: 0.55rem;
  padding-inline: 1.5rem;
  border: 2px solid var(--button-border);
  border-radius: var(--radius-pill);
  background: var(--button-bg);
  color: var(--button-ink);
  box-shadow: var(--button-shadow);
  font: 800 1.05rem/1.2 var(--display);
  letter-spacing: 0;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease;
}
.button:hover { background: var(--button-bg-hover); color: var(--button-ink); }
.button:active { transform: translateY(3px); box-shadow: var(--button-shadow-pressed); }
.button:focus-visible { outline: var(--focus); outline-offset: 4px; }
.button .icon { inline-size: 1.3em; block-size: 1.3em; stroke-width: 2; }
.button .icon-32 { stroke-width: 2.6; }
.button-secondary, .button-quiet {
  --button-bg: var(--white);
  --button-bg-hover: var(--foam);
  --button-ink: var(--lagoon-deep);
  --button-border: var(--lagoon-deep);
  --button-shadow: var(--lip-outline);
  --button-shadow-pressed: 0 1px 0 rgb(5 92 98 / 0.22);
}
.button-quiet { --button-bg: transparent; --button-shadow: none; --button-shadow-pressed: none; }
.button-danger {
  --button-bg: var(--white);
  --button-bg-hover: var(--danger-tint);
  --button-ink: var(--danger);
  --button-border: var(--danger);
  --button-shadow: 0 3px 0 rgb(163 38 27 / 0.2);
  --button-shadow-pressed: none;
}
.button-small { min-block-size: var(--tap); padding-block: 0.35rem; padding-inline: 1.1rem; font-size: 0.95rem; gap: 0.45rem; }
.button-large { min-block-size: 3.4rem; padding-inline: 2rem; font-size: 1.15rem; }
.button-wide, .button-block { inline-size: 100%; }
.button[disabled], .button[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }
.band-deep .button:focus-visible { outline: var(--focus-on-dark); }

/* ---- Icons ------------------------------------------------------------------------------------- */

/* Line icons (templates/partials/icon.twig) take the text colour; one detail in coral. */
.icon {
  inline-size: 2rem;
  block-size: 2rem;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-32 { stroke-width: 2.1; }
.icon .icon-dot { fill: currentColor; stroke: none; }
.icon .icon-accent { fill: var(--coral); }
.icon .icon-accent-line { stroke: var(--coral-icon); }
.icon .icon-accent-gold { fill: var(--gold); }
.icon .icon-accent-soft { fill: var(--gold-tint); }
.icon .icon-accent-tint { fill: var(--coral-tint); }
.icon-tile {
  display: inline-grid;
  place-items: center;
  flex: none;
  inline-size: 3.4rem;
  block-size: 3.4rem;
  border-radius: 20px;
  background: var(--foam);
  color: var(--ink);
}
.icon-tile .icon { inline-size: 2.2rem; block-size: 2.2rem; }
.icon-tile-round { border-radius: 50%; background: var(--white); box-shadow: inset 0 0 0 2px var(--sand-deep); }
.icon-tile-coral { border-radius: 50%; background: var(--coral-tint); }
.icon-tile-small { inline-size: 2.75rem; block-size: 2.75rem; border-radius: 14px; }
.icon-tile-small .icon { inline-size: 1.7rem; block-size: 1.7rem; }

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

.card {
  position: relative;
  background: var(--white);
  border: 2px solid transparent;
  border-radius: var(--radius-l);
  padding: clamp(1.25rem, 3vw, 2rem);
  box-shadow: var(--shadow);
}
.card-sand { background: var(--sand); box-shadow: none; }
.card-foam { background: var(--foam); box-shadow: none; }
.card-outline { box-shadow: none; border-color: var(--sand-deep); }
.card-person { border-radius: var(--radius-xl); }
.card-business { border-radius: var(--radius-s); }
.card-title { font: 800 1.3rem/1.25 var(--display); color: var(--ink); margin: 0; }
.card-link {
  display: block;
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.card-link:hover { color: var(--ink); border-color: var(--lagoon-line); transform: translateY(-2px); }
/* The one link inside a card that makes the whole card clickable. */
.card-target { text-decoration: none; }
.card-target::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card:has(.card-target:hover) { border-color: var(--lagoon-line); }
.card-target:focus-visible { outline: none; }
.card:has(.card-target:focus-visible) { outline: var(--focus); outline-offset: 3px; }
.card-photo { padding: 0; overflow: hidden; border: 0; }
.card-photo > .frame, .card-photo > .photo { border-radius: 0; }
.card-body { padding: clamp(1.1rem, 3vw, 1.6rem); }
.card-body > * + * { margin-block-start: var(--space-2xs); }

/* ---- Chips and status pills -------------------------------------------------------------------- */

.chips { display: flex; flex-wrap: wrap; gap: 0.6rem; list-style: none; padding: 0; max-inline-size: none; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-block-size: 2.2rem;
  padding-block: 0.25rem;
  padding-inline: 0.85rem;
  border-radius: var(--radius-pill);
  background: var(--foam);
  box-shadow: inset 0 0 0 1.5px var(--foam-deep);
  font: 700 0.95rem/1.2 var(--display);
  color: var(--ink);
  max-inline-size: 100%;
}
.chip .icon { inline-size: 1.35em; block-size: 1.35em; }
.chip-sand { background: var(--sand); box-shadow: inset 0 0 0 1.5px var(--sand-deep); }
.chip-coral { background: var(--coral-tint); box-shadow: inset 0 0 0 1.5px #ffcbb8; }
.chip-white { background: var(--white); box-shadow: inset 0 0 0 1.5px var(--sand-deep); }

/* A status always has a shape AND a word: an empty ring (to do), a half sun (in progress), a
   ticked disc (done), a ring with a line through it (not needed). Colour is never the only
   signal. */
.status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-block-size: 2.2rem;
  padding-block: 0.2rem;
  padding-inline: 0.6rem 0.95rem;
  border: 2px solid var(--field);
  border-radius: var(--radius-pill);
  background: var(--white);
  font: 800 0.95rem/1.2 var(--display);
  color: var(--ink);
  white-space: nowrap;
}
.status::before {
  content: "";
  flex: none;
  inline-size: 1.15rem;
  block-size: 1.15rem;
  border: 2.5px solid currentColor;
  border-radius: 50%;
}
.status-todo { border-style: dashed; }
.status-doing { background: var(--gold-tint); border-color: var(--gold-line); }
.status-doing::before { background: linear-gradient(90deg, transparent 50%, var(--coral-icon) 50%); border-color: var(--coral-icon); }
.status-done { background: var(--ok-tint); border-color: var(--ok); }
.status-done::before {
  border: 0;
  background: var(--ok);
  -webkit-mask: var(--icon-disc-check) center / contain no-repeat;
  mask: var(--icon-disc-check) center / contain no-repeat;
}
.status-skip { background: var(--sand); border-color: var(--sand-deep); color: var(--ink-soft); }
.status-skip::before { background: linear-gradient(currentColor, currentColor) center / 60% 2.5px no-repeat; }

/* ---- Notices ----------------------------------------------------------------------------------- */

.notice {
  position: relative;
  padding-block: 1rem;
  padding-inline: 3.4rem 1.25rem;
  border-radius: var(--radius);
  background: var(--foam);
  color: var(--ink);
  border-inline-start: 0;
}
.notice::before {
  content: "";
  position: absolute;
  inset-inline-start: 1.1rem;
  inset-block-start: 1.1rem;
  inline-size: 1.5rem;
  block-size: 1.5rem;
  background: var(--lagoon-deep);
  -webkit-mask: var(--icon-info) center / contain no-repeat;
  mask: var(--icon-info) center / contain no-repeat;
}
.notice-ok { background: var(--ok-tint); }
.notice-ok::before { background: var(--ok); -webkit-mask-image: var(--icon-ok); mask-image: var(--icon-ok); }
.notice-warn { background: var(--gold-tint); }
.notice-warn::before { background: var(--warn); -webkit-mask-image: var(--icon-alert); mask-image: var(--icon-alert); }
.notice-danger { background: var(--danger-tint); box-shadow: inset 0 0 0 2px rgb(163 38 27 / 0.35); }
.notice-danger::before { background: var(--danger); -webkit-mask-image: var(--icon-alert); mask-image: var(--icon-alert); }
.notice > :first-child { margin-block-start: 0; }
.notice > * + * { margin-block-start: var(--space-2xs); }

/* ---- Forms ------------------------------------------------------------------------------------- */

form .field { display: grid; gap: 0.35rem; margin-block-end: 1.25rem; max-inline-size: 32rem; }
label, legend { font-family: var(--display); font-weight: 800; }
label { line-height: 1.35; }
fieldset { border: 0; padding: 0; min-inline-size: 0; }
legend { padding: 0; font-size: var(--text-l); }
input[type="text"], input[type="email"], input[type="tel"], input[type="date"], input[type="datetime-local"],
input[type="number"], input[type="url"], input[type="search"], select, textarea {
  font: 400 1rem/1.4 var(--body);
  min-block-size: 3rem;
  padding-block: 0.55rem;
  padding-inline: 0.85rem;
  border: 2px solid var(--field);
  border-radius: 14px;
  background: var(--white);
  color: var(--ink);
  max-inline-size: 100%;
}
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--lagoon-deep); outline-offset: 2px; }
textarea { resize: vertical; }
/* The drawn chevron replaces the native arrow on the site; the admin shell (which sets its own
   select background) keeps the native one. */
:where(body:not(.admin)) select {
  appearance: none;
  padding-inline-end: 2.8rem;
  background-image: var(--icon-select);
  background-repeat: no-repeat;
  background-size: 1.3rem;
  background-position: right 0.85rem center;
}
:where([dir="rtl"] body:not(.admin)) select { background-position: left 0.85rem center; }
::placeholder { color: #5f7b80; opacity: 1; }
:is(input, select, textarea)[aria-invalid="true"] { border-color: var(--danger); background-color: #fffafa; box-shadow: inset 0 0 0 1px var(--danger); }
.field-error label { color: var(--danger); }
.error-text { display: flex; gap: 0.45rem; align-items: flex-start; color: var(--danger); font-weight: 700; }
.error-text::before {
  content: "";
  flex: none;
  inline-size: 1.2em;
  block-size: 1.2em;
  margin-block-start: 0.15em;
  background: currentColor;
  -webkit-mask: var(--icon-alert) center / contain no-repeat;
  mask: var(--icon-alert) center / contain no-repeat;
}
input[inputmode="numeric"].code-input { letter-spacing: 0.4em; font: 700 1.6rem/1.2 var(--display); max-inline-size: 12rem; }

/* Checkboxes and radios: drawn large and clear, still the real native control underneath. */
input[type="checkbox"], input[type="radio"] {
  appearance: none;
  display: inline-grid;
  place-content: center;
  flex: none;
  inline-size: 1.5rem;
  block-size: 1.5rem;
  margin: 0;
  border: 2px solid var(--field);
  border-radius: 7px;
  background: var(--white);
  cursor: pointer;
  vertical-align: middle;
}
input[type="radio"] { border-radius: 50%; }
input[type="checkbox"]::before {
  content: "";
  inline-size: 1rem;
  block-size: 1rem;
  background: var(--white);
  -webkit-mask: var(--icon-check) center / contain no-repeat;
  mask: var(--icon-check) center / contain no-repeat;
  transform: scale(0);
  transition: transform 0.1s ease;
}
input[type="radio"]::before {
  content: "";
  inline-size: 0.6rem;
  block-size: 0.6rem;
  border-radius: 50%;
  background: var(--white);
  transform: scale(0);
  transition: transform 0.1s ease;
}
input:is([type="checkbox"], [type="radio"]):checked { background: var(--lagoon-deep); border-color: var(--lagoon-deep); }
input:is([type="checkbox"], [type="radio"]):checked::before { transform: scale(1); }
input:is([type="checkbox"], [type="radio"]):hover { border-color: var(--lagoon-deep); }
input:is([type="checkbox"], [type="radio"]):focus-visible { outline: var(--focus); outline-offset: 3px; }
input:is([type="checkbox"], [type="radio"]):disabled { opacity: 0.5; cursor: not-allowed; }
.checkbox { display: flex; gap: 0.75rem; align-items: flex-start; font-weight: 700; cursor: pointer; }
.checkbox input { margin-block-start: 0.1rem; }

/* Choice cards: the whole card is the label of its checkbox or radio (one question per screen). */
.choices { display: grid; gap: 0.9rem; }
.choices-grid { grid-template-columns: repeat(auto-fill, minmax(min(19rem, 100%), 1fr)); }
.choices-compact { grid-template-columns: repeat(auto-fill, minmax(min(13rem, 100%), 1fr)); gap: 0.6rem; }
.choice {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  min-block-size: 3.5rem;
  padding-block: 1.1rem;
  padding-inline: 1.1rem;
  border: 2px solid var(--sand-deep);
  border-radius: 22px;
  background: var(--white);
  font-family: var(--body);
  font-weight: 400;
  cursor: pointer;
  transition: border-color 0.12s ease, background-color 0.12s ease;
}
.choice:hover { border-color: var(--lagoon-line); }
.choice:has(input:checked) { border-color: var(--lagoon-deep); background: var(--foam); box-shadow: inset 0 0 0 1px var(--lagoon-deep); }
.choice:has(input:checked) .icon-tile { background: var(--white); }
.choice:has(input:focus-visible) { outline: var(--focus); outline-offset: 3px; }
.choice input { margin-block-start: 0.15rem; }
.choice input:focus-visible { outline: none; }
.choice-icon { flex: none; line-height: 0; color: var(--ink); }
.choice-body { display: grid; gap: 0.2rem; }
.choice-title { font: 800 1.15rem/1.3 var(--display); color: var(--ink); }
.choice-help { color: var(--ink-soft); font-size: 0.98rem; line-height: 1.5; }
