:root {
    --navy: #071b2f;
    --navy-2: #0f2f4d;
    --blue: #2277b3;
    --sky: #dbeaf4;
    --yellow: #ffcc24;
    --ink: #17202c;
    --muted: #657386;
    --line: #d8e1e8;
    --bg: #f5f7fa;
    --panel: #ffffff;
    --green: #10724a;
    --red: #b3323a;
    --amber: #a7670e;
    --radius: 7px;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    min-height: 100%;
    color-scheme: light;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    line-height: 1.42;
    letter-spacing: 0;
    overflow-x: hidden;
}

a {
    color: var(--blue);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

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

button,
input,
select,
textarea {
    font: inherit;
}

main {
    flex: 1 0 auto;
    min-height: 0;
}

.site-header > *,
.ops-hero > *,
.split-band > *,
.content-grid > *,
.app-shell > *,
.site-footer > *,
.dashboard-grid > *,
.destination-grid > *,
.fleet-grid > *,
.feature-grid > *,
.landing-hero > *,
.landing-split > *,
.landing-steps > * {
    min-width: 0;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
    min-height: 52px;
    padding: 7px clamp(14px, 3vw, 30px);
    background: rgba(255, 255, 255, 0.97);
    border-bottom: 1px solid var(--line);
}

.brand img {
    width: 158px;
    height: auto;
}

.site-nav,
.site-actions,
.hero-actions,
.filters,
.inline-form,
.site-footer nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.site-nav {
    justify-content: center;
}

.site-actions {
    justify-content: flex-end;
}

.site-nav a,
.site-actions a,
.nav-button {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 8px;
    border: 0;
    border-radius: var(--radius);
    color: var(--ink);
    background: transparent;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 650;
    white-space: nowrap;
}

.site-nav a:hover,
.site-nav a.active,
.site-actions a:hover,
.nav-button:hover {
    background: #edf3f8;
    text-decoration: none;
}

.nav-pill {
    background: var(--navy) !important;
    color: #fff !important;
}

.nav-form {
    margin: 0;
}

.nav-toggle {
    display: none;
    min-height: 32px;
    padding: 5px 9px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    color: var(--ink);
}

.home-shell {
    padding: 18px clamp(14px, 4vw, 38px) 0;
}

.landing-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
    gap: 18px;
    align-items: stretch;
    max-width: 1240px;
    margin: 0 auto;
    padding: 32px clamp(14px, 4vw, 38px) 20px;
}

.landing-copy,
.landing-brand-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.landing-copy {
    display: grid;
    align-content: center;
    min-height: 360px;
    padding: clamp(28px, 5vw, 58px);
    color: #fff;
    background: linear-gradient(135deg, var(--navy), var(--navy-2));
}

.landing-copy h1 {
    margin: 0;
    max-width: 740px;
    font-size: clamp(2.55rem, 5vw, 4.75rem);
    line-height: 0.98;
    letter-spacing: 0;
}

.landing-brand-panel {
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 18px;
    min-height: 360px;
    padding: clamp(22px, 4vw, 42px);
    background: #fff;
}

.landing-brand-panel img {
    width: min(100%, 420px);
}

.route-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 7px;
}

.route-tags span {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    padding: 4px 9px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--navy);
    background: #edf3f8;
    font-weight: 800;
}

.landing-section {
    padding-top: 28px;
    padding-bottom: 28px;
}

.landing-section.alt {
    background: #eef3f7;
    max-width: none;
}

.landing-section.alt > * {
    max-width: 1240px;
    margin-inline: auto;
}

.landing-cards article {
    display: grid;
    gap: 8px;
}

.landing-cards a {
    font-weight: 800;
}

.landing-steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    padding: 0;
    margin: 0 auto;
    list-style: none;
}

