/* 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 { display: none; }
  .head-actions .btn { min-height: 44px; padding: 0 14px; }
  .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;
  }
}
@media (max-width: 359px) {
  .site-head .wrap { gap: 12px; }
  .head-actions .btn { padding: 0 10px; }
}

/* ───────────── 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%; } }

/* The cuota row in Documentos (pv/_cuota.html): the cuota calculator and the guides. */
.pv-cu-head { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.pv-cu-head .pv-name b { font-size: 15px; }
.pv-cu-head .pv-name small { white-space: normal; }
.pv-cu-tag { font-size: 12px; font-weight: 650; padding: 3px 9px; border-radius: 999px; color: var(--accent-ink); background: var(--accent-soft); white-space: nowrap; }
.pv-cu-rows { list-style: none; margin: 0; padding: 0 18px; }
.pv-cu-rows li { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; min-height: 62px; border-bottom: 1px solid var(--line); animation: who-in .45s ease both; animation-delay: calc(var(--n) * 160ms + 200ms); }
.pv-cu-rows li:last-child { border-bottom: 0; }
.pv-cu-day { display: grid; place-items: center; width: 40px; height: 42px; border-radius: 9px; border: 1px solid var(--line-strong); background: var(--surface-2); line-height: 1; }
.pv-cu-day small { font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.pv-cu-day b { font-size: 16px; font-variant-numeric: tabular-nums; }
.pv-cu-rows .pv-name { min-width: 0; }
.pv-cu-rows .pv-name b { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-cu-rows .pv-name small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-cu-amt { font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pv-cu-foot { display: flex; align-items: center; gap: 10px; padding: 14px 18px 16px; border-top: 1px solid var(--line); background: var(--surface-2); }
.pv-cu-foot > .pv-i { width: 22px; height: 22px; padding: 3px; border-radius: 50%; color: #fff; background: var(--success-mark); stroke-width: 2.4; flex: none; }
@container (max-width: 470px) { .pv-cu-rows li { grid-template-columns: 40px minmax(0, 1fr) auto; } .pv-cu-rows .pv-st { display: none; } }

/* 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; }
/* Emitir factura in the portal (pv/_emit.html): the request as label and value rows over the .pv-sheet pieces. */
.pv-em-f { margin: 0; display: grid; gap: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); overflow: hidden; }
.pv-em-f > div { display: grid; grid-template-columns: 9.2em minmax(0, 1fr); gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.pv-em-f > div:last-child { border-bottom: 0; }
.pv-em-f dt { display: flex; align-items: center; gap: 7px; align-self: start; color: var(--muted); font-weight: 600; }
.pv-em-n { display: inline-grid; place-items: center; width: 18px; height: 18px; flex: none; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); font-size: 11px; font-weight: 700; }
.pv-em-f dd { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; color: var(--ink); }
.pv-em-f dd b { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-em-f dd small { color: var(--muted); font-size: 12px; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pv-emit .pv-inv { padding-top: 6px; }
.pv-emit .pv-inv-h .pv-name small { display: block; white-space: normal; }
.pv-inv-tot dd.is-neg { color: #8a5300; }
:root[data-theme="dark"] .pv-inv-tot dd.is-neg { color: #f0b552; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pv-inv-tot dd.is-neg { color: #f0b552; } }
@media (max-width: 480px) { .pv-em-f > div { grid-template-columns: minmax(0, 1fr); gap: 4px; } .pv-em-f dd b { white-space: normal; } }
@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: #1d6fa5; 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; }
.pv-alta .pv-name b, .pv-alta .pv-al-h .pv-name small { white-space: normal; }
@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; }
}

/* ───────────── Comparison pages (kuotia_vs_*.html, alternativas) ─────────────
   Competitor facts are dated in the page; this block is only layout. Bars grow once when they
   enter the viewport (scroll-driven where supported, on load otherwise); with reduced motion the
   global rule removes the animation and the final widths show. */
.cmp { --cmp-us: var(--accent); --cmp-them: color-mix(in srgb, var(--ink-2) 55%, var(--line-strong)); }
.cmp-chart { margin: 0; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sheet); padding: 20px 22px 6px; }
.cmp-cap { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.cmp-cap b { font-weight: 650; color: var(--ink); letter-spacing: -.01em; }
.cmp-cap small { color: var(--muted); font-size: var(--fs-xs); }
.cmp-group { padding: 14px 0 6px; }
.cmp-group + .cmp-group { border-top: 1px dashed var(--line-strong); }
.cmp-group > h3, .cmp-group > p.cmp-g { font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2); letter-spacing: 0; margin: 0 0 6px; }
.cmp-bars { list-style: none; margin: 0; padding: 0; }
.cmp-bars li { display: grid; grid-template-columns: minmax(0, 10.5em) minmax(0, 1fr) 6.2em; grid-template-areas: "name track val" ". note note"; gap: 2px 14px; align-items: center; padding: 9px 0; }
.cmp-name { grid-area: name; min-width: 0; line-height: 1.25; }
.cmp-name b { display: block; font-weight: 620; color: var(--ink); font-size: var(--fs-sm); }
.cmp-name small { display: block; color: var(--muted); font-size: var(--fs-xs); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmp-track { grid-area: track; height: 12px; border-radius: 6px; background: var(--bg-soft); overflow: hidden; }
.cmp-track i { display: block; height: 100%; width: calc(var(--v, 1) * 100%); border-radius: 6px; background: var(--cmp-them); transform-origin: 0 50%; animation: cmp-grow .9s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--n, 0) * 90ms + 150ms); }
.cmp-bars li.is-us .cmp-track i { background: var(--cmp-us); }
.cmp-bars li.is-us .cmp-name b { color: var(--accent-ink); }
.cmp-val { grid-area: val; text-align: right; font-weight: 650; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; letter-spacing: -.01em; }
.cmp-note { grid-area: note; color: var(--muted); font-size: var(--fs-xs); line-height: 1.45; }
@keyframes cmp-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@supports (animation-timeline: view()) {
  .cmp-chart:not(.is-hero) .cmp-track i { animation-timeline: view(); animation-range: entry 10% cover 35%; animation-delay: 0s; }
}
@media (max-width: 600px) {
  .cmp-chart { padding: 16px 16px 4px; }
  .cmp-bars li { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name val" "track track" "note note"; gap: 6px 12px; }
}
/* In the page head the chart sits on the right half, like the product visuals */
.page-head-pv .wrap > .cmp-chart, .page-head-pv .wrap > .pv-who { grid-column: 7 / -1; }
@media (max-width: 960px) {
  .page-head-pv .wrap > .cmp-chart, .page-head-pv .wrap > .pv-who { grid-column: 1; max-width: 560px; }
}

/* Who does each task: a two-column table styled as a product card (kuotia_vs_declarando) */
.pv-who { padding: 0; }
.pv-who table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.pv-who caption { text-align: left; padding: 14px 18px 12px; border-bottom: 1px solid var(--line); font-weight: 650; color: var(--ink); letter-spacing: -.01em; }
.pv-who caption small { display: block; margin-top: 2px; font-weight: 500; }
.pv-who thead th { padding: 10px 12px; font-size: 12px; font-weight: 600; color: var(--muted); text-align: left; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.pv-who thead th.us { color: var(--accent-ink); }
.pv-who tbody th { padding: 12px 12px 12px 18px; text-align: left; font-weight: 600; color: var(--ink); vertical-align: top; width: 30%; }
.pv-who td { padding: 10px 12px; vertical-align: top; border-left: 1px solid var(--line); }
.pv-who tbody tr + tr > * { border-top: 1px solid var(--line); }
.pv-who td.us { background: color-mix(in srgb, var(--accent-soft) 70%, var(--surface)); }
.cmp .who { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 12.5px; padding: 3px 10px 3px 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-soft); color: var(--ink-2); white-space: nowrap;
  animation: who-in .45s ease both; animation-delay: calc(var(--n, 0) * 160ms + 250ms); }
.cmp .who::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .55; }
.cmp .who.is-us { color: var(--success); border-color: color-mix(in srgb, var(--success-mark) 30%, transparent); background: color-mix(in srgb, var(--success-mark) 10%, var(--surface)); }
.pv-who td small { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; line-height: 1.4; animation: who-in .45s ease both; animation-delay: calc(var(--n, 0) * 160ms + 330ms); }
@keyframes who-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@container (max-width: 460px) {
  .pv-who tbody th { padding-left: 14px; width: 28%; font-size: 13px; }
  .pv-who td { padding: 9px 8px; }
  .cmp .who { white-space: normal; }
}

/* Marks inside comparison tables: always with words, never colour alone */
.cmp .mk { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--ink); }
.cmp .mk::before { content: ""; flex: none; width: 16px; height: 16px; border-radius: 50%; background: var(--line-strong) center / 10px no-repeat; }
.cmp .mk.yes::before { background-color: var(--success-mark); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 6.2 5 8.5l4.5-5'/%3E%3C/svg%3E"); }
.cmp .mk.part::before { background-color: var(--warn-line); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M3 6h6'/%3E%3C/svg%3E"); }
.cmp .mk.no::before { background-color: var(--line-strong); background-image: none; box-shadow: inset 0 0 0 4px var(--surface); }
.cmp .ktable td .mk + small { display: block; margin-top: 4px; color: var(--ink-2); font-size: var(--fs-sm); }
@media (min-width: 761px) { .ktable.ktable-5 tbody th { width: 18%; } }
.ktable tbody th small { font-weight: 500; }
@media (max-width: 760px) { .cmp .ktable td > .mk + small { grid-column: 2; margin-top: -4px; } }

/* Who it suits: one card per service, the competitor never styled worse than us */
.cmp .fit { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--col-gap); }
.cmp .fit > article { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); padding: 24px 26px 26px; display: flex; flex-direction: column; }
.cmp .fit h3 { font-size: 1.1875rem; }
.cmp .fit .fit-plan { margin-top: 4px; color: var(--muted); font-size: var(--fs-sm); }
.cmp .fit h4 { margin: 18px 0 8px; font-size: var(--fs-sm); font-weight: 600; color: var(--ink); letter-spacing: 0; }
.cmp .fit .ticks, .cmp .fit .dashes { font-size: var(--fs-sm); gap: 8px; }
.cmp .fit .link-arrow { margin-top: auto; padding-top: 18px; font-size: var(--fs-sm); }
.cmp .fit > article.is-us { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
@media (max-width: 760px) { .cmp .fit { grid-template-columns: minmax(0, 1fr); gap: 20px; } }

/* Jump links under the page head (alternativas) */
.cmp .jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; list-style: none; }
.cmp .jump a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-2); font-size: var(--fs-sm); font-weight: 500; background: var(--surface); }
.cmp .jump a:hover { color: var(--ink); border-color: var(--line-strong); background: var(--bg-soft); }

/* Brand lockups (public/_brand.html): our mark and name, or a competitor's own wordmark in one colour */
.blogo { display: inline-flex; align-items: center; gap: .32em; color: var(--ink); font-weight: 700; letter-spacing: -.025em; line-height: 1; vertical-align: middle; }
.blogo .k-mark { width: 1.15em; height: 1.15em; color: var(--brand-ink); --k-mark-accent: var(--accent); }
.blogo-mask { height: 1em; aspect-ratio: var(--ar, 3); background: currentColor; -webkit-mask: var(--src) center / contain no-repeat; mask: var(--src) center / contain no-repeat; }
.blogo-xolo { --ar: 92 / 27; height: 1.18em; }
.blogo-declarando { --ar: 235 / 26; height: .64em; }
.blogo-cuentica { --ar: 164 / 30; height: 1.02em; }
.blogo-finutive { --ar: 980 / 226; height: 1.12em; }

/* Hero scoreboard: the two brands face to face, the year in euros and the strings attached */
.cmp-head .lead { font-size: var(--fs-lead); }
.cmp-sub { margin-top: 14px; color: var(--ink-2); font-size: var(--fs-read); max-width: 36em; }
.cmp-date { margin-top: 22px; display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: var(--fs-sm); }
.cmp-date .pv-i { width: 16px; height: 16px; color: var(--accent-ink); }
.page-head-pv .wrap > .vs { grid-column: 7 / -1; }
.vs { margin: 0; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-sheet); overflow: hidden; }
.vs-head { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); background: var(--surface-2); border-bottom: 1px solid var(--line); }
.vs-brand { display: grid; justify-items: start; align-content: center; gap: 10px; padding: 24px 22px 20px; font-size: 1.625rem; min-height: 104px; }
.vs-head .vs-brand:last-child { padding-left: 36px; }
.vs-brand small { font-size: var(--fs-xs); font-weight: 500; color: var(--muted); letter-spacing: 0; line-height: 1.3; }
.vs-x { position: absolute; left: 50%; top: 50%; translate: -50% -50%; z-index: 1; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--surface); border: 1px solid var(--line-strong); color: var(--muted); font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.vs-head .vs-brand:last-child { border-left: 1px solid var(--line); }
.vs-rows { margin: 0; padding: 6px 22px 0; }
.vs-t { display: inline-flex; align-items: flex-start; gap: 8px; font-weight: 620; color: var(--ink); line-height: 1.3; }
.vs-t .pv-i { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--ink-2); }
.is-us .vs-t .pv-i { color: var(--accent-ink); }
.vs-diff { position: absolute; right: 0; top: 5px; font-size: 11.5px; font-weight: 650; line-height: 1; padding: 4px 8px; border-radius: 999px; color: var(--ink-2); background: var(--bg-soft); border: 1px solid var(--line-strong); white-space: nowrap; font-variant-numeric: tabular-nums; }
.vs-diff.is-less { color: color-mix(in srgb, var(--success) 78%, var(--ink)); background: color-mix(in srgb, var(--success-mark) 12%, var(--surface)); border-color: color-mix(in srgb, var(--success-mark) 30%, transparent); }
.vs-foot { margin: 0; padding: 0 22px 16px; color: var(--muted); font-size: var(--fs-xs); }
.vs-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 36px; padding: 14px 0 16px; }
.vs-row + .vs-row { border-top: 1px dashed var(--line-strong); }
.vs-row dt { grid-column: 1 / -1; font-size: var(--fs-xs); font-weight: 600; color: var(--ink-2); margin-bottom: 8px; }
.vs-row dd { position: relative; margin: 0; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; align-content: flex-start; gap: 2px 8px; }
.vs-n { font-size: 1.625rem; font-weight: 650; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--ink); }
.vs-row dd small { flex-basis: 100%; color: var(--muted); font-size: var(--fs-xs); line-height: 1.4; }
.vs-row dd .mk + small { margin-top: 2px; }
.vs-bar { flex-basis: 100%; height: 8px; margin-top: 8px; border-radius: 4px; background: var(--bg-soft); overflow: hidden; }
.vs-bar i { display: block; height: 100%; width: calc(var(--v, 1) * 100%); border-radius: 4px; background: var(--cmp-them); transform-origin: 0 50%; animation: cmp-grow .9s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--n, 0) * 90ms + 200ms); }
.vs-row dd.is-us .vs-bar i { background: var(--cmp-us); }
@media (max-width: 340px) { .vs-diff { position: static; } }
@media (max-width: 960px) { .page-head-pv .wrap > .vs { grid-column: 1; max-width: 560px; } }
@media (max-width: 420px) {
  .vs-brand { font-size: 1.375rem; padding: 20px 10px 16px 16px; }
  .vs-head .vs-brand:first-child { padding-right: 30px; }
  .vs-head .vs-brand:last-child { padding-left: 28px; }
  .vs-diff { font-size: 10.5px; padding: 3px 6px; top: 4px; }
  .vs-rows { padding: 4px 16px 0; } .vs-foot { padding: 0 16px 14px; }
  .vs-row { column-gap: 18px; }
  .vs-n { font-size: 1.25rem; }
}

