/* ==========================================================================
   trips.flights — design system
   First-class editorial: ivory paper, midnight ink, champagne accents.
   Type: Cormorant Garamond (display) · Source Serif 4 (body) · IBM Plex Mono (data)
   ========================================================================== */

:root {
    --paper: #F6F3EB;
    --paper-raised: #FCFAF4;
    --paper-deep: #EDE7DA;
    --ink: #14243E;
    --ink-body: #24324E;
    --ink-soft: #44526C;
    --ink-mute: #66718A;
    --gold: #B9975B;
    --gold-ink: #8A6B34;
    --navy-deep: #0E1930;
    --hairline: rgba(20, 36, 62, 0.14);
    --hairline-gold: rgba(185, 151, 91, 0.4);
    --shadow-soft: 0 1px 2px rgba(20, 36, 62, 0.05), 0 10px 28px -14px rgba(20, 36, 62, 0.22);
    --shadow-lift: 0 2px 4px rgba(20, 36, 62, 0.06), 0 18px 40px -16px rgba(20, 36, 62, 0.3);
    --font-display: 'Cormorant Garamond', 'Iowan Old Style', Georgia, serif;
    --font-body: 'Source Serif 4', 'Iowan Old Style', Georgia, serif;
    --font-mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--ink-body);
    background-color: var(--paper);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

::selection {
    background: rgba(185, 151, 91, 0.32);
}

:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
    border-radius: 2px;
}

img {
    max-width: 100%;
}

[hidden] {
    display: none !important;
}

a {
    color: inherit;
}

