/* ==========================================================================
   insights.css — UDRS NPC
   Layers on top of styles.css. MUST load second.

   Reuses the existing system rather than duplicating it: .container,
   .section/.section-tight, .gold-bar, .text-gold, .btn/.btn-primary/
   .btn-outline, .detail-shot, and the SVG icon sprite (<use href="#i-...">)
   all come from styles.css unchanged. Everything below is new vocabulary
   an insight post and the insights hub need that styles.css has no
   equivalent for.

   Deliberately does NOT reuse .ihero — that component's .ihero-meta .m .n
   pattern is hooked by js/main.js's count-up animation (anything in .n
   starting with a digit animates as a counting statistic; see the code
   comment on section-18a.html's PBO number for why that is dangerous for
   a plain fact like a date or a registration number). .inshead below is a
   deliberately plainer, non-animated masthead for exactly that reason.

   Class names are the ones AUTO_BLOG_ROUTINE.md instructs the routine to
   write. Renaming anything here means updating that file too.
   ========================================================================== */

/* ── post masthead (plain — no count-up hooks) ───────────────────────── */

/* Dark background is required, not decorative: .nav is position:fixed with
   background:transparent and a white logo/links until a scroll-triggered
   ".scrolled" class gives it a navy backdrop (see .nav.scrolled in
   styles.css). Every other inner page sits that transparent nav over a
   dark .ihero photo scrim for exactly this reason. .inshead avoids .ihero
   itself (see the file header comment on the count-up hazard) but must
   still be dark enough at the very top of the page for the white nav to
   read before the visitor has scrolled at all. */
.inshead {
  padding-top: calc(80px + 2.5rem);
  padding-bottom: 2rem;
  background: linear-gradient(155deg, var(--navy) 0%, var(--navy-light) 100%);
  border-bottom: 1px solid rgba(212, 160, 60, 0.25);
}
@media (min-width: 768px) {
  .inshead { padding-top: calc(80px + 3.5rem); padding-bottom: 2.75rem; }
}
.inshead-crumbs {
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(245, 240, 232, 0.6);
  margin-bottom: 1rem;
}
.inshead-crumbs a { color: rgba(245, 240, 232, 0.85); text-decoration: none; }
.inshead-crumbs a:hover { color: var(--gold); }
.inshead-crumbs span { opacity: 0.5; margin: 0 0.5em; }
.inshead h1 {
  color: var(--white);
  font-size: clamp(1.9rem, 4.5vw, 2.75rem);
  line-height: 1.15;
  max-width: 22ch;
  margin: 0.5rem 0 1rem;
}
.inshead p.lede {
  color: rgba(245, 240, 232, 0.78);
  font-size: 1.05rem;
  line-height: 1.55;
  max-width: 58ch;
}
.inshead-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin-top: 1.4rem;
  padding-top: 1.1rem;
  border-top: 1px dashed rgba(245, 240, 232, 0.2);
  font-size: 0.84rem;
  color: rgba(245, 240, 232, 0.65);
}
.inshead-cat {
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-size: 0.7rem;
  color: var(--navy);
  background: var(--gold);
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
}

/* the cover photo sits below the masthead, full width */
.inshero { margin: 0; }
.inshero img {
  width: 100%;
  height: clamp(220px, 40vw, 420px);
  object-fit: cover;
  display: block;
}

/* ── article body ─────────────────────────────────────────────────── */

