@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url(../fonts/Barlow-400.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-display: swap; src: url(../fonts/Barlow-500.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-display: swap; src: url(../fonts/Barlow-600.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 700; font-display: swap; src: url(../fonts/Barlow-700.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url(../fonts/BarlowCondensed-700.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 800; font-display: swap; src: url(../fonts/BarlowCondensed-800.woff2) format("woff2"); }

:root {
  --bg: #f3f6fc;
  --surface: #ffffff;
  --surface-2: #e5ebf6;
  --ink: #0e1b3d;
  --ink-2: #39466a;
  --ink-3: #596688;
  --line: #ccd5e8;
  --accent: #0e1b3d;
  --accent-ink: #ffffff;
  --accent-soft: #dfe7f8;
  --focus: #2a63ff;
  --good: #1b7f45;
  --sky: #d6e6ff;
  --tA: #8c99bd; --tB: #0e1b3d; --tC: #c9d3ea;
  --z1: #a7d46b; --z2: #4fa84a; --z3: #f4d03f; --z4: #f08a24; --z5: #d7263d;
  --z1-ink: #0e1b3d; --z2-ink: #0e1b3d; --z3-ink: #0e1b3d; --z4-ink: #0e1b3d; --z5-ink: #ffffff;
  --shadow: none;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --tab-h: 66px;
  --font-display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --font-body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #08102a; --surface: #0f1a3b; --surface-2: #17244d; --ink: #eef2ff; --ink-2: #bcc6e4; --ink-3: #93a0c6;
  --line: #243360; --accent: #eef2ff; --accent-ink: #08102a; --accent-soft: #1a2858; --focus: #8fb0ff; --good: #5fd08c; --sky: #14224d; --tA: #6c7cae; --tB: #eef2ff; --tC: #2a3a6e;
  --z1: #b7e07f; --z2: #62bd5c; --z3: #ffd84a; --z4: #ff9a3c; --z5: #ff4d63;
  --z1-ink: #08102a; --z2-ink: #08102a; --z3-ink: #08102a; --z4-ink: #08102a; --z5-ink: #08102a;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #08102a; --surface: #0f1a3b; --surface-2: #17244d; --ink: #eef2ff; --ink-2: #bcc6e4; --ink-3: #93a0c6;
    --line: #243360; --accent: #eef2ff; --accent-ink: #08102a; --accent-soft: #1a2858; --focus: #8fb0ff; --good: #5fd08c; --sky: #14224d; --tA: #6c7cae; --tB: #eef2ff; --tC: #2a3a6e;
    --z1: #b7e07f; --z2: #62bd5c; --z3: #ffd84a; --z4: #ff9a3c; --z5: #ff4d63;
    --z1-ink: #08102a; --z2-ink: #08102a; --z3-ink: #08102a; --z4-ink: #08102a; --z5-ink: #08102a;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-body); font-weight: 500; font-size: 16px; line-height: 1.4; -webkit-text-size-adjust: 100%; min-height: 100dvh; }
::selection { background: var(--ink); color: var(--bg); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
.num { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nw { white-space: nowrap; }

#app { max-width: 560px; margin: 0 auto; padding: calc(env(safe-area-inset-top) + 16px) 16px calc(var(--tab-h) + env(safe-area-inset-bottom) + 28px); }
#app.wizard { padding-bottom: calc(env(safe-area-inset-bottom) + 24px); }
.screen { animation: enter .4s var(--ease) both; }
@keyframes enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- tipografía ---------- */
.display { font-family: var(--font-display); font-weight: 800; letter-spacing: .005em; line-height: .92; text-transform: uppercase; text-wrap: balance; }
.h1 { font-size: clamp(38px, 11.5vw, 52px); }
.h2 { font-size: 28px; line-height: 1; }
.h3 { font-family: var(--font-display); font-weight: 700; font-size: 21px; line-height: 1.05; letter-spacing: .02em; text-transform: uppercase; }
.meta { color: var(--ink-2); font-size: 15px; }
.small { font-size: 13px; color: var(--ink-3); }
.lead { color: var(--ink-2); font-size: 17px; max-width: 44ch; text-wrap: pretty; }

/* ---------- cabecera ---------- */
.top { display: flex; align-items: center; gap: 10px; min-height: 44px; margin-bottom: 12px; }
.back { width: 44px; height: 44px; margin-left: -10px; border: 0; background: none; display: grid; place-items: center; border-radius: 8px; }
.back:active { background: var(--surface-2); }
.top .grow { flex: 1; }
.top .logo { font-size: 24px; }
.runhead { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 10px; border-bottom: 2px solid var(--ink); margin-bottom: 18px; }
.runhead .logo { font-size: 26px; }
.runhead .brand { margin: 0; gap: 5px; }
.runhead .brand-sub { font-size: 10px; }
.guide { font-family: var(--font-display); font-weight: 700; font-size: 14px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); text-align: right; }

/* ---------- botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 54px; padding: 0 22px; width: 100%; border: 0; border-radius: 6px; background: var(--accent); color: var(--accent-ink); font-family: var(--font-display); font-weight: 800; font-size: 20px; letter-spacing: .06em; text-transform: uppercase; transition: transform .15s var(--ease), opacity .2s; }
.btn:active { transform: scale(.985); }
.btn[disabled] { opacity: .4; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.btn.danger { background: transparent; color: var(--z5); box-shadow: inset 0 0 0 2px var(--z5); }
:root[data-theme="dark"] .btn.danger { color: #ff7285; box-shadow: inset 0 0 0 2px #ff7285; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.danger { color: #ff7285; box-shadow: inset 0 0 0 2px #ff7285; } }
.btn.sm { min-height: 44px; font-size: 16px; width: auto; padding: 0 16px; }
.btn.done { background: var(--good); color: #fff; }
:root[data-theme="dark"] .btn.done { color: #04200f; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.done { color: #04200f; } }
.link { background: none; border: 0; color: var(--ink); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; padding: 10px 0; min-height: 44px; }

/* ---------- placas de zona ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px; border-radius: 3px; font-family: var(--font-display); font-size: 14px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; background: var(--surface-2); color: var(--ink-2); }
.chip.z1 { background: var(--z1); color: var(--z1-ink); } .chip.z2 { background: var(--z2); color: var(--z2-ink); }
.chip.z3 { background: var(--z3); color: var(--z3-ink); } .chip.z4 { background: var(--z4); color: var(--z4-ink); }
.chip.z5 { background: var(--z5); color: var(--z5-ink); }
.chip.line { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ink-3); color: var(--ink-2); }
.chip.accent { background: var(--ink); color: var(--bg); }
.chip.ok { background: var(--good); color: #fff; } .chip.warn { background: var(--z3); color: var(--z3-ink); } .chip.bad { background: var(--z5); color: var(--z5-ink); }

/* ---------- perfil de etapa ---------- */
.stage { position: relative; margin: 18px -16px 0; padding: 0 16px; }
.stage-box { position: relative; margin-left: 30px; height: 240px; background: linear-gradient(var(--sky), transparent 78%); border-bottom: 3px solid var(--ink); }
.stage-box svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; clip-path: inset(-4px 100% -4px 0); animation: trace 1.1s var(--ease) .15s forwards; }
@keyframes trace { to { clip-path: inset(-4px -4px -4px 0); } }
.stage-box .lv { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--line); pointer-events: none; }
.stage-box .lv.on { border-top-color: var(--ink-3); }
.stage-box .lv b { position: absolute; left: -30px; top: -8px; font: 700 14px/1 var(--font-display); letter-spacing: .05em; color: var(--ink-3); }
.stage-box .lv.on b { color: var(--ink); }
.stage-box .pk { position: absolute; transform: translateX(-50%); font: 800 13px/1 var(--font-display); letter-spacing: .04em; color: var(--ink); background: var(--bg); padding: 1px 4px; border-radius: 2px; }
.stage-axis { position: relative; height: 30px; margin-left: 30px; }
.stage-axis span { position: absolute; top: 0; transform: translateX(-50%); font: 700 14px/1 var(--font-display); letter-spacing: .04em; color: var(--ink-2); }
.stage-axis span::before { content: ""; position: absolute; top: 0; left: 50%; width: 2px; height: 10px; margin-left: -1px; background: var(--ink); }
.stage-axis span em { display: block; font-style: normal; padding-top: 13px; }
.stage-axis span:first-child { transform: none; } .stage-axis span:first-child::before { left: 0; margin-left: 0; }
.stage-axis span:last-child { transform: translateX(-100%); } .stage-axis span:last-child::before { left: auto; right: 0; margin-left: 0; }
.motif { margin-top: 26px; }
.motif .stage-box { height: 130px; margin-left: 0; }
.mini { display: block; width: 100%; height: 34px; overflow: visible; }
.mini .base { stroke: var(--ink); stroke-width: 1.5; }

svg .rz1 { fill: var(--z1); } svg .rz2 { fill: var(--z2); } svg .rz3 { fill: var(--z3); } svg .rz4 { fill: var(--z4); } svg .rz5 { fill: var(--z5); }
svg .rpa { fill: var(--tA); } svg .rpb { fill: var(--tB); } svg .rpc { fill: var(--tC); }
.chip.tA { background: var(--tA); color: var(--bg); } .chip.tB { background: var(--tB); color: var(--bg); } .chip.tC { background: var(--tC); color: var(--ink); }
svg .rline { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
svg .rline.thin { stroke-width: 1.6; }
svg .base { vector-effect: non-scaling-stroke; }

.hero { padding: 4px 0 0; }
.hero + .hero { margin-top: 28px; padding-top: 24px; border-top: 2px solid var(--ink); }
.ico { width: 22px; height: 22px; stroke: currentColor; stroke-width: 3.2; fill: none; stroke-linecap: square; margin-right: 6px; }
.flip { display: inline-grid; transform: scaleX(-1); }
.wd .ck { width: 14px; height: 14px; stroke: var(--good); stroke-width: 3.4; fill: none; stroke-linecap: square; }

/* ---------- paneles ---------- */
.sheet { background: var(--surface); border-radius: 10px; padding: 18px; border: 1px solid var(--line); }
.sheet + .sheet, .sheet + .section, .section + .sheet, .section + .section { margin-top: 16px; }
.section { margin-top: 26px; }
.section > .h3 { margin-bottom: 10px; }
.rule { height: 2px; background: var(--ink); border: 0; margin: 18px 0; }

/* ---------- Hoy ---------- */
.dayhead { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 4px; }
.today-title { margin: 6px 0 2px; }
.stats { display: flex; gap: 26px; margin-top: 14px; flex-wrap: wrap; }
.stat b { display: block; font-family: var(--font-display); font-size: 32px; line-height: 1; font-weight: 800; }
.stat span { font-size: 13px; color: var(--ink-3); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }

.blocks { list-style: none; padding: 0; margin: 18px 0 0; display: grid; border-top: 2px solid var(--ink); }
.block { display: grid; grid-template-columns: 52px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: start; }
.block .what { font-weight: 700; font-size: 17px; }
.block .targets { font-size: 14px; color: var(--ink-2); margin-top: 2px; }
.block .sub { margin-top: 8px; display: grid; gap: 8px; }
.block .subrow { display: grid; grid-template-columns: 52px 1fr; gap: 12px; align-items: start; }
.rep { font-family: var(--font-display); font-weight: 800; font-size: 30px; line-height: 1; }

.how { margin: 16px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; color: var(--ink-2); }
.how li { padding-left: 18px; position: relative; text-wrap: pretty; }
.how li::before { content: ""; position: absolute; left: 0; top: .62em; width: 9px; height: 3px; background: var(--ink); }
.rest { padding: 8px 0 4px; }

.weekstrip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 12px; }
.wd { border: 0; background: var(--surface); border-radius: 6px; padding: 8px 4px 6px; display: grid; justify-items: center; gap: 4px; min-height: 84px; box-shadow: inset 0 0 0 1px var(--line); }
.wd small { font: 700 12px/1 var(--font-display); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.wd b { font-family: var(--font-display); font-size: 22px; line-height: 1; font-weight: 800; }
.wd .mini { height: 30px; }
.wd.today { box-shadow: inset 0 0 0 3px var(--ink); background: var(--sky); }
.wd.done { opacity: .55; }

.next { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 14px 16px; background: var(--surface); border-radius: 10px; border: 1px solid var(--line); margin-top: 16px; width: 100%; text-align: left; }

/* ---------- Plan ---------- */
.planhead { display: grid; gap: 6px; }
.phase { margin: 26px 0 6px; display: flex; align-items: baseline; justify-content: space-between; border-bottom: 2px solid var(--ink); padding-bottom: 4px; }
.week { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; width: 100%; border: 0; text-align: left; background: var(--surface); border-radius: 8px; padding: 10px 12px; margin-top: 8px; box-shadow: inset 0 0 0 1px var(--line); }
.week .n { font-family: var(--font-display); font-size: 32px; font-weight: 800; line-height: 1; text-align: center; }
.week .n small { display: block; font: 700 11px/1.2 var(--font-display); color: var(--ink-3); letter-spacing: .08em; text-transform: uppercase; }
.week .range { font-size: 14px; color: var(--ink-2); }
.week .days7 { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; margin-top: 4px; }
.week .days7 .mini { height: 36px; }
.week .right { text-align: right; }
.week .right b { display: block; font-family: var(--font-display); font-size: 24px; line-height: 1; font-weight: 800; }
.week.current { box-shadow: inset 0 0 0 3px var(--ink); background: var(--sky); }
.bar { height: 8px; border-radius: 2px; background: var(--line); overflow: hidden; margin-top: 8px; }
.bar i { display: block; height: 100%; background: var(--good); }
.macro { margin-top: 18px; background: var(--surface); border-radius: 10px; border: 1px solid var(--line); padding: 14px 14px 10px; }
.macro .stage-box { height: 120px; margin-left: 0; }
.macro .cap { display: flex; justify-content: space-between; font: 700 12px/1 var(--font-display); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-top: 8px; }

.split { display: flex; height: 12px; margin: 12px 0 6px; background: var(--line); }
.split i { display: block; height: 100%; }
.split i:first-child { background: var(--z2); } .split i:last-child { background: var(--z4); }
.splitlabels { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-2); font-weight: 600; }

/* ---------- Semana ---------- */
.daylist { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.day { display: grid; grid-template-columns: 50px 1fr 44px; gap: 10px; align-items: center; background: var(--surface); border-radius: 8px; padding: 8px 4px 8px 12px; box-shadow: inset 0 0 0 1px var(--line); }
.day.today { box-shadow: inset 0 0 0 3px var(--ink); background: var(--sky); }
.day .dl { text-align: center; line-height: 1; }
.day .dl b { display: block; font-family: var(--font-display); font-size: 30px; font-weight: 800; }
.day .dl small { font: 700 12px/1 var(--font-display); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
.day .go { border: 0; background: none; text-align: left; padding: 4px 0; min-height: 44px; display: grid; gap: 3px; }
.day .go .t { font-weight: 700; font-size: 17px; }
.day .go .m { font-size: 13px; color: var(--ink-3); }
.day .go .mini { height: 26px; margin-top: 2px; max-width: 220px; }
.day.off .go .t { color: var(--ink-3); font-weight: 500; }
.tick { width: 44px; height: 44px; border-radius: 6px; border: 0; background: none; display: grid; place-items: center; }
.tick span { width: 28px; height: 28px; border-radius: 4px; box-shadow: inset 0 0 0 2.5px var(--ink); display: grid; place-items: center; transition: background .25s, box-shadow .25s; }
.tick svg { width: 17px; height: 17px; stroke: #fff; stroke-width: 3.2; fill: none; stroke-linecap: square; stroke-dasharray: 22; stroke-dashoffset: 22; transition: stroke-dashoffset .4s var(--ease) .05s; }
.tick[aria-pressed="true"] span { background: var(--good); box-shadow: none; }
.tick[aria-pressed="true"] svg { stroke-dashoffset: 0; }
:root[data-theme="dark"] .tick svg { stroke: #04200f; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tick svg { stroke: #04200f; } }

/* ---------- Zonas ---------- */
.zone { display: grid; grid-template-columns: 56px 1fr; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.zone:first-child { border-top: 0; }
.zone .zcell { height: 64px; display: flex; align-items: flex-end; }
.zone .zn { width: 56px; border-radius: 3px 3px 0 0; display: grid; place-items: start center; padding-top: 4px; font-family: var(--font-display); font-weight: 800; font-size: 28px; line-height: 1; }
.zone .zn.z1 { background: var(--z1); color: var(--z1-ink); height: 22%; min-height: 30px; } .zone .zn.z2 { background: var(--z2); color: var(--z2-ink); height: 40%; min-height: 36px; }
.zone .zn.z3 { background: var(--z3); color: var(--z3-ink); height: 58%; min-height: 44px; } .zone .zn.z4 { background: var(--z4); color: var(--z4-ink); height: 80%; min-height: 52px; }
.zone .zn.z5 { background: var(--z5); color: var(--z5-ink); height: 100%; }
.zone .zt { font-weight: 700; font-size: 17px; }
.zone .vals { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 4px 22px; margin-top: 6px; }
.zone .vals div { font-size: 12px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.zone .vals b { display: block; white-space: nowrap; color: var(--ink); font-size: 18px; font-weight: 700; text-transform: none; letter-spacing: 0; }

/* ---------- escalera de zonas ---------- */
.stairs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; align-items: end; margin-top: 20px; height: 230px; position: relative; }
.stairs::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 3px; background: var(--ink); }
.stairs .col { display: grid; place-items: start center; padding-top: 6px; border-radius: 3px 3px 0 0; font: 800 34px/1 var(--font-display); }
.stairs .col.z1 { background: var(--z1); color: var(--z1-ink); } .stairs .col.z2 { background: var(--z2); color: var(--z2-ink); } .stairs .col.z3 { background: var(--z3); color: var(--z3-ink); } .stairs .col.z4 { background: var(--z4); color: var(--z4-ink); } .stairs .col.z5 { background: var(--z5); color: var(--z5-ink); }
.stairlabs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; text-align: center; margin-top: 6px; font: 700 13px/1.1 var(--font-display); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.stairlabs b { display: block; font-size: 17px; color: var(--ink); letter-spacing: 0; white-space: nowrap; }
.zones { margin-top: 8px; }

/* ---------- formularios ---------- */
.field { display: grid; gap: 8px; margin-top: 18px; }
.field > label, .field > .lab { font-family: var(--font-display); font-weight: 700; font-size: 17px; letter-spacing: .05em; text-transform: uppercase; }
.input { width: 100%; min-height: 54px; padding: 0 14px; border-radius: 6px; border: 0; background: var(--surface); box-shadow: inset 0 0 0 2px var(--line); font-size: 19px; font-weight: 600; }
.input:focus { outline: none; box-shadow: inset 0 0 0 3px var(--ink); }
.input::placeholder { color: var(--ink-3); font-weight: 500; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hint { font-size: 13.5px; color: var(--ink-3); text-wrap: pretty; }
.err { color: var(--z5); font-size: 14.5px; font-weight: 700; }
:root[data-theme="dark"] .err { color: #ff7285; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .err { color: #ff7285; } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips.cnt { flex-wrap: nowrap; gap: 6px; }
.chips.cnt .pick { flex: 1 1 0; min-width: 0; padding: 0; }
.pick { min-width: 52px; min-height: 48px; padding: 0 14px; border-radius: 6px; border: 0; background: var(--surface); box-shadow: inset 0 0 0 2px var(--line); font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: .03em; }
.pick[aria-pressed="true"], .pick[aria-checked="true"] { background: var(--ink); color: var(--bg); box-shadow: none; }
.tile { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 12px; width: 100%; text-align: left; padding: 14px 16px; border: 0; border-radius: 8px; background: var(--surface); box-shadow: inset 0 0 0 2px var(--line); margin-top: 10px; min-height: 72px; transition: box-shadow .2s, background .2s; }
.tile .tt { font-family: var(--font-display); font-weight: 800; font-size: 30px; line-height: 1; text-transform: uppercase; }
.tile .td { grid-column: 1; font-size: 14.5px; color: var(--ink-2); }
.tile .tr { grid-row: 1 / span 2; grid-column: 2; font: 700 14px var(--font-display); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); text-align: right; }
.tile[aria-checked="true"] { box-shadow: inset 0 0 0 4px var(--ink); background: var(--sky); }
.switch { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; width: 100%; background: var(--surface); box-shadow: inset 0 0 0 2px var(--line); border: 0; border-radius: 8px; padding: 12px 14px; text-align: left; margin-top: 10px; min-height: 60px; }
.switch .sw { width: 50px; height: 28px; border-radius: 4px; background: var(--line); position: relative; transition: background .2s; }
.switch .sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 2px; background: var(--surface); box-shadow: 0 0 0 2px var(--ink); transition: transform .25s var(--ease); }
.switch[aria-checked="true"] .sw { background: var(--z2); }
.switch[aria-checked="true"] .sw::after { transform: translateX(22px); }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--surface-2); border-radius: 6px; padding: 3px; gap: 3px; }
.seg button { border: 0; background: none; min-height: 44px; border-radius: 4px; font-family: var(--font-display); font-weight: 700; font-size: 18px; letter-spacing: .04em; text-transform: uppercase; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
details { background: none; border-radius: 0; padding: 0; border: 0; border-top: 2px solid var(--ink); margin-top: 0; }
details:last-of-type { border-bottom: 2px solid var(--ink); }
details summary { min-height: 54px; display: flex; align-items: center; justify-content: space-between; font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: .03em; text-transform: uppercase; cursor: pointer; list-style: none; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: ""; width: 16px; height: 16px; background: linear-gradient(var(--ink), var(--ink)) center / 100% 3px no-repeat, linear-gradient(var(--ink), var(--ink)) center / 3px 100% no-repeat; }
details[open] summary::after { background: linear-gradient(var(--ink), var(--ink)) center / 100% 3px no-repeat; }
details .body { padding: 0 0 16px; color: var(--ink-2); display: grid; gap: 10px; text-wrap: pretty; }

/* ---------- cuestionario ---------- */
.steps { display: flex; align-items: flex-end; gap: 4px; height: 26px; margin: 4px 0 24px; }
.steps i { flex: 1; background: var(--line); border-radius: 2px 2px 0 0; }
.steps i:nth-child(1) { height: 30%; } .steps i:nth-child(2) { height: 42%; } .steps i:nth-child(3) { height: 54%; }
.steps i:nth-child(4) { height: 68%; } .steps i:nth-child(5) { height: 84%; } .steps i:nth-child(6) { height: 100%; }
.steps i.on { background: var(--ink); }
.wizfoot { position: sticky; bottom: 0; padding: 14px 0 calc(env(safe-area-inset-bottom) + 6px); background: linear-gradient(to top, var(--bg) 70%, transparent); margin-top: 26px; display: grid; gap: 8px; }

/* ---------- listas con regla ---------- */
.kv.ruled { margin-top: 18px; gap: 0; border-top: 2px solid var(--ink); }
.kv.ruled dd { padding-left: 16px; }
.kv.ruled dt, .kv.ruled dd { padding: 11px 0; border-bottom: 1px solid var(--line); }
.why { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.why li { padding: 12px 0 12px 18px; border-bottom: 1px solid var(--line); position: relative; text-wrap: pretty; color: var(--ink-2); }
.why li::before { content: ""; position: absolute; left: 0; top: 1.15em; width: 9px; height: 3px; background: var(--ink); }
.why li.warn { color: var(--ink); font-weight: 600; }
.why li.warn::before { background: var(--ink); height: 5px; }
.rowlink { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0; border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); text-decoration: none; color: var(--ink); min-height: 64px; }
.rowlink b { display: block; }
.rowlink .ico { margin: 0; width: 26px; height: 26px; }

/* ---------- marca ---------- */
.brand { display: grid; justify-items: center; width: max-content; max-width: 100%; gap: 6px; margin-bottom: 22px; }
.logo { display: inline-flex; align-items: center; gap: .05em; font-family: var(--font-display); font-weight: 800; font-size: 34px; line-height: .8; letter-spacing: -.005em; text-transform: lowercase; color: var(--ink); }
.logo svg { height: .78em; width: auto; display: block; flex: none; }
.logo path { fill: none; stroke-width: 17; stroke-linecap: round; stroke-linejoin: round; }
.brand.lg .logo { font-size: 60px; }
.brand.lg { margin-bottom: 28px; gap: 10px; }
.brand-sub { padding-left: .16em; font: 700 12px/1 var(--font-display); letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3); }

.notice { padding: 14px 16px; border-radius: 6px; background: var(--accent-soft); color: var(--ink); font-size: 15px; text-wrap: pretty; border-left: 0; }
.notice.warn { background: color-mix(in srgb, var(--z3) 30%, var(--surface)); }
.notice + .notice { margin-top: 10px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin-top: 10px; }
.kv dt { color: var(--ink-3); font-weight: 600; } .kv dd { margin: 0; font-weight: 700; text-align: right; }

/* ---------- pestañas ---------- */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: var(--bg); border-top: 3px solid var(--ink); padding-bottom: env(safe-area-inset-bottom); }
.tabs nav { max-width: 560px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, 1fr); height: var(--tab-h); }
.tabs a { display: grid; justify-items: center; align-content: center; gap: 3px; color: var(--ink-3); text-decoration: none; font-family: var(--font-display); font-size: 14px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; min-height: 48px; position: relative; }
.tabs a svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: square; stroke-linejoin: miter; }
.tabs a[aria-current="page"] { color: var(--ink); }
.tabs a[aria-current="page"]::before { content: ""; position: absolute; top: -3px; left: 18%; right: 18%; height: 6px; background: var(--ink); }
body.nonav .tabs { display: none; }

.toast { position: fixed; left: 50%; bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 14px); transform: translate(-50%, 20px); background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 6px; font-weight: 700; font-size: 14px; opacity: 0; pointer-events: none; transition: all .35s var(--ease); z-index: 20; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .stage-box svg { clip-path: none; }
}
@media (min-width: 700px) { #app { padding-top: 40px; } }
