@font-face {
    font-family: "Geist";
    src: url("fonts/Geist-Variable.woff2") format("woff2");
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
}

:root {
    color-scheme: light;
    --canvas: #f1f3f7;
    --surface: #fcfdff;
    --surface-muted: #e9edf3;
    --surface-accent: #e8eefc;
    --text: #141a24;
    --text-muted: #596476;
    --text-faint: #788397;
    --line: #cfd6e1;
    --line-strong: #aab5c5;
    --accent: #2453d4;
    --accent-hover: #1b43b2;
    --accent-contrast: #f7f9ff;
    --danger: #b4233b;
    --danger-surface: #f9e9ed;
    --header-bg: rgb(241 243 247 / 94%);
    --map-note-bg: rgb(12 16 24 / 90%);
    --map-note-text: #f1f4fa;
    --shadow: 0 28px 70px rgb(44 57 79 / 14%);
    --radius: 14px;
    font-family: "Geist", "Noto Sans SC", "Microsoft YaHei", ui-sans-serif, system-ui, sans-serif;
    font-synthesis: none;
}

@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;
        --canvas: #0c1018;
        --surface: #121824;
        --surface-muted: #1a2230;
        --surface-accent: #18264a;
        --text: #edf1f8;
        --text-muted: #aab4c4;
        --text-faint: #7f8ba0;
        --line: #2c3646;
        --line-strong: #465369;
        --accent: #7ea1ff;
        --accent-hover: #9bb6ff;
        --accent-contrast: #0c1427;
        --danger: #ff8497;
        --danger-surface: #3a1d28;
        --header-bg: rgb(12 16 24 / 94%);
        --map-note-bg: rgb(12 16 24 / 92%);
        --shadow: 0 28px 70px rgb(2 5 10 / 38%);
    }
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    scroll-behavior: smooth;
    scroll-padding-top: 92px;
    background: var(--canvas);
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    background: var(--canvas);
    font-size: 16px;
    line-height: 1.5;
    text-rendering: optimizeLegibility;
}

button,
a {
    font: inherit;
}

button {
    color: inherit;
}

a {
    color: inherit;
}

img {
    display: block;
    max-width: 100%;
}

:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

.app-shell {
    min-height: 100vh;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid var(--line);
    background: var(--header-bg);
    backdrop-filter: blur(18px);
}

.topbar,
.main-content,
.footer {
    width: min(1240px, calc(100% - 48px));
    margin-inline: auto;
}

