@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/ibm-plex-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("/fonts/ibm-plex-sans-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("/fonts/ibm-plex-sans-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: rgb(19, 35, 63);
  --ink: #fff;
  --fw: 0.74em;
  --fh: 1.38em;
  --fg: 0.08em;
  --cg: 0.58em;
  --time: calc(5 * var(--fw) + 4 * var(--fg));
  --dest: calc(12 * var(--fw) + 11 * var(--fg));
  --gate: calc(4 * var(--fw) + 3 * var(--fg));
  --remark: calc(8 * var(--fw) + 7 * var(--fg));
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}

body {
  min-height: 100vh;
  font-family: "IBM Plex Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--ink);
  color: var(--bg);
}

main {
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.75rem 1.25rem 3.25rem;
}

.logo {
  height: 108px;
  width: auto;
  display: block;
}

h1 {
  margin: 0.85rem 0 0.55rem;
  font-weight: 500;
  font-size: 1.55rem;
  letter-spacing: 0.01em;
  line-height: 1;
}

.board-wrap {
  width: min(760px, 100%);
  min-width: 0;
  overflow-x: auto;
  scrollbar-color: var(--ink) var(--bg);
}

.board {
  width: max-content;
  margin-inline: auto;
  font-family: "IBM Plex Mono", ui-monospace, "DejaVu Sans Mono", monospace;
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  font-variant-ligatures: none;
  border: 1px solid var(--ink);
  padding: 0.8em 0.85em 0.9em;
  background: var(--bg);
}

.board-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5em;
}

.divider {
  height: 1px;
  margin: 0.62em 0 0.5em;
  background: var(--ink);
}

.cols,
.flight {
  display: grid;
  grid-template-columns: var(--time) var(--dest) var(--gate) var(--remark);
  column-gap: var(--cg);
  align-items: center;
}

.labels {
  margin-bottom: 0.42em;
  font-family: inherit;
  font-weight: 500;
}

.label-cell {
  width: var(--fw);
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.flights {
  display: flex;
  flex-direction: column;
  gap: 0.34em;
}

.flaps {
  display: flex;
  gap: var(--fg);
  perspective: 700px;
}

.flap {
  position: relative;
  flex: 0 0 auto;
  width: var(--fw);
  height: var(--fh);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--bg);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    inset 0 -1px 0 rgba(255, 255, 255, 0.55);
}

.glyph {
  position: relative;
  z-index: 1;
  transform: translateY(-0.04em);
}

.hinge {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: 1px;
  height: 1px;
  background: var(--ink);
  pointer-events: none;
}

.flap.turning .hinge {
  bottom: auto;
  top: 50%;
  height: 2px;
  transform: translateY(-1px);
}

.lede {
  margin: 0 0 1.7rem;
  max-width: 28rem;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.45;
}

a {
  color: inherit;
}

.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;
}

@media (max-width: 720px) {
  main {
    padding: 2rem 0.85rem 2.5rem;
  }

  .logo {
    height: 88px;
  }

  h1 {
    margin-bottom: 0.45rem;
  }

  .lede {
    margin-bottom: 1.35rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .flap.turning .hinge {
    top: auto;
    bottom: 1px;
    height: 1px;
    transform: none;
  }
}
