/* ==========================================================================
   Suxession Knowledge Base — Reading Experience
   Aligned with DESIGN.md (Instrument Serif, DM Sans, JetBrains Mono)
   ========================================================================== */

/* Shared tokens + base styles loaded via style.css in _base.html */

/* --------------------------------------------------------------------------
   Guide-specific custom properties
   -------------------------------------------------------------------------- */
:root {
  --guide-content-width: 700px;
  --guide-body-size: 19px;
  --guide-body-size-mobile: 17px;
  --guide-body-lh: 1.6;
  --guide-h1-size: 42px;
  --guide-h1-size-mobile: 32px;
  --guide-h2-size: 28px;
  --guide-h2-size-mobile: 24px;
  --guide-meta-size: 14px;
  --guide-breadcrumb-size: 13px;
  --guide-legal-ref-size: 13px;
  --guide-footnote-size: 14px;
  --guide-paragraph-gap: 24px;
  --guide-nav-height: 70px;
  --guide-toc-left: 200px;
  --guide-text-meta: #5A504A;
  --guide-text-breadcrumb: #7A7068;
  --guide-zebra: #F0ECE6;
}

/* --------------------------------------------------------------------------
   Guide-specific dark mode overrides
   -------------------------------------------------------------------------- */
@media (prefers-color-scheme: dark) {
  :root:not(.light) {
    --guide-text-meta: #9B9590;
    --guide-text-breadcrumb: #7A7068;
    --guide-zebra: #252220;
  }
}
:root.dark {
  --guide-text-meta: #9B9590;
  --guide-text-breadcrumb: #7A7068;
  --guide-zebra: #252220;
}
:root.light {
  --guide-text-meta: #5A504A;
  --guide-text-breadcrumb: #7A7068;
  --guide-zebra: #F0ECE6;
}

/* Dark mode contrast overrides for guide-specific elements */
@media (prefers-color-scheme: dark) {
  :root:not(.light) .guide-article table th,
  :root:not(.light) .guide-table th { background-color: var(--surface-elevated); color: var(--text); }
  :root:not(.light) .guide-cta-banner { background-color: var(--surface); border: 1px solid var(--border); }
  :root:not(.light) .guide-cta-banner p { color: var(--text); }
  :root:not(.light) .guide-cta-btn { background-color: var(--accent); color: var(--bg); }
  :root:not(.light) .guide-cta-btn:hover { background-color: var(--accent-light); color: var(--bg); }
  :root:not(.light) .legal-popover-content { box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4); }
  :root:not(.light) .callout-info { background-color: var(--surface-elevated); }
  :root:not(.light) .guide-related-card:hover { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); }
  :root:not(.light) .guide-nav-cta { color: var(--text); }
  :root:not(.light) .guide-article blockquote { border-left-color: var(--accent); }
  :root:not(.light) .guide-hub-pilier-section h2 a { color: var(--accent); }
  :root:not(.light) .guide-hub-pilier-section h2 a:hover { color: var(--accent-light); }
  :root:not(.light) .guide-hub-article-list li:hover { border-color: var(--accent); box-shadow: 0 2px 8px rgba(201, 168, 76, 0.1); }
  :root:not(.light) .article-card-meta { color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
}
:root.dark .guide-article table th,
:root.dark .guide-table th { background-color: var(--surface-elevated); color: var(--text); }
:root.dark .guide-cta-banner { background-color: var(--surface); border: 1px solid var(--border); }
:root.dark .guide-cta-banner p { color: var(--text); }
:root.dark .guide-cta-btn { background-color: var(--accent); color: var(--bg); }
:root.dark .guide-cta-btn:hover { background-color: var(--accent-light); color: var(--bg); }
:root.dark .legal-popover-content { box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4); }
:root.dark .callout-info { background-color: var(--surface-elevated); }
:root.dark .guide-related-card:hover { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); }
:root.dark .guide-nav-cta { color: var(--text); }
:root.dark .guide-article blockquote { border-left-color: var(--accent); }
:root.dark .guide-hub-pilier-section h2 a { color: var(--accent); }
:root.dark .guide-hub-pilier-section h2 a:hover { color: var(--accent-light); }
:root.dark .guide-hub-article-list li:hover { border-color: var(--accent); box-shadow: 0 2px 8px rgba(201, 168, 76, 0.1); }
:root.dark .article-card-meta { color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }

