/* axotl — estilos de la interfaz (ver canvas de diseño y CLAUDE.md §7)
   Orden: tokens · base · utilidades · tipografía · shell de la app (header, riel, main, estado, tooltip)
          · layout de página · botones · menús · formularios · tablas · repo · estados vacíos
          · pantallas sin sesión (login) · animaciones y carga · responsive */
:root {
  /* layout: margen lateral único de todo el contenido (32px escritorio, 20px celular) */
  --gutter: 32px;
  --bg: #0A0B0D; --bg-deep: #070809; --panel: #101215; --panel-2: #15181C;
  --line: #1F2328; --line-2: #2B3036;
  --text: #E9EBE6; --text-2: #B9BDC2; --muted: #8C929A; --faint: #7A8089;
  --lime: #C8F03C; --amber: #FFB547; --red: #FF6B6B; --blue: #7CC4FF;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: Inter, system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 13px/1.5 var(--mono); }
a { color: var(--text); text-decoration: none; }
a:hover { color: var(--lime); }
button, input, textarea, select { font: inherit; color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }

/* utilidades */
[hidden] { display: none !important; } /* el atributo gana a cualquier display de componente */
.muted { color: var(--muted); } .faint { color: var(--faint); } .lime { color: var(--lime); } .warn { color: var(--amber); }
.small { font-size: 12px; } .strong { font-weight: 700; } .right { text-align: right; } .grow { flex: 1; min-width: 0; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 420px; }
.prose { font-family: var(--sans); font-size: 14px; line-height: 1.6; color: var(--text-2); margin: 0; }
.cursor { color: var(--lime); }
.row { display: flex; gap: 16px; align-items: center; } .row.baseline { align-items: baseline; } .row.end { align-items: flex-end; } .wrap { flex-wrap: wrap; }
.push { margin-left: auto; }
.stack { display: flex; flex-direction: column; gap: 18px; } .stack-sm { display: flex; flex-direction: column; gap: 8px; }
.inline { display: inline; margin: 0; }
kbd { padding: 1px 6px; border: 1px solid var(--line-2); color: var(--muted); font: 11px var(--mono); }

/* tipografía */
.h1 { margin: 0; font-size: 44px; font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.h2 { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.mega { margin: 0; font-size: clamp(48px, 7vw, 84px); font-weight: 800; letter-spacing: -0.05em; line-height: 0.95; }
.mega-sm { margin: 0; font-size: clamp(32px, 5vw, 56px); font-weight: 800; letter-spacing: -0.045em; line-height: 1; }
label.row, label.check { text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--text-2); }
.label, label, legend { color: var(--muted); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }

/* Regla: un flex-basis fijo (flex: 1 1 300px) solo en hijos directos (>) de un contenedor en FILA.
   En un contenedor en columna ese valor es el ALTO (ya causó cajas gigantes dos veces). */

/* ── shell de la app ──────────────────────────────────────────────
   Header, riel y línea de estado fijos; solo <main> hace scroll.
   grid: top / rail+main / status, a la altura exacta de la ventana. */
body.has-app { height: 100vh; height: 100dvh; overflow: hidden; }
.app {
  height: 100%; display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
  grid-template-areas: "top top" "rail main" "status status";
}
.top { grid-area: top; position: relative; z-index: 30; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 10px 20px; min-height: 56px; background: var(--bg); border-bottom: 1px solid var(--line); }
.logo { font-weight: 800; font-size: 16px; letter-spacing: -0.02em; color: var(--text); }
.brand { white-space: nowrap; }
.cmd { position: relative; flex: 1 1 320px; max-width: 640px; display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 12px; background: var(--panel); border: 1px solid var(--line-2); }
.cmd:focus-within { border-color: var(--lime); }
.cmd-mark { color: var(--lime); font-weight: 700; }
.cmd input { flex: 1; min-width: 0; height: 100%; padding: 0; background: transparent; border: 0; outline: none; color: var(--text); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 12px; min-width: 0; }
.top-right > .ellipsis { max-width: 220px; }

.rail { grid-area: rail; position: relative; z-index: 20; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 0; background: var(--bg); border-right: 1px solid var(--line); }
.rail-item { position: relative; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border: 1px solid transparent; }
.rail-item svg { width: 20px; height: 20px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rail-item.on { background: var(--panel-2); border-color: var(--lime); }
.rail-item.on svg, .rail-item:hover svg, .rail-item:focus-visible svg { stroke: var(--lime); }

.main { grid-area: main; min-width: 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; scrollbar-color: var(--line-2) transparent; }
.main:focus { outline: none; }
/* .main es una columna flexible con altura fija: sin esto, los bloques con scroll propio
   (tablas, código) se encogen y cortan su contenido en vez de que haga scroll .main */
.main > * { flex-shrink: 0; }
/* línea de estado: segmentos de alto completo separados por líneas finas, como vim/tmux */
.status { grid-area: status; display: flex; align-items: stretch; height: 30px; background: var(--panel); border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.status .mode { display: flex; align-items: center; padding: 0 14px; background: var(--lime); color: var(--bg); font-weight: 800; letter-spacing: 0.08em; }
.status-ctx { flex: 1; min-width: 0; display: flex; overflow: hidden; }
.status-ctx > * { display: flex; align-items: center; gap: 6px; padding: 0 14px; border-right: 1px solid var(--line); white-space: nowrap; }
.status-ctx > :last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.status-key { display: flex; align-items: center; gap: 8px; padding: 0 14px; background: transparent; border: 0; border-left: 1px solid var(--line); color: var(--muted); font: inherit; cursor: pointer; }
.status-key:hover, .status-key:focus-visible { color: var(--lime); }
.status-key:hover kbd { border-color: var(--lime); color: var(--lime); }

.skip { position: fixed; top: 8px; left: 8px; z-index: 100; padding: 8px 12px; background: var(--lime); color: var(--bg); font-weight: 800; transform: translateY(-200%); }
.skip:focus { transform: none; color: var(--bg); }

/* tooltip (riel): etiqueta lima con texto oscuro y flecha hacia el ítem; aparece a la derecha
   al pasar el mouse o enfocar con teclado */
[data-tip]::after, [data-tip]::before { position: absolute; top: 50%; z-index: 40; pointer-events: none; opacity: 0; transition: opacity 0.12s ease, transform 0.12s ease; }
[data-tip]::after {
  content: attr(data-tip); left: calc(100% + 14px); padding: 5px 10px; white-space: nowrap;
  background: var(--lime); color: var(--bg); font-size: 12px; font-weight: 800; letter-spacing: 0.02em; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
  transform: translate(-4px, -50%);
}
[data-tip]::before { content: ""; left: calc(100% + 9px); border: 5px solid transparent; border-left: 0; border-right-color: var(--lime); transform: translate(-4px, -50%); }
[data-tip]:hover::after, [data-tip]:focus-visible::after,
[data-tip]:hover::before, [data-tip]:focus-visible::before { opacity: 1; transform: translate(0, -50%); transition-delay: 0.15s; }
[data-tip]:focus-visible::after, [data-tip]:focus-visible::before { transition-delay: 0s; }

/* layout de página */
.head { padding: 28px var(--gutter) 24px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 18px; }
.pad { padding: 28px var(--gutter); }
.narrow { max-width: 720px; }
/* Dos columnas, UN solo sistema para toda la app (.form-layout y .split-main son lo mismo):
   contenido flexible + panel de 400px, alineados al mismo margen (--gutter) que tablas y listas.
   Debajo de 1100px el panel baja y todo ocupa el ancho completo. */
.split-main, .form-layout { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 32px 40px; padding: 28px var(--gutter); }
.split-main > :first-child, .form-layout > :first-child { flex: 1 1 520px; min-width: 0; max-width: none; }
.split-main > .pad, .split-main > .narrow { padding: 0; max-width: none; }
.side, .preview { flex: 0 1 400px; max-width: 400px; min-width: 0; display: flex; flex-direction: column; gap: 18px; padding: 24px; background: var(--panel); border: 1px solid var(--line); }
/* el panel lateral pasa abajo cuando no cabe al lado */

/* botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 14px; background: transparent; border: 1px solid var(--line-2); color: var(--text); cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--lime); color: var(--lime); }
.btn.sm { height: 32px; padding: 0 10px; }
.btn.accent, .btn.outline { border-color: var(--lime); color: var(--lime); font-weight: 700; }
.btn.primary { background: var(--lime); border-color: var(--lime); color: var(--bg); font-weight: 800; }
.btn.primary:hover { color: var(--bg); filter: brightness(1.08); }
.btn.big { height: 50px; justify-content: space-between; padding: 0 18px; font-size: 15px; }
.btn.danger { color: var(--red); }
.btn.danger:hover { border-color: var(--red); color: var(--red); }
.avatar { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; background: var(--line-2); color: var(--text); border: 0; font-weight: 800; cursor: pointer; flex: none; }
.avatar.me { background: var(--lime); color: var(--bg); }
.avatar.me.on { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--lime); } /* estás en una página de tu cuenta */
.avatar.sm { width: 24px; height: 24px; font-size: 10px; }
.avatar.xl { width: 64px; height: 64px; font-size: 22px; cursor: default; }

/* menús desplegables (idioma, cuenta) */
.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; }
.menu > summary::-webkit-details-marker { display: none; }
.menu[open] > summary { outline: 2px solid var(--lime); outline-offset: 2px; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 10px); z-index: 50; min-width: 240px; max-width: 320px; background: var(--panel); border: 1px solid var(--line-2); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5); display: flex; flex-direction: column; animation: line-in 0.15s ease-out; }
.menu-head { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.menu-head .ellipsis { max-width: 100%; }
.menu-pop a, .menu-pop button { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 40px; padding: 0 14px; background: transparent; border: 0; text-align: left; cursor: pointer; color: var(--text); }
.menu-pop a:hover, .menu-pop button:hover, .menu-pop a:focus-visible, .menu-pop button:focus-visible { background: var(--panel-2); color: var(--lime); outline: none; }
.menu-pop form { margin: 0; border-top: 1px solid var(--line); }
.menu-pop .menu-danger { color: var(--red); }
.menu-pop-sm { min-width: 180px; }
.menu-label { padding: 10px 14px 4px; color: var(--faint); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
.menu-meta { color: var(--faint); font-size: 12px; }
.menu-pop [aria-checked="true"], .menu-pop a.on { color: var(--lime); }
.menu-sep { margin-top: 6px; border-top: 1px solid var(--line); padding-top: 12px; }
.menu-trigger { gap: 6px; }
.menu-trigger .ico { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; color: var(--muted); }
.menu-trigger .chevron { transition: transform 0.15s ease; }
.menu[open] > .menu-trigger { border-color: var(--lime); color: var(--lime); outline: none; }
.menu[open] > .menu-trigger .chevron { transform: rotate(180deg); }
.menu-pop .menu-danger:hover, .menu-pop .menu-danger:focus-visible { color: var(--red); background: #1A0F10; }

/* formularios */
.field { display: flex; flex-direction: column; gap: 8px; border: 0; margin: 0; padding: 0; min-width: 0; }
/* :where() deja estos estilos base con especificidad 0: cualquier componente (.cmd, .clone, .pw…) los sobreescribe sin !important */
:where(input:not([type=radio], [type=checkbox]), textarea, select), .fake-input { height: 44px; padding: 0 12px; background: var(--panel); border: 1px solid var(--line-2); outline: none; width: 100%; }
:where(textarea) { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.6; }
:where(input, textarea, select):focus { border-color: var(--lime); }
.fake-input { display: flex; align-items: center; color: var(--muted); }
.grid-owner { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 10px; }
.choice { display: flex; gap: 12px; padding: 12px 14px; border: 1px solid var(--line-2); text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--text); cursor: pointer; }
.choice span { display: flex; flex-direction: column; gap: 3px; }
.choice.on, .choice:has(input:checked) { border-color: var(--lime); background: #12160B; }
.choice.off { opacity: 0.55; cursor: not-allowed; }
input[type=radio], input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--lime); margin: 2px 0 0; }
.flash { margin: 0; padding: 12px 14px; border: 1px solid var(--line-2); }
.main > .flash { margin: 16px var(--gutter) 0; }
.flash.ok { border-color: var(--lime); background: #12160B; color: var(--lime); }
.flash.err { border-color: var(--red); background: #1A0F10; color: var(--red); }
.note { padding: 14px 16px; border: 1px dashed var(--line-2); display: flex; flex-direction: column; gap: 6px; }

/* formulario + vista previa: juntos a la izquierda; la vista previa acompaña al hacer scroll */
/* flex con wrap: la vista previa baja sola cuando no cabe al lado (depende del ancho de <main>, no de la ventana) */

@media (min-height: 760px) and (min-width: 1100px) { .preview { position: sticky; top: 28px; } }
@media (max-width: 1099px) { .side, .preview, .form-layout.settings > .danger-col { flex-basis: 100%; max-width: none; } }
.grid-2.align-start { align-items: start; }

/* formularios de ajustes */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; }
.tag.lime-tag { border-color: var(--lime); color: var(--lime); }
.err-detail { margin: 8px 0 0; padding: 8px 10px; background: var(--bg-deep); color: var(--text-2); font: 12px/1.5 var(--mono); white-space: pre-wrap; word-break: break-word; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; pointer-events: none; }

/* contraseña con ojo */
.pw { position: relative; }
.pw input { padding-right: 48px; }
.pw-eye { position: absolute; top: 0; right: 0; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; background: transparent; border: 0; cursor: pointer; }
.pw-eye svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.pw-eye:hover svg { stroke: var(--lime); }
.pw-eye .eye-off, .pw-eye[aria-pressed="true"] .eye-on { display: none; }
.pw-eye[aria-pressed="true"] .eye-off { display: block; }

/* tablas */
.table-wrap { overflow-x: auto; }
/* con espacio de sobra la tabla no necesita scroll y así los menús ⋯ de fila no se recortan */
@media (min-width: 900px) { .table-wrap { overflow: visible; } }
.table { width: 100%; border-collapse: collapse; min-width: 640px; }
.table th { text-align: left; padding: 10px 16px; color: var(--faint); font-size: 11px; font-weight: 400; letter-spacing: 0.08em; text-transform: uppercase; border-bottom: 1px solid var(--line); }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.main > .table-wrap .table th:first-child, .main > .table-wrap .table td:first-child { padding-left: var(--gutter); }
.tag { padding: 2px 8px; border: 1px solid var(--line-2); color: var(--text-2); font-size: 12px; }
.tag.interno { border-color: var(--blue); color: var(--blue); }
/* estados: lima listo · ámbar pendiente · rojo falló/vencido · gris apagado */
.tag.st-ok { border-color: var(--lime); color: var(--lime); }
.tag.st-wait { border-color: var(--amber); color: var(--amber); }
.tag.st-bad { border-color: var(--red); color: var(--red); }
.tag.st-off { color: var(--faint); }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 16px var(--gutter); border-bottom: 1px solid var(--line); }
.link-more { color: var(--muted); } .link-more:hover { color: var(--lime); }
.facts { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.facts > div { background: var(--bg); padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.facts dt { color: var(--faint); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
.facts dd { margin: 0; }
.stepper { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; counter-reset: step; font-size: 12px; }
.stepper li { counter-increment: step; flex: 1; padding: 8px 0 0; border-top: 2px solid var(--line-2); color: var(--faint); }
.stepper li::before { content: counter(step, decimal-leading-zero) " "; }
.stepper li.on { border-color: var(--lime); color: var(--lime); }
.quote { margin: 0; padding: 10px 14px; border-left: 2px solid var(--lime); background: var(--panel); font-family: var(--sans); color: var(--text-2); }
.quote cite { display: block; margin-top: 4px; font: 12px var(--mono); color: var(--faint); font-style: normal; }
.foot-note { padding: 18px var(--gutter); }
.tabs { display: flex; flex-wrap: wrap; margin-bottom: -24px; }
.tabs a { padding: 10px 16px; color: var(--muted); }
.tabs a.on { color: var(--text); font-weight: 700; box-shadow: inset 0 -2px 0 var(--lime); }

/* tablero (KPIs): tiras de celdas separadas por líneas finas, como .facts */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1px; background: var(--line); border-bottom: 1px solid var(--line); }
.kpi { background: var(--bg); padding: 18px 24px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.kpi:first-child { padding-left: var(--gutter); }
.keys-alert { margin: 16px var(--gutter) 0; }
.kpi-value { font-size: 34px; font-weight: 800; letter-spacing: -0.04em; line-height: 1.05; }
.kpi-value.sm { font-size: 22px; line-height: 1.6; }
.kpi-warn { box-shadow: inset 0 2px 0 var(--amber); }
.kpi-link { color: inherit; }
.kpi-link:hover { background: var(--panel); } .kpi-link:hover .muted { color: var(--lime); }

/* repo */
/* cabecera del repo: título y datos a la izquierda, clonado a la derecha; se apilan si no caben */
.repo-head .clone-box { flex: 0 1 500px; min-width: min(100%, 320px); display: flex; flex-direction: column; gap: 6px; }
.seg { display: flex; flex: none; border: 1px solid var(--line-2); }
.seg button { height: 28px; padding: 0 8px; background: transparent; border: 0; color: var(--muted); font: 12px var(--mono); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--lime); color: var(--bg); font-weight: 800; }
.repo-head .tabs { flex-basis: 100%; }
.flash.warn-flash { border-color: var(--amber); background: #1A150B; color: var(--amber); }
.roles { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.roles li { display: grid; grid-template-columns: 13ch minmax(0, 1fr); gap: 10px; color: var(--text-2); }
.roles strong { color: var(--text); }
.danger-zone { border: 1px solid #4A2326; }
.danger-title, .danger-text { color: var(--red); }
.disclosure { border-top: 1px solid var(--line); padding-top: 14px; }
.disclosure > summary { cursor: pointer; color: var(--muted); list-style: none; }
.disclosure > summary::before { content: "+ "; color: var(--lime); }
.disclosure[open] > summary { margin-bottom: 14px; color: var(--text); }
.disclosure[open] > summary::before { content: "− "; }
/* zona de riesgo: una fila por acción, texto a la izquierda y campo + botón a la derecha;
   en pantallas angostas el formulario baja debajo del texto. */
/* ajustes del repo: la zona de riesgo es el panel derecho de .form-layout (filas que se apilan por dentro) */
.form-layout.settings > .danger-col { flex: 0 1 400px; max-width: 400px; min-width: 0; }
.danger-col .danger-row { flex-direction: column; align-items: stretch; }
.danger-col .danger-text-col { flex: none; } /* columna: sin flex-basis (sería alto) */
.danger-col .danger-form { flex: 1 1 auto; }
.danger-col .danger-form input { flex: 1; width: auto; min-width: 0; }
.danger-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding: 16px 20px; }
.danger-row + .danger-row { border-top: 1px solid #4A2326; }
.danger-text-col { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.danger-form { flex: 0 1 auto; display: flex; align-items: center; gap: 8px; margin: 0; }
.danger-form input { width: 220px; height: 32px; }
@media (max-width: 720px) { .danger-form { flex: 1 1 100%; } .danger-form input { flex: 1; width: auto; } }
.confirm-name { align-self: flex-start; padding: 2px 8px; background: var(--bg-deep); border: 1px solid var(--line-2); color: var(--text); font: 13px var(--mono); user-select: all; overflow-wrap: anywhere; }
.inline-role { display: flex; gap: 8px; align-items: center; margin: 0; }
.inline-role select { height: 32px; width: auto; padding: 0 8px; }
.repo-head { flex-direction: row; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px 40px; }
.repo-title { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.break { overflow-wrap: anywhere; }
.meta { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 13px; }
.meta li { display: flex; gap: 8px; align-items: baseline; }
.clone { flex: none; display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 6px 0 12px; border: 1px solid var(--line-2); text-transform: none; letter-spacing: 0; font-size: 13px; }
.clone input { border: 0; background: transparent; height: 40px; padding: 0; color: var(--text); }
.last-commit { display: flex; align-items: center; gap: 12px; padding: 12px var(--gutter); border-bottom: 1px solid var(--line); background: var(--panel); }
.last-commit .grow.ellipsis { max-width: none; }
.tree { list-style: none; margin: 0; padding: 8px 0; }
.tree li { display: flex; gap: 10px; padding: 6px var(--gutter); }
.tree .ico { width: 10px; color: var(--faint); }
.tree .dir { color: var(--text); font-weight: 700; }
.tree li span:not(.dir):not(.ico) { color: var(--text-2); }
.readme { margin: 28px var(--gutter) 32px; border: 1px solid var(--line-2); background: var(--bg); }
.readme-head { display: flex; align-items: center; gap: 10px; padding: 12px 20px; background: var(--panel); border-bottom: 1px solid var(--line-2); font-weight: 700; }
.readme-head::before { content: ""; width: 14px; height: 16px; flex: none; border: 2px solid var(--lime); border-left-width: 4px; } /* librito */
.readme > .markdown { padding: 28px 32px; }
@media (max-width: 640px) { .readme > .markdown { padding: 20px; } }
.readme pre { margin: 0; padding: 16px; white-space: pre-wrap; font-family: var(--sans); font-size: 14px; line-height: 1.6; color: var(--text-2); }
.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }

/* estados vacíos y pasos */
.empty { padding: 32px var(--gutter); display: flex; flex-direction: column; gap: 18px; max-width: 1180px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.steps li { background: var(--bg); padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.steps .n { font-size: 36px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.cmdline { margin: 0; padding: 12px 14px; background: var(--bg-deep); border: 1px solid var(--line); font: 12px/1.7 var(--mono); white-space: pre; overflow-x: auto; }
.cmdline.wrap-any { white-space: pre-wrap; overflow-wrap: anywhere; }
.next { list-style: none; margin: 0; padding: 0; counter-reset: next; display: flex; flex-direction: column; gap: 10px; }
.next li { counter-increment: next; display: grid; grid-template-columns: 2.2ch minmax(0, 1fr); gap: 10px; align-items: baseline; color: var(--text-2); }
.next li .tag { margin-left: 6px; white-space: nowrap; }
.next li::before { content: counter(next, decimal-leading-zero); color: var(--faint); font-weight: 700; }

/* login */
.split { min-height: 100vh; display: flex; flex-wrap: wrap; }
.hero { flex: 999 1 560px; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; padding: 48px 56px; border-right: 1px solid var(--line); }
.panel { flex: 1 1 420px; max-width: 560px; position: relative; display: flex; flex-direction: column; justify-content: center; gap: 22px; padding: 48px 56px; }
.lang-toggle { position: absolute; top: 40px; right: 56px; display: flex; border: 1px solid var(--line-2); }
.lang-toggle a { height: 30px; padding: 0 10px; display: flex; align-items: center; color: var(--muted); }
.lang-toggle a.on { background: var(--lime); color: var(--bg); font-weight: 800; }

/* foto de fondo (Unsplash, licencia libre): desenfocada y fundida con el fondo; el texto va encima, nítido */
.hero { position: relative; isolation: isolate; overflow: hidden; }
.hero > :not(.hero-img) { position: relative; z-index: 1; }
.hero-img { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 55%;
  filter: blur(4px) brightness(0.55) saturate(0.9); transform: scale(1.06);
  -webkit-mask-image: linear-gradient(to right, rgba(0,0,0,.35), #000 55%), linear-gradient(to bottom, transparent, #000 25%, #000 70%, transparent);
  -webkit-mask-composite: source-in; mask-image: linear-gradient(to right, rgba(0,0,0,.35), #000 55%), linear-gradient(to bottom, transparent, #000 25%, #000 70%, transparent); mask-composite: intersect;
  animation: hero-img-in 1.6s ease-out both, hero-drift 30s ease-in-out 1.6s infinite alternate; }
@keyframes hero-img-in { from { opacity: 0; filter: blur(24px) brightness(0.4) saturate(0.9); } to { opacity: 1; filter: blur(4px) brightness(0.55) saturate(0.9); } }
@keyframes hero-drift { from { transform: scale(1.06); } to { transform: scale(1.12) translate(-1.5%, -1%); } }
.hero-body { display: flex; flex-direction: column; gap: 28px; }
.hero-title { text-shadow: 0 2px 30px rgba(10, 11, 13, 0.6); }
.hero-title > span { display: block; animation: rise-in 0.9s cubic-bezier(.2,.7,.2,1) both; }
.hero-title > span:nth-child(2) { animation-delay: 0.12s; }
.hero-title > span:nth-child(3) { animation-delay: 0.24s; }
.term { position: relative; max-width: 620px; border: 1px solid var(--line-2); background: rgba(7, 8, 9, 0.6); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); animation: rise-in 0.9s 0.4s cubic-bezier(.2,.7,.2,1) both; }
.term::after { content: ""; position: absolute; inset: -40px -60px; z-index: -1; background: radial-gradient(closest-side, rgba(200, 240, 60, 0.08), transparent); filter: blur(24px); pointer-events: none; }
.term-bar { display: flex; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.term-bar i { width: 10px; height: 10px; border: 1px solid var(--line-2); }
.term-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; line-height: 1.7; }
.term-body > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: line-in 0.35s ease-out both; }
.term-body > span:nth-child(1) { animation-delay: 0.9s; }
.term-body > span:nth-child(2) { animation-delay: 1.5s; }
.term-body > span:nth-child(3) { animation-delay: 1.9s; }
.term-body > span:nth-child(4) { animation-delay: 2.5s; }
@keyframes rise-in { from { opacity: 0; filter: blur(10px); transform: translateY(14px); } to { opacity: 1; filter: blur(0); transform: none; } }
@keyframes line-in { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }

/* carga: la A de la marca se dibuja (piernas → barra), se sostiene y vuelve a empezar; el _ parpadea */
.a-mark { width: 20px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: square; stroke-linejoin: miter; overflow: visible; }
.a-mark .a-legs, .a-mark .a-bar { stroke-dasharray: 1; stroke-dashoffset: 1; }
.a-mark .a-legs { animation: a-legs 1.4s cubic-bezier(.6, 0, .3, 1) infinite; }
.a-mark .a-bar { animation: a-bar 1.4s cubic-bezier(.6, 0, .3, 1) infinite; }
.a-mark .a-cursor { animation: a-blink 0.7s steps(1) infinite; }
@keyframes a-legs { 0% { stroke-dashoffset: 1; opacity: 1; } 45%, 80% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes a-bar { 0%, 35% { stroke-dashoffset: 1; opacity: 1; } 60%, 80% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes a-blink { 50% { opacity: 0; } }

/* botones: la A ocupa el lugar del ícono mientras la petición sigue */
.is-loading { pointer-events: none; }
.btn.is-loading { opacity: 0.9; }
.btn.big.is-loading { justify-content: flex-start; gap: 12px; }
.btn.big.is-loading .btn-end { margin-left: auto; }

/* páginas: el velo cubre solo el contenido (header, riel y estado siguen visibles) */
.page-loader { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: color-mix(in srgb, var(--bg) 72%, transparent); backdrop-filter: blur(2px); color: var(--lime);
  opacity: 0; visibility: hidden; transition: opacity 0.2s ease, visibility 0s linear 0.2s; }
.app > .page-loader { position: relative; inset: auto; grid-area: main; z-index: 10; }
.page-loader .a-mark { width: 60px; height: 48px; stroke-width: 2.2; }
.page-loader-text { color: var(--muted); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
body.is-navigating .page-loader { opacity: 1; visibility: visible; transition: opacity 0.12s ease, visibility 0s; }
body.is-busy::after, html.is-arriving body::after { content: ""; position: fixed; top: 0; left: 0; height: 3px; width: 100%; background: var(--lime); box-shadow: 0 0 8px var(--lime); transform-origin: left; z-index: 99; pointer-events: none; }
body.is-busy::after { animation: busy-bar 1.4s ease-out forwards; }
/* al llegar: la barra termina (85% → 100%) y se apaga; el contenido entra de abajo hacia arriba.
   En local una página tarda ~15 ms: sin esto la carga sería invisible. */
html.is-arriving body::after { animation: busy-done 0.5s ease-out forwards; }
html.is-arriving .main > * { animation: page-in 0.14s ease-out both; } /* corta: que se note el cambio, no que espere */
@keyframes busy-done { 0% { transform: scaleX(0.85); opacity: 1; } 60% { transform: scaleX(1); opacity: 1; } 100% { transform: scaleX(1); opacity: 0; } }
@keyframes page-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
/* el enlace que se pulsó queda marcado mientras carga */
a.is-pending { color: var(--lime); }
.rail-item.is-pending { border-color: var(--lime); animation: a-breathe 0.9s ease-in-out infinite; }
.rail-item.is-pending svg { stroke: var(--lime); }
@keyframes a-breathe { 50% { opacity: 0.35; } }
@keyframes busy-bar { from { transform: scaleX(0); } to { transform: scaleX(0.85); } }

/* ── componentes de las fases 1b–3 ─────────────────────────────────── */

/* token recién creado (se ve una vez) */
.token-new { display: flex; flex-direction: column; gap: 10px; padding: 16px; border: 1px solid var(--lime); background: #12160B; }
.token-new .clone { background: var(--bg); }

/* código de 6 dígitos: una casilla por número (axotl.js las arma a partir de .otp-fallback) */
.otp { display: flex; gap: 8px; }
.otp-box { width: 48px; height: 56px; padding: 0; text-align: center; font: 800 24px var(--mono); caret-color: var(--lime); }
.otp-box:focus { border-color: var(--lime); background: #12160B; }
.otp-box.filled { border-color: var(--line-2); color: var(--lime); }
.otp-sep { align-self: center; color: var(--faint); }
.otp-fallback { max-width: 200px; letter-spacing: 0.4em; font: 800 20px var(--mono); }
.mono-input { font-family: var(--mono); letter-spacing: 0.08em; }
.h3 { margin: 0; font-size: 15px; font-weight: 800; }
.codes { list-style: none; margin: 0; padding: 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px 20px; background: var(--bg-deep); border: 1px dashed var(--line-2); counter-reset: code; }
.codes li { counter-increment: code; display: flex; gap: 10px; align-items: baseline; }
.codes li::before { content: counter(code, decimal-leading-zero); color: var(--faint); font-size: 11px; }
.codes code { font-size: 15px; letter-spacing: 0.06em; color: var(--text); }
.setup-steps { list-style: none; margin: 0; padding: 0; counter-reset: st; display: flex; flex-direction: column; gap: 24px; }
.setup-steps > li { counter-increment: st; display: flex; flex-direction: column; gap: 10px; padding-left: 40px; position: relative; }
.setup-steps > li::before { content: counter(st, decimal-leading-zero); position: absolute; left: 0; top: -2px; color: var(--lime); font-weight: 800; font-size: 18px; }
.qr-box { align-self: flex-start; width: 196px; padding: 0; background: #fff; }
.qr-box .qr { display: block; width: 100%; height: auto; }
@media (max-width: 420px) { .otp { gap: 5px; } .otp-box { width: 40px; height: 50px; font-size: 20px; } }

/* personas: tarjetas en rejilla (se reacomoda según el ancho) */
.people { list-style: none; margin: 0; padding: 24px var(--gutter); display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.person-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); color: inherit; min-width: 0; }
.person-card:hover { border-color: var(--lime); background: var(--panel); }
.person-card .avatar { width: 40px; height: 40px; }

/* importación: barra de progreso */
.import-box { margin: 24px var(--gutter) 0; padding: 18px 20px; border: 1px solid var(--lime); background: #12160B; display: flex; flex-direction: column; gap: 10px; }
.import-box.failed { border-color: var(--red); background: #1A0F10; }
.bar { appearance: none; width: 100%; height: 6px; border: 0; background: var(--line); color: var(--lime); }
.bar::-webkit-progress-bar { background: var(--line); }
.bar::-webkit-progress-value { background: var(--lime); transition: width 0.4s ease; }
.bar::-moz-progress-bar { background: var(--lime); }

/* campana del header: menú con los últimos avisos */
.bell { position: relative; width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line-2); }
.bell svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bell:hover, .bell.on, .menu[open] > .bell { border-color: var(--lime); } .bell:hover svg, .bell.on svg, .bell.has svg { stroke: var(--lime); }
.bell .badge { position: absolute; top: -7px; right: -7px; min-width: 18px; height: 18px; padding: 0 4px; display: flex; align-items: center; justify-content: center; background: var(--lime); color: var(--bg); font: 800 10px var(--mono); }
.bell-pop { width: 380px; max-width: calc(100vw - 24px); padding: 0; }
.bell-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.bell-head form { margin: 0; border: 0; }
.menu-pop .link-btn, .link-btn { min-height: 0; width: auto; padding: 0; background: none; border: 0; color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; }
.menu-pop .link-btn:hover, .link-btn:hover { color: var(--lime); background: none; }
.menu-pop .bell-item { align-items: flex-start; justify-content: flex-start; gap: 12px; padding: 12px 14px; min-height: 0; border-bottom: 1px solid var(--line); position: relative; }
.bell-item .bell-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; color: var(--text-2); font-size: 13px; line-height: 1.45; }
.bell-item.unread { background: #12160B; }
.bell-item.unread .bell-text > span:first-child { color: var(--text); font-weight: 700; }
.bell-item.unread::before { content: ""; position: absolute; left: 4px; top: 20px; width: 5px; height: 5px; background: var(--lime); }
.bell-empty { margin: 0; padding: 18px 14px; font-size: 13px; }
.menu-pop .bell-all { justify-content: center; color: var(--lime); font-weight: 700; }

/* bandeja */
.inbox { list-style: none; margin: 0; padding: 0; }
.note-item { position: relative; display: flex; align-items: flex-start; gap: 14px; padding: 16px var(--gutter) 16px calc(var(--gutter) + 8px); border-bottom: 1px solid var(--line); }
.note-item .dot { position: absolute; left: calc(var(--gutter) - 10px); top: 26px; width: 7px; height: 7px; background: transparent; }
.note-item.unread { background: var(--panel); }
.note-item.unread .dot { background: var(--lime); }
.note-link { color: var(--text-2); }
.note-item.unread .note-link { color: var(--text); font-weight: 700; }
.note-link:hover { color: var(--lime); }
.decide { gap: 8px; flex: none; }
.decide form { margin: 0; }
.requests { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); }
.requests > li { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px 20px; padding: 14px 16px; }
.requests > li + li { border-top: 1px solid var(--line); }
.ask-box { margin: 20px var(--gutter) 0; padding: 12px 16px; border: 1px dashed var(--line-2); }
.ask-box .disclosure { border-top: 0; padding-top: 0; }

/* enlace a un repo: el nombre es lo que se busca con la vista */
.repo-link { font-family: var(--mono); white-space: nowrap; }
.repo-link .repo-owner { color: var(--muted); font-weight: 400; }
.repo-link .repo-name { color: var(--lime); font-weight: 800; }
.repo-link:hover .repo-name { text-decoration: underline; }
.table .repo-link { font-size: 15px; }

/* navegar el código */
.code-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 14px var(--gutter); border-bottom: 1px solid var(--line); }
.ref-name { max-width: 22ch; }
.ref-pop { min-width: 240px; max-height: 360px; overflow-y: auto; left: 0; right: auto; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; font-size: 14px; }
.crumbs a { color: var(--lime); } .crumbs a:hover { text-decoration: underline; }
.code-actions { gap: 8px; }
.tree li { align-items: center; }
.tree a.dir { color: var(--text); font-weight: 700; } .tree a.file { color: var(--text-2); }
.tree a:hover { color: var(--lime); }
.tree li:hover { background: var(--panel); }
.blob { margin: 20px var(--gutter) 32px; border: 1px solid var(--line); }
.blob-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 10px 14px; background: var(--panel); border-bottom: 1px solid var(--line); }
.blob-image { padding: 24px; display: flex; justify-content: center; background: repeating-conic-gradient(#14161A 0 25%, #0F1114 0 50%) 0 0 / 20px 20px; }
.blob-image img { max-width: 100%; height: auto; }
.blob-md { padding: 24px 28px; }
.ahead-behind { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex: none; }
.compare-bar { gap: 10px; }
.compare-commits { margin: 16px var(--gutter) 0; }
.refs-list li { flex-wrap: wrap; }

/* Markdown renderizado (README, .md, descripciones y comentarios) */
.markdown { padding: 20px 24px; font-family: var(--sans); font-size: 15px; line-height: 1.7; color: var(--text-2); overflow-wrap: anywhere; }
.markdown > :first-child { margin-top: 0; } .markdown > :last-child { margin-bottom: 0; }
.markdown h1, .markdown h2, .markdown h3, .markdown h4 { font-family: var(--mono); color: var(--text); letter-spacing: -0.02em; margin: 1.6em 0 0.6em; line-height: 1.25; }
.markdown h1 { font-size: 26px; padding-bottom: 8px; border-bottom: 1px solid var(--line); } .markdown h2 { font-size: 20px; padding-bottom: 6px; border-bottom: 1px solid var(--line); } .markdown h3 { font-size: 16px; }
.markdown a { color: var(--lime); } .markdown a:hover { text-decoration: underline; }
.markdown code { font: 13px var(--mono); padding: 1px 6px; background: var(--bg-deep); border: 1px solid var(--line); color: var(--text); }
.markdown pre { padding: 14px 16px; background: var(--bg-deep); border: 1px solid var(--line); overflow-x: auto; }
.markdown pre code { padding: 0; border: 0; background: none; }
.markdown blockquote { margin: 1em 0; padding: 4px 16px; border-left: 2px solid var(--lime); color: var(--muted); }
.markdown table { border-collapse: collapse; display: block; overflow-x: auto; }
.markdown th, .markdown td { border: 1px solid var(--line-2); padding: 6px 12px; } .markdown th { background: var(--panel); color: var(--text); }
.markdown hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.markdown img { max-width: 100%; }
.markdown ul, .markdown ol { padding-left: 1.6em; } .markdown li + li { margin-top: 0.25em; }
.markdown input[type=checkbox] { width: 14px; height: 14px; margin: 0 6px 0 0; vertical-align: middle; }
.markdown.sm { padding: 0; font-size: 14px; }

/* código resaltado (chroma, clases): colores de la paleta de Axotl */
.code-view { overflow-x: auto; }
.code-view .chroma { margin: 0; background: transparent; color: var(--text-2); font: 13px/1.65 var(--mono); }
.code-view .lntable { border-collapse: collapse; width: 100%; }
.code-view .lntd { padding: 0; vertical-align: top; }
.code-view .lntd:first-child { width: 1%; border-right: 1px solid var(--line); background: var(--bg-deep); }
.code-view .lntd pre { padding: 10px 0; }
.code-view .lnt { display: block; padding: 0 12px; text-align: right; color: var(--faint); user-select: none; }
.code-view .lnt a, .code-view .lnlinks { color: inherit; }
.code-view .lnt a:hover { color: var(--lime); }
.code-view .lntd:last-child pre { padding: 10px 16px; }
.code-view .line { display: block; }
.code-view :target { background: rgba(200, 240, 60, 0.12); color: var(--lime); }
.chroma .k, .chroma .kc, .chroma .kd, .chroma .kn, .chroma .kp, .chroma .kr, .chroma .ow, .chroma .nt { color: var(--lime); }
.chroma .kt, .chroma .nb, .chroma .bp, .chroma .nc, .chroma .no, .chroma .ne { color: var(--blue); }
.chroma .nf, .chroma .fm, .chroma .nd { color: var(--text); font-weight: 700; }
.chroma .s, .chroma .sa, .chroma .sb, .chroma .sc, .chroma .dl, .chroma .sd, .chroma .s2, .chroma .se, .chroma .sh, .chroma .si, .chroma .sx, .chroma .sr, .chroma .s1, .chroma .ss { color: #E6C07B; }
.chroma .m, .chroma .mb, .chroma .mf, .chroma .mh, .chroma .mi, .chroma .il, .chroma .mo { color: var(--blue); }
.chroma .c, .chroma .ch, .chroma .cm, .chroma .c1, .chroma .cs, .chroma .cp, .chroma .cpf { color: var(--faint); font-style: italic; }
.chroma .na, .chroma .nv, .chroma .vc, .chroma .vg, .chroma .vi { color: var(--amber); }
.chroma .o, .chroma .p { color: var(--muted); }
.chroma .gi { color: #DDF58A; } .chroma .gd { color: #FFB3B3; } .chroma .gh, .chroma .gu { color: var(--blue); }
.chroma .err { color: var(--red); }

/* historial de commits */
.history { padding: 8px var(--gutter) 24px; display: flex; flex-direction: column; gap: 20px; }
.day-title { margin: 12px 0 8px; }
.commit-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); }
.commit-list li { display: flex; align-items: center; gap: 14px; padding: 12px 16px; }
.commit-list li + li { border-top: 1px solid var(--line); }
.commit-list li:hover { background: var(--panel); }
.commit-subject { color: var(--text); font-weight: 700; overflow-wrap: anywhere; }
.commit-subject:hover { color: var(--lime); }
.hash { font: 12px var(--mono); padding: 2px 8px; border: 1px solid var(--line-2); color: var(--text-2); }
.hash:hover { border-color: var(--lime); color: var(--lime); }
.pager { display: flex; gap: 10px; padding: 0 var(--gutter) 32px; }
.sel-sm { height: 32px; width: auto; padding: 0 8px; }

/* detalle de un commit y diff */
.commit-head { padding: 24px var(--gutter); display: flex; flex-direction: column; gap: 14px; border-bottom: 1px solid var(--line); }
.commit-body { margin: 0; white-space: pre-wrap; font-family: var(--sans); font-size: 14px; color: var(--text-2); }
.commit-meta { gap: 10px 14px; }
.hash-copy { flex: none; width: auto; height: 36px; }
.hash-copy input { width: 12ch; font-size: 12px; }
.file-index { list-style: none; margin: 0; padding: 12px var(--gutter); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.file-index li { display: flex; align-items: center; gap: 12px; }
.file-index a { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; color: var(--text-2); }
.file-index a:hover { color: var(--lime); }
.st { width: 20px; text-align: center; font-weight: 800; font-size: 12px; flex: none; }
.st-A { color: var(--lime); } .st-D { color: var(--red); } .st-M { color: var(--amber); } .st-R, .st-C { color: var(--blue); }
.diff { margin: 20px var(--gutter); border: 1px solid var(--line); }
.diff-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 2; }
.diff-body { overflow-x: auto; }
.diff-table { border-collapse: collapse; width: 100%; font: 12.5px/1.6 var(--mono); }
.diff-table td { padding: 0 10px; vertical-align: top; }
.diff-table .ln { width: 1%; min-width: 44px; text-align: right; color: var(--faint); user-select: none; border-right: 1px solid var(--line); }
.diff-table .code { white-space: pre; color: var(--text-2); }
.diff-table .sign { display: inline-block; width: 1.4ch; color: var(--faint); user-select: none; }
.dl-add { background: rgba(200, 240, 60, 0.08); } .dl-add .code, .dl-add .sign { color: #DDF58A; }
.dl-del { background: rgba(255, 107, 107, 0.09); } .dl-del .code, .dl-del .sign { color: #FFB3B3; }
.dl-hunk { background: var(--bg-deep); } .dl-hunk .code { color: var(--blue); }
.dl-meta .code { color: var(--faint); font-style: italic; }
.diff-note { margin: 0; padding: 14px; color: var(--muted); font-size: 13px; }

/* cambios */
.change-list { list-style: none; margin: 0; padding: 0; }
.change-row { display: flex; align-items: center; gap: 14px; padding: 14px var(--gutter); border-bottom: 1px solid var(--line); }
.change-row:hover { background: var(--panel); }
.change-meta { gap: 12px; flex: none; }
.mono-ref { font: 12px var(--mono); color: var(--text-2); }
.mono-ref a { color: var(--lime); }
.tag.cs-abierto { border-color: var(--lime); color: var(--lime); } .tag.cs-fusionado { border-color: var(--blue); color: var(--blue); } .tag.cs-cerrado { color: var(--faint); }
.tabs .count, .seg-tabs .count { margin-left: 4px; padding: 0 6px; background: var(--line); color: var(--text-2); font-size: 11px; }
.seg-tabs { display: flex; border: 1px solid var(--line-2); }
.seg-tabs a { padding: 6px 12px; color: var(--muted); font-size: 13px; } .seg-tabs a + a { border-left: 1px solid var(--line-2); }
.seg-tabs a.on { background: var(--lime); color: var(--bg); font-weight: 800; }
.stages { list-style: none; margin: 0 0 0 auto; padding: 0; display: flex; gap: 3px; }
.stage { width: 64px; height: 6px; background: var(--line); position: relative; }
.stage:last-child span { left: auto; right: 0; }
.stage span { position: absolute; top: 9px; left: 0; font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); white-space: nowrap; }
.stage.s-ok { background: var(--lime); } .stage.s-wait { background: var(--amber); } .stage.s-bad { background: var(--red); } .stage.s-off { background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); }
.change-head { padding: 24px var(--gutter) 0; display: flex; flex-direction: column; gap: 14px; border-bottom: 1px solid var(--line); }
.change-title { font-size: 30px; }
.change-sub { gap: 8px 14px; padding-bottom: 14px; }
.change-head .tabs { margin-bottom: -1px; }
.change-layout { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 24px 32px; padding: 24px var(--gutter); }
.timeline-col { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.change-side { flex: 1 1 280px; max-width: 360px; display: flex; flex-direction: column; gap: 14px; }
@media (min-height: 760px) and (min-width: 1100px) { .change-side { position: sticky; top: 24px; } }
.event { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--line); background: var(--bg); }
.event-body { border-color: var(--line-2); background: var(--panel); }
.event-mark { padding: 8px 16px; border-style: dashed; align-items: center; flex-wrap: wrap; }
.event-mark .mark-ico { width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line-2); color: var(--muted); font-weight: 800; }
.event-mark.k-aprobado .mark-ico, .event-mark.k-fusionado .mark-ico { border-color: var(--lime); color: var(--lime); }
.event-mark.k-cambios .mark-ico, .event-mark.k-cerrado .mark-ico { border-color: var(--red); color: var(--red); }
.event-mark .markdown { flex-basis: 100%; }
.event-commits { flex-direction: column; gap: 8px; }
.mini-commits { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.mini-commits li { display: flex; align-items: center; gap: 10px; min-width: 0; }
.comment-box textarea, .review-form textarea, .dl-form textarea { font-family: var(--sans); font-size: 14px; }
.side-box { padding: 16px; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.merge-box.ready { border-color: var(--lime); }
.merged-box { border-color: var(--blue); }
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.checks .ok { color: var(--lime); } .checks .wait { color: var(--amber); } .checks .bad { color: var(--red); } .checks .off { color: var(--faint); }
.conflicts { display: flex; flex-direction: column; gap: 2px; margin: 4px 0 0 16px; } .conflicts code { color: var(--text-2); font-size: 12px; }
.choices.tight { grid-template-columns: 1fr; gap: 6px; }
.choices.tight .choice { padding: 8px 10px; }
.reviewers { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.reviewers li { display: flex; align-items: center; gap: 8px; }
.add-comment { width: 20px; height: 20px; margin: 0 6px 0 -4px; padding: 0; border: 1px solid var(--lime); background: var(--lime); color: var(--bg); font: 800 14px/1 var(--mono); cursor: pointer; opacity: 0; vertical-align: middle; }
.diff-table tr:hover .add-comment, .add-comment:focus-visible { opacity: 1; }
@media (hover: none) { .add-comment { opacity: 0.6; } }
.dl-thread td { padding: 10px 14px; background: var(--panel); font-family: var(--sans); white-space: normal; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.inline-comment { display: flex; gap: 10px; align-items: flex-start; }
.inline-comment + .inline-comment { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line-2); }

/* CI: ejecuciones, etapas y log */
.run-row { display: flex; align-items: center; gap: 14px; padding: 14px var(--gutter); border-bottom: 1px solid var(--line); }
.run-row:hover { background: var(--panel); }
.run-time { text-align: right; flex: none; }
.tag.rs-ok { border-color: var(--lime); color: var(--lime); }
.tag.rs-fallo { border-color: var(--red); color: var(--red); }
.tag.rs-corriendo, .tag.rs-en_cola { border-color: var(--amber); color: var(--amber); }
.tag.rs-cancelado, .tag.rs-omitido, .tag.rs-espera { color: var(--faint); }
.tag.rs-corriendo { animation: a-breathe 1.4s ease-in-out infinite; }
.stage-flow { display: flex; align-items: stretch; gap: 10px; padding: 20px var(--gutter); overflow-x: auto; border-bottom: 1px solid var(--line); }
.stage-arrow { align-self: center; color: var(--faint); flex: none; }
.stage-box { flex: 0 0 240px; border: 1px solid var(--line); display: flex; flex-direction: column; }
.stage-box header { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.stage-box.st-ok { border-color: var(--lime); } .stage-box.st-fallo { border-color: var(--red); } .stage-box.st-corriendo { border-color: var(--amber); }
.stage-box ul { list-style: none; margin: 0; padding: 6px; display: flex; flex-direction: column; gap: 4px; }
.job-link { display: flex; align-items: center; gap: 8px; padding: 6px; color: var(--text-2); font-size: 13px; min-width: 0; }
.job-link:hover, .job-link.on { background: var(--panel); color: var(--text); }
.job-link.on { box-shadow: inset 2px 0 0 var(--lime); }
.job-log .log { margin: 0; max-height: 70vh; min-height: 200px; overflow: auto; padding: 14px 16px; background: var(--bg-deep); color: var(--text-2);
  font: 12.5px/1.55 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.artifacts { padding: 16px var(--gutter); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.artifacts ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.artifacts a { color: var(--lime); }
.subtabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 16px var(--gutter) 0; }
.subtabs a { padding: 6px 12px; border: 1px solid var(--line-2); color: var(--muted); font-size: 13px; }
.subtabs a.on { border-color: var(--lime); color: var(--lime); }
.var-name { font-weight: 700; color: var(--text); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0s !important; }
  /* sin dibujo: la A completa respira despacio */
  .a-mark .a-legs, .a-mark .a-bar { stroke-dashoffset: 0; animation: a-breathe 1.6s ease-in-out infinite !important; }
  .a-mark .a-cursor { animation: none !important; }
}

/* en pantallas táctiles no hay hover: sin tooltips (el aria-label sigue para lectores de pantalla) */
@media (hover: none) { [data-tip]::after, [data-tip]::before { display: none; } }

@media (max-width: 720px) {
  :root { --gutter: 20px; } /* un solo cambio: todo el contenido usa el margen de celular */
  .top { flex-wrap: wrap; } .logo { flex: none; } .top-right { gap: 8px; } .top-right .btn.accent .muted { display: none; }
  .hide-sm { display: none; } .table { min-width: 0; }
  .stage-flow { flex-direction: column; overflow-x: visible; } .stage-box { flex: none; } .stage-arrow { transform: rotate(90deg); }
  .h1 { font-size: 34px; } .change-title { font-size: 24px; } .kpi-value { font-size: 28px; }
  .head { padding-top: 20px; padding-bottom: 20px; } .pad, .form-layout, .change-layout { padding-top: 20px; padding-bottom: 20px; }
  .empty { padding-top: 24px; padding-bottom: 24px; } .form-layout { gap: 24px; }
  .kpi, .kpi:first-child { padding: 14px var(--gutter); } .stages { margin-left: 0; } .code-actions { margin-left: 0; }
  .app { grid-template-columns: minmax(0, 1fr); grid-template-areas: "top" "rail" "main" "status"; grid-template-rows: auto auto minmax(0, 1fr) auto; }
  .rail { flex-direction: row; padding: 6px 14px; border-right: 0; border-bottom: 1px solid var(--line); }
  .top { padding: 10px 14px; } .cmd { order: 3; flex-basis: 100%; max-width: none; }
  .top-right > .ellipsis { display: none; }
  .hero, .panel { padding: 32px 24px; } .lang-toggle { top: 24px; right: 24px; }
  .grid-owner { grid-template-columns: 1fr; }
}

/* ── entornos, deploys y releases (fase 5) ─────────────────────── */
.env-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin: 24px var(--gutter) 0; }
.env-card { background: var(--bg); border: 1px solid var(--line); padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.env-card.prod { box-shadow: inset 0 2px 0 var(--lime); }
.env-card footer { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); }
.env-card footer a { color: var(--lime); }
.env-name { font-weight: 700; color: var(--text); }
.env-version { font-size: 28px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; color: var(--lime); }
.env-version.faint { color: var(--faint); font-size: 16px; font-weight: 400; }
.env-tag { color: var(--blue); border-color: var(--blue); }
.rel-tag { display: inline-block; padding: 2px 8px; border: 1px solid var(--lime); color: var(--lime); font-weight: 700; white-space: nowrap; }
.rel-tag.lg { font-size: 0.7em; padding: 2px 10px; vertical-align: middle; }
.rel-link { color: var(--lime); font-weight: 700; }
.row-current td { background: #12160B; }
.change-list.bordered { border: 1px solid var(--line); }
.change-list.bordered .run-row { padding: 10px 14px; }
.change-list.compact .run-row { padding: 10px 0; }
.change-list.compact .run-row:hover { background: none; }
.asset-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.asset-list a { color: var(--lime); }
.blob.flush { margin: 0; }
.split-main.flush { padding-top: 0; padding-left: 0; }
.split-main.flush > :first-child .toolbar.flat { padding-left: var(--gutter); }
.side.flat { margin-top: 24px; }
.deploy-strip { gap: 8px 28px; }
.table .tag, .run-row > .tag { white-space: nowrap; }
/* Modal de página completa (promover): un panel centrado sobre el fondo, sin depender de JS. */
.modal-page { display: flex; justify-content: center; align-items: flex-start; padding: 48px var(--gutter); min-height: 100%; background: radial-gradient(ellipse at top, #12160B 0, var(--bg) 60%); }
.modal { width: 100%; max-width: 640px; padding: 28px; display: flex; flex-direction: column; gap: 20px; background: var(--panel); border: 1px solid var(--line-2); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55); }
.version-move { display: flex; align-items: center; gap: 20px; padding: 16px 20px; border: 1px solid var(--line); background: var(--bg); }
.version-move > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.version-move strong { font-size: 26px; font-weight: 800; letter-spacing: -0.03em; overflow-wrap: anywhere; }
.version-move .arrow { color: var(--muted); font-size: 22px; }
.plain-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.checks li::before { display: inline-block; width: 1.4em; }
.checks li.ok::before { content: "✓"; color: var(--lime); }
.checks li.bad { color: var(--red); } .checks li.bad::before { content: "×"; }
.checks li.wait::before { content: "○"; color: var(--amber); }
@media (max-width: 640px) { .env-grid { grid-template-columns: 1fr; } .modal-page { padding: 20px var(--gutter); } .modal { padding: 20px; } }

/* ── avisos (toasts) y modal de confirmación ─────────────────────
   Avisos apilados arriba a la derecha, bajo el header; colores de estado del sistema:
   ok lima · err rojo · warn ámbar · info azul. Sin JS se van solos con la animación. */
.toasts { position: fixed; top: 68px; right: 16px; z-index: 60; width: min(380px, calc(100vw - 32px)); display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast { --c: var(--blue); --toast-ms: 5000ms; position: relative; overflow: hidden; pointer-events: auto; display: flex; align-items: flex-start; gap: 12px; padding: 14px 14px 16px; background: var(--panel); border: 1px solid var(--line-2); border-left: 3px solid var(--c); box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55); animation: toast-in 0.28s cubic-bezier(.2, .8, .2, 1) both; }
.toast.t-ok { --c: var(--lime); } .toast.t-err { --c: var(--red); } .toast.t-warn { --c: var(--amber); } .toast.t-info { --c: var(--blue); }
.toast-icon { flex: none; width: 22px; height: 22px; display: grid; place-items: center; background: var(--c); color: var(--bg); font-weight: 800; font-size: 13px; line-height: 1; }
.toast-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.toast-title { color: var(--c); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
.toast-text { color: var(--text); overflow-wrap: anywhere; }
.toast-close { flex: none; width: 24px; height: 24px; margin: -4px -4px 0 0; border: 0; background: none; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; }
.toast-close:hover { color: var(--text); }
.toast-bar { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--c); opacity: 0.6; transform-origin: left; animation: toast-bar var(--toast-ms) linear forwards; }
.toast.is-paused .toast-bar { animation-play-state: paused; }
.toast.is-leaving { animation: toast-out 0.26s ease-in forwards; }
.toasts:not(.js) .toast { animation: toast-in 0.28s both, toast-out 0.3s 7s forwards; } /* sin JS */
.toasts:not(.js) .toast-close, .toasts:not(.js) .toast-bar { display: none; }
@keyframes toast-in { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(24px); visibility: hidden; } }
@keyframes toast-bar { from { transform: scaleX(1); } to { transform: scaleX(0); } }

.confirm { width: min(480px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--line-2); border-top: 3px solid var(--amber); background: var(--panel); color: var(--text); box-shadow: 0 30px 90px rgba(0, 0, 0, 0.65); }
.confirm.is-danger { border-top-color: var(--red); }
.confirm[open] { animation: confirm-in 0.2s cubic-bezier(.2, .8, .2, 1); }
.confirm::backdrop { background: rgba(5, 6, 7, 0.72); backdrop-filter: blur(3px); }
.confirm-box { display: flex; flex-direction: column; gap: 16px; padding: 24px; margin: 0; }
.confirm-head { display: flex; align-items: center; gap: 12px; }
.confirm-icon { flex: none; width: 28px; height: 28px; display: grid; place-items: center; background: var(--amber); color: var(--bg); font-weight: 800; }
.confirm.is-danger .confirm-icon { background: var(--red); }
.confirm-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; padding-top: 4px; }
@keyframes confirm-in { from { opacity: 0; transform: translateY(10px) scale(0.98); } to { opacity: 1; transform: none; } }
@media (max-width: 640px) { .toasts { top: auto; bottom: 48px; right: 16px; } .confirm-actions .btn { flex: 1; } }
@media (prefers-reduced-motion: reduce) { .toast, .confirm[open], .toast.is-leaving { animation-duration: 0.01ms; } }

/* ── barra "/": sugerencias ───────────────────────────────────────
   Lista bajo la barra, agrupada (este repo · general · repos · cuenta · admin). */
.cmd-pop { position: absolute; top: calc(100% + 6px); left: -1px; right: -1px; z-index: 50; background: var(--panel); border: 1px solid var(--line-2); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6); }
.cmd-list { list-style: none; margin: 0; padding: 6px 0; max-height: min(60vh, 440px); overflow-y: auto; }
.cmd-group { padding: 10px 14px 4px; color: var(--faint); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
.cmd-list [role=option] { display: flex; align-items: baseline; gap: 14px; padding: 8px 14px; cursor: pointer; border-left: 2px solid transparent; }
.cmd-list [role=option].on { background: var(--panel-2); border-left-color: var(--lime); }
.cmd-word { flex: none; min-width: 120px; color: var(--lime); font-weight: 700; }
.cmd-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.cmd-text strong { color: var(--text); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmd-text span { color: var(--muted); font-size: 12px; }
.cmd-empty { margin: 0; padding: 14px; color: var(--muted); }
.cmd-foot { margin: 0; padding: 8px 14px; border-top: 1px solid var(--line); color: var(--faint); font-size: 11px; }
.cmd-foot kbd { margin-right: 2px; }
@media (max-width: 640px) { .cmd-word { min-width: 0; } .cmd-list [role=option] { flex-direction: column; gap: 2px; } .cmd-foot { display: none; } }

/* ── ayuda "?" junto a títulos ─────────────────────────────────────── */
.help { position: relative; display: inline-flex; vertical-align: middle; margin-left: 8px; font-size: 13px; font-weight: 400; letter-spacing: 0; text-transform: none; line-height: 1.5; }
.help-btn { width: 20px; height: 20px; padding: 0; display: grid; place-items: center; border: 1px solid var(--line-2); background: transparent; color: var(--muted); font: 700 12px var(--mono); cursor: help; border-radius: 50%; }
.help-btn:hover, .help:focus-within .help-btn, .help.is-open .help-btn { border-color: var(--lime); color: var(--lime); }
.help-pop { --shift: 0px; position: absolute; top: calc(100% + 10px); left: 50%; z-index: 45; width: max-content; max-width: min(320px, calc(100vw - 24px)); padding: 12px 14px; background: var(--panel-2); border: 1px solid var(--line-2); border-top: 2px solid var(--lime); color: var(--text-2); font: 13px/1.55 var(--sans); white-space: normal; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55); opacity: 0; visibility: hidden; transform: translate(calc(-50% + var(--shift)), -4px); transition: opacity 0.12s, transform 0.12s, visibility 0.12s; pointer-events: none; }
.help:hover .help-pop, .help:focus-within .help-pop, .help.is-open .help-pop { opacity: 1; visibility: visible; transform: translate(calc(-50% + var(--shift)), 0); transition-delay: 0.1s; }
.help-dot { display: inline-grid; place-items: center; width: 16px; height: 16px; border: 1px solid var(--line-2); border-radius: 50%; font-size: 10px; font-weight: 700; }

/* panel "?" (usa la caja de .confirm) */
.help-dialog { width: min(860px, calc(100vw - 32px)); border-top-color: var(--lime); }
.help-icon { background: var(--lime); }
.help-dialog .confirm-head .push { margin-left: auto; }
.help-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 28px; max-height: 60vh; overflow-y: auto; }
.keys { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 0 0 12px; }
.keys dt { white-space: nowrap; } .keys dd { margin: 0; color: var(--text-2); }
.help-cmds { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.help-cmds li { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 12px; }
.help-cmds code { color: var(--lime); }
.help-cmds span { color: var(--text-2); }
.status .help-key { border-left: 1px solid var(--line); }
@media (max-width: 760px) { .help-cols { grid-template-columns: 1fr; } .help-cmds li { grid-template-columns: 1fr; gap: 0; } }
.stages .stage-help { flex: none; display: flex; align-items: center; padding: 0 0 0 4px; border: 0; background: none; }

/* Comandos para copiar: el prompt se pinta con CSS para que nunca se copie con el texto. */
.prompt::before { content: "$ "; color: var(--lime); user-select: none; }
.prompt.ps::before { content: "PS> "; }
.cmd-copy { display: flex; gap: 8px; align-items: stretch; min-width: 0; }
.cmd-copy .cmdline { flex: 1; min-width: 0; }
/* Guía por sistema (macOS · Linux · Windows): radios como pestañas, sin depender de JS. */
.os-guide { display: flex; flex-direction: column; gap: 12px; }
.os-tabs { display: flex; gap: 4px; }
.os-tabs input { position: absolute; opacity: 0; pointer-events: none; }
.os-tabs label { padding: 6px 12px; border: 1px solid var(--line-2); color: var(--muted); font-size: 13px; letter-spacing: 0; text-transform: none; cursor: pointer; }
.os-tabs input:checked + label { border-color: var(--lime); color: var(--lime); }
.os-tabs input:focus-visible + label { outline: 2px solid var(--lime); outline-offset: 2px; }
.os-steps { margin: 0; padding-left: 22px; }
.os-steps li { margin-bottom: 14px; } .os-steps li:last-child { margin-bottom: 0; }
.os-steps li::marker { color: var(--lime); font-weight: 700; }
.os-steps li > span { display: block; margin-bottom: 8px; }
.os-note { margin: 0; }
.os-guide:has(#os-mac:checked) [data-os]:not([data-os=mac]),
.os-guide:has(#os-linux:checked) [data-os]:not([data-os=linux]),
.os-guide:has(#os-win:checked) [data-os]:not([data-os=win]) { display: none; }

/* Markdown como en GitHub: párrafos, imágenes en línea (badges), tablas y diagramas mermaid. */
.markdown p { margin: 0 0 1em; }
.markdown p img, .markdown a img { display: inline; vertical-align: middle; }
.markdown [align=center] { text-align: center; }
.markdown img[align=right] { float: right; margin: 0 0 1em 1em; } .markdown img[align=left] { float: left; margin: 0 1em 1em 0; }
.markdown table { margin: 1em 0; }
.markdown td > :first-child, .markdown th > :first-child { margin-top: 0; }
.markdown td > :last-child, .markdown th > :last-child { margin-bottom: 0; }
.markdown details { margin: 1em 0; } .markdown summary { cursor: pointer; color: var(--text); }
.markdown kbd { font: 12px var(--mono); padding: 1px 6px; border: 1px solid var(--line-2); border-bottom-width: 2px; background: var(--panel); color: var(--text); }
.markdown mark { background: var(--lime); color: var(--bg); padding: 0 3px; }
.mermaid-fig { margin: 1.2em 0; padding: 20px; border: 1px solid var(--line); background: var(--bg-deep); text-align: center; }
.mermaid-fig > img { max-width: 100%; height: auto; }
.mermaid-fig details { margin: 12px 0 0; text-align: left; }
.mermaid-fig summary { color: var(--faint); font: 12px var(--mono); }
.mermaid-fig pre { margin-top: 10px; }

/* ── lista de archivos (como GitHub) ───────────────────────────────
   Tabla: ícono + nombre · último commit · tipo (punto de color) · tamaño · fecha. */
.files-wrap { margin: 16px var(--gutter) 0; border: 1px solid var(--line-2); }
.files { width: 100%; border-collapse: collapse; table-layout: fixed; }
.files th { padding: 10px 14px; background: var(--panel); border-bottom: 1px solid var(--line-2); color: var(--faint); font-size: 11px; font-weight: 400; letter-spacing: 0.08em; text-transform: uppercase; text-align: left; }
.files td { padding: 0 14px; height: 40px; border-bottom: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.files tbody tr:last-child td { border-bottom: 0; }
.files th.right { text-align: right; }
.files tbody tr:hover { background: var(--panel); }
.files th:first-child { width: 34%; } .files .f-type { width: 170px; } .files .f-size { width: 96px; } .files .f-when { width: 130px; }
.files .f-name a, .files .f-name > span, .files .f-up a { display: inline-flex; align-items: center; gap: 10px; max-width: 100%; }
.files .f-name a > span:last-child { overflow: hidden; text-overflow: ellipsis; }
.files a.dir { color: var(--text); font-weight: 700; }
.files a.file { color: var(--text-2); }
.files a.dir:hover, .files a.file:hover, .files .f-up a:hover { color: var(--lime); }
.files .f-msg a { display: block; color: var(--muted); }
.files .f-msg a:hover { color: var(--text); }
.files .f-size, .files .f-when { color: var(--faint); font-size: 12px; }
.files .f-up a { color: var(--muted); }
.kind { display: inline-flex; align-items: center; gap: 7px; color: var(--text-2); font-size: 12px; }
.kind svg { width: 10px; height: 10px; flex: none; }
.fi { width: 16px; height: 16px; flex: none; fill: none; stroke: var(--muted); stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }
.fi-dir { stroke: var(--lime); } .fi-dir .fi-fill { fill: rgba(200, 240, 60, 0.16); }
.fi-submodule { stroke: var(--blue); }
.fi-image, .fi-media { stroke: #b48ce0; } .fi-doc, .fi-license { stroke: var(--text-2); }
.fi-shell, .fi-env { stroke: var(--amber); } .fi-git { stroke: #F44D27; } .fi-lock, .fi-archive { stroke: var(--faint); }
a:hover .fi:not(.fi-dir) { stroke: var(--lime); }
@media (max-width: 900px) { .files .f-type { display: none; } .files th:first-child { width: 45%; } }
@media (max-width: 640px) { .files .f-msg, .files .f-size { display: none; } .files th:first-child { width: auto; } .files .f-when { width: 118px; text-overflow: clip; } .files td { height: 44px; } }

/* archivo grande sin resaltado: dos bloques (números · texto) */
.code-plain { display: flex; font: 12.5px/1.6 var(--mono); }
.code-plain pre { margin: 0; padding: 12px 0; }
.code-plain .ln { padding: 12px 12px 12px 16px; text-align: right; color: var(--faint); border-right: 1px solid var(--line); user-select: none; }
.code-plain .src { padding-left: 16px; padding-right: 16px; color: var(--text-2); white-space: pre; }
