/* tasktui — página del proyecto. Paleta Aurora, la misma que la TUI. */
@font-face {
  font-family: "Departure Mono";
  src: url("fonts/DepartureMono-Regular.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/JetBrainsMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/JetBrainsMono-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --bg: #0a0a0c;
  --surface: #111114;
  --surface-2: #16161a;
  --line: #26262b;
  --line-2: #3a3a44;
  --text: #dfede5;
  --sub: #9dbcb1;
  --hint: #8fa89f;
  --muted: #8a82a6; /* el #6E6787 de Aurora, aclarado para cumplir contraste AA */
  --green: #59c98d;
  --green-hi: #8fe7ab;
  --sel: #2a4a3e;
  --red: #e0607f;
  --yellow: #c5d98a;
  --blue: #9aa8dc;
  --mauve: #c58ad6;
  --cyan: #6fd9c4;
  --peach: #c4906b;
  --teal: #3fa894;
  --glass: rgba(10, 10, 12, 0.62);        /* como la ventana de Ghostty: fondo translúcido… */
  --glass-2: rgba(10, 10, 12, 0.8);
  --frost: blur(30px) saturate(1.35);     /* …y desenfocado */
  --p: 0;
  --pixel: "Departure Mono", "JetBrains Mono", ui-monospace, monospace;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --rail: 264px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; scroll-padding-top: 24px; scrollbar-color: var(--line-2) var(--bg); scrollbar-width: thin; }
body {
  margin: 0;
  color: var(--text);
  font: 400 15px/1.65 var(--mono);
  font-variant-ligatures: none;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: var(--sel); color: #ecf5ef; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; border-radius: 2px; }
a { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--green-hi); }
code, kbd, pre { font-family: var(--mono); }
p code, li code, dd code, figcaption code {
  padding: 1px 6px; border: 1px solid var(--line-2); border-radius: 4px; background: var(--glass); color: var(--sub); font-size: 0.92em;
}
strong, b { font-weight: 700; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 20; padding: 8px 14px; background: var(--green); color: var(--bg); }
.skip:focus { top: 12px; }
.skip:hover { color: var(--bg); }

.c-green { color: var(--green); } .c-blue { color: var(--blue); } .c-cyan { color: var(--cyan); }
.c-yellow { color: var(--yellow); } .c-mauve { color: var(--mauve); } .c-sub { color: var(--sub); }
.c-red { color: var(--red); }

/* ---------- riel lateral: el mismo panel que la TUI ---------- */
.rail {
  position: fixed; inset: 0 auto 0 0; width: var(--rail); z-index: 5;
  display: flex; flex-direction: column; gap: 22px;
  padding: 22px 18px; border-right: 1px solid var(--line); background: var(--glass); backdrop-filter: var(--frost); -webkit-backdrop-filter: var(--frost);
}
.logo { display: flex; align-items: center; gap: 10px; font: 22px/1 var(--pixel); color: var(--text); text-decoration: none; }
.logo svg { width: 22px; height: 22px; fill: var(--green); shape-rendering: crispEdges; }
.logo b { font-weight: 400; color: var(--green); }

/* El marco se dibuja en tres piezas (dos esquinas junto al título y el resto)
   para que el título corte la línea sin tapar el fondo translúcido. */
.pane, .t-pane { --bc: var(--line-2); position: relative; border: 1px solid transparent; border-radius: 8px; }
.pane::after, .t-pane::after {
  content: ""; position: absolute; inset: 8px -1px -1px; border: 1px solid var(--bc); border-top: 0;
  border-radius: 0 0 8px 8px; pointer-events: none;
}
.pt {
  position: absolute; top: -10px; left: -1px; right: -1px; height: 18px; display: flex; align-items: center; gap: 7px;
  color: var(--sub); font-weight: 700; font-size: 13px; line-height: 18px; white-space: nowrap; pointer-events: none;
}
.pt::before, .pt::after { content: ""; align-self: flex-end; height: 9px; border-top: 1px solid var(--bc); }
.pt::before { flex: none; width: 12px; border-left: 1px solid var(--bc); border-top-left-radius: 8px; }
.pt::after { flex: 1; border-right: 1px solid var(--bc); border-top-right-radius: 8px; }
.nav { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 14px 0 12px; font-size: 14px; }
.nav ul { list-style: none; margin: 0; padding: 0; }
.nav h2 { margin: 18px 0 2px; padding: 0 16px; font: 700 12px/1.6 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.nav a {
  display: flex; align-items: center; gap: 9px; padding: 3px 14px 3px 12px;
  border-left: 3px solid transparent; color: var(--text); text-decoration: none;
}
.nav a i { font-style: normal; width: 1ch; text-align: center; }
.nav a em { margin-left: auto; font-style: normal; color: var(--muted); }
.nav a:hover { background: rgba(223, 237, 229, 0.06); }
.nav a[aria-current] { border-left-color: var(--green); background: var(--sel); font-weight: 700; }
.read { margin-top: auto; padding: 18px 16px 0; font-size: 13px; color: var(--hint); }
.read > div:first-child { display: flex; justify-content: space-between; font-weight: 700; }
.read #read-pct { color: var(--sub); font-weight: 400; font-variant-numeric: tabular-nums; }
.bar { height: 2px; margin-top: 6px; background: var(--line-2); }
.bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--teal), var(--green), var(--green-hi)) 0 0 / var(--rail) 100%; }
.gh {
  display: flex; align-items: center; justify-content: center; gap: 9px; padding: 9px 12px;
  border: 1px solid var(--line-2); border-radius: 8px; color: var(--text); text-decoration: none; font-size: 14px;
  transition: border-color 0.2s, background 0.2s;
}
.gh svg { width: 16px; height: 16px; fill: currentColor; }
.gh:hover { border-color: var(--green); background: rgba(223, 237, 229, 0.06); color: var(--text); }

