:root {
    --bg: #f8f8f9;
    --surface: #ffffff;
    --surface-muted: #f4f4f5;
    --border: #ececee;
    --border-strong: #dcdce0;
    --text: #18181b;
    --text-muted: #52525b;
    --text-faint: #8a8a93;
    --accent: #18181b;
    --accent-hover: #27272a;
    --accent-contrast: #fafafa;
    --success: #16794a;
    --warning: #a56d1b;
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 10px;
    --radius-full: 9999px;
    --shadow-soft: 0 1px 2px rgba(24, 24, 27, .05);
    --shadow-raised: 0 16px 36px -24px rgba(24, 24, 27, .32);
    --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-7: 32px;
    --space-8: 48px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

button, a { -webkit-tap-highlight-color: transparent; }

a { color: inherit; }

.site-header,
main,
footer {
    width: min(100% - 48px, 1040px);
    margin-inline: auto;
}

.site-header {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    color: var(--text);
    font-size: 14px;
    font-weight: 650;
    text-decoration: none;
    letter-spacing: -.01em;
}

.brand-mark {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: var(--radius-md);
    background: var(--accent);
    color: var(--accent-contrast);
}

.brand-mark svg { width: 17px; }

svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.privacy-note {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--text-muted);
    font-size: 13px;
}

.privacy-note svg { width: 16px; }

.hero {
    max-width: 760px;
    padding: 88px 0 64px;
}

.eyebrow,
.section-label {
    margin: 0 0 var(--space-3);
    color: var(--text-faint);
    font-size: 12px;
    font-weight: 650;
    letter-spacing: .08em;
    text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }

h1 {
    margin-bottom: var(--space-4);
    font-size: clamp(34px, 6vw, 52px);
    line-height: 1.06;
    font-weight: 650;
    letter-spacing: -.045em;
}

.intro {
    max-width: 660px;
    margin-bottom: var(--space-7);
    color: var(--text-muted);
    font-size: 17px;
}

.address-card {
    padding: var(--space-6);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}

.address-heading {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
    color: var(--text-muted);
    font-size: 13px;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: var(--radius-full);
    background: var(--success);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 12%, transparent);
}

.address-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-5);
}

.address {
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--text);
    font-family: var(--font-mono);
    font-size: clamp(26px, 5vw, 40px);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -.035em;
}

.copy-button {
    min-width: 88px;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: 0 var(--space-4);
    border: 0;
    border-radius: var(--radius-md);
    background: var(--accent);
    color: var(--accent-contrast);
    font: 600 13px/1 var(--font-sans);
    cursor: pointer;
    transition: background .16s ease, transform .16s ease;
}

.copy-button:hover { background: var(--accent-hover); }
.copy-button:active { transform: translateY(1px); }
.copy-button svg { width: 16px; }
.copy-button:disabled { cursor: wait; opacity: .48; }

.copy-button:focus-visible,
.refresh-link:focus-visible,
.brand:focus-visible {
    outline: 2px solid var(--text);
    outline-offset: 3px;
}

.address-caption {
    margin: var(--space-4) 0 0;
    padding-top: var(--space-4);
    border-top: 1px solid var(--border);
    color: var(--text-faint);
    font-size: 12px;
}

.section {
    padding: 64px 0;
    border-top: 1px solid var(--border);
}

.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--space-5);
    margin-bottom: var(--space-7);
}

.section-heading .section-label { margin-bottom: var(--space-2); }

h2 {
    margin-bottom: 0;
    font-size: clamp(24px, 4vw, 30px);
    line-height: 1.2;
    font-weight: 650;
    letter-spacing: -.03em;
}

h3 {
    margin-bottom: var(--space-2);
    font-size: 14px;
    font-weight: 650;
    letter-spacing: -.01em;
}

.refresh-link {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    text-underline-offset: 3px;
}

.fact-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-4);
}

.fact-card {
    min-height: 192px;
    padding: var(--space-5);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}

.fact-placeholder .skeleton:first-child { margin-bottom: var(--space-6); }

.error-state {
    grid-column: 1 / -1;
    padding: var(--space-6);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
}

.error-state p { margin: var(--space-2) 0 var(--space-4); color: var(--text-muted); font-size: 13px; }
.error-state a { font-size: 13px; font-weight: 650; text-underline-offset: 3px; }

.fact-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
}

.info-icon {
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-full);
    color: var(--text-faint);
    font-family: Georgia, serif;
    font-size: 12px;
    font-weight: 700;
}

