/* MoreDone brand system. Brand design v0.3 with the edits of 2026-11-24 (D71, D72). A draft, not an approved identity.
   This file is the brand on its own: load it first on any MoreDone page, then the page's own stylesheet.
   It holds no page layout and no section of the landing page. Contents, in the order of a style guide:
     1. Fonts            Instrument Sans, Newsreader Italic
     2. Tokens           primitives > theme > layout (type scale, space, radius, motion)
     3. Base             reset, focus, selection, helpers
     4. Typography       .display .h2 .h3 .h4 .lead .label .said, the serif accent
     5. Pill and marks   .pill .mark (ring = open, dot = done)
     6. Buttons          .btn and its sizes and variants
     7. Form elements    .field .input .fieldset .seg .check .err .hint
     8. Icons            .icon (inline SVG, 1.5 px line)
     9. Rich text        .rich, for long pages
    10. Small screens, forced colors
   Rules of use are in README.md, section "Brand system". */

/* ---------- 1. Fonts ---------- */
@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/instrument-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("../fonts/newsreader-italic.woff2") format("woff2");
  font-weight: 300 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans Fallback";
  src: local("Arial"), local("Helvetica Neue"), local("Helvetica");
  size-adjust: 99%;
  ascent-override: 98%;
  descent-override: 25%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Newsreader Fallback";
  src: local("Georgia Italic"), local("Georgia");
  font-style: italic;
  size-adjust: 89%;
  ascent-override: 83%;
  descent-override: 30%;
  line-gap-override: 0%;
}

/* ---------- 2. Tokens ---------- */
/* Three levels. A rule uses a theme or a layout token, never a primitive.
   Change a primitive to retint every token that points to it. */