button {
    font: inherit;
    color: inherit;
    background: none;
    border: none;
    cursor: pointer;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.container--narrow {
    max-width: 980px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   Masthead & navigation
   ========================================================================== */

.masthead {
    background: var(--ink);
    color: var(--paper);
}

.masthead-brand {
    text-align: center;
    padding: 1.9rem 20px 1.5rem;
}

.masthead--home .masthead-brand {
    padding: 2.75rem 20px 2.1rem;
}

.wordmark {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.9rem;
    letter-spacing: 0.02em;
    color: var(--paper);
    text-decoration: none;
    line-height: 1;
}

.masthead--home .wordmark {
    font-size: 3rem;
}

.wordmark .dot {
    color: var(--gold);
}

.brand-rule {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.9rem;
    margin-top: 1rem;
    color: var(--gold);
}

.brand-rule::before,
.brand-rule::after {
    content: '';
    width: 72px;
    border-top: 1px solid var(--hairline-gold);
}

.brand-rule svg {
    width: 15px;
    height: 15px;
    display: block;
}

.mainnav {
    position: sticky;
    top: 0;
    z-index: 90;
    background: var(--ink);
    border-bottom: 1px solid var(--hairline-gold);
}

.mainnav-inner {
    display: flex;
    justify-content: center;
    gap: 2.4rem;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding: 0 20px;
}

.mainnav-inner::-webkit-scrollbar {
    display: none;
}

.mainnav a {
    flex-shrink: 0;
    display: inline-block;
    padding: 0.85rem 0.1rem 0.75rem;
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    text-decoration: none;
    color: rgba(246, 243, 235, 0.68);
    border-bottom: 2px solid transparent;
    transition: color 0.2s ease;
}

.mainnav a:hover {
    color: var(--paper);
}

.mainnav a.current {
    color: var(--paper);
    border-bottom-color: var(--gold);
}

/* ==========================================================================
   Route strip — the signature. Mono airport codes joined by a dashed
   champagne line with a plane that advances on hover.
   ========================================================================== */

.route {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.route-code {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 0.92rem;
    letter-spacing: 0.07em;
    color: var(--ink);
}

.route-track {
    position: relative;
    flex: 1;
    min-width: 56px;
    height: 16px;
}

.route-track::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    border-top: 1px dashed var(--hairline-gold);
}

.route-plane {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 15px;
    height: 15px;
    color: var(--gold-ink);
    background: transparent;
    transition: left 0.5s cubic-bezier(0.3, 0.7, 0.3, 1);
}

.route-plane svg {
    display: block;
    width: 100%;
    height: 100%;
}

a:hover .route-plane,
.card:hover .route-plane,
.feature:hover .route-plane {
    left: 68%;
}

.route--lg .route-code {
    font-size: 1.08rem;
}

.route--lg .route-plane {
    width: 18px;
    height: 18px;
}

/* ==========================================================================
   Eyebrows, labels, notes
   ========================================================================== */

.eyebrow {
    font-family: var(--font-mono);
    font-size: 0.67rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold-ink);
}

.field-note {
    max-width: 56ch;
    margin: 0 auto 2.25rem;
    text-align: center;
    font-style: italic;
    font-size: 0.95rem;
    color: var(--ink-mute);
}

.field-note::before {
    content: '';
    display: block;
    width: 42px;
    margin: 0 auto 0.9rem;
    border-top: 1px solid var(--hairline-gold);
}

/* ==========================================================================
   Homepage — filters
   ========================================================================== */

.page-controls {
    padding: 2.4rem 0 0.4rem;
}

.filter-tabs {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.filter-tab {
    font-family: var(--font-body);
    font-size: 1.02rem;
    font-weight: 600;
    color: var(--ink-mute);
    padding-bottom: 0.35rem;
    border-bottom: 2px solid transparent;
    transition: color 0.2s ease;
    text-decoration: none;
}

.filter-tab:hover {
    color: var(--ink);
}

.filter-tab.active {
    color: var(--ink);
    border-bottom-color: var(--gold);
}

.tail-filter {
    display: flex;
    justify-content: flex-start;
    gap: 0.5rem;
    margin: 1.9rem auto 0;
    padding: 0.25rem 0.25rem 0.6rem;
    max-width: 100%;
    width: fit-content;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--hairline) transparent;
}

.tail-filter-item {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 42px;
    background: var(--paper-raised);
    border: 1px solid var(--hairline);
    border-radius: 7px;
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.tail-filter-item img {
    height: 27px;
    width: auto;
}

.tail-filter-item:hover {
    transform: translateY(-2px);
    border-color: var(--hairline-gold);
}

.tail-filter-item.active {
    border-color: var(--gold);
    background: rgba(185, 151, 91, 0.13);
}

/* ==========================================================================
   Homepage — featured report
   ========================================================================== */

.feature {
    display: grid;
    grid-template-columns: 7fr 5fr;
    gap: 2.75rem;
    align-items: center;
    margin: 2.6rem 0 3.2rem;
    text-decoration: none;
}

.feature-media {
    aspect-ratio: 3 / 2;
    overflow: hidden;
    border-radius: 9px;
    box-shadow: var(--shadow-soft);
    background: var(--paper-deep);
}

.feature-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.feature:hover .feature-media img {
    transform: scale(1.025);
}

.feature-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(1.9rem, 3.4vw, 2.7rem);
    line-height: 1.12;
    color: var(--ink);
    margin: 0.8rem 0 1.1rem;
}

.feature .route {
    margin-bottom: 1.1rem;
    max-width: 340px;
}

.feature-excerpt {
    font-size: 0.99rem;
    line-height: 1.7;
    color: var(--ink-soft);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.feature-more {
    display: inline-block;
    margin-top: 1.3rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--gold-ink);
    text-decoration: underline;
    text-decoration-color: var(--hairline-gold);
    text-underline-offset: 5px;
    transition: text-decoration-color 0.2s ease;
}

.feature:hover .feature-more {
    text-decoration-color: var(--gold-ink);
}

.section-rule {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    margin: 0 0 2rem;
}

.section-rule::before,
.section-rule::after {
    content: '';
    flex: 1;
    border-top: 1px solid var(--hairline);
}

.section-rule span {
    font-family: var(--font-mono);
    font-size: 0.67rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ink-mute);
}

/* ==========================================================================
   Cards
   ========================================================================== */

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 1.9rem;
    padding-bottom: 4.5rem;
}

