/* Arka — site stylesheet
   Color is driven entirely by CSS variables set on <html>.
   The tweaks panel rewrites these by toggling [data-palette] and [data-mode]. */

:root {
  --bg: #eae5e1;
  --surface: #ffffff;
  --surface-2: #f4f0eb;
  --hairline: rgba(7, 58, 52, 0.12);
  --text: #073a34;
  --text-muted: #51504f;
  --text-dim: #62615d;
  --field-line: #807f7b;
  --error-text: #a8402a;
  --accent: #336d5c;
  --accent-mint: #83db98;
  --pine: #073a34;
  --slate-teal: #336d5c;
  --mint: #83db98;
  --muted-sage: #c4cec6;
  --cream: #eae5e1;
  --obsidian: #141413;
  --alert-red: #e53e3e;

  --max-w: 1280px;
  --gutter: clamp(24px, 5vw, 80px);
  --font-display: 'Lato', system-ui, -apple-system, sans-serif;
  --font-body: 'Lato', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --font-serif: 'Lato', system-ui, -apple-system, sans-serif;
}

/* ── Palettes ─────────────────────────────────────────────────────── */

html[data-palette="ink"] {
  --bg: #1A1F2B;
  --surface: #1A1F2B;
  --surface-2: #232A37;
  --text: #F4F0E6;
  --text-muted: #9A9684;
  --text-dim: #5E5A4D;
  --accent: #B89456;
  --hairline: rgba(244, 240, 230, 0.10);
}
html[data-palette="forest"] {
  --bg: #1B2520;
  --surface: #1B2520;
  --surface-2: #243029;
  --text: #ECE9DE;
  --text-muted: #8E9389;
  --text-dim: #525A53;
  --accent: #C9A961;
  --hairline: rgba(236, 233, 222, 0.10);
}
html[data-palette="charcoal"] {
  --bg: #15171A;
  --surface: #15171A;
  --surface-2: #1F2226;
  --text: #F2EFE8;
  --text-muted: #92908A;
  --text-dim: #55534E;
  --accent: #E8794B;
  --hairline: rgba(242, 239, 232, 0.10);
}
html[data-palette="oxblood"] {
  --bg: #211618;
  --surface: #211618;
  --surface-2: #2C1E20;
  --text: #F1E7DC;
  --text-muted: #9A8A85;
  --text-dim: #5C504B;
  --accent: #C99172;
  --hairline: rgba(241, 231, 220, 0.10);
}

/* Light mode swaps bg/text */
html[data-mode="light"][data-palette="ink"] {
  --bg: #F4F0E6;
  --surface: #F4F0E6;
  --surface-2: #EAE3D2;
  --text: #1A1F2B;
  --text-muted: #5E5A4D;
  --text-dim: #9A9684;
  --hairline: rgba(26, 31, 43, 0.10);
}
html[data-mode="light"][data-palette="forest"] {
  --bg: #EFEBDD;
  --surface: #EFEBDD;
  --surface-2: #E2DBC7;
  --text: #1B2520;
  --text-muted: #525A53;
  --text-dim: #8E9389;
  --hairline: rgba(27, 37, 32, 0.10);
}
html[data-mode="light"][data-palette="charcoal"] {
  --bg: #F4F1EA;
  --surface: #F4F1EA;
  --surface-2: #E8E3D7;
  --text: #15171A;
  --text-muted: #55534E;
  --text-dim: #92908A;
  --hairline: rgba(21, 23, 26, 0.10);
}
html[data-mode="light"][data-palette="oxblood"] {
  --bg: #F1EBDD;
  --surface: #F1EBDD;
  --surface-2: #E5DBC7;
  --text: #211618;
  --text-muted: #5C504B;
  --text-dim: #9A8A85;
  --hairline: rgba(33, 22, 24, 0.10);
}

/* ── Arka Institutional Palette (default) ────────────────────────── */
html[data-palette="civic"] {
  --hero-bg:     #eae5e1;
  --hero-text:   #073a34;
  --hero-accent: #336d5c;
  --hero-mute:   #51504f;
  --bg: #141413;
  --surface: #232322;
  --surface-2: #2e2e2c;
  --text: #eae5e1;
  --text-muted: #c4cec6;
  --text-dim: #a09f9b;
  --field-line: #7a7975;
  --error-text: #E8794B;
  --accent: #83db98;
  --accent-mint: #83db98;
  --hairline: rgba(234, 229, 225, 0.12);
}
html[data-mode="light"][data-palette="civic"] {
  --hero-bg:     #eae5e1;
  --hero-text:   #073a34;
  --hero-accent: #336d5c;
  --hero-mute:   #51504f;
  --bg: #eae5e1;
  --surface: #ffffff;
  --surface-2: #f4f0eb;
  --text: #073a34;
  --text-muted: #51504f;
  --text-dim: #62615d;
  --field-line: #807f7b;
  --error-text: #a8402a;
  --accent: #336d5c;
  --accent-mint: #83db98;
  --hairline: rgba(7, 58, 52, 0.12);
}

/* ── Reset ────────────────────────────────────────────────────────── */
* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
}
#como-funciona,
#para-quien,
#metricas,
#criterio,
#quienes-somos,
#preguntas {
  scroll-margin-top: 88px;
}
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 250ms ease, color 250ms ease;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

/* ── Layout ───────────────────────────────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ── Nav ──────────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--hairline);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 24px;
  letter-spacing: -0.035em;
  color: var(--text);
  line-height: 1;
  flex-shrink: 0;
}
.logo-mark { flex-shrink: 0; }
.nav-links {
  display: flex; align-items: center; gap: 24px;
  font-size: 14px;
  color: var(--text-muted);
}
.nav-links a {
  position: relative;
  transition: color 200ms ease;
  white-space: nowrap;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--text); }
.nav-cta {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 10px 18px;
  border: 1px solid var(--text);
  color: var(--text);
  border-radius: 999px;
  transition: background 200ms ease, color 200ms ease;
  white-space: nowrap;
}
.nav-cta:hover { background: var(--text); color: var(--bg); }

/* ── Mobile menu toggle & drawer ─────────────────────────────────── */
.nav-mobile-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  color: var(--text);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 150ms ease, border-color 150ms ease;
}
.nav-mobile-toggle:hover {
  background: rgba(7, 58, 52, 0.06);
  border-color: var(--text);
}

.nav-mobile-menu {
  display: none;
  background: var(--bg);
  border-top: 1px solid var(--hairline);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.08);
}
.nav-mobile-menu.open {
  display: block;
}
.nav-mobile-inner {
  display: flex;
  flex-direction: column;
  padding: 12px var(--gutter) 20px;
  gap: 2px;
}
.nav-mobile-item {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  padding: 12px 0;
  border-bottom: 1px solid var(--hairline);
  transition: color 150ms ease;
}
.nav-mobile-item:last-child {
  border-bottom: none;
}
.nav-mobile-item:hover {
  color: var(--accent);
}
.nav-mobile-item--cta {
  color: var(--accent);
  padding-top: 14px;
}

/* Six section links (Para quién in ARKA-13, Nosotros in ARKA-15, Preguntas
   in ARKA-16; Enfoque and Portafolio left in ARKA-17). Criterio is always
   dropped from the bar and stays in the mobile menu and the footer; the
   hamburger takes over below 1260px. */
.nav-links .hide-sm { display: none; }

@media (max-width: 1260px) {
  .nav-links { gap: 12px; }
  .nav-item { display: none !important; }
  .nav-cta { display: none !important; }
  .nav-mobile-toggle { display: flex; }
}
@media (max-width: 880px) {
  .nav-inner { height: 60px; }
}

/* ── Mobile sticky sign-in bar ───────────────────────────────────── */
.mobile-signin {
  display: none;
}
@media (max-width: 640px) {
  .mobile-signin {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 49;
    padding: 12px 24px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    backdrop-filter: saturate(140%) blur(12px);
    -webkit-backdrop-filter: saturate(140%) blur(12px);
    border-top: 1px solid var(--hairline);
  }
  .mobile-signin a {
    display: block;
    width: 100%;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 13px 0;
    border: 1px solid var(--text);
    color: var(--text);
    border-radius: 999px;
    transition: background 200ms ease, color 200ms ease;
  }
  .mobile-signin a:hover {
    background: var(--text);
    color: var(--bg);
  }
  /* Civic palette: teal background on the bar when hero is visible */
  html[data-palette="civic"] .mobile-signin {
    background: color-mix(in srgb, var(--bg) 92%, transparent);
  }
  /* Push footer up so content isn't hidden behind the bar */
  footer { padding-bottom: calc(40px + 60px + env(safe-area-inset-bottom)); }
}

/* ── Hero ─────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  padding: clamp(80px, 14vw, 180px) 0 clamp(60px, 10vw, 140px);
  overflow: hidden;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 32px;
}
.hero-eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
}
.hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(48px, 9vw, 132px);
  line-height: 0.95;
  letter-spacing: -0.04em;
  margin: 0;
  max-width: 14ch;
  text-wrap: balance;
}
.hero h1 em {
  font-style: normal;
  font-family: var(--font-serif);
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--text);
}
.hero-sub {
  margin-top: clamp(24px, 4vw, 44px);
  font-size: clamp(17px, 1.6vw, 21px);
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 52ch;
  text-wrap: pretty;
}
.hero-cta-row {
  margin-top: clamp(36px, 5vw, 56px);
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}


/* ── Buttons ──────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 16px 26px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 15px;
  transition: transform 200ms ease, background 200ms ease, color 200ms ease;
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary {
  background: var(--text);
  color: var(--bg);
}
.btn-primary:hover { transform: translateY(-1px); }
.btn-ghost {
  color: var(--text-muted);
  padding-left: 0;
}
.btn-ghost:hover { color: var(--text); }

/* ── Ledger (stats row) ───────────────────────────────────────────── */
.ledger {
  background: var(--muted-sage, #c4cec6);
  border-top: 1px solid rgba(7, 58, 52, 0.15);
  border-bottom: 1px solid rgba(7, 58, 52, 0.15);
  padding: clamp(36px, 5vw, 64px) 0;
}
.ledger-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
}
@media (max-width: 720px) {
  .ledger-grid { grid-template-columns: 1fr; gap: 28px; }
}
.ledger-item .k {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #073a34;
  font-weight: 600;
  margin-bottom: 12px;
}
.ledger-item .v {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(32px, 3.8vw, 50px);
  letter-spacing: -0.02em;
  line-height: 1;
  color: #073a34;
}
.ledger-item .v .unit {
  font-size: 0.6em;
  color: #265446;
  margin-left: 2px;
  font-weight: 600;
}

/* ── Section: Cómo Funciona (Dark Pine Section) ───────────────────── */
.section-how {
  background: #073a34;
  color: #ffffff;
  padding: clamp(80px, 12vw, 140px) 0;
}
.how-header {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  align-items: center;
  margin-bottom: clamp(48px, 8vw, 84px);
}
@media (max-width: 880px) {
  .how-header { grid-template-columns: 1fr; gap: 32px; }
}
.how-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #83db98;
  margin-bottom: 20px;
  font-weight: 600;
}
.how-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 4.5vw, 54px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin: 0 0 20px;
  color: #ffffff;
}
.how-lead {
  font-family: var(--font-body);
  font-size: clamp(16px, 1.3vw, 18px);
  color: #c4cec6;
  line-height: 1.6;
  max-width: 44ch;
  margin: 0;
}
.how-visual {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}
@media (max-width: 880px) {
  .how-visual { justify-content: flex-start; }
}

/* The invoice flow animation (how-it-works.js). The labels are sized in
   container units so they scale with the stage, as in the owner's piece,
   with a floor so they stay legible on a 320px phone; left/top on each label
   are its anchor in the 460x360 animation. */
.how-stage {
  position: relative;
  width: 100%;
  max-width: 480px;
  aspect-ratio: 460 / 360;
  container-type: inline-size;
}
.how-canvas {
  position: absolute;
  inset: 0;
}
/* Labels without their lines mean nothing: they wait for the script to
   draw the animation (no script, or lottie failed to load, leaves only the
   stage's text alternative). */
.how-stage:not(.is-ready) .how-label { visibility: hidden; }
.how-label {
  position: absolute;
  transform: translateY(-82%);
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: max(2.4cqw, 8px);
  letter-spacing: 0.33cqw;
  color: #c4cec6;
}
.how-node {
  transform: translate(-50%, -82%);
  font-size: max(2.83cqw, 9px);
  font-weight: 600;
  letter-spacing: 0.43cqw;
  color: #ffffff;
}

