* {
    box-sizing: border-box;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --ink: #172033;
    --muted: #64748b;
    --line: #dbe3ef;
    --surface: #ffffff;
    --soft: #f8fafc;
    --blue-soft: #eff6ff;
    --green: #15803d;
    --green-soft: #ecfdf3;
    --shadow: 0 18px 45px rgba(30, 41, 59, 0.08);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--soft);
    color: var(--ink);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
}

a {
    color: inherit;
}

.topbar {
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--line);
}

.topbar-inner,
.page-shell {
    width: min(1120px, calc(100% - 2rem));
    margin: 0 auto;
}

.topbar-inner {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand,
.back-link,
.domain-link,
.copy-button {
    display: inline-flex;
    align-items: center;
}

.brand {
    gap: .7rem;
    color: var(--ink);
    font-weight: 700;
    text-decoration: none;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: #fff;
    background: var(--primary);
}

img.brand-mark {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    display: block;
    object-fit: contain;
    background: transparent;
    border-radius: 0;
}

.back-link {
    gap: .45rem;
    color: var(--primary-dark);
    font-size: .9rem;
    font-weight: 600;
    text-decoration: none;
}

.page-shell {
    padding: 1.35rem 0 4rem;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
    margin-bottom: 1rem;
    color: var(--muted);
    font-size: .85rem;
}

.breadcrumb a {
    color: var(--primary-dark);
    text-decoration: none;
}

.hero {
    padding: clamp(1.6rem, 4vw, 3rem);
    border: 1px solid #cfe0f5;
    border-radius: 8px;
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 58%, #f0fdf4 100%);
    box-shadow: var(--shadow);
}

.eyebrow {
    margin: 0 0 .45rem;
    color: var(--primary-dark);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

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

h1 {
    max-width: 760px;
    margin-bottom: .75rem;
    font-size: clamp(2rem, 5vw, 3.25rem);
    line-height: 1.15;
}

.hero-copy {
    max-width: 780px;
    margin-bottom: 1.25rem;
    color: #526581;
    font-size: 1.05rem;
}

.hero-meta,
.domain-meta,
.summary-grid,
.service-facts,
.two-column {
    display: grid;
}

.hero-meta {
    grid-template-columns: repeat(auto-fit, minmax(160px, max-content));
    gap: .65rem;
}

.signal,
.domain-kind {
    width: fit-content;
    padding: .32rem .65rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .86);
    border: 1px solid #cfe0f5;
    color: #315276;
    font-size: .82rem;
}

.signal-live {
    color: var(--green);
    border-color: #b7e4c7;
    background: var(--green-soft);
}

.summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .8rem;
    margin: 1rem 0;
}

.summary-item,
.section {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 10px 25px rgba(30, 41, 59, .04);
}

.summary-item {
    min-height: 105px;
    padding: 1rem;
}

.summary-label,
.fact-label,
.domain-meta dt {
    display: block;
    margin-bottom: .25rem;
    color: var(--muted);
    font-size: .8rem;
}

.summary-value {
    display: block;
    color: var(--ink);
    font-size: 1.4rem;
    font-weight: 750;
    line-height: 1.25;
}

.summary-note {
    display: block;
    margin-top: .3rem;
    color: var(--muted);
    font-size: .76rem;
}

.section {
    padding: clamp(1.15rem, 3vw, 1.75rem);
    margin-top: 1rem;
}

.section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.section-heading h2 {
    margin-bottom: .25rem;
    font-size: 1.25rem;
}

.section-heading p,
.section > p {
    margin-bottom: 0;
    color: var(--muted);
    font-size: .9rem;
}

.domain-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: .8rem;
}

.domain-card {
    min-width: 0;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdff;
}

.domain-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .8rem;
    margin-bottom: .9rem;
}

.domain-kind {
    display: block;
    margin-bottom: .35rem;
    padding: .18rem .5rem;
    border-radius: 4px;
    font-size: .72rem;
}

.domain-card h3 {
    margin: 0;
    overflow-wrap: anywhere;
    color: var(--ink);
    font-size: 1rem;
}

.domain-link {
    flex: 0 0 auto;
    gap: .3rem;
    color: var(--primary-dark);
    font-size: .82rem;
    font-weight: 650;
    text-decoration: none;
}

.domain-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .7rem;
    margin: 0;
}

.domain-meta dd {
    margin: 0;
    overflow-wrap: anywhere;
    color: var(--ink);
    font-size: .86rem;
    font-weight: 600;
}

.empty-state,
.loading-state,
.error-state {
    padding: 1.25rem;
    border: 1px dashed var(--line);
    border-radius: 8px;
    color: var(--muted);
    text-align: center;
}

.error-state {
    color: #b42318;
    background: #fff7f6;
}

.two-column {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
    gap: 1rem;
}

.two-column .section {
    min-width: 0;
}

.usage-list {
    display: grid;
    gap: .85rem;
    margin: 0;
}

.usage-item {
    padding-bottom: .85rem;
    border-bottom: 1px solid var(--line);
}

.usage-item:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.usage-item h3 {
    margin-bottom: .35rem;
    font-size: .95rem;
}

.usage-item p {
    margin-bottom: .55rem;
    color: var(--muted);
    font-size: .86rem;
}

.code-row {
    display: flex;
    align-items: stretch;
    min-width: 0;
    border: 1px solid #cbd8e8;
    border-radius: 6px;
    background: #f8fbff;
}

code,
pre {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.code-row code {
    min-width: 0;
    flex: 1;
    padding: .65rem .75rem;
    overflow-x: auto;
    color: #1e3a5f;
    font-size: .78rem;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.copy-button {
    flex: 0 0 auto;
    gap: .35rem;
    padding: .55rem .7rem;
    border: 0;
    border-left: 1px solid #cbd8e8;
    background: #fff;
    color: var(--primary-dark);
    cursor: pointer;
    font: inherit;
    font-size: .78rem;
    font-weight: 650;
}

.copy-button:hover {
    background: var(--blue-soft);
}

.service-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .8rem;
    margin: 0;
}

.fact {
    padding: .8rem;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fbfdff;
}

.fact-value {
    color: var(--ink);
    font-size: .9rem;
    font-weight: 650;
    overflow-wrap: anywhere;
}

.notice-list {
    margin: .8rem 0 0;
    padding-left: 1.1rem;
    color: var(--muted);
    font-size: .88rem;
}

.notice-list li + li {
    margin-top: .45rem;
}

.page-footer {
    margin-top: 1.25rem;
    color: var(--muted);
    font-size: .82rem;
    text-align: center;
}

.page-footer a {
    color: var(--primary-dark);
    text-decoration: none;
}

@media (max-width: 760px) {
    .topbar-inner {
        min-height: 58px;
    }

    .summary-grid,
    .two-column {
        grid-template-columns: 1fr 1fr;
    }

    .two-column {
        display: block;
    }

    .two-column .section + .section {
        margin-top: 1rem;
    }
}

@media (max-width: 480px) {
    .topbar-inner,
    .page-shell {
        width: min(100% - 1.2rem, 1120px);
    }

    .back-link {
        font-size: 0;
    }

    .back-link i {
        font-size: .95rem;
    }

    .summary-grid,
    .service-facts {
        grid-template-columns: 1fr 1fr;
    }

    .summary-item {
        min-height: 92px;
        padding: .8rem;
    }

    .summary-value {
        font-size: 1.15rem;
    }

    .section-heading {
        display: block;
    }

    .section-heading p {
        margin-top: .35rem;
    }

    .domain-meta {
        grid-template-columns: 1fr;
    }
}
