/* Match site tokens (self-contained — page does not load main.css) */
:root {
    --bg-light: #f7f7f5;
    --text-light: #1a1a1a;
    --card-light: #ffffff;
    --border-light: #d0d5dd;
    --muted-light: #555;

    --bg-dark: #1a1c1e;
    --text-dark: #f0f0f0;
    --card-dark: #2a2c2e;
    --border-dark: #444;
    --muted-dark: #bbb;

    --danger-bg-light: #f8d7da;
    --danger-text-light: #721c24;
    --danger-bg-dark: #4a1c1c;
    --danger-text-dark: #f5b5b5;

    --accent-light: #cc0000;
    --accent-dark: #ff6666;
    --link-light: #0a26c3;
    --link-dark: #61dafb;
    --btn-bg-light: #007bff;
    --btn-bg-dark: #3a92d6;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.5;
    background: var(--bg-light);
    color: var(--text-light);
    transition: background-color 0.25s ease, color 0.25s ease;
}

body.dark-mode {
    background: var(--bg-dark);
    color: var(--text-dark);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    left: 12px;
    top: -100px;
    z-index: 100;
    padding: 12px 16px;
    min-height: 44px;
    background: var(--btn-bg-light);
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
}

.skip-link:focus {
    top: 12px;
}

/* Theme toggle — keep your existing switch markup; minimal positioning */
.maint-top {
    display: flex;
    justify-content: flex-end;
    padding: 12px 16px;
    padding-top: max(12px, env(safe-area-inset-top));
}

.toggle-container {
    /* If main.js / your old CSS styles #mode-toggle, keep those rules in this file too */
}

.theme-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    min-width: 44px;
    padding: 6px;
    cursor: pointer;
}

.theme-switch input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.theme-switch-track {
    display: flex;
    align-items: center;
    width: 48px;
    height: 28px;
    padding: 3px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.12);
    transition: background-color 0.2s ease;
}

body.dark-mode .theme-switch-track {
    background: rgba(255, 255, 255, 0.16);
}

.theme-switch-thumb {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    color: #1a1c1e;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    transform: translateX(0);
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.theme-switch-thumb svg {
    width: 14px;
    height: 14px;
}

.theme-switch input:checked + .theme-switch-track .theme-switch-thumb {
    transform: translateX(20px);
    background: #1a1c1e;
    color: #f4f4f5;
}

body.dark-mode .theme-switch-thumb {
    background: #1a1c1e;
    color: #f4f4f5;
}

body.dark-mode .theme-switch input:checked + .theme-switch-track .theme-switch-thumb {
    background: #fff;
    color: #1a1c1e;
}
/* Theme thumb: show sun in light, moon in dark */
.theme-switch-thumb .icon-moon { display: none; }
.theme-switch-thumb .icon-sun { display: block; }
body.dark-mode .theme-switch-thumb .icon-sun { display: none; }
body.dark-mode .theme-switch-thumb .icon-moon { display: block; }


/* Main layout */
.maint-main {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 24px 16px 48px;
    padding-bottom: max(48px, env(safe-area-inset-bottom));
}

.maint-card {
    width: 100%;
    max-width: 32rem;
    padding: 28px 24px;
    border-radius: 16px;
    border: 1px solid var(--border-light);
    background: var(--card-light);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    text-align: center;
}

body.dark-mode .maint-card {
    border-color: var(--border-dark);
    background: var(--card-dark);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.maint-brand {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.maint-sub {
    margin: 4px 0 20px;
    font-size: 0.95rem;
    color: var(--muted-light);
}

body.dark-mode .maint-sub {
    color: var(--muted-dark);
}

.maint-card h1 {
    margin: 0 0 12px;
    font-size: clamp(1.5rem, 4vw, 1.85rem);
    line-height: 1.25;
}

.maint-lead {
    margin: 0 0 24px;
    font-size: 1.05rem;
    color: var(--muted-light);
}

body.dark-mode .maint-lead {
    color: var(--muted-dark);
}

.maint-alert {
    margin: 0 0 28px;
    padding: 14px 16px;
    border-radius: 10px;
    background: var(--danger-bg-light);
    color: var(--danger-text-light);
    font-size: 1.05rem;
}

body.dark-mode .maint-alert {
    background: var(--danger-bg-dark);
    color: var(--danger-text-dark);
}

.maint-contact h2 {
    margin: 0 0 10px;
    font-size: 1.15rem;
}

.maint-contact p {
    margin: 0 0 12px;
}

.tel-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 4px;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--link-light);
    text-decoration: none;
}

body.dark-mode .tel-link {
    color: var(--link-dark);
}

.tel-link:hover,
.tel-link:focus-visible {
    text-decoration: underline;
    outline: none;
}

.btn-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    min-width: 44px;
    padding: 10px 20px;
    border-radius: 8px;
    background: var(--btn-bg-light);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
}

body.dark-mode .btn-link {
    background: var(--btn-bg-dark);
}

.btn-link:hover,
.btn-link:focus-visible {
    filter: brightness(1.08);
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

@media (max-width: 480px) {
    .maint-card {
        padding: 22px 16px;
    }
}