:root {
  --paper: #eef2f0;
  --paper-strong: #ffffff;
  --ink: #172022;
  --muted: #5f6d70;
  --line: #cbd5d1;
  --line-strong: #97aaa4;
  --runway: #2d3638;
  --runway-soft: #465154;
  --teal: #0f766e;
  --red: #d94b35;
  --gold: #ad6c24;
  --blue: #2f6f95;
  --white: #ffffff;
  --shadow: 0 16px 38px rgba(27, 34, 36, 0.1);
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  color: var(--ink);
}

body {
  min-height: 100%;
  margin: 0;
  background:
    linear-gradient(90deg, rgba(45, 54, 56, 0.055) 1px, transparent 1px),
    linear-gradient(180deg, rgba(45, 54, 56, 0.045) 1px, transparent 1px),
    var(--paper);
  background-size: 42px 42px;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
}

a {
  color: inherit;
}

.site-header,
main {
  width: min(1460px, calc(100% - 28px));
  margin: 0 auto;
}

.site-header {
  padding: 18px 0 8px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  text-decoration: none;
  font-size: 13px;
  font-weight: 720;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: end;
  padding: 28px 0 16px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 780;
  text-transform: uppercase;
  letter-spacing: 0;
}

h1,
h2,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 820px;
  margin: 0;
  font-size: 40px;
  line-height: 1;
  letter-spacing: 0;
}

.lede {
  max-width: 740px;
  margin: 12px 0 0;
  color: var(--runway-soft);
  font-size: 17px;
  line-height: 1.45;
}

.identifier {
  margin: 8px 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.guide-intro {
  padding: 16px 16px 14px;
}

.guide-intro h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.12;
}

.guide-intro p:last-child {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--runway-soft);
  font-size: 15px;
}

.guide-start-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  margin-top: 14px;
  border: 1px solid var(--runway);
  border-radius: 8px;
  padding: 0 14px;
  background: var(--runway);
  color: var(--paper-strong);
  font: inherit;
  font-size: 14px;
  font-weight: 780;
  cursor: pointer;
}

.guide-start-button:hover {
  background: #1f292b;
}

.guide-shell {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(238, 242, 240, 0.68), rgba(255, 255, 255, 0.62));
}

.guide-shell[hidden] {
  display: none;
}

.guide-progress {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  min-height: 58px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

.guide-path {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.guide-path span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border: 1px solid rgba(45, 54, 56, 0.14);
  border-radius: 999px;
  padding: 0 9px;
  background: var(--white);
}

.guide-path .guide-current {
  border-color: rgba(15, 118, 110, 0.32);
  background: #e1f1ec;
  color: #0b4e49;
}

.guide-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.guide-control-button,
.result-table-button {
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0 11px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 720;
  cursor: pointer;
}

.guide-control-button:hover,
.result-table-button:hover {
  border-color: var(--runway);
}

.guide-control-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.guide-stage {
  padding: 14px;
}

.guide-question {
  display: grid;
  gap: 7px;
  max-width: 900px;
  margin-bottom: 14px;
}

.guide-question-label,
.guide-result-label {
  color: var(--teal);
  font-size: 12px;
  font-weight: 820;
  text-transform: uppercase;
}

.guide-question h3,
.guide-results-header h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.15;
}

.guide-question p,
.guide-results-header p {
  margin: 0;
  color: var(--runway-soft);
  font-size: 14px;
}

.guide-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(218px, 1fr));
  gap: 10px;
}

.guide-option {
  display: grid;
  grid-template-rows: 116px 1fr;
  min-height: 226px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  overflow: hidden;
  text-align: left;
}

.guide-option:hover {
  border-color: var(--teal);
  box-shadow: 0 10px 22px rgba(27, 34, 36, 0.09);
}

