/* ResumeRadar — guides.css
 * ---------------------------------------------------------------------------
 * Article / prose + SEO Guides-hub styling for the /guides/ section.
 *
 * Built ENTIRELY on the design tokens defined in styles.css :root (the --rr-*
 * custom properties, the fluid type scale --fs-*, the spacing scale --sp-*,
 * radii, shadows, motion easings). NOTHING here hardcodes a hex value — every
 * color comes from a token, so the light-preference override and any pro.js
 * runtime --rr-accent swap keep working on guide pages too.
 *
 * This file is ADDITIVE. styles.css must be loaded FIRST (it provides .topbar,
 * .brand, .btn, .sitefooter, the reset, tokens, reduced-motion kill-switch,
 * the global :focus-visible ring, etc.). We only add guide-specific rules and
 * reuse existing classes wherever it makes sense.
 *
 * Accessibility baked in: 44px minimum tap targets, focus-visible rings that
 * inherit the global outline, WCAG-AA contrast on the dark navy theme (body
 * copy uses --rr-text on --rr-bg; muted copy stays >=4.5:1), and a full
 * prefers-reduced-motion path (the styles.css kill-switch already neutralizes
 * transitions; we add nothing that fights it).
 * --------------------------------------------------------------------------- */

/* =========================================================== GUIDE TOP BAR = */
/* Slim sticky bar for article/hub pages. Mirrors the home .topbar feel but is
   purpose-built for the guides shell: brand wordmark on the left, a single
   teal "Scan my resume — free" CTA on the right. Reuses .brand / .brand__*
   from styles.css for a pixel-identical wordmark. */
.guide-topbar {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--rr-bg-2) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--rr-border);
}
.guide-topbar__inner {
  max-width: var(--rr-maxw); margin: 0 auto;
  padding: 10px clamp(1rem, 0.5rem + 3vw, 2.5rem);
  display: flex; align-items: center; gap: var(--sp-3);
}
.guide-topbar__cta { margin-left: auto; }
@media (max-width: 520px) {
  /* keep the CTA usable but compact on phones */
  .guide-topbar__cta { padding-inline: 16px; }
  .guide-topbar__cta .guide-topbar__cta-long { display: none; }
}
@media (min-width: 521px) {
  .guide-topbar__cta-short { display: none; }
}

/* =============================================================== SHELL ===== */
/* Page background matches the app floor exactly. */
.guide-page { background: var(--rr-bg); }

/* The readable article column — locked to the contract's narrow reading width. */
.guide-main {
  max-width: var(--rr-maxw-narrow);
  margin-inline: auto;
  padding: var(--sp-8) clamp(1rem, 0.5rem + 3vw, 2.5rem) var(--sp-12);
}

/* =========================================================== BREADCRUMB ==== */
.breadcrumb {
  margin-bottom: var(--sp-4);
  font-size: var(--fs-sm);
}
.breadcrumb ol {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px;
}
.breadcrumb li { display: inline-flex; align-items: center; gap: 8px; }
.breadcrumb li + li::before {
  content: "/"; color: var(--rr-text-dim); font-weight: 600;
}
.breadcrumb a {
  color: var(--rr-text-muted); text-decoration: none; font-weight: 600;
  border-radius: 6px; transition: color var(--t-fast) var(--ease);
}
.breadcrumb a:hover { color: var(--rr-accent-strong); }
.breadcrumb a:focus-visible { outline: none; box-shadow: var(--rr-ring); }
/* current page (aria-current="page") — non-link, dimmed */
.breadcrumb [aria-current="page"] { color: var(--rr-text-dim); font-weight: 600; }

/* =========================================================== ARTICLE HEAD = */
.guide-header { margin-bottom: var(--sp-6); }
.guide-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: var(--fs-xs); font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  color: var(--rr-accent-strong);
  background: var(--rr-accent-soft);
  border: 1px solid color-mix(in srgb, var(--rr-accent) 30%, transparent);
  padding: 6px 13px; border-radius: 999px; margin-bottom: var(--sp-3);
}
.guide-title {
  font-size: var(--fs-2xl); letter-spacing: -.035em; line-height: 1.08;
}
.guide-lede {
  margin-top: var(--sp-4);
  font-size: var(--fs-md); color: var(--rr-text-muted); line-height: 1.6;
  max-width: 62ch;
}
.guide-meta {
  margin-top: var(--sp-4);
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-4);
  font-size: var(--fs-sm); color: var(--rr-text-dim);
}
.guide-meta__item { display: inline-flex; align-items: center; gap: 7px; }
.guide-meta__item svg { color: var(--rr-accent); flex: 0 0 auto; }
.guide-meta time { color: var(--rr-text-muted); font-weight: 600; }

