/* ═══════════════════════════════════════════════════
   RAKOON CYBERSEC — Design System Global v2.0
   ═══════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
    /* Background */
    --bg:           #08070a;
    --surface-0:    #0d0b11;
    --surface-1:    #111019;
    --surface-2:    #181625;
    --surface-3:    #201e2d;

    /* Borders */
    --border:       #272436;
    --border-2:     #363050;
    --border-3:     #4a4468;

    /* Text */
    --text:         #edeaf5;
    --text-muted:   #7c7990;
    --text-dim:     #4a4760;

    /* Brand Colors */
    --red:          #c8344e;   /* "Rak" prefix color — refined crimson */
    --red-hover:    #b02c43;
    --red-glow:     rgba(200,52,78,0.15);
    --red-border:   rgba(200,52,78,0.25);

    --blue:         #38bdf8;   /* Suffix color */
    --blue-hover:   #0ea5e9;
    --blue-glow:    rgba(56,189,248,0.14);
    --blue-border:  rgba(56,189,248,0.25);

    /* Accent / secondary */
    --cyan:         #4dffff;
    --cyan-glow:    rgba(77,255,255,0.12);
    --green:        #2ed573;
    --green-glow:   rgba(46,213,115,0.12);
    --purple:       #a855f7;
    --purple-glow:  rgba(168,85,247,0.12);
    --yellow:       #fbbf24;
    --orange:       #fb923c;

    /* Layout */
    --header-h:     64px;
    --radius-sm:    8px;
    --radius-md:    12px;
    --radius-lg:    16px;
    --radius-xl:    24px;

    /* Shadows */
    --shadow-sm:    0 2px 8px rgba(0,0,0,0.3);
    --shadow-md:    0 4px 24px rgba(0,0,0,0.4);
    --shadow-lg:    0 8px 48px rgba(0,0,0,0.5);
    --shadow-red:   0 8px 32px rgba(255,45,85,0.25);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
    background: var(--bg);
    font-family: 'Inter', system-ui, sans-serif;
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ═══════════════════════════════════════════════════
   SCROLL PROGRESS BAR
   ═══════════════════════════════════════════════════ */
#progress {
    position: fixed;
    top: 0; left: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--red), var(--cyan), var(--blue));
    z-index: 9999;
    width: 0%;
    transition: width 0.1s linear;
}

/* ═══════════════════════════════════════════════════
   HEADER / NAV
   ═══════════════════════════════════════════════════ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 200;
    height: var(--header-h);
    background: rgba(8,7,10,0.88);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 2rem;
    gap: 1rem;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    text-decoration: none;
    flex-shrink: 0;
}

.brand-link img {
    height: 36px;
    width: auto;
}

.brand-wordmark {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1;
}

.brand-wordmark .rak { color: var(--red); }
.brand-wordmark .oon { color: var(--blue); }

.site-nav {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.15rem;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.15s, background 0.15s;
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--text);
    background: var(--surface-2);
}

.nav-link.active {
    color: var(--red);
    background: var(--red-glow);
}

.nav-link .nav-prefix { color: var(--red); }
.nav-link .nav-suffix { color: var(--blue); }

/* ═══════════════════════════════════════════════════
   TOOL NAME TYPOGRAPHY (Rak in red, suffix in blue)
   ═══════════════════════════════════════════════════ */
.tool-name .rak  { color: var(--red); }
.tool-name .suf  { color: var(--blue); }

/* ═══════════════════════════════════════════════════
   PAGE HERO
   ═══════════════════════════════════════════════════ */
.page-hero {
    padding: 3.5rem 2rem 2.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 60% at 50% -5%, var(--red-glow) 0%, transparent 70%),
        radial-gradient(ellipse 40% 40% at 85% 70%, var(--blue-glow) 0%, transparent 60%);
    pointer-events: none;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--red-glow);
    border: 1px solid var(--red-border);
    border-radius: 100px;
    padding: 0.3rem 1rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--red);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
}

.hero-title {
    font-size: clamp(2rem, 5.5vw, 3.6rem);
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1.05;
    margin-bottom: 1rem;
}

.hero-desc {
    font-size: 1rem;
    color: var(--text-muted);
    max-width: 560px;
    margin: 0 auto 2rem;
    line-height: 1.8;
}

