:root {
  color-scheme: light;
  --site-header-height: 67px;
  --toolbar-height: 98px;
  --anchor-gap: 12px;
  --bg: #f6f7f5;
  --bg-soft: #e7ece9;
  --panel: #ffffff;
  --ink: #1d1f21;
  --muted: #6f737a;
  --line: #d9ded8;
  --line-strong: #bdc8c0;
  --accent: #b51f2a;
  --accent-2: #0e6863;
  --accent-3: #c4871d;
  --shadow: 0 18px 44px rgba(28, 29, 30, 0.1);
  --shadow-soft: 0 8px 24px rgba(28, 29, 30, 0.07);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a {
  color: inherit;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px clamp(16px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
  background: rgba(246, 247, 245, 0.9);
  position: sticky;
  top: 0;
  z-index: 8;
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-weight: 900;
  font-size: 13px;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 16px;
  line-height: 1.05;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

.topic-link {
  text-decoration: none;
}

.topic-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(30px, 4.4vw, 52px);
  line-height: 1.05;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.source-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.source-links a,
.model-nav a {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 6px;
  padding: 8px 12px;
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
}

.source-links a:hover,
.model-nav a:hover {
  border-color: var(--line-strong);
}

main {
  width: min(1640px, 100%);
  margin: 0 auto;
  padding: 0 clamp(14px, 3vw, 34px) 54px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 520px);
  gap: clamp(20px, 4vw, 58px);
  align-items: end;
  padding: clamp(26px, 5vw, 52px) 0 20px;
  border-bottom: 1px solid var(--line);
}

.hero > *,
.credits-panel,
.toolbar,
.model-browser,
.catalog,
.stats,
.coverage,
.notice,
.credits-list {
  min-width: 0;
}

.coverage {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 16px;
  border: 1px solid rgba(37, 62, 82, 0.16);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(248, 250, 252, 0.92);
  color: #304055;
  font-size: 13px;
  line-height: 1.4;
}

.coverage strong,
.coverage-label {
  white-space: nowrap;
}

.coverage-label {
  color: var(--muted);
}

.coverage-value {
  color: var(--ink);
}

.coverage-note {
  color: var(--muted);
}

.notice {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  border: 1px solid rgba(196, 135, 29, 0.34);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(196, 135, 29, 0.12);
  color: #5f4206;
  font-size: 13px;
  line-height: 1.4;
}

.notice strong {
  white-space: nowrap;
}

.credits-panel {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.credits-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.credits-heading h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.05;
  letter-spacing: 0;
}

.credits-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.credits-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.credit-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 9px;
  background: var(--panel);
  color: var(--ink);
  text-decoration: none;
  box-shadow: var(--shadow-soft);
}

.credit-link:hover {
  border-color: var(--line-strong);
}

.credit-name {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 800;
}

.credit-count {
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.credits-toggle {
  margin-top: 12px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 11px;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 520px);
  gap: 16px;
  align-items: center;
  justify-content: start;
  padding: 16px 0;
  position: sticky;
  top: var(--site-header-height);
  z-index: 7;
  background: rgba(246, 247, 245, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.search {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
}

.search input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  font: inherit;
  color: var(--ink);
  background: var(--panel);
}

.search input:focus {
  outline: 2px solid rgba(14, 104, 99, 0.2);
  border-color: var(--accent-2);
}

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

.stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 14px;
  box-shadow: var(--shadow-soft);
  min-width: 0;
}

.stat strong,
.stat small {
  display: block;
}

.stat strong {
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1;
}

.stat small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.model-browser {
  display: grid;
  grid-template-columns: 1.05fr 1.1fr 1.35fr;
  gap: 12px;
  padding: 16px 0 8px;
}

.taxonomy-column {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.58);
}

.taxonomy-column > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.taxonomy-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  max-height: 170px;
  overflow: auto;
  scrollbar-width: thin;
}

.taxonomy-option {
  min-height: 31px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 9px;
  color: var(--ink);
  background: var(--panel);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.taxonomy-option:hover {
  border-color: var(--line-strong);
}

.taxonomy-option.active {
  color: #fff;
  background: var(--accent-2);
  border-color: var(--accent-2);
}

.taxonomy-option .taxonomy-count {
  margin-left: 6px;
  color: currentColor;
  opacity: 0.72;
}

.taxonomy-option:focus {
  outline: 2px solid rgba(14, 104, 99, 0.2);
  border-color: var(--accent-2);
}

.model-nav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 16px 0 22px;
  scrollbar-width: thin;
}