.how-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  border-top: 1px solid rgba(196, 206, 198, 0.15);
  padding-top: 48px;
}
@media (max-width: 1080px) {
  .how-steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .how-steps { grid-template-columns: 1fr; gap: 32px; }
}
.how-step {
  display: flex;
  flex-direction: column;
}
.how-step .num {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #83db98;
  margin-bottom: 14px;
}
.how-step h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: #ffffff;
  margin: 0 0 12px;
}
.how-step p {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: #c4cec6;
  margin: 0;
}

/* ── Section: Para quién es (ARKA-13) ─────────────────────────────── */
/* Colours and type come from the client's spec, not the site tokens. */
.section-who {
  background: #EAE5E2;
  color: #1B3A36;
  padding: 112px 0;
  font-family: 'Lato', system-ui, -apple-system, sans-serif;
}
.who-inner {
  /* 1280 includes the side padding (border-box): 1152px of content at 1440, as in the PNG. */
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 64px;
}
.who-eyebrow {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 15px;
  letter-spacing: 3px;
  color: #3F6B5E;
  margin-bottom: 32px;
}
.who-title {
  font-family: 'Lato', system-ui, -apple-system, sans-serif;
  font-weight: 900;
  font-size: clamp(2.6rem, 6vw, 5.5rem);
  line-height: 1.05;
  letter-spacing: -2px;
  max-width: 11em;
  margin: 0 0 40px;
  overflow-wrap: break-word;
}
.who-lead {
  font-size: 1.5rem;
  line-height: 1.6;
  color: #3E4A47;
  max-width: 700px;
  margin: 0;
}
.who-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 64px;
  margin-top: 80px;
}
.who-col-title {
  font-family: 'Lato', system-ui, -apple-system, sans-serif;
  font-weight: 700;
  font-size: 1.6rem;
  letter-spacing: -0.01em;
  margin: 0 0 24px;
}
.who-col--no .who-col-title { color: #4A5552; }
.who-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.who-list li {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  border-top: 1px solid rgba(27, 58, 54, 0.14);
  padding: 20px 0;
  font-size: 1.2rem;
  line-height: 1.6;
}
.who-icon {
  flex-shrink: 0;
  margin-top: 0.4em;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.who-col--yes .who-icon { stroke: #3F6658; }
.who-col--no .who-icon { stroke: #7A8481; }
.who-col--no .who-list li { color: #4A5552; }
.who-docs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 64px;
  border: 1px solid rgba(27, 58, 54, 0.22);
  border-radius: 8px;
  padding: 48px;
  margin-top: 80px;
}
.who-docs-title {
  font-family: 'Lato', system-ui, -apple-system, sans-serif;
  font-weight: 700;
  font-size: 1.6rem;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
}
.who-docs-intro p {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #3E4A47;
  margin: 0;
}
.who-docs-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.who-docs-list li {
  border-top: 1px solid rgba(27, 58, 54, 0.14);
  padding: 16px 0;
  font-size: 1.1rem;
  line-height: 1.55;
}
.who-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 32px;
  margin-top: 72px;
}
.who-btn {
  display: inline-block;
  background: #3F6658;
  color: #ffffff;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 2.5px;
  border-radius: 4px;
  padding: 22px 40px;
  transition: background 150ms ease;
}
.who-btn:hover { background: #335548; }
.who-help {
  font-size: 1.2rem;
  color: #3E4A47;
  margin: 0;
}
.who-help a {
  color: #1B3A36;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
}
@media (max-width: 899px) {
  .who-inner { padding: 0 24px; }
  .who-columns,
  .who-docs { grid-template-columns: 1fr; }
  .who-columns { gap: 48px; }
  .who-docs { gap: 32px; padding: 32px 24px; }
}

/* ── Section: Criterio (ARKA-14) ──────────────────────────────────── */
/* Colours and type come from the client's spec, not the site tokens. */
.section-criteria {
  position: relative;
  overflow: hidden;
  background: #1D3B38;
  color: #C9D3CF;
  padding: 112px 0;
  font-family: 'Lato', system-ui, -apple-system, sans-serif;
}
/* The isotype in outline, enlarged and cropped by the top-right corner. */
.criteria-mark {
  position: absolute;
  top: -340px;
  left: max(60%, calc(50% + 140px));
  width: 1150px;
  height: auto;
  fill: none;
  stroke: #8FCFA3;
  stroke-width: 0.09;
  opacity: 0.22;
  pointer-events: none;
}
.criteria-inner {
  position: relative;
  /* Same 1280px border-box container as Para quién es. */
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 64px;
}
.criteria-eyebrow {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 15px;
  letter-spacing: 3px;
  color: #8FCFA3;
  margin-bottom: 32px;
}
.criteria-title {
  font-family: 'Lato', system-ui, -apple-system, sans-serif;
  font-weight: 900;
  font-size: clamp(2.6rem, 6vw, 5.5rem);
  line-height: 1.05;
  letter-spacing: -2px;
  color: #F3F0EC;
  max-width: 11em;
  margin: 0 0 40px;
  overflow-wrap: break-word;
}
.criteria-lead {
  font-size: 1.5rem;
  line-height: 1.6;
  max-width: 700px;
  margin: 0;
}
.criteria-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 48px;
  border-top: 1px solid rgba(243, 240, 236, 0.18);
  margin: 88px 0 0;
  padding: 56px 0 0;
}
.criteria-num {
  display: block;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 2px;
  color: #8FCFA3;
  margin-bottom: 28px;
}
.criteria-list h3 {
  font-family: 'Lato', system-ui, -apple-system, sans-serif;
  font-weight: 700;
  font-size: 1.6rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: #F3F0EC;
  margin: 0 0 12px;
}
.criteria-list p {
  font-size: 1.1rem;
  line-height: 1.65;
  margin: 0;
}
@media (max-width: 1023px) {
  .criteria-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 40px; }
}
@media (max-width: 899px) {
  .criteria-inner { padding: 0 24px; }
}
@media (max-width: 639px) {
  .criteria-mark { display: none; }
  .criteria-list { grid-template-columns: 1fr; gap: 40px; margin-top: 64px; padding-top: 40px; }
}

/* ── Section: Quiénes somos (ARKA-15) ─────────────────────────────── */
/* Same client palette and grid as Para quién es. */
.section-team {
  background: #EAE5E2;
  color: #1B3A36;
  padding: 112px 0;
  font-family: 'Lato', system-ui, -apple-system, sans-serif;
}
.team-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 64px;
}
.team-eyebrow {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 15px;
  letter-spacing: 3px;
  color: #3F6B5E;
  margin-bottom: 32px;
}
.team-title {
  font-family: 'Lato', system-ui, -apple-system, sans-serif;
  font-weight: 900;
  font-size: clamp(2.6rem, 6vw, 5.5rem);
  line-height: 1.05;
  letter-spacing: -2px;
  max-width: 12em;
  margin: 0 0 40px;
  overflow-wrap: break-word;
}
.team-lead {
  font-size: 1.5rem;
  line-height: 1.6;
  color: #3E4A47;
  max-width: 780px;
  margin: 0;
}
.team-members {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 64px;
  margin-top: 88px;
}
.team-member {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  border-top: 1px solid rgba(27, 58, 54, 0.22);
  padding-top: 40px;
}
/* 120px circle. Holds the monogram today; an <img> dropped in later fills it. */
.team-photo {
  flex-shrink: 0;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  background: #1D3B38;
  color: #8FCFA3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-weight: 600;
  font-size: 30px;
  letter-spacing: 2px;
}
.team-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.team-name {
  font-family: 'Lato', system-ui, -apple-system, sans-serif;
  font-weight: 700;
  font-size: 1.9rem;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}
.team-role {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 3px;
  color: #3F6B5E;
  margin-bottom: 20px;
}
.team-bio {
  font-size: 1.1rem;
  line-height: 1.75;
  color: #3E4A47;
  margin: 0;
}
@media (max-width: 899px) {
  .team-inner { padding: 0 24px; }
  .team-members { grid-template-columns: 1fr; gap: 48px; }
}
@media (max-width: 480px) {
  .team-member { flex-direction: column; gap: 24px; }
}

/* ── Section: Preguntas frecuentes (ARKA-16) ──────────────────────── */
/* Client palette, scoped to the section. Same background as Quiénes somos,
   so a top rule separates the two. */
.section-faq {
  --faq-bg: #EAE5E2;
  --faq-ink: #1B3A36;
  --faq-green: #3F6B5E;
  --faq-body: #3E4A47;
  --faq-rule: rgba(27, 58, 54, 0.18);
  --faq-btn: #3F6658;
  --faq-btn-hover: #335548;
  background: var(--faq-bg);
  color: var(--faq-ink);
  border-top: 1px solid var(--faq-rule);
  padding: 112px 0;
  font-family: 'Lato', system-ui, -apple-system, sans-serif;
}
.faq-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 512px);
  gap: 64px;
  align-items: start;
}
.faq-eyebrow {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 15px;
  letter-spacing: 3px;
  color: var(--faq-green);
  margin-bottom: 32px;
}
.faq-title {
  font-family: 'Lato', system-ui, -apple-system, sans-serif;
  font-weight: 900;
  font-size: clamp(2.6rem, 5.5vw, 4.75rem);
  line-height: 1.05;
  letter-spacing: -2px;
  max-width: 7em;
  margin: 0 0 56px;
  overflow-wrap: break-word;
}
.faq-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}
.faq-btn {
  display: inline-block;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 2.5px;
  border-radius: 4px;
  padding: 21px 39px;
  border: 1px solid var(--faq-btn);
  transition: background 150ms ease, color 150ms ease;
}
.faq-btn--primary { background: var(--faq-btn); color: #ffffff; }
.faq-btn--primary:hover { background: var(--faq-btn-hover); border-color: var(--faq-btn-hover); }
.faq-btn--outline { color: var(--faq-ink); }
.faq-btn--outline:hover { background: rgba(63, 102, 88, 0.08); }
.faq-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}
.faq-tab {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 2.5px;
  color: var(--faq-ink);
  border: 1.5px solid var(--faq-ink);
  border-radius: 999px;
  padding: 10px 20px;
  transition: background 150ms ease, color 150ms ease;
}
.faq-tab[aria-selected="true"] { background: var(--faq-ink); color: #ffffff; }
.faq-tab[aria-selected="false"]:hover { background: rgba(27, 58, 54, 0.08); }
.faq-tab:focus-visible,
.faq-btn:focus-visible,
.faq-item summary:focus-visible {
  outline: 2px solid var(--faq-ink);
  outline-offset: 3px;
}
.faq-subtitle {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 3px;
  line-height: 1.5;
  color: var(--faq-green);
  margin: 0;
  padding-bottom: 12px;
}
.faq-item { border-top: 1px solid var(--faq-rule); }
.faq-item summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  padding: 26px 0;
  cursor: pointer;
  font-weight: 700;
  font-size: 1.4rem;
  line-height: 1.35;
}
.faq-item summary::-webkit-details-marker { display: none; }
/* Chevron: down when closed, up when open. */
.faq-item summary::after {
  content: "";
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  margin: 0.45em 4px 0 0;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 150ms ease;
}
.faq-item[open] summary::after { transform: translate(0, 4px) rotate(-135deg); }
.faq-item p {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--faq-body);
  margin: -12px 40px 0 0;
  padding-bottom: 32px;
}
.faq-item p a {
  color: var(--faq-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}
@media (max-width: 1100px) {
  .faq-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Single column: title and buttons first, questions below. */
@media (max-width: 899px) {
  .section-faq { padding: 88px 0; }
  .faq-inner { grid-template-columns: 1fr; gap: 56px; padding: 0 24px; }
  .faq-title { margin-bottom: 40px; }
}
@media (max-width: 480px) {
  .faq-actions { align-items: stretch; }
  .faq-btn { text-align: center; padding: 20px 16px; }
  .faq-item summary { font-size: 1.2rem; }
  .faq-item p { margin-right: 0; }
}

/* ── Section: Brand & Closer (Slate Teal Section) ─────────────────── */
.section-brand {
  background: #336d5c;
  color: #ffffff;
  padding: clamp(80px, 12vw, 140px) 0;
}
.brand-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #c6f1d0;
  margin-bottom: 20px;
  font-weight: 600;
}
.brand-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 4.5vw, 54px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: #ffffff;
  margin: 0 0 44px;
  max-width: 18ch;
}
.brand-points {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-bottom: 56px;
}
@media (max-width: 768px) {
  .brand-points { grid-template-columns: 1fr; gap: 28px; }
}
.brand-point {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}
.brand-badge {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ffffff;
  color: #073a34;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.brand-point p {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: #eae5e1;
  margin: 0;
}