/* =========================================================== PROSE ========= */
/* The article body. Generous line-height + measured rhythm using the spacing
   scale. All within the .guide-main narrow column so the measure stays ~70ch. */
.prose {
  font-size: var(--fs-base);
  line-height: 1.75;
  color: var(--rr-text);
}
.prose > * + * { margin-top: var(--sp-4); }

/* Headings — scroll-margin keeps anchored deep links clear of the sticky bar. */
.prose h2,
.prose h3,
.prose h4 { scroll-margin-top: 84px; }
.prose h2 {
  font-size: var(--fs-lg);
  margin-top: var(--sp-8);
  padding-top: var(--sp-2);
  letter-spacing: -.025em;
}
.prose h3 {
  font-size: var(--fs-md);
  margin-top: var(--sp-6);
  letter-spacing: -.02em;
}
.prose h4 {
  font-size: var(--fs-base);
  margin-top: var(--sp-4);
  text-transform: uppercase; letter-spacing: .05em;
  color: var(--rr-text-muted);
}
/* subtle accent tick to anchor h2s without shouting */
.prose h2::before {
  content: ""; display: block; width: 38px; height: 3px; border-radius: 999px;
  background: linear-gradient(90deg, var(--rr-accent), var(--rr-accent-deep));
  margin-bottom: var(--sp-3);
}

.prose p { color: var(--rr-text); }
.prose a {
  color: var(--rr-accent-strong); font-weight: 600;
  text-decoration: underline; text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, var(--rr-accent) 50%, transparent);
  border-radius: 4px; transition: color var(--t-fast) var(--ease), text-decoration-color var(--t-fast);
}
.prose a:hover { color: var(--rr-accent); text-decoration-color: var(--rr-accent); }
.prose a:focus-visible { outline: none; box-shadow: var(--rr-ring); }

.prose strong { color: var(--rr-text); font-weight: 800; }
.prose em { color: var(--rr-text); }

/* Lists */
.prose ul,
.prose ol { margin: 0; padding-left: 1.4em; display: flex; flex-direction: column; gap: 8px; }
.prose li { padding-left: 4px; }
.prose li::marker { color: var(--rr-accent); }
.prose ol li::marker { color: var(--rr-accent-strong); font-weight: 700; }
.prose ul ul,
.prose ol ol,
.prose ul ol,
.prose ol ul { margin-top: 8px; }

/* Inline code + code blocks (uses the mono token; never leaves the palette) */
.prose code {
  font-family: var(--rr-font-mono); font-size: .9em;
  background: var(--rr-surface-2); color: var(--rr-accent-strong);
  border: 1px solid var(--rr-border);
  padding: 2px 6px; border-radius: 6px;
}
.prose pre {
  background: var(--rr-surface); border: 1px solid var(--rr-border);
  border-radius: var(--rr-radius-sm); padding: var(--sp-4);
  overflow-x: auto; font-size: var(--fs-sm); line-height: 1.6;
}
.prose pre code { background: none; border: 0; padding: 0; color: var(--rr-text); }

/* Horizontal rule between major movements */
.prose hr {
  border: 0; height: 1px; background: var(--rr-border);
  margin-block: var(--sp-8);
}

/* Definition-ish strong-led paragraphs and figure captions */
.prose figure { margin: 0; }
.prose figcaption {
  font-size: var(--fs-xs); color: var(--rr-text-dim); margin-top: var(--sp-2); text-align: center;
}
.prose img {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--rr-border); border-radius: var(--rr-radius-sm);
  box-shadow: var(--rr-shadow-sm);
}

/* Tables (e.g. ATS myth vs reality) — readable on dark, zebra via surface tints */
.prose table {
  width: 100%; border-collapse: collapse; font-size: var(--fs-sm);
  border: 1px solid var(--rr-border); border-radius: var(--rr-radius-sm); overflow: hidden;
}
.prose thead th {
  background: var(--rr-surface-2); color: var(--rr-text);
  text-align: left; font-weight: 800; padding: 11px 14px;
  border-bottom: 1px solid var(--rr-border);
}
.prose tbody td {
  padding: 11px 14px; border-bottom: 1px solid var(--rr-border);
  color: var(--rr-text); vertical-align: top;
}
.prose tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--rr-surface) 50%, transparent); }
.prose tbody tr:last-child td { border-bottom: 0; }

/* =========================================================== CALLOUTS ====== */
/* Blockquote = a soft, accent-edged callout (good for honest caveats + pull
   quotes). Reuses --rr-surface / --rr-accent per the contract. */
