/* CVLift guides, guides hub and 404 page. Builds on styles.css tokens; no inline styles (CSP). */

/* ---------- Breadcrumb ---------- */

.breadcrumb {
  margin-bottom: 18px;
  font-size: 0.875rem;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--hero-muted);
}

.breadcrumb li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.breadcrumb li + li::before {
  content: "/";
  opacity: 0.55;
}

.breadcrumb a {
  color: var(--hero-text);
  text-decoration: none;
  font-weight: 600;
}

.breadcrumb a:hover,
.breadcrumb a:focus-visible {
  text-decoration: underline;
}

.breadcrumb [aria-current="page"] {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 42ch;
}

.page-hero .breadcrumb ol {
  justify-content: center;
}

/* ---------- Guide hero ---------- */

.guide-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(36px, 6vw, 72px) 0 clamp(40px, 6vw, 72px);
  background: var(--hero-bg);
  color: var(--hero-text);
}

.guide-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(520px 320px at 85% 0%, rgba(47, 207, 149, 0.2), transparent 70%),
    radial-gradient(420px 260px at 5% 100%, rgba(80, 140, 255, 0.14), transparent 70%);
  pointer-events: none;
}

.guide-hero__inner {
  position: relative;
}

.guide-hero .eyebrow {
  color: #6ee7bc;
}

.guide-hero h1 {
  max-width: 22ch;
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 1.3rem + 2.6vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.guide-hero__lead {
  max-width: 62ch;
  margin: 0 0 22px;
  color: var(--hero-muted);
  font-size: 1.1rem;
  line-height: 1.6;
}

.guide-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--hero-muted);
  font-size: 0.9rem;
}

.guide-meta li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.guide-meta svg {
  width: 16px;
  height: 16px;
  color: #6ee7bc;
}

/* ---------- Layout ---------- */

.guide-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  grid-template-areas: "main aside";
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
  padding-top: clamp(32px, 5vw, 56px);
  padding-bottom: clamp(40px, 6vw, 72px);
}

.guide-main {
  grid-area: main;
  min-width: 0;
  max-width: 760px;
}

.guide-aside {
  grid-area: aside;
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  scrollbar-width: thin;
}

/* ---------- Table of contents ---------- */

.toc {
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.toc__title {
  margin: 0 0 10px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-subtle);
}

.toc ol {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
}

.toc li {
  counter-increment: toc;
}

.toc a {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 6px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.4;
  text-decoration: none;
}

.toc a::before {
  content: counter(toc);
  color: var(--accent-strong);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.toc a:hover,
.toc a:focus-visible {
  background: var(--bg-alt);
  color: var(--text);
}

/* ---------- CTA card ---------- */

.guide-cta-card {
  padding: 22px;
  border-radius: var(--radius-lg);
  background: var(--hero-bg);
  color: var(--hero-text);
  box-shadow: var(--shadow);
}

.guide-cta-card__title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.25;
}

.guide-cta-card__text {
  margin: 0 0 14px;
  color: var(--hero-muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.guide-cta-card__points {
  display: grid;
  gap: 8px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  font-size: 0.88rem;
}

.guide-cta-card__points li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.guide-cta-card__points svg {
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  color: #6ee7bc;
}

.guide-inline-cta {
  display: none;
  margin-top: 40px;
}

/* ---------- Article typography ---------- */

.prose {
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.75;
}

.prose > * + * {
  margin-top: 1.1em;
}

.prose p,
.prose ul,
.prose ol,
.prose blockquote,
.prose table {
  margin-bottom: 0;
}

.prose .lede {
  font-size: 1.18rem;
  line-height: 1.7;
  color: var(--text-muted);
}

.prose h2 {
  margin: 2.2em 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 1.2rem + 0.9vw, 1.85rem);
  line-height: 1.25;
  letter-spacing: -0.015em;
  scroll-margin-top: 96px;
}

.prose h3 {
  margin: 1.8em 0 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
  line-height: 1.3;
  scroll-margin-top: 96px;
}

.prose h2 + *,
.prose h3 + * {
  margin-top: 0.6em;
}

.prose a:not(.button):not(.btn) {
  color: var(--accent-strong);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.prose ul,
.prose ol {
  padding-left: 1.4em;
}

.prose li + li {
  margin-top: 0.45em;
}

.prose li::marker {
  color: var(--accent-strong);
  font-weight: 700;
}

.prose strong {
  font-weight: 650;
}

.prose blockquote {
  padding: 16px 20px;
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--bg-alt);
  color: var(--text);
  font-size: 0.98rem;
  line-height: 1.65;
  margin-left: 0;
  margin-right: 0;
}

.prose table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.93rem;
  line-height: 1.5;
  -webkit-overflow-scrolling: touch;
}

.prose th,
.prose td {
  min-width: 140px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.prose th {
  background: var(--bg-alt);
  font-weight: 700;
  color: var(--text);
}

.prose tbody tr:last-child td {
  border-bottom: 0;
}

.prose aside.tip {
  position: relative;
  padding: 16px 20px 16px 52px;
  border: 1px solid color-mix(in srgb, var(--highlight) 45%, var(--border));
  border-radius: var(--radius);
  background: var(--warning-soft);
  color: var(--text);
  font-size: 0.97rem;
  line-height: 1.65;
}

.prose aside.tip::before {
  content: "i";
  position: absolute;
  left: 18px;
  top: 17px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--highlight);
  color: #3a2700;
  font-size: 0.8rem;
  font-weight: 800;
  font-style: italic;
  line-height: 1;
}