/* Dark Pine Branding Card with Logo Watermark */
.brand-card {
  background: #073a34;
  border-radius: 24px;
  padding: clamp(36px, 6vw, 64px) clamp(28px, 5vw, 56px);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  min-height: 220px;
  border: 1px solid rgba(131, 219, 152, 0.15);
}
@media (max-width: 768px) {
  .brand-card { flex-direction: column; align-items: flex-start; }
}
.brand-card-watermark {
  position: absolute;
  right: -30px;
  top: -30px;
  bottom: -30px;
  width: 50%;
  pointer-events: none;
  opacity: 0.16;
  color: #83db98;
}
.brand-card-watermark svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  fill: none;
}
.brand-card-content {
  position: relative;
  z-index: 1;
}
.brand-card-title {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.2vw, 38px);
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  letter-spacing: -0.02em;
}
.brand-card-btn {
  position: relative;
  z-index: 1;
  background: #83db98;
  color: #073a34;
  border: none;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 14px 28px;
  cursor: pointer;
  transition: all 180ms ease;
  white-space: nowrap;
}
.brand-card-btn:hover {
  background: #ffffff;
  color: #073a34;
  transform: translateY(-1px);
}

/* ── Footer ───────────────────────────────────────────────────────── */
footer {
  background: #141413;
  color: #c4cec6;
  border-top: 1px solid rgba(234, 229, 225, 0.1);
  padding: clamp(56px, 8vw, 80px) 0 40px;
  font-size: 13px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 56px;
}
@media (max-width: 880px) {
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 36px; }
}
.footer-brand .mark {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: #eae5e1;
  margin-bottom: 16px;
  line-height: 1;
}
.footer-brand p {
  max-width: 32ch;
  line-height: 1.6;
  margin: 0;
  color: #a8a6a2;
}
.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #83db98;
  margin: 0 0 16px;
  font-weight: 600;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { color: #ceccca; transition: color 150ms ease; }
.footer-col a:hover { color: #83db98; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 32px;
  border-top: 1px solid rgba(234, 229, 225, 0.1);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #a8a6a2;
}
.footer-bottom .legal {
  display: flex; gap: 24px;
}
@media (max-width: 720px) {
  .footer-bottom { flex-direction: column; gap: 20px; align-items: flex-start; }
}

/* ── Sub-page heading ────────────────────────────────────────────── */
.page-header {
  padding: clamp(60px, 10vw, 140px) 0 clamp(40px, 6vw, 80px);
  border-bottom: 1px solid var(--hairline);
}
.page-header .eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 24px;
}
.page-header .eyebrow--with-mark {
  display: flex;
  align-items: center;
  gap: 10px;
}
.page-header h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(48px, 7vw, 96px);
  letter-spacing: -0.04em;
  line-height: 0.95;
  margin: 0;
  max-width: 16ch;
  text-wrap: balance;
}
.page-header h1 em {
  font-style: normal;
  font-family: var(--font-serif);
  font-weight: 400;
}
.page-header .lede {
  margin-top: 32px;
  font-size: clamp(17px, 1.5vw, 20px);
  color: var(--text-muted);
  max-width: 56ch;
  line-height: 1.5;
  text-wrap: pretty;
}
.page-header--compact h1 {
  font-size: clamp(28px, 4vw, 44px);
  max-width: 28ch;
}

/* ── Auth action landing (email confirmation link) ─────────────────── */
.auth-action-wrap {
  padding-block: clamp(48px, 8vw, 96px);
  display: flex;
  justify-content: center;
}
.auth-action-card {
  width: min(440px, 100%);
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  padding: clamp(28px, 5vw, 44px);
  text-align: center;
}
.auth-action-status p { margin: 0; color: var(--text-muted); line-height: 1.5; }
.auth-action-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: var(--text) !important;
  margin-bottom: 8px !important;
}
.auth-action-sub { margin-bottom: 24px !important; }
.auth-action-cta { width: 100%; justify-content: center; }

/* ── Legal documents (privacy, terms) ─────────────────────────────── */
.legal-doc {
  padding: clamp(44px, 6vw, 80px) 0 clamp(64px, 9vw, 120px);
}
.legal-body { max-width: 70ch; }
.legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 32px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding-bottom: 28px;
  border-bottom: 1px solid var(--hairline);
}
.legal-section { padding-top: clamp(36px, 4vw, 52px); }
.legal-section .label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 10px;
}
.legal-section h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(22px, 2.4vw, 30px);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 18px;
  max-width: 30ch;
}
.legal-prose p {
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--text-muted);
  margin: 0 0 14px;
}
.legal-prose p:last-child { margin-bottom: 0; }
.legal-prose strong { color: var(--text); font-weight: 600; }
.legal-prose ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.legal-prose li {
  position: relative;
  padding-left: 20px;
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.legal-prose li:last-child { margin-bottom: 0; }
.legal-prose li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 11px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.6;
}
.legal-prose a,
.legal-crosslink a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
}
.legal-prose a:hover,
.legal-crosslink a:hover { color: var(--accent); }
.legal-crosslink {
  margin: clamp(44px, 6vw, 68px) 0 0;
  padding-top: 28px;
  border-top: 1px solid var(--hairline);
  font-size: 15px;
  color: var(--text-muted);
}

/* ── Language switcher ────────────────────────────────────────────── */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 2px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
}
.lang-btn {
  padding: 5px 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--text-dim);
  cursor: pointer;
  background: none;
  transition: color 180ms ease, border-color 180ms ease;
  line-height: 1;
}
.lang-btn.active {
  color: var(--text);
  border-color: color-mix(in srgb, var(--text) 40%, transparent);
}
.lang-btn:not(.active):hover {
  color: var(--text-muted);
}
.lang-sep {
  color: var(--text-dim);
  line-height: 1;
  pointer-events: none;
}

/* ── Arka Brand Nav ──────────────────────────────────────────────── */
html[data-palette="civic"] .nav {
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  border-bottom: 1px solid var(--hairline);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
html[data-palette="civic"] .nav-logo {
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
}
html[data-palette="civic"] .nav-links {
  color: var(--text-muted);
}
html[data-palette="civic"] .nav-links a {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
  transition: color 150ms ease;
}
html[data-palette="civic"] .nav-links a:hover,
html[data-palette="civic"] .nav-links a.active {
  color: var(--text);
}
html[data-palette="civic"] .nav-cta {
  border: 1.5px solid var(--text);
  color: var(--text);
  background: transparent;
  border-radius: 6px;
  padding: 8px 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  transition: all 180ms ease;
}
html[data-palette="civic"] .nav-links .nav-cta:hover {
  background: var(--text);
  color: var(--bg);
}
html[data-palette="civic"] .lang-btn {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}
html[data-palette="civic"] .lang-btn.active {
  color: var(--text);
  font-weight: 700;
  border-bottom: 1.5px solid var(--text);
}
html[data-palette="civic"] .lang-sep {
  color: var(--hairline);
}

/* ── Arka Hero Section ───────────────────────────────────────────── */
html[data-palette="civic"] .hero {
  background: var(--hero-bg);
  min-height: clamp(400px, 40vw, 520px);
  padding: clamp(70px, 11vw, 130px) 0 clamp(60px, 9vw, 110px);
}
html[data-palette="civic"] .hero-eyebrow {
  color: var(--hero-accent);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 24px;
}
html[data-palette="civic"] .hero-eyebrow .dot {
  background: var(--hero-accent);
}
html[data-palette="civic"] .hero h1 {
  color: var(--hero-text);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.02;
  font-size: clamp(44px, 6.6vw, 88px);
  max-width: none;
}
/* ARKA-11: the one serif accent of the hero, italic and green. */
html[data-palette="civic"] .hero h1 em {
  font-family: 'Instrument Serif', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: 1.08em;
  letter-spacing: -0.01em;
  color: var(--hero-accent);
}
html[data-palette="civic"] .hero .hero-sub {
  color: var(--hero-mute);
  font-family: var(--font-body);
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.6;
  max-width: 52ch;
  margin-top: 24px;
}
html[data-palette="civic"] .hero .btn-primary {
  background: #336d5c;
  color: #ffffff;
  border: 1.5px solid #336d5c;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 17px 32px;
  transition: all 180ms ease;
}
html[data-palette="civic"] .hero .btn-primary:hover {
  background: #073a34;
  border-color: #073a34;
  color: #ffffff;
  transform: translateY(-1px);
}
html[data-palette="civic"] .hero .btn-ghost {
  background: transparent;
  color: #073a34;
  border: 1.5px solid #336d5c;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 17px 32px;
  transition: all 180ms ease;
}
html[data-palette="civic"] .hero .btn-ghost:hover {
  background: #336d5c;
  color: #ffffff;
  transform: translateY(-1px);
}
html[data-palette="civic"] .ledger-item .v .unit {
  color: #265446;
  font-family: var(--font-mono);
  font-weight: 600;
}

/* ── Hero: copy + sample-transaction card (ARKA-11) ─────────────── */
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}
.hero-card {
  --card-cut: 26px;
  --card-ink: var(--hero-text, var(--text));
  --card-line: color-mix(in srgb, var(--card-ink) 12%, transparent);
  justify-self: end;
  width: 100%;
  max-width: 380px;
  /* clip-path would cut a box-shadow off; drop-shadow follows the chamfers. */
  filter: drop-shadow(0 24px 40px rgba(7, 58, 52, 0.12)) drop-shadow(0 2px 6px rgba(7, 58, 52, 0.06));
}
/* Two stacked clipped boxes: the outer one shows 1px of itself as the border. */
.hero-card,
.hero-card-body {
  clip-path: polygon(var(--card-cut) 0, 100% 0, 100% calc(100% - var(--card-cut)),
                     calc(100% - var(--card-cut)) 100%, 0 100%, 0 var(--card-cut));
}
.hero-card { background: color-mix(in srgb, var(--card-ink) 28%, transparent); padding: 1px; }
.hero-card-body {
  background: color-mix(in srgb, var(--hero-bg, var(--bg)) 45%, #ffffff);
  color: var(--card-ink);
  padding: 34px 32px 30px;
  font-family: var(--font-body);
}
.hero-card-eyebrow {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--hero-accent, var(--accent));
  margin-bottom: 22px;
}
.hero-card-row {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--card-line);
}
.hero-card-eyebrow + .hero-card-row { border-top: 0; padding-top: 0; }
.hero-card-confirm { align-items: center; }
.hero-card-label { font-size: 15px; line-height: 1.35; }
.hero-card-strong { font-weight: 700; }
.hero-card-note {
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--hero-mute, var(--text-muted));
}
/* Decorative tick: CSS, so it is not copy for translations.js to carry. */
.hero-card-check::before {
  content: "✓";
  color: var(--hero-accent, var(--accent));
  margin-right: 8px;
}
.hero-card-amount {
  font-family: var(--font-mono);
  font-size: 19px;
  font-weight: 700;
  white-space: nowrap;
}
.hero-card-accent { color: var(--hero-accent, var(--accent)); }
.hero-card-badge {
  flex: none;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ffffff;
  background: var(--hero-accent, var(--accent));
  border-radius: 2px;
  padding: 5px 8px;
}
.hero-card-settle {
  border-top: 1px solid var(--card-line);
  padding: 20px 0 18px;
}
.hero-card-settle .hero-card-eyebrow { margin-bottom: 12px; letter-spacing: 0.18em; }
.hero-card-line {
  display: flex; justify-content: space-between; gap: 16px;
  font-size: 14px;
  line-height: 1.75;
}
.hero-card-figure { font-family: var(--font-mono); white-space: nowrap; }
.hero-card-total {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  border-top: 2px solid var(--card-ink);
  padding-top: 20px;
  font-size: 15px;
  font-weight: 700;
}
.hero-card-total .hero-card-amount { font-size: 22px; }
.hero-card-foot {
  margin: 22px 0 0;
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--hero-mute, var(--text-muted));
}
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-card { justify-self: start; max-width: 440px; }
}
@media (max-width: 640px) {
  html[data-palette="civic"] .hero h1 { font-size: clamp(40px, 12.5vw, 64px); }
  .hero-card-body { padding: 28px 22px 24px; }
}
@media (max-width: 480px) {
  .hero-cta-row .btn { flex: 1 1 100%; justify-content: center; }
}

/* Watermarks disabled for clean editorial look */
.hero-watermark { display: none; }
.hero-chart { display: none; }

/* Growth-chart SVG overlay */
.hero-chart {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 250ms ease;
}
html[data-palette="civic"] .hero-chart { opacity: 0.25; }

/* ── Auth Modal ──────────────────────────────────────────────────── */
.auth-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  align-items: center;
  justify-content: center;
}
.auth-modal.open { display: flex; }

.auth-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.auth-modal-panel {
  position: relative;
  z-index: 1;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  padding: clamp(28px, 5vw, 44px);
  width: min(420px, calc(100vw - 32px));
  /* Never taller than the viewport (short landscape phones). */
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
}
.auth-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 6px;
  line-height: 0;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}
