/* The terminal board keeps its physical, tiled rows on every screen. */
.flight-board-page { padding-bottom: env(safe-area-inset-bottom, 0px); }
.flight-board-main { width: min(1320px, calc(100% - 2rem)); min-width: 0; margin: 24px auto 60px; }
.board-intro { padding: 12px 0 24px; }
.board-intro h1 { margin: 10px 0 14px; font-size: clamp(1.7rem, 3.2vw, 2.6rem); line-height: 1.15; }
.board-intro h1 .split-flap { font-size: inherit; white-space: nowrap; }
.board-intro-copy { max-width: 650px; margin: 0; color: var(--muted); line-height: 1.6; }
.board-search { padding: 20px 24px; margin-bottom: 24px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
#board-airport-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
#board-airport-form label { flex: 1 1 180px; min-width: 0; max-width: 300px; }
#board-airport { border-radius: 5px; font-family: ui-monospace, monospace; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
#board-airport-form .button { min-height: 48px; padding: 12px 20px; font: inherit; font-weight: 750; cursor: pointer; }
#board-airport-help { flex-basis: 100%; margin: 0; color: var(--muted); font-size: 12px; }
#board-security { flex-basis: 100%; max-width: 100%; overflow: hidden; }
#board-feedback { margin: 12px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.board-text-button { padding: 8px 0; border: 0; background: transparent; color: var(--blue); font: inherit; text-decoration: underline; cursor: pointer; }
.flight-board-page button:disabled { opacity: .45; cursor: not-allowed; }
.flight-board-page :is(button, input, .board-table-scroll):focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

/* Gray metal cabinet, a yellow direction sign, and a black clock. */
.terminal-board {
  min-width: 0;
  padding: 0 14px;
  border: 4px solid #4c4d4c;
  border-top-color: #696a68;
  border-bottom-color: #272827;
  border-radius: 5px;
  background: linear-gradient(110deg, #393b39, #494b49 48%, #333532);
  color: #f4f3ed;
  box-shadow: 0 18px 48px #0005, inset 0 1px #ffffff35, inset 0 -1px #0008;
}
.board-masthead { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 24px; padding: 16px 8px 15px; }
.board-direction { grid-column: 1 / -1; display: flex; justify-content: center; align-items: center; gap: 14px; margin-bottom: 7px; }
.board-direction h2 { margin: 0; color: #ffda31; font: 800 clamp(26px, 3.1vw, 40px)/1.2 Arial, sans-serif; letter-spacing: .065em; }
.board-direction-icon { display: inline-grid; place-items: center; flex: 0 0 auto; width: 47px; height: 47px; border-radius: 9px; color: #151614; background: #ffda31; font: 38px/1 Arial, sans-serif; box-shadow: inset 0 1px #fff6, 0 1px 2px #0006; }
.board-direction-icon[data-direction="arrivals"] { transform: scaleX(-1); }
.board-airport-summary { min-width: 0; }
.board-overline { margin: 0 0 5px; color: #d2d2c9; font: 700 11px ui-monospace, monospace; letter-spacing: .16em; }
.board-airport-summary h3 { margin: 0; color: #f2f1e9; font: 700 16px/1.4 Arial, sans-serif; overflow-wrap: anywhere; }
.board-clock { grid-column: 2; grid-row: 2 / 4; display: grid; justify-items: end; gap: 4px; color: #d0d1c7; font: 10px/1.4 ui-monospace, monospace; text-align: right; }
.board-clock strong { white-space: nowrap; padding: 6px 9px 7px; border: 2px solid #5e615b; border-radius: 2px; background: linear-gradient(#191b19 48%, #020402 51%); box-shadow: inset 0 1px 3px #000, 0 1px #ffffff18; color: #f6f5ec; font: 700 22px/1 ui-monospace, monospace; letter-spacing: .15em; }
.board-data-badge { justify-self: start; padding: 3px 0; color: #d0d1c7; font: 700 9px/1.5 ui-monospace, monospace; letter-spacing: .07em; text-transform: uppercase; }
.board-data-badge[data-kind="demo"] { color: #ffdb54; }
.board-data-badge[data-kind="stale"] { color: #ffbd99; }
.board-toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px 24px; padding: 12px 8px 15px; border-top: 1px solid #656761; box-shadow: inset 0 1px #191c1980; }
.board-tabs { display: flex; gap: 7px; }
.board-tabs button { min-height: 44px; padding: 10px 14px; border: 1px solid #777b70; border-radius: 3px; background: linear-gradient(#3c4038, #292d26); color: #e4e5dc; font: 700 12px ui-monospace, monospace; cursor: pointer; }
.board-tabs button[aria-selected="true"] { border-color: #ffdc3b; background: #ffda31; color: #1b1d18; box-shadow: inset 0 1px #fff7, 0 1px 3px #0005; }
.board-tabs span { margin-left: 5px; opacity: .8; }
.board-time-format { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; color: #e2e3d9; font-size: 12px; }
.board-time-format > span { margin-right: 3px; }
.board-time-format button { min-width: 58px; min-height: 44px; padding: 8px 10px; border: 1px solid #777b70; border-radius: 3px; background: linear-gradient(#3c4038, #292d26); color: #e4e5dc; font: 700 12px ui-monospace, monospace; cursor: pointer; }
.board-time-format button[aria-pressed="true"] { border-color: #ffdc3b; background: #ffda31; color: #1b1d18; box-shadow: inset 0 1px #fff7, 0 1px 3px #0005; }
.board-filter-label { display: flex; align-items: center; gap: 10px; color: #e2e3d9; font-size: 12px; }
#board-filter { min-height: 40px; width: 210px; padding: 8px 10px; border: 1px solid #787d70; border-radius: 3px; background: #242721; color: #f7f7ef; font-size: 13px; }
#board-filter::placeholder { color: #bdc1b5; }

/* Only this viewport scrolls horizontally; the page keeps its own width. */
#board-panel { min-width: 0; }
.board-table-scroll { width: 100%; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-color: #8b8e81 #20221d; scrollbar-width: auto; -webkit-overflow-scrolling: touch; }
.flight-board-table { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: auto; }
.flight-board-table th { height: 42px; padding: 9px 7px; border-top: 1px solid #848484; border-bottom: 2px solid #242424; background: linear-gradient(#515151, #404040); color: #fafaf2; text-align: left; font: 700 clamp(15px, 1.7vw, 21px)/1.2 Arial, sans-serif; letter-spacing: .035em; text-transform: uppercase; white-space: nowrap; }
/* Keep the location column at its content width; remarks absorb spare room. */
.flight-board-table :is(th, td):nth-child(-n+4) { width: 1%; white-space: nowrap; }
.flight-board-table .board-flap { max-width: none; }
.flight-board-table tbody td { padding: 5px 7px 6px; border-top: 2px solid #565656; border-bottom: 1px solid #020202; background: linear-gradient(#292929 0, #161616 47%, #080808 50%, #0c0c0c 100%); vertical-align: middle; }
.board-cell-sub { display: block; max-width: 100%; margin-top: 3px; overflow: hidden; color: #b8bab5; font: 10px/1.25 ui-monospace, monospace; text-overflow: ellipsis; white-space: nowrap; }
.board-cell-date { overflow: visible; text-overflow: clip; white-space: normal; }
.board-flight-link { display: inline-flex; align-items: center; max-width: 100%; min-height: 44px; padding: 0; border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.board-flight-link:hover .board-flap { color: #ffdf59; }
.board-flap { display: inline-flex; flex-wrap: nowrap; max-width: 100%; gap: 1px; color: #f3f4ec; font: 700 clamp(16px, 1.75vw, 23px)/1 ui-monospace, "Courier New", monospace; letter-spacing: 0; white-space: pre; vertical-align: middle; }
.board-flap > span { position: relative; display: inline-grid; place-items: center; flex: 0 0 .69em; width: .69em; min-width: 0; min-height: 1.65em; padding: .1em 0; border-top: 1px solid #4a4a4a; border-right: 1px solid #383838; border-bottom: 1px solid #020202; border-left: 1px solid #232323; border-radius: 2px; background: linear-gradient(#252525 0%, #181818 47%, #030303 50%, #0c0c0c 100%); box-shadow: 0 1px 1px #000; text-shadow: 0 0 1px currentColor; }
.board-flap > span::after { content: ''; position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: #020202cf; box-shadow: 0 1px #ffffff07; }
.board-flap > span::before { content: ''; position: absolute; z-index: 1; top: calc(50% - 2px); left: -2px; width: 3px; height: 4px; border-top: 1px solid #6b6b6b; border-bottom: 1px solid #000; border-radius: 1px; background: #343434; box-shadow: .69em 0 #343434; }
.board-destination { color: inherit; }
.board-status { color: #f3f4ec; }
.board-flap[data-tone="cancelled"], .board-status[data-tone="cancelled"] { color: #ff5d58; }
.board-flap[data-tone="attention"], .board-status[data-tone="attention"] { color: #ffe13e; }
.board-flap[data-tone="complete"], .board-status[data-tone="complete"] { color: #f3f4ec; }
.board-flap[data-tone="boarding"], .board-status[data-tone="boarding"] { color: #90d840; }
.board-row-flip .board-flap > span { animation: board-flip 350ms ease-out both; }
@keyframes board-flip { from { transform: perspective(220px) rotateX(-45deg); filter: brightness(.7); } to { transform: perspective(220px) rotateX(0); filter: brightness(1); } }
.board-scroll-hint { display: block; margin: 0; padding: 9px 7px; border-top: 1px solid #5b6051; color: #e0e3d3; font: 11px/1.5 ui-monospace, monospace; }
.board-empty { padding: 44px 24px 50px; border-top: 1px solid #686c5f; background: #171b12; color: #b9c0ae; text-align: center; }
.board-empty > span { color: #ffda31; font-size: 32px; }
.board-empty h3 { color: #f5f4e9; font-size: 20px; }
.board-empty p { max-width: 490px; margin: 0 auto; font-size: 14px; line-height: 1.65; }
.board-pagination { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 13px 8px; border-top: 1px solid #676c5c; color: #d1d6c5; font: 11px/1.5 ui-monospace, monospace; }
.board-pagination p { margin: 0; }
.board-pagination > div { display: flex; align-items: center; gap: 12px; }
.board-pagination button { width: 44px; height: 44px; border: 1px solid #797f6d; border-radius: 3px; background: #262c1f; color: #ffda31; font-size: 18px; cursor: pointer; }
.board-disclosure { padding: 0 8px 14px; color: #ccd0c1; font-size: 11px; line-height: 1.7; }
.board-disclosure p { margin: 5px 0; }
.board-disclosure a { color: #f0f1e7; text-decoration: underline; }
.board-bottom-note { margin-top: 28px; color: var(--muted); font-size: 13px; line-height: 1.8; text-align: center; }
.board-bottom-note a { color: var(--blue); white-space: nowrap; }
.board-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

.board-details { width: min(580px, calc(100vw - 24px)); max-height: calc(100vh - 32px); max-height: calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 32px); overflow-y: auto; overscroll-behavior: contain; padding: 24px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--text); }
.board-details::backdrop { background: #000b; }
.board-detail-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.board-detail-heading p { margin: 0; }
.board-detail-heading button { min-width: 44px; min-height: 44px; border: 1px solid var(--line); border-radius: 5px; background: var(--panel); color: var(--text); font-size: 24px; cursor: pointer; }
.board-details h2 { margin: 18px 0 10px; color: var(--amber); font-size: 28px; }
.board-details > p { line-height: 1.6; overflow-wrap: anywhere; }
.board-details dl { margin: 24px 0; }
.board-details dl > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13px; line-height: 1.5; }
.board-details dt { color: var(--muted); }
.board-details dd { margin: 0; overflow-wrap: anywhere; }
.board-detail-note, #board-detail-source { color: var(--muted); font-size: 12px; }
.flight-board-page [hidden] { display: none !important; }

@media (max-width: 1100px) {
  .board-flap { font-size: 20px; }
  .flight-board-table th { font-size: 17px; }
}
@media (max-width: 640px) {
  .flight-board-main { width: calc(100% - 24px); margin-top: 10px; }
  .board-intro { padding: 12px 0 20px; }
  .board-intro h1 { font-size: clamp(1.5rem, 6vw, 2.3rem); }
  .board-intro-copy { font-size: 14px; }
  .board-search { padding: 16px; }
  .board-search .button { flex: 1 1 100%; }
  #board-airport-form label { max-width: none; }
  .terminal-board { padding: 0 7px; border-width: 3px; }
  .board-masthead { gap: 8px 12px; padding: 17px 5px 12px; }
  .board-direction { gap: 10px; margin-bottom: 8px; }
  .board-direction h2 { font-size: clamp(22px, 6.6vw, 32px); letter-spacing: .035em; }
  .board-direction-icon { width: 35px; height: 35px; border-radius: 6px; font-size: 29px; }
  .board-airport-summary h3 { font-size: 13px; }
  .board-overline { font-size: 9px; letter-spacing: .09em; }
  .board-clock { max-width: 145px; font-size: 9px; }
  .board-clock strong { font-size: 19px; letter-spacing: .08em; }
  .board-data-badge { font-size: 8px; }
  .board-toolbar { gap: 12px; padding: 12px 5px; }
  .board-tabs { width: 100%; }
  .board-tabs button { flex: 1; padding: 10px 6px; font-size: 11px; }
  .board-filter-label { width: 100%; }
  #board-filter { flex: 1; min-width: 0; width: auto; }
  .board-pagination { flex-wrap: wrap; padding: 12px 5px; }
  .board-pagination > div { width: 100%; justify-content: space-between; }
  .board-disclosure { padding: 0 5px 13px; }
  .board-bottom-note a { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) {
  .board-row-flip .board-flap > span { animation: none; }
}
