:root {
  --ink: #11151a;
  --ink-2: #2a3138;
  --white: #ffffff;
  --paper: #ffffff;
  --bg: #ffffff;
  --cobalt: #1f4bd8;
  --cobalt-dark: #1638a8;
  --sun: #f5c518;
  --gray: #f0f2f5;
  --line: #d9dde4;
  --muted: #5b6472;
  --display: "Arial Narrow", "Franklin Gothic Medium", "Segoe UI", Arial, sans-serif;
  --sans: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: Consolas, "Courier New", monospace;
  --wrap: 1140px;
  --shadow: 6px 6px 0 var(--ink);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--cobalt); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.005em;
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(2.3rem, 5.2vw, 3.9rem); text-transform: uppercase; }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); text-transform: uppercase; }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1.1em; }

ul, ol { margin: 0 0 1.2em; padding-left: 1.2em; }
li { margin-bottom: 0.35em; }

code, .mono {
  font-family: var(--mono);
  font-size: 0.82em;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

:focus-visible {
  outline: 3px solid var(--cobalt);
  outline-offset: 2px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--white);
  padding: 10px 16px;
  z-index: 100;
}
.skip:focus { left: 0; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 2rem);
}

/* Header */

.site-header {
  background: var(--white);
  border-bottom: 2px solid var(--ink);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 68px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ink);
  text-decoration: none;
  text-transform: uppercase;
}
.logo:hover { color: var(--ink); }
.logo-dot {
  width: 12px;
  height: 12px;
  background: var(--sun);
  border: 2px solid var(--ink);
  display: inline-block;
}
.logo-accent { color: var(--cobalt); }

.nav {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.nav > a { color: var(--ink); text-decoration: none; }
.nav > a:hover { color: var(--cobalt); }

.dropdown { position: relative; }
.dropdown summary {
  cursor: pointer;
  list-style: none;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.dropdown summary::-webkit-details-marker { display: none; }
.dropdown summary::after { content: " +"; color: var(--cobalt); }
.dropdown[open] summary::after { content: " \2212"; }

.dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 14px);
  min-width: 210px;
  background: var(--white);
  border: 2px solid var(--ink);
  box-shadow: var(--shadow);
  padding: 0.4rem 0;
  display: grid;
}
.dropdown-menu a {
  padding: 0.55rem 1rem;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--sans);
  font-size: 0.92rem;
  text-transform: none;
  letter-spacing: 0;
}
.dropdown-menu a:hover { background: var(--sun); color: var(--ink); }

/* Buttons */

.btn {
  display: inline-block;
  padding: 0.85rem 1.5rem;
  background: var(--cobalt);
  color: var(--white);
  border: 2px solid var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn:hover {
  color: var(--white);
  background: var(--cobalt-dark);
  transform: translate(2px, 2px);
  box-shadow: 3px 3px 0 var(--ink);
}
.btn-ghost {
  background: var(--white);
  color: var(--ink);
  box-shadow: 5px 5px 0 var(--sun);
}
.btn-ghost:hover {
  background: var(--sun);
  color: var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}

/* Hero */

.hero { position: relative; border-bottom: 2px solid var(--ink); }

.hero-photo { position: absolute; inset: 0; overflow: hidden; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }

.hero-wrap {
  position: relative;
  padding-top: clamp(130px, 19vw, 250px);
}

.ticket {
  position: relative;
  margin-top: 0;
  max-width: 780px;
  background: var(--white);
  border: 2px solid var(--ink);
  box-shadow: 12px 12px 0 var(--cobalt);
  padding: clamp(1.4rem, 3vw, 2.6rem);
}
.ticket-top,
.ticket-bottom {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  color: var(--muted);
  border-bottom: 1px dashed var(--line);
}
.ticket-bottom { border-bottom: 0; border-top: 1px dashed var(--line); margin-top: 1.4rem; }
.ticket h1 { margin: 1.1rem 0 0.5rem; max-width: 15ch; }
.ticket .lede { font-size: clamp(1rem, 1.4vw, 1.12rem); color: var(--ink-2); max-width: 52ch; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin: 1.4rem 0 0.2rem; }

/* Sections */

.section { padding: clamp(2.6rem, 6vw, 4.6rem) 0; }
.section-head { margin-bottom: 1.8rem; }
.section-code {
  color: var(--cobalt);
  font-weight: 700;
  margin: 0 0 0.5rem;
}
.section-sub { color: var(--muted); max-width: 62ch; margin: 0.4rem 0 0; }

.intro-2 { max-width: 70ch; color: var(--ink-2); }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 1.4rem 0 0;
}
.chips li {
  border: 1px solid var(--ink);
  padding: 0.35rem 0.7rem;
  margin: 0;
  color: var(--ink);
}