.card {
    display: flex;
    flex-direction: column;
    background: var(--paper-raised);
    border: 1px solid var(--hairline);
    border-radius: 9px;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.3, 1), box-shadow 0.35s ease, border-color 0.35s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lift);
    border-color: var(--hairline-gold);
}

.card.hidden {
    display: none;
}

.card-media {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--paper-deep);
}

.card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.65s ease;
}

.card:hover .card-media img {
    transform: scale(1.045);
}

.card-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: 0.6rem;
    padding: 1.35rem 1.4rem 1.4rem;
}

.card-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.44rem;
    line-height: 1.18;
    color: var(--ink);
}

.card .route {
    margin-top: 0.15rem;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-top: auto;
    padding-top: 0.85rem;
    border-top: 1px solid var(--hairline);
    font-family: var(--font-mono);
    font-size: 0.76rem;
    color: var(--ink-soft);
    letter-spacing: 0.02em;
}

.card-meta .tail {
    height: 30px;
    width: auto;
    margin-left: auto;
    flex-shrink: 0;
}

.card-meta .flag {
    height: 17px;
    width: auto;
    border-radius: 2px;
    flex-shrink: 0;
}

.loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 0;
    font-style: italic;
    color: var(--ink-mute);
}

/* ==========================================================================
   Post page
   ========================================================================== */

.post-head {
    max-width: 780px;
    margin: 3.2rem auto 0;
    padding: 0 20px;
    text-align: center;
}

.post-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(2.3rem, 5vw, 3.3rem);
    line-height: 1.08;
    color: var(--ink);
    margin: 0.9rem 0 1.4rem;
}

.post-head .route {
    max-width: 300px;
    margin: 0 auto;
}

.post-hero {
    max-width: 1020px;
    margin: 2.4rem auto 0;
    padding: 0 20px;
}

.post-hero img {
    display: block;
    width: 100%;
    max-height: 580px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: var(--shadow-soft);
}

.flight-record {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    max-width: 780px;
    margin: 2.4rem auto 0;
    background: var(--paper-raised);
    border: 1px solid var(--hairline);
    border-radius: 9px;
    overflow: hidden;
}

.fr-cell {
    flex: 1 1 auto;
    padding: 0.95rem 1.25rem;
    border-right: 1px solid var(--hairline);
}

.fr-cell:last-child {
    border-right: none;
}

.fr-cell--tail {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.25rem;
}

.fr-cell--tail img {
    height: 42px;
    width: auto;
}

.fr-cell--tail .flag {
    height: 26px;
    border-radius: 3px;
}

.fr-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold-ink);
    margin-bottom: 0.2rem;
    white-space: nowrap;
}

.fr-value {
    font-family: var(--font-mono);
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--ink);
    white-space: nowrap;
}

.post-plane {
    max-width: 640px;
    margin: 2rem auto -0.4rem;
    text-align: center;
}

.post-plane img {
    width: 100%;
    max-width: 580px;
    height: auto;
}

.post-body {
    max-width: 720px;
    margin: 2.8rem auto 0;
    padding: 0 20px;
    font-size: 1.11rem;
    line-height: 1.82;
}

.post-body p {
    margin-bottom: 1.4em;
}

.post-body h2 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.75rem;
    line-height: 1.2;
    color: var(--ink);
    margin: 2.1em 0 0.7em;
}

.post-body h2::after {
    content: '';
    display: block;
    width: 38px;
    margin-top: 0.45rem;
    border-top: 2px solid var(--gold);
}

.post-body h3 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.35rem;
    color: var(--ink);
    margin: 1.8em 0 0.6em;
}

.post-body a {
    color: var(--gold-ink);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.post-body ul,
.post-body ol {
    margin: 0 0 1.4em 1.4em;
}

.post-body li {
    margin-bottom: 0.45em;
}

.post-body img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 7px;
    margin: 2.1rem 0;
    box-shadow: var(--shadow-soft);
    cursor: zoom-in;
}

.post-body blockquote {
    border-left: 2px solid var(--gold);
    padding-left: 1.4rem;
    margin: 1.8rem 0;
    font-style: italic;
    color: var(--ink-soft);
}