.landing-steps li {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
    min-height: 118px;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.landing-steps span {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    color: #fff;
    background: var(--navy);
    font-weight: 850;
}

.landing-steps h3,
.landing-steps p {
    margin: 0;
}

.landing-steps p {
    color: var(--muted);
}

.landing-split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.landing-split article {
    display: grid;
    align-content: start;
    gap: 10px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.landing-split h2,
.landing-split p {
    margin: 0;
}

.landing-final {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
    border-top: 1px solid var(--line);
}

.landing-final h2,
.landing-final p {
    margin: 0;
}

.ops-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(240px, 0.7fr);
    gap: 14px;
    align-items: stretch;
    max-width: 1240px;
    margin: 0 auto;
}

.hero-copy,
.ops-status-panel,
.panel,
.feature-grid article,
.destination-card,
.asset-card,
.join-panel,
.metric,
.auth-panel,
.fleet-item,
.notice,
.award,
.setup-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.hero-copy {
    padding: clamp(22px, 3.5vw, 34px);
    background: linear-gradient(135deg, var(--navy), var(--navy-2));
    color: #fff;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--yellow);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-copy h1,
.page-band h1 {
    margin: 0;
    max-width: 760px;
    font-size: clamp(1.75rem, 3.2vw, 2.65rem);
    line-height: 1.04;
    letter-spacing: 0;
}

.lead {
    max-width: 680px;
    margin: 12px 0 16px;
    color: #dce8f1;
    font-size: 0.98rem;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 7px 12px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-weight: 750;
    cursor: pointer;
    white-space: nowrap;
}

.button:hover {
    text-decoration: none;
}

.button.primary {
    color: var(--navy);
    background: var(--yellow);
}

.button.secondary,
.button.compact {
    color: var(--navy);
    background: #fff;
    border-color: var(--line);
}

.button.compact {
    min-height: 30px;
    padding: 5px 9px;
    font-size: 0.86rem;
}

.button.danger {
    color: #fff;
    background: var(--red);
}

.ops-status-panel {
    display: grid;
    align-content: start;
    gap: 12px;
    padding: 14px;
}

.ops-status-panel img {
    width: 190px;
    max-width: 100%;
}

.ops-status-panel dl,
.detail-grid,
dl {
    display: grid;
    gap: 8px;
}

.ops-status-panel dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

dt {
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
}

dd {
    margin: 0;
    font-weight: 800;
}

.stats-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1px;
    max-width: 1240px;
    margin: 12px auto 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--line);
}

.stats-strip div {
    min-height: 58px;
    padding: 10px 12px;
    background: #fff;
}

.stats-strip span,
.metric span {
    display: block;
    color: var(--navy-2);
    font-size: 1.06rem;
    font-weight: 850;
    overflow-wrap: anywhere;
}

.stats-strip small,
.metric small {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.page-band,
.split-band {
    max-width: 1240px;
    margin: 0 auto;
    padding: 20px clamp(14px, 4vw, 38px);
}

.page-band.compact {
    padding-top: 20px;
}

.page-band > .split-band {
    padding-inline: 0;
}

.section-heading {
    max-width: 720px;
    margin: 0 auto 14px;
    text-align: center;
}

.section-heading.left {
    margin-inline: 0;
    text-align: left;
}

.section-heading h2,
.workspace-heading h1 {
    margin: 0;
    font-size: clamp(1.2rem, 2vw, 1.65rem);
    line-height: 1.08;
    letter-spacing: 0;
}

.feature-grid,
.destination-grid,
.fleet-grid,
.dashboard-grid,
.award-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.feature-grid.wide,
.destination-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature-grid article,
.destination-card,
.asset-card,
.panel,
.join-panel,
.metric,
.auth-panel,
.notice,
.award {
    padding: 12px;
}

.feature-grid article,
.destination-card,
.asset-card,
.fleet-item {
    height: 100%;
}

.feature-grid article h3,
.feature-grid article h2,
.panel h2,
.asset-card h2,
.destination-card h2 {
    margin: 0 0 6px;
    font-size: 1.05rem;
}

.feature-grid article p,
.destination-card p,
.asset-card p,
.panel p {
    margin: 0;
    color: var(--muted);
}

.split-band {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    gap: 14px;
}

.compact-split {
    padding-top: 8px;
}

.fleet-list {
    display: grid;
    gap: 9px;
}

.fleet-item {
    display: grid;
    gap: 6px;
    padding: 11px 13px;
}

meter {
    width: 100%;
    height: 10px;
}

.table-wrap {
    width: 100%;
    overflow-x: visible;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.table-wrap h2 {
    margin: 14px 14px 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
}

th,
td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
    overflow-wrap: anywhere;
    word-break: normal;
}

th {
    color: var(--navy);
    background: #edf3f8;
    font-size: 0.76rem;
    font-weight: 850;
    text-transform: uppercase;
}

.chip {
    min-height: 30px;
    padding: 5px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    cursor: pointer;
    font-weight: 700;
}

.filters {
    margin: 0 auto 14px;
}

.stats-strip.inline {
    margin-top: 0;
    margin-bottom: 20px;
}

.chip.active {
    color: #fff;
    background: var(--navy-2);
    border-color: var(--navy-2);
}

.destination-card span,
.status,
.rank-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--sky);
    color: var(--navy-2);
    font-size: 0.76rem;
    font-weight: 800;
}

