@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

:root {
    color-scheme: light;
    --bg: #f6f7fb;
    --surface: #ffffff;
    --surface-alt: #f0f3f9;
    --text: #0f172a;
    --muted: #64748b;
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --accent: #22c55e;
    --shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 12px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
    background: linear-gradient(180deg, #eef2ff 0%, #f8fafc 40%, #f6f7fb 100%);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

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

.container {
    width: min(1120px, 92%);
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 0;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.logo {
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: -0.02em;
    color: var(--text);
}

.nav {
    display: flex;
    gap: 18px;
    align-items: center;
    flex-wrap: wrap;
}

.nav a {
    color: var(--muted);
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav a:hover,
.nav a.active {
    color: var(--text);
}

.nav a.active {
    position: relative;
}

.nav a.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -10px;
    height: 2px;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.6);
}

.menu-btn {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

.menu-btn:focus {
    outline: none;
}

.menu-btn:focus-visible {
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.18);
}

.menu-icon {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--text);
    border-radius: 999px;
    position: relative;
}

.menu-icon::before,
.menu-icon::after {
    content: "";
    position: absolute;
    left: 0;
    width: 18px;
    height: 2px;
    background: var(--text);
    border-radius: 999px;
}

.menu-icon::before {
    top: -6px;
}

.menu-icon::after {
    top: 6px;
}

.pill-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.pill-link:hover {
    border-color: rgba(99, 102, 241, 0.55);
    color: var(--text);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
    margin-top: 14px;
}

.field {
    display: grid;
    gap: 8px;
}

.label {
    font-weight: 700;
    color: var(--muted);
    font-size: 0.9rem;
}

.control {
    width: 100%;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(240, 243, 249, 0.85);
    color: var(--text);
    font-weight: 600;
    outline: none;
}

.control:focus {
    border-color: rgba(99, 102, 241, 0.6);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

.segmented {
    display: inline-flex;
    gap: 8px;
    flex-wrap: wrap;
}

.segmented .seg {
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(255, 255, 255, 0.7);
    color: var(--muted);
    padding: 10px 14px;
    border-radius: 999px;
    font-weight: 700;
    cursor: pointer;
    user-select: none;
}

.segmented .seg[aria-pressed="true"] {
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.45);
}

.nav .nav-cta {
    display: none;
}

@media (min-width: 721px) {
    .nav .nav-cta {
        display: none !important;
    }
}

.inline-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.result-hero {
    margin-top: 18px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: var(--shadow);
    padding: 26px;
}

.big-number {
    font-size: clamp(3.6rem, 8vw, 6rem);
    font-weight: 900;
    line-height: 1;
    color: var(--primary-dark);
}

.big-caption {
    color: var(--muted);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.85rem;
    margin-top: 10px;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    margin-top: 16px;
}

.result-card {
    background: var(--surface-alt);
    border-radius: var(--radius-md);
    padding: 16px;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.result-card .k {
    color: var(--muted);
    font-weight: 800;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.result-card .v {
    font-size: 1.4rem;
    font-weight: 900;
    margin-top: 6px;
    color: var(--text);
}

.chip-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.chip {
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(255, 255, 255, 0.8);
    padding: 8px 12px;
    border-radius: 999px;
    font-weight: 800;
    color: var(--muted);
    cursor: pointer;
}

.chip:hover {
    border-color: rgba(99, 102, 241, 0.55);
    color: var(--text);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    font-weight: 800;
    border: 1px solid rgba(148, 163, 184, 0.25);
}

.badge.workday {
    background: rgba(34, 197, 94, 0.12);
    color: #166534;
}

.badge.weekend {
    background: rgba(99, 102, 241, 0.12);
    color: var(--primary-dark);
}

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

.hidden {
    display: none !important;
}

/* Compact layout tweaks for the calculator page only. */
.calculator-page .page {
    padding: 40px 0 56px;
}

.calculator-page .page-hero {
    padding: 26px;
    margin-bottom: 22px;
}

.tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 16px;
}

.tab {
    appearance: none;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(255, 255, 255, 0.72);
    color: var(--muted);
    padding: 10px 14px;
    border-radius: 999px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.tab:hover {
    border-color: rgba(99, 102, 241, 0.55);
    color: var(--text);
    transform: translateY(-1px);
}

.tab[aria-selected="true"] {
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.45);
    color: var(--primary-dark);
}

.tab:focus {
    outline: none;
}

.tab:focus-visible {
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.18);
}

@media (max-width: 720px) {
    .tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 6px;
        -webkit-overflow-scrolling: touch;
    }

    .tab {
        white-space: nowrap;
        flex: 0 0 auto;
    }
}

