    :root {
        --brand-primary: #3b82f6; 
        --bg-deep: #09090b;
        --card-bg: rgba(24, 24, 27, 0.7);
        --card-border: rgba(63, 63, 70, 0.4);
        --text-muted: #a1a1aa;
        --accent-success: #10b981;
        --accent-danger: #ef4444;
        --accent-warning: #f38020; 
        --body-gradient: 
            radial-gradient(900px 520px at 50% 18%, rgba(59, 130, 246, 0.14), transparent 60%),
            radial-gradient(900px 520px at 50% 0%, rgba(59, 130, 246, 0.1), transparent 65%),
            linear-gradient(180deg, rgba(9, 9, 11, 0.9), var(--bg-deep));
    }

    [data-bs-theme="light"] {
        --bg-deep: #f8fafc;
        --card-bg: rgba(255, 255, 255, 0.8);
        --card-border: rgba(203, 213, 225, 0.6);
        --text-muted: #64748b;
        --body-gradient: 
            radial-gradient(900px 520px at 50% 18%, rgba(59, 130, 246, 0.08), transparent 60%),
            radial-gradient(900px 520px at 50% 0%, rgba(59, 130, 246, 0.06), transparent 65%),
            linear-gradient(180deg, rgba(248, 250, 252, 0.98), var(--bg-deep));
    }

    body {
        font-family: 'Inter', sans-serif;
        background-color: var(--bg-deep);
        color: var(--bs-body-color);
        letter-spacing: -0.01em;
        background-image: var(--body-gradient);
        background-attachment: fixed;
        min-height: 100vh;
        transition: background-color 0.3s ease;
    }

    .mono { font-family: 'Inter', sans-serif; font-size: 0.82rem; }

    .glass-card {
        background: var(--card-bg);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border: 1px solid var(--card-border);
        border-radius: 12px;
        box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    }

    /* --- LANDING PAGE --- */
    .hero-wrapper {
        min-height: 70vh;
        display: flex;
        flex-direction: column;
        justify-content: center;
        transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
        padding: 60px 0;
    }

    .hero-wrapper.results-active {
        min-height: 20vh;
        padding-bottom: 20px;
        margin-bottom: 30px;
    }

    .hero-badge {
        display: inline-block;
        padding: 6px 14px;
        border-radius: 100px;
        background: rgba(59, 130, 246, 0.1);
        border: 1px solid rgba(59, 130, 246, 0.2);
        color: var(--brand-primary);
        font-size: 0.75rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 1px;
        margin-bottom: 1.5rem;
    }

    .search-box {
        background: var(--card-bg);
        border: 1px solid var(--card-border);
        border-radius: 16px;
        padding: 16px;
        max-width: 700px;
        margin: 0 auto;
        box-shadow: 0 20px 50px rgba(0,0,0,0.3);
        backdrop-filter: blur(20px);
        display: flex;
        flex-direction: column;
        text-align: left;
    }
    
    .search-box textarea { 
        background: transparent !important; 
        border: 1px solid transparent !important; 
        box-shadow: none !important; 
        color: var(--bs-body-color) !important; 
        padding: 12px 10px; 
        font-size: 0.95rem; 
        resize: none; 
        border-radius: 8px;
        transition: all 0.3s;
    }
    .search-box textarea:focus {
        border-color: rgba(59, 130, 246, 0.3) !important;
        background: rgba(128,128,128,0.03) !important;
    }
    .search-box textarea::placeholder { color: var(--text-muted); opacity: 0.6; line-height: 1.5;}
    .search-box textarea.drag-over { border: 1px dashed var(--brand-primary) !important; background: rgba(59, 130, 246, 0.06) !important; }

    .upload-file-btn { font-size: 0.68rem; padding: 3px 9px; }

    .btn-action { 
        background: var(--brand-primary); 
        color: white; 
        border: none; 
        border-radius: 10px; 
        padding: 8px 24px; 
        font-weight: 600; 
        transition: all 0.3s;
    }
    .btn-action:hover:not(:disabled) { background: #2563eb; color: white; transform: translateY(-1px); }
    .btn-action:disabled { opacity: 0.7; cursor: not-allowed; }

    .landing-feature-card {
        padding: 2rem;
        text-align: left;
        height: 100%;
        transition: transform 0.3s ease;
    }
    .landing-feature-card:hover { transform: translateY(-5px); border-color: var(--brand-primary); }
    .feature-icon-circle {
        width: 45px; height: 45px;
        background: rgba(59, 130, 246, 0.1);
        color: var(--brand-primary);
        border-radius: 10px;
        display: flex; align-items: center; justify-content: center;
        font-size: 1.2rem; margin-bottom: 1.2rem;
    }

    /* --- EXTREMELY COMPACT RESULTS TABLE --- */
    .bulk-table { width: 100%; font-size: 0.8rem; }
    .bulk-table th { 
        padding: 8px 12px; 
        border-bottom: 1px solid var(--card-border); 
        color: var(--text-muted); 
        font-size: 0.7rem; 
        text-transform: uppercase; 
        font-weight: 600; 
        letter-spacing: 0.05em; 
        text-align: left; 
        white-space: nowrap;
    }
    .bulk-table td { 
        padding: 6px 12px; 
        border-bottom: 1px solid rgba(128, 128, 128, 0.1); 
        vertical-align: middle; 
        line-height: 1.2;
    }
    .bulk-table tr:hover td { background: rgba(128, 128, 128, 0.05); }
    .bulk-table tr:last-child td { border-bottom: none; }
    
    .compact-title { font-weight: 600; color: var(--bs-body-color); line-height: 1.2; }
    .compact-subtitle { font-size: 0.72rem; color: var(--text-muted); margin-top: 2px; line-height: 1.2; }
    .flag-icon { width: 18px; border-radius: 2px; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
    .rep-flag { background: rgba(239, 68, 68, 0.15); border: 1px solid rgba(239, 68, 68, 0.4); color: var(--accent-danger); font-size: 0.6rem; font-weight: 700; padding: 3px 6px; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.03em; }
    .proxy-flag { background: rgba(243, 128, 32, 0.15); border: 1px solid rgba(243, 128, 32, 0.4); color: var(--accent-warning); font-size: 0.6rem; font-weight: 700; padding: 3px 6px; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.03em; }
    .security-unknown-icon { color: var(--text-muted); opacity: 0.45; font-size: 0.7rem; cursor: default; }
    .security-unknown-icon:hover { opacity: 0.8; }
    /* Dedicated "Flags" column: stack Flagged/Proxy badges instead of side-by-side, and
       shrink them further. The header's flagged-count-badge reuses .rep-flag but at its
       normal size, so the smaller size is scoped to this column only. */
    .flags-cell { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
    .flags-cell .rep-flag, .flags-cell .proxy-flag { font-size: 0.5rem; padding: 2px 5px; }
    .flags-cell .security-unknown-icon { font-size: 0.65rem; }
    
    .progress-wrapper { max-width: 650px; margin: 20px auto 0; display: none; text-align: left; }
    .progress-custom { height: 6px; background: rgba(128, 128, 128, 0.15); border-radius: 10px; overflow: hidden; border: 1px solid var(--card-border); margin-top: 6px; }
    .progress-fill { height: 100%; background: var(--brand-primary); width: 0%; transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1); }

    /* --- STATS DASHBOARD --- */
    .summary-strip { font-size: 0.82rem; color: var(--text-muted); }
    .summary-strip b { color: inherit; font-weight: 700; }
    .summary-strip .summary-sep { margin: 0 8px; opacity: 0.4; }
    .stat-progress { height: 5px; background: rgba(128,128,128,0.15); border-radius: 10px; overflow: hidden; margin-top: 5px;}
    .stat-fill { height: 100%; background: var(--brand-primary); border-radius: 10px;}

    .stat-row { border-radius: 6px; padding: 4px 6px; margin: -4px -6px 12px -6px; transition: background 0.15s ease; }
    .stat-row:hover { background: rgba(128,128,128,0.08); }
    .stat-row-expandable { cursor: pointer; }
    .stat-expand-icon { font-size: 0.6rem; opacity: 0.5; transition: transform 0.15s ease; }
    .stat-row-expandable.expanded { background: rgba(128,128,128,0.06); }
    .stat-row-expandable.expanded .stat-expand-icon { transform: rotate(180deg); opacity: 0.8; }
    .stat-expand-panel:empty { display: none; }
    .stat-expand-panel { margin-top: 8px; cursor: default; }
    .stat-expand-scroll { max-height: 150px; overflow-y: auto; background: rgba(128,128,128,0.05); border: 1px solid var(--card-border); border-radius: 8px; padding: 4px 8px; }
    .stat-expand-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 0.72rem; padding: 5px 6px; margin: 0 -6px; border-radius: 5px; border-bottom: 1px dashed var(--card-border); transition: background 0.12s ease; }
    .stat-expand-row:last-child { border-bottom: none; }
    .stat-expand-row:hover { background: rgba(59, 130, 246, 0.1); border-bottom-color: transparent; }
    .stat-expand-ip { user-select: text; cursor: text; }
    .stat-copy-btn { flex-shrink: 0; border: none; background: transparent; color: var(--text-muted); opacity: 0.6; padding: 2px 4px; border-radius: 4px; cursor: pointer; font-size: 0.68rem; transition: opacity 0.15s ease, color 0.15s ease; }
    .stat-copy-btn:hover { opacity: 1; background: rgba(128,128,128,0.12); }
    .stat-copy-btn.copied { opacity: 1; color: var(--accent-success); }
    .stat-expand-empty { font-size: 0.72rem; color: var(--text-muted); padding: 6px 2px; }

    .hover-tooltip {
        position: fixed;
        z-index: 3000;
        pointer-events: none;
        background: var(--card-bg);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        border: 1px solid var(--card-border);
        border-radius: 10px;
        padding: 10px 12px;
        font-size: 0.72rem;
        line-height: 1.5;
        box-shadow: 0 10px 30px rgba(0,0,0,0.35);
        opacity: 0;
        visibility: hidden;
        transform: translateY(4px);
        transition: opacity 0.12s ease, transform 0.12s ease;
        max-width: 260px;
        min-width: 190px;
    }
    .hover-tooltip.visible { opacity: 1; visibility: visible; transform: translateY(0); }

    /* These .tt-* rules style buildTooltipHtml()'s output, which is reused both inside the
       floating .hover-tooltip and inside Leaflet's .map-popup, so they must not be scoped
       to .hover-tooltip alone, or the map popup renders unstyled (icons glued to text). */
    .tt-header { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; font-size: 0.78rem; }
    .tt-flag { width: 16px; height: auto; border-radius: 2px; }
    .tt-sub { font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 6px; opacity: 0.7; }
    .tt-row { display: flex; align-items: center; gap: 6px; color: var(--text-muted); margin-bottom: 3px; }
    .tt-row i { width: 12px; text-align: center; opacity: 0.7; flex-shrink: 0; }
    .tt-list-row { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 3px; }
    .tt-foot { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--card-border); font-size: 0.65rem; color: var(--text-muted); opacity: 0.8; }

    /* --- TABLE SEARCH --- */
    .table-search-wrap { position: relative; flex: 1 1 260px; max-width: 420px; }
    .table-search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 0.75rem; color: var(--text-muted); opacity: 0.6; pointer-events: none; }
    .table-search-input { width: 100%; background: rgba(128,128,128,0.06); border: 1px solid var(--card-border); border-radius: 8px; padding: 7px 32px; font-size: 0.8rem; color: inherit; }
    .table-search-input:focus { outline: none; border-color: var(--brand-primary); background: rgba(128,128,128,0.03); }
    .table-search-input::placeholder { color: var(--text-muted); opacity: 0.6; }
    .table-search-clear { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: none; background: transparent; color: var(--text-muted); opacity: 0.6; padding: 4px 6px; border-radius: 4px; cursor: pointer; font-size: 0.7rem; }
    .table-search-clear:hover { opacity: 1; background: rgba(128,128,128,0.12); }

    /* --- RESULT FILTERS --- */
    .filter-dropdown { position: relative; }
    .filter-btn { display: flex; align-items: center; gap: 6px; font-size: 0.78rem; white-space: nowrap; }
    .filter-btn.has-active { border-color: var(--brand-primary); color: var(--brand-primary); background: rgba(59, 130, 246, 0.08); }
    .filter-btn .filter-badge { background: var(--brand-primary); color: #fff; border-radius: 100px; padding: 0 6px; font-size: 0.68rem; line-height: 1.5; }
    .filter-menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 1500; background: var(--card-bg); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--card-border); border-radius: 10px; box-shadow: 0 12px 30px rgba(0,0,0,0.25); width: 260px; display: none; overflow: hidden; }
    .filter-menu.active { display: flex; flex-direction: column; }
    .filter-menu-search { padding: 8px; border-bottom: 1px solid var(--card-border); }
    .filter-menu-search input { width: 100%; background: rgba(128,128,128,0.08); border: 1px solid var(--card-border); border-radius: 6px; padding: 6px 8px; font-size: 0.78rem; color: inherit; }
    .filter-menu-search input:focus { outline: none; border-color: var(--brand-primary); }
    .filter-menu-list { max-height: 240px; overflow-y: auto; padding: 4px; }
    .filter-option { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 6px; cursor: pointer; font-size: 0.8rem; }
    .filter-option:hover { background: rgba(128,128,128,0.08); }
    .filter-option input { flex-shrink: 0; cursor: pointer; }
    .filter-option .filter-option-flag { width: 14px; height: auto; border-radius: 2px; flex-shrink: 0; }
    .filter-option .filter-option-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .filter-option .filter-option-time { color: var(--text-muted); opacity: 0.7; }
    .filter-option .filter-option-count { color: var(--text-muted); font-size: 0.68rem; flex-shrink: 0; }
    .filter-menu-empty { padding: 14px 10px; text-align: center; color: var(--text-muted); font-size: 0.78rem; }
    .filter-menu-footer { border-top: 1px solid var(--card-border); padding: 6px 8px; }
    .filter-menu-footer button { width: 100%; background: transparent; border: none; color: var(--accent-danger); font-size: 0.75rem; font-weight: 600; padding: 6px; border-radius: 6px; cursor: pointer; }
    .filter-menu-footer button:hover { background: rgba(239, 68, 68, 0.1); }
    #filter-clear-all { font-size: 0.75rem; }

    /* --- RESULTS VIEW TOGGLE & SORTABLE TABLE --- */
    .view-toggle { display: flex; border: 1px solid var(--card-border); border-radius: 8px; overflow: hidden; }
    .view-toggle-btn { border: none; background: transparent; color: var(--text-muted); font-size: 0.78rem; font-weight: 600; padding: 6px 12px; cursor: pointer; transition: background 0.15s ease, color 0.15s ease; }
    .view-toggle-btn + .view-toggle-btn { border-left: 1px solid var(--card-border); }
    .view-toggle-btn:hover { background: rgba(128,128,128,0.08); }
    .view-toggle-btn.active { background: var(--brand-primary); color: #fff; }

    .sortable-th { cursor: pointer; user-select: none; white-space: nowrap; }
    .sortable-th:hover { color: var(--brand-primary); }
    .sort-icon { font-size: 0.65rem; opacity: 0.35; margin-left: 2px; }
    .sort-icon.active { opacity: 0.9; color: var(--brand-primary); }

    /* --- RESULTS MAP --- */
    #results-map { height: 600px; width: 100%; background: var(--bg-deep); }
    .leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--card-bg); color: inherit; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
    .leaflet-popup-content-wrapper { border: 1px solid var(--card-border); border-radius: 10px; }
    .leaflet-popup-content { margin: 10px 12px; font-family: 'Inter', sans-serif; }
    .map-popup .tt-header { margin-bottom: 6px; }
    .leaflet-container a.leaflet-popup-close-button { color: var(--text-muted); }
    .leaflet-bar a { background: var(--card-bg); color: inherit; border-color: var(--card-border) !important; }
    .leaflet-bar a:hover { background: rgba(128,128,128,0.15); }

    /* Default Leaflet.markercluster colors are too light for white count text to stay
       readable; darken each tier and add a text-shadow as a contrast safety net. */
    .marker-cluster-small { background-color: rgba(22, 101, 33, 0.55); }
    .marker-cluster-small div { background-color: rgba(21, 128, 61, 0.9); }
    .marker-cluster-medium { background-color: rgba(146, 64, 14, 0.55); }
    .marker-cluster-medium div { background-color: rgba(180, 83, 9, 0.9); }
    .marker-cluster-large { background-color: rgba(127, 29, 29, 0.55); }
    .marker-cluster-large div { background-color: rgba(185, 28, 28, 0.9); }
    .marker-cluster span { color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7); font-weight: 600; }

    /* Shrink the cluster badge from Leaflet's default 40px to 30px (outer ring); the
       iconCreateFunction below sets the 30px outer size, this scales the inner circle
       and border-radii to match proportionally. */
    .marker-cluster { border-radius: 15px; }
    .marker-cluster div { width: 22px; height: 22px; margin-left: 4px; margin-top: 4px; border-radius: 11px; font-size: 11px; }
    .marker-cluster span { line-height: 22px; }

    /* --- THEME MENU --- */
    .restore-banner { background: rgba(59, 130, 246, 0.08); border-bottom: 1px solid rgba(59, 130, 246, 0.25); padding: 12px 0; font-size: 0.85rem; }

    .theme-toggle-inline { position: relative; }
    .theme-toggle-btn { cursor: pointer; width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--card-border); display: flex; align-items: center; justify-content: center; background: var(--card-bg); color: inherit; transition: all 0.2s;}
    .theme-toggle-btn:hover { background: rgba(128,128,128,0.1); }
    .theme-dropdown { position: absolute; top: 52px; right: 0; background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 10px; box-shadow: 0 12px 30px rgba(0,0,0,0.25); overflow: hidden; display: none; min-width: 160px; }
    .theme-dropdown.active { display: block; }
    .theme-option { width: 100%; text-align: left; padding: 10px 12px; background: transparent; color: inherit; border: none; display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; font-size: 0.9rem;}
    .theme-option:hover { background: rgba(128,128,128,0.08); }
    .theme-option.active { color: var(--brand-primary); background: rgba(59, 130, 246, 0.08); }
    
    .count-indicator { transition: color 0.3s; }
    .count-indicator.over-limit { color: var(--accent-danger); }

    .quick-actions-dropdown { position: relative; }
    .quick-actions-dropdown .quick-actions-chevron { font-size: 0.6rem; opacity: 0.6; transition: transform 0.15s ease; }
    .quick-actions-dropdown.active .quick-actions-chevron { transform: rotate(180deg); }
    /* position:fixed + JS-computed top/left (see openDropdown()) rather than absolute +
       top/left relative to the wrapper: ancestors like .search-box and .glass-card use
       backdrop-filter (which creates an isolated stacking context, burying any z-index
       from outside it) and/or overflow:hidden (which clips regardless of z-index). The
       menu is reparented to <body> on open (same trick #hover-tooltip already uses) to
       escape both issues entirely instead of fighting them per-container. */
    .quick-actions-menu { position: fixed; z-index: 3000; background: var(--card-bg); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--card-border); border-radius: 10px; box-shadow: 0 12px 30px rgba(0,0,0,0.25); min-width: 200px; padding: 4px; display: none; }
    .quick-actions-menu.portal-open { display: block; }
    .quick-action-item { width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; padding: 8px 10px; background: transparent; border: none; color: inherit; font-size: 0.8rem; font-weight: 600; border-radius: 6px; cursor: pointer; }
    .quick-action-item:hover { background: rgba(128,128,128,0.08); }
    .quick-action-item i { width: 14px; text-align: center; opacity: 0.7; flex-shrink: 0; }
    .quick-action-item:disabled { opacity: 0.35; cursor: not-allowed; }
    .quick-action-item:disabled:hover { background: transparent; }
    .quick-actions-hint { display: none; padding: 8px 10px; font-size: 0.7rem; color: var(--text-muted); border-bottom: 1px solid var(--card-border); margin-bottom: 4px; }
    .quick-actions-menu.is-empty .quick-actions-hint { display: block; }

    /* Utilities */
    .trunc-sm { max-width: 130px; display: inline-block; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; vertical-align: bottom; }
    .trunc-md { max-width: 180px; display: inline-block; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; vertical-align: bottom; }
    .leaflet-control-attribution { display: none; }

    /* --- SITE NAVBAR (shared across every page) ---
       Deliberately explicit rather than relying on Bootstrap's .navbar-expand-lg defaults:
       .container is forced into a flex row with its own gap, so brand/links/toggle always
       have guaranteed separation even if a child's own width leaves no free space for
       justify-content to distribute. */
    .site-navbar { padding: 14px 0; border-bottom: 1px solid var(--card-border); background: var(--bg-deep); position: sticky; top: 0; z-index: 900; }
    .site-navbar .container { display: flex !important; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 28px; }
    .site-navbar-brand { font-weight: 800; font-size: 1.2rem; color: var(--bs-body-color); text-decoration: none; white-space: nowrap; }
    .site-navbar .navbar-collapse { flex-grow: 0; }
    .site-navbar-links { display: flex; align-items: center; flex-wrap: wrap; gap: 22px; }
    .site-navbar-links a { color: var(--text-muted); text-decoration: none; font-size: 0.9rem; font-weight: 600; transition: color 0.15s ease; white-space: nowrap; }
    .site-navbar-links a:hover { color: var(--bs-body-color); }
    .site-navbar-links a.active { color: var(--brand-primary); }
    .navbar-toggler { border: 1px solid var(--card-border); color: var(--bs-body-color); background: var(--card-bg); padding: 6px 10px; }
    .navbar-toggler:focus { box-shadow: none; }

    @media (min-width: 992px) {
        .site-navbar .navbar-collapse { display: flex !important; align-items: center; justify-content: flex-end; gap: 28px; }
    }

    @media (max-width: 991.98px) {
        .site-navbar .navbar-collapse { flex-direction: column; align-items: flex-start; gap: 14px; padding-top: 14px; width: 100%; }
        .site-navbar-links { flex-direction: column; align-items: flex-start; gap: 12px; }
    }

    /* --- SITE FOOTER (shared across every page) --- */
    .site-footer { border-top: 1px solid var(--card-border); padding: 50px 0 24px; margin-top: 60px; }
    .site-footer-grid { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 30px; }
    .site-footer-brand { font-weight: 800; font-size: 1.1rem; margin-bottom: 10px; }
    .site-footer-col h6 { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); font-weight: 700; margin-bottom: 12px; }
    .site-footer-col a { display: block; color: var(--text-muted); text-decoration: none; font-size: 0.85rem; margin-bottom: 8px; transition: color 0.15s ease; }
    .site-footer-col a:hover { color: var(--brand-primary); }
    .site-footer-bottom { border-top: 1px solid var(--card-border); margin-top: 36px; padding-top: 20px; color: var(--text-muted); text-align: center; }

    @media (max-width: 767.98px) {
        .site-footer-grid { grid-template-columns: 1fr 1fr; }
    }

    /* --- SECONDARY TOOL/CONTENT PAGE HERO (lighter than the bulk-tool landing hero) --- */
    .tool-page-hero { padding: 54px 0 8px; text-align: center; }
    .tool-page-hero h1 { font-size: 2.1rem; }
    .tool-form-card { max-width: 700px; margin: 0 auto; padding: 24px; }

    /* --- TOOL RESULT GRID (IP Lookup, Subnet Calculator) --- */
    .tool-result-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-top: 20px; }
    .tool-result-item { background: rgba(128,128,128,0.05); border: 1px solid var(--card-border); border-radius: 10px; padding: 14px; overflow: hidden; }
    .tool-result-item .trl-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 6px; }
    .tool-result-item .trl-label i { margin-right: 6px; opacity: 0.7; }
    .tool-result-item .trl-value { font-weight: 700; font-size: 0.95rem; word-break: break-word; overflow-wrap: break-word; }
    /* .rep-flag/.proxy-flag are sized for the compact bulk-results table; inside this
       larger card layout they need to wrap instead of forcing a single nowrap line
       that overflows into the next grid cell, and read better a bit larger. */
    .tool-result-item .badge { white-space: normal; text-align: left; font-size: 0.72rem; padding: 5px 10px; line-height: 1.4; }
    .tool-result-item .trl-sub, .value-sub { margin-top: 6px; font-size: 0.72rem; color: var(--text-muted); word-break: break-word; }

    /* --- IP LOOKUP RESULT LAYOUT: sidebar (map + location + local time) next to
       grouped info sections (Network / Location / Security), each a grid of stat
       cards, matching a two-column dashboard-style detail view. --- */
    .ip-result-grid { display: grid; grid-template-columns: 300px 1fr; gap: 24px; align-items: start; }
    @media (max-width: 860px) {
        .ip-result-grid { grid-template-columns: 1fr; }
    }

    .ip-header-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
    .ip-header-row .flag-icon-lg { width: 34px; height: auto; border-radius: 4px; box-shadow: 0 2px 8px rgba(0,0,0,0.25); flex-shrink: 0; }
    .ip-header-row .idh-ip { font-size: 1.4rem; font-weight: 800; line-height: 1.2; word-break: break-all; }
    .ip-version-badge { background: rgba(16,185,129,0.15); border: 1px solid rgba(16,185,129,0.4); color: var(--accent-success); font-size: 0.68rem; font-weight: 700; padding: 4px 11px; border-radius: 100px; text-transform: uppercase; letter-spacing: 0.04em; }

    .ip-side-col { display: flex; flex-direction: column; gap: 14px; }
    .ip-map-embed { height: 220px; border-radius: 10px; overflow: hidden; border: 1px solid var(--card-border); background: rgba(128,128,128,0.05); }
    .ip-side-card { background: rgba(128,128,128,0.05); border: 1px solid var(--card-border); border-radius: 10px; padding: 14px 16px; }
    .ip-side-card .isc-place { font-weight: 700; display: flex; align-items: flex-start; gap: 8px; font-size: 0.92rem; }
    .ip-side-card .isc-place i { color: var(--brand-primary); margin-top: 3px; flex-shrink: 0; }
    .ip-side-card .isc-sub { color: var(--text-muted); font-size: 0.8rem; margin-top: 4px; margin-left: 22px; }
    .ip-side-card .isc-time { font-size: 1.4rem; font-weight: 800; }
    .ip-side-card .isc-date { color: var(--text-muted); font-size: 0.8rem; margin-top: 2px; }

    .ip-main-col { display: flex; flex-direction: column; gap: 26px; }
    .ip-section-heading { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 0.98rem; margin-bottom: 14px; }
    .ip-section-heading i { color: var(--brand-primary); }

    .ip-whois-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; background: rgba(128,128,128,0.05); border: 1px solid var(--card-border); border-radius: 10px; padding: 16px 18px; flex-wrap: wrap; }
    .ip-whois-card .iwc-title { font-weight: 700; font-size: 0.9rem; display: flex; align-items: center; gap: 10px; }
    .ip-whois-card .iwc-sub { color: var(--text-muted); font-size: 0.78rem; margin-top: 3px; margin-left: 30px; }

    /* Risk Level: a ring gauge built from conic-gradient (no SVG/canvas needed), filled
       to the estimated score. This is OUR heuristic from proxy/reputation signals, not
       a number from the upstream provider, so it's always paired with that disclosure. */
    .risk-gauge-row { display: flex; align-items: center; gap: 12px; }
    .risk-gauge { width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: conic-gradient(var(--risk-color, var(--accent-success)) calc(var(--risk-pct, 0) * 1%), rgba(128,128,128,0.18) 0); }
    .risk-gauge-inner { width: 36px; height: 36px; border-radius: 50%; background: var(--card-bg); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.75rem; color: var(--risk-color, var(--accent-success)); }
    .risk-level-label { font-weight: 700; font-size: 0.88rem; color: var(--risk-color, var(--accent-success)); }

    /* --- WHOIS LOOKUP RESULT --- */
    .whois-status-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent-success); box-shadow: 0 0 0 3px rgba(16,185,129,0.15); flex-shrink: 0; }
    .route-card { display: block; text-decoration: none; color: inherit; transition: border-color 0.15s ease, transform 0.15s ease; }
    .route-card:hover { border-color: var(--brand-primary); transform: translateY(-2px); }
    .route-chevron { font-size: 0.7rem; opacity: 0.5; color: var(--text-muted); flex-shrink: 0; }

    /* --- BREADCRUMBS --- */
    .breadcrumb-nav { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 24px; }
    .breadcrumb-nav a { color: var(--text-muted); text-decoration: none; }
    .breadcrumb-nav a:hover { color: var(--brand-primary); }
    .breadcrumb-nav .bc-sep { margin: 0 6px; opacity: 0.5; }

    /* --- ARTICLE / GUIDE CONTENT --- */
    .article-wrap { max-width: 760px; margin: 0 auto; padding: 40px 0 70px; }
    .article-header { margin-bottom: 30px; }
    .article-header h1 { font-size: 2.1rem; font-weight: 800; margin-bottom: 10px; }
    .article-meta { color: var(--text-muted); font-size: 0.85rem; }
    .article-body { font-size: 1rem; line-height: 1.75; }
    .article-body h2 { font-size: 1.4rem; font-weight: 700; margin: 36px 0 14px; }
    .article-body h3 { font-size: 1.15rem; font-weight: 700; margin: 26px 0 10px; }
    .article-body p { margin-bottom: 16px; }
    .article-body ul, .article-body ol { margin-bottom: 16px; padding-left: 22px; }
    .article-body li { margin-bottom: 8px; }
    .article-body code { background: rgba(128,128,128,0.12); padding: 2px 6px; border-radius: 4px; font-size: 0.85em; }
    .article-body a { color: var(--brand-primary); }
    .article-cta { margin-top: 40px; padding: 24px; }

    .guide-index-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
    .guide-card { padding: 24px; height: 100%; text-decoration: none; color: inherit; display: block; transition: transform 0.2s ease; }
    .guide-card:hover { transform: translateY(-4px); border-color: var(--brand-primary); }
    .guide-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; color: var(--bs-body-color); }
    .guide-card p { font-size: 0.85rem; color: var(--text-muted); margin: 0; }

    /* --- FAQ ACCORDION --- */
    .faq-section { max-width: 800px; margin: 0 auto; }
    .faq-item { border-bottom: 1px solid var(--card-border); padding: 18px 4px; }
    .faq-question { display: flex; justify-content: space-between; align-items: center; gap: 12px; cursor: pointer; font-weight: 600; }
    .faq-question i { transition: transform 0.15s ease; opacity: 0.6; font-size: 0.8rem; flex-shrink: 0; }
    .faq-item.open .faq-question i { transform: rotate(180deg); }
    .faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.25s ease; color: var(--text-muted); font-size: 0.9rem; line-height: 1.65; }
    .faq-item.open .faq-answer { max-height: 500px; padding-top: 12px; }
