/**
 * Gulf Nados WebTools - Modern Developer Suite Design System
 * Clean, minimal, high-performance UI benchmarked against Vercel, Linear & Cloudflare
 * Website: https://www.gulfnados.com
 */

/* ==========================================================================
   1. GOOGLE FONTS & DETERMINISTIC TYPOGRAPHY (Inter + JetBrains Mono)
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

/* ==========================================================================
   2. COLOR TOKENS & MULTI-THEME FOUNDATIONS
   ========================================================================== */

/* ==========================================================================
   2. PRISTINE LIGHT DESIGN SYSTEM (SOLE GLOBAL THEME)
   ========================================================================== */

:root, [data-theme="light"], [data-theme="cyber"], [data-theme="navy"], [data-theme="matrix"] {
    --gn-primary: #2563eb;
    --gn-primary-dark: #1d4ed8;
    --gn-primary-light: #eff6ff;
    --gn-cyan: #0284c7;
    --gn-success: #059669;
    --gn-warning: #d97706;
    --gn-danger: #dc2626;
    --gn-info: #0284c7;

    --bg-dark: #f8fafc;
    --bg-surface: #f1f5f9;
    --bg-card: #ffffff;
    --bg-card-hover: #ffffff;
    --bg-input: #ffffff;

    --border-color: #e2e8f0;
    --border-hover: #cbd5e1;
    --card-highlight: 0 1px 2px 0 rgba(15, 23, 42, 0.04);

    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;

    --nav-bg: rgba(255, 255, 255, 0.96);
    --nav-border: #e2e8f0;
    --table-header-bg: #f8fafc;
    --code-bg: #f8fafc;

    --shadow-sm: 0 1px 3px 0 rgba(15, 23, 42, 0.05);
    --shadow-md: 0 4px 12px -2px rgba(15, 23, 42, 0.06);
    --shadow-lg: 0 12px 28px -6px rgba(15, 23, 42, 0.08);

    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;

    /* Preline UI Deterministic Typography System */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    --bs-body-font-family: var(--font-sans);
    --bs-font-sans-serif: var(--font-sans);

    --text-2xs: 0.6875rem; /* 11px */
    --text-xs: 0.75rem;    /* 12px */
    --text-sm: 0.875rem;   /* 14px */
    --text-base: 0.9375rem;/* 15px */
    --text-md: 1rem;       /* 16px */
    --text-lg: 1.125rem;   /* 18px */
    --text-xl: 1.25rem;    /* 20px */
    --text-2xl: 1.5rem;    /* 24px */
    --text-3xl: 1.875rem;  /* 30px */
    --text-4xl: 2.25rem;   /* 36px */
}

/* ==========================================================================
   3. GLOBAL BASE & RESET
   ========================================================================== */

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    height: 100%;
}

html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    -webkit-text-size-adjust: 100%;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-sans) !important;
    font-size: var(--text-sm);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    padding-left: env(safe-area-inset-left, 0);
    padding-right: env(safe-area-inset-right, 0);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Enforce Inter across all interactive & structural elements */
body, input, button, select, textarea, .btn, .form-control, .form-select, .nav-link, .dropdown-item, h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-sans) !important;
}

code, kbd, samp, pre, .font-monospace {
    font-family: var(--font-mono) !important;
}

/* Semantic Typography Utility Classes */
.text-2xs { font-size: var(--text-2xs) !important; }
.text-xs { font-size: var(--text-xs) !important; }
.text-sm { font-size: var(--text-sm) !important; }
.text-base { font-size: var(--text-base) !important; }
.text-md { font-size: var(--text-md) !important; }
.text-lg { font-size: var(--text-lg) !important; }
.text-xl { font-size: var(--text-xl) !important; }
.text-2xl { font-size: var(--text-2xl) !important; }

/* Preline-standard button architecture */
.btn {
    font-family: var(--font-sans) !important;
    font-size: var(--text-sm);
    font-weight: 500;
    line-height: 1.4;
    border-radius: var(--radius-md);
    padding: 0.5rem 1rem;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.15s ease-in-out;
    white-space: nowrap;
}

.btn-sm {
    height: 32px;
    padding: 0.25rem 0.75rem;
    font-size: var(--text-xs);
    border-radius: var(--radius-sm);
    gap: 0.35rem;
}

.btn-lg {
    height: 44px;
    padding: 0.65rem 1.25rem;
    font-size: var(--text-md);
    font-weight: 600;
    border-radius: var(--radius-md);
    gap: 0.5rem;
}

main {
    flex: 1 0 auto;
    width: 100%;
}

