/* Kuotia public site: tokens, base, components and pages. The blog (index and articles) adds kuotia-blog.css.
   One stylesheet for the public site. Light by default, dark via
   prefers-color-scheme or html[data-theme="dark"] (toggle persists). */

@font-face {
  font-family: "Inter";
  src: url("../fonts/InterVariable-latin.80a909283f86.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ───────────── Tokens ───────────── */
:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-soft: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f9fafb;
  --ink: #0f1b2d;
  --ink-2: #475467;
  --muted: #5b6576;
  --line: #e4e8ee;
  --line-strong: #cfd6df;
  --brand-ink: #17325c;
  --accent: #2E86C1;
  --accent-ink: #1d6fa5;
  --accent-hover: #1a5276;
  --accent-soft: #edf5fb;
  --on-accent: #ffffff;
  --success: #047857;
  --success-mark: #10b981;
  --warn-line: #d08a00;
  --warn-soft: #fff7e6;
  --danger-line: #c4321f;
  --danger-soft: #fdf1ef;
  --ph-bg: #fff3cd;
  --ph-line: #c99a06;
  --ph-ink: #5c4300;
  --shadow-sheet: 0 1px 2px rgba(16, 24, 40, .04), 0 18px 40px -18px rgba(16, 24, 40, .18);
  --focus: 0 0 0 2px var(--bg), 0 0 0 4px #2E86C1;

  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fs-xs: .8125rem;
  --fs-sm: .9375rem;
  --fs-base: 1rem;
  --fs-read: 1.0625rem;
  --fs-lead: 1.1875rem;
  --fs-h3: 1.1875rem;
  --fs-h2: clamp(1.5rem, 1.15rem + 1.1vw, 2rem);
  --fs-h1: clamp(2.125rem, 1.45rem + 2.6vw, 3.375rem);
  --fs-h1-page: clamp(2rem, 1.5rem + 1.9vw, 2.875rem);

  --radius: 10px;
  --radius-btn: 8px; /* buttons and inputs, shared with the portal */
  --radius-lg: 14px;
  --wrap: 1120px;
  --gutter: 24px;
  --col-gap: 32px; /* the one column gap: every grid on the public site sits on 12 columns of --wrap */
  --head-h: 64px;
  --sec-y: clamp(48px, 6vw, 84px);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1019;
  --bg-soft: #0f1829;
  --surface: #111b2c;
  --surface-2: #142034;
  --ink: #e8edf4;
  --ink-2: #b3bdcb;
  --muted: #929eb0;
  --line: #1f2b3e;
  --line-strong: #2e3d55;
  --brand-ink: #e8edf4;
  --accent: #4a9fd8;
  --accent-ink: #6cb4e6;
  --accent-hover: #93c8ee;
  --accent-soft: #12243a;
  --on-accent: #ffffff;
  --success: #34d399;
  --success-mark: #34d399;
  --warn-line: #e0a63a;
  --warn-soft: #2a2111;
  --danger-line: #f07a68;
  --danger-soft: #2c1714;
  --ph-bg: #3a2f10;
  --ph-line: #c99a06;
  --ph-ink: #ffe9a8;
  --shadow-sheet: 0 1px 2px rgba(0, 0, 0, .3), 0 18px 40px -18px rgba(0, 0, 0, .6);
  --focus: 0 0 0 2px var(--bg), 0 0 0 4px #6cb4e6;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0b1019;
    --bg-soft: #0f1829;
    --surface: #111b2c;
    --surface-2: #142034;
    --ink: #e8edf4;
    --ink-2: #b3bdcb;
    --muted: #929eb0;
    --line: #1f2b3e;
    --line-strong: #2e3d55;
    --brand-ink: #e8edf4;
    --accent: #4a9fd8;
    --accent-ink: #6cb4e6;
    --accent-hover: #93c8ee;
    --accent-soft: #12243a;
    --on-accent: #ffffff;
    --success: #34d399;
    --success-mark: #34d399;
    --warn-line: #e0a63a;
    --warn-soft: #2a2111;
    --danger-line: #f07a68;
    --danger-soft: #2c1714;
    --ph-bg: #3a2f10;
    --ph-line: #c99a06;
    --ph-ink: #ffe9a8;
    --shadow-sheet: 0 1px 2px rgba(0, 0, 0, .3), 0 18px 40px -18px rgba(0, 0, 0, .6);
    --focus: 0 0 0 2px var(--bg), 0 0 0 4px #6cb4e6;
  }
}

/* ───────────── Base ───────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--head-h) + 16px); }
body.ks {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: 1.6;
  font-optical-sizing: auto;
  font-feature-settings: "cv05" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
}
body.ks > main { flex: 1 0 auto; }
:where(.ks) img { max-width: 100%; height: auto; }
:where(.ks) :where(h1, h2, h3, h4) { color: var(--ink); margin: 0; font-weight: 650; text-wrap: balance; }
:where(.ks) h1 { font-size: var(--fs-h1); line-height: 1.06; letter-spacing: -.032em; font-weight: 650; }
:where(.ks) h2 { font-size: var(--fs-h2); line-height: 1.18; letter-spacing: -.022em; }
:where(.ks) h3 { font-size: var(--fs-h3); line-height: 1.3; letter-spacing: -.012em; font-weight: 620; }
:where(.ks) p { margin: 0; text-wrap: pretty; }
:where(.ks) :where(ul, ol) { margin: 0; padding: 0; }
:where(.ks) a { color: var(--accent-ink); text-decoration: none; }
:where(.ks) a:hover { color: var(--accent-hover); }
:where(.ks) strong { font-weight: 620; color: var(--ink); }
.ks :focus { outline: none; }
.ks :focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
.ks .num, .ks .tnum { font-variant-numeric: tabular-nums; }

.k-skip {
  position: absolute; left: 16px; top: -60px; z-index: 200;
  background: var(--accent-ink); color: var(--on-accent) !important; padding: 10px 16px;
  border-radius: 0 0 8px 8px; font-weight: 600; transition: top .15s;
}
.k-skip:focus { top: 0; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

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

/* One grid. Every multi-column layout is cut from the same 12 columns and the same gap, so
   when you scroll, section edges and inner column lines fall on the same verticals:
   halves (6/6), split (4/8), thirds (4/4/4) and sixths. Equal-track grids with --col-gap
   produce exactly the 12-column spans, nested or not. */
.g12 { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); }
.g2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--col-gap); }
.g3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--col-gap); }
.muted { color: var(--muted); }

/* Placeholder data that Rob fills before publishing: visibly marked on purpose. */
.ph {
  background: var(--ph-bg); color: var(--ph-ink); border: 1px dashed var(--ph-line);
  border-radius: 4px; padding: 0 .3em; font-weight: 550; font-size: .94em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}

/* ───────────── Buttons ───────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: var(--radius-btn);
  font: 600 var(--fs-base)/1 var(--font); letter-spacing: -.005em;
  background: #1d6fa5; color: #fff !important; border: 1px solid transparent;
  cursor: pointer; text-decoration: none; transition: background-color .15s ease, border-color .15s ease, transform .15s ease;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation; white-space: nowrap;
}
.btn:hover { background: #1a5276; color: #fff; }
.btn:active { transform: translateY(1px); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: var(--fs-sm); }
.btn-lg { min-height: 52px; padding: 0 26px; font-size: 1.0625rem; }
.btn-quiet {
  background: transparent; color: var(--ink) !important; border-color: var(--line-strong);
}
.btn-quiet:hover { background: var(--bg-soft); color: var(--ink); border-color: var(--line-strong); }
:root[data-theme="dark"] .btn { background: #1f74ad; }
:root[data-theme="dark"] .btn:hover { background: #2577b3; }
:root[data-theme="dark"] .btn-quiet { background: transparent; }
:root[data-theme="dark"] .btn-quiet:hover { background: var(--surface-2); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .btn { background: #1f74ad; }
  :root:not([data-theme="light"]) .btn:hover { background: #2577b3; }
  :root:not([data-theme="light"]) .btn-quiet { background: transparent; }
  :root:not([data-theme="light"]) .btn-quiet:hover { background: var(--surface-2); }
}
.link-arrow { font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.link-arrow::after { content: "→"; transition: transform .15s ease; }
.link-arrow:hover::after { transform: translateX(3px); }

/* ───────────── Header ───────────── */
.site-head {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap { display: flex; align-items: center; height: var(--head-h); gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink) !important; font-weight: 700; font-size: 1.125rem; letter-spacing: -.02em; margin-right: 8px; }
.brand .k-mark { width: 28px; height: 28px; flex: none; color: var(--brand-ink); --k-mark-accent: var(--accent); }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  color: var(--ink-2); font-size: var(--fs-sm); font-weight: 500; padding: 8px 12px; border-radius: 8px;
  position: relative;
}
.nav a:hover { color: var(--ink); background: var(--bg-soft); }
.nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: -13px; height: 2px; background: var(--accent); border-radius: 2px;
}
.head-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.head-actions .signin { color: var(--ink-2); font-size: var(--fs-sm); font-weight: 500; padding: 8px 12px; border-radius: 8px; }
.head-actions .signin:hover { color: var(--ink); background: var(--bg-soft); }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  border-radius: var(--radius-btn); border: 1px solid var(--line); background: transparent; color: var(--ink-2); cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.icon-btn:hover { color: var(--ink); background: var(--bg-soft); }
.icon-btn svg { width: 18px; height: 18px; }
.theme-btn svg, .m-theme svg { display: none; }
/* One button, two states: the moon switches to dark, the sun back to light. html.dark is set
   before first paint (brand/theme_boot.html), for the system scheme and for an explicit choice. */
