:root {
    color-scheme: light;
    --bg: #f7f7fb;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --text: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --brand: #7c3aed;
    --brand-mid: #8b5cf6;
    --brand-2: #ec4899;
    --brand-soft: #f5f3ff;
    --brand-soft-2: #fdf2f8;
    --good: #10b981;
    --radius: 16px;
    --radius-lg: 20px;
    --header-h: 72px;
    --page-pad-x: 1rem;
    --touch-min: 44px;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --max: 80rem;
    --shadow-sm: 0 4px 16px rgba(15, 23, 42, 0.06);
    --shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
    --gradient: linear-gradient(135deg, #7c3aed 0%, #ec4899 100%);
    --gradient-vivid: linear-gradient(135deg, #6d28d9 0%, #db2777 100%);
}

html.dark {
    color-scheme: dark;
    --bg: #0f172a;
    --surface: #1e293b;
    --surface-soft: #172033;
    --text: #f1f5f9;
    --muted: #94a3b8;
    --line: #334155;
    --brand: #a78bfa;
    --brand-mid: #8b5cf6;
    --brand-2: #f472b6;
    --brand-soft: rgba(91, 33, 182, 0.35);
    --brand-soft-2: rgba(131, 24, 67, 0.25);
    --shadow-sm: 0 4px 20px rgba(0, 0, 0, 0.25);
    --shadow: 0 20px 48px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
body.map-page {
    overflow: hidden;
}

body {
    margin: 0;
    font-family: 'Poppins', system-ui, sans-serif;
    font-size: 0.9375rem;
    line-height: 1.5;
    background: var(--bg);
    color: var(--text);
    min-height: 100dvh;
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
    padding-bottom: var(--safe-bottom);
}

.button.full { width: 100%; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.wrap {
    width: min(var(--max), calc(100% - var(--page-pad-x) * 2));
    margin: 0 auto;
}

.gradient-text {
    display: inline;
    background-image: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--brand);
    background: var(--brand-soft);
    border: 1px solid color-mix(in srgb, var(--brand) 18%, var(--line));
}

.eyebrow-dot {
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 50%;
    background: var(--good);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--good) 25%, transparent);
}

.chip {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
    background: var(--brand-soft);
    color: var(--brand);
    border: 1px solid color-mix(in srgb, var(--brand) 20%, var(--line));
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    border-radius: 999px;
    padding: 0.65rem 1.15rem;
    font-size: 0.875rem;
    font-weight: 700;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease;
}

.button.primary {
    background: var(--gradient);
    color: #fff;
    box-shadow: 0 10px 24px color-mix(in srgb, var(--brand) 28%, transparent);
}

.button.ghost {
    background: transparent;
    border-color: color-mix(in srgb, var(--brand) 30%, var(--line));
    color: var(--brand);
}

.button:hover { opacity: 0.92; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.tippl-topbar {
    position: sticky;
    top: 0;
    z-index: 1100;
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    backdrop-filter: blur(12px);
}
.tippl-nav {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1rem;
    min-height: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}
.tippl-brand-lockup {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    flex-shrink: 0;
    min-width: 0;
}

.tippl-brand-mark {
    display: block;
    object-fit: contain;
    flex-shrink: 0;
    width: var(--brand-logo-size, 56px);
    height: var(--brand-logo-size, 56px);
}

.tippl-brand-name {
    font-weight: 900;
    font-size: 1.125rem;
    letter-spacing: -0.02em;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

.tippl-nav-brand .tippl-brand-mark {
    --brand-logo-size: 72px;
}

@media (min-width: 768px) {
    .tippl-nav-brand {
        gap: 0.75rem;
    }

    .tippl-nav-brand .tippl-brand-mark {
        --brand-logo-size: 84px;
    }

    .tippl-nav-brand .tippl-brand-name {
        font-size: 1.2rem;
    }
}

.site-footer-logo .tippl-brand-mark {
    --brand-logo-size: 88px;
}

.site-footer-logo .tippl-brand-name {
    font-size: 1.55rem;
}

.mobile-drawer-brand.tippl-brand-lockup {
    min-width: 0;
}

.mobile-drawer-brand .tippl-brand-mark {
    --brand-logo-size: 44px;
}

.mobile-drawer-brand .tippl-brand-name {
    font-size: 1.05rem;
}

.tippl-brand {
    font-weight: 900;
    font-size: 1.125rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.tippl-nav-links {
    display: none;
    align-items: center;
    gap: 0.35rem;
}
@media (min-width: 768px) {
    .tippl-nav-links { display: flex; }
}
.tippl-nav-links a {
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--muted);
}
.tippl-nav-links a.is-active,
.tippl-nav-links a:hover {
    color: var(--brand);
    background: var(--brand-soft);
}
.tippl-nav-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}

.tippl-nav-actions .tippl-locale,
.tippl-nav-actions .tippl-nav-login {
    display: none;
}

.tippl-nav-logout {
    display: inline-flex;
    margin: 0;
    padding: 0;
}

.tippl-nav-logout button {
    cursor: pointer;
}

@media (min-width: 768px) {
    .tippl-nav-actions .tippl-locale,
    .tippl-nav-actions .tippl-nav-login { display: inline-flex; }
}

.nav-toggle {
    display: flex;
    width: var(--touch-min);
    height: var(--touch-min);
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.nav-toggle svg { width: 1.25rem; height: 1.25rem; }

.nav-toggle-icon--close { display: none; }

.nav-toggle[aria-expanded="true"] .nav-toggle-icon--open { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle-icon--close { display: block; }

@media (min-width: 768px) {
    .nav-toggle { display: none; }
}

.mobile-drawer-backdrop {
    position: fixed;
    inset: calc(var(--header-h) + var(--safe-top)) 0 0;
    z-index: 1096;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
}

.mobile-drawer-backdrop[hidden] {
    display: none !important;
    pointer-events: none !important;
}

.mobile-drawer {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: calc(var(--header-h) + var(--safe-top));
    right: 0;
    z-index: 1097;
    width: min(100%, 20rem);
    height: calc(100dvh - var(--header-h) - var(--safe-top));
    background: var(--surface);
    border-left: 1px solid var(--line);
    padding: 1rem 1rem max(1rem, env(safe-area-inset-bottom));
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    box-shadow: -12px 0 40px rgba(15, 23, 42, 0.15);
}

.mobile-drawer.is-open { transform: translateX(0); }

body.nav-open { overflow: hidden; }

body.nav-open .map-mobile-bar {
    visibility: hidden;
    pointer-events: none;
}

.mobile-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--line);
}

.mobile-drawer-brand {
    min-width: 0;
}

.mobile-drawer-close {
    width: var(--touch-min);
    height: var(--touch-min);
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface-soft);
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    color: var(--text);
}

.mobile-drawer-links {
    display: grid;
    gap: 0.25rem;
}

.mobile-drawer-links a {
    padding: 0.85rem 0.9rem;
    border-radius: 12px;
    font-weight: 700;
    color: var(--text);
    min-height: var(--touch-min);
    display: flex;
    align-items: center;
}

.mobile-drawer-links a.is-active,
.mobile-drawer-links a:hover {
    background: var(--brand-soft);
    color: var(--brand);
}

.mobile-drawer-links a.mobile-drawer-accent {
    background: var(--gradient);
    color: #fff;
}

.mobile-drawer-prefs {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
    display: grid;
    gap: 1rem;
}

.mobile-drawer-pref-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.mobile-drawer-lang {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.mobile-drawer-lang a,
.mobile-drawer-lang span {
    padding: 0.4rem 0.65rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    border: 1px solid var(--line);
}

.mobile-drawer-lang span.is-active {
    background: var(--gradient);
    color: #fff;
    border-color: transparent;
}

body.nav-open { overflow: hidden; }

@media (min-width: 768px) {
    .mobile-drawer,
    .mobile-drawer-backdrop { display: none !important; }
}
.tippl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    border: none;
    border-radius: 999px;
    padding: 0.65rem 1rem;
    min-height: var(--touch-min);
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.15s ease, transform 0.15s ease;
}
.tippl-btn:active { transform: scale(0.98); }
.tippl-btn-primary {
    background: var(--gradient);
    color: #fff;
    box-shadow: var(--shadow);
}
.tippl-btn-ghost {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--line);
}
.tippl-icon-btn {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.tippl-locale {
    position: relative;
}
.tippl-locale select {
    appearance: none;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    border-radius: 999px;
    padding: 0.4rem 1.75rem 0.4rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 700;
}

/* Legacy map aliases — see map-shell.css on /services */
.tippl-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand);
    font-size: 0.6875rem;
    font-weight: 800;
}

