@font-face {
  font-family: Manrope;
  src: url('/fonts/manrope-latin.woff2') format('woff2');
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
}

:root {
  font-family: Manrope, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #17283e;
  background: #f5f7fb;
  font-synthesis: none;
  line-height: 1.5;
  color-scheme: light;
  --ink: #17283e;
  --muted: #617087;
  --line: #e3e8f0;
  --blue: #3155e7;
  --mono: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
}

* { box-sizing: border-box; }
body { margin: 0; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .6; }
a { color: inherit; }
button, a, input { transition: background .18s ease, color .18s ease, border-color .18s ease; }
button:focus-visible, a:focus-visible, input:focus-visible, [tabindex]:focus-visible { outline: 3px solid #7590ff; outline-offset: 4px; }
svg { width: 20px; height: 20px; flex-shrink: 0; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; top: -100px; left: 16px; padding: 12px; background: #fff; z-index: 5; }
.skip-link:focus { top: 16px; }

/* A quiet masthead leaves the flight information in focus. */
.masthead { background: #fff; border-bottom: 1px solid var(--line); }
.header-inner { max-width: 1320px; margin: auto; min-height: 96px; padding: 20px 40px; display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 20px; min-width: 0; text-decoration: none; }
.airport-mark { color: var(--blue); font-size: 2rem; font-weight: 800; letter-spacing: -.08em; line-height: 1; }
.brand-name { padding-left: 20px; border-left: 1px solid #d9e0eb; font-size: .875rem; color: var(--muted); line-height: 1.5; }
.brand-name strong { color: var(--ink); font-weight: 700; }
.airport-clock { display: grid; grid-template-columns: auto auto; column-gap: 20px; align-items: center; text-align: right; }
.eyebrow { font-size: .75rem; font-weight: 700; letter-spacing: .13em; margin: 0 0 8px; }
.airport-clock .eyebrow { grid-column: 1; grid-row: 1; color: var(--muted); font-size: .75rem; letter-spacing: .08em; margin: 0; }
.airport-clock time { grid-column: 2; grid-row: 1 / span 2; font-family: var(--mono); font-size: 1.5rem; font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: -.05em; }
.airport-clock > span:last-child { grid-column: 1; grid-row: 2; font-size: .75rem; color: var(--muted); }

main { max-width: 1320px; margin: auto; padding: 42px 40px 32px; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 28px; }
.page-heading > * { min-width: 0; }
.page-heading .eyebrow { color: var(--muted); }
h1 { margin: 0; font-size: clamp(2.25rem, 4vw, 3.25rem); line-height: 1.2; letter-spacing: -.055em; font-weight: 800; }
.title-dot { color: var(--blue); }
.feed-info { display: flex; flex-direction: column; align-items: flex-end; gap: 7px; font-size: .75rem; color: var(--muted); padding-bottom: 5px; }
.connection { display: inline-flex; align-items: center; gap: 7px; font-size: .875rem; font-weight: 650; color: var(--muted); }
.connection:before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #7d8b9e; flex-shrink: 0; }
.connection.live { color: #267456; }
.connection.live:before { background: #328260; box-shadow: 0 0 0 3px #e8f4ef; }
.connection.error { color: #9e5c17; }
.connection.error:before { background: #b7762d; }

.board { background: #fff; border: 1px solid #dfe5ef; border-radius: 16px; box-shadow: 0 8px 28px #14253f05; }
.board-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 16px 22px; border-radius: 15px 15px 0 0; background: #182d49; color: #fff; }
.direction { display: flex; gap: 6px; min-width: 0; }
.direction-button { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 20px; min-height: 48px; border: 0; border-radius: 8px; background: transparent; color: #cbd6e7; font-size: .9375rem; font-weight: 700; }
.direction-button span { font-family: sans-serif; font-size: 1.35rem; line-height: 1; }
.direction-button.active { background: #fff; color: #2644c9; box-shadow: 0 2px 5px #08162820; }
.direction-button:not(.active):hover { background: #ffffff0c; color: #fff; }
.date-control { display: flex; align-items: center; gap: 12px; min-width: 0; font-size: .875rem; }
.date-control label { color: #cbd6e7; }
.date-control input { color-scheme: dark; min-width: 0; width: 170px; min-height: 44px; border: 1px solid #53667d; background: #263d59; color: #fff; border-radius: 6px; padding: 8px 10px; font-size: 1rem; }
.text-button { border: 0; background: transparent; color: #fff; font-size: .875rem; font-weight: 700; min-height: 44px; padding: 8px 4px; }
.text-button:hover { text-decoration: underline; text-underline-offset: 4px; }
.filter-toolbar { display: flex; align-items: center; gap: 16px; padding: 22px 24px 20px; }
.search-box { position: relative; display: flex; flex: 1; align-items: center; min-width: 0; }
.search-box svg { position: absolute; left: 16px; color: #70809b; z-index: 1; pointer-events: none; }
.search-box input { appearance: none; -webkit-appearance: none; width: 100%; min-width: 0; min-height: 48px; padding: 12px 16px 12px 46px; font-size: 1rem; color: var(--ink); background: #f7f9fc; border: 1px solid var(--line); border-radius: 8px; }
.search-box input::placeholder { color: #627289; opacity: 1; }
.search-box:focus-within svg { color: var(--blue); }
.search-box input:focus { background: #fff; border-color: #7590ff; }
.refresh-button { display: flex; justify-content: center; align-items: center; gap: 9px; flex-shrink: 0; min-height: 48px; padding: 10px 16px; border: 1px solid #dfe5ef; border-radius: 8px; color: #3c506e; background: #fff; font-size: .875rem; font-weight: 700; }
.refresh-button:hover { color: var(--blue); background: #f3f6ff; border-color: #c3cef5; }
.refresh-button.loading svg { animation: rotate 1.2s linear infinite; }
@keyframes rotate { to { transform: rotate(360deg); } }
.board-caption { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding: 0 24px 20px; }
.board-caption h2 { font-size: 1rem; margin: 0; font-weight: 800; }
#flight-count { color: #536885; font-size: .75rem; font-weight: 600; background: #edf2f9; border-radius: 5px; padding: 3px 8px; }
.timezone-note { color: var(--muted); font-size: .75rem; margin-left: auto; }
.visibility-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 0 24px 16px; }
.visibility-toolbar p { margin: 0; color: var(--muted); font-size: .875rem; }
.visibility-button { min-height: 44px; max-width: 100%; padding: 10px 12px; border: 1px solid #d8e0ff; border-radius: 6px; background: #f1f4ff; color: #2847c4; font-size: .875rem; font-weight: 700; overflow-wrap: anywhere; }
.visibility-button:hover { background: #e5ebff; }
.visibility-button[aria-pressed="true"] { background: #fff; color: #435773; border-color: var(--line); }
.notice { padding: 14px 16px; margin: 0 24px 20px; border: 1px solid #eed8b8; border-radius: 8px; color: #8b521a; background: #fff8ed; font-size: .875rem; overflow-wrap: anywhere; }

/* Desktop information is aligned as a timetable, not a collection of cards. */
table { width: 100%; table-layout: fixed; border-collapse: collapse; text-align: left; }
th { padding: 13px 16px; color: #5b6e8a; background: #f5f7fb; border-block: 1px solid var(--line); font-size: .75rem; text-transform: uppercase; font-weight: 700; letter-spacing: .07em; overflow-wrap: anywhere; }
th:first-child, td:first-child { padding-left: 24px; }
th:last-child, td:last-child { padding-right: 24px; }
th:nth-child(1) { width: 10%; }
th:nth-child(2) { width: 25%; }
th:nth-child(3) { width: 23%; }
th:nth-child(4) { width: 8%; }
th:nth-child(5) { width: 14%; }
th:nth-child(6) { width: 20%; }
td { padding: 22px 16px; border-bottom: 1px solid #e9edf4; vertical-align: top; font-size: 1rem; min-width: 0; overflow-wrap: anywhere; }
tbody tr { transition: background .18s ease; }
tbody tr:hover { background: #f9faff; }
tbody tr:last-child td { border-bottom: 0; }
.flight-time { font-family: var(--mono); font-weight: 500; font-size: 1.125rem; line-height: 1.6; letter-spacing: -.065em; white-space: nowrap; }
.route { font-size: 1rem; font-weight: 800; line-height: 1.5; }
.route-stop { display: block; }
.route-stop + .route-stop { margin-top: 12px; }
.secondary { display: block; margin-top: 4px; color: var(--muted); font-size: .875rem; line-height: 1.55; font-weight: 400; }
.airport-code { display: block; font-family: var(--mono); font-size: .75rem; letter-spacing: .035em; }
.flight-number { font-size: .9375rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.airline-name { color: #536580; }
.airline-name, .codeshare, .route-stop { overflow-wrap: anywhere; }
.codeshare { margin-top: 7px; font-size: .75rem; }
.location { display: inline-block; font-size: 1rem; font-weight: 800; min-width: 32px; }
.status { display: inline-block; max-width: 100%; padding: 5px 9px; font-size: .875rem; font-weight: 700; line-height: 1.5; color: #536580; background: #eef2f7; border: 1px solid #e3e8f0; border-radius: 5px; }
.status.positive { background: #edf7f1; border-color: #d7eadf; color: #28704b; }
.status.attention { background: #fff6e7; border-color: #f1dfbc; color: #935917; }
.status.negative { background: #fff0f0; border-color: #f5d8d8; color: #ab3a3a; }
.status.active { background: #edf1ff; border-color: #d8e0ff; color: #3151ca; }
.empty-state { padding: 60px 24px 70px; text-align: center; color: var(--muted); }
.state-symbol { display: block; font-family: var(--mono); color: #8293af; font-size: 2rem; letter-spacing: .15em; margin-bottom: 14px; }
.empty-state h3 { margin: 0 0 8px; color: var(--ink); font-size: 1.125rem; font-weight: 700; }
.empty-state p { max-width: 460px; margin: 0 auto; font-size: .9375rem; }
.board-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; padding: 15px 24px; background: #fafbfd; border-top: 1px solid var(--line); border-radius: 0 0 15px 15px; color: var(--muted); font-size: .75rem; }
.auto-refresh { display: inline-flex; align-items: center; gap: 7px; }
.auto-refresh span { font-size: 1rem; }
footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding: 24px 2px 0; color: var(--muted); font-size: .75rem; }
footer p { margin: 0; }
footer a { text-decoration-color: #b6c2d5; text-underline-offset: 4px; }
footer a:hover { color: var(--blue); }
.noscript { padding: 20px; text-align: center; }
.display-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 18px; }
.display-button { min-height: 44px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); font-size: .875rem; font-weight: 700; }
.display-button:hover { background: #edf2f9; }
.display-hint, #display-message { font-size: .8125rem; color: var(--muted); }
#fullscreen { margin-left: auto; }
#display-message:empty { display: none; }
.board-pages { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 24px; border-top: 1px solid var(--line); }
#page-info { font-family: var(--mono); font-size: .8125rem; }
.page-controls { display: flex; flex-wrap: wrap; gap: 8px; }
.page-controls .display-button { min-width: 44px; }

/* Airport display mode keeps the same live data and controls in a signage palette. */
body.airport-mode {
  --ink: #f4f5eb;
  --muted: #a8b5bc;
  --line: #303d46;
  --blue: #ffd15c;
  color-scheme: dark;
  background: #0b1117;
  color: var(--ink);
  min-height: 100vh;
}
.airport-mode .masthead { background: #101a22; border-bottom: 3px solid #ffd15c; }
.airport-mode .header-inner, .airport-mode main { max-width: 1920px; }
.airport-mode .header-inner { min-height: 80px; }
.airport-mode main { padding-top: 24px; }
.airport-mode .brand-name { border-color: var(--line); }
.airport-mode .airport-clock time { color: #ffd15c; font-size: clamp(1.5rem, 3vw, 2.5rem); letter-spacing: .02em; }
.airport-mode .page-heading { margin-bottom: 20px; }
.airport-mode h1 { color: #ffd15c; text-transform: uppercase; letter-spacing: .04em; font-size: clamp(2rem, 4vw, 3.5rem); }
.airport-mode .connection.live { color: #87deb1; }
.airport-mode .connection.live:before { background: #87deb1; box-shadow: none; }
.airport-mode .connection.error { color: #ffd15c; }
.airport-mode .connection.error:before { background: #ffd15c; }
.airport-mode .board { background: #0e171f; border-color: var(--line); border-radius: 4px; box-shadow: none; }
.airport-mode .board-toolbar { background: #192630; border-radius: 3px 3px 0 0; padding-block: 10px; }
.airport-mode .direction-button { border-radius: 3px; }
.airport-mode .direction-button.active { color: #141b20; background: #ffd15c; }
.airport-mode .date-control input { background: #101a22; border-color: #50616e; }
.airport-mode .filter-toolbar { display: none; }
.airport-mode .display-button, .airport-mode .refresh-button, .airport-mode .visibility-button {
  color: var(--ink); background: #1b2a35; border-color: #50616e; border-radius: 3px;
}
.airport-mode .display-button:hover, .airport-mode .refresh-button:hover, .airport-mode .visibility-button:hover { background: #2b404e; }
.airport-mode #airport-mode { color: #ffd15c; border-color: #ffd15c; }
.airport-mode .board-caption { padding-top: 16px; padding-bottom: 12px; }
.airport-mode .board-caption h2 { text-transform: uppercase; letter-spacing: .12em; color: #ffd15c; }
.airport-mode #flight-count { background: #263640; color: #e0e8ec; border-radius: 2px; }
.airport-mode .visibility-toolbar { padding-bottom: 12px; }
.airport-mode .notice { background: #352818; color: #ffe0a6; border-color: #8f6b32; }
.airport-mode th { background: #ffd15c; color: #172029; border: 0; letter-spacing: .1em; }
.airport-mode td { padding-block: 16px; border-color: var(--line); vertical-align: middle; }
.airport-mode tbody tr:nth-child(even) { background: #17232d; }
.airport-mode tbody tr:hover { background: #23333f; }
.airport-mode .flight-time, .airport-mode .flight-number, .airport-mode .location { font-family: var(--mono); font-size: clamp(1rem, 1.6vw, 1.5rem); letter-spacing: .015em; }
.airport-mode .flight-time { color: #ffd15c; }
.airport-mode .route { text-transform: uppercase; font-size: clamp(1rem, 1.5vw, 1.375rem); letter-spacing: .035em; }
.airport-mode .airline-name { color: var(--muted); }
.airport-mode .status { font-family: var(--mono); font-size: clamp(.875rem, 1.3vw, 1.125rem); text-transform: uppercase; border-radius: 2px; color: #c4d0d6; background: #26343e; border-color: #465964; }
.airport-mode .status.positive { color: #9ae8bc; background: #173a2b; border-color: #35674f; }
.airport-mode .status.attention { color: #ffda79; background: #3b3019; border-color: #766034; }
.airport-mode .status.negative { color: #ffb0ab; background: #421f24; border-color: #81444c; }
.airport-mode .status.active { color: #121b23; background: #ffd15c; border-color: #ffd15c; }
.airport-mode .board-bottom { background: #131e27; border-radius: 0 0 3px 3px; }
.airport-mode button:disabled { cursor: default; }
.airport-mode .skip-link { background: #ffd15c; color: #141b20; }

@media (max-width: 800px) {
  .airport-mode .header-inner { min-height: 76px; }
  .airport-mode main { padding-top: 20px; }
  .airport-mode .board-pages { padding-inline: 16px; }
  .airport-mode tbody tr { border-top-color: var(--line); }
  .airport-mode .status-cell { border-top: 1px solid var(--line); padding-top: 12px !important; }
  .airport-mode .status { width: 100%; padding: 10px 12px; }
  .display-toolbar { gap: 8px; }
  .display-hint { flex-basis: 100%; order: 1; }
  #fullscreen { margin-left: 0; }
}

@media (max-width: 1080px) {
  .header-inner { padding-inline: 24px; }
  main { padding: 32px 24px; }
  .board-toolbar { gap: 16px; padding-inline: 18px; }
  .direction-button { padding-inline: 14px; }
  td, th { padding-inline: 12px; }
  th:nth-child(2) { width: 23%; }
  th:nth-child(3) { width: 24%; }
  th:nth-child(4) { width: 9%; }
  footer { flex-direction: column; }
}

@media (max-width: 800px) {
  .header-inner { min-height: 86px; padding: 18px 20px; gap: 20px; flex-wrap: wrap; }
  .airport-clock { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; margin-left: auto; }
  .airport-clock .eyebrow { font-size: .75rem; }
  .airport-clock time { font-size: 1.25rem; }
  .airport-clock > span:last-child { display: none; }
  main { padding: 28px 20px; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 12px; margin-bottom: 24px; }
  h1 { font-size: 2.5rem; }
  .page-heading .eyebrow { letter-spacing: .09em; }
  .feed-info { flex-direction: row; flex-wrap: wrap; gap: 4px 12px; padding: 0; align-items: center; }
  .board-toolbar { flex-direction: column; align-items: stretch; padding: 12px; gap: 12px; }
  .direction { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 8rem), 1fr)); gap: 6px; }
  .direction-button { min-width: 0; gap: 8px; padding: 12px 8px; font-size: .9375rem; }
  .date-control { flex-wrap: wrap; gap: 10px; }
  .date-control label { padding-inline: 4px; }
  .date-control input { flex: 1 1 8rem; width: 0; max-width: 100%; }
  .date-control .text-button { padding-inline: 8px; }
  .filter-toolbar { gap: 10px; padding: 16px 16px 18px; }
  .search-box svg { left: 13px; width: 18px; }
  .search-box input { padding-left: 40px; }
  .refresh-button { width: 48px; padding: 10px; }
  .refresh-button > span { display: none; }
  .board-caption { padding: 0 16px 16px; gap: 8px; }
  .timezone-note { width: 100%; margin: 0; }
  .visibility-toolbar { padding-inline: 16px; }
  .notice { margin-inline: 16px; }
  table, tbody { display: block; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 14px 16px;
    padding: 22px 20px;
    border-top: 1px solid var(--line);
  }
  td { display: block; padding: 0 !important; border: 0; min-width: 0; }
  .time-cell { grid-column: 1; grid-row: 1; }
  .route-cell { grid-column: 2; grid-row: 1 / span 2; text-align: right; }
  .flight-cell { grid-column: 1; grid-row: 2; }
  .terminal-cell { grid-column: 1; grid-row: 3; }
  .location-cell { grid-column: 2; grid-row: 3; text-align: right; }
  .status-cell { grid-column: 1 / -1; grid-row: 4; }
  .flight-time { font-size: 1.25rem; line-height: 1.25; }
  .route { font-size: 1.125rem; line-height: 1.4; letter-spacing: -.02em; }
  .flight-number { font-size: .9375rem; }
  .airline-name { font-size: .875rem; }
  .terminal-cell:before, .location-cell:before { content: attr(data-label); display: block; margin-bottom: 4px; color: var(--muted); font-size: .75rem; }
  .status { font-size: .875rem; }
  .board-bottom { padding-inline: 16px; }
  .empty-state { padding: 42px 20px; }
}

@media (max-width: 480px) {
  .header-inner { min-height: 76px; padding: 16px 20px; }
  .brand { gap: 12px; }
  .airport-mark { font-size: 1.75rem; }
  .brand-name { border: 0; padding: 0; font-size: .75rem; }
  .brand-name .brand-city { display: none; }
  .brand-name strong { display: block; max-width: 6rem; font-size: .75rem; font-weight: 500; color: var(--muted); }
  main { padding: 24px 12px; }
  .page-heading { margin-inline: 6px; gap: 10px; }
  h1 { font-size: 2.25rem; }
  .page-heading .eyebrow { font-size: .75rem; letter-spacing: .04em; }
  .board { border-radius: 12px; }
  .board-toolbar { border-radius: 11px 11px 0 0; }
  .direction-button { gap: 6px; font-size: .875rem; }
  .filter-toolbar { padding-inline: 12px; }
  .board-caption { padding-inline: 16px; }
  tbody tr { padding-inline: 16px; }
  .board-bottom { border-radius: 0 0 11px 11px; }
}

@media (max-width: 360px) {
  .brand-name { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { animation: none !important; transition: none !important; }
}