/* ---------- contenido ---------- */
main { position: relative; margin-left: var(--rail); padding: 0 clamp(20px, 5vw, 72px); isolation: isolate; }
main > section { max-width: 1240px; margin: 0 auto; padding: 72px 0 24px; }
/* ---------- aurora: el fondo de toda la página ---------- */
.aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.aurora i {
  position: absolute; width: var(--d); height: var(--d); margin: calc(var(--d) / -2) 0 0 calc(var(--d) / -2); border-radius: 50%;
  background: radial-gradient(closest-side, var(--c), transparent);
  translate: 0 calc(var(--p) * var(--shift, 0vh));
  animation: drift var(--t, 30s) ease-in-out infinite alternate;
  will-change: transform;
}
.aurora i:nth-child(1) { --d: 95vmax; --c: rgba(89, 201, 141, 0.34); left: 24%; top: 8%; --shift: 46vh; --t: 34s; }
.aurora i:nth-child(2) { --d: 80vmax; --c: rgba(63, 168, 148, 0.36); left: 78%; top: 30%; --shift: -38vh; --t: 41s; animation-delay: -12s; }
.aurora i:nth-child(3) { --d: 70vmax; --c: rgba(79, 168, 111, 0.3); left: 46%; top: 88%; --shift: -52vh; --t: 29s; animation-delay: -6s; }
.aurora i:nth-child(4) { --d: 60vmax; --c: rgba(110, 127, 184, 0.24); left: 96%; top: 82%; --shift: -64vh; --t: 37s; animation-delay: -20s; }
.aurora i:nth-child(5) { --d: 46vmax; --c: rgba(143, 231, 171, 0.16); left: 60%; top: 2%; --shift: 70vh; --t: 25s; animation-delay: -9s; }
@keyframes drift {
  from { transform: translate3d(-5vmax, -3vmax, 0) scale(0.92); }
  to { transform: translate3d(6vmax, 4vmax, 0) scale(1.1); }
}