:root {
  /* 1. Primitives: the raw palette */
  --neutral-white: #fff;
  --cream-50: #fbf9f5;
  --cream-100: #f3efe7;
  --cream-200: #ebe5da;
  --line-100: #ddd9d2;
  --line-200: #cdc9c2;
  --ink-300: #a39a8e;
  --ink-400: #8f877c;
  --ink-500: #625a52;
  --ink-700: #2a2622;
  --ink-900: #141210;
  --ember-50: #fdf4ee;
  --ember-100: #f6e0d3;
  --ember-300: #ff8a3d;
  --ember-500: #d3420d;
  --ember-600: #b93a0b;
  --cream-300: #d8d1c7;
  --ink-200: #b8b0a5;
  /* the same colors as channels, for tints and shadows: rgb(var(--tint-ink) / 0.17) */
  --ink-900-rgb: 20 18 16;
  --umber-rgb: 60 40 20;
  --white-rgb: 255 255 255;
  --cream-100-rgb: 243 239 231;
  --ember-500-rgb: 211 66 13;

  /* 2. Theme: what a rule asks for */
  --paper: var(--cream-100);        /* Background / Primary */
  --card: var(--cream-50);          /* Background / Card */
  --sand: var(--cream-200);         /* Background / Secondary */
  --white: var(--neutral-white);    /* Background / Field, Text / Inverse */
  --craft: var(--cream-100);        /* Background / Illustration */
  --ink: var(--ink-900);            /* Text / Primary, Background / Inverse */
  --ink-soft: var(--ink-700);       /* Text / Strong */
  --graphite: var(--ink-500);       /* Text / Secondary */
  --stone: var(--ink-300);          /* Line / Diagram */
  --line: var(--line-100);          /* Border / Primary */
  --line-strong: var(--line-200);   /* Border / Strong */
  --field: var(--ink-400);          /* Border / Field */
  --orange: var(--ember-500);       /* Accent / Primary */
  --orange-deep: var(--ember-600);  /* Accent / Text, Accent / Pressed */
  --orange-light: var(--ember-300); /* Accent / On ink */
  --wash: var(--ember-100);         /* Accent / Soft */
  --wash-soft: var(--ember-50);     /* Accent / Faint */
  --on-ink: var(--cream-300);       /* Text / On ink */
  --on-ink-muted: var(--ink-200);   /* Text / On ink, secondary */
  --tint-ink: var(--ink-900-rgb);       /* lines and shadows in ink */
  --tint-shadow: var(--umber-rgb);      /* warm shadow under paper and cards */
  --tint-white: var(--white-rgb);       /* lines on ink */
  --tint-paper: var(--cream-100-rgb);   /* the page color, see-through */
  --tint-orange: var(--ember-500-rgb);  /* a soft ring in the accent */
  --line-alpha: rgb(var(--tint-ink) / 0.1);          /* Border / On card */
  --line-alpha-strong: rgb(var(--tint-ink) / 0.17);  /* Border / On card, strong */

  /* 3. Layout: type, space, radius */
  --sans: "Instrument Sans", "Instrument Sans Fallback", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Newsreader", "Newsreader Fallback", Georgia, "Times New Roman", serif;
  --fs-display: clamp(2.375rem, 1.2rem + 3.6vw, 3.875rem);
  --fs-h2: clamp(2.125rem, 1.25rem + 3.1vw, 3.5rem);
  --fs-h3: clamp(1.375rem, 1.2rem + 0.6vw, 1.625rem);
  --fs-h4: 1.25rem;
  --fs-h5: 1.125rem;
  --fs-lead: clamp(1.125rem, 1.05rem + 0.3vw, 1.25rem);
  --fs-body: 1.0625rem;
  --fs-text: 1rem;
  --fs-small: 0.9375rem;   /* the smallest size for text */
  --fs-label: 0.9375rem;   /* pills, labels, chips: same floor as text */
  /* sizes with one job each */
  --fs-title: clamp(1.75rem, 1.3rem + 1.9vw, 2.75rem);      /* a name or a closing line inside a section */
  --fs-quote: clamp(1.75rem, 1.5rem + 0.6vw, 2rem);         /* a line a person says */
  --fs-stat: clamp(3.25rem, 2rem + 4.4vw, 5.5rem);          /* a large number: the 30 minutes, the 90 days */
  --fs-numeral: clamp(3rem, 2rem + 3vw, 4.5rem);            /* 01 to 04 in How it works */
  --fs-counter: clamp(5rem, 3rem + 9vw, 10rem);             /* the CASH letters, the 90 of the guarantee */
  --fs-menu: clamp(1.625rem, 1.2rem + 1.6vw, 2rem);         /* links in the open menu */
  --lh-heading: 1;
  --lh-body: 1.53;
  --fw-light: 300;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;

  --max: 77.5rem;
  --inset: 1rem;
  --gutter: clamp(1.25rem, 3.2vw, 2.75rem);
  --nav-h: 4.5rem;
  --sec: clamp(3.5rem, 6.5vw, 6rem);
  --gap: 1.25rem;
  --r-chip: 0.5rem;    /*  8 px: chips, notes, small controls */
  --r-s: 0.75rem;      /* 12 px: buttons, fields */
  --r-tile: 1rem;      /* 16 px: small cards, icon tiles, message bubbles */
  --r-m: 1.25rem;      /* 20 px: cards */
  --r-l: 2rem;         /* 32 px: large blocks */
  --r-pill: 999px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-ui: cubic-bezier(0.23, 1, 0.32, 1);
  --shadow: 0 18px 40px -24px rgb(var(--tint-shadow) / 0.35);
}

/* ---------- 3. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 5.5rem; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: var(--fw-regular);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--orange-deep); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
strong, b { font-weight: var(--fw-semibold); }
::selection { background: var(--orange); color: var(--white); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
.on-ink :focus-visible { outline-color: var(--white); }
.on-ink a:hover, .tcard--ink a:hover { color: var(--orange-light); }
[hidden] { display: none !important; }
.vh { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--ink); color: var(--white); padding: 0.75rem 1rem; border-radius: var(--r-s); transition: top 0.2s; }
.skip:focus { top: 1rem; color: var(--white); }

/* ---------- 4. Typography ---------- */
.display, .h2 { font-weight: var(--fw-medium); text-wrap: balance; }
.display { font-size: var(--fs-display); line-height: 0.98; letter-spacing: -0.045em; }
.h2 { font-size: var(--fs-h2); line-height: var(--lh-heading); letter-spacing: -0.04em; }
.display em, .h2 em, .closing__line em {
  font-family: var(--serif); font-style: italic; font-weight: var(--fw-light); color: var(--orange);
  letter-spacing: -0.035em; padding-right: 0.04em;
}
.lead { font-size: var(--fs-lead); line-height: 1.5; color: var(--graphite); text-wrap: pretty; }
.label { font-size: var(--fs-label); line-height: 1.29; font-weight: var(--fw-medium); }
.h3 { font-size: var(--fs-h3); line-height: 1.15; font-weight: var(--fw-medium); letter-spacing: -0.03em; text-wrap: balance; }
.h4 { font-size: var(--fs-h4); line-height: 1.25; font-weight: var(--fw-medium); letter-spacing: -0.02em; }
.h5 { font-size: var(--fs-h5); line-height: 1.3; font-weight: var(--fw-medium); letter-spacing: -0.02em; }
.said { font-family: var(--serif); font-style: italic; font-weight: var(--fw-regular); letter-spacing: -0.015em; }
p { text-wrap: pretty; }