.calculator-page .page-hero h1 {
    margin-bottom: 8px;
}

.calculator-page .content-section {
    padding: 18px;
    margin-bottom: 14px;
}

.calculator-page .content-section h2 {
    margin-bottom: 8px;
}

.calculator-page .content-section p {
    margin-top: 4px;
}

.calculator-page .form-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.calculator-page .control {
    padding: 10px 12px;
    border-radius: 12px;
}

.calculator-page .segmented .seg {
    padding: 9px 12px;
}

.calculator-page .chip-row {
    gap: 8px;
    margin-top: 10px;
}

.calculator-page .chip {
    padding: 7px 10px;
}

.calculator-page .result-hero {
    margin-top: 14px;
    padding: 18px;
}

.calculator-page .result-grid {
    gap: 10px;
    margin-top: 12px;
}

.calculator-page .result-card {
    padding: 14px;
}

.calculator-page .big-number {
    font-size: clamp(3.0rem, 7vw, 5.0rem);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 10px 18px;
    font-weight: 600;
    font-size: 0.95rem;
    border: 1px solid transparent;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 12px 24px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-ghost {
    border-color: rgba(99, 102, 241, 0.3);
    color: var(--primary-dark);
    background: rgba(99, 102, 241, 0.08);
}

.hero {
    padding: 72px 0 48px;
}

.hero-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    align-items: center;
    gap: 40px;
}

.hero h1 {
    font-size: clamp(2.2rem, 3vw, 3.4rem);
    line-height: 1.1;
    margin-bottom: 16px;
}

.hero p {
    color: var(--muted);
    font-size: 1.05rem;
    margin-bottom: 24px;
}

.hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.hero-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 28px;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.hero-card h3 {
    font-size: 1.1rem;
    margin-bottom: 12px;
}

.hero-list {
    display: grid;
    gap: 12px;
}

.hero-list li {
    list-style: none;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    background: var(--surface-alt);
    font-weight: 500;
    color: var(--text);
}

.section {
    padding: 60px 0;
}

