/*
  Plainfare: CRM pricing page (Screenery template)
  The page is a shelf of nutrition-facts labels: black type and black rules on white, three rule weights (hairline,
  5px, 10px) doing all the structure, Pathway Gothic One for the label titles and prices, Pathway Extreme for everything else.
  One accent, label red, means only "this fits you best" or "this is over the limit".

  Contents
   1. Tokens
   2. Base and browser surfaces
   3. Components: buttons, segmented switches, stepper, fields, select, checkbox, messages
   4. Header
   5. Hero: intro, serving size panel
   6. The plan label (.nf) and the shelf
   7. Linear label (arithmetic)
   8. Section heads, how to read, full declaration
   9. Add-ons, tax, billing questions
  10. Checkout, order label, states
  11. Footer
  12. Motion
  13. Narrow screens
*/

/* ---------- 1. Tokens ---------- */
:root {
  --paper: #ffffff;          /* label stock */
  --ground: #f3f2ee;         /* the shelf behind the labels */
  --ink: #111111;            /* print black */
  --ink-2: #3d3d3d;          /* secondary text, 10:1 on paper */
  --ink-3: #5e5e5e;          /* tertiary, 6.3:1 on paper, 5.6:1 on ground */
  --rule-soft: #c9c7c0;      /* field outlines on ground */
  --accent: #c2321c;         /* label red: best fit or over limit. 5.3:1 on paper */
  --accent-ink: #a12512;     /* accent text on ground */
  --accent-wash: #fbe9e5;    /* a faint red tint behind warnings */

  --f-body: 'Pathway Extreme', 'Helvetica Neue', Arial, sans-serif;
  --f-label: 'Pathway Gothic One', 'Arial Narrow', sans-serif;

  /* Rule weights, from the food label */
  --hair: 1px;
  --mid: 5px;
  --bar: 10px;

  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 72px; --s-9: 112px;
  --gutter: clamp(16px, 3.2vw, 48px);
  --max: 1400px;
  --radius: 0;               /* labels are cut square */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --top-h: 60px;
}