/* --------------------------------------------------------------------------
   Base / Reset
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   Skip Link (accessibility)
   HTML class: .skip-link
   -------------------------------------------------------------------------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: 1000;
  background: var(--primary);
  color: #fff;
  padding: 12px 24px;
  font-family: var(--font-body);
  font-size: 14px;
  text-decoration: none;
  border-radius: var(--radius-md);
}

.skip-link:focus {
  position: fixed;
  left: 16px;
  top: 16px;
  width: auto;
  height: auto;
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Focus Visible (global)
   -------------------------------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Page Background
   -------------------------------------------------------------------------- */
body {
  margin: 0;
  background-color: var(--bg);
  min-height: 100vh;
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--guide-body-size);
  line-height: var(--guide-body-lh);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --------------------------------------------------------------------------
   Sticky Header (uses shared .header from style.css)
   Guide-specific: make header sticky + add breadcrumb bar below
   -------------------------------------------------------------------------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: none;
}

/* --------------------------------------------------------------------------
   Breadcrumb bar (below the shared header)
   HTML: .guide-breadcrumb > .guide-breadcrumb-inner > a + .breadcrumb-sep + .breadcrumb-current
   -------------------------------------------------------------------------- */
.guide-breadcrumb {
  background-color: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: var(--space-sm) 24px;
}

.guide-breadcrumb-inner {
  max-width: calc(var(--guide-content-width) + 480px);
  width: 100%;
  margin: 0 auto;
  font-family: var(--font-body);
  font-size: var(--guide-breadcrumb-size);
  color: var(--guide-text-breadcrumb);
  line-height: 1.4;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.guide-breadcrumb a {
  color: var(--guide-text-breadcrumb);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: var(--guide-breadcrumb-size);
}

.guide-breadcrumb a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.breadcrumb-sep {
  user-select: none;
  color: var(--guide-text-breadcrumb);
}

.breadcrumb-current {
  color: var(--text);
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   Layout: Content + TOC
   -------------------------------------------------------------------------- */
.guide-layout {
  position: relative;
  max-width: var(--guide-content-width);
  margin: 0 auto;
  padding: 48px 16px 96px;
}

/* --------------------------------------------------------------------------
   Table of Contents (sticky sidebar desktop)
   HTML: aside.guide-toc > nav#guide-toc-nav > h2.guide-toc-title + ul (JS-generated)
   -------------------------------------------------------------------------- */
.guide-toc {
  display: none;
}

@media (min-width: 1025px) {
  .guide-layout {
    max-width: calc(var(--guide-content-width) + 280px);
    padding-left: 280px;
  }

  .guide-toc {
    display: block;
    position: fixed;
    top: calc(var(--guide-nav-height) + 72px);
    left: max(16px, calc((100vw - var(--guide-content-width) - 280px) / 2));
    width: 220px;
    max-height: calc(100vh - var(--guide-nav-height) - 96px);
    overflow-y: auto;
    font-family: var(--font-body);
    font-size: 13px;
    line-height: 1.5;
    color: var(--guide-text-meta);
  }

  .guide-toc-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-subtle);
    margin-bottom: 12px;
  }

  #guide-toc-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  #guide-toc-nav ul li {
    margin-bottom: 8px;
  }

  #guide-toc-nav ul a {
    color: var(--guide-text-meta);
    text-decoration: none;
    transition: color 150ms ease-out;
    display: inline-block;
    padding: 2px 0;
  }

  #guide-toc-nav ul a:hover,
  #guide-toc-nav ul a.active {
    color: var(--primary);
  }

  #guide-toc-nav ul a.active {
    font-weight: 500;
  }
}

/* --------------------------------------------------------------------------
   Article Content
   -------------------------------------------------------------------------- */
.guide-article {
  max-width: var(--guide-content-width);
  margin: 0 auto;
}

/* --------------------------------------------------------------------------
   Article Header & Meta
   HTML: .guide-article-header > h1 + .guide-article-meta > time + .guide-meta-sep + span
   -------------------------------------------------------------------------- */