/* ---------- 5. Pill and marks ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 0.5rem; min-height: 1.75rem; padding: 0.25rem 0.75rem 0.25rem 0.625rem;
  border-radius: var(--r-pill); background: var(--wash); color: var(--ink);
  font-size: var(--fs-label); line-height: 1.29; font-weight: var(--fw-medium); text-align: left;
}
.pill::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--orange); }
.pill--plain { background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.mark { flex: none; display: inline-block; width: 0.875rem; height: 0.875rem; border-radius: 50%; border: 1.5px solid var(--ink); background: transparent; transition: background-color 0.4s var(--ease-ui), border-color 0.4s var(--ease-ui), transform 0.5s var(--ease); }
.mark.is-done, .mark--done { background: var(--orange); border-color: var(--orange); }

/* ---------- 6. Buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 0.625rem;
  min-height: 2.875rem; padding: 0.5rem 1.25rem; border: 0; border-radius: var(--r-s);
  background: var(--orange); color: var(--white); font-size: var(--fs-small); line-height: 1.2; font-weight: var(--fw-medium); letter-spacing: -0.01em;
  text-decoration: none; text-align: center; white-space: nowrap;
  transition: transform 0.3s var(--ease-ui), box-shadow 0.3s var(--ease-ui), background-color 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { color: var(--white); transform: translateY(-2px); box-shadow: 0 14px 24px -14px rgb(var(--tint-ink) / 0.55); }
.btn:active { transform: scale(0.97); background: var(--orange-deep); }
.btn:disabled { cursor: not-allowed; opacity: 0.6; transform: none; box-shadow: none; }
.btn--sm { min-height: 2.75rem; padding-inline: 1rem; border-radius: var(--r-chip); }
.btn--lg { min-height: 3.25rem; padding-inline: 1.5rem; font-size: var(--fs-text); }
.btn--light { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-alpha-strong), 0 1px 2px rgb(var(--tint-ink) / 0.04); }
.btn--light:hover { color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-alpha-strong), 0 10px 20px -12px rgb(var(--tint-ink) / 0.3); }
.btn--light:active { background: var(--sand); }
.btn__roll { display: grid; overflow: hidden; }
.btn__roll > span { grid-area: 1 / 1; transition: transform 0.35s var(--ease-ui); }
.btn__roll::after { content: attr(data-label); grid-area: 1 / 1; transform: translateY(110%); transition: transform 0.35s var(--ease-ui); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover .btn__roll > span { transform: translateY(-110%); }
  .btn:hover .btn__roll::after { transform: translateY(0); }
}
.cta { display: grid; gap: 0.75rem; justify-items: start; }
.cta--center { justify-items: center; text-align: center; }
.cta__note { font-size: var(--fs-small); line-height: 1.47; color: var(--graphite); max-width: 34ch; }
.cta__note + .cta__note { margin-top: -0.375rem; }

/* ---------- 7. Form elements ---------- */
.field { display: grid; gap: 0.4375rem; min-width: 0; align-content: start; }
.field > label, .field > legend, .fieldset legend { font-size: var(--fs-small); font-weight: var(--fw-medium); }
.field .opt { font-weight: var(--fw-regular); color: var(--graphite); }
.input { width: 100%; min-height: 3rem; padding: 0.625rem 0.875rem; border: 1px solid var(--field); border-radius: var(--r-s); background: var(--white); font-size: var(--fs-text); line-height: 1.4; transition: border-color 0.2s, box-shadow 0.2s; -webkit-appearance: none; appearance: none; }
textarea.input { min-height: 5.5rem; resize: vertical; }
.input:hover { border-color: var(--graphite); }
.input:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; border-color: var(--ink); border-radius: var(--r-s); }
.input[aria-invalid="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.fieldset { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: 0.4375rem; }
.fieldset legend { padding: 0; margin-bottom: 0.4375rem; }
.seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; }
.seg--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.seg label { position: relative; display: block; cursor: pointer; }
.seg span { display: grid; place-items: center; min-height: 3rem; padding: 0.375rem 0.5rem; border: 1px solid var(--field); border-radius: var(--r-s); background: var(--white); font-size: var(--fs-text); font-weight: var(--fw-medium); text-align: center; transition: background-color 0.25s var(--ease-ui), color 0.25s, border-color 0.25s; }
.seg input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.seg label:hover span { border-color: var(--graphite); }
.seg input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--white); }
.seg input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.fieldset[aria-invalid="true"] .seg span { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.check { display: grid; grid-template-columns: auto 1fr; gap: 0.75rem; align-items: start; min-height: 2.75rem; align-content: center; font-size: var(--fs-small); line-height: 1.47; }
.check input { width: 1.375rem; height: 1.375rem; margin: 0.05rem 0 0; accent-color: var(--orange-deep); }
.err { display: grid; grid-template-columns: auto 1fr; gap: 0.5rem; font-size: var(--fs-small); line-height: 1.4; color: var(--ink); font-weight: var(--fw-medium); }
.err::before { content: ""; width: 0.6875rem; height: 0.6875rem; margin-top: 0.3em; border-radius: 50%; border: 1.5px solid var(--ink); }
.err:empty { display: none; }
.hint { font-size: var(--fs-small); color: var(--graphite); }

/* ---------- 8. Icons ---------- */
.icon { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- 9. Rich text: long pages such as privacy, terms and the refund policy ---------- */
.rich { max-width: 65ch; display: grid; gap: 1rem; }
.rich h2 { margin-top: 0.5rem; font-size: var(--fs-title); line-height: 1.08; font-weight: var(--fw-medium); letter-spacing: -0.035em; text-wrap: balance; }
.rich h3 { margin-top: 0.75rem; font-size: var(--fs-h4); line-height: 1.2; font-weight: var(--fw-semibold); letter-spacing: -0.02em; }
.rich a { color: var(--orange-deep); }
.rich a:hover { color: var(--ink); }
.rich ul, .rich ol { display: grid; gap: 0.5rem; padding-left: 0.25rem; }
.rich li { display: grid; grid-template-columns: 1.5rem 1fr; }
.rich ul li::before { content: ""; width: 0.375rem; height: 0.375rem; margin-top: 0.62em; border-radius: 50%; background: var(--orange); }
.rich ol { counter-reset: rich; }
.rich ol li { counter-increment: rich; }
.rich ol li::before { content: counter(rich) "."; font-variant-numeric: tabular-nums; color: var(--graphite); }
.rich blockquote { margin-block: 0.5rem; padding-left: 1.25rem; border-left: 2px solid var(--orange); font-family: var(--serif); font-style: italic; font-size: var(--fs-quote); line-height: 1.2; letter-spacing: -0.015em; }
.rich__note { font-size: var(--fs-small); color: var(--graphite); }

/* ---------- 10. Small screens, forced colors ---------- */
@media (max-width: 39.99rem) {
  .seg span { font-size: var(--fs-small); padding-inline: 0.25rem; }
}
@media (max-width: 22.5rem) {
  :root { --gutter: 1rem; --inset: 0.5rem; --fs-display: 2.125rem; --fs-h2: 1.875rem; }
  .btn { white-space: normal; }
  .seg { grid-template-columns: minmax(0, 1fr); }
  .seg--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (forced-colors: active) {
  .mark.is-done, .mark--done, .pill::before { background: CanvasText; }
  .btn { border: 1px solid ButtonText; }
  .seg input:checked + span { forced-color-adjust: none; background: Highlight; color: HighlightText; border-color: Highlight; }
}