/* ---------- 2. Base and browser surfaces ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--top-h) + 16px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font-family: var(--f-body); font-size: 1rem; line-height: 1.5; font-optical-sizing: auto;
  font-variant-numeric: tabular-nums;
  scrollbar-color: var(--ink) var(--ground);
}
::selection { background: var(--ink); color: var(--paper); }
input, textarea { caret-color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
svg use { pointer-events: none; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--paper); padding: 10px 14px; }
.skip:focus { top: 12px; }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--ground); }
::-webkit-scrollbar-thumb { background: var(--ink); border: 3px solid var(--ground); }

/* ---------- 3. Components ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 44px; padding: 10px 20px; border: 2px solid var(--ink); border-radius: var(--radius);
  font-weight: 800; font-size: 0.95rem; letter-spacing: 0.01em; text-decoration: none; cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}
.btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink:hover { background: var(--accent); border-color: var(--accent); }
.btn--line { background: var(--paper); color: var(--ink); }
.btn--line:hover { background: var(--ink); color: var(--paper); }
.btn--sm { min-height: 40px; padding: 7px 14px; font-size: 0.875rem; }
.btn--lg { min-height: 56px; padding: 14px 26px; font-size: 1.05rem; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn.is-loading { pointer-events: none; }
.btn.is-loading svg { animation: nudge 0.9s var(--ease) infinite; }
@keyframes nudge { 50% { transform: translateX(4px); } }

.link-btn { background: none; border: 0; padding: 8px 0; min-height: 44px; font-weight: 700; text-decoration: underline; text-underline-offset: 0.2em; cursor: pointer; }

/* Segmented switch: square, ruled, the pressed one is filled black */
.seg { display: inline-flex; border: 2px solid var(--ink); background: var(--paper); }
.seg button {
  min-height: 40px; padding: 6px 12px; border: 0; background: none; cursor: pointer; font-weight: 700; font-size: 0.875rem;
  display: inline-flex; align-items: center; gap: 6px;
}
.seg button + button { border-left: 2px solid var(--ink); }
.seg button small { font-weight: 500; font-size: 0.75rem; color: var(--accent); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.seg button[aria-pressed="true"] small { color: #ffc2b6; }

.stepper { justify-self: start; display: inline-flex; border: 2px solid var(--ink); background: var(--paper); }
.stepper input {
  width: 4.5ch; min-width: 64px; border: 0; border-inline: 2px solid var(--ink); text-align: center; background: none;
  font-family: var(--f-label); font-size: 1.75rem; line-height: 1; -moz-appearance: textfield; appearance: textfield;
}
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.step { width: 44px; min-height: 44px; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.step:hover { background: var(--ink); color: var(--paper); }
.step svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; }

.num {
  width: 100%; min-height: 48px; padding: 4px 12px; border: 2px solid var(--ink); border-radius: 0; background: var(--paper);
  font-family: var(--f-label); font-size: 1.75rem; line-height: 1;
}
.range { width: 100%; margin: 12px 0 0; accent-color: var(--ink); height: 24px; }

.msg { min-height: 0; font-size: 0.8125rem; font-weight: 600; color: var(--accent-ink); }
.msg:empty { display: none; }
[aria-invalid="true"] { border-color: var(--accent) !important; box-shadow: inset 0 0 0 1px var(--accent); }

.field { display: grid; gap: 6px; grid-column: 1 / -1; }
.field--half { grid-column: span 1; }
.field label { font-weight: 800; font-size: 0.9rem; }
.field label small, .sv-label small { font-weight: 500; color: var(--ink-3); font-size: 0.8125rem; }
.field input:not([type="checkbox"]), .field textarea, .select select {
  width: 100%; min-height: 48px; padding: 10px 12px; border: 2px solid var(--ink); border-radius: 0; background: var(--paper);
  font-size: 1rem;
}
.field textarea { resize: vertical; min-height: 88px; }
::placeholder { color: var(--ink-3); opacity: 1; }
.select { position: relative; }
.select select { appearance: none; padding-right: 40px; cursor: pointer; }
.select svg { position: absolute; right: 12px; top: 50%; width: 16px; height: 16px; margin-top: -8px; fill: none; stroke: currentColor; stroke-width: 1.5; pointer-events: none; }

/* Drawn checkbox: a square box with a black check */
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-weight: 500; font-size: 0.9rem; }
.check input {
  appearance: none; flex: none; width: 24px; height: 24px; margin: 0; border: 2px solid var(--ink); background: var(--paper); cursor: pointer;
  display: grid; place-items: center;
}
.check input::after { content: ''; width: 12px; height: 7px; border: solid var(--paper); border-width: 0 0 2.5px 2.5px; transform: rotate(-45deg) translate(1px, -1px); }
.check input:checked { background: var(--ink); }

/* ---------- 4. Header ---------- */
.top {
  position: sticky; top: 0; z-index: 20; background: var(--paper);
  border-bottom: var(--mid) solid var(--ink);
}
.top-in { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); height: var(--top-h); display: flex; align-items: center; gap: var(--s-6); }
.mark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--f-label); font-size: 1.85rem; line-height: 1; letter-spacing: 0.01em; }
.mark svg { flex: none; }
.nav { display: flex; gap: var(--s-5); margin-left: auto; font-weight: 600; font-size: 0.9rem; }
.nav a { text-decoration: none; padding: 10px 0; }
.nav a:hover { text-decoration: underline; }

/* ---------- 5. Hero ---------- */
.hero {
  max-width: var(--max); margin: 0 auto; padding: var(--s-7) var(--gutter) var(--s-8);
  display: grid; grid-template-columns: minmax(300px, 340px) 1fr; gap: var(--s-6) var(--s-7); align-items: start;
}
.intro { display: grid; gap: var(--s-5); position: sticky; top: calc(var(--top-h) + 24px); }
.hero h1 { font-family: var(--f-label); font-weight: 400; font-size: clamp(2.75rem, 4.4vw, 4.25rem); line-height: 0.95; letter-spacing: -0.005em; }
.lede { color: var(--ink-2); font-size: 0.98rem; max-width: 60ch; }