/* Verdict: one card per brand, same weight for both */
.cmp .verdict { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--col-gap); }
.cmp .verdict > article { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); overflow: hidden; display: flex; flex-direction: column; }
.verdict-foot { margin: auto 26px 0; padding: 16px 0 20px; border-top: 1px solid var(--line-strong); display: flex; justify-content: space-between; align-items: baseline; gap: 12px; color: var(--ink-2); font-size: var(--fs-sm); }
.verdict-foot b { white-space: nowrap; font-size: 1.25rem; font-weight: 650; letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.cmp .verdict .vlist { margin-bottom: 8px; }
.cmp .verdict > article.is-us { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.verdict-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 66px; padding: 18px 26px; background: var(--surface-2); border-bottom: 1px solid var(--line); font-size: 1.375rem; }
.verdict-head > span:last-child { font-size: var(--fs-xs); font-weight: 500; color: var(--muted); }
.cmp .verdict h3 { padding: 22px 26px 6px; font-size: 1.1875rem; }
.vlist { list-style: none; padding: 0 26px; }
.vlist li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 14px; align-items: start; padding: 14px 0; color: var(--ink-2); line-height: 1.5; }
.vlist li + li { border-top: 1px solid var(--line); }
.vlist-i { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: var(--ink-2); background: var(--bg-soft); border: 1px solid var(--line); }
.vlist-i .pv-i { width: 18px; height: 18px; }
.is-us .vlist-i { color: var(--accent-ink); background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 22%, transparent); }
@media (max-width: 760px) {
  .cmp .verdict { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .verdict-head { padding: 16px 20px; } .verdict-foot { margin: auto 20px 0; } .cmp .verdict h3 { padding: 18px 20px 4px; } .vlist { padding: 0 20px; }
  .vlist li { grid-template-columns: 30px minmax(0, 1fr); gap: 12px; } .vlist-i { width: 30px; height: 30px; border-radius: 9px; }
}

/* Who does what: the gestor chip is green for both brands (it encodes who, not which brand); a program's step is dashed */
.cmp .who.is-app { border-style: dashed; background: var(--surface); }
.cmp .who.is-gestor { color: color-mix(in srgb, var(--success) 78%, var(--ink)); border-color: color-mix(in srgb, var(--success-mark) 30%, transparent); background: color-mix(in srgb, var(--success-mark) 10%, var(--surface)); }

/* How each one works (lanes): one row per brand, three steps joined by a line that fills as you scroll in.
   Plays once when it enters the viewport ([data-play], kuotia-site.js); without JS or with reduced motion
   the final state shows. Who does each step is the chip (Tú / Tu gestor), the same colours for both brands. */
.lanes { --lane-c: var(--cmp-them); --node: 44px; --lgap: 28px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-sheet); }
.lane { display: grid; grid-template-columns: 172px minmax(0, 1fr); gap: 24px; padding: 30px 30px 30px 28px; }
.lane + .lane { border-top: 1px dashed var(--line-strong); }
.lane.is-us { --lane-c: var(--accent); }
.lane-brand { display: grid; align-content: start; gap: 8px; padding-top: 8px; font-size: 1.5rem; }
.lane-brand small { font-size: var(--fs-xs); color: var(--muted); font-weight: 500; }
.lane-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--lgap); }
.lane-steps li { position: relative; min-width: 0; }
.lane-steps li:not(:last-child)::after {
  content: ""; position: absolute; top: calc(var(--node) / 2 - 1.5px); left: calc(var(--node) + 10px); right: calc(10px - var(--lgap)); height: 3px; border-radius: 2px;
  background: linear-gradient(var(--lane-c), var(--lane-c)) 0 0 / 100% 100% no-repeat, var(--line);
}
.lane-node { position: relative; width: var(--node); height: var(--node); display: grid; place-items: center; border-radius: 13px; color: #fff; background: var(--lane-c); box-shadow: 0 8px 18px -10px var(--lane-c); }
.lane-node > .pv-i { width: 20px; height: 20px; }
.lane-txt { margin-top: 16px; }
.lane-txt .who { margin-bottom: 10px; }
.lane-txt b { display: block; font-weight: 620; color: var(--ink); line-height: 1.35; letter-spacing: -.01em; }
.lane-txt small { display: block; margin-top: 6px; color: var(--ink-2); font-size: var(--fs-sm); line-height: 1.5; }
.lanes .who { animation: none; }
/* The three ways an invoice reaches Kuotia, landing on the first node */
.lane-in { position: absolute; left: calc(100% + 10px); top: 50%; translate: 0 -50%; display: flex; gap: 4px; pointer-events: none; }
.lane-in i { font-style: normal; font-size: 11px; font-weight: 650; line-height: 1; padding: 4px 6px; border-radius: 6px; color: var(--accent-ink); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); white-space: nowrap; }
.lanes:not(.is-playing) .lane-in, .lanes.is-playing .lane-in i { opacity: 0; }

