/* Color palette and type modeled on Visual Studio Code's Light+ / Dark+ themes. */
:root {
    color-scheme: light dark;

    --font-ui: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'Cascadia Code', Consolas, 'Courier New', monospace;

    /* Light+ */
    --bg: #ffffff;
    --fg: #1f1f1f;
    --fg-muted: #6b6b6b;
    --border: #e5e5e5;
    --widget-bg: #f6f6f6;
    --accent: #0e639c;
    --accent-hover: #1177bb;
    --accent-fg: #ffffff;
    --link: #006ab1;
    --success: #388a34;
    --code-bg: #eeeeee;
    --code-fg: #a31515;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #1e1e1e;
        --fg: #d4d4d4;
        --fg-muted: #9a9a9a;
        --border: #3c3c3c;
        --widget-bg: #252526;
        --link: #3794ff;
        --success: #89d185;
        --code-bg: #2a2a2a;
        --code-fg: #ce9178;
    }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { font-family: var(--font-ui); background: var(--bg); color: var(--fg); font-size: 15px; line-height: 1.5; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

header { display: flex; justify-content: space-between; align-items: center; max-width: 1100px; margin: auto; padding: 1.25rem 2rem; border-bottom: 1px solid var(--border); }
.brand { color: var(--fg); font-family: var(--font-mono); font-weight: 600; letter-spacing: .01em; }
nav { display: flex; gap: 1.5rem; align-items: center; }
nav a { color: var(--fg-muted); font-size: .92rem; }
nav a:hover { color: var(--link); }
.sign-in-link { font-weight: 600; }

.profile-menu { position: relative; }
.profile-menu-trigger { display: inline-flex; align-items: center; gap: .55rem; padding: 0; border: 0; background: none; color: var(--fg-muted); font: inherit; font-size: .92rem; cursor: pointer; }
.profile-menu-trigger:hover { color: var(--link); }
.profile-name { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; display: block; }
.profile-initials { display: inline-flex; align-items: center; justify-content: center; background: var(--accent); color: var(--accent-fg); font-size: .72rem; font-weight: 600; letter-spacing: .02em; }
.profile-menu-panel { position: absolute; right: 0; top: calc(100% + 12px); min-width: 250px; padding: .4rem; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; box-shadow: 0 10px 30px rgba(0, 0, 0, .16); z-index: 60; }
.profile-summary { display: flex; align-items: center; gap: .65rem; padding: .55rem .6rem; }
.profile-summary .profile-avatar { width: 38px; height: 38px; }
.profile-summary-text strong { display: block; color: var(--fg); font-size: .9rem; }
.profile-summary-text small { display: block; color: var(--fg-muted); font-size: .78rem; overflow-wrap: anywhere; }
.profile-menu-separator { height: 1px; margin: .35rem .25rem; background: var(--border); }
.profile-menu form { margin: 0; }
.profile-menu-item { display: block; width: 100%; padding: .5rem .6rem; border: 0; border-radius: 4px; background: none; color: var(--fg); font: inherit; font-size: .88rem; text-align: left; cursor: pointer; }
.profile-menu-item:hover { background: var(--widget-bg); text-decoration: none; }
.profile-menu-signout { color: var(--link); }

main { max-width: 1100px; margin: auto; padding: 3.5rem 2rem 5rem; }

.hero, .page-heading { max-width: 720px; margin-bottom: 2.5rem; }
.eyebrow { display: block; color: var(--fg-muted); font-family: var(--font-mono); font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; margin-bottom: .6rem; }
h1 { color: var(--fg); font-weight: 600; font-size: clamp(2rem, 4.5vw, 3.2rem); line-height: 1.15; margin: 0 0 1rem; }
.page-heading h1 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); }
h2 { color: var(--fg); font-weight: 600; font-size: 1.2rem; margin-top: 0; }
p { color: var(--fg-muted); font-size: 1rem; line-height: 1.65; }

.status-card { background: var(--widget-bg); border: 1px solid var(--border); border-radius: 6px; padding: 1.5rem 1.75rem; margin: 1.2rem 0; }

dl { display: grid; grid-template-columns: 12rem 1fr; gap: .7rem 1rem; }
dt { color: var(--fg-muted); font-family: var(--font-mono); font-size: .85rem; }
dd { margin: 0; color: var(--fg); font-variant-numeric: tabular-nums; }

