* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --openai-sans: "OpenAI Sans", "Sohne", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --bg: #ffffff;
    --text: #111111;
    --muted: #6e6e73;
    --line: #d2d2d7;
    --surface: #f5f5f7;
    --surface-2: #ffffff;
    --border: #d9d9df;
    --soft-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
    --tab-shell-bg: #ffffff;
    --tab-shell-border: #d4d6de;
    --tab-item-text: #42424a;
    --tab-item-hover-bg: #f0f1f4;
    --tab-item-active-bg: #eceef2;
    --tab-item-active-text: #1b1c20;
}

html.dark {
    --bg: #000000;
    --text: #ffffff;
    --muted: #c8c8ce;
    --line: #2a2a2f;
    --surface: #000000;
    --surface-2: #000000;
    --border: #2a2a2f;
    --soft-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
    --tab-shell-bg: #050506;
    --tab-shell-border: #202228;
    --tab-item-text: rgba(255, 255, 255, 0.88);
    --tab-item-hover-bg: rgba(255, 255, 255, 0.06);
    --tab-item-active-bg: #181a1f;
    --tab-item-active-text: #ffffff;
}

html,
body {
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: var(--openai-sans);
    line-height: 1.5;
}

body {
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    padding-bottom: 0;
}


.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg);
    padding: 1.1rem 1.25rem;
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.35rem 0.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 0.8rem;
    font-family: inherit;
    color: var(--muted);
}

.theme-toggle .theme-light,
.theme-toggle .theme-dark {
    padding: 0 0.15rem;
}

.theme-toggle .theme-light.active,
.theme-toggle .theme-dark.active {
    color: var(--text);
}

.theme-divider {
    color: var(--line);
    pointer-events: none;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.25rem;
}

.brand img {
    display: block;
    width: 36px;
    height: 36px;
}

html.dark .brand img {
    filter: invert(1);
}

.content {
    flex: 1;
    width: min(100%, 780px);
    max-width: 780px;
    margin: 0 auto;
    padding: 9.5rem 1.5rem 2rem;
    text-align: center;
    min-height: 0;
}

.content-hub {
    width: min(96vw, 1600px);
    max-width: 1600px;
    padding: 8rem 1rem 0.8rem;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.title {
    font-size: clamp(2rem, 6vw, 3.5rem);
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

.teaser {
    margin-top: 1.5rem;
    font-size: 1rem;
    text-wrap: balance;
}

.content-hub .teaser {
    max-width: 960px;
    margin: 1.1rem auto 0;
}

.cta-row {
    margin-top: 1.25rem;
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 14rem;
    padding: 0.66rem 1.3rem;
    background: transparent;
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 9999px;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    text-decoration: none;
    transition: background-color 150ms ease, border-color 150ms ease;
}

.cta-button:hover {
    background: var(--surface);
}

html.dark .cta-button {
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.01);
}

html.dark .cta-button:hover {
    border-color: rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.06);
}

.page-window {
    margin: 1rem auto 0;
    width: fit-content;
    max-width: min(100%, 780px);
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.2rem;
    padding: 0.2rem;
    border-radius: 999px;
    border: 1px solid var(--tab-shell-border);
    background: var(--tab-shell-bg);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.page-window::-webkit-scrollbar {
    display: none;
}

.page-window-link {
    flex: 0 0 auto;
    padding: 0.58rem 1.22rem;
    border-radius: 999px;
    border: none;
    background: transparent;
    text-align: center;
    font-size: 0.92rem;
    line-height: 1.05;
    color: var(--tab-item-text);
    letter-spacing: -0.01em;
    white-space: nowrap;
    cursor: pointer;
    font-family: inherit;
    -webkit-appearance: none;
    appearance: none;
    font-weight: 500;
    transition: background 160ms ease, color 160ms ease;
}

.page-window-link:hover {
    background: var(--tab-item-hover-bg);
}

.page-window-link.is-active {
    background: var(--tab-item-active-bg);
    color: var(--tab-item-active-text);
}

.domain-map {
    position: relative;
    width: 100%;
    margin-top: 0.75rem;
    border-radius: 12px;
    overflow: visible;
    border: 1px solid var(--line);
    background: var(--surface);
    padding: 1rem;
}

.map-note {
    margin-top: 0.55rem;
    font-size: 0.78rem;
    color: var(--text);
    text-align: center;
    line-height: 1.45;
}

.map-loading,
.map-error {
    margin: auto;
    width: max-content;
    color: var(--muted);
    font-size: 1rem;
}

.map-tab-panel {
    width: 100%;
    min-width: 100%;
    height: 100%;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem;
    text-align: center;
    background: transparent;
    border: none;
    border-radius: 0;
}

.map-tab-message-solid {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text);
    max-width: 42ch;
    margin: 0;
}