.guide-option-art {
  display: grid;
  place-items: center;
  min-height: 116px;
  border-bottom: 1px solid rgba(45, 54, 56, 0.12);
  background:
    linear-gradient(90deg, rgba(45, 54, 56, 0.05) 1px, transparent 1px),
    linear-gradient(180deg, rgba(45, 54, 56, 0.04) 1px, transparent 1px),
    #f8faf8;
  background-size: 24px 24px;
}

.guide-icon,
.guide-icon svg {
  display: block;
  width: 100%;
  height: 116px;
}

.guide-silhouette-set {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  align-items: center;
  width: 100%;
  height: 116px;
  padding: 8px;
}

.guide-silhouette-count-2,
.guide-silhouette-count-3 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.guide-silhouette-count-3 .guide-silhouette-frame:first-child {
  grid-column: 1 / -1;
}

.guide-silhouette-frame {
  display: grid;
  place-items: center;
  min-width: 0;
  height: 100%;
  min-height: 44px;
  border: 1px solid rgba(45, 54, 56, 0.1);
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
}

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

.guide-icon-shape {
  fill: #2d3638;
}

.guide-icon-wing {
  fill: #627376;
}

.guide-icon-accent {
  fill: #0f766e;
}

.guide-icon-red {
  fill: #d94b35;
}

.guide-icon-orange {
  fill: #e86f22;
}

.guide-icon-line {
  fill: none;
  stroke: #2d3638;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 5;
}

.guide-icon-soft-line {
  fill: none;
  stroke: #97aaa4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.guide-option-copy {
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 11px;
}

.guide-option-title {
  font-size: 15px;
  font-weight: 820;
  line-height: 1.18;
}

.guide-option-note {
  color: var(--runway-soft);
  font-size: 13px;
  line-height: 1.35;
}

.guide-option-count {
  justify-self: start;
  margin-top: 2px;
  border: 1px solid rgba(45, 54, 56, 0.16);
  border-radius: 999px;
  padding: 3px 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 780;
}

.guide-results-header {
  display: grid;
  gap: 7px;
  max-width: 850px;
  margin-bottom: 14px;
}

.guide-result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.guide-result-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  overflow: hidden;
}

.guide-result-photo {
  border-bottom: 1px solid var(--line);
  background: #dce2df;
}

.guide-result-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: contain;
  object-position: center;
}

.guide-result-copy {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.guide-result-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.guide-result-copy h4 {
  margin: 0;
  font-size: 20px;
  line-height: 1.15;
}

.guide-result-role {
  margin: 0;
  color: var(--runway-soft);
  font-size: 14px;
  line-height: 1.35;
}

.guide-result-operators {
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.guide-result-notes {
  margin: 0;
  padding-left: 18px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.38;
}

.guide-result-notes li + li {
  margin-top: 5px;
}

.guide-result-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 2px;
}

.guide-photo-link {
  color: var(--blue);
  font-size: 12px;
  font-weight: 760;
  line-height: 1.25;
  text-decoration: none;
}

.guide-photo-link:hover {
  text-decoration: underline;
}

.controls {
  display: grid;
  grid-template-columns: minmax(240px, 360px) 1fr;
  gap: 12px;
  align-items: end;
  margin: 8px 0 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
}

.search-wrap {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
  letter-spacing: 0;
}

.search-wrap input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0 12px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
}

.search-wrap input:focus-visible,
.filter-button:focus-visible,
.clear-button:focus-visible,
.photo-link:focus-visible,
.guide-start-button:focus-visible,
.guide-option:focus-visible,
.guide-control-button:focus-visible,
.result-table-button:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.28);
  outline-offset: 2px;
}

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

.filter-button,
.clear-button {
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0 11px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 720;
  cursor: pointer;
}

.filter-button:hover,
.clear-button:hover {
  border-color: var(--runway);
}

.filter-button[aria-pressed="true"] {
  border-color: var(--teal);
  background: #e1f1ec;
  color: #0b4e49;
}

.table-toolbar h2,
.sources h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0;
}