.post-body hr {
    border: none;
    height: 16px;
    margin: 3rem auto;
    background: center / 16px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg transform='rotate(90 12 12)' fill='%23B9975B'%3E%3Cpath d='M21 16v-2l-8-5V3.5a1.5 1.5 0 0 0-3 0V9l-8 5v2l8-2.5V19l-2 1.5V22l3.5-1 3.5 1v-1.5L13 19v-5.5l8 2.5z'/%3E%3C/g%3E%3C/svg%3E");
}

.post-body code {
    font-family: var(--font-mono);
    font-size: 0.88em;
    background: var(--paper-deep);
    padding: 0.15em 0.4em;
    border-radius: 4px;
}

.post-body pre {
    background: var(--paper-deep);
    padding: 1.1rem 1.3rem;
    border-radius: 7px;
    overflow-x: auto;
    margin: 1.8rem 0;
}

.post-body pre code {
    background: none;
    padding: 0;
}

/* Pager */

.pager {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.1rem;
    max-width: 760px;
    margin: 3.6rem auto 0;
    padding: 0 20px;
}

.pager-link {
    display: block;
    padding: 1.15rem 1.35rem;
    background: var(--paper-raised);
    border: 1px solid var(--hairline);
    border-radius: 9px;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.pager-link:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
    border-color: var(--hairline-gold);
}

.pager-link--next {
    text-align: right;
}

.pager-link .eyebrow {
    display: block;
    margin-bottom: 0.35rem;
}

.pager-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.12rem;
    line-height: 1.25;
    color: var(--ink);
}

.pager-spacer {
    visibility: hidden;
}

.post-end {
    padding-bottom: 4.5rem;
}

/* Lightbox */

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4vmin;
    background: rgba(9, 15, 27, 0.93);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    cursor: zoom-out;
}

.lightbox.open {
    opacity: 1;
    pointer-events: auto;
}

.lightbox img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 5px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}

/* ==========================================================================
   Database pages (airlines & aircraft)
   ========================================================================== */

.page-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 2.1rem;
    color: var(--ink);
    margin: 2.4rem 0 0.4rem;
}

.page-sub {
    color: var(--ink-mute);
    font-size: 0.96rem;
    margin-bottom: 1.8rem;
}

.db-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.db-search {
    flex: 1;
    min-width: 260px;
}

.db-search input {
    width: 100%;
    padding: 0.85rem 1.15rem;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--ink);
    background: var(--paper-raised);
    border: 1px solid var(--hairline);
    border-radius: 8px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.db-search input::placeholder {
    color: var(--ink-mute);
}

.db-search input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(185, 151, 91, 0.18);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.5rem;
    background: var(--ink);
    color: var(--paper);
    border-radius: 8px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.92rem;
    letter-spacing: 0.03em;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s ease, transform 0.15s ease;
}

.btn:hover {
    background: #1D3358;
}

.btn:active {
    transform: translateY(1px);
}

.db-filters {
    flex-basis: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.6rem;
    padding-top: 0.2rem;
}

.db-filters label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.92rem;
    color: var(--ink-soft);
    cursor: pointer;
}

.db-filters input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--ink);
    cursor: pointer;
}

.db-filters select {
    padding: 0.45rem 0.7rem;
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--ink);
    background: var(--paper-raised);
    border: 1px solid var(--hairline);
    border-radius: 6px;
    cursor: pointer;
}

.db-count {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-mute);
    margin: 0.9rem 0 1.4rem;
}

.db-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(295px, 1fr));
    gap: 1.3rem;
    padding-bottom: 4rem;
}

.db-card {
    display: block;
    padding: 1.2rem 1.3rem 1.25rem;
    background: var(--paper-raised);
    border: 1px solid var(--hairline);
    border-radius: 9px;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.db-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-soft);
    border-color: var(--hairline-gold);
}

.db-card-head {
    display: flex;
    align-items: center;
    gap: 0.95rem;
    margin-bottom: 0.85rem;
}

.db-card-head img {
    width: 54px;
    height: 40px;
    object-fit: contain;
    flex-shrink: 0;
}

