/* SUMMER product navigation: shared craft, independent research modules. */
:root {
  --flagship-ink: #1d1d1f;
  --flagship-muted: #68686d;
  --flagship-line: #dcdce1;
  --flagship-paper: #f5f5f7;
  --flagship-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif;
}
.flagship-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 20px;
  box-sizing: border-box;
  max-width: 100%;
  padding: 6px 20px;
  color: var(--flagship-ink);
  background: #fff;
  border-bottom: 1px solid var(--flagship-line);
  font: 500 13px/1.4 var(--flagship-font);
}
.flagship-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 8px;
  color: var(--flagship-muted);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.flagship-nav a:hover { color: var(--flagship-ink); }
.flagship-nav a[aria-current="page"] {
  color: var(--flagship-ink);
  border-bottom-color: currentColor;
}
.flagship-nav a:focus-visible {
  outline: 2px solid #0066cc;
  outline-offset: 2px;
  border-radius: 3px;
}
@media (max-width: 480px) {
  .flagship-nav { gap: 0; justify-content: space-between; padding: 4px 12px; }
  .flagship-nav a { font-size: 12px; padding: 0 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .flagship-nav, .flagship-nav * { scroll-behavior: auto; transition: none; }
}

/* Shared shell: brand / products / home; source status belongs to the judgment. */
body .flagship-header {
  position: sticky; top: 0; z-index: 70;
  width: 100%; max-width: none; margin: 0; padding: 0;
  background: rgba(255,255,255,.98); border: 0;
  border-bottom: 1px solid var(--flagship-line);
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
.flagship-header .flagship-header__inner {
  display: grid; grid-template-columns: auto minmax(0,1fr) auto;
  align-items: center; gap: 24px; min-height: 64px;
  width: min(1280px, calc(100% - 48px)); margin: auto;
  font: 500 12px/1.4 var(--flagship-font);
}
.flagship-header .flagship-brand {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  color: var(--flagship-ink); text-decoration: none; white-space: nowrap;
}
.flagship-header .flagship-brand img { display: block; width: 24px; height: 24px; border-radius: 7px; }
.flagship-header .flagship-brand strong { font: 700 13px/1 var(--flagship-font); letter-spacing: .055em; }
.flagship-header .flagship-home {
  display: inline-flex; align-items: center; min-height: 44px;
  color: #285d48; white-space: nowrap; text-decoration: none;
  font: 500 12px/1.4 var(--flagship-font);
}
.flagship-header .flagship-nav {
  width: 100%; flex-wrap: nowrap; gap: 8px; margin: 0; padding: 0;
  border: 0; background: transparent; justify-content: center;
}
.flagship-header .flagship-nav a { min-height: 44px; padding: 0 14px; font: 500 13px/1.4 var(--flagship-font); }
.flagship-header a:focus-visible { outline: 2px solid #0066cc; outline-offset: 2px; }
body .flagship-chapters {
  position: sticky; top: 65px; bottom: auto; left: auto; right: auto;
  z-index: 25; display: flex; align-items: center; justify-content: flex-start;
  flex-wrap: nowrap; gap: 22px; width: 100%; max-width: 100%;
  margin: 18px 0; padding: 0 12px; overflow-x: auto;
  box-sizing: border-box; border: 0; border-bottom: 1px solid var(--flagship-line);
  background: #f5f6f5; box-shadow: none; border-radius: 0;
  scrollbar-width: thin; touch-action: pan-x;
}
body .flagship-chapters a {
  flex: 0 0 auto; min-height: 44px; min-width: 0; padding: 0 4px;
  display: inline-flex; align-items: center; justify-content: center;
  font: 500 12px/1.4 var(--flagship-font); color: #46534b;
  white-space: nowrap; text-decoration: none;
}
body .flagship-chapters a::after { display: none; }
body .flagship-chapters a.active { color: #153e2d; border-bottom: 2px solid; background: transparent; }
body .flagship-status {
  display: flex; align-items: center; justify-content: flex-start;
  flex-wrap: wrap; gap: 4px 10px; margin: 0 0 12px; padding: 0;
  color: #676c68; font: 500 11px/1.5 var(--flagship-font);
}
body .flagship-status .nav-time, body .flagship-status .palm-updated {
  max-width: none; overflow: visible; white-space: normal; text-overflow: clip;
  font: inherit; text-align: left;
}
body .flagship-status .palm-updated time { display: inline; }
body .flagship-status [hidden] { display: none; }
body .decision-primary .flagship-status { color: #d4e1d7; }
body .decision-primary .flagship-status .data-chip.stale,
body .decision-primary .flagship-status .data-chip.error { color: #ffe0b2; border-color: #90794f; background: rgba(143,99,38,.18); }
@media (max-width: 760px) {
  .flagship-header .flagship-header__inner {
    grid-template-columns: minmax(0,1fr) auto; gap: 0;
    width: calc(100% - 32px); min-height: 88px;
  }
  .flagship-header .flagship-brand { grid-column: 1; grid-row: 1; }
  .flagship-header .flagship-home { grid-column: 2; grid-row: 1; font-size: 11px; }
  .flagship-header .flagship-nav { grid-column: 1 / -1; grid-row: 2; justify-content: space-between; gap: 0; }
  body .flagship-header .flagship-nav a { flex: 1 0 auto; min-width: 44px; padding: 0 4px; font-size: 12px; box-sizing: border-box; }
  body .flagship-chapters { top: 89px; gap: 16px; padding: 0 8px; margin: 14px 0; }
  body .flagship-status { margin-bottom: 8px; font-size: 10px; }
}
@media (max-width: 620px) {
  /* Recover the sugar benchmark's first-screen density without hiding state. */
  body:has(#sugar-rainfall-frame) .hero { min-height: 416px; padding: 24px 22px 198px; }
  body:has(#sugar-rainfall-frame) .hero-visual { height: 186px; }
  body:has(#sugar-rainfall-frame) main { padding-bottom: 30px; }
  body:has(#climate-title) .hero-copy { padding: 22px 22px; }
  body:has(#climate-title) .hero-copy .subtitle { margin-top: 14px; line-height: 1.6; }
  body:has(#climate-title) .hero-visual { height: 160px; }
}
