/* ==========================================================================
   NetKit — Herramientas de red
   Mismo sistema visual que PacketLens: oscuro por defecto, claro con [data-theme="light"]
   ========================================================================== */
:root {
    color-scheme: dark;

    --bg: #07090d;
    --bg-2: #0a0d12;
    --surface: #0d1117;
    --surface-2: #121821;
    --surface-3: #18202b;
    --input-bg: #090c11;
    --border: rgba(255, 255, 255, 0.07);
    --border-strong: rgba(255, 255, 255, 0.13);
    --row-border: rgba(255, 255, 255, 0.045);
    --hover: rgba(255, 255, 255, 0.03);
    --dash: rgba(255, 255, 255, 0.12);

    --text-strong: #ffffff;
    --text: #e6edf3;
    --text-2: #a3afbd;
    --muted: #6b7785;
    --placeholder: #4b5562;

    --cyan: #22d3ee;
    --cyan-soft: rgba(34, 211, 238, 0.12);
    --cyan-border: rgba(34, 211, 238, 0.45);
    --cyan-glow: rgba(34, 211, 238, 0.45);
    --green: #3dff8a;
    --green-soft: rgba(61, 255, 138, 0.12);
    --btn-primary-bg: #3dff8a;
    --btn-primary-hover: #6bffa7;
    --btn-primary-text: #04130a;
    --btn-primary-shadow: 0 0 0 1px rgba(61, 255, 138, 0.4), 0 6px 20px -6px rgba(61, 255, 138, 0.55);

    --critical: #ef4b5b;
    --critical-ink: #ff8a95;
    --critical-soft: rgba(239, 75, 91, 0.12);
    --critical-border: rgba(239, 75, 91, 0.35);
    --warning: #fab219;
    --warning-ink: #ffd277;
    --warning-soft: rgba(250, 178, 25, 0.12);
    --warning-border: rgba(250, 178, 25, 0.32);
    --ok: #3ddc84;
    --ok-soft: rgba(61, 220, 132, 0.1);
    --ok-border: rgba(61, 220, 132, 0.35);

    --bit-net: #22d3ee;
    --bit-host: #3dff8a;

    --wm-1: #ffffff;
    --wm-2: #3dff8a;
    --wm-glow-1: 0 0 18px rgba(34, 211, 238, 0.45), 0 0 42px rgba(34, 211, 238, 0.18);
    --wm-glow-2: 0 0 18px rgba(61, 255, 138, 0.45), 0 0 42px rgba(61, 255, 138, 0.18);

    --landing-glow-1: rgba(34, 211, 238, 0.10);
    --landing-glow-2: rgba(61, 255, 138, 0.08);
    --grid-line: rgba(255, 255, 255, 0.035);
    --dz-bg: linear-gradient(180deg, rgba(18, 24, 33, 0.85), rgba(10, 13, 18, 0.85));
    --topbar-bg: rgba(7, 9, 13, 0.92);
    --backdrop: rgba(3, 5, 8, 0.6);
    --tip-bg: #0b0f15;
    --scroll: #1f2833;
    --scroll-hover: #2a3644;
    --shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 12px 32px -12px rgba(0, 0, 0, 0.6);
    --shadow-pop: 0 10px 30px -10px rgba(0, 0, 0, 0.8);

    --json-bg: #070a0e;
    --j-key: #7dd3fc;
    --j-str: #86efac;
    --j-num: #fcd34d;
    --j-bool: #f0abfc;
    --j-punc: #4b5562;

    --apoyo: #e04a3f;

    --radius: 14px;
    --radius-sm: 9px;
    --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Code", Menlo, Consolas, monospace;
    --topbar-h: 64px;
    --sidebar-w: 260px;
}