.serving { background: var(--paper); border: 2px solid var(--ink); padding: var(--s-4) var(--s-4) var(--s-5); display: grid; gap: var(--s-4); }
.serving-title { font-family: var(--f-label); font-weight: 400; font-size: 1.9rem; line-height: 1; padding-bottom: var(--s-2); border-bottom: var(--bar) solid var(--ink); }
.sv-row { display: grid; gap: 8px; padding-bottom: var(--s-4); border-bottom: var(--hair) solid var(--ink); }
.sv-row:last-of-type { border-bottom: 0; padding-bottom: 0; }
.sv-row--split { display: flex; flex-wrap: wrap; gap: var(--s-4) var(--s-5); }
.sv-row--split > div { display: grid; gap: 8px; }
.sv-label { font-weight: 800; font-size: 0.9rem; display: flex; flex-wrap: wrap; gap: 0 8px; align-items: baseline; }
.ent-warn { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; background: var(--accent-wash); border: 2px solid var(--accent); font-weight: 600; font-size: 0.875rem; }
.ent-warn svg { flex: none; width: 18px; height: 18px; fill: none; stroke: var(--accent); stroke-width: 1.5; margin-top: 2px; }
.ent-warn[hidden] { display: none; }

/* ---------- 6. The plan label ---------- */
.shelf-wrap { min-width: 0; }
.shelf-tabs { display: none; }
.shelf { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-5); align-items: start; }

.nf {
  background: var(--paper); border: 2px solid var(--ink); padding: 6px 10px 14px;
  font-size: 0.8125rem; line-height: 1.3; position: relative;
  display: flex; flex-direction: column;
  transition: box-shadow 0.35s var(--ease), transform 0.35s var(--ease);
}
.nf.is-best { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent), 0 18px 32px -20px rgba(17, 17, 17, 0.45); }
.nf-head { display: grid; }
.nf-title { font-family: var(--f-label); font-weight: 400; font-size: clamp(2.6rem, 3.6vw, 3.4rem); line-height: 0.92; letter-spacing: -0.01em; padding-top: 2px; }
.nf-plan { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; padding: 2px 0 4px; border-bottom: var(--hair) solid var(--ink); font-weight: 900; font-size: 1.05rem; }
.nf-most { flex-basis: 100%; font-weight: 600; font-size: 0.75rem; color: var(--ink-2); }
.nf-servings { padding-top: 4px; font-size: 0.95rem; }
.nf-size { display: flex; justify-content: space-between; gap: 8px; font-size: 1.05rem; font-weight: 900; padding-bottom: 4px; border-bottom: var(--bar) solid var(--ink); }

.nf-cal { border-bottom: var(--mid) solid var(--ink); padding: 4px 0 6px; }
.nf-amt { font-weight: 800; font-size: 0.75rem; }
.nf-cal-row { display: grid; grid-template-columns: auto 1fr auto; align-items: end; gap: 6px 12px; }
.nf-cal-name { font-family: var(--f-label); font-size: 2.1rem; line-height: 0.95; }
.nf-cal-col { display: grid; justify-items: end; text-align: right; }
.nf-cal-col small { font-size: 0.6875rem; font-weight: 700; }
.nf-big { font-family: var(--f-label); font-size: clamp(1.6rem, 2.1vw, 2.15rem); line-height: 0.95; white-space: nowrap; }
.nf-billed { font-size: 0.75rem; padding-top: 4px; text-align: right; color: var(--ink-2); }
.nf-billed b { color: var(--ink); }

.nf-table { width: 100%; border-collapse: collapse; }
.nf-table thead th { font-size: 0.6875rem; font-weight: 800; text-align: right; padding: 3px 0 3px 8px; border-bottom: var(--hair) solid var(--ink); white-space: nowrap; }
.nf-table th[scope="row"] { text-align: left; font-weight: 500; padding: 3px 4px 3px 0; }
.nf-table td { text-align: right; padding: 3px 0 3px 4px; white-space: nowrap; font-stretch: 87.5%; }
.nf-table td:nth-child(2), .nf-table thead th:nth-child(2) { color: var(--ink-2); }
.nf-table tbody tr { border-bottom: var(--hair) solid var(--ink); }
.nf-table tbody tr:last-child { border-bottom: var(--bar) solid var(--ink); }
.nf-major th[scope="row"] { font-weight: 900 !important; }
.nf-major td:nth-child(3) { font-weight: 700; }
.nf-table td small { font-weight: 500; font-size: 0.6875rem; }
.nf-sub th[scope="row"] { padding-left: 12px !important; }
.nf-note { color: var(--ink-3); }
.dv { font-weight: 900; }
.dv.is-over { color: var(--paper); background: var(--accent); padding: 0 2px; }

