/* FilingMath. Paper, form-blue ink, one stamp color for verification. */
:root {
  --paper: #f6f8fb;
  --sheet: #ffffff;
  --ink: #16213e;
  --muted: #56627a;
  --rule: #cdd7e6;
  --form: #2346a8;
  --form-soft: #e8eefb;
  --stamp: #b4235a;
  --ok: #17663d;
  --radius: 4px;
  --measure: 70ch;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0f1a2e;
    --sheet: #15223a;
    --ink: #e6ecf5;
    --muted: #a3b0c6;
    --rule: #2c3d5c;
    --form: #93abff;
    --form-soft: #1d2d4d;
    --stamp: #f07aa8;
    --ok: #6fd39b;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0f1a2e; --sheet: #15223a; --ink: #e6ecf5; --muted: #a3b0c6; --rule: #2c3d5c;
  --form: #93abff; --form-soft: #1d2d4d; --stamp: #f07aa8; --ok: #6fd39b; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
  font-feature-settings: "tnum" 1;
}
a { color: var(--form); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--form); outline-offset: 2px; border-radius: 2px; }

.wrap { max-width: 64rem; margin: 0 auto; padding: 0 1rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.prose { max-width: var(--measure); }

/* Header and footer */
.site-head { border-bottom: 1px solid var(--rule); background: var(--sheet); }
.site-head .wrap { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem 1.5rem; padding-block: 0.9rem; }
.brand { font-weight: 800; font-size: 1.2rem; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; margin-right: auto; }
.nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; font-size: 0.95rem; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; }
.site-foot { margin-top: 5rem; border-top: 1px solid var(--rule); color: var(--muted); font-size: 0.9rem; }
.site-foot .wrap { padding-block: 2rem 3rem; display: grid; gap: 0.75rem; }
.site-foot nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }

/* Type scale (1.25 ratio) */
h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3rem); line-height: 1.08; letter-spacing: -0.025em; font-weight: 800; margin: 2.5rem 0 1rem; max-width: 22ch; }
h2 { font-size: 1.5rem; line-height: 1.2; letter-spacing: -0.015em; font-weight: 750; margin: 3rem 0 0.75rem; }
h3 { font-size: 1.125rem; line-height: 1.3; font-weight: 700; margin: 1.5rem 0 0.5rem; }
p { margin: 0 0 1rem; }
.lede { font-size: 1.2rem; color: var(--muted); max-width: 60ch; }
.crumbs { font-size: 0.9rem; color: var(--muted); margin-top: 1.5rem; }
.crumbs a { color: var(--muted); }

/* The live sentence: the one bold element */
.ask { margin: 1.5rem 0 2rem; font-size: clamp(1.5rem, 1.05rem + 2.2vw, 2.4rem); line-height: 1.3; font-weight: 300; letter-spacing: -0.015em; max-width: 30ch; }
.ask strong { font-weight: 800; }
.ask select {
  font: inherit; font-weight: 800; color: var(--form); background: var(--form-soft);
  border: 0; border-bottom: 3px solid var(--form); border-radius: var(--radius) var(--radius) 0 0;
  padding: 0 0.25em; max-width: 100%; cursor: pointer;
  field-sizing: content;
}

/* Receipt */
.tool { display: grid; gap: 2rem; align-items: start; }
@media (min-width: 52rem) { .tool { grid-template-columns: minmax(0, 26rem) minmax(0, 1fr); } }
.receipt {
  margin: 0; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 1.25rem 1.25rem 1rem; position: relative;
  box-shadow: 0 1px 0 var(--rule), 0 12px 24px -18px rgba(22, 33, 62, 0.35);
}
.receipt-head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-weight: 700; padding-bottom: 0.75rem; border-bottom: 1px dashed var(--rule); }
.receipt-span { font-weight: 400; color: var(--muted); font-size: 0.9rem; }
.periods { list-style: none; margin: 0; padding: 0; }
.period { padding: 0.6rem 0; border-bottom: 1px dashed var(--rule); }
.period-label { font-size: 0.85rem; font-weight: 700; color: var(--muted); margin: 0 0 0.25rem; }
.lines { list-style: none; margin: 0; padding: 0; }
.line, .receipt-total { display: flex; align-items: baseline; gap: 0.4rem; padding: 0.15rem 0; }
.item { flex: 0 1 auto; min-width: 0; }
.leader { flex: 1 1 1rem; border-bottom: 2px dotted var(--rule); transform: translateY(-0.3em); min-width: 1rem; }
.amt { flex: none; font-weight: 700; }
.amt-unknown { font-weight: 400; color: var(--stamp); font-size: 0.9rem; }
.src { font-size: 0.8rem; color: var(--muted); }
.line-none .item { color: var(--muted); }
.receipt-total { margin-top: 0.75rem; padding-top: 0.6rem; border-top: 3px double var(--ink); font-weight: 800; font-size: 1.15rem; }
.receipt-note { font-size: 0.85rem; color: var(--muted); margin: 0.75rem 0 0; }
.stamp {
  display: inline-block; margin: 1rem 0 0; padding: 0.2rem 0.6rem; color: var(--stamp);
  border: 2px solid var(--stamp); border-radius: 3px; font-weight: 800; font-size: 0.85rem;
  transform: rotate(-2deg);
}
@media (prefers-reduced-motion: no-preference) {
  .receipt.is-new .stamp { animation: stamp 260ms ease-out; }
  @keyframes stamp { from { transform: rotate(-2deg) scale(1.35); opacity: 0; } to { transform: rotate(-2deg) scale(1); opacity: 1; } }
}