.guide-article-header {
  margin-bottom: 32px;
}

.guide-article-meta {
  font-family: var(--font-body);
  font-size: var(--guide-meta-size);
  color: var(--guide-text-meta);
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.guide-meta-sep {
  color: var(--text-subtle);
}

/* --------------------------------------------------------------------------
   Headings
   -------------------------------------------------------------------------- */
.guide-article h1 {
  font-family: var(--font-display);
  font-size: var(--guide-h1-size);
  font-weight: 400;
  line-height: 1.2;
  color: var(--text);
  margin: 0 0 16px;
}

.guide-article h2 {
  font-family: var(--font-display);
  font-size: var(--guide-h2-size);
  font-weight: 400;
  line-height: 1.3;
  color: var(--text);
  margin: 48px 0 16px;
}

.guide-article h3 {
  font-family: var(--font-body);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
  margin: 32px 0 12px;
}

/* --------------------------------------------------------------------------
   Paragraphs & Inline
   -------------------------------------------------------------------------- */
.guide-article p,
.guide-article-body p {
  margin: 0 0 var(--guide-paragraph-gap);
}

.guide-article a {
  color: var(--primary);
  text-decoration: none;
  transition: color 150ms ease-out;
}

.guide-article a:hover {
  color: var(--primary-light);
}

.guide-article strong {
  font-weight: 600;
}

.guide-article ul,
.guide-article ol {
  margin: 0 0 var(--guide-paragraph-gap);
  padding-left: 24px;
}

.guide-article li {
  margin-bottom: 8px;
}

.guide-article li::marker {
  color: var(--primary);
}

/* --------------------------------------------------------------------------
   Legal Reference Badge
   HTML: .legal-badge (from legal-badge.js)
   -------------------------------------------------------------------------- */
.legal-badge {
  display: inline;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  color: var(--primary);
  background: none;
  padding: 0;
  border-radius: 0;
  white-space: nowrap;
  cursor: pointer;
  position: relative;
  text-decoration: none;
  border-bottom: none;
}

.legal-badge:hover {
  color: var(--primary-light);
}

/* --------------------------------------------------------------------------
   Legal Popover (created by legal-badge.js)
   -------------------------------------------------------------------------- */
.legal-popover {
  z-index: 200;
  pointer-events: auto;
}

.legal-popover-content {
  background-color: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 180px;
  max-width: 280px;
}

.legal-popover-label {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

.legal-popover-link {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 0;
}

.legal-popover-link:hover {
  color: var(--primary-light);
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Callout (info)
   HTML: .callout-info (in article content)
   -------------------------------------------------------------------------- */
.callout-info {
  background-color: var(--surface);
  border: 1px solid var(--border);
  padding: 16px 16px 16px 44px;
  border-radius: var(--radius-md);
  margin: 0 0 var(--guide-paragraph-gap);
  position: relative;
}

.callout-info::before {
  content: "i";
  position: absolute;
  left: 14px;
  top: 16px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: var(--primary);
  color: var(--bg);
  font-family: var(--font-display);
  font-size: 13px;
  font-style: italic;
  line-height: 20px;
  text-align: center;
}

.callout-info p:last-child {
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   Footnotes
   HTML: .guide-footnotes > h2 + ol > li
   -------------------------------------------------------------------------- */
.guide-footnotes {
  font-family: var(--font-body);
  font-size: var(--guide-footnote-size);
  color: var(--guide-text-meta);
  border-top: 1px solid var(--border);
  margin-top: 48px;
  padding-top: 24px;
}

.guide-footnotes h2 {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 12px;
}

.guide-footnotes ol {
  padding-left: 20px;
  margin: 0;
}

.guide-footnotes li {
  margin-bottom: 8px;
}

.guide-footnotes a {
  color: var(--primary);
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   Credential
   HTML: .guide-credential
   -------------------------------------------------------------------------- */
.guide-credential {
  font-family: var(--font-body);
  font-size: var(--guide-footnote-size);
  color: var(--guide-text-meta);
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.guide-credential a {
  color: var(--primary);
}

/* --------------------------------------------------------------------------
   Blockquote
   -------------------------------------------------------------------------- */
.guide-article blockquote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: inherit;
  line-height: var(--guide-body-lh);
  color: var(--text);
  border-left: 2px solid var(--primary);
  padding-left: 20px;
  margin: 0 0 var(--guide-paragraph-gap);
}

.guide-article blockquote p:last-child {
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   Table
   -------------------------------------------------------------------------- */
.guide-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 0 var(--guide-paragraph-gap);
}

.guide-article table,
.guide-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
}

.guide-article table th,
.guide-table th {
  background-color: var(--primary);
  color: #fff;
  font-weight: 600;
  text-align: left;
  padding: 12px 16px;
}

.guide-article table th:first-child,
.guide-table th:first-child {
  border-radius: var(--radius-sm) 0 0 0;
}

.guide-article table th:last-child,
.guide-table th:last-child {
  border-radius: 0 var(--radius-sm) 0 0;
}

.guide-article table td,
.guide-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.guide-article table tbody tr:nth-child(even),
.guide-table tbody tr:nth-child(even) {
  background-color: var(--guide-zebra);
}

/* --------------------------------------------------------------------------
   Timeline
   -------------------------------------------------------------------------- */
.guide-timeline {
  position: relative;
  padding-left: 28px;
  margin: 0 0 var(--guide-paragraph-gap);
}

.guide-timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background-color: var(--border);
}

.guide-timeline__item {
  position: relative;
  margin-bottom: 24px;
}

.guide-timeline__item:last-child {
  margin-bottom: 0;
}

.guide-timeline__item::before {
  content: "";
  position: absolute;
  left: -28px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--primary);
  border: 2px solid var(--bg);
}

.guide-timeline__label {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 4px;
}

.guide-timeline__content {
  font-family: var(--font-body);
  font-size: var(--guide-body-size);
  line-height: var(--guide-body-lh);
}

/* --------------------------------------------------------------------------
   FAQ Accordion
   -------------------------------------------------------------------------- */
.guide-faq {
  margin: 0 0 var(--guide-paragraph-gap);
}

.guide-faq__item {
  border-bottom: 1px solid var(--border);
}

.guide-faq__question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 44px;
  padding: 16px 0;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: var(--guide-body-size);
  font-weight: 500;
  color: var(--text);
  text-align: left;
  line-height: 1.4;
}

.guide-faq__question:hover {
  color: var(--primary);
}

.guide-faq__icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-left: 16px;
  transition: transform 250ms ease-out;
}