.db-card-head h3 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.22rem;
    line-height: 1.15;
    color: var(--ink);
}

.code-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 0.7rem;
}

.code-chip {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    padding: 0.2rem 0.55rem;
    background: var(--paper);
    border: 1px solid var(--hairline);
    border-radius: 5px;
    color: var(--ink-soft);
}

.code-chip b {
    font-weight: 500;
    color: var(--gold-ink);
}

.db-card-country {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.88rem;
    color: var(--ink-soft);
}

.flag-sm {
    width: 21px;
    height: 15px;
    object-fit: cover;
    border-radius: 2px;
    border: 1px solid var(--hairline);
    flex-shrink: 0;
}

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 0;
    font-style: italic;
    color: var(--ink-mute);
}

/* Database detail views */

.detail-view {
    display: none;
}

.detail-view.active {
    display: block;
}

.backlink {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin: 2rem 0 1.4rem;
    font-family: var(--font-mono);
    font-size: 0.76rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gold-ink);
    text-decoration: none;
}

.backlink:hover {
    color: var(--ink);
}

.detail-panel {
    background: var(--paper-raised);
    border: 1px solid var(--hairline);
    border-radius: 10px;
    padding: 2.1rem 2.3rem;
    margin-bottom: 1.6rem;
}

.detail-panel h1 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 2.15rem;
    line-height: 1.1;
    color: var(--ink);
    margin-bottom: 1.4rem;
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto;
    gap: 2.2rem;
    align-items: center;
}

.spec-table {
    width: 100%;
    border-collapse: collapse;
}

.spec-table td {
    padding: 0.5rem 0;
    vertical-align: baseline;
}

.spec-table .label {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--gold-ink);
    white-space: nowrap;
    padding-right: 1.6rem;
}

.spec-table .value {
    font-family: var(--font-mono);
    font-size: 0.93rem;
    color: var(--ink);
}

.detail-media {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    align-items: stretch;
}

.well {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--paper-deep);
    border-radius: 9px;
    padding: 1.1rem;
}

.well--logo {
    background: #FFFFFF;
    border: 1px solid var(--hairline);
}

.well img {
    max-width: 160px;
    max-height: 110px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.stage {
    background: var(--paper-raised);
    border: 1px solid var(--hairline);
    border-radius: 10px;
    padding: 1.9rem 2.3rem 2.3rem;
}

.stage-title {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold-ink);
    margin-bottom: 1.4rem;
}

.stage-floor {
    background: var(--paper-deep);
    border-radius: 9px;
    padding: 2.2rem 1.5rem;
}

/* ==========================================================================
   Map page
   ========================================================================== */

.map-shell {
    position: relative;
    height: calc(100vh - 128px);
    min-height: 460px;
}

#map {
    height: 100%;
    width: 100%;
    background: var(--paper-deep);
}

.map-stat {
    position: absolute;
    top: 16px;
    right: 14px;
    z-index: 600;
    background: var(--paper-raised);
    border: 1px solid var(--hairline);
    border-radius: 10px;
    padding: 0.95rem 1.5rem 1.05rem;
    box-shadow: var(--shadow-soft);
}

.map-stat-num {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 2.5rem;
    line-height: 1;
    color: var(--ink);
}

.map-stat-label {
    font-family: var(--font-mono);
    font-size: 0.64rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold-ink);
    margin-top: 0.35rem;
}

.map-legend {
    position: absolute;
    bottom: 26px;
    right: 12px;
    z-index: 600;
    background: var(--paper-raised);
    border: 1px solid var(--hairline);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    box-shadow: var(--shadow-soft);
    font-size: 0.84rem;
    color: var(--ink-soft);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.45rem;
}

.legend-item:last-child {
    margin-bottom: 0;
}

.legend-color {
    width: 24px;
    height: 15px;
    border-radius: 3px;
    border: 1px solid var(--hairline);
}

/* ==========================================================================
   Footer & tail frieze
   ========================================================================== */

.site-end {
    margin-top: auto;
}

.frieze {
    position: relative;
    overflow: hidden;
    background: var(--navy-deep);
    padding: 1.5rem 0 0.4rem;
}

