/* public/resources/assets/resources.css
   Shared stylesheet for the /resources section.
   Design tokens copied from the main site (index.html) so branding matches exactly. */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy: #1B2E4B; --navy-deep: #132240; --gold: #C9A84C; --gold-light: #E8C96A;
  --white: #FFFFFF; --off-white: #F4F6F9; --gray: #4A5568; --gray-light: #8A9BB0; --line: #D8E0EA;
  --shadow-soft: 0 18px 45px rgba(19,34,64,0.12); --shadow-medium: 0 24px 60px rgba(19,34,64,0.18);
  --shadow-gold: 0 14px 35px rgba(201,168,76,0.22); --radius-lg: 22px; --radius-md: 16px; --radius-sm: 12px;
}

html { scroll-behavior: smooth; }
body { font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,sans-serif; color: var(--navy); background: var(--off-white); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; display: block; }

/* ---------- nav (matches main site) ---------- */
nav { position: fixed; top: 0; left: 0; right: 0; background: rgba(19,34,64,0.88); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); z-index: 100; padding: 0 32px; height: 72px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(255,255,255,0.08); box-shadow: 0 8px 30px rgba(0,0,0,0.14); }
.nav-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.nav-logo img { width: 42px; height: 42px; border-radius: 11px; box-shadow: 0 6px 18px rgba(0,0,0,0.24); }
.nav-logo-text { font-size: 15px; font-weight: 800; color: var(--white); letter-spacing: -0.015em; }
.nav-logo-text span { color: var(--gold); }
.nav-actions { display: flex; align-items: center; gap: 18px; }
.nav-link { color: rgba(255,255,255,0.78); text-decoration: none; font-size: 13.5px; font-weight: 600; transition: color 0.2s ease; }
.nav-link:hover { color: var(--gold-light); }
.btn-ghost { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.22); color: var(--white); padding: 8px 17px; border-radius: 999px; font-size: 13.5px; font-weight: 600; cursor: pointer; text-decoration: none; transition: all 0.22s ease; }
.btn-ghost:hover { border-color: rgba(201,168,76,0.8); color: var(--gold); background: rgba(201,168,76,0.08); transform: translateY(-1px); }
.btn-gold { background: linear-gradient(135deg,var(--gold),var(--gold-light)); border: 1px solid rgba(255,255,255,0.15); color: var(--navy-deep); padding: 9px 20px; border-radius: 999px; font-size: 13.5px; font-weight: 800; cursor: pointer; text-decoration: none; transition: all 0.22s ease; box-shadow: 0 8px 20px rgba(201,168,76,0.24); }
.btn-gold:hover { background: linear-gradient(135deg,var(--gold-light),var(--gold)); transform: translateY(-1px); box-shadow: 0 12px 26px rgba(201,168,76,0.34); }
.btn-hero { background: linear-gradient(135deg,var(--gold),var(--gold-light)); color: var(--navy); opacity: 1; border: 1px solid rgba(255,255,255,0.24); padding: 15px 34px; border-radius: 999px; font-size: 16px; font-weight: 800; cursor: pointer; text-decoration: none; transition: all 0.24s ease; display: inline-block; box-shadow: var(--shadow-gold); }
.btn-hero:hover { background: linear-gradient(135deg,var(--gold-light),var(--gold)); transform: translateY(-2px); box-shadow: 0 20px 44px rgba(201,168,76,0.30); color: var(--navy); opacity: 1; }
.btn-hero:focus, .btn-hero:active, .btn-hero:visited { color: var(--navy); opacity: 1; }

/* The pre-References CTA is manuscript content rendered inside .res-article-body,
   so it also matches `.res-article-body a` (gold text, underline) below -- and
   that selector's higher specificity (.class .element) was beating .btn-hero
   (.class alone), producing unreadable gold-on-gold text. Hover/focus/active
   states already carry higher specificity than `.res-article-body a` and were
   unaffected; only the resting state needed this scoped correction. */
.res-article-body .btn-hero { color: var(--navy); opacity: 1; text-decoration: none; }

/* ---------- shared section styles ---------- */
.section-eyebrow { font-size: 11px; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); margin-bottom: 16px; }

