/* Flyby list cards — airline accent colours, compact logo in header (not airlines grid hero) */
.sighting-card {
    display: block;
    margin-bottom: 12px;
    text-decoration: none;
    color: inherit;
    border-radius: 4px;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.12s;
}
@media (min-width: 701px) {
    a.sighting-card:hover {
        transform: translateY(-1px);
    }
}
.sighting-card:last-child {
    margin-bottom: 0;
}
a.sighting-card {
    cursor: pointer;
}
a.sighting-card:hover {
    text-decoration: none;
    color: inherit;
}
a.sighting-card:hover *,
a.sighting-card:focus *,
a.sighting-card:focus-visible * {
    text-decoration: none;
}
.sighting-card__shell {
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
    background: var(--white, #fff);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}
html[data-theme="dark"] .sighting-card__shell {
    background: var(--surface, #161a22);
}
.sighting-card--brand .sighting-card__shell {
    border-color: color-mix(in srgb, var(--airline-accent) 22%, var(--border));
}
a.sighting-card--brand:hover .sighting-card__shell {
    border-color: color-mix(in srgb, var(--airline-accent) 48%, var(--link));
    box-shadow: 0 2px 6px color-mix(in srgb, var(--airline-accent) 10%, rgba(0, 0, 0, 0.06));
}
.sighting-card--brand .sighting-card__inner {
    background: linear-gradient(
        165deg,
        color-mix(in srgb, var(--airline-accent) 12%, var(--white, #fff)) 0%,
        color-mix(in srgb, var(--airline-accent-2, var(--airline-accent)) 6%, var(--white, #fff)) 38%,
        var(--white, #fff) 100%
    );
}
html[data-theme="dark"] .sighting-card--brand .sighting-card__inner {
    background: linear-gradient(
        165deg,
        color-mix(in srgb, var(--airline-accent) 16%, var(--surface, #161a22)) 0%,
        var(--surface, #161a22) 72%
    );
}
.sighting-card__inner {
    padding: 12px 14px 14px;
}
.sighting-card__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.sighting-card__op-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.75);
    padding: 2px;
}
html[data-theme="dark"] .sighting-card__op-icon {
    background: rgba(0, 0, 0, 0.25);
}
.sighting-card__ids {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 10px;
    flex: 1;
    min-width: 0;
}
.sighting-card__callsign {
    font-weight: 700;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 16px;
    color: var(--heading);
}
.sighting-card--brand .sighting-card__callsign {
    color: color-mix(in srgb, var(--airline-accent) 78%, var(--heading));
}
.sighting-card__reg {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 13px;
    color: var(--text-muted);
}
.sighting-card__time {
    margin-left: auto;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
}
.sighting-card__route {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 8px;
    padding: 10px 12px;
    background: color-mix(in srgb, var(--surface-alt, #f4f6f9) 88%, transparent);
    border-radius: 4px;
    border: 1px solid var(--border);
}
.sighting-card--brand .sighting-card__route {
    border-color: color-mix(in srgb, var(--airline-accent) 22%, var(--border));
    background: color-mix(in srgb, var(--white, #fff) 82%, transparent);
}
html[data-theme="dark"] .sighting-card__route {
    background: rgba(255, 255, 255, 0.05);
}
.sighting-card__route-labels {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: start;
    gap: 8px;
}
.sighting-card__endpoint-kicker {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 3px;
}
.sighting-card__endpoint-code {
    font-weight: 700;
    font-size: 16px;
    color: var(--heading);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    line-height: 1.2;
}
.sighting-card--brand .sighting-card__endpoint-code {
    color: color-mix(in srgb, var(--airline-accent) 72%, var(--heading));
}
.sighting-card__endpoint-name {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.35;
    margin-top: 2px;
}
.sighting-card__route-arrow {
    font-size: 18px;
    color: var(--link);
    font-weight: 700;
    text-align: center;
    padding-top: 14px;
}
.sighting-card--brand .sighting-card__route-arrow {
    color: color-mix(in srgb, var(--airline-accent) 78%, var(--link));
}
.sighting-card__route-unknown {
    font-size: 13px;
    color: var(--text-muted);
}
.sighting-card__route-unknown--solo {
    font-weight: 600;
    color: var(--heading);
}
.sighting-card__route-note {
    font-size: 11px;
    color: var(--text-muted);
    margin: 0;
}
.sighting-card__meta {
    margin: 0;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
}
.sighting-card__meta-sep {
    margin: 0 4px;
    opacity: 0.6;
}
.sighting-card__type {
    font-weight: 600;
    color: var(--text);
}
.sighting-card--compact .sighting-card__inner {
    padding: 10px 12px 12px;
}
.sighting-card--compact .sighting-card__endpoint-code {
    font-size: 15px;
}
.sighting-card--compact .sighting-card__callsign {
    font-size: 15px;
}
.sighting-list-empty {
    padding: 24px 12px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

/* Flyby log page */
.flyby-page-lead {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
    max-width: 42rem;
    line-height: 1.55;
}
.flyby-companion {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}
.flyby-companion-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 3px;
    background: var(--white, #fff);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.flyby-companion-card:hover {
    border-color: var(--link);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    text-decoration: none;
}
.flyby-companion-card strong {
    font-size: 14px;
    color: var(--heading);
}
.flyby-companion-card span {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.45;
}
.flyby-companion-card--stats strong::after {
    content: " →";
    font-weight: 700;
    color: var(--btn-primary);
}
.flyby-range-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}
.flyby-search-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}
.flyby-search-row .form-input {
    flex: 1;
    min-width: 160px;
    max-width: 320px;
}
.panel > .panel-footer.flyby-list-pager--top {
    border-top: none;
    border-bottom: 1px solid var(--panel-head-b);
}
.flyby-list-pager {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.flyby-list-pager__meta {
    font-size: 12px;
    color: var(--text-muted);
}
.flyby-count-line {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0 0 12px;
}

/* Flyby detail (single pass) */
.flyby-detail-wrap {
    max-width: 640px;
}
.flyby-detail-card {
    margin-bottom: 20px;
}
.flyby-detail-card .sighting-card {
    margin-bottom: 0;
}
.flyby-detail-extra {
    margin-top: 0;
    padding: 14px 16px 18px;
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 10px 10px;
    background: var(--white, #fff);
}
html[data-theme="dark"] .flyby-detail-extra {
    background: var(--surface, #161a22);
}
.flyby-detail-card .sighting-card__shell {
    border-radius: 10px 10px 0 0;
}
.flyby-detail-card .sighting-card--brand + .flyby-detail-extra,
.flyby-detail-card .sighting-card .sighting-card__shell {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}
.flyby-detail-kv {
    display: grid;
    gap: 10px;
    margin: 0 0 16px;
    font-size: 13px;
}
.flyby-detail-kv dt {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}
.flyby-detail-kv dd {
    margin: 2px 0 0;
    color: var(--heading);
}
.flyby-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.flyby-detail-route .sighting-card__endpoint-code a {
    color: inherit;
    text-decoration: none;
}
@media (max-width: 700px) {
    .page-wrap.sightings-page {
        padding-left: 0;
        padding-right: 0;
        padding-top: 12px;
    }
    .sightings-page .flyby-page-lead,
    .sightings-page .flyby-filters,
    .sightings-page .flyby-count-line,
    .sightings-page .flyby-companion {
        padding-left: 10px;
        padding-right: 10px;
    }
    .sightings-page .panel {
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    .sightings-page .panel-body:has(.sighting-card) {
        padding: 10px 10px 8px;
    }
    .sightings-page .sighting-card__shell {
        border-radius: 4px;
    }
    .sightings-page .sighting-card {
        margin-bottom: 10px;
    }
    .sightings-page .sighting-card:last-child {
        margin-bottom: 0;
    }
    .sightings-page a.sighting-card--brand:hover .sighting-card__shell {
        border-left: none;
        border-right: none;
    }
}
@media (max-width: 700px) {
    .panel-body--flybys {
        padding: 10px 10px 8px !important;
    }
    .panel-body--flybys .sighting-card__shell {
        border-radius: 4px;
    }
    .panel-body--flybys .sighting-card {
        margin-bottom: 10px;
    }
    .panel-body--flybys .sighting-card:last-child {
        margin-bottom: 0;
    }
}
.flyby-detail-route .sighting-card__endpoint-code a:hover {
    color: var(--link);
    text-decoration: underline;
}