.model-nav a {
  white-space: nowrap;
}

.model-nav a.active {
  color: #fff;
  background: var(--accent-2);
  border-color: var(--accent-2);
}

.manufacturer-section {
  padding: 24px 0 8px;
  border-top: 2px solid var(--ink);
}

.manufacturer-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 6px;
}

.manufacturer-heading h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1;
  letter-spacing: 0;
}

.manufacturer-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.series-section {
  padding: 18px 0 26px;
  border-top: 1px solid var(--line);
}

.series-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.series-heading h3 {
  margin: 0;
  font-size: clamp(21px, 2.4vw, 30px);
  line-height: 1.1;
  letter-spacing: 0;
}

.series-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.catalog {
  display: grid;
  gap: 20px;
}

.model-section {
  padding: 10px 0 18px;
  scroll-margin-top: calc(var(--site-header-height) + var(--toolbar-height) + var(--anchor-gap));
}

.model-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.model-heading h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.1;
  letter-spacing: 0;
}

.model-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}

.card {
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
}

.card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}

.thumb {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 5;
  width: 100%;
  border: 0;
  padding: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.44), rgba(255, 255, 255, 0)),
    var(--bg-soft);
  cursor: zoom-in;
  overflow: hidden;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.missing {
  color: var(--muted);
  font-size: 13px;
  padding: 18px;
  text-align: center;
}

.meta {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.airline {
  color: var(--accent-2);
  font-weight: 800;
  overflow-wrap: anywhere;
  font-size: 16px;
}

.post {
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
  white-space: nowrap;
}

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.actions a {
  flex: 1 1 86px;
  text-align: center;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 9px;
  font-size: 12px;
  font-weight: 700;
}

.status-row {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.chip {
  width: fit-content;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--muted);
  background: #faf9f5;
  font-size: 12px;
  font-weight: 700;
}

.chip.reviewed,
.chip.direct {
  color: var(--accent-2);
  border-color: rgba(14, 104, 99, 0.24);
  background: rgba(14, 104, 99, 0.08);
}

.chip.pending,
.chip.missing {
  color: #8a5b04;
  border-color: rgba(196, 135, 29, 0.32);
  background: rgba(196, 135, 29, 0.12);
}

.note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.pending-band {
  padding: 22px 0 10px;
  border-top: 2px solid var(--line-strong);
}

.pending-band .model-heading h2 {
  color: #8a5b04;
}

.recent-section {
  padding: 24px 0 10px;
  border-top: 2px solid var(--accent-2);
}

.recent-post {
  padding: 18px 0 26px;
  border-top: 1px solid var(--line);
}

.recent-card .note {
  max-height: 4.2em;
  overflow: hidden;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 42px);
  background: rgba(16, 17, 18, 0.86);
}

.lightbox[hidden] {
  display: none;
}

.lightbox-frame {
  display: grid;
  gap: 12px;
  width: min(960px, 100%);
  max-height: 92vh;
  margin: 0;
}

.lightbox-frame img {
  max-width: 100%;
  max-height: 78vh;
  justify-self: center;
  border-radius: 8px;
  background: var(--panel);
  object-fit: contain;
}

.lightbox-frame figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #fff;
  font-size: 13px;
}

.lightbox-frame figcaption strong,
.lightbox-frame figcaption span {
  min-width: 0;
}

.lightbox-frame figcaption a {
  margin-left: 10px;
  color: #fff;
  font-weight: 800;
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 26px;
  line-height: 1;
}

.empty {
  color: var(--muted);
  padding: 40px 0;
  text-align: center;
}

@media (max-width: 760px) {
  .site-header,
  .hero,
  .toolbar,
  .credits-heading,
  .coverage,
  .notice {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .source-links {
    justify-content: flex-start;
  }

  h1 {
    font-size: clamp(28px, 9vw, 38px);
    line-height: 1.08;
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .model-browser {
    grid-template-columns: 1fr;
  }

  .taxonomy-list {
    max-height: 150px;
  }

  .lightbox-frame figcaption {
    display: grid;
  }

}