[data-theme="light"] {
    color-scheme: light;

    --bg: #f4f6f9;
    --bg-2: #ffffff;
    --surface: #ffffff;
    --surface-2: #f3f5f8;
    --surface-3: #e7ebf0;
    --input-bg: #ffffff;
    --border: rgba(15, 23, 42, 0.08);
    --border-strong: rgba(15, 23, 42, 0.15);
    --row-border: rgba(15, 23, 42, 0.06);
    --hover: rgba(15, 23, 42, 0.035);
    --dash: rgba(15, 23, 42, 0.18);

    --text-strong: #0b1220;
    --text: #1e293b;
    --text-2: #475569;
    --muted: #64748b;
    --placeholder: #94a3b8;

    --cyan: #0e7490;
    --cyan-soft: rgba(8, 145, 178, 0.10);
    --cyan-border: rgba(8, 145, 178, 0.45);
    --cyan-glow: rgba(8, 145, 178, 0.25);
    --green: #047857;
    --green-soft: rgba(16, 185, 129, 0.12);
    --btn-primary-bg: #19c37d;
    --btn-primary-hover: #2ad38d;
    --btn-primary-text: #04130a;
    --btn-primary-shadow: 0 0 0 1px rgba(4, 120, 87, 0.25), 0 6px 18px -8px rgba(4, 120, 87, 0.55);

    --critical: #d03b3b;
    --critical-ink: #c42b3c;
    --critical-soft: rgba(208, 59, 59, 0.09);
    --critical-border: rgba(208, 59, 59, 0.35);
    --warning: #eda100;
    --warning-ink: #9a6200;
    --warning-soft: rgba(237, 161, 0, 0.12);
    --warning-border: rgba(237, 161, 0, 0.4);
    --ok: #0a8a4a;
    --ok-soft: rgba(10, 138, 74, 0.1);
    --ok-border: rgba(10, 138, 74, 0.35);

    --bit-net: #0e7490;
    --bit-host: #047857;

    --wm-1: #0b1220;
    --wm-2: #0a9e5c;
    --wm-glow-1: none;
    --wm-glow-2: none;

    --landing-glow-1: rgba(8, 145, 178, 0.10);
    --landing-glow-2: rgba(16, 185, 129, 0.09);
    --grid-line: rgba(15, 23, 42, 0.05);
    --dz-bg: linear-gradient(180deg, #ffffff, #f8fafc);
    --topbar-bg: rgba(255, 255, 255, 0.94);
    --backdrop: rgba(15, 23, 42, 0.35);
    --tip-bg: #ffffff;
    --scroll: #cbd5e1;
    --scroll-hover: #94a3b8;
    --shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 8px 24px -14px rgba(15, 23, 42, 0.18);
    --shadow-pop: 0 12px 32px -12px rgba(15, 23, 42, 0.3);

    --json-bg: #f8fafc;
    --j-key: #0369a1;
    --j-str: #15803d;
    --j-num: #b45309;
    --j-bool: #a21caf;
    --j-punc: #94a3b8;

    --apoyo: #d23a3a;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.45;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}
.hidden { display: none !important; }
.mono { font-family: var(--mono); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: inherit; }
svg { flex: none; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--scroll); border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--scroll-hover); }
* { scrollbar-color: var(--scroll) transparent; scrollbar-width: thin; }

/* ==========================================================================
   Wordmark
   ========================================================================== */
.wordmark {
    margin: 0;
    font-weight: 850;
    letter-spacing: -0.03em;
    text-transform: uppercase;
    line-height: 0.95;
    color: var(--wm-1);
    text-shadow: var(--wm-glow-1);
    white-space: nowrap;
}
.wordmark span { color: var(--wm-2); text-shadow: var(--wm-glow-2); }
.wordmark.sm { font-size: 1.3rem; }
.wordmark.xl { font-size: clamp(3rem, 7vw, 5.2rem); }
.wordmark.xl span { display: block; }

@keyframes flicker-in {
    0% { opacity: 0; } 8% { opacity: 1; } 12% { opacity: 0.35; } 18% { opacity: 1; } 22% { opacity: 0.6; } 30%, 100% { opacity: 1; }
}
.flicker { animation: flicker-in 1.6s ease-out both; }