.nf-vit { list-style: none; margin: 0; padding: 2px 0 0; display: grid; border-bottom: var(--mid) solid var(--ink); }
.nf-vit li { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; }
.nf-vit li + li { border-top: var(--hair) solid var(--ink); }
.nf-no { color: var(--ink-3); }
.nf-foot { font-size: 0.75rem; line-height: 1.35; padding: 6px 0; border-bottom: var(--hair) solid var(--ink); }
.nf-ingr { font-size: 0.75rem; line-height: 1.35; padding-top: 6px; }
.nf-ingr b { font-weight: 900; }
.nf-min { font-size: 0.75rem; font-weight: 700; padding-top: 8px; }
.nf-flag { margin-top: 12px; padding: 7px 9px; border: 2px solid var(--ink); font-weight: 700; font-size: 0.8125rem; }
.nf-flag--ok { border: 0; padding: 0; font-weight: 600; color: var(--ink-2); }
.nf-flag--best { background: var(--accent); border-color: var(--accent); color: var(--paper); }
.nf-flag--bad { border-color: var(--accent); color: var(--accent-ink); background: var(--accent-wash); }
.nf-choose { margin-top: 10px; width: 100%; }
.nf.is-unfit .nf-choose { background: var(--paper); color: var(--ink-2); border-color: var(--ink-3); }
.nf.is-unfit .nf-choose:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ---------- 7. Linear label ---------- */
.linear-wrap { margin-top: var(--s-5); background: var(--paper); border: 2px solid var(--ink); padding: 10px 14px 12px; display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; align-items: start; }
.linear-head { font-family: var(--f-label); font-size: 1.6rem; line-height: 1; padding-right: 18px; border-right: var(--mid) solid var(--ink); align-self: stretch; }
.linear { font-size: 0.875rem; line-height: 1.55; max-width: 120ch; }
.linear b { font-weight: 900; }
.linear .lin-others { color: var(--ink-2); }

/* ---------- 8. Sections ---------- */
main > section:not(.hero) { max-width: var(--max); margin: 0 auto; padding: var(--s-8) var(--gutter) 0; }
.sec-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: var(--s-3) var(--s-7); align-items: end; padding-top: var(--s-3); border-top: var(--bar) solid var(--ink); margin-bottom: var(--s-6); }
.sec-head h2 { font-family: var(--f-label); font-weight: 400; font-size: clamp(2.4rem, 4.2vw, 3.75rem); line-height: 0.95; }
.sec-head p { color: var(--ink-2); max-width: 62ch; }

/* How to read */
.read-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: var(--s-7); align-items: start; }
.read-fig { margin: 0; display: grid; gap: 10px; }
.read-fig svg { width: 100%; height: auto; display: block; max-width: 480px; }
.read-fig figcaption { font-size: 0.8125rem; color: var(--ink-3); }
.r-title { font-family: var(--f-label); font-size: 60px; fill: var(--ink); }
.r-cal { font-family: var(--f-label); font-size: 44px; fill: var(--ink); }
.r-body { font-family: var(--f-body); font-size: 17px; fill: var(--ink); }
.r-bold { font-family: var(--f-body); font-size: 18px; font-weight: 900; fill: var(--ink); }
.r-small { font-family: var(--f-body); font-size: 14px; font-weight: 700; fill: var(--ink); }
.r-lead path { stroke: var(--accent); stroke-width: 2; fill: none; }
.r-pin circle { fill: var(--accent); }
.r-pin text { font-family: var(--f-body); font-weight: 900; font-size: 16px; fill: var(--paper); }
.read-list { list-style: none; margin: 0; padding: 0; counter-reset: pin; display: grid; }
.read-list li { counter-increment: pin; display: grid; grid-template-columns: 34px 1fr; column-gap: 16px; padding: var(--s-4) 0; border-bottom: var(--hair) solid var(--ink); }
.read-list li:first-child { padding-top: 0; }
.read-list li::before {
  content: counter(pin); grid-row: span 2; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--paper);
  display: grid; place-items: center; font-weight: 900; font-size: 0.95rem;
}
.read-list h3 { font-size: 1.1rem; font-weight: 900; }
.read-list p { color: var(--ink-2); max-width: 62ch; }

