/* hidden tiene que ganarle a display: flex/grid de .tabs, .bar, etc. */
[hidden] { display: none !important; }
:root {
  color-scheme: light;
  --bg: #f4f3ee; --surface: #ffffff; --surface-2: #faf9f5; --ink: #1a1916; --muted: #66625a; --faint: #898781; --line: #e3e0d7;
  --grid: #e9e7df; --axis: #c9c7bc;
  --accent: #0f6b5c; --accent-strong: #0b5a4d; --on-accent: #ffffff; --accent-soft: #e0efec;
  --warn: #8a5000; --warn-soft: #fbefd9; --danger: #b3261e; --danger-soft: #fbe9e7;
  --chip: #f0eee8;
  /* Sombras teñidas con el tono del fondo, no negras. */
  --shadow: 0 1px 2px rgba(52, 44, 24, 0.05), 0 14px 32px -22px rgba(52, 44, 24, 0.28);
  --shadow-pop: 0 2px 6px rgba(52, 44, 24, 0.08), 0 18px 40px -16px rgba(52, 44, 24, 0.3);
  --r-sm: 8px; --r: 14px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --mono: ui-monospace, "SF Mono", SFMono-Regular, "Cascadia Mono", Menlo, Consolas, monospace;
  /* Grupos de categorías: paleta categórica validada (orden fijo, apto daltonismo en pares contiguos). */
  --g-meeting: #2a78d6; --g-email: #eb6834; --g-chat: #1baf7a; --g-notes: #eda100;
  --g-docs: #e87ba4; --g-business: #008300; --g-other: #6250d6;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #131412; --surface: #1c1e1b; --surface-2: #212320; --ink: #ecebe6; --muted: #a09c92; --faint: #898781; --line: #2e302b;
    --grid: #292a27; --axis: #3a3a36;
    --accent: #5cc4b1; --accent-strong: #74d2c0; --on-accent: #0c1513; --accent-soft: #1b302c;
    --warn: #e6b566; --warn-soft: #33290f; --danger: #f2867f; --danger-soft: #3a1f1c;
    --chip: #282a26;
    --shadow: none;
    --shadow-pop: 0 12px 32px -8px rgba(0, 0, 0, 0.55);
    --g-meeting: #3987e5; --g-email: #d95926; --g-chat: #199e70; --g-notes: #c98500;
    --g-docs: #d55181; --g-business: #008300; --g-other: #9085e9;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
main { max-width: 1120px; margin: 0 auto; padding: 28px 24px 96px; }
::selection { background: var(--accent-soft); }

/* ---------- encabezado ---------- */
header.top { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand .logo { flex: none; width: 40px; height: 40px; border-radius: 11px; background: var(--ink); color: var(--bg); display: grid; place-items: center; }
.brand .logo svg { width: 22px; height: auto; display: block; }
header.top .title { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
h1 { font-size: 24px; line-height: 1.2; margin: 0; letter-spacing: -0.022em; font-weight: 650; }
.eyebrow { color: var(--muted); font-size: 13px; }
h2 { font-size: 17px; line-height: 1.3; letter-spacing: -0.012em; color: var(--ink); margin: 48px 0 12px; font-weight: 640; }
h3 { font-size: 14px; margin: 0 0 12px; font-weight: 600; }
.right { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* Pestañas: una fila propia, subrayada. En pantallas angostas se desliza de costado. */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 0 0 24px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  position: relative; border: 0; background: none; color: var(--muted); padding: 10px 12px 12px; font: inherit; font-weight: 500;
  cursor: pointer; white-space: nowrap; border-radius: var(--r-sm) var(--r-sm) 0 0; transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.tabs button::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; border-radius: 2px;
  background: var(--accent); transform: scaleX(0); transition: transform 0.35s var(--ease);
}
.tabs button:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 4%, transparent); }
.tabs button[aria-selected="true"] { color: var(--ink); }
.tabs button[aria-selected="true"]::after { transform: scaleX(1); }

.settings { position: relative; }
.settings summary {
  list-style: none; cursor: pointer; display: inline-flex; gap: 7px; align-items: center; border: 1px solid var(--line);
  background: var(--surface); border-radius: var(--r-sm); padding: 7px 12px; color: var(--muted); font-weight: 500;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.settings summary::-webkit-details-marker { display: none; }
.settings summary:hover, .settings[open] summary { color: var(--ink); border-color: var(--axis); }
.settings summary svg { width: 16px; height: 16px; flex: none; }
.settings-panel {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 5; background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; padding: 14px; width: min(280px, calc(100vw - 32px)); box-shadow: var(--shadow-pop); display: grid; gap: 6px;
  animation: pop 0.22s var(--ease);
}
.settings-panel label { font-size: 13px; color: var(--muted); }

/* ---------- controles ---------- */
.bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
input, select, textarea {
  font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 8px 11px; min-width: 0; transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
input:hover, select:hover, textarea:hover { border-color: var(--axis); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input::placeholder { color: var(--faint); }
.bar input { flex: 1 1 220px; }
button.act {
  font: inherit; font-weight: 500; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: var(--r-sm);
  padding: 8px 14px; cursor: pointer; white-space: nowrap;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.15s var(--ease);
}
button.act:hover { border-color: var(--axis); background: var(--surface-2); }
button.act:active { transform: scale(0.98); }
button.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
button.primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
button.danger { color: var(--danger); }
button.danger:hover { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 35%, var(--line)); }
button.link { border: 0; background: none; color: var(--accent); font: inherit; cursor: pointer; padding: 0; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent); }
button.link:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.card.calendar { margin-top: 12px; }
.card.integration .signin { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 14px; }
.card.integration .signin h4 { margin: 0 0 4px; font-size: 14px; }
.card.integration .signin > .hintline { margin-bottom: 12px; }
.card.integration code.copy { display: block; overflow-wrap: anywhere; user-select: all; }
.note { color: var(--muted); font-size: 13px; margin: 6px 0 0; max-width: 80ch; }
.note.sub { margin: -6px 0 14px; }

/* Título de sección con un control a la derecha. */
.sec-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 16px; margin: 48px 0 12px; }
.sec-head h2 { margin: 0; }
.toggle { display: inline-flex; padding: 3px; gap: 2px; background: var(--chip); border-radius: 10px; }
.toggle button { border: 0; background: none; color: var(--muted); font: inherit; font-size: 13px; font-weight: 500; padding: 5px 12px; border-radius: 7px; cursor: pointer; white-space: nowrap; transition: color 0.2s var(--ease), background 0.2s var(--ease), transform 0.15s var(--ease); }
.toggle button:hover { color: var(--ink); }
.toggle button:active { transform: scale(0.98); }
.toggle button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(52, 44, 24, 0.12); }
/* Período: etiqueta arriba del control. */
.bar .field { flex: 0 1 auto; gap: 4px; }
.bar .field > span { font-size: 12px; font-weight: 500; color: var(--muted); }
.bar .field input, .bar .field select { flex: none; }
.bar.period { margin-top: 12px; align-items: flex-end; }

