  :root {
    --bg: #F8F6F2; --card: #EFEDE8; --ink: #0A0A0A; --dim: #5F5E58; --faint: #706E66;
    --fill: rgba(10,10,10,.055); --fill2: rgba(10,10,10,.1); --edge: rgba(10,10,10,.09);
    --on: #0A0A0A; --on-ink: #F8F6F2; --dot: #D6402E; --focus: rgba(10,10,10,.5);
    --sombra: 0 1px 0 rgba(255,255,255,.7) inset;
    color-scheme: light;
  }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      --bg: #0B0B0A; --card: #161614; --ink: #F2EEE4; --dim: #B5B0A4; --faint: #807C72;
      --fill: rgba(242,238,228,.06); --fill2: rgba(242,238,228,.11); --edge: rgba(242,238,228,.08);
      --on: #F2EEE4; --on-ink: #0B0B0A; --focus: rgba(242,238,228,.55);
      --sombra: 0 1px 0 rgba(242,238,228,.04) inset;
      color-scheme: dark;
    }
  }
  :root[data-theme="dark"] {
    --bg: #0B0B0A; --card: #161614; --ink: #F2EEE4; --dim: #B5B0A4; --faint: #807C72;
    --fill: rgba(242,238,228,.06); --fill2: rgba(242,238,228,.11); --edge: rgba(242,238,228,.08);
    --on: #F2EEE4; --on-ink: #0B0B0A; --focus: rgba(242,238,228,.55);
    --sombra: 0 1px 0 rgba(242,238,228,.04) inset;
    color-scheme: dark;
  }

  * { box-sizing: border-box }
  html { -webkit-text-size-adjust: 100% }
  body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15px/1.55 Manrope, ui-sans-serif, system-ui, sans-serif; -webkit-font-smoothing: antialiased }
  a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px }
  button, input, textarea, select { font: inherit; color: inherit }
  ul, ol { margin: 0; padding: 0 }
  :focus-visible { outline: 2px solid var(--focus); outline-offset: 2px }
  [hidden] { display: none !important }
  .svg { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round }

  /* barra */
  .barra { max-width: 1040px; margin: 0 auto; padding: 20px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px }
  .marca { white-space: nowrap; display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; letter-spacing: -.01em }
  .marca i { width: 9px; height: 9px; border-radius: 50%; background: var(--dot) }
  .marca span { font-weight: 200 }
  .ajustes { display: flex; gap: 8px; align-items: center }
  .seg { display: inline-flex; background: var(--fill); border-radius: 999px; padding: 3px; gap: 2px }
  .seg button { border: 0; background: none; height: 30px; min-width: 34px; padding: 0 10px; border-radius: 999px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; line-height: 1; font-size: 12.5px; font-weight: 600; color: var(--dim) }
  .seg button[aria-pressed="true"] { background: var(--on); color: var(--on-ink) }
  .seg .svg { width: 15px; height: 15px }

  main { max-width: 1040px; margin: 0 auto; padding: 8px 24px 64px }

  /* tipografía */
  h1, h2, h3 { margin: 0; letter-spacing: -.025em }
  .gran { font-weight: 800; font-size: clamp(40px, 7vw, 64px); line-height: .95; letter-spacing: -.04em; padding-top: .08em }
  .gran span { font-weight: 200 }
  h2 { font-weight: 800; font-size: 26px; line-height: 1.1 }
  h2 span { font-weight: 200 }
  h3 { font-weight: 800; font-size: 17px; line-height: 1.25; letter-spacing: -.01em }
  p { margin: 0 }
  .dim { color: var(--dim) }
  .chico { font-size: 13px; line-height: 1.5; color: var(--dim) }
  .etq { font-size: 11.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--faint) }
  .pila > * + * { margin-top: 14px }
  .pila-g > * + * { margin-top: 24px }

  /* superficies */
  .tarjeta { background: var(--card); border-radius: 24px; padding: 28px; box-shadow: var(--sombra) }
  .sola { max-width: 460px; margin: 6vh auto 0 }

  /* controles */
  .btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 48px; padding: 0 22px; border-radius: 999px; border: 0; cursor: pointer; font-weight: 800; font-size: 15px; line-height: 1; letter-spacing: -.005em; text-decoration: none; background: var(--on); color: var(--on-ink); white-space: nowrap }
  .btn:disabled { opacity: .3; cursor: default }
  .btn.sec { background: var(--fill); color: var(--ink); font-weight: 600 }
  .btn.sec:hover:not(:disabled) { background: var(--fill2) }
  .btn.chico { height: 36px; padding: 0 16px; font-size: 13.5px }
  .btn.ancho { width: 100% }
  .liga { background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; color: var(--dim); font-size: 13.5px }
  .campo { width: 100%; height: 52px; border-radius: 14px; border: 1px solid var(--edge); background: var(--bg); padding: 0 16px; font-size: 16px; font-weight: 600 }
  .campo:focus { outline: none; border-color: var(--focus) }
  textarea.campo { height: auto; min-height: 92px; padding: 14px 16px; resize: vertical; font-weight: 400; line-height: 1.5 }
  .codigo { font-size: 22px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; text-align: center; height: 60px }
  label.etq { display: block; margin-bottom: 8px }
  .aviso { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.45; font-weight: 600 }
  .aviso .svg { margin-top: 1px }
  .check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-weight: 600; line-height: 1.45 }
  .check input { appearance: none; width: 22px; height: 22px; flex: none; border-radius: 7px; border: 1.5px solid var(--faint); margin: 0; display: grid; place-items: center; cursor: pointer }
  .check input:checked { background: var(--on); border-color: var(--on) }
  .check input:checked::after { content: ''; width: 10px; height: 6px; border: 2px solid var(--on-ink); border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg) }

  /* beta: tarjeta personal + panel */
  .rejilla { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 24px; align-items: start }
  .lado { position: sticky; top: 16px }
  @media (max-width: 860px) { .rejilla { grid-template-columns: 1fr } .lado { position: static } }
  .reloj { display: flex; align-items: baseline; gap: 12px }
  .reloj b { font-weight: 200; font-size: 88px; line-height: .85; letter-spacing: -.05em }
  .reloj .svg { width: 64px; height: 64px; stroke-width: 1.2 }
  .reloj span { font-weight: 600; font-size: 14px; line-height: 1.3; color: var(--dim); max-width: 16ch }
  .dias { display: grid; grid-template-columns: repeat(10, 1fr); gap: 5px }
  .dias i { height: 8px; border-radius: 999px; background: var(--fill2) }
  .dias i.si { background: var(--on) }
  .dias.cupo { grid-template-columns: repeat(25, 1fr); gap: 4px }
  .dias.cupo i { height: 6px }
  .tareas { list-style: none; display: grid; gap: 4px }
  .tarea { width: 100%; display: flex; align-items: center; gap: 14px; min-height: 58px; padding: 10px 14px; border-radius: 16px; border: 0; background: none; cursor: pointer; text-align: left }
  .tarea:hover { background: var(--fill) }
  .tarea[aria-current="true"] { background: var(--bg) }
  .tarea b { display: block; font-weight: 800; font-size: 15px; line-height: 1.25 }
  .tarea small { display: block; font-size: 13px; line-height: 1.35; color: var(--dim); margin-top: 2px }
  .marca-t { width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; line-height: 1; border: 1.5px solid var(--faint); color: var(--dim) }
  .marca-t.op { border-style: dashed }
  .marca-t.ok { background: var(--on); border-color: var(--on); color: var(--on-ink) }
  .marca-t.ok .svg { width: 14px; height: 14px; stroke-width: 2.4 }
  .panel { background: var(--card); border-radius: 24px; padding: 32px; box-shadow: var(--sombra); min-width: 0 }

  /* qué trae: debajo de la entrada */
  .trae { margin: 112px auto 0 }
  .trae-t { font-size: clamp(30px, 4.6vw, 44px); line-height: 1; letter-spacing: -.035em; max-width: 18ch }
  .cifras { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px }
  .cifras li { display: flex; flex-direction: column; gap: 6px }
  .cifras b { font-weight: 200; font-size: clamp(48px, 7vw, 72px); line-height: .9; letter-spacing: -.05em }
  .cifras span { font-size: 13px; font-weight: 600; color: var(--dim) }
  .trae-rej { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px }
  .trae-rej .motores { grid-column: 1 / -1 }
  .filas { list-style: none; display: grid; gap: 6px }
  .filas li { display: grid; grid-template-columns: 44px 88px minmax(0, 1fr); align-items: center; gap: 12px; padding: 10px 14px; border-radius: 14px; background: var(--bg) }
  .filas .num { font-weight: 200; font-size: 20px; letter-spacing: -.02em; color: var(--dim); white-space: nowrap }
  .filas b { font-weight: 800; font-size: 15px }
  .chips { display: flex; flex-wrap: wrap; gap: 6px }
  .chips span { height: 28px; padding: 0 12px; border-radius: 999px; background: var(--fill); display: inline-flex; align-items: center; font-size: 13px; font-weight: 600; line-height: 1 }
  .mini { display: flex; flex-direction: column; gap: 10px; padding: 24px }
  .mini .svg { width: 26px; height: 26px; stroke-width: 1.5; margin-bottom: 6px }
  .ligas { display: flex; flex-wrap: wrap; gap: 10px }
  @media (max-width: 860px) { .trae-rej { grid-template-columns: repeat(2, minmax(0, 1fr)) } }
  @media (max-width: 560px) {
    .trae { margin-top: 72px }
    .cifras { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 22px }
    .trae-rej { grid-template-columns: 1fr }
    .filas li { grid-template-columns: 40px minmax(0, 1fr); row-gap: 8px; column-gap: 10px }
    .filas .num { font-size: 18px }
    .filas .chips { grid-column: 2 }
    .ligas .btn { width: 100%; white-space: normal; text-align: center; height: auto; min-height: 44px; padding: 10px 16px }
  }
  @media (max-width: 560px) { #temas button[aria-pressed="false"] { display: none } #temas button[aria-pressed="true"] { background: none; color: var(--ink) } .ajustes { gap: 4px } .panel, .tarjeta { padding: 22px; border-radius: 20px } main { padding: 4px 16px 48px } .barra { padding: 16px } }

  /* instalador */
  .reqs { list-style: none; display: grid; gap: 10px }
  .req { display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start; background: var(--bg); border-radius: 16px; padding: 14px 16px }
  .req .ic { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--fill) }
  .req .ic.ok { background: var(--on); color: var(--on-ink) }
  .req .ic .svg { width: 15px; height: 15px }
  .req b { display: block; font-weight: 800; font-size: 13px; letter-spacing: .02em }
  .req p { font-size: 14px; line-height: 1.45; color: var(--dim) }
  .pasos { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px }
  .pasos li { display: grid; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--faint); line-height: 1.2 }
  .pasos li::before { content: ''; height: 6px; border-radius: 999px; background: var(--fill2) }
  .pasos li.hecho { color: var(--dim) }
  .pasos li.hecho::before { background: var(--on) }
  .pasos li.ahora { color: var(--ink) }
  .pasos li.ahora::before { background: linear-gradient(90deg, var(--on) var(--p, 0%), var(--fill2) var(--p, 0%)) }
  .pct { font-weight: 200; font-size: 56px; line-height: .9; letter-spacing: -.04em }
  .estado { background: var(--bg); border-radius: 18px; padding: 20px }
  .siguiente { display: flex; gap: 10px; align-items: center; font-size: 14px; font-weight: 600; color: var(--dim) }
  .siguiente .svg { width: 16px; height: 16px }
  details.mas { border-radius: 16px; background: var(--bg) }
  details.mas > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; font-weight: 800; font-size: 14.5px }
  details.mas > summary::-webkit-details-marker { display: none }
  details.mas > summary .svg { transition: transform .2s }
  details.mas[open] > summary .svg { transform: rotate(180deg) }
  details.mas > div { padding: 0 18px 18px }
  .huella { font-size: 12px; color: var(--faint); word-break: break-all }
  .mas ol { padding-left: 20px; display: grid; gap: 6px }
  .acciones { display: flex; flex-wrap: wrap; gap: 10px; align-items: center }

  /* formulario */
  .preg { display: grid; gap: 10px }
  .preg legend, .preg > span { font-weight: 800; font-size: 15px; line-height: 1.35; padding: 0 }
  .preg em { font-style: normal; font-weight: 600; font-size: 12px; color: var(--faint); margin-left: 6px }
  fieldset.preg { border: 0; margin-left: 0; margin-right: 0; margin-bottom: 0; padding: 0; min-width: 0 }
  .opciones { display: flex; flex-wrap: wrap; gap: 8px }
  .opciones label { cursor: pointer }
  .opciones input { position: absolute; opacity: 0; pointer-events: none }
  .opciones span { display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border-radius: 999px; background: var(--bg); font-weight: 600; font-size: 14px; line-height: 1 }
  .opciones input:checked + span { background: var(--on); color: var(--on-ink) }
  .opciones input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px }
  .escala .opciones { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 6px }
  .escala .opciones label { display: flex }
  .escala .opciones span { flex: 1; justify-content: center; padding: 0 }
  .escala .extremos { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--faint); font-weight: 600 }
  @media (max-width: 560px) { .escala.once .opciones { grid-template-columns: repeat(6, minmax(0, 1fr)) } }

  /* video */
  .num { list-style: none; display: grid; gap: 12px; counter-reset: n }
  .num li { display: grid; grid-template-columns: 32px 1fr; gap: 12px; align-items: start; counter-increment: n; font-weight: 600; line-height: 1.45 }
  .num li::before { content: counter(n); font-weight: 200; font-size: 26px; line-height: 1 }

  footer { max-width: 1040px; margin: 0 auto; padding: 0 24px 48px; display: flex; gap: 24px; flex-wrap: wrap; justify-content: space-between; align-items: flex-end }
  footer p { max-width: 64ch; font-size: 12.5px; line-height: 1.55; color: var(--faint) }
  @media (max-width: 560px) { footer { padding: 0 16px 40px } }

  .toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--on); color: var(--on-ink); border-radius: 999px; padding: 12px 20px; font-weight: 700; font-size: 14px; line-height: 1; opacity: 0; transition: opacity .2s; pointer-events: none }
  .toast.ver { opacity: 1 }
  @media (prefers-reduced-motion: reduce) { * { transition: none !important } }