/* ==========================================================================
   Botones + preferencias
   ========================================================================== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 36px; padding: 0 14px;
    border-radius: var(--radius-sm);
    font-size: 13px; font-weight: 600;
    transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
    white-space: nowrap; text-decoration: none;
}
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--btn-primary-bg); color: var(--btn-primary-text); box-shadow: var(--btn-primary-shadow); }
.btn-primary:hover { background: var(--btn-primary-hover); }
.btn-primary:disabled { opacity: .6; cursor: progress; }
.btn-secondary { background: var(--surface-2); border: 1px solid var(--border-strong); color: var(--text); }
.btn-secondary:hover { border-color: var(--cyan-border); color: var(--text-strong); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12px; }
.btn-icon {
    display: inline-grid; place-items: center;
    width: 36px; height: 36px; border-radius: var(--radius-sm);
    color: var(--text-2); border: 1px solid transparent;
}
.btn-icon:hover { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.btn-icon svg { width: 18px; height: 18px; }
.btn-icon.sm { width: 28px; height: 28px; }
.btn-icon.sm svg { width: 14px; height: 14px; }
.link-btn { color: var(--cyan); font-size: 12px; font-weight: 600; padding: 2px 4px; border-radius: 6px; text-decoration: none; }
.link-btn:hover { text-decoration: underline; }

.prefs { display: inline-flex; align-items: center; gap: 6px; }
.lang-switch {
    display: inline-grid; grid-template-columns: 1fr 1fr; gap: 2px;
    padding: 3px; border-radius: 999px;
    background: var(--surface); border: 1px solid var(--border-strong);
}
.lang-switch button {
    min-width: 32px; height: 26px; padding: 0 8px; border-radius: 999px;
    font-size: 11.5px; font-weight: 700; letter-spacing: 0.04em; color: var(--muted);
}
.lang-switch button:hover { color: var(--text); }
.lang-switch button[aria-pressed="true"] { background: var(--cyan-soft); color: var(--cyan); box-shadow: inset 0 0 0 1px var(--cyan-border); }
.theme-btn { border-color: var(--border-strong); background: var(--surface); border-radius: 999px; }
.theme-btn .i-moon { display: none; }
[data-theme="light"] .theme-btn .i-sun { display: none; }
[data-theme="light"] .theme-btn .i-moon { display: block; }

/* Apoyar: el mismo corazón que late en PacketLens */
.apoyar-boton {
    position: relative; isolation: isolate; border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--apoyo) 60%, var(--border-strong));
    background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--apoyo) 22%, var(--surface)), color-mix(in srgb, var(--apoyo) 8%, var(--surface)));
    transition: border-color .15s, transform .15s;
}
.apoyar-boton:hover {
    border-color: var(--apoyo); transform: translateY(-1px);
    background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--apoyo) 30%, var(--surface)), color-mix(in srgb, var(--apoyo) 12%, var(--surface)));
}
.apoyar-boton svg {
    width: 18px; height: 18px; color: var(--apoyo); --heart-fill: var(--apoyo); --heart-sw: 1.2; transform-origin: 50% 58%;
    filter: drop-shadow(0 1px 3px color-mix(in srgb, var(--apoyo) 55%, transparent)); animation: latido-cab 1.7s ease-in-out infinite;
}
.apoyar-boton::before, .apoyar-boton::after {
    content: ""; position: absolute; inset: -1px; z-index: -1; border-radius: inherit; pointer-events: none;
    border: 2px solid var(--apoyo); opacity: 0; animation: onda-cab 1.7s ease-out infinite;
}
.apoyar-boton::after { animation-delay: .22s; }
.apoyar-boton:hover svg { animation-duration: 1s; }
.foot-donate { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; }
.foot-donate svg { width: 14px; height: 14px; }
.foot-donate svg, .btn-donate svg, #donate-modal .kicker-icon {
    color: var(--apoyo); --heart-fill: color-mix(in srgb, var(--apoyo) 25%, transparent); transform-origin: 50% 58%;
}
.foot-donate svg, .btn-donate svg { animation: latido 2.8s ease-in-out infinite; }
@keyframes latido-cab { 0%, 52%, 100% { transform: scale(1); } 10% { transform: scale(1.24); } 20% { transform: scale(.94); } 30% { transform: scale(1.16); } 42% { transform: scale(1); } }
@keyframes onda-cab { 0%, 8% { transform: scale(1); opacity: 0; } 12% { opacity: .5; } 55% { transform: scale(1.75); opacity: 0; } 100% { opacity: 0; } }
@keyframes latido { 0%, 40%, 100% { transform: scale(1); } 8% { transform: scale(1.28); } 16% { transform: scale(.95); } 24% { transform: scale(1.2); } 32% { transform: scale(1); } }

/* ==========================================================================
   Inicio
   ========================================================================== */
.landing { position: relative; min-height: 100vh; display: flex; flex-direction: column; overflow: hidden; }
.landing-bg {
    position: absolute; inset: 0; z-index: 0; pointer-events: none;
    background:
        radial-gradient(900px 520px at 12% 8%, var(--landing-glow-1), transparent 60%),
        radial-gradient(800px 520px at 92% 60%, var(--landing-glow-2), transparent 60%);
}
.landing-bg::after {
    content: ""; position: absolute; inset: 0;
    background-image:
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 44px 44px;
    -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 75%);
            mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 75%);
}
.landing > * { position: relative; z-index: 1; }

.landing-top, .landing-foot {
    display: flex; align-items: center; justify-content: flex-end; gap: 10px;
    width: 100%; max-width: 1180px; margin: 0 auto; padding: 22px 28px;
}
.site-foot { display: flex; align-items: center; color: var(--muted); font-size: 12px; justify-content: center; gap: 10px; flex-wrap: wrap; row-gap: 6px; }
.site-foot a { color: var(--text-2); text-decoration: none; }
.site-foot a:hover { color: var(--cyan); }