a {
    color: var(--gn-primary);
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover {
    color: var(--gn-primary-dark);
}

/* ==========================================================================
   LIGHT MODE BULLETPROOF UTILITY NORMALIZATION
   ========================================================================== */

.text-white:not(.btn):not(.btn *):not(.badge):not(.badge *):not(.grade-stamp):not(.grade-stamp *):not(.grade-badge-executive):not(.grade-badge-executive *):not(.grade-ladder-step.is-active):not(.grade-ladder-step.is-active *):not(.bg-primary *):not(.bg-success *):not(.bg-danger *):not(.brand-icon-box *) {
    color: #0f172a !important;
}

.text-light {
    color: #475569 !important;
}

.bg-dark {
    background-color: #f8fafc !important;
    color: #0f172a !important;
    border-color: #e2e8f0 !important;
}

.border-secondary {
    border-color: #e2e8f0 !important;
}

.btn-outline-light {
    border-color: #cbd5e1 !important;
    color: #334155 !important;
    background-color: #ffffff !important;
}

.btn-outline-light:hover {
    background-color: #f1f5f9 !important;
    color: #0f172a !important;
    border-color: #94a3b8 !important;
}

.table {
    color: #0f172a !important;
}

.table thead th {
    background-color: #f8fafc !important;
    color: #475569 !important;
    font-size: var(--text-2xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #e2e8f0 !important;
    padding: 0.75rem 1rem;
}

.table tbody td {
    background-color: #ffffff !important;
    border-color: #e2e8f0 !important;
    color: #0f172a !important;
    padding: 0.85rem 1rem;
    vertical-align: middle;
}

.table-dark {
    --bs-table-bg: #ffffff !important;
    --bs-table-striped-bg: #f8fafc !important;
    --bs-table-color: #0f172a !important;
    border-color: #e2e8f0 !important;
}

.table-dark thead th {
    background-color: #f8fafc !important;
    color: #475569 !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

.code-viewer {
    color: #0f172a !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px;
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    padding: 0.85rem 1rem;
    overflow-x: auto;
    position: relative;
    line-height: 1.55;
}

.code-viewer pre {
    color: #0f172a !important;
}

.dropdown-menu-gn,
.dropdown-menu-dark {
    background: #ffffff !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04) !important;
    padding: 8px !important;
}

.dropdown-item-gn strong,
.dropdown-item strong {
    color: #0f172a !important;
    font-size: var(--text-sm);
    font-weight: 600;
}

.dropdown-header-gn {
    color: var(--text-muted) !important;
    font-size: var(--text-2xs);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    padding: 8px 12px 4px;
    margin: 0;
}

.dropdown-item-gn {
    color: var(--text-secondary) !important;
    font-size: var(--text-sm);
    padding: 8px 12px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.15s ease;
    white-space: nowrap !important;
    text-decoration: none;
    border: none;
}

.dropdown-item-gn:hover,
.dropdown-item-gn.active {
    background: var(--bg-surface) !important;
    color: var(--gn-primary) !important;
}

.dropdown-subtext {
    font-size: var(--text-xs);
    color: var(--text-muted);
    line-height: 1.35;
    margin-top: 2px;
}

.dropdown-badge {
    font-size: var(--text-2xs);
    font-weight: 600;
    padding: 2px 7px;
    border-radius: var(--radius-full);
}

.nav-status-badge {
    font-size: var(--text-xs);
    font-weight: 600;
}

.nav-link-gn {
    color: #475569 !important;
    font-size: var(--text-sm);
    font-weight: 500;
    padding: 0.45rem 0.75rem;
    border-radius: var(--radius-md);
    transition: all 0.15s ease;
    white-space: nowrap !important;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.nav-link-gn:hover,
.nav-link-gn.active {
    color: #0f172a !important;
    background: #f1f5f9 !important;
}

.navbar-toggler {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-md) !important;
    background: var(--bg-surface) !important;
    color: var(--text-primary) !important;
    cursor: pointer;
    transition: all 0.15s ease;
}

.navbar-toggler:hover,
.navbar-toggler:focus {
    background: #ffffff !important;
    border-color: var(--gn-primary) !important;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15) !important;
}

.navbar-toggler i {
    color: #0f172a !important;
}

@media (max-width: 1199.98px) {
    .navbar-collapse {
        background: #ffffff;
        border: 1px solid var(--border-color);
        border-radius: var(--radius-lg);
        padding: 16px;
        margin-top: 10px;
        box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08);
    }
    .navbar-collapse.show {
        display: block !important;
        visibility: visible !important;
    }
    .navbar-nav .dropdown-menu {
        border: none;
        box-shadow: none;
        background: var(--bg-surface);
        padding-left: 8px;
    }
}

.modal-content.bg-dark,
.modal-content {
    background-color: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 20px 25px -5px rgba(15, 23, 42, 0.1) !important;
}

.modal-header .btn-close-white {
    filter: invert(1);
}

.status-dot-active {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    display: inline-block;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.grade-display-box {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    box-shadow: var(--shadow-sm);
}

@media (max-width: 768px) {
    .grade-display-box {
        flex-direction: column;
        align-items: flex-start;
        padding: 1.25rem;
        gap: 1rem;
    }
}

/* ==========================================================================
   4. NAVIGATION BAR
   ========================================================================== */

.navbar-gn {
    background: var(--nav-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--nav-border);
    position: sticky;
    top: 0;
    z-index: 1050;
    padding: 0.65rem 0;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.brand-icon-box {
    background: var(--gn-primary);
    color: #ffffff !important;
    width: 34px;
    height: 34px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.brand-icon-box-lg {
    width: 52px;
    height: 52px;
    font-size: 1.5rem;
    border-radius: var(--radius-lg);
}

.brand-title {
    font-weight: 700;
    font-size: var(--text-lg);
    letter-spacing: -0.02em;
    color: var(--text-primary);
    white-space: nowrap !important;
}

.badge-webtools {
    background: var(--border-color);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: var(--text-2xs);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap !important;
}

.btn-gulfnados-portal {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary) !important;
    font-weight: 500;
    font-size: var(--text-xs);
    height: 32px;
    padding: 0 12px;
    border-radius: var(--radius-full);
    transition: all 0.15s ease;
    white-space: nowrap !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-gulfnados-portal:hover {
    border-color: var(--border-hover);
    color: var(--text-primary) !important;
    background: var(--bg-surface);
}

/* Theme Switcher Button */
.btn-theme-switch {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: var(--text-xs);
    font-weight: 500;
    height: 32px;
    padding: 0 12px;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s ease;
    white-space: nowrap !important;
    cursor: pointer;
}

.btn-theme-switch:hover {
    border-color: var(--border-hover);
}

.theme-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

/* ==========================================================================
   5. HERO SECTION & FLOATING SEARCH CAPSULE
   ========================================================================== */

.hero-wrapper {
    padding: 64px 0 44px;
    position: relative;
    background: transparent;
}

.hero-live-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    background: #ffffff;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.status-beacon-live {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    position: relative;
    display: inline-block;
}

.status-beacon-live::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.35);
    animation: pulseRing 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulseRing {
    0% { transform: scale(0.8); opacity: 0.9; }
    50% { transform: scale(1.6); opacity: 0; }
    100% { transform: scale(0.8); opacity: 0; }
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: var(--radius-full);
    background: #ffffff;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.02em;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}

.hero-headline {
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.025em;
    margin-bottom: 16px;
    line-height: 1.25;
    color: var(--text-primary);
}

.hero-subhead {
    color: var(--text-secondary);
    font-size: var(--text-base);
    max-width: 680px;
    margin-bottom: 28px;
    line-height: 1.6;
}

/* Centered Hero Alignment for Diagnostic Tool Pages */
.hero-wrapper.text-center,
.text-center.hero-wrapper {
    text-align: center !important;
}

.hero-wrapper.text-center .hero-headline,
.text-center .hero-headline {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
    max-width: 900px;
}

.hero-wrapper.text-center .hero-subhead,
.text-center .hero-subhead {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
    margin-bottom: 28px !important;
    max-width: 680px;
}

.hero-wrapper.text-center .search-capsule-container,
.text-center .search-capsule-container {
    margin-left: auto !important;
    margin-right: auto !important;
}

.hero-wrapper.text-center .search-capsule-toolbar,
.text-center .search-capsule-toolbar {
    justify-content: center !important;
}

.hero-wrapper.text-center .toolbar-presets,
.text-center .toolbar-presets {
    justify-content: center !important;
}

.hero-wrapper.text-center .quick-tags-wrap,
.text-center .quick-tags-wrap {
    justify-content: center !important;
}

/* Platform Capability Specs Row */
.hero-specs-row {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.hero-spec-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hero-spec-num {
    font-family: var(--font-mono);
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.hero-spec-label {
    font-size: var(--text-2xs);
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hero-spec-divider {
    width: 1px;
    height: 32px;
    background: var(--border-color);
}

@media (max-width: 576px) {
    .hero-spec-divider {
        display: none;
    }
    .hero-specs-row {
        gap: 16px;
    }
}

/* Right-Column: Real-Time Cyber Telemetry & Radar Bento Capsule */
.hero-telemetry-card {
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.95);
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-telemetry-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 24px 48px -12px rgba(15, 23, 42, 0.09), inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.telemetry-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.telemetry-radar-scope {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    border: 1.5px solid rgba(37, 99, 235, 0.25);
    position: relative;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.08) 0%, rgba(248, 250, 252, 0) 70%);
    overflow: hidden;
    flex-shrink: 0;
}

.telemetry-radar-sweep {
    position: absolute;
    inset: 0;
    background: conic-gradient(from 0deg, rgba(37, 99, 235, 0.5) 0deg, transparent 65deg, transparent 360deg);
    border-radius: 50%;
    animation: radarSweep 2.8s linear infinite;
}

.telemetry-radar-center {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 6px;
    background: var(--gn-primary);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 6px var(--gn-primary);
}

.telemetry-radar-blip {
    position: absolute;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 6px #10b981;
    animation: blipPulse 1.8s ease-in-out infinite;
}

.blip-1 { top: 28%; left: 62%; animation-delay: 0.3s; }
.blip-2 { bottom: 26%; left: 34%; animation-delay: 1.1s; }

@keyframes radarSweep {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes blipPulse {
    0%, 100% { opacity: 0.3; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.3); }
}

.telemetry-target-title {
    font-family: var(--font-mono);
    font-size: var(--text-base);
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.telemetry-target-status {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 3px;
}

.telemetry-domain-pills {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.telemetry-switch-btn {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: var(--text-2xs);
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
}

.telemetry-switch-btn:hover,
.telemetry-switch-btn.active {
    background: #eff6ff;
    color: var(--gn-primary);
    border-color: var(--gn-primary);
}

.telemetry-metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 18px;
}

@media (max-width: 480px) {
    .telemetry-metrics-grid {
        grid-template-columns: 1fr;
    }
}

.telemetry-metric-tile {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px 14px;
    transition: all 0.2s ease;
}

.telemetry-metric-tile:hover {
    background: #ffffff;
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

.telemetry-metric-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.telemetry-metric-label {
    font-size: var(--text-2xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.telemetry-metric-val {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    font-weight: 700;
}

.telemetry-metric-sub {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.telemetry-metric-bar {
    height: 4px;
    border-radius: 2px;
    background: rgba(226, 232, 240, 0.8);
    overflow: hidden;
}

.telemetry-metric-progress {
    height: 100%;
    border-radius: 2px;
    transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.telemetry-card-footer {
    padding-top: 14px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.btn-telemetry-launch {
    width: 100%;
    background: #ffffff;
    border: 1.5px solid var(--border-color);
    color: var(--text-primary);
    font-size: var(--text-xs);
    font-weight: 600;
    height: 38px;
    padding: 0 16px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
}

.btn-telemetry-launch:hover {
    border-color: var(--gn-primary);
    color: var(--gn-primary);
    background: #eff6ff;
}

/* Floating Search Capsule */
/* Floating Search Capsule & Legacy Search Wrap Unified */
.search-capsule-container,
.search-card {
    max-width: 720px;
    margin: 0 auto;
    position: relative;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.search-capsule,
.search-input-wrap {
    background: #ffffff !important;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 5px 6px 5px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 2px 8px -2px rgba(15, 23, 42, 0.06), 0 1px 3px 0 rgba(15, 23, 42, 0.04);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    width: 100%;
}

.search-capsule:focus-within,
.search-input-wrap:focus-within {
    border-color: var(--gn-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.search-leading-icon {
    font-size: 1rem;
    color: var(--text-muted);
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

.search-capsule-input,
.search-input {
    flex: 1;
    min-width: 0;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    color: var(--text-primary) !important;
    font-size: var(--text-base);
    font-weight: 400;
    height: 42px;
    min-height: 42px;
    line-height: 42px;
    padding: 0;
    box-shadow: none !important;
}

.search-capsule-input::placeholder,
.search-input::placeholder {
    color: #94a3b8 !important;
    font-weight: 400;
    opacity: 1;
}

/* Secondary Inputs inside search capsule (Port, Selector, Type) */
.search-capsule .form-control,
.search-input-wrap .form-control,
.search-capsule .form-select,
.search-input-wrap .form-select,
.search-capsule-port,
.tool-search-select {
    background: #f8fafc !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-md) !important;
    font-weight: 500;
    font-size: var(--text-xs);
    height: 42px;
    padding: 0 12px;
    flex-shrink: 0;
    box-shadow: none !important;
    outline: none !important;
}

.search-capsule .form-control:focus,
.search-input-wrap .form-control:focus,
.search-capsule .form-select:focus,
.search-input-wrap .form-select:focus {
    border-color: var(--gn-primary) !important;
    background: #ffffff !important;
}

.btn-capsule-submit,
.btn-search-action {
    background: var(--gn-primary);
    color: #ffffff !important;
    border: 1px solid transparent !important;
    border-radius: var(--radius-md);
    padding: 0 20px;
    height: 42px;
    font-size: var(--text-sm);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    white-space: nowrap;
    text-decoration: none !important;
    flex-shrink: 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-capsule-submit:hover,
.btn-search-action:hover {
    background: var(--gn-primary-dark);
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

.btn-capsule-submit:active,
.btn-search-action:active {
    background: #1e40af;
}

/* Micro Toolbar below Search Capsule / Quick Tags */
.search-capsule-toolbar,
.quick-tags-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 14px;
    padding: 0 4px;
    font-size: var(--text-xs);
    color: var(--text-secondary);
}

.quick-tags-wrap.justify-content-center,
.search-capsule-toolbar.justify-content-center {
    justify-content: center !important;
}

.toolbar-options {
    display: flex;
    align-items: center;
    gap: 14px;
}

.toolbar-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    user-select: none;
    color: var(--text-secondary);
    font-size: var(--text-xs);
    font-weight: 500;
}

.toolbar-checkbox .form-check-input {
    width: 1em;
    height: 1em;
    cursor: pointer;
    margin: 0;
    border: 1.5px solid var(--border-color);
    background-color: var(--bg-surface);
}

.toolbar-checkbox .form-check-input:checked {
    background-color: var(--gn-primary);
    border-color: var(--gn-primary);
}

.toolbar-presets,
.quick-tags-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.preset-label,
.quick-tags-wrap > span {
    color: var(--text-muted);
    font-size: var(--text-2xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.preset-pill,
.quick-tag-pill {
    color: var(--text-secondary);
    background: #ffffff;
    border: 1px solid var(--border-color);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 500;
    text-decoration: none !important;
    transition: all 0.15s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.preset-pill:hover,
.quick-tag-pill:hover {
    color: var(--gn-primary);
    border-color: var(--gn-primary);
    background: #eff6ff;
    transform: translateY(-1px);
}

/* Loading Radar (Strictly Hidden by Default) */
.loading-box {
    display: none !important;
    padding: 24px 16px;
    margin-top: 16px;
}

.loading-box.is-loading,
.loading-box[style*="display: block"] {
    display: block !important;
}

.loading-radar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2.5px solid var(--border-color);
    border-top-color: var(--gn-primary);
    animation: spinRadar 0.75s linear infinite;
    margin: 0 auto 12px;
}

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

.loading-title {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.loading-desc {
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-bottom: 0;
}

/* ==========================================================================
   6. 20-TOOL DIRECTORY GRID (Preline UI Harmonized Tiles)
   ========================================================================== */

.directory-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.directory-title {
    font-size: var(--text-2xl);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.directory-desc {
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin-bottom: 0;
}

/* Filter Controls Bar */
.filter-bar {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 10px 14px;
    margin-bottom: 24px;
}

.filter-pill-btn {
    padding: 0 14px;
    height: 34px;
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 500;
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    color: var(--text-secondary);
    transition: all 0.15s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.filter-pill-btn:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
    background: #ffffff;
}

.filter-pill-btn.active {
    background: var(--gn-primary);
    border-color: var(--gn-primary);
    color: #ffffff;
}

.filter-pill-btn.active .badge {
    background: rgba(255, 255, 255, 0.25) !important;
    color: #ffffff !important;
}

.tool-search-input {
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    border-radius: var(--radius-full) !important;
    padding: 0 14px 0 36px;
    height: 34px;
    font-size: var(--text-xs);
    transition: all 0.15s ease;
}

.tool-search-input:focus {
    border-color: var(--gn-primary) !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15) !important;
    background: #ffffff !important;
}

.tool-search-input::placeholder {
    color: var(--text-muted);
}

.tool-search-select {
    background-color: var(--bg-surface) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-full) !important;
    font-size: var(--text-xs) !important;
    height: 34px;
    padding: 0 12px !important;
    cursor: pointer;
}

.tool-search-select:focus {
    border-color: var(--gn-primary) !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15) !important;
    background-color: #ffffff !important;
}

/* Tool Card Item Column Flex Wrapper */
.tool-card-item {
    display: flex;
    flex-direction: column;
}
.tool-card-item.d-none {
    display: none !important;
}

/* Harmonized Minimalist Engine Tile */
.tool-card-modern,
.bento-card-flagship {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    height: 100% !important;
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    text-decoration: none !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.04);
}

.tool-card-modern:hover,
.bento-card-flagship:hover {
    border-color: #cbd5e1;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(15, 23, 42, 0.08);
}

/* Flagship Cards Highlight */
.tool-card-modern.is-flagship,
.bento-card-flagship {
    border-color: rgba(37, 99, 235, 0.25);
    background: #ffffff;
    box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.04);
}

.tool-card-modern.is-flagship:hover,
.bento-card-flagship:hover {
    border-color: var(--gn-primary);
    box-shadow: 0 10px 20px -5px rgba(37, 99, 235, 0.12);
}

.tool-tile-header,
.tool-tile-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.tool-tile-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.tool-card-modern:hover .tool-tile-icon,
.bento-card-flagship:hover .tool-tile-icon {
    border-color: var(--gn-primary);
    background: #eff6ff;
}

.tool-tile-badge {
    font-size: var(--text-2xs);
    font-weight: 600;
    color: var(--text-muted);
    background: #f8fafc;
    border: 1px solid var(--border-color);
    padding: 2px 7px;
    border-radius: var(--radius-sm);
    letter-spacing: 0.04em;
    font-family: var(--font-mono);
    text-transform: uppercase;
}

.tool-tile-body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

.tool-tile-title {
    font-size: var(--text-base);
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text-primary);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    line-height: 1.35;
    min-height: 24px;
}

.tool-tile-arrow {
    font-size: var(--text-xs);
    color: var(--text-muted);
    opacity: 0.4;
    transform: translateX(0);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    flex-shrink: 0;
    margin-left: 8px;
}

.tool-card-modern:hover .tool-tile-arrow,
.bento-card-flagship:hover .tool-tile-arrow {
    opacity: 1;
    transform: translateX(3px);
    color: var(--gn-primary);
}

.tool-tile-desc {
    font-size: var(--text-xs);
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 14px;
    min-height: 38px;
}

.tool-tile-footer {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tool-tile-action {
    font-size: var(--text-xs);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.tool-tile-spec {
    font-size: var(--text-2xs);
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--text-muted);
    background: #f8fafc;
    border: 1px solid var(--border-color);
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* ==========================================================================
   7. EXECUTIVE SCORECARD & POSTURE RESULTS
   ========================================================================== */

.gn-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    position: relative;
}

/* ==========================================================================
   EXECUTIVE 360° SCORECARD & BENCHMARK GRADE LADDER (A+ to F, R)
   ========================================================================== */
.executive-scorecard {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.06);
    padding: 1.75rem;
    margin-bottom: 1.75rem;
    position: relative;
}

.scorecard-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #f1f5f9;
}

.scorecard-identity-group {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex: 1 1 auto;
    min-width: 280px;
}

.grade-badge-executive {
    width: 92px;
    height: 92px;
    min-width: 92px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #ffffff !important;
    flex-shrink: 0;
    box-shadow: 0 8px 18px -4px rgba(0, 0, 0, 0.2);
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.grade-badge-executive .grade-letter {
    font-size: 2.75rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.grade-badge-executive .grade-score-pill {
    margin-top: 4px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: rgba(0, 0, 0, 0.25);
    color: #ffffff !important;
    padding: 2px 7px;
    border-radius: 9999px;
    line-height: 1.2;
    white-space: nowrap;
}

.scorecard-target-info {
    flex: 1 1 auto;
    min-width: 0;
}

.scorecard-domain {
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f172a;
    word-break: break-word;
}

.scorecard-url-row {
    margin-top: 4px;
    color: #64748b;
    word-break: break-all;
}

.scorecard-meta-chips {
    color: #64748b;
}

.scorecard-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

/* Iconic Benchmark Grade Ladder Strip */
.grade-ladder-wrapper {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    margin: 1.25rem 0;
}

.grade-ladder-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.grade-ladder-title {
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #475569;
}

.grade-ladder-verdict {
    font-size: var(--text-xs);
    color: #64748b;
}

.grade-ladder-strip {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 8px;
    width: 100%;
}

.grade-ladder-step {
    border-radius: 10px;
    padding: 10px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    transition: all 0.2s ease;
}

.grade-ladder-step.is-inactive {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    opacity: 0.85;
}

.grade-ladder-step.is-inactive:hover {
    opacity: 1;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.grade-ladder-step.is-active {
    box-shadow: 0 4px 14px -2px rgba(0, 0, 0, 0.25);
    transform: translateY(-2px);
    border: 2px solid;
    color: #ffffff !important;
}

.grade-ladder-step .step-letter {
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 2px;
}

.grade-ladder-step.is-active .step-letter {
    color: #ffffff !important;
}

.grade-ladder-step .step-desc {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #64748b;
    line-height: 1.1;
}

.grade-ladder-step.is-active .step-desc {
    color: rgba(255, 255, 255, 0.9) !important;
}

.grade-ladder-step .step-current-tag {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: #0f172a;
    color: #ffffff;
    font-size: 8.5px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 1px 6px;
    border-radius: 4px;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
    .grade-ladder-strip {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
    }
    
    .scorecard-identity-group {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .scorecard-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 480px) {
    .grade-ladder-strip {
        grid-template-columns: repeat(4, 1fr);
    }
    .grade-badge-executive {
        width: 80px;
        height: 80px;
        min-width: 80px;
    }
    .grade-badge-executive .grade-letter {
        font-size: 2.25rem;
    }
}

/* Backward-compatible .grade-stamp normalization */
.grade-stamp {
    width: 84px;
    height: 84px;
    min-width: 84px;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #ffffff !important;
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.grade-stamp span.stamp-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-top: 4px;
    background: rgba(0, 0, 0, 0.25);
    color: #ffffff !important;
    padding: 1px 6px;
    border-radius: 9999px;
    white-space: nowrap;
    line-height: 1.2;
}

/* 5 Pillar Health Tiles */
.posture-tile {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: border-color 0.15s ease;
}

.posture-tile:hover {
    border-color: var(--border-hover);
    background: #ffffff;
}

/* Status Badges */
.badge-status {
    padding: 3px 8px;
    border-radius: var(--radius-full);
    font-size: var(--text-2xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.badge-status.pass, .badge-status.resolved, .badge-status.valid, .badge-status.open {
    background: #ecfdf5 !important;
    color: #047857 !important;
    border: 1px solid #a7f3d0 !important;
}

.badge-status.warning, .badge-status.expiring_soon {
    background: #fffbeb !important;
    color: #b45309 !important;
    border: 1px solid #fde68a !important;
}

.badge-status.missing, .badge-status.error, .badge-status.expired, .badge-status.closed {
    background: #fef2f2 !important;
    color: #b91c1c !important;
    border: 1px solid #fecaca !important;
}

/* Code Viewer */
.code-viewer {
    background: var(--code-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--text-primary);
    overflow-x: auto;
    word-break: break-all;
    position: relative;
    line-height: 1.55;
}

.btn-copy-code-sm {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: var(--text-2xs);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.btn-copy-code-sm:hover {
    color: var(--gn-primary);
    border-color: var(--gn-primary);
    background: #eff6ff;
}

/* Responsive Table */
.table-gn {
    width: 100%;
    color: var(--text-primary);
    border-collapse: separate;
    border-spacing: 0;
}

.table-gn th {
    background: var(--table-header-bg);
    color: var(--text-muted);
    font-size: var(--text-2xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-color);
}

.table-gn td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color);
    font-size: var(--text-sm);
    vertical-align: middle;
}

.table-gn tr:hover td {
    background: var(--bg-surface);
}

/* DNS World Map & Hop Timeline */
.dns-map-container {
    height: 460px;
    width: 100%;
    border-radius: var(--radius-lg);
    background-color: #12161f;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.dns-map-pin {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 8px;
    font-weight: 900;
    cursor: pointer;
    border: 1.5px solid rgba(255, 255, 255, 0.95);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
    transition: transform 0.15s ease;
}

.dns-map-pin.pass {
    background: #10b981;
}

.dns-map-pin.fail {
    background: #ef4444;
}

.dns-map-pin:hover {
    transform: scale(1.4);
    z-index: 1000 !important;
}

.dns-map-legend {
    position: absolute;
    bottom: 16px;
    left: 16px;
    z-index: 800;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: var(--text-xs);
    color: var(--text-secondary);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.hop-timeline {
    position: relative;
    padding-left: 28px;
}

.hop-timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 14px;
    bottom: 14px;
    width: 2px;
    background: var(--border-color);
}

.hop-step-node {
    position: relative;
    margin-bottom: 20px;
}

.hop-step-node::before {
    content: '';
    position: absolute;
    left: -28px;
    top: 12px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 3px solid var(--gn-primary);
}

.hop-step-node.final::before {
    border-color: var(--gn-success);
    background: #10b981;
}

/* Global Footer */
.footer-gn {
    background: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    padding: 32px 0 20px;
    margin-top: auto;
}

/* Responsive Overrides */
@media (max-width: 768px) {
    .hero-wrapper {
        padding: 36px 0 24px;
    }
    .dns-map-container {
        height: 300px;
    }
    .search-capsule,
    .search-input-wrap {
        padding: 6px 8px 6px 14px;
    }
    .btn-capsule-submit,
    .btn-search-action {
        padding: 8px 16px;
        font-size: var(--text-sm);
    }
}

@media (max-width: 576px) {
    .search-capsule,
    .search-input-wrap {
        flex-direction: column;
        border-radius: 16px;
        padding: 12px;
        gap: 10px;
        align-items: stretch;
    }
    .search-leading-icon {
        display: none;
    }
    .search-capsule-input,
    .search-input {
        width: 100%;
        text-align: center;
        min-height: 40px;
    }
    .search-capsule .form-control,
    .search-input-wrap .form-control,
    .search-capsule .form-select,
    .search-input-wrap .form-select,
    .search-capsule-port,
    .tool-search-select {
        width: 100% !important;
        max-width: 100% !important;
        text-align: center;
    }
    .btn-capsule-submit,
    .btn-search-action {
        width: 100%;
        justify-content: center;
        padding: 10px 16px;
    }
}

/* ==========================================================================
   8. EDUCATIONAL & TECHNICAL EXPLANATION GUIDES (SEO & USER ENGAGEMENT)
   ========================================================================== */

.tool-guide-section {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.25rem;
    margin-top: 3rem;
    margin-bottom: 3rem;
    box-shadow: var(--shadow-sm);
}

.guide-pill-header {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: var(--text-2xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.85rem;
}

.guide-title {
    font-size: var(--text-2xl);
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    margin-bottom: 0.6rem;
}

.guide-subtitle {
    font-size: var(--text-base);
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.75rem;
    max-width: 840px;
}

.guide-feature-card {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.4rem;
    height: 100%;
    transition: all 0.2s ease;
}

.guide-feature-card:hover {
    border-color: #cbd5e1;
    background: #ffffff;
    box-shadow: 0 4px 12px -2px rgba(15, 23, 42, 0.05);
}

.guide-feature-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #eff6ff;
    color: #2563eb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.guide-feature-title {
    font-size: var(--text-base);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.45rem;
}

.guide-feature-text {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    line-height: 1.55;
    margin-bottom: 0;
}

.guide-accordion .accordion-item {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md) !important;
    margin-bottom: 0.65rem;
    overflow: hidden;
}

.guide-accordion .accordion-button {
    background: #ffffff;
    color: var(--text-primary);
    font-weight: 600;
    font-size: var(--text-base);
    padding: 0.95rem 1.25rem;
    box-shadow: none !important;
}

.guide-accordion .accordion-button:not(.collapsed) {
    background: #f8fafc;
    color: #2563eb;
    border-bottom: 1px solid var(--border-color);
}

.guide-accordion .accordion-body {
    background: #ffffff;
    color: var(--text-secondary);
    font-size: var(--text-sm);
    line-height: 1.6;
    padding: 1.15rem 1.25rem;
}

/* ==========================================================================
   PRELINE UI REAL-TIME AUDIT PROGRESS ENGINE MODAL
   ========================================================================== */

.preline-progress-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.preline-progress-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.preline-progress-dialog {
    position: relative;
    width: 100%;
    max-width: 520px;
    z-index: 10;
    animation: prelineModalScale 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes prelineModalScale {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(8px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.preline-progress-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
    padding: 24px;
}

.preline-progress-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f1f5f9;
}

.preline-radar-scope {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #eff6ff;
    border: 1.5px solid #bfdbfe;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.preline-radar-sweep {
    position: absolute;
    inset: 0;
    background: conic-gradient(from 0deg, rgba(37, 99, 235, 0.4) 0deg, transparent 90deg, transparent 360deg);
    animation: prelineRadarSpin 2s linear infinite;
    border-radius: 50%;
}

.preline-radar-blip {
    width: 6px;
    height: 6px;
    background: #2563eb;
    border-radius: 50%;
    z-index: 2;
    box-shadow: 0 0 6px #2563eb;
}

@keyframes prelineRadarSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.preline-progress-title {
    font-size: var(--text-md);
    font-weight: 600;
    color: #0f172a;
}

.preline-badge-live {
    font-size: var(--text-2xs);
    font-weight: 700;
    color: #2563eb;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    padding: 2px 8px;
    border-radius: 9999px;
    letter-spacing: 0.05em;
}

.preline-progress-target {
    font-size: var(--text-xs);
    color: #64748b;
    font-weight: 500;
    margin-top: 2px;
    max-width: 280px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.preline-progress-percent {
    font-size: var(--text-2xl);
    font-weight: 700;
    color: #2563eb;
    letter-spacing: -0.03em;
    flex-shrink: 0;
}

.preline-progress-track-wrapper {
    margin: 20px 0 16px;
}

.preline-progress-track {
    height: 6px;
    width: 100%;
    background: #f1f5f9;
    border-radius: 9999px;
    overflow: hidden;
    position: relative;
}

.preline-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2563eb, #3b82f6);
    border-radius: 9999px;
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.preline-progress-meta {
    font-size: var(--text-xs);
    color: #64748b;
}

.preline-steps-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
}

.preline-step-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    transition: all 0.2s ease;
}

.preline-step-item.active {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.preline-step-item.completed {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.preline-step-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: var(--text-sm);
}

.preline-step-info {
    flex: 1;
    min-width: 0;
}

.preline-step-name {
    font-size: var(--text-sm);
    font-weight: 600;
    color: #0f172a;
    line-height: 1.25;
}

.preline-step-desc {
    font-size: var(--text-xs);
    color: #64748b;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 1px;
}

.preline-step-badge {
    font-size: var(--text-2xs);
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 9999px;
    white-space: nowrap;
}

.preline-step-item.pending .preline-step-badge {
    background: #f1f5f9;
    color: #94a3b8;
}

.preline-step-item.active .preline-step-badge {
    background: #dbeafe;
    color: #1d4ed8;
}

.preline-step-item.completed .preline-step-badge {
    background: #dcfce7;
    color: #15803d;
}

.preline-progress-footer {
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
    text-align: center;
    font-size: var(--text-xs);
    color: #64748b;
}