.auth-modal-close:hover { color: var(--text); background: var(--surface-2); }

.auth-modal-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 22px;
  letter-spacing: -0.04em;
  color: var(--text);
}
.auth-modal-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}
.auth-modal-title {
  font-family: var(--font-display);
  font-size: clamp(18px, 2.4vw, 22px);
  font-weight: 700;
  color: var(--text);
  margin: 0;
  line-height: 1.2;
}
.auth-google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 11px 16px;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.auth-google-btn:hover { border-color: var(--text-muted); }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-dim);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--hairline);
}

#auth-email-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
#auth-email-form input {
  width: 100%;
  padding: 11px 14px;
  background: var(--surface-2);
  border: 1px solid var(--field-line);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s;
  box-sizing: border-box;
}
#auth-email-form input::placeholder { color: var(--text-dim); }
#auth-email-form input:focus { border-color: var(--accent); }

/* "Completa tu contacto" (AEV-95): phone with a fixed +57 prefix, WhatsApp
   notice, consent. Shown once after sign-in, before the portal. */
.contact-step {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}
.contact-step-intro {
  margin: 0 0 12px;
  color: var(--text-muted);
  line-height: 1.5;
}
.auth-field-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}
.auth-phone {
  display: flex;
  align-items: stretch;
  background: var(--surface-2);
  border: 1px solid var(--field-line);
  border-radius: 8px;
  transition: border-color 0.15s;
}
.auth-phone:focus-within { border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: 1px; }
.auth-phone-prefix {
  display: flex;
  align-items: center;
  padding: 0 4px 0 14px;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--text-muted);
}
.auth-phone input {
  flex: 1;
  min-width: 0;
  padding: 12px 14px 12px 6px;
  border: none;
  background: transparent;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px; /* 16px keeps iOS from zooming the page on focus */
  outline: none;
}
.auth-phone input::placeholder { color: var(--text-dim); }
.auth-phone-hint {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 8px;
  line-height: 1.5;
}
.auth-consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
  cursor: pointer;
  margin-bottom: 8px;
}
.auth-consent input {
  width: 18px;
  height: 18px;
  flex: none;
  margin: 2px 0 0;
  accent-color: var(--accent);
}
.auth-consent a { color: var(--text-muted); text-decoration: underline; text-underline-offset: 2px; }
.auth-consent a:hover { color: var(--accent); }
.contact-step .auth-error { font-size: 13px; text-align: left; margin: 0 0 4px; }
.contact-step-signout {
  align-self: center;
  margin-top: 8px;
  padding: 8px 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.contact-step-signout:hover { color: var(--text); }

/* "Registre su empresa" (ARKA-22 A4): same card as the contact step. */
.company-input {
  width: 100%;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--field-line);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px; /* 16px keeps iOS from zooming the page on focus */
  margin-bottom: 8px;
}
.company-input::placeholder { color: var(--text-dim); }
.company-input:focus { border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: 1px; }
.company-roles { border: none; padding: 0; margin: 4px 0 8px; display: flex; flex-direction: column; gap: 2px; }
.company-roles legend { padding: 0; margin-bottom: 8px; }
.company-roles .auth-consent { margin-bottom: 4px; font-size: 14px; color: var(--text); }
.company-percent { display: flex; flex-direction: column; gap: 8px; }
.company-percent[hidden] { display: none; }
/* Staff and investors who land here before Ops gives them a role (A5). */
.company-platform-note {
  margin: 12px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--hairline);
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}
.company-platform-note a { color: var(--text-muted); text-decoration: underline; text-underline-offset: 2px; }
.company-platform-note a:hover { color: var(--accent); }

.auth-submit {
  width: 100%;
  justify-content: center;
  padding: 11px;
  font-size: 14px;
  margin-top: 2px;
}
.auth-toggle {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  margin: 0;
}
.auth-toggle-btn {
  background: none;
  border: none;
  padding: 0;
  margin-left: 4px;
  color: var(--accent);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: underline;
}
.auth-toggle-btn:hover { color: var(--text); }

.auth-legal {
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--text-muted);
  text-align: center;
  margin: 14px 0 0;
}
.auth-legal a {
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.auth-legal a:hover { color: var(--accent); }

.auth-resend-btn {
  display: block;
  background: none;
  border: none;
  padding: 0;
  margin: -8px auto 0;
  color: var(--accent);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: underline;
}
.auth-resend-btn:hover { color: var(--text); }
.auth-resend-btn[hidden] { display: none; }

.auth-verify-notice {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.5;
  margin: 0;
}

.auth-error {
  font-size: 12px;
  color: var(--error-text);
  min-height: 1.4em;
  text-align: center;
  line-height: 1.5;
}

/* Civic palette: slate-teal submit with white text (6.0:1), like the hero CTA */
html[data-palette="civic"] .auth-submit {
  background: #336d5c;
  color: #ffffff;
  border-color: #336d5c;
}
html[data-palette="civic"] .auth-submit:hover {
  background: #073a34;
  border-color: #073a34;
}

/* ── Misc ─────────────────────────────────────────────────────────── */
::selection { background: var(--accent); color: var(--bg); }

/* ── Client dashboard ──────────────────────────────────────────────
   Structure ported from the client dashboard sketch, re-skinned onto
   the site palette. All selectors are `dash-` prefixed so nothing here
   can collide with the marketing pages. Tokens are scoped to .dash-app
   the same way --hero-* is scoped to .hero. */
/* Tokens live on the page wrapper, not .dash-app — the drawer, overlay
   and modal are siblings of .dash-app and must resolve them too. */
.dash-page {
  --dash-panel:         #FBF9F4;
  --dash-panel-alt:     #F7F4EC;
  --dash-line:          #E1DACB;
  /* Brand forest green (ARKA-18). Portal only: the marketing hero keeps
     its navy --hero-bg. Primary buttons and headings reuse it. */
  --dash-sidebar-bg:    #093B36;
  --dash-sidebar-text:  #F4EFE2;
  --dash-sidebar-mute:  rgba(244, 239, 226, 0.62);
  /* Lighter green for the active nav item and primary hover; cream text
     on it is 5.4:1. */
  --dash-brand-accent:  #2F6B5C;
  --dash-heading:       var(--dash-sidebar-bg);
  --dash-accent:        #C9A961;
  /* Gold is a fill colour; as text, icons, borders or focus rings on the
     light panels it falls to ~2:1, so those use this darker shade instead. */
  --dash-accent-text:   #735C22;
  --dash-warn:          #8E3024;
  --dash-radius:        10px;
}
html[data-mode="dark"] .dash-page {
  --dash-panel:     #1F2226;
  --dash-panel-alt: #24282C;
  --dash-line:      rgba(242, 239, 232, 0.12);
  --dash-accent-text: var(--dash-accent);
  --dash-warn:      #EC8B7B;
  /* Green headings would sink into the dark panels. */
  --dash-heading:   var(--text);
}

.dash-app {
  display: grid;
  grid-template-columns: 248px 1fr;
  min-height: 100vh;

}


/* ── Sidebar ───────────────────────────────────────────────────────── */
.dash-sidebar {
  background: var(--dash-sidebar-bg);
  color: var(--dash-sidebar-text);
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.dash-sidebar::after {
  content: "";
  position: absolute;
  right: -60px; bottom: -60px;
  width: 220px; height: 220px;
  background: linear-gradient(135deg, var(--dash-accent) 0%, transparent 70%);
  opacity: 0.16;
  transform: rotate(20deg);
}
.dash-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 44px;
  position: relative;
  z-index: 1;
  color: var(--dash-sidebar-text);
}
.dash-brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 21px;
  letter-spacing: -0.035em;
  line-height: 1;
}
.dash-nav { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 4px; }
.dash-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--dash-sidebar-mute);
  transition: background 150ms ease, color 150ms ease;
}
.dash-nav-item:hover { background: rgba(255, 255, 255, 0.06); color: var(--dash-sidebar-text); }
.dash-nav-item.active { background: var(--dash-brand-accent); color: var(--dash-sidebar-text); font-weight: 600; }
.dash-nav-item:focus-visible,
.dash-brand:focus-visible,
.dash-logout:focus-visible { outline: 2px solid var(--dash-sidebar-text); outline-offset: 2px; }
.dash-nav-icon { width: 18px; height: 18px; flex-shrink: 0; }
.dash-sidebar-foot {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 16px;
  font-size: 13px;
}
.dash-client-name { font-weight: 600; color: var(--dash-sidebar-text); }
.dash-logout {
  display: block;
  margin-top: 6px;
  padding: 0;
  color: var(--dash-sidebar-mute);
  font-size: 12.5px;
  transition: color 150ms ease;
}
.dash-logout:hover { color: var(--dash-sidebar-text); }

/* Company switcher (ARKA-22 C2): only rendered for a person in 2+ companies. */
.dash-company-switch { display: flex; flex-direction: column; gap: 6px; }
.dash-company-label { color: var(--dash-sidebar-mute); font-size: 12px; }
.dash-company-select {
  max-width: 100%;
  padding: 7px 8px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--dash-sidebar-text);
  color-scheme: dark;
  font: inherit;
  font-weight: 600;
}
.dash-company-go {
  align-self: flex-start;
  padding: 0;
  background: none;
  border: none;
  color: var(--dash-sidebar-mute);
  font: inherit;
  font-size: 12.5px;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.dash-company-go:hover { color: var(--dash-sidebar-text); }
.dash-company-select:focus-visible,
.dash-company-go:focus-visible { outline: 2px solid var(--dash-sidebar-text); outline-offset: 2px; }

/* ── Main column ───────────────────────────────────────────────────── */
.dash-main { padding: 36px clamp(20px, 3vw, 44px) 60px; min-width: 0; }
.dash-topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 32px;
}
.dash-greeting {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(22px, 2.6vw, 28px);
  letter-spacing: -0.03em;
  margin: 0;
  color: var(--dash-heading);
}
.dash-greeting-sub { font-size: 13.5px; color: var(--text-muted); margin: 6px 0 0; }
.dash-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: color-mix(in srgb, var(--dash-accent) 20%, transparent);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 100px;
  margin-top: 12px;
}
.dash-status-pill::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--dash-accent);
}
/* "Sin verificar" (ARKA-22 A4): a registered company Arka has not verified yet. */
.dash-status-pill--pending { background: color-mix(in srgb, var(--text-muted) 16%, transparent); }
.dash-status-pill--pending::before { background: var(--text-muted); }
.dash-topbar-right { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.dash-icon-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--dash-panel);
  border: 1px solid var(--dash-line);
  display: flex; align-items: center; justify-content: center;
  color: var(--dash-heading);
}
.dash-icon-btn:hover { border-color: var(--dash-accent-text); }
.dash-icon-btn svg { width: 18px; height: 18px; }
.dash-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--dash-sidebar-bg);
  color: var(--dash-sidebar-text);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600;
}

/* ── KPI cards ─────────────────────────────────────────────────────── */
.dash-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}
.dash-kpi-row--three { grid-template-columns: repeat(3, 1fr); }
/* The client dashboard carries five cards since "Línea disponible" joined
   the row; let them wrap instead of forcing a fixed column count. */
.dash-kpi-row--five { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.dash-kpi {
  background: var(--dash-panel);
  border: 1px solid var(--dash-line);
  border-radius: var(--dash-radius);
  padding: 20px 20px 18px;
}
.dash-kpi-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}
.dash-kpi-value {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 500;
  color: var(--text);
}
.dash-kpi-value-line { display: block; }
/* The currency code of a KPI amount (ARKA-18 §7): smaller, so "USD 1.000.000"
   fits a card at desktop width instead of breaking the figure. */
.dash-kpi-code { font-size: 0.55em; letter-spacing: 0.04em; color: var(--text-muted); }
.dash-kpi--warn .dash-kpi-code { color: inherit; }
/* Five cards leave ~170px per value at 1440px: a step down keeps
   "USD 12.500.000" and "14 sept 2026" on one line. */
.dash-kpi-row--five .dash-kpi-value { font-size: 20px; }
.dash-kpi--warn .dash-kpi-value { color: var(--dash-warn); }
.dash-kpi-foot { font-size: 12px; color: var(--text-muted); margin-top: 6px; }

/* ── Section head ──────────────────────────────────────────────────── */
.dash-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}
.dash-section-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--dash-heading);
}

/* ── Dashboard buttons ─────────────────────────────────────────────── */
.dash-btn {
  border-radius: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}