.status-grounded,
.status-rejected {
    background: #fde8e8;
    color: var(--red);
}

.status-maintenance,
.status-pending {
    background: #fff1d2;
    color: var(--amber);
}

.asset-card header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.destination-card dl,
.asset-card dl,
.detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 12px;
}

.live-map {
    width: 100%;
    height: min(54vh, 520px);
    min-height: 320px;
    margin-bottom: 14px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #dbe7ef;
}

.vatsim-radar-block {
    display: grid;
    gap: 12px;
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
}

.vatsim-radar-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}

.vatsim-radar-header h2 {
    margin: 0;
    font-size: clamp(1.4rem, 2.3vw, 2rem);
}

.vatsim-radar-header p:not(.eyebrow) {
    max-width: 680px;
    margin: 6px 0 0;
    color: var(--muted);
}

.vatsim-radar-map {
    margin-bottom: 0;
}

.vatsim-radar-status {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 30px;
    width: fit-content;
    max-width: 100%;
    padding: 5px 10px;
    color: var(--navy-2);
    background: var(--sky);
    border-radius: 999px;
    font-size: 0.86rem;
    font-weight: 800;
}

.vatsim-radar-table {
    margin-top: 0;
}

.join-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
    gap: 14px;
}

.steps {
    display: grid;
    gap: 10px;
    padding: 0;
    list-style: none;
}

.steps li {
    display: grid;
    gap: 3px;
    padding: 11px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.content-narrow {
    max-width: 780px;
    margin: 0 auto;
}

.legal-copy p {
    font-size: 0.98rem;
}

.auth-shell {
    display: grid;
    place-items: center;
    min-height: calc(100vh - 52px);
    padding: 22px 14px;
    background: var(--navy);
}

.auth-panel {
    width: min(100%, 420px);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.form-grid h2,
.form-grid .full,
.form-grid button {
    grid-column: 1 / -1;
}

.form-grid h2 {
    margin: 6px 0 0;
    padding-top: 12px;
    border-top: 1px solid var(--line);
    font-size: 0.98rem;
}

label {
    display: grid;
    gap: 5px;
    color: var(--navy);
    font-size: 0.88rem;
    font-weight: 750;
}

input,
select,
textarea {
    width: 100%;
    min-height: 34px;
    padding: 6px 9px;
    border: 1px solid #c8d3dc;
    border-radius: var(--radius);
    background: #fff;
    color: var(--ink);
}

textarea {
    resize: vertical;
}

.flash {
    max-width: 1240px;
    margin: 12px auto;
    padding: 10px 13px;
    border: 1px solid #b5d3e8;
    border-radius: var(--radius);
    background: #e7f1f8;
}

.flash-success {
    background: #e7f6ee;
    border-color: #b7dfc8;
    color: var(--green);
}

.flash-danger {
    background: #fde8e8;
    border-color: #f4b7b9;
    color: var(--red);
}

.flash-warning {
    background: #fff3d7;
    border-color: #f0d48c;
    color: var(--amber);
}

.app-shell {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    min-height: calc(100vh - 52px);
}

.side-nav {
    position: sticky;
    top: 52px;
    display: grid;
    align-content: start;
    gap: 5px;
    min-height: calc(100vh - 52px);
    padding: 14px 12px;
    background: var(--navy);
    color: #fff;
}

.side-nav a {
    min-height: 32px;
    padding: 6px 8px;
    border-radius: var(--radius);
    color: #e7f1f8;
    font-weight: 700;
}

.side-nav a:hover {
    background: var(--navy-2);
    text-decoration: none;
}

.workspace {
    padding: 18px clamp(14px, 3vw, 30px);
}

.workspace-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.panel {
    margin-bottom: 12px;
}

.panel header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.booking-summary,
.notice,
.award {
    display: grid;
    gap: 6px;
}

.app-split {
    padding: 0;
}

.inline-form input,
.inline-form select {
    width: auto;
    min-width: 116px;
}

.site-footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) minmax(0, 0.95fr);
    gap: 18px;
    padding: 18px clamp(14px, 4vw, 38px);
    color: #d7e4ef;
    background: var(--navy);
}

