/* ─── Resources section (/resources/) ───
   Page-scoped styles for the generated hub + piece pages.
   Versioned via ?v= in the templates (bump CSSV in build-resources.mjs). */

/* hub hero */
.rc-hub-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
  color: var(--white);
  padding: 4rem 0 3.5rem;
}
.rc-hub-hero h1 { color: var(--white); margin: 0.5rem 0 1rem; }
.rc-hub-hero p { max-width: 720px; color: rgba(255, 255, 255, 0.85); font-size: 1.1rem; }
.rc-hub-eyebrow {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #F5B583;
}

.rc-hub-body { padding: 2.5rem 1.5rem 4rem; }

/* audience filter chips */
.rc-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 2.5rem;
}
.rc-filters-label {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-right: 0.25rem;
}
.rc-filter {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--gray-200);
  background: var(--white);
  color: var(--gray-700);
  cursor: pointer;
  transition: all var(--transition);
}
.rc-filter:hover { border-color: var(--navy); color: var(--navy); }
.rc-filter[aria-pressed="true"] {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}
.rc-filter-empty { color: var(--gray-700); font-style: italic; margin: 2rem 0; }

/* hub sections + card grid */
.rc-hub-section { margin-bottom: 3rem; }
.rc-hub-section h2 { margin-bottom: 0.25rem; }
.rc-section-blurb { color: #4B5563; margin-bottom: 1.5rem; }
.rc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.rc-card {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  color: var(--gray-800);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  transition: all var(--transition);
}
.rc-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--navy);
}
/* the audience filter hides cards via the hidden attribute; display:flex above
   would silently override it (author styles beat the UA [hidden] rule) */
