/*
 * Qertia — sistema visual (manual de identidad, docs/branding/)
 * Petróleo #0D3B44 · Oliva #7E9A1A · Marfil #FAF9F0 · Pizarra #3B5257
 * Plus Jakarta Sans (UI/títulos) · JetBrains Mono (kickers/metadatos)
 */
@layer reset, tokens, base, layout, components, utilities;

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/assets/plus-jakarta-sans-latin-wght-normal-d2ff26bc.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/jetbrains-mono-latin-wght-normal-7c88d0cc.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  * { margin: 0; }
  img, svg { display: block; max-width: 100%; }
  input, button, textarea, select { font: inherit; color: inherit; }
  p, h1, h2, h3, h4 { overflow-wrap: break-word; }
}

@layer tokens {
  :root {
    --petrol: #0D3B44;
    --petrol-dark: #0B353F;
    --olive: #7E9A1A;
    --olive-hover: #6E8815;
    --ivory: #FAF9F0;
    --ivory-dark: #F2F0E2;
    --slate: #3B5257;
    --ink: #24393F;
    --border: #DFDCCB;
    --white: #FFFFFF;
    --danger: #A4322A;
    --danger-bg: #FBEDEB;
    --warning: #8A5A00;
    --warning-bg: #FBF3DF;
    --success-bg: #EEF3DC;
    --info-bg: #E6EEF0;

    --font-sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

    --radius: 10px;
    --radius-sm: 6px;
    --shadow: 0 1px 2px rgb(13 59 68 / .06), 0 4px 16px rgb(13 59 68 / .06);
    --max: 72rem;
    --grid-line: rgb(13 59 68 / .045);
  }
}

@layer base {
  html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
  body {
    font-family: var(--font-sans);
    color: var(--petrol);
    background-color: var(--ivory);
    background-image:
      linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
      linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
    background-size: 32px 32px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
  }
  h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -0.015em; font-weight: 800; }
  h1 { font-size: clamp(1.6rem, 2.5vw, 2.1rem); }
  h2 { font-size: 1.25rem; }
  h3 { font-size: 1.05rem; font-weight: 700; }
  p { color: var(--slate); }
  a { color: var(--petrol); text-decoration-color: var(--olive); text-underline-offset: 3px; }
  a:hover { color: var(--olive-hover); }
  :focus-visible { outline: 3px solid var(--olive); outline-offset: 2px; border-radius: 4px; }
  ::selection { background: rgb(126 154 26 / .25); }
  code, .mono { font-family: var(--font-mono); }
  hr { border: 0; border-top: 1px solid var(--border); margin: 1.5rem 0; }
  .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
  .turbo-progress-bar { background-color: var(--olive); height: 3px; }
}