.table-shell,
.sources {
  margin: 12px 0 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.table-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

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

.jet-table {
  width: 100%;
}

.jet-row {
  display: grid;
  grid-template-columns: minmax(210px, 240px) minmax(560px, 1.45fr) minmax(190px, 0.55fr) minmax(320px, 0.9fr);
  gap: 0;
  align-items: stretch;
}

.jet-head {
  position: sticky;
  top: 0;
  z-index: 2;
  border-bottom: 1px solid var(--line-strong);
  background: var(--runway);
  color: var(--paper-strong);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.jet-head > div,
.jet-cell {
  padding: 12px;
}

.jet-head > div {
  display: flex;
  align-items: center;
  min-height: 42px;
}

.jet-body-row {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.68);
}

.jet-group-heading {
  display: block;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line);
  background: #dfe8e4;
}

.jet-group-heading > div {
  padding: 10px 12px;
  color: var(--runway);
  font-size: 12px;
  font-weight: 820;
  text-transform: uppercase;
  letter-spacing: 0;
}

.jet-body-row:last-child {
  border-bottom: 0;
}

.jet-cell {
  min-width: 0;
  border-right: 1px solid var(--line);
}

.jet-cell:last-child {
  border-right: 0;
}

.aircraft-name {
  margin: 0;
  font-size: 18px;
  line-height: 1.18;
}

.aircraft-subtitle {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.service-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.operators-row {
  display: grid;
  gap: 3px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.operators-row span:first-child {
  color: var(--teal);
  font-weight: 780;
  text-transform: uppercase;
}

.country-badge,
.service-badge,
.trait,
.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 760;
}

.service-badge {
  background: var(--runway);
  color: var(--paper-strong);
}

.country-badge {
  background: #e1f1ec;
  color: #0b4e49;
}

.status-badge {
  border: 1px solid rgba(45, 54, 56, 0.22);
  background: var(--paper-strong);
  color: var(--runway);
}

.reference-cell {
  padding: 10px;
}

.reference-grid {
  display: grid;
  grid-template-columns: minmax(190px, 0.8fr) minmax(290px, 1.2fr);
  gap: 10px;
  align-items: start;
}

.reference-panel,
.orthographic-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f3f6f4);
  overflow: hidden;
}

.reference-label,
.orthographic-label {
  display: flex;
  align-items: center;
  min-height: 34px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(45, 54, 56, 0.12);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.18;
  text-transform: uppercase;
  letter-spacing: 0;
}

.photo-frame {
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #dce2df;
}

.photo-frame img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: contain;
  object-position: center;
}

.photo-link {
  display: block;
  margin: 0;
  padding: 8px 10px 10px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 760;
  line-height: 1.25;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.photo-link:hover {
  text-decoration: underline;
}

.orthographic-frame {
  display: grid;
  place-items: center;
  min-height: 190px;
  padding: 10px;
  background: #fff;
}

.orthographic-frame img {
  display: block;
  width: 100%;
  height: 190px;
  object-fit: contain;
}

.view-tags,
.drawing-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 10px;
}

.view-tags {
  border-top: 1px solid rgba(45, 54, 56, 0.1);
}

.view-tags span,
.drawing-meta span,
.drawing-link {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 999px;
  padding: 0 8px;
  background: var(--white);
  color: var(--runway-soft);
  font-size: 11px;
  font-weight: 760;
  text-decoration: none;
}

.drawing-link {
  color: var(--blue);
}

.drawing-link:hover {
  text-decoration: underline;
}

.orthographic-missing {
  min-height: 100%;
  padding-bottom: 10px;
  background: #f8efe7;
}

.orthographic-missing p {
  margin: 10px 10px 0;
  color: #7a3a27;
  font-size: 13px;
  line-height: 1.4;
}

.orthographic-missing .drawing-link {
  margin: 10px 10px 0;
}

.traits {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 6px;
}