:root:not(.dark) .theme-btn .i-moon, :root.dark .theme-btn .i-sun { display: block; }
:root:not(.dark) .m-theme .i-moon, :root.dark .m-theme .i-sun { display: block; }
.menu-btn { display: none; }
.menu-panel { display: none; }

@media (max-width: 960px) {
  .nav, .head-actions .signin, .head-actions .theme-btn, .head-actions .btn { display: none; }
  .menu-btn { display: inline-flex; width: 44px; height: 44px; }
  .menu-panel {
    position: fixed; inset: var(--head-h) 0 auto 0; z-index: 99; background: var(--bg);
    border-bottom: 1px solid var(--line); box-shadow: 0 24px 40px -24px rgba(16, 24, 40, .25);
    padding: 8px var(--gutter) 20px; max-height: calc(100dvh - var(--head-h)); overflow-y: auto;
  }
  .menu-panel.open { display: block; }
  .menu-panel a.m-link {
    display: flex; align-items: center; min-height: 48px; color: var(--ink); font-size: 1.0625rem; font-weight: 500;
    border-bottom: 1px solid var(--line);
  }
  .menu-panel a.m-link[aria-current="page"] { color: var(--accent-ink); font-weight: 600; }
  .menu-panel .m-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
  .menu-panel .m-actions .btn { width: 100%; }
  .menu-panel .m-theme svg { width: 18px; height: 18px; }
  .menu-panel .m-theme {
    margin-top: 12px; width: 100%; min-height: 48px; display: flex; align-items: center; justify-content: space-between;
    background: transparent; border: 1px solid var(--line); border-radius: var(--radius-btn); color: var(--ink-2);
    font: 500 var(--fs-sm)/1 var(--font); padding: 0 14px; cursor: pointer;
  }
}

/* ───────────── Sections ───────────── */
.sec { padding: var(--sec-y) 0; }
.sec + .sec { border-top: 1px solid var(--line); }
.sec-tight { padding: calc(var(--sec-y) * .7) 0; }
.sec-head { max-width: 712px; margin-bottom: 40px; } /* 8 of 12 columns */
.sec-head p { margin-top: 14px; color: var(--ink-2); font-size: var(--fs-read); }
.lead { font-size: var(--fs-lead); line-height: 1.55; color: var(--ink-2); letter-spacing: -.005em; }
.proof { margin-top: 18px; color: var(--muted); font-size: var(--fs-sm); display: flex; flex-wrap: wrap; row-gap: 4px; }
.proof span { white-space: nowrap; }
.proof span + span::before { content: "·"; margin: 0 .55em; color: var(--line-strong); }
.text-col { max-width: 640px; }
.text-col p + p { margin-top: 14px; }
.text-col p, .copy p { font-size: var(--fs-read); color: var(--ink-2); }
.copy > * + * { margin-top: 14px; }
.copy p strong { color: var(--ink); }

/* Split layout: heading column + content column */
.split { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 32px var(--col-gap); align-items: start; }
.split > :first-child { grid-column: 1 / span 4; }
.split > :not(:first-child) { grid-column: 5 / -1; }
.split > .split-aside p { margin-top: 14px; color: var(--ink-2); font-size: var(--fs-read); }
@media (min-width: 961px) { .split > .split-aside.sticky { position: sticky; top: calc(var(--head-h) + 32px); } }

.h-sub.h-sub { font-size: 1.1875rem; letter-spacing: -.012em; margin-bottom: 14px; }

/* Rows: hairline list */
.rows { list-style: none; border-top: 1px solid var(--line); }
.rows > li { padding: 16px 0; border-bottom: 1px solid var(--line); font-size: var(--fs-read); color: var(--ink-2); line-height: 1.55; }
.rows > li strong { color: var(--ink); }

/* Checked list (inclusions) */
.ticks { list-style: none; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 28px; color: var(--ink-2); line-height: 1.5; }
.ticks li::before {
  content: ""; position: absolute; left: 2px; top: .38em; width: 14px; height: 8px;
  border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg);
}
.dashes { list-style: none; display: grid; gap: 10px; }
.dashes li { position: relative; padding-left: 22px; color: var(--ink-2); line-height: 1.5; }
.dashes li::before { content: ""; position: absolute; left: 2px; top: .75em; width: 10px; height: 1.5px; background: var(--line-strong); }

/* ───────────── Landing hero ───────────── */
.hero { padding: clamp(36px, 4.5vw, 64px) 0 clamp(40px, 4.5vw, 64px); }
.hero .wrap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px var(--col-gap); align-items: center; } /* halves of the 12 columns */
.hero + .sec { padding-top: clamp(24px, 3vw, 40px); }
.hero h1 { max-width: 13ch; }
.hero .lead { margin-top: 22px; max-width: 30em; text-wrap: pretty; }
.hero .cta-row { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
/* One quiet entry for people who are not autónomos yet (landing hero, below the proof line) */
.alta-pill { display: inline-flex; align-items: center; gap: 10px; margin-top: 22px; padding: 6px 14px 6px 6px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink) !important; font-size: var(--fs-sm); font-weight: 500; line-height: 1.3; max-width: 100%; transition: border-color .15s ease, background .15s ease; }
.alta-pill:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: var(--accent-soft); }
.alta-pill b { flex: none; padding: 3px 9px; border-radius: 999px; background: color-mix(in srgb, var(--success-mark) 14%, var(--surface)); color: var(--success); font-size: var(--fs-xs); font-weight: 650; }
.alta-pill::after { content: "→"; flex: none; color: var(--accent-ink); transition: transform .15s ease; }
.alta-pill:hover::after { transform: translateX(3px); }

/* Signature: the "send us your invoices" loop (public/_flow.html, js/kuotia-flow.js).
   Everything sits on a 24 x 26 em stage whose em follows the box width, so it stays crisp
   at any size and never shifts layout. Keyed parts ([data-f]) keep font-size 1em: the
   script moves them in stage em; text sizes live on their children. Without the script
   (or with reduced motion) the last frame shows. */
.flow { margin: 0; container-type: inline-size; width: 100%; text-rendering: geometricPrecision; }
.flow-box { position: relative; width: 100%; aspect-ratio: 24 / 26; font-size: 16px; font-size: calc(100cqw / 24); line-height: 1.3; }
.flow-stage { position: absolute; inset: 0; }
.flow [data-f] { will-change: auto; }
.fw {
  position: absolute; left: 0; top: 0; width: 24em; height: 21.8em; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: .9em; box-shadow: var(--shadow-sheet);
}
.fw-bar { height: 2.3em; display: flex; align-items: center; justify-content: space-between; padding: 0 .9em; border-bottom: 1px solid var(--line); }
.fw-brand { display: inline-flex; align-items: center; gap: .4em; font-size: .78em; font-weight: 650; color: var(--ink); letter-spacing: -.01em; }
.fw-brand .k-mark { width: 1.35em; height: 1.35em; color: var(--brand-ink); --k-mark-accent: var(--accent); }
.fw-period { font-size: .64em; color: var(--muted); font-variant-numeric: tabular-nums; }
.fw-in { position: absolute; left: .9em; top: 3.2em; width: 22.2em; height: 17.7em; }
.fw-in > [data-f] { position: absolute; left: 0; top: 0; width: 22.2em; }

/* Status track, as in the portal */
.fw-track { position: absolute; left: 0; top: 0; width: 22.2em; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .35em; }
.fw-track li { position: relative; padding-top: .55em; font-size: .6em; color: var(--muted); line-height: 1.2; }
.fw-seg { position: absolute; left: 0; right: 0; top: 0; height: .4em; border-radius: .2em; background: var(--line); overflow: hidden; }
.fw-seg i { position: absolute; inset: 0; background: var(--accent); transform-origin: 0 50%; }