/* ---------- resources hero ---------- */
.res-main { max-width: 1080px; margin: 0 auto; padding: 152px 24px 100px; }
.res-hero { text-align: center; margin-bottom: 56px; }
.res-hero h1 { font-family: Georgia,"Iowan Old Style","Palatino Linotype",serif; font-size: clamp(30px,4.4vw,50px); font-weight: 700; color: var(--navy); line-height: 1.12; max-width: 760px; margin: 0 auto 18px; letter-spacing: -0.03em; }
.res-hero-sub { font-size: 16.5px; color: var(--gray); max-width: 620px; margin: 0 auto 32px; line-height: 1.72; }
.res-hero-sub-page { text-align: left; }
.res-hero-sub-page h1, .res-hero-sub-page .res-hero-sub { margin-left: 0; text-align: left; }

/* ---------- breadcrumb ---------- */
/* The breadcrumb is itself a <nav> element (for accessibility), which means
   it also matches the bare `nav { ... }` selector above (the fixed, dark,
   72px site header bar) since that selector isn't scoped to a class. Every
   property below that repeats one set by `nav` is an intentional override
   to fully detach the breadcrumb from that fixed dark bar. */
.breadcrumb {
  position: static;
  top: auto; left: auto; right: auto;
  z-index: auto;
  height: auto;
  background: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: none;
  box-shadow: none;
  padding: 0;
  justify-content: flex-start;
  font-size: 12.5px; color: var(--gray-light); margin-bottom: 18px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
}
.breadcrumb a { color: var(--gray); text-decoration: none; }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb span[aria-current] { color: var(--navy); font-weight: 700; overflow-wrap: anywhere; min-width: 0; }
.crumb-sep { color: var(--gray-light); }

/* ---------- search ---------- */
.search-wrap { max-width: 480px; margin: 0 auto 22px; }
.res-hero-sub-page .search-wrap { margin-left: 0; }
.search-input { width: 100%; padding: 13px 20px; border-radius: 999px; border: 1px solid var(--line); background: var(--white); font-size: 14.5px; color: var(--navy); box-shadow: var(--shadow-soft); }
.search-input:focus { outline: none; border-color: var(--gold); }

/* ---------- category chips ---------- */
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.res-hero-sub-page .chip-row { justify-content: flex-start; }
.chip { display: inline-block; padding: 8px 18px; border-radius: 999px; background: var(--white); border: 1px solid var(--line); color: var(--gray); font-size: 13px; font-weight: 700; text-decoration: none; transition: all 0.2s ease; }
.chip:hover { border-color: var(--gold); color: var(--navy); }
.chip-active { background: var(--navy); border-color: var(--navy); color: var(--white); }

/* ---------- content / grid ---------- */
.res-content { min-height: 200px; }
.res-empty { text-align: center; padding: 70px 24px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-soft); }
.res-empty h2 { font-family: Georgia,serif; font-size: 22px; color: var(--navy); margin-bottom: 10px; }
.res-empty p { color: var(--gray); font-size: 14.5px; }
.res-empty p a { color: var(--gold); font-weight: 700; text-decoration: none; }

.res-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(280px,1fr)); gap: 24px; }

.res-card { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; text-decoration: none; box-shadow: var(--shadow-soft); transition: transform 0.22s ease, box-shadow 0.22s ease; }
.res-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-medium); }
.res-card-img-wrap { height: 190px; background-color: var(--off-white); overflow: hidden; }
.res-card-img { width: 100%; height: 100%; object-fit: contain; object-position: center; display: block; }
.res-card-body { padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 8px; }
.res-card-cat { font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.res-card-body h3 { font-family: Georgia,serif; font-size: 18px; color: var(--navy); line-height: 1.32; }
.res-card-body p { font-size: 13.8px; color: var(--gray); line-height: 1.6; }
.res-card-meta { font-size: 12px; color: var(--gray-light); display: flex; gap: 6px; margin-top: 4px; }

/* ---------- featured ---------- */
.res-featured { display: block; background: linear-gradient(180deg,var(--navy) 0%,var(--navy-deep) 100%); border-radius: var(--radius-lg); overflow: hidden; text-decoration: none; box-shadow: var(--shadow-medium); margin-bottom: 40px; }
.res-featured-img-wrap { width: 100%; background: rgba(0,0,0,0.18); display: flex; align-items: center; justify-content: center; }
.res-featured-img { display: block; width: 100%; height: auto; max-height: 280px; object-fit: contain; }
.res-featured-body { padding: 34px 40px 40px; display: flex; flex-direction: column; gap: 12px; }
.res-featured-label { font-size: 11px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-light); }
.res-featured-body h2 { font-family: Georgia,serif; font-size: clamp(22px,2.6vw,30px); color: var(--white); line-height: 1.22; }
.res-featured-body p { font-size: 14.5px; color: rgba(255,255,255,0.72); line-height: 1.68; }
.res-featured-body .res-card-meta { color: rgba(255,255,255,0.5); }