/* ═══════════════════════════════════════════════════
   LAYOUT CONTAINER
   ═══════════════════════════════════════════════════ */
.page-wrap {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 2rem;
}

.page-section {
    padding: 3.5rem 0;
}

/* ═══════════════════════════════════════════════════
   SECTION LABELS
   ═══════════════════════════════════════════════════ */
.sec-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--red);
    margin-bottom: 0.5rem;
}

.sec-label::before {
    content: '';
    width: 18px;
    height: 2px;
    background: var(--red);
    border-radius: 2px;
    flex-shrink: 0;
}

.sec-title {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    margin-bottom: 0.6rem;
}

.sec-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    max-width: 580px;
    line-height: 1.8;
}

/* ═══════════════════════════════════════════════════
   TOOL AREA (the functional card)
   ═══════════════════════════════════════════════════ */
.tool-area {
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.tool-area-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
}

.tool-area-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tool-area-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
    line-height: 1.65;
}

/* ═══════════════════════════════════════════════════
   INPUTS
   ═══════════════════════════════════════════════════ */
.r-input {
    width: 100%;
    background: var(--surface-0);
    color: var(--text);
    border: 1px solid var(--border-2);
    border-radius: var(--radius-md);
    padding: 0.875rem 1.125rem;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.15s, box-shadow 0.15s;
    outline: none;
}

.r-input:focus {
    border-color: var(--red);
    box-shadow: 0 0 0 3px var(--red-glow);
}

.r-input::placeholder { color: var(--text-dim); }

.r-input.text-center { text-align: center; }
.r-input.mono { font-family: 'JetBrains Mono', monospace; font-size: 0.85rem; }
.r-input[readonly] { cursor: default; color: var(--text-muted); }

textarea.r-input { resize: vertical; min-height: 100px; }

select.r-input {
    cursor: pointer;
    appearance: none;
    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='%234a4760'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* ═══════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.75rem 1.4rem;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.18s;
    text-decoration: none;
    white-space: nowrap;
    line-height: 1;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
    background: var(--red);
    color: #fff;
    border-color: var(--red);
    box-shadow: 0 2px 12px var(--red-glow);
}
.btn-primary:hover {
    background: var(--red-hover);
    box-shadow: var(--shadow-red);
}

.btn-secondary {
    background: var(--blue);
    color: #09090f;
    border-color: var(--blue);
}
.btn-secondary:hover {
    background: var(--blue-hover);
    box-shadow: 0 4px 20px var(--blue-glow);
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border-color: var(--border-2);
}
.btn-ghost:hover {
    color: var(--text);
    background: var(--surface-2);
    border-color: var(--border-3);
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    color: var(--text-muted);
    border: 1px solid var(--border);
    font-size: 0.85rem;
}

.btn-icon:hover {
    color: var(--text);
    border-color: var(--border-2);
    transform: none;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
}

.btn-full { width: 100%; }

.btn-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

.btn-row.center { justify-content: center; }

/* ═══════════════════════════════════════════════════
   TOOL CARDS GRID (for home page)
   ═══════════════════════════════════════════════════ */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 1rem;
}

.r-card {
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: all 0.2s;
    cursor: pointer;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    display: block;
}

.r-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--red), var(--blue));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s;
}

.r-card:hover {
    border-color: var(--border-2);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.r-card:hover::before { transform: scaleX(1); }

.r-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.r-card-name {
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.4rem;
}

.r-card-desc {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.65;
}

.r-card-arrow {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    color: var(--text-dim);
    font-size: 0.85rem;
    transition: transform 0.2s, color 0.2s;
}

.r-card:hover .r-card-arrow {
    color: var(--blue);
    transform: translate(2px, -2px);
}

/* ═══════════════════════════════════════════════════
   FEATURE CARDS
   ═══════════════════════════════════════════════════ */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}

.feat-card {
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: border-color 0.2s, transform 0.2s;
}

.feat-card:hover {
    border-color: var(--border-2);
    transform: translateY(-2px);
}

.feat-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    margin-bottom: 0.875rem;
}