h1, h2 { font-family: var(--pixel); font-weight: 400; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(33px, 5.6vw, 66px); line-height: 1.12; letter-spacing: -0.02em; word-spacing: -0.18em; }
h1 span { color: var(--green); }
h2 { font-size: clamp(27px, 3.4vw, 44px); line-height: 1.15; letter-spacing: -0.01em; word-spacing: -0.18em; }
.caret {
  display: inline-block; width: 0.5em; height: 0.82em; margin-left: 0.12em; background: var(--green);
  vertical-align: -0.04em; animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.lead { max-width: 68ch; margin: 20px 0 0; color: var(--sub); font-size: 16px; }
.lead strong { color: var(--text); }

.hero { padding-top: clamp(56px, 9vh, 110px); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 26px 0 0; padding: 0; }
.chips li { padding: 3px 12px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--sub); font-size: 13px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.cta.end { margin-top: 44px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 22px; border: 1px solid var(--line-2); border-radius: 8px;
  color: var(--text); font-weight: 700; text-decoration: none; background: var(--glass); backdrop-filter: var(--frost); -webkit-backdrop-filter: var(--frost);
  transition: transform 0.25s var(--ease), border-color 0.2s, background 0.2s;
}
.btn:hover { border-color: var(--green); color: var(--text); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.primary { background: var(--green); border-color: var(--green); color: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none; }
.btn.primary:hover { background: var(--green-hi); border-color: var(--green-hi); color: var(--bg); }

.cmd {
  display: flex; align-items: center; gap: 12px; max-width: 760px; margin-top: 30px; padding: 10px 10px 10px 16px;
  border: 1px solid var(--line-2); border-radius: 8px; background: var(--glass); backdrop-filter: var(--frost); -webkit-backdrop-filter: var(--frost);
}
.cmd code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; font-size: 14px; scrollbar-width: none; }
.prompt, .pr { color: var(--green); font-weight: 700; }
.copy {
  flex: none; padding: 4px 12px; border: 1px solid var(--line-2); border-radius: 6px; background: rgba(223, 237, 229, 0.06);
  color: var(--sub); font: 13px/1.5 var(--mono); cursor: pointer; transition: border-color 0.2s, color 0.2s;
}
.copy:hover { border-color: var(--green); color: var(--text); }
.copy.ok { border-color: var(--green); color: var(--green); }

/* ---------- ventanas ---------- */
.win { border-radius: 12px; background: var(--glass-2); backdrop-filter: var(--frost); -webkit-backdrop-filter: var(--frost); box-shadow: 0 0 0 1px var(--line-2), 0 30px 70px -20px rgba(0, 0, 0, 0.75); overflow: hidden; }
.win-bar { display: flex; align-items: center; gap: 14px; padding: 9px 14px; border-bottom: 1px solid var(--line); background: rgba(223, 237, 229, 0.04); font-size: 13px; color: var(--hint); }
.dots { display: inline-flex; gap: 6px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); }
.win-title { color: var(--sub); }
.win-hint { margin-left: auto; }

.demo { padding-top: 48px; }
.demo-note { max-width: 68ch; margin: 16px 0 0; color: var(--hint); font-size: 14px; }

/* ---------- la TUI en el navegador ---------- */
.tui { position: relative; display: flex; flex-direction: column; gap: 6px; height: 31.5em; padding: 16px 14px 10px; font-size: 13.5px; line-height: 1.5; outline: none; cursor: default; container-type: inline-size; }
.tui:focus-visible { box-shadow: inset 0 0 0 1px var(--green); }
.fallback { margin: 0; overflow: hidden; color: var(--sub); font-size: 12px; line-height: 1.35; }
.t-panes { flex: 1; min-height: 0; display: grid; grid-template-columns: 22ch minmax(0, 1fr) 38ch; gap: 8px; }
.t-pane { min-width: 0; padding: 12px 0 8px; display: flex; flex-direction: column; }
.t-pane.focus { --bc: var(--green); }
.t-pane.focus > .pt { color: var(--green); }
.t-pane { overflow: visible; min-height: 0; }
.t-body { position: relative; flex: 1; min-height: 0; overflow: hidden auto; scrollbar-width: none; }
.t-row { display: flex; align-items: baseline; gap: 1ch; padding: 0 1.2ch 0 0; border-left: 3px solid transparent; white-space: nowrap; cursor: pointer; }
.t-row:hover { background: rgba(223, 237, 229, 0.06); }
.t-row.sel { border-left-color: var(--line-2); }
.focus .t-row.sel { border-left-color: var(--green); background: var(--sel); font-weight: 700; }
.t-row .ic { width: 2ch; text-align: center; flex: none; }
.t-row .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.t-row .n { color: var(--muted); font-weight: 400; font-variant-numeric: tabular-nums; }
.t-head { margin: 10px 0 0; padding: 0 1.6ch; color: var(--muted); font-weight: 700; font-size: 0.9em; letter-spacing: 0.08em; }
.t-group { display: flex; align-items: center; gap: 1ch; padding: 0 1.2ch 0 1.4ch; color: var(--blue); font-weight: 700; }
.t-group:not(:first-child) { margin-top: 0.8em; }
.t-group.late { color: var(--red); }
.t-group::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, #4a4a58, var(--line-2) 40%, transparent); }
.t-check { all: unset; width: 2ch; text-align: center; cursor: pointer; font-weight: 700; flex: none; }
.t-check:focus-visible { outline: 2px solid var(--green); }
.p1 { color: var(--red); } .p2 { color: var(--yellow); } .p3 { color: var(--blue); } .p4 { color: var(--sub); }
.t-row.done .grow { color: var(--muted); text-decoration: line-through; font-weight: 400; }
.t-row.done .t-check { color: var(--muted); }
.lab { color: var(--mauve); font-weight: 400; margin-left: 1ch; }
.when { flex: none; width: 9.5ch; font-weight: 400; font-variant-numeric: tabular-nums; }
.when.dl { width: 6ch; }
.proj { flex: none; width: 8ch; overflow: hidden; text-overflow: ellipsis; color: var(--muted); font-weight: 400; }
.icons { flex: none; width: 3ch; color: var(--hint); font-weight: 400; }
.late { color: var(--red); } .today { color: var(--green); } .soon { color: var(--cyan); }
.t-prog { padding: 8px 1.6ch 2px; color: var(--hint); }
.t-prog div:first-child { display: flex; justify-content: space-between; font-weight: 700; }
.t-prog b { color: var(--sub); font-weight: 400; }
.t-empty { display: grid; place-content: center; gap: 6px; height: 100%; text-align: center; color: var(--sub); }
.t-empty b { color: var(--green); font-size: 1.4em; }
.t-detail { padding: 0 1.6ch; }
.t-detail h3 { margin: 0; font: 700 1em/1.5 var(--mono); }
.t-detail .where { color: var(--blue); }
.t-detail dl { display: grid; grid-template-columns: 12ch 1fr; margin: 1.2em 0 0; }
.t-detail dt { color: var(--muted); }
.t-detail dd { margin: 0; }
.t-detail dd small { color: var(--muted); font-size: 1em; }
.t-detail h4 { display: flex; align-items: center; gap: 1ch; margin: 1.2em 0 0; font: 700 1em/1.5 var(--mono); color: var(--green); }
.t-detail h4::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, #4a4a58, var(--line-2) 40%, transparent); }
.t-detail p { margin: 0; }
.t-detail .note { padding-left: 1.5ch; border-left: 1px solid var(--line-2); }
.t-detail .note small, .t-detail .id { color: var(--muted); font-size: 1em; }
.t-detail .id { margin-top: 1.2em; }

