[hidden] { display: none !important; }
@font-face { font-family: Manrope; font-style: normal; font-display: swap; font-weight: 400; src: url("/fonts/manrope-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: Manrope; font-style: normal; font-display: swap; font-weight: 500; src: url("/fonts/manrope-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: Manrope; font-style: normal; font-display: swap; font-weight: 600; src: url("/fonts/manrope-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: Manrope; font-style: normal; font-display: swap; font-weight: 800; src: url("/fonts/manrope-latin-800-normal.woff2") format("woff2"); }
:root {
  /* Imagen de Apogeo (apogeo.pro), modo oscuro */
  --bg: #14171c; --surface: #1b1f26; --surface-2: #20242c; --border: #2c313b;
  --ink: #f8f8f3; --ink-2: #a4a9b3; --ink-3: #868b95;
  --accent: #d4f27a; --accent-ink: #14171c; --accent-soft: #2a3122; --link: #d4f27a;
  --highlight: #d4f27a; --highlight-ink: #14171c;
  --good: #7fd6a0; --good-soft: #1a3326; --warn: #e6b04f; --warn-soft: #3a2f17; --bad: #f97066; --bad-soft: #3a1d1b;
  --radius: .75rem; --shadow: none;
  --font: Manrope, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; font-weight: 800; letter-spacing: -.02em; }
h1 { font-size: 1.5rem; } h2 { font-size: 1.15rem; } h3 { font-size: 1rem; }
p { margin: 0 0 .75em; }
code, pre, textarea.mono { font-family: var(--mono); font-size: .85em; }
pre { background: var(--surface-2); padding: .75rem; border-radius: 8px; overflow: auto; white-space: pre-wrap; word-break: break-word; }

.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 1rem; padding: .6rem 1.25rem; background: var(--surface); border-bottom: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: .5rem; font-weight: 700; color: var(--ink); }
.brand svg { color: var(--accent); }
.topbar .spacer { flex: 1; }
.topbar select { width: auto; }
.jobs-pill { font-size: .8rem; color: var(--ink-2); background: var(--surface-2); padding: .2rem .6rem; border-radius: 99px; display: none; }
.jobs-pill.on { display: inline-flex; align-items: center; gap: .4rem; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .3; } }

main { max-width: 1180px; margin: 0 auto; padding: 1.5rem 1.25rem 4rem; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.page-head .sub { color: var(--ink-2); font-size: .9rem; }

.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--border); margin-bottom: 1.25rem; overflow-x: auto; }
.tabs a { padding: .55rem .8rem; color: var(--ink-2); border-bottom: 2px solid transparent; white-space: nowrap; font-weight: 550; font-size: .92rem; }
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs a.active { color: var(--ink); border-bottom-color: var(--accent); }

.grid { display: grid; gap: 1rem; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); }
.mini { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem; box-shadow: var(--shadow); min-width: 0; }
.card > h2, .card > h3 { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.card.link { color: inherit; display: block; transition: border-color .15s; }
.card.link:hover { border-color: var(--accent); text-decoration: none; }
.muted { color: var(--ink-2); } .small { font-size: .85rem; } .tiny { font-size: .78rem; color: var(--ink-3); }
.stack > * + * { margin-top: 1rem; }
.row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }

