/* Textron aircraft information pages: the site's page shell around the
   owner's article (app/aircraft/_info/aircraft-info-view.tsx). Every rule is
   scoped to .aircraft-info-page / .aircraft-info so it cannot follow a visitor
   to another page after a client navigation. The owner's own stylesheet
   (/assets/flying411-marketplace.css, scoped by scripts/import-aircraft-info.mjs)
   loads BEFORE this one. Its selectors weigh `.aircraft-info .x` or
   `.aircraft-info[data-body-class~="opt-a"] .x`; the resets below stay under
   that with :where(), and the fixes further down start with
   `.aircraft-info-page .aircraft-info` so that, selector for selector, they
   tie with the owner's rule and win by coming later. */

/* ── Header: white on navy, as on the other public pages ─────────────────────
   The site header is a transparent overlay drawn for a dark hero. These pages
   open on the owner's navy hero with a breadcrumb above it, so the header
   sits in the flow on the hero's own top colour and the breadcrumb joins the
   same band: header, breadcrumb and hero read as one navy block, and the
   active nav link gets its white underline. */
.aircraft-info-page > .site-header {
  position: relative;
  background: #0e1a2b;
}

/* The breadcrumb is a centred max-width box; the shadow paints the band out
   to both edges and the clip keeps it from spilling up or down. */
.aircraft-info-page .aircraft-info .breadcrumb {
  --navy: #ffffff; /* the current crumb's inline colour is var(--navy) */
  background: #0e1a2b;
  box-shadow: 0 0 0 100vmax #0e1a2b;
  clip-path: inset(0 -100vmax);
  color: rgba(255, 255, 255, 0.6);
  padding-bottom: 6px;
  padding-top: 4px;
}

.aircraft-info-page .aircraft-info .breadcrumb a,
.aircraft-info-page .aircraft-info .breadcrumb > span {
  color: rgba(255, 255, 255, 0.78);
}

.aircraft-info-page .aircraft-info .breadcrumb a:hover {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.aircraft-info-page .aircraft-info .breadcrumb .sep {
  color: rgba(255, 255, 255, 0.4);
}

/* The owner's hero: same colours, with the upper glow centred a little lower
   (30% instead of 20%) so it has faded out by the top edge and the hero
   meets the band above without a line. */
.aircraft-info-page .aircraft-info[data-body-class~="opt-a"] .hero {
  background-image:
    radial-gradient(
      ellipse 70% 50% at 20% 30%,
      rgba(58, 88, 196, 0.35),
      transparent 60%
    ),
    radial-gradient(
      ellipse 50% 70% at 90% 80%,
      rgba(90, 138, 167, 0.25),
      transparent 60%
    ),
    linear-gradient(180deg, #0e1a2b 0%, #152444 60%, #1a2f52 100%);
}

/* Same for the hero's soft white highlight (30% → 40%). */
.aircraft-info-page .aircraft-info .hero-bg {
  background:
    radial-gradient(
      ellipse 70% 50% at 30% 40%,
      rgba(255, 255, 255, 0.06),
      transparent 70%
    ),
    radial-gradient(
      ellipse 60% 80% at 80% 60%,
      rgba(255, 255, 255, 0.08),
      transparent 60%
    );
}

/* Tailwind's preflight (globals.css) zeroes headings, lists and margins
   site-wide. The owner's pages were written against browser defaults, so
   give those back inside the article only. :where() keeps this at the
   specificity of one class, so any rule in the owner's sheet beats it. */
.aircraft-info :where(h1, h2, h3, h4, h5, h6) {
  font-size: revert;
  font-weight: revert;
  margin: revert;
}

.aircraft-info :where(p, blockquote, figure, dl, dd, hr, pre) {
  margin: revert;
}

.aircraft-info :where(ul, ol) {
  list-style: revert;
  margin: revert;
  padding: revert;
}

.aircraft-info :where(table) {
  border-collapse: revert;
}

.aircraft-info :where(a) {
  color: revert;
  text-decoration: revert;
}

/* ── Buttons: every state readable ───────────────────────────────────────────
   The owner's `a:hover { color: navy }` reached the buttons that set no hover
   colour of their own: the outline button on the navy hero and the navy
   button on light both lost their text on hover. Each kind now names its
   text colour in every state, and all of them show a focus ring. */
.aircraft-info-page .aircraft-info .btn-ghost,
.aircraft-info-page .aircraft-info .btn-ghost:hover,
.aircraft-info-page .aircraft-info .btn-ghost:focus-visible {
  color: #ffffff;
}

.aircraft-info-page .aircraft-info .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: #ffffff;
}

.aircraft-info-page .aircraft-info .btn-ghost:active {
  background: rgba(255, 255, 255, 0.22);
}

.aircraft-info-page
  .aircraft-info[data-body-class]
  :is(.hero-cta, .cta-band)
  .btn-primary:active {
  background: #dfe8f1;
}

.aircraft-info-page .aircraft-info .btn-light-primary,
.aircraft-info-page .aircraft-info .btn-light-primary:hover,
.aircraft-info-page .aircraft-info .btn-light-primary:focus-visible {
  color: #ffffff;
}

.aircraft-info-page .aircraft-info .btn-light-primary:active {
  background: #1f3585;
}

.aircraft-info-page .aircraft-info .btn-light-ghost:active {
  background: rgba(40, 67, 167, 0.08);
}

.aircraft-info-page .aircraft-info .btn:focus-visible {
  outline: 2px solid #2843a7;
  outline-offset: 2px;
}

/* On the navy hero and the navy closing band the ring is white. */
.aircraft-info-page .aircraft-info .hero .btn:focus-visible,
.aircraft-info-page .aircraft-info .cta-band .btn:focus-visible {
  outline-color: #ffffff;
}

/* A "for sale" button with no live listing behind it (aircraft-info-cta.ts):
   it keeps its place and says so, and goes nowhere. Drawn as a quiet label,
   not a faded button: full-strength text on a faint fill. */
.aircraft-info-page .aircraft-info .aircraft-info-cta--none,
.aircraft-info-page .aircraft-info .hero-cta .aircraft-info-cta--none,
.aircraft-info-page .aircraft-info .cta-band .aircraft-info-cta--none {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.72);
  cursor: default;
  pointer-events: none;
}