.fw-drop { height: 3.3em; display: flex; align-items: center; justify-content: center; gap: .6em; border: 1px dashed var(--line-strong); border-radius: .7em; color: var(--ink-2); transform-origin: 50% 0; }
.fw-drop-txt { position: relative; display: flex; align-items: center; gap: .6em; }
.fw-drop svg { width: 1.25em; height: 1.25em; flex: none; }
.fw-drop b { display: block; font-size: .74em; font-weight: 600; color: var(--ink); }
.fw-drop small { display: block; font-size: .6em; color: var(--muted); }
.fw-drop-hi { position: absolute; inset: -1px; border: 1px solid var(--accent); border-radius: .7em; background: var(--accent-soft); }

.fw-label { height: 1.3em; display: flex; align-items: flex-end; padding-bottom: .3em; }
.fw-label span { font-size: .6em; font-weight: 600; color: var(--muted); }

.fw-row { height: 2.5em; display: flex; align-items: center; gap: .7em; border-bottom: 1px solid var(--line); z-index: 1; background: var(--surface); }
.fw-in > [data-f="r4"] { z-index: 2; }
.fw-ico { width: 1.7em; height: 2.19em; flex: none; }
.fw-ico-own { border: 1px solid var(--line-strong); border-radius: .2em; background: var(--surface); box-shadow: inset 0 .5em 0 -.38em var(--line-strong), inset 0 .85em 0 -.72em var(--line-strong); }
.fw-txt { flex: 1; min-width: 0; }
.fw-txt b { display: block; font-size: .74em; font-weight: 560; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.005em; }
.fw-txt small { display: block; font-size: .6em; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fw-chip { position: relative; width: 5.4em; height: 1.4em; flex: none; }
.fw-st { position: absolute; inset: 0; display: flex; align-items: center; justify-content: flex-end; gap: .4em; font-size: .62em; color: var(--muted); white-space: nowrap; transform-origin: 100% 50%; }
.fw-st.is-ok { color: var(--ink-2); font-weight: 560; }
.fw-ok, .fw-ring { display: inline-block; width: 1.05em; height: 1.05em; flex: none; }
.fw-ok { background: var(--success-mark); -webkit-mask: var(--fw-check) center / contain no-repeat; mask: var(--fw-check) center / contain no-repeat; }
.fw-ring { border: .14em solid var(--accent); border-radius: 50%; }
.flow { --fw-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 0a8 8 0 1 0 0 16A8 8 0 0 0 8 0zm3.6 5.3-4.3 5.4a.8.8 0 0 1-1.2.1L4.3 9a.8.8 0 1 1 1.1-1.1l1.2 1.2 3.7-4.7a.8.8 0 0 1 1.3 1z'/%3E%3C/svg%3E"); }
.fw-dot { width: .55em; height: .55em; border-radius: 50%; background: var(--accent); flex: none; animation: fw-pulse 1s ease-in-out infinite alternate; }
.fw-dot.is-still { background: var(--line-strong); animation: none; }
@keyframes fw-pulse { from { opacity: .35; } to { opacity: 1; } }

.fw-req {
  height: 3.2em; display: flex; align-items: center; gap: .8em; padding: 0 .8em 0 1em; z-index: 3;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: .7em; box-shadow: var(--shadow-sheet);
}
.fw-req::before { content: ""; position: absolute; left: -1px; top: .55em; bottom: .55em; width: .2em; border-radius: .1em; background: var(--accent); }
.fw-req .fw-txt small { font-weight: 600; }
.fw-btn { position: relative; flex: none; font-size: .66em; font-weight: 600; color: #fff; background: #1d6fa5; border-radius: .55em; padding: .55em 1.15em; }
.fw-tap { position: absolute; left: 50%; top: 50%; width: 3.4em; height: 3.4em; margin: -1.7em 0 0 -1.7em; border-radius: 50%; background: var(--accent); pointer-events: none; }

.fw-sum { height: 2em; display: flex; align-items: center; gap: .5em; padding: 0 .8em; border: 1px solid var(--line); border-radius: .7em; background: var(--surface-2); }
.fw-sum b { font-size: .7em; font-weight: 600; color: var(--ink); }
.fw-sum small { margin-left: auto; font-size: .6em; color: var(--muted); }

.fw-msg { display: flex; gap: .6em; align-items: flex-start; }
.fw-av { width: 2.1em; height: 2.1em; flex: none; display: grid; place-items: center; border-radius: .6em; background: var(--accent-soft); color: var(--accent-ink); }
.fw-av svg { width: 1.3em; height: 1.3em; }
.fw-bubble { font-size: .72em; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line); border-radius: .25em 1em 1em 1em; padding: .5em .85em .6em; line-height: 1.35; }
.fw-bubble small { display: block; font-size: .82em; color: var(--muted); font-weight: 600; margin-bottom: .1em; }
.flow .fw-swap { display: grid; }
.fw-swap > span { grid-area: 1 / 1; }

.fw-res { height: 9.8em; z-index: 2; background: var(--surface); border: 1px solid var(--line); border-radius: .8em; }
.fw-res-h { position: absolute; left: .9em; right: .9em; top: 0; height: 2.9em; display: flex; align-items: center; gap: .6em; }
.fw-res-h b { display: block; font-size: .8em; font-weight: 650; color: var(--ink); letter-spacing: -.01em; }
.fw-res-h small { display: block; font-size: .6em; color: var(--muted); }
.fw-ok-lg { width: 1.3em; height: 1.3em; }
.fw-res-h .fw-ring { width: 1.3em; height: 1.3em; }
.fw-fil { position: absolute; left: .9em; right: .9em; height: 3.3em; display: flex; align-items: center; gap: .7em; border-top: 1px solid var(--line); }
[data-f="f303"] { top: 2.9em; }
[data-f="f130"] { top: 6.2em; }
.fw-fil .fw-txt small u { text-decoration: none; color: var(--accent-ink); font-weight: 560; }
.fw-fil .fw-chip { width: 6em; }
.fw-amt { position: absolute; right: 0; top: 0; bottom: 0; display: flex; flex-direction: column; justify-content: center; align-items: flex-end; }
.fw-amt b { font-size: .8em; font-weight: 650; color: var(--ink); letter-spacing: -.01em; white-space: nowrap; }
.fw-amt small { font-size: .6em; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Documents in flight; at rest each one is its row's icon */
.fp {
  position: absolute; left: 0; top: 0; width: 4.2em; height: 5.4em; transform-origin: 0 0; z-index: 5;
  display: flex; flex-direction: column; gap: .36em; padding: .55em .5em;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: .35em;
  box-shadow: 0 .35em 1em -.4em rgba(16, 24, 40, .35);
}
.fp i { display: block; height: .26em; border-radius: .13em; background: var(--line-strong); flex: none; }
.fp i.s { width: 62%; }
.fp-tag { align-self: flex-start; font-size: .62em; font-weight: 700; letter-spacing: .02em; line-height: 1; color: var(--accent-ink); background: var(--accent-soft); border-radius: .3em; padding: .3em .45em; margin-bottom: .2em; }
.fp-photo { padding: .4em; background: color-mix(in srgb, var(--ink) 16%, var(--surface)); border-color: transparent; }
.fp-ticket { flex: 1; display: flex; flex-direction: column; gap: .32em; padding: .5em .45em; background: var(--surface); border-radius: .12em; clip-path: polygon(0 0, 100% 0, 100% 92%, 87.5% 100%, 75% 92%, 62.5% 100%, 50% 92%, 37.5% 100%, 25% 92%, 12.5% 100%, 0 92%); }
.fp-mail .fp-flap { display: block; height: 1.9em; margin: -.55em -.5em .25em; background: var(--accent-soft); border-bottom: 1px solid var(--line-strong); clip-path: polygon(0 0, 100% 0, 100% 35%, 50% 100%, 0 35%); }
.fp-grid { flex: 1; border: 1px solid var(--line-strong); border-radius: .12em; background-image: linear-gradient(var(--line-strong) 1px, transparent 1px), linear-gradient(90deg, var(--line-strong) 1px, transparent 1px); background-size: 1.2em .78em; background-position: -1px -1px; }

/* One sentence per beat, and the chapters */
.flow-cap { position: absolute; left: .1em; top: 22.75em; width: 20.4em; height: 1.5em; overflow: hidden; }
.flow-cap span { position: absolute; left: 0; top: 0; line-height: 1.5em; white-space: nowrap; font-weight: 580; color: var(--ink); letter-spacing: -.012em; }
.flow-chap { position: absolute; left: .1em; top: 25.05em; width: 20.4em; height: .22em; display: flex; gap: .3em; }
.flow-chap span { flex: 1; position: relative; border-radius: .11em; background: var(--line); overflow: hidden; }
.flow-chap i { position: absolute; inset: 0; background: var(--accent); transform-origin: 0 50%; }
.flow-toggle {
  font: inherit;
  position: absolute; left: 21.1em; top: 22.45em; width: 2.9em; height: 2.9em; display: grid; place-items: center; padding: 0;
  border: 0; border-radius: .7em; background: transparent; color: var(--muted); cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.flow-toggle[hidden] { display: none; }
.flow-toggle:hover { color: var(--ink); background: var(--bg-soft); }
.flow-toggle svg { width: 1.05em; height: 1.05em; }
.flow-toggle .i-play, .flow[data-state="paused"] .flow-toggle .i-pause { display: none; }
.flow[data-state="paused"] .flow-toggle .i-play { display: block; }
.flow[data-state="paused"] *, .flow:not(.is-live) * { animation-play-state: paused !important; }

/* Small boxes (phones, niche heads, article end): secondary lines never under 12px.
   The card number keeps the long date line short so the two columns never meet. */
@container (max-width: 440px) {
  .fw-txt small, .fw-amt small, .fw-res-h small, .fw-sum small, .fw-drop small, .fw-label span, .fw-track li { font-size: max(12px, .6em); }
  .fw-period { font-size: max(12px, .64em); }
  .fw-st { font-size: max(12px, .62em); }
  .fw-bubble small { font-size: max(12px, .82em); }
  .fw-txt b, .fw-drop b, .fw-sum b { font-size: max(13px, .74em); }
  .fw-bubble { font-size: max(12.5px, .72em); }
  .fw-amt b, .fw-res-h b, .fw-brand { font-size: max(13.5px, .8em); }
}
@container (max-width: 400px) { .fw-amt .fw-acct { display: none; } }

/* Last frame, shown until the script takes over (and kept with reduced motion) */
.flow:not(.is-live) .flow-stage [data-f]:not(:where([data-f^="n"])) { opacity: 0; } /* n* keys are numbers inside a shown part */
.flow:not(.is-live) .flow-stage :is([data-f="t1"], [data-f="t2"], [data-f="t3"], [data-f^="ch"], [data-f="res"], [data-f="hD"],
  [data-f="f303"], [data-f="f130"], [data-f="a303"], [data-f="a130"], [data-f="j303"], [data-f="j130"], [data-f="msg"], [data-f="b2"], [data-f="c5"]) { opacity: 1; }
.flow:not(.is-live) [data-f="res"] { transform: translate(0, 2.3em); }
.flow:not(.is-live) [data-f="msg"] { transform: translate(0, 12.9em); }

/* Hero placement: the animation fills the right half */
.hero .flow { width: 100%; }
.fw-av .k-mark { width: 1.2em; height: 1.2em; color: var(--brand-ink); --k-mark-accent: var(--accent); }

/* ───────────── Steps (real sequence) ───────────── */
.steps { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--col-gap); counter-reset: step; }
.steps > li { counter-increment: step; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); overflow: hidden; }
.steps .step-art { background: var(--bg-soft); border-bottom: 1px solid var(--line); padding: 20px; height: 216px; display: grid; align-items: center; }
.steps .step-copy { padding: 22px 24px 26px; }
.steps h3 { display: flex; align-items: baseline; gap: 12px; font-size: 1.25rem; }
.steps h3::before { content: counter(step); font-size: var(--fs-sm); font-weight: 650; color: var(--accent-ink); font-variant-numeric: tabular-nums; min-width: 1ch; }
.steps p { margin-top: 12px; color: var(--ink-2); font-size: var(--fs-read); }

/* Two text blocks side by side */
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px var(--col-gap); }
.pair > div { border-top: 1px solid var(--line-strong); padding-top: 24px; }
.pair p { margin-top: 14px; color: var(--ink-2); font-size: var(--fs-read); max-width: 34em; }

/* Three-up text blocks */
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px var(--col-gap); margin-top: 40px; }
.trio > div { padding-top: 20px; border-top: 1px solid var(--line); }
.trio h3 { font-size: 1.0625rem; }
.trio p { margin-top: 8px; color: var(--ink-2); }