.t-status { display: flex; align-items: center; gap: 1ch; white-space: nowrap; overflow: hidden; }
.pill { flex: none; padding: 0 1ch; background: var(--green); color: var(--bg); font-weight: 700; }
.pill.write { background: var(--blue); } .pill.help { background: var(--mauve); } .pill.del { background: var(--red); }
.hints { display: flex; flex: 1; min-width: 0; overflow: hidden; }
.hints button { all: unset; flex: none; color: var(--hint); cursor: pointer; padding: 0 0.3ch; }
.hints button b { color: var(--green); }
.hints button:hover { color: var(--text); }
.hints button:focus-visible { outline: 2px solid var(--green); }
.hints button + button::before { content: "·"; margin-right: 1ch; color: var(--line-2); }
.t-msg { flex: 1; color: var(--yellow); overflow: hidden; text-overflow: ellipsis; }
.t-right { flex: none; color: var(--hint); }
.t-right span { color: var(--muted); margin-right: 1.5ch; }

.t-pop { position: absolute; left: 50%; top: 30%; width: min(78ch, calc(100% - 24px)); transform: translateX(-50%); padding: 14px 0 10px; --bc: var(--green); background: rgba(10, 10, 12, 0.94); box-shadow: 0 24px 60px -12px #000; }
.t-pop .pt { color: var(--green); }
.t-pop[hidden] { display: none; }
.t-in { display: flex; gap: 1ch; padding: 0 1.6ch; }
.t-in input { all: unset; flex: 1; min-width: 0; caret-color: var(--green); }
.t-prev { min-height: 1.5em; margin: 1em 0 0; padding: 0 1.6ch; display: flex; flex-wrap: wrap; gap: 0 2ch; }
.t-prev::before { content: "→"; color: var(--muted); }
.t-tip { padding: 0 1.6ch; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-help { top: 6%; width: min(64ch, calc(100% - 24px)); }
.t-help h4 { margin: 0.6em 0 0; padding: 0 1.6ch; font: 700 1em/1.5 var(--mono); color: var(--green); }
.t-help dl { display: grid; grid-template-columns: 16ch 1fr; margin: 0; padding: 0 1.6ch 0 3ch; }
.t-help dt { color: var(--yellow); font-weight: 700; }
.t-help dd { margin: 0; color: var(--sub); }

@container (max-width: 980px) { .t-panes { grid-template-columns: 22ch minmax(0, 1fr); } .t-pane.detail { display: none; } }
@container (max-width: 620px) { .t-panes { grid-template-columns: minmax(0, 1fr); } .t-pane.side { display: none; } .proj, .when.dl, .t-right { display: none; } .when { width: auto; } }

/* ---------- captura rápida ---------- */
.play { max-width: 900px; margin-top: 36px; }
.play > label { display: block; margin-bottom: 8px; color: var(--hint); font-size: 14px; }
.play-input { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border: 1px solid var(--green); border-radius: 8px; background: var(--glass); backdrop-filter: var(--frost); -webkit-backdrop-filter: var(--frost); }
.play-input input { all: unset; flex: 1; min-width: 0; font-size: 16px; caret-color: var(--green); }
.play-input:focus-within { box-shadow: 0 0 0 3px rgba(89, 201, 141, 0.18); }
.play-tokens { display: flex; flex-wrap: wrap; gap: 6px 8px; min-height: 34px; margin-top: 14px; }
.tk { padding: 2px 10px; border: 1px solid var(--line-2); border-radius: 6px; font-size: 14px; color: var(--sub); animation: pop 0.35s var(--ease) backwards; }
@keyframes pop { from { transform: translateY(4px); filter: blur(3px); opacity: 0; } }
.tk.due, .tk.time { color: var(--green); border-color: rgba(89, 201, 141, 0.45); }
.tk.deadline { color: var(--red); border-color: rgba(224, 96, 127, 0.45); }
.tk.prio { color: var(--yellow); border-color: rgba(197, 217, 138, 0.45); }
.tk.rec { color: var(--cyan); border-color: rgba(111, 217, 196, 0.45); }
.tk.label { color: var(--mauve); border-color: rgba(197, 138, 214, 0.45); }
.tk.project { color: var(--blue); border-color: rgba(154, 168, 220, 0.45); }
.tk.text { border-color: transparent; padding-inline: 0; color: var(--text); }
.play-out { display: grid; grid-template-columns: 14ch 1fr; gap: 2px 0; margin: 18px 0 0; padding: 16px 18px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--glass); backdrop-filter: var(--frost); -webkit-backdrop-filter: var(--frost); }
.play-out dt { color: var(--muted); }
.play-out dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.play-out dd.none { color: var(--muted); }
.play-ex { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; font-size: 14px; color: var(--hint); }
.play-ex button { padding: 3px 12px; border: 1px solid var(--line-2); border-radius: 999px; background: none; color: var(--sub); font: inherit; cursor: pointer; transition: border-color 0.2s, color 0.2s; }
.play-ex button:hover { border-color: var(--green); color: var(--text); }

/* ---------- clientes ---------- */
.arch { display: grid; grid-template-columns: auto minmax(90px, 1fr) auto; align-items: center; max-width: 900px; margin-top: 40px; }
.arch-clients { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.arch-clients li, .arch-server { border: 1px solid var(--line-2); border-radius: 8px; background: var(--glass); backdrop-filter: var(--frost); -webkit-backdrop-filter: var(--frost); }
.arch-clients li { display: flex; justify-content: space-between; gap: 3ch; padding: 6px 14px; }
.arch-clients span, .arch-server span { color: var(--hint); }
.arch-wire { position: relative; align-self: stretch; display: grid; place-items: center; }
.arch-wire::before { content: ""; position: absolute; inset: 50% 0 auto; border-top: 1px dashed var(--line-2); }
.arch-wire::after { content: ""; position: absolute; top: 50%; left: 0; width: 8px; height: 8px; margin-top: -4px; background: var(--green); animation: packet 2.6s linear infinite; }
@keyframes packet { from { left: 0; opacity: 0; } 12%, 88% { opacity: 1; } to { left: calc(100% - 8px); opacity: 0; } }
.arch-wire span { position: relative; padding: 0 10px; color: var(--hint); font-size: 13px; transform: translateY(-16px); white-space: nowrap; }
.arch-server { display: grid; gap: 2px; padding: 18px 22px; border-color: var(--green); }
.arch-server b { color: var(--green); }
.arch-db { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line-2); }

.ls { width: 100%; max-width: 1000px; margin-top: 40px; border-collapse: collapse; }
.ls tr { border-top: 1px solid var(--line); }
.ls tr:last-child { border-bottom: 1px solid var(--line); }
.ls th, .ls td { padding: 12px 16px 12px 0; text-align: left; vertical-align: baseline; }
.ls th { white-space: nowrap; width: 10ch; }
.ls th i { font-style: normal; margin-right: 1ch; }
.ls td { color: var(--sub); }
.ls td:last-child { padding-right: 0; text-align: right; white-space: nowrap; font-size: 14px; }

/* ---------- instalar ---------- */
.tabs { max-width: 900px; margin-top: 36px; }
[role="tablist"] { display: flex; flex-wrap: wrap; gap: 4px; }
[role="tab"] { padding: 8px 16px; border: 1px solid var(--line-2); border-bottom: 0; border-radius: 8px 8px 0 0; background: none; color: var(--hint); font: inherit; cursor: pointer; }
[role="tab"]:hover { color: var(--text); }
[role="tab"][aria-selected="true"] { background: var(--glass); color: var(--green); font-weight: 700; border-color: var(--green); }
[role="tabpanel"] { position: relative; }
[role="tabpanel"] > p { max-width: 68ch; margin: 16px 0 0; color: var(--sub); }
.code { margin: 0; padding: 18px 20px; border: 1px solid var(--line-2); border-radius: 0 8px 8px 8px; background: var(--glass); backdrop-filter: var(--frost); -webkit-backdrop-filter: var(--frost); font-size: 14px; line-height: 1.8; overflow-x: auto; scrollbar-width: thin; }
.cm { color: var(--muted); }
[role="tabpanel"] .copy { position: absolute; top: 10px; right: 10px; }

/* ---------- datos ---------- */
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 20px; margin-top: 36px; }
.win.small { margin: 0; box-shadow: none; display: flex; flex-direction: column; }
.win.small .code { flex: 1; border: 0; border-radius: 0; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; font-size: 13.5px; line-height: 1.7; }
.win.small .code.chat { white-space: pre-wrap; }
figcaption { padding: 10px 16px; border-top: 1px solid var(--line); color: var(--hint); font-size: 13.5px; }
.facts { max-width: 78ch; margin: 32px 0 0; padding: 0; list-style: none; display: grid; gap: 12px; color: var(--sub); }
.facts li { padding-left: 3ch; text-indent: -3ch; }
.facts li::before { content: "✓  "; color: var(--green); }
.facts b { color: var(--text); }