.feat-icon.red    { background: var(--red-glow);    color: var(--red);    border: 1px solid var(--red-border); }
.feat-icon.blue   { background: var(--blue-glow);   color: var(--blue);   border: 1px solid var(--blue-border); }
.feat-icon.green  { background: var(--green-glow);  color: var(--green);  border: 1px solid rgba(46,213,115,0.2); }
.feat-icon.purple { background: var(--purple-glow); color: var(--purple); border: 1px solid rgba(168,85,247,0.2); }
.feat-icon.cyan   { background: var(--cyan-glow);   color: var(--cyan);   border: 1px solid rgba(77,255,255,0.2); }
.feat-icon.yellow { background: rgba(251,191,36,0.1); color: var(--yellow); border: 1px solid rgba(251,191,36,0.2); }
.feat-icon.orange { background: rgba(251,146,60,0.1); color: var(--orange); border: 1px solid rgba(251,146,60,0.2); }

.feat-card h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    color: var(--text);
}

.feat-card p {
    font-size: 0.83rem;
    color: var(--text-muted);
    line-height: 1.65;
}

/* ═══════════════════════════════════════════════════
   DATA DISPLAY
   ═══════════════════════════════════════════════════ */
.data-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.data-row:last-child { border-bottom: none; }

.data-row-icon {
    width: 32px;
    flex-shrink: 0;
    text-align: center;
    color: var(--red);
    font-size: 0.9rem;
}

.data-row-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
    min-width: 120px;
}

.data-row-value {
    font-size: 0.88rem;
    color: var(--text);
    font-weight: 500;
    word-break: break-all;
    margin-left: auto;
    text-align: right;
}

/* ═══════════════════════════════════════════════════
   DIVIDER
   ═══════════════════════════════════════════════════ */
.r-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-2), transparent);
    border: none;
}

/* ═══════════════════════════════════════════════════
   CALLOUT
   ═══════════════════════════════════════════════════ */
.callout {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-left: 3px solid var(--blue);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    padding: 1.125rem 1.375rem;
    margin: 1.5rem 0;
}

.callout.warn { border-left-color: var(--yellow); }
.callout.danger { border-left-color: var(--red); }
.callout.success { border-left-color: var(--green); }

.callout-icon { font-size: 1.05rem; flex-shrink: 0; margin-top: 2px; }

.callout p {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.75;
}

.callout p strong { color: var(--text); font-weight: 600; }

/* ═══════════════════════════════════════════════════
   TABS (for tool pages)
   ═══════════════════════════════════════════════════ */
.r-tabs {
    display: flex;
    gap: 0.375rem;
    background: var(--surface-0);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.3rem;
    overflow-x: auto;
    scrollbar-width: none;
    margin-bottom: 1.5rem;
}

.r-tabs::-webkit-scrollbar { display: none; }

.r-tab-btn {
    flex-shrink: 0;
    padding: 0.5rem 1.125rem;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.15s;
    font-family: 'Inter', sans-serif;
}

.r-tab-btn:hover { color: var(--text); background: var(--surface-2); }

.r-tab-btn.active {
    background: var(--red-glow);
    color: var(--red);
    border: 1px solid var(--red-border);
}

/* ═══════════════════════════════════════════════════
   BADGE / STATUS
   ═══════════════════════════════════════════════════ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.65rem;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.badge-red    { background: var(--red-glow);    color: var(--red);    border: 1px solid var(--red-border); }
.badge-blue   { background: var(--blue-glow);   color: var(--blue);   border: 1px solid var(--blue-border); }
.badge-green  { background: var(--green-glow);  color: var(--green);  border: 1px solid rgba(46,213,115,0.2); }
.badge-yellow { background: rgba(251,191,36,0.1); color: var(--yellow); border: 1px solid rgba(251,191,36,0.2); }
.badge-purple { background: var(--purple-glow); color: var(--purple); border: 1px solid rgba(168,85,247,0.2); }

/* ═══════════════════════════════════════════════════
   FEEDBACK / STRENGTH METER (RakPass)
   ═══════════════════════════════════════════════════ */
.strength-track {
    background: var(--surface-0);
    border: 1px solid var(--border);
    border-radius: 100px;
    height: 8px;
    overflow: hidden;
    width: 100%;
}

.strength-fill {
    height: 100%;
    width: 0%;
    border-radius: 100px;
    transition: width 0.35s ease, background 0.35s ease;
    background: var(--text-dim);
}

.feedback-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 0.625rem;
    min-height: 22px;
}

.feedback-text {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.leak-badge {
    font-size: 0.78rem;
    font-weight: 700;
}

.leak-badge.safe   { color: var(--green); }
.leak-badge.pwned  { color: var(--red); }

/* Checkbox / radio styling */
.check-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    align-items: center;
}