/* ---------- article page ---------- */
.res-article-main { max-width: 760px; }
.res-article-header h1 { font-family: Georgia,serif; font-size: clamp(28px,4vw,42px); color: var(--navy); line-height: 1.18; margin: 10px 0 16px; letter-spacing: -0.025em; }
.res-article-hero { width: 100%; height: 320px; background-size: cover; background-position: center; border-radius: var(--radius-lg); margin: 32px 0; box-shadow: var(--shadow-soft); }
.res-article-body { font-size: 17px; line-height: 1.85; color: var(--navy); }
.res-article-body h2 { font-family: Georgia,serif; font-size: 24px; margin: 36px 0 14px; color: var(--navy); }
.res-article-body h3 { font-family: Georgia,serif; font-size: 19px; margin: 28px 0 12px; color: var(--navy); }
.res-article-body p { margin-bottom: 18px; color: var(--gray); }
.res-article-body ul, .res-article-body ol { margin: 0 0 18px 22px; color: var(--gray); }
.res-article-body li { margin-bottom: 8px; line-height: 1.7; }
.res-article-body a { color: var(--gold); font-weight: 700; text-decoration: underline; text-decoration-color: rgba(201,168,76,0.4); }
.res-article-body blockquote { border-left: 4px solid var(--gold); padding: 4px 0 4px 20px; margin: 24px 0; color: var(--navy); font-style: italic; }
.res-article-body h2[id], .res-article-body h3[id] { scroll-margin-top: 92px; }

/* ---------- long-form guide components (callouts, checklist, comparison, FAQ, sources, TOC) ---------- */

.guide-toc { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 22px 26px; margin: 28px 0; box-shadow: var(--shadow-soft); }
.guide-toc-label { display: block; font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); margin-bottom: 10px; }
.guide-toc ol { margin: 0; padding-left: 20px; columns: 1; }
.guide-toc li { margin-bottom: 6px; line-height: 1.5; }
.guide-toc a { color: var(--navy); font-weight: 600; text-decoration: none; }
.guide-toc a:hover { color: var(--gold); text-decoration: underline; }

.callout { border-radius: var(--radius-md); padding: 22px 26px; margin: 28px 0; border-left: 4px solid var(--gold); background: var(--off-white); }
.callout-label { display: block; font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 8px; }
.callout p { color: var(--gray); margin-bottom: 0; }