/* Before it plays: steps waiting, line empty. Playing: each lane runs 0.45 s after the previous. */
.lanes[data-play-ready]:not(.is-playing) .lane-node { background: var(--bg-soft); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line-strong); }
.lanes[data-play-ready]:not(.is-playing) .lane-txt { opacity: 0; }
.lanes[data-play-ready]:not(.is-playing) .lane-steps li::after { background-size: 0 100%, auto; }
.lanes.is-playing .lane { --t0: 0s; }
.lanes.is-playing .lane + .lane { --t0: .45s; }
.lanes.is-playing .lane-node { animation: lane-node .5s cubic-bezier(.2, .8, .3, 1.3) both; animation-delay: calc(var(--t0) + var(--s) * .7s + .1s); }
.lanes.is-playing .lane-txt { animation: who-in .5s ease both; animation-delay: calc(var(--t0) + var(--s) * .7s + .2s); }
.lanes.is-playing .lane-steps li::after { animation: lane-fill-x .55s ease-in-out both; animation-delay: calc(var(--t0) + var(--s) * .7s + .4s); }
.lanes.is-playing .lane-in i { animation: lane-in 1.1s ease both; animation-delay: calc(var(--t0) + var(--k) * .12s); }
.lane-in i:nth-child(1) { --k: 0; } .lane-in i:nth-child(2) { --k: 1; } .lane-in i:nth-child(3) { --k: 2; }
@keyframes lane-node { from { transform: scale(.6); background: var(--bg-soft); color: var(--muted); } 60% { background: var(--lane-c); color: #fff; } to { transform: none; } }
@keyframes lane-fill-x { from { background-size: 0 100%, auto; } to { background-size: 100% 100%, auto; } }
@keyframes lane-fill-y { from { background-size: 100% 0, auto; } to { background-size: 100% 100%, auto; } }
@keyframes lane-in { 0% { opacity: 0; transform: translateX(28px); } 25% { opacity: 1; transform: none; } 70% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateX(-30px) scale(.6); } }
@media (max-width: 960px) { .lane { grid-template-columns: minmax(0, 1fr); gap: 18px; } .lane-brand { grid-auto-flow: column; justify-content: space-between; align-items: center; padding-top: 0; } }
@media (max-width: 760px) {
  .lanes { --node: 40px; --lgap: 22px; }
  .lane { padding: 22px 20px; }
  .lane-steps { grid-template-columns: minmax(0, 1fr); }
  .lane-steps li { display: grid; grid-template-columns: var(--node) minmax(0, 1fr); gap: 14px; }
  .lane-steps li:not(:last-child)::after { top: calc(var(--node) + 8px); bottom: calc(8px - var(--lgap)); left: calc(var(--node) / 2 - 1.5px); right: auto; width: 3px; height: auto; }
  .lanes[data-play-ready]:not(.is-playing) .lane-steps li::after { background-size: 100% 0, auto; }
  .lanes.is-playing .lane-steps li::after { animation-name: lane-fill-y; }
  .lane-txt { margin-top: 0; }
  .lane-in { left: auto; right: auto; top: calc(100% + 6px); translate: 0 0; display: none; }
}

/* Many brands, one question (alternativas): who files your taxes, a row per brand in the page head */
.page-head-pv .wrap > .whoc { grid-column: 7 / -1; }
.whoc { margin: 0; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-sheet); overflow: hidden; }
.whoc-cap { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; padding: 18px 22px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.whoc-cap b { font-weight: 650; color: var(--ink); letter-spacing: -.01em; }
.whoc-cap small { color: var(--muted); font-size: var(--fs-xs); }
.whoc-rows { list-style: none; margin: 0; padding: 0; }
.whoc-rows li { display: grid; grid-template-columns: 10.5em minmax(0, 1fr); gap: 8px 20px; align-items: center; padding: 15px 22px; }
.whoc-rows li + li { border-top: 1px dashed var(--line-strong); }
.whoc-rows li.is-us { background: color-mix(in srgb, var(--accent-soft) 70%, var(--surface)); border-top-style: solid; border-top-color: color-mix(in srgb, var(--accent) 25%, var(--line)); }
.whoc-brand { display: grid; justify-items: start; gap: 7px; font-size: 1.1875rem; }
.whoc-brand small { font-size: var(--fs-xs); font-weight: 500; color: var(--muted); letter-spacing: 0; line-height: 1.3; }
.whoc-what { display: grid; justify-items: start; gap: 6px; min-width: 0; }
.whoc-rows li.is-us .whoc-what small { color: var(--ink); font-weight: 560; }
.whoc-what small { color: var(--ink-2); font-size: var(--fs-sm); line-height: 1.4; animation: who-in .45s ease both; animation-delay: calc(var(--n, 0) * 160ms + 330ms); }
.whoc-foot { margin: 0; padding: 12px 22px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: var(--fs-xs); }
@media (max-width: 960px) { .page-head-pv .wrap > .whoc { grid-column: 1; max-width: 560px; } }
@media (max-width: 600px) {
  .whoc-cap, .whoc-rows li, .whoc-foot { padding-left: 18px; padding-right: 18px; }
  .whoc-rows li { grid-template-columns: minmax(0, 1fr); gap: 10px; padding-top: 14px; padding-bottom: 14px; }
  .whoc-brand { grid-auto-flow: column; justify-content: space-between; align-items: center; font-size: 1.125rem; }
  .whoc-what { grid-template-columns: 104px minmax(0, 1fr); align-items: center; column-gap: 12px; }
}

/* Kuotia's edges, each with what the others publish on the same point (alternativas) */
.edges { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--col-gap); }
.edge { display: flex; flex-direction: column; border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line)); border-radius: var(--radius-lg); background: var(--surface); padding: 26px 26px 22px; }
.edge-i { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; color: var(--accent-ink); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent); }
.edge-i .pv-i { width: 20px; height: 20px; }
.cmp .edge h3 { margin-top: 18px; font-size: 1.1875rem; line-height: 1.3; }
.edge > p { margin-top: 10px; color: var(--ink-2); font-size: var(--fs-sm); line-height: 1.55; }
.edge-vs { list-style: none; margin: 22px 0 0; padding: 14px 0 0; border-top: 1px solid var(--line-strong); display: grid; gap: 12px; margin-top: auto; }
.edge > p + .edge-vs { margin-top: 22px; }
.edge-vs li { display: grid; grid-template-columns: 6.4em minmax(0, 1fr); gap: 12px; align-items: start; }
.edge-b { display: flex; align-items: center; min-height: 20px; font-size: .9375rem; color: var(--ink-2); }
.cmp .edge-vs .mk { font-size: var(--fs-xs); line-height: 1.35; align-items: flex-start; }
.cmp .edge-vs .mk::before { width: 14px; height: 14px; background-size: 9px; margin-top: 1px; }
.edge-vs small { display: block; margin-top: 2px; padding-left: 20px; color: var(--muted); font-size: var(--fs-xs); line-height: 1.4; }
@media (max-width: 1100px) { .edges { grid-template-columns: minmax(0, 1fr); max-width: 640px; } }
@media (max-width: 600px) { .edge { padding: 22px 20px 20px; } }