/* ───────────── Plans ───────────── */
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--col-gap); }
.plan { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; background: var(--surface); display: flex; flex-direction: column; }
.plan-name { font-size: 1.125rem; font-weight: 650; color: var(--ink); }
.plan-price { margin-top: 14px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.plan-price .n { font-size: 2.75rem; font-weight: 650; letter-spacing: -.035em; line-height: 1; font-variant-numeric: tabular-nums; color: var(--ink); }
.plan-price .u { color: var(--muted); font-size: var(--fs-sm); }
.plan-desc { margin-top: 14px; color: var(--ink-2); }
.plan .ticks { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--line); margin-bottom: 28px; }
.plan .btn { margin-top: auto; align-self: flex-start; }
.plan-extra { margin-top: var(--col-gap); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px 28px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 32px; align-items: start; }
.plan-extra .plan-name { font-size: 1.0625rem; }
.plan-extra p { color: var(--ink-2); margin-top: 6px; max-width: 60ch; }
.plan-extra .price { font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--ink); }
.plan-mini { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--col-gap); }
.plan-mini > div { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px 26px 26px; background: var(--surface); display: flex; flex-direction: column; }
.plan-mini .ticks { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); font-size: var(--fs-sm); }
.plan-mini .plan-price { margin-top: 6px; }
.plan-mini .plan-price .n { font-size: 2.25rem; }
.plan-mini p { margin-top: 10px; color: var(--ink-2); }

/* ───────────── FAQ ───────────── */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 20px 0; min-height: 56px; font-weight: 600; font-size: var(--fs-read); color: var(--ink); letter-spacing: -.008em;
  -webkit-tap-highlight-color: transparent;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 10px; height: 10px; margin-right: 4px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translateY(-3px); transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.faq summary:hover { color: var(--accent-ink); }
.faq summary:focus-visible { box-shadow: var(--focus); border-radius: 6px; }
.faq .a { padding: 0 0 22px; color: var(--ink-2); font-size: var(--fs-read); max-width: 64ch; }
.faq .a p + p { margin-top: 10px; }

/* ───────────── CTA block ───────────── */
.cta-block { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 18px; padding: clamp(32px, 5vw, 56px); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 48px; align-items: center; }
.cta-block p { margin-top: 10px; color: var(--ink-2); font-size: var(--fs-read); max-width: 52ch; }
.cta-block.center { grid-template-columns: 1fr; justify-items: start; }

/* ───────────── Page header (inner pages) ───────────── */
.page-head { padding: clamp(40px, 5.5vw, 72px) 0 clamp(36px, 4vw, 56px); border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: var(--fs-h1-page); max-width: 20ch; line-height: 1.08; }
.page-head .lead { margin-top: 18px; max-width: 40em; }
.page-head .cta-row { margin-top: 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.page-head .proof { margin-top: 0; }
.page-head-flow .wrap { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 32px var(--col-gap); align-items: center; }
.page-head-flow .wrap > :first-child { grid-column: 1 / span 8; }
.page-head-flow .wrap > .flow { grid-column: 9 / -1; }
@media (max-width: 960px) {
  .page-head-flow .wrap { grid-template-columns: minmax(0, 1fr); }
  .page-head-flow .wrap > :first-child, .page-head-flow .wrap > .flow { grid-column: 1; }
  .page-head-flow .flow { max-width: 420px; }
}
/* Inner page header with a product visual on the right half (médicos): 6 + 6 columns */
.page-head-pv { padding-top: clamp(32px, 4vw, 56px); }
.page-head-pv .wrap { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 36px var(--col-gap); align-items: center; }
.page-head-pv .wrap > :first-child { grid-column: 1 / span 6; }
.page-head-pv .wrap > .pv { grid-column: 7 / -1; }
.page-head-pv h1 { max-width: 14ch; }
@media (max-width: 960px) {
  .page-head-pv .wrap { grid-template-columns: minmax(0, 1fr); }
  .page-head-pv .wrap > :first-child, .page-head-pv .wrap > .pv { grid-column: 1; }
  .page-head-pv .wrap > .pv { max-width: 520px; }
}

/* Closing call to action with the compact flow beside it (niche pages; the blog has its own .blog-close) */
.cta-flow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 380px); gap: 40px 72px; align-items: center; padding: clamp(28px, 4.5vw, 56px); border: 1px solid var(--line); border-radius: 22px; background: var(--bg-soft); }
.cta-flow h2 { max-width: 16ch; }
.cta-flow p { margin-top: 16px; color: var(--ink-2); font-size: var(--fs-read); max-width: 34em; }
.cta-flow .cta-row { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; }
.cta-flow .flow { justify-self: end; max-width: 380px; }
@media (max-width: 960px) {
  .cta-flow { grid-template-columns: minmax(0, 1fr); }
  .cta-flow .flow { justify-self: center; }
}
@media (max-width: 600px) {
  .cta-flow { padding: 24px 20px; border-radius: 18px; }
  .cta-flow .btn { flex: 1 1 100%; }
}
.crumbs { font-size: var(--fs-sm); color: var(--muted); margin-bottom: 18px; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent-ink); }
.crumbs span[aria-hidden] { color: var(--line-strong); }

