/* Jaque · por dentro: la portada atrapa en negro; aquí se trabaja en grises claros.
   El paso es gradual: menú oscuro, franja superior en gris medio y hojas claras. El verde sigue siendo el único acento
   y los títulos conservan la letra de cartel. Se aplica con la clase "tema" en el body. */
body.tema {
  --ink: #f1ede4;
  --ink-2: rgba(241, 237, 228, 0.74);
  --ink-3: rgba(241, 237, 228, 0.52);
  --bg: #0a0d0b;
  --surface: #121815;
  --superficie-2: #19211d;
  --brand: #00d68f;
  --brand-deep: #00d68f;
  --brand-soft: rgba(0, 214, 143, 0.14);
  --line: rgba(241, 237, 228, 0.1);
  --line-strong: rgba(241, 237, 228, 0.24);
  color-scheme: dark;
  --radius: 10px;
  --shadow: 0 0 0 1px rgba(241, 237, 228, 0.1), 0 14px 30px rgba(0, 0, 0, 0.4);
  --noche: #050706;
  --crema: #f1ede4;
  --titulo: "Archivo", "Plus Jakarta Sans", system-ui, sans-serif;
  background: var(--bg);
}
.tema ::selection { background: var(--brand); color: var(--ink); }

/* Títulos */
.tema h1, .tema h2, .tema h3 { font-family: var(--titulo); font-stretch: 118%; font-weight: 800; letter-spacing: -0.025em; }
.tema .page-head h1 { font-size: clamp(28px, 4vw, 44px); text-transform: uppercase; font-stretch: 125%; letter-spacing: -0.035em; line-height: 1; }
.tema .page-head { gap: 12px; margin-bottom: 30px; padding-bottom: 22px; border-bottom: 1px solid var(--line-strong); }
.tema .dato { font-family: var(--titulo); font-stretch: 112%; }

/* Menú: se queda en negro, como la portada */
.tema .rail, .tema .hero-card {
  --ink: var(--crema); --ink-2: rgba(241, 237, 228, 0.74); --ink-3: rgba(241, 237, 228, 0.48);
  --bg: #121815; --surface: #0d1210; --line: rgba(241, 237, 228, 0.12); --line-strong: rgba(241, 237, 228, 0.26);
  color: var(--ink);
}
.tema .rail { background: var(--noche); border-right: 0; }
.tema .brand span { font-family: var(--titulo); font-stretch: 125%; font-size: 23px; }
.tema #nav a { border-radius: 8px; }
.tema #nav a[aria-current="page"] { background: var(--brand); color: #04120c; }
.tema #nav .candado { background: transparent; box-shadow: inset 0 0 0 1px var(--line-strong); border-radius: 4px; }