/* ---------- atajos ---------- */
.keys { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0 32px; max-width: 1000px; margin: 36px 0 0; }
.keys div { display: flex; align-items: center; gap: 16px; padding: 10px 0; border-top: 1px solid var(--line); }
.keys dt { flex: none; width: 8ch; display: flex; align-items: center; gap: 4px; color: var(--muted); }
.keys dd { margin: 0; color: var(--sub); }
kbd { display: inline-block; min-width: 2.2ch; padding: 1px 7px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; background: var(--glass); color: var(--green); font-size: 14px; font-weight: 700; text-align: center; }

footer { max-width: 1180px; margin: 72px auto 0; padding: 28px 0 44px; border-top: 1px solid var(--line); color: var(--hint); font-size: 14px; }
footer p { margin: 0 0 4px; }

/* ---------- pantallas chicas ---------- */
@media (max-width: 1020px) {
  .rail { position: sticky; top: 0; width: auto; flex-direction: row; align-items: center; justify-content: space-between; padding: 12px 16px; border-right: 0; border-bottom: 1px solid var(--line); z-index: 10; }
  .nav { display: none; }
  .gh { padding: 6px 12px; }
  main { margin-left: 0; padding: 0 16px; }
  main > section { padding-top: 56px; }
  html { scroll-padding-top: 72px; }
}
@media (max-width: 640px) {
  body { font-size: 14.5px; }
  .tui { font-size: 12.5px; height: 30em; padding: 14px 8px 8px; }
  .win-hint { display: none; }
  .arch { grid-template-columns: 1fr; gap: 0; }
  .arch-wire { height: 56px; }
  .arch-wire::before { inset: 0 auto 0 50%; border-top: 0; border-left: 1px dashed var(--line-2); }
  .arch-wire::after { display: none; }
  .arch-wire span { transform: translateX(calc(50% + 12px)); }
  .ls, .ls tbody, .ls tr, .ls th, .ls td { display: block; width: auto; }
  .ls tr { padding: 12px 0; }
  .ls th, .ls td { padding: 0; }
  .ls td:last-child { text-align: left; margin-top: 4px; }
  .play-out { grid-template-columns: 11ch 1fr; padding: 14px; }
  [role="tabpanel"] .copy { position: static; margin-top: 10px; }
  .cmd { flex-wrap: wrap; }
  .cmd code { flex-basis: calc(100% - 3ch); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