.prose aside.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 20px;
  padding: 20px 22px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border));
  border-radius: var(--radius-lg);
  background: var(--accent-soft);
  font-weight: 600;
  line-height: 1.55;
}

.prose a.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-contrast);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease, transform 0.15s ease;
}

.prose a.button:hover {
  background: var(--accent-strong);
  transform: translateY(-1px);
}

.prose a.button:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* ---------- Design gallery inside guides ---------- */

.guide-gallery-wrap {
  margin-top: 1.6em;
}

.guide-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.prose .guide-gallery li + li {
  margin-top: 0;
}

.guide-design:hover {
  transform: none;
}

.guide-design__thumb {
  cursor: default;
  padding: 12px 12px 0;
}

.guide-design__thumb:hover img {
  transform: none;
}

.guide-design .design-card__body {
  gap: 6px;
  padding: 12px 14px 14px;
}

.guide-design .design-card__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
}

.guide-design .design-card__tag {
  font-size: 0.62rem;
  padding: 2px 7px;
}

.guide-design .design-card__desc {
  font-size: 0.82rem;
}

.guide-design .design-card__best {
  margin: 0;
  font-size: 0.78rem;
}

.guide-gallery__note {
  margin: 14px 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ---------- FAQ ---------- */

.guide-faq {
  margin-top: clamp(40px, 6vw, 64px);
}

.guide-faq h2 {
  margin: 0 0 18px;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 1.2rem + 0.9vw, 1.85rem);
  scroll-margin-top: 96px;
}

.guide-faq .faq {
  max-width: none;
  margin: 0;
}

/* ---------- Guide cards (related + hub) ---------- */

.guide-related__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px 20px;
  margin-bottom: 24px;
}

.guide-related__head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 1.2rem + 0.9vw, 1.85rem);
}

.guide-related__head a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-strong);
  font-weight: 650;
  text-decoration: none;
}

.guide-related__head a svg {
  width: 16px;
  height: 16px;
}

.guide-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.guide-card {
  display: flex;
}

.guide-card__link {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  padding: 22px 22px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: var(--text);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.guide-card__link:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}

.guide-card__link:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.guide-card__meta {
  color: var(--accent-strong);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.guide-card__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  line-height: 1.3;
}

.guide-card__desc {
  flex: 1;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.guide-card__more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-strong);
  font-weight: 650;
  font-size: 0.92rem;
}

.guide-card__more svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

.guide-card__link:hover .guide-card__more svg {
  transform: translateX(3px);
}

.guide-cards--compact {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

/* ---------- Hub ---------- */

.guides-hero h1 {
  font-family: var(--font-display);
}

.guide-jump {
  margin-top: 26px;
}

.guide-jump ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.guide-jump a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--hero-text);
  font-size: 0.9rem;
  font-weight: 650;
  text-decoration: none;
}

.guide-jump a:hover,
.guide-jump a:focus-visible {
  background: rgba(255, 255, 255, 0.14);
}

.guide-group + .guide-group {
  margin-top: clamp(48px, 7vw, 80px);
}

.guide-group {
  scroll-margin-top: 96px;
}

.guide-group__head {
  max-width: 640px;
  margin-bottom: 24px;
}

.guide-group__head h2 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
}

.guide-group__head p {
  margin: 0;
  color: var(--text-muted);
}

.guide-empty {
  text-align: center;
  color: var(--text-muted);
}

/* ---------- 404 ---------- */

.notfound__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}

.notfound__help {
  max-width: 640px;
  margin: 0 auto 40px;
  text-align: center;
  color: var(--text-muted);
}

.notfound__subtitle {
  margin: 0 0 20px;
  font-family: var(--font-display);
  font-size: 1.4rem;
  text-align: center;
}

/* ---------- Sticky mobile CTA ---------- */

.guide-sticky-cta {
  display: none;
}

/* ---------- Responsive ---------- */

@media (max-width: 1000px) {
  .guide-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "aside"
      "main";
    gap: 28px;
  }

  .guide-main {
    max-width: none;
  }

  .guide-aside {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .guide-aside .guide-cta-card {
    display: none;
  }

  .guide-inline-cta {
    display: block;
  }

  .guide-sticky-cta {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    display: block;
    padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--border);
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    box-shadow: 0 -6px 20px rgba(11, 31, 58, 0.1);
    backdrop-filter: blur(8px);
  }

  .guide-sticky-cta__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    max-width: var(--container);
    margin: 0 auto;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-muted);
  }

  .guide-page .site-footer {
    padding-bottom: 88px;
  }

  /* Never stack the sticky bar on top of the cookie banner. */
  html.has-consent-banner .guide-sticky-cta {
    display: none;
  }
}

@media (max-width: 520px) {
  .guide-sticky-cta__inner span {
    display: none;
  }

  .guide-sticky-cta__inner .btn {
    width: 100%;
  }

  .prose {
    font-size: 1rem;
  }

  .prose aside.cta {
    flex-direction: column;
    align-items: stretch;
  }

  .guide-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .guide-cards {
    grid-template-columns: minmax(0, 1fr);
  }

  .breadcrumb [aria-current="page"] {
    max-width: 24ch;
  }
}

@media (prefers-reduced-motion: reduce) {
  .guide-card__link,
  .guide-card__more svg,
  .prose a.button {
    transition: none;
  }
}

@media print {
  .guide-aside,
  .guide-inline-cta,
  .guide-sticky-cta,
  .guide-related,
  .guide-cta-section {
    display: none;
  }
}