/* Full declaration */
.cmp-tabs { display: none; }
.cmp-wrap { background: var(--paper); border: 2px solid var(--ink); }
.cmp { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.cmp .c-feat { width: 34%; }
.cmp thead th { position: sticky; top: calc(var(--top-h) + 5px); z-index: 2; background: var(--paper); text-align: left; vertical-align: bottom; padding: 14px 16px 10px; border-bottom: var(--bar) solid var(--ink); }
.cmp thead th[data-col] { display: table-cell; }
.cmp-name { display: block; font-family: var(--f-label); font-weight: 400; font-size: 1.9rem; line-height: 1; }
.cmp-price { display: block; font-weight: 900; font-size: 1.15rem; margin-top: 4px; }
.cmp thead small { display: block; font-weight: 500; font-size: 0.75rem; color: var(--ink-3); }
.cmp thead th[data-col="team"] .cmp-name::after { content: ' recommended'; font-family: var(--f-body); font-size: 0.75rem; font-weight: 800; color: var(--accent); vertical-align: middle; }
.cmp tbody th, .cmp tbody td { padding: 9px 16px; border-bottom: var(--hair) solid var(--ink); text-align: left; vertical-align: top; }
.cmp tbody th[scope="row"] { font-weight: 600; }
.cmp td[data-col="team"] { background: #faf9f6; }
.cmp .cmp-group th { padding: 18px 16px 6px; font-weight: 900; font-size: 1rem; border-bottom: var(--mid) solid var(--ink); background: var(--paper); }
.cmp tfoot th, .cmp tfoot td { padding: 16px; }
.why { margin-top: var(--s-5); max-width: 78ch; color: var(--ink-2); }

/* ---------- 9. Add-ons, tax, questions ---------- */
.addon-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-5); align-items: stretch; }
.mini { background: var(--paper); border: 2px solid var(--ink); padding: 8px 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.mini-title { font-family: var(--f-label); font-size: 1.7rem; line-height: 1; padding-bottom: 6px; border-bottom: var(--bar) solid var(--ink); }
.mini-price { display: flex; align-items: baseline; gap: 8px; padding-bottom: 6px; border-bottom: var(--mid) solid var(--ink); }
.mini-price span { font-family: var(--f-label); font-size: 2rem; line-height: 1; }
.mini-price small { font-size: 0.8125rem; font-weight: 700; }
.mini-body { font-size: 0.875rem; color: var(--ink-2); flex: 1; }
.mini-auto { display: flex; gap: 8px; align-items: center; font-weight: 700; font-size: 0.875rem; padding-top: 8px; border-top: var(--hair) solid var(--ink); min-height: 44px; }
.mini-auto svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.mini--pick { cursor: pointer; transition: border-color 0.2s var(--ease); }
.mini--pick .check { padding-top: 8px; border-top: var(--hair) solid var(--ink); min-height: 44px; align-items: center; font-weight: 700; }
.mini--pick:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.mini--pick:hover { border-color: var(--accent); }

.tax-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5); align-items: start; }
.facts { width: 100%; border-collapse: collapse; background: var(--paper); border: 2px solid var(--ink); font-size: 0.9rem; }
.facts caption { text-align: left; font-family: var(--f-label); font-size: 1.7rem; line-height: 1; padding: 0 0 8px; }
.facts th, .facts td { text-align: left; vertical-align: top; padding: 9px 14px; border-bottom: var(--hair) solid var(--ink); }
.facts th { font-weight: 800; width: 42%; }
.facts tr:last-child th, .facts tr:last-child td { border-bottom: 0; }

.faq-list { display: grid; background: var(--paper); border: 2px solid var(--ink); }
.faq-list details { border-bottom: var(--hair) solid var(--ink); }
.faq-list details:last-child { border-bottom: 0; }
.faq-list summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 18px; min-height: 56px; cursor: pointer; font-weight: 800; font-size: 1.02rem; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary svg { flex: none; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; transition: transform 0.3s var(--ease); }
.faq-list details[open] summary svg { transform: rotate(180deg); }
.faq-list details[open] summary { border-bottom: var(--mid) solid var(--ink); }
.faq-list details p { padding: 14px 18px 20px; max-width: 72ch; color: var(--ink-2); }
.faq-list summary:hover span { text-decoration: underline; text-underline-offset: 0.2em; }