/* ---------- números ---------- */
/* Un solo panel con divisiones finas, no una caja por número. Los bordes de la derecha y de abajo
   de cada celda quedan tapados por el recorte del panel. */
.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-top: 16px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow);
}
.stat { padding: 18px 20px 16px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 -1px -1px 0; min-width: 0; }
.stat b { display: block; font-size: 28px; line-height: 1.15; letter-spacing: -0.03em; font-weight: 620; font-variant-numeric: tabular-nums; }
.stat span { display: block; color: var(--muted); font-size: 13px; line-height: 1.35; margin-top: 4px; }
.stat .partial { color: var(--warn); font-size: 12px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; margin-bottom: 12px; min-width: 0; box-shadow: var(--shadow); }
.card .top { display: flex; flex-wrap: wrap; gap: 4px 18px; align-items: baseline; }
.card .top b { font-size: 20px; letter-spacing: -0.02em; font-weight: 620; font-variant-numeric: tabular-nums; }
.card .top span { color: var(--muted); font-size: 13px; }
.card .top span.perunit { color: var(--accent); font-weight: 600; }
.cols3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-top: 12px; }
.cols3 .card { margin: 0; }

/* Tareas repetidas: el tiempo a la izquierda, los pasos a la derecha. */
.pattern { display: grid; gap: 12px; }
.pattern .body { display: grid; gap: 12px; min-width: 0; }
@media (min-width: 760px) {
  .pattern { grid-template-columns: 168px minmax(0, 1fr); gap: 24px; }
  .pattern .top { flex-direction: column; gap: 2px; align-items: flex-start; border-right: 1px solid var(--line); padding-right: 16px; }
  .pattern .top b { font-size: 26px; margin-bottom: 4px; }
}