/* Departure board */

.board { border: 2px solid var(--ink); }

.board-head,
.board-row {
  display: grid;
  grid-template-columns: 100px 1.1fr 1.4fr 44px;
  gap: 1rem;
  align-items: center;
  padding: 0.95rem 1.2rem;
}

.board-head {
  background: var(--ink);
  color: var(--white);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
}
.board-head span:last-child { display: none; }

.board-row {
  border-top: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  transition: background 0.12s ease, color 0.12s ease;
}
.board-row:first-of-type { border-top: 0; }
.board-row:hover { background: var(--cobalt); color: var(--white); }
.board-row:hover .board-topics { color: rgba(255, 255, 255, 0.82); }

.board-code { color: var(--cobalt); font-weight: 700; }
.board-row:hover .board-code { color: var(--sun); }

.board-name {
  font-family: var(--display);
  font-size: 1.22rem;
  font-weight: 700;
  text-transform: uppercase;
}
.board-topics { color: var(--muted); font-size: 0.9rem; }
.board-go { justify-self: end; font-size: 1.2rem; }

/* Cards */

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.ticket-card {
  background: var(--white);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  transition: border-color 0.12s ease;
}
.ticket-card:hover { border-color: var(--ink); }

.card-photo { display: block; overflow: hidden; border-bottom: 1px solid var(--line); }
.card-photo img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; height: auto; }

.card-body { padding: 1.1rem 1.2rem 1.2rem; display: flex; flex-direction: column; flex: 1; }

.card-code {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 0.6rem;
  font-size: 0.72rem;
  color: var(--muted);
}
.card-code .mono { color: var(--cobalt); font-weight: 700; }
.card-code a { color: var(--muted); text-decoration: none; }
.card-code a:hover { color: var(--ink); }

.card-title { font-size: 1.28rem; margin: 0 0 0.5rem; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { color: var(--cobalt); }

.card-excerpt { color: var(--muted); font-size: 0.95rem; margin: 0 0 1rem; }

.card-meta {
  margin-top: auto;
  padding-top: 0.8rem;
  border-top: 1px dashed var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  font-size: 0.75rem;
  color: var(--muted);
}
.card-read { font-weight: 600; text-decoration: none; white-space: nowrap; }

.grid.featured { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.featured:has(> .ticket-card:nth-child(3)) > .ticket-card.lead {
  grid-column: span 2;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
}
.grid.featured:has(> .ticket-card:nth-child(3)) > .ticket-card.lead .card-photo { border-bottom: 0; border-right: 1px solid var(--line); height: 100%; }
.grid.featured:has(> .ticket-card:nth-child(3)) > .ticket-card.lead .card-photo img { height: 100%; aspect-ratio: auto; }
.grid.featured:has(> .ticket-card:nth-child(3)) > .ticket-card.lead .card-body { padding: 1.5rem 1.6rem; }
.grid.featured:has(> .ticket-card:nth-child(3)) > .ticket-card.lead .card-title { font-size: 1.7rem; }

/* Values */

.values {
  background: var(--ink);
  color: var(--white);
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
}
.values h2 { color: var(--white); }
.values .section-code { color: var(--sun); }
.values .grid { margin-top: 1.8rem; }
.value {
  border-left: 1px solid rgba(255, 255, 255, 0.28);
  padding-left: 1.2rem;
}
.value-num { color: var(--sun); display: block; margin-bottom: 0.7rem; font-size: 0.8rem; }
.value h3 { color: var(--white); font-size: 1.2rem; }
.value p { color: rgba(255, 255, 255, 0.76); font-size: 0.96rem; margin: 0; }

/* Page head and breadcrumb */

.breadcrumb { padding: 1.1rem 0 0; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.05em; text-transform: uppercase; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; padding: 0; margin: 0; }
.breadcrumb li { margin: 0; color: var(--muted); }
.breadcrumb li + li::before { content: "/"; margin-right: 0.5rem; color: var(--line); }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--cobalt); }