.dash-btn--primary {
  background: var(--dash-sidebar-bg);
  color: var(--dash-sidebar-text);
  padding: 11px 18px;
  font-size: 13.5px;
}
.dash-btn--primary:hover { background: var(--dash-brand-accent); }
.dash-btn:focus-visible,
.dash-icon-btn:focus-visible,
.dash-row-action:focus-visible,
.dash-drawer-close:focus-visible { outline: 2px solid var(--dash-accent-text); outline-offset: 2px; }
.dash-btn--ghost {
  border: 1px solid var(--dash-line);
  color: var(--text);
  padding: 8px 14px;
  font-size: 12.5px;
}
.dash-btn--ghost:hover { border-color: var(--dash-accent-text); color: var(--dash-accent-text); }
/* A disabled action must not look like one that failed silently (AEV-102):
   faded, no hover feedback, and the cursor says no. The reason is always
   rendered next to it in text, never only in a tooltip. */
.dash-btn[disabled],
.dash-btn[disabled]:hover {
  opacity: 0.45;
  cursor: not-allowed;
}
.dash-btn--primary[disabled]:hover { background: var(--dash-sidebar-bg); }
.dash-btn--ghost[disabled]:hover { border-color: var(--dash-line); color: var(--text); }

/* "Reportar factura" while the company is not Active (ARKA-18 §4): dashed, so
   it reads as "not yet" rather than "broken", with the reason as visible text
   beneath it. */
.dash-report-blocked { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; max-width: 360px; }
.dash-btn--blocked,
.dash-btn--blocked:hover {
  background: transparent;
  color: var(--text);
  border: 1.5px dashed var(--dash-line);
}
.dash-btn--primary.dash-btn--blocked[disabled]:hover { background: transparent; }
.dash-report-blocked-reason { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--text-muted); text-align: right; }
@media (max-width: 640px) {
  .dash-report-blocked { align-items: flex-start; }
  .dash-report-blocked-reason { text-align: left; }
}

/* ── Invoice table ─────────────────────────────────────────────────── */
.dash-table-wrap {
  background: var(--dash-panel);
  border: 1px solid var(--dash-line);
  border-radius: var(--dash-radius);
  overflow-x: auto;
  margin-bottom: 36px;
}
.dash-table { width: 100%; border-collapse: collapse; min-width: 720px; }
.dash-table thead th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 500;
  padding: 14px 18px;
  border-bottom: 1px solid var(--dash-line);
  background: var(--dash-panel-alt);
  white-space: nowrap;
}
.dash-table tbody td {
  padding: 15px 18px;
  font-size: 13.5px;
  border-bottom: 1px solid var(--dash-line);
  vertical-align: middle;
}
.dash-table tbody tr:last-child td { border-bottom: none; }
.dash-table tbody tr { cursor: pointer; transition: background 120ms ease; }
.dash-table tbody tr:hover { background: var(--dash-panel-alt); }
.dash-mono { font-family: var(--font-mono); font-size: 13px; }
.dash-row-action {
  font-size: 12px;
  font-weight: 600;
  color: var(--dash-accent-text);
  padding: 0;
  white-space: nowrap;
}
.dash-row-action:hover { text-decoration: underline; }

/* ── Status badges ─────────────────────────────────────────────────── */
.dash-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 100px;
  white-space: nowrap;
  background: color-mix(in srgb, var(--text) 8%, transparent);
  color: var(--text);
}
.dash-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.dash-badge--pending   { background: color-mix(in srgb, #C08A2E 18%, transparent); color: #6E500E; }
.dash-badge--verified  { background: color-mix(in srgb, var(--dash-accent) 22%, transparent); color: var(--dash-accent-text); }
.dash-badge--disbursed { background: color-mix(in srgb, var(--dash-sidebar-bg) 16%, transparent); color: var(--dash-sidebar-bg); }
.dash-badge--paid      { background: color-mix(in srgb, var(--text) 10%, transparent); color: var(--text-muted); }
.dash-badge--late      { background: color-mix(in srgb, var(--dash-warn) 18%, transparent); color: var(--dash-warn); }
/* No admitida (ARKA-18 §3): red family like --late, but with a × instead of
   the dot, so the state does not rest on colour alone. */
.dash-badge--notadmitted { background: color-mix(in srgb, var(--dash-warn) 18%, transparent); color: var(--dash-warn); }
.dash-badge--notadmitted::before { content: none; }
.dash-badge-icon { font-weight: 700; line-height: 1; }
html[data-mode="dark"] .dash-badge--pending,
html[data-mode="dark"] .dash-badge--role-analyst  { color: #E0B865; }
html[data-mode="dark"] .dash-badge--disbursed,
html[data-mode="dark"] .dash-badge--role-admin    { background: rgba(244, 239, 226, 0.12); color: #9FC0E8; }

/* ── Two-panel grid ────────────────────────────────────────────────── */
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.dash-panel {
  background: var(--dash-panel);
  border: 1px solid var(--dash-line);
  border-radius: var(--dash-radius);
  padding: 22px;
}
.dash-panel-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  color: var(--dash-heading);
}
.dash-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--dash-line);
  font-size: 13.5px;
}
.dash-item:last-of-type { border-bottom: none; }
.dash-item-total { font-weight: 700; }
.dash-check   { color: var(--dash-accent-text); font-weight: 700; }
.dash-missing { color: var(--dash-warn);   font-weight: 700; }
.dash-pending { color: var(--text-muted);  font-weight: 700; }
.dash-panel-cta { margin-top: 14px; }

/* ── Pending debtor confirmations (AEV-28 D3) ──────────────────────── */
.dash-confirm {
  padding: 12px 0;
  border-bottom: 1px solid var(--dash-line);
}
.dash-confirm:last-of-type { border-bottom: none; }
.dash-confirm-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 13.5px;
}
.dash-confirm-name { font-weight: 600; color: var(--text); }
.dash-confirm-meta {
  margin-top: 3px;
  font-size: 12px;
  color: var(--text-muted);
}
.dash-confirm-cta { margin-top: 10px; }
/* A cooldown that has not elapsed is a wait, not a failure -- muted rather
   than the warn colour. */
.dash-confirm-cta[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ── Detail drawer ─────────────────────────────────────────────────── */
.dash-overlay {
  position: fixed; inset: 0;
  background: rgba(11, 37, 69, 0.45);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
  z-index: 40;
}
.dash-overlay.open { opacity: 1; pointer-events: auto; }
.dash-drawer {
  position: fixed;
  top: 0; bottom: 0;
  right: -440px;
  width: min(400px, 100vw);
  background: var(--dash-panel);
  border-left: 1px solid var(--dash-line);
  box-shadow: -8px 0 30px rgba(0, 0, 0, 0.18);
  transition: right 250ms ease;
  z-index: 41;
  padding: 28px 26px;
  overflow-y: auto;
}
.dash-drawer.open { right: 0; }
.dash-drawer-close {
  float: right;
  font-size: 16px;
  color: var(--text-muted);
  padding: 4px;
  line-height: 1;
}
.dash-drawer-close:hover { color: var(--text); }
.dash-drawer-close svg { width: 18px; height: 18px; display: block; }
.dash-drawer-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
  color: var(--dash-heading);
}
.dash-drawer-sub { font-size: 13px; color: var(--text-muted); margin: 0 0 22px; }
.dash-drawer-cta { width: 100%; margin-top: 18px; }
.dash-timeline { margin: 20px 0; }
.dash-t-item { display: flex; gap: 12px; margin-bottom: 18px; }
.dash-t-rail { position: relative; flex-shrink: 0; width: 12px; }
.dash-t-dot {
  display: block;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--dash-accent);
  margin-top: 3px;
  position: relative;
  z-index: 1;
}
.dash-t-dot--pending { background: var(--dash-line); }
.dash-t-line {
  position: absolute;
  left: 5px; top: 16px; bottom: -22px;
  width: 2px;
  background: var(--dash-line);
}
.dash-t-title { font-size: 13.5px; font-weight: 600; color: var(--text); }
.dash-t-title--pending { color: var(--text-muted); font-weight: 500; }
.dash-t-date { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }
.dash-note {
  background: var(--dash-panel-alt);
  border: 1px solid var(--dash-line);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 22px;
  line-height: 1.55;
}
.dash-note b { color: var(--text); }

/* ── New-invoice modal ─────────────────────────────────────────────── */
.dash-modal {
  position: fixed; inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(11, 37, 69, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 50;
}
.dash-modal.open { display: flex; }
.dash-modal-card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  width: 440px;
  max-width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 14px;
  padding: 30px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
}
.dash-modal-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
  color: var(--dash-heading);
}
.dash-modal-sub { font-size: 13px; color: var(--text-muted); margin: 0 0 20px; }
.dash-field { margin-bottom: 14px; }
.dash-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 5px;
}
.dash-field input,
.dash-file {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--field-line);
  border-radius: 7px;
  font-size: 13.5px;
  font-family: var(--font-body);
  background: var(--dash-panel);
  color: var(--text);
}
.dash-field input:focus { outline: 2px solid var(--dash-accent-text); outline-offset: 1px; }
.dash-file {
  color: var(--text-muted);
  cursor: pointer;
  text-align: center;
  border-style: dashed;
}
/* Payments-department address block (AEV-28). `hidden` has to win over the
   block display the surrounding rules would otherwise give these. */
.dash-field[hidden],
.dash-field-err[hidden],
.dash-field-hint[hidden] { display: none; }

.dash-field-hint {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-muted);
}
.dash-field-err {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--dash-warn);
}
.dash-cc-input { margin-top: 8px; }
.dash-link-btn {
  margin-top: 8px;
  padding: 0;
  border: 0;
  background: none;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  color: var(--dash-accent-text);
  cursor: pointer;
}
.dash-link-btn:hover { text-decoration: underline; }

.dash-modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }

/* ── Responsive ────────────────────────────────────────────────────── */
@media (max-width: 1080px) {
  .dash-kpi-row { grid-template-columns: repeat(2, 1fr); }
  .dash-kpi-row--three { grid-template-columns: repeat(2, 1fr); }
  .dash-kpi-row--five { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
}
@media (max-width: 900px) {
  .dash-app { grid-template-columns: 1fr; }
  .dash-sidebar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
  }
  .dash-sidebar .dash-nav { display: none; }
  .dash-brand { margin-bottom: 0; }
  .dash-sidebar-foot { border-top: none; padding-top: 0; text-align: right; }
  .dash-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .dash-kpi-row { grid-template-columns: 1fr; }
  .dash-topbar { flex-direction: column; }
}

/* Empty and onboarding states — real conditions, not errors. */
.dash-empty { color: var(--text-muted); font-size: 13.5px; line-height: 1.55; margin: 0; }
.dash-empty-cell { color: var(--text-muted); text-align: center; padding: 28px 18px !important; }
.dash-onboarding { max-width: 60ch; }
.dash-onboarding p { color: var(--text-muted); font-size: 14px; line-height: 1.6; margin: 0; }

/* Admin forms and flash messages */
.dash-flash { padding: 12px 16px; border-radius: 8px; font-size: 13.5px; margin-bottom: 18px; border: 1px solid var(--dash-line); }
.dash-flash--ok  { background: color-mix(in srgb, var(--dash-accent) 14%, transparent); color: var(--text); }
.dash-flash--err { background: color-mix(in srgb, var(--dash-warn) 14%, transparent); color: var(--text); border-color: var(--dash-warn); }
/* A notice that blocks nothing (ARKA-24 §7.2): neutral, not the error colour. */
.dash-flash--info { background: var(--dash-surface, transparent); color: var(--text); }
/* A link inside a notice must not rest on colour alone (WCAG 1.4.1, AEV-852):
   underlined, in the notice's own text colour, which already meets 4.5:1. */
.dash-flash a { color: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.dash-flash a:hover { text-decoration-thickness: 2px; }
.dash-flash a:focus-visible { outline: 2px solid var(--dash-accent-text); outline-offset: 2px; border-radius: 2px; }
.dash-inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.dash-inline-form select,
.dash-inline-form input,
.dash-stack-form select,
.dash-stack-form input {
  padding: 8px 10px; border: 1px solid var(--field-line); border-radius: 7px;
  background: var(--dash-panel); color: var(--text); font-family: var(--font-body); font-size: 13px;
}
.dash-stack-form { display: flex; flex-direction: column; gap: 4px; }
.dash-stack-form .dash-btn { align-self: flex-start; margin-top: 10px; }
.dash-stack-form input, .dash-stack-form select { width: 100%; }
.dash-hint { display: block; font-size: 11.5px; color: var(--text-muted); margin-top: 4px; }
/* Permission checkboxes on /team (ARKA-24 §4). */
.dash-check-label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; margin-right: 10px; }
.dash-stack-form .dash-check-label input,
.dash-inline-form .dash-check-label input { width: auto; padding: 0; accent-color: var(--dash-accent); }
fieldset.dash-field { border: 0; padding: 0; margin: 8px 0 0; }
fieldset.dash-field legend { font-size: 12.5px; margin-bottom: 6px; }

