:root {
    --bg: #f8fafc;            /* page background — very light slate */
    --surface: #ffffff;        /* cards, forms */
    --surface-2: #f1f5f9;      /* alt surface (section stripes) */
    --border: #e2e8f0;         /* light slate borders */
    --border-strong: #cbd5e1;  /* input borders, dividers */
    --text: #0f172a;           /* body text — near black */
    --text-strong: #020617;    /* headings */
    --muted: #64748b;          /* secondary text */
    --primary: #4f46e5;        /* indigo-600 — slightly darker for light-bg contrast */
    --primary-hover: #4338ca;
    --primary-tint: #eef2ff;   /* light indigo wash */
    --success: #16a34a;
    --success-tint: #dcfce7;
    --warn: #d97706;
    --warn-tint: #fef3c7;
    --error: #dc2626;
    --error-tint: #fee2e2;
    --shadow: 0 1px 3px 0 rgba(15, 23, 42, .06), 0 1px 2px 0 rgba(15, 23, 42, .04);
    --shadow-lg: 0 10px 25px -5px rgba(15, 23, 42, .08), 0 4px 10px -3px rgba(15, 23, 42, .04);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

.container      { max-width: 1080px; margin: 0 auto; padding: 0 1.25rem; }
.container-narrow { max-width: 680px; margin: 0 auto; padding: 0 1.25rem; }

/* ============================================================ */
/* Header                                                       */
/* ============================================================ */
.site-nav {
    background: rgba(255, 255, 255, .9);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 50;
}
.nav-inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.brand {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text);
    text-decoration: none;
}
.brand-icon {
    display: inline-flex;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: white;
    border-radius: 8px;
    font-size: 1rem;
}
.nav-links { display: flex; gap: 1.5rem; }
.nav-link {
    color: var(--muted);
    text-decoration: none;
    font-size: .9rem;
    font-weight: 500;
    transition: color .15s;
}
.nav-link:hover, .nav-link.active { color: var(--text); }

/* Announcement */
.announcement {
    background: #d97706;
    color: white;
    text-align: center;
    padding: .7rem 1rem;
    font-size: .88rem;
    font-weight: 500;
    transition: background .3s;
}
.announcement-ok   { background: #1e40af; }   /* blue — info */
.announcement-warn { background: #d97706; }   /* amber — degraded */
.announcement-fail { background: #b91c1c; }   /* red — shutdown */
.alert-icon { margin-right: .4rem; }

/* ============================================================ */
/* Hero                                                         */
/* ============================================================ */
.hero {
    padding: 4rem 0 3rem;
    text-align: center;
    background: radial-gradient(ellipse at top, rgba(99, 102, 241, .08), transparent 60%);
}
.hero h1 {
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.1;
    margin-bottom: 1rem;
    color: var(--text-strong);
}
.lede {
    font-size: 1.15rem;
    color: var(--muted);
    max-width: 36rem;
    margin: 0 auto 2.5rem;
}

.search-wrap {
    position: relative;
    max-width: 560px;
    margin: 0 auto 2rem;
}
.search-wrap input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    font-size: 1rem;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    border-radius: 12px;
    font-family: inherit;
    transition: border-color .15s;
}
.search-wrap input:focus { outline: none; border-color: var(--primary); }
.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    opacity: .6;
}

.quick-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: .75rem;
    max-width: 880px;
    margin: 0 auto 2.5rem;
}
.quick-btn {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: .8rem .5rem;
    text-align: center;
    text-decoration: none;
    color: var(--text);
    cursor: pointer;
    transition: background .15s, border-color .15s, transform .1s;
    font-family: inherit;
}
.quick-btn:hover { background: var(--surface-2); border-color: var(--primary); }
.quick-btn:active { transform: scale(.97); }
.quick-btn .qb-code { font-weight: 700; font-size: 1rem; display: block; }
.quick-btn .qb-city { font-size: .75rem; color: var(--muted); display: block; margin-top: .15rem; }