.frieze::before,
.frieze::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 90px;
    z-index: 2;
    pointer-events: none;
}

.frieze::before {
    left: 0;
    background: linear-gradient(90deg, var(--navy-deep), transparent);
}

.frieze::after {
    right: 0;
    background: linear-gradient(-90deg, var(--navy-deep), transparent);
}

.frieze-track {
    display: flex;
    align-items: center;
    gap: 1.7rem;
    width: max-content;
    animation: frieze-scroll 110s linear infinite;
}

.frieze-track:hover {
    animation-play-state: paused;
}

.frieze-track img {
    height: 42px;
    width: auto;
    display: block;
}

.frieze-track a {
    flex-shrink: 0;
    display: block;
    transition: transform 0.25s ease;
}

.frieze-track a:hover {
    transform: translateY(-3px);
}

@keyframes frieze-scroll {
    to {
        transform: translateX(-50%);
    }
}

.footer {
    background: var(--navy-deep);
    color: rgba(246, 243, 235, 0.68);
    text-align: center;
    padding: 2.1rem 20px 2.7rem;
}

.footer-wordmark {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.35rem;
    color: var(--paper);
    text-decoration: none;
}

.footer-wordmark .dot {
    color: var(--gold);
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.7rem;
    margin: 1.2rem 0 1.4rem;
}

.footer-nav a {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    text-decoration: none;
    color: rgba(246, 243, 235, 0.62);
    transition: color 0.2s ease;
}

.footer-nav a:hover {
    color: var(--paper);
}

.footer-nav a.gold {
    color: var(--gold);
}

.footer-nav a.gold:hover {
    color: #D3B87E;
}

.footer-fine {
    font-size: 0.74rem;
    line-height: 2;
    color: rgba(246, 243, 235, 0.42);
    max-width: 640px;
    margin: 0 auto;
}

.footer-fine a {
    color: rgba(246, 243, 235, 0.58);
    text-decoration: none;
}

.footer-fine a:hover {
    color: var(--paper);
}

/* ==========================================================================
   404
   ========================================================================== */

.lost {
    text-align: center;
    padding: 6rem 20px 7rem;
}

.lost-code {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--gold-ink);
}

.lost h1 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    color: var(--ink);
    margin: 1rem 0 0.8rem;
}

.lost p {
    color: var(--ink-soft);
    max-width: 46ch;
    margin: 0 auto 2rem;
}

/* ==========================================================================
   Layout helpers
   ========================================================================== */

.page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.page main {
    flex: 1;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 920px) {
    .feature {
        grid-template-columns: 1fr;
        gap: 1.6rem;
        margin: 2.2rem 0 2.8rem;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .detail-media {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .masthead--home .wordmark {
        font-size: 2.15rem;
    }

    .masthead--home .masthead-brand {
        padding: 2.1rem 20px 1.6rem;
    }

    .wordmark {
        font-size: 1.6rem;
    }

    .mainnav-inner {
        justify-content: flex-start;
        gap: 1.7rem;
    }

    .filter-tabs {
        gap: 1.4rem;
    }

    .cards {
        gap: 1.4rem;
    }

    .flight-record {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .fr-cell {
        border-right: none;
        border-bottom: 1px solid var(--hairline);
    }

    .fr-cell:nth-child(odd) {
        border-right: 1px solid var(--hairline);
    }

    .fr-cell:last-child,
    .fr-cell:nth-last-child(2):nth-child(odd) {
        border-bottom: none;
    }

    .post-body {
        font-size: 1.04rem;
    }

    .pager {
        grid-template-columns: 1fr;
    }

    .pager-link--next {
        text-align: left;
    }

    .frieze-track img {
        height: 34px;
    }

    .detail-panel {
        padding: 1.5rem 1.4rem;
    }

    .stage {
        padding: 1.4rem 1.4rem 1.6rem;
    }

    .stage-floor {
        padding: 1.4rem 0.9rem;
    }
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .frieze {
        overflow-x: auto;
    }

    .frieze-track {
        animation: none;
    }
}