.guide-faq__item[open] .guide-faq__icon {
  transform: rotate(180deg);
}

.guide-faq__answer {
  overflow: hidden;
  max-height: 0;
  transition: max-height 250ms ease-out, opacity 250ms ease-out;
  opacity: 0;
}

.guide-faq__item[open] .guide-faq__answer {
  max-height: 1000px;
  opacity: 1;
}

details.guide-faq__item summary {
  list-style: none;
}

details.guide-faq__item summary::-webkit-details-marker {
  display: none;
}

details.guide-faq__item[open] .guide-faq__icon {
  transform: rotate(180deg);
}

details.guide-faq__item .guide-faq__body {
  padding: 0 0 16px;
  animation: guideFaqOpen 250ms ease-out;
}

@keyframes guideFaqOpen {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --------------------------------------------------------------------------
   CTA Banner
   HTML: .guide-cta-banner > p + a.guide-cta-btn
   -------------------------------------------------------------------------- */
.guide-cta-banner {
  background-color: var(--primary);
  color: #fff;
  padding: 32px;
  border-radius: var(--radius-lg);
  text-align: center;
  margin: 48px 0 var(--guide-paragraph-gap);
}

.guide-cta-banner p {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.5;
  margin: 0 0 20px;
  color: #fff;
}

.guide-cta-btn {
  display: inline-block;
  background-color: #fff;
  color: var(--primary);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  padding: 14px 32px;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
  min-height: 44px;
  transition: background-color 150ms ease-out;
}

.guide-cta-btn:hover {
  background-color: var(--surface);
  color: var(--primary);
}

/* --------------------------------------------------------------------------
   Related Articles
   HTML: .guide-related > h2 + .guide-related-grid > a.guide-related-card > h3 + p + .guide-related-meta
   -------------------------------------------------------------------------- */
.guide-related {
  margin: 48px 0 0;
}

.guide-related h2 {
  font-family: var(--font-display);
  font-size: var(--guide-h2-size);
  font-weight: 400;
  line-height: 1.3;
  margin: 0 0 24px;
}

.guide-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.guide-related-card {
  background-color: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 150ms ease-out, box-shadow 150ms ease-out;
  display: flex;
  flex-direction: column;
  min-height: 44px;
}

.guide-related-card:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px color-mix(in srgb, var(--primary) 8%, transparent);
}