.field-map-layout {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 0.8rem;
    height: 100%;
    min-height: 0;
    padding: 0.25rem;
    background: transparent;
    border: none;
    border-radius: 0;
}

.field-map-caption {
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    text-align: left;
}

.field-columns {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.72rem;
    align-items: start;
}

.field-column {
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    padding: 0.65rem 0.7rem 0.72rem;
    min-height: 100%;
}

.field-main {
    display: flex;
    align-items: center;
    gap: 0.62rem;
    min-height: 2rem;
}

.field-main-line {
    width: 34px;
    height: 2px;
    border-radius: 999px;
    background: var(--field-accent, #8a8a8f);
    flex: 0 0 auto;
    opacity: 0.72;
}

.field-main-title {
    font-size: 1.05rem;
    line-height: 1.22;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text);
    overflow-wrap: anywhere;
}

.field-subfield-list {
    list-style: none;
    margin-top: 0.54rem;
    display: grid;
    gap: 0.5rem;
    text-align: left;
}

.field-subfield-item {
    padding-top: 0.44rem;
    border-top: 1px solid var(--border);
}

.field-column.is-shared .field-subfield-list {
    margin-top: 0.74rem;
    gap: 0.96rem;
}

.field-column.is-shared .field-subfield-item {
    padding-top: 0.74rem;
}

.field-subfield-name {
    font-size: 0.95rem;
    line-height: 1.24;
    font-weight: 600;
    color: var(--text);
    overflow-wrap: anywhere;
}

.field-subcategory-list {
    list-style: none;
    margin-top: 0.36rem;
    display: grid;
    gap: 0.14rem;
    text-align: left;
}

.field-subcategory-list li {
    font-size: 0.86rem;
    line-height: 1.35;
    color: var(--muted);
    overflow-wrap: anywhere;
}

.field-subcategory-list li::before {
    content: "•";
    margin-right: 0.38rem;
    color: var(--field-accent, #8a8a8f);
    opacity: 0.72;
}

.footer {
    position: relative;
    margin-top: auto;
    padding: 1.5rem;
    text-align: center;
    font-size: 0.9rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer p {
    max-width: 100%;
}

.contact {
    position: absolute;
    top: 50%;
    right: max(1.25rem, env(safe-area-inset-right));
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text);
}

.contact-label {
    font-weight: 600;
}

.contact-icons {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.contact a {
    color: inherit;
    text-decoration: none;
    opacity: 0.85;
}

.contact a:hover {
    opacity: 1;
}

.contact-email,
.contact-x {
    display: flex;
}

@media (max-width: 1360px) {
    .field-columns {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1080px) {
    .field-columns {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .content-hub {
        width: 100%;
        max-width: 100%;
        padding: 7.5rem 0.75rem 0.8rem;
    }

    .page-window-link {
        font-size: 0.86rem;
    }

    .domain-map {
        padding: 0.75rem;
    }

}

@media (max-width: 900px) {
    .footer {
        gap: 0.7rem;
        flex-direction: column;
    }

    .contact {
        position: static;
        transform: none;
    }
}

@media (max-width: 640px) {
    body {
        padding-bottom: 0;
    }

    .header {
        padding: 0.9rem 0.9rem;
    }

    .brand {
        gap: 0.42rem;
        font-size: 1.04rem;
    }

    .brand img {
        width: 30px;
        height: 30px;
    }

    .theme-toggle {
        font-size: 0.74rem;
        gap: 0.14rem;
        padding: 0.28rem 0.34rem;
    }

    .content {
        width: 100%;
        padding-top: 7.8rem;
        padding-left: 0.9rem;
        padding-right: 0.9rem;
    }

    .cta-row {
        flex-direction: column;
        align-items: center;
        gap: 0.65rem;
    }

    .cta-button {
        width: auto;
        min-width: 14rem;
        padding: 0.72rem 2.8rem;
    }

    .page-window {
        width: fit-content;
        max-width: 100%;
        gap: 0.24rem;
        padding: 0.28rem;
        justify-content: center;
        margin-left: auto;
        margin-right: auto;
        -webkit-overflow-scrolling: touch;
    }

    .page-window-link {
        flex: 0 0 auto;
        padding: 0.48rem 0.56rem;
        font-size: 0.75rem;
    }

    .domain-map {
        padding: 0.55rem;
    }

    .field-main-title {
        font-size: 1rem;
    }

    .field-column {
        padding: 0.54rem 0.58rem 0.62rem;
    }

    .field-subfield-name {
        font-size: 0.92rem;
    }

    .field-subcategory-list li {
        font-size: 0.82rem;
    }

    .contact a {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0.5rem;
    }
}
