/* Citizen Radar — identidad: barrido de radar. Tinta #0F1B2D, señal verde #12B886, señal de incidencia ámbar #FFD43B.
   Rótulos en Space Mono (servida desde la app, sin Google Fonts: RGPD/CSP). Sin estilos en línea (CSP). */
@font-face { font-family: 'Space Mono'; src: url(/fonts/spacemono-400-latin.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Space Mono'; src: url(/fonts/spacemono-700-latin.woff2) format('woff2'); font-weight: 700; font-display: swap; }
:root {
  --ink: #0F1B2D; --ink-2: #16253B; --ink-line: #24364F;
  --signal: #12B886; --signal-text: #0B7A57; --signal-soft: #E3F7EF;
  --amber: #FFD43B; --amber-text: #8A5A00;
  --bg: #F4F6F8; --surface: #FFFFFF; --text: #13202F; --muted: #5A6878; --border: #DDE3EA;
  --ok: #1B7F4A; --ok-soft: #E6F4EC; --warn: #8A5A00; --warn-soft: #FFF4D6; --err: #B3261E; --err-soft: #FBEAEA;
  --info: #1864AB; --info-soft: #E7F1FB;
  --radius: 10px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: 'Space Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0B1420; --surface: #132033; --text: #E9EEF4; --muted: #9AA8B8; --border: #24364F;
    --signal-text: #4FD1A5; --signal-soft: #10302A; --amber-text: #FFD43B;
    --ok: #5CC28A; --ok-soft: #173325; --warn: #E3B341; --warn-soft: #3A2F10; --err: #FF8A80; --err-soft: #3A1618;
    --info: #74C0FC; --info-soft: #132B44;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); font-size: 16px; line-height: 1.5; background: var(--bg); color: var(--text); }
a { color: var(--signal-text); }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.015em; }
h1 { font-size: clamp(1.9rem, 5vw, 2.9rem); margin: 0 0 .6rem; font-weight: 800; }
h2 { font-size: clamp(1.3rem, 3vw, 1.6rem); margin: 2rem 0 .8rem; font-weight: 800; }
h3 { font-size: 1.05rem; margin: 0 0 .35rem; font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.mono { font-family: var(--mono); font-size: .88em; }
.hidden { display: none !important; }
.kicker { font-family: var(--mono); color: var(--signal-text); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: .75rem; margin: 0 0 .5rem; }

/* ── Cabecera ── */
header.site { background: var(--ink); color: #fff; position: sticky; top: 0; z-index: 1000; }
header.site .inner { max-width: 1200px; margin: 0 auto; padding: .55rem 16px; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .55rem; color: #fff; text-decoration: none; font-weight: 800; letter-spacing: .01em; font-size: 1.05rem; }
.brand img { height: 32px; width: 32px; }
.brand em { color: var(--signal); font-style: normal; }
nav.main { display: flex; gap: .15rem; flex-wrap: wrap; }
nav.main a { color: #C5D0DC; text-decoration: none; padding: .4rem .65rem; border-radius: 6px; font-size: .93rem; font-weight: 600; }
nav.main a:hover, nav.main a.active { color: #fff; background: rgba(255,255,255,.08); }
nav.main a.active { box-shadow: inset 0 -2px 0 var(--signal); border-radius: 6px 6px 0 0; }
.spacer { flex: 1; }
.langswitch { display: inline-flex; }
.langbtn { background: transparent; border: 1px solid rgba(255,255,255,.3); color: #fff; padding: .3rem .6rem; font-family: var(--mono); font-size: .75rem; letter-spacing: .06em; cursor: pointer; }
.langswitch .langbtn + .langbtn { border-left: none; }
.langbtn[aria-pressed="true"] { background: var(--signal); border-color: var(--signal); color: var(--ink); font-weight: 700; }
.userbox { color: #C5D0DC; font-size: .85rem; display: flex; gap: .6rem; align-items: center; }
.userbox button { background: none; border: none; color: #fff; text-decoration: underline; cursor: pointer; font: inherit; }
.accent-line { height: 3px; background: linear-gradient(90deg, var(--signal), var(--signal) 70%, var(--amber)); }

main { max-width: 1200px; margin: 0 auto; padding: 1.5rem 16px 4rem; min-height: 60vh; }
footer.site { background: var(--ink); color: #9AA8B8; font-size: .85rem; }
footer.site .inner { max-width: 1200px; margin: 0 auto; padding: 1.2rem 16px; display: flex; gap: 1rem; flex-wrap: wrap; justify-content: space-between; }
footer.site a { color: #C5D0DC; }

/* ── Portada ── */
.hero { background: var(--ink); color: #fff; padding: clamp(1.6rem, 5vw, 3.4rem); border-radius: var(--radius); margin-bottom: 1.5rem;
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 2rem; align-items: center; overflow: hidden; position: relative; }
.hero p.lead { color: #CFD8E3; max-width: 60ch; font-size: 1.08rem; }
.hero .motto { font-family: var(--mono); color: var(--signal); font-weight: 700; letter-spacing: .04em; font-size: clamp(1rem, 2.4vw, 1.25rem); margin: 0 0 1rem; }
.hero .actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1.2rem; }
.scope { position: relative; width: min(300px, 100%); aspect-ratio: 1; margin: 0 auto; border-radius: 50%;
  background: radial-gradient(circle, rgba(18,184,134,.10) 0 1px, transparent 1px 100%), var(--ink-2);
  box-shadow: inset 0 0 0 2px rgba(18,184,134,.7), inset 0 0 0 40px var(--ink-2), inset 0 0 0 41px rgba(18,184,134,.35), inset 0 0 0 80px var(--ink-2), inset 0 0 0 81px rgba(18,184,134,.25); }
.scope::before { content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(18,184,134,.55), rgba(18,184,134,0) 70deg, transparent 360deg);
  animation: sweep 4s linear infinite; }
.scope .blip { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 12px var(--signal); }
.scope .blip.a { left: 64%; top: 26%; background: var(--amber); box-shadow: 0 0 12px var(--amber); }
.scope .blip.b { left: 30%; top: 58%; } .scope .blip.c { left: 70%; top: 66%; }
@keyframes sweep { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .scope::before { animation: none; } }
@media (max-width: 760px) { .hero { grid-template-columns: 1fr; } .scope { width: 180px; } }

.acrostic { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .8rem; }
.acrostic .step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; }
.acrostic .letter { font-family: var(--mono); font-weight: 700; font-size: 1.6rem; color: var(--signal-text); line-height: 1; }
.acrostic .step h3 { margin-top: .4rem; }

/* ── Tarjetas, formularios y botones ── */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.2rem; margin-bottom: 1rem; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 1rem; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 1rem; }
.field { display: block; margin-bottom: .85rem; }
.field > span { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .25rem; }
.field .hint { display: block; font-size: .8rem; color: var(--muted); margin-top: .2rem; font-weight: 400; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time], input[type=search], select, textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: .5rem .65rem; }
textarea { min-height: 5.5rem; resize: vertical; }
textarea.code { font-family: var(--mono); font-size: .8rem; min-height: 22rem; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--signal); outline-offset: 1px; }
input[type=color] { width: 2.6rem; height: 2.2rem; padding: 0; border: 1px solid var(--border); border-radius: 6px; background: none; }
.check { display: flex; gap: .5rem; align-items: flex-start; margin: .3rem 0; }
.check input { margin-top: .25rem; }
.btn { display: inline-flex; align-items: center; gap: .4rem; font: inherit; font-weight: 600; font-size: .93rem; padding: .5rem .95rem; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; text-decoration: none; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--signal); border-color: var(--signal); color: #06281C; }
.btn.primary:hover { background: #0FA376; }
.btn.danger { color: var(--err); border-color: var(--err); }
.btn.ghost { background: transparent; border-color: rgba(255,255,255,.35); color: #fff; }
.btn.small { padding: .25rem .6rem; font-size: .82rem; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.stack > * + * { margin-top: .6rem; }
.notice { padding: .7rem .9rem; border-radius: 8px; margin: 0 0 1rem; border: 1px solid transparent; }
.notice.ok { background: var(--ok-soft); color: var(--ok); border-color: currentColor; }
.notice.warn { background: var(--warn-soft); color: var(--warn); border-color: currentColor; }
.notice.err { background: var(--err-soft); color: var(--err); border-color: currentColor; }
.notice.info { background: var(--info-soft); color: var(--info); border-color: currentColor; }
.notice p { margin: .2rem 0 0; color: var(--text); }
.chip { display: inline-flex; align-items: center; gap: .3rem; font-family: var(--mono); font-size: .72rem; letter-spacing: .04em; text-transform: uppercase;
  padding: .12rem .5rem; border-radius: 999px; background: var(--bg); border: 1px solid var(--border); white-space: nowrap; }
.chip.s-draft { color: var(--muted); }
.chip.s-submitted { color: var(--info); background: var(--info-soft); border-color: currentColor; }
.chip.s-approved, .chip.s-active { color: var(--ok); background: var(--ok-soft); border-color: currentColor; }
.chip.s-changes { color: var(--warn); background: var(--warn-soft); border-color: currentColor; }
.chip.s-closed, .chip.s-archived { color: var(--muted); }
.swatch { display: inline-block; width: .85rem; height: .85rem; border-radius: 50%; vertical-align: -.1rem; flex: none; }
.code-big { font-family: var(--mono); font-weight: 700; font-size: 1.8rem; letter-spacing: .18em; color: var(--signal-text); }
.linkbox { font-family: var(--mono); font-size: .82rem; word-break: break-all; background: var(--bg); padding: .5rem .6rem; border-radius: 8px; border: 1px solid var(--border); }
.loading { color: var(--muted); }
.feedback { font-size: .85rem; margin-left: .3rem; }
.feedback.ok { color: var(--ok); } .feedback.err { color: var(--err); }

/* ── Mapas ── */
.map { height: 460px; border-radius: var(--radius); border: 1px solid var(--border); z-index: 0; }
.map.tall { height: 560px; }
@media (max-width: 760px) { .map, .map.tall { height: 380px; } }
.leaflet-container { font-family: var(--font); }
.vtx { width: 14px !important; height: 14px !important; margin: -7px 0 0 -7px !important; border: 2px solid #fff; border-radius: 3px; background: var(--ink); box-shadow: 0 0 0 1px var(--ink); cursor: move; }
.vtx.first { background: var(--signal); border-radius: 50%; }
.maptools { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; margin: .5rem 0; }
.maptools .hint { font-size: .82rem; color: var(--muted); }
.legend { display: flex; gap: .8rem; flex-wrap: wrap; font-size: .85rem; margin-top: .5rem; }
.legend span { display: inline-flex; gap: .35rem; align-items: center; }

/* ── Radar: espacio del equipo ── */
.radar-head { background: var(--ink); color: #fff; border-radius: var(--radius); padding: clamp(1.2rem, 4vw, 2.2rem); margin-bottom: 1rem; }
.radar-head .question { color: #CFD8E3; font-size: 1.1rem; max-width: 70ch; margin: 0; }
.radar-head .meta { font-family: var(--mono); font-size: .78rem; color: #9AA8B8; letter-spacing: .04em; margin-top: .8rem; display: flex; gap: 1rem; flex-wrap: wrap; }
.steps { display: flex; gap: 0; margin: 0 0 1rem; padding: 0; list-style: none; overflow-x: auto; }
.steps li { flex: 1 1 0; min-width: 7.5rem; padding: .55rem .7rem; border: 1px solid var(--border); background: var(--surface); font-size: .85rem; }
.steps li + li { border-left: none; }
.steps li:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.steps li:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
.steps li .n { font-family: var(--mono); font-weight: 700; color: var(--muted); display: block; font-size: .72rem; letter-spacing: .08em; }
.steps li.done { color: var(--ok); }
.steps li.current { background: var(--signal-soft); box-shadow: inset 0 -3px 0 var(--signal); font-weight: 700; }
.teambar { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; margin-bottom: 1rem; }
.teambar .team { display: inline-flex; gap: .45rem; align-items: center; font-weight: 800; font-size: 1.1rem; }
.sessions-list { list-style: none; margin: 0; padding: 0; }
.sessions-list li { padding: .55rem 0; border-top: 1px solid var(--border); display: flex; gap: .8rem; flex-wrap: wrap; }
.sessions-list li:first-child { border-top: none; }
.sessions-list .when { font-family: var(--mono); font-size: .8rem; color: var(--muted); min-width: 10rem; }
.answers dt { font-weight: 700; margin-top: .7rem; }
.answers dd { margin: .15rem 0 0; white-space: pre-wrap; }

@media print { header.site, footer.site, .noprint { display: none !important; } main { padding: 0; } }
.loginbox { max-width: 440px; margin: 2rem auto; }
fieldset.field { border: none; padding: 0; margin: 0 0 .85rem; min-width: 0; }
fieldset.field > legend { font-size: .85rem; font-weight: 600; padding: 0; margin-bottom: .25rem; }
.userbox a { color: #fff; }
.captchabox { margin: .2rem 0 .9rem; min-height: 0; }

/* ── Portada (v2): clara y sobria, inspirada en el esquema R·A·D·A·R ── */
:root { --deep: #0B3D2E; --s1: #3BA55C; --s2: #12A594; --s3: #8DB31B; --s4: #0E8C7E; --s5: #1F5C4F; }
@media (prefers-color-scheme: dark) { :root { --deep: #CFEFE3; --s1: #5CC27A; --s2: #36C2B0; --s3: #A9CF3A; --s4: #3DB3A4; --s5: #7FB8AA; } }
.kicker.spaced { letter-spacing: .32em; }
.hero2 { position: relative; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 2rem; align-items: center;
  padding: clamp(1.5rem, 5vw, 3.5rem) clamp(1rem, 4vw, 3rem); margin: 0 0 2.5rem; border-radius: 18px; overflow: hidden;
  background: radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--signal) 10%, var(--surface)) 0%, var(--surface) 55%);
  border: 1px solid var(--border); }
.hero2 h1 { font-size: clamp(2.4rem, 6.5vw, 4.2rem); letter-spacing: -.035em; color: var(--deep); margin: .1rem 0 .4rem; }
.hero2 .motto { font-family: var(--mono); color: var(--signal-text); font-weight: 700; font-size: clamp(.95rem, 2.2vw, 1.15rem); margin: 0 0 1rem; }
.hero2 .lead { color: var(--muted); font-size: 1.1rem; max-width: 56ch; margin: 0 0 1.6rem; }
.hero-scope { width: 100%; max-width: 380px; justify-self: center; }
.hero-scope .ring { fill: none; stroke: var(--signal); stroke-opacity: .28; stroke-width: 1.2; }
.hero-scope .ring:first-child { stroke-opacity: .5; }
.hero-scope .sweep { fill: url(#sweep); transform-origin: 200px 200px; animation: sweep 7s linear infinite; }
.hero-scope .core { fill: var(--signal); }
.hero-scope .blip { fill: var(--s4); animation: blink 3.5s ease-in-out infinite; }
.hero-scope .blip.amber { fill: #E9D21B; animation-delay: .8s; }
.hero-scope .blip.teal { fill: var(--s2); animation-delay: 1.9s; }
@keyframes blink { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .hero-scope .sweep, .hero-scope .blip { animation: none; } }
@media (max-width: 760px) { .hero2 { grid-template-columns: 1fr; } .hero-scope { position: absolute; right: -90px; top: -90px; width: 260px; opacity: .45; } .hero2-text { position: relative; } }

.codebox { max-width: 460px; }
.codebox-label { display: block; font-weight: 700; margin-bottom: .4rem; }
.codebox-row { display: flex; gap: .5rem; }
.codebox-row input { font-family: var(--mono); font-size: 1.15rem; letter-spacing: .14em; text-transform: uppercase; padding: .65rem .8rem; flex: 1 1 auto; min-width: 0; }
.codebox-row .btn { padding: .65rem 1.2rem; font-size: 1rem; }
.codebox p { margin: .5rem 0 0; }

.method { margin: 0 0 3rem; }
.method-title { font-size: clamp(2.4rem, 6vw, 3.8rem); letter-spacing: .01em; color: var(--deep); margin: .2rem 0 .3rem; }
.method-lead { color: var(--muted); font-size: 1.15rem; margin: 0 0 1.8rem; }
.steps5 { list-style: none; margin: 0; padding: 0 0 2.4rem; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .9rem; position: relative; }
.step5 { --c: var(--s1); position: relative; border-radius: 16px; padding: 1.2rem 1.2rem 1.6rem;
  background: linear-gradient(160deg, color-mix(in srgb, var(--c) 11%, var(--surface)), color-mix(in srgb, var(--c) 4%, var(--surface)));
  border: 1px solid color-mix(in srgb, var(--c) 18%, var(--border)); }
.step5.s2 { --c: var(--s2); } .step5.s3 { --c: var(--s3); } .step5.s4 { --c: var(--s4); } .step5.s5 { --c: var(--s5); }
.step5 .num { font-family: var(--mono); font-weight: 700; font-size: 1.5rem; color: var(--c); display: block; }
.step5 .ico-wrap { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; margin: .3rem auto .9rem;
  background: color-mix(in srgb, var(--c) 16%, var(--surface)); color: var(--c); }
.step5 .ico { width: 40px; height: 40px; }
.step5 h3 { font-size: 1.3rem; letter-spacing: -.02em; color: var(--deep); margin: 0 0 .35rem; }
.step5 p { color: var(--muted); margin: 0; font-size: .97rem; }
/* Hilo conductor: punto de cada paso y flecha discontinua al siguiente */
.step5 .dot { position: absolute; left: 50%; bottom: -2.05rem; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; background: var(--c);
  box-shadow: 0 0 0 4px var(--bg); }
.step5:not(:last-child)::after { content: ""; position: absolute; left: calc(50% + 14px); width: calc(100% - 28px + .9rem); bottom: -1.5rem; height: 0;
  border-top: 2px dashed color-mix(in srgb, var(--c) 70%, transparent); }
.step5:not(:last-child)::before { content: ""; position: absolute; right: calc(-50% - .9rem + 16px); bottom: calc(-1.5rem - 4px); width: 8px; height: 8px;
  border-top: 2px solid var(--c); border-right: 2px solid var(--c); transform: rotate(45deg); }
@media (max-width: 900px) {
  .steps5 { grid-template-columns: 1fr; padding: 0; gap: .7rem; }
  .step5 { display: grid; grid-template-columns: auto 1fr; column-gap: 1rem; align-items: center; padding: 1rem; }
  .step5 .num { grid-column: 1; grid-row: 1; font-size: 1.1rem; }
  .step5 .ico-wrap { grid-column: 1; grid-row: 2 / span 2; width: 56px; height: 56px; margin: .2rem 0 0; }
  .step5 .ico { width: 30px; height: 30px; }
  .step5 h3 { grid-column: 2; grid-row: 1 / span 2; align-self: end; }
  .step5 p { grid-column: 2; grid-row: 3; }
  .step5 .dot, .step5::before, .step5::after { display: none; }
}

.scales { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 2rem; align-items: center; margin: 0 0 1rem;
  padding: 1.6rem; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); }
.scales h2 { margin-top: 0; color: var(--deep); }
.scale-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .6rem; }
.scale-list li { display: flex; gap: .6rem; align-items: center; font-weight: 600; font-size: .92rem; padding: .55rem .7rem; border-radius: 10px; background: var(--bg); }
.scale-list .ico-wrap { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--signal-soft); color: var(--signal-text); flex: none; }
.scale-list .ico { width: 20px; height: 20px; }
@media (max-width: 760px) { .scales { grid-template-columns: 1fr; } }

/* ── Pie: Citizen Radar · UPRAISE · enlaces legales ── */
footer.site .inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) auto; gap: 1.5rem 2.5rem; align-items: start; padding: 2rem 16px; }
footer.site p { margin: .3rem 0 0; }
footer.site .foot-kicker { font-family: var(--mono); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: #9AA8B8; margin: 0 0 .5rem; }
footer.site .upraise img { height: 40px; width: auto; display: block; }
footer.site .eu { display: flex; align-items: center; gap: .6rem; margin-top: .8rem; font-size: .8rem; line-height: 1.35; }
footer.site .eu img { width: 42px; height: 28px; flex: none; }
footer.site .foot-links { display: flex; flex-direction: column; gap: .35rem; }
footer.site .foot-links a { color: #C5D0DC; text-decoration: none; }
footer.site .foot-links a:hover { color: #fff; text-decoration: underline; }
@media (max-width: 760px) { footer.site .inner { grid-template-columns: 1fr; } }

/* ── Página legal ── */
.legalhead { margin-bottom: 1.2rem; }
.legal-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 1.2rem; align-items: start; }
.legaltoc { position: sticky; top: 4.5rem; }
.legaltoc ul { list-style: none; margin: 0; padding: 0; }
.legaltoc a { display: block; padding: .45rem .7rem; border-radius: 8px; text-decoration: none; color: var(--text); font-weight: 600; }
.legaltoc a:hover { background: var(--surface); }
section.legal { scroll-margin-top: 5rem; }
section.legal h2 { margin-top: .2rem; }
section.legal h3 { margin-top: 1.2rem; }
section.legal p, section.legal li { color: var(--text); max-width: 75ch; }
table.legaltable { width: 100%; border-collapse: collapse; font-size: .88rem; }
table.legaltable th, table.legaltable td { text-align: left; vertical-align: top; padding: .55rem .6rem; border-bottom: 1px solid var(--border); }
table.legaltable thead th { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--bg); }
@media (max-width: 760px) { .legal-layout { grid-template-columns: 1fr; } .legaltoc { position: static; } }
.codebox-row .btn { white-space: nowrap; }
.scale-list { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.scale-list li { min-width: 0; overflow-wrap: anywhere; }

/* Cabecera oscura con el radar (versión refinada del original) */
.hero2.dark { background: radial-gradient(90% 120% at 85% 40%, #13304A 0%, var(--ink) 60%); border-color: var(--ink-line); color: #fff;
  box-shadow: 0 20px 50px -30px rgba(15, 27, 45, .6); }
.hero2.dark .kicker { color: #4FD1A5; }
.hero2.dark h1 { color: #fff; }
.hero2.dark .motto { color: var(--signal); }
.hero2.dark .lead { color: #CFD8E3; }
.hero2.dark .codebox-label { color: #fff; }
.hero2.dark .codebox p.muted { color: #9AA8B8; }
.hero2.dark .codebox-row input { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.22); color: #fff; }
.hero2.dark .codebox-row input::placeholder { color: rgba(255,255,255,.35); }
.hero2.dark .hero-scope { filter: drop-shadow(0 0 24px rgba(18,184,134,.18)); }
.hero2.dark .hero-scope .ring { stroke-opacity: .32; }
.hero2.dark .hero-scope .ring:first-child { stroke-opacity: .75; stroke-width: 1.6; }
.hero2.dark .hero-scope .blip { fill: var(--signal); }
.hero2.dark .hero-scope .blip.amber { fill: var(--amber); }
.hero2.dark .hero-scope .blip.teal { fill: #38D9A9; }
.hero2.dark .hero-scope .core { fill: #38D9A9; }
.hero-scope .ring.cross { stroke-opacity: .12; stroke-dasharray: 3 6; }
.hero2.dark .hero-scope .ring.cross { stroke-opacity: .18; }

/* Agenda de sesiones (página del radar) */
.agenda { display: flex; flex-direction: column; gap: 1.2rem; }
.day-head { display: flex; align-items: center; gap: .8rem; margin-bottom: .5rem; }
.day-head strong::first-letter { text-transform: uppercase; }
.day-num { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; width: 3.2rem; height: 3.2rem; border-radius: 12px;
  background: var(--signal-soft); color: var(--signal-text); line-height: 1; flex: none; font-weight: 800; }
.day-num .dn { font-size: 1.35rem; }
.day-num .dm { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; margin-top: .15rem; }
.agenda-items { list-style: none; margin: 0 0 0 1.55rem; padding: 0 0 0 1.6rem; border-left: 2px solid var(--border); }
.agenda-items li { position: relative; display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: .3rem 1rem; padding: .6rem 0; }
.agenda-items li + li { border-top: 1px dashed var(--border); }
.agenda-items li::before { content: ""; position: absolute; left: calc(-1.6rem - 6px); top: 1rem; width: 10px; height: 10px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--signal); }
.agenda-items li.k-field::before { background: var(--signal); }
.agenda-items .time { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text); }
.agenda-items .what strong { display: block; }
.agenda-items .meta { display: flex; gap: .4rem 1rem; flex-wrap: wrap; font-size: .9rem; color: var(--muted); margin-top: .15rem; }
.agenda-items .kind { color: var(--signal-text); font-weight: 600; }
@media (max-width: 560px) { .agenda-items li { grid-template-columns: 1fr; } .agenda-items { margin-left: .8rem; padding-left: 1.1rem; } .agenda-items li::before { left: calc(-1.1rem - 6px); } }

/* ── Fase 2: espacio de campo (móvil primero, objetivos táctiles grandes) ── */
.ws-tabs { display: flex; gap: .3rem; margin: 0 0 1rem; position: sticky; top: 3.3rem; z-index: 500; background: var(--bg); padding: .3rem 0; }
.ws-tabs button { flex: 1 1 0; font: inherit; font-weight: 700; padding: .75rem .5rem; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; }
.ws-tabs button[aria-selected="true"] { background: var(--ink); color: #fff; border-color: var(--ink); box-shadow: inset 0 -3px 0 var(--signal); }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; background: var(--surface); }
.seg button { font: inherit; font-size: .85rem; font-weight: 600; padding: .35rem .8rem; border: none; background: none; color: var(--text); cursor: pointer; }
.seg button + button { border-left: 1px solid var(--border); }
.seg button[aria-pressed="true"] { background: var(--signal); color: #06281C; }
.btn.big { padding: .85rem 1.4rem; font-size: 1.05rem; width: 100%; justify-content: center; }
.capture-form { display: flex; flex-direction: column; gap: 1rem; }
.cap-step { border: 1px solid var(--border); border-radius: 12px; padding: .9rem 1rem; background: var(--bg); }
.cap-step h3 { display: flex; align-items: center; gap: .5rem; margin: 0 0 .7rem; }
.cap-step h3 .n { display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--ink); color: #fff; font-size: .85rem; }
.cap-step .btn { min-height: 2.9rem; }
.loc-info { font-weight: 600; margin: .6rem 0; color: var(--muted); }
.loc-info.set { color: var(--ok); }
.map.mini { height: 240px; margin-top: .5rem; }
.media-prev { display: flex; gap: .6rem; align-items: flex-start; flex-wrap: wrap; margin-top: .6rem; }
.media-prev img, .media-prev video { max-width: min(100%, 320px); max-height: 240px; border-radius: 10px; background: #000; }
.choices { display: flex; flex-wrap: wrap; gap: .45rem; }
.choice { font: inherit; display: inline-flex; align-items: center; gap: .4rem; padding: .6rem .85rem; min-height: 2.75rem; border-radius: 999px;
  border: 1.5px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; font-weight: 600; }
.choice[aria-pressed="true"] { border-color: var(--signal); background: var(--signal-soft); color: var(--signal-text); box-shadow: inset 0 0 0 1px var(--signal); }
.choice.incident[aria-pressed="true"] { border-color: #E8A500; background: var(--warn-soft); color: var(--warn); box-shadow: inset 0 0 0 1px #E8A500; }
.capture-form input[type=number] { max-width: 10rem; font-size: 1.1rem; }
.outbox { border: 1px solid var(--info); background: var(--info-soft); border-radius: 12px; padding: .7rem .9rem; margin-bottom: 1rem; }
.outbox .notice { margin: .5rem 0 0; }
.cap-stats { display: flex; gap: 1.2rem; flex-wrap: wrap; margin: .6rem 0; font-size: .92rem; }
.cap-stats strong { font-size: 1.2rem; }
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; gap: .6rem; align-items: center; padding: .55rem .4rem; border-top: 1px solid var(--border); cursor: pointer; border-radius: 6px; }
.feed li:hover { background: var(--bg); }
.feed .grow { flex: 1 1 auto; min-width: 0; }
.cap-pop img { width: 100%; max-height: 180px; object-fit: cover; border-radius: 8px; display: block; margin-bottom: .4rem; }
.cap-pop video { width: 100%; max-height: 180px; border-radius: 8px; background: #000; margin-bottom: .4rem; }
.vals { display: grid; grid-template-columns: auto 1fr; gap: .15rem .7rem; margin: .5rem 0; font-size: .88rem; }
.vals dt { color: var(--muted); }
.vals dd { margin: 0; font-weight: 600; }
.chip.incident { color: var(--warn); background: var(--warn-soft); border-color: #E8A500; }
.swatch.ring { background: transparent; box-shadow: inset 0 0 0 3px #E8A500; }
.btn.resume { margin-bottom: .9rem; }

/* «Seguir en el móvil» (QR) */
.card.handoff { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.2rem; align-items: center; border-color: color-mix(in srgb, var(--signal) 40%, var(--border));
  background: linear-gradient(135deg, var(--signal-soft), var(--surface) 60%); }
.card.handoff h2 { margin: 0 0 .4rem; }
.card.handoff ol { margin: .4rem 0; padding-left: 1.2rem; }
.qr-box { width: 236px; height: 236px; display: grid; place-items: center; background: #fff; border-radius: 12px; border: 1px solid var(--border); padding: 8px; }
.qr-box img { width: 220px; height: 220px; display: block; }
@media (max-width: 640px) { .card.handoff { grid-template-columns: 1fr; } }

details.reentry { border: 1px dashed var(--border); border-radius: 10px; padding: .5rem .8rem; margin: 0 0 1rem; background: var(--surface); }
details.reentry summary { cursor: pointer; font-weight: 600; font-size: .92rem; }
details.reentry .vals dd.mono { font-size: 1.05rem; letter-spacing: .12em; }

.card.prep { border-color: var(--info); }
.card.prep h2 { margin-top: 0; }
.geo-help ol { margin: .5rem 0; padding-left: 1.2rem; }
.geo-help li { margin-bottom: .35rem; }

/* Marcador de señal: un sector por categoría */
.sig-wrap { background: none; border: none; }
.sig { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.45); box-sizing: border-box; cursor: pointer; }
.sig.incident { border-color: #E8A500; border-width: 3.5px; }
.sig.st-pending { opacity: .75; outline: 2px dashed rgba(15,27,45,.55); outline-offset: 1px; }
.sig.st-rejected { opacity: .3; }

/* ── Modo campo (móvil): solo capturar, ver lo propio y terminar ── */
body.field-mode footer.site, body.field-mode header.site .btn.ghost { display: none; }
body.field-mode main { padding-top: .6rem; }
.fm-test { margin: 0 0 .4rem; font-family: var(--mono); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--info); }
.fm-bar { display: flex; align-items: center; gap: .6rem; margin-bottom: .6rem; }
.fm-title { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.fm-title strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fm-menu { position: relative; }
.fm-menu summary { list-style: none; cursor: pointer; font-size: 1.4rem; line-height: 1; padding: .3rem .7rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.fm-menu summary::-webkit-details-marker { display: none; }
.fm-menu-panel { position: absolute; right: 0; top: calc(100% + .4rem); z-index: 900; width: min(320px, 86vw); display: flex; flex-direction: column; gap: .6rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: .8rem; box-shadow: 0 12px 30px rgba(0,0,0,.18); }
.fm-menu-panel details.reentry { margin: 0; }
.fm-tabs { top: 3.1rem; }
.fm-tabs .count { display: inline-block; min-width: 1.4rem; padding: 0 .35rem; border-radius: 999px; background: var(--signal); color: #06281C; font-size: .8rem; }
.fm-card { padding: .8rem; }
.cap-success { text-align: center; padding: 1.2rem .4rem .4rem; }
.cap-success h2 { margin: .4rem 0 .2rem; }
.big-check { width: 84px; height: 84px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; font-size: 2.8rem; font-weight: 800;
  color: #fff; background: var(--signal); box-shadow: 0 0 0 10px var(--signal-soft); animation: pop .35s ease-out; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .big-check { animation: none; } }
.send-state { font-weight: 700; font-size: 1.05rem; padding: .6rem .8rem; border-radius: 10px; margin: 1rem 0; }
.send-state.sending { background: var(--info-soft); color: var(--info); }
.send-state.sent { background: var(--ok-soft); color: var(--ok); }
.send-state.queued { background: var(--warn-soft); color: var(--warn); }
.send-state.failed { background: var(--err-soft); color: var(--err); }
.cap-success .stack { max-width: 360px; margin: 0 auto; }
.mine-list { list-style: none; margin: .6rem 0; padding: 0; }
.mine-item { display: flex; gap: .7rem; align-items: center; padding: .6rem 0; border-top: 1px solid var(--border); }
.mine-item:first-child { border-top: none; }
.mine-item img, .mine-item .thumb { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; flex: none; background: var(--bg); }
.mine-item .grow { flex: 1 1 auto; min-width: 0; }
.mine-item .note { color: var(--warn); margin-top: .15rem; }
.mine-item.queued { opacity: .85; }
.mine-side { display: flex; flex-direction: column; align-items: flex-end; gap: .3rem; }
.mine-mapbox summary { cursor: pointer; font-weight: 600; padding: .5rem 0; }
.map.mine-map { height: 300px; }
.map-check { background: var(--surface); padding: .3rem .5rem; border-radius: 8px; font-size: .8rem; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.fm-finish { text-align: center; }
.btn.finish { border-color: var(--ink); }
.fm-done { text-align: center; }
.back-field { margin-bottom: 1rem; }
.fix-box { display: block !important; border-top: none !important; padding: 0 0 .8rem !important; }
.map.fix-map { height: 240px; margin: .4rem 0; }