@layer layout {
  .container { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }
  .stack > * + * { margin-top: var(--gap, 1rem); }
  .cluster { display: flex; flex-wrap: wrap; gap: var(--gap, .75rem); align-items: center; }
  .between { justify-content: space-between; }
  .grid { display: grid; gap: var(--gap, 1.25rem); grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--min, 15rem)), 1fr)); }
  .split { display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
  @media (max-width: 900px) { .split { grid-template-columns: 1fr; } }

  /* Header público */
  .site-header { position: sticky; top: 0; z-index: 40; background: rgb(250 249 240 / .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
  .site-header .container { display: flex; align-items: center; justify-content: space-between; height: 4.5rem; gap: 1rem; }
  .brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; }
  .brand img { width: 2.25rem; height: 2.25rem; }
  .brand-name { font-weight: 800; letter-spacing: .14em; font-size: 1.15rem; color: var(--petrol); }
  .site-nav { display: flex; align-items: center; gap: .25rem; }
  .site-nav a { padding: .5rem .8rem; border-radius: var(--radius-sm); text-decoration: none; font-weight: 600; font-size: .92rem; color: var(--slate); }
  .site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--petrol); background: var(--ivory-dark); }
  .nav-toggle { display: none; background: none; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .4rem .6rem; cursor: pointer; }
  @media (max-width: 820px) {
    .nav-toggle { display: inline-flex; }
    .site-nav { display: none; position: absolute; top: 5rem; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--ivory); border-bottom: 1px solid var(--border); padding: .75rem 1.25rem 1.25rem; }
    .site-nav.is-open { display: flex; }
  }

  /* Marca del sitio público: QERTIA + «Consultoría ISO» */
  .site-header .container { height: 5rem; }
  .site-header .brand img { width: 2.5rem; height: 2.5rem; }
  .brand-text { display: flex; flex-direction: column; line-height: 1; }
  .site-header .brand-name, .site-footer .brand-name { letter-spacing: -0.01em; font-size: 1.5rem; }
  .brand-sub { font-family: var(--font-mono); font-size: .62rem; text-transform: uppercase; letter-spacing: .18em; color: var(--slate); margin-top: .2rem; }
  .site-nav a:not(.btn) { font-weight: 500; font-size: .95rem; }
  .btn-whatsapp { margin-left: .75rem; background: var(--olive); color: var(--petrol); border-radius: var(--radius); padding: .65rem 1.1rem; font-size: .92rem; box-shadow: 0 1px 2px rgb(13 59 68 / .08); }
  .btn-whatsapp:hover { background: var(--olive-hover); color: var(--petrol); }
  @media (max-width: 820px) { .btn-whatsapp { margin: .5rem 0 0; } .site-header .brand-name { font-size: 1.3rem; } }

  .site-footer { border-top: 1px solid var(--border); padding: 3rem 0 2rem; margin-top: 4rem; background: rgb(242 240 226 / .6); }
  .footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1.5rem; padding-bottom: 2rem; border-bottom: 1px solid var(--border); }
  .footer-brand { display: flex; align-items: center; gap: .75rem; }
  .footer-brand img { width: 2rem; height: 2rem; }
  .footer-brand .brand-name { font-size: 1.15rem; line-height: 1; }
  .footer-brand .small { margin-top: .2rem; font-size: .78rem; }
  .footer-nav { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
  .footer-nav a { text-decoration: none; color: var(--slate); font-weight: 500; font-size: .92rem; }
  .footer-nav a:hover { color: var(--petrol); }
  .footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem 1.5rem; padding-top: 1.5rem; }
  .footer-bottom p { font-family: var(--font-mono); font-size: .75rem; color: var(--slate); }
  .footer-legal a { color: var(--slate); text-decoration: none; }
  .footer-legal a:hover { color: var(--petrol); text-decoration: underline; }

  /* App privada */
  .app-shell { display: grid; grid-template-columns: 15rem minmax(0, 1fr); min-height: 100vh; }
  .sidebar { background: var(--petrol); color: var(--ivory); padding: 1.25rem 1rem; display: flex; flex-direction: column; gap: 1.5rem; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
  .sidebar .brand-name { color: var(--ivory); }
  .sidebar .brand img { background: var(--ivory); border-radius: 50%; padding: 3px; }
  .side-nav { display: flex; flex-direction: column; gap: .15rem; }
  .side-nav .label { font-family: var(--font-mono); font-size: .65rem; letter-spacing: .12em; text-transform: uppercase; color: rgb(250 249 240 / .55); margin: .9rem .6rem .3rem; }
  .side-nav a { color: rgb(250 249 240 / .85); text-decoration: none; padding: .5rem .65rem; border-radius: var(--radius-sm); font-weight: 500; font-size: .92rem; }
  .side-nav a:hover { background: rgb(255 255 255 / .08); color: var(--white); }
  .side-nav a[aria-current="page"] { background: var(--olive); color: var(--white); }
  .sidebar .user-box { margin-top: auto; font-size: .82rem; border-top: 1px solid rgb(255 255 255 / .15); padding-top: 1rem; }
  .sidebar .user-box p { color: rgb(250 249 240 / .7); }
  .sidebar .user-box button { background: none; border: 0; color: var(--ivory); text-decoration: underline; cursor: pointer; padding: 0; margin-top: .35rem; }
  .main { padding: 1.75rem clamp(1rem, 3vw, 2.5rem) 3rem; min-width: 0; }
  .topbar { display: none; }
  @media (max-width: 900px) {
    .app-shell { grid-template-columns: 1fr; }
    .sidebar { position: fixed; inset: 0 auto 0 0; width: 16rem; z-index: 50; transform: translateX(-100%); transition: transform .2s; }
    .sidebar.is-open { transform: none; }
    .topbar { display: flex; align-items: center; justify-content: space-between; padding: .75rem 1rem; border-bottom: 1px solid var(--border); background: var(--ivory); position: sticky; top: 0; z-index: 30; }
  }
  .page-header { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end; justify-content: space-between; margin-bottom: 1.5rem; }
  .page-header .kicker { margin-bottom: .25rem; }
}