/* Five lanes in a row: lighter brand column, same steps */
.lanes-many .lane { padding-top: 26px; padding-bottom: 26px; }
@media (max-width: 760px) { .lanes-many .lane-brand { font-size: 1.25rem; } }

/* Year chart with wordmarks instead of names */
.cmp-bars-logo .cmp-name b { display: flex; align-items: center; min-height: 22px; font-size: 1rem; color: var(--ink); }
.cmp-bars-logo li.is-us .cmp-name b { color: var(--ink); }

/* Short brand cards: the wordmark heads the card, who files is the first line */
.fit-head { display: grid; grid-template-rows: 30px auto; justify-items: start; align-items: center; gap: 6px; margin: -24px -26px 0; padding: 18px 26px; min-height: 84px; background: var(--surface-2); border-bottom: 1px solid var(--line); border-radius: var(--radius-lg) var(--radius-lg) 0 0; font-size: 1.375rem; }
.fit-head > span:last-child { font-size: var(--fs-xs); font-weight: 500; color: var(--muted); letter-spacing: 0; }
.cmp .fit .fit-who { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-top: 20px; color: var(--ink); font-weight: 560; font-size: var(--fs-sm); line-height: 1.45; }

/* Comparison table with marks and brand heads */
.ktable-marks thead th { padding-top: 18px; padding-bottom: 16px; }
.ktable-marks thead th .blogo { font-size: 1.25rem; }
.ktable-marks td small { display: block; margin-top: 4px; color: var(--ink-2); font-size: var(--fs-sm); line-height: 1.45; }
.ktable-marks .kt-v { font-weight: 600; color: var(--ink); }
.ktable-marks tbody tr:hover > * { background: color-mix(in srgb, var(--bg-soft) 70%, transparent); }
.ktable-marks tbody tr:hover > .us { background: color-mix(in srgb, var(--accent-soft) 85%, var(--bg-soft)); }
.mk-legend { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: var(--fs-xs); color: var(--muted); }
.cmp .mk-legend .mk { font-weight: 500; color: var(--muted); }
/* On phones each row keeps the two brands side by side, so the comparison stays a comparison */
@media (max-width: 760px) {
  .ktable.ktable-marks tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; padding: 16px; }
  .ktable.ktable-marks tbody th { grid-column: 1 / -1; padding-bottom: 10px; }
  .ktable.ktable-marks td { display: block; padding: 0; }
  .ktable.ktable-marks td::before { display: block; margin-bottom: 6px; padding: 0; font-size: 11.5px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; }
  .ktable.ktable-marks td.us::before { color: var(--accent-ink); }
  .cmp .ktable.ktable-marks td > .mk + small, .ktable.ktable-marks td small { margin-top: 6px; font-weight: 400; font-size: var(--fs-xs); }
  .cmp .ktable-marks .mk { align-items: flex-start; line-height: 1.3; }
  .cmp .ktable-marks .mk::before { margin-top: 1px; }
}