/* Dashboard */
.tippl-dash {
    max-width: 56rem;
    margin: 0 auto;
    padding: 1.25rem 1rem 2.5rem;
}
.tippl-dash-hero {
    margin-bottom: 1.25rem;
}
.tippl-dash-hero h1 {
    margin: 0 0 0.35rem;
    font-size: clamp(1.5rem, 4vw, 2rem);
}
.tippl-dash-hero p { margin: 0; color: var(--muted); }
.tippl-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}
@media (min-width: 640px) {
    .tippl-stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.tippl-stat {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1rem;
    box-shadow: var(--shadow);
}
.tippl-stat strong {
    display: block;
    font-size: 1.5rem;
    line-height: 1;
    margin-bottom: 0.25rem;
}
.tippl-stat span { color: var(--muted); font-size: 0.8125rem; }
.tippl-section {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
}
.tippl-section h2 {
    margin: 0 0 0.75rem;
    font-size: 1rem;
}
.tippl-task-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-top: 1px solid var(--line);
}
.tippl-task-row:first-of-type { border-top: none; padding-top: 0; }
.tippl-task-actions { display: flex; gap: 0.5rem; flex-shrink: 0; }

.tippl-flash {
    max-width: 56rem;
    margin: 0.75rem auto 0;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
}
.tippl-flash-success {
    background: color-mix(in srgb, var(--brand) 12%, var(--surface));
    border: 1px solid color-mix(in srgb, var(--brand) 35%, var(--line));
}
.tippl-flash-error {
    background: color-mix(in srgb, #ef4444 10%, var(--surface));
    border: 1px solid color-mix(in srgb, #ef4444 35%, var(--line));
}

.tippl-form-row {
    display: grid;
    gap: 0.35rem;
    margin-bottom: 0.85rem;
}
.tippl-form-row label { font-size: 0.8125rem; font-weight: 600; }
.tippl-form-row input,
.tippl-form-row textarea,
.tippl-form-row select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 0.65rem;
    padding: 0.65rem 0.75rem;
    background: var(--bg);
    color: var(--text);
}
.tippl-form-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.5rem; }
.tippl-form-error { color: #ef4444; font-size: 0.8125rem; }
.tippl-alert { padding: 0.75rem; border-radius: var(--radius); margin-bottom: 0.75rem; }
.tippl-alert-success {
    background: color-mix(in srgb, var(--brand) 12%, var(--surface));
    border: 1px solid color-mix(in srgb, var(--brand) 35%, var(--line));
}

/* Messages embed */
.tippl-chat-wrap {
    max-width: 48rem;
    margin: 0 auto;
    padding: 0 0 1rem;
    min-height: calc(100dvh - var(--header-h) - 5rem);
}
.tippl-chat-wrap .mobile-chat-list-container {
    border-radius: var(--radius);
    border: 1px solid var(--line);
    overflow: hidden;
    background: var(--surface);
}

.hidden { display: none !important; }

.tippl-empty {
    text-align: center;
    color: var(--muted);
    padding: 2rem 1rem;
    font-size: 0.875rem;
}

/* Map layout + pins: see public/css/map-shell.css (loaded on /services) */

/* Site footer (Moppsy-style layout) */
.site-footer {
    margin-top: 3rem;
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, var(--surface) 0%, color-mix(in srgb, var(--brand) 4%, var(--bg)) 100%);
}