.guide-related-card h3 {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  margin: 0 0 8px;
}

.guide-related-card p {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--guide-text-meta);
  line-height: 1.5;
  margin: 0;
  flex-grow: 1;
}

.guide-related-meta {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--guide-text-breadcrumb);
  margin-top: 12px;
}

/* --------------------------------------------------------------------------
   Hub Pages
   HTML: .guide-hub > .guide-hub-header > h1 + .guide-hub-intro
   -------------------------------------------------------------------------- */
.guide-hub {
  max-width: 1080px;
  margin: 0 auto;
  padding: 48px var(--space-lg) 96px;
}

.guide-hub-header {
  margin-bottom: 40px;
}

.guide-hub-header h1 {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 400;
  line-height: 1.2;
  color: var(--text);
  margin: 0 0 16px;
}

.guide-hub-intro {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  color: var(--guide-text-meta);
  margin: 0;
}

/* P2-D: Sticky pills segment control (mobile-first) */
.guide-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 10px 0;
  margin: 0 0 24px;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}
.guide-pills::-webkit-scrollbar { display: none; }
.guide-pills .guide-pill {
  flex: 0 0 auto;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 9999px;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  scroll-snap-align: start;
  transition: all 150ms ease;
}
.guide-pills .guide-pill:hover,
.guide-pills .guide-pill:focus-visible {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
@media (max-width: 768px) {
  .guide-pills {
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--bg);
    padding: 10px 16px;
    margin: 0 -16px 20px;
    border-bottom: 1px solid var(--border);
  }
  /* Scroll-margin-top so anchors don't sit under the sticky bar */
  .guide-hub-pilier-section { scroll-margin-top: 64px; }
}

/* --------------------------------------------------------------------------
   Hub: Pilier Sections (guide index)
   HTML: .guide-hub-piliers > .guide-hub-pilier-section > h2 > a + .guide-hub-article-list
   -------------------------------------------------------------------------- */
.guide-hub-piliers {
  margin-bottom: 48px;
}

.guide-hub-pilier-section {
  margin-bottom: 48px;
}

.guide-hub-pilier-section h2 {
  font-family: var(--font-display);
  font-size: var(--guide-h2-size);
  font-weight: 400;
  line-height: 1.3;
  color: var(--text);
  margin: 0 0 16px;
}

.guide-hub-pilier-section h2 a {
  color: var(--primary);
  text-decoration: none;
}

.guide-hub-pilier-section h2 a:hover {
  color: var(--primary-light);
}

/* --------------------------------------------------------------------------
   Hub: Article List
   HTML: .guide-hub-article-list > li > a > .article-card-title + .article-card-meta + p.article-card-desc
   -------------------------------------------------------------------------- */
.guide-hub-article-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.guide-hub-article-list li {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color 150ms ease-out, box-shadow 150ms ease-out;
}

.guide-hub-article-list li:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(27, 67, 50, 0.1);
}

.guide-hub-article-list li a {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  text-decoration: none;
  color: var(--text);
  min-height: 44px;
}

.guide-hub-article-list li a:hover {
  color: var(--text);
}

.article-card-title {
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.4;
}

.article-card-meta {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--primary);
  white-space: nowrap;
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}

.article-card-desc {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--guide-text-meta);
  line-height: 1.5;
  margin: 0;
  padding: 0 20px 16px;
}

/* --------------------------------------------------------------------------
   Hub: Nav (Autres thématiques)
   HTML: .guide-hub-nav > h3 + .guide-hub-links > a
   -------------------------------------------------------------------------- */