.location-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; align-items: start; }
.location-card { margin: 0; border-radius: 10px; padding: 0; overflow: hidden; }
.location-card-header { max-width: none; margin: 0; padding: 1.25rem 1.4rem; border: 0; border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--widget-bg) 82%, var(--accent) 18%); }
.location-card-header h2 { margin: 0; }
.location-card-kicker { margin: 0 0 .15rem; color: var(--accent); font-family: var(--font-mono); font-size: .72rem; font-weight: 600; letter-spacing: .07em; line-height: 1.4; text-transform: uppercase; }
.location-card-marker { display: grid; place-items: center; flex: 0 0 auto; min-width: 2.5rem; height: 2.5rem; padding: 0 .55rem; border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); border-radius: 999px; color: var(--accent); background: var(--bg); font-family: var(--font-mono); font-size: .72rem; font-weight: 700; letter-spacing: .04em; }
.location-card > p, .location-card > button, .location-card > .location-details { margin-left: 1.4rem; margin-right: 1.4rem; }
.location-card > p { margin-top: 1.25rem; }
.location-reva { --mascot-padding-x:1rem;--mascot-padding-y:0;--mascot-slot-min-height:290px;grid-column:2;margin:0;border:1px solid var(--border);border-radius:10px;background:color-mix(in srgb,var(--widget-bg) 88%,var(--accent) 12%);overflow:hidden;text-align:center}.location-reva .mascot-content{display:grid;gap:.35rem}.location-reva .mascot-content span{color:var(--muted);font-size:.84rem}.location-reva .mascot{filter:drop-shadow(0 16px 18px rgba(0,0,0,.16))}
.location-card > button { margin-bottom: 1.4rem; }
.location-empty-state { margin-bottom: 1.4rem; padding: .9rem 1rem; border-left: 3px solid var(--border); background: var(--bg); }
.location-details { grid-template-columns: minmax(8.5rem, .8fr) minmax(0, 1.2fr); gap: 0; margin-top: 1.1rem; margin-bottom: 1.4rem; border: 1px solid var(--border); border-radius: 7px; overflow: hidden; background: var(--bg); }
.location-details dt, .location-details dd { min-width: 0; padding: .65rem .8rem; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
.location-details dt:nth-last-of-type(1), .location-details dd:last-of-type { border-bottom: 0; }
.location-details dd { font-weight: 500; }
.location-details-result { animation: location-result-in 180ms ease-out; }
.location-action-status { margin-bottom: 1.25rem; }
.location-action-status:empty { display: none; }

@keyframes location-result-in {
    from { opacity: 0; transform: translateY(-.25rem); }
    to { opacity: 1; transform: translateY(0); }
}

code { font-family: var(--font-mono); color: var(--code-fg); background: var(--code-bg); border-radius: 3px; padding: .15rem .35rem; font-size: .9em; }
.success { color: var(--success); }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; border-bottom: 1px solid var(--border); padding: .75rem; }
th { color: var(--fg-muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
td { color: var(--fg); font-family: var(--font-mono); font-size: .92rem; }

button { border: 0; border-radius: 4px; padding: .7rem 1.2rem; background: var(--accent); color: var(--accent-fg); font: inherit; font-weight: 600; cursor: pointer; }
button:hover:not(:disabled) { background: var(--accent-hover); }
button:disabled { cursor: wait; opacity: .6; }

.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 1rem; }
.metric-grid .status-card { display: grid; gap: .5rem; }
.metric-grid span { color: var(--fg-muted); font-family: var(--font-mono); font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; }
.metric-grid strong { color: var(--fg); font-family: var(--font-mono); font-size: 2rem; font-weight: 600; }

.privacy-heading { margin-bottom: 1.5rem; }
.privacy-form { max-width: 760px; }
.privacy-form fieldset { border: 0; padding: 0; margin: 0 0 1rem; display: grid; gap: .7rem; }
.privacy-option { display: grid; grid-template-columns: auto 3rem 1fr; gap: .8rem; align-items: center; border: 1px solid var(--border); border-radius: 6px; padding: 1rem; background: var(--widget-bg); cursor: pointer; }
.privacy-option:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.privacy-option input { accent-color: var(--accent); }
.privacy-option strong, .privacy-option small { display: block; }
.privacy-option small { color: var(--fg-muted); margin-top: .2rem; line-height: 1.4; }
.privacy-art { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--bg); color: var(--accent); font-size: 1.45rem; }
.save-notice { max-width: 760px; margin-bottom: 1rem; border-left: 3px solid var(--success); background: var(--widget-bg); padding: .8rem 1rem; }
.validation-message { display: block; color: #d13438; margin-bottom: .8rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

@media (max-width: 640px) {
    header { padding: .9rem 1rem; align-items: flex-start; }
    nav { gap: .8rem; flex-wrap: wrap; justify-content: flex-end; }
    main { padding: 2rem 1rem 3rem; }
    .location-grid { grid-template-columns: 1fr; }
    .location-reva { grid-column:1; }
    .location-card-header { padding: 1rem; }
    .location-card > p, .location-card > button, .location-card > .location-details { margin-left: 1rem; margin-right: 1rem; }
    .location-details { grid-template-columns: 1fr; }
    .location-details dt { padding-bottom: .1rem; border-bottom: 0; }
    .location-details dd { padding-top: .1rem; }
    .location-details dt:nth-last-of-type(1) { border-bottom: 0; }
    .privacy-option { grid-template-columns: auto 2.5rem 1fr; padding: .8rem; }
}
