/* SkyRadar 24 · aircraft history page: data page, dark theme like the airport pages (2026-11-17). */
:root { --bar: #1b1d21; --brand: #ffd21f; --ink: #1f2328; --dim: #646b75; --line: #d6dadf; --bg: #eceff2; --head: #f6f7f9; --pick: #fff6cc; --link: #1a5fb4; }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.45 "Helvetica Neue", Helvetica, Arial, "Segoe UI", Roboto, sans-serif; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 14px; height: 50px; padding: 0 16px; background: var(--bar); color: #fff; }
.brand { display: flex; align-items: center; gap: 8px; color: #fff; font-weight: 800; letter-spacing: .5px; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand img { width: 24px; height: 24px; }
.brand b { color: var(--brand); }
.find { flex: 1; max-width: 340px; }
.find input { width: 100%; height: 32px; padding: 0 10px; background: #33373e; border: 1px solid transparent; border-radius: 3px; color: #f2f3f5; font: inherit; outline: none; }
.find input:focus { border-color: var(--brand); }
.to-map { margin-left: auto; color: #f2f3f5; font-weight: 600; white-space: nowrap; }

.page { max-width: 1100px; margin: 0 auto; padding: 10px 16px 30px; }
.crumbs { margin: 4px 0 10px; color: var(--dim); font-size: 13px; }
.box { margin-bottom: 14px; padding: 16px 18px; background: #fff; border: 1px solid var(--line); border-radius: 3px; }
h1 { margin: 0; font-size: 24px; }
h1 small { color: var(--dim); font-size: 14px; font-weight: 400; }
h2 { margin: 0 0 10px; font-size: 16px; }
h2 small { color: var(--dim); font-size: 13px; font-weight: 400; }

.head { display: grid; grid-template-columns: 330px 1fr; gap: 20px; }
.pic { margin: 0; }
.pic img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: #dfe3e7; border: 1px solid var(--line); }
.pic img:not([src]) { visibility: hidden; }
.pic figcaption { margin-top: 4px; color: var(--dim); font-size: 11.5px; }
.pic figcaption a { color: var(--dim); }
.model { margin: 2px 0 12px; color: #3a4048; font-size: 15px; }
.facts { width: 100%; border-collapse: collapse; }
.facts th, .facts td { padding: 6px 8px; border-top: 1px solid #eceef1; text-align: left; vertical-align: top; }
.facts th { width: 38%; color: var(--dim); font-weight: 400; }
.facts td { font-weight: 600; }
.facts .flying { color: #1d8a46; }
.links { margin: 12px 0 0; }

.summary { margin: -4px 0 10px; color: #3a4048; }
.table-wrap { overflow-x: auto; }
.flights { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.flights th { padding: 7px 8px; background: var(--head); border-bottom: 1px solid var(--line); color: var(--dim); font-size: 12px; font-weight: 600; text-align: left; white-space: nowrap; }
.flights td { padding: 8px; border-bottom: 1px solid #eceef1; white-space: nowrap; }
.flights tbody tr { cursor: pointer; }
.flights tbody tr:hover td { background: #f7f8fa; }
.flights tbody tr.on td { background: var(--pick); }
.flights .code { font-weight: 700; }
.flights .num { font-weight: 600; }
.flights .num small, .flights .planned { color: var(--dim); font-size: 12px; font-weight: 400; }
.flights .guess { font-weight: 600; color: #3a4048; }
.flights .city { color: var(--dim); font-size: 12.5px; margin-left: 4px; }
.flights .flying { color: #1d8a46; font-weight: 600; }
.flights .lost { color: #a5640b; }
.flights .wait { padding: 18px 8px; color: var(--dim); white-space: normal; cursor: default; }
.hint { margin: 8px 0 0; color: var(--dim); font-size: 12.5px; }

.legend { margin-left: 8px; }
.legend i { display: inline-block; width: 90px; height: 6px; vertical-align: middle; background: linear-gradient(90deg, #e8913a, #e0cf3a 25%, #4fbf5e 50%, #2c9fd6 75%, #8b5bd8); }
#map { height: 430px; border: 1px solid var(--line); }
.ap-label { padding: 0 4px; background: #fff; border: 1px solid #1f2328; color: #1f2328; font: 700 11px/1.4 "Helvetica Neue", Arial, sans-serif; }
.foot { margin: 6px 0 0; color: var(--dim); font-size: 12.5px; }

#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); padding: 8px 12px; background: var(--bar); color: #fff; border-radius: 3px; font-size: 13px; }
#toast[hidden] { display: none; }

@media (max-width: 760px) {
    .top { flex-wrap: wrap; height: auto; padding: 8px 12px; gap: 8px 12px; }
    .find { order: 3; flex: 1 1 100%; max-width: none; }
    .page { padding: 8px 10px 24px; }
    .box { padding: 12px; }
    .head { grid-template-columns: 1fr; gap: 12px; }
    .flights .opt, .flights .opt-s, .flights .city, .flights .num small, .flights .planned { display: none; }
    .flights td, .flights th { padding: 7px 5px; }
    .flights td:last-child { white-space: normal; }
    #map { height: 320px; }
}

/* photos of the same aircraft */
.thumbs { display: flex; gap: 6px; margin-top: 8px; }
.thumbs img { width: 25%; aspect-ratio: 3 / 2; object-fit: cover; border: 1px solid var(--line); cursor: pointer; opacity: .85; }
.thumbs img:hover, .thumbs img.on { opacity: 1; outline: 2px solid var(--link); outline-offset: -2px; }

/* in flight now */
.live-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1px; margin: 0; background: #eceef1; border: 1px solid #eceef1; }
.live-grid div { padding: 8px 10px; background: #fff; min-width: 0; }
.live-grid dt { color: var(--dim); font-size: 12px; }
.live-grid dd { margin: 2px 0 0; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.progress { margin-top: 10px; }
.progress .bar { height: 6px; background: #e3e6ea; border-radius: 3px; overflow: hidden; }
.progress .bar i { display: block; height: 100%; width: 0; background: var(--link); }
.progress p { margin: 6px 0 0; color: #3a4048; font-size: 13px; }

/* the picked flight */
.detail { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.detail h3 { margin: 0 0 8px; font-size: 15px; }
.detail h3 small { color: var(--dim); font-weight: 400; }
.d-facts { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0 0 10px; }
.d-facts div { display: flex; gap: 6px; }
.d-facts dt { color: var(--dim); }
.d-facts dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.profile { margin: 0; }
.profile figcaption { color: var(--dim); font-size: 12.5px; margin-bottom: 4px; }
.chart { position: relative; height: 190px; }
.chart svg { display: block; width: 100%; height: 100%; }
.chart .grid line { stroke: #e6e9ed; stroke-width: 1; }
.chart .axis text { fill: var(--dim); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart .area { fill: rgba(26, 95, 180, .10); }
.chart .line { fill: none; stroke: #1a5fb4; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .cross { stroke: #9aa1ab; stroke-width: 1; }
.chart .dot { fill: #1a5fb4; stroke: #fff; stroke-width: 2; }
.tip { position: absolute; top: 4px; padding: 4px 8px; background: #fff; border: 1px solid var(--line); border-radius: 3px; box-shadow: 0 2px 6px rgba(0, 0, 0, .12); font-size: 12px; white-space: nowrap; pointer-events: none; }
.tip b { font-variant-numeric: tabular-nums; }
.tip[hidden] { display: none; }

/* airports and routes of these days */
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.mini { width: 100%; border-collapse: collapse; }
.mini th { padding: 6px 8px; background: var(--head); border-bottom: 1px solid var(--line); color: var(--dim); font-size: 12px; font-weight: 600; text-align: left; }
.mini td { padding: 6px 8px; border-bottom: 1px solid #eceef1; font-variant-numeric: tabular-nums; }
.mini .n { text-align: right; width: 1%; white-space: nowrap; }
.mini b { margin-right: 6px; }
.mini small { color: var(--dim); }
.plane-mark { width: 26px; height: 26px; }

@media (max-width: 760px) {
    .live-grid { grid-template-columns: repeat(2, 1fr); }
    .two { grid-template-columns: 1fr; }
    .chart { height: 160px; }
}

/* ---------- dark theme (2026-11-17), same palette as the airport pages ---------- */
:root { --bg: #121418; --ink: #e6e8eb; --dim: #8b929c; --line: #2a2e35; --head: #15181c; --pick: #2b2a1c; --link: #8cc4ff; }
.top { border-bottom: 1px solid #000; }
.crumbs a { color: #b9bec6; }
.box { background: #1a1d22; border-color: var(--line); }
h1 #reg { color: var(--brand); letter-spacing: 1px; }
.model, .summary, .progress p, .flights .guess { color: #c3c7cd; }
.pic img { background: #0c0e11; border-color: var(--line); }
.facts th, .facts td, .flights td, .mini td { border-color: #22262c; }
.facts .flying, .flights .flying { color: #4cd964; }
.flights .lost { color: #e8a33a; }
.flights .code, .mini b { color: var(--brand); }
.flights tbody tr:hover td { background: #22262c; }
.flights tbody tr.on td { background: var(--pick); box-shadow: inset 0 1px 0 #ffd21f55, inset 0 -1px 0 #ffd21f55; }
.thumbs img { border-color: var(--line); }
.thumbs img:hover, .thumbs img.on { outline-color: var(--brand); }
.live-grid { background: #22262c; border-color: #22262c; }
.live-grid div { background: #15181c; }
.live-grid dd { color: var(--brand); font-size: 16px; }
.progress .bar { background: #2a2e35; }
.progress .bar i { background: var(--brand); }
#live-box { border-color: #4a4320; }
#live-box h2 { color: var(--brand); }
.detail { border-color: var(--line); }
#map { height: 460px; border-color: #000; background: #0c0e11; }
.ap-label { background: #1b1d21; border-color: var(--brand); color: var(--brand); }
.chart .grid line { stroke: #262a30; }
.chart .area { fill: rgba(255, 210, 31, .12); }
.chart .line { stroke: #ffd21f; }
.chart .cross { stroke: #5c636d; }
.chart .dot { fill: #ffd21f; stroke: #121418; }
.tip { background: #1b1d21; border-color: var(--line); color: #fff; box-shadow: none; }
.find input { background: #0c0e11; border-color: #3a3f47; }
.maplibregl-ctrl-attrib { background: rgba(20, 22, 26, .85) !important; color: #b9bec6; }
.maplibregl-ctrl-attrib a { color: #b9bec6 !important; }
@media (max-width: 760px) { #map { height: 320px; } }
.lang-switch { padding: 4px 9px; background: #33373e; border-radius: 3px; color: #f2f3f5; font-weight: 700; font-size: 13px; }
.lang-switch:hover { text-decoration: none; background: #3a3f47; }

/* ---------- flight playback (2026-11-17) ---------- */
.playback { margin-top: 10px; padding: 10px 12px 12px; background: #0c0e11; border: 1px solid #000; border-radius: 3px; }
.playback[hidden] { display: none; }
.pb-bar { display: flex; align-items: center; gap: 12px; }
.pb-play { flex: 0 0 auto; width: 42px; height: 42px; border: 0; border-radius: 50%; background: var(--brand); color: #111; font-size: 16px; font-weight: 700; line-height: 42px; cursor: pointer; }
.pb-play:hover { background: #ffe066; }
#pb-range { flex: 1; min-width: 80px; accent-color: #ffd21f; height: 24px; cursor: pointer; }
.pb-time { flex: 0 0 auto; color: var(--brand); font: 700 17px/1 "DejaVu Sans Mono", Menlo, Consolas, monospace; letter-spacing: .5px; }
#pb-speed { flex: 0 0 auto; height: 32px; padding: 0 6px; background: #1b1d21; border: 1px solid #3a3f47; border-radius: 3px; color: #fff; font: inherit; }
.pb-follow { flex: 0 0 auto; display: flex; align-items: center; gap: 5px; color: #c3c7cd; font-size: 13px; cursor: pointer; }
.pb-follow input { accent-color: #ffd21f; }
.pb-title { margin: 8px 0 6px; color: #fff; font-weight: 700; font-size: 13.5px; }
.pb-data { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1px; margin: 0; background: #22262c; border: 1px solid #22262c; }
.pb-data div { padding: 7px 10px; background: #15181c; min-width: 0; }
.pb-data dt { color: var(--dim); font-size: 11px; text-transform: uppercase; letter-spacing: .5px; }
.pb-data dd { margin: 2px 0 0; color: var(--brand); font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb-data small { display: block; color: var(--dim); font-size: 11.5px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb-data.gap dd { color: #e8a33a; }
.pb-start { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 10px; padding: 7px 12px; background: var(--brand); border: 0; border-radius: 3px; color: #111; font: 700 13px/1 "Helvetica Neue", Helvetica, Arial, sans-serif; cursor: pointer; }
.pb-start:hover { background: #ffe066; }
.chart .pb-mark line { stroke: #ffd21f; stroke-width: 1.5; stroke-dasharray: 3 3; }
.chart .pb-mark circle { fill: #ffd21f; stroke: #0c0e11; stroke-width: 2; }
@media (max-width: 760px) {
    .pb-bar { flex-wrap: wrap; gap: 8px 10px; }
    #pb-range { order: 5; flex: 1 1 100%; }
    .pb-data { grid-template-columns: repeat(2, 1fr); }
    .pb-time { font-size: 15px; }
}
.pb-note { margin: 8px 0 0; color: #e8a33a; font-size: 12.5px; }
select.lang-switch { border: 0; font-family: inherit; cursor: pointer; max-width: 150px; }