.guide-hub-nav {
  margin: 48px 0 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.guide-hub-nav h3 {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-subtle);
  margin: 0 0 12px;
}

.guide-hub-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.guide-hub-links a {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--primary);
  text-decoration: none;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color 150ms ease-out, background-color 150ms ease-out;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.guide-hub-links a:hover {
  border-color: var(--primary);
  background-color: var(--surface);
}

/* --------------------------------------------------------------------------
   Footer
   HTML: .guide-footer > .guide-footer-inner > .guide-disclaimer + .guide-footer-links
   -------------------------------------------------------------------------- */
.guide-footer {
  background-color: var(--surface);
  border-top: 1px solid var(--border);
  padding: 32px 16px;
  margin-top: 0;
}

.guide-footer-inner {
  max-width: var(--guide-content-width);
  margin: 0 auto;
  text-align: center;
}

.guide-disclaimer {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--guide-text-meta);
  line-height: 1.6;
  margin: 0 0 16px;
}

.guide-footer-links {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--guide-text-meta);
  margin: 0;
}

.guide-footer-links a {
  color: var(--primary);
  text-decoration: none;
  display: inline-block;
  min-height: 44px;
  line-height: 44px;
}

.guide-footer-links a:hover {
  text-decoration: underline;
}

.guide-footer-links span {
  margin: 0 8px;
  color: var(--text-subtle);
}

/* --------------------------------------------------------------------------
   Responsive: Tablet (768-1024px)
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .guide-toc {
    display: none;
  }

  .guide-related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* --------------------------------------------------------------------------
   Responsive: Mobile (<768px)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .guide-layout {
    padding: 32px 16px 64px;
  }

  body {
    font-size: var(--guide-body-size-mobile);
  }

  .guide-article h1 {
    font-size: var(--guide-h1-size-mobile);
  }

  .guide-article h2 {
    font-size: var(--guide-h2-size-mobile);
    margin-top: 36px;
  }

  .guide-hub-header h1 {
    font-size: 28px;
  }

  .guide-cta-banner {
    padding: 24px 20px;
  }

  .guide-cta-banner p {
    font-size: 16px;
  }

  .guide-related-grid {
    grid-template-columns: 1fr;
  }

  .guide-article table,
  .guide-table {
    font-size: 14px;
  }

  .guide-article table th,
  .guide-article table td,
  .guide-table th,
  .guide-table td {
    padding: 10px 12px;
  }

  .guide-faq__question {
    font-size: var(--guide-body-size-mobile);
  }

  .guide-timeline__content {
    font-size: var(--guide-body-size-mobile);
  }

  .guide-breadcrumb {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   Reduced Motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .guide-faq__icon {
    transition: none;
  }

  .guide-faq__answer {
    transition: none;
  }

  details.guide-faq__item .guide-faq__body {
    animation: none;
  }

  .guide-related-card {
    transition: none;
  }

  .guide-cta-btn {
    transition: none;
  }

  .guide-article a {
    transition: none;
  }

  #guide-toc-nav ul a {
    transition: none;
  }

  .guide-hub-links a {
    transition: none;
  }
}

/* --------------------------------------------------------------------------
   Print Stylesheet
   -------------------------------------------------------------------------- */
@media print {
  .header,
  .guide-breadcrumb,
  .guide-toc,
  .guide-cta-banner,
  .guide-related,
  .guide-hub-nav,
  .skip-link {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 12pt;
  }

  .guide-layout {
    padding: 0;
    max-width: 100%;
  }

  .guide-article h1 {
    font-size: 24pt;
  }

  .guide-article h2 {
    font-size: 18pt;
  }

  .guide-article a {
    color: #000;
    text-decoration: underline;
  }

  .guide-article a[href]::after {
    content: " (" attr(href) ")";
    font-size: 9pt;
    color: #555;
  }

  .legal-badge {
    background: none;
    border: none;
    border-bottom: 1px solid #555;
    color: #000;
  }

  .guide-footnotes {
    color: #333;
  }

  .guide-article table th,
  .guide-table th {
    background-color: #333;
    color: #fff;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .guide-article table tbody tr:nth-child(even),
  .guide-table tbody tr:nth-child(even) {
    background-color: #f0f0f0;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}