/* Inventario de MCP: una tarjeta a lo ancho debajo de las tres columnas. */
.card.setup { margin-top: 12px; }
.card.setup .kv { max-width: 440px; }
.card.setup .kv + .note { margin-top: 12px; }
/* Etapas de ContextOps: un número grande y los indicios que lo explican. */
.stage .big { display: block; font-size: 28px; line-height: 1.15; font-weight: 620; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stage p { color: var(--muted); font-size: 13px; margin: 4px 0 14px; }
.kv { list-style: none; padding: 0; margin: 0; display: grid; font-size: 13px; }
.kv li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); }
.kv li:first-child { border-top: 0; padding-top: 0; }
.kv li span + span { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.kv li.sub { color: var(--muted); margin-top: 8px; border-top: 0; padding-bottom: 2px; font-weight: 600; }
.steps { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; align-items: center; }
.step { background: var(--chip); border-radius: 7px; padding: 4px 9px; font-size: 13px; max-width: 100%; overflow-wrap: anywhere; }
.step em { font-style: normal; color: var(--muted); }
.step .ctx { color: var(--muted); }
.arrow { color: var(--faint); font-size: 12px; }
.hint { background: var(--accent-soft); color: var(--accent-strong); border-radius: var(--r-sm); padding: 8px 12px; font-size: 13px; font-weight: 500; }

/* La frase que abre el reporte: texto grande, sin caja. */
.lead { font-size: clamp(18px, 2.3vw, 23px); line-height: 1.35; letter-spacing: -0.014em; color: var(--muted); margin: 20px 0 24px; max-width: 34em; text-wrap: pretty; }
.lead strong { color: var(--ink); font-weight: 620; }
.intro { color: var(--muted); margin: 0 0 20px; max-width: 76ch; }

.empty, .warnbox { border-radius: var(--r); padding: 14px 16px; }
.empty { border: 1px dashed var(--axis); color: var(--muted); text-align: center; padding: 40px 20px; text-wrap: balance; }
.empty::before {
  content: ""; display: block; width: 30px; height: 30px; margin: 0 auto 12px; background: var(--faint);
  -webkit-mask: var(--empty-icon) center / contain no-repeat; mask: var(--empty-icon) center / contain no-repeat;
  --empty-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 13.5 5.6 5.7A1 1 0 0 1 6.55 5h10.9a1 1 0 0 1 .95.7L21 13.5V18a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1v-4.5Z'/%3E%3Cpath d='M3 13.5h5a1 1 0 0 1 1 1 3 3 0 0 0 6 0 1 1 0 0 1 1-1h5'/%3E%3C/svg%3E");
}
.warnbox { background: var(--warn-soft); color: var(--warn); }
.warnbox + .warnbox, .warnbox + .stats { margin-top: 12px; }
#out > .empty:first-child, #out > .warnbox:first-child { margin-top: 16px; }

/* ---------- tablas ---------- */
.scroll { overflow-x: auto; max-width: 100%; border-radius: var(--r); }
table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 14px; overflow-wrap: anywhere; vertical-align: middle; }
th { color: var(--muted); background: var(--surface-2); font-weight: 600; font-size: 12px; letter-spacing: 0.01em; overflow-wrap: normal; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tr { transition: background 0.15s var(--ease); }
tr:hover td { background: color-mix(in srgb, var(--ink) 2.5%, transparent); }
table.overview { min-width: 900px; }
table.overview td:first-child, table.overview td:last-child { white-space: nowrap; overflow-wrap: normal; }
table.overview td.split { width: 160px; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cat { display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; }
/* Dentro de una tarjeta la tabla no repite el marco. */
.card table { border: 0; border-radius: 0; background: none; }
.card .scroll { border-radius: 0; }
.card th { background: none; padding-top: 4px; }
.card th:first-child, .card td:first-child { padding-left: 0; }
.card th:last-child, .card td:last-child { padding-right: 0; }
.card tr:hover td { background: none; }

/* Leyenda y muestras de color: la identidad nunca va solo en el color del texto. */
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 0; margin: 14px 0 0; font-size: 13px; color: var(--muted); }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex: none; }