.trait {
  border: 1px solid rgba(45, 54, 56, 0.16);
  background: var(--white);
  color: var(--runway);
}

.trait.stealth {
  background: #d8e9e5;
  color: #0b4e49;
}

.trait.carrier {
  background: #dfeafa;
  color: #24506b;
}

.trait.trainer {
  background: #ffe9c2;
  color: #77500f;
}

.trait.attack {
  background: #f8dfcd;
  color: #8a3c16;
}

.trait.bomber {
  background: #e9e1da;
  color: #684737;
}

.trait.tanker {
  background: #d9ecf2;
  color: #1e5968;
}

.trait.transport {
  background: #e0ead6;
  color: #405f28;
}

.trait.recon {
  background: #dde5f4;
  color: #2d4f7b;
}

.trait.patrol {
  background: #dbece8;
  color: #245f54;
}

.trait.command {
  background: #ece1f2;
  color: #5a3b68;
}

.trait.adversary {
  background: #e8e5da;
  color: #4f4a3e;
}

.trait.legacy {
  background: #f4dfd7;
  color: #8c311f;
}

.trait.special {
  background: #eee6fa;
  color: #5a3c86;
}

.recognition-list {
  margin: 0;
  padding: 0 0 0 18px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.42;
}

.recognition-list li + li {
  margin-top: 6px;
}

.confusion-note {
  margin: 10px 0 0;
  padding: 9px 10px;
  border-left: 4px solid var(--gold);
  background: rgba(184, 132, 31, 0.12);
  color: #5c4210;
  font-size: 13px;
  line-height: 1.35;
}

.sources {
  padding: 14px;
}

.sources p {
  max-width: 980px;
  color: var(--runway-soft);
  font-size: 14px;
  line-height: 1.45;
}

.sources ul {
  columns: 2;
  margin: 10px 0 0;
  padding-left: 18px;
}

.sources li {
  break-inside: avoid;
  margin: 0 0 7px;
  color: var(--runway-soft);
  font-size: 13px;
  line-height: 1.35;
}

.sources a {
  color: var(--blue);
  font-weight: 740;
  text-decoration: none;
}

.sources a:hover {
  text-decoration: underline;
}

.empty-state {
  padding: 28px;
  color: var(--muted);
  font-weight: 740;
}

@media (max-width: 1260px) {
  .hero-grid,
  .controls {
    grid-template-columns: 1fr;
  }

  .jet-head {
    display: none;
  }

  .jet-row {
    display: block;
  }

  .jet-body-row {
    margin: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
  }

  .jet-cell {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .jet-cell:last-child {
    border-bottom: 0;
  }

  .jet-cell::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 7px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0;
  }
}

@media (max-width: 760px) {
  .reference-grid {
    grid-template-columns: 1fr;
  }

  .orthographic-frame {
    min-height: 166px;
  }

  .orthographic-frame img {
    height: 166px;
  }
}

@media (max-width: 680px) {
  .site-header,
  main {
    width: min(100% - 18px, 1460px);
  }

  h1 {
    font-size: 30px;
    line-height: 1.04;
  }

  .lede {
    font-size: 15px;
  }

  .guide-start-button {
    width: 100%;
  }

  .guide-progress {
    align-items: stretch;
    flex-direction: column;
  }

  .guide-actions {
    width: 100%;
  }

  .guide-control-button {
    flex: 1 1 0;
  }

  .guide-stage {
    padding: 10px;
  }

  .guide-options,
  .guide-result-grid {
    grid-template-columns: 1fr;
  }

  .controls {
    padding: 10px;
  }

  .filter-button,
  .clear-button {
    flex: 1 1 auto;
  }

  .table-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .jet-body-row {
    margin: 10px 0;
  }

  .jet-head > div,
  .jet-cell {
    padding: 11px;
  }

  .reference-cell {
    padding: 9px;
  }

  .sources ul {
    columns: 1;
  }
}