.fact-value {
    margin: var(--space-5) 0 var(--space-3);
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 18px;
    font-weight: 600;
}

.fact-explanation {
    margin-bottom: 0;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.55;
}

.notice {
    display: flex;
    gap: var(--space-3);
    margin-top: var(--space-4);
    padding: var(--space-4);
    border: 1px solid color-mix(in srgb, var(--warning) 28%, var(--border));
    border-radius: var(--radius-md);
    background: color-mix(in srgb, var(--warning) 7%, var(--surface));
}

.notice svg { width: 18px; flex: 0 0 auto; color: var(--warning); }
.notice strong { font-size: 13px; }
.notice p { margin: var(--space-1) 0 0; color: var(--text-muted); font-size: 13px; }

.local-badge {
    margin: 0;
    padding: 5px 9px;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    background: var(--surface);
    color: var(--text-muted);
    font-size: 12px;
}

.browser-list {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.browser-row {
    display: grid;
    grid-template-columns: 150px minmax(130px, 1fr) 2fr;
    gap: var(--space-5);
    padding: var(--space-5);
    align-items: start;
}

.browser-row + .browser-row { border-top: 1px solid var(--border); }
.browser-label { font-size: 13px; font-weight: 650; }
.browser-value { color: var(--text); font-family: var(--font-mono); font-size: 13px; overflow-wrap: anywhere; }
.browser-explanation { margin: 0; color: var(--text-muted); font-size: 13px; }

.browser-loading { padding: var(--space-5); }
.browser-loading + .browser-loading { border-top: 1px solid var(--border); }
.skeleton { display: block; width: 62%; height: 13px; border-radius: var(--radius-sm); background: var(--surface-muted); }
.skeleton-short { width: 22%; margin-bottom: var(--space-3); }

.explanation > h2 { max-width: 560px; margin-bottom: var(--space-7); }

.explanation-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-7) var(--space-8);
}

.explanation-grid p {
    margin: 0;
    color: var(--text-muted);
    font-size: 14px;
}

.faq > h2 { max-width: 620px; margin-bottom: var(--space-7); }

.faq-list {
    border-top: 1px solid var(--border);
}

.faq-list details {
    border-bottom: 1px solid var(--border);
}

.faq-list summary {
    min-height: 62px;
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-4) 0;
    cursor: pointer;
    color: var(--text);
    font-size: 15px;
    font-weight: 650;
    list-style: none;
}

.faq-list summary::-webkit-details-marker { display: none; }

.faq-list summary::after {
    content: '+';
    margin-left: auto;
    color: var(--text-faint);
    font-size: 20px;
    font-weight: 400;
}

.faq-list details[open] summary::after { content: '−'; }

.faq-list details p {
    max-width: 720px;
    margin: -2px 40px var(--space-5) 0;
    color: var(--text-muted);
    font-size: 14px;
}

.faq-list summary:focus-visible { outline: 2px solid var(--text); outline-offset: -2px; }

.noscript-message {
    margin: var(--space-4) 0 0;
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    background: var(--surface);
    color: var(--text-muted);
    font-size: 13px;
}

footer {
    display: flex;
    justify-content: space-between;
    gap: var(--space-5);
    padding: var(--space-7) 0 var(--space-8);
    border-top: 1px solid var(--border);
    color: var(--text-faint);
    font-size: 12px;
}

footer p { margin: 0; }

.toast {
    position: fixed;
    left: 50%;
    bottom: var(--space-6);
    z-index: 20;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    background: var(--accent);
    color: var(--accent-contrast);
    box-shadow: var(--shadow-raised);
    font-size: 13px;
    font-weight: 600;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 8px);
    transition: opacity .16s ease, transform .16s ease;
}

.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 720px) {
    .site-header, main, footer { width: min(100% - 32px, 1040px); }
    .hero { padding: 64px 0 48px; }
    .section { padding: 48px 0; }
    .fact-grid, .explanation-grid { grid-template-columns: 1fr; }
    .browser-row { grid-template-columns: 1fr; gap: var(--space-2); }
    .browser-explanation { padding-top: var(--space-2); }
    footer { flex-direction: column; gap: var(--space-2); }
}

@media (max-width: 520px) {
    .privacy-note span { display: none; }
    .privacy-note { font-size: 0; }
    .privacy-note::after { content: "Private"; font-size: 13px; }
    .address-row { align-items: stretch; flex-direction: column; }
    .copy-button { align-self: flex-start; }
    .section-heading { align-items: flex-start; flex-direction: column; }
    .fact-card { min-height: 0; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: .01ms !important; }
}
