:root {
    font-family: "Segoe UI", system-ui, sans-serif;
    color: #172b46;
    background: #f3f6fb;
    font-synthesis: none;
    --blue: #2864d7;
    --border: #dce4ef;
    --muted: #596c83;
}
* { box-sizing: border-box; }
body { margin: 0; }
main { max-width: 1280px; margin: auto; padding: 44px 32px 24px; }
header, .section-heading, .actions, .legend { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
header { margin-bottom: 30px; flex-wrap: wrap; }
.eyebrow { color: var(--blue); font-size: 11px; font-weight: 700; letter-spacing: 2px; margin: 0 0 10px; }
h1 { margin: 0; font-size: clamp(28px, 4vw, 38px); letter-spacing: -1.2px; }
.subtitle { margin: 10px 0 0; color: var(--muted); }
.privacy { background: #e7f3ed; color: #26714f; padding: 8px 12px; border-radius: 20px; font-size: 12px; }
.panel { background: white; border: 1px solid var(--border); border-radius: 12px; padding: 24px; margin-bottom: 22px; box-shadow: 0 3px 12px #203d6710; }
h2 { color: var(--blue); font-size: 13px; font-weight: 600; margin: 0; }
h2 span { color: #172b46; font-size: 17px; margin-left: 12px; }
.section-heading { margin-bottom: 22px; flex-wrap: wrap; }
.actions { gap: 8px; }
button { font: inherit; font-size: 12px; font-weight: 600; color: #315078; background: white; border: 1px solid var(--border); border-radius: 6px; padding: 8px 12px; cursor: pointer; }
button:hover { background: #edf3ff; border-color: #9ab8ed; }
#example { color: var(--blue); background: #f0f5ff; }
.input-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 24px; }
label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 10px; }
textarea, input { width: 100%; padding: 12px; border: 1px solid #cbd6e5; border-radius: 7px; color: #233d60; background: #fbfcfe; font: 13px/1.65 Consolas, monospace; }
textarea { display: block; resize: vertical; min-height: 100px; }
#source { min-height: 250px; }
#extracted { background: #f1f5fb; }
input { height: 43px; }
textarea::placeholder, input::placeholder { color: #708198; opacity: 1; }
:focus-visible { outline: 3px solid #91b9ff; outline-offset: 2px; }
.hint { color: var(--muted); font-size: 12px; line-height: 1.6; margin: 10px 0 14px; }
.optional { font-weight: 400; color: var(--muted); }
.badge { display: inline-block; font-size: 11px; padding: 1px 7px; margin-left: 5px; background: #dfeaff; color: var(--blue); border-radius: 10px; }
#messages:empty { display: none; }
#messages { margin-top: 16px; border-left: 3px solid #cf8b25; background: #fff8e9; padding: 10px 14px; color: #785317; font-size: 13px; overflow-wrap: anywhere; max-height: 220px; overflow-y: auto; }
#messages p { margin: 5px 0; }
.empty { text-align: center; max-width: 520px; padding: 40px 10px 55px; margin: auto; color: var(--muted); }
.empty-icon { color: #8ca9d6; font: 26px Consolas, monospace; margin-bottom: 16px; }
.empty h2 { font-size: 20px; color: #324c6f; }
.empty p { font-size: 14px; line-height: 1.8; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.stat { padding: 20px; background: white; border: 1px solid var(--border); border-radius: 10px; }
.stat > span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.stat strong { font-size: clamp(16px, 2vw, 24px); font-weight: 650; overflow-wrap: anywhere; }
.stat:last-child strong { color: #268064; }
small { font-size: inherit; }
.mono { font-family: Consolas, monospace; }
.legend { justify-content: flex-start; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; gap: 6px; align-items: center; }
.legend i { width: 10px; height: 10px; display: inline-block; border-radius: 2px; }
.used-key, .map-used { background: var(--blue); }
.free-key, .map-free { background: repeating-linear-gradient(135deg, #e5eeeb, #e5eeeb 5px, #f3f8f6 5px, #f3f8f6 10px); }
.parent-network { border: 2px solid #315078; border-radius: 8px; padding: 8px; background: #f1f5fb; }
.parent-network h3 { margin: 4px 6px 12px; font-size: 14px; overflow-wrap: anywhere; }
.address-map { position: relative; aspect-ratio: 2 / 1; background: #e5eeeb; }
.map-block { position: absolute; overflow: hidden; box-shadow: inset 0 0 0 1px white; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: 5px; font-size: 12px; }
.map-used { color: white; }
.map-free { color: #24674e; }
.map-label { max-width: 100%; padding: 0 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex-shrink: 0; }
.map-block small { max-width: 100%; white-space: nowrap; font-size: 11px; }
.map-overlap { box-shadow: inset 0 0 0 2px #cf8b25; }
.map-block:hover, .map-block:focus-visible { z-index: 1; outline: 2px solid #172b46; outline-offset: -2px; }
.table-scroll { overflow-x: auto; margin-top: 18px; }
table { border-collapse: collapse; width: 100%; font-size: 12px; white-space: nowrap; text-align: left; }
th { color: var(--muted); background: #f6f8fc; font-weight: 600; padding: 12px; }
td { padding: 13px 12px; border-bottom: 1px solid #edf1f7; font-family: Consolas, monospace; }
.status { font: 11px "Segoe UI", sans-serif; display: inline-block; border-radius: 4px; padding: 4px 7px; color: #2256ac; background: #eaf1ff; }
.status.free { background: #e8f4ee; color: #24674e; }
.status.overlap { background: #fff0d7; color: #83550b; }
footer { color: var(--muted); text-align: center; font-size: 11px; padding: 14px 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }
@media (max-width: 760px) {
    main { padding: 24px 16px; }
    .panel { padding: 18px; }
    .input-grid { grid-template-columns: 1fr; gap: 12px; }
    .stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .stat { padding: 14px; }
    .address-map { aspect-ratio: 1; }
    .map-block { font-size: 10px; gap: 2px; }
    .map-block small { font-size: 9px; }
}