.ins-body {
  max-width: 700px;
  margin: 0 auto;
  padding-block: 3rem 1.5rem;
  font-size: 1.05rem;
  line-height: 1.72;
  color: rgba(26, 31, 46, 0.82);
}
.ins-body > * + * { margin-top: 1.25rem; }
.ins-body h2 {
  color: var(--navy);
  font-size: clamp(1.45rem, 3vw, 1.85rem);
  line-height: 1.24;
  margin-top: 2.75rem;
}
.ins-body h3 {
  color: var(--navy);
  font-size: clamp(1.15rem, 2.2vw, 1.3rem);
  margin-top: 2rem;
}
.ins-body strong { color: var(--navy); font-weight: 650; }
.ins-body a { color: var(--gold-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.ins-body a:hover { color: var(--navy); }

/* ── answer box ───────────────────────────────────────────────────── */

.answer-box {
  background: linear-gradient(180deg, rgba(212, 160, 60, 0.09), rgba(212, 160, 60, 0.02));
  border: 1px solid rgba(212, 160, 60, 0.35);
  border-left: 3px solid var(--gold);
  border-radius: 0.75rem;
  padding: 1.25rem 1.5rem;
  margin-top: 1.75rem !important;
  font-size: 1.06rem;
  line-height: 1.6;
  color: var(--navy);
}
.answer-box p { margin: 0; }
.answer-box p + p { margin-top: 0.65rem; }
.answer-box .ab-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 0.5rem;
}

/* ── at a glance ──────────────────────────────────────────────────── */

.at-a-glance {
  border: 1px solid rgba(26, 31, 46, 0.12);
  border-radius: 0.75rem;
  background: var(--off-white);
  padding: 0.4rem 1.4rem 1.1rem;
  margin-top: 1.9rem;
}
.at-a-glance .aag-h {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--navy);
  padding: 0.95rem 0 0.3rem;
}
.at-a-glance dl { margin: 0; }
.at-a-glance dt {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(26, 31, 46, 0.5);
  padding-top: 0.9rem;
  border-top: 1px dashed rgba(26, 31, 46, 0.15);
  margin-top: 0.85rem;
}
.at-a-glance dd {
  margin: 0.3rem 0 0;
  font-size: 0.98rem;
  color: var(--navy);
}

/* ── tables ───────────────────────────────────────────────────────── */

.ins-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid rgba(26, 31, 46, 0.12);
  border-radius: 0.75rem;
  margin-top: 1.85rem;
}
.ins-table { width: 100%; min-width: 420px; border-collapse: collapse; font-size: 0.93rem; }
.ins-table caption {
  caption-side: top;
  text-align: left;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(26, 31, 46, 0.5);
  padding: 0.85rem 1rem 0.55rem;
}
.ins-table th, .ins-table td {
  padding: 0.7rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(26, 31, 46, 0.1);
  vertical-align: top;
}
.ins-table thead th { background: var(--cream); font-weight: 700; font-size: 0.82rem; color: var(--navy); }
.ins-table tbody tr:last-child td { border-bottom: 0; }
.ins-table tbody tr:nth-child(even) td { background: rgba(245, 240, 232, 0.5); }
.ins-table td.fig, .ins-table th.fig { font-weight: 700; white-space: nowrap; color: var(--navy); }
.ins-table tfoot td { background: var(--cream); font-weight: 700; color: var(--navy); }

/* ── lists ────────────────────────────────────────────────────────── */

.ins-list { list-style: none; margin-top: 1.4rem; padding: 0; }
.ins-list li { position: relative; padding-left: 1.6rem; margin-top: 0.75rem; font-size: 1rem; line-height: 1.58; }
.ins-list li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 0.55rem;
  width: 6px;
  height: 6px;
  border-radius: 1px;
  background: var(--gold);
}

/* ── callouts ─────────────────────────────────────────────────────── */

.ins-note, .ins-warn {
  border-radius: 0.75rem;
  padding: 1.05rem 1.35rem;
  margin-top: 1.85rem;
  font-size: 0.96rem;
  line-height: 1.58;
}
.ins-note { background: var(--off-white); border: 1px solid rgba(26, 31, 46, 0.12); border-left: 3px solid rgba(26, 31, 46, 0.35); color: rgba(26, 31, 46, 0.78); }
.ins-warn { background: #fbf0d6; border: 1px solid rgba(138, 100, 8, 0.28); border-left: 3px solid #8a6408; color: #5c4806; }
.ins-note .n-label, .ins-warn .n-label {
  display: block;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
  opacity: 0.85;
}
.ins-note p, .ins-warn p { margin: 0; }
.ins-note p + p, .ins-warn p + p { margin-top: 0.55rem; }

/* ── key points ───────────────────────────────────────────────────── */

.key-points {
  background: var(--navy);
  border-radius: 0.75rem;
  padding: 1.6rem 1.75rem;
  margin-top: 2.5rem;
  color: rgba(245, 240, 232, 0.85);
}
.key-points .kp-h { font-weight: 700; font-size: 1.02rem; color: var(--white); margin-bottom: 0.85rem; }
.key-points ul { list-style: none; margin: 0; padding: 0; }
.key-points li { position: relative; padding-left: 1.55rem; margin-top: 0.65rem; font-size: 0.96rem; line-height: 1.55; }
.key-points li::before {
  content: "";
  position: absolute;
  left: 0.1rem;
  top: 0.5rem;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
}
.key-points strong { color: var(--white); }

/* ── real-photo figures (wraps .detail-shot for a single wide figure) ── */

.ins-fig { margin-top: 2rem; }
.ins-fig .detail-shot img { height: clamp(200px, 32vw, 340px); }

/* ── FAQ (native details/summary, matching the site's own pattern) ──── */

.ins-faqs { margin-top: 1.6rem; }
.ins-faq { border-bottom: 1px solid rgba(26, 31, 46, 0.12); }
.ins-faq summary {
  cursor: pointer;
  list-style: none;
  padding: 1.05rem 2rem 1.05rem 0;
  position: relative;
  font-weight: 650;
  font-size: 1.02rem;
  color: var(--navy);
}
.ins-faq summary::-webkit-details-marker { display: none; }
.ins-faq summary::after {
  content: "";
  position: absolute;
  right: 0.35rem;
  top: 1.4rem;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--gold-dark);
  border-bottom: 2px solid var(--gold-dark);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}