.hero {
    display: grid; grid-template-columns: 1.05fr 1fr; gap: 64px; align-items: center;
    width: 100%; max-width: 1180px; margin: 0 auto; padding: 24px 28px 40px;
}
.eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 11.5px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--cyan);
    padding: 6px 12px; border-radius: 999px;
    background: var(--cyan-soft); border: 1px solid var(--cyan-border);
    margin-bottom: 22px;
}
.pulse-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); animation: pulse 2.4s infinite; }
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(61, 255, 138, 0.55); }
    70% { box-shadow: 0 0 0 8px rgba(61, 255, 138, 0); }
    100% { box-shadow: 0 0 0 0 rgba(61, 255, 138, 0); }
}
.lead { margin: 26px 0 30px; max-width: 30em; font-size: 17px; line-height: 1.6; color: var(--text-2); }

.features { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.features li { display: flex; gap: 14px; align-items: flex-start; }
.feat-icon {
    flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
    background: var(--surface); border: 1px solid var(--border-strong); color: var(--cyan);
}
.feat-icon svg { width: 18px; height: 18px; }
.features strong { display: block; font-size: 14px; font-weight: 600; color: var(--text); }
.features div span { font-size: 13px; color: var(--muted); }

/* Tarjeta "Tu IP" en el inicio (mismo marco que la zona de carga de PacketLens) */
.ip-panel { display: flex; flex-direction: column; gap: 14px; }
.ip-hero {
    position: relative; display: grid; place-items: center; text-align: center;
    min-height: 340px; padding: 36px; border-radius: 22px;
    background: var(--dz-bg); border: 1px solid var(--border-strong); box-shadow: var(--shadow);
    transition: box-shadow .2s;
}
.ip-hero::before {
    content: ""; position: absolute; inset: 12px; border-radius: 14px;
    border: 1.5px dashed var(--dash); pointer-events: none; transition: border-color .2s;
}
.ip-hero:hover { box-shadow: var(--shadow), 0 0 60px -20px var(--cyan-glow); }
.ip-hero:hover::before { border-color: var(--cyan-border); }
.ip-hero-in { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; max-width: 420px; }
.hero-icon {
    display: grid; place-items: center; width: 64px; height: 64px; border-radius: 18px; margin-bottom: 4px;
    color: var(--cyan); background: var(--cyan-soft); border: 1px solid var(--cyan-border);
}
.hero-icon svg { width: 28px; height: 28px; }
.ip-label { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.ip-big {
    margin: 0; font-family: var(--mono); font-weight: 700; color: var(--text-strong);
    font-size: clamp(22px, 3.2vw, 34px); letter-spacing: -0.01em; word-break: break-all; line-height: 1.15;
    background: none; border: 0; padding: 4px 8px; border-radius: 10px; cursor: copy;
}
.ip-big:hover { background: var(--hover); }
.ip-big.long { font-size: clamp(15px, 1.9vw, 20px); }
.ip-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 4px; }
.pill {
    display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px;
    background: var(--surface-2); border: 1px solid var(--border); font-size: 12px; color: var(--text-2); white-space: nowrap;
}
.pill svg { width: 13px; height: 13px; color: var(--cyan); }
.pill { max-width: 100%; overflow: hidden; }
.pill b { overflow: hidden; text-overflow: ellipsis; }
.pill b { color: var(--text); font-weight: 600; }
.ip-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; justify-content: center; }
.hero-note { align-self: center; display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); padding: 4px 12px; }
.hero-note svg { width: 14px; height: 14px; color: var(--green); }

/* Cuadrícula de herramientas */
.tools-section { width: 100%; max-width: 1180px; margin: 0 auto; padding: 10px 28px 36px; }
.section-title { margin: 0 0 16px; font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--cyan); display: flex; align-items: center; gap: 10px; }
.section-title::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--border-strong), transparent); }
.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.tool-card {
    display: flex; flex-direction: column; gap: 8px; padding: 18px; text-decoration: none;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
    transition: border-color .15s, transform .15s, box-shadow .15s;
}
.tool-card:hover { border-color: var(--cyan-border); transform: translateY(-2px); box-shadow: var(--shadow), 0 0 40px -18px var(--cyan-glow); }
.tool-card .tc-top { display: flex; align-items: center; gap: 12px; }
.tool-card .feat-icon { width: 38px; height: 38px; }
.tool-card h3 { margin: 0; font-size: 15px; font-weight: 650; color: var(--text-strong); }
.tool-card p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.5; }
.tool-card .tc-go { margin-top: auto; padding-top: 6px; font-size: 12px; font-weight: 600; color: var(--green); display: inline-flex; align-items: center; gap: 4px; }
.tool-card .tc-go svg { width: 13px; height: 13px; transition: transform .15s; }
.tool-card:hover .tc-go svg { transform: translateX(3px); }

/* ==========================================================================
   Herramientas: barra, menú lateral y contenido
   ========================================================================== */
.app { min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
    position: sticky; top: 0; z-index: 30; height: var(--topbar-h);
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 0 20px;
    background: var(--topbar-bg);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}