/* The year in numbers: chart beside the worked figures */
.cases.cmp-year { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--col-gap); align-items: start; }
.cmp-year .example-head { padding: 20px 22px 18px; }
.ex-diff { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 12px 0 6px !important; }
.ex-diff b { white-space: nowrap; flex: none; font-size: 2.25rem; font-weight: 650; letter-spacing: -.035em; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.ex-diff span { color: var(--ink-2); font-size: var(--fs-sm); font-weight: 560; }
.cmp-year .example-note { margin-top: 14px; font-size: var(--fs-sm) !important; }

/* Kuotia tour: the flow beside the copy, then two portal views on matching stages */
.cmp-tour .feature-art .flow { max-width: 500px; margin-left: auto; }
.stages { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--col-gap); margin-top: clamp(40px, 5vw, 64px); }
.stage { margin: 0; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); overflow: hidden; }
.stage-art { flex: 1; display: grid; place-items: center; padding: clamp(20px, 3.5vw, 36px); background: var(--bg-soft); border-bottom: 1px solid var(--line); min-height: 300px; }
.stage-art > .pv { width: 100%; max-width: 460px; }
.stage-copy { padding: 20px 26px 24px; }
.stage-copy h3 { font-size: 1.125rem; }
.stage-copy p { margin-top: 8px; color: var(--ink-2); }
@media (max-width: 960px) {
  .cmp-tour .feature-art .flow { margin: 0 auto; max-width: 440px; }
}
@media (max-width: 760px) {
  .stages, .cases.cmp-year { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .stage-art { min-height: 0; padding: 14px; }
  .stage-copy { padding: 18px 20px 20px; }
}

.cmp .who .pv-i { width: 13px; height: 13px; }
.cmp .who:has(.pv-i)::before { display: none; }
.ktable-marks thead td { background: var(--surface-2); }
@media (min-width: 761px) { .ktable-marks { table-layout: fixed; } .ktable-marks thead td { width: 24%; } .ktable-marks thead th { width: 38%; } }
.cmp :is(.ktable-marks, .mk-legend, .edge-vs) .mk.no::before { background-color: var(--muted); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M3.5 3.5l5 5M8.5 3.5l-5 5'/%3E%3C/svg%3E"); box-shadow: none; }
/* Closing call to action with portal views instead of the flow (the flow appears once per page) */
.cta-pv-art { display: grid; gap: 14px; width: 100%; max-width: 380px; justify-self: end; }
@media (max-width: 960px) { .cta-pv-art { justify-self: center; } }

/* Sources at the end of a comparison */
.cmp .sources { font-size: var(--fs-sm); color: var(--ink-2); }
.cmp .sources ul { list-style: none; border-top: 1px solid var(--line); margin-top: 14px; }
.cmp .sources li { padding: 10px 0; border-bottom: 1px solid var(--line); line-height: 1.5; }
.cmp .sources a { word-break: break-word; }
.cmp .sources p + p { margin-top: 10px; }

/* ───────────── 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; }
}

/* ───────────── AEAT form, annotated (public/_aeat_303.html, public/_aeat_130.html) ─────────────
   A modelo drawn like the AEAT form: casillas as boxes with their number in a corner, grouped in blocks with a
   numbered mark that matches a note below. Animated by js/kuotia-explain.js (.kx, data-in per block). */
.af .kx-stage { padding: 22px 22px 18px; background: color-mix(in srgb, var(--accent) 5%, var(--bg)); }
.af-sheet { background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px; box-shadow: var(--shadow-sheet); font-size: 12.5px; line-height: 1.3; color: var(--ink-2); overflow: hidden; }
.af-top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 6px 14px; padding: 12px 14px; border-bottom: 2px solid var(--ink); }
.af-org { grid-column: 1 / -1; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.af-id { display: flex; align-items: center; gap: 12px; min-width: 0; }
.af-model { display: grid; place-items: center; flex: none; min-width: 56px; padding: 4px 8px; border: 1.5px solid var(--ink); border-radius: 6px; line-height: 1; }
.af-model small { font-size: 9.5px; color: var(--muted); }
.af-model b { font-size: 22px; font-weight: 750; letter-spacing: -.02em; color: var(--ink); }
.af-title { font-weight: 650; color: var(--ink); font-size: 13.5px; min-width: 0; }
.af-title small { display: block; font-weight: 500; color: var(--muted); font-size: 11.5px; }
.af-per { display: flex; gap: 6px; }
.af-per > span { display: grid; padding: 3px 9px; border: 1px solid var(--line-strong); border-radius: 5px; text-align: center; line-height: 1.15; }
.af-per small { font-size: 9.5px; color: var(--muted); }
.af-per b { color: var(--ink); font-variant-numeric: tabular-nums; }
.af-sec { padding: 6px 14px 10px; border-top: 1px solid var(--line); }
.af-top + .af-sec { border-top: 0; }
.af-sec-h { margin: 6px 0 6px !important; display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ink); }
.af-mark, .af-notes li::before { display: inline-grid; place-items: center; width: 20px; height: 20px; flex: none; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 700; letter-spacing: 0; }
.af-row { display: grid; grid-template-columns: minmax(0, 1fr) 6.6em 4.2em 6.6em; align-items: center; gap: 6px; padding: 3px 0; }
.af-cols span { font-size: 10px; font-weight: 600; color: var(--muted); text-align: center; }
.af-lbl { min-width: 0; }
.af-lbl em, .af-res-k em { font-style: normal; color: var(--muted); font-size: 11px; white-space: nowrap; }
.af-box { position: relative; display: block; min-height: 30px; padding: 12px 6px 3px; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--surface); text-align: right; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.af-box i { position: absolute; left: 4px; top: 2px; font-style: normal; font-size: 9px; font-weight: 700; color: var(--muted); letter-spacing: .02em; }
.af-box.is-key { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 18%, transparent); }
.af-box.is-key i { color: var(--accent-ink); }
.af-box.af-muted { color: var(--muted); font-weight: 500; }
.af-gap { display: block; }
.af-sum .af-lbl { font-weight: 600; color: var(--ink); }
.af-res { display: flex; align-items: center; justify-content: space-between; gap: 6px 14px; flex-wrap: wrap; padding: 12px 14px; border-top: 2px solid var(--ink); background: var(--accent-soft); }
.af-res-k { display: inline-flex; align-items: center; gap: 8px; font-weight: 650; color: var(--ink); font-size: 13.5px; }
.af-res-k i { font-style: normal; display: inline-grid; place-items: center; min-width: 28px; height: 22px; padding: 0 5px; border-radius: 5px; background: var(--ink); color: var(--surface); font-size: 11px; font-weight: 700; }
.af-res b { margin-left: auto; font-size: 1.5rem; font-weight: 700; letter-spacing: -.02em; color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.af-res-tag { font-size: 11px; font-weight: 700; color: var(--accent-ink); border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line)); border-radius: 999px; padding: 2px 9px; background: var(--surface); }
.af-notes { list-style: none; counter-reset: af; margin: 16px 0 0 !important; padding: 0 !important; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; font-size: var(--fs-sm); line-height: 1.5; color: var(--ink-2); }
.af .af-notes li { margin: 0 !important; padding: 0 0 0 30px; position: relative; counter-increment: af; }
.af .af-notes li::before { content: counter(af); position: absolute; left: 0; top: 1px; }
.af-notes b { color: var(--ink); font-weight: 650; }
.kx.is-live .af-sec[data-in] .af-box { transition: background-color .5s ease, border-color .5s ease; }
@media (max-width: 600px) {
  .af .kx-stage { padding: 14px 10px 14px; }
  .af-sheet { font-size: 12px; }
  .af-top { grid-template-columns: minmax(0, 1fr) auto; padding: 10px 10px; }
  .af-id { grid-column: 1 / -1; }
  .af-per { grid-column: 1 / -1; }
  .af-sec { padding: 4px 10px 8px; }
  .af-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 5px; padding: 4px 0; }
  .af-row > .af-lbl { grid-column: 1 / -1; }
  .af-row.af-cols > span:first-child { display: none; }
  .af-cols span { font-size: 9.5px; }
  .af-row .af-rate { min-width: 0; }
  .af-notes { grid-template-columns: minmax(0, 1fr); }
  .af-res b { font-size: 1.3rem; }
}
/* One amount per casilla (public/_aeat_130.html): label and box side by side, on phones too. Section II of the 130
   (.af-sec-off) is drawn blank, as the form leaves it for non-agrarian activities. */