.prose blockquote,
.callout {
  margin: 0;
  background: var(--rr-surface);
  border: 1px solid var(--rr-border);
  border-left: 4px solid var(--rr-accent);
  border-radius: var(--rr-radius-sm);
  padding: var(--sp-4) var(--sp-4);
  color: var(--rr-text);
}
.prose blockquote p { color: var(--rr-text); }
.prose blockquote :first-child { margin-top: 0; }
.prose blockquote cite,
.callout cite {
  display: block; margin-top: var(--sp-2);
  font-size: var(--fs-sm); color: var(--rr-text-muted); font-style: normal; font-weight: 700;
}

/* Semantic callout variants — recolor the rail + tint via the semantic tokens. */
.callout--note  { border-left-color: var(--rr-accent); }
.callout--good  { border-left-color: var(--rr-good); background: color-mix(in srgb, var(--rr-good-soft) 55%, var(--rr-surface)); }
.callout--warn  { border-left-color: var(--rr-warn); background: color-mix(in srgb, var(--rr-warn-soft) 55%, var(--rr-surface)); }
.callout--bad   { border-left-color: var(--rr-bad);  background: color-mix(in srgb, var(--rr-bad-soft) 55%, var(--rr-surface)); }

.callout__title {
  display: flex; align-items: center; gap: 9px;
  font-size: var(--fs-sm); font-weight: 800; text-transform: uppercase; letter-spacing: .05em;
  margin: 0 0 var(--sp-2);
  color: var(--rr-text);
}
.callout__title svg { flex: 0 0 auto; }
.callout--good .callout__title { color: var(--rr-good-text); }
.callout--warn .callout__title { color: var(--rr-warn-text); }
.callout--bad  .callout__title { color: var(--rr-bad-text); }
.callout--note .callout__title { color: var(--rr-accent-strong); }
.callout p:last-child,
.callout ul:last-child,
.callout ol:last-child { margin-bottom: 0; }

/* ---- KEY TAKEAWAY box — the highlighted "if you read one thing" block ---- */
.takeaway {
  margin: var(--sp-6) 0;
  background: linear-gradient(135deg, var(--rr-accent-soft), var(--rr-surface));
  border: 1px solid color-mix(in srgb, var(--rr-accent) 34%, transparent);
  border-radius: var(--rr-radius);
  box-shadow: var(--rr-shadow-sm);
  padding: var(--sp-6) var(--sp-6);
}
.takeaway__label {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: var(--fs-xs); font-weight: 800; text-transform: uppercase; letter-spacing: .12em;
  color: var(--rr-accent-strong);
  margin-bottom: var(--sp-2);
}
.takeaway__label svg { flex: 0 0 auto; color: var(--rr-accent); }
.takeaway p {
  margin: 0; font-size: var(--fs-md); color: var(--rr-text); line-height: 1.6; font-weight: 600;
}
.takeaway p + p { margin-top: var(--sp-3); }

/* =========================================================== INLINE CTA ==== */
/* Prominent in-article card that funnels to the free scanner (../index.html#tool).
   This is the conversion unit; it should feel like the home hero's preview card. */
.scan-cta {
  margin: var(--sp-8) 0;
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--rr-surface), var(--rr-bg-2));
  border: 1px solid var(--rr-border-strong);
  border-radius: var(--rr-radius-lg);
  box-shadow: var(--rr-glow), var(--rr-shadow);
  padding: var(--sp-6) clamp(1.25rem, 1rem + 1.4vw, 2rem);
  display: grid; grid-template-columns: 1fr auto; gap: var(--sp-4) var(--sp-6); align-items: center;
}
/* decorative accent glow, like the hero */
.scan-cta::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(520px 240px at 92% -30%, color-mix(in srgb, var(--rr-accent) 30%, transparent), transparent 60%);
}
.scan-cta__body { position: relative; z-index: 1; min-width: 0; }
.scan-cta__eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: var(--fs-xs); font-weight: 800; text-transform: uppercase; letter-spacing: .1em;
  color: var(--rr-accent-strong); margin-bottom: var(--sp-2);
}
.scan-cta__eyebrow svg { flex: 0 0 auto; color: var(--rr-accent); }
.scan-cta__title { font-size: var(--fs-lg); letter-spacing: -.02em; }
.scan-cta__sub { margin-top: var(--sp-2); font-size: var(--fs-sm); color: var(--rr-text-muted); max-width: 48ch; }
.scan-cta__action { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
.scan-cta__note { font-size: var(--fs-xs); color: var(--rr-text-dim); text-align: center; }
@media (max-width: 640px) {
  .scan-cta { grid-template-columns: 1fr; }
  .scan-cta__action { align-items: stretch; }
  .scan-cta__action .btn { width: 100%; }
}

/* =========================================================== TOC (optional) */
/* Lightweight in-article table of contents card writers may include. */
.guide-toc {
  background: var(--rr-surface-2); border: 1px solid var(--rr-border);
  border-radius: var(--rr-radius); padding: var(--sp-4) var(--sp-6);
  margin: var(--sp-6) 0;
}
.guide-toc__title {
  font-size: var(--fs-xs); font-weight: 800; text-transform: uppercase; letter-spacing: .1em;
  color: var(--rr-text-muted); margin: 0 0 var(--sp-2);
}
.guide-toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; display: flex; flex-direction: column; gap: 6px; }
.guide-toc li { counter-increment: toc; }
.guide-toc a {
  display: inline-flex; gap: 9px; align-items: baseline;
  color: var(--rr-text-muted); text-decoration: none; font-weight: 600; font-size: var(--fs-sm);
  min-height: 32px; padding: 4px 2px; border-radius: 6px;
}
.guide-toc a::before { content: counter(toc, decimal-leading-zero); color: var(--rr-accent); font-weight: 800; font-size: var(--fs-xs); }
.guide-toc a:hover { color: var(--rr-accent-strong); }
.guide-toc a:focus-visible { outline: none; box-shadow: var(--rr-ring); }