/* Hojas de trabajo: claras, con borde fino */
.tema .card { background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.tema .card-pop { background: var(--surface); box-shadow: var(--shadow); }
.tema .soon-box { box-shadow: inset 0 0 0 1px var(--line-strong); }

/* Botones y etiquetas: mismas formas rectas de la portada */
.tema .btn { border-radius: 8px; background: var(--superficie-2); color: var(--ink); }
.tema .btn-primary { background: var(--brand); }
.tema .btn-dark { background: var(--ink); }
.tema .tag { border-radius: 5px; background: #e9ece7; }
.tema .tag-brand { background: var(--brand); }
.tema .tag-ok { background: var(--brand-soft); color: var(--brand-deep); }
.tema .tag-warn { background: var(--amber-soft); }
.tema .tag-bad { background: var(--red-soft); }
.tema .tag-soon { background: transparent; }
.tema .chip { border-radius: 8px; background: var(--superficie-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.tema .chip[aria-pressed="true"] { background: var(--ink); box-shadow: none; }

/* Formularios */
.tema input[type="text"], .tema input[type="email"], .tema input[type="password"], .tema input[type="number"], .tema input[type="date"], .tema input[type="month"],
.tema input[type="datetime-local"], .tema input[type="tel"], .tema select, .tema textarea { background: var(--superficie-2); color: var(--ink); border: 1px solid var(--line-strong); border-radius: 8px; }
.tema input:focus, .tema select:focus, .tema textarea:focus { border-color: var(--brand-deep); }
.tema input[type="checkbox"] { accent-color: var(--brand-deep); }
.tema input[type="file"]::file-selector-button { font: 700 14px var(--font); color: var(--ink); background: var(--superficie-2); border: 1px solid var(--line-strong); border-radius: 8px; padding: 9px 14px; margin-right: 12px; cursor: pointer; }
.tema input[type="file"]::file-selector-button:hover { border-color: var(--brand-deep); color: var(--brand-deep); }

/* Inicio: la tarjeta grande conserva el negro y el caballo, como puente con la portada */
.tema .hero-card { background: var(--noche) url("../assets/caballo.jpg") no-repeat right -30px center / auto 150%; background-blend-mode: lighten; border-radius: var(--radius); box-shadow: none; padding: clamp(24px, 4vw, 40px); min-height: 250px; align-content: center; }
.tema .hero-card::after { display: none; }
.tema .hero-card h1 { text-transform: uppercase; font-size: clamp(18px, 2.4vw, 24px); color: var(--ink-2); }
.tema .hero-card .big { font-family: var(--titulo); font-stretch: 125%; color: var(--brand); font-size: clamp(56px, 10vw, 104px); }
.tema .hero-card .btn-dark { background: var(--crema); color: var(--noche); }
.tema .quick a i { background: var(--superficie-2); box-shadow: 0 0 0 1px var(--line); }

/* Otras piezas */
.tema .elige-item { box-shadow: 0 0 0 1px var(--line); border: 1px solid transparent; }
.tema .elige-item[aria-checked="true"] { border-color: var(--brand-deep); background: var(--brand-soft); box-shadow: none; }
.tema .elige-quitar { border-radius: 6px; }
.tema .carga { background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); }
.tema .carga.lista { border-color: var(--brand-deep); }
.tema .progress { background: rgba(12, 17, 15, 0.1); }
.tema .barra i { background: var(--brand-deep); }
.tema #toast { border-radius: 8px; }
.tema .doc-out { background: #ffffff; color: #0c110f; border-radius: 4px; }
.tema .chat-b { background: var(--superficie-2); color: var(--ink); box-shadow: 0 0 0 1px var(--line); border-radius: 10px; }
.tema .chat-m.yo .chat-b { background: var(--brand); box-shadow: none; }
.tema .skeleton { background: linear-gradient(90deg, #d9ddd8 25%, #e9ece7 50%, #d9ddd8 75%); background-size: 200% 100%; }
body.tema .sop-boton, body.tema .sop-pie button, body.tema .sop-pie input, body.tema .sop-pie textarea { border-radius: 8px; }
body.tema .sop-panel { border-radius: 12px; }

@media (max-width: 860px) {
  /* En el celular el menú va abajo y también se queda en negro */
  .tema #nav { background: var(--noche); --ink: var(--crema); --ink-2: rgba(241, 237, 228, 0.7); --bg: #121815; }
  .tema #nav a { color: rgba(241, 237, 228, 0.7); }
  .tema #nav a[aria-current="page"] { color: #04120c; }
  .tema .hero-card { background-position: right -80px center; background-size: auto 120%; }
}

/* ===== Capa de diseño 2: sobria =====
   Criterio (a lo Spotify y Platzi): superficies planas, un solo acento (el verde), poco relieve y movimiento solo donde
   avisa algo. La jerarquía la dan el tamaño y el peso de la letra, no los adornos. */
body.tema { --radius: 12px; background: var(--bg); }
.tema * { scrollbar-width: thin; scrollbar-color: rgba(241, 237, 228, 0.25) transparent; }

/* Menú: negro liso; la página actual en verde */
.tema #nav a { padding-block: 10px; transition: background 0.15s, color 0.15s; }
.tema #nav a:hover:not([aria-current="page"]) { background: rgba(241, 237, 228, 0.07); }
.tema #nav a[aria-current="page"] { font-weight: 800; }

.tema .page-head p { max-width: 62ch; font-size: 16px; }

/* Hojas: planas, con borde fino; al pasar el cursor solo se afina el borde */
.tema .card { border-radius: var(--radius); background: var(--surface); box-shadow: 0 0 0 1px var(--line); padding-block: clamp(16px, 2vw, 22px); }
.tema .card-pop { box-shadow: 0 0 0 1px var(--line); }
.tema a.card, .tema .card.todo, .tema .elige-item { transition: box-shadow 0.15s ease; }
.tema a.card:hover, .tema .card.todo:hover, .tema .elige-item:hover { box-shadow: 0 0 0 1.5px var(--brand-deep); }
.tema .card h3 { font-size: clamp(17px, 1.6vw, 20px); }

/* Pasos numerados */
.tema .todo .dot { width: 32px; height: 32px; border-radius: 50%; font-family: var(--titulo); font-weight: 800; box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.tema .todo .dot.done { background: var(--brand); color: #04120c; box-shadow: none; }
.tema .todo:hover .go { color: var(--brand-deep); }

/* Accesos rápidos */
.tema .quick a i { transition: background 0.15s; }
.tema .quick a:hover i { background: var(--brand); }

/* Botones: el principal verde liso, el resto con borde */
.tema .btn { border-radius: 999px; font-weight: 700; box-shadow: 0 0 0 1px var(--line-strong); transition: background 0.15s, box-shadow 0.15s; }
.tema .btn:hover { box-shadow: 0 0 0 1.5px var(--ink); }
.tema .btn-primary { background: var(--brand); color: #04120c; box-shadow: none; }
.tema .btn-primary:hover { background: #00e79c; box-shadow: none; }
.tema .btn-dark { background: var(--crema); color: #04120c; box-shadow: none; }
.tema .btn-dark:hover { box-shadow: none; background: #ffffff; }
.tema .btn:focus-visible, .tema a:focus-visible, .tema button:focus-visible { outline: 2px solid var(--brand-deep); outline-offset: 2px; box-shadow: none; }

/* Etiquetas y chips */
.tema .tag { border-radius: 999px; padding-inline: 10px; font-weight: 700; }
.tema .chip { border-radius: 999px; padding-inline: 14px; transition: background 0.15s, color 0.15s; }
.tema .chip[aria-pressed="true"] { background: var(--brand); color: #04120c; }

/* Formularios */
.tema input[type="text"], .tema input[type="email"], .tema input[type="password"], .tema input[type="number"], .tema input[type="date"], .tema input[type="month"],
.tema input[type="datetime-local"], .tema input[type="tel"], .tema select, .tema textarea { border-radius: 10px; padding-block: 11px; }
.tema input:focus, .tema select:focus, .tema textarea:focus { outline: 0; border-color: var(--brand-deep); box-shadow: 0 0 0 2px rgba(0, 122, 85, 0.25); }
.tema .field label { font-weight: 700; font-size: 13px; }

/* Cifras y progreso */
.tema .dato { font-size: clamp(26px, 3vw, 34px); letter-spacing: -0.03em; }
.tema .progress, .tema .barra { border-radius: 999px; overflow: hidden; }
.tema .barra i { background: var(--brand-deep); border-radius: 999px; }

/* Tablas */
.tema table { border-collapse: separate; border-spacing: 0; }
.tema thead th { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); }
.tema tbody tr:hover { background: rgba(241, 237, 228, 0.04); }

/* Chat y paneles oscuros */
.tema .chat-b { border-radius: 14px; }
.tema .hero-card { border-radius: 16px; }

@media (prefers-reduced-motion: reduce) { .tema * { transition: none !important; animation: none !important; } }

/* El contenido usa todo el ancho disponible */
.tema #view { max-width: none; }

.tema .cl-hero h1 { font-size: clamp(24px, 3vw, 36px); max-width: 22ch; text-transform: none; line-height: 1.05; }

/* Botón de Soporte: verde de la marca con letra oscura (antes, crema con letra blanca no se leía) */
body.tema .sop-boton { background: var(--brand); color: #04120c; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45); }
body.tema .sop-boton:hover { background: #00e79c; }

/* ===== Legibilidad en oscuro =====
   Con el fondo oscuro, --ink es crema: sobre verde o sobre crema no se lee. Aquí se fijan pares de color con buen contraste. */
.tema .tag { background: var(--superficie-2); color: var(--ink-2); }
.tema .tag-brand, .tema .verdict.ok { background: var(--brand); color: #04120c; }
.tema .tag-ok { background: var(--brand-soft); color: var(--brand); }
.tema .tag-warn, .tema .alertas, .tema mark { background: var(--amber-soft); color: #7a4600; }
.tema .tag-bad, .tema .verdict.bad { background: var(--red-soft); color: #b3202c; }
.tema .tag-soon { background: transparent; color: var(--ink-3); }
.tema #toast { background: var(--brand); color: #04120c; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45); }
.tema .btn-dark, .tema .step-tab[aria-selected="true"] { background: var(--crema); color: #04120c; }
.tema .sop-cabeza, .tema .obs-cabeza { background: var(--superficie-2); color: var(--ink); box-shadow: inset 0 -1px 0 var(--line-strong); }
.tema .sop-pie button { background: var(--brand); color: #04120c; }
.tema .chip[aria-pressed="true"] { background: var(--brand); color: #04120c; }
.tema .cl-hero .tag, .tema .hero-card .tag { color: var(--ink); }