.af-one .af-row { grid-template-columns: minmax(0, 1fr) 8.6em; gap: 10px; }
.af-sec-h small { margin-left: auto; font-size: 10px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--muted); }
.af-sec-off { background: var(--surface-2); }
.af-sec-off .af-lbl { color: var(--muted); font-size: 11.5px; }
.af-sec-off .af-box { text-align: center; }
@media (max-width: 600px) {
  .af-one .af-row { grid-template-columns: minmax(0, 1fr) 7.4em; gap: 4px 8px; }
  .af-one .af-row > .af-lbl { grid-column: auto; }
  .af-sec-h small { display: none; }
}
/* A census declaration (public/_aeat_036.html, the modelo 036 guide): the same one-box rows as .af-one, where a box is
   a tick (.af-tick, the check icon centred, empty when not marked) or a short text value (.af-txt, left-aligned), and the
   result names the returns it leads to (.af-res-txt). */
.af-cen .af-row { grid-template-columns: minmax(0, 1fr) 11em; }
.af-box.af-txt { text-align: left; white-space: normal; overflow-wrap: anywhere; line-height: 1.25; }
.af-box.af-tick { display: grid; place-items: center; padding: 12px 6px 2px; }
.af-tick .pv-i { width: 17px; height: 17px; color: var(--accent-ink); stroke-width: 2.4; }
.af-cen .af-sec-off .af-box { text-align: center; }
.af-res .af-res-txt { font-size: 1.35rem; letter-spacing: 0; }
@media (max-width: 600px) {
  .af-cen .af-row { grid-template-columns: minmax(0, 1fr) 9.8em; gap: 4px 8px; }
  .af-cen .af-row > .af-lbl { grid-column: auto; }
  .af-res .af-res-txt { font-size: 1.15rem; }
}
/* The annual IVA summary (public/_aeat_390.html, the modelo 390 guide): the rate is printed on the form, not a casilla,
   so it reads as text in a dashed box; the statistics strip of page 1 holds short texts (.af-txt) in the three columns. */
