/* Atkinson Hyperlegible (Braille Institute, accessibility-first) */
        @font-face {
            font-family: 'Atkinson Hyperlegible Next';
            src: url('/static/fonts/AtkinsonHyperlegibleNext-Regular.ttf') format('truetype');
            font-weight: 400;
            font-style: normal;
            font-display: swap;
        }
        @font-face {
            font-family: 'Atkinson Hyperlegible Next';
            src: url('/static/fonts/AtkinsonHyperlegibleNext-Bold.ttf') format('truetype');
            font-weight: 700;
            font-style: normal;
            font-display: swap;
        }
        @font-face {
            font-family: 'Atkinson Hyperlegible Mono';
            src: url('/static/fonts/AtkinsonHyperlegibleMono-Regular.ttf') format('truetype');
            font-weight: 400;
            font-style: normal;
            font-display: swap;
        }
        @font-face {
            font-family: 'Atkinson Hyperlegible Mono';
            src: url('/static/fonts/AtkinsonHyperlegibleMono-Bold.ttf') format('truetype');
            font-weight: 700;
            font-style: normal;
            font-display: swap;
        }

        /* RESET */
        * { box-sizing: border-box; }
        html { scroll-behavior: smooth; scrollbar-gutter: stable; }
        body {
            margin: 0; min-height: 100vh;
            background: var(--page-bg, #f8fafc);
            color: #111827;
            font-family: var(--font-sans);
            font-size: 17px;
            letter-spacing: -0.022em;
        }
        input, button, select, textarea { font-family: var(--font-sans) !important; }
        .lookup-input, input[type="text"] { font-family: var(--font-mono) !important; }
        button { cursor: pointer; }
        a { color: inherit; }
        body.preload * { transition: none !important; }

        /* VARIABLES */
        :root {
            --header-h: 64px;
            --header-height: var(--header-h);
            --border: #e5e7eb;
            --blue: #1456ff;
            --blue-soft: #edf3ff;
            --text-muted: #64748b;
            --text-subtle: #475569;
            --status-success-bg: #d1fae5;
            --status-success-text: #047857;
            --dark: #293c50;
            --space-1: 8px;
            --space-2: 12px;
            --space-3: 16px;
            --space-4: 24px;
            --space-5: 32px;
            --radius-sm: 8px;
            --radius-md: 10px;
            --radius-lg: 14px;
            --radius-xl: 18px;
            --font-sans: 'Atkinson Hyperlegible Next', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            --font-mono: 'Atkinson Hyperlegible Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
        }

        /* APP SHELL */
        .app-shell {
            display: flex;
            min-height: 100vh;
        }
        .main-area {
            flex: 1;
            min-width: 0;
            display: flex;
            flex-direction: column;
            min-height: 100vh;
        }

        /* TOP HEADER */
        .top-header {
            position: fixed; top: 0; left: 0; right: 0;
            height: var(--header-height);
            display: flex; align-items: center; justify-content: space-between;
            padding: 0 28px 0 32px;
            background: #f8fafc;
            border-bottom: 1px solid #dbe3ef;
            z-index: 100;
        }

        /* BREADCRUMB */
        .breadcrumb {
            display: flex; align-items: center; gap: 8px;
            font-size: 0.8125rem;
            font-weight: 500;
        }
        .breadcrumb-domain {
            color: #1456ff;
            font-family: var(--font-sans);
            font-weight: 600;
            font-size: 0.8125rem;
            text-decoration: none;
            transition: color .15s ease;
        }
        .breadcrumb-domain:hover { color: #0d3dcc; }
        .breadcrumb-sep { color: #d1d5db; font-size: 0.8125rem; }
        .breadcrumb-current {
            color: #0f172a;
            font-family: var(--font-sans);
            font-weight: 500;
            font-size: 0.8125rem;
            letter-spacing: -0.01em;
        }


        /* MAIN AREA */
         .main { min-height: 100vh; padding-top: var(--header-height); }
#page-content { transition: opacity 0.15s ease; }
#page-content.fading { opacity: .55; pointer-events: none; }
#page-content.router-pending { visibility: hidden; opacity: 0; transition: opacity .3s ease-in; }
        .container { width: min(1240px, calc(100% - 32px)); margin: 18px auto 40px; }

        /* APP */
        .app {
            background: rgba(255, 255, 255, .94);
            border: 1px solid rgba(0, 0, 0, .07);
            border-radius: var(--radius-xl);
            box-shadow: 0 8px 30px rgba(15, 23, 42, .06);
            overflow: hidden;
        }

        /* APP HEADER */
        .app-header {
            height: 68px;
            display: flex; align-items: center; justify-content: space-between;
            padding: 0 28px; border-bottom: 1px solid #f1f5f9;
            box-sizing: border-box;
            margin: 0;
        }
        .app-title {
            display: flex; align-items: center; gap: 10px;
            font-family: var(--font-sans);
            font-size: 1.5rem; font-weight: 700; line-height: 1.2; letter-spacing: -0.02em;
            color: #0f172a;
        }
        .app-title h1 {
            font-size: inherit;
            font-weight: inherit;
            line-height: inherit;
            letter-spacing: inherit;
            color: inherit;
            margin: 0;
        }
        /* Ensure app-title h1 inside .content doesn't get overridden by .content h1 */
        .content .app-title h1 {
            font-size: inherit;
            font-weight: inherit;
            line-height: inherit;
            letter-spacing: inherit;
            color: inherit;
            margin: 0;
        }
        .app-title-icon {
            display: flex; align-items: center; justify-content: center;
            width: 20px; height: 20px; flex-shrink: 0;
            color: inherit; font-size: 20px;
        }
        .app-actions { display: flex; align-items: center; gap: 10px; }

        /* BUTTON */
        .btn {
            display: inline-flex; align-items: center; justify-content: center; gap: 8px;
            padding: 9px 13px; border: 1px solid var(--border); border-radius: var(--radius-md);
            background: #ffffff; color: #111827; font-size: 13px; font-weight: 500; letter-spacing: -0.01em; transition: .15s ease;
        }
        .btn:hover { background: #f8fafc; border-color: #d1d5db; }
        .btn:disabled { opacity: .55; cursor: default; }
        .btn.loading .ic { animation: refresh-spin .8s linear infinite; }
        .btn.loading { cursor: default; }
        a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
            outline: 3px solid var(--blue); outline-offset: 2px;
        }
        @keyframes refresh-spin { to { transform: rotate(360deg); } }

        /* SKELETON LOADING */
        .skeleton {
            position: relative !important;
            overflow: hidden !important;
            color: transparent !important;
            -webkit-text-fill-color: transparent !important;
            background-color: #e2e8f0 !important;
            background-image: none !important;
            border-radius: 6px;
            min-height: 1em;
            display: inline-block;
            min-width: 60px;
        }
        .skeleton::after {
            content: "";
            position: absolute;
            inset: 0;
            transform: translateX(-100%);
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7), transparent);
            animation: skeleton-loading 1.3s infinite;
        }
        @keyframes skeleton-loading { 100% { transform: translateX(100%); } }
        @media (prefers-reduced-motion: reduce) {
            .skeleton::after { animation: none; }
        }

        /* CONTENT */
        .content { padding: 24px 28px; margin: 0; }
        section[id] { scroll-margin-top: 96px; }

        /* HERO */
        .hero {
            text-align: center;
            padding: 26px 24px;
            background: #f0f5ff;
            border: 1px solid #dbe7ff;
            border-radius: var(--radius-lg);
            margin-bottom: 16px;
        }
        .hero-label { margin-bottom: 6px; color: #555; font-size: 13px; font-weight: 500; letter-spacing: -0.01em; }
        .ip-value {
            display: inline-flex;
            align-items: center;
            gap: 10px;
            font-family: var(--font-mono);
            font-size: clamp(2.2rem, 5vw, 3.2rem);
            font-weight: 700;
            color: #1456ff;
            letter-spacing: -0.02em;
            line-height: 1.1;
            margin: 6px 0;
            max-width: 100%;
            overflow-wrap: anywhere;
            min-width: 0;
        }
        .ip-value > span { min-width: 0; overflow-wrap: anywhere; }
        .hero-ip-link { color: inherit; text-decoration: none; }
        .hero-ip-link:hover { text-decoration: underline; }
        .hero-copy {
            border: 0; background: transparent; color: #555; font-size: 16px; padding: 9px 6px; cursor: pointer;
            -webkit-text-fill-color: #555;
            flex: 0 0 auto;
        }
        .hostname { margin-top: 6px; color: #555; font-size: 15px; letter-spacing: -0.022em; word-break: break-word; }
        .connection-summary, .last-checked { margin: 8px 0 0; color: #64748b; font-size: 13px; }
        .last-checked { display: block; font-size: 12px; }
        .ip-error { margin: 8px 0 0; color: #b91c1c; font-size: 14px; }
        .ip-error[hidden] { display: none; }

        /* MASCOT */
        svg.mascot {
            display: block;
            flex-shrink: 0;
        }
        .mascot-sm {
            width: 22px; height: 25px;
            min-width: 22px; min-height: 25px;
            max-width: 22px; max-height: 25px;
        }
        .mascot-md {
            width: 32px; height: 36px;
            min-width: 32px; min-height: 36px;
            max-width: 32px; max-height: 36px;
        }
        .mascot-lg {
            width: 96px; height: 108px;
            min-width: 96px; min-height: 108px;
            max-width: 96px; max-height: 108px;
            opacity: .85; margin: 4px auto 14px;
        }

        /* EMPTY STATE */
        .empty-state {
            display: flex; flex-direction: column; align-items: center;
            margin-top: 18px; padding-top: 18px;
            border-top: 1px solid #e8ebf2;
        }
        .empty-state[hidden] { display: none; }
        .empty-state-title { margin: 0 0 4px; color: #1f2937; font-size: 15px; font-weight: 600; }
        .empty-state-text { margin: 0 0 14px; color: #64748b; font-size: 13px; }

        /* INFORMATION GRID */
        .grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-3); margin-top: var(--space-3); }
        .grid-start { align-items: start; }

        /* INFORMATION CARD */
        .info-card,
        .info-card.blue,
        .info-card.purple {
            background: #ffffff;
            border: 1px solid #e2e8f0;
            border-radius: 12px;
            padding: 12px 16px;
            min-height: 80px;
            transition: border-color .15s ease, box-shadow .15s ease;
        }
        .info-card[hidden] { display: none; }
        .info-card:not([hidden]):hover { border-color: #c9d8ff; box-shadow: 0 2px 8px rgba(20, 86, 255, .06); }
        .info-card { position: relative; }
        .info-card.full { grid-column: 1 / -1; }
        .section .info-card { padding: 12px 16px; min-height: 72px; }
        .info-group-card { padding: 0; min-height: 0; overflow: hidden; }
        .info-group-title {
            display: flex; align-items: center; gap: 7px;
            margin: 0; padding: 13px 16px;
            color: #1e293b; font-size: 1rem; font-weight: 600;
            border-bottom: 1px solid #e2e8f0;
        }
        .responsive-details > summary { cursor: pointer; list-style: none; }
        .responsive-details > summary::-webkit-details-marker { display: none; }
        .responsive-details > summary::after { content: '+'; margin-left: 6px; color: #64748b; }
        .responsive-details[open] > summary::after { content: '−'; }
        .info-row {
            display: grid; grid-template-columns: minmax(110px, .8fr) minmax(0, 1fr); align-items: center; gap: 12px;
            padding: 11px 56px 11px 16px; border-top: 1px solid #eef2f7; position: relative;
        }
        .info-group-title + .info-row { border-top: 0; }
        .info-row[hidden] { display: none; }
        .info-row:hover { background: #f8faff; }
        .info-label {
            display: flex; align-items: center; gap: 7px; margin-bottom: var(--space-1);
            color: #64748b; font-size: 0.875rem; font-weight: 500;
        }
        .info-label-link {
            display: inline-flex; align-items: center;
            color: #1456ff;
            margin-left: auto;
            opacity: .85;
            transition: opacity .15s ease;
        }
        .info-label-link:hover { opacity: 1; }
        .info-value-with-action { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
        .info-value-with-action .info-label-link { display: inline-flex; align-items: center; gap: 5px; margin-left: 0; white-space: nowrap; color: var(--blue); font-size: .8125rem; }
        .info-row svg.ic,
        .info-row .info-label svg.ic,
        .info-row .info-value svg.ic { width: 14px; height: 14px; }
        .row-copy {
            position: absolute; top: 11px; right: 16px;
            display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px;
            padding: 0; border: 0; border-radius: 6px; background: transparent; color: #64748b;
        }
        .row-copy:hover { background: #edf3ff; color: #1456ff; }
        .row-copy svg.ic { width: 14px; height: 14px; }
        .info-card:has(> .row-copy) { padding-right: 56px; }

        .info-value,
        .info-card.blue .info-value,
        .info-card.purple .info-value {
            color: #0f172a;
            font-size: 1rem;
            font-weight: 600;
            line-height: 1.3;
            letter-spacing: -0.01em;
            overflow-wrap: anywhere;
            font-family: var(--font-sans);
        }
        .info-value.na { color: var(--text-muted) !important; font-weight: 500; font-style: italic; }

        /* BADGES */
        .badge {
            display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 6px;
            background: #dce8ff; color: #1456ff; font-size: 10px; font-weight: 600; letter-spacing: 0;
        }
        .badge.purple { background: #eedcff; color: #8614ed; }
        .hero-meta {
            display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
            gap: 8px;
            margin-top: 8px;
        }
        .proto-badge {
            display: inline-flex; align-items: center; gap: 6px;
            padding: 4px 10px; border-radius: 999px;
            font-size: 0.7188rem; font-weight: 500;
            background: #f1f5f9; color: #64748b;
            transition: .15s ease;
        }
        .proto-badge .dot {
            width: 7px; height: 7px; border-radius: 50%;
            background: #cbd5e1; flex-shrink: 0;
            transition: .15s ease;
        }
        .proto-badge.proto-active { background: var(--status-success-bg); color: var(--status-success-text); }
        .proto-badge.proto-active .dot {
            background: #10b981;
            box-shadow: 0 0 0 4px rgba(16, 185, 129, .18);
        }
        .proto-badge.proto-unavail { background: #f1f5f9; color: #64748b; }
        .proto-badge.proto-unavail .dot { background: #cbd5e1; }
        .auto-tag {
            font-size: 12px;
            color: #9ca3af;
            letter-spacing: -0.01em;
            font-weight: 500;
        }

        /* SECTION */
        .section { margin-top: 20px; padding-top: 16px; border-top: 1px solid #ececec; }
        .section-title {
            display: flex; align-items: center; gap: 9px; margin-bottom: 15px;
            font-family: var(--font-sans);
            font-size: 1.125rem; font-weight: 600; line-height: 1.25; letter-spacing: -0.02em;
        }
        .details-section > summary { cursor: pointer; list-style: none; }
        .details-section > summary::-webkit-details-marker { display: none; }
        .details-section > summary::after { content: '+'; margin-left: 6px; color: #64748b; }
        .details-toggle-label { margin-left: auto; color: #64748b; font-size: .8125rem; font-weight: 500; white-space: nowrap; }
        .details-section[open] .details-toggle-label { font-size: 0; }
        .details-section[open] .details-toggle-label::after { content: 'Hide details'; font-size: .8125rem; }
        .details-section[open] > summary::after { content: '−'; }
        .map-details .details-toggle-label { font-size: 0; }
        .map-details .details-toggle-label::after { content: 'Show map'; font-size: .8125rem; }
        .map-details[open] .details-toggle-label::after { content: 'Hide map'; }
        .map-card { margin-top: 15px; }
        .map-card .leaflet-map { border-radius: var(--radius-md); }

        /* USER AGENT */
        .user-agent { padding-right: 50px; }
        .user-agent-copy {
            position: absolute; right: 12px; top: 12px;
            border: 0; background: transparent; color: #555; font-size: 16px;
        }
        .user-agent-text { color: #64748b; font-size: 0.8125rem; line-height: 1.5; letter-spacing: -0.01em; word-break: break-word; font-family: var(--font-mono); }

        /* STATUS */
        .status { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
        .status-item {
            padding: 5px 10px; border-radius: 7px;
            background: #dcfce7; color: #087f46; font-size: 12px; font-weight: 600; letter-spacing: 0;
        }
        .status-item.blue { background: #dbeafe; color: #1456ff; }
        .status-item.purple { background: #f3e8ff; color: #8614ed; }

        /* LOOKUP */
        .lookup { margin-top: 28px; padding-top: 24px; border-top: 1px solid #ececec; }
        .lookup-embedded { margin-top: 0; padding-top: 0; border-top: 0; }
        .lookup-form { display: flex; gap: 10px; }
        .lookup-input {
            flex: 1; min-width: 0; height: 48px; padding: 0 42px 0 14px;
            border: 1px solid #d8dee8; border-radius: var(--radius-sm);
            background: #ffffff; color: #1e293b; font-size: 14px;
        }
        .lookup-input:focus { border-color: #9ab4ff; box-shadow: 0 0 0 3px rgba(20, 86, 255, .08); }
        .lookup-btn {
            min-width: 136px; border: 0; border-radius: var(--radius-sm); height: 48px;
            background: var(--dark); color: #ffffff; font-weight: 600; letter-spacing: -0.01em; transition: .15s ease;
        }
        .lookup-btn:hover { opacity: .92; }
        .lookup-clear {
            position: absolute; right: 146px; top: 8px; z-index: 1;
            width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%;
            background: transparent; color: #64748b; font-size: 22px; line-height: 1;
        }
        .lookup-clear:hover { background: #edf3ff; color: var(--blue); }
        .lookup-clear[hidden] { display: none; }
        .lookup-error { display: none; margin: 10px 0 0; color: #b91c1c; font-size: 13px; }
        .whois-loading { margin: 12px 0; color: #64748b; font-size: .875rem; }
        .whois-loading[hidden] { display: none; }
        #whois-results[aria-busy="true"] { opacity: .92; }
        #whois-results[aria-busy="true"] .whois-value.skeleton { width: min(100%, 240px); min-height: 1.3em; background-color: #cbd5e1 !important; border-radius: 5px; }
        .whois-results { --whois-card-padding: 16px; --whois-inner-space: 12px; display: grid; gap: 16px; margin-top: 16px; }
        .whois-results[hidden], .whois-raw[hidden] { display: none; }
        #whois-results .info-group-card { padding: var(--whois-card-padding); }
        #whois-results .info-group-title { margin: 0 0 var(--whois-inner-space); padding: 0 0 var(--whois-inner-space); }
        #whois-results .info-row { gap: var(--whois-inner-space); padding: 11px 16px; }
        .whois-detail-list { display: block; }
        #whois-results .whois-detail-list .info-row { padding: 11px 16px; border: 0; border-top: 1px solid #eef2f7; border-radius: 0; }
        #whois-results .whois-detail-list .info-row:first-child { border-top: 0; }
        .whois-metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--whois-inner-space); padding: 0; }
        .whois-metric-card { position: relative; display: flex; align-items: flex-start; gap: 10px; min-width: 0; padding: 14px; border: 1px solid #e2e8f0; border-radius: 10px; background: #fff; }
        .metric-icon { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; flex: 0 0 32px; border-radius: 8px; background: var(--blue-soft); color: var(--blue); }
        .metric-icon svg.ic { width: 14px; height: 14px; }
        .metric-label { margin-bottom: 4px; color: #64748b; font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
        .metric-value { color: #0f172a; font-size: .9375rem; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
        .technical-value { font-family: var(--font-mono); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
        .metric-value a { color: var(--blue); text-decoration: none; }
        .metric-value a:hover { text-decoration: underline; }
        .metric-accent { color: var(--blue); }
        .metric-note { margin-top: 4px; color: #64748b; font-size: .75rem; line-height: 1.35; }
        .metric-copy { position: absolute; top: 10px; right: 10px; display: inline-flex; align-items: center; gap: 4px; min-height: 30px; padding: 4px 7px; border: 0; border-radius: 6px; background: transparent; color: #64748b; font-size: .75rem; font-weight: 600; }
        .metric-copy:hover { background: var(--blue-soft); color: var(--blue); }
        .metric-copy svg.ic { width: 13px; height: 13px; }
        .whois-hint { margin: 10px 0 0; color: #64748b; font-size: .8125rem; }
        .tool-idle-panel { margin: 0; padding: 0 16px 16px; color: #64748b; font-size: .8125rem; line-height: 1.4; }
        .tool-idle-panel[hidden], .tool-data-content[hidden] { display: none; }
        .empty-state-panel { margin-top: 16px; padding: 16px; border: 1px solid #e2e8f0; border-radius: 10px; color: #64748b; font-size: .8125rem; line-height: 1.4; }
        .empty-state-panel[hidden] { display: none; }
        .recent-searches { display: grid; gap: 8px; margin-top: 12px; }
        .recent-searches[hidden] { display: none; }
        .recent-search-heading { display: flex; align-items: center; justify-content: space-between; color: #64748b; font-size: .75rem; font-weight: 600; }
        .recent-search-clear { min-height: 32px; padding: 4px 8px; border: 0; border-radius: 6px; background: transparent; color: #64748b; font: inherit; }
        .recent-search-clear:hover { background: var(--blue-soft); color: var(--blue); }
        .recent-search-list { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
        .recent-search-chip { max-width: 150px; min-height: 36px; padding: 5px 10px; overflow: hidden; border: 1px solid #dbe3ef; border-radius: 999px; background: #f8fafc; color: #475569; font: 500 .75rem var(--font-mono); text-overflow: ellipsis; white-space: nowrap; }
        .recent-search-chip:hover { border-color: #93b4ff; background: var(--blue-soft); color: var(--blue); }
        .recent-search-chip.is-loading { opacity: .55; }
        .http-headers-results { display: grid; gap: 12px; margin-top: 16px; }
        .http-headers-results[hidden] { display: none; }
        .http-summary { display: grid; gap: 8px; padding: 16px; }
        .http-summary strong { color: #0f172a; font-size: 1rem; overflow-wrap: anywhere; }
        .http-status-badge { width: fit-content; padding: 3px 8px; border-radius: 6px; background: #dbeafe; color: #1d4ed8; font-size: .75rem; font-weight: 700; }
        .http-result-card { padding: 0; overflow: hidden; }
        .http-result-card .info-group-title { margin: 0; }
        .http-hop, .http-security-row { margin: 0; padding: 11px 16px; border-top: 1px solid #eef2f7; color: #475569; font-size: .8125rem; overflow-wrap: anywhere; }
        .http-security-row:first-of-type, .http-hop:first-of-type { border-top: 0; }
        .http-security-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
        .http-security-name { min-width: 0; overflow-wrap: anywhere; font-weight: 600; }
        .http-security-status { flex-shrink: 0; padding: 3px 8px; border-radius: var(--radius-sm); font-size: .75rem; white-space: nowrap; }
        .http-security-status.present { background: var(--status-success-bg); color: var(--status-success-text); }
        .http-security-status.missing { background: #f1f5f9; color: #475569; }
        .http-headers-results .details-section { margin-top: 0; padding-top: 0; border-top: 0; }
        .http-headers-results .raw-card { margin-top: 0; }
        .home-tool-disabled:hover { border-color: #e2e8f0; box-shadow: none; }
        .dns-resolver { min-height: 48px; padding: 0 36px 0 12px; border: 1px solid #d8dee8; border-radius: var(--radius-sm); background: #fff; color: #1e293b; font: inherit; }
        .dns-results { margin-top: 16px; }
        .dns-results[hidden], .dns-error[hidden] { display: none; }
        .dns-loading { display: grid; gap: 10px; }
        .dns-loading-card { display: grid; gap: 9px; min-height: 0; }
        .dns-loading-card .skeleton { width: 100%; min-height: 16px; border-radius: 4px; }
        .dns-loading-card .skeleton:nth-child(2) { width: 72%; }
        .dns-loading-card .skeleton:nth-child(3) { width: 46%; }
        .dns-summary { display: grid; gap: 8px; padding: 16px 20px; color: #64748b; }
        .dns-summary-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
        .dns-summary strong { color: #0f172a; font-size: 1.125rem; }
        .dns-summary-meta { font-size: .8125rem; }
        .dns-copy-all { margin-left: 4px; }
        .dns-summary-status { display: flex; align-items: center; gap: 6px; }
        .dns-found { margin-top: 0; border-color: #a7f3d0; background: #ecfdf5; color: #047857; }
        .dns-latency { margin-top: 0; }
        .dns-latency.fast { border-color: #a7f3d0; background: #ecfdf5; color: #047857; }
        .dns-latency.medium { border-color: #fde68a; background: #fffbeb; color: #92400e; }
         .dns-latency.slow { border-color: #fecaca; background: #fef2f2; color: #b91c1c; }

        .dns-record-groups { display: grid; gap: 12px; margin-top: 12px; }
        .dns-group { min-height: 0; padding: 0; overflow: hidden; }
        .dns-group-title { list-style: none; }
        .dns-group-title::-webkit-details-marker { display: none; }
        details.dns-group > .dns-group-title::after { content: '+'; color: #64748b; }
        details.dns-group[open] > .dns-group-title::after { content: '−'; }
        .dns-record-count { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 22px; padding: 0 7px; border-radius: 999px; background: #edf3ff; color: #0d3dcc; font-size: .75rem; }
        .dns-group-title .dns-copy { margin-left: auto; }
        .dns-record-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 16px; min-width: 0; padding: 14px 16px; border-top: 1px solid #eef2f7; }
        .dns-record-value { min-width: 0; }
        .dns-record-meta { display: flex; gap: 12px; color: #64748b; font-size: .75rem; white-space: nowrap; }
        .dns-copy { position: static; width: auto; min-width: 44px; min-height: 36px; padding: 4px 9px; border: 1px solid #bfdbfe; border-radius: 6px; color: var(--blue); font-size: .75rem; font-weight: 600; white-space: nowrap; }
        .dns-mobile-label { display: none; color: #64748b; font-size: .75rem; font-weight: 600; }
        .dns-empty { margin: 0; padding: 14px 16px; border-top: 1px solid #eef2f7; color: #64748b; font-size: .8125rem; }
        @media (max-width: 760px) { .dns-search { flex-direction: column; align-items: stretch; } .dns-resolver, .dns-search .lookup-btn { width: 100%; } .dns-summary-heading { align-items: flex-start; } .dns-record-row { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; } .dns-record-value { display: grid; gap: 4px; } .dns-mobile-label { display: block; } .dns-record-meta { grid-column: 1; flex-wrap: wrap; } .dns-record-row > .dns-copy { grid-column: 2; grid-row: 1 / span 2; align-self: center; } .dns-copy { min-height: 44px; } }
        .home-status-badge { display: inline-flex; width: fit-content; margin-top: 8px; padding: 2px 8px; border: 1px solid #fde68a; border-radius: 999px; background: #fffbeb; color: #92400e; font-size: 11px; font-weight: 600; }
        @media (min-width: 561px) { .home-tool-wide { grid-column: 1 / -1; } }
        @media (max-width: 560px) { .home-quick-ip { padding: 16px; } }
        .whois-value.idle { color: var(--text-muted) !important; font-weight: 500; font-style: italic; }
        .whois-summary { padding: 16px; }
        .whois-summary[hidden] { display: none; }
        .whois-summary:not([hidden]) + .info-group-card { margin-top: 4px; }
        .whois-summary-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
        .whois-summary-domain { color: var(--blue); font-size: 1.25rem; font-weight: 700; letter-spacing: -.02em; overflow-wrap: anywhere; }
        .whois-summary-pill { background: var(--status-success-bg); color: var(--status-success-text); }
        .whois-summary-head .row-copy { position: static; margin-left: auto; }
        .whois-summary-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; color: #475569; font-size: .875rem; }
        .whois-summary-meta strong { color: #0f172a; font-weight: 600; }
        .whois-summary-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 12px; padding-top: 12px; border-top: 1px solid #eef2f7; color: #64748b; font-size: .75rem; }
        .whois-copy-results { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 4px 10px; border: 0; border-radius: 6px; background: transparent; color: #64748b; font-size: .75rem; font-weight: 600; }
        .whois-copy-results:hover { background: var(--blue-soft); color: var(--blue); }
        .whois-copy-results svg.ic { width: 13px; height: 13px; }
        .whois-nameservers { padding-right: 56px; }
        .whois-nameservers .row-copy { position: absolute; top: 14px; right: 14px; }
        .whois-epp .whois-status-list.idle { font-style: italic; }
        .whois-status-list, .nameserver-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
        .status-pill { padding: 3px 8px; border-radius: 999px; background: #edf3ff; color: #0d3dcc; font-size: .75rem; font-weight: 600; }
        .whois-nameservers { grid-column: 1 / -1; }
        .nameserver-list { flex-direction: column; }
        .nameserver-list li { position: relative; padding-left: 14px; }
        .nameserver-list li::before { content: ''; position: absolute; left: 0; top: .55em; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); }
        @media (max-width: 900px) { .whois-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
        @media (max-width: 560px) { .whois-metric-grid { grid-template-columns: 1fr; } }
        @media (max-width: 760px) {
            .responsive-details > summary { font-size: 1rem; }
            .responsive-details[open] .details-toggle-label { font-size: 0; }
            .responsive-details[open] .details-toggle-label::after { content: 'Hide details'; font-size: .8125rem; }
        }
        .whois-error-alert { align-items: center; gap: 10px; margin: 12px 0 0; padding: 11px 13px; border: 1px solid #fecdd3; border-radius: 9px; background: #fff1f2; color: #9f1239; font-size: .875rem; line-height: 1.4; }
        .whois-error-alert:not([hidden]) { display: flex; }
        .whois-error-alert[hidden] { display: none; }
        .whois-error-icon { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; flex: 0 0 20px; border-radius: 50%; background: #be123c; color: #fff; font-size: .75rem; font-weight: 700; }
        #whois-results .info-value { white-space: pre-line; }
        .whois-raw { margin-top: 20px; }
        .raw-card { position: relative; }
        .raw-rdap {
            margin: 0; padding: 16px; max-height: 420px; overflow: auto;
            color: #1e293b; background: #f8fafc; font: .8125rem/1.5 var(--font-mono);
            white-space: pre-wrap; overflow-wrap: anywhere;
        }
        .ssl-results { --whois-card-padding: 16px; --whois-inner-space: 12px; display: grid; gap: 16px; margin-top: 16px; }
        .ssl-results[hidden] { display: none; }
        #ssl-results[aria-busy="true"] { opacity: .92; }
        #ssl-results[aria-busy="true"] .ssl-value.skeleton { width: min(100%, 240px); min-height: 1.3em; background-color: #cbd5e1 !important; border-radius: 5px; }
        #ssl-results .info-group-card { padding: var(--whois-card-padding); }
        #ssl-results .info-group-title { margin: 0 0 var(--whois-inner-space); padding: 0 0 var(--whois-inner-space); }
        .ssl-detail-list { display: grid; gap: var(--whois-inner-space); }
        #ssl-results .ssl-detail-list .info-row { gap: var(--whois-inner-space); padding: 11px 16px; border: 0; border-top: 1px solid #eef2f7; border-radius: 0; }
        #ssl-results .ssl-detail-list .info-row:first-child { border-top: 0; }
        .ssl-value.idle { color: var(--text-muted) !important; font-weight: 500; font-style: italic; }
        .ssl-summary-message { margin: 8px 0 0; color: var(--text-subtle); font-size: .875rem; line-height: 1.4; }
        .ssl-status-secure { background: var(--status-success-bg); color: var(--status-success-text); }
        .ssl-status-warning { background: #fff7ed; color: #9a3412; }
        .ssl-status-expired, .ssl-status-not_secure { background: #fff1f2; color: #9f1239; }
        .ssl-status-unknown { background: #f1f5f9; color: #475569; }
        .ssl-check-pass { color: #047857; }
        .ssl-check-fail { color: #9f1239; }
        .ssl-san-list { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
        .ssl-san-list li { overflow-wrap: anywhere; }
        .ssl-loading[hidden] { display: none; }

        /* LOOKUP RESULTS */
        .lookup-result {
            display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); margin-top: var(--space-4);
        }
        .lookup-result[hidden] { display: none; }
        .details-card h3, .map-card h3 {
            margin: 0 0 var(--space-2);
            font-family: var(--font-sans);
            font-size: 20px; font-weight: 700; line-height: 1.19; letter-spacing: 0.011em;
        }

        /* DETAIL ROW */
        .detail-row {
            display: grid; grid-template-columns: 150px 1fr;
            padding: 9px 0; border-top: 1px solid #f0f0f0;
            font-size: 15px; line-height: 1.47; letter-spacing: -0.022em;
        }
        .detail-row:first-of-type { border-top: 0; }
        .detail-key { color: #475569; font-weight: 500; font-size: 14px; }
        .detail-value { color: #1e293b; word-break: break-word; }
        .detail-value.na { color: #b6bcc8; font-style: italic; }

        /* MAP */
        .leaflet-map {
            width: 100%; height: 300px; border-radius: var(--radius-md); z-index: 1;
        }

        /* TOAST */
        .toast {
            position: fixed; right: 24px; bottom: 24px;
            padding: 11px 15px; border-radius: var(--radius-sm);
            background: #1f2937; color: #ffffff; font-size: 13px;
            opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(10px);
            transition: .2s ease; z-index: 1000; max-width: 80vw;
        }
        .toast.show { opacity: 1; visibility: visible; transform: translateY(0); }

        /* MOBILE */
        @media (max-width: 760px) {
            :root { --header-height: 64px; }
            .app-shell { display: block; }
            .main-area { flex: none; min-width: 0; display: block; }
            .top-header { left: 0 !important; width: 100% !important; height: 64px; padding: 0 16px; }
            .breadcrumb { font-size: 0.75rem; }
            .breadcrumb-current { font-size: 0.8125rem; }
            .breadcrumb-domain { font-size: 0.8125rem; }
            .main { margin-left: 0; padding: var(--header-height) 16px 90px; }
            .container { width: 100%; margin: 0; padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
            .app { border-radius: 0; border-left: 0; border-right: 0; }
            .app-header { padding: 20px; }
            .app-title { font-size: 1.375rem; letter-spacing: -0.02em; }
            .section-title { font-size: 1rem; letter-spacing: -0.02em; }
            .details-card h3, .map-card h3 { font-size: 1rem; letter-spacing: -0.02em; }
            .ip-value { font-size: clamp(1.75rem, 6vw, 2.2rem); }
            .breadcrumb-current { font-size: 0.8125rem; }
            .breadcrumb-domain { font-size: 0.8125rem; }
            .app-actions { gap: 5px; }
            .app-actions .btn:first-child { display: none; }
            .content { padding: 16px; }
            .hostname { font-size: 13px; }
            .grid { grid-template-columns: 1fr; }
            .info-row { grid-template-columns: 1fr; gap: 4px; }
            .info-row .info-label { margin-bottom: 0; }
            .info-card.full { grid-column: auto; }
            .lookup-form { flex-direction: column; gap: 16px; }
            .lookup-input { width: 100%; height: 58px; padding: 0 24px; border-radius: 12px; font-size: 18px; }
            .lookup-btn { height: 60px; border-radius: 12px; font-size: 18px; }
            .lookup-result { grid-template-columns: 1fr; }
            .detail-row { grid-template-columns: 115px 1fr; font-size: 14px; }
            .leaflet-map { height: 260px; }
            .toast { right: 16px; bottom: 80px; }
        }

        /* DUOTONE ICONS (Streamline Flex Duo) */
        svg.ic { vertical-align: middle; flex-shrink: 0; }
         .app-actions .btn svg.ic { width: 14px; height: 14px; }
        .hero-copy svg.ic, .user-agent-copy svg.ic { width: 14px; height: 14px; }
        .info-label svg.ic, .info-group-title svg.ic, .section-title svg.ic { width: 14px; height: 14px; }
        .status-item svg.ic { width: 12px; height: 12px; }
        .app-title-icon svg.ic { width: 20px; height: 20px; }

/* ==========================================================================
   IP LOOKUP PAGE — Refactor Styles
   ========================================================================== */

/* Search Group - Unified Input + Button */
.search-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    position: relative;
}

.lookup-input-wrap { position: relative; flex: 1; min-width: 0; }

.search-group .lookup-input {
    width: 100%;
    flex: 1;
    min-width: 0;
    height: 48px;
    padding: 0 52px 0 14px;
    border: 1px solid #d8dee8;
    border-radius: 9px;
    background: #ffffff;
    color: #1e293b;
    font-size: 14px;
    font-family: var(--font-sans);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search-group .lookup-input:focus {
    outline: none;
    border-color: #9ab4ff;
    box-shadow: 0 0 0 3px rgba(20, 86, 255, 0.08);
}

.search-group .lookup-btn {
    min-width: 120px;
    border: 0;
    border-radius: 9px;
    height: 48px;
    background: #1456ff;
    color: #ffffff;
    font-weight: 600;
    font-size: 14px;
    font-family: var(--font-sans);
    letter-spacing: -0.01em;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
    white-space: nowrap;
}

.search-group .lookup-btn:hover {
    background: #1248d6;
    transform: translateY(-1px);
}

.search-group .lookup-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}

.search-group .lookup-btn:active {
    transform: translateY(0);
}

.search-group .lookup-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Auto-detected Badge */
.auto-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    color: #047857;
    background: #d1fae5;
    padding: 4px 10px;
    border-radius: 999px;
    margin-top: 4px;
    margin-bottom: 16px;
    font-family: var(--font-sans);
    letter-spacing: -0.01em;
}

.auto-badge .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    flex-shrink: 0;
}

.auto-badge[hidden] {
    display: none;
}

/* Sub-description under Page Title */
.sub-desc {
    margin: 0 0 20px;
    color: #64748b;
    font-size: 0.875rem; /* 14px */
    font-weight: 400;
    font-family: var(--font-sans);
    line-height: 1.5;
    letter-spacing: -0.01em;
}

/* Content Title */
.content h1 {
    font-family: var(--font-sans);
    font-size: 1.5rem; /* 24px */
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: #0f172a;
    margin: 0 0 8px;
}

/* Responsive Breakpoints */
@media (max-width: 768px) {
    .leaflet-map {
        min-height: 320px;
        height: 320px;
    }
}

@media (max-width: 480px) {
    .search-group {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .search-group .lookup-input,
    .search-group .lookup-btn {
        width: 100%;
        border-radius: 12px;
    }
    
    .search-group .lookup-input {
        height: 56px;
        padding: 0 52px 0 20px;
        font-size: 16px; /* Prevent zoom on iOS */
    }

    .search-group .lookup-clear { right: 10px; top: 50%; }
    
    .search-group .lookup-btn {
        height: 44px;
        font-size: 15px;
    }
}

/* Leaflet Map Container Fixes */
.leaflet-map,
#leaflet-map {
    flex: 1;
    min-height: 320px;
    height: 320px;
    width: 100%;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    display: block;
}

/* Custom Leaflet Popup Styles */
.leaflet-popup-content-wrapper {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 0;
    overflow: hidden;
}

.leaflet-popup-content {
    margin: 12px;
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    line-height: 1.5;
    color: #0f172a;
}

.leaflet-popup-tip {
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

/* Map Marker Color */
.leaflet-marker-icon {
    filter: none;
}