.topbar::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
    background: linear-gradient(90deg, transparent, var(--cyan) 30%, var(--green) 70%, transparent);
    opacity: 0.5;
}
.topbar-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.home-btn { display: inline-flex; align-items: center; padding: 2px 6px 2px 2px; border-radius: 8px; text-decoration: none; transition: background .15s; }
.home-btn .brand-mark { width: 24px; height: 24px; flex: none; margin-right: 8px; border-radius: 6px; }
.home-btn:hover { background: var(--hover); }
.tool-chip {
    display: inline-flex; align-items: center; gap: 8px; min-width: 0;
    padding: 6px 12px; border-radius: 999px;
    background: var(--surface); border: 1px solid var(--border);
    font-size: 12.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tool-chip svg { width: 14px; height: 14px; color: var(--cyan); }

.layout { flex: 1; display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); }
.sidebar {
    position: sticky; top: var(--topbar-h); align-self: start; height: calc(100vh - var(--topbar-h));
    display: flex; flex-direction: column; gap: 16px;
    padding: 20px 14px;
    background: var(--bg-2);
    border-right: 1px solid var(--border);
    overflow-y: auto;
}
.side-head h2 {
    margin: 0 6px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--cyan);
    display: flex; align-items: center; gap: 8px;
}
.side-head h2 svg { width: 14px; height: 14px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
    display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px;
    color: var(--text-2); text-decoration: none; font-size: 13.5px; font-weight: 500;
    border: 1px solid transparent; transition: background .12s, color .12s, border-color .12s;
}
.nav a svg { width: 16px; height: 16px; color: var(--muted); }
.nav a:hover { background: var(--hover); color: var(--text); }
.nav a[aria-current="page"] { background: var(--cyan-soft); border-color: var(--cyan-border); color: var(--text-strong); }
.nav a[aria-current="page"] svg { color: var(--cyan); }
.side-foot { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; align-items: center; text-align: center; }
.privacy { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); letter-spacing: 0.04em; }
.privacy svg { width: 13px; height: 13px; color: var(--green); }
.byline { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); text-decoration: none; }
.byline strong { color: var(--cyan); font-weight: 700; text-shadow: 0 0 10px var(--cyan-glow); }
[data-theme="light"] .byline strong { text-shadow: none; }

.main { min-width: 0; padding: 24px 28px 28px; display: flex; flex-direction: column; gap: 18px; max-width: 1120px; width: 100%; }
.main > .site-foot { margin-top: auto; padding: 20px 0 0; max-width: none; justify-content: flex-start; }
.tool-head { display: flex; flex-direction: column; gap: 6px; }
.tool-head .eyebrow { align-self: flex-start; margin-bottom: 8px; }
.tool-head h1 { margin: 0; font-size: clamp(22px, 3vw, 30px); font-weight: 750; letter-spacing: -0.02em; color: var(--text-strong); }
.tool-head p { margin: 0; color: var(--text-2); font-size: 15px; max-width: 46em; line-height: 1.55; }

.tool { display: flex; flex-direction: column; gap: 16px; }
#dns-out, #mail-out, #whois-out, #http-out, #mac-out { display: flex; flex-direction: column; gap: 16px; }
#dns-out:empty, #mail-out:empty, #whois-out:empty, #http-out:empty, #mac-out:empty { display: none; }
.empty-types { padding: 12px 16px; font-size: 13px; color: var(--muted); }

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    min-width: 0;
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px 8px; flex-wrap: wrap; }
.card-head h3 { margin: 0; font-size: 13.5px; font-weight: 650; color: var(--text); display: flex; align-items: center; gap: 8px; }
.card-head h3 svg { width: 15px; height: 15px; color: var(--cyan); }
.card-sub { font-size: 12px; font-weight: 400; color: var(--muted); }
.card-body { padding: 8px 16px 16px; }