.page-head {
  padding: 1.6rem 0 clamp(1.6rem, 4vw, 2.6rem);
  border-bottom: 2px solid var(--ink);
  margin-bottom: clamp(1.8rem, 4vw, 3rem);
}
.page-head h1 { margin-bottom: 0.5rem; max-width: 20ch; }
.page-head .lede { color: var(--ink-2); max-width: 66ch; font-size: clamp(1rem, 1.4vw, 1.15rem); }

.other-cats { border-top: 1px solid var(--line); }
.other-cats ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.6rem 2rem; }
.other-cats li { margin: 0; }
.other-cats a { display: inline-flex; gap: 0.6rem; align-items: baseline; color: var(--ink); text-decoration: none; }
.other-cats a:hover { color: var(--cobalt); }
.other-cats .mono { color: var(--cobalt); font-size: 0.72rem; }

/* Article */

.article-wrap { padding-bottom: 1rem; }
.article-head { padding: 1.4rem 0 1.8rem; border-bottom: 2px solid var(--ink); margin-bottom: 2rem; }
.article-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.4rem;
  color: var(--muted);
  margin: 0 0 1rem;
  font-size: 0.72rem;
}
.article-strip .mono { color: var(--cobalt); }
.article-head h1 { max-width: 22ch; margin-bottom: 0.7rem; }
.article-head .lede { color: var(--ink-2); max-width: 62ch; font-size: 1.1rem; margin-bottom: 0.7rem; }
.article-head .meta { color: var(--muted); font-size: 0.9rem; margin: 0; }

.prose { max-width: 72ch; }
.prose > p:first-of-type::first-letter {
  float: left;
  font-family: var(--display);
  font-size: 3.4rem;
  line-height: 0.82;
  padding: 0.1rem 0.55rem 0 0;
  color: var(--cobalt);
}
.prose h2 {
  font-size: 1.5rem;
  margin-top: 2.1rem;
  padding-top: 1.1rem;
  border-top: 2px solid var(--ink);
}
.prose h3 { margin-top: 1.6rem; }
.prose ul li::marker { color: var(--cobalt); }
.prose strong { color: var(--ink); }

.article-figure { margin: 1.8rem 0; border: 1px solid var(--line); }
.article-figure img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.article-figure figcaption { padding: 0.55rem 0.8rem; font-size: 0.75rem; color: var(--muted); border-top: 1px solid var(--line); }
.article-figure figcaption .mono { color: var(--cobalt); font-weight: 700; }

/* FAQ */

.faq { margin: 2.6rem 0 0; max-width: 72ch; }
.faq h2 { font-size: 1.5rem; }
.faq details { border-top: 1px solid var(--line); padding: 0.9rem 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--cobalt); font-family: var(--mono); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 0.7rem 0 0; color: var(--ink-2); }

/* Author and related */