/* Barra segmentada: una sola cosa partida en partes, con 2px de separación. */
.segbar { display: flex; gap: 2px; height: 34px; }
.segbar .seg { min-width: 2px; border-radius: 4px; font-size: 12px; font-weight: 600; display: flex; align-items: center; padding: 0 8px; white-space: nowrap; overflow: visible; transition: filter 0.2s var(--ease); }
.segbar .seg:first-child { border-top-left-radius: 9px; border-bottom-left-radius: 9px; }
.segbar .seg:last-child { border-top-right-radius: 9px; border-bottom-right-radius: 9px; }
.segbar:not(.thin) .seg:hover { filter: brightness(1.08); }
.segbar.thin { height: 8px; min-width: 120px; }
.segbar.thin .seg { padding: 0; border-radius: 0; }
.segbar.thin .seg:first-child { border-radius: 4px 0 0 4px; }
.segbar.thin .seg:last-child { border-radius: 0 4px 4px 0; }
.segbar.thin .seg:only-child { border-radius: 4px; }

/* Columnas apiladas por hora. */
.chart .legend { margin: 0 0 14px; }
.colchart { position: relative; padding-left: 28px; }
.plot { position: relative; height: 220px; margin-top: 14px; border-bottom: 1px solid var(--axis); }
.grid { position: absolute; left: 0; right: 0; height: 0; border-top: 1px dashed var(--grid); }
.grid span { position: absolute; left: -28px; top: -8px; width: 22px; text-align: right; font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; }
.cols { position: absolute; inset: 0; display: grid; align-items: end; }
.col { height: 100%; display: flex; align-items: flex-end; justify-content: center; cursor: default; border-radius: 6px 6px 0 0; transition: background 0.15s var(--ease); }
.col:hover, .col:focus-visible { background: color-mix(in srgb, var(--ink) 5%, transparent); }
.stack { width: min(28px, 64%); display: flex; flex-direction: column-reverse; gap: 2px; transform-origin: bottom; animation: grow-y 0.7s var(--ease) backwards; }
.stack .seg { min-height: 1px; flex-basis: 0; border-radius: 1px; }
.stack .seg:last-child { border-radius: 5px 5px 1px 1px; }
.xaxis { display: grid; margin-top: 6px; font-size: 11px; color: var(--faint); text-align: center; font-variant-numeric: tabular-nums; }