.site-footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    padding: 3.5rem var(--page-pad-x) 2.5rem;
    max-width: var(--max);
    margin: 0 auto;
}

.site-footer-brand {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.site-footer-tagline,
.site-footer-company {
    margin: 0;
    max-width: 22rem;
    line-height: 1.55;
    font-size: 0.875rem;
    color: var(--muted);
}

.site-footer-company {
    font-size: 0.75rem;
}

.site-footer-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem 1.5rem;
}

.site-footer-heading {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 0 0 0.75rem;
}

.site-footer-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.site-footer-list li + li { margin-top: 0.45rem; }

.site-footer-list a {
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text);
}

.site-footer-list a:hover { color: var(--brand); }

.site-footer-bottom {
    border-top: 1px solid var(--line);
    padding: 1.1rem var(--page-pad-x) 1.5rem;
    text-align: center;
}

.site-footer-bottom p {
    margin: 0;
    font-size: 0.78rem;
    color: var(--muted);
}

@media (min-width: 768px) {
    .site-footer-grid {
        grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
        align-items: start;
    }

    .site-footer-links {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 899px) {
    .tippl-nav {
        padding-top: 0.3rem;
        padding-bottom: 0.3rem;
    }

    .tippl-nav-brand {
        --brand-logo-size: 48px;
        gap: 0.45rem;
        min-width: 0;
    }

    .tippl-nav-brand .tippl-brand-name {
        font-size: 1rem;
    }
}

@media (max-width: 767px) {
    :root {
        --header-h: 60px;
        --page-pad-x: 0.85rem;
    }

    .site-main {
        padding-left: var(--page-pad-x);
        padding-right: var(--page-pad-x);
    }

    input,
    select,
    textarea {
        font-size: 16px;
    }

    .tippl-pagination nav {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}