.stat .label { color: var(--ink-2); font-size: .82rem; }
.stat .value { font-size: 1.7rem; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat .hint { font-size: .78rem; color: var(--ink-3); }

.score { display: inline-flex; align-items: center; justify-content: center; min-width: 2.6rem; height: 2.6rem; border-radius: 50%; font-weight: 700; font-variant-numeric: tabular-nums; border: 3px solid currentColor; }
.score.lg { min-width: 4.2rem; height: 4.2rem; font-size: 1.4rem; border-width: 4px; }
.s-good { color: var(--good); } .s-warn { color: var(--warn); } .s-bad { color: var(--bad); } .s-none { color: var(--ink-3); }

.badge { display: inline-block; font-size: .75rem; font-weight: 600; padding: .1rem .5rem; border-radius: 99px; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.badge.good { background: var(--good-soft); color: var(--good); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.accent { background: var(--accent-soft); color: var(--accent); }
.badge.beta { background: transparent; color: var(--ink-2); border: 1px dashed currentColor; text-transform: lowercase; letter-spacing: .02em; }

button, .btn { font: inherit; font-weight: 600; font-size: .9rem; border: 1px solid var(--border); background: var(--surface); color: var(--ink); padding: .45rem .9rem; border-radius: 8px; cursor: pointer; display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap; }
button:hover, .btn:hover { border-color: var(--ink-3); text-decoration: none; }
button.primary, .btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
button.danger { color: var(--bad); }
button.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
button:disabled { opacity: .55; cursor: default; }
input, select, textarea { font: inherit; width: 100%; padding: .5rem .65rem; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--ink); }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
textarea { min-height: 6rem; resize: vertical; }
label { display: block; font-weight: 600; font-size: .85rem; margin-bottom: .25rem; }
.field { margin-bottom: .9rem; }
.field .help { font-size: .78rem; color: var(--ink-3); margin-top: .2rem; }
.check-inline { display: inline-flex; align-items: center; gap: .35rem; font-weight: 500; margin-right: .8rem; }
.check-inline input { width: auto; }

table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: .5rem .55rem; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-size: .78rem; color: var(--ink-2); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }

.bars { display: grid; gap: .35rem; }
.bar-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem; font-size: .88rem; position: relative; padding: .2rem .4rem; }
.bar-row .fill { position: absolute; inset: 0 auto 0 0; background: var(--accent-soft); border-radius: 4px; z-index: 0; }
.bar-row > span { position: relative; z-index: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row > span.n { font-variant-numeric: tabular-nums; color: var(--ink-2); }

.chart svg { width: 100%; height: auto; display: block; }
.chart .axis { fill: var(--ink-3); font-size: 10px; }
.chart .grid-line { stroke: var(--border); stroke-width: 1; }
.chart .mark { fill: var(--accent); }
.chart .mark:hover { opacity: .75; }
.chart .line { stroke: var(--accent); stroke-width: 2; fill: none; }
.legend { display: flex; gap: 1rem; font-size: .8rem; color: var(--ink-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; background: var(--accent); margin-right: .3rem; vertical-align: -1px; }

.finding { display: grid; grid-template-columns: auto 1fr auto; gap: .6rem; padding: .65rem 0; border-bottom: 1px solid var(--border); align-items: start; }
.finding:last-child { border-bottom: 0; }
.finding .icon { width: 1.3rem; height: 1.3rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: .75rem; font-weight: 700; }
.finding .icon.ok { background: var(--good-soft); color: var(--good); }
.finding .icon.ko { background: var(--bad-soft); color: var(--bad); }
.finding .icon.na { background: var(--surface-2); color: var(--ink-3); }
.finding .t { font-weight: 600; font-size: .92rem; }
.finding .fix { font-size: .85rem; color: var(--ink-2); }
.finding .v { font-size: .78rem; color: var(--ink-3); word-break: break-word; }

.md { line-height: 1.65; }
.md h2 { font-size: 1.15rem; margin-top: 1.4em; } .md h3 { font-size: 1rem; margin-top: 1.2em; }
.md ul, .md ol { padding-left: 1.3rem; } .md table { margin: 1em 0; }
.answer { white-space: pre-wrap; font-size: .87rem; background: var(--surface-2); padding: .75rem; border-radius: 8px; max-height: 360px; overflow: auto; }
details summary { cursor: pointer; color: var(--accent); font-size: .85rem; font-weight: 600; }
.notice { padding: .7rem .9rem; border-radius: 8px; background: var(--accent-soft); color: var(--ink); font-size: .88rem; }
.notice.warn { background: var(--warn-soft); }
.notice.bad { background: var(--bad-soft); }
.empty { color: var(--ink-3); padding: 1.5rem 0; text-align: center; }

.login { max-width: 360px; margin: 12vh auto; }
.toast { position: fixed; bottom: 1.2rem; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: .55rem 1rem; border-radius: 8px; font-size: .9rem; z-index: 50; opacity: 0; transition: opacity .2s; pointer-events: none; }
.toast.on { opacity: 1; }
.editor { display: grid; grid-template-columns: minmax(0, 3fr) minmax(260px, 1.2fr); gap: 1rem; }
@media (max-width: 860px) { .editor { grid-template-columns: 1fr; } }

/* Móvil */
@media (max-width: 640px) {
  html, body { font-size: 15px; }
  .topbar { flex-wrap: wrap; gap: .4rem .5rem; padding: .5rem .75rem; }
  .topbar .spacer { display: none; }
  .brand { margin-right: auto; }
  .topbar #lang { order: 2; width: auto; padding: .35rem 2rem .35rem .5rem; }
  .topbar #logout { order: 3; padding: .35rem .5rem; }
  .topbar #project-switch { order: 10; flex: 1 1 60%; min-width: 0; padding: .4rem .55rem; }
  .topbar #rules-link { order: 11; font-size: .8rem; }
  .topbar #jobs { order: 12; }
  main { padding: 1rem .85rem 3rem; }
  h1 { font-size: 1.3rem; }
  .page-head { margin-bottom: .75rem; }
  .page-head > div { min-width: 0; }
  .page-head .sub { word-break: break-all; }
  .tabs { margin: 0 -.85rem 1rem; padding: 0 .85rem; scrollbar-width: none; scroll-snap-type: x proximity; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs a { padding: .55rem .6rem; scroll-snap-align: start; }
  .tabs { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
  .tabs.at-end { -webkit-mask-image: none; mask-image: none; }
  .card { padding: .85rem .9rem; }
  .grid { gap: .75rem; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat .value { font-size: 1.35rem; }
  .stat .label { font-size: .78rem; }
  .score.lg { min-width: 3.4rem; height: 3.4rem; font-size: 1.15rem; }
  .finding { grid-template-columns: auto minmax(0, 1fr); gap: .25rem .55rem; }
  .finding > .row { grid-column: 2; }
  input, select, textarea { font-size: 16px; } /* evita el zoom automático en iOS */
  select { max-width: 100%; }
  table { font-size: .82rem; }
  th, td { padding: .45rem .4rem; }
  td a { word-break: break-all; }
  .table-wrap { margin: 0 -.9rem; padding: 0 .9rem; }
  .table-wrap table td:first-child, .table-wrap table th:first-child { position: sticky; left: 0; background: var(--surface); z-index: 1; }
  textarea.body { min-height: 18rem; }
  .row > .btn, .row > button { flex: 0 1 auto; }
  .page-head > .row { width: 100%; }
  .login { margin: 6vh auto; }
  pre { font-size: .78rem; }
}
textarea.body { min-height: 28rem; font-family: var(--mono); font-size: .85rem; line-height: 1.55; }
.cell-yes { color: var(--good); font-weight: 700; } .cell-no { color: var(--bad); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* «Pásaselo a Claude» */
.prompt-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .6rem 1rem; align-items: center; padding: .75rem .9rem; margin-bottom: 1rem; border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.card .prompt-bar { box-shadow: none; background: var(--surface-2); margin: .5rem 0 .75rem; }
.pb-head { display: flex; gap: .6rem; align-items: flex-start; min-width: 0; }
.pb-head .tiny { margin-top: .1rem; }
.pb-icon { color: var(--accent); font-size: 1.1rem; line-height: 1.3; }
.pb-actions { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: flex-end; }
.pb-preview { grid-column: 1 / -1; }
.pb-preview pre { max-height: 22rem; overflow: auto; white-space: pre-wrap; font-size: .8rem; margin: 0 0 .4rem; }
@media (max-width: 860px) { .prompt-bar { grid-template-columns: 1fr; } .pb-actions { justify-content: flex-start; } }

/* Progreso de las consultas a IA */
.progress { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin: 0 0 .3rem; }
.progress i { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .4s ease; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Calendario de contenido */
.cal-month { min-width: 9.5rem; text-align: center; text-transform: capitalize; }
.cal-legend { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0 0 .6rem; }
.cal-head, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-head div { font-size: .72rem; font-weight: 600; color: var(--ink-3); text-transform: capitalize; padding: 0 .3rem .3rem; }
.cal-grid { border-top: 1px solid var(--border); border-left: 1px solid var(--border); }
.cal-day { min-height: 6.2rem; padding: .25rem; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.cal-day.out { background: var(--surface-2); }
.cal-day.out .cal-n { color: var(--ink-3); }
.cal-n { font-size: .75rem; font-weight: 600; color: var(--ink-2); }
.cal-day.today .cal-n { color: var(--accent); }
.cal-day.today .cal-n::after { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-left: .25rem; vertical-align: middle; }
.cal-wd { display: none; }
.ev { display: flex; align-items: center; gap: .2rem; min-width: 0; font-size: .72rem; line-height: 1.3; padding: .12rem .35rem; border-radius: 5px; background: var(--surface-2); color: var(--ink); text-decoration: none; border-left: 3px solid var(--ink-3); }
.cal-legend .ev { display: inline-flex; }
.ev-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
.ev-q { font-weight: 700; font-variant-numeric: tabular-nums; }
.ev-x { border: 0; background: none; padding: 0 .15rem; min-height: 0; font-size: .85rem; line-height: 1; color: var(--ink-2); cursor: pointer; }
.ev-idea { border-left-color: var(--accent); background: var(--accent-soft); }
.ev-sched { border-left-color: var(--accent); }
.ev-warn { border-left-color: var(--warn); background: var(--warn-soft); }
.ev-pub { border-left-color: var(--good); background: var(--good-soft); }
.ev-draft { border-left-color: var(--ink-3); }
.ev-auto { border-left-style: dashed; border-left-color: var(--ink-2); color: var(--ink-2); }
a.ev:hover { text-decoration: underline; }
@media (max-width: 720px) {
  /* En móvil, agenda: solo los días con algo, uno debajo de otro */
  .cal-head { display: none; }
  .cal-grid { grid-template-columns: 1fr; border: 0; }
  .cal-day { min-height: 0; border: 0; border-bottom: 1px solid var(--border); padding: .45rem 0; }
  .cal-day:not(.has):not(.today), .cal-day.out { display: none; }
  .cal-wd { display: inline; text-transform: capitalize; }
  .ev { font-size: .82rem; padding: .3rem .5rem; }
  .plan-art { flex-wrap: wrap; }
}

/* Alta por pasos */
.wiz { max-width: 1120px; margin: 0 auto; }
.wiz-narrow { max-width: 640px; padding-top: 2rem; }
.wiz h1 { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.1rem); line-height: 1.15; margin: .3rem 0 .4rem; letter-spacing: -.01em; }
.wiz-sub { color: var(--ink-2); margin: 0 0 1.25rem; max-width: 40rem; }
.wiz-top { display: flex; align-items: center; gap: 1.5rem; margin-bottom: 1.25rem; }
.wiz-progress { flex: 1; max-width: 32rem; }
.bar { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin-top: .35rem; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .3s ease; }
.wiz-top > a { margin-left: auto; white-space: nowrap; }
.wiz-cols { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 2rem; align-items: start; }
.wiz-main { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.wiz-main > .card { margin: 0; }
.wiz-back { align-self: flex-start; }
.wiz-actions { margin-top: .25rem; }
.wiz-actions .primary { min-width: 9rem; }
.wiz-aside { position: sticky; top: 1rem; background: var(--accent-soft); border-radius: calc(var(--radius) + 4px); padding: 1.25rem 1.4rem; min-width: 0; }
.wiz-aside h2 { font-size: 1.25rem; margin: 0 0 .75rem; }
.wiz-aside .card { box-shadow: none; }
.wiz-aside .prompt-bar { background: var(--surface); }
.what { display: flex; gap: .7rem; align-items: flex-start; background: var(--surface); border-radius: var(--radius); padding: .7rem .8rem; margin-bottom: .5rem; }
.url-input { display: flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--surface); }
.url-input span { padding: .55rem .7rem; background: var(--surface-2); color: var(--ink-3); border-right: 1px solid var(--border); font-size: .95rem; }
.url-input input { border: 0; border-radius: 0; flex: 1; min-width: 0; }
.url-input:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
.label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: .35rem; }
.big-word { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem); font-weight: 700; line-height: 1.1; margin: .1rem 0 1rem; letter-spacing: -.01em; }
.stat-n { font-size: 2rem; font-weight: 700; font-variant-numeric: tabular-nums; }

/* Lista de lectura en directo */
.read-list { list-style: none; padding: .25rem 1rem; margin: 0 0 1rem; }
.read-list li { display: grid; grid-template-columns: 1.6rem 1fr; gap: .7rem; align-items: start; padding: .8rem 0; border-bottom: 1px solid var(--border); }
.read-list li:last-child { border-bottom: 0; }
.read-list li.pending { color: var(--ink-3); }
.rs-icon { width: 1.3rem; height: 1.3rem; border-radius: 50%; border: 2px solid var(--border); display: inline-flex; align-items: center; justify-content: center; margin-top: .1rem; font-size: .75rem; font-weight: 700; }
.running .rs-icon { border-color: var(--accent); border-right-color: transparent; animation: spin .9s linear infinite; }
.done .rs-icon { border-color: var(--good); background: var(--good); color: #fff; }
.done .rs-icon::after { content: '✓'; }
.warn .rs-icon { border-color: var(--warn); color: var(--warn); }
.warn .rs-icon::after { content: '!'; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .running .rs-icon { animation: none; border-style: dotted; } }

/* Etiquetas y listas editables */
.chips { border: 1px solid var(--border); border-radius: 8px; padding: .4rem; background: var(--surface); display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.chips:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
.chips-items { display: contents; }
.chip { display: inline-flex; align-items: center; gap: .15rem; background: var(--surface-2); border-radius: 99px; padding: .2rem .25rem .2rem .7rem; font-size: .9rem; max-width: 100%; }
.chip-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip-x { border: 0; background: none; min-height: 0; width: 1.6rem; height: 1.6rem; padding: 0; border-radius: 50%; color: var(--ink-2); font-size: 1rem; line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.chip-x:hover, .chip-x:focus-visible { background: var(--surface); color: var(--bad); }
.chip-add { border: 0 !important; outline: none; flex: 1; min-width: 10rem; background: transparent; padding: .3rem .4rem; }
.chips-list { display: block; padding: 0; }
.chips-list .chips-items { display: block; }
.chips-list .chip { display: flex; justify-content: space-between; border-radius: 0; background: none; border-bottom: 1px solid var(--border); padding: .55rem .4rem .55rem .8rem; font-size: .95rem; }
.chips-list .chip-add { display: block; width: 100%; padding: .65rem .8rem; }
.origin { font-size: .78rem; font-weight: 600; white-space: nowrap; }
.origin.web { color: var(--accent); }
.origin.user { color: var(--ink-2); }

/* Segmentado */
.seg { display: inline-flex; background: var(--surface-2); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg-o { position: relative; margin: 0; }
.seg-o input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg-o span { display: block; padding: .45rem 1rem; border-radius: 8px; color: var(--ink-2); font-weight: 500; }
.seg-o input:checked + span { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); font-weight: 600; }
.seg-o input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }

/* Competidores y resumen */
.comp-list { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.comp-row { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: .7rem; align-items: center; padding: .65rem .8rem; border-bottom: 1px solid var(--border); cursor: pointer; margin: 0; font-weight: 400; }
.comp-row:last-child { border-bottom: 0; }
.comp-row:has(input:not(:checked)) { opacity: .65; }
.avatar { width: 2rem; height: 2rem; border-radius: 8px; background: var(--accent-soft); color: var(--accent); font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.comp-txt { min-width: 0; }
.comp-ev { display: block; margin-top: .1rem; }
.sum-row { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; padding: .7rem 0; border-bottom: 1px solid var(--border); }
.sum-row:last-child { border-bottom: 0; }
.launch-list { padding-left: 1.2rem; display: grid; gap: .5rem; }
.idea-list { padding-left: 1.2rem; display: grid; gap: .55rem; margin: 0 0 .75rem; }
.draft-card { border-style: dashed; }

@media (max-width: 860px) {
  .wiz-cols { grid-template-columns: 1fr; gap: 1.25rem; }
  .wiz-aside { position: static; }
  .wiz-top { flex-wrap: wrap; gap: .5rem; }
  .wiz-top > a { margin-left: 0; order: -1; }
  .wiz-progress { max-width: none; width: 100%; }
  .wiz-actions { position: sticky; bottom: 0; background: var(--bg); padding: .6rem 0; margin: 0; z-index: 2; }
  .wiz-actions .primary { flex: 1; }
}
.comp-row input[type=checkbox] { width: 1.1rem; height: 1.1rem; padding: 0; }
.chip-add:focus { outline: none; }

/* Confirmación dentro de la página */
.confirm-box { margin-top: .6rem; padding: .8rem .9rem; border: 1px solid var(--bad); background: var(--bad-soft); border-radius: var(--radius); font-size: .9rem; }
.confirm-box p { margin: 0 0 .6rem; }
button.danger-solid { background: var(--bad); border-color: var(--bad); color: #fff; font-weight: 600; }
button.danger-solid:hover { filter: brightness(1.08); }

/* Desplegables: flecha propia, centrada y con aire (la nativa queda pegada al borde) */
:root { --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none' stroke='%2355544f' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 4.5 6 7.5 9 4.5'/%3E%3C/svg%3E"); }
:root { --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none' stroke='%23a4a9b3' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 4.5 6 7.5 9 4.5'/%3E%3C/svg%3E"); }
select { -webkit-appearance: none; appearance: none; background-image: var(--chevron); background-repeat: no-repeat; background-position: right .7rem center; background-size: 12px; padding-right: 2.1rem; line-height: 1.3; cursor: pointer; }
select::-ms-expand { display: none; }
.topbar select { padding-top: .4rem; padding-bottom: .4rem; }
/* La barra de prompt se apila sola cuando su caja es estrecha (tarjetas, columnas) */
.prompt-bar { display: flex; flex-wrap: wrap; align-items: center; }
.pb-head { flex: 1 1 18rem; }
.pb-actions { flex: 0 1 auto; justify-content: flex-start; }
.pb-preview { flex: 1 1 100%; }

/* Lo fijo y los saltos de página quedan por debajo de la barra superior (su alto lo mide app.js) */
html { scroll-padding-top: calc(var(--topbar-h, 60px) + 1rem); }
.wiz-aside { top: calc(var(--topbar-h, 60px) + 1rem); max-height: calc(100vh - var(--topbar-h, 60px) - 2rem); overflow: auto; }

/* Tarjeta bloqueada durante la primera auditoría */
.project-card.locked { cursor: progress; border-style: dashed; }
.ring { position: relative; width: 2.9rem; height: 2.9rem; flex: none; display: inline-block; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 4; }
.ring-bg { stroke: var(--surface-2); }
.ring-fg { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset .6s ease; }
.ring-n { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: .72rem; font-weight: 700; font-variant-numeric: tabular-nums; }
/* Al terminar: check y después la nota */
.score-reveal { position: relative; animation: ring-pop .45s ease-out; }
.score-reveal .chk { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--good); font-size: 1.1rem; animation: chk-out .35s ease-in 1.1s forwards; }
.score-reveal .num { opacity: 0; animation: num-in .35s ease-out 1.4s forwards; }
.project-card.just-done { animation: card-glow 1.8s ease-out; }
@keyframes ring-pop { 0% { transform: scale(.7); } 70% { transform: scale(1.08); } 100% { transform: scale(1); } }
@keyframes chk-out { to { opacity: 0; transform: scale(.6); } }
@keyframes num-in { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
@keyframes card-glow { 0% { box-shadow: 0 0 0 0 var(--good-soft); } 30% { box-shadow: 0 0 0 6px var(--good-soft); } 100% { box-shadow: var(--shadow); } }
@media (prefers-reduced-motion: reduce) {
  .score-reveal, .project-card.just-done { animation: none; }
  .score-reveal .chk { display: none; }
  .score-reveal .num { opacity: 1; animation: none; }
}

/* Elegir quién hace el trabajo de IA */
.mode-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: .6rem; }
.mode-opt { display: flex; gap: .7rem; align-items: flex-start; border: 1px solid var(--border); border-radius: var(--radius); padding: .8rem .9rem; cursor: pointer; font-weight: 400; margin: 0; }
.mode-opt input { width: auto; margin-top: .25rem; }
.mode-opt > span { display: grid; gap: .2rem; }
.mode-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }


.topbar select, .topbar #lang { padding-right: 2.1rem; }

/* Marca Apogeo Beta */
.brand { gap: .45rem; font-weight: 800; letter-spacing: -.03em; font-size: 1.15rem; text-transform: lowercase; }
.brand svg { flex: none; }
.beta-tag { font-size: .66rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--highlight-ink); background: var(--highlight); padding: .12rem .42rem; border-radius: 99px; }
