.crown-navigation {
  align-items: center;
}
.crown-dropdown {
  position: relative;
}
.crown-dropdown summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  cursor: pointer;
  list-style: none;
  color: var(--ink);
  font-weight: 500;
}
.crown-dropdown summary::-webkit-details-marker {
  display: none;
}
.crown-dropdown summary span {
  transition: transform 160ms ease;
}
.crown-dropdown[open] summary span {
  transform: rotate(180deg);
}
.crown-dropdown-panel {
  position: absolute;
  top: calc(100% + 12px);
  left: -24px;
  width: 320px;
  max-width: calc(100vw - 48px);
  padding: 20px;
  background: var(--paper-high);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 18px 48px rgba(16, 21, 33, 0.12);
  z-index: 30;
}
.crown-navigation .crown-dropdown-panel a {
  display: block;
  padding: 12px;
  border-radius: 6px;
  text-decoration: none;
}
.crown-dropdown-panel a:hover {
  background: rgba(49, 85, 245, 0.06);
}
.crown-dropdown-panel strong {
  display: block;
  font-size: 15px;
  font-weight: 500;
}
.crown-dropdown-panel small {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}
.crown-menu-label {
  margin: 0 12px 8px;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.crown-navigation a:focus-visible,
.crown-navigation summary:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 4px;
}
@media (max-width: 1000px) {
  .crown-navigation {
    gap: 20px;
  }
}
@media (max-width: 800px) {
  .topbar:has(.crown-navigation) {
    padding-top: 12px;
    padding-bottom: 4px;
    row-gap: 4px;
  }
  .topbar .crown-navigation {
    display: flex;
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: center;
    gap: clamp(18px, 5vw, 30px);
  }
  .topbar:has(.crown-navigation) > .nav-action {
    grid-column: 2;
    grid-row: 1;
  }
  .crown-dropdown {
    position: static;
  }
  .crown-dropdown-panel {
    left: 24px;
    right: 24px;
    top: 100%;
    width: auto;
    max-height: 65vh;
    overflow-y: auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  .crown-dropdown summary span {
    transition: none;
  }
}

/* One marketing header across the library, guides and watch pages. */
.topbar.crown-site-header {
  position: relative;
  width: 100%;
  box-sizing: border-box;
}
.crown-navigation > a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.crown-navigation .crown-menu-feature {
  padding: 10px 12px 16px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}
.crown-menu-feature img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  object-fit: contain;
  border-radius: 5px;
  margin-bottom: 12px;
  background: var(--ink);
}
.crown-menu-feature .crown-menu-label {
  display: block;
  margin: 0 0 6px;
  color: var(--blue);
}
.crown-dropdown-panel {
  max-height: min(660px, calc(100dvh - 120px));
  overflow-y: auto;
  overscroll-behavior: contain;
}
.crown-lesson-next {
  width: min(1180px, calc(100% - 48px));
  box-sizing: border-box;
  margin: 0 auto 48px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.crown-lesson-next .crown-menu-label {
  margin: 0 0 12px;
}
.crown-lesson-next a {
  color: var(--ink);
  font-size: 14px;
  text-underline-offset: 5px;
}
.crown-lesson-next .crown-next-primary {
  display: block;
  padding: 18px 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-high);
  text-decoration: none;
  max-width: 480px;
}
.crown-next-primary small {
  display: block;
  color: var(--muted);
  margin-bottom: 8px;
}
.crown-next-primary strong {
  font-weight: 500;
  color: var(--blue);
}
@media (max-width: 800px) {
  .crown-menu-feature img {
    max-height: 120px;
  }
  .crown-dropdown-panel {
    max-height: calc(100dvh - 140px);
  }
  .crown-lesson-next {
    flex-direction: column;
    align-items: stretch;
  }
  .topbar:has(.crown-navigation) .brand {
    font-size: 14px;
    gap: 8px;
  }
  .topbar:has(.crown-navigation) .nav-action {
    min-height: 44px;
    padding-inline: 12px;
  }
}

/* Shared chrome must not inherit app-brand or article/FAQ presentation. */
.topbar:has(.crown-navigation),
.crown-resource-footer {
  --crown-control-height: 44px;
  font-family: Geist, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}