/* ───────────── Timeline (cómo trabajamos) ───────────── */
.timeline { list-style: none; counter-reset: t; max-width: 760px; }
.timeline > li { position: relative; padding: 0 0 44px 64px; counter-increment: t; }
.timeline > li::before {
  content: counter(t); position: absolute; left: 0; top: -2px; width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center; font-weight: 650; font-size: var(--fs-sm); color: var(--accent-ink);
  border: 1px solid var(--line-strong); background: var(--bg); font-variant-numeric: tabular-nums;
}
.timeline > li::after { content: ""; position: absolute; left: 18px; top: 42px; bottom: 6px; width: 1px; background: var(--line-strong); }
.timeline > li:last-child { padding-bottom: 0; }
.timeline > li:last-child::after { display: none; }
.timeline h3 { font-size: 1.25rem; letter-spacing: -.015em; }
.timeline .copy { margin-top: 10px; }
.timeline .copy ul, .timeline .copy .dashes, .timeline .copy .ticks { margin-top: 12px; }
.timeline .dashes li, .timeline .ticks li { font-size: var(--fs-read); }

.timeline .step-visual { margin-top: 18px; max-width: 400px; }
/* Result kinds, rendered like the approval sheet */
.kinds { margin-top: 16px; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); }
.kinds > div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.kinds > div:last-child { border-bottom: 0; }
.kinds dt { font-weight: 620; color: var(--ink); }
.kinds dd { margin: 0; color: var(--ink-2); }

/* Two options side by side */
.duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--col-gap); }
.duo > div { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px; background: var(--surface); }
.duo-one { grid-template-columns: minmax(0, 1fr); }
.duo h3 { font-size: 1.125rem; }
.duo p { margin-top: 10px; color: var(--ink-2); font-size: var(--fs-read); }

/* Calm note */
.note { border-left: 3px solid var(--accent); background: var(--accent-soft); padding: 16px 20px; border-radius: 0 var(--radius) var(--radius) 0; color: var(--ink-2); font-size: var(--fs-read); }
.note strong { color: var(--ink); }

/* Worked example */
.example { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); overflow: hidden; }
.example-head { padding: 18px 22px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.example-head h3 { font-size: 1.0625rem; }
.example-head p { margin-top: 4px; color: var(--muted); font-size: var(--fs-sm); }
.example-body { padding: 20px 22px; }
.example-body p { color: var(--ink-2); font-size: var(--fs-read); }
.example-body p + p, .example-body p + ul, .example-body ul + p { margin-top: 12px; }
.example-body .dashes li { font-size: var(--fs-read); }
.figures { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; margin-top: 4px; }
.figures td { padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.figures td:last-child { text-align: right; color: var(--ink); font-weight: 560; white-space: nowrap; padding-left: 16px; }
.figures tr.total td { border-bottom: 0; color: var(--ink); font-weight: 650; padding-top: 12px; }
.cases { display: grid; gap: 24px; }

/* Comparison table: stacks on phone */
.ktable-wrap { border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); }
.ktable { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.ktable th, .ktable td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: top; line-height: 1.5; }
.ktable thead th { background: var(--surface-2); color: var(--ink-2); font-weight: 600; font-size: var(--fs-sm); }
.ktable tbody th { color: var(--ink); font-weight: 600; width: 22%; }
.ktable td { color: var(--ink-2); }
.ktable .us { background: var(--accent-soft); color: var(--ink); }
.ktable thead th.us { color: var(--ink); }
.ktable tr:last-child th, .ktable tr:last-child td { border-bottom: 0; }

/* Grid of short articles (profesiones) */
.grid-2 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px var(--col-gap); } /* thirds */
.grid-2 > div { padding-top: 22px; border-top: 1px solid var(--line); }
.grid-2 h3 { font-size: 1.1875rem; }
.grid-2 p { margin-top: 10px; color: var(--ink-2); font-size: var(--fs-read); }

/* Person card (quién es tu gestor) */
.person { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 32px; align-items: start; }
.person-photo { width: 160px; aspect-ratio: 1; border-radius: var(--radius-lg); background: var(--bg-soft); border: 1px dashed var(--ph-line); display: grid; place-items: center; }
.person-name { font-size: 1.5rem; font-weight: 650; letter-spacing: -.02em; }
.person-role { color: var(--muted); margin-top: 4px; }
.person .copy { margin-top: 16px; }
.ol-num { list-style: none; counter-reset: o; display: grid; gap: 18px; }
.ol-num > li { counter-increment: o; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; color: var(--ink-2); font-size: var(--fs-read); }
.ol-num > li::before { content: counter(o); font-weight: 650; color: var(--accent-ink); font-variant-numeric: tabular-nums; font-size: var(--fs-sm); padding-top: 2px; }

/* ───────────── Logos (static/img/logos/logos.svg, public/_logo.html) ─────────────
   Official marks, monochrome in currentColor so they read in light and dark. */
.logo-mark { width: 1.25em; height: 1.25em; flex: none; fill: currentColor; display: inline-block; vertical-align: -.24em; }
/* Inline mark before a company name: mark and name never split across lines. */
.co { white-space: nowrap; }
.co .logo-mark { width: 1em; height: 1em; margin-right: .28em; vertical-align: -.14em; color: var(--ink); }
.logos { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0 var(--col-gap); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.logos li { list-style: none; display: flex; align-items: center; gap: 10px; min-height: 76px; color: var(--ink-2); font-weight: 600; font-size: var(--fs-sm); letter-spacing: -.005em; }
.logos .logo-mark { width: 22px; height: 22px; color: var(--ink); }
.logos-cap { margin-top: 14px; color: var(--muted); font-size: var(--fs-sm); }

/* Section band: one full-width tint to break the rhythm (no gradient) */
.sec.band { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sec.band + .sec { border-top: 0; }

/* What is included: two columns of short facts inside the split's content column */
.inc { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--col-gap); }
.inc li { padding: 18px 0 20px; border-top: 1px solid var(--line-strong); }
.inc li strong { display: block; font-size: 1.0625rem; letter-spacing: -.01em; }
.inc li span { display: block; margin-top: 4px; color: var(--ink-2); line-height: 1.5; }

/* Feature: copy on 4 columns, product visual on 8 (or flipped) */
.feature { align-items: start; }
.feature .feature-copy h2 + p { margin-top: 14px; }
.feature .feature-copy p { color: var(--ink-2); font-size: var(--fs-read); }
.feature .feature-copy p + p { margin-top: 12px; }
.feature .feature-copy .ticks { margin-top: 20px; }
.feature .feature-copy .link-arrow { margin-top: 20px; }
.feature-copy { grid-column: 1 / span 4; }
.feature-art { grid-column: 5 / -1; }
.feature.flip .feature-copy { grid-column: 9 / -1; grid-row: 1; }
.feature.flip .feature-art { grid-column: 1 / span 8; grid-row: 1; }
/* Wider copy for sections whose text is a list (cambiar de gestoría, profesionales): 5 + 6 on the same 12 columns. */
.feature.f-5 .feature-copy { grid-column: 1 / span 5; }
.feature.f-5 .feature-art { grid-column: 7 / -1; }
.feature.f-5.flip .feature-copy { grid-column: 8 / -1; }
.feature.f-5.flip .feature-art { grid-column: 1 / span 6; }
@media (min-width: 961px) { .feature-art.sticky { position: sticky; top: calc(var(--head-h) + 32px); } }
.feature .feature-copy .ol-num { margin-top: 20px; }

/* Audience cards and reasons */
.cards3 > div { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); padding: 24px 24px 26px; display: flex; flex-direction: column; }
.cards3 h3 { font-size: 1.125rem; }
.cards3 p { margin-top: 10px; color: var(--ink-2); }
.cards3 .link-arrow { margin-top: auto; padding-top: 16px; font-size: var(--fs-sm); }
.why { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px var(--col-gap); }
.why > div { border-top: 1px solid var(--line-strong); padding-top: 20px; }
.why h3 { font-size: 1.0625rem; }
.why p { margin-top: 8px; color: var(--ink-2); }
.why.why-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } /* 3 of 12 each */
@media (max-width: 1100px) { .why.why-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .why.why-4 { grid-template-columns: minmax(0, 1fr); gap: 20px; } }