/* Table of all states */
.table-scroll { overflow-x: auto; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--sheet); }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td { padding: 0.55rem 0.75rem; text-align: right; border-bottom: 1px solid var(--rule); white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
thead th { position: sticky; top: 0; background: var(--sheet); font-weight: 700; }
th button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }
th[aria-sort="ascending"] button::after { content: " \2191"; }
th[aria-sort="descending"] button::after { content: " \2193"; }
tbody tr:hover { background: var(--form-soft); }
td.flag { color: var(--stamp); }

/* Forms (quiz) */
fieldset { border: 0; padding: 0; margin: 0 0 1.75rem; }
legend { font-weight: 700; font-size: 1.125rem; margin-bottom: 0.5rem; padding: 0; }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; max-width: 40rem; }
.steps > li { counter-increment: step; position: relative; padding-left: 2.5rem; }
.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: 0.05rem; width: 1.75rem; height: 1.75rem;
  border: 2px solid var(--form); border-radius: 50%; color: var(--form); font-weight: 800;
  display: grid; place-items: center; font-size: 0.9rem;
}
select, input[type="number"] {
  font: inherit; color: var(--ink); background: var(--sheet); border: 1px solid var(--rule);
  border-radius: var(--radius); padding: 0.45rem 0.6rem; max-width: 100%;
}
.choice { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.choice label { display: flex; gap: 0.4rem; align-items: center; cursor: pointer; }
.hint { color: var(--muted); font-size: 0.9rem; margin: 0.35rem 0 0; }
.btn {
  font: inherit; font-weight: 700; background: var(--form); color: var(--sheet); border: 0;
  border-radius: var(--radius); padding: 0.7rem 1.1rem; cursor: pointer; text-decoration: none; display: inline-block;
}
.btn:hover { filter: brightness(1.08); }

/* Quiz result */
.paths { display: grid; gap: 1rem; margin: 1rem 0 1.5rem; }
@media (min-width: 52rem) { .paths { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.path { border: 1px solid var(--rule); background: var(--sheet); border-radius: var(--radius); padding: 1rem; }
.path.best { border: 2px solid var(--ok); }
.path h3 { margin: 0 0 0.25rem; }
.path .big { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.02em; margin: 0.25rem 0; }
.path .best-mark { color: var(--ok); font-weight: 700; font-size: 0.9rem; margin: 0; }
.verdict { font-size: 1.2rem; max-width: 60ch; }
details { margin-top: 0.5rem; }
summary { cursor: pointer; color: var(--form); }

/* Formation services */
.services { border-top: 1px solid var(--rule); margin-top: 2.5rem; padding-top: 0.5rem; max-width: var(--measure); }
.service-list { list-style: none; padding: 0; margin: 0 0 0.75rem; display: grid; gap: 0.5rem; }
.service-list li { display: flex; flex-wrap: wrap; gap: 0.25rem 0.75rem; align-items: baseline; }
.tag { font-size: 0.8rem; color: var(--muted); border: 1px solid var(--rule); border-radius: 3px; padding: 0 0.35rem; }
.fine { font-size: 0.85rem; color: var(--muted); }

.cols { display: grid; gap: 0.25rem 2rem; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); list-style: none; padding: 0; }
.tools { list-style: none; padding: 0; display: grid; gap: 1.25rem; max-width: var(--measure); }
.tools a { font-size: 1.25rem; font-weight: 700; }
.tools p { margin: 0.25rem 0 0; color: var(--muted); }