/* ── Ops tabs ────────────────────────────────────────────────────────────
   One horizontal rail, underline for the active pane. Panes are hidden with
   `display: none` rather than moved off-screen, so a hidden form's required
   fields never block a submit in the pane the operator is actually looking at. */
.dash-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--dash-line);
  margin-bottom: 26px;
  overflow-x: auto;
  scrollbar-width: none;
}
.dash-tabs::-webkit-scrollbar { display: none; }
.dash-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 11px 16px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  transition: color 150ms ease, border-color 150ms ease;
}
.dash-tab:hover { color: var(--text); }
.dash-tab.is-active { color: var(--text); border-bottom-color: var(--dash-accent-text); }
.dash-tab:focus-visible { outline: 2px solid var(--dash-accent-text); outline-offset: -2px; }
.dash-tab-count {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1;
  padding: 3px 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--dash-warn) 20%, transparent);
  color: var(--dash-warn);
}
.dash-tab-pane { display: none; }
.dash-tab-pane.is-active { display: block; }
.dash-tabs-note { margin-top: 28px; }

/* ── Filter bar ──────────────────────────────────────────────────────────── */
.dash-filterbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.dash-filter-field { flex: 1 1 240px; min-width: 0; }
.dash-filter-field--tight { flex: 0 0 auto; }
.dash-filter-field input,
.dash-filter-field select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--field-line);
  border-radius: 8px;
  background: var(--dash-panel);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13.5px;
}
.dash-filter-field input:focus,
.dash-filter-field select:focus { outline: 2px solid var(--dash-accent-text); outline-offset: 1px; }
.dash-filter-count {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-muted);
  white-space: nowrap;
}
.dash-no-match td { border-bottom: none !important; }

/* Visible to a screen reader, not to the eye -- the filter inputs carry their
   own placeholder, but a placeholder is not a label. */
.dash-sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ── Platform-role badges ────────────────────────────────────────────────
   Weight follows authority: admin reads strongest, a revoked account greyest. */
.dash-badge--role-admin    { background: color-mix(in srgb, var(--dash-sidebar-bg) 16%, transparent); color: var(--dash-sidebar-bg); }
.dash-badge--role-approver { background: color-mix(in srgb, var(--dash-accent) 22%, transparent); color: var(--dash-accent-text); }
.dash-badge--role-analyst  { background: color-mix(in srgb, #C08A2E 18%, transparent); color: #6E500E; }
.dash-badge--role-investor { background: color-mix(in srgb, var(--text) 12%, transparent); color: var(--text); }
.dash-badge--role-none     { background: color-mix(in srgb, var(--text) 10%, transparent); color: var(--text-muted); }

/* ── Audit trail ─────────────────────────────────────────────────────────
   A list, not a table: each entry is one sentence about one change, and the
   panel it sits in is too narrow for five columns. */
.dash-audit { list-style: none; margin: 0; padding: 0; }
.dash-audit-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--dash-line);
}
.dash-audit-item:last-child { border-bottom: none; }
.dash-audit-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}
.dash-audit-target { font-size: 13.5px; font-weight: 600; color: var(--text); word-break: break-all; }
.dash-audit-at { font-size: 11.5px; color: var(--text-muted); white-space: nowrap; }
.dash-audit-change {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 5px;
  font-size: 12.5px;
  color: var(--text);
}
.dash-audit-arrow { color: var(--text-muted); }
.dash-audit-actor { font-size: 11.5px; color: var(--text-muted); margin-top: 4px; }

/* Panels that hold a form rather than a summary: a full-width column of inputs
   reads as a wall, so they keep the measure of the fields they contain. */
.dash-panel--narrow { max-width: 520px; }

/* "Acceso denegado" (ARKA-18): one centred panel, no sidebar -- the page is
   shown in place of one the person may not open. */
.dash-denied { min-height: 100vh; display: grid; place-items: center; }
.dash-denied .dash-panel { width: 100%; }
.dash-denied .dash-btn { margin-top: 18px; }
.dash-panel-lede { margin-bottom: 14px !important; }

/* Nav entries for screens that don't exist yet: visibly pending, not clickable,
   so they can't masquerade as broken links. Only the (aria-hidden) icon is
   dimmed: the label already sits at --dash-sidebar-mute, and any opacity on
   it drops below 4.5:1 on the forest sidebar (ARKA-18 AC9.3). */
.dash-nav-item--soon { cursor: default; }
.dash-nav-item--soon .dash-nav-icon { opacity: .5; }
.dash-nav-item--soon:hover { background: none; color: var(--dash-sidebar-mute); }

/* Salir: acción secundaria junto al nombre de la cuenta. Deliberadamente
   discreta — el destino primario es el panel, no cerrar sesión. */
.nav-signout {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 6px 4px;
  margin-left: -6px;
  transition: color 200ms ease;
}
.nav-signout:hover { color: var(--text); text-decoration: underline; }

/* ── Ops invoice detail (AEV-28) ──────────────────────────────────────
   Two timelines side by side: the invoice's own status history and the
   debtor's confirmation history. Reuses .dash-timeline wholesale -- the
   rail, dot and line rules are identical, and only the extra detail line
   under each entry is new here. */
.dash-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
/* Back to the queue: a breadcrumb, so it sits above the heading and stays
   quieter than it. */
.dash-back {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.dash-back:hover { color: var(--text); }
.dash-detail-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 6px;
}
/* The note, address or motive belonging to a timeline entry. Wraps rather
   than truncates: a rejection reason is the whole point of the row. */
.dash-t-detail {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
  word-break: break-word;
}
.dash-t-detail--quote {
  color: var(--text);
  border-left: 2px solid var(--dash-line);
  padding-left: 8px;
  margin-top: 5px;
  line-height: 1.5;
}
.dash-t-dot--warn { background: var(--dash-warn); }

/* The reopen form, set off from the timeline above it: it is an action on the
   history, not another entry in it. */
.dash-reopen {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--dash-line);
}
.dash-reopen-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--dash-heading);
  margin: 0 0 6px;
}

/* Why verification/disbursement is blocked (AEV-102). Above the timelines,
   in the warning colour, because it is the first thing Ops must act on. */
.dash-gate {
  border-color: var(--dash-warn);
  margin-bottom: 18px;
}
.dash-gate-facts {
  margin: 10px 0 14px;
  font-size: 13.5px;
  line-height: 1.6;
}

/* One column below the point where two timelines stop fitting side by side. */
@media (max-width: 900px) {
  .dash-detail-grid { grid-template-columns: 1fr; }
}

/* Company review (/ops/companies/{id}, ARKA-24 B3). */
.dash-gate-facts li { margin-left: 18px; }
.dash-blocker-list {
  margin: 0;
  padding-left: 16px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--dash-warn);
}
.dash-legal-grid {
  border: 0;
  padding: 0;
  margin: 0 0 8px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0 16px;
}
.dash-person { padding: 14px 0; border-top: 1px solid var(--dash-line, rgba(0,0,0,0.08)); }
.dash-person:first-of-type { border-top: 0; }
.dash-person-name { margin: 0 0 4px; font-size: 15px; }
.dash-signer { margin-top: 10px; }
/* ARKA-21 T2: the face capture, for the verification team only. */
.dash-face { margin-top: 12px; padding: 12px 14px; border: 1px solid var(--hairline); border-radius: 10px; }
.dash-face-title { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--dash-heading); }
.dash-face-facts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 6px 16px;
  margin: 0 0 10px;
}
.dash-face-facts dt { font-size: 11.5px; color: var(--text-muted); }
.dash-face-facts dd { margin: 0; font-size: 13px; }
.dash-face-access { margin-top: 8px; font-size: 13px; }
.dash-face-access summary { cursor: pointer; }
.dash-face-access ul { margin: 6px 0 0; padding-left: 18px; }
.dash-face-player { border: 0; padding: 0; background: transparent; max-width: calc(100% - 32px); }
.dash-face-player::backdrop {
  background: rgba(11, 37, 69, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.dash-face-player .dash-modal-card { width: 680px; }
.dash-face-player video,
.dash-face-player img { display: block; width: 100%; max-height: 60vh; object-fit: contain; background: #000; border-radius: 8px; }
.dash-face-player [hidden] { display: none; }

/* What the client and the people typed (AEV-970): read only, one grid per step. */
.dash-typed { margin: 8px 0 12px; }
.dash-typed > summary { cursor: pointer; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.dash-typed-step { margin: 10px 0 14px; }
.dash-typed-title { margin: 0 0 8px; font-size: 13px; font-weight: 600; }
.dash-facts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px 18px;
  margin: 0;
}
.dash-facts div { margin: 0; min-width: 0; }
.dash-facts dt { font-size: 11.5px; color: var(--text-muted); margin-bottom: 2px; }
.dash-facts dd { margin: 0; font-size: 13.5px; overflow-wrap: anywhere; }
.dash-typed-warn { color: var(--dash-warn); }
[data-company-review] .dash-panel { margin-bottom: 18px; }

/* ── Debtor confirmation portal (AEV-28) ──────────────────────────────
   A single-purpose public page for someone who has no account and will
   never see another screen of the product. It borrows the dashboard's
   --dash-* tokens (the body carries .dash-page for exactly that) and the
   .dash-modal / .dash-field / .dash-btn rules, so the confirm and reject
   dialogs look like the rest of the product without this block having to
   restate them. Everything specific to the portal is .portal- prefixed. */
.portal-page {
  background: var(--dash-panel-alt);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.portal-shell {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px;
}
.portal-main { flex: 1; padding: 34px 0 56px; }

.portal-topbar {
  background: var(--dash-sidebar-bg);
  color: var(--dash-sidebar-text);
  padding: 16px 0;
}
.portal-topbar .portal-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.portal-logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--dash-sidebar-text);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
}
.portal-topbar-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--dash-sidebar-mute);
  text-align: right;
}

.portal-card {
  background: var(--surface);
  border: 1px solid var(--dash-line);
  border-radius: 14px;
  padding: 34px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
}
.portal-card--centered { text-align: center; padding: 52px 34px; }
.portal-card h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 25px;
  line-height: 1.24;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  color: var(--dash-heading);
}
.portal-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--dash-accent-text);
  margin: 0 0 10px;
}
.portal-lede {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0 0 20px;
}
.portal-card--centered .portal-lede { margin-bottom: 14px; }
.portal-note { font-size: 13px; color: var(--text-dim); margin: 0; }
.portal-h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 26px 0 10px;
}

/* The outcome badge on the thank-you and dead-link screens. */
.portal-mark {
  width: 46px;
  height: 46px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
}
.portal-mark--ok { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); }
.portal-mark--stop { background: color-mix(in srgb, var(--dash-warn) 14%, transparent); color: var(--dash-warn); }

.portal-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px 22px;
  margin: 0;
  padding: 18px 0 0;
  border-top: 1px solid var(--dash-line);
}
.portal-facts div { margin: 0; }
.portal-facts dt {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 3px;
}
.portal-facts dd { margin: 0; font-size: 14.5px; color: var(--text); }

/* Horizontal scroll rather than a reflowed card list: the debtor is matching
   these rows against their own ledger, and a table stays comparable. */
.portal-table-wrap { overflow-x: auto; }
.portal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.portal-table th,
.portal-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--dash-line);
  white-space: nowrap;
}
.portal-table thead th {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: var(--dash-panel);
}
.portal-table tfoot th,
.portal-table tfoot td {
  font-weight: 700;
  color: var(--text);
  border-bottom: 0;
}
.portal-num { text-align: right; }
.portal-table .portal-num { text-align: right; }
.portal-mono { font-family: var(--font-mono); }

.portal-legal {
  margin-top: 22px;
  padding: 16px 18px;
  background: var(--dash-panel);
  border: 1px solid var(--dash-line);
  border-radius: 10px;
}
.portal-legal p {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted);
}
.portal-legal p:last-child { margin-bottom: 0; }

.portal-alert {
  margin: 18px 0 0;
  padding: 11px 14px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--dash-warn) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--dash-warn) 35%, transparent);
  color: var(--dash-warn);
  font-size: 13px;
}

.portal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 26px;
}
.portal-btn-reject:hover { border-color: var(--dash-warn); color: var(--dash-warn); }

/* The modals carry a select and a textarea; .dash-field only styles inputs. */
.dash-field select,
.dash-field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--field-line);
  border-radius: 7px;
  font-size: 13.5px;
  font-family: var(--font-body);
  background: var(--dash-panel);
  color: var(--text);
}
.dash-field textarea { resize: vertical; min-height: 68px; }
.dash-field input::placeholder,
.dash-field textarea::placeholder,
.dash-stack-form input::placeholder { color: var(--text-dim); }
.dash-field select:focus,
.dash-field textarea:focus { outline: 2px solid var(--dash-accent-text); outline-offset: 1px; }

