/*
 * NodeCellular: sistema de diseño técnico (modo oscuro).
 * Sin dependencias externas: la CSP solo admite estilos y fuentes del propio dominio.
 * Fuentes: Inter y JetBrains Mono (SIL OFL 1.1, /fonts).
 */

@font-face { font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900; src: url(../fonts/inter-latin-wght-normal.woff2) format("woff2-variations");
    unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900; src: url(../fonts/inter-latin-ext-wght-normal.woff2) format("woff2-variations");
    unicode-range: U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-display: swap; font-weight: 100 800; src: url(../fonts/jetbrains-mono-latin-wght-normal.woff2) format("woff2-variations");
    unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-display: swap; font-weight: 100 800; src: url(../fonts/jetbrains-mono-latin-ext-wght-normal.woff2) format("woff2-variations");
    unicode-range: U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }

/* ---------- Tokens ---------- */
:root {
    color-scheme: dark;

    /* Superficies */
    --bg: #0D1117;
    --surface: #161B22;
    --surface-2: #21262D;
    --inset: #010409;
    --line: #30363D;
    --line-strong: #484F58;

    /* Texto */
    --text: #E6EDF3;
    --muted: #8B949E;
    --subtle: #6E7681;

    /* Acentos funcionales */
    --accent: #2F81F7;          /* acciones primarias, estados activos de red */
    --accent-strong: #0969DA;
    --accent-ink: #FFFFFF;
    --accent-soft: rgba(47, 129, 247, .12);
    --ok: #2EA043;              /* online, rotación correcta */
    --ok-strong: #238636;
    --ok-soft: rgba(46, 160, 67, .14);
    --warn: #D29922;            /* cuota FUP, avisos */
    --warn-soft: rgba(210, 153, 34, .14);
    --danger: #F85149;
    --danger-soft: rgba(248, 81, 73, .12);

    /* Tipografía */
    --font-sans: "Inter", "Geist Sans", "Segoe UI", system-ui, -apple-system, Roboto, "Noto Sans", sans-serif;
    --font-mono: "JetBrains Mono", "Fira Code", ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

    /* Forma y profundidad */
    --radius: 8px;
    --radius-sm: 6px;
    --shadow-1: 0 1px 0 rgba(1, 4, 9, .5);
    --shadow-2: 0 8px 24px rgba(1, 4, 9, .55);
    --ring: 0 0 0 3px rgba(47, 129, 247, .35);
    --glow-ok: 0 0 0 3px rgba(46, 160, 67, .22);
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.6 var(--font-sans); background: var(--bg); color: var(--text); font-feature-settings: "cv11", "ss01"; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { letter-spacing: -.015em; line-height: 1.2; }
h1 { font-size: clamp(1.8rem, 4.6vw, 3rem); margin: 0 0 .5em; font-weight: 700; }
h2 { font-size: 1.35rem; margin: 0 0 .6em; font-weight: 650; }
h3 { font-size: 1.02rem; margin: 1.1em 0 .4em; font-weight: 600; }
code, kbd, pre, .mono { font-family: var(--font-mono); font-size: .92em; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--radius-sm); }
::selection { background: rgba(47, 129, 247, .35); }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 460px; }
main { padding: 32px 0 56px; }
.muted { color: var(--muted); font-size: .94rem; }
.inline { display: inline; margin: 0; }
.section { margin: 56px auto; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.section-head h2 { margin: 0; }
.eyebrow { font-family: var(--font-mono); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); margin: 0 0 8px; }