.callout-reader-promise { border-left-color: var(--gold); background: rgba(201,168,76,0.09); }
.callout-reader-promise .callout-label { color: #9c7a2e; }

.callout-how-to-use { border-left-color: var(--navy); background: rgba(27,46,75,0.05); }
.callout-how-to-use .callout-label { color: var(--navy); }

.callout-coach-insight { border-left-color: #2A6049; background: rgba(42,96,73,0.07); }
.callout-coach-insight .callout-label { color: #2A6049; }

.callout-important { border-left-color: #A6573F; background: rgba(166,87,63,0.07); }
.callout-important .callout-label { color: #A6573F; }

.callout-key-takeaway { border-left-color: var(--navy); background: rgba(27,46,75,0.06); }
.callout-key-takeaway .callout-label { color: var(--navy); }

.callout-official-guidance { border-left-color: #A6573F; background: rgba(166,87,63,0.08); }
.callout-official-guidance .callout-label { color: #A6573F; }

.callout-living-document { border-left-color: var(--gray-light); background: var(--off-white); padding: 16px 22px; }
.callout-living-document .callout-label { color: var(--gray-light); font-size: 10px; }
.callout-living-document p { font-size: 13px; color: var(--gray); }

.callout-central-principle, .callout-remember { border-left: none; background: linear-gradient(180deg,var(--navy) 0%,var(--navy-deep) 100%); box-shadow: var(--shadow-medium); padding: 28px 30px; }
.callout-central-principle .callout-label, .callout-remember .callout-label { color: var(--gold-light); }
.callout-central-principle p, .callout-remember p { color: rgba(255,255,255,0.9); font-size: 17px; line-height: 1.7; }

.guide-checklist-group { margin: 20px 0 28px; }
.guide-checklist-group h3 { margin-top: 0 !important; }
.guide-checklist { list-style: none; margin: 0; padding: 0; }
.guide-checklist li { margin-bottom: 10px; }
.guide-checklist label { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.guide-checklist input[type="checkbox"] { margin-top: 5px; width: 16px; height: 16px; accent-color: var(--gold); flex-shrink: 0; }
.guide-checklist span { color: var(--gray); line-height: 1.65; }

.guide-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 24px 0; }
.guide-compare-col { border-radius: var(--radius-md); padding: 22px 24px; border: 1px solid var(--line); background: var(--white); }
.guide-compare-label { display: block; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 10px; }
.guide-compare-weak { border-top: 4px solid #A6573F; }
.guide-compare-weak .guide-compare-label { color: #A6573F; }
.guide-compare-strong { border-top: 4px solid #2A6049; }
.guide-compare-strong .guide-compare-label { color: #2A6049; }
.guide-compare-col p { color: var(--gray); font-size: 14.5px; line-height: 1.7; margin: 0; }

.guide-faq { margin: 20px 0; }
.guide-faq-item { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 20px; margin-bottom: 12px; background: var(--white); }
.guide-faq-item summary { font-weight: 800; color: var(--navy); cursor: pointer; font-size: 15px; }
.guide-faq-item summary::marker { color: var(--gold); }
.guide-faq-item p { margin: 10px 0 0; color: var(--gray); }

.guide-sources { list-style: none; padding: 0; margin: 0 0 18px; }
.guide-sources li { padding: 14px 0; border-bottom: 1px solid var(--line); color: var(--gray); line-height: 1.7; }
.guide-sources li:last-child { border-bottom: none; }

.guide-coming-soon { display: inline-block; background: var(--off-white); border: 1px solid var(--line); color: var(--gray); font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; margin-left: 6px; vertical-align: middle; }

.res-article-cta { margin-top: 56px; padding: 44px 40px; text-align: center; background: radial-gradient(circle at top,rgba(201,168,76,0.14) 0%,transparent 52%), linear-gradient(180deg,var(--navy) 0%,var(--navy-deep) 100%); border-radius: var(--radius-lg); box-shadow: var(--shadow-medium); }
.res-article-cta h2 { font-family: Georgia,serif; color: var(--white); font-size: 24px; margin-bottom: 10px; }
.res-article-cta p { color: rgba(255,255,255,0.7); font-size: 14.5px; margin-bottom: 24px; }

.res-related { margin-top: 60px; }
.res-related h2 { font-family: Georgia,serif; font-size: 22px; color: var(--navy); margin-bottom: 22px; }

/* ---------- footer (matches main site) ---------- */
.res-footer { background: var(--navy-deep); padding: 36px 24px; text-align: center; border-top: 1px solid rgba(255,255,255,0.07); margin-top: 40px; }
.res-footer p { font-size: 13px; color: rgba(255,255,255,0.38); }
.res-footer a { color: rgba(255,255,255,0.56); text-decoration: none; margin: 0 10px; transition: color 0.2s ease; }
.res-footer a:hover { color: var(--gold-light); }

/* ---------- responsive ---------- */
@media (max-width: 760px) {
  nav { padding: 0 16px; height: 66px; }
  .nav-logo img { width: 38px; height: 38px; }
  .nav-logo-text { display: none; }
  .nav-actions { gap: 10px; }
  .nav-link { display: none; }
  .btn-ghost, .btn-gold { font-size: 12.5px; padding: 8px 13px; }
  .res-main { padding: 100px 18px 72px; }
  .res-featured-img { max-height: 180px; }
  .res-featured-body { padding: 24px 26px 28px; }
  .res-article-hero { height: 220px; }
  .res-footer a { display: inline-block; margin: 5px 8px; }
  .guide-compare { grid-template-columns: 1fr; }
  .callout, .callout-central-principle, .callout-remember { padding: 20px 20px; }

  /* Hide the (often long) current-page breadcrumb label on narrow screens;
     the full title is already shown in the H1 directly below. Hide its
     preceding separator too so the trail doesn't end with a dangling "/". */
  .res-article-header .breadcrumb > *:last-child,
  .res-article-header .breadcrumb > *:nth-last-child(2) {
    display: none;
  }

  /* Stack the byline (author / date / reading time) instead of letting it
     wrap into orphaned "·" separators on narrow screens. */
  .res-article-header .res-card-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .res-article-header .res-card-meta > span:nth-child(2),
  .res-article-header .res-card-meta > span:nth-child(4) {
    display: none;
  }
}

@media (max-width: 420px) {
  .btn-gold { display: none; }
}