@layer components {
  .kicker { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--olive); font-weight: 600; }
  .muted { color: var(--slate); font-size: .9rem; }
  .lead { font-size: 1.15rem; color: var(--slate); max-width: 42rem; }

  /* Botones */
  .btn { display: inline-flex; align-items: center; gap: .45rem; justify-content: center; padding: .65rem 1.15rem; border-radius: var(--radius-sm); font-weight: 700; font-size: .92rem; text-decoration: none; border: 1.5px solid transparent; cursor: pointer; line-height: 1.2; transition: background-color .15s, color .15s, border-color .15s; }
  .btn-primary { background: var(--olive); color: var(--white); }
  .btn-primary:hover { background: var(--olive-hover); color: var(--white); }
  .btn-secondary { background: transparent; color: var(--petrol); border-color: var(--petrol); }
  .btn-secondary:hover { background: var(--petrol); color: var(--ivory); }
  .btn-ghost { background: transparent; color: var(--petrol); border-color: var(--border); }
  .btn-ghost:hover { background: var(--ivory-dark); color: var(--petrol); }
  .btn-danger { background: transparent; color: var(--danger); border-color: var(--danger); }
  .btn-sm { padding: .35rem .7rem; font-size: .8rem; }
  .btn[disabled], .btn[aria-busy="true"] { opacity: .6; cursor: progress; }
  .button_to { display: inline; }

  /* Tarjetas */
  .card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem 1.35rem; box-shadow: var(--shadow); }
  .card > h2, .card > h3, .card-title { margin-bottom: .75rem; }
  .card-title { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; }
  .card-title h2, .card-title h3 { margin: 0; }
  .card.accent { border-top: 3px solid var(--olive); }

  /* Métricas */
  .stat { display: flex; flex-direction: column; gap: .2rem; text-decoration: none; }
  .stat .value { font-size: 2rem; font-weight: 800; color: var(--petrol); line-height: 1; }
  .stat .label { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--slate); }
  .stat.alert .value { color: var(--danger); }

  /* Tablas */
  .table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--white); }
  table.data { width: 100%; border-collapse: collapse; font-size: .9rem; }
  table.data th { background: var(--petrol); color: var(--ivory); font-family: var(--font-mono); font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; text-align: left; padding: .6rem .75rem; font-weight: 600; white-space: nowrap; }
  table.data td { padding: .6rem .75rem; border-top: 1px solid var(--border); vertical-align: top; color: var(--ink); }
  table.data tr:nth-child(even) td { background: var(--ivory); }
  table.data td a { font-weight: 600; }
  table.data .num { text-align: right; font-variant-numeric: tabular-nums; }

  /* Definiciones */
  dl.props { display: grid; grid-template-columns: minmax(8rem, max-content) 1fr; gap: .45rem 1.25rem; font-size: .92rem; }
  dl.props dt { font-family: var(--font-mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--slate); padding-top: .15rem; }
  dl.props dd { margin: 0; color: var(--ink); white-space: pre-line; }

  /* Badges */
  .badge { display: inline-flex; align-items: center; gap: .3rem; font-family: var(--font-mono); font-size: .68rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; padding: .2rem .5rem; border-radius: 999px; border: 1px solid currentColor; white-space: nowrap; }
  .badge-neutral { color: var(--slate); background: var(--ivory-dark); border-color: var(--border); }
  .badge-info { color: var(--petrol); background: var(--info-bg); border-color: #B9CDD1; }
  .badge-success { color: #4E6110; background: var(--success-bg); border-color: #C7D58F; }
  .badge-warning { color: var(--warning); background: var(--warning-bg); border-color: #E8CF8F; }
  .badge-danger { color: var(--danger); background: var(--danger-bg); border-color: #E5B3AE; }

  /* Formularios */
  .form { display: grid; gap: 1rem; max-width: 46rem; }
  .form .row { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
  .field { display: flex; flex-direction: column; gap: .35rem; }
  .field label, .label { font-weight: 600; font-size: .88rem; color: var(--petrol); }
  .field .hint { font-size: .8rem; color: var(--slate); }
  .field .error { font-size: .82rem; color: var(--danger); font-weight: 600; }
  .input, .field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), .field select, .field textarea {
    width: 100%; padding: .6rem .75rem; border: 1.5px solid var(--border); border-radius: var(--radius-sm); background: var(--white); color: var(--ink); }
  .field textarea { min-height: 7rem; resize: vertical; }
  .field input:focus, .field select:focus, .field textarea:focus, .input:focus { outline: none; border-color: var(--olive); box-shadow: 0 0 0 3px rgb(126 154 26 / .2); }
  .field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--danger); }
  .field-inline { flex-direction: row; align-items: center; gap: .5rem; }
  .form-actions { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; padding-top: .5rem; }
  .honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

  /* Filtros */
  .filters { display: flex; flex-wrap: wrap; gap: .6rem; align-items: flex-end; margin-bottom: 1rem; padding: .85rem; background: rgb(255 255 255 / .7); border: 1px solid var(--border); border-radius: var(--radius); }
  .filters .field { min-width: 10rem; }
  .filters input, .filters select { padding: .45rem .6rem !important; font-size: .88rem; }

  /* Mensajes */
  .flash { padding: .8rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1.25rem; font-weight: 600; font-size: .92rem; border: 1px solid; display: flex; justify-content: space-between; gap: 1rem; }
  .flash-notice { background: var(--success-bg); color: #4E6110; border-color: #C7D58F; }
  .flash-alert { background: var(--danger-bg); color: var(--danger); border-color: #E5B3AE; }
  .flash button { background: none; border: 0; cursor: pointer; color: inherit; font-weight: 700; }
  .error-summary { background: var(--danger-bg); border: 1px solid #E5B3AE; color: var(--danger); border-radius: var(--radius-sm); padding: .85rem 1rem; font-size: .9rem; }
  .error-summary ul { margin: .35rem 0 0 1.1rem; padding: 0; }

  /* Estado vacío */
  .empty { text-align: center; padding: 2.5rem 1rem; border: 1.5px dashed var(--border); border-radius: var(--radius); background: rgb(255 255 255 / .6); }
  .empty p { margin: .4rem auto 1rem; max-width: 32rem; }

  /* Paginación */
  .pagination { display: flex; gap: .5rem; align-items: center; justify-content: space-between; margin-top: 1rem; font-size: .88rem; color: var(--slate); }

  /* Barra de progreso */
  .meter { height: .5rem; border-radius: 999px; background: var(--ivory-dark); overflow: hidden; min-width: 6rem; }
  .meter > span { display: block; height: 100%; background: var(--olive); }

  /* Línea de tiempo (seguimiento) */
  .timeline { list-style: none; padding: 0; display: grid; gap: .75rem; }
  .timeline li { border-left: 3px solid var(--olive); padding: .35rem 0 .35rem .85rem; }
  .timeline .meta { font-family: var(--font-mono); font-size: .7rem; color: var(--slate); text-transform: uppercase; letter-spacing: .05em; }
  .timeline p { color: var(--ink); white-space: pre-line; }

  /* Checklist de auditoría */
  .req-row form { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
  .req-row select { padding: .3rem .45rem; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: .82rem; }
  .req-row input[type="text"] { padding: .3rem .45rem; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: .82rem; min-width: 12rem; flex: 1; }
  .req-code { font-family: var(--font-mono); font-weight: 600; white-space: nowrap; }

  /* Token API */
  .secret-box { font-family: var(--font-mono); background: var(--petrol); color: var(--ivory); padding: .75rem 1rem; border-radius: var(--radius-sm); word-break: break-all; }

  /* ===== Sitio público ===== */
  .hero { padding: clamp(3.5rem, 8vw, 6.5rem) 0 4rem; }
  .hero h1 { font-size: clamp(2.5rem, 6.5vw, 4.25rem); line-height: 1.05; letter-spacing: -0.03em; margin: 1rem 0 1.25rem; max-width: 14ch; }
  .hero .lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); }
  .cert-note { margin: 2rem 0; padding: 1rem 1.25rem; border-left: 3px solid var(--olive); background: rgb(255 255 255 / .7); max-width: 40rem; }
  .facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 1.5rem; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border); }
  .facts .value { font-size: 1.6rem; font-weight: 800; color: var(--petrol); }
  .facts p { font-size: .88rem; }
  .section { padding: clamp(3.5rem, 7vw, 5.5rem) 0; border-top: 1px solid var(--border); }
  .section.alt { background: rgb(250 249 240 / .65); }
  .section-head { max-width: 44rem; margin-bottom: 2.5rem; }
  .section-head h2 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); margin: .6rem 0 .8rem; }
  .service-card { display: flex; flex-direction: column; gap: .6rem; }
  .service-card .num { font-family: var(--font-mono); color: var(--olive); font-weight: 700; }
  .service-card h3 { font-size: 1.2rem; }
  .iso-card { display: flex; flex-direction: column; gap: .75rem; text-decoration: none; transition: transform .15s, box-shadow .15s; }
  .iso-card:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgb(13 59 68 / .12); }
  .iso-card h3 { font-size: 1.35rem; color: var(--petrol); }
  .steps { counter-reset: step; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1.25rem; }
  .steps li { list-style: none; counter-increment: step; }
  .steps li::before { content: "0" counter(step); font-family: var(--font-mono); font-weight: 700; color: var(--olive); display: block; margin-bottom: .5rem; }
  .check-list { list-style: none; padding: 0; display: grid; gap: .55rem; }
  .check-list li { padding-left: 1.6rem; position: relative; color: var(--ink); }
  .check-list li::before { content: ""; position: absolute; left: 0; top: .3rem; width: 1rem; height: .55rem; border-left: 3px solid var(--olive); border-bottom: 3px solid var(--olive); transform: rotate(-45deg); }
  .cta-band { background: var(--petrol); color: var(--ivory); border-radius: var(--radius); padding: clamp(2rem, 5vw, 3rem); display: flex; flex-wrap: wrap; gap: 1.5rem; justify-content: space-between; align-items: center; }
  .cta-band h2 { color: var(--ivory); font-size: clamp(1.5rem, 3vw, 2rem); }
  .cta-band p { color: rgb(250 249 240 / .8); }
  .tabs { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
  .tabs button { background: transparent; border: 1.5px solid var(--border); border-radius: 999px; padding: .45rem 1rem; font-weight: 700; cursor: pointer; color: var(--slate); }
  .tabs button[aria-selected="true"] { background: var(--petrol); border-color: var(--petrol); color: var(--ivory); }
  /* ── Sitio público: inicio ───────────────────────────────────────── */
  .kicker-slate { color: var(--slate); }
  .label-mono { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: var(--petrol); }
  .btn-lg { padding: .85rem 1.5rem; font-size: 1rem; border-radius: var(--radius); }
  .icon { width: 1.1em; height: 1.1em; flex: none; }
  .text-center { text-align: center; }
  .cert-note-link { font-weight: 700; color: var(--petrol); text-decoration: underline; text-decoration-color: rgb(13 59 68 / .35); }
  .cert-note-link:hover { text-decoration-color: var(--olive); }

  .service-card { transition: transform .2s, box-shadow .2s, border-color .2s; }
  .service-card:hover { transform: translateY(-3px); border-color: rgb(13 59 68 / .35); box-shadow: 0 10px 28px rgb(13 59 68 / .1); }
  .service-icon { width: 3rem; height: 3rem; border-radius: var(--radius); display: inline-flex; align-items: center; justify-content: center;
                  background: rgb(13 59 68 / .05); border: 1px solid rgb(13 59 68 / .1); color: var(--petrol); margin-bottom: .5rem; transition: background-color .2s, color .2s; }
  .service-icon svg { width: 1.5rem; height: 1.5rem; }
  .service-card:hover .service-icon { background: var(--petrol); color: var(--ivory); }
  .service-foot { margin-top: auto; padding-top: .9rem; border-top: 1px solid var(--border); font-family: var(--font-mono); font-size: .75rem; color: var(--petrol); }

  .iso-panel { padding: clamp(1.25rem, 3vw, 2.25rem); }
  .iso-panel-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--border); }
  .iso-panel-head h3 { font-size: clamp(1.35rem, 2.5vw, 1.8rem); font-weight: 800; margin-top: .3rem; }
  .iso-meta { display: flex; flex-wrap: wrap; gap: .75rem; margin: 0; }
  .iso-meta > div { padding: .5rem .9rem; border-radius: var(--radius); background: var(--ivory-dark); border: 1px solid var(--border); }
  .iso-meta dt { font-family: var(--font-mono); font-size: .65rem; text-transform: uppercase; letter-spacing: .08em; color: var(--slate); }
  .iso-meta dd { margin: 0; font-weight: 700; color: var(--petrol); font-size: .9rem; }
  .iso-panel-body { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 2rem; padding-top: 1.5rem; }
  @media (max-width: 900px) { .iso-panel-body { grid-template-columns: 1fr; } }
  .deliverables { list-style: none; padding: 0; display: grid; gap: .5rem; }
  .deliverables li { display: flex; gap: .6rem; align-items: center; padding: .6rem .85rem; border-radius: var(--radius); background: var(--ivory-dark); border: 1px solid var(--border); color: var(--petrol); font-size: .9rem; }
  .deliverables li::before { content: ""; width: .4rem; height: .4rem; border-radius: 50%; background: var(--petrol); flex: none; }

  .steps-numbered li::before { content: none; }
  .steps-numbered li { position: relative; }
  .step-num { width: 3.5rem; height: 3.5rem; border-radius: var(--radius); background: var(--petrol); color: var(--ivory); font-family: var(--font-mono);
              font-weight: 700; font-size: 1.05rem; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 1rem; }
  .step-num-accent { background: var(--olive); color: var(--petrol); }
  .steps-numbered h3 { font-size: 1.15rem; }

  .contact-split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 5vw, 3.5rem); align-items: start; }
  @media (max-width: 900px) { .contact-split { grid-template-columns: 1fr; } }
  .contact-title { font-size: clamp(1.8rem, 3.5vw, 2.5rem); margin-top: .6rem; }
  .contact-facts { border-left: 3px solid var(--petrol); padding-left: 1.1rem; display: grid; gap: 1rem; }
  .contact-facts dt { font-family: var(--font-mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--petrol); }
  .contact-facts dd { margin: .2rem 0 0; color: var(--slate); font-size: .92rem; }
  .contact-card, .wa-card { padding: clamp(1.25rem, 3vw, 2rem); }
  .wa-card h3 { font-size: clamp(1.4rem, 2.5vw, 1.65rem); font-weight: 800; }
  .status-pill { display: inline-flex; align-items: center; gap: .55rem; padding: .3rem .75rem; border-radius: 999px; background: var(--ivory-dark); border: 1px solid var(--border);
                 font-family: var(--font-mono); font-size: .68rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--petrol); }
  .status-dot { width: .55rem; height: .55rem; border-radius: 50%; background: var(--olive); box-shadow: 0 0 0 0 rgb(126 154 26 / .5); animation: pulse 2s infinite; }
  @keyframes pulse { 70% { box-shadow: 0 0 0 .45rem rgb(126 154 26 / 0); } 100% { box-shadow: 0 0 0 0 rgb(126 154 26 / 0); } }

  fieldset.chips, fieldset.option-grid { border: 0; padding: 0; min-width: 0; }
  fieldset.chips legend, fieldset.option-grid legend { margin-bottom: .6rem; padding: 0; }
  .chips { display: flex; flex-wrap: wrap; gap: .5rem; }
  .chips legend { width: 100%; }
  .chip input, .option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
  .chip span { display: inline-block; padding: .45rem .85rem; border-radius: var(--radius); border: 1.5px solid var(--border); background: var(--white);
               font-family: var(--font-mono); font-size: .78rem; font-weight: 600; color: var(--petrol); cursor: pointer; transition: background-color .15s, border-color .15s; }
  .chip span:hover { border-color: rgb(13 59 68 / .4); }
  .chip input:checked + span { background: var(--petrol); border-color: var(--petrol); color: var(--ivory); }
  .chip input:focus-visible + span, .option input:focus-visible + span { outline: 3px solid var(--olive); outline-offset: 2px; }

  .wa-preview { border-left: 3px solid var(--petrol); background: var(--ivory-dark); border-radius: 0 var(--radius) var(--radius) 0; padding: .85rem 1rem; }
  .wa-preview-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
  .wa-preview p { white-space: pre-line; font-size: .9rem; }

  .wa-floating { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 45; width: 3.5rem; height: 3.5rem; border-radius: 1rem; display: inline-flex;
                 align-items: center; justify-content: center; background: var(--olive); color: var(--petrol); border: 1px solid rgb(13 59 68 / .15);
                 box-shadow: 0 8px 24px rgb(13 59 68 / .25); transition: transform .2s, background-color .2s; }
  .wa-floating:hover { background: var(--olive-hover); color: var(--petrol); transform: translateY(-2px); }
  .wa-floating .icon { width: 1.75rem; height: 1.75rem; }

  .dialog { border: 1px solid var(--border); border-radius: calc(var(--radius) * 1.5); background: var(--ivory); color: var(--petrol);
            width: min(100% - 2rem, 36rem); max-height: 92vh; padding: clamp(1.25rem, 4vw, 2rem); box-shadow: 0 24px 60px rgb(13 59 68 / .3); }
  .dialog::backdrop { background: rgb(13 59 68 / .55); backdrop-filter: blur(3px); }
  .dialog h2 { font-size: 1.5rem; }
  .dialog-close-form { position: absolute; top: .75rem; right: .75rem; }
  .dialog-close { background: none; border: 0; font-size: 1.6rem; line-height: 1; color: var(--slate); cursor: pointer; padding: .25rem .6rem; border-radius: var(--radius-sm); }
  .dialog-close:hover { background: rgb(13 59 68 / .06); color: var(--petrol); }
  .option-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
  .option-grid legend { grid-column: 1 / -1; }
  .option-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  @media (max-width: 520px) { .option-grid { grid-template-columns: 1fr; } .option-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
  .option { position: relative; display: block; }
  .option > span { display: flex; flex-direction: column; gap: .15rem; height: 100%; padding: .75rem .9rem; border-radius: var(--radius); border: 1.5px solid var(--border);
                   background: var(--white); cursor: pointer; transition: background-color .15s, border-color .15s; }
  .option > span:hover { border-color: rgb(13 59 68 / .4); }
  .option-code { font-family: var(--font-mono); font-size: .7rem; font-weight: 700; color: var(--olive); }
  .option-title { font-size: .9rem; font-weight: 700; color: var(--petrol); }
  .option input:checked + span { background: var(--petrol); border-color: var(--petrol); }
  .option input:checked + span .option-title, .option input:checked + span .option-code { color: var(--ivory); }
  .estimate { border-left: 3px solid var(--petrol); background: var(--ivory-dark); border-radius: 0 var(--radius) var(--radius) 0; padding: .9rem 1rem; }
  .estimate-head { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; }
  .estimate-head strong { color: var(--olive-hover); font-size: 1.05rem; }

  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
  }

  .prose { max-width: 46rem; }
  .prose h2 { margin: 2rem 0 .75rem; }
  .prose p, .prose li { color: var(--ink); margin-bottom: .75rem; }
  .prose ul { padding-left: 1.25rem; }
  .auth-card { max-width: 26rem; margin: clamp(2rem, 8vw, 5rem) auto; }
}

@layer utilities {
  .mt-0 { margin-top: 0; } .mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2.5rem; }
  .mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; }
  .text-right { text-align: right; }
  .nowrap { white-space: nowrap; }
  .small { font-size: .85rem; }
  .danger { color: var(--danger); }
  .w-full { width: 100%; }
  [hidden] { display: none !important; }
  @media print {
    .sidebar, .topbar, .site-header, .site-footer, .no-print { display: none !important; }
    .app-shell { display: block; }
    body { background: #fff; }
  }
}