/* Formularios */
.form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; padding: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: 12px; font-weight: 500; color: var(--text-2); }
.field.grow { flex: 1 1 260px; }
.field.w-sm { flex: 0 0 120px; }
.field.w-md { flex: 0 1 200px; }
input[type="text"], input[type="number"], input[type="search"], select, textarea {
    width: 100%; height: 40px; padding: 0 12px;
    background: var(--input-bg); border: 1px solid var(--border-strong); border-radius: 9px;
    color: var(--text); font-size: 14px; outline: none;
    transition: border-color .15s, box-shadow .15s;
}
textarea { height: auto; min-height: 120px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
input.mono, textarea.mono { font-family: var(--mono); font-size: 13.5px; }
input::placeholder, textarea::placeholder { color: var(--placeholder); }
input:focus, select:focus, textarea:focus { border-color: var(--cyan-border); box-shadow: 0 0 0 3px var(--cyan-soft); }
select {
    appearance: none; -webkit-appearance: none; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7785' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 10px center; padding-right: 30px;
}
.form .btn { height: 40px; }
.form-hint { width: 100%; font-size: 12px; color: var(--muted); margin: -2px 0 0; }
.form-hint button, .ex { color: var(--cyan); font-family: var(--mono); font-size: 12px; padding: 1px 5px; border-radius: 5px; background: var(--cyan-soft); margin: 0 2px; }
.form-hint button:hover, .ex:hover { text-decoration: underline; }

.segmented {
    display: inline-grid; grid-auto-flow: column; gap: 2px;
    padding: 3px; border-radius: 10px; background: var(--input-bg); border: 1px solid var(--border-strong);
    max-width: 100%; overflow-x: auto;
}
.segmented button {
    height: 30px; padding: 0 12px; border-radius: 7px; font-size: 12.5px; font-weight: 600; color: var(--text-2);
    display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap;
}
.segmented button:hover { color: var(--text); }
.segmented button[aria-pressed="true"] { background: var(--surface-3); color: var(--text-strong); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25); }

/* Resultados: lista de datos con copiar */
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; padding: 4px 16px 16px; }
.kv-item {
    position: relative; display: flex; flex-direction: column; gap: 3px; min-width: 0;
    padding: 11px 13px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--border);
    text-align: left; cursor: copy; transition: border-color .12s, background .12s;
}
.kv-item:hover { border-color: var(--cyan-border); }
.kv-item.static { cursor: default; }
.kv-item.static:hover { border-color: var(--border); }
.kv-item span { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.kv-item b { font-family: var(--mono); font-size: 14.5px; font-weight: 600; color: var(--text-strong); word-break: break-all; }
.kv-item b.sans { font-family: var(--font); }
.kv-item small { font-size: 12px; color: var(--muted); }
.kv-item.hl { background: var(--cyan-soft); border-color: var(--cyan-border); }
.kv-item.hl-green { background: var(--green-soft); border-color: color-mix(in srgb, var(--green) 40%, transparent); }
.kv-item .copy-ico { position: absolute; top: 9px; right: 9px; width: 13px; height: 13px; color: var(--muted); opacity: 0; transition: opacity .12s; }
.kv-item:hover .copy-ico { opacity: 1; }

/* Tablas */
.table-scroll { overflow-x: auto; }
table.dtable { width: 100%; border-collapse: collapse; font-size: 13px; }
.dtable th {
    text-align: left; font-weight: 600; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--muted); background: var(--surface-2);
    padding: 9px 12px; border-bottom: 1px solid var(--border); border-top: 1px solid var(--border); white-space: nowrap;
}
.dtable th:first-child, .dtable td:first-child { padding-left: 16px; }
.dtable td { padding: 9px 12px; border-bottom: 1px solid var(--row-border); color: var(--text); vertical-align: top; }
.dtable tbody tr:hover { background: var(--hover); }
.dtable td.mono, .dtable .mono { font-family: var(--mono); font-size: 12.5px; }
.dtable td.num { font-family: var(--mono); text-align: right; white-space: nowrap; }
.dtable th.num { text-align: right; }
.dtable td.wrap { word-break: break-all; }
.dtable td.dim { color: var(--muted); }
.dtable tr.sel { background: var(--cyan-soft); }
.dtable .copy-cell { cursor: copy; }
.dtable .copy-cell:hover { color: var(--cyan); }
.table-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 16px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }

.tag {
    display: inline-block; padding: 2px 7px; border-radius: 6px;
    font-family: var(--mono); font-size: 11px; font-weight: 600;
    color: var(--text); background: var(--surface-3); border: 1px solid var(--border);
    white-space: nowrap;
}
.tag.cyan { color: var(--cyan); background: var(--cyan-soft); border-color: var(--cyan-border); }
.tag.ok { color: var(--ok); background: var(--ok-soft); border-color: var(--ok-border); }
.tag.warn { color: var(--warning-ink); background: var(--warning-soft); border-color: var(--warning-border); }
.tag.bad { color: var(--critical-ink); background: var(--critical-soft); border-color: var(--critical-border); }