.topbar {
    display: flex;
    min-height: 72px;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.brand-mark {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: var(--radius);
    color: var(--accent-contrast);
    background: var(--accent);
    font-size: 19px;
    font-weight: 760;
    letter-spacing: -.05em;
}

.brand-copy strong,
.brand-copy small {
    display: block;
}

.brand-copy strong {
    font-size: 18px;
    font-weight: 720;
    letter-spacing: -.02em;
    line-height: 1;
}

.brand-copy small {
    margin-top: 5px;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 620;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.primary-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.nav-link,
.header-action,
.primary-action,
.quiet-action,
.secondary-action {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 680;
    text-decoration: none;
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.nav-link {
    padding-inline: 12px;
    color: var(--text-muted);
}

.nav-link:hover,
.quiet-action:hover {
    color: var(--accent);
}

.header-action,
.primary-action {
    padding-inline: 18px;
    border: 1px solid var(--accent);
    color: var(--accent-contrast);
    background: var(--accent);
}

.header-action:hover,
.primary-action:hover {
    border-color: var(--accent-hover);
    background: var(--accent-hover);
}

.header-action:active,
.primary-action:active,
.quiet-action:active,
.secondary-action:active,
.text-button:active {
    transform: translateY(1px);
}

.environment-badge {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    gap: 8px;
    padding-inline: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--text-muted);
    background: var(--surface);
    font-size: 12px;
    font-weight: 640;
}

.status-dot,
.status-indicator {
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent);
}

.main-content {
    padding-bottom: 112px;
}

.home-hero {
    display: grid;
    min-height: calc(100dvh - 73px);
    grid-template-columns: minmax(340px, .82fr) minmax(0, 1.18fr);
    align-items: center;
    gap: clamp(44px, 6vw, 88px);
    padding-block: clamp(52px, 7vw, 88px);
}

.hero-copy {
    position: relative;
    z-index: 1;
}

.eyebrow {
    margin: 0 0 20px;
    color: var(--accent);
    font-family: "Geist", ui-sans-serif, system-ui, sans-serif;
    font-size: 12px;
    font-weight: 720;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.home-hero h1 {
    max-width: 8.6ch;
    margin: 0;
    font-size: clamp(52px, 6.2vw, 82px);
    font-weight: 610;
    letter-spacing: -.065em;
    line-height: .98;
}

.hero-description {
    max-width: 29rem;
    margin: 28px 0 0;
    color: var(--text-muted);
    font-size: clamp(17px, 1.65vw, 20px);
    line-height: 1.65;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 34px;
}

.hero-actions .primary-action,
.hero-actions .quiet-action {
    min-height: 48px;
    padding-inline: 20px;
}

.quiet-action {
    padding-inline: 16px;
    border: 1px solid transparent;
    color: var(--text-muted);
}

.hero-visual {
    position: relative;
    aspect-ratio: 8 / 5;
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-muted);
    box-shadow: var(--shadow);
}

.hero-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.readiness-section {
    padding-block: 96px 48px;
    border-top: 1px solid var(--line);
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 36px;
}

.section-heading h2,
.evidence-path h2,
.property-header h1,
.trust-note h2,
.message-panel h1 {
    margin: 0;
    font-weight: 620;
    letter-spacing: -.045em;
    line-height: 1.08;
}

.section-heading h2 {
    font-size: clamp(36px, 4vw, 54px);
}

.section-heading p {
    max-width: 560px;
    margin: 14px 0 0;
    color: var(--text-muted);
    font-size: 16px;
    line-height: 1.65;
}

.secondary-action {
    flex: 0 0 auto;
    padding-inline: 18px;
    border: 1px solid var(--line-strong);
    background: var(--surface);
    cursor: pointer;
}

.secondary-action:hover:not(:disabled) {
    border-color: var(--accent);
    color: var(--accent);
}

.secondary-action:disabled {
    color: var(--text-faint);
    cursor: wait;
}

.service-list {
    margin-top: 38px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}

.service-row {
    display: grid;
    min-height: 92px;
    grid-template-columns: 132px minmax(0, 1fr) auto;
    align-items: center;
    gap: 28px;
    padding: 20px 24px;
}

.service-row + .service-row {
    border-top: 1px solid var(--line);
}

.service-state {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 720;
}

.service-row--unhealthy .status-indicator {
    background: var(--danger);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--danger) 14%, transparent);
}

.service-row--unhealthy .service-state {
    color: var(--danger);
}

.service-name h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 680;
}

.service-name p {
    margin: 5px 0 0;
    color: var(--text-muted);
    font-size: 13px;
}

.latency {
    color: var(--text-muted);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 12px;
}

.loading-row {
    min-height: 92px;
    background: linear-gradient(100deg, var(--surface) 25%, var(--surface-muted) 44%, var(--surface) 63%);
    background-size: 300% 100%;
    animation: loading 1.4s ease infinite;
}

.checked-at {
    margin: 16px 0 0;
    color: var(--text-muted);
    font-size: 12px;
    text-align: right;
}

.checked-at strong {
    color: var(--text);
}

.evidence-path {
    display: grid;
    grid-template-columns: minmax(280px, .72fr) minmax(0, 1.28fr);
    gap: clamp(48px, 7vw, 100px);
    margin-top: 96px;
    padding: clamp(34px, 5vw, 64px);
    border: 1px solid color-mix(in srgb, var(--accent) 26%, var(--line));
    border-radius: var(--radius);
    background: var(--surface-accent);
}

.evidence-path h2 {
    max-width: 10ch;
    font-size: clamp(36px, 4.8vw, 62px);
}

.path-copy > p {
    max-width: 34rem;
    margin: 22px 0 30px;
    color: var(--text-muted);
    line-height: 1.7;
}