/* "Incluido sin coste": a receipt where every line is 0,00 € (public/_incluido.html) */
.incl { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sheet); padding: 6px 28px 0; }
.incl-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 0 14px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: var(--fs-xs); font-weight: 500; }
.incl-brand { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 650; font-size: var(--fs-sm); letter-spacing: -.01em; }
.incl-brand .k-mark { width: 20px; height: 20px; color: var(--brand-ink); --k-mark-accent: var(--accent); }
.incl-rows { list-style: none; }
.incl-rows li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 32px; align-items: baseline; padding: 18px 0; border-bottom: 1px dashed var(--line-strong); }
.incl-item b { display: block; font-weight: 620; color: var(--ink); font-size: 1.0625rem; letter-spacing: -.01em; }
.incl-item small { display: block; margin-top: 4px; color: var(--ink-2); font-size: var(--fs-sm); line-height: 1.55; max-width: 58ch; }
.incl-price { color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; font-size: var(--fs-sm); }
.incl-total { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 0 22px; border-top: 1px solid var(--ink); margin-top: -1px; font-weight: 650; color: var(--ink); }
.incl-total b { display: inline-flex; align-items: center; gap: 8px; font-size: 1.25rem; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--ink); }
.incl-total .pv-i { width: 18px; height: 18px; color: var(--success-mark); stroke-width: 2.2; }
@media (max-width: 600px) {
  .incl { padding: 4px 18px 0; }
  .incl-rows li { gap: 6px 16px; padding: 16px 0; }
}

/* ───────────── Product visuals (public/pv/*.html) ─────────────
   The portal's own components rebuilt in HTML: crisp at any size, themed by the tokens. */
.pv { --pv-r: 14px; position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--pv-r); box-shadow: var(--shadow-sheet); font-size: 14px; line-height: 1.35; color: var(--ink); overflow: hidden; container-type: inline-size; text-align: left; }
.pv b { font-weight: 600; }
.pv small { display: block; color: var(--muted); font-size: 12.5px; }
.pv-i { width: 14px; height: 14px; flex: none; }
.pv-num { font-variant-numeric: tabular-nums; text-align: right; }
.pv-bar { height: 46px; display: flex; align-items: center; gap: 18px; padding: 0 18px; border-bottom: 1px solid var(--line); }
.pv-brand { display: inline-flex; align-items: center; gap: 7px; font-weight: 650; font-size: 14px; letter-spacing: -.01em; }
.pv-brand .k-mark { width: 20px; height: 20px; color: var(--brand-ink); --k-mark-accent: var(--accent); }
.pv-tab { position: relative; font-size: 13px; font-weight: 600; color: var(--ink); height: 100%; display: inline-flex; align-items: center; }
.pv-tab::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--accent); border-radius: 2px; }
.pv-tile { display: inline-grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 9px; color: hsl(var(--h) 60% 40%); background: hsl(var(--h) 70% 50% / .12); }
.pv-tile .pv-i { width: 16px; height: 16px; }
:root[data-theme="dark"] .pv-tile { color: hsl(var(--h) 75% 72%); background: hsl(var(--h) 60% 60% / .16); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pv-tile { color: hsl(var(--h) 75% 72%); background: hsl(var(--h) 60% 60% / .16); } }
.pv-st { display: inline-flex; align-items: center; gap: 5px; justify-self: start; white-space: nowrap; font-size: 12.5px; font-weight: 600; color: var(--ink-2); background: var(--bg-soft); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px 3px 8px; }
.pv-st.is-ok { color: var(--success); background: color-mix(in srgb, var(--success-mark) 10%, var(--surface)); border-color: color-mix(in srgb, var(--success-mark) 28%, transparent); }
.pv-st.is-busy { color: var(--accent-ink); background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 25%, transparent); }
.pv-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: fw-pulse 1s ease-in-out infinite alternate; }
.pv-org { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--ink-2); }
.pv-org .pv-i { color: var(--accent-ink); width: 13px; height: 13px; }
.pv-name { min-width: 0; }
.pv-name b, .pv-name small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-name small { display: flex; align-items: center; gap: 5px; }
.pv-name small .pv-i { width: 12px; height: 12px; }

/* Document thumbnails */
.pv-thumb { position: relative; width: 34px; height: 44px; flex: none; border-radius: 5px; border: 1px solid var(--line-strong); background: var(--surface); display: flex; flex-direction: column; gap: 4px; padding: 7px 6px; overflow: hidden; }
.pv-thumb i { display: block; height: 3px; border-radius: 2px; background: var(--line-strong); }
.pv-thumb i.s { width: 60%; }
.pv-thumb-pdf::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--accent); opacity: .7; }
.pv-thumb-pdf { padding-top: 9px; }
.pv-thumb-photo { padding: 4px; background: color-mix(in srgb, var(--ink) 14%, var(--surface)); border-color: transparent; }
.pv-thumb-photo > span { flex: 1; display: flex; flex-direction: column; gap: 4px; background: var(--surface); border-radius: 2px; padding: 5px 4px; }
.pv-thumb-logo { align-items: center; justify-content: center; padding: 0; background: var(--bg-soft); }
.pv-thumb-logo .logo-mark { width: 18px; height: 18px; color: var(--ink); }
.pv-thumb.pv-sm { width: 28px; height: 36px; padding: 6px 5px; gap: 3px; }