.ins-faq[open] summary::after { transform: rotate(-135deg); top: 1.55rem; }
.ins-faq summary:hover { color: var(--gold-dark); }
.ins-faq .faq-a { padding: 0 0 1.15rem; font-size: 0.97rem; line-height: 1.62; color: rgba(26, 31, 46, 0.72); }
.ins-faq .faq-a p { margin: 0; }
.ins-faq .faq-a p + p { margin-top: 0.6rem; }

/* ── closing CTA ──────────────────────────────────────────────────── */

.ins-cta {
  margin-top: 2.6rem;
  border-radius: 1rem;
  background: linear-gradient(140deg, var(--navy) 0%, var(--navy-light) 100%);
  padding: clamp(1.6rem, 4vw, 2.4rem);
  color: rgba(245, 240, 232, 0.85);
}
.ins-cta h2 { color: var(--white) !important; margin: 0 0 0.55rem !important; font-size: clamp(1.3rem, 3vw, 1.6rem); }
.ins-cta p { margin: 0 0 1.2rem; font-size: 1rem; line-height: 1.58; max-width: 52ch; }
.ins-cta-btns { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* ══════════════════════════════════════════════════════════════════
   INSIGHTS HUB (insights.html)
   ══════════════════════════════════════════════════════════════════ */

.ins-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.6rem; }
.ins-filters .filter {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--navy);
  background: var(--white);
  border: 1px solid rgba(26, 31, 46, 0.15);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.ins-filters .filter:hover { border-color: var(--gold); color: var(--gold-dark); }
.ins-filters .filter.active { color: var(--white); background: var(--navy); border-color: var(--navy); }

.ins-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1.5rem; margin-top: 2.2rem; }
.ins-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid rgba(26, 31, 46, 0.1);
  border-radius: 0.75rem;
  overflow: hidden;
  text-decoration: none;
  transition: transform 0.25s var(--ease-smooth), box-shadow 0.25s var(--ease-smooth), border-color 0.25s var(--ease-smooth);
}
.ins-card:hover { transform: translateY(-4px); border-color: rgba(212, 160, 60, 0.4); box-shadow: 0 16px 36px rgba(26, 31, 46, 0.12); }
.ins-card .thumb { aspect-ratio: 16/10; overflow: hidden; background: var(--cream); }
.ins-card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ins-card__body { padding: 1.1rem 1.25rem 1.35rem; display: flex; flex-direction: column; flex: 1; }
.ins-card .ic-cat { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--gold-dark); }
.ins-card h3 { font-size: 1.08rem; line-height: 1.3; color: var(--navy); margin: 0.5rem 0 0.45rem; }
.ins-card p { font-size: 0.88rem; line-height: 1.5; color: rgba(26, 31, 46, 0.65); margin: 0 0 0.9rem; }
.ins-card .ic-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; font-size: 0.73rem; color: rgba(26, 31, 46, 0.5); }
.ins-card .ic-read { color: var(--gold-dark); font-weight: 650; }
.ins-empty { grid-column: 1/-1; padding: 2.2rem 0; text-align: center; color: rgba(26, 31, 46, 0.55); font-size: 0.94rem; }

/* ── responsive ───────────────────────────────────────────────────── */

@media (max-width: 640px) {
  .ins-body { font-size: 1rem; }
  .answer-box { padding: 1.05rem; }
  .at-a-glance { padding: 0.3rem 1.05rem 0.95rem; }
  .key-points { padding: 1.35rem 1.2rem; }
  .ins-grid { grid-template-columns: 1fr; }
}
