/* Light theme is the default. Dark applies when <html data-theme="dark">. */
[hidden] { display: none !important; }        /* (whatever display a class gives it) */
:root {
  color-scheme: light;
  --bg: #f3f5f8; --panel: #ffffff; --panel-2: #f6f8fa; --panel-3: #eaeef2; --line: #dde3e9; --line-2: #c8d1da;
  --input-bg: #ffffff;
  --text: #1f2328; --muted: #59636e; --faint: #8c959f; --link: #0969da;
  --primary: #0969da; --primary-ink: #ffffff;
  --good: #1a7f37; --bad: #cf222e; --warn: #9a6700; --info: #0969da;
  --good-bg: rgba(26,127,55,.12); --bad-bg: rgba(207,34,46,.10); --warn-bg: rgba(154,103,0,.12); --info-bg: rgba(9,105,218,.10);
  --tbl-head: color-mix(in srgb, var(--primary) 13%, transparent); --tbl-stripe: color-mix(in srgb, var(--primary) 6.5%, transparent);
  --tbl-hover: color-mix(in srgb, var(--primary) 11%, transparent);
  --row-hover: rgba(31,35,40,.035); --highlight: rgba(9,105,218,.07); --overlay: rgba(31,35,40,.45); --shadow: 0 12px 40px rgba(31,35,40,.18);
  --series-1: #2a78d6; --series-2: #eb6834; --series-3: #1baf7a; --series-4: #eda100; --series-neg: #e34948;
  --cat-1: #2a78d6; --cat-2: #eb6834; --cat-3: #1baf7a; --cat-4: #eda100; --cat-5: #e87ba4; --cat-6: #008300; --cat-7: #6250d6; --cat-8: #e34948;
  --map-sea: #d3e4f3; --map-land: #fbfaf6; --map-border: #c3ccd6; --map-airport: #2b3a4c; --map-airport-hover: #000000;
  --map-label: #2f3d4e; --map-halo: #fbfaf6; --map-hub: #d48806; --map-sel: #cf222e;
  --accent: #0969da;
  --fb-minus: #d1242f; --fb-plus: #1a7f37; --fb-ref: #0969da;
  --radius: 10px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d1117; --panel: #151b23; --panel-2: #1b222c; --panel-3: #222b37; --line: #2a3441; --line-2: #36414f;
  --input-bg: #0d1117;
  --text: #e6edf3; --muted: #8d99a8; --faint: #5f6b7a; --link: #6cb6ff;
  --primary: #2f81f7; --primary-ink: #ffffff;
  --good: #3fb950; --bad: #f85149; --warn: #d29922; --info: #6cb6ff;
  --good-bg: rgba(63,185,80,.15); --bad-bg: rgba(248,81,73,.15); --warn-bg: rgba(210,153,34,.15); --info-bg: rgba(47,129,247,.15);
  --tbl-head: color-mix(in srgb, var(--primary) 24%, transparent); --tbl-stripe: color-mix(in srgb, var(--primary) 9%, transparent);
  --tbl-hover: color-mix(in srgb, var(--primary) 17%, transparent);
  --row-hover: rgba(255,255,255,.025); --highlight: rgba(47,129,247,.10); --overlay: rgba(1,4,9,.65); --shadow: 0 20px 60px rgba(0,0,0,.5);
  --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --series-4: #c98500; --series-neg: #e66767;
  --cat-1: #3987e5; --cat-2: #d95926; --cat-3: #199e70; --cat-4: #c98500; --cat-5: #d55181; --cat-6: #008300; --cat-7: #9085e9; --cat-8: #e66767;
  --fb-minus: #e5534b; --fb-plus: #3fa75a; --fb-ref: #4493f8;
  --map-sea: #0a1a2b; --map-land: #1d2b3c; --map-border: #2a3c52; --map-airport: #c9d4e3; --map-airport-hover: #ffffff;
  --map-label: #9fb0c5; --map-halo: #0a1a2b; --map-hub: #ffd166; --map-sel: #ff7b72;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font: 14px/1.45 var(--font); }
/* places the game scrolls to stop below the bars that stay on screen (not scroll-padding on the page: that also
   'reveals' a tapped button in those bars by scrolling the page) */
#sched-ed, #qprev, .scroll-to { scroll-margin-top: calc(var(--top-h, 58px) + 8px); }
a { color: var(--link); text-decoration: none; } a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0 0 .5em; line-height: 1.2; }
h1 { font-size: 22px; } h2 { font-size: 17px; } h3 { font-size: 14px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 12px; }
.good { color: var(--good); } .bad { color: var(--bad); } .warn { color: var(--warn); }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.boot { padding: 40px; color: var(--muted); }