.af-390 .af-rate { border-style: dashed; background: transparent; text-align: center; color: var(--ink-2); font-weight: 500; padding-top: 7px; }
.af-390 .af-stat { background: var(--surface-2); }
.af-390 .af-stat .af-box.af-txt { padding-top: 7px; font-weight: 600; }
.af-390 .af-res + .af-sec { border-top: 0; }
/* An informative return's record (public/_aeat_347.html, the modelo 347 guide): .af-cen rows, plus .af-qs, the four quarter
   boxes of one declarado in a row (two by two on phones), each with its quarter in the corner. */
.af-qs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; padding: 3px 0; }
@media (max-width: 600px) {
  .af-qs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
}
/* A Hacienda letter drawn as an explainer (public/_aeat_carta.html, the carta de Hacienda guide): the sheet of the
   AEAT forms with a header, recipient, title, body and foot as grey bars; each part (.acn-a) carries its numbered mark
   and lights up on its beat ([data-only].on). The final frame shows every mark and no highlight. */
.acn-sheet { position: relative; font-size: 12.5px; }
.acn-tag { position: absolute; right: 12px; top: 12px; z-index: 1; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.acn-a { position: relative; padding-left: 42px; transition: background-color .45s ease, box-shadow .45s ease; }
.acn-m { position: absolute; left: 12px; top: 12px; }
.kx.is-live .acn-a.on { background: var(--accent-soft); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--accent) 60%, transparent); }
.acn-bar { display: block; height: 7px; border-radius: 4px; background: color-mix(in srgb, var(--line-strong) 75%, transparent); max-width: 100%; }
.acn-lines { display: grid; gap: 7px; padding: 6px 0; }
.acn-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px 16px; padding: 12px 14px 12px 42px; border-bottom: 2px solid var(--ink); }
.acn-org b { display: block; font-size: 12px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }
.acn-org small { display: block; margin-top: 3px; font-size: 11px; color: var(--muted); }
.acn-ref { display: grid; gap: 5px; justify-items: end; }
.acn-ref small, .acn-csv small { font-size: 10px; color: var(--muted); }
.acn-to { display: grid; grid-template-columns: 6.6em minmax(0, 1fr); gap: 10px; align-items: start; padding: 10px 14px 4px 42px; }
.acn-lbl { padding-top: 6px; font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.acn-title { padding: 12px 14px 12px 42px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.acn-title > b { display: block; font-size: 18px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); line-height: 1.15; }
.acn-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.acn-meta span { padding: 2px 8px; border: 1px solid var(--line-strong); border-radius: 5px; font-size: 11px; font-weight: 600; color: var(--ink-2); }
.acn-body { padding: 4px 14px 6px; }
.acn-body > .acn-lines { padding-left: 28px; }
.acn-ask { margin: 6px 0; padding: 12px 12px 12px 42px; border: 1px dashed var(--line-strong); border-radius: 8px; }
.acn-ask p { margin: 0 !important; color: var(--ink-2); line-height: 1.45; }
.acn-ask p b { display: block; color: var(--ink); font-weight: 650; }
.acn-ask .acn-due { display: flex; align-items: flex-start; gap: 8px; margin-top: 10px !important; padding: 8px 10px; border-radius: 6px; background: var(--warn-soft); color: var(--ink-2); }
.acn-due .pv-i { flex: none; width: 16px; height: 16px; margin-top: 1px; color: #8a5300; }
.acn-due b { display: block; }
.acn-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px 16px; padding: 12px 14px 12px 42px; border-top: 1px solid var(--line); background: var(--surface-2); }
.acn-how { min-width: 0; color: var(--ink-2); line-height: 1.4; }
.acn-how b { display: block; color: var(--ink); font-weight: 650; }
.acn-csv { flex: none; display: flex; align-items: center; gap: 8px; }
.acn-csv > span:last-child { display: grid; gap: 5px; }
.acn-qr { width: 34px; height: 34px; border-radius: 4px; border: 1px solid var(--line-strong); background: repeating-conic-gradient(var(--ink-2) 0 25%, var(--surface) 0 50%) 0 0 / 8px 8px; opacity: .7; }
.acn-notes { margin-top: 18px !important; }
:root[data-theme="dark"] .acn-due .pv-i { color: #f0b552; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .acn-due .pv-i { color: #f0b552; } }
@media (max-width: 600px) {
  .acn-sheet { font-size: 12px; }
  .acn-a { padding-left: 38px; }
  .acn-m { left: 10px; }
  .acn-top { flex-direction: column; padding: 12px 12px 10px 38px; }
  .acn-ref { justify-items: start; }
  .acn-to { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 8px 12px 2px 38px; }
  .acn-title { padding: 10px 12px 10px 38px; }
  .acn-title > b { font-size: 16px; }
  .acn-body { padding: 4px 10px 6px; }
  .acn-ask { padding: 10px 10px 10px 38px; }
  .acn-foot { flex-direction: column; align-items: flex-start; padding: 10px 12px 12px 38px; }
}

/* ───────────── Deadlines track (public/_plazos.html) ───────────── */
.pz { margin: 2em 0 !important; padding: 18px 20px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-sheet); }
.pz-cap { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line); font-size: var(--fs-sm); color: var(--muted); }
.pz-cap b { color: var(--ink); font-weight: 650; font-size: var(--fs-base); }
.pz-cap span { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); }
.pz-key { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.pz-key-dom { background: var(--bg-soft); box-shadow: inset 0 0 0 1px var(--line-strong); }
.pz-year { display: grid; grid-template-columns: 52px minmax(0, 1fr); align-items: start; gap: 12px; padding-top: 16px; }
.pz-y { margin: 0 !important; padding-top: 22px; font-size: var(--fs-sm); font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.pz-track { list-style: none; margin: 0 !important; padding: 0 !important; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); position: relative; }
.pz-track::before { content: ""; position: absolute; left: 0; right: 0; top: 9px; height: 2px; background: var(--line); }
.pz-stop { position: relative; margin: 0 !important; padding: 0 6px; display: flex; flex-direction: column; align-items: flex-start; gap: 0; }
.pz-q { order: 1; font-size: var(--fs-xs); font-weight: 650; color: var(--muted); }
.pz-stop::before { content: ""; order: 0; position: relative; z-index: 1; width: 12px; height: 12px; margin: 3px 0 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); }
.pz-d { order: 2; display: block; font-size: 1.25rem; font-weight: 700; color: var(--ink); letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pz-d sup { font-size: .6em; color: var(--accent-ink); }
.pz-dom { order: 3; margin-top: 6px; padding: 1px 7px; border-radius: 5px; background: var(--bg-soft); box-shadow: inset 0 0 0 1px var(--line); font-size: var(--fs-xs); color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pz-stop.is-moved::before { border-style: dashed; }
.pz-y small { display: block; font-size: 10.5px; font-weight: 600; color: var(--muted); }
.pz-stop.is-past { opacity: .5; }
.pz-stop.is-past::before { border-color: var(--line-strong); background: var(--line-strong); }
.pz-stop.is-next .pz-q { color: var(--accent-ink); }
.pz-stop.is-next::before { background: var(--accent); box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 22%, transparent); }
.pz-stop.is-next::after { order: 4; content: "Próximo plazo"; margin-top: 6px; padding: 0 8px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 10.5px; font-weight: 700; line-height: 18px; }
.pz-note { margin: 16px 0 0 !important; font-size: var(--fs-xs); color: var(--muted); line-height: 1.5; }
@media (max-width: 600px) {
  .pz { padding: 14px 12px 14px; }
  .pz-year { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .pz-y { padding-top: 0; }
  .pz-d { font-size: 1rem; }
  .pz-stop { padding: 0 3px; }
  .pz-dom { padding: 1px 4px; font-size: 11px; }
  .pz-stop.is-next::after { content: "Próximo"; }
}

/* ───────────── Client area: a quarter in Impuestos (public/pv/_period.html) ───────────── */
.pv-period { font-size: 13.5px; }
.pv-pd-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 16px 18px 0; }
.pv-pd-head > div:first-child { display: grid; gap: 8px; justify-items: start; }
.pv-pd-t { font-size: 16px; font-weight: 650; letter-spacing: -.01em; }
.pv-pd-due { text-align: right; display: grid; gap: 1px; }
.pv-pd-due b { font-size: 15px; font-variant-numeric: tabular-nums; }
.pv-period .pv-pd-track { margin: 16px 18px 0; }
.pv-period .pv-pd-track li { color: var(--muted); }
.pv-period .pv-pd-track li::before { background: var(--line); }
.pv-period .pv-pd-track li.is-done::before { background: var(--accent); }
.pv-period .pv-pd-track li.is-now { color: var(--ink); }
.pv-period .pv-pd-track li.is-now::before { background: repeating-linear-gradient(90deg, var(--accent) 0 6px, transparent 6px 10px); }
.pv-pd-rows { margin-top: 14px; border-top: 1px solid var(--line); }
.pv-pd-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.pv-pd-tile { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; background: var(--accent-soft); color: var(--accent-ink); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pv-pd-out { text-align: right; max-width: 24em; }
.pv-pd-out small { display: block; }
.pv-pd-out b { white-space: nowrap; font-variant-numeric: tabular-nums; }
.pv-pd-out small { font-variant-numeric: tabular-nums; }
.pv-pd-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; padding: 12px 18px 14px; background: var(--surface-2); font-size: 12.5px; color: var(--ink-2); }
.pv-pd-foot span { display: inline-flex; align-items: center; gap: 6px; }
.pv-pd-foot > span:first-child .pv-i { color: var(--success-mark); }
.pv-pd-x { color: var(--accent-ink); font-weight: 600; }
@container (max-width: 420px) {
  .pv-pd-row { grid-template-columns: 32px minmax(0, 1fr); }
  .pv-pd-out { grid-column: 2; text-align: left; }
  .pv-pd-tile { width: 32px; height: 32px; }
}
@media (max-width: 600px) { .af-one .af-lbl em { white-space: normal; } }
