/* =====================================================================
   SoyForjia · estilos de la web
   Materiales de una forja: acero frío, hierro y los colores de temple
   que toma el acero al calentarse (paja → bronce → violeta → azul).
   El degradado de temple solo se usa para hablar de progreso o "calor".
   ===================================================================== */

@font-face { font-family: "Big Shoulders"; src: url("fonts/bigshoulders-700.woff") format("woff"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Big Shoulders"; src: url("fonts/bigshoulders-400.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("fonts/instrumentsans-400.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("fonts/instrumentsans-700.woff") format("woff"); font-weight: 700; font-display: swap; }

:root {
    --acero: #E4E7EA;        /* fondo: acero frío */
    --acero-claro: #F3F4F5;  /* superficies */
    --blanco: #FFFFFF;
    --hierro: #1A1E23;       /* tinta y botones */
    --hierro-2: #262B31;
    --grafito: #555D67;      /* texto secundario */
    --linea: #C7CCD2;        /* bordes y reglas */
    --paja: #E2B44A;
    --bronce: #B4612A;
    --violeta: #5B4A8E;
    --azul: #2C5D8F;
    --rojo: #B3261E;
    --temple: linear-gradient(90deg, var(--paja), var(--bronce) 40%, var(--violeta) 72%, var(--azul));
    --display: "Big Shoulders", "Arial Narrow", "Roboto Condensed", sans-serif;
    --texto: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --r-s: 4px;
    --r-m: 8px;
    --r-l: 14px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
    margin: 0; background: var(--acero); color: var(--hierro);
    font: 400 17px/1.55 var(--texto);
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--azul); text-underline-offset: 3px; }
a:hover { color: var(--hierro); }
:focus-visible { outline: 3px solid var(--azul); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3 { margin: 0; }
h1, h2 { font-family: var(--display); font-weight: 700; letter-spacing: -0.005em; text-wrap: balance; }
h2 { font-size: clamp(40px, 5.2vw, 64px); line-height: 0.95; }
h3 { font-size: 20px; line-height: 1.25; font-weight: 700; }
p { margin: 0 0 14px; }
code { background: var(--acero-claro); border: 1px solid var(--linea); padding: 1px 6px; border-radius: var(--r-s); font-size: 0.9em; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--hierro); color: #fff; padding: 10px 14px; border-radius: var(--r-s); z-index: 20; }
.skip:focus { left: 8px; }

/* ---------- Cabecera ---------- */
.site-head { position: sticky; top: 0; z-index: 10; background: rgba(228, 231, 234, 0.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--linea); }
.head-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--hierro); text-decoration: none; }
.brand-word { font-family: var(--display); font-weight: 700; font-size: 27px; letter-spacing: 0.01em; line-height: 1; }
.brand-soy { color: #3E7D14; }   /* verde del logo, oscurecido para que se lea bien sobre el fondo */
.nav { display: flex; align-items: center; gap: 22px; }
.nav > a:not(.btn) { color: var(--hierro); text-decoration: none; font-weight: 700; font-size: 15px; }
.nav > a:not(.btn):hover, .nav > a[aria-current] { text-decoration: underline; text-decoration-thickness: 2px; }
form.inline { display: inline; margin: 0; }

/* ---------- Botones ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 48px; padding: 12px 22px; border: 2px solid var(--hierro); border-radius: var(--r-m);
    background: var(--hierro); color: #fff; font: 700 16px/1.2 var(--texto);
    text-decoration: none; cursor: pointer; transition: background .15s, color .15s;
}
.btn:hover { background: var(--hierro-2); color: #fff; }
.btn-lg { min-height: 56px; padding: 14px 28px; font-size: 17px; }
.btn-sm, .btn.small { min-height: 40px; padding: 8px 16px; font-size: 15px; }
.btn-ghost, .btn.ghost { background: transparent; color: var(--hierro); }
.btn-ghost:hover, .btn.ghost:hover { background: var(--hierro); color: #fff; }
.btn-light { background: var(--blanco); border-color: var(--blanco); color: var(--hierro); }
.btn-light:hover { background: var(--acero); color: var(--hierro); }
.btn-block, .btn.block { width: 100%; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.btn.danger-btn { background: var(--rojo); border-color: var(--rojo); }
.link-btn, .linkbtn { background: none; border: 0; padding: 0; font: 700 15px var(--texto); color: var(--hierro); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.linkbtn { font-weight: 400; font-size: 14px; color: var(--grafito); }

/* ---------- Portada: cabecera con la pila de pesos ---------- */
.home .site-head { background: rgba(228, 231, 234, 0.86); }
.hero {
    border-bottom: 1px solid var(--linea);
    /* acero cepillado, casi imperceptible */
    background-image: repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.35) 0 1px, transparent 1px 4px);
}
.hero-in { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 56px; align-items: center; padding-top: 72px; padding-bottom: 88px; }
.hero h1 { font-size: clamp(68px, 10.5vw, 148px); line-height: 0.86; letter-spacing: -0.01em; margin-bottom: 28px; }
.lead { font-size: 20px; line-height: 1.5; max-width: 32em; color: var(--hierro-2); margin-bottom: 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-note { margin-top: 16px; color: var(--grafito); font-size: 15px; }

.stack-scene { position: relative; justify-self: center; width: min(100%, 420px); padding-bottom: 112px; }
.stack-machine {
    --h: 30px; --gap: 6px;
    position: relative; margin-left: 0; width: 76%;
    padding: 18px 26px 22px; border-radius: var(--r-m);
    background: linear-gradient(180deg, #2A3037, #171A1E);
    box-shadow: 0 30px 50px -28px rgba(26, 30, 35, 0.65);
}
.stack-rail { position: absolute; top: 10px; bottom: 10px; left: 50%; width: 4px; margin-left: -2px; border-radius: 2px; background: #8E969F; opacity: 0.55; }
.plates { position: relative; list-style: none; margin: 0; padding: 0; display: grid; gap: var(--gap); }
.plate {
    position: relative; height: var(--h); border-radius: var(--r-s);
    background: linear-gradient(180deg, #4A525B 0%, #343A41 55%, #2B3036 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), inset 7px 0 0 var(--c, transparent);
}
.plate::after { /* agujero del selector */
    content: ""; position: absolute; left: 50%; top: 50%; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px;
    border-radius: 50%; background: #15181C; box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.6);
}
.plate-kg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); font: 700 15px/1 var(--display); letter-spacing: 0.03em; color: #DCE0E4; }
.plate.is-pin .plate-kg { color: #fff; }
.plate.is-next { outline: 2px dashed rgba(226, 180, 74, 0.75); outline-offset: 2px; }
.pin {
    position: absolute; left: calc(50% + 4px); width: 46%;
    top: calc(18px + var(--row) * (var(--h) + var(--gap)) + var(--h) / 2 - 5px);
    height: 10px; border-radius: 5px; background: linear-gradient(180deg, #F3F4F5, #B9C0C7);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.45);
}
.pin span { position: absolute; right: -16px; top: 50%; width: 26px; height: 26px; margin-top: -13px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #C9CED4 60%, #8E969F); box-shadow: 0 3px 8px rgba(0, 0, 0, 0.45); }
.coach-note {
    position: absolute; right: 0; bottom: 0; width: 66%; margin: 0;
    background: var(--blanco); border: 1px solid var(--linea); border-radius: var(--r-m);
    padding: 16px 18px 14px; box-shadow: 0 18px 40px -22px rgba(26, 30, 35, 0.55);
}
.coach-note::before { content: ""; position: absolute; left: -1px; right: -1px; top: -1px; height: 4px; border-radius: var(--r-m) var(--r-m) 0 0; background: var(--temple); }
.coach-note figcaption { font-size: 14px; color: var(--grafito); margin-bottom: 2px; }
.coach-note .coach-load { font: 700 30px/1.05 var(--display); margin-bottom: 8px; }
.coach-note p { font-size: 15px; line-height: 1.45; margin: 0; }

/* El único momento animado: el selector baja hasta 47 kg y las placas se calientan. */
@media (prefers-reduced-motion: no-preference) {
    .pin { animation: pin-drop 0.9s cubic-bezier(.2, .7, .2, 1) 0.25s both; }
    .plate.is-lifted { animation: heat 0.5s ease-out both; animation-delay: calc(1.05s + var(--i) * 70ms); }
    .coach-note { animation: note-in 0.5s ease-out 1.75s both; }
}
@keyframes pin-drop { from { transform: translateY(calc(-1 * var(--row) * (var(--h) + var(--gap)))); opacity: 0.4; } to { transform: none; opacity: 1; } }
@keyframes heat { from { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), inset 0 0 0 transparent; } }
@keyframes note-in { from { opacity: 0; transform: translateY(10px); } }

/* ---------- Secciones ---------- */
.section { padding: 104px 0; border-bottom: 1px solid var(--linea); }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: end; margin-bottom: 48px; }
.section-head p { color: var(--hierro-2); font-size: 18px; max-width: 34em; margin: 0; }
.section-head:has(> h2:only-child) { grid-template-columns: 1fr; }

/* Tres diferencias: una sola ficha técnica partida en columnas */
.spec { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: var(--acero-claro); border: 1px solid var(--linea); border-radius: var(--r-m); }
.spec-col { padding: 32px 30px 30px; display: flex; flex-direction: column; }
.spec-col + .spec-col { border-left: 1px solid var(--linea); }
.spec-col h3 { font: 700 30px/1 var(--display); margin-bottom: 12px; }
.spec-col > p { color: var(--hierro-2); font-size: 16px; }
.spec-cap { margin: 12px 0 0; font-size: 14px; color: var(--grafito); }
.ladder { display: flex; gap: 6px; margin-top: auto; padding-top: 18px; }
.ladder span { flex: 1; text-align: center; padding: 10px 0; border-radius: var(--r-s); border: 1px solid var(--linea); background: var(--blanco); font: 700 22px/1 var(--display); color: var(--grafito); }
.ladder .on { background: var(--hierro); border-color: var(--hierro); color: #fff; }
.ladder .next { border: 2px dashed var(--bronce); color: var(--hierro); }
.weeks { display: flex; align-items: flex-end; gap: 8px; height: 132px; margin-top: auto; padding-top: 18px; }
.weeks span {
    position: relative; flex: 1; height: var(--h); border-radius: var(--r-s) var(--r-s) 0 0;
    background: linear-gradient(0deg, var(--paja), var(--bronce) 45%, var(--violeta) 75%, var(--azul)) bottom / 100% 114px no-repeat;
}
.weeks i { position: absolute; left: 0; right: 0; bottom: -22px; font-style: normal; font-size: 11px; text-align: center; color: var(--grafito); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.weeks + .spec-cap { margin-top: 32px; }
.chat { margin-top: auto; padding-top: 18px; display: grid; gap: 8px; }
.chat p { margin: 0; padding: 11px 14px; font-size: 15px; line-height: 1.4; border-radius: var(--r-l); max-width: 92%; }
.chat-me { justify-self: end; background: var(--hierro); color: #fff; border-bottom-right-radius: var(--r-s); }
.chat-coach { background: var(--blanco); border: 1px solid var(--linea); border-bottom-left-radius: var(--r-s); }

/* Máquinas */
.machines-in { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 56px; align-items: center; }
.machines-copy h2 { margin-bottom: 22px; }
.machines-copy p { font-size: 18px; color: var(--hierro-2); max-width: 30em; }
.machines-pics { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.machines-pics figure { margin: 0; background: var(--blanco); border: 1px solid var(--linea); border-radius: var(--r-m); overflow: hidden; }
.machines-pics figure:nth-child(2) { transform: translateY(40px); }
.machines-pics figcaption { padding: 10px 14px 12px; font-weight: 700; font-size: 15px; border-top: 1px solid var(--acero); }

/* Cómo funciona (secuencia real: 1, 2, 3) */
.steps-section { background: var(--acero-claro); }
.how { list-style: none; counter-reset: paso; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px; }
.how li { counter-increment: paso; border-top: 3px solid var(--hierro); padding-top: 22px; }
.how li::before { content: counter(paso); display: block; font: 700 76px/0.9 var(--display); color: var(--hierro); margin-bottom: 14px; }
.how h3 { font: 700 30px/1 var(--display); margin-bottom: 10px; }
.how p { color: var(--hierro-2); margin: 0; }

/* Nutrición */
.food-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); gap: 64px; align-items: center; }
.food-copy h2 { margin-bottom: 22px; }
.food-copy > p { font-size: 18px; color: var(--hierro-2); max-width: 32em; }
.ticks { list-style: none; padding: 0; margin: 18px 0 0; }
.ticks li { position: relative; padding: 6px 0 6px 30px; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 13px; width: 14px; height: 8px; border-left: 3px solid var(--bronce); border-bottom: 3px solid var(--bronce); transform: rotate(-45deg); }
.ticket { background: var(--blanco); border: 1px solid var(--linea); border-radius: var(--r-m); padding: 26px 26px 22px; box-shadow: 0 24px 48px -30px rgba(26, 30, 35, 0.5); font-variant-numeric: tabular-nums; }
.ticket-title { font: 700 32px/1 var(--display); margin-bottom: 4px; }
.ticket-sub { color: var(--grafito); font-size: 14px; margin-bottom: 16px; }
.ticket table { width: 100%; border-collapse: collapse; font-size: 15px; }
.ticket td { padding: 9px 0; border-top: 1px dashed var(--linea); }
.ticket td:nth-child(2) { color: var(--grafito); text-align: right; padding-right: 18px; }
.ticket td:last-child { text-align: right; white-space: nowrap; }
.ticket-total { display: flex; justify-content: space-between; border-top: 2px solid var(--hierro); padding-top: 12px; margin: 4px 0 18px; font-weight: 700; font-size: 18px; }
.macro p { display: flex; justify-content: space-between; font-size: 14px; color: var(--grafito); margin-bottom: 6px; }
.meter-bar, .bar { height: 10px; border-radius: 5px; background: var(--acero); overflow: hidden; }
.meter-bar i, .bar i { display: block; height: 100%; border-radius: 5px; background: var(--temple); background-size: 133% 100%; }

/* Planes */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; background: var(--blanco); border: 1px solid var(--linea); border-radius: var(--r-m); padding: 28px 26px 26px; }
.plan h3 { font: 700 34px/1 var(--display); margin-bottom: 12px; }
.plan-price { margin-bottom: 10px; }
.plan-amount { font: 700 48px/1 var(--display); }
.plan-period { color: var(--grafito); font-size: 16px; }
.plan-desc { color: var(--grafito); font-size: 15px; min-height: 3em; }
.plan .ticks { flex: 1; margin: 6px 0 22px; font-size: 15px; }
.plan-featured { background: var(--hierro); border-color: var(--hierro); color: #fff; }
.plan-featured::before { content: ""; position: absolute; left: -1px; right: -1px; top: -1px; height: 6px; border-radius: var(--r-m) var(--r-m) 0 0; background: var(--temple); }
.plan-featured .plan-period, .plan-featured .plan-desc { color: #B9C0C7; }
.plan-featured .ticks li::before { border-color: var(--paja); }
.plan-featured .btn { background: var(--blanco); border-color: var(--blanco); color: var(--hierro); }
.plan-featured .btn:hover { background: var(--acero); }
.plan-badge { position: absolute; top: 22px; right: 22px; margin: 0; font-size: 13px; font-weight: 700; color: var(--hierro); background: var(--paja); border-radius: 999px; padding: 3px 10px; }
.plan-wanted { outline: 3px solid var(--bronce); outline-offset: 3px; }

/* Preguntas */
.faq-in { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 56px; align-items: start; }
.faq-in h2 { position: sticky; top: 100px; }
.faq-list details { border-top: 1px solid var(--linea); }
.faq-list details:last-child { border-bottom: 1px solid var(--linea); }
.faq-list summary { list-style: none; cursor: pointer; padding: 20px 44px 20px 0; position: relative; font-weight: 700; font-size: 19px; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 14px; height: 14px; margin-top: -9px; border-right: 2.5px solid var(--hierro); border-bottom: 2.5px solid var(--hierro); transform: rotate(45deg); transition: transform .2s; }
.faq-list details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq-list details p { margin: 0 0 22px; color: var(--hierro-2); max-width: 38em; }

/* Llamada final */
.final-cta { position: relative; background: var(--hierro); color: #fff; }
.final-cta::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: var(--temple); }
.final-in { display: flex; align-items: center; justify-content: space-between; gap: 32px; padding-top: 88px; padding-bottom: 88px; flex-wrap: wrap; }
.final-cta h2 { font-size: clamp(44px, 6vw, 84px); flex: 1 1 560px; }

/* Pie */
.site-foot { background: var(--acero); }
.foot-in { display: flex; justify-content: space-between; align-items: flex-start; gap: 32px; padding-top: 40px; padding-bottom: 40px; flex-wrap: wrap; }
.foot-brand p { margin: 12px 0 0; color: var(--grafito); font-size: 15px; max-width: 26em; }
.foot-links { display: flex; gap: 22px; flex-wrap: wrap; align-items: center; font-size: 15px; color: var(--grafito); }
.foot-links a { color: var(--hierro); }

/* ---------- Páginas interiores (cuenta, registro, admin…) ---------- */
.page { padding-top: 40px; padding-bottom: 72px; }
.page > h1 { font-size: clamp(44px, 6vw, 68px); line-height: 0.95; margin-bottom: 24px; }
.page > h2 { font-size: 40px; line-height: 1; margin: 36px 0 18px; }
.flashes { padding-top: 18px; padding-bottom: 0; }
.flash { border-radius: var(--r-m); padding: 13px 16px; margin: 0 0 14px; border: 1px solid var(--linea); border-left-width: 6px; background: var(--blanco); }
.flash-ok, .flash.ok { border-left-color: #2E7D4F; }
.flash-error, .flash.error { border-left-color: var(--rojo); }
.flash-info, .flash.info { border-left-color: var(--paja); }

.card { background: var(--blanco); border: 1px solid var(--linea); border-radius: var(--r-m); padding: 26px; margin-bottom: 18px; }
.card h1 { font-size: 48px; line-height: 0.95; margin-bottom: 14px; }
.card h2 { font-size: 30px; line-height: 1; margin-bottom: 14px; }
.card.warn { border-left: 6px solid var(--paja); }
.narrow { max-width: 480px; margin: 12px auto 0; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; margin-bottom: 18px; }
.grid2 > .card { margin-bottom: 0; }
.big { font: 700 34px/1 var(--display); margin: 2px 0 12px; }
.pill { display: inline-block; vertical-align: middle; font: 700 13px/1.4 var(--texto); background: var(--acero); border: 1px solid var(--linea); border-radius: 999px; padding: 2px 10px; }
.muted { color: var(--grafito); }
.small { font-size: 14px; }
.center { text-align: center; }
.danger { color: var(--rojo); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; min-width: 200px; }
ol.steps { padding-left: 22px; color: var(--hierro-2); }

.field { display: block; margin-bottom: 16px; }
.field span { display: block; font-size: 15px; font-weight: 700; margin-bottom: 6px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], input[type=url], input[type=date], select {
    width: 100%; min-height: 50px; background: var(--blanco); color: var(--hierro);
    border: 1.5px solid #AEB5BD; border-radius: var(--r-m); padding: 12px 14px; font: 400 16px var(--texto);
}
input:focus, select:focus { outline: 3px solid var(--azul); outline-offset: 1px; border-color: var(--azul); }
.check { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 16px; font-size: 15px; color: var(--hierro-2); }
.check input { margin-top: 3px; width: 20px; height: 20px; accent-color: var(--hierro); flex: none; }
.hp { position: absolute; left: -9999px; }

.meter { margin-bottom: 14px; }
.meter-top { display: flex; justify-content: space-between; font-size: 15px; margin-bottom: 6px; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { background: var(--blanco); border: 1px solid var(--linea); border-radius: var(--r-m); padding: 16px 18px; }
.stat span { display: block; color: var(--grafito); font-size: 14px; font-weight: 700; }
.stat strong { display: block; font: 700 40px/1.05 var(--display); }
.stat small { color: var(--grafito); }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; color: var(--grafito); font-weight: 700; border-bottom: 2px solid var(--hierro); padding: 8px; }
.table td { border-bottom: 1px solid var(--linea); padding: 12px 8px; vertical-align: top; }
.actions select { width: auto; min-height: 38px; padding: 6px 8px; font-size: 14px; }
.actions .days { width: 80px; min-height: 38px; padding: 6px 8px; font-size: 14px; }
.actions .row { margin-bottom: 6px; }

/* Panel de administración */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--linea); margin: -6px 0 22px; }
.tabs a { padding: 10px 16px; font-weight: 700; color: var(--grafito); text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.tabs a:hover { color: var(--hierro); }
.tabs a[aria-current] { color: var(--hierro); border-bottom-color: var(--hierro); }
.invite-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 18px; align-items: start; }
.invite-grid > .card { margin-bottom: 18px; }
textarea { width: 100%; min-height: 110px; resize: vertical; background: var(--blanco); color: var(--hierro); border: 1.5px solid #AEB5BD; border-radius: var(--r-m); padding: 12px 14px; font: 400 16px/1.5 var(--texto); }
textarea:focus { outline: 3px solid var(--azul); outline-offset: 1px; border-color: var(--azul); }
.field small { display: block; margin-top: 6px; font-size: 14px; }
fieldset.segmented { border: 0; padding: 0; margin: 0 0 16px; }
.segmented legend { font-size: 15px; font-weight: 700; margin-bottom: 6px; padding: 0; }
.segmented { display: flex; flex-wrap: wrap; gap: 8px; }
.segmented label { position: relative; flex: 1 1 90px; }
.segmented input { position: absolute; opacity: 0; inset: 0; }
.segmented span { display: block; text-align: center; padding: 12px 10px; border: 1.5px solid #AEB5BD; border-radius: var(--r-m); background: var(--blanco); font-weight: 700; cursor: pointer; }
.segmented input:checked + span { background: var(--hierro); border-color: var(--hierro); color: #fff; }
.segmented input:focus-visible + span { outline: 3px solid var(--azul); outline-offset: 2px; }
.result { border-left: 6px solid #2E7D4F; }
.links { list-style: none; margin: 0 0 8px; padding: 0; }
.links li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--linea); }
.links li > div { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.ok-text { color: #2E7D4F; font-size: 14px; font-weight: 700; }
.list-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.list-head h2 { margin: 0; }
.list-head form { flex: 0 1 420px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.chips a { padding: 7px 14px; border-radius: 999px; border: 1.5px solid var(--linea); color: var(--hierro); text-decoration: none; font-size: 14px; font-weight: 700; background: var(--blanco); }
.chips a[aria-current] { background: var(--hierro); border-color: var(--hierro); color: #fff; }
.status { display: inline-block; font-size: 13px; font-weight: 700; padding: 2px 10px; border-radius: 999px; border: 1px solid transparent; }
.status-pending { background: #FBF1D9; border-color: #E8CF8F; color: #6B4E0F; }
.status-accepted { background: #E3F1E8; border-color: #A9D2B6; color: #1F5A37; }
.status-expired { background: var(--acero); border-color: var(--linea); color: var(--grafito); }
.status-revoked { background: #F6E3E1; border-color: #E2B3AE; color: #8A1F18; }
.empty { color: var(--grafito); padding: 18px 0 6px; margin: 0; }
.stats.two { grid-template-columns: 1fr 1fr; }
.stats.two .stat { background: var(--acero-claro); }
.actions form.inline { margin-right: 10px; }
.invite-card .gift { display: inline-block; margin: 0 0 12px; padding: 4px 12px; border-radius: 999px; background: var(--hierro); color: #fff; font-weight: 700; font-size: 14px; position: relative; }
.invite-card { position: relative; overflow: hidden; }
.invite-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: var(--temple); }
input[readonly] { background: var(--acero-claro); color: var(--grafito); }

.legal { max-width: 820px; }
.legal h2 { margin-top: 26px; }
.legal li { margin-bottom: 8px; }

/* ---------- Utilidades ---------- */
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.block { display: block; }
.top-gap { margin-top: 14px; }
.eyebrow { margin: 0 0 6px; font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--grafito); }
.card h2.h3, h2.h3 { font-size: 26px; line-height: 1.05; margin-bottom: 12px; }
.sub-h { font: 700 18px/1.3 var(--texto); margin: 22px 0 8px; }
.tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--acero); border: 1px solid var(--linea); color: var(--hierro-2); margin: 4px 4px 0 0; vertical-align: middle; }
.tag-warn { background: #FBF1D9; border-color: #E8CF8F; color: #6B4E0F; }
.tag-ok { background: #E3F1E8; border-color: #A9D2B6; color: #1F5A37; }
details.more { margin-top: 14px; }
details.more > summary { cursor: pointer; font-weight: 700; color: var(--hierro); padding: 6px 0; }
details.more[open] > summary { margin-bottom: 10px; }
.inline-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.inline-form .field { margin-bottom: 12px; }
.inline-form .btn { margin-bottom: 12px; }
.grid-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 16px; }
.grid-fields.four { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.narrow-field { max-width: 360px; }
.field-label { font-weight: 700; margin-bottom: 4px; }
.danger-zone { border-left: 6px solid var(--rojo); }
details.danger-zone { border-left: 0; padding-left: 0; }
details.danger-zone > summary { color: var(--rojo); }
.linkbtn.danger { color: var(--rojo); }
hr.sep { border: 0; border-top: 1px solid var(--linea); margin: 20px 0; }

/* ---------- Páginas sencillas (instalador, recuperación) ---------- */
.head-tag { font-size: 14px; font-weight: 700; color: var(--grafito); border: 1px solid var(--linea); border-radius: 999px; padding: 4px 12px; }
.install { max-width: 760px; margin: 0 auto; }
.install-intro { margin: 8px 0 22px; }
.install-intro h1 { font-size: clamp(48px, 8vw, 84px); line-height: 0.9; margin-bottom: 14px; }
.install-intro .lead { margin-bottom: 0; }
.step-n { display: inline-grid; place-items: center; width: 34px; height: 34px; margin-right: 8px; border-radius: 50%; background: var(--hierro); color: #fff; font: 700 20px/1 var(--display); vertical-align: 4px; }
.opt { font: 400 15px var(--texto); }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.checks li { position: relative; padding: 4px 0 4px 30px; font-size: 15px; }
.checks li::before { position: absolute; left: 0; top: 4px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font: 700 13px/1 var(--texto); color: #fff; }
.checks li.ok::before { content: "✓"; background: #2E7D4F; }
.checks li.warn::before { content: "!"; background: #B07A12; }
.checks li.bad::before { content: "×"; background: var(--rojo); }
.done-card { position: relative; overflow: hidden; }
.done-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: var(--temple); }
.codes { list-style: none; counter-reset: code; margin: 14px 0 16px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.codes li { counter-increment: code; display: flex; align-items: center; gap: 10px; background: var(--acero-claro); border: 1px solid var(--linea); border-radius: var(--r-m); padding: 8px 12px; }
.codes li::before { content: counter(code); font-size: 12px; color: var(--grafito); min-width: 1.2em; }
.codes code { background: none; border: 0; padding: 0; font: 700 17px/1.2 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; letter-spacing: 0.04em; }
.codes-card.fresh { border: 2px solid var(--paja); border-radius: var(--r-m); padding: 16px; margin-bottom: 18px; background: #FFFBF0; }
.saved-check { margin-top: 16px; }
.code-box { font: 13px/1.5 ui-monospace, Menlo, Consolas, monospace; min-height: 220px; }
.code-line { font: 14px/1.5 ui-monospace, Menlo, Consolas, monospace; background: var(--acero-claro); border: 1px solid var(--linea); border-radius: var(--r-s); padding: 8px 10px; overflow-wrap: anywhere; }
.btn[aria-disabled="true"] { opacity: 0.45; }
.next-steps li { margin-bottom: 8px; }
.challenge { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 8px 0 4px; }
.challenge code { font: 700 20px/1.2 ui-monospace, Menlo, Consolas, monospace; padding: 6px 10px; letter-spacing: 0.03em; }
.file-steps li { margin-bottom: 10px; }

/* ---------- Panel de administración ---------- */
.admin .page { padding-top: 28px; }
.admin-head { margin-bottom: 18px; }
.admin-head h1 { font-size: clamp(42px, 6vw, 64px); line-height: 0.95; overflow-wrap: anywhere; }
.admin-intro { color: var(--grafito); max-width: 52em; margin: 10px 0 0; }
.tabs { overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { flex: none; }
.subtabs { margin-top: 4px; }
.setup-note { background: #FFFBF0; border: 1px solid #E8CF8F; border-left: 6px solid var(--paja); border-radius: var(--r-m); padding: 12px 16px; margin-bottom: 18px; font-size: 15px; }
.setup-note a { font-weight: 700; }
.crumbs { margin: -8px 0 14px; font-size: 15px; }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { display: flex; flex-direction: column; gap: 2px; background: var(--blanco); border: 1px solid var(--linea); border-radius: var(--r-m); padding: 16px 18px; color: var(--hierro); text-decoration: none; min-width: 0; }
a.kpi:hover { border-color: var(--hierro); color: var(--hierro); }
.kpi-label { color: var(--grafito); font-size: 14px; font-weight: 700; }
.kpi-value { font: 700 42px/1.05 var(--display); font-variant-numeric: tabular-nums; }
.kpi-sub { color: var(--grafito); font-size: 13px; line-height: 1.35; }

/* Colores de las categorías de cuenta (paleta validada para daltonismo; siempre con leyenda) */
.cat-bg-paying { background: #2E66A8; }
.cat-bg-trialing { background: #D9A23B; }
.cat-bg-past_due { background: #B3261E; }
.cat-bg-free { background: #7A5FC0; }
.cat-bg-admin { background: var(--hierro); }
.cat-bg-none { background: #C7CCD2; }
.status.cat-paying { background: #E4EDF7; border-color: #A8C1E0; color: #1D4473; }
.status.cat-trialing { background: #FBF1D9; border-color: #E8CF8F; color: #6B4E0F; }
.status.cat-past_due { background: #F6E3E1; border-color: #E2B3AE; color: #8A1F18; }
.status.cat-free { background: #EEE9F8; border-color: #C9BCEA; color: #4A3A86; }
.status.cat-admin { background: var(--hierro); border-color: var(--hierro); color: #fff; }
.status.cat-none { background: var(--acero); border-color: var(--linea); color: var(--grafito); }
.status.pay-paid { background: #E3F1E8; border-color: #A9D2B6; color: #1F5A37; }
.status.pay-failed { background: #F6E3E1; border-color: #E2B3AE; color: #8A1F18; }

.seg { display: flex; gap: 2px; height: 14px; border-radius: 4px; overflow: hidden; background: var(--acero); margin: 4px 0 14px; }
.seg-part { min-width: 6px; }
.seg-legend { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 26px; }
.seg-legend a { display: flex; align-items: center; gap: 8px; padding: 5px 0; color: var(--hierro); text-decoration: none; font-size: 15px; }
.seg-legend a:hover span { text-decoration: underline; }
.seg-legend i { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.seg-legend strong { font-variant-numeric: tabular-nums; }

.colchart { margin: 0; }
.colchart figcaption { display: flex; flex-direction: column; margin-bottom: 14px; }
.colchart figcaption strong { font: 700 22px/1.1 var(--display); }
.colchart figcaption span { color: var(--grafito); font-size: 13px; }
.cc-plot { position: relative; height: 180px; margin: 0 0 28px 40px; }
.cc-plot.cc-has-caps { margin-top: 22px; }
.cc-grid span { position: absolute; left: 0; right: 0; border-top: 1px solid var(--acero); }
.cc-grid span:last-child { border-top-color: var(--linea); }
.cc-grid i { position: absolute; right: calc(100% + 8px); top: -9px; font: 400 12px/1.4 var(--texto); font-style: normal; color: var(--grafito); white-space: nowrap; font-variant-numeric: tabular-nums; }
.cc-bars { position: absolute; inset: 0; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 2px; }
.cc-bars li { position: relative; height: 100%; display: flex; align-items: flex-end; justify-content: center; outline: none; cursor: default; }
.cc-bar { display: block; width: min(24px, 100%); background: #2E66A8; border-radius: 4px 4px 0 0; transition: background .15s; }
.cc-bars li:hover .cc-bar, .cc-bars li:focus-visible .cc-bar { background: var(--hierro); }
.cc-bars li:focus-visible { box-shadow: inset 0 0 0 2px var(--azul); border-radius: 4px; }
.cc-cap { position: absolute; left: 50%; transform: translate(-50%, -4px); font: 700 12px/1 var(--texto); font-style: normal; color: var(--hierro-2); white-space: nowrap; margin-bottom: 4px; }
.cc-x { position: absolute; top: calc(100% + 6px); left: 50%; transform: translateX(-50%); font: 400 12px/1 var(--texto); color: var(--grafito); white-space: nowrap; }
.cc-bars li::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); background: var(--hierro); color: #fff; font: 700 13px/1.3 var(--texto); padding: 6px 10px; border-radius: var(--r-s); white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .12s; z-index: 2; }
.cc-bars li:first-child::after, .cc-bars li:nth-child(2)::after { left: 0; transform: none; }
.cc-bars li:last-child::after, .cc-bars li:nth-last-child(2)::after { left: auto; right: 0; transform: none; }
.cc-bars li:hover::after, .cc-bars li:focus::after { opacity: 1; }
.cc-table summary { cursor: pointer; font-size: 14px; color: var(--grafito); }
.cc-table table { margin-top: 8px; }
.charts .card { overflow: visible; }

.big-num { font: 700 40px/1.05 var(--display); margin: 0 0 10px; }
.big-num .muted { font: 400 15px var(--texto); }
.budget-bar { margin-bottom: 8px; }
.budget-bar.is-high i { background: var(--rojo); }
.mini-list { list-style: none; margin: 0 0 12px; padding: 0; }
.mini-list li { padding: 9px 0; border-top: 1px solid var(--acero); display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.mini-list li:first-child { border-top: 0; }
.activity { list-style: none; margin: 0; padding: 0; }
.activity li { display: grid; grid-template-columns: 128px minmax(0, 1fr) auto; gap: 4px 12px; padding: 9px 0; border-top: 1px solid var(--acero); font-size: 14px; }
.activity li:first-child { border-top: 0; }
.act-when { color: var(--grafito); font-variant-numeric: tabular-nums; }
.act-what { overflow-wrap: anywhere; }

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar select { width: auto; }
.chip-n { display: inline-block; min-width: 1.6em; margin-left: 4px; padding: 0 6px; border-radius: 999px; background: var(--acero); color: var(--grafito); font-size: 12px; text-align: center; }
.chips a[aria-current] .chip-n { background: rgba(255, 255, 255, 0.18); color: #fff; }
.user-link { font-weight: 700; font-size: 16px; color: var(--hierro); }
.note-line { font-style: italic; }
.row-go { text-align: right; white-space: nowrap; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 16px; font-size: 15px; }
.pager a { font-weight: 700; }

.user-head { display: flex; justify-content: space-between; gap: 18px 32px; flex-wrap: wrap; }
.user-email { font-size: 18px; margin: 0 0 6px; overflow-wrap: anywhere; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 24px; margin: 0 0 14px; flex: 1 1 420px; }
.facts dt { font-size: 13px; color: var(--grafito); font-weight: 700; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.quick-gifts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.quick-gifts form.inline { margin: 0; }
.gift-form { display: grid; grid-template-columns: 90px minmax(0, 1fr) minmax(0, 1fr) auto; gap: 10px; align-items: end; }
.gift-form .field { margin-bottom: 0; }
.actions form.inline { display: inline-block; margin: 0 8px 6px 0; }

.stripe-strip { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.stripe-strip > div:nth-child(2) { flex: 1 1 280px; }
.dot { width: 14px; height: 14px; border-radius: 50%; flex: none; }
.dot-live { background: #2E7D4F; box-shadow: 0 0 0 4px #E3F1E8; }
.dot-test { background: #D9A23B; box-shadow: 0 0 0 4px #FBF1D9; }
.dot-off { background: var(--linea); box-shadow: 0 0 0 4px var(--acero); }
.stripe-cta { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.stripe-cta > div { flex: 1 1 380px; }
.plan-admin-list { display: grid; gap: 0; }
.plan-admin.is-off { opacity: 0.75; }
.plan-admin-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.plan-admin-price { font: 700 30px/1 var(--display); margin: 0 0 6px; }
.plan-admin-price .muted { font: 400 15px var(--texto); }
.plan-admin-stripe { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.price-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 12px; }
.quota-set { border: 1px solid var(--linea); border-radius: var(--r-m); padding: 12px 14px 0; margin: 0 0 16px; }
.quota-set legend { font-weight: 700; padding: 0 6px; }
.new-plan > summary { cursor: pointer; }

.toc { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: -4px 0 18px; font-size: 15px; }
.toc a { font-weight: 700; }
.settings-block { scroll-margin-top: 90px; }
.setup-steps { list-style: none; counter-reset: paso; margin: 0 0 18px; padding: 0; }
.setup-steps > li { counter-increment: paso; position: relative; padding: 4px 0 18px 48px; border-left: 2px solid var(--linea); margin-left: 16px; }
.setup-steps > li:last-child { border-left-color: transparent; }
.setup-steps > li::before { content: counter(paso); position: absolute; left: -17px; top: 0; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--blanco); border: 2px solid var(--hierro); font: 700 18px/1 var(--display); }
.setup-steps > li.done::before { content: "✓"; background: #2E7D4F; border-color: #2E7D4F; color: #fff; font: 700 15px/1 var(--texto); }
.step-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.state { font-size: 13px; font-weight: 700; color: var(--grafito); }
.setup-steps li.done .state { color: #1F5A37; }
.tax-form { border-top: 1px solid var(--linea); padding-top: 16px; }
.grid2.flat { gap: 24px; }
.custom-duration[hidden], .smtp-fields[hidden] { display: none; }
.account-who { margin: -6px 0 22px; overflow-wrap: anywhere; }
.custom-duration .field { margin-bottom: 12px; }

/* Tablas que se convierten en fichas en el móvil */
@media (max-width: 760px) {
    .table.resp thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .table.resp, .table.resp tbody, .table.resp tr, .table.resp td { display: block; width: 100%; }
    .table.resp tr { border: 1px solid var(--linea); border-radius: var(--r-m); padding: 10px 12px; margin-bottom: 10px; background: var(--blanco); }
    .table.resp td { border: 0; padding: 5px 0; }
    .table.resp td[data-label]::before { content: attr(data-label); display: block; font-size: 12px; font-weight: 700; color: var(--grafito); text-transform: uppercase; letter-spacing: 0.04em; }
    .table.resp td:first-child::before { display: none; }
    .table.resp .row-go { text-align: left; }
    .table-wrap { overflow: visible; }
    .kpis { grid-template-columns: 1fr 1fr; }
    .kpi-value { font-size: 34px; }
    .activity li { grid-template-columns: 1fr; gap: 2px; }
    .gift-form { grid-template-columns: 1fr 1fr; }
    .gift-form .btn { grid-column: 1 / -1; }
    .plan-admin-stripe { align-items: flex-start; }
    .cc-plot { margin-left: 34px; }
    .cc-cap:not(.is-key) { display: none; }
    .users-table .row-go { display: none; }
    .tabs { flex-wrap: wrap; white-space: normal; gap: 6px; border-bottom: 0; margin-top: -2px; }
    .tabs a { border: 1.5px solid var(--linea); border-radius: 999px; padding: 6px 13px; margin: 0; font-size: 14px; background: var(--blanco); }
    .tabs a[aria-current] { background: var(--hierro); border-color: var(--hierro); color: #fff; }
    .chips { gap: 6px; }
    .chips a { padding: 5px 11px; font-size: 13px; }
    .seg-legend { display: grid; grid-template-columns: 1fr; }
    .seg-legend strong { margin-left: auto; }
}

/* ---------- Móvil ---------- */
@media (max-width: 960px) {
    .hero-in, .machines-in, .food-in, .faq-in, .section-head { grid-template-columns: 1fr; gap: 36px; }
    .hero-in { padding-top: 44px; padding-bottom: 64px; }
    .spec { grid-template-columns: 1fr; }
    .spec-col + .spec-col { border-left: 0; border-top: 1px solid var(--linea); }
    .how { grid-template-columns: 1fr; gap: 28px; }
    .faq-in h2 { position: static; }
    .invite-grid { grid-template-columns: 1fr; }
    .kpis { grid-template-columns: 1fr 1fr; }
    .machines-pics figure:nth-child(2) { transform: none; }
    .section { padding: 72px 0; }
}
@media (max-width: 720px) {
    .nav > a:not(.btn) { display: none; }
    .nav { gap: 12px; }
    .brand-word { font-size: 24px; }
    .lead { font-size: 18px; }
    .hero-actions .btn { flex: 1 1 100%; }
    .stack-scene { width: 100%; max-width: 400px; padding-bottom: 0; }
    .stack-machine { width: 84%; }
    .coach-note { position: relative; width: auto; margin: -28px 0 0 10%; }
    .final-in { padding-top: 64px; padding-bottom: 64px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; }
}