.site-footer a {
    color: #fff;
    white-space: nowrap;
}

.site-footer nav {
    justify-content: flex-end;
}

.site-footer p {
    margin: 4px 0 0;
}

.disclaimer {
    font-size: 0.86rem;
}

code {
    padding: 2px 5px;
    border-radius: 5px;
    background: #edf4f9;
}

.setup-body {
    background: #eef3f7;
}

.setup-shell {
    display: grid;
    place-items: start center;
    min-height: 100vh;
    padding: 28px 14px;
}

.setup-card {
    width: min(100%, 820px);
    padding: 18px;
}

.setup-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}

.setup-brand img {
    width: 180px;
}

.setup-brand span {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.setup-card h1 {
    margin: 0 0 12px;
    font-size: 1.42rem;
}

@media (max-width: 980px) {
    .site-header {
        grid-template-columns: auto auto;
    }

    .brand img {
        width: 145px;
    }

    .nav-toggle {
        display: inline-flex;
        justify-self: end;
        align-items: center;
    }

    .site-nav,
    .site-actions {
        display: none;
        grid-column: 1 / -1;
        justify-content: flex-start;
    }

    .site-nav.open,
    .site-actions.open {
        display: flex;
    }

    .ops-hero,
    .landing-hero,
    .landing-split,
    .split-band,
    .join-layout,
    .feature-grid.wide,
    .destination-grid,
    .site-footer {
        grid-template-columns: 1fr;
    }

    .landing-copy,
    .landing-brand-panel {
        min-height: auto;
    }

    .landing-steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stats-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .site-footer nav {
        justify-content: flex-start;
    }

    .app-shell {
        grid-template-columns: 1fr;
    }

    .side-nav {
        position: static;
        min-height: auto;
        grid-auto-flow: column;
        overflow-x: auto;
    }

    .workspace-heading {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 680px) {
    body {
        font-size: 14px;
    }

    .hero-copy h1,
    .page-band h1 {
        font-size: 1.75rem;
    }

    .landing-hero {
        padding-top: 20px;
    }

    .landing-copy {
        padding: 24px;
    }

    .landing-copy h1 {
        font-size: 2.3rem;
    }

    .landing-steps {
        grid-template-columns: 1fr;
    }

    .landing-final {
        align-items: flex-start;
        flex-direction: column;
    }

    .vatsim-radar-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .form-grid,
    .destination-card dl,
    .asset-card dl,
    .detail-grid,
    .ops-status-panel dl {
        grid-template-columns: 1fr;
    }

    .stats-strip {
        grid-template-columns: 1fr;
    }

    table,
    thead,
    tbody,
    tr,
    th,
    td {
        display: block;
        width: 100%;
    }

    thead {
        display: none;
    }

    tr {
        padding: 8px 0;
        border-bottom: 1px solid var(--line);
    }

    td {
        display: grid;
        grid-template-columns: minmax(90px, 35%) minmax(0, 1fr);
        gap: 8px;
        border-bottom: 0;
    }

    td::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: 0.72rem;
        font-weight: 850;
        text-transform: uppercase;
    }

    td:not([data-label]) {
        grid-template-columns: 1fr;
    }

    td:not([data-label])::before {
        display: none;
    }

    .inline-form {
        align-items: stretch;
        flex-direction: column;
    }

    .inline-form input,
    .inline-form select,
    .inline-form button {
        width: 100%;
    }
}