.barlist { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.barlist li { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 13px; }
.bl-label { overflow-wrap: anywhere; }
.bl-track { height: 8px; border-radius: 4px; background: var(--chip); overflow: hidden; }
.bl-bar { display: block; height: 8px; border-radius: 4px; min-width: 2px; transform-origin: left; animation: grow-x 0.7s var(--ease) backwards; }
.bl-value { color: var(--muted); font-variant-numeric: tabular-nums; min-width: 2.6em; text-align: right; }

.table-view { margin-top: 14px; font-size: 13px; }
.table-view summary { cursor: pointer; color: var(--muted); width: fit-content; transition: color 0.2s var(--ease); }
.table-view summary:hover { color: var(--ink); }
.table-view table { margin-top: 10px; }

.tip { position: absolute; z-index: 20; pointer-events: none; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; font-size: 13px; box-shadow: var(--shadow-pop); min-width: 140px; max-width: 280px; }
.tip-head { display: flex; justify-content: space-between; gap: 12px; font-weight: 600; margin-bottom: 4px; }
.tip-row { display: flex; align-items: center; gap: 6px; }
.tip-row .tip-label { flex: 1; color: var(--muted); }
.tip b { font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- formularios de la consola ---------- */
.form { display: grid; gap: 16px; }
.form h2 { margin-bottom: 0; }
.card.form h2 { margin-top: 0; font-size: 20px; letter-spacing: -0.02em; }
.field { display: grid; gap: 6px; }
.field > span { font-weight: 600; font-size: 13px; }
.field small, .hintline { color: var(--muted); font-size: 13px; }
.hintline { margin: 0 0 12px; max-width: 76ch; }
.field textarea { min-height: 84px; resize: vertical; }
.rows td input, .rows td select { width: 100%; }
.keybox { display: grid; gap: 10px; }
code { font-family: var(--mono); font-size: 0.92em; }
code.key { font-size: 12px; background: var(--chip); padding: 8px 10px; border-radius: var(--r-sm); overflow-wrap: anywhere; display: block; }
.saved { color: var(--muted); margin-left: 10px; font-size: 13px; }
.err { color: var(--danger); }
.err:empty { display: none; }
.opp { font-size: 13px; color: var(--muted); }
.integration { display: grid; gap: 14px; }
.integration .hintline { margin: 0; }
.integration .head { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.integration .head h3 { margin: 0; font-size: 17px; letter-spacing: -0.012em; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; border-radius: 999px; padding: 3px 10px; background: var(--chip); color: var(--muted); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--faint); }
.badge.on { background: var(--accent-soft); color: var(--accent-strong); }
.badge.on::before { background: var(--accent); animation: breathe 2.4s ease-in-out infinite; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* Ingreso y alta: una columna angosta, alineada a la izquierda. */
#auth { margin-top: 12px; }
#auth form { max-width: 440px; padding: 28px; }
#auth form p { margin: 0; }

/* Claude por repositorio */
td.repo { font-family: var(--mono); font-size: 13px; overflow-wrap: anywhere; }
.sharebar { display: inline-block; height: 6px; border-radius: 3px; background: var(--accent); vertical-align: middle; margin-right: 8px; }
pre.snippet { font-family: var(--mono); background: var(--chip); border-radius: 10px; padding: 12px 14px; font-size: 12px; overflow-x: auto; white-space: pre; }

/* ---------- carga ---------- */
/* Aparece recién a los 150 ms: una respuesta rápida no parpadea. */
.skeleton { display: grid; gap: 14px; margin-top: 16px; animation: fade 0.3s 0.15s backwards; }
.skel { position: relative; overflow: hidden; background: var(--chip); border-radius: var(--r); }
.skel::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--surface) 70%, transparent), transparent);
  animation: shimmer 1.5s ease-in-out infinite;
}
.skel.line { height: 22px; width: min(520px, 80%); border-radius: 7px; }
.skel.line.short { width: 180px; height: 16px; margin-top: 18px; }
.skel.tiles { height: 96px; }
.skel.block { height: 150px; }
.skel.tall { height: 280px; }

/* ---------- movimiento ---------- */
/* Lo que se pinta entra en cascada; solo transform y opacity. */
#out > * { animation: rise 0.55s var(--ease) backwards; }
#out > *:nth-child(2) { animation-delay: 40ms; }
#out > *:nth-child(3) { animation-delay: 80ms; }
#out > *:nth-child(4) { animation-delay: 120ms; }
#out > *:nth-child(5) { animation-delay: 160ms; }
#out > *:nth-child(6) { animation-delay: 200ms; }
#out > *:nth-child(n + 7) { animation-delay: 240ms; }
#out > .skeleton { animation: fade 0.3s 0.15s backwards; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(0.98); } }
@keyframes grow-y { from { transform: scaleY(0); } }
@keyframes grow-x { from { transform: scaleX(0); } }
@keyframes shimmer { to { transform: translateX(100%); } }
@keyframes breathe { 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media (max-width: 560px) {
  main { padding: 20px 16px 72px; }
  h1 { font-size: 21px; }
  h2, .sec-head { margin-top: 36px; }
  .stat { padding: 14px 16px; }
  .stat b { font-size: 23px; }
  .card { padding: 16px; }
  .barlist li { grid-template-columns: minmax(0, 1fr) auto; }
  .barlist .bl-track { grid-column: 1 / -1; grid-row: 2; }
  #auth form { padding: 20px; }
}