.portal-footer {
  /* Not the site footer's obsidian band: this footer sits on the page bg. */
  background: none;
  border-top: 1px solid var(--dash-line);
  padding: 22px 0 30px;
}
.portal-footer p {
  margin: 0 0 8px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-dim);
}
.portal-footer a { color: var(--text-muted); }
.portal-footer-legal { margin-bottom: 0; }

@media (max-width: 640px) {
  .portal-card { padding: 24px 18px; }
  .portal-card--centered { padding: 40px 18px; }
  .portal-card h1 { font-size: 21px; }
  .portal-topbar .portal-shell { flex-direction: column; align-items: flex-start; gap: 6px; }
  .portal-topbar-tag { text-align: left; }
  .portal-actions { flex-direction: column-reverse; }
  .portal-actions .dash-btn { width: 100%; }
}

/* ── Shareholder KYC portal (/kyc, ARKA-24 §3.4) ───────────────────── */
.kyc-requirements {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 20px;
  text-align: left;
}
.kyc-requirements td {
  padding: 10px 0;
  border-bottom: 1px solid var(--hairline);
}
.kyc-requirements td + td {
  text-align: right;
  color: var(--text-muted);
}
/* One card per company the person holds shares in. */
.kyc-wrap { flex-direction: column; align-items: center; gap: 24px; }
.kyc-start { margin: 0 0 12px; display: inline-flex; min-height: 44px; align-items: center; }
.kyc-back { font-size: 13.5px; color: var(--text-muted); }

/* ── A person's KYC form (/kyc/{person}/{step}, ARKA-23, AEV-799) ──────
   Phone first (RT8): one column up to 480px, touch targets ≥ 44px, after the
   client's reference screens -- green header, progress bar, five step chips,
   one card per step, wide buttons. */
.kyc-page { background: var(--bg); color: var(--text); min-height: 100vh; margin: 0; font-family: var(--font-body); }
.kyc-shell { max-width: 480px; margin: 0 auto; padding: 0 18px; box-sizing: border-box; }
.kyc-page .sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.kyc-hero { background: var(--dash-sidebar-bg); color: var(--dash-sidebar-text); padding: 18px 0 22px; }
.kyc-logo {
  display: inline-flex; align-items: center; gap: 8px; color: var(--dash-sidebar-text);
  font-family: var(--font-display); font-weight: 800; font-size: 18px; text-decoration: none; min-height: 44px;
}
.kyc-hero-from, .kyc-hero-roles { margin: 6px 0 0; font-size: 12.5px; color: var(--dash-sidebar-mute); }
.kyc-hero-roles { color: var(--dash-sidebar-text); }
.kyc-hero-title { margin: 4px 0 0; font-family: var(--font-serif); font-weight: 400; font-size: 30px; line-height: 1.15; color: var(--dash-sidebar-text); }
.kyc-hero-title em { font-family: var(--font-serif); font-style: italic; }
.kyc-main { padding-top: 18px; padding-bottom: calc(32px + env(safe-area-inset-bottom)); }
.kyc-progress-text { display: flex; justify-content: space-between; gap: 12px; margin: 0 0 8px; font-size: 12.5px; font-weight: 600; }
.kyc-progress-bar { height: 4px; border-radius: 2px; background: var(--dash-line); overflow: hidden; }
.kyc-progress-bar > span { display: block; height: 100%; background: var(--dash-sidebar-bg); }
.kyc-steps ol { list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 10px 0 16px; padding: 0; }
.kyc-chip > a, .kyc-chip > button, .kyc-chip > span {
  display: flex; align-items: center; justify-content: center; width: 100%; min-height: 44px;
  border: 0; border-radius: 8px; font: 600 14px var(--font-body); text-decoration: none;
  background: color-mix(in srgb, var(--text) 8%, transparent); color: var(--text-muted);
}
.kyc-chip > button { cursor: pointer; }
.kyc-chip--done > a, .kyc-chip--done > button, .kyc-chip--done > span { background: var(--dash-brand-accent); color: var(--dash-sidebar-text); }
.kyc-chip--current > span { background: var(--dash-sidebar-bg); color: var(--dash-sidebar-text); }
.kyc-chip--error > a, .kyc-chip--error > button { background: color-mix(in srgb, var(--dash-warn) 18%, transparent); color: var(--dash-warn); }
.kyc-chip--na > span { opacity: 0.6; }
.kyc-chip > a:focus-visible, .kyc-chip > button:focus-visible { outline: 2px solid var(--dash-accent-text); outline-offset: 2px; }
.kyc-card { background: var(--dash-panel); border: 1px solid var(--dash-line); border-radius: 14px; padding: 20px 18px; margin-bottom: 16px; }
.kyc-card-title { margin: 0 0 6px; font-family: var(--font-serif); font-weight: 400; font-size: 22px; color: var(--dash-heading); }
.kyc-card-lede { margin: 0 0 16px; font-size: 13px; color: var(--text-muted); }
.kyc-subtitle { margin: 18px 0 10px; padding-top: 14px; border-top: 1px solid var(--dash-line); font-size: 14px; font-weight: 700; color: var(--dash-heading); }
.kyc-field input, .kyc-field select, .kyc-field textarea {
  width: 100%; box-sizing: border-box; min-height: 44px; padding: 10px 12px; border: 1px solid var(--field-line);
  border-radius: 8px; font: 15px var(--font-body); background: var(--dash-panel); color: var(--text);
}
.kyc-field textarea { resize: vertical; }
.kyc-field select:focus, .kyc-field textarea:focus { outline: 2px solid var(--dash-accent-text); outline-offset: 1px; }
.kyc-field [aria-invalid="true"] { border-color: var(--dash-warn); }
.kyc-field input:disabled, .kyc-field select:disabled { background: color-mix(in srgb, var(--text) 6%, var(--dash-panel)); color: var(--text); }
.kyc-locked { position: relative; }
.kyc-locked input { padding-right: 40px; }
.kyc-lock { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 14px; }
.kyc-share { display: flex; align-items: center; gap: 8px; }
.kyc-share input { max-width: 120px; }
.kyc-question { border: 1px solid var(--dash-line); border-radius: 10px; padding: 12px 14px; margin: 0 0 12px; }
.kyc-question legend { float: left; width: 100%; padding: 0; font-size: 13.5px; font-weight: 600; line-height: 1.4; }
.kyc-question[aria-invalid="true"] { border-color: var(--dash-warn); }
.kyc-yesno { clear: both; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding-top: 10px; }
.kyc-yesno label {
  display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px;
  border: 1px solid var(--field-line); border-radius: 8px; cursor: pointer; font-size: 14px;
}
.kyc-yesno label:has(input:checked) { border-color: var(--dash-sidebar-bg); background: color-mix(in srgb, var(--dash-sidebar-bg) 8%, transparent); }
.kyc-yesno label:focus-within { outline: 2px solid var(--dash-accent-text); outline-offset: 2px; }
.kyc-pep-details[hidden], [data-kyc-pep-relationship][hidden] { display: none; }
.kyc-docs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.kyc-doc { display: flex; justify-content: space-between; align-items: center; gap: 12px; border: 1px solid var(--dash-line); border-radius: 10px; padding: 12px 14px; }
.kyc-doc-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kyc-doc-name { font-size: 13.5px; font-weight: 600; }
.kyc-doc-hint { font-size: 12px; color: var(--text-muted); }
.kyc-doc-action { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.kyc-doc-action .dash-badge[hidden] { display: none; }
.kyc-upload {
  position: relative; display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 64px;
  padding: 0 14px; border: 1.5px solid var(--dash-sidebar-bg); border-radius: 8px; color: var(--dash-sidebar-bg);
  font-weight: 700; font-size: 13.5px; cursor: pointer;
}
.kyc-upload input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.kyc-upload:focus-within { outline: 2px solid var(--dash-accent-text); outline-offset: 2px; }
.kyc-summary { list-style: none; margin: 0; padding: 0; }
.kyc-summary li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--dash-line); font-size: 13.5px; }
.kyc-actions { display: flex; flex-direction: column; gap: 10px; }
.kyc-actions .dash-btn { width: 100%; min-height: 48px; justify-content: center; text-align: center; font-size: 15px; }
.kyc-link-btn {
  min-height: 44px; border: 0; background: none; color: var(--text-muted); font: 600 13.5px var(--font-body);
  text-decoration: underline; cursor: pointer;
}
.kyc-footnote { margin: 14px 0 0; text-align: center; font-size: 12px; color: var(--text-muted); }
html[data-mode="dark"] .kyc-hero-title em { color: var(--dash-accent); }

/* KYC step 5 (AEV-800): the face panel, the consent and the capture screen
   of the client's reference (Plane 26653c99). */