.rc-card[hidden] { display: none; }
.rc-card h3 { font-size: 1.1rem; line-height: 1.35; }
.rc-card p { font-size: 0.92rem; color: #4B5563; flex-grow: 1; }
.rc-card-meta { font-size: 0.8rem; color: #6B7280; }

/* type badges + audience chips */
.rc-badge {
  align-self: flex-start;
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
}
.rc-badge-article { background: #E8F1FB; color: var(--navy); }
.rc-badge-guide { background: #FDEBDC; color: #B4591A; }
.rc-badge-video { background: var(--navy-darker); color: var(--white); }
.rc-chip {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: var(--gray-100);
  color: var(--gray-700);
  margin-left: 0.35rem;
}

/* ─── piece pages ─── */
.rc-narrow { max-width: 800px; }
.rc-article-head {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
  padding: 3rem 0 2.5rem;
}
.rc-article-head h1 {
  color: var(--white);
  font-size: clamp(1.7rem, 3.5vw, 2.5rem);
  margin: 0.9rem 0 1.1rem;
}
.rc-article-head .rc-chip { background: rgba(255, 255, 255, 0.14); color: rgba(255, 255, 255, 0.9); }
.rc-breadcrumb { font-size: 0.85rem; color: rgba(255, 255, 255, 0.6); margin-bottom: 1.25rem; }
.rc-breadcrumb a { color: rgba(255, 255, 255, 0.8); }
.rc-byline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem 0.6rem;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.92rem;
}
.rc-byline time { white-space: nowrap; }
.rc-byline strong { color: var(--white); }
.rc-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--orange);
  color: var(--white);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.rc-avatar-lg { width: 52px; height: 52px; font-size: 1.05rem; }

.rc-hero-img { border-radius: var(--radius-lg); margin: 2rem 0 0; }
.rc-video {
  position: relative;
  padding-top: 56.25%;
  margin: 2rem 0 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--navy-darker);
}
.rc-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* body typography (global reset strips list bullets; restore here) */
.rc-body { padding: 2.5rem 0 1rem; font-size: 1.05rem; }
.rc-body p { margin-bottom: 1.35rem; }
.rc-body h2 {
  font-size: 1.55rem;
  margin: 2.4rem 0 1rem;
}
.rc-body h3 { font-size: 1.2rem; margin: 1.8rem 0 0.75rem; }
.rc-body ul, .rc-body ol { margin: 0 0 1.35rem 1.4rem; }
.rc-body ul { list-style: disc; }
.rc-body ol { list-style: decimal; }
.rc-body li { margin-bottom: 0.5rem; }
.rc-body blockquote {
  border-left: 4px solid var(--orange);
  padding: 0.35rem 0 0.35rem 1.25rem;
  margin: 0 0 1.35rem;
  color: #4B5563;
  font-style: italic;
}
.rc-body code {
  background: var(--gray-100);
  border-radius: 4px;
  padding: 0.1rem 0.4rem;
  font-size: 0.9em;
}
.rc-body pre {
  background: var(--navy-darker);
  color: #E8F1FB;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  margin-bottom: 1.35rem;
}
.rc-body pre code { background: none; padding: 0; color: inherit; }
.rc-body img { border-radius: 8px; margin: 0 auto; }
.rc-body table { display: block; overflow-x: auto; margin-bottom: 1.35rem; border-collapse: collapse; }
.rc-body th, .rc-body td { border: 1px solid var(--gray-200); padding: 0.5rem 0.85rem; text-align: left; }

.rc-figure {
  margin: 2rem 0;
  padding: 1.25rem 1.25rem 0.85rem;
  background: #F9FAFB;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
}
.rc-figure svg { display: block; width: 100%; height: auto; }
.rc-figure figcaption {
  font-size: 0.85rem;
  color: #6B7280;
  margin-top: 0.75rem;
  text-align: center;
}

/* author box */
.rc-author {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: #F9FAFB;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin: 1.5rem 0 3rem;
}
.rc-author strong { font-family: var(--font-heading); color: var(--navy); }
.rc-author p { font-size: 0.92rem; color: #4B5563; margin-top: 0.35rem; }

/* related */
.rc-related { padding: 3.5rem 0 4.5rem; background: #F9FAFB; }
.rc-related .section-label { margin-bottom: 1.25rem; }

/* hub empty state (pre-content soft launch) */
.rc-hub-empty {
  background: var(--white);
  border: 1px dashed var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  max-width: 680px;
}
.rc-hub-empty h2 { font-size: 1.3rem; margin-bottom: 0.75rem; }
.rc-hub-empty p { color: #4B5563; }

/* Nav density for resource pages only: their nav carries the extra Resources
   item before the rest of the site does, so the hamburger takes over through
   tablet and 1025-1220px tightens. (This stylesheet only loads on /resources/
   pages; the sitewide copy lands with the full nav rollout.) */
@media (min-width: 769px) and (max-width: 1024px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 1.5rem;
    gap: 0;
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow-md);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.75rem 0; }
  .nav-links .btn { margin-top: 0.5rem; }
  .mobile-toggle { display: block; }
}
@media (min-width: 1025px) {
  .nav-links { gap: 1.5rem; }
  .nav-links a { white-space: nowrap; }
}
@media (min-width: 1025px) and (max-width: 1220px) {
  .nav-links { gap: 1.15rem; }
  .nav-links a { font-size: 0.85rem; }
}

/* ─── interactive widgets (self-assessments, calculators) ───
   Rendered from raw HTML blocks inside piece markdown. No external JS;
   each widget ships a small inline script in the same block. */
.rc-widget {
  margin: 2rem 0;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-top: 4px solid var(--orange);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}
.rc-widget-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--navy);
  margin: 0 0 0.35rem;
}
.rc-widget-sub { font-size: 0.9rem; color: #6B7280; margin: 0 0 1.1rem; }

/* checklist self-assessment */
.rc-quiz-item {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  padding: 0.55rem 0.6rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background var(--transition);
  margin: 0;
}
.rc-quiz-item:hover { background: var(--gray-50); }
.rc-quiz-item input {
  width: 18px;
  height: 18px;
  margin-top: 0.2rem;
  accent-color: var(--orange);
  flex-shrink: 0;
  cursor: pointer;
}
.rc-quiz-item span { font-size: 0.98rem; }
.rc-verdict {
  margin-top: 1.1rem;
  padding: 1rem 1.15rem;
  border-radius: 8px;
  background: var(--blue-pale);
  border: 1px solid var(--blue-light);
  font-size: 0.98rem;
}
.rc-verdict strong { font-family: var(--font-heading); color: var(--navy); }
.rc-verdict[data-level="high"] { background: var(--orange-light); border-color: #F5CBA3; }

/* calculator */
.rc-calc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 0.5rem;
}
.rc-calc-field { display: flex; flex-direction: column; gap: 0.3rem; }
.rc-calc-field label {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gray-700);
}
.rc-calc-field input {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  width: 100%;
}
.rc-calc-field input:focus { outline: 2px solid var(--navy); outline-offset: 1px; border-color: var(--navy); }
.rc-calc-result {
  margin-top: 0.75rem;
  padding: 1rem 1.15rem;
  border-radius: 8px;
  background: var(--navy);
  color: var(--white);
  font-size: 0.98rem;
}
.rc-calc-result strong {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  color: #F5B583;
  display: block;
  margin-bottom: 0.15rem;
}
.rc-calc-note { font-size: 0.8rem; color: #6B7280; margin-top: 0.6rem; }

/* responsive */
@media (max-width: 1024px) {
  .rc-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
  .rc-grid { grid-template-columns: 1fr; }
  .rc-hub-hero { padding: 3rem 0 2.5rem; }
  .rc-body { font-size: 1rem; }
  .rc-figure { padding: 0.85rem 0.85rem 0.65rem; }
  .rc-author { flex-direction: column; }
  .rc-calc-grid { grid-template-columns: 1fr; }
}

/* realistic email artifact (story pieces; sits inside .rc-figure) */
.rc-email {
  background: var(--white);
  border: 1px solid #D5DDE5;
  border-radius: 10px;
  box-shadow: 0 10px 26px rgba(31, 41, 55, 0.10);
  font-family: "Segoe UI", "Open Sans", system-ui, sans-serif;
  overflow: hidden;
  text-align: left;
}
.rc-email-subject {
  padding: 0.95rem 1.15rem 0.1rem;
  font-size: 1.05rem;
  font-weight: 650;
  color: #1F2937;
}
.rc-email-head {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 1.15rem 0.75rem;
  border-bottom: 1px solid #E7ECF1;
}
.rc-email-avatar {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rc-email-avatar-you { background: var(--orange); }
.rc-email-who { min-width: 0; }
.rc-email-who strong { display: block; color: #1F2937; font-size: 0.95rem; }
.rc-email-who span {
  display: block;
  color: #6B7280;
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rc-email-time { margin-left: auto; color: #6B7280; font-size: 0.8rem; white-space: nowrap; align-self: flex-start; padding-top: 0.2rem; }
.rc-email-body { padding: 0.95rem 1.15rem 0.35rem; color: #1F2937; font-size: 0.95rem; line-height: 1.55; }
.rc-email-body p { margin: 0 0 0.75rem; }
.rc-email-body ol, .rc-email-body ul { margin: 0 0 0.75rem 1.3rem; padding: 0; }
.rc-email-body li { margin-bottom: 0.25rem; }
.rc-email-actions {
  display: flex;
  gap: 1.5rem;
  padding: 0.6rem 1.15rem 0.8rem;
  border-top: 1px solid #E7ECF1;
  color: #5B6B7C;
  font-size: 0.82rem;
  font-weight: 600;
}
@media (max-width: 700px) {
  .rc-email-time { font-size: 0.72rem; }
  .rc-email-subject { font-size: 0.98rem; }
}

/* realistic file listing — "which one of these is true?" (sits inside .rc-figure) */
.rc-files {
  background: var(--white);
  border: 1px solid #D5DDE5;
  border-radius: 10px;
  box-shadow: 0 10px 26px rgba(31, 41, 55, 0.10);
  font-family: "Segoe UI", "Open Sans", system-ui, sans-serif;
  overflow: hidden;
  text-align: left;
}
.rc-files-bar {
  background: #F1F4F7;
  border-bottom: 1px solid #E1E7ED;
  padding: 0.5rem 0.9rem;
  font-size: 0.82rem;
  color: #5B6B7C;
  font-weight: 600;
}
.rc-files-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.9rem;
  align-items: center;
  padding: 0.55rem 0.9rem;
  border-bottom: 1px solid #EEF2F6;
  font-size: 0.9rem;
  color: #1F2937;
}
.rc-files-row:last-child { border-bottom: 0; }
.rc-files-head {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #8A97A6;
  font-weight: 700;
  background: #FAFBFC;
}
.rc-files-name { display: flex; align-items: center; gap: 0.55rem; min-width: 0; }
.rc-files-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-files-icon {
  flex: none;
  width: 18px;
  height: 18px;
  border-radius: 3px;
  background: #1D7044;
  color: var(--white);
  font-size: 0.6rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rc-files-meta { color: #6B7280; font-size: 0.82rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rc-files-flag { background: #FFF8EC; }
@media (max-width: 700px) {
  .rc-files-row { grid-template-columns: 1fr auto; gap: 0.5rem; font-size: 0.82rem; }
  .rc-files-by { display: none; }
}

/* then/now spreadsheet compare — "it grew past what it was built for" */
.rc-sheets { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.rc-sheet {
  background: var(--white);
  border: 1px solid #D5DDE5;
  border-radius: 8px;
  overflow: hidden;
}
.rc-sheet-cap {
  padding: 0.5rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--white);
  background: var(--navy);
}
.rc-sheet-now .rc-sheet-cap { background: var(--orange); }
.rc-sheet-head {
  height: 13px;
  background-color: #EDF1F5;
  background-image: linear-gradient(to right, #DCE3EA 1px, transparent 1px);
  background-size: 28px 100%;
  border-bottom: 1px solid #CFD8E2;
}
.rc-sheet-now .rc-sheet-head { background-size: 9px 100%; }
.rc-sheet-grid {
  position: relative;
  height: 104px;
  background-color: var(--white);
  background-image:
    linear-gradient(to right, #E6ECF2 1px, transparent 1px),
    linear-gradient(to bottom, #E6ECF2 1px, transparent 1px);
  background-size: 28px 21px;
  border-bottom: 1px solid #E6ECF2;
}
.rc-sheet-now .rc-sheet-grid { background-size: 9px 8px; }
/* translucent so the grid lines show through: reads as filled cells, not a bar */
.rc-sheet-fill { position: absolute; background: rgba(0, 78, 137, 0.16); }
.rc-sheet-hot { position: absolute; background: rgba(224, 123, 46, 0.42); }
.rc-sheet-tabs { display: flex; gap: 2px; padding: 0.4rem 0.5rem; background: #F6F8FA; overflow: hidden; }
.rc-sheet-tab {
  height: 11px;
  min-width: 22px;
  border-radius: 2px 2px 0 0;
  background: #D9E1E9;
}
.rc-sheet-tab-on { background: var(--navy); min-width: 34px; }
.rc-sheet-now .rc-sheet-tab-on { background: var(--orange); }
.rc-sheet-stats { padding: 0.6rem 0.75rem 0.75rem; font-size: 0.85rem; color: #1F2937; line-height: 1.6; }
.rc-sheet-stats b { font-family: var(--font-heading); color: #17395A; }
.rc-sheet-now .rc-sheet-stats b { color: #A8541A; }
@media (max-width: 700px) {
  .rc-sheets { grid-template-columns: 1fr; }
  .rc-sheet-grid { height: 84px; }
  .rc-sheet-stats { font-size: 0.8rem; }
}