.aircraft-info-page
  .aircraft-info
  :is(.btn-light-primary, .btn-light-ghost).aircraft-info-cta--none {
  background: #eef2f6;
  border-color: rgba(90, 138, 167, 0.32);
  color: #4a6e82;
}

/* ── Text links: same colour on hover, a thicker underline ───────────────────
   (The owner's sheet turned every link navy on hover.) Buttons, cards, the
   jump nav and the breadcrumb keep their own hover. */
.aircraft-info-page
  .aircraft-info
  :where(p, li, td, dd, .meta)
  a:not(.btn, .badge, .sib) {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.aircraft-info-page
  .aircraft-info
  :where(p, li, td, dd, .meta)
  a:not(.btn, .badge, .sib):hover {
  color: #2843a7;
  text-decoration-thickness: 2px;
}

.aircraft-info-page .aircraft-info .ata-head a:hover {
  color: #2843a7;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.aircraft-info-page
  .aircraft-info
  :where(p, li, td, dd, .meta)
  a:not(.btn, .badge, .sib):focus-visible {
  border-radius: 2px;
  outline: 2px solid #2843a7;
  outline-offset: 2px;
}

/* ── Footnote markers: [1], not a bare superscript digit ─────────────────────
   The digit is the owner's; the brackets are drawn here. font-size:0 on the
   <sup> hides the ", " between two markers, so they read [1][2]. Each link
   carries a title naming its source (aircraft-info-presentation.ts). */
.aircraft-info-page .aircraft-info sup.cite {
  font-size: 0;
  line-height: 0;
  margin-left: 1px;
  vertical-align: baseline;
  white-space: nowrap;
}

.aircraft-info-page .aircraft-info sup.cite a,
.aircraft-info-page .aircraft-info sup.cite a:hover {
  border-radius: 4px;
  color: #2843a7;
  display: inline-block;
  font-family: var(--font-body);
  font-size: 11px;
  font-style: normal;
  font-variant-numeric: lining-nums tabular-nums;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.3;
  padding: 0 1px;
  position: relative;
  text-decoration: none;
  top: -0.5em;
  transition: background-color 0.15s ease;
}

.aircraft-info-page .aircraft-info sup.cite a::before {
  content: "[";
}

.aircraft-info-page .aircraft-info sup.cite a::after {
  content: "]";
}

.aircraft-info-page .aircraft-info sup.cite a:hover {
  background: rgba(40, 67, 167, 0.12);
}

/* In the hero the text is white on navy. */
.aircraft-info-page .aircraft-info .hero sup.cite a,
.aircraft-info-page .aircraft-info .hero sup.cite a:hover {
  color: #c9d6ff;
}

.aircraft-info-page .aircraft-info .hero sup.cite a:hover {
  background: rgba(255, 255, 255, 0.14);
}

/* The source a marker jumps to: clear of the sticky jump nav, and marked. */
.aircraft-info-page .aircraft-info [id] {
  scroll-margin-top: 72px;
}

.aircraft-info-page .aircraft-info .sources li[id] {
  border-radius: 6px;
  margin-left: -8px;
  padding: 4px 8px;
  scroll-margin-top: 96px;
}

.aircraft-info-page .aircraft-info .sources li:target {
  animation: aircraft-info-source-flash 1.6s ease-out 1;
  background: rgba(40, 67, 167, 0.08);
}

@keyframes aircraft-info-source-flash {
  from {
    background: rgba(40, 67, 167, 0.26);
  }
  to {
    background: rgba(40, 67, 167, 0.08);
  }
}

@media (prefers-reduced-motion: reduce) {
  .aircraft-info-page .aircraft-info .sources li:target {
    animation: none;
  }
}

/* ── Compare: the two "what changed" rows ────────────────────────────────────
   (aircraft-info-presentation.ts turns the owner's run-on intro into a list.) */
.aircraft-info-page .aircraft-info .compare-summary {
  display: grid;
  gap: 10px;
  margin: 4px 0 0;
  max-width: 720px;
}

.aircraft-info-page .aircraft-info .compare-summary > div {
  align-items: baseline;
  column-gap: 16px;
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
}

.aircraft-info-page .aircraft-info .compare-summary dt {
  color: #0e1a2b;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.6;
  text-transform: uppercase;
}

.aircraft-info-page .aircraft-info .compare-summary dd {
  color: var(--text-dim);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.7;
  margin: 0;
}

@media (max-width: 640px) {
  .aircraft-info-page .aircraft-info .compare-summary > div {
    grid-template-columns: 1fr;
  }
}

/* The "this page" card among the sibling links: marked, and not a link. */
.aircraft-info-page
  .aircraft-info[data-body-class~="opt-a"]
  .sib.current,
.aircraft-info-page
  .aircraft-info[data-body-class~="opt-a"]
  .sib.current:hover {
  background: #f3f6ff;
  border-color: #2843a7;
  box-shadow: none;
  cursor: default;
  transform: none;
}

/* ── Market and Parts: the live block ────────────────────────────────────────
   One sentence from the live counts and two buttons, where the owner's draft
   had sample tiles and rows (aircraft-info-presentation.ts). */
.aircraft-info-page .aircraft-info .aircraft-info-live {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  justify-content: space-between;
  padding: 22px 24px;
}

.aircraft-info-page .aircraft-info .aircraft-info-live__text {
  color: var(--text-body);
  flex: 1 1 320px;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  margin: 0;
}

.aircraft-info-page .aircraft-info .aircraft-info-live__text strong {
  color: #0e1a2b;
  font-variant-numeric: lining-nums tabular-nums;
  font-weight: 700;
}

.aircraft-info-page .aircraft-info .aircraft-info-live__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* With the sample layout gone the heading is the only thing in the head. */
.aircraft-info-page
  .aircraft-info
  .section-head:has(+ .aircraft-info-live) {
  margin-bottom: 24px;
}

@media (max-width: 640px) {
  .aircraft-info-page .aircraft-info .aircraft-info-live {
    padding: 18px;
  }

  .aircraft-info-page .aircraft-info .aircraft-info-live__actions {
    flex-direction: column;
    width: 100%;
  }

  .aircraft-info-page .aircraft-info .aircraft-info-live__actions .btn {
    width: 100%;
  }
}

/* The owner's jump nav sticks at top:74-80px, the height of the owner's own
   sticky header. The site header here is in the flow (above), so that offset
   would leave a band of article showing above the nav. */
.aircraft-info-page .aircraft-info[data-body-class~="opt-a"] .jumpnav,
.aircraft-info-page .aircraft-info .jumpnav {
  top: 0;
}