/* ---------- Barra superior ---------- */
.topbar { background: rgba(13, 17, 23, .92); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; backdrop-filter: blur(8px); }
@media (max-width: 640px) { .topbar { position: static; } }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.05rem; color: var(--text); letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 22px; height: 22px; border-radius: 5px; border: 1px solid var(--accent); background: var(--accent-soft); display: inline-grid; place-items: center; }
.brand-mark::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: var(--glow-ok); }
.brand-tld { color: var(--muted); font-weight: 500; }
.nav { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; font-size: .93rem; }
.nav a { color: var(--muted); }
.nav a:hover { color: var(--text); text-decoration: none; }
.nav a.btn { color: var(--accent-ink); }
.link { background: none; border: 0; padding: 0; color: var(--muted); font: inherit; cursor: pointer; }
.link:hover { color: var(--text); }
.lang { position: relative; }
.lang summary { cursor: pointer; list-style: none; padding: 4px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: .85rem; color: var(--muted); font-family: var(--font-mono); }
.lang summary::-webkit-details-marker { display: none; }
.lang ul { position: absolute; right: 0; top: 115%; list-style: none; margin: 0; padding: 6px 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); min-width: 190px; z-index: 30; box-shadow: var(--shadow-2); }
.lang li a { display: block; padding: 6px 14px; color: var(--text); }
.lang li a:hover { background: var(--surface-2); text-decoration: none; }
.lang li a[aria-current] { color: var(--accent); }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--accent-strong); color: var(--accent-ink); border: 1px solid rgba(240, 246, 252, .1); border-radius: var(--radius-sm); padding: 9px 16px; font: inherit; font-weight: 600; font-size: .94rem; cursor: pointer; text-decoration: none; text-align: center; box-shadow: var(--shadow-1); transition: background .15s; }
.btn:hover { background: var(--accent); text-decoration: none; }
.btn-small { padding: 5px 12px; font-size: .86rem; }
.btn-large { padding: 12px 22px; font-size: 1rem; }
.btn-secondary { background: var(--surface-2); color: var(--text); border-color: var(--line); }
.btn-secondary:hover { background: #30363D; border-color: var(--line-strong); }
.btn-ok { background: var(--ok-strong); }
.btn-ok:hover { background: var(--ok); }
.btn-danger { background: transparent; color: var(--danger); border-color: var(--line); }
.btn-danger:hover { background: var(--danger-soft); border-color: var(--danger); }
.btn-block { width: 100%; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Chips técnicos ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; padding: 0; list-style: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: .76rem; line-height: 1; padding: 6px 9px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--muted); white-space: nowrap; }
.chip::before { content: "["; color: var(--subtle); }
.chip::after { content: "]"; color: var(--subtle); }
.chip-accent { color: var(--accent); border-color: rgba(47, 129, 247, .4); background: var(--accent-soft); }
.chip-ok { color: var(--ok); border-color: rgba(46, 160, 67, .4); background: var(--ok-soft); }
.chip-warn { color: var(--warn); border-color: rgba(210, 153, 34, .4); background: var(--warn-soft); }

/* Indicador de estado */
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--subtle); display: inline-block; flex: none; }
.dot-ok { background: var(--ok); box-shadow: var(--glow-ok); }
.dot-warn { background: var(--warn); }
.dot-off { background: var(--danger); }

/* ---------- Tarjetas ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 20px; }
.card.highlight { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent-soft); }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -22px -22px 18px; padding: 12px 22px; border-bottom: 1px solid var(--line); background: var(--surface-2); border-radius: var(--radius) var(--radius) 0 0; }
.card-head h2, .card-head h3 { margin: 0; font-size: .98rem; }
.card-head .chip { font-size: .7rem; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid .card { margin-bottom: 0; }
.grid-2 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-2 .card { margin-bottom: 0; }

/* Módulo de característica */
.feature { position: relative; }
.feature-id { font-family: var(--font-mono); font-size: .74rem; color: var(--subtle); margin: 0 0 12px; }
.feature h3 { margin: 0 0 8px; }
.feature p { margin: 0; color: var(--muted); font-size: .93rem; }
.feature .spec { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); font-family: var(--font-mono); font-size: .8rem; color: var(--text); }
.feature .spec span { color: var(--muted); }

/* ---------- Hero ---------- */
.hero { padding: 40px 0 8px; }
.hero-grid { display: grid; gap: 32px; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: center; }
.lead { font-size: 1.1rem; color: var(--muted); max-width: 620px; margin: 0 0 24px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-note { margin: 16px 0 0; font-family: var(--font-mono); font-size: .8rem; color: var(--subtle); }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } }

/* Panel de estado (datos reales del inventario) */
.status { background: var(--inset); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-2); overflow: hidden; font-family: var(--font-mono); font-size: .84rem; }
.status-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: .76rem; }
.status-bar .live { display: inline-flex; align-items: center; gap: 8px; color: var(--ok); }
.status dl { margin: 0; padding: 6px 0; }
.status .row { display: flex; justify-content: space-between; gap: 16px; padding: 8px 14px; border-bottom: 1px dashed #21262D; }
.status .row:last-child { border-bottom: 0; }
.status dt { color: var(--muted); }
.status dd { margin: 0; color: var(--text); text-align: right; }
.status .v-ok { color: var(--ok); }
.status .v-accent { color: var(--accent); }
.status .v-warn { color: var(--warn); }

/* ---------- Tabla de especificaciones / precios ---------- */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.spec-table { width: 100%; border-collapse: collapse; min-width: 680px; font-size: .92rem; }
.spec-table th, .spec-table td { padding: 12px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.spec-table tbody tr:last-child th, .spec-table tbody tr:last-child td { border-bottom: 0; }
.spec-table thead th { background: var(--surface-2); vertical-align: bottom; }
.spec-table tbody th { color: var(--muted); font-weight: 500; width: 26%; white-space: nowrap; }
.spec-table td { font-family: var(--font-mono); font-size: .86rem; }
.spec-table .col-featured { background: rgba(47, 129, 247, .05); }
.spec-table thead .col-featured { background: rgba(47, 129, 247, .12); box-shadow: inset 0 2px 0 var(--accent); }
.plan-name { display: block; font-family: var(--font-sans); font-size: 1rem; font-weight: 650; color: var(--text); }
.plan-code { display: block; font-family: var(--font-mono); font-size: .74rem; color: var(--subtle); font-weight: 400; margin-top: 2px; }
.plan-price { display: block; font-family: var(--font-mono); font-size: 1.6rem; font-weight: 700; color: var(--text); margin-top: 10px; letter-spacing: -.02em; }
.plan-price small { font-size: .78rem; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.spec-table .yes { color: var(--ok); }
.spec-table .yes::before { content: "✓ "; }
.spec-table tfoot td { padding: 14px 16px; background: var(--surface-2); border-bottom: 0; }
.spec-table tfoot form { margin: 0; }
.delivery-views { display: grid; gap: 16px; }
.sheet { min-width: 760px; }
.sheet td, .sheet th { white-space: nowrap; }
.sheet td:nth-child(2) { font-family: var(--font-sans); white-space: normal; min-width: 220px; }
.sheet td.neg { color: var(--danger); }
.sheet td.pos { color: var(--ok); }
.plan-features { list-style: none; padding: 0; margin: 16px 0 20px; display: grid; gap: 8px; font-size: .92rem; color: var(--muted); }
.plan-features li { padding-left: 20px; position: relative; }
.plan-features li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); }
.card .plan-price { margin-top: 0; }

/* ---------- Terminal / bloques de código ---------- */
.terminal { background: var(--inset); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 0 0 16px; }
.terminal-bar { display: flex; align-items: center; gap: 8px; padding: 9px 14px; border-bottom: 1px solid var(--line); background: var(--surface); font-family: var(--font-mono); font-size: .76rem; color: var(--muted); }
.terminal-bar .dots { display: inline-flex; gap: 6px; margin-right: 6px; }
.terminal-bar .dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); display: block; }
.terminal pre { margin: 0; padding: 16px; overflow-x: auto; font-size: .84rem; line-height: 1.7; color: var(--text); }
.t-prompt { color: var(--ok); user-select: none; }
.t-method { color: var(--accent); font-weight: 600; }
.t-key { color: #79C0FF; }
.t-str { color: #A5D6FF; }
.t-num { color: #F2CC60; }
.t-ok { color: var(--ok); }
.t-dim { color: var(--subtle); }

/* ---------- Panel: credenciales y uso ---------- */
.kv { display: grid; grid-template-columns: minmax(110px, max-content) minmax(0, 1fr); gap: 0; margin: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.kv dt, .kv dd { margin: 0; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.kv dt { color: var(--muted); font-size: .86rem; background: var(--surface-2); }
.kv dd { font-family: var(--font-mono); font-size: .86rem; word-break: break-all; background: var(--inset); }
.kv dt:nth-last-of-type(1), .kv dd:last-child { border-bottom: 0; }
.secret-field { user-select: all; }
pre.secret-field { white-space: pre-wrap; word-break: break-all; }
.usage { margin: 18px 0 4px; }
.usage-head { display: flex; justify-content: space-between; gap: 12px; font-family: var(--font-mono); font-size: .82rem; color: var(--muted); margin-bottom: 6px; }
.usage-head strong { color: var(--text); font-weight: 600; }
progress.meter { -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--inset); overflow: hidden; display: block; }
progress.meter::-webkit-progress-bar { background: var(--inset); }
progress.meter::-webkit-progress-value { background: var(--ok); border-radius: 999px; }
progress.meter::-moz-progress-bar { background: var(--ok); border-radius: 999px; }
progress.meter.is-warn::-webkit-progress-value { background: var(--warn); }
progress.meter.is-warn::-moz-progress-bar { background: var(--warn); }
progress.meter.is-full::-webkit-progress-value { background: var(--danger); }
progress.meter.is-full::-moz-progress-bar { background: var(--danger); }
.balance { font-family: var(--font-mono); font-size: 1.4rem; font-weight: 700; margin: 0 0 6px; }

/* ---------- Formularios ---------- */
.form { display: grid; gap: 14px; margin: 12px 0; }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: .9rem; }
.form input[type=text], .form input[type=email], .form input[type=password] { font: inherit; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--inset); color: var(--text); width: 100%; }
.form input[type=url], .form input[type=tel], .form textarea, .form select { font: inherit; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--inset); color: var(--text); width: 100%; }
.form textarea { font-family: var(--font-mono); font-size: .9rem; resize: vertical; }
.form input:focus, .form textarea:focus, .form select:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.form-row { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.form-fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.form-fieldset legend { font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.form-fieldset input { font: inherit; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--inset); color: var(--text); width: 100%; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.sample-form { max-width: 820px; }
.sample-list .refs { margin: 0; padding-left: 18px; font-family: var(--font-mono); font-size: .82rem; }
.sample-list .refs li { margin-bottom: 8px; }
.sample-list .v-ok { color: var(--ok); }
.sample-list .neg { color: var(--danger); }
.form input[inputmode=numeric] { font-family: var(--font-mono); letter-spacing: .2em; }
.check { display: flex !important; gap: 10px; align-items: flex-start; font-weight: 400 !important; }

/* ---------- Mensajes ---------- */
.alert { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 11px 14px; margin: 0 0 16px; font-size: .93rem; }
.alert ul { margin: 0; padding-left: 18px; }
.alert-info { background: var(--accent-soft); border-color: rgba(47, 129, 247, .4); }
.alert-error { background: var(--danger-soft); border-color: rgba(248, 81, 73, .4); }
.alert-warn { background: var(--warn-soft); border-color: rgba(210, 153, 34, .4); }

/* ---------- Otros ---------- */
.fup ul { padding-left: 20px; color: var(--muted); }
.fup strong { color: var(--text); }
.faq { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 13px 18px; margin-bottom: 8px; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { color: var(--muted); margin: 10px 0 2px; }
.codes { columns: 2; list-style: none; padding: 0; }
.codes code, .secret { font-family: var(--font-mono); font-size: .95rem; }
.qr { background: #fff; padding: 10px; border-radius: var(--radius-sm); display: block; margin: 8px 0; }
.footer { border-top: 1px solid var(--line); padding: 22px 0; color: var(--subtle); font-size: .85rem; font-family: var(--font-mono); }
.footer-inner { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.footer .live { display: inline-flex; align-items: center; gap: 8px; }
.legal { max-width: 860px; }
.legal h2 { margin-top: 32px; }
.legal p { color: var(--muted); }
.legal .kv { margin: 12px 0; }