/* Binario */
.bin { font-family: var(--mono); font-size: 14px; line-height: 1.9; word-break: break-all; padding: 4px 16px 16px; }
.bin .row { display: grid; grid-template-columns: 110px 1fr; gap: 10px; align-items: baseline; }
.bin .row span:first-child { font-family: var(--font); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.bin i { font-style: normal; }
.bin .n { color: var(--bit-net); }
.bin .h { color: var(--bit-host); }
.bin .dot { color: var(--muted); padding: 0 2px; }
.bin-legend { display: flex; gap: 14px; padding: 0 16px 14px; font-size: 12px; color: var(--text-2); }
.bin-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* Avisos */
.notice {
    display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: 11px;
    background: var(--warning-soft); border: 1px solid var(--warning-border); color: var(--text); font-size: 13px; line-height: 1.5;
}
.notice svg { width: 16px; height: 16px; color: var(--warning-ink); margin-top: 1px; flex: 0 0 16px; }
.notice.err { background: var(--critical-soft); border-color: var(--critical-border); }
.notice.err svg { color: var(--critical-ink); }
.notice.ok { background: var(--ok-soft); border-color: var(--ok-border); }
.notice.ok svg { color: var(--ok); }
.notice.info { background: var(--cyan-soft); border-color: var(--cyan-border); }
.notice.info svg { color: var(--cyan); }
.notice p { margin: 0; }

/* Revisión (correo, cabeceras de seguridad) */
.checks { list-style: none; margin: 0; padding: 4px 16px 16px; display: flex; flex-direction: column; gap: 8px; }
.check { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.check .ci { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; }
.check .ci svg { width: 15px; height: 15px; }
.check.ok .ci { color: var(--ok); background: var(--ok-soft); }
.check.warn .ci { color: var(--warning-ink); background: var(--warning-soft); }
.check.bad .ci { color: var(--critical-ink); background: var(--critical-soft); }
.check.info .ci { color: var(--cyan); background: var(--cyan-soft); }
.check h4 { margin: 0 0 3px; font-size: 14px; font-weight: 650; color: var(--text-strong); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.check p { margin: 0; font-size: 13px; color: var(--text-2); line-height: 1.5; }
.check code.rec { display: block; margin-top: 8px; padding: 8px 10px; white-space: pre-wrap; word-break: break-all; }
.check ul { margin: 6px 0 0; padding-left: 18px; font-size: 12.5px; color: var(--text-2); }

.score { display: flex; align-items: center; gap: 16px; padding: 16px; }
.score-ring { --p: 0; --c: var(--ok); width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; flex: none;
    background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--surface-3) 0); }
.score-ring b { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: var(--surface); font-size: 20px; color: var(--text-strong); }
.score h3 { margin: 0 0 4px; font-size: 16px; color: var(--text-strong); }
.score p { margin: 0; color: var(--text-2); font-size: 13.5px; }

code { font-family: var(--mono); font-size: 0.92em; padding: 1px 5px; border-radius: 5px; background: var(--surface-3); color: var(--text); }
pre.json { margin: 0; padding: 12px 16px; background: var(--json-bg); border-top: 1px solid var(--border); font-family: var(--mono); font-size: 12px; line-height: 1.55; overflow: auto; max-height: 460px; color: var(--text-2); border-radius: 0 0 var(--radius) var(--radius); }
.j-k { color: var(--j-key); } .j-s { color: var(--j-str); } .j-n { color: var(--j-num); } .j-b { color: var(--j-bool); } .j-p { color: var(--j-punc); }
details.raw > summary { cursor: pointer; padding: 12px 16px; font-size: 12.5px; font-weight: 600; color: var(--text-2); list-style: none; display: flex; align-items: center; gap: 8px; }
details.raw > summary::-webkit-details-marker { display: none; }
details.raw > summary svg { width: 14px; height: 14px; transition: transform .15s; }
details.raw[open] > summary svg { transform: rotate(90deg); }

.empty { padding: 26px 16px; text-align: center; color: var(--muted); font-size: 13px; }
.spinner {
    width: 22px; height: 22px; border-radius: 50%;
    border: 3px solid var(--cyan-soft); border-top-color: var(--cyan);
    animation: spin 0.9s linear infinite;
}
.loading { display: flex; align-items: center; gap: 12px; padding: 18px 16px; color: var(--text-2); font-size: 13px; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { display: inline-block; width: 12em; height: 1em; border-radius: 6px; background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: sk 1.2s infinite; vertical-align: middle; }
@keyframes sk { to { background-position: -200% 0; } }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.c-ok { color: var(--ok); } .c-warn { color: var(--warning-ink); } .c-bad { color: var(--critical-ink); } .c-cyan { color: var(--cyan); }

/* Texto de ayuda / SEO al final de cada herramienta */
.explain { padding: 16px 18px; color: var(--text-2); font-size: 13.5px; line-height: 1.65; }
.explain h2 { margin: 0 0 8px; font-size: 15px; color: var(--text-strong); }
.explain h3 { margin: 14px 0 6px; font-size: 13.5px; color: var(--text); }
.explain p { margin: 0 0 10px; }
.explain ul { margin: 0 0 10px; padding-left: 20px; }

/* VLSM: filas editables */
.vlsm-rows { display: flex; flex-direction: column; gap: 8px; padding: 0 16px 12px; }
.vlsm-row { display: grid; grid-template-columns: minmax(0, 1fr) 140px 36px; gap: 8px; }
.bar-mini { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; min-width: 60px; margin-top: 6px; }
.bar-mini i { display: block; height: 100%; background: linear-gradient(90deg, var(--cyan), var(--green)); }

/* ==========================================================================
   Ventanas, tooltip y avisos
   ========================================================================== */
.modal-backdrop { position: fixed; inset: 0; z-index: 44; background: var(--backdrop); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.modal {
    position: fixed; z-index: 45; left: 50%; top: 50%; transform: translate(-50%, -50%);
    width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 40px);
    display: flex; flex-direction: column;
    background: var(--bg-2); border: 1px solid var(--border-strong); border-radius: 16px; box-shadow: var(--shadow-pop);
}
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 18px 14px; border-bottom: 1px solid var(--border); }
.drawer-kicker { margin: 0 0 4px; font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--cyan); display: flex; align-items: center; }
.drawer-title { margin: 0; font-size: 16px; font-weight: 650; color: var(--text-strong); }
.kicker-icon { width: 12px; height: 12px; margin-right: 6px; vertical-align: -1px; }
.modal-body { padding: 16px 18px; overflow-y: auto; min-height: 0; flex: 1; font-size: 13.5px; color: var(--text-2); line-height: 1.55; }
.modal-body p { margin: 0 0 10px; }
.c-dim { color: var(--muted); }