.scroll-cta {
    display: inline-flex;
    align-items: center;
    gap: .75rem;
    padding: 1.1rem 2.5rem;
    background: var(--primary);
    color: #ffffff;
    border: none;
    border-radius: 999px;
    font-size: 1.2rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(79, 70, 229, .35);
    transition: background .15s, transform .1s, box-shadow .15s;
}
.scroll-cta:hover {
    background: var(--primary-hover);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, .45);
}
.scroll-cta:active {
    transform: translateY(0);
}

/* ============================================================ */
/* Airport cards grid                                           */
/* ============================================================ */
.airports-section { padding: 3rem 0 4rem; }
.airport-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
}
.airport-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.25rem 1.4rem;
    box-shadow: var(--shadow);
    transition: border-color .15s, transform .1s, box-shadow .15s;
}
.airport-card:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.airport-card-flash {
    animation: flash-border 1.2s ease-out;
}
@keyframes flash-border {
    0%   { box-shadow: 0 0 0 0 rgba(99, 102, 241, .6); border-color: var(--primary); }
    100% { box-shadow: 0 0 0 12px rgba(99, 102, 241, 0); }
}
.ac-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: .3rem;
}
.ac-code {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: .02em;
    color: var(--text-strong);
    display: inline-flex;
    align-items: center;
    gap: .6rem;
}
.ac-tag {
    font-size: .6rem;
    font-weight: 800;
    letter-spacing: .08em;
    padding: .2rem .45rem;
    border-radius: 4px;
    font-family: ui-monospace, monospace;
}
.ac-tag-live  { background: var(--success-tint); color: #15803d; box-shadow: inset 0 0 0 1px #86efac; }
.ac-tag-est   { background: #f1f5f9; color: #475569; box-shadow: inset 0 0 0 1px #cbd5e1; }
.ac-tag-crowd { background: var(--warn-tint); color: #b45309; box-shadow: inset 0 0 0 1px #fbbf24; }

/* Airport code/name as link — no default blue underline */
.ac-code-link, .ac-name-link {
    color: inherit;
    text-decoration: none;
    transition: color .15s;
}
.ac-code-link:hover, .ac-name-link:hover { color: var(--primary); }
.ac-status {
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: .25rem .6rem;
    border-radius: 999px;
}
.ac-status.low      { background: var(--success-tint); color: #15803d; }
.ac-status.moderate { background: var(--warn-tint);    color: #b45309; }
.ac-status.high     { background: var(--error-tint);   color: #b91c1c; }

.ac-name  { font-size: .95rem; color: var(--text); }
.ac-loc   { font-size: .82rem; color: var(--muted); margin-bottom: 1rem; }

.ac-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .65rem 0;
    border-top: 1px solid var(--border);
    font-size: .9rem;
}
.ac-row-label { color: var(--muted); display: flex; align-items: center; gap: .4rem; }
.ac-row-val { font-weight: 700; font-size: 1.05rem; color: var(--text); }
.ac-row-precheck .ac-row-val { color: var(--primary); }
.ac-check-icon { color: var(--primary); font-size: .9rem; }

.ac-updated {
    margin-top: .6rem;
    padding-top: .6rem;
    border-top: 1px solid var(--border);
    font-size: .75rem;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: .4rem;
}

.ac-crowd {
    font-size: .75rem;
    color: var(--warn);
    padding-top: .3rem;
}

/* Report form */
.ac-report-btn {
    width: 100%;
    margin-top: .6rem;
    padding: .45rem .8rem;
    background: transparent;
    border: 1px dashed var(--border);
    border-radius: 8px;
    color: var(--muted);
    font-size: .8rem;
    font-family: inherit;
    cursor: pointer;
    transition: color .15s, border-color .15s;
}
.ac-report-btn:hover { color: var(--warn); border-color: var(--warn); }

.ac-report-form {
    margin-top: .6rem;
    padding: .8rem;
    background: rgba(245, 158, 11, .06);
    border: 1px solid rgba(245, 158, 11, .2);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: .6rem;
}
.ac-report-row {
    display: flex;
    gap: .6rem;
    align-items: center;
}
.ac-radio {
    display: flex;
    align-items: center;
    gap: .3rem;
    font-size: .82rem;
    color: var(--text);
    cursor: pointer;
}
.ac-radio input { width: auto; }
.ac-report-minutes {
    flex: 1;
    padding: .4rem .6rem;
    font-size: .85rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-family: inherit;
}
.ac-report-submit {
    padding: .4rem .8rem;
    background: var(--warn);
    color: #000;
    border: none;
    border-radius: 6px;
    font-size: .8rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: opacity .15s;
}
.ac-report-submit:hover { opacity: .85; }
.ac-report-submit:disabled { opacity: .5; cursor: wait; }

.ac-report-msg { font-size: .78rem; display: none; }
.ac-report-msg-success { display: block; color: #15803d; }
.ac-report-msg-error { display: block; color: #b91c1c; }

.no-results {
    text-align: center;
    padding: 3rem 0;
    color: var(--muted);
}

/* ============================================================ */
/* Why / feature cards                                          */
/* ============================================================ */
.why-section { padding: 4rem 0; background: var(--surface-2); }
.section-head { text-align: center; margin-bottom: 2.5rem; }
.section-head h2 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 800;
    margin-bottom: .5rem;
    color: var(--text-strong);
    letter-spacing: -0.02em;
}
.section-head p { color: var(--muted); max-width: 36rem; margin: 0 auto; }

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
    max-width: 960px;
    margin: 0 auto;
}
.feature-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.75rem;
    box-shadow: var(--shadow);
}
.feature-icon {
    width: 44px;
    height: 44px;
    background: rgba(99, 102, 241, .15);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 1rem;
}
.feature-card h3 { font-size: 1.1rem; margin-bottom: .5rem; color: var(--text-strong); }
.feature-card p  { color: var(--muted); font-size: .92rem; }

/* Primary (middle) feature card — indigo bg, white text.
   Placed AFTER base rules so these overrides win at same specificity. */
.feature-card-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
}
.feature-card-primary h3 { color: #ffffff; }
.feature-card-primary p  { color: rgba(255, 255, 255, .9); }
.feature-card-primary .feature-icon { background: rgba(255, 255, 255, .2); }

/* ============================================================ */
/* Calculator section                                           */
/* ============================================================ */
.calc-section { padding: 4rem 0; }

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.75rem;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
.card-title { font-size: 1.5rem; color: var(--text-strong); }
.card-sub   { color: var(--muted); font-size: .95rem; margin-top: -.75rem; }

.field { display: flex; flex-direction: column; gap: .4rem; }
.field label { font-size: .85rem; font-weight: 600; color: var(--text); }

input, select {
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    padding: .65rem .8rem;
    color: var(--text);
    font-size: .95rem;
    font-family: inherit;
    width: 100%;
    transition: border-color .15s;
}
input:focus, select:focus {
    outline: none;
    border-color: var(--primary);
}

.row { display: flex; gap: .75rem; align-items: flex-end; }
.row > .field { flex: 1 0 auto; }
.flex-1 { flex: 1; } .flex-2 { flex: 2; } .flex-3 { flex: 3; }

.hint { font-size: .75rem; color: var(--muted); margin-top: .2rem; }

.tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    padding: 3px;
    gap: 2px;
}
.tab {
    background: transparent;
    border: none;
    color: var(--muted);
    padding: .55rem;
    border-radius: 6px;
    font-size: .88rem;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s, color .15s;
    font-family: inherit;
}
.tab.active { background: var(--primary); color: #fff; }

.pane { display: none; flex-direction: column; gap: 1rem; }
.pane.active { display: flex; }

.toggle-row { display: flex; align-items: center; gap: .75rem; font-size: .95rem; }

.switch { position: relative; display: inline-block; width: 40px; height: 22px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute; cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--border-strong);
    border-radius: 22px;
    transition: background .2s;
}
.slider:before {
    position: absolute;
    content: "";
    height: 16px; width: 16px;
    left: 3px; top: 3px;
    background: white;
    border-radius: 50%;
    transition: transform .2s;
}
.switch input:checked + .slider { background: var(--primary); }
.switch input:checked + .slider:before { transform: translateX(18px); }

.radio-group { display: flex; gap: 1.5rem; font-size: .9rem; }
.radio-group label { display: flex; align-items: center; gap: .4rem; cursor: pointer; }
.radio-group input { width: auto; }
.radio-group.indent { padding-left: 3.5rem; }
.radio-group[aria-disabled="true"] { opacity: .4; pointer-events: none; }

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    padding: .9rem 1.2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background .15s, transform .1s;
}
.btn-primary:hover { background: var(--primary-hover); }
.btn-primary:active { transform: scale(.98); }

.status-line {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .85rem;
    color: var(--muted);
}
.spinner {
    width: 14px; height: 14px;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.alert {
    padding: .75rem 1rem;
    border-radius: 8px;
    font-size: .85rem;
    display: flex;
    align-items: flex-start;
    gap: .5rem;
}
.alert-error {
    background: var(--error-tint);
    color: #b91c1c;
    border: 1px solid #fca5a5;
}
.alert-success {
    background: var(--success-tint);
    color: #15803d;
    border: 1px solid #86efac;
}
.alert-warn {
    background: var(--warn-tint);
    color: #b45309;
    border: 1px solid #fbbf24;
}

.result {
    margin-top: .5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.result-hero {
    text-align: center;
    padding: 1.5rem;
    background: rgba(99, 102, 241, .08);
    border: 1px solid rgba(99, 102, 241, .3);
    border-radius: 12px;
}
.result-hero-label {
    font-size: .9rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: .4rem;
}
.result-hero-time {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.03em;
}
.breakdown {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1rem 1.2rem;
}
.breakdown h3 {
    font-size: .9rem;
    color: var(--text);
    margin-bottom: .75rem;
}
.breakdown-row {
    display: flex;
    justify-content: space-between;
    padding: .4rem 0;
    font-size: .88rem;
}
.breakdown-row span:first-child { color: var(--muted); }
.breakdown-total {
    border-top: 1px solid var(--border);
    margin-top: .5rem;
    padding-top: .7rem;
    font-weight: 700;
    color: var(--text-strong);
}
.tag {
    display: inline-block;
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: .15rem .5rem;
    border-radius: 10px;
    margin-left: .5rem;
}
.tag-auto { background: var(--success-tint); color: #15803d; }
.tag-manual { background: #f1f5f9; color: var(--muted); }

/* ============================================================ */
/* FAQ                                                          */
/* ============================================================ */
.faq-section { padding: 4rem 0; background: var(--surface-2); }
.faq-list { display: flex; flex-direction: column; gap: .8rem; }
.faq-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1rem 1.25rem;
}
.faq-item summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--text-strong);
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: "+";
    font-size: 1.3rem;
    color: var(--muted);
    transition: transform .2s;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item p {
    margin-top: .75rem;
    color: var(--muted);
    font-size: .92rem;
    line-height: 1.6;
}

/* ============================================================ */
/* Footer                                                       */
/* ============================================================ */
.site-footer {
    background: var(--bg);
    border-top: 1px solid var(--border);
    padding: 2rem 0;
}
.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    color: var(--muted);
}
.footer-brand {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-weight: 700;
    color: var(--text);
}

/* ============================================================ */
/* Responsive                                                   */
/* ============================================================ */
@media (max-width: 720px) {
    .quick-grid { grid-template-columns: repeat(3, 1fr); }
    .nav-links { gap: 1rem; font-size: .85rem; }
    .row { flex-direction: column; align-items: stretch; }
    .result-hero-time { font-size: 2.4rem; }
}
@media (max-width: 440px) {
    .quick-grid { grid-template-columns: repeat(2, 1fr); }
}