/* ---------- layout ---------- */
.shell { display: grid; grid-template-columns: 210px minmax(0, 1fr); grid-template-rows: auto 1fr; min-height: 100vh; }
.topbar { grid-column: 1 / -1; display: flex; align-items: center; gap: 18px; padding: 0 16px; min-height: 58px; background: var(--panel); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 40; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.theme-btn { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text); cursor: pointer; padding: 0; }
.theme-btn:hover { background: var(--panel-3); }
.theme-btn svg { width: 18px; height: 18px; }
.welcome-top { display: flex; justify-content: flex-start; margin-bottom: 8px; }
.brand .name { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand .code { color: color-mix(in srgb, var(--text) 78%, var(--muted)); font-size: 13.5px; font-weight: 700; }
.kpis { display: flex; gap: 8px; margin-left: auto; align-items: center; }
.kpi { display: flex; flex-direction: column; align-items: center; text-align: center; line-height: 1.15; background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 8px; padding: 4px 10px; }                     /* each figure in a card of its own */
.kpi .l { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.kpi .v { font-weight: 700; font-variant-numeric: tabular-nums; }
.kpi .s { font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.date { font-weight: 700; }
.nav { background: var(--panel); border-right: 1px solid var(--line); padding: 12px 8px; position: sticky; top: var(--top-h, 58px); align-self: start; }
.nav .nav-toggle, .nav .nav-current { display: none; }
.nav-links { display: contents; }      /* computers: the side menu */
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--muted); font-weight: 500; margin-bottom: 2px; }
.nav a:hover { background: var(--panel-2); color: var(--text); text-decoration: none; }
.nav a.on { background: var(--panel-3); color: var(--text); box-shadow: inset 3px 0 0 var(--accent); }
.nav svg { width: 18px; height: 18px; flex: none; }
.nav .sep { height: 1px; background: var(--line); margin: 10px 6px; }
main { min-width: 0; padding: 20px 24px 60px; overflow-wrap: break-word; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head p { margin: 4px 0 0; color: var(--muted); max-width: 760px; }

/* ---------- components ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.card + .card { margin-top: 16px; }
.grid > .card + .card, .grid > .card { margin-top: 0; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .g6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.tile .l { color: var(--muted); font-size: 12px; } .tile .v { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 2px; }
.tile .s { font-size: 12px; color: var(--muted); }
.btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text); font: 600 13px var(--font); cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--panel-3); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn.primary:hover { filter: brightness(1.1); }
.btn.danger { color: var(--bad); } .btn.danger:hover { background: var(--bad-bg); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
input, select { height: 34px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--input-bg); color: var(--text); padding: 0 10px; font: 14px var(--font); }
input[type=color] { width: 44px; padding: 2px; }
input[type=range] { height: auto; padding: 0; }
input:focus, select:focus, .btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
label.f { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); min-width: 0; }
label.f > select, label.f > input { min-width: 0; max-width: 100%; }
label.f > span { font-weight: 600; }
.form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; padding: 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
/* every table: the caption row a little darker, rows in turn a shade apart, the row under the mouse darker still
   (all in the palette's colour); row highlights (your airline, a picked row) stay on top */
thead th { background: var(--tbl-head); color: color-mix(in srgb, var(--text) 72%, var(--primary)); }
tbody > tr:nth-child(even) { background: var(--tbl-stripe); }
tbody > tr:hover { background: var(--tbl-hover); }
th.num, td.num { text-align: right; }
.table-wrap { min-width: 0; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 99px; font-size: 11px; font-weight: 600; background: var(--panel-3); color: var(--muted); white-space: nowrap; }
.pill.good { background: var(--good-bg); color: var(--good); } .pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.warn { background: var(--warn-bg); color: var(--warn); } .pill.info { background: var(--info-bg); color: var(--info); }
.bar { position: relative; height: 8px; background: var(--panel-3); border-radius: 4px; overflow: hidden; min-width: 60px; }
.bar > i { position: absolute; inset: 0 auto 0 0; border-radius: 4px; background: var(--series-1); }
.meter { display: flex; align-items: center; gap: 8px; } .meter .bar { flex: 1; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tabs button { background: none; border: 0; color: var(--muted); font: 600 13px var(--font); padding: 8px 12px; cursor: pointer; border-bottom: 2px solid transparent; }
.tabs button.on { color: var(--text); border-color: var(--primary); }
.empty { padding: 28px; text-align: center; color: var(--muted); border: 1px dashed var(--line-2); border-radius: var(--radius); }
.callout { border-left: 3px solid var(--primary); background: var(--panel-2); padding: 10px 14px; border-radius: 0 8px 8px 0; color: var(--muted); }
.callout b { color: var(--text); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; } .kv dt { color: var(--muted); } .kv dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; vertical-align: middle; }

/* ---------- map ---------- */
.map-wrap { position: relative; background: var(--map-sea); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
svg.map { display: block; width: 100%; height: auto; aspect-ratio: 1000 / 430; cursor: grab; touch-action: none; }
svg.map .sea { fill: var(--map-sea); }
svg.map .countries path { fill: var(--map-land); stroke: var(--map-border); stroke-width: .35; vector-effect: non-scaling-stroke; }
svg.map .routes path { fill: none; stroke-linecap: round; vector-effect: non-scaling-stroke; }
svg.map .airports .ap { cursor: pointer; }
svg.map .airports .ap path { fill: var(--map-airport); stroke: var(--map-halo); stroke-width: 1.1; vector-effect: non-scaling-stroke; }
svg.map .airports .ap .dot { fill: #ffffff; pointer-events: none; }
svg.map .airports .ap:hover path { stroke: var(--text); stroke-width: 1.8; }
svg.map .airports .ap.hub path { stroke: var(--text); stroke-width: 2; }
svg.map .airports .ap.sel path { stroke: var(--map-sel); stroke-width: 2.8; }
/* the map's key sits under the map, not on it */
.map-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.map-legend .key { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.map-legend .key > span:not(.scale) { white-space: nowrap; }
.map-legend .scale { display: inline-block; flex: 0 1 160px; width: 160px; min-width: 40px; height: 8px; border-radius: 4px;
  background: linear-gradient(90deg, hsl(120 70% 40%), hsl(60 85% 45%), hsl(0 75% 50%)); }
.ap-routes .to { white-space: nowrap; } .ap-routes td .muted { font-size: 12px; }
svg.map .labels text { fill: var(--map-label); font-family: var(--font); pointer-events: none; paint-order: stroke; stroke: var(--map-halo); stroke-width: 2px; }
.map-ctl { position: absolute; right: 10px; top: 10px; display: flex; flex-direction: column; gap: 4px; }
.map-ctl button { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--panel); color: var(--text); font-size: 18px; cursor: pointer; }
.map-tip { position: absolute; pointer-events: none; background: var(--panel); border: 1px solid var(--line-2); padding: 6px 10px; border-radius: 8px; font-size: 12px; max-width: 260px; }
.map-tip span { color: var(--muted); }
.map-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.map-below { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.map-below .card { margin-top: 0; }


/* ---------- charts ---------- */
.chart { position: relative; }
.chart svg { display: block; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .zero { stroke: var(--line-2); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart .guide { stroke: var(--muted); stroke-dasharray: 3 3; }
.chart-tip { position: absolute; pointer-events: none; background: var(--panel-3); border: 1px solid var(--line-2); border-radius: 8px; padding: 6px 10px; font-size: 12px; min-width: 120px; z-index: 5; }
.chart-tip i, .legend i { display: inline-block; width: 10px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.hbars { display: grid; gap: 6px; }
.hb-row { display: grid; grid-template-columns: 110px 1fr 110px; gap: 10px; align-items: center; font-size: 12px; }
.hb-label { color: var(--muted); text-align: right; }
.hb-track { height: 14px; background: var(--panel-3); border-radius: 4px; overflow: hidden; }
.hb-fill { display: block; height: 100%; border-radius: 4px; }
.hb-val { font-variant-numeric: tabular-nums; }

/* ---------- aircraft cards ---------- */
.ac-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.ac-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.ac-card .pic { background: linear-gradient(#cfe3f7, #eaf3fb); border-radius: 8px; padding: 4px; display: flex; justify-content: center; align-items: center; height: 116px; }
.ac-card .pic svg { width: 100%; height: 100%; }
.ac-card .t { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.ac-card .t b { font-size: 15px; }
.specs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px 10px; font-size: 12px; }
.specs div span { display: block; color: var(--muted); font-size: 11px; }
.thumb { width: 120px; background: linear-gradient(#cfe3f7, #eaf3fb); border-radius: 6px; display: block; }
.thumb svg { width: 100%; height: auto; display: block; }

/* ---------- modal & toast ---------- */
.modal-back { position: absolute; left: 0; top: 0; width: 100%; min-height: 100vh; background: var(--overlay); display: flex; align-items: flex-start;
  justify-content: center; z-index: 50; padding: 0 16px; }
.modal { background: var(--panel); border: 1px solid var(--line-2); border-radius: 12px; width: min(560px, 100%); padding: 20px; box-shadow: var(--shadow); }
.modal h2 { margin-bottom: 12px; }
.modal .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
#toasts { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); width: min(560px, calc(100vw - 32px));
  display: flex; flex-direction: column; gap: 8px; z-index: 1500; pointer-events: none; }
.toast { position: relative; overflow: hidden; background: var(--panel-3); border: 1px solid var(--line-2); border-left: 5px solid var(--primary);
  padding: 14px 18px 18px; border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); font-size: 15px; line-height: 1.45;
  cursor: pointer; pointer-events: auto; overflow-wrap: anywhere; animation: toast-in .2s ease-out; }
.toast-bar { position: absolute; left: 0; bottom: 0; height: 4px; width: 0; background: var(--primary); opacity: .7;
  animation-name: toast-fill; animation-timing-function: linear; animation-fill-mode: forwards; }
.toast.err, .toast.bad { border-left-color: var(--bad); } .toast.ok { border-left-color: var(--good); }
.toast.err .toast-bar, .toast.bad .toast-bar { background: var(--bad); } .toast.ok .toast-bar { background: var(--good); }
@keyframes toast-fill { from { width: 0; } to { width: 100%; } }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } }

/* ---------- news ---------- */
.news { display: grid; gap: 2px; }
.news div { display: grid; grid-template-columns: 82px 1fr; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.news div:last-child { border-bottom: 0; }
.news .d { color: var(--faint); font-size: 12px; }
.news .warning { color: var(--bad); }

/* ---------- branding ---------- */
.brand-preview { background: linear-gradient(#bcd8f2, #e8f2fb); border-radius: var(--radius); padding: 16px; display: grid; gap: 6px; }
.brand-preview svg.aircraft { width: 100%; height: auto; }
.choice-row { display: flex; flex-wrap: wrap; gap: 6px; }
.choice-row button { border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text); border-radius: 8px; padding: 4px 8px; cursor: pointer; font: 12px var(--font); display: inline-flex; align-items: center; gap: 6px; }
.choice-row button.on { border-color: var(--primary); background: var(--info-bg); }
.color-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.color-grid label { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }

/* ---------- welcome ---------- */
.welcome { max-width: 980px; margin: 0 auto; padding: 32px 20px; }
.welcome .hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px; align-items: center; }

@media (max-width: 1100px) {
  .g4, .g6 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: minmax(0, 1fr); }
  .map-below { grid-template-columns: minmax(0, 1fr); }
  .welcome .hero { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto 1fr; height: auto; min-height: 100vh; }
  .topbar { flex-wrap: wrap; padding: 8px 16px; gap: 10px; } .kpis { margin-left: 0; flex-wrap: wrap; gap: 6px; }
  .nav { display: flex; flex-wrap: wrap; padding: 6px; border-right: 0; border-bottom: 1px solid var(--line); }
  .nav a { flex: none; } .nav .sep { display: none; }
  main { padding: 16px; } .g2 { grid-template-columns: minmax(0, 1fr); }
}
.form p { margin: 0; }

/* ---------- start-up screens ---------- */
.welcome.wide { max-width: 1320px; }
.welcome-top { align-items: center; gap: 16px; flex-wrap: wrap; }
.steps { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0; flex-wrap: wrap; }
.steps li { font-size: 12px; padding: 4px 10px; border-radius: 99px; background: var(--panel-2); color: var(--muted); border: 1px solid var(--line); }
.steps li.on { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.steps li.done { color: var(--text); }
.choice-card { text-align: left; cursor: pointer; font: inherit; color: var(--text); display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.choice-card:hover { border-color: var(--primary); }
.choice-card.on { border-color: var(--primary); box-shadow: 0 0 0 2px var(--info-bg); }
.choice-card p { color: var(--muted); margin: 0; }
.setup-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.setup-cols.fleet { grid-template-columns: minmax(0, 1fr) 320px; }
.setup-cols .cart { position: sticky; top: 12px; }
tr.pick { cursor: pointer; } tr.pick.sel { background: var(--highlight); }
.idx { display: grid; grid-template-columns: 140px auto 22px minmax(0, 1fr); align-items: center; gap: 8px; font-size: 13px; padding: 2px 0; }
@media (max-width: 600px) { .idx { grid-template-columns: minmax(80px, 120px) auto 22px; } .idx > :nth-child(4) { grid-column: 1 / -1; } }
.idx-l { color: var(--muted); }
.idx-bar { display: flex; gap: 2px; }
.idx-bar i { width: 13px; height: 10px; border-radius: 2px; background: var(--panel-3); }
.idx-bar i.on { background: var(--series-1); }
ul.pros, ul.cons { margin: 6px 0 0; padding-left: 18px; font-size: 13px; }
ul.pros li::marker { content: "+  "; color: var(--good); font-weight: 700; }
ul.cons li::marker { content: "–  "; color: var(--bad); font-weight: 700; }
.ac-card.off { opacity: .55; }
.grid.styles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ac-mini { width: 100%; background: linear-gradient(#cfe3f7, #eaf3fb); border-radius: 6px; }
.ac-mini svg { width: 100%; height: auto; display: block; }
@media (max-width: 1100px) { .setup-cols, .setup-cols.fleet { grid-template-columns: minmax(0, 1fr); } .grid.styles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- accounts, lobby, admin ---------- */
.welcome.auth .hero { align-items: start; }
.welcome-top .btn { margin-left: 4px; }
.world-card { display: flex; flex-direction: column; gap: 6px; }
/* the admin's announcements: amber, apart from the palette's world cards */
.ann-list { display: grid; gap: 12px; margin: 0 0 16px; }
.ann-card { border: 1px solid color-mix(in srgb, var(--warn) 55%, var(--line)); border-left: 6px solid var(--warn);
  background: color-mix(in srgb, var(--warn-bg) 70%, var(--panel)); }
.ann-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.ann-head h2 { margin: 0; font-size: 19px; }
.ann-tag { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--warn); }
.ann-text p { margin: 8px 0 0; line-height: 1.5; overflow-wrap: anywhere; }
.ann-imgs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ann-img { position: relative; padding: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--panel); cursor: zoom-in; }
.ann-img img { display: block; height: 140px; max-width: 100%; object-fit: cover; }
.ann-img .btn { position: absolute; top: 2px; right: 2px; }
.ann-viewer { position: fixed; inset: 0; z-index: 1000; background: rgba(0, 0, 0, .88); display: flex; align-items: center; justify-content: center; cursor: zoom-out; }
.ann-viewer img { max-width: 96vw; max-height: 92vh; object-fit: contain; }
.ann-viewer .ph-view-btn { position: absolute; top: 12px; right: 12px; }
.an-where { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; margin: 10px 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.an-where legend { font-size: 12px; color: var(--muted); padding: 0 4px; }
.an-where .seg { display: flex; flex-wrap: wrap; gap: 6px; }
.ann-admin { display: grid; gap: 8px; }
.ann-row { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; }
.ann-row.ended { opacity: .7; }
.ann-acts { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; flex: none; }
.ann-snip { margin-top: 4px; white-space: pre-line; }

/* ---- site logo (custom/logo.*) ---- */
.site-logo { display: inline-flex; align-items: center; flex: none; height: 40px; }
.site-logo img { display: block; height: 40px; width: auto; max-width: 240px; object-fit: contain; }

/* ---- home page: banner behind the login form ---- */
.home-banner { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.home-banner .hb-img, .home-banner .hb-fill { position: absolute; inset: 0; background-position: center; background-repeat: no-repeat; }
.home-banner .hb-img { background-size: contain; }                      /* the whole picture */
.home-banner.fit-cover .hb-img { background-size: cover; }              /* fill the screen, cut the edges */
.home-banner .hb-fill { display: none; background-size: cover; filter: blur(28px) saturate(1.1); transform: scale(1.15); opacity: .6; }
.home-banner.fit-blur .hb-fill { display: block; }
@media (orientation: portrait) { .home-banner:not(.fit-cover) .hb-fill { display: block; } }   /* phones: no empty bands above and below */
.welcome.auth { position: relative; z-index: 1; max-width: 1100px; min-height: 100vh; box-sizing: border-box; display: flex; flex-direction: column; }
.auth-body { flex: 1; display: grid; align-content: center; gap: 24px; padding-bottom: 6vh; }
.auth-body.pos-left { justify-items: start; } .auth-body.pos-center { justify-items: center; } .auth-body.pos-right { justify-items: end; }
/* the login form has no background of its own: text and fields carry a tint (--ink, set in Admin) and a soft halo */
.welcome.auth { --ink: #8b1e1e; --ink-text: var(--ink); --halo: rgba(255, 255, 255, .92); --field: color-mix(in srgb, var(--ink) 10%, rgba(255, 255, 255, .92)); --field-text: color-mix(in srgb, var(--ink) 55%, #000000); }
:root[data-theme="dark"] .welcome.auth { --ink-text: color-mix(in srgb, var(--ink) 35%, #ffffff); --halo: rgba(0, 0, 0, .85); --field: color-mix(in srgb, var(--ink) 22%, rgba(13, 17, 23, .8)); --field-text: #fff2f2; }
.auth-body .card.form { width: 100%; max-width: 400px; box-sizing: border-box; background: transparent; border: 0; box-shadow: none; padding: 8px 4px; }
.auth-body .card.form, .auth-body .card.form h2, .auth-body .card.form label span, .auth-body .card.form p, .auth-body .card.form .tabs button { color: var(--ink-text); text-shadow: 0 0 3px var(--halo), 0 0 10px var(--halo); }
.auth-body .card.form label span, .auth-body .card.form .tabs button { font-weight: 700; }
.auth-body .card.form label span { font-size: 14px; } .auth-body .card.form .tabs button { font-size: 15px; }
.auth-body .card.form .tabs { border-bottom-color: color-mix(in srgb, var(--ink-text) 35%, transparent); }
.auth-body .card.form .tabs button.on { border-color: var(--ink-text); }
.auth-body .card.form input { background: var(--field); color: var(--field-text); border: 1px solid color-mix(in srgb, var(--ink-text) 45%, transparent); }
.auth-body .card.form input:focus { outline: 2px solid var(--ink-text); outline-offset: 0; border-color: var(--ink-text); }
.auth-body .card.form .callout { background: var(--field); border-left-color: var(--ink-text); color: var(--field-text); text-shadow: none; }
.auth-body.with-text { grid-template-columns: minmax(0, 1fr) minmax(0, 400px); align-items: center; justify-items: stretch; }
.auth-body.with-text.pos-left { grid-template-columns: minmax(0, 400px) minmax(0, 1fr); }
.auth-body.with-text.pos-left .card.form { order: -1; }
.auth-body.with-text.pos-center { grid-template-columns: minmax(0, 560px); justify-content: center; }
.home-text { padding: 8px 4px; }
.home-text h1, .home-text p { color: var(--ink-text); text-shadow: 0 0 3px var(--halo), 0 0 12px var(--halo); }
.home-text h1 { font-size: 32px; } .home-text p { font-size: 16px; font-weight: 600; margin: 0 0 .6em; } .home-text p:last-child { margin-bottom: 0; }

/* ---- admin ---- */
.admin-tabs { margin: 4px 0 16px; flex-wrap: wrap; }
.admin-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.admin-cols textarea { width: 100%; box-sizing: border-box; font: inherit; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text); resize: vertical; }
.banner-preview { position: relative; height: 180px; border-radius: 8px; overflow: hidden; background: var(--bg); border: 1px solid var(--line); }
.banner-preview .bp-layers { position: absolute; inset: 0; }
.banner-preview .bp-img, .banner-preview .bp-fill { position: absolute; inset: 0; background-position: center; background-repeat: no-repeat; background-size: contain; }
.banner-preview.fit-cover .bp-img { background-size: cover; }
.banner-preview .bp-fill { display: none; background-size: cover; filter: blur(8px); transform: scale(1.12); opacity: .6; }
.banner-preview.fit-blur .bp-fill { display: block; }
.banner-preview .bp-card { position: absolute; top: 30%; width: 26%; height: 44%; display: grid; align-content: center; gap: 10%; padding: 0 3%; }
.banner-preview .bp-card i { display: block; height: 18%; min-height: 12px; border-radius: 3px; border: 1px solid color-mix(in srgb, var(--ink) 50%, transparent); background: color-mix(in srgb, var(--ink) 8%, rgba(255, 255, 255, .85)); }
.banner-preview .bp-card b { display: block; width: 45%; height: 14%; min-height: 10px; border-radius: 3px; background: var(--primary); }
.banner-preview.pos-left .bp-card { left: 8%; } .banner-preview.pos-center .bp-card { left: 37%; } .banner-preview.pos-right .bp-card { right: 8%; }
.logo-swatches { display: flex; gap: 12px; flex-wrap: wrap; margin: 8px 0; }
.logo-swatches > div { padding: 12px 16px; border-radius: 8px; border: 1px solid var(--line); display: grid; place-items: center; }
.logo-swatches .sw-light { background: #ffffff; } .logo-swatches .sw-dark { background: #0d1117; }
.logo-swatches img { height: 40px; width: auto; max-width: 240px; object-fit: contain; }

@media (max-width: 900px) {
  .site-logo, .site-logo img { height: 32px; } .site-logo img { max-width: 180px; }
  .auth-body.with-text, .auth-body.with-text.pos-left { grid-template-columns: minmax(0, 1fr); justify-items: stretch; }
  .auth-body .card.form { max-width: none; }
  .admin-cols { grid-template-columns: minmax(0, 1fr); }
}

/* ---- map: airport routes list ---- */
.ap-routes th .sort, .sortable th .sort { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-transform: inherit; letter-spacing: inherit; white-space: nowrap; }
.ap-routes th .sort.on, .sortable th .sort.on { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.sortable th.num .sort { text-align: right; }

/* ---- world map: filters and airlines table ---- */
.map-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 12px; }
.map-filters .seg { display: flex; flex-wrap: wrap; gap: 6px; }
.hub-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.hub-chips[hidden] { display: none; }
.chip { display: inline-flex; gap: 6px; align-items: center; border: 1px solid var(--line-2); border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 600; cursor: pointer; background: var(--panel-2); }
.chip input, .al-table input[type=checkbox] { height: auto; width: auto; margin: 0; cursor: pointer; }
#map-count { margin-left: auto; }
.al-table td { vertical-align: middle; }
.al-table .al-name { display: flex; align-items: center; gap: 10px; }
.al-table tr.me-row td { background: color-mix(in srgb, var(--primary) 14%, transparent); }
.al-table tr.me-row td:first-child { box-shadow: inset 4px 0 0 var(--primary); }
.al-table tr.me-row b { color: var(--text); }
.ap-kv { grid-template-columns: repeat(3, auto 1fr); column-gap: 16px; }
@media (max-width: 900px) { .ap-kv { grid-template-columns: auto 1fr; } #map-count { margin-left: 0; } }
.ap-routes tr.mine-row td { background: color-mix(in srgb, var(--primary) 8%, transparent); }

#ap-routes:empty { display: none; }
.admin-cols > .card { margin-top: 0; }

/* ---- game clock ---- */
.kpi.clock .v { white-space: nowrap; font-variant-numeric: tabular-nums; }
.clock-pill { white-space: nowrap; font-variant-numeric: tabular-nums; }
/* top bar: the airline name gives way (…) before anything overlaps; figures stay on one line */
@media (min-width: 901px) {
  .topbar .brand { flex: 1 1 auto; min-width: 0; } .topbar .brand > div { min-width: 0; }
  .topbar .brand .code { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .kpis { flex: none; } .kpi .l, .kpi .v { white-space: nowrap; }
}
@media (min-width: 901px) and (max-width: 1600px) { .topbar .site-logo { display: none; } .kpis { gap: 6px; } }   /* (room for the airline's name beside the figures) */
@media (min-width: 901px) and (max-width: 1360px) { .kpi { padding: 3px 7px; } .kpi .l { font-size: 10px; } }

/* ---- news feed ---- */
.news-filters { display: grid; gap: 8px; margin-bottom: 10px; }
.news-filters .seg { display: flex; flex-wrap: wrap; gap: 6px; }
.news-filters .chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.news-card .news div { grid-template-columns: 96px 1fr; align-items: start; }
.news .nt { display: flex; gap: 8px; align-items: flex-start; }
.news .nt svg { flex: none; margin-top: 1px; }
.news .tag { flex: none; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 2px 6px; border-radius: 4px; min-width: 62px; text-align: center;
  background: var(--panel-3); color: var(--muted); }
.news .tag.t-route { background: color-mix(in srgb, var(--series-1) 18%, transparent); color: var(--series-1); }
.news .tag.t-capacity { background: color-mix(in srgb, var(--series-2) 18%, transparent); color: var(--series-2); }
.news .tag.t-fare { background: color-mix(in srgb, var(--series-3) 18%, transparent); color: var(--series-3); }
.news .tag.t-fleet { background: color-mix(in srgb, var(--series-4, #8250df) 18%, transparent); color: var(--series-4, #8250df); }
.news .tag.t-maker { background: color-mix(in srgb, #0a7e8c 16%, transparent); color: #0a7e8c; }
.news .tag.t-airline { background: color-mix(in srgb, var(--warn, #9a6700) 18%, transparent); color: var(--warn, #9a6700); }
.news .tag.t-notice { background: color-mix(in srgb, var(--primary) 14%, transparent); color: var(--primary); }
.news .tag.t-notice.warning { background: color-mix(in srgb, var(--bad) 16%, transparent); color: var(--bad); }
@media (max-width: 700px) { .news-card .news div { grid-template-columns: minmax(0, 1fr); gap: 2px; } }

/* ---- schedule */
.sched-list tr.sel td { background: var(--highlight); }
.sched-ed h3 { margin: 12px 0 6px; }
.sched-facts { display: flex; flex-wrap: wrap; gap: 4px 18px; color: var(--muted); }
.sched-facts b { color: var(--text); }
.tl { display: grid; gap: 3px; margin-top: 4px; }
.tl-row { display: grid; grid-template-columns: 36px 1fr; align-items: center; }
.tl-day { font-size: 12px; font-weight: 600; color: var(--muted); }
.tl-track { position: relative; height: 30px; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; background-color: var(--panel-2); }
/* a line every hour, a thinner one every 15 minutes, over the night and curfew shading, under the flights */
.tl-row:not(.tl-axis) .tl-track::after { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image: linear-gradient(to right, color-mix(in srgb, var(--text) 32%, transparent) 1px, transparent 1px),
    linear-gradient(to right, color-mix(in srgb, var(--text) 11%, transparent) 1px, transparent 1px);
  background-size: calc(100% / 24) 100%, calc(100% / 96) 100%; }
@media (max-width: 700px) { .tl-row:not(.tl-axis) .tl-track::after { background-size: calc(100% / 24) 100%, calc(100% / 48) 100%; }
  .tl-axis .tl-ax-minor { display: none; } }
.tl-track > span { left: var(--a); width: var(--w); }
.tl-axis .tl-track { height: 14px; border: 0; background: none; overflow: visible; }
.tl-axis .tl-track span { position: absolute; top: 0; font-size: 10px; color: var(--muted); }
.tl-shade { position: absolute; top: 0; bottom: 0; }
.tl-shade.night { background: var(--panel-3); }
.tl-shade.curfew { background: repeating-linear-gradient(45deg, var(--bad-bg) 0 4px, transparent 4px 8px); }
.tl-shade.curfew.away { background: repeating-linear-gradient(-45deg, var(--warn-bg) 0 4px, transparent 4px 8px); }
.tl-bar { position: absolute; top: 2px; bottom: 2px; border-radius: 3px; font-size: 10px; line-height: 12px; color: #fff; padding: 1px 3px;
  white-space: normal; overflow: hidden; box-sizing: border-box; font-weight: 600; z-index: 1; overflow-wrap: normal; word-break: keep-all; }
.tl-bar.old { opacity: .3; }
.tl-bar.out { background: var(--series-1); }
.tl-bar.back { background: var(--series-2); }
.tl-bar.night { background-image: repeating-linear-gradient(45deg, rgba(0, 0, 0, .28) 0 3px, transparent 3px 6px); }
.tl-bar.pv { background: transparent; border: 2px dashed var(--accent); color: var(--text); line-height: 11px; padding: 0 2px; z-index: 2; }
.tl-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; align-items: center; }
.tl-legend span { display: inline-flex; align-items: center; gap: 5px; }
.tl-key, .sk { display: inline-block; width: 14px; height: 10px; border-radius: 2px; box-sizing: border-box; }
.tl-key.out { background: var(--series-1); } .tl-key.back { background: var(--series-2); }
.tl-key.pv { border: 2px dashed var(--accent); } .tl-key.old { background: var(--series-1); opacity: .3; } .tl-key.night { background: var(--panel-3); border: 1px solid var(--line); }
.tl-key.curfew { background: repeating-linear-gradient(45deg, var(--bad-bg) 0 3px, transparent 3px 6px); border: 1px solid var(--line-2); }
.daychips { display: inline-flex; gap: 3px; margin-right: 8px; vertical-align: middle; }
.daychip { width: 26px; height: 24px; border-radius: 4px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--muted); font: 600 11px var(--font); cursor: pointer; padding: 0; }
.daychip.on { background: var(--series-1); border-color: var(--series-1); color: #fff; }
.daychip:hover { border-color: var(--text); }
.sched-pats td { vertical-align: middle; }
.sched-form .row { gap: 10px; }
.sched-problems { margin: 6px 0 0; padding-left: 18px; }
/* ---- Schedule page: each part of an aircraft's timetable in a card of its own, in the player's palette */
.sched-ed { display: grid; gap: 14px; margin-top: 16px; }
.sched-ed .card + .card { margin-top: 0; }
.sched-ed .sc-row { gap: 14px; align-items: stretch; }
.sc-card { border-color: color-mix(in srgb, var(--primary) 26%, var(--line)); background: color-mix(in srgb, var(--primary) 3%, var(--panel)); min-width: 0; }
.sched-ed .sc-card > h3.sc-h { margin: -16px -16px 12px; padding: 9px 16px; font-size: 15px; border-radius: var(--radius) var(--radius) 0 0;
  background: color-mix(in srgb, var(--primary) 15%, var(--panel)); border-bottom: 1px solid color-mix(in srgb, var(--primary) 24%, transparent); }
/* planning: the form on the left, the route and its slots on the right; on one column: route, slots, then the form */
.sc-plan { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "plan route" "plan slots";
  align-items: start; }
.sc-plan > .sc-form { grid-area: plan; } .sc-plan > .sc-route { grid-area: route; } .sc-plan > .sc-slots { grid-area: slots; }
@media (max-width: 900px) { .sc-plan { grid-template-columns: minmax(0, 1fr); grid-template-areas: "route" "slots" "plan"; } }
/* the week: time on the ground - the turnaround light green, maintenance time light blue - with how long */
.tl-gap { position: absolute; top: 2px; bottom: 2px; overflow: hidden; box-sizing: border-box; font-size: 9px; line-height: 11px; padding: 1px 3px;
  font-weight: 600; white-space: normal; word-break: keep-all; }
.tl-gap i { font-style: normal; }
.tl-gap.tat { background: color-mix(in srgb, var(--good) 20%, transparent); color: color-mix(in srgb, var(--good) 80%, var(--text)); }
.tl-gap.mx { background: color-mix(in srgb, #3b8fe0 24%, transparent); color: color-mix(in srgb, #2563b0 85%, var(--text)); }
.tl-key.tat { background: color-mix(in srgb, var(--good) 20%, transparent); border: 1px solid color-mix(in srgb, var(--good) 40%, transparent); }
.tl-key.mx { background: color-mix(in srgb, #3b8fe0 24%, transparent); border: 1px solid color-mix(in srgb, #3b8fe0 45%, transparent); }
.sc-card.sc-edit { border-color: var(--primary); box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 30%, transparent); }
.sc-card.sc-edit > h3.sc-h { background: var(--primary); color: var(--primary-ink); }
.sc-card.sc-edit > h3.sc-h .muted { color: color-mix(in srgb, var(--primary-ink) 80%, transparent); }
.sc-card select.sc-wide { width: 100%; max-width: 640px; }
.sched-pats tr.sel td { background: var(--highlight); }
.sc-others td.mono, .sc-others td.nw { white-space: nowrap; word-break: normal; }
/* each direction under a line of its own (other airlines, connections) */
.sc-others tr.sc-dir td { border-top: 2px solid color-mix(in srgb, var(--primary) 55%, transparent); padding-top: 10px; font-weight: 700;
  background: color-mix(in srgb, var(--primary) 7%, transparent); }
.sc-others tbody tr.sc-dir:first-child td { border-top-width: 0; }
/* back from the far end: at a time, or after a turnaround */
#s-backmode { display: inline-flex; gap: 0; margin: 2px 0 6px; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; }
#s-backmode button { border: 0; background: var(--panel); color: var(--text); padding: 5px 10px; font: 13px var(--font); cursor: pointer; }
#s-backmode button + button { border-left: 1px solid var(--line-2); }
#s-backmode button.on { background: var(--primary); color: var(--primary-ink); }
.slots { display: grid; gap: 3px; }
.slot-row { display: grid; grid-template-columns: 64px 1fr; align-items: center; }
.slot-l { font-size: 11px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.slot-cells { position: relative; display: grid; grid-template-columns: repeat(48, 1fr); height: 16px; border: 1px solid var(--line); border-radius: 3px; overflow: hidden; }
.slot-cells i { display: block; height: 100%; }
.slot-cells i.ok, .sk.ok { background: color-mix(in srgb, var(--good) 45%, transparent); }
.slot-cells i.one, .sk.one { background: var(--warn); }
.slot-cells i.full, .sk.full { background: var(--bad); }
.slot-cells i.cf, .sk.cf { background: repeating-linear-gradient(45deg, var(--line-2) 0 2px, transparent 2px 4px); }
.slot-row.pick i { cursor: pointer; }
.slot-row.pick i:hover, .slot-cells i.sel { box-shadow: inset 0 0 0 2px var(--text); }
.slot-axis .slot-cells { display: block; height: 13px; border: 0; overflow: visible; }
.slot-axis .slot-cells span { position: absolute; top: 0; font-size: 10px; color: var(--muted); }
.dep-times { white-space: nowrap; font-weight: 400; }
.dep-times.block { white-space: normal; }
.sched-list td b { white-space: nowrap; }

/* ---- slot charts: a line every hour, a thinner one every half hour (a slot window) */
.slot-cells::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(to right, color-mix(in srgb, var(--text) 42%, transparent) 1px, transparent 1px),
    linear-gradient(to right, color-mix(in srgb, var(--text) 13%, transparent) 1px, transparent 1px);
  background-size: calc(100% / 24) 100%, calc(100% / 48) 100%; }
.slot-axis .slot-cells::after { display: none; }
.slot-axis .slot-cells span { transform: translateX(-2px); }
@media (max-width: 700px) { .slot-cells::after { background-image: linear-gradient(to right, color-mix(in srgb, var(--text) 42%, transparent) 1px, transparent 1px);
  background-size: calc(100% / 24) 100%; } }
.slot-cells i.mid, .sk.mid { background: color-mix(in srgb, var(--warn) 35%, transparent); }
.slot-cells i.low, .sk.low { background: color-mix(in srgb, var(--series-1) 18%, transparent); }
.slot-cells i.mid-p, .sk.mid-p { background: color-mix(in srgb, var(--series-1) 45%, transparent); }
.slot-cells i.peak, .sk.peak { background: var(--series-1); }
.slots-week { gap: 2px; }
.slots-week .slot-row { grid-template-columns: 112px 1fr; }
.slots-week .slot-day { display: grid; gap: 1px; margin-top: 4px; }
.slots-week .slot-cells { height: 14px; }

/* ---- links to airport and airline pages */
a.lnk { color: inherit; text-decoration: underline dotted color-mix(in srgb, currentColor 45%, transparent); text-underline-offset: 2px; }
a.lnk:hover { color: var(--link); text-decoration-style: solid; }
button.ft-btn { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; white-space: nowrap;
  text-decoration: underline dotted color-mix(in srgb, currentColor 45%, transparent); text-underline-offset: 2px; }
button.ft-btn:hover { color: var(--link); text-decoration-style: solid; }

/* ---- airport page */
.ap-dest { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; align-items: start; }

@media (max-width: 1000px) { .ap-dest { grid-template-columns: minmax(0, 1fr); } }
.al-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.al-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 4px; border: 1px solid var(--line-2); border-radius: 999px;
  background: var(--panel-2); color: var(--text); font-size: 12px; font-weight: 600; text-decoration: none; }
.al-chip:hover { border-color: var(--link); }
.tt-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 10px; }
.tt-filters .seg { display: flex; gap: 4px; padding-bottom: 2px; }
table.tt td { vertical-align: middle; white-space: nowrap; }
table.tt tr.grp td { border-top: 2px solid var(--line-2); }
.dow { display: inline-flex; gap: 2px; }
.dow i { font-style: normal; width: 16px; height: 18px; display: inline-grid; place-items: center; border-radius: 3px; font-size: 10px; font-weight: 700;
  color: var(--faint); background: var(--panel-2); }
.dow i.on { color: #fff; background: var(--series-1); }

/* ---- airline page */
.al-head { align-items: center; }
.al-title { display: flex; gap: 14px; align-items: center; }
.al-title h1 { margin: 0; }
.al-title p { margin: 4px 0 0; }
.al-plane { width: 260px; max-width: 40vw; }
.al-plane svg { width: 100%; height: auto; display: block; }
.big-num { font-size: 40px; font-weight: 700; line-height: 1; }
.al-types { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 12px; }
table.annual td:first-child { white-space: nowrap; color: var(--muted); }

/* ---- admin: airlines of a world */
.lv-help { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin: 8px 0 14px; }
.lv { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font-size: 11px; font-weight: 700; color: #fff; }
.lv-1 { --lv: var(--bad); } .lv-2 { --lv: var(--warn); } .lv-3 { --lv: var(--muted); } .lv-4 { --lv: var(--series-1); } .lv-5 { --lv: var(--good); }
.lv { background: var(--lv); }
select.lv-sel { border-left: 4px solid var(--lv); height: 30px; padding: 2px 6px; font-size: 12px; }
.bulk-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px 10px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel-2); }
.bulk-bar select { height: 30px; padding: 2px 6px; font-size: 12px; width: auto; }
tr.paused-row td { opacity: .7; }
table.adm-ai td { vertical-align: middle; }

/* ---- ready-made airline: suggestions and preview */
.grid.sug-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1300px) { .grid.sug-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 800px) { .grid.sug-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .grid.sug-grid { grid-template-columns: minmax(0, 1fr); } }
.choice-card.sug { gap: 4px; padding: 12px; }
.choice-card.sug h3 { margin: 0; text-transform: none; color: var(--text); font-size: 15px; }
.choice-card.sug .idx { font-size: 11px; grid-template-columns: 62px minmax(0, 1fr) 16px; gap: 6px; width: 100%; }
.choice-card.sug .idx > .small { display: none; }
.choice-card.sug .idx-bar { gap: 1px; min-width: 0; }
.choice-card.sug .idx-bar i { width: auto; flex: 1; height: 8px; }
.choice-card.sug ul { margin: 2px 0 0; font-size: 11.5px; }
.sug-top { display: flex; gap: 8px; align-items: center; }
.sug-rank { font-size: 11px; font-weight: 700; color: var(--muted); background: var(--panel-3); border-radius: 99px; padding: 1px 7px; }
.qprev { margin-top: 18px; border: 2px solid var(--primary); }
.qprev h3 { margin-bottom: 6px; }
.tt-line { white-space: nowrap; margin: 2px 0; }
table.qroutes td { vertical-align: top; }
.qprev-ap { border-top: 1px solid var(--line); padding-top: 10px; }

/* ---- phones: the menu as a coloured strip that stays at the top */
@media (max-width: 760px) {
  .nav { position: sticky; top: 0; z-index: 30; gap: 4px; padding: 7px 8px; border-bottom: 0; align-items: center;
    background: linear-gradient(180deg, var(--primary), color-mix(in srgb, var(--primary) 82%, #000)); box-shadow: 0 2px 10px rgba(0, 0, 0, .22); }
  .topbar { position: static; }                       /* phones: only the menu bar stays at the top */
  #sched-ed, #qprev, .scroll-to { scroll-margin-top: 64px; }
  .nav { flex-wrap: nowrap; gap: 8px; }
  .nav-links { display: none; }
  /* open: a drop-down under the bar, over the page, wherever you are on it */
  .nav.open .nav-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 8px; position: absolute; left: 0; right: 0; top: 100%;
    padding: 8px 12px 12px 14px;
    background: color-mix(in srgb, var(--primary) 78%, #000); box-shadow: 0 10px 18px rgba(0, 0, 0, .28); }
  .nav.open.tall { position: static; flex-wrap: wrap; }   /* (taller than the screen: opens in the page instead) */
  .nav.open.tall .nav-links { position: static; flex-basis: 100%; box-shadow: none; padding: 6px 12px 4px 14px; background: none; }
  .nav-links a { justify-self: start; max-width: 100%; min-width: 0; }   /* two columns, left aligned */
  .nav a.nav-current { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px; font-weight: 600;
    background: var(--primary-ink); color: var(--primary); box-shadow: 0 1px 3px rgba(0, 0, 0, .25); min-width: 0; }
  .nav a.nav-current[hidden] { display: none; }
  .nav a.nav-current:hover { text-decoration: none; background: var(--primary-ink); color: var(--primary); }
  .nav a.nav-current svg { width: 18px; height: 18px; flex: none; }
  .nav .nav-toggle { display: inline-flex; flex: none; align-items: center; gap: 6px; margin-left: auto; padding: 7px 12px; border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--primary-ink) 45%, transparent); background: transparent; color: var(--primary-ink); font: 600 13px var(--font); cursor: pointer; }
  .nav a { margin: 0; padding: 7px 12px; border-radius: 999px; font-weight: 600; color: color-mix(in srgb, var(--primary-ink) 88%, transparent); }
  .nav a:hover { background: color-mix(in srgb, var(--primary-ink) 16%, transparent); color: var(--primary-ink); }
  .nav a.on { background: var(--primary-ink); color: var(--primary); box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
}

/* registrations, aircraft trading, credit rating */
.reg-field { display: flex; flex-direction: column; gap: 4px; margin: 10px 0; }
.reg-input { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 8px; background: var(--input-bg); overflow: hidden; width: max-content; }
.reg-input b { padding: 0 2px 0 10px; font-family: var(--mono); color: var(--muted); }
.reg-input input { border: 0; outline: 0; background: transparent; padding: 0 10px 0 0; width: 120px; font-family: var(--mono); text-transform: uppercase; }
.btn.reg-btn { height: 20px; padding: 0 5px; border-color: transparent; background: transparent; color: var(--muted); } .btn.reg-btn:hover { color: var(--text); background: var(--panel-2); }
.sell-grid .card { margin: 0; display: flex; flex-direction: column; gap: 8px; } .sell-grid .card .btn { align-self: flex-start; margin-top: auto; }
.big-num { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.offer-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 3px 0; }
.rating-row { display: flex; gap: 14px; align-items: center; margin-bottom: 10px; }
.grade { font-size: 30px; font-weight: 800; letter-spacing: .02em; min-width: 72px; text-align: center; padding: 6px 10px; border-radius: 10px; background: var(--info-bg); color: var(--info); }
.grade-CCC, .grade-B { background: var(--bad-bg); color: var(--bad); } .grade-BB, .grade-BBB { background: var(--warn-bg); color: var(--warn); }
.grade-A, .grade-AA, .grade-AAA { background: var(--good-bg); color: var(--good); }
.credit-parts td { padding: 4px 6px; vertical-align: middle; } .credit-parts .meter .num { width: 48px; text-align: right; }
.grade-scale { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 10px; }
.grade-scale span { flex: 1 1 0; min-width: 58px; display: flex; flex-direction: column; align-items: center; padding: 4px 4px; border-radius: 8px; border: 1px solid var(--line-2); font-size: 12px; }
.grade-scale span i { font-style: normal; color: var(--muted); font-size: 11px; }
.grade-scale span b, .grade { white-space: nowrap; overflow-wrap: normal; }   /* (AAA, BBB, CCC on one line) */
@media (max-width: 760px) { .grade-scale { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); } .grade-scale span { min-width: 0; } } .grade-scale span.on { border-color: var(--primary); background: var(--highlight); }
@media (max-width: 760px) { .sell-grid { grid-template-columns: minmax(0, 1fr); } }

/* route planner: six tiles in a row on wide screens */
@media (min-width: 1200px) { .plan-tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (max-width: 1199px) { .plan-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .plan-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cg-bars { max-width: 820px; }
.choice-col { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.sched-ops .f select { min-width: 220px; }

/* ---------- no inner scroll boxes, nothing wider than the page ---------- */
/* Tables are fitted by fitLayout() in app.js: first tighter (fit-1, fit-2), and if they still don't fit, every row
   becomes a small card of label: value pairs (stack). */
table { max-width: 100%; }
table.fit-1 th { white-space: normal; }
table.fit-1 th, table.fit-1 td { padding: 6px 5px; }
table.fit-2 { font-size: 12px; }
table.fit-2 th, table.fit-2 td { padding: 4px 3px; white-space: normal; }
table.fit-2 td *, table.fit-2 th * { white-space: normal !important; }
table.fit-2 [style*="min-width"], table.stack [style*="min-width"] { min-width: 0 !important; }
table.fit-2 .meter, table.fit-2 .bar { min-width: 36px; }
table.stack, table.stack > tbody, table.stack > tfoot, table.stack > tbody > tr, table.stack > tfoot > tr { display: block; width: 100%; }
table.stack > thead { display: none; }
table.stack > tbody > tr, table.stack > tfoot > tr { border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; margin-bottom: 8px; background: var(--panel); }
table.stack > tbody > tr > td, table.stack > tfoot > tr > td { display: flex; flex-wrap: wrap; justify-content: flex-start; align-items: center; gap: 4px 10px;
  padding: 4px 0; border: 0; text-align: left; white-space: normal; min-width: 0; }
table.stack > tbody > tr > td > *, table.stack > tfoot > tr > td > * { min-width: 0; }
table.stack td *, table.stack td { white-space: normal !important; overflow-wrap: break-word; }
table.stack > tbody > tr > td::before, table.stack > tfoot > tr > td::before { content: attr(data-label); flex: 0 0 34%; max-width: 34%; text-align: left; color: var(--muted);
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
table.stack > tbody > tr > td[data-label=""]::before { content: none; }
table.stack > tbody > tr > td[data-label=""] { justify-content: flex-start; text-align: left; }
table.stack .meter { flex: 1 1 120px; max-width: 62%; }
table.stack tr.row-more { display: none; }
tr.row-more { display: none; }
.show-more { margin-top: 8px; }
img, svg, video, canvas { max-width: 100%; }
.btn-row, .row, .choice-row, .tabs { flex-wrap: wrap; }
input, select, textarea { max-width: 100%; }
@media (max-width: 1100px) {
  .topbar { flex-wrap: wrap; padding: 8px 16px; row-gap: 6px; }
  .kpis { flex-wrap: wrap; gap: 6px; }
}
@media (max-height: 860px) and (min-width: 761px) {
  .nav { padding: 8px 8px; } .nav a { padding: 6px 10px; margin-bottom: 0; } .nav .sep { margin: 6px; }
}
@media (min-width: 761px) {         /* the sidebar's background runs to the bottom of the page */
  .shell { background: linear-gradient(90deg, var(--panel) 0 209px, var(--line) 209px 210px, transparent 210px); }
}

/* ---------- Finance: income statement over four periods ---------- */
.fin-table { table-layout: fixed; width: 100%; }
.fin-table col.fin-c0 { width: 34%; }
.fin-table th { white-space: normal; vertical-align: bottom; }
.fin-table td.num, .fin-table th.num { overflow: hidden; text-overflow: ellipsis; }
.fin-table td.fin-c { white-space: normal; overflow-wrap: anywhere; }   /* (the share goes under the figure when narrow) */
.fin-sub { font-weight: 400; text-transform: none; letter-spacing: 0; }
.fin-table tr[data-fin] { cursor: pointer; }
.fin-table tr[data-fin]:hover { background: var(--row-hover); }
.fin-tog { display: inline-block; width: 16px; color: var(--muted); font-size: 11px; }
.fin-sec td { padding-top: 16px; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.fin-item td { font-size: 12px; color: var(--muted); padding-top: 3px; padding-bottom: 3px; }
.fin-item td:first-child { padding-left: 24px; }
.fin-help td { font-size: 12px; color: var(--muted); padding-left: 24px; font-style: italic; }
.fin-total td { border-top: 1px solid var(--line-2); }
.fin-trend-row td { padding-top: 0; padding-bottom: 8px; }
.fin-trend { display: block; width: 100%; height: 34px; }
.fin-trend .fin-line { fill: none; stroke: var(--series-1); stroke-width: 2; vector-effect: non-scaling-stroke; }
.fin-trend .fin-dot { stroke: var(--series-1); stroke-width: 7; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.fin-trend .fin-dot.neg { stroke: var(--bad); }
.fin-trend .fin-zero { stroke: var(--line-2); stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.fin-lower > div { display: contents; }          /* balance sheet, credit rating and loans side by side */
.fin-lower .card { margin-top: 0; }
@media (max-width: 760px) {
  .fin-table col.fin-c0 { width: 31%; }
  .fin-table { font-size: 12px; }
  .fin-table td, .fin-table th { padding: 5px 3px; }
  .fin-item td:first-child, .fin-help td { padding-left: 12px; }
  .fin-tog { width: 12px; }
}

/* Airline settings: game time <-> real time */
.tc-out { margin: 0; font-size: 13px; min-height: 1.4em; }
.tc-part { display: grid; gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; }
.tc-part h4 { margin: 0; font-size: 14px; color: var(--text); }
.tc-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; }
.tc-lbl { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
/* the game's calendar */
.cal-field { display: inline-flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 200px; height: 36px; padding: 0 12px;
  border: 1px solid var(--line-2); border-radius: 8px; background: var(--input-bg); color: var(--text); font: 500 14px var(--font); cursor: pointer; }
.cal-field[aria-expanded="true"] { border-color: var(--primary); }
.cal-ico { color: var(--muted); font-size: 12px; }
.cal-pop { margin-top: 6px; max-width: 340px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--panel); padding: 10px; box-shadow: var(--shadow); }
.cal-head { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 6px; margin-bottom: 8px; }
.cal-step { display: flex; align-items: center; gap: 2px; min-width: 0; }
.cal-step select { flex: 1 1 auto; min-width: 0; height: 32px; padding: 0 4px; }
.cal-step button { flex: none; width: 28px; height: 32px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--panel-2); color: var(--text); cursor: pointer; font-size: 16px; line-height: 1; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; text-align: center; }
.cal-grid i { font-style: normal; font-size: 11px; font-weight: 600; color: var(--muted); padding: 4px 0; }
.cal-grid button { height: 34px; border: 0; border-radius: 6px; background: transparent; color: var(--text); font: 500 13px var(--font); cursor: pointer; }
.cal-grid button:hover:not(:disabled) { background: var(--panel-3); }
.cal-grid button.today { box-shadow: inset 0 0 0 1px var(--primary); }
.cal-grid button.on { background: var(--primary); color: var(--primary-ink); }
.cal-grid button:disabled { color: var(--faint); cursor: default; }
.cal-foot { display: flex; justify-content: flex-end; gap: 6px; margin-top: 8px; }

/* route fares: a row per class, − + ↺ buttons */
.fare-grid { display: grid; grid-template-columns: minmax(120px, 1.4fr) 110px minmax(84px, auto) auto; gap: 6px 10px; align-items: center; }
.fare-row { display: contents; }
.fare-name { display: flex; flex-direction: column; line-height: 1.25; }
.fare-row.unused .fare-name, .fare-row.unused input { opacity: .6; }
.fare-grid input { width: 100%; }
.fare-all { font-weight: 600; }
.fare-all .fare-name { padding-top: 6px; border-top: 1px solid var(--line); }
.fare-btns { display: inline-flex; gap: 6px; }
.fb { width: 34px; height: 32px; border: 0; border-radius: 7px; color: #fff; font: 700 18px/1 var(--font); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.fb:hover { filter: brightness(1.08); }
.fb:active { transform: translateY(1px); }
.fb:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.fb-minus { background: var(--fb-minus); }
.fb-plus { background: var(--fb-plus); }
.fb-ref { background: var(--fb-ref); font-size: 17px; }
.fare-pct-m { display: none; }
@media (max-width: 560px) {
  .fare-grid { grid-template-columns: minmax(0, 1fr) 92px auto; }
  .fare-pct { display: none; }
  .fare-pct-m { display: inline; }
}

/* a closed airline's story (start screen) and leases that ended (Fleet): bold, red, hard to miss */
.closed-box { border: 2px solid var(--bad); background: var(--bad-bg); color: var(--bad); border-radius: 10px; padding: 12px 16px; margin: 0 0 14px; font-weight: 700; }
.closed-box > b:first-child { display: block; font-size: 16px; }
.closed-box p { margin: 6px 0 0; }
.closed-box p:last-child { color: var(--text); font-weight: 400; }
.closed-box ul { margin: 6px 0 0; padding-left: 18px; }

/* the deal screen: how many, buy or lease, cabin; the bill beside it */
.modal:has(.deal) { width: min(920px, 100%); }
.modal:has(.ip-list) { width: min(920px, 100%); }
.deal { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.deal-main { display: grid; gap: 10px; align-content: start; }
.deal-sum { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.deal-sum .kv { grid-template-columns: minmax(0, 1fr) auto; gap: 5px 12px; }
.deal-sum .kv dd { text-align: right; white-space: nowrap; }
.deal-sum .kv dd.txt { white-space: normal; max-width: 170px; }
@media (max-width: 760px) { .deal { grid-template-columns: minmax(0, 1fr); } }
.qty { display: inline-flex; gap: 6px; align-items: center; }
.qty input { width: 72px; text-align: center; }
label.check { display: flex; gap: 8px; align-items: center; font-size: 14px; cursor: pointer; }
label.check input { width: auto; }
.cart-line { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.qtype { align-items: center; margin: 0 0 8px; gap: 10px; }

/* a button that can't be used right now: still tappable, to say why */
.btn.off { opacity: .45; cursor: not-allowed; }

/* My routes: the aircraft on a route, one a line */
table:not(.fit-2) .route-ac { min-width: 130px; }
.ra-line { line-height: 1.35; padding: 1px 0; }
.ra-line + .ra-line { border-top: 1px dashed var(--line); }

/* an aircraft's week (168 h): flying with turnarounds, maintenance time, the rest */
.wkbar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--panel-3); margin-top: 6px; min-width: 90px; }
.wkbar i { display: block; height: 100%; }
.wkbar i.op { background: var(--series-1); }
.wkbar i.mt { background: var(--good); }
.wkbar i.mt.short { background: var(--bad); }
.wk-txt { margin-top: 2px; white-space: nowrap; }
.ph-card .wk-txt { white-space: normal; }

/* Airline settings: service levels (0-5) for every kind of route and class, and the reputation they make */
.svc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr)); gap: 14px 22px; }
.svc-box h4 { margin: 0 0 6px; }
.svc-table { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 3px; }
.svc-table col.cat, .svc-table thead th:first-child { width: 40%; }
.svc-table th { font-weight: 600; font-size: 12px; text-align: left; padding: 2px 4px; line-height: 1.2; }
.svc-table thead th { text-align: center; }
.svc-table td { padding: 0; border-radius: 6px; text-align: center; }
.svc-table select { width: 100%; min-width: 0; padding: 4px 2px; text-align: center; text-align-last: center; background: transparent; border-color: transparent; font-variant-numeric: tabular-nums; }
.svc-cell.flying select { font-weight: 700; box-shadow: inset 0 0 0 2px var(--series-1); border-radius: 6px; }
.svc-flying-key { display: inline-block; width: 14px; height: 10px; border-radius: 3px; box-shadow: inset 0 0 0 2px var(--series-1); vertical-align: middle; }
.svc-cell.lv0, .svc-dot.lv0 { background: var(--panel-3); }
.svc-cell.lv1, .svc-dot.lv1 { background: color-mix(in srgb, var(--series-1) 12%, transparent); }
.svc-cell.lv2, .svc-dot.lv2 { background: color-mix(in srgb, var(--series-1) 24%, transparent); }
.svc-cell.lv3, .svc-dot.lv3 { background: color-mix(in srgb, var(--series-1) 38%, transparent); }
.svc-cell.lv4, .svc-dot.lv4 { background: color-mix(in srgb, var(--series-1) 54%, transparent); }
.svc-cell.lv5, .svc-dot.lv5 { background: color-mix(in srgb, var(--series-1) 72%, transparent); }
.svc-dot { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: middle; }
.svc-tools { align-items: center; gap: 6px; margin: 4px 0 10px; }
.rep-sum td.on { background: var(--highlight); }
.rep-sum th[scope=row] { font-weight: 600; white-space: nowrap; }
.linkish { background: none; border: 0; padding: 0; color: inherit; font: inherit; font-weight: 700; cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }
.rep-admin .pctin { width: 80px; text-align: right; }
.rep-total td { border-top: 2px solid var(--line-2); }
.nowrap { white-space: nowrap; }
.svc-table tbody th, .rep-sum tbody th { text-transform: none; letter-spacing: 0; white-space: normal; overflow-wrap: anywhere; font-size: 13px; color: var(--text); }

/* Overview: last week's best and worst routes and aircraft */
.perf-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); gap: 12px 18px; }
.perf-box h4 { margin: 0 0 4px; padding-left: 8px; border-left: 3px solid var(--line-2); }
.perf-box.good h4 { border-left-color: var(--good); }
.perf-box.bad h4 { border-left-color: var(--bad); }
table.perf td, table.perf th { padding: 4px 6px; }

/* Income statement: each figure's share in brackets; shading = better (green) or worse (red) than the period before */
.fin-pct { font-size: 11px; color: var(--muted); font-weight: 400; white-space: nowrap; }
.fin-c { border-radius: 4px; }
.fin-key { padding: 0 5px; border-radius: 4px; }
.fin-key.good { background: color-mix(in srgb, var(--good) 25%, transparent); }
.fin-key.bad { background: color-mix(in srgb, var(--bad) 25%, transparent); }

/* the week-end pop-up: covers the page while the world works out its week */
.busy-ov { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; padding: 16px;
  background: color-mix(in srgb, #0b1220 55%, transparent); backdrop-filter: blur(2px); }
.busy-box { width: min(480px, 100%); background: var(--panel); color: var(--text); border-radius: 16px; padding: 18px 20px 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .35); text-align: center; }
.busy-box h2 { margin: 14px 0 6px; font-size: 20px; }
.busy-box p { margin: 0 0 10px; line-height: 1.45; }
.busy-scene { position: relative; height: 150px; border-radius: 12px; overflow: hidden;
  background: linear-gradient(180deg, #5fb0e8 0%, #a9dcf6 65%, #e4f5fd 100%); }
.busy-sun { position: absolute; right: 28px; top: 18px; width: 34px; height: 34px; border-radius: 50%; background: #ffd75e;
  box-shadow: 0 0 24px 8px rgba(255, 215, 94, .55); }
.busy-cloud { position: absolute; height: 18px; border-radius: 18px; background: #fff; opacity: .9; animation: busy-cloud 9s linear infinite; }
.busy-cloud::before { content: ''; position: absolute; width: 55%; height: 170%; left: 18%; bottom: 20%; border-radius: 50%; background: inherit; }
.busy-cloud.c1 { width: 70px; top: 26px; animation-duration: 8s; }
.busy-cloud.c2 { width: 110px; top: 92px; animation-duration: 11s; animation-delay: -4s; }
.busy-cloud.c3 { width: 54px; top: 58px; animation-duration: 7s; animation-delay: -2s; opacity: .7; }
@keyframes busy-cloud { from { left: 110%; } to { left: -40%; } }
.busy-plane { position: absolute; left: 50%; top: 50%; width: 230px; transform: translate(-50%, -50%); animation: busy-bob 3s ease-in-out infinite; }
.busy-plane svg { width: 100%; height: auto; display: block; }
@keyframes busy-bob { 0%, 100% { transform: translate(-50%, -54%) rotate(-1deg); } 50% { transform: translate(-50%, -44%) rotate(1deg); } }
.busy-bar { height: 8px; border-radius: 4px; background: var(--panel-3); overflow: hidden; margin: 4px 0 6px; }
.busy-bar i { display: block; height: 100%; width: 0; background: var(--series-1); transition: width .9s linear; }
@media (prefers-reduced-motion: reduce) { .busy-cloud, .busy-plane { animation: none; } }

/* chat boxes: the world's (Overview) and the alliance's (Alliances) */
.chat-list { display: grid; gap: 6px; margin: 6px 0 10px; }
.chat-msg { padding: 6px 10px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); max-width: 100%; }
.chat-msg.me { background: color-mix(in srgb, var(--series-1) 10%, var(--panel-2)); }
.chat-h { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.chat-h .muted { margin-left: auto; }
.chat-t { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 2px; }
.chat-del { border: 0; background: none; color: var(--bad); font-size: 16px; line-height: 1; cursor: pointer; padding: 0 2px; }
.chat-form { display: flex; gap: 8px; }
.chat-in { flex: 1; min-width: 0; }

/* cash negative: the red banner under the top bar (every page), with the countdown and the ways out */
.shell { grid-template-rows: auto auto 1fr; }
.topbar { grid-row: 1; }
.redbar { grid-column: 1 / -1; grid-row: 2; padding: 9px 16px; background: color-mix(in srgb, var(--bad) 14%, var(--panel));
  color: var(--text); border-bottom: 2px solid var(--bad); font-size: 14px; line-height: 1.45; }
.redbar.urgent { background: color-mix(in srgb, var(--bad) 26%, var(--panel)); }
.redbar[hidden] { display: none; }
.redbar-links { display: inline-flex; flex-wrap: wrap; gap: 4px 14px; margin-left: 8px; }
.redbar-links a { font-weight: 600; }
.shell > .nav, .shell > main { grid-row: 3; }
@media (max-width: 760px) {
  .shell { grid-template-rows: auto auto auto 1fr; }
  .shell > .nav { grid-row: 3; } .shell > main { grid-row: 4; }
}
.rescue { border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); margin-top: 16px; }

/* saved cabin layouts: buttons to apply, x to delete, save the cabin under a name */
.my-lays { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.lay-chip { display: inline-flex; align-items: center; }
.lay-chip .btn { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.lay-x { border: 1px solid var(--line-2); border-left: 0; background: var(--panel); color: var(--bad); height: 28px; padding: 0 7px;
  border-radius: 0 8px 8px 0; cursor: pointer; font-size: 14px; }
.lay-save { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.lay-form { display: inline-flex; gap: 6px; }
.lay-form input { width: 170px; height: 30px; }

/* list pages: filters, sortable captions, ticks and the bulk-action bar */
.list-tools { display: grid; gap: 8px; margin-bottom: 10px; }
.flt-row { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.flt-row .chip.on { border-color: var(--series-1); background: color-mix(in srgb, var(--series-1) 12%, transparent); }
.flt-row .seg { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.flt-row input[type=search], .flt-row select { height: 30px; }
table th.tick, table td.tick { width: 28px; padding-left: 6px; padding-right: 2px; }
table td.tick input, table th.tick input { width: 16px; height: 16px; }
#fl-table th .sort, #rt-table th .sort, #al-table th .sort, main th .sort { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-transform: inherit; letter-spacing: inherit; text-align: inherit; }
.sort-pick { display: inline-flex; gap: 4px; align-items: center; }
.sort-pick select { height: 30px; }
/* My Fleet's table sorts by its column captions; its Sort by box only where the table shows as cards (phones) */
.fl-sum .sort-pick { display: none; }
.fl-sum:has(table.stack) .sort-pick { display: inline-flex; }
#fl-table th .sort.on, #rt-table th .sort.on, main th .sort.on { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
#fl-table th.num .sort, #rt-table th.num .sort, main th.num .sort { text-align: right; }
.bulk-bar { position: sticky; top: calc(var(--top-h, 58px) + 4px); z-index: 20; display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center;
  padding: 8px 12px; margin-bottom: 10px; border-radius: 10px; background: color-mix(in srgb, var(--series-1) 14%, var(--panel)); border: 1px solid var(--series-1); }
.bulk-bar[hidden] { display: none; }
@media (max-width: 760px) { .bulk-bar { top: 52px; } }
.tick-all-pick { display: none; }
main:has(#fl-table table.stack) #fl-tools .tick-all-pick, main:has(#rt-table table.stack) #rt-tools .tick-all-pick { display: inline-flex; }

/* worlds from history */
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; word-break: break-all; }
.move-card { border: 1px solid var(--series-1); }

/* aircraft market: the sort picker above the cards and tables */
.mk-sort { display: flex; justify-content: flex-end; margin: -4px 0 10px; }
/* airline page timetable: a heading row per section (HQ, hubs and bases, other flights) */
.tt tr.tt-sec th { text-align: left; background: var(--panel-2); padding-top: 10px; font-size: 13px; }
tr.click-row { cursor: pointer; }
tr.click-row:hover { background: var(--row-hover); }

/* airline milestones (awards.py) */
td.badges { white-space: nowrap; }
.badge { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: var(--panel-3); margin-right: 2px; font-size: 12px; cursor: default; }
.award-row { display: flex; flex-wrap: wrap; gap: 10px; }
.award { display: flex; gap: 8px; align-items: center; padding: 6px 12px 6px 6px; border: 1px solid var(--line); border-radius: 99px; background: var(--panel-2); }
.award .ic { display: inline-flex; width: 30px; height: 30px; border-radius: 50%; align-items: center; justify-content: center; background: var(--warn-bg); font-size: 16px; }
.award.launch .ic { background: var(--info-bg); color: var(--info); }

/* route planner: biggest markets, the share of demand flown non-stop (green: little; red: all of it) */
table.markets td, table.markets th { padding-left: 6px; padding-right: 6px; }
.fill-bar { display: flex; align-items: center; gap: 6px; min-width: 84px; }
.fill-bar .bar { flex: 1; height: 8px; border-radius: 4px; background: var(--panel-3); overflow: hidden; min-width: 40px; }
.fill-bar .bar i { display: block; height: 100%; border-radius: 4px; background-image: linear-gradient(90deg, #2da44e, #d4a72c 55%, #cf222e); background-repeat: no-repeat; }
.fill-bar span { font-size: 12px; font-variant-numeric: tabular-nums; min-width: 34px; text-align: right; }
.btn-row.nowrap { flex-wrap: nowrap; }
.btn-row.nowrap .btn { white-space: nowrap; }
/* a page of the game in a pop-up (route planner, passenger and cargo engines over the markets list) */
.modal.page-pop { width: min(1240px, 100%); padding: 12px; }
.page-pop-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 4px 8px; }
.page-pop-frame { display: block; width: 100%; height: 480px; border: 0; border-radius: 8px; background: var(--bg); }
.shell.embed { display: block; min-height: 0; background: none; }
.shell.embed > main { padding: 12px 16px; }

/* a time of day: hour and minutes (every 5) */
.tpick { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.tpick select { width: 68px; min-width: 0; flex: 0 0 68px; }          /* hour and minutes: the same width */
.tpick .tnote { font-size: 12px; color: var(--muted); margin-left: 4px; }
.tpick .tnote.bad { color: var(--bad); }
.tpick b { color: var(--muted); }

/* red dot in the menu: something new (Communication: messages, world chat; Alliances: applications, invitations) */
.nav a { position: relative; }
.ndot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); margin-left: 6px; vertical-align: middle; box-shadow: 0 0 0 2px var(--panel); }
.ndot.inline { margin-left: 4px; }
/* Communication: tabs, message list, a message */
.comm-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin: 0 0 12px; border-bottom: 1px solid var(--line); }
.comm-tabs a { padding: 8px 14px; border-radius: 8px 8px 0 0; color: var(--muted); text-decoration: none; font-weight: 600; }
.comm-tabs a.on { color: var(--text); background: var(--panel); border: 1px solid var(--line); border-bottom-color: var(--panel); margin-bottom: -1px; }
table.msg-list tr.unread td { font-weight: 700; }
table.msg-list tr.unread td:first-child::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--primary); margin-right: 6px; vertical-align: middle; }
.msg { padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); margin: 8px 0; }
.msg.quoted { opacity: .85; }
.msg-h { margin-bottom: 6px; }
.msg-body { white-space: pre-wrap; overflow-wrap: anywhere; margin: 6px 0; }
.msg-form textarea { width: 100%; font: inherit; }
.invite { padding: 10px 0; border-bottom: 1px solid var(--line); }
.invite:last-child { border-bottom: 0; }
#inv-msg { width: 100%; font: inherit; }

/* the Game Guide: its menu beside the text */
.guide-wrap { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 16px; align-items: start; }
.guide-menu { min-width: 0; }
.guide-menu a.on { color: var(--text); font-weight: 700; }
.guide-main { min-width: 0; }
@media (max-width: 900px) { .guide-wrap { grid-template-columns: 1fr; } }

/* ---- colour palettes (Airline settings → Display): blue is the default above; each has a light and a dark side */
:root[data-palette="teal"] { --primary: #0e7c7b; --link: #0b6e6d; --info: #0b6e6d; --fb-ref: #0e7c7b; --accent: #0e7c7b;
  --info-bg: color-mix(in srgb, #0e7c7b 12%, transparent); --highlight: color-mix(in srgb, #0e7c7b 8%, transparent);
  --bg: #f0f6f6; --panel-2: #f3f9f8; --panel-3: #e3eeed; --line: #d4e3e2; --series-1: #0e7c7b; --cat-1: #0e7c7b; }
:root[data-theme="dark"][data-palette="teal"] { --primary: #1fa8a6; --link: #5fd4d1; --info: #5fd4d1; --fb-ref: #1fa8a6; --accent: #1fa8a6;
  --info-bg: color-mix(in srgb, #1fa8a6 16%, transparent); --highlight: color-mix(in srgb, #1fa8a6 12%, transparent);
  --bg: #0b1515; --panel: #121d1e; --panel-2: #172526; --panel-3: #1e2f30; --line: #263b3c; --series-1: #1fa8a6; --cat-1: #1fa8a6; }
:root[data-palette="green"] { --primary: #1f7a3e; --link: #1a6b36; --info: #1a6b36; --fb-ref: #1f7a3e; --accent: #1f7a3e;
  --info-bg: color-mix(in srgb, #1f7a3e 12%, transparent); --highlight: color-mix(in srgb, #1f7a3e 8%, transparent);
  --bg: #f1f6f2; --panel-2: #f4f9f5; --panel-3: #e4eee6; --line: #d5e3d8; --series-1: #1f7a3e; --cat-1: #1f7a3e; }
:root[data-theme="dark"][data-palette="green"] { --primary: #2ea050; --link: #6fd68b; --info: #6fd68b; --fb-ref: #2ea050; --accent: #2ea050;
  --info-bg: color-mix(in srgb, #2ea050 16%, transparent); --highlight: color-mix(in srgb, #2ea050 12%, transparent);
  --bg: #0c140f; --panel: #131d16; --panel-2: #18251c; --panel-3: #1f3024; --line: #283c2e; --series-1: #2ea050; --cat-1: #2ea050; }
:root[data-palette="red"] { --primary: #b4232c; --link: #a01f27; --info: #a01f27; --fb-ref: #b4232c; --accent: #b4232c;
  --info-bg: color-mix(in srgb, #b4232c 12%, transparent); --highlight: color-mix(in srgb, #b4232c 8%, transparent);
  --bg: #f8f3f3; --panel-2: #fbf6f6; --panel-3: #f1e5e5; --line: #e6d6d6; --series-1: #b4232c; --cat-1: #b4232c; }
:root[data-theme="dark"][data-palette="red"] { --primary: #e5484d; --link: #ff8a8e; --info: #ff8a8e; --fb-ref: #e5484d; --accent: #e5484d;
  --info-bg: color-mix(in srgb, #e5484d 16%, transparent); --highlight: color-mix(in srgb, #e5484d 12%, transparent);
  --bg: #160d0e; --panel: #1f1415; --panel-2: #28191b; --panel-3: #332022; --line: #42292b; --series-1: #e5484d; --cat-1: #e5484d; }
:root[data-palette="orange"] { --primary: #b9530b; --link: #a14708; --info: #a14708; --fb-ref: #b9530b; --accent: #b9530b;
  --info-bg: color-mix(in srgb, #b9530b 12%, transparent); --highlight: color-mix(in srgb, #b9530b 8%, transparent);
  --bg: #f8f4f0; --panel-2: #fbf7f3; --panel-3: #f1e8de; --line: #e6d9ca; --series-1: #b9530b; --cat-1: #b9530b; }
:root[data-theme="dark"][data-palette="orange"] { --primary: #e8812f; --link: #ffb070; --info: #ffb070; --fb-ref: #e8812f; --accent: #e8812f;
  --info-bg: color-mix(in srgb, #e8812f 16%, transparent); --highlight: color-mix(in srgb, #e8812f 12%, transparent);
  --bg: #16100b; --panel: #1f1711; --panel-2: #281e16; --panel-3: #33271d; --line: #423225; --series-1: #e8812f; --cat-1: #e8812f; }
:root[data-palette="grey"] { --primary: #4f5862; --link: #3f4750; --info: #3f4750; --fb-ref: #4f5862; --accent: #4f5862;
  --info-bg: color-mix(in srgb, #4f5862 12%, transparent); --highlight: color-mix(in srgb, #4f5862 8%, transparent);
  --bg: #f3f4f5; --panel-2: #f7f8f9; --panel-3: #e8eaed; --line: #d8dce0; --series-1: #4f5862; --cat-1: #4f5862; }
:root[data-theme="dark"][data-palette="grey"] { --primary: #8a96a3; --link: #b8c2cc; --info: #b8c2cc; --fb-ref: #8a96a3; --accent: #8a96a3;
  --info-bg: color-mix(in srgb, #8a96a3 16%, transparent); --highlight: color-mix(in srgb, #8a96a3 12%, transparent);
  --bg: #101214; --panel: #171a1d; --panel-2: #1d2125; --panel-3: #252a2f; --line: #30363d; --series-1: #8a96a3; --cat-1: #8a96a3; }
:root[data-palette="violet"] { --primary: #6b3fc4; --link: #5c35ab; --info: #5c35ab; --fb-ref: #6b3fc4; --accent: #6b3fc4;
  --info-bg: color-mix(in srgb, #6b3fc4 12%, transparent); --highlight: color-mix(in srgb, #6b3fc4 8%, transparent);
  --bg: #f5f3fa; --panel-2: #f8f6fc; --panel-3: #ebe6f5; --line: #ddd6ec; --series-1: #6b3fc4; --cat-1: #6b3fc4; }
:root[data-theme="dark"][data-palette="violet"] { --primary: #9a6cf0; --link: #c3a6ff; --info: #c3a6ff; --fb-ref: #9a6cf0; --accent: #9a6cf0;
  --info-bg: color-mix(in srgb, #9a6cf0 16%, transparent); --highlight: color-mix(in srgb, #9a6cf0 12%, transparent);
  --bg: #110e17; --panel: #18141f; --panel-2: #1f1928; --panel-3: #282033; --line: #332a42; --series-1: #9a6cf0; --cat-1: #9a6cf0; }
:root[data-palette="pink"] { --primary: #b5306f; --link: #9e295f; --info: #9e295f; --fb-ref: #b5306f; --accent: #b5306f;
  --info-bg: color-mix(in srgb, #b5306f 12%, transparent); --highlight: color-mix(in srgb, #b5306f 8%, transparent);
  --bg: #f9f3f6; --panel-2: #fcf6f9; --panel-3: #f2e4eb; --line: #e8d4de; --series-1: #b5306f; --cat-1: #b5306f; }
:root[data-theme="dark"][data-palette="pink"] { --primary: #e05596; --link: #ff94c4; --info: #ff94c4; --fb-ref: #e05596; --accent: #e05596;
  --info-bg: color-mix(in srgb, #e05596 16%, transparent); --highlight: color-mix(in srgb, #e05596 12%, transparent);
  --bg: #170d12; --panel: #20141a; --panel-2: #291921; --panel-3: #34202a; --line: #432936; --series-1: #e05596; --cat-1: #e05596; }
.palettes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.palettes button { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px 5px 6px; border-radius: 99px; border: 1px solid var(--line-2);
  background: var(--panel-2); color: var(--text); cursor: pointer; font: inherit; font-size: 13px; }
.palettes button.on { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }
.palettes i { width: 16px; height: 16px; border-radius: 50%; display: inline-block; }

/* ---- pictures players upload (logos, liveries, alliance banners) */
.pics { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.pic { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--panel-2); min-width: 0; }
.pic p { margin: 4px 0 6px; }
.pic-row { display: flex; gap: 10px; align-items: center; margin: 6px 0; flex-wrap: wrap; }
.pic-prev { display: block; border: 1px solid var(--line); border-radius: 8px; object-fit: contain;
  background: repeating-conic-gradient(#e7eaee 0 25%, #fff 0 50%) 0 0 / 14px 14px; }
.pic-prev.sq { width: 72px; height: 72px; }
.pic-prev.wide { width: 220px; max-width: 100%; height: 74px; }
.al-banner { display: block; margin: 0 0 14px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--panel-2); }
.al-banner img { display: block; width: 100%; max-height: 260px; object-fit: cover; }
.al-banner.sm { margin: -4px 0 10px; border-radius: 8px; }
.al-banner.sm img { max-height: 90px; }
.al-desc p { margin: 0 0 10px; line-height: 1.55; }
.al-desc p:last-child { margin-bottom: 0; }
.al-excerpt { margin: 0 0 8px; }
.al-profile summary { cursor: pointer; }
.aircraft.own-livery image { image-rendering: auto; }

/* ---- Aircraft market: filters by kind of aircraft and by manufacturer */
.mk-filters { display: grid; gap: 8px; margin-bottom: 14px; }
/* the market's tabs and filters: panels in shades of the player's palette (tabs the deepest, then types, then makers) */
.tabs.mk-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 8px; border: 0; border-radius: var(--radius);
  background: color-mix(in srgb, var(--primary) 20%, var(--panel)); margin-bottom: 10px; }
.tabs.mk-tabs button { border: 1px solid color-mix(in srgb, var(--primary) 25%, transparent); border-radius: 8px; padding: 9px 12px; text-align: center;
  background: color-mix(in srgb, var(--primary) 6%, var(--panel)); color: var(--text); font-size: 14px; }
.tabs.mk-tabs button:hover { background: color-mix(in srgb, var(--primary) 14%, var(--panel)); }
.tabs.mk-tabs button.on { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.tabs.mk-tabs button.on .pill { background: rgba(255, 255, 255, .9); }
.tabs.mk-tabs button:last-child:nth-child(odd) { grid-column: 1 / -1; }      /* (an odd last tab across both columns) */
.mk-filters > .chips.mk-types, .mk-filters > .mk-makers-box { padding: 8px 10px; border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--primary) 18%, transparent); }
.mk-filters > .chips.mk-types { background: color-mix(in srgb, var(--primary) 11%, var(--panel)); }
.mk-filters > .mk-makers-box { background: color-mix(in srgb, var(--primary) 6%, var(--panel)); }
.mk-filters .chip { background: var(--panel); }
/* the limits (range, capacity; age, condition): one row each, in a lighter shade of the palette */
.mk-filters > .mk-lims { display: grid; gap: 6px; padding: 8px 10px; border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--primary) 18%, transparent); background: color-mix(in srgb, var(--primary) 4%, var(--panel)); }
.mk-lim { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.mk-lim label { display: inline-flex; align-items: center; gap: 6px; }
.mk-lim select { min-width: 110px; }
.mk-lim .mk-fl { min-width: 130px; }
.chip.mk-mine { border-color: var(--primary); }
.plan-filters { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin: 0 0 10px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); }
.plan-filters select { height: 30px; }
table.markets td.who { min-width: 120px; max-width: 190px; }
/* the planner's 'flown' columns: the bar over its percentage, so all fourteen columns fit a desktop */
table.markets .fill-bar { flex-direction: column; align-items: stretch; gap: 2px; min-width: 38px; }
table.markets .fill-bar .bar { flex: none; min-width: 34px; }
table.markets .fill-bar span { min-width: 0; text-align: center; font-size: 11px; }
table.fit-2.markets td.who { min-width: 96px; }
table.fit-2.markets td.nw { white-space: normal; }
.who-line { white-space: normal; line-height: 1.35; margin-bottom: 2px; }
.btn-col { display: flex; flex-direction: column; gap: 3px; align-items: stretch; }
.btn-col .btn.sm { height: 24px; padding: 0 8px; }
.btn-col .btn { white-space: nowrap; }
.who-more summary { cursor: pointer; color: var(--link); }
.chip.mk-mine.disabled { opacity: .55; }
/* Market history */
.mkh-bar { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-bottom: 10px; }
.mkh-bar .mkh-sort { margin: 0 0 0 auto; }
.mkh-bar .seg { display: flex; flex-wrap: wrap; gap: 6px; }
.mkh-count { margin: 4px 0 6px; }
.mkh-foot { margin-top: 10px; display: grid; gap: 4px; justify-items: start; }
.mkh-table tr.mkh-mine td { background: var(--highlight); }
.mkh-table td.nw { white-space: nowrap; }
table.stack.mkh-table > tbody > tr > td:empty { display: none; }      /* (a phone: no empty Price on a lease) */
/* the price limit: to buy or the weekly lease */
.mk-seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; }
.mk-seg button { border: 0; background: var(--panel); color: var(--text); padding: 5px 10px; font: 13px var(--font); cursor: pointer; }
.mk-seg button + button { border-left: 1px solid var(--line-2); }
.mk-seg button.on { background: var(--primary); color: var(--primary-ink); }
.mk-filters .mk-fl { color: var(--text); font-weight: 600; }
.mk-filters .chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.mk-filters .mk-fl { min-width: 96px; }
/* manufacturers: the same round chips, in alphabetical columns read downwards - three on wide screens, two on narrow
   ones and phones; each chip fills its column, the count at its right */
.mk-makers { columns: 3; column-gap: 8px; margin: 6px 0 0; }
@media (max-width: 1100px) { .mk-makers { columns: 2; } }
.mk-makers .chip { display: flex; margin: 0 0 6px; break-inside: avoid; border-radius: 15px; }   /* (a two-line name: rounded corners, not an oval) */
.mk-makers .chip input { flex: none; }
.mk-makers .chip .mk-name { min-width: 0; overflow-wrap: anywhere; }
.mk-makers .chip > .muted { margin-left: auto; padding-left: 6px; }
.al-show { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 24px; align-items: center; margin-top: 4px; }
.al-show.solo { grid-template-columns: minmax(0, 1fr); justify-items: center; }
.al-show.words-only { grid-template-columns: minmax(0, 1fr); }
.al-show .al-liv { width: 100%; }
.al-show.solo .al-liv { max-width: 680px; }
.al-show .al-liv svg, .al-show .al-liv img { display: block; width: 100%; height: auto; max-height: 380px; object-fit: contain; border-radius: 10px; }
.al-slogan { font-size: 22px; line-height: 1.3; font-weight: 600; font-style: italic; margin: 0 0 12px; color: var(--primary); }
@media (max-width: 900px) { .al-show { grid-template-columns: minmax(0, 1fr); } .al-slogan { font-size: 19px; } }
.mk-only { margin: -4px 0 12px; padding: 8px 12px; border-radius: 8px; background: var(--info-bg); font-size: 13px; }
table.museum td { vertical-align: middle; }

/* ---- aircraft photos: cards with a slide show (two a row; one on narrow screens and phones) and the full-screen view */
.ph-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
@media (max-width: 1050px) { .ph-grid { grid-template-columns: minmax(0, 1fr); } }
.ph-card { background: var(--panel); border: 1px solid color-mix(in srgb, var(--primary) 30%, var(--line-2)); border-radius: var(--radius); padding: 12px;
  display: flex; flex-direction: column; gap: 10px; min-width: 0; box-shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 6px 18px rgba(15, 23, 42, .07); }
:root[data-theme="dark"] .ph-card { background: var(--panel-2); box-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 18px rgba(0, 0, 0, .35); }
.ph-card.off { opacity: .6; }
.ph-card > .t { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; }
.ph-card > .t .t1 { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.ph-on { font-weight: 600; margin-top: 2px; }
.ph-card > .t b { font-size: 16px; }
.ph-card .specs { grid-template-columns: repeat(4, minmax(0, 1fr)); font-size: 13px; }
@media (max-width: 520px) { .ph-card .specs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ph-card .specs div span { font-size: 11px; }
/* one card a row (aircraft market, My Fleet): the title across, the photos 380 px high on the left, the data on the
   right; on smaller screens the data below the photos */
.ph-grid.one { grid-template-columns: minmax(0, 1fr); }
.ph-grid.one > .ph-card { display: flow-root; }
.ph-grid.one > .ph-card > * + * { margin-top: 10px; }
.ph-grid.one > .ph-card > .ph { float: left; width: 570px; margin: 0 20px 4px 0; }
.ph-grid.one .ph-frame { height: 380px; aspect-ratio: auto; }
.ph-grid.one > .ph-card > .t { align-items: flex-start; text-align: left; }
.ph-grid.one > .ph-card > .t .t1 { justify-content: flex-start; }
.ph-grid.one > .ph-card > .specs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1150px) {
  .ph-grid.one > .ph-card > .ph { float: none; width: auto; max-width: 570px; margin: 0; }
  .ph-grid.one .ph-frame { height: auto; aspect-ratio: 3 / 2; }
  .ph-grid.one > .ph-card > .specs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 520px) { .ph-grid.one > .ph-card > .specs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.fl-sum { margin-bottom: 12px; }
.fl-sum-t td.nw { white-space: nowrap; }
.ph { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ph-frame { position: relative; aspect-ratio: 3 / 2; background: #0d1420; border-radius: 10px; overflow: hidden; touch-action: pan-y; }
.ph-frame.ph-failed .ph-img { visibility: hidden; }
.ph-frame.ph-failed::after { content: 'This photo could not be loaded just now. Try the arrows for the next one, or its page on Wikimedia Commons below.';
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 24px 58px; text-align: center;
  color: #c9d3e0; font-size: 14px; line-height: 1.5; pointer-events: none; }
.ph-img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; }
.ph-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border-radius: 50%; border: 0;
  background: rgba(0, 0, 0, .45); color: #fff; font-size: 24px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.ph-nav:hover { background: rgba(0, 0, 0, .7); }
.ph-nav.prev { left: 8px; } .ph-nav.next { right: 8px; }
.ph-count { position: absolute; right: 8px; bottom: 8px; background: rgba(0, 0, 0, .55); color: #fff; border-radius: 99px; padding: 2px 9px; font-size: 12px; }
.ph-cap { line-height: 1.45; overflow-wrap: anywhere; }
.ph-desc { color: var(--muted); }
.ph-credit { font-size: 11px; color: var(--muted); margin-top: 2px; }
.ph-credit a { color: inherit; text-decoration: underline; }
.ph-similar { background: var(--info-bg); border-radius: 8px; padding: 6px 10px; line-height: 1.4; }
.ph-none .pic { background: linear-gradient(#cfe3f7, #eaf3fb); border-radius: 10px; aspect-ratio: 3 / 1; display: flex; align-items: center; justify-content: center; padding: 6px; }
.ph-none .pic svg { width: 100%; height: 100%; }
.ph-view { position: fixed; inset: 0; z-index: 2000; background: rgba(5, 8, 12, .94); color: #e8edf3; display: flex; flex-direction: column; }
.ph-view-top { display: flex; align-items: center; gap: 8px; padding: 8px 12px; font-size: 14px; }
.ph-view-btn { background: rgba(255, 255, 255, .12); color: #fff; border: 0; border-radius: 8px; min-width: 40px; height: 36px; font-size: 22px; cursor: pointer; }
.ph-view-btn:hover { background: rgba(255, 255, 255, .25); }
.ph-view-body { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0 56px; touch-action: pan-y; }
.ph-view-body img { max-width: 100%; max-height: 100%; object-fit: contain; }
.ph-view-cap { padding: 10px 16px 14px; max-width: 980px; margin: 0 auto; width: 100%; line-height: 1.5; }
.ph-view-cap a { color: #9cc8ff; }
.ph-view-cap .ph-desc, .ph-view-cap .ph-credit { color: #b9c3cf; }
.ph-view-cap .ph-similar { background: rgba(255, 255, 255, .1); margin-bottom: 6px; }
@media (max-width: 700px) { .ph-view-body { padding: 0 4px; } .ph-view .ph-nav { width: 34px; height: 34px; } }
.fl-tick { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.fl-tick input { height: auto; width: auto; margin: 0; }
.fl-card > .t { align-items: center; }
.ph-rel { font-size: 12px; color: var(--warn); font-weight: 600; }
.ph-special { color: var(--primary); }

/* ---------- This week in Airline7 */
.tw-nav { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 14px; }
.tw-nav select { height: 30px; max-width: 100%; }
.tw-kind { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--primary); }
.tw-card h3, .tw-route h3 { margin: 6px 0 6px; font-size: 15px; }
.tw-card .tw-h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 10px 0 4px; }
.tw-story h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.tw-story h4 { margin: 10px 0 2px; font-size: 14px; }
.tw-story p { margin: 0 0 8px; line-height: 1.5; }
.tw-cite a { color: inherit; text-decoration: underline; }
ul.tw-dyk { margin: 4px 0 0; padding-left: 18px; line-height: 1.5; }
ul.tw-dyk li { margin-bottom: 2px; }
.tw-h2 { margin: 22px 0 10px; font-size: 18px; }
.tw-routes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); gap: 16px; }
.tw-route > * + * { margin-top: 10px; }
.tw-route .specs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tw-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 12px; }
.tw-two h4 { margin: 0 0 4px; font-size: 13px; }
.tw-src { margin-top: 14px; }
/* ---------- Airline7 annual report (Overview) */
.ar-tiles { margin: 8px 0 12px; }
.ar-mine { border: 1px solid color-mix(in srgb, var(--primary) 35%, var(--line)); background: color-mix(in srgb, var(--primary) 6%, transparent);
  border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; }
.ar-mine h4 { margin: 0 0 6px; }
.ar-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 14px 18px; }
.ar-block h4 { margin: 4px 0 6px; }
tbody > tr.mine-row { background: color-mix(in srgb, var(--primary) 14%, transparent); font-weight: 600; }
.tw-route-head h3 { text-transform: none; letter-spacing: 0; font-size: 17px; color: var(--text); margin: 4px 0 0; }
.tw-routes > .card { margin: 0; }

/* ---------- airport picker (Route planner): a country, then an airport; a search box for any */
.plan-pick { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; }
.plan-pick .f { display: grid; gap: 4px; min-width: 0; }
.plan-pick .f > span { font-size: 12px; color: var(--muted); }
.plan-swap { padding-bottom: 8px; }
.ap-pick { position: relative; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; max-width: 100%; }
.ap-pick .ap-ctry { height: 34px; max-width: 220px; }
.ap-btn { height: 34px; min-width: 220px; max-width: min(420px, 100%); text-align: left; padding: 0 10px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--panel); color: var(--text); cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-drop { position: absolute; z-index: 40; top: calc(100% + 4px); left: 0; width: min(460px, calc(100vw - 32px)); background: var(--panel);
  border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, .18); padding: 8px; }
.ap-q { width: 100%; height: 34px; margin-bottom: 6px; }
.ap-list { max-height: 320px; overflow-y: auto; display: grid; }
.ap-opt { text-align: left; border: 0; background: none; color: var(--text); padding: 5px 8px; border-radius: 6px; cursor: pointer; font: inherit; }
.ap-opt:hover, .ap-opt.on { background: var(--tbl-hover); }
.pager { display: flex; gap: 8px; align-items: center; justify-content: center; margin: 10px 0 2px; }
.mk-pager-top { margin-top: 0; }

/* ---------- payload charts on aircraft cards */
.pay-charts { display: flex; flex-wrap: wrap; gap: 8px; border: 0; background: none; padding: 0; cursor: zoom-in; color: inherit; text-align: left; }
.ch { margin: 0; flex: 1 1 200px; max-width: 280px; }
.ch figcaption { font-size: 11px; color: var(--muted); margin-bottom: 2px; }
.ch svg { width: 100%; height: auto; display: block; }
.ch.big { max-width: none; flex: 1 1 320px; }
.ch.big figcaption { font-size: 13px; color: var(--text); font-weight: 600; }
.ch-grid { stroke: var(--line); stroke-width: 1; }
.ch-axis { stroke: var(--muted); stroke-width: 1; }
.ch-mark { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.ch-t { fill: var(--muted); }
.ch-l { stroke-width: 2; stroke-linejoin: round; }
.ch-end { stroke-width: 2; fill: var(--panel); }
.ch-s1 { stroke: var(--series-1, #2563eb); background: var(--series-1, #2563eb); }
.ch-s2 { stroke: var(--series-2, #d97706); background: var(--series-2, #d97706); }
.ch-s3 { stroke: var(--series-3, #16a34a); background: var(--series-3, #16a34a); }
.ch-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; margin-top: 4px; }
.ch-legend i { display: inline-block; width: 14px; height: 3px; margin-right: 5px; vertical-align: middle; border-radius: 2px; }
.pay-big { display: flex; flex-wrap: wrap; gap: 16px; }
.modal.pay-modal { max-width: min(1220px, calc(100vw - 32px)); width: 100%; }
/* announcements: the pictures on the left (38.2% wide), the text on the right; on small screens the pictures first */
.ann-body.has-img { display: grid; grid-template-columns: 38.2% minmax(0, 1fr); gap: 16px; align-items: start; margin-top: 10px; }
.ann-body.has-img .ann-imgs { display: grid; gap: 8px; margin: 0; }
.ann-body.has-img .ann-img { width: 100%; }
.ann-body.has-img .ann-img img { width: 100%; height: auto; object-fit: contain; }
.ann-body.has-img .ann-text p:first-child { margin-top: 0; }
@media (max-width: 700px) { .ann-body.has-img { grid-template-columns: minmax(0, 1fr); } }
.kpi.clock .l .wk { font-size: 13px; font-weight: 800; color: var(--text); letter-spacing: .02em; text-transform: none; }

/* ---------- Airline settings: tabs (the market's look; four across, two on phones) */
.tabs.set-tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tabs.set-tabs button:last-child:nth-child(odd) { grid-column: auto; }
.set-pane { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.set-pane > * { min-width: 0; }
.set-pane > .grid { margin: 0; }
@media (max-width: 760px) { .tabs.set-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tabs.set-tabs button:last-child:nth-child(odd) { grid-column: 1 / -1; } }

/* ---------- the week on phones: days in columns, hours down the side (a bar is a flight, read downwards) */
@media (max-width: 640px) {
  .tl { grid-template-columns: 30px repeat(7, minmax(0, 1fr)); gap: 2px; }
  .tl-row { grid-template-columns: none; grid-template-rows: 18px 768px; align-items: stretch; }
  .tl-day { text-align: center; font-size: 11px; }
  .tl-track { height: auto; }
  .tl-track > span { left: 1px; right: 1px; width: auto; top: var(--a); bottom: auto; height: var(--w); }
  .tl-track > .tl-shade { left: 0; right: 0; }
  .tl-row:not(.tl-axis) .tl-track::after {
    background-image: linear-gradient(to bottom, color-mix(in srgb, var(--text) 32%, transparent) 1px, transparent 1px),
      linear-gradient(to bottom, color-mix(in srgb, var(--text) 11%, transparent) 1px, transparent 1px);
    background-size: 100% calc(100% / 24), 100% calc(100% / 48); }
  .tl-axis .tl-track { height: auto; }
  .tl-axis .tl-track > span { left: auto; right: 3px; width: auto; height: auto; margin-top: 1px; }
  .tl-axis .tl-ax-minor { display: block; }
  .tl-bar, .tl-gap { writing-mode: vertical-rl; padding: 3px 1px; }
  .tl-bar { font-size: 10px; line-height: 11px; }
}

/* ---------- a world's picture: lobby card (240 px), Overview beside the airline's name (240 px), top bar (as the logo) */
.world-pic { display: block; object-fit: cover; border-radius: var(--radius); }
.world-pic.wp-card { width: calc(100% + 32px); height: 240px; margin: -16px -16px 6px; border-radius: var(--radius) var(--radius) 0 0; max-width: none; }
.world-pic.wp-top { height: 40px; width: auto; max-width: 160px; flex: none; border-radius: 6px; }
.page-head.ov-head { justify-content: flex-start; align-items: center; gap: 18px; flex-wrap: wrap; }
.world-pic.wp-ov { height: 240px; width: auto; max-width: min(480px, 100%); flex: none; }
.world-pic.wp-prev { max-width: 100%; max-height: 240px; width: auto; height: auto; margin: 4px 0 8px; }
@media (max-width: 900px) { .world-pic.wp-top { height: 32px; max-width: 110px; } }
@media (max-width: 600px) {
  .world-pic.wp-ov { width: 100%; max-width: none; height: auto; max-height: 240px; }
  .world-pic.wp-top { max-width: 90px; }
}

/* ---------- flight numbers: the field beside Open route */
.open-route { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; }
.fno-f { display: grid; gap: 3px; }
.fno-f > span:first-child { font-size: 12px; color: var(--muted); }
.fno-in { display: inline-flex; align-items: center; gap: 6px; }
.fno-in input { height: 32px; }
.fno { font: 600 11.5px var(--mono, ui-monospace, monospace); color: var(--muted); white-space: nowrap; }
/* planner suggestions: a class's demand with its 'flown' bar under it; the caption sorts by either */
th.mk-dem button.sort { display: block; margin-left: auto; }
th.mk-dem button.sort.sub { font-size: 10.5px; font-weight: 500; text-transform: none; color: var(--muted); }
th.mk-dem button.sort.sub.on { color: var(--text); font-weight: 700; }
td.mk-dem > .fill-bar { margin: 3px 0 0 auto; width: max-content; }
.fit-filters label { max-width: 100%; min-width: 0; }
.fit-filters select { max-width: 100%; }

/* ---------- Schedule → Swap timetables */
.swap-pick { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; }
.swap-pick .f { min-width: 0; flex: 1 1 260px; }
.swap-pick select { max-width: 100%; }
.swap-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.swap-two > .card { margin: 0; min-width: 0; }
@media (max-width: 1100px) { .swap-two { grid-template-columns: minmax(0, 1fr); } }
.swap-trips { margin-top: 10px; }
.swap-trip { display: flex; gap: 8px; align-items: flex-start; padding: 3px 0; font-size: 13px; }
.swap-trip input { height: auto; margin-top: 3px; }
.swap-modes { margin: 8px 0; }
.swap-modes .chip { align-items: flex-start; text-align: left; }
.swap-speed { margin: 6px 0; padding-left: 18px; }
.tl-bar.swp { box-shadow: inset 0 0 0 2px var(--accent); }
.tl-bar.mv { background-image: repeating-linear-gradient(-45deg, rgba(255, 255, 255, .35) 0 3px, transparent 3px 7px); }
.tl-key.swp { background: var(--series-1); box-shadow: inset 0 0 0 2px var(--accent); }
.tl-key.mv { background: var(--series-1); background-image: repeating-linear-gradient(-45deg, rgba(255, 255, 255, .45) 0 2px, transparent 2px 5px); }
.swap-go { margin-top: 16px; }

/* ---------- Seven days, seven birds */
.s77-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .s77-grid { grid-template-columns: minmax(0, 1fr); } }
.s77-routes { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.s77-routes li { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.s77-n { display: inline-grid; place-items: center; min-width: 22px; height: 22px; border-radius: 11px; background: var(--panel-3); font-size: 12px; font-weight: 700; }
.s77-birds { width: auto; }
.s77-add { margin: 0 0 12px; }

/* Airline settings: fees policy */
.fee-pols { display: grid; gap: 6px; }
.fee-pol { display: flex; gap: 8px; align-items: flex-start; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; min-width: 0; }
.fee-pol input { height: auto; margin-top: 3px; flex: 0 0 auto; }
.fee-pol > span { min-width: 0; overflow-wrap: anywhere; }
.fee-pol:has(input:checked) { border-color: var(--accent); background: var(--accent-soft, transparent); }

/* Airport page: features */
.ap-feats { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ap-feats li { display: flex; gap: 8px; align-items: flex-start; min-width: 0; }
.ap-feats li > div { min-width: 0; overflow-wrap: anywhere; }
.ap-feats .af-i { flex: 0 0 auto; width: 24px; text-align: center; font-size: 16px; line-height: 1.3; }

/* Route planner: where to go after opening a route */
.open-next { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: flex-end; min-width: 0; }
.open-next .f { margin: 0; min-width: 0; }
.open-next select { max-width: 100%; }
.open-next .chk { display: inline-flex; gap: 6px; align-items: center; padding-bottom: 8px; }
.open-next .chk input { height: auto; }

/* Admin: world duration calculator */
.dur-calc .row { flex-wrap: wrap; gap: 8px 14px; }
.dur-calc input[type=date] { max-width: 180px; }
.dc-out { display: grid; gap: 4px; padding: 10px 12px; border-radius: 8px; background: var(--panel-2); overflow-wrap: anywhere; }

/* Airlines: filters; when each player was last online */
.al-filters { flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-bottom: 10px; }
.al-filters select { max-width: 100%; }
td.act { white-space: nowrap; }
.act-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: -1px; box-shadow: 0 0 0 1px rgba(0,0,0,.15) inset; }
.act-good { background: #2da44e; } .act-yellow { background: #e3c000; } .act-amber { background: #f08c00; } .act-grey { background: #8c959f; }

/* 52-week history: small bar charts (an aircraft on My Fleet, a route's Manage pop-up) */
details.hist { margin: 8px 0; }
details.hist > summary { cursor: pointer; font-weight: 600; font-size: 13px; }
.hist-body { margin-top: 6px; }
.hist-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 10px 14px; }
.hist-ch { margin: 0; min-width: 0; }
.hist-ch figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 8px; font-size: 12px; font-weight: 600; }
.hist-ch figcaption > span:last-child { font-weight: 400; }
.hist-ch svg { display: block; width: 100%; height: auto; }
.hist-ch .hb { fill: #3d7fbf; }
.hist-ch .hb-pos { fill: var(--good, #2da44e); }
.hist-ch .hb-neg { fill: var(--bad, #cf222e); }
.hist-ch .hb-warn { fill: #f08c00; }
.hist-ch .hb-none { fill: var(--line-2); }
.hist-ch .hb-est { opacity: .45; }
.hist-ch rect:hover { opacity: .75; }
.hist-ch .ch-zero { stroke: var(--muted); }
.hist-ch .ch-t { font-size: 9px; }
.ph-grid.one > .ph-card > details.hist { clear: both; padding-top: 6px; border-top: 1px solid var(--line); }

/* 7-7: picking routes for a set */
.s77p-list { display: grid; gap: 2px; margin: 10px 0; }
.s77p-list .chk { display: flex; gap: 8px; align-items: flex-start; padding: 4px 6px; border-radius: 6px; cursor: pointer; overflow-wrap: anywhere; }
.s77p-list .chk:hover { background: var(--row-hover); }
.s77p-list .chk input { height: auto; width: auto; margin-top: 3px; flex: none; }
.s77p-all { border-bottom: 1px solid var(--line); margin-bottom: 4px; }

/* This week: the occurrence of the week */
.tw-occ .tw-occ-x { margin: 8px 0; font-style: italic; }
.tw-occ .tw-sources li, .tw-occ ul.tw-dyk li { overflow-wrap: anywhere; }
/* the world's limits on business jets and freighters (market head, admin worlds table) */
.mk-limits { margin: -4px 0 10px; }
.lim-sel { display: grid; gap: 4px; }
.lim-sel label { display: flex; gap: 6px; align-items: center; justify-content: space-between; white-space: nowrap; }