.author-box {
  margin: 2.6rem 0 0;
  max-width: 72ch;
  background: var(--gray);
  border-left: 4px solid var(--cobalt);
  padding: 1.2rem 1.3rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.author-avatar {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  background: var(--cobalt);
  color: var(--white);
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 700;
}
.author-box h2 { font-size: 1.05rem; text-transform: none; margin-bottom: 0.3rem; }
.author-box p { margin: 0; font-size: 0.92rem; color: var(--ink-2); }

.related { margin: 3rem 0 0; padding-top: 1.6rem; border-top: 2px solid var(--ink); }

/* Simple pages */

.narrow { max-width: 860px; }
.narrow .prose { max-width: none; }
.updated { color: var(--muted); font-size: 0.75rem; margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--line); }

/* Footer */

.site-footer { background: var(--ink); color: rgba(255, 255, 255, 0.78); margin-top: clamp(2.6rem, 6vw, 4.6rem); }

.footer-route {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 2rem);
  height: 30px;
  position: relative;
}
.footer-route::before {
  content: "";
  position: absolute;
  left: clamp(1rem, 3vw, 2rem);
  right: clamp(1rem, 3vw, 2rem);
  top: 50%;
  border-top: 1px dashed rgba(255, 255, 255, 0.35);
}
.footer-route span {
  width: 9px;
  height: 9px;
  background: var(--sun);
  border: 1px solid var(--ink);
  position: relative;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 2rem;
  padding-top: 2.2rem;
  padding-bottom: 2.2rem;
}
.site-footer h3 {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sun);
  margin-bottom: 0.9rem;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.45rem; }
.site-footer a { color: rgba(255, 255, 255, 0.78); text-decoration: none; font-size: 0.94rem; }
.site-footer a:hover { color: var(--sun); }

.footer-logo {
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--white);
  margin: 0 0 0.7rem;
}
.footer-logo span { color: var(--sun); }
.footer-code { color: rgba(255, 255, 255, 0.45); margin: 0; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  padding-top: 1rem;
  padding-bottom: 1.4rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.8rem;
}
.footer-bottom p { margin: 0; }
.footer-bottom .mono { color: rgba(255, 255, 255, 0.45); }

/* Responsive */

@media (max-width: 960px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.featured:has(> .ticket-card:nth-child(3)) > .ticket-card.lead { grid-column: span 2; }
  .values .grid { grid-template-columns: 1fr; gap: 1.4rem; }
  .value { border-left: 0; border-top: 1px solid rgba(255, 255, 255, 0.28); padding-left: 0; padding-top: 1rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .board-head,
  .board-row { grid-template-columns: 74px 1fr 34px; }
  .board-head span:nth-child(3),
  .board-topics { display: none; }
  .grid.featured:has(> .ticket-card:nth-child(3)) > .ticket-card.lead { display: flex; }
  .grid.featured:has(> .ticket-card:nth-child(3)) > .ticket-card.lead .card-photo { border-right: 0; border-bottom: 1px solid var(--line); }
  .grid.featured:has(> .ticket-card:nth-child(3)) > .ticket-card.lead .card-photo img { aspect-ratio: 16 / 9; height: auto; }
  .grid.featured:has(> .ticket-card:nth-child(3)) > .ticket-card.lead .card-title { font-size: 1.35rem; }
}

@media (max-width: 640px) {
  .header-inner { min-height: 62px; gap: 0.6rem; }
  .logo { font-size: 1.22rem; gap: 0.4rem; }
  .logo-dot { width: 9px; height: 9px; }
  .nav { gap: 0.7rem; font-size: 0.68rem; }
  .dropdown summary { font-size: 0.68rem; }
  .dropdown-menu { right: -8px; }
  .hero-wrap { padding-top: 110px; }
  .ticket { margin-top: 0; box-shadow: 8px 8px 0 var(--cobalt); }
  .hero-actions .btn { padding: 0.75rem 1.1rem; }
  .grid { grid-template-columns: 1fr; }
  .grid.featured { grid-template-columns: 1fr; }
  .grid.featured:has(> .ticket-card:nth-child(3)) > .ticket-card.lead { grid-column: span 1; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.6rem; }
  .article-figure { margin: 1.4rem 0; }
  .prose { font-size: 1rem; }
}

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