/* =========================================================== RELATED ======= */
/* "Related guides" grid that closes every article — keeps readers in the funnel. */
.related {
  margin-top: var(--sp-12);
  padding-top: var(--sp-8);
  border-top: 1px solid var(--rr-border);
}
.related__title { font-size: var(--fs-lg); margin-bottom: var(--sp-6); }
.related__grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--sp-4);
}

/* Shared card object used by both .related and the hub grid. */
.guide-card {
  display: flex; flex-direction: column; gap: var(--sp-2);
  background: var(--rr-surface); border: 1px solid var(--rr-border);
  border-radius: var(--rr-radius); padding: var(--sp-6) var(--sp-4);
  text-decoration: none; color: var(--rr-text);
  transition: transform var(--t-mid) var(--ease), box-shadow var(--t-mid) var(--ease), border-color var(--t-mid) var(--ease);
}
.guide-card:hover {
  transform: translateY(-4px); box-shadow: var(--rr-shadow);
  border-color: color-mix(in srgb, var(--rr-accent) 45%, transparent);
}
.guide-card:focus-visible { outline: none; box-shadow: var(--rr-ring); }
.guide-card__kicker {
  font-size: var(--fs-xs); font-weight: 800; text-transform: uppercase; letter-spacing: .1em;
  color: var(--rr-accent-strong);
}
.guide-card__title { font-size: var(--fs-md); letter-spacing: -.02em; line-height: 1.2; }
.guide-card:hover .guide-card__title { color: var(--rr-accent-strong); }
.guide-card__desc { font-size: var(--fs-sm); color: var(--rr-text-muted); line-height: 1.55; flex: 1 1 auto; }
.guide-card__more {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: var(--fs-sm); font-weight: 700; color: var(--rr-accent-strong); margin-top: var(--sp-1);
}
.guide-card__more svg { transition: transform var(--t-fast) var(--ease); flex: 0 0 auto; }
.guide-card:hover .guide-card__more svg { transform: translateX(3px); }

/* =========================================================== HUB =========== */
/* The /guides/index.html landing page: header band + the card grid. Uses the
   wider --rr-maxw so the hub breathes more than an article. */
.hub-main {
  max-width: var(--rr-maxw);
  margin-inline: auto;
  padding: var(--sp-8) clamp(1rem, 0.5rem + 3vw, 2.5rem) var(--sp-12);
}
.hub-header {
  max-width: var(--rr-maxw-narrow); margin: 0 auto var(--sp-8); text-align: center;
}
.hub-header .guide-eyebrow { margin-inline: auto; }
.hub-title { font-size: var(--fs-xl); letter-spacing: -.03em; }
.hub-sub { margin-top: var(--sp-3); font-size: var(--fs-md); color: var(--rr-text-muted); }

.hub-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--sp-4);
}
/* On the hub, cards get a touch more presence. */
.hub-grid .guide-card { padding: var(--sp-6); }

/* =========================================================== RESPONSIVE ==== */
@media (max-width: 560px) {
  .guide-title { font-size: var(--fs-xl); }
  .related__grid,
  .hub-grid { grid-template-columns: 1fr; }
}

/* =========================================================== MOTION ========
   The styles.css prefers-reduced-motion block already neutralizes transitions
   and transforms globally. We add a defensive belt for the hover lifts unique
   to guide cards so motion-sensitive users never see movement here either. */
@media (prefers-reduced-motion: reduce) {
  .guide-card:hover { transform: none !important; }
  .guide-card:hover .guide-card__more svg { transform: none !important; }
}