.topbar:has(.crown-navigation) .brand,
.crown-resource-footer .brand {
  color: var(--ink);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.5;
  text-transform: none;
  gap: 12px;
}
.topbar:has(.crown-navigation) .brand small,
.crown-resource-footer .brand small {
  display: inline;
  font-size: 0.833333em;
  font-weight: 400;
  color: var(--muted);
}
.topbar:has(.crown-navigation) .brand-mark,
.crown-resource-footer .brand-mark {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  font-size: 20px;
  line-height: 1;
  border: 0;
  box-shadow: none;
  border-radius: 10px 10px 14px 10px;
  color: var(--paper);
  background: var(--blue);
}
.topbar .crown-navigation .crown-dropdown {
  margin: 0;
  padding: 0;
  border: 0;
}
.topbar .crown-navigation > a,
.topbar .crown-navigation summary {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--ink);
  min-height: var(--crown-control-height);
}
.topbar .crown-navigation p {
  line-height: 1.5;
}
.topbar:has(.crown-navigation) .nav-action {
  min-height: var(--crown-control-height);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  border-radius: 5px;
}
.topbar:has(.crown-navigation) :is(a, summary):focus-visible,
.crown-resource-footer a:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 4px;
}
.topbar[data-current-section='tools'] .crown-dropdown:first-of-type > summary,
.topbar[data-current-section='learn'] .crown-dropdown:last-of-type > summary {
  color: var(--blue);
}
.crown-resource-footer {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
  padding-block: 32px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.crown-resource-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}
.crown-resource-footer nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 14px;
  text-underline-offset: 5px;
}
/* Article/library typography and controls, isolated from the home and planner heroes. */
.crown-resource-page {
  --crown-heading: clamp(2.45rem, 4.5vw, 4.2rem);
  --crown-subheading: clamp(1.7rem, 3vw, 2.6rem);
  --crown-control-radius: 5px;
}
.crown-resource-page
  :is(.learn-intro, .guide-hero, .watch-stage, .planner-hero)
  h1 {
  font-size: var(--crown-heading);
  line-height: 1.06;
  font-weight: 600;
  letter-spacing: -0.055em;
}
.crown-resource-page
  :is(.learn-section-heading, .learn-path, .guide-article, .watch-steps)
  h2 {
  font-size: var(--crown-subheading);
  font-weight: 550;
  line-height: 1.15;
  letter-spacing: -0.04em;
}
.crown-resource-page
  :is(
    .guide-actions .button,
    .guide-button,
    .learn-topics a,
    .learn-filters button
  ) {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: var(--crown-control-radius);
  font:
    500 14px/1.5 Geist,
    system-ui,
    sans-serif;
  text-decoration: none;
}
.crown-resource-page
  :is(.guide-button:not(.secondary), .guide-actions .button.primary) {
  border-color: var(--ink);
}
.crown-resource-page .learn-topics a {
  background: var(--paper-high);
}
.crown-resource-page :is(.learn-topics a, .learn-filters button):hover {
  border-color: var(--blue);
}
.crown-resource-page .guide-breadcrumbs {
  font-size: 14px;
  line-height: 1.5;
}
@media (max-width: 800px) {
  .topbar:has(.crown-navigation) .brand {
    font-size: 14px;
    gap: 8px;
  }
}
@media (max-width: 480px) {
  .crown-resource-footer,
  .crown-lesson-next {
    width: calc(100% - 36px);
  }
  .crown-resource-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }
}

/* Shared public-page action sizes. Working tool controls remain separate. */
.blueprint-live-landing,
.guide-page {
  --landing-action-width: 280px;
  --landing-action-height: 58px;
  --landing-action-font: 15px;
  --landing-action-padding: 30px;
  --landing-compact-width: 144px;
  --landing-compact-height: 44px;
  --landing-compact-font: 13px;
  --landing-compact-padding: 16px;
}
.blueprint-live-landing
  :is(.final-cta > .button, .inspection-demo-toggle, .nav-action),
.guide-page :is(.planner-close .flight-feature-cta, .nav-action) {
  --landing-action-width: var(--landing-compact-width);
  --landing-action-height: var(--landing-compact-height);
  --landing-action-font: var(--landing-compact-font);
  --landing-action-padding: var(--landing-compact-padding);
}
.blueprint-live-landing
  :is(.button, .topbar:has(.crown-navigation) > .nav-action),
.guide-page
  :is(
    .planner-hero-cta,
    .guide-button,
    .guide-actions > .button,
    .planner-close .flight-feature-cta,
    .topbar:has(.crown-navigation) > .nav-action
  ) {
  box-sizing: border-box;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: min(100%, var(--landing-action-width));
  max-width: 100%;
  min-width: 0;
  height: var(--landing-action-height);
  min-height: var(--landing-action-height);
  padding: 0 var(--landing-action-padding);
  border-width: 1px;
  border-style: solid;
  border-radius: 5px;
  font-family: inherit;
  font-size: var(--landing-action-font);
  font-weight: 500;
  line-height: 20px;
  text-align: center;
}

.guide-page .planner-close .flight-feature-cta-arrow {
  flex: 0 0 auto;
  font-size: inherit;
}
