:root {
  --bg: #ffffff;
  --surface: #f3f7ff;
  --card: #ffffff;
  --ink: #0b1b3f;
  --muted: #4a5a7d;
  --border: #e1e9f7;
  --accent: #1d5bff;
  --accent-fill: #1d5bff;
  --accent-soft: #e8efff;
  --navy: #0a1c4a;
  --ink-rgb: 11, 27, 63;
  --accent-rgb: 29, 91, 255;
}

html[data-theme="dark"] {
  --bg: #071022;
  --surface: #0a1530;
  --card: #0e1c3f;
  --ink: #f1f5ff;
  --muted: #aab8d8;
  --border: #1f2f5a;
  --accent: #4a86ff;
  --accent-fill: #2d62e8;
  --accent-soft: #14275a;
  --navy: #0a1c4a;
  --ink-rgb: 255, 255, 255;
  --accent-rgb: 74, 134, 255;
}

.pg-insights-value {
  --fv-font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fv-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --fv-gutter: clamp(20px, 6vw, 56px);
  --fv-wrapw: 1160px;
  --fv-onnavy: #ffffff;
  --fv-onnavy-soft: rgba(255, 255, 255, 0.68);
  --fv-amber: #b26b00;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--fv-font);
  font-size: clamp(15px, 0.5vw + 13.8px, 17px);
  line-height: 1.65;
  padding-top: 100px;
  padding-bottom: clamp(48px, 8vw, 96px);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

:where(.pg-insights-value) *,
:where(.pg-insights-value) *::before,
:where(.pg-insights-value) *::after { box-sizing: border-box; }

:where(.pg-insights-value) p { margin: 0; }
:where(.pg-insights-value) h1,
:where(.pg-insights-value) h2,
:where(.pg-insights-value) h3 { margin: 0; font-weight: 600; }
:where(.pg-insights-value) ul,
:where(.pg-insights-value) ol { margin: 0; padding: 0; list-style: none; }

:where(.pg-insights-value) a:focus-visible,
:where(.pg-insights-value) button:focus-visible,
.pg-insights-value [tabindex]:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.fv-wrap {
  max-width: var(--fv-wrapw);
  margin-inline: auto;
  padding-inline: var(--fv-gutter);
}

/* top bar */
.fv-top { border-bottom: 1px solid var(--border); }
.fv-top__wrap {
  max-width: var(--fv-wrapw);
  margin-inline: auto;
  padding: 12px var(--fv-gutter) 0;
}
.fv-crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-family: var(--fv-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.fv-crumb a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 6px;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.fv-crumb a:hover,
.fv-crumb a:focus-visible { color: var(--accent); border-bottom-color: currentColor; }
.fv-crumb [aria-current="page"] { color: var(--ink); }
.fv-crumb__sep { color: rgba(var(--ink-rgb), 0.35); }
.fv-top__bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 0 16px;
}
.fv-top__kick {
  font-family: var(--fv-mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}
.fv-top__mid {
  font-family: var(--fv-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  padding-left: 14px;
  border-left: 1px solid var(--border);
}
.fv-top__mark {
  margin-left: auto;
  font-weight: 600;
  font-size: 0.86rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}

/* head */
.fv-head { padding-top: clamp(30px, 5vw, 58px); }
.fv-kicker {
  font-family: var(--fv-mono);
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}
.fv-h1 {
  font-size: clamp(38px, 6.2vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.04em;
  font-weight: 600;
  max-width: 16ch;
  text-wrap: balance;
}
.fv-lede {
  margin-top: clamp(18px, 2.4vw, 26px);
  color: var(--muted);
  font-size: clamp(17px, 1.4vw, 21px);
  line-height: 1.55;
  max-width: 60ch;
}

/* six tile index */
.fv-indexsec { padding-top: clamp(30px, 5vw, 54px); }
.fv-label {
  font-family: var(--fv-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}
.fv-index {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: clamp(10px, 1.4vw, 16px);
}
.fv-tile {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 118px;
  padding: 18px 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--card);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}
.fv-tile:hover,
.fv-tile:focus-visible {
  border-color: rgba(var(--accent-rgb), 0.55);
  transform: translateY(-2px);
}
.fv-tile.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.fv-tile__ico {
  width: 30px;
  height: 30px;
  color: var(--accent);
}
.fv-tile__ico svg { display: block; width: 100%; height: 100%; }
.fv-tile__name {
  margin-top: auto;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.25;
}

/* sticky table of contents */
.fv-toc {
  position: sticky;
  top: 104px;
  z-index: 6;
  margin-top: clamp(26px, 4vw, 44px);
  background: var(--bg);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.fv-toc__list {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.fv-toc__list::-webkit-scrollbar { display: none; }
.fv-toc__list a {
  position: relative;
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 14px;
  font-family: var(--fv-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.18s ease, border-color 0.18s ease;
}
.fv-toc__list a:hover,
.fv-toc__list a:focus-visible { color: var(--ink); }
.fv-toc__list a.is-active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* field guide body */
.fv-body { padding-top: clamp(24px, 3.6vw, 42px); }
.fv-masonry {
  columns: 2;
  column-gap: clamp(20px, 3vw, 34px);
}
.fv-card {
  break-inside: avoid;
  display: block;
  margin: 0 0 clamp(20px, 3vw, 34px);
  padding: clamp(20px, 2.6vw, 30px);
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--card);
  scroll-margin-top: 180px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.fv-card.is-active {
  border-color: rgba(var(--accent-rgb), 0.5);
  box-shadow: 0 14px 40px rgba(var(--ink-rgb), 0.08);
}
.fv-js .fv-card__top { transition: transform 0.3s ease; }
.fv-js .fv-card.is-active .fv-card__top { transform: translateX(2px); }
.fv-card__top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.fv-card__ico {
  flex: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}
.fv-card__ico svg { display: block; width: 100%; height: 100%; }
.fv-card__h {
  font-size: clamp(20px, 1.7vw, 26px);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.fv-card__label {
  font-family: var(--fv-mono);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.fv-card__text { color: var(--ink); }

/* js reveal */
.fv-js .fv-card {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.fv-js .fv-card.is-in { opacity: 1; transform: none; }

/* quote */
.fv-quote {
  margin: clamp(30px, 5vw, 58px) 0;
  padding: clamp(28px, 4.4vw, 54px) clamp(24px, 4vw, 56px);
  border-radius: 24px;
  background: var(--navy);
  color: var(--fv-onnavy);
}
.fv-quote p {
  font-size: clamp(22px, 2.9vw, 36px);
  line-height: 1.25;
  letter-spacing: -0.025em;
  font-weight: 600;
  max-width: 26ch;
  text-wrap: balance;
}

/* how to choose */
.fv-choose {
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface);
  padding: clamp(24px, 3.4vw, 44px);
}
.fv-choose__h {
  font-size: clamp(24px, 2.6vw, 34px);
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin-bottom: 14px;
}
.fv-choose__p {
  color: var(--muted);
  max-width: 62ch;
}
.fv-questions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(12px, 1.6vw, 18px);
  margin-top: clamp(22px, 3vw, 34px);
}
.fv-q {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
}
.fv-q__text {
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--ink);
}
.fv-q__yes {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  align-self: flex-start;
  min-height: 44px;
  padding: 0 18px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  color: var(--muted);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}
.fv-q__yes:hover { border-color: rgba(var(--accent-rgb), 0.55); color: var(--ink); }
.fv-q__dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid currentColor;
  transition: background 0.18s ease, border-color 0.18s ease;
}
.fv-q__yes.is-yes {
  border-color: var(--accent-fill);
  background: var(--accent-soft);
  color: var(--accent);
}
.fv-q__yes.is-yes .fv-q__dot {
  background: var(--accent);
  border-color: var(--accent);
}

/* closing */
.fv-end { margin-top: clamp(34px, 5vw, 64px); }
.fv-keep {
  border-top: 1px solid var(--border);
  padding-top: clamp(20px, 3vw, 30px);
}
.fv-keep__label {
  font-family: var(--fv-mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}
.fv-keep ul { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.fv-keep a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(var(--accent-rgb), 0.4);
}
.fv-keep a:hover,
.fv-keep a:focus-visible { color: var(--accent); border-bottom-color: currentColor; }

.fv-cta {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: clamp(16px, 3vw, 34px);
  margin-top: clamp(26px, 3.6vw, 42px);
  padding: clamp(20px, 2.8vw, 30px);
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--card);
}
.fv-cta__lead {
  display: flex;
  align-items: center;
  gap: 16px;
}
.fv-cta__flag {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 9px;
}
.fv-cta__flag svg { display: block; width: 100%; height: 100%; }
.fv-cta__text {
  font-size: clamp(17px, 1.5vw, 21px);
  font-weight: 600;
}
.fv-cta__text span { color: var(--muted); font-weight: 400; }
.fv-cta a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 clamp(20px, 3vw, 30px);
  border-radius: 999px;
  background: var(--accent-fill);
  color: var(--fv-onnavy);
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.fv-cta a:hover,
.fv-cta a:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(var(--accent-rgb), 0.35);
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  :where(.pg-insights-value) * { transition: none !important; }
  .fv-js .fv-card { opacity: 1; transform: none; }
}

/* tablet */
@media (max-width: 1080px) {
  .fv-index { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 860px) {
  .fv-masonry { columns: 1; }
  .fv-toc { display: none; }
}

/* phone */
@media (max-width: 640px) {
  .pg-insights-value { padding-top: 84px; }
  .fv-top__mid { display: none; }
  .fv-h1 { max-width: none; font-size: clamp(32px, 9vw, 44px); }
  .fv-lede { max-width: none; }
  .fv-index { grid-template-columns: repeat(2, 1fr); }
  .fv-tile { min-height: 104px; padding: 16px 14px; }
  .fv-questions { grid-template-columns: 1fr; }
  .fv-q { flex-direction: row; align-items: center; justify-content: space-between; }
  .fv-q__yes { flex: none; }
  .fv-cta { grid-template-columns: 1fr; }
  .fv-cta a { width: 100%; }
  .fv-quote p { max-width: none; }
}