/* ---------- 10. Checkout ---------- */
.checkout { padding-bottom: var(--s-9) !important; }
.co-grid { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: var(--s-7); align-items: start; }
.sum-wrap { position: sticky; top: calc(var(--top-h) + 24px); display: grid; gap: 4px; }
.summary { background: var(--paper); border: 2px solid var(--ink); padding: 6px 14px 14px; }
.sum-title { font-family: var(--f-label); font-weight: 400; font-size: 2.6rem; line-height: 1; padding-bottom: 4px; border-bottom: var(--hair) solid var(--ink); }
.sum-plan { font-weight: 900; padding: 6px 0; border-bottom: var(--bar) solid var(--ink); display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.sum-tag { background: var(--accent); color: var(--paper); font-size: 0.75rem; font-weight: 800; padding: 1px 6px; }
.sum-bad { margin-top: 10px; padding: 8px 10px; background: var(--accent-wash); border: 2px solid var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 0.875rem; }
.sum-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.sum-table th { text-align: left; font-weight: 800; padding: 8px 8px 8px 0; border-bottom: var(--hair) solid var(--ink); }
.sum-table th small { display: block; font-weight: 500; font-size: 0.8125rem; color: var(--ink-3); }
.sum-table td { text-align: right; padding: 8px 0; border-bottom: var(--hair) solid var(--ink); white-space: nowrap; vertical-align: top; }
.sum-table tfoot th, .sum-table tfoot td { border-top: var(--mid) solid var(--ink); border-bottom: 0; font-size: 1rem; }
.sum-table tfoot td { font-family: var(--f-label); font-size: 2rem; line-height: 1; padding-top: 10px; }
.sum-note { padding-top: 10px; font-size: 0.8125rem; color: var(--ink-2); }

.co-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4) var(--s-5); background: var(--paper); border: 2px solid var(--ink); padding: var(--s-5); }
.co-form[hidden] { display: none; }
.field--sales { display: none; }
.checkout[data-mode="sales"] .field--sales { display: grid; }
.checkout[data-mode="sales"] .field:has(#f-vat) { display: none; }
.co-form .btn--lg { grid-column: 1 / -1; justify-self: start; }
.status { grid-column: 1 / -1; padding: 12px 14px; border: 2px solid var(--ink); font-size: 0.9rem; display: grid; gap: 10px; justify-items: start; }
.status[hidden] { display: none; }
.status--wait { background: var(--ground); }
.status--wait p::before { content: ''; display: inline-block; width: 10px; height: 10px; margin-right: 10px; background: var(--ink); animation: blink 1s steps(2, start) infinite; }
@keyframes blink { to { visibility: hidden; } }
.status--bad { background: var(--accent-wash); border-color: var(--accent); }
.done { background: var(--paper); border: 2px solid var(--ink); border-top: var(--bar) solid var(--accent); padding: var(--s-5); display: grid; gap: 12px; justify-items: start; }
.done[hidden] { display: none; }
.done:focus { outline: none; }
.done-title { font-family: var(--f-label); font-weight: 400; font-size: 2.6rem; line-height: 1; }
.done p { max-width: 60ch; }

/* ---------- 11. Footer ---------- */
.foot { background: var(--ink); color: var(--paper); border-top: var(--bar) solid var(--ink); }
.foot-in { max-width: var(--max); margin: 0 auto; padding: var(--s-7) var(--gutter); display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: var(--s-6); font-size: 0.875rem; }
.foot .mark { font-size: 2rem; margin-bottom: 10px; }
.foot .mark svg rect:first-child { fill: var(--ink); stroke: var(--paper); }
.foot .mark svg path { stroke: var(--paper); }
.foot-mark p { color: #cfcfcf; max-width: 46ch; }
.foot-mark p + p { margin-top: 6px; }
.foot-facts { margin: 0; display: grid; align-content: start; border-top: var(--mid) solid var(--paper); }
.foot-facts div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: var(--hair) solid #777; }
.foot-facts dt { font-weight: 800; }
.foot-facts dd { margin: 0; color: #cfcfcf; text-align: right; }
.foot-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; gap: 0 18px; }
.foot-nav a { padding: 10px 0; color: var(--paper); text-decoration: none; border-bottom: var(--hair) solid #777; }
.foot-nav a:hover { text-decoration: underline; }
.foot :focus-visible { outline-color: #ff8f7a; }
::selection { background: var(--ink); color: var(--paper); }
.foot ::selection { background: var(--paper); color: var(--ink); }

/* ---------- 12. Motion: changed numbers flash a red underline while they count ---------- */
@media (prefers-reduced-motion: no-preference) {
  .is-changed { background: linear-gradient(var(--accent), var(--accent)) left bottom / 0% 3px no-repeat; animation: inked 0.9s var(--ease); }
  @keyframes inked { 0% { background-size: 100% 3px; } 60% { background-size: 100% 3px; } 100% { background-size: 0% 3px; } }
}

/* ---------- 13. Narrow screens ---------- */
/* Three labels in a row get tight just above the tab breakpoint */
@media (min-width: 1321px) and (max-width: 1460px) { .nf-table { font-size: 0.75rem; } }

@media (max-width: 1320px) {
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .intro { position: static; }
  .shelf-tabs { display: flex; border: 2px solid var(--ink); background: var(--paper); margin-bottom: var(--s-3); }
  .shelf-tabs button { flex: 1; min-height: 48px; border: 0; background: none; cursor: pointer; font-weight: 800; padding: 6px 8px; display: grid; justify-items: center; line-height: 1.15; }
  .shelf-tabs button + button { border-left: 2px solid var(--ink); }
  .shelf-tabs .tab-price { font-weight: 500; font-size: 0.75rem; }
  .shelf-tabs button[aria-selected="true"] { background: var(--ink); color: var(--paper); }
  .shelf { display: block; }
  .shelf .nf { display: none; }
  .shelf[data-show="starter"] #label-starter, .shelf[data-show="team"] #label-team, .shelf[data-show="business"] #label-business { display: flex; }
  html:not(.js) .shelf .nf { display: flex; margin-bottom: var(--s-5); }
  html:not(.js) .shelf-tabs { display: none; }
  .nf-title { font-size: 3.4rem; }
  .nf-big { font-size: 2.2rem; }
  .addon-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-in { grid-template-columns: 1fr 1fr; }
  .foot-mark { grid-column: 1 / -1; }
}

@media (max-width: 960px) {
  .nav { display: none; }
  .top-in { justify-content: space-between; }
  .sec-head { grid-template-columns: 1fr; }
  .read-grid { grid-template-columns: 1fr; }
  .read-fig svg { max-width: 420px; }
  .co-grid { grid-template-columns: 1fr; }
  .sum-wrap { position: static; }
  .tax-grid { grid-template-columns: 1fr; }
  /* The comparison shows one plan beside the feature names, picked with the tabs */
  .cmp-tabs { display: flex; border: 2px solid var(--ink); border-bottom: 0; background: var(--paper); position: sticky; top: calc(var(--top-h) + 5px); z-index: 3; }
  .cmp-tabs button { flex: 1; min-height: 48px; border: 0; background: none; cursor: pointer; font-weight: 800; }
  .cmp-tabs button + button { border-left: 2px solid var(--ink); }
  .cmp-tabs button[aria-selected="true"] { background: var(--ink); color: var(--paper); }
  .cmp thead th { position: static; }
  .cmp [data-col] { display: none !important; }
  .cmp-wrap[data-show="starter"] [data-col="starter"], .cmp-wrap[data-show="team"] [data-col="team"], .cmp-wrap[data-show="business"] [data-col="business"] { display: table-cell !important; }
  .cmp .c-feat { width: 52%; }
  .cmp td[data-col="team"] { background: none; }
  html:not(.js) .cmp [data-col] { display: table-cell !important; }
  html:not(.js) .cmp-tabs { display: none; }
}

@media (max-width: 720px) {
  :root { --top-h: 56px; }
  .hero { grid-template-columns: 1fr; padding-top: var(--s-6); }
  .linear-wrap { grid-template-columns: 1fr; }
  .linear-head { border-right: 0; border-bottom: var(--mid) solid var(--ink); padding: 0 0 6px; }
  .nf { font-size: 0.875rem; }
  .addon-row { grid-template-columns: 1fr; }
  .co-form { grid-template-columns: 1fr; padding: var(--s-4); }
  .field--half { grid-column: 1 / -1; }
  .co-form .btn--lg { width: 100%; }
  .foot-in { grid-template-columns: 1fr; }
  .cmp tbody th, .cmp tbody td { padding: 9px 12px; }
  .cmp thead th { padding: 12px; }
  .facts th { width: 40%; }
  .facts th, .facts td { padding: 9px 10px; }
  main > section:not(.hero) { padding-top: var(--s-7); }
}

@media (max-width: 400px) {
  .top .btn--sm { padding: 7px 10px; font-size: 0.8125rem; }
  .mark { font-size: 1.6rem; }
  .sv-row--split { gap: var(--s-4); }
}