.donate-amounts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 6px 0 14px; }
.donate-amt {
    display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 8px; border-radius: 12px; text-decoration: none;
    background: var(--surface-2); border: 1px solid var(--border-strong); color: var(--text); transition: border-color .15s, transform .15s, background .15s;
}
.donate-amt:hover { border-color: var(--cyan-border); background: var(--cyan-soft); transform: translateY(-1px); }
.donate-amt b { font-size: 20px; font-weight: 700; color: var(--text-strong); }
.donate-amt[data-amt="otro"] b { font-size: 14px; line-height: 28px; }
.donate-amt span { font-size: 11.5px; color: var(--muted); }
.donate-thanks { display: flex; align-items: center; gap: 8px; color: var(--ok); font-weight: 600; font-size: 13px; }
.donate-thanks svg { width: 15px; height: 15px; }

.tip {
    position: fixed; z-index: 60; pointer-events: none; max-width: 260px;
    padding: 6px 9px; border-radius: 7px; background: var(--tip-bg); border: 1px solid var(--border-strong);
    color: var(--text); font-size: 12px; box-shadow: var(--shadow-pop);
    opacity: 0; transform: translateY(3px); transition: opacity .12s, transform .12s;
}
.tip.show { opacity: 1; transform: none; }
.toast {
    position: fixed; z-index: 70; left: 50%; bottom: 24px; transform: translateX(-50%);
    display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px;
    background: var(--tip-bg); border: 1px solid var(--cyan-border); color: var(--text); font-size: 13px; font-weight: 500;
    box-shadow: var(--shadow-pop), 0 0 30px -10px var(--cyan-glow);
}
.toast svg { width: 15px; height: 15px; color: var(--green); }

/* ==========================================================================
   Responsive
   ========================================================================== */
.only-mobile { display: none !important; }
@media (max-width: 980px) {
    .hero { grid-template-columns: minmax(0, 1fr); gap: 36px; padding-top: 8px; }
    .layout { grid-template-columns: 1fr; }
    .sidebar {
        position: fixed; z-index: 40; top: var(--topbar-h); left: 0; bottom: 0; height: auto; width: min(300px, 86vw);
        transform: translateX(-105%); transition: transform .2s; box-shadow: var(--shadow-pop);
    }
    .sidebar.open { transform: none; }
    .only-mobile { display: inline-grid !important; }
    .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .landing-top, .landing-foot, .hero, .tools-section { padding-left: 16px; padding-right: 16px; }
    .main { padding: 18px 14px 24px; }
    .topbar { padding: 0 10px; gap: 8px; }
    .tool-chip { display: none; }
    .topbar .apoyar-boton { display: none; }
    .ip-hero { min-height: 280px; padding: 28px 18px; }
    .donate-amounts { grid-template-columns: 1fr 1fr; }
    .site-foot .sep { display: none; }
    .bin .row { grid-template-columns: 1fr; gap: 0; }
    .vlsm-row { grid-template-columns: minmax(0, 1fr) 100px 36px; }
    .field.w-sm, .field.w-md { flex: 1 1 120px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
    .topbar, .sidebar, .site-foot, .tip, .toast { display: none !important; }
    .layout { display: block; }
}
