:root {
    color-scheme: light dark;
    --bg: #ffffff;
    --fg: #1b1b1b;
    --muted: #6b6b6b;
    --border: #d6d6d6;
    --surface: #f4f4f3;
    --accent: #1f6bb5;
    --accent-fg: #ffffff;
    --error: #b3261e;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #17181a;
        --fg: #d9d9d6;
        --muted: #969691;
        --border: #3b3c3f;
        --surface: #212225;
        --accent: #82b4e2;
        --accent-fg: #14161a;
        --error: #e08477;
    }
}

* {
    box-sizing: border-box;
}

body {
    margin: 0 auto;
    max-width: 660px;
    padding: 2.5rem 1rem 3rem;
    font-family: system-ui, sans-serif;
    font-size: 1rem;
    line-height: 1.55;
    background: var(--bg);
    color: var(--fg);
}

h1 {
    margin: 0;
    font-size: 1.45rem;
    font-weight: 650;
}

h2 {
    margin: 0 0 0.25rem;
    font-size: 1.05rem;
    font-weight: 600;
}

a {
    color: var(--accent);
}

.tagline {
    margin: 0.25rem 0 2rem;
    color: var(--muted);
}

form label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 600;
}

.input-row {
    display: flex;
    gap: 0.5rem;
}

@media (max-width: 480px) {
    .input-row {
        flex-direction: column;
    }
}

input,
button {
    font: inherit;
    color: inherit;
    border-radius: 4px;
}

input {
    flex: 1;
    min-width: 0;
    padding: 0.45rem 0.6rem;
    border: 1px solid var(--border);
    background: var(--bg);
}

input::placeholder {
    color: var(--muted);
}

input:focus-visible,
button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

button {
    padding: 0.45rem 0.9rem;
    border: 1px solid var(--border);
    background: var(--surface);
    cursor: pointer;
}

button[type="submit"] {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--accent-fg);
}

button:disabled {
    opacity: 0.6;
    cursor: default;
}

.hint {
    margin: 0.5rem 0 0;
    font-size: 0.85rem;
    color: var(--muted);
}

#status {
    margin: 1.25rem 0 0;
}

#status.error {
    color: var(--error);
}

#status:empty {
    display: none;
}

#results {
    margin-top: 2rem;
}

.muted {
    color: var(--muted);
}

#location-address,
#location-coords {
    margin: 0;
}

.coords {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.85rem;
    color: var(--muted);
}

#service-list {
    margin: 1.25rem 0 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

#service-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.5rem 0;
}

#service-list li + li {
    border-top: 1px solid var(--border);
}

.service-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.service-actions button {
    padding: 0.2rem 0.6rem;
    font-size: 0.85rem;
}

.service-actions.unavailable {
    font-size: 0.85rem;
    color: var(--muted);
}

footer {
    margin-top: 3.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
    color: var(--muted);
}