.check-group label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    cursor: pointer;
    user-select: none;
}

.check-group input[type="checkbox"],
.check-group input[type="radio"] { accent-color: var(--red); cursor: pointer; }

.num-input {
    width: 72px;
    background: var(--surface-0);
    border: 1px solid var(--border-2);
    color: var(--text);
    border-radius: var(--radius-sm);
    padding: 0.3rem 0.5rem;
    font-size: 0.85rem;
    text-align: center;
    font-family: 'Inter', sans-serif;
}

/* Mode selector (Aleatória / Hash) */
.mode-selector {
    display: flex;
    background: var(--surface-0);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.25rem;
    width: fit-content;
    margin: 0 auto;
}

.mode-btn {
    position: relative;
    border: none;
    background: none;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
}

.mode-btn span {
    display: block;
    padding: 0.45rem 1.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    transition: color 0.2s;
    position: relative;
    z-index: 2;
}

.mode-btn input[type="radio"] { display: none; }

.mode-btn input[type="radio"]:checked + span {
    color: #fff;
    background: var(--red);
    border-radius: var(--radius-sm);
    box-shadow: 0 2px 10px var(--red-glow);
}

/* ═══════════════════════════════════════════════════
   HASH OUTPUT ROWS (RakDecode)
   ═══════════════════════════════════════════════════ */
.hash-row {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.hash-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    min-width: 60px;
}

/* ═══════════════════════════════════════════════════
   MAP (RakIP)
   ═══════════════════════════════════════════════════ */
#map {
    height: 260px;
    width: 100%;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    z-index: 1;
    overflow: hidden;
}

.result-layout {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* ═══════════════════════════════════════════════════
   SPINNER
   ═══════════════════════════════════════════════════ */
.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-2);
    border-top-color: var(--red);
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
    margin: 0 auto;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ═══════════════════════════════════════════════════
   RESULT PANEL (RakIP)
   ═══════════════════════════════════════════════════ */
.result-panel {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, opacity 0.4s ease;
}

.result-panel.visible {
    max-height: 1500px;
    opacity: 1;
}

/* ═══════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════ */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    font-size: 0.78rem;
    color: var(--text-dim);
}

.footer-brand {
    font-weight: 700;
    color: var(--text-muted);
}

.footer-sep { color: var(--border-3); }

.footer-link {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}

.footer-link:hover { color: var(--text); }
.footer-link .rak  { color: var(--red); }
.footer-link .suf  { color: var(--blue); }

/* ═══════════════════════════════════════════════════
   CTA SECTION
   ═══════════════════════════════════════════════════ */
.cta-band {
    background: var(--surface-1);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 3.5rem 2rem;
    text-align: center;
}

.cta-band h2 {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    margin-bottom: 0.625rem;
}

.cta-band p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

/* ═══════════════════════════════════════════════════
   STATS ROW
   ═══════════════════════════════════════════════════ */
.stats-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    max-width: 800px;
    margin: 0 auto 3rem;
}

.stat-cell {
    flex: 1;
    min-width: 110px;
    text-align: center;
    padding: 1.25rem 1rem;
    border-right: 1px solid var(--border);
}

.stat-cell:last-child { border-right: none; }

.stat-cell .num {
    display: block;
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1;
    margin-bottom: 0.3rem;
}

.stat-cell .lbl {
    display: block;
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .page-wrap { padding: 0 1.25rem; }
    .page-hero { padding: 2.5rem 1.25rem 2rem; }
    .site-header { padding: 0 1.25rem; }

    .site-nav .nav-link:not(.nav-home):not(.active) {
        display: none;
    }

    .tool-area { padding: 1.25rem; }

    .feature-grid { grid-template-columns: 1fr; }
    .tools-grid { grid-template-columns: 1fr 1fr; }

    .btn-row { flex-direction: column; }
    .btn-row .btn { width: 100%; }

    #map { height: 220px; }

    .stat-cell { min-width: 90px; }
    .data-row-label { min-width: 90px; }

    .site-footer { gap: 0.5rem; }
}

@media (max-width: 480px) {
    .tools-grid { grid-template-columns: 1fr; }
    .stats-row { border-radius: var(--radius-md); }
}