.kyc-summary a { color: inherit; }
.kyc-face-panel {
  background: var(--dash-sidebar-bg); color: var(--dash-sidebar-text); border-radius: 12px;
  padding: 16px; margin: 0 0 14px;
}
.kyc-face-icon {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 8px;
  background: var(--dash-brand-accent); color: var(--dash-sidebar-text);
}
.kyc-face-title { margin: 12px 0 6px; font-size: 15px; font-weight: 700; color: var(--dash-sidebar-text); }
.kyc-face-text, .kyc-face-reject { margin: 0 0 14px; font-size: 13.5px; line-height: 1.5; color: var(--dash-sidebar-mute); }
.kyc-face-reject { color: var(--dash-sidebar-text); font-weight: 600; }
.kyc-face-err { color: var(--dash-sidebar-text); }
/* The status badge sits on the dark panel: light chip, dark text. */
.kyc-face-panel .dash-badge { background: var(--dash-panel); color: var(--dash-heading); }
.kyc-face-btn {
  width: 100%; min-height: 48px; justify-content: center; font-size: 15px; font-weight: 700;
  background: var(--dash-panel); color: var(--dash-heading); border: 0;
}
.kyc-face-btn--ghost { background: transparent; color: var(--dash-sidebar-text); border: 1px solid currentColor; }
.kyc-face-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.kyc-face-btn:focus-visible { outline: 2px solid var(--dash-sidebar-text); outline-offset: 2px; }
.kyc-sworn {
  display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--dash-line); border-radius: 10px;
  padding: 12px 14px; font-size: 13.5px; line-height: 1.5; cursor: pointer;
}
.kyc-sworn input { width: 20px; height: 20px; margin: 1px 0 0; flex-shrink: 0; }
.kyc-sworn:focus-within { outline: 2px solid var(--dash-accent-text); outline-offset: 2px; }
body.kyc-modal-open { overflow: hidden; }
.kyc-consent, .kyc-capture { position: fixed; inset: 0; z-index: 50; overflow-y: auto; }
.kyc-consent[hidden], .kyc-capture[hidden], .kyc-capture-prompt[hidden] { display: none; }
.kyc-consent { background: color-mix(in srgb, #000 55%, transparent); display: flex; align-items: flex-end; justify-content: center; }
.kyc-consent-box {
  background: var(--dash-panel); color: var(--text); width: 100%; max-width: 480px; box-sizing: border-box;
  border-radius: 14px 14px 0 0; padding: 20px 18px calc(20px + env(safe-area-inset-bottom));
}
.kyc-consent-box p { font-size: 13.5px; line-height: 1.55; }
.kyc-consent-box .kyc-sworn { margin: 0 0 14px; }
.kyc-capture { background: var(--dash-sidebar-bg); color: var(--dash-sidebar-text); }
.kyc-capture-shell {
  max-width: 480px; margin: 0 auto; padding: 18px 20px calc(20px + env(safe-area-inset-bottom)); box-sizing: border-box;
}
.kyc-capture-head { display: flex; justify-content: space-between; align-items: center; margin: 0; font-size: 13px; font-weight: 700; }
.kyc-capture-brand { font-family: var(--font-display); font-weight: 800; font-size: 18px; }
.kyc-capture-title { margin: 10px 0 6px; font-family: var(--font-serif); font-weight: 400; font-size: 30px; color: var(--dash-sidebar-text); }
.kyc-capture-title em { font-family: var(--font-serif); font-style: italic; }
.kyc-capture-lede, .kyc-capture-note, .kyc-capture-status { font-size: 13.5px; line-height: 1.5; color: var(--dash-sidebar-mute); }
.kyc-capture-lede { margin: 0 0 16px; }
.kyc-capture-stage {
  position: relative; aspect-ratio: 3 / 4; max-height: 52vh; margin: 0 auto 16px; border-radius: 18px; overflow: hidden;
  background: color-mix(in srgb, #000 30%, var(--dash-sidebar-bg));
}
/* Mirrored like a mirror; the still and the video are not. */
.kyc-capture-stage video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.kyc-oval { position: absolute; inset: 6% 12% 16%; width: 76%; height: 78%; }
.kyc-oval ellipse { fill: none; stroke-width: 3; }
.kyc-oval-track { stroke: color-mix(in srgb, var(--dash-sidebar-text) 55%, transparent); stroke-dasharray: 6 6; }
.kyc-oval-progress { stroke: var(--dash-sidebar-text); stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset 0.6s ease; }
.kyc-capture-prompt {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); margin: 0; padding: 8px 14px;
  border-radius: 999px; background: var(--dash-panel); color: var(--dash-heading); font-size: 14px; font-weight: 700;
  white-space: nowrap;
}
.kyc-moves { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.kyc-moves li { display: flex; align-items: center; gap: 12px; color: var(--dash-sidebar-mute); }
.kyc-moves li::before {
  content: ""; width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; flex-shrink: 0;
  box-sizing: border-box;
}
.kyc-moves li.is-current { color: var(--dash-sidebar-text); font-weight: 700; }
.kyc-moves li.is-done { color: var(--dash-sidebar-text); }
.kyc-moves li.is-done::before {
  content: "✓"; background: var(--dash-brand-accent); border-color: var(--dash-brand-accent);
  font-size: 11px; line-height: 14px; text-align: center; color: var(--dash-sidebar-text);
}
.kyc-capture-status { min-height: 1.5em; margin: 8px 0 0; color: var(--dash-sidebar-text); }
.kyc-capture-note { text-align: center; font-size: 12.5px; }
.kyc-capture-actions { display: flex; flex-direction: column; gap: 10px; }

/* ARKA-21 (AEV-803): help, the camera-denied path and «Continuar en el
   teléfono». Help opens over the capture screen, so it sits above it. */
.kyc-face-panel .kyc-face-btn + .kyc-face-btn { margin-top: 10px; }
.kyc-capture-actions .kyc-face-btn[hidden], .kyc-denied[hidden], .kyc-help[hidden], .kyc-handoff[hidden],
.kyc-handoff [hidden] { display: none; }
.kyc-help, .kyc-handoff { z-index: 60; }
.kyc-help-tips { margin: 0 0 14px; padding-left: 20px; font-size: 13.5px; line-height: 1.55; }
.kyc-help-tips li + li { margin-top: 6px; }
.kyc-help-contact { overflow-wrap: anywhere; }
.kyc-help-contact a, .kyc-handoff-link a { color: var(--dash-heading); font-weight: 600; text-decoration: underline; }
.kyc-denied {
  margin: 8px 0 12px; padding: 14px; border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--dash-sidebar-text) 40%, transparent);
}
.kyc-denied-title { margin: 0 0 8px; font-size: 14.5px; font-weight: 700; color: var(--dash-sidebar-text); }
.kyc-denied-steps { margin: 0 0 12px; padding-left: 20px; font-size: 13.5px; line-height: 1.5; color: var(--dash-sidebar-text); }
.kyc-denied-steps li + li { margin-top: 6px; }
.kyc-handoff-qr { display: flex; justify-content: center; margin: 4px 0 12px; min-height: 0; }
.kyc-handoff-qr svg { width: 220px; height: 220px; max-width: 70vw; max-height: 70vw; }
.kyc-handoff-link { font-size: 12.5px; overflow-wrap: anywhere; }
.kyc-handoff-status { min-height: 1.5em; font-weight: 600; }

/* ── Company verification wizard (ARKA-20, AEV-813) ─────────────────── */
/* The table's hidden labels are absolute: without a positioned wrapper they
   escape its overflow box and widen the whole page on a phone. */
.kyb .dash-table-wrap { position: relative; }
.kyb .dash-table-wrap:focus-visible { outline: 2px solid var(--dash-accent-text); outline-offset: 2px; }
.kyb .sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
/* Step bar, shared with ARKA-23's steps: each step says done / pending /
   with errors (AEV-797, spec AEV-727 RT1); the current one stands out. */
.kyb-steps ol {
  display: flex; gap: 8px; list-style: none; margin: 0 0 18px; padding: 0;
  overflow-x: auto;
}
.kyb-step { flex: 1 1 0; min-width: 120px; }
.kyb-step > a,
.kyb-step > span {
  display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 8px; min-height: 44px;
  padding: 8px 10px; border-top: 3px solid var(--dash-line);
  font-size: 12.5px; color: var(--text-muted); text-decoration: none;
}
.kyb-step-num {
  display: inline-grid; place-items: center; flex-shrink: 0;
  width: 24px; height: 24px; border-radius: 50%;
  border: 1px solid var(--dash-line); font-weight: 700; font-size: 12px;
  grid-row: span 2;
}
.kyb-step-status { font-size: 11.5px; font-weight: 500; }
.kyb-step--done > a,
.kyb-step--done > span { border-top-color: var(--dash-accent); color: var(--text); }
.kyb-step--done .kyb-step-num { background: var(--dash-accent); border-color: var(--dash-accent); color: var(--dash-sidebar-bg); }
.kyb-step--errors > a,
.kyb-step--errors > span { border-top-color: var(--dash-warn); }
.kyb-step--errors .kyb-step-num { border-color: var(--dash-warn); color: var(--dash-warn); }
.kyb-step--errors .kyb-step-status { color: var(--dash-warn); font-weight: 700; }
.kyb-step--current > span { border-top-color: var(--dash-sidebar-bg); color: var(--dash-heading); font-weight: 700; }
.kyb-step--current .kyb-step-num { background: var(--dash-sidebar-bg); border-color: var(--dash-sidebar-bg); color: #fff; }
.kyb-step > a:hover .kyb-step-label { text-decoration: underline; }

.kyb-issues {
  border: 1px solid var(--dash-warn);
  background: color-mix(in srgb, var(--dash-warn) 8%, transparent);
  border-radius: var(--dash-radius);
  padding: 14px 18px; margin-bottom: 16px; font-size: 13.5px;
}
.kyb-issues-title { margin: 0 0 6px; font-size: 14px; font-weight: 800; color: var(--dash-warn); }
.kyb-issues ul,
.kyb-error-list { margin: 0; padding-left: 18px; }

.kyb-fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.kyb-card { margin-bottom: 16px; }
.kyb-subtitle { font-size: 13px; font-weight: 700; margin: 6px 0 12px; color: var(--dash-heading); }
.kyb-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 16px; }
.kyb-grid .kyb-wide { grid-column: span 2; }
.kyb .dash-field select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--field-line); border-radius: 7px;
  font-size: 13.5px; font-family: var(--font-body); background: var(--dash-panel); color: var(--text);
}
.kyb .dash-field input[aria-invalid="true"],
.kyb-parties input[aria-invalid="true"] { border-color: var(--dash-warn); }

/* Step 2's credit clients and step 4's locked holder (AEV-797). */
.kyb-card > .dash-field-hint + .kyb-grid,
.kyb-card > .dash-field-hint + .kyb-clients { margin-top: 12px; }
.kyb-client { border: 0; margin: 0 0 4px; padding: 0; min-width: 0; }
.kyb-client-legend { padding: 0; margin: 0 0 6px; font-size: 12.5px; font-weight: 700; color: var(--dash-heading); }
.kyb-locked-input { position: relative; }
.kyb-locked-input input { padding-left: 34px; }
.kyb-lock { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; }
.kyb-docs { list-style: none; margin: 12px 0 0; padding: 0; }
.kyb-doc { padding: 12px 0; border-bottom: 1px solid var(--dash-line); }
.kyb-doc:last-child { border-bottom: none; }
.kyb-doc-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; font-size: 13.5px; }
.kyb-doc-name { font-weight: 600; }
.kyb-upload { position: relative; margin-top: 8px; min-height: 44px; display: inline-flex; align-items: center; cursor: pointer; }
.kyb-upload input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.kyb-upload:focus-within { outline: 2px solid var(--dash-accent-text); outline-offset: 2px; }

.kyb-parties input,
.kyb-parties select {
  width: 100%; min-width: 110px; padding: 8px 9px; border: 1px solid var(--field-line); border-radius: 6px;
  font-size: 13px; font-family: var(--font-body); background: var(--dash-panel); color: var(--text);
}
.kyb-parties input.kyb-share { min-width: 70px; max-width: 90px; }
.kyb-parties input[type="checkbox"] { width: auto; min-width: 0; padding: 0; accent-color: var(--dash-accent); }
.kyb-parties input:disabled { opacity: 0.5; }
.kyb-roles { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; min-width: 190px; }
.kyb-roles .dash-check-label { white-space: nowrap; margin-right: 0; }
.kyb-roles .dash-check-label[hidden] { display: none; }
.kyb-parties td { vertical-align: top; }
/* The table fits the main column at desktop widths (1280 px and up,
   AEV-1000), the face check column in view without scrolling sideways:
   the cédula or RIF sits under its type and the email under the name, the
   cells are tighter and the headers and role labels wrap. */
.kyb-parties thead th { padding: 10px 8px; white-space: normal; }
.kyb-parties tbody td { padding: 10px 8px; }
.kyb-parties thead th:first-child,
.kyb-parties tbody td:first-child { padding-left: 14px; }
.kyb-parties thead th:last-child,
.kyb-parties tbody td:last-child { padding-right: 14px; }
.kyb-th-sub { white-space: nowrap; }
.kyb-party-under { margin-top: 6px; }
/* A company shareholder's optional documents, under its row (AEV-972). */
.kyb-holding[hidden], .kyb-holding .dash-badge[hidden] { display: none; }
.kyb-holding .kyb-doc { padding: 6px 0; }
.kyb-parties input[name$=".Name"],
.kyb-parties input[type="email"] { min-width: 170px; }
.kyb-parties input[name$=".IdOrRif"] { min-width: 120px; }
.kyb-parties .kyb-roles { min-width: 140px; }
.kyb-parties .kyb-roles .dash-check-label { white-space: normal; align-items: flex-start; font-size: 12.5px; }
.kyb-parties .kyb-roles input[type="checkbox"] { margin-top: 2px; }
.kyb-parties-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.kyb-counter { margin: 0; font-size: 13.5px; display: flex; gap: 8px; align-items: center; }

/* Step 5 (AEV-798): the four declarations and the summary of steps 1-4 and people. */
.kyb-declarations { display: flex; flex-direction: column; gap: 10px; margin: 14px 0 18px; }
.kyb-declaration {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; min-height: 44px;
  border: 1px solid var(--dash-line); border-radius: 10px; background: var(--dash-panel); font-size: 13.5px;
}
.kyb-declaration input[type="checkbox"] { width: 18px; height: 18px; margin: 1px 0 0; flex: none; accent-color: var(--dash-accent); }
.kyb-declaration label { cursor: pointer; }
.kyb-declaration-links a { color: var(--dash-accent-text); }
.kyb-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.kyb-summary-card { border: 1px solid var(--dash-line); border-radius: 10px; padding: 14px 16px; background: var(--dash-panel); }
.kyb-summary-card .kyb-subtitle { margin-top: 0; }
.kyb-summary-list { list-style: none; margin: 0 0 8px; padding: 0; }
.kyb-summary-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 6px 0; font-size: 13.5px; }
.kyb-summary-list a { color: var(--text); }
.kyb-summary-meta { color: var(--text-muted); }
.kyb-summary-list a.kyb-own-kyc { display: flex; align-items: center; min-height: 24px; margin-top: 2px; font-weight: 500; text-decoration: underline; text-underline-offset: 2px; }

.kyb-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin: 4px 0 24px; }
.kyb-actions .dash-btn { min-height: 44px; }

/* «Verificación» module status view (ARKA-19 T5, AEV-852). */
.verification-summary { margin-bottom: 16px; }
.verification-seal-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.verification-seal-row .dash-panel-title { margin: 0; }
.verification-state { margin: 10px 0 0; font-size: 13.5px; line-height: 1.5; }
.verification-cta,
.verification-doc-action { display: inline-flex; align-items: center; min-height: 44px; margin-top: 12px; text-decoration: none; }
.verification-doc-step { margin: 4px 0 0; }

@media (max-width: 640px) {
  .verification-cta,
  .verification-doc-action { width: 100%; justify-content: center; }
  .kyb-doc-head { flex-wrap: wrap; }
}

@media (max-width: 720px) {
  .kyb-grid { grid-template-columns: 1fr; }
  .kyb-grid .kyb-wide { grid-column: auto; }
  .kyb-summary { grid-template-columns: 1fr; }
  .kyb-actions { justify-content: stretch; }
  .kyb-actions .dash-btn { flex: 1 1 100%; text-align: center; }
}
