:root {
    color-scheme: light dark;
    --bg: #f6f7f5; --surface: #fff; --text: #1e2925; --muted: #65736d;
    --line: #e3e8e3; --accent: #17694e; --soft: #eaf4ee; --hero: #f0f7f2; --hero-warning: #f7f6f0; --warning-accent: #826719;
    --focus: #278768; --shadow: 0 4px 24px #1d332507;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.6; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
button, summary, a { touch-action: manipulation; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; border-radius: 4px; }
[hidden] { display: none !important; }
.shell { width: min(1080px, calc(100% - 64px)); margin: 0 auto; }
.site-header { display: flex; align-items: center; justify-content: space-between; padding: 30px 0; border-bottom: 1px solid var(--line); gap: 16px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 650; letter-spacing: .06em; font-size: 14px; }
.brand-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--accent); color: #fff; font-size: 18px; letter-spacing: -.07em; font-weight: 700; }
.brand-divider { color: var(--muted); margin: 0 5px; font-weight: 400; }
.page-main { padding-bottom: 28px; }
.protocol-address { color: var(--accent); font-size: clamp(20px, 3vw, 28px); line-height: 1.4; overflow-wrap: anywhere; margin: 8px 0 10px; }
.protocol-formats { margin-top: 16px; border-top: 1px solid var(--line); }
.protocol-formats summary { padding: 12px 0; font-size: 12px; }
.protocol-formats .technical-list .detail-row { grid-template-columns: minmax(0, 1fr); gap: 3px; }
.header-note { color: var(--muted); display: flex; align-items: center; gap: 8px; font-size: 12px; }
.status-dot, .mini-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); display: inline-block; flex-shrink: 0; }
.intro { padding: 48px 0 29px; }
.eyebrow { font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .12em; color: var(--accent); margin: 0 0 10px; }
h1 { font-size: clamp(26px, 4vw, 38px); line-height: 1.2; letter-spacing: -.04em; font-weight: 600; margin: 0 0 11px; }
.intro > p:last-child { margin: 0; color: var(--muted); font-size: 15px; }
.ip-card { padding: 25px 30px 0; background: var(--hero); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.ip-card-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.ip-card h2 { font-size: 13px; font-weight: 500; margin: 0; color: var(--muted); }
.pill { color: var(--accent); background: var(--soft); border: 1px solid var(--line); font-size: 11px; border-radius: 6px; padding: 3px 9px; font-weight: 650; }
.ip-line { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 14px 0 24px; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; }
.ip-address { font-size: clamp(25px, 4.5vw, 48px); line-height: 1.3; letter-spacing: -.055em; font-weight: 500; margin: 0; min-width: 0; overflow-wrap: anywhere; color: var(--accent); }
.ip-address.ipv6 { font-size: clamp(24px, 3.4vw, 36px); }
.copy-button { display: inline-flex; align-items: center; gap: 9px; color: var(--accent); background: var(--surface); border: 1px solid var(--line); border-radius: 9px; font-weight: 600; font-size: 12px; padding: 11px 15px; cursor: pointer; flex-shrink: 0; }
.copy-button svg { width: 15px; height: 15px; stroke: currentColor; stroke-width: 1.6; }
.copy-button:hover { background: var(--soft); border-color: var(--accent); }
.ip-note { font-size: 12px; color: var(--muted); margin: 0 0 24px; }
.quick-facts { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); padding: 18px 0 21px; }
.quick-facts > div { display: flex; flex-direction: column; padding-left: 26px; border-left: 1px solid var(--line); gap: 3px; }
.quick-facts > div:first-child { border-left: 0; padding-left: 0; }
.quick-facts > div > span { color: var(--muted); font-size: 11px; }
.quick-facts strong { font-size: 14px; font-weight: 600; }
.mini-dot { margin-left: 8px; vertical-align: middle; }
.insecure { background: #ad783c; }
.section-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 31px 0 15px; }
.section-bar h2 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -.015em; }
.actions { display: flex; align-items: center; gap: 20px; }
.text-button { color: var(--muted); background: none; border: 0; padding: 7px 0; font-size: 12px; cursor: pointer; white-space: nowrap; }
.text-button span { margin-left: 4px; }
.text-button:hover { color: var(--accent); }
.card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.card { padding: 22px 24px 19px; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; }
.card-heading { display: flex; align-items: center; gap: 9px; margin-bottom: 16px; }
.section-number { font-size: 10px; color: var(--muted); font-family: ui-monospace, Consolas, monospace; border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; }
.card h3 { font-size: 14px; font-weight: 600; margin: 0; letter-spacing: -.01em; }
.source-tag { font-size: 10px; color: var(--muted); margin-left: auto; }
dl { margin: 0; }
.detail-row { display: grid; grid-template-columns: minmax(125px, .85fr) minmax(0, 1fr); gap: 16px; border-bottom: 1px solid var(--line); padding: 10px 0; align-items: baseline; font-size: 12px; }
.detail-row:last-child { border-bottom: 0; }
dt { color: var(--muted); }
dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.card-note { margin: 13px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.disclosure { margin-top: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
summary { display: flex; align-items: center; gap: 16px; padding: 18px 24px; cursor: pointer; list-style: none; font-size: 13px; font-weight: 550; }
summary::-webkit-details-marker { display: none; }
.summary-note { font-size: 11px; color: var(--muted); font-weight: 400; margin-left: auto; }
.chevron { color: var(--muted); font-size: 18px; font-weight: 400; line-height: 1; margin-left: auto; }
.summary-note + .chevron { margin-left: 4px; }
details[open] > summary { border-bottom: 1px solid var(--line); }
details[open] > summary .chevron { transform: rotate(45deg); }
.disclosure-body { padding: 23px 24px; }
.disclosure-body h3 { font-size: 13px; font-weight: 600; margin: 0 0 8px; }
.disclosure-body section + section { margin-top: 28px; }
.technical-list .detail-row { grid-template-columns: 200px minmax(0, 1fr); }
.technical-list dd { text-align: left; }
.about { background: transparent; }
.about-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.about p { color: var(--muted); font-size: 12px; margin: 0 0 10px; }
.about p:last-child { margin-bottom: 0; }
.noscript-note { color: var(--muted); font-size: 12px; }
.action-status { min-height: 22px; margin: 12px 0; color: var(--accent); font-size: 12px; }
.clipboard-fallback { position: fixed; left: 0; top: 0; width: 1px; height: 1px; opacity: 0; }
footer { display: flex; justify-content: space-between; gap: 15px; padding: 24px 0 32px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.footer-separator { margin: 0 6px; }
.skip-link { position: absolute; top: -100px; left: 20px; padding: 8px 14px; background: var(--surface); color: var(--accent); z-index: 2; }
.skip-link:focus { top: 15px; }
.port-page { padding-bottom: 36px; }
.port-target { padding-bottom: 1px; }
.port-form { margin: 20px 0; padding: 24px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.port-controls { display: flex; align-items: end; flex-wrap: wrap; gap: 14px; }
.port-field { display: flex; flex-direction: column; gap: 6px; flex: 1 1 200px; }
.port-field > span { color: var(--muted); font-size: 12px; }
.port-field input, .port-field select { width: 100%; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 11px 12px; min-height: 46px; }
.primary-button { border: 1px solid var(--accent); background: var(--accent); color: var(--surface); border-radius: 8px; padding: 11px 22px; min-height: 46px; font: inherit; font-weight: 600; cursor: pointer; }
.primary-button:hover { filter: brightness(.93); }
button:disabled, select:disabled, input:disabled { opacity: .55; cursor: default; }
.port-controls .copy-button { min-height: 46px; }
.port-help { margin: 12px 0 0; color: var(--muted); font-size: 12px; }
.port-status { min-height: 24px; margin: 16px 0 8px; color: var(--muted); font-size: 13px; }
.port-status[data-error="true"] { color: #b74436; }
.port-progress { display: block; width: 100%; height: 6px; border: 0; border-radius: 6px; overflow: hidden; accent-color: var(--accent); }
.port-progress::-webkit-progress-bar { background: var(--line); }
.port-progress::-webkit-progress-value { background: var(--accent); }
.port-progress::-moz-progress-bar { background: var(--accent); }
.port-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.port-summary > div { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 14px 18px; }
.port-summary strong { font-size: 24px; font-weight: 600; display: block; }
.port-summary span { font-size: 11px; color: var(--muted); }
.port-grid-panel { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 24px; }
.port-grid { width: min(100%, 704px); aspect-ratio: 1; margin: 0 auto; display: grid; grid-template-rows: repeat(32, minmax(0, 1fr)); gap: 3px; }
.port-grid-row { display: grid; grid-template-columns: repeat(32, minmax(0, 1fr)); gap: 3px; min-height: 0; }
.port-cell { min-width: 0; min-height: 0; padding: 0; background: transparent; border: 1px solid var(--line); border-radius: 2px; cursor: pointer; }
.port-cell:focus-visible { outline: 2px solid var(--text); outline-offset: 1px; z-index: 1; }
.port-cell:hover { outline: 1px solid var(--text); outline-offset: 0; }
.port-cell.open, .port-swatch.open { background: #e3564f; border-color: #e3564f; }
.port-cell.closed, .port-cell.icmp, .port-swatch.closed, .port-swatch.icmp { background: #eec23d; border-color: #eec23d; }
.port-cell.no_response, .port-cell.unknown, .port-swatch.no_response { background: #39ad69; border-color: #39ad69; }
.port-cell-detail { margin: 20px 0 0; font-size: 12px; min-height: 20px; color: var(--muted); text-align: center; }
.port-swatch { width: 11px; height: 11px; display: inline-block; border: 1px solid var(--line); border-radius: 2px; margin-right: 7px; vertical-align: -1px; }
.port-key { color: var(--muted); font-size: 11px; margin: 17px 0; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.port-key strong { color: var(--text); font-weight: 550; }
@media (prefers-color-scheme: dark) {
    :root { --bg: #121917; --surface: #19221e; --text: #e2ebe5; --muted: #9daea4; --line: #2d3a32; --accent: #8cd7b3; --soft: #233b2f; --hero: #1b2c23; --hero-warning: #2c291b; --warning-accent: #d9c77b; --focus: #8cd7b3; --shadow: none; }
    .brand-icon { color: #15241c; }
    .port-status[data-error="true"] { color: #ffa89c; }
}
@media (max-width: 720px) {
    .shell { width: calc(100% - 36px); }
    .site-header { padding: 20px 0; }
    .intro { padding: 32px 0 23px; }
    .card-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .ip-card { padding: 20px 21px 0; }
    .ip-line { gap: 12px; flex-wrap: wrap; margin-top: 17px; }
    .ip-address { width: 100%; font-size: clamp(24px, 6.2vw, 39px); }
    .copy-button { padding: 8px 12px; }
    .ip-note { margin-top: 13px; margin-bottom: 20px; }
    .quick-facts > div { padding-left: 16px; }
    .quick-facts strong { font-size: 12px; }
    .section-bar { margin-top: 25px; gap: 8px; }
    .actions { gap: 14px; }
    .section-bar h2 { font-size: 14px; }
    .text-button { font-size: 11px; }
    .card { padding: 21px; }
    summary { padding: 17px 21px; gap: 10px; }
    .summary-note { display: none; }
    .disclosure-body { padding: 21px; }
    .technical-list .detail-row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
    .about-grid { grid-template-columns: minmax(0, 1fr); gap: 23px; }
    footer { flex-direction: column; gap: 5px; padding-top: 20px; }
    .port-form { padding: 21px; }
    .port-summary { gap: 8px; }
    .port-summary > div { padding: 11px 10px; }
    .port-summary strong { font-size: 21px; }
    .port-grid-panel { padding: 16px; }
    .port-grid, .port-grid-row { gap: 2px; }
    .port-cell { border-radius: 1px; }
}
@media (max-width: 380px) {
    .header-note { font-size: 10px; gap: 5px; }
    .detail-row { grid-template-columns: minmax(110px, .85fr) minmax(0, 1fr); gap: 10px; }
    .quick-facts > div { padding-left: 10px; }
}

.ip-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.family-card { --family-accent: var(--accent); min-width: 0; padding: 24px 26px 0; background: var(--surface); }
.family-card[data-state="available"] { background: var(--hero); }
.family-card[data-state="unavailable"] { --family-accent: var(--warning-accent); background: var(--hero-warning); }
.family-card .pill { color: var(--family-accent); background: transparent; }
.family-card h2 { font-weight: 600; }
.family-ip-line { align-items: flex-start; gap: 14px; margin: 22px 0; flex-wrap: wrap; }
.ip-identity { flex: 1 1 280px; min-width: 0; }
.family-card .ip-address { font-size: clamp(28px, 3.25vw, 38px); color: var(--family-accent); width: auto; }
.family-card .ip-address.ipv6 { font-size: clamp(23px, 2.5vw, 29px); letter-spacing: -.045em; }
.ip-reverse { display: flex; gap: 8px; margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.ip-reverse > span:first-child { font-size: 10px; padding-top: 2px; }
.ip-reverse .mono { overflow-wrap: anywhere; min-width: 0; }
.family-hints { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 16px 0 21px; }
.family-hints > div { min-width: 0; padding-left: 14px; }
.family-hints strong { font-size: 13px; overflow-wrap: anywhere; }
.family-card .protocol-formats { margin-top: 0; }
.family-card .protocol-formats summary { color: var(--muted); padding: 15px 0; }
.family-card .technical-list dd { overflow-wrap: anywhere; }
@media (max-width: 860px) { .ip-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; } }
@media (max-width: 720px) { .family-card { padding: 20px 21px 0; } .family-ip-line { margin: 18px 0; } }

.family-actions { display: flex; align-items: center; gap: 10px; margin: -8px 0 20px; }
.port-panel { scroll-margin-top: 20px; margin-top: 24px; }
.port-panel-heading { display: flex; justify-content: flex-end; margin-bottom: 8px; }
.browser-group .card-grid { margin-top: 0; }
.browser-group .disclosure-body section + section { margin-top: 0; }
.browser-group .disclosure .disclosure-body section + section { margin-top: 28px; }

.port-swatch.mixed { background: linear-gradient(135deg, #e3564f, #eec23d, #39ad69); }
@media (max-width: 480px) { .port-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.port-checkbox { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; font-size: 12px; color: var(--muted); cursor: pointer; }
.port-checkbox input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }

.site-header { flex-wrap: wrap; }
.tool-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tool-nav .copy-button { padding: 8px 11px; font-size: 14px; }
.tool-nav a[aria-current="page"] { background: var(--soft); border-color: var(--accent); }