.path-rail {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: center;
    gap: 0 30px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.path-rail li {
    min-height: 112px;
    padding: 26px 0;
    border-top: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
}

.path-rail strong,
.path-rail span {
    display: block;
}

.path-rail strong {
    font-size: 16px;
}

.path-rail span {
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 13px;
}

.footer {
    display: flex;
    min-height: 92px;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-top: 1px solid var(--line);
    color: var(--text-muted);
    font-size: 12px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 40px;
    color: var(--text-muted);
    font-size: 13px;
}

.breadcrumb a {
    color: var(--text);
    font-weight: 680;
    text-decoration-color: var(--line-strong);
    text-underline-offset: 4px;
}

.property-header {
    max-width: 900px;
    padding-top: clamp(56px, 7vw, 88px);
}

.property-header h1 {
    max-width: 12ch;
    font-size: clamp(46px, 6.6vw, 80px);
}

.property-header > p:last-child {
    max-width: 680px;
    margin: 24px 0 0;
    color: var(--text-muted);
    font-size: 18px;
    line-height: 1.7;
}

.location-workspace {
    display: grid;
    min-height: 600px;
    grid-template-columns: minmax(350px, .78fr) minmax(0, 1.22fr);
    margin-top: 52px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.location-form {
    min-width: 0;
    padding: 40px;
}

.provider-note {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 46px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
    font-size: 12px;
}

.provider-note strong {
    color: var(--text);
}

.provider-note span {
    color: var(--text-muted);
}

.field-block {
    display: grid;
    gap: 10px;
}

.field-label {
    font-size: clamp(25px, 3vw, 34px);
    font-weight: 620;
    letter-spacing: -.035em;
}

.field-guidance {
    margin: 0 0 8px;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.6;
}

.place-autocomplete-host {
    max-width: 100%;
    min-height: 58px;
    overflow: hidden;
    border-radius: var(--radius);
}

.place-autocomplete-control {
    width: 100%;
    color-scheme: light;
}

.inline-message,
.selected-place {
    margin-top: 28px;
    padding: 20px;
    border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
    border-radius: var(--radius);
    background: var(--surface-accent);
}

.inline-message strong,
.inline-message span {
    display: block;
}

.inline-message strong {
    margin-bottom: 6px;
    font-size: 14px;
}

.inline-message span {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.55;
}

.inline-message--error {
    border-color: color-mix(in srgb, var(--danger) 46%, var(--line));
    background: var(--danger-surface);
}

.selection-status {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 720;
}

.selected-place h3 {
    margin: 18px 0 6px;
    font-size: 25px;
    font-weight: 640;
    letter-spacing: -.025em;
}

.selected-place > p {
    margin: 0;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.55;
}

.selected-place dl {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 24px 0 18px;
}

.selected-place dt {
    color: var(--text-faint);
    font-size: 11px;
}

.selected-place dd {
    margin: 5px 0 0;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 12px;
}

.text-button {
    min-height: 44px;
    padding: 0;
    border: 0;
    color: var(--accent);
    background: transparent;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 4px;
    cursor: pointer;
}

.map-panel {
    position: relative;
    min-width: 0;
    min-height: 600px;
    background: var(--surface-muted);
}

.map-canvas {
    width: 100%;
    height: 100%;
    min-height: 600px;
}

.map-loading {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    color: var(--text-muted);
    background: var(--surface-muted);
    font-size: 13px;
    font-weight: 640;
}

.map-loading span {
    padding: 12px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}

.map-disclaimer {
    position: absolute;
    right: 22px;
    bottom: 22px;
    left: 22px;
    z-index: 3;
    max-width: 430px;
    padding: 16px 18px;
    border-radius: var(--radius);
    color: var(--map-note-text);
    background: var(--map-note-bg);
}

.map-disclaimer strong,
.map-disclaimer span {
    display: block;
}

.map-disclaimer strong {
    margin-bottom: 5px;
    font-size: 13px;
}

.map-disclaimer span {
    color: #c9d1df;
    font-size: 12px;
    line-height: 1.5;
}

.trust-note {
    max-width: 760px;
    margin-top: 72px;
    padding: 28px 30px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}

.trust-note h2 {
    font-size: 27px;
}

.trust-note p {
    margin: 14px 0 0;
    color: var(--text-muted);
    line-height: 1.7;
}

.message-panel {
    max-width: 740px;
    min-height: 62vh;
    padding-top: clamp(72px, 10vw, 132px);
}

.message-code {
    margin: 0 0 18px;
    color: var(--accent);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 13px;
    font-weight: 720;
}

.message-panel h1 {
    font-size: clamp(44px, 6vw, 72px);
}

.message-panel > p:not(.message-code) {
    margin-block: 26px;
    color: var(--text-muted);
    font-size: 18px;
    line-height: 1.7;
}

.text-link {
    color: var(--accent);
    font-weight: 700;
    text-underline-offset: 4px;
}

@keyframes loading {
    from { background-position: 100% 0; }
    to { background-position: -100% 0; }
}

@media (prefers-color-scheme: dark) {
    .hero-visual img {
        filter: brightness(.72) contrast(1.06) saturate(.82);
    }

    .place-autocomplete-control {
        color-scheme: dark;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .loading-row {
        animation: none;
    }

    .nav-link,
    .header-action,
    .primary-action,
    .quiet-action,
    .secondary-action {
        transition: none;
    }
}

@media (prefers-reduced-transparency: reduce) {
    .site-header {
        background: var(--canvas);
        backdrop-filter: none;
    }
}

@media (max-width: 960px) {
    .home-hero {
        min-height: auto;
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .home-hero h1 {
        max-width: 10ch;
    }

    .hero-visual {
        width: 100%;
    }

    .evidence-path {
        grid-template-columns: 1fr;
    }

    .evidence-path h2 {
        max-width: 14ch;
    }

    .location-workspace {
        grid-template-columns: minmax(0, 1fr);
    }

    .map-panel,
    .map-canvas {
        min-height: 480px;
    }
}

@media (max-width: 700px) {
    .topbar,
    .main-content,
    .footer {
        width: min(100% - 32px, 1240px);
    }

    .topbar {
        min-height: 68px;
    }

    .brand-copy small,
    .nav-link,
    .environment-badge {
        display: none;
    }

    .header-action {
        min-height: 42px;
        padding-inline: 14px;
    }

    .main-content {
        padding-bottom: 80px;
    }

    .home-hero {
        gap: 38px;
        padding-block: 48px 64px;
    }

    .home-hero h1 {
        max-width: 9ch;
        font-size: clamp(44px, 13.2vw, 58px);
    }

    .hero-description {
        margin-top: 22px;
        font-size: 17px;
    }

    .hero-actions {
        align-items: stretch;
        flex-direction: column;
        margin-top: 28px;
    }

    .hero-actions .quiet-action {
        border-color: var(--line);
    }

    .hero-visual {
        aspect-ratio: 4 / 3;
    }

    .readiness-section {
        padding-block: 72px 32px;
    }

    .section-heading {
        align-items: stretch;
        flex-direction: column;
        gap: 24px;
    }

    .section-heading h2 {
        font-size: 38px;
    }

    .secondary-action {
        width: 100%;
    }

    .service-row {
        min-height: 116px;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 12px 18px;
        padding: 20px;
    }

    .service-state {
        grid-column: 1;
    }

    .service-name {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .latency {
        grid-column: 2;
        grid-row: 1;
    }

    .checked-at {
        line-height: 1.7;
        text-align: left;
    }

    .evidence-path {
        margin-top: 72px;
        padding: 30px 24px;
    }

    .evidence-path h2 {
        font-size: 40px;
    }

    .path-rail {
        grid-template-columns: 1fr;
    }

    .path-rail li {
        min-height: auto;
    }

    .footer {
        min-height: 104px;
        align-items: start;
        flex-direction: column;
        justify-content: center;
        gap: 7px;
    }

    .breadcrumb {
        padding-top: 28px;
    }

    .property-header {
        padding-top: 52px;
    }

    .property-header h1 {
        max-width: 10ch;
        font-size: 44px;
    }

    .property-header > p:last-child {
        font-size: 16px;
    }

    .location-workspace {
        margin-top: 40px;
    }

    .location-form {
        padding: 28px 22px;
    }

    .provider-note {
        align-items: start;
        flex-direction: column;
        margin-bottom: 36px;
        gap: 5px;
    }

    .selected-place dl {
        grid-template-columns: 1fr 1fr;
    }

    .map-panel,
    .map-canvas {
        min-height: 390px;
    }

    .map-disclaimer {
        right: 14px;
        bottom: 14px;
        left: 14px;
    }

    .trust-note {
        margin-top: 52px;
        padding: 24px;
    }
}