/* Documentos table */
.pv-thead, .pv-rows li { display: grid; grid-template-columns: 34px minmax(0, 1.25fr) minmax(0, 1fr) 46px 80px 98px 62px; column-gap: 14px; align-items: center; padding: 0 18px; }
.pv-thead > :first-child { grid-column: span 2; }
.pv-thead { height: 38px; font-size: 12px; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--line); background: var(--surface-2); }
.pv-rows { list-style: none; margin: 0; padding: 0; }
.pv-rows li { min-height: 64px; border-bottom: 1px solid var(--line); }
.pv-rows li:last-child { border-bottom: 0; }
.pv-cat { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--ink-2); min-width: 0; }
.pv-cat > span:last-child { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-c-date { font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.pv-rows .pv-num { font-weight: 600; font-size: 13.5px; white-space: nowrap; }
@container (max-width: 820px) {
  .pv-thead, .pv-rows li { grid-template-columns: 34px minmax(0, 1.3fr) minmax(0, 1fr) 80px 98px 62px; }
  .pv-c-date { display: none; }
}
@container (max-width: 640px) {
  .pv-thead { display: none; }
  .pv-rows li { grid-template-columns: 34px minmax(0, 1fr) auto; grid-template-rows: auto auto; row-gap: 6px; padding-top: 12px; padding-bottom: 12px; }
  .pv-c-cat, .pv-c-date, .pv-c-org { display: none !important; }
  .pv-rows li > .pv-thumb, .pv-rows li > .pv-name { grid-row: 1 / span 2; }
  .pv-rows .pv-num { grid-column: 3; grid-row: 1; }
  .pv-rows .pv-st { grid-column: 3; grid-row: 2; justify-self: end; }
  .pv-docs .pv-name small { display: none; }
  .pv-docs .pv-name b { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
}

/* Quarter card: the portal's navy card, in both themes */
.pv-quarter { --q-bg: #10233f; --q-line: rgba(255, 255, 255, .14); background: var(--q-bg); border-color: transparent; color: #fff; padding: 26px 26px 22px; box-shadow: 0 24px 50px -24px rgba(16, 35, 63, .55); }
:root[data-theme="dark"] .pv-quarter { --q-bg: #142d50; border-color: #234068; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pv-quarter { --q-bg: #142d50; border-color: #234068; } }
.pv-q-kicker { font-size: 13px; color: rgba(255, 255, 255, .78); }
.pv-q-title { margin-top: 6px; font-size: clamp(19px, 3.4cqw, 26px); font-weight: 650; letter-spacing: -.02em; line-height: 1.2; }
.pv-q-boxes { margin-top: 20px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pv-q-boxes > div { border: 1px solid var(--q-line); border-radius: 12px; padding: 14px 16px; background: rgba(255, 255, 255, .04); }
.pv-q-l { display: block; font-size: 13px; color: rgba(255, 255, 255, .8); }
.pv-q-boxes b { display: block; margin-top: 6px; font-size: clamp(18px, 3cqw, 23px); font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pv-q-boxes small { margin-top: 6px; color: rgba(255, 255, 255, .72); font-variant-numeric: tabular-nums; }
.pv-q-track { list-style: none; margin: 22px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.pv-q-track li { position: relative; padding-top: 12px; font-size: 12.5px; color: rgba(255, 255, 255, .7); }
.pv-q-track li::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .16); }
.pv-q-track li.is-done::before { background: #6cb4e6; }
.pv-q-track li.is-now { color: #fff; font-weight: 600; }
.pv-q-track li.is-now::before { background: repeating-linear-gradient(90deg, #6cb4e6 0 6px, transparent 6px 10px); }
.pv-q-foot { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--q-line); display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: rgba(255, 255, 255, .86); }
.pv-q-foot .pv-i { color: #34d399; width: 16px; height: 16px; }
@container (max-width: 470px) { .pv-q-boxes { grid-template-columns: minmax(0, 1fr); } .pv-quarter { padding: 20px 18px 18px; } }

/* Message thread */
.pv-t-head { padding: 16px 20px 14px; border-bottom: 1px solid var(--line); }
.pv-t-head b { font-size: 15px; letter-spacing: -.01em; }
.pv-t-head small { display: flex; gap: 14px; margin-top: 3px; }
.pv-t-new { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); font-weight: 600; }
.pv-t-new::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.pv-t-body { padding: 20px; display: grid; gap: 16px; background: var(--surface); }
.pv-msg { position: relative; max-width: 86%; display: grid; gap: 5px; padding-left: 42px; }
.pv-msg p { background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px 14px 14px 4px; padding: 11px 14px; font-size: 14px; line-height: 1.5; }
.pv-msg-h { font-size: 12px; color: var(--muted); font-weight: 600; }
.pv-av { position: absolute; left: 0; bottom: 0; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: #10233f; }
.pv-av .k-mark { width: 18px; height: 18px; color: #fff; --k-mark-accent: #6cb4e6; }
.pv-msg.is-me { justify-self: end; padding-left: 0; justify-items: end; }
.pv-msg.is-me p { background: #1d6fa5; border-color: transparent; color: #fff; border-radius: 14px 14px 4px 14px; }
.pv-att { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); border: 1px solid var(--line); border-radius: 8px; padding: 5px 9px; background: var(--surface); }
.pv-att .pv-i { color: var(--accent-ink); }
.pv-t-foot { display: flex; align-items: center; gap: 14px; padding: 14px 20px 16px; border-top: 1px solid var(--line); }
.pv-t-input { flex: 1; min-width: 0; height: 40px; display: flex; align-items: center; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 8px; color: var(--muted); font-size: 13.5px; }
.pv-t-meta { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
@container (max-width: 470px) { .pv-t-meta { display: none; } .pv-msg { max-width: 100%; } }

/* Small visuals for the steps */
.pv-mini { font-size: 13.5px; }
.pv-tray { padding: 4px 14px; }
.pv-mrow { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; align-items: center; min-height: 52px; border-bottom: 1px solid var(--line); }
.pv-mrow:last-child { border-bottom: 0; }
.pv-mrow .pv-name b { font-size: 13px; }
.pv-request { padding: 14px; }
.pv-r-k { font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 8px; }
.pv-r-card { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; border: 1px solid var(--line-strong); border-radius: 10px; padding: 12px 12px 12px 14px; background: var(--surface); }
.pv-r-card::before { content: ""; position: absolute; left: -1px; top: 10px; bottom: 10px; width: 3px; border-radius: 2px; background: var(--accent); }
.pv-r-card .pv-name b { white-space: normal; font-size: 13.5px; line-height: 1.3; }
.pv-btn { font-size: 12.5px; font-weight: 600; color: #fff; background: #1d6fa5; border-radius: 7px; padding: 7px 13px; }
.pv-result { padding: 4px 16px 8px; }
.pv-res-h { display: flex; align-items: center; gap: 10px; min-height: 52px; border-bottom: 1px solid var(--line); }
.pv-res-h > .pv-i { width: 22px; height: 22px; padding: 3px; border-radius: 50%; color: #fff; background: var(--success-mark); stroke-width: 2.4; }
.pv-res-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 58px; }
.pv-res-row u { text-decoration: none; color: var(--accent-ink); font-weight: 600; }
.pv-res-amt { text-align: right; }
.pv-res-amt b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.pv-res-amt small { font-variant-numeric: tabular-nums; }

/* Activity sheet to invoice (pv/_sheet_invoice.html, médicos): the spreadsheet on top, the invoice below */
.pv-sheet .pv-bar { height: 42px; }
.pv-sheet .pv-sh-src { padding: 12px 18px 10px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.pv-sh-file { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.pv-sh-ico { width: 30px; height: 36px; border-radius: 5px; border: 1px solid var(--line-strong); background: var(--surface); display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px; padding: 8px 5px 5px; position: relative; }
.pv-sh-ico::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--success-mark); opacity: .8; border-radius: 4px 4px 0 0; }
.pv-sh-ico i { display: block; border-radius: 1px; background: var(--line-strong); }
.pv-sh-grid { margin-top: 10px; display: grid; grid-template-columns: 62px 76px minmax(0, 1fr) 46px 66px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface); font-size: 12.5px; }
.pv-sh-grid > span { padding: 6px 10px; border-bottom: 1px solid var(--line); color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.pv-sh-grid > span.h { background: var(--bg-soft); color: var(--muted); font-weight: 600; font-size: 11.5px; }
.pv-sh-grid > span:nth-last-child(-n+5) { border-bottom: 0; }
.pv-sh-grid .n { text-align: right; }
.pv-sh-grid .c-pat { background: repeating-linear-gradient(135deg, transparent 0 5px, color-mix(in srgb, var(--line-strong) 45%, transparent) 5px 6px); }
.pv-sh-grid .c-pat.h { text-decoration: line-through; text-decoration-color: var(--muted); }
.pv-sh-grid .c-pat i { display: block; width: 80%; height: 7px; margin-top: 4px; border-radius: 3px; background: var(--line-strong); opacity: .7; }
.pv-sh-grid .c-pat i.s { width: 58%; }
.pv-sh-more { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.pv-sh-drop { color: var(--ink-2); font-weight: 600; white-space: nowrap; }
.pv-sh-step { display: flex; align-items: center; gap: 8px; padding: 8px 18px; font-size: 12.5px; font-weight: 600; color: var(--success); border-bottom: 1px solid var(--line); }
.pv-sh-step .pv-i { width: 15px; height: 15px; }
.pv-inv { padding: 0 18px 14px; }
.pv-inv-h { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; min-height: 52px; border-bottom: 1px solid var(--line); }
.pv-inv-h .pv-name b { font-size: 15px; letter-spacing: -.01em; }
.pv-inv-lines { list-style: none; margin: 0; padding: 0; }
.pv-inv-lines li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; min-height: 48px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.pv-inv-lines .pv-num { font-weight: 600; white-space: nowrap; }
.pv-inv-no { font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; margin-right: 8px; }
.pv-inv-tot { margin: 6px 0 0; display: grid; gap: 0; }
.pv-inv-tot > div { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--ink-2); padding: 3px 0; }
.pv-inv-tot dd { margin: 0; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pv-inv-tot .t { margin-top: 4px; padding-top: 8px; border-top: 1px solid var(--line); color: var(--ink); font-weight: 650; font-size: 15px; }
.pv-inv-foot { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.pv-inv-foot .pv-btn { display: inline-flex; align-items: center; gap: 6px; }
.pv-inv-foot .pv-i { width: 14px; height: 14px; }
.pv-inv-foot small { font-size: 12.5px; }
@container (max-width: 440px) {
  .pv-sh-grid { grid-template-columns: 68px minmax(0, 1fr) 46px 62px; }
  .pv-sh-grid > span { padding: 6px 8px; }
  .pv-sh-grid .c-date { display: none; }
  .pv-sh-grid > span:nth-last-child(-n+4) { border-bottom: 0; }
  .pv-sh-grid > span:nth-last-child(5) { border-bottom: 1px solid var(--line); }
  .pv-sh-more { flex-direction: column; gap: 2px; }
  .pv-inv-foot small { display: none; }
  .pv-inv-lines .pv-name small { display: block; white-space: normal; }
  .pv-inv-no { display: block; font-size: 12px; margin: 0 0 1px; }
}

/* The two altas on the same date (pv/_alta.html, alta de autónomo): start day, a two-step track, the match line */
.pv-alta .pv-bar { height: 42px; }
.pv-al-start { display: flex; align-items: center; gap: 14px; padding: 14px 18px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.pv-al-cal { width: 44px; flex: none; border: 1px solid var(--line-strong); border-radius: 9px; overflow: hidden; background: var(--surface); text-align: center; line-height: 1; }
.pv-al-cal small { display: block; padding: 3px 0 2px; background: var(--accent); color: #fff; font-size: 10.5px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; }
.pv-al-cal b { display: block; padding: 6px 0 7px; font-size: 19px; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.pv-al-start .pv-name b { font-size: 15px; letter-spacing: -.01em; }
.pv-al-track { list-style: none; margin: 0; padding: 6px 18px 0; position: relative; }
.pv-al-step { position: relative; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; padding: 12px 0; }
.pv-al-step + .pv-al-step { border-top: 1px solid var(--line); }
.pv-al-step:first-child::after { content: ""; position: absolute; left: 14.5px; top: 46px; bottom: -14px; width: 1px; background: var(--line-strong); }
.pv-al-node { position: relative; z-index: 1; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; color: var(--accent-ink); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); }
.pv-al-node .pv-i { width: 16px; height: 16px; }
.pv-al-h { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.pv-al-h .pv-name b { font-size: 14.5px; }
.pv-al-chip { display: grid; justify-items: end; }
.pv-al-chip > .pv-st { grid-area: 1 / 1; }
.pv-al-chip .is-busy { visibility: hidden; animation: pv-al-busy 2.6s ease both; }
.pv-al-chip .is-ok { animation: pv-al-ok 2.6s ease both; }
.pv-al-chip-2 .is-busy, .pv-al-chip-2 .is-ok { animation-duration: 3.6s; }
@keyframes pv-al-busy { 0%, 62% { visibility: visible; opacity: 1; } 70%, 100% { visibility: hidden; opacity: 0; } }
@keyframes pv-al-ok { 0%, 64% { opacity: 0; transform: scale(.92); } 78%, 100% { opacity: 1; transform: none; } }
.pv-al-facts { margin: 10px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pv-al-facts > div { border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; min-width: 0; }
.pv-al-facts dt { font-size: 11.5px; color: var(--muted); font-weight: 500; }
.pv-al-facts dd { margin: 2px 0 0; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-al-facts .pv-al-date { border-color: color-mix(in srgb, var(--success-mark) 45%, transparent); background: color-mix(in srgb, var(--success-mark) 8%, var(--surface)); }
.pv-al-facts .pv-al-date dd { color: var(--success); }
.pv-al-match { display: flex; align-items: center; gap: 10px; margin: 4px 18px 0; padding: 11px 12px; border-radius: 10px; background: color-mix(in srgb, var(--success-mark) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--success-mark) 28%, transparent); }
.pv-al-match > .pv-i { width: 22px; height: 22px; padding: 3px; border-radius: 50%; color: #fff; background: var(--success-mark); stroke-width: 2.4; flex: none; }
.pv-al-match b { color: var(--success); font-size: 13.5px; }
.pv-al-foot { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; align-items: center; padding: 12px 18px 14px; }
.pv-al-foot .pv-name small { white-space: normal; }
@container (max-width: 420px) {
  .pv-al-track { padding: 4px 14px 0; }
  .pv-al-start, .pv-al-foot { padding-left: 14px; padding-right: 14px; }
  .pv-al-match { margin: 4px 14px 0; }
  .pv-al-step { grid-template-columns: 26px minmax(0, 1fr); gap: 10px; }
  .pv-al-node { width: 26px; height: 26px; border-radius: 8px; }
  .pv-al-step:first-child::after { left: 12.5px; top: 42px; }
  .pv-al-facts { gap: 6px; }
  .pv-al-facts > div { padding: 6px 9px; }
  .pv-al-x { display: none; }
}

/* ───────────── Footer ───────────── */
.site-foot { border-top: 1px solid var(--line); background: var(--bg-soft); padding: 56px 0 32px; margin-top: 0; }
.foot-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 40px var(--col-gap); }
.foot-grid > .foot-brand { grid-column: 1 / span 3; }
.foot-grid > .foot-col { grid-column: span 3; }
.foot-grid > .foot-col:last-child { grid-column: span 3; }
.foot-brand p { margin-top: 14px; color: var(--muted); font-size: var(--fs-sm); max-width: 32ch; }
.foot-col h2 { font-size: var(--fs-sm); font-weight: 600; color: var(--ink); letter-spacing: 0; margin-bottom: 12px; }
.foot-col ul { list-style: none; display: grid; gap: 2px; }
.foot-col a { display: inline-flex; align-items: center; min-height: 32px; color: var(--muted); font-size: var(--fs-sm); }
.foot-col a:hover { color: var(--accent-ink); }
.foot-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: var(--fs-xs); }
.foot-bottom a { color: var(--muted); }

/* ───────────── Prose (legal, long text) ───────────── */
.prose { font-size: var(--fs-read); line-height: 1.7; color: var(--ink-2); }
.prose > * + * { margin-top: 1em; }
.prose h2 { font-size: 1.375rem; margin-top: 2.2em; letter-spacing: -.015em; scroll-margin-top: calc(var(--head-h) + 20px); }
.prose h3 { font-size: 1.125rem; margin-top: 1.8em; }
.prose h2 + *, .prose h3 + * { margin-top: .7em; }
.prose > h2:first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .45em; }
.prose li::marker { color: var(--muted); }
.prose a { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent-ink) 40%, transparent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose a:hover { text-decoration-color: currentColor; }
.prose table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); line-height: 1.5; }
.prose .table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.prose th, .prose td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose thead th { background: var(--surface-2); color: var(--ink); font-weight: 600; }
.prose tr:last-child td { border-bottom: 0; }

.legal { display: grid; grid-template-columns: 220px minmax(0, 720px); gap: 64px; justify-content: start; padding: 48px 0 var(--sec-y); }
.legal-toc { position: sticky; top: calc(var(--head-h) + 32px); align-self: start; font-size: var(--fs-sm); max-height: calc(100vh - var(--head-h) - 64px); overflow-y: auto; padding-bottom: 8px; }
.prose h2.annex { font-size: 1.625rem; padding-top: 1.4em; border-top: 1px solid var(--line); margin-top: 2.6em; }
.legal-toc p { font-weight: 600; color: var(--ink); margin-bottom: 10px; }
.legal-toc ol { list-style: none; border-left: 1px solid var(--line); }
.legal-toc a { display: block; padding: 5px 0 5px 14px; margin-left: -1px; border-left: 1px solid transparent; color: var(--muted); line-height: 1.4; }
.legal-toc a:hover { color: var(--ink); border-left-color: var(--line-strong); }
.legal-toc a.is-active { color: var(--ink); border-left-color: var(--accent); }
.legal-meta { color: var(--muted); font-size: var(--fs-sm); margin-top: 14px; }

/* ───────────── Responsive ───────────── */
@media (max-width: 1100px) {
  .legal { grid-template-columns: minmax(0, 1fr); gap: 0; max-width: 760px; }
  .legal-toc { display: none; }
}
@media (max-width: 960px) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .hero h1 { max-width: 15ch; }
  .hero .flow { max-width: 520px; }
  .pair { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .split, .g12 { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .split > *, .split > :first-child, .split > :not(:first-child), .g12 > * { grid-column: 1 / -1 !important; }
  .steps, .trio, .g3, .why { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-grid > .foot-brand { grid-column: 1 / -1; }
  .foot-grid > .foot-col, .foot-grid > .foot-col:last-child { grid-column: span 1; }
  .cta-block { grid-template-columns: minmax(0, 1fr); }
  .grid-2 { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .feature .feature-copy, .feature.flip .feature-copy { grid-row: 1; }
  .feature .feature-art, .feature.flip .feature-art { grid-row: 2; }
}
@media (max-width: 760px) {
  .logos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .logos li { min-height: 60px; }
  .plans, .plan-mini, .duo, .g2 { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .plan-extra { grid-template-columns: minmax(0, 1fr); }
  .person { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .person-photo { width: 112px; }
  .kinds > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  /* Comparison table becomes labelled stacks */
  .ktable thead { display: none; }
  .ktable, .ktable tbody, .ktable tr, .ktable th, .ktable td { display: block; width: auto; }
  .ktable tr { padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .ktable tr:last-child { border-bottom: 0; }
  .ktable tbody th { width: auto; padding: 0 0 8px; border: 0; font-size: var(--fs-base); }
  .ktable td { padding: 6px 0; border: 0; display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: 12px; }
  .ktable td::before { content: attr(data-label); color: var(--muted); font-size: var(--fs-xs); font-weight: 500; padding-top: 2px; }
  .ktable .us { background: none; color: var(--ink); font-weight: 560; }
}
@media (max-width: 600px) {
  :root { --gutter: 20px; }
  .inc { grid-template-columns: minmax(0, 1fr); }
  .legal { padding-top: 32px; }
  .prose .table-wrap.stack { border: 0; border-radius: 0; overflow: visible; }
  .prose table.stack thead { display: none; }
  .prose table.stack, .prose table.stack tbody, .prose table.stack tr, .prose table.stack td { display: block; }
  .prose table.stack tr { border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 14px; margin-bottom: 10px; background: var(--surface); }
  .prose table.stack td { border: 0; padding: 8px 0; }
  .prose table.stack td + td { border-top: 1px solid var(--line); }
  .prose table.stack td::before { content: attr(data-label); display: block; font-size: var(--fs-xs); font-weight: 600; color: var(--muted); margin-bottom: 2px; }
  :where(.ks) h1 { letter-spacing: -.028em; }
  .hero .cta-row .btn { flex: 1 1 100%; }
  .page-head .cta-row .btn { flex: 1 1 100%; }
  .proof { flex-direction: column; gap: 6px; }
  .proof span { position: relative; padding-left: 20px; }
  .proof span::before, .proof span + span::before {
    content: ""; position: absolute; left: 2px; top: .45em; width: 10px; height: 5px; margin: 0;
    border-left: 1.5px solid var(--accent); border-bottom: 1.5px solid var(--accent); transform: rotate(-45deg);
  }
  .plan { padding: 22px; }
  .timeline > li { padding-left: 52px; }
  .foot-grid { gap: 28px; }
  .foot-bottom { flex-direction: column; }
  .figures td:last-child { padding-left: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media print {
  .site-head, .site-foot, .menu-panel { display: none !important; }
}
