@font-face { font-family: "Grenze Gotisch"; src: url(fuentes/grenze-gotisch.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: Archivo; src: url(fuentes/archivo.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }

/* Los colores planos de la carta: cielo amarillo, dosel azul, tinta y rojo. */
:root {
	color-scheme: light;
	--cielo: #f7cf4f;
	--dosel: #1d3f8f;
	--dosel-hondo: #142c66;
	--rojo: #bf2a26;
	--tinta: #17171f;
	--tinta-suave: #5b5b69;
	--linea: #dcdce3;
	--papel: #fff;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--cielo); color: var(--tinta); font: 16px/1.45 Archivo, system-ui, sans-serif; }
h1, h2, p, ol, dl, dd { margin: 0; padding: 0; }
h1, .marca { font-family: "Grenze Gotisch", serif; font-weight: 700; line-height: 1.1; }
h1 { font-size: 30px; }
h1::first-letter { text-transform: uppercase; }
h2 { font-size: 16px; font-weight: 650; }
a { color: var(--dosel); }
:focus-visible { outline: 3px solid var(--rojo); outline-offset: 2px; }

.ancho { width: min(100% - 32px, 560px); margin-inline: auto; }
main.ancho { display: grid; gap: 16px; padding: 14px 0 40px; }
.panel { display: grid; gap: 16px; min-width: 0; padding: 20px; background: var(--papel); border: 2px solid var(--tinta); border-radius: 12px; }

/* Cabecera: el dosel del carro, con su fleco */
.dosel { background: var(--dosel); color: #fff; }
.dosel::after { content: ""; display: block; height: 14px; background: radial-gradient(circle at 50% 0, var(--dosel) 10px, #fff 10.5px 12.5px, transparent 13px) 50% 0 / 28px 14px repeat-x var(--cielo); }
.dosel .ancho { display: flex; align-items: center; gap: 4px; min-height: 60px; }
.dosel a, .dosel button { color: #fff; text-decoration: none; }
.marca { margin-right: auto; font-size: 30px; white-space: nowrap; }
.dosel nav { display: flex; }
.dosel nav a, .dosel button { display: block; padding: 11px 9px; border: 0; background: none; font: inherit; cursor: pointer; }
.dosel nav a[aria-current] { font-weight: 700; text-decoration: underline; text-decoration-color: var(--cielo); text-decoration-thickness: 3px; text-underline-offset: 6px; }
.dosel :focus-visible { outline-color: var(--cielo); }

/* Formularios */
label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
input, select { width: 100%; min-height: 48px; padding: 10px 12px; border: 2px solid var(--tinta); border-radius: 8px; background: var(--papel); color: inherit; font: 500 17px Archivo, system-ui, sans-serif; }
::placeholder { color: var(--tinta-suave); opacity: .75; }
button { touch-action: manipulation; }
.principal { min-height: 54px; border: 0; border-radius: 8px; background: var(--dosel); color: #fff; font: 650 18px Archivo, system-ui, sans-serif; cursor: pointer; }
.principal:hover { background: var(--dosel-hondo); }
.aviso { padding: 10px 12px; border-radius: 8px; background: #e7edfb; }
.aviso.error { background: #fbe6e5; color: #8c1a17; }
.pie, .vacio, .ultima { color: var(--tinta-suave); font-size: 15px; }

/* Apuntar una serie */
.recientes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: -6px; }
.recientes button { min-height: 40px; padding: 6px 14px; border: 1.5px solid var(--linea); border-radius: 20px; background: none; color: inherit; font: 500 15px Archivo, system-ui, sans-serif; cursor: pointer; }
.recientes button[aria-pressed=true] { border-color: var(--dosel); background: #e7edfb; }
.catalogo summary { display: flex; align-items: center; min-height: 46px; font-weight: 600; cursor: pointer; list-style: none; }
.catalogo summary::-webkit-details-marker { display: none; }
.catalogo summary::after { content: ""; width: 8px; height: 8px; margin: -4px 6px 0 auto; border: solid var(--tinta-suave); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.catalogo[open] > summary::after, .catalogo [open] > summary::after { margin-top: 4px; transform: rotate(225deg); }
.catalogo > summary { padding: 0 12px; border-radius: 8px; background: #eeeef3; }
.catalogo details { padding: 0 12px; border-bottom: 1px solid var(--linea); }
.catalogo .recientes { margin: 0; padding: 4px 0 16px; }
.numeros { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.numeros > div { display: grid; gap: 6px; }
.numeros input { height: 72px; padding: 0; text-align: center; font-size: 38px; font-weight: 700; appearance: textfield; -moz-appearance: textfield; }
.numeros input::-webkit-inner-spin-button { display: none; }
.pasos { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.pasos button { min-height: 48px; border: 0; border-radius: 8px; background: #eeeef3; color: inherit; font-size: 24px; cursor: pointer; }
.pasos button:hover { background: var(--linea); }
.ultima:empty { display: none; }
.record { padding: 14px 20px; border-radius: 12px; background: var(--rojo); color: #fff; font-size: 18px; }

/* Series de hoy */
.ejercicio ol { list-style: none; counter-reset: serie; }
.ejercicio li { display: flex; align-items: center; min-height: 46px; border-bottom: 1px solid var(--linea); counter-increment: serie; font-size: 18px; font-variant-numeric: tabular-nums; }
.ejercicio li::before { content: counter(serie); width: 28px; color: var(--tinta-suave); font-size: 14px; }
.ejercicio li form { margin-left: auto; }
.ejercicio li button { width: 44px; height: 44px; border: 0; background: none; color: var(--tinta-suave); font-size: 22px; cursor: pointer; }
.ejercicio li button:hover { color: var(--rojo); }

/* Progreso */
.cifras { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cifras dt { color: var(--tinta-suave); font-size: 14px; }
.cifras dd { font-size: 24px; font-weight: 700; line-height: 1.2; }
.grafica { position: relative; }
.grafica:empty { display: none; }
.grafica svg { display: block; width: 100%; overflow: visible; touch-action: pan-y; }
.grafica text { fill: var(--tinta-suave); font-size: 12px; font-variant-numeric: tabular-nums; }
.grafica .valor { fill: var(--tinta); font-size: 14px; font-weight: 700; }
.globo { position: absolute; top: 0; padding: 6px 10px; border-radius: 6px; background: var(--tinta); color: #fff; font-size: 13px; white-space: nowrap; pointer-events: none; transform: translateX(-50%); }
.globo b { display: block; font-size: 16px; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { padding: 10px 8px 10px 0; border-bottom: 1px solid var(--linea); text-align: left; }
th { color: var(--tinta-suave); font-size: 14px; font-weight: 500; }
th:last-child, td:last-child { padding-right: 0; text-align: right; }

/* Entrar y crear cuenta */
.puerta { display: grid; place-items: center; min-height: 100vh; min-height: 100dvh; }
.puerta main { display: grid; justify-items: center; gap: 20px; width: min(100% - 32px, 400px); padding: 20px 0; }
.puerta .panel { width: 100%; }
.carta { width: 150px; height: auto; }
@media (min-width: 800px) {
	.puerta main { grid-template-columns: 320px 360px; align-items: center; gap: 56px; width: auto; }
	.carta { width: 320px; }
}