.section.surface {
    background: rgba(255, 255, 255, 0.75);
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.section-header {
    margin-bottom: 32px;
}

.section-header h2 {
    font-size: clamp(1.7rem, 2.4vw, 2.4rem);
    margin-bottom: 12px;
}

.section-header p {
    color: var(--muted);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.card {
    background: var(--surface);
    padding: 20px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

.card h3 {
    margin-bottom: 8px;
    font-size: 1.05rem;
}

.card p {
    color: var(--muted);
    font-size: 0.95rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat {
    background: var(--surface);
    padding: 22px;
    border-radius: var(--radius-md);
    text-align: center;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.stat strong {
    display: block;
    font-size: 1.6rem;
    margin-bottom: 6px;
}

.stat span {
    color: var(--muted);
    font-size: 0.9rem;
}

.cta {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(34, 197, 94, 0.12));
    border-radius: var(--radius-lg);
    padding: 48px;
    display: grid;
    gap: 20px;
    align-items: center;
}

.cta h2 {
    font-size: clamp(1.8rem, 2.4vw, 2.6rem);
}

.download-page {
    background: linear-gradient(180deg, #eef2ff 0%, #f8fafc 45%, #ffffff 100%);
}

.download-hero {
    padding: 80px 0 60px;
}

.download-hero-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    align-items: center;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--primary-dark);
    background: rgba(99, 102, 241, 0.12);
    padding: 6px 12px;
    border-radius: 999px;
    margin-bottom: 16px;
}

.download-hero h1 {
    font-size: clamp(2.2rem, 3vw, 3.4rem);
    line-height: 1.1;
    margin-bottom: 16px;
}

.download-hero p {
    color: var(--muted);
    font-size: 1.05rem;
    margin-bottom: 22px;
}

.download-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.device-pills {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.pill {
    background: var(--surface);
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 0.85rem;
    color: var(--muted);
}

.download-panel {
    display: grid;
    gap: 16px;
}

.panel-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 22px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.panel-card h3 {
    margin-bottom: 10px;
    font-size: 1.05rem;
}

.panel-card ol,
.panel-card ul {
    margin-left: 18px;
    color: var(--muted);
    display: grid;
    gap: 8px;
}

.panel-card.highlight {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(34, 197, 94, 0.08));
}

.download-section {
    padding: 60px 0;
}

.download-section.surface {
    background: rgba(255, 255, 255, 0.85);
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.store-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.store-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 26px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
    display: grid;
    gap: 10px;
}

.store-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: rgba(99, 102, 241, 0.12);
    color: var(--primary-dark);
    font-size: 1.2rem;
    font-weight: 700;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.page {
    padding: 56px 0 80px;
}

.plain-page {
    background: #f8fafc;
}

.plain-page .page {
    padding-top: 80px;
}

.plain-page .page-hero {
    background: transparent;
    box-shadow: none;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: var(--radius-md);
}

.plain-page .page-hero h1 {
    font-size: clamp(1.9rem, 2.4vw, 2.5rem);
}

.plain-page .content-section {
    border-left: 4px solid rgba(99, 102, 241, 0.4);
    background: #ffffff;
}

.plain-page .content-section h2 {
    font-size: 1.1rem;
    color: var(--text);
}

.plain-page .site-footer {
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    margin-top: 32px;
}

.page-hero {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 36px;
    box-shadow: var(--shadow);
    margin-bottom: 32px;
}

.page-hero h1 {
    font-size: clamp(2rem, 2.8vw, 2.8rem);
    margin-bottom: 12px;
}

.page-hero p {
    color: var(--muted);
}

.content-section {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.05);
    margin-bottom: 18px;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.content-section h2 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.content-section p,
.content-section li {
    color: var(--muted);
    font-size: 0.95rem;
}

.content-section ul {
    margin-left: 18px;
    display: grid;
    gap: 8px;
}

.site-footer {
    padding: 40px 0 50px;
    color: var(--muted);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.small {
    font-size: 0.85rem;
}

@media (max-width: 720px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
        padding: 14px 0;
        gap: 12px;
    }

    .header-left {
        width: 100%;
        justify-content: space-between;
        gap: 12px;
    }

    .menu-btn {
        display: inline-flex;
        margin-left: auto;
    }

    /* Collapse nav by default on mobile; toggle via .nav-open on header. */
    .nav {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding-top: 10px;
    }

    .site-header.nav-open .nav {
        display: flex;
    }

    .header-cta {
        display: none !important;
    }

    .nav .nav-cta {
        display: inline;
    }

    .nav a {
        padding: 8px 0;
        width: 100%;
    }

    .nav a.active::after {
        display: none;
    }

    .nav {
        gap: 14px;
    }

    .nav a.active::after {
        bottom: -6px;
    }

    .header-content > .btn {
        width: 100%;
    }

    .hero {
        padding-top: 48px;
    }

    .hero-grid {
        gap: 26px;
    }

    .hero-card {
        padding: 20px;
    }

    .section {
        padding: 44px 0;
    }

    .cta {
        padding: 32px;
    }

    .download-hero {
        padding: 56px 0 40px;
    }

    .download-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .download-actions .btn {
        width: 100%;
    }

    .page {
        padding: 40px 0 60px;
    }

    .plain-page .page {
        padding-top: 60px;
    }

    .page-hero {
        padding: 22px;
        margin-bottom: 22px;
    }

    .content-section {
        padding: 18px;
    }

    .footer-links {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 12px 16px;
    }

    /* Calculator: one-column forms/results and better wrapping for inline controls. */
    .calculator-page .page {
        padding: 28px 0 44px;
    }

    .calculator-page .page-hero {
        padding: 18px;
        margin-bottom: 16px;
    }

    .calculator-page .content-section {
        padding: 16px;
    }

    .calculator-page .form-grid {
        grid-template-columns: 1fr;
    }

    .calculator-page .result-grid {
        grid-template-columns: 1fr;
    }

    .inline-controls {
        flex-wrap: wrap;
        align-items: stretch;
    }

    .inline-controls .btn {
        flex: 0 0 auto;
    }

    .inline-controls .control {
        flex: 1 1 140px;
        max-width: none !important;
    }

    .calculator-page .big-number {
        font-size: clamp(2.6rem, 10vw, 4.4rem);
    }
}