/* Project: Common Ground Accessibility
 * Author: Laurie Kamrowski-Fick
 * Copyright © 2026 Common Ground Accessibility
 * Guide library, persistent chapter navigation, readable lessons, and semantic table examples.
 */
/* COLOR PALETTE: All colors must be kept in this :root block. Use var(--...) in the rules below. */
:root {
  --guide-ink: #173e35;
  --guide-paper: #faf8f1;
  --guide-white: #fff;
  --guide-line: #ccd2c5;
  --guide-muted: #435c53;
  --guide-surface: #eef0e6;
  --guide-active: #e1edb7;
  --guide-accent: #536b32;
  --guide-focus: #a34a18;
}
/* LIBRARY LANDING: Keep summaries short; the full lessons live on separate pages. */
.guides-intro {
  padding-block: 56px 32px;
}
.guides-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.guides-card {
  padding: 32px;
  border: 1px solid var(--guide-line);
  border-top: 4px solid var(--guide-accent);
  background: var(--guide-white);
}
.guides-card h2 {
  font-size: 34px;
  line-height: 1.2;
}
.guides-card .button {
  white-space: normal;
}
.guides-related {
  padding-block: 40px 56px;
}
.guides-related h2 {
  font-size: 32px;
}
/* PAGE FRAME: The left panel and the article are separate grid columns on desktop. */
.guide-breadcrumb {
  padding-block: 24px;
  font-size: 14px;
}
.guide-layout-shell {
  display: grid;
  grid-template-columns: 265px minmax(0, 1fr);
  gap: 44px;
  align-items: start;
  padding-bottom: 56px;
}
.guide-sidebar {
  position: sticky;
  top: 20px;
  max-height: calc(100vh - 40px);
  overflow: auto;
  background: var(--guide-surface);
  border: 1px solid var(--guide-line);
}
.guide-chapters summary {
  min-height: 48px;
  padding: 16px;
  font-weight: 700;
  cursor: pointer;
}
.guide-summary-current {
  display: block;
  font-size: 13px;
  font-weight: 400;
  margin-top: 4px;
}
.guide-sidebar-title {
  margin: 0;
  padding: 18px 16px 12px;
  font-weight: 700;
}
.guide-sidebar nav {
  display: block;
}
.guide-sidebar ol {
  list-style: none;
  margin: 0;
  padding: 0 8px 8px;
}
.guide-sidebar li + li {
  margin-top: 4px;
}
.guide-sidebar li a {
  display: block;
  padding: 10px 12px;
  border-left: 4px solid var(--guide-line);
  text-decoration: none;
  white-space: normal;
  overflow-wrap: anywhere;
}
.guide-sidebar li a[aria-current="page"] {
  border-left-color: var(--guide-ink);
  background: var(--guide-active);
}
.guide-sidebar li a:hover {
  text-decoration: underline;
}
.guide-chapter-title {
  display: block;
  font-size: 15px;
  font-weight: 700;
}
.guide-chapter-description {
  display: block;
  color: var(--guide-muted);
  font-size: 13px;
  line-height: 1.5;
  margin-top: 3px;
}
.guide-current-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-top: 5px;
}
.guide-all-link {
  display: block;
  min-height: 44px;
  padding: 12px 20px;
  border-top: 1px solid var(--guide-line);
}
/* LESSON: A readable line length and short sections keep each chapter manageable. */
.guide-article {
  min-width: 0;
  max-width: 78ch;
  overflow-wrap: anywhere;
}
.guide-article h1 {
  font-size: clamp(34px, 3.5vw, 48px);
  letter-spacing: -1.2px;
  line-height: 1.15;
  margin-top: 0;
}
.guide-article h2 {
  font-size: 28px;
  line-height: 1.25;
  margin-top: 28px;
  margin-bottom: 12px;
}
.guide-article p,
.guide-article li,
.guide-article dd {
  line-height: 1.75;
}
.guide-lead {
  font-size: 20px;
}
.guide-goal,
.guide-callout {
  padding: 16px 20px;
  background: var(--guide-surface);
  border-left: 4px solid var(--guide-accent);
}
.guide-callout p {
  margin: 0;
}
.guide-small {
  color: var(--guide-muted);
  font-size: 14px;
}
.guide-definitions dt {
  font-weight: 700;
}
.guide-definitions dd {
  margin: 0 0 12px;
}
/* CODE: Wrap long code locally; snippets remain selectable text, not executable examples. */
.guide-code {
  margin: 24px 0;
  border: 1px solid var(--guide-line);
}
.guide-code figcaption {
  padding: 10px 16px;
  background: var(--guide-surface);
  font-size: 14px;
  font-weight: 700;
}
.guide-code pre {
  margin: 0;
  padding: 18px;
  background: var(--guide-white);
  color: var(--guide-ink);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.65;
}
/* LIVE TABLE: Keep native table display, header cells, and the caption intact at every size. */
.guide-example {
  margin-block: 28px;
}
.guide-table-scroll {
  overflow-x: auto;
  max-width: 100%;
}
.workshop-table {
  width: 100%;
  border-collapse: collapse;
  color: var(--guide-ink);
  background: var(--guide-white);
}
.workshop-table caption {
  padding: 12px 0;
  text-align: left;
  font-weight: 700;
}
.workshop-table th,
.workshop-table td {
  padding: 12px;
  border: 1px solid var(--guide-line);
  text-align: left;
  vertical-align: top;
}
.workshop-table thead th {
  background: var(--guide-surface);
}
.guide-extra {
  margin-top: 24px;
  border-block: 1px solid var(--guide-line);
  padding-block: 8px;
}
.guide-extra > summary {
  min-height: 44px;
  padding-block: 10px;
  font-weight: 700;
  cursor: pointer;
}
/* BOTTOM LINKS: Both links perform real navigation and display their destination titles. */
.guide-pager {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--guide-line);
}
.guide-pager a {
  display: block;
  min-height: 70px;
  padding: 16px;
  background: var(--guide-surface);
  border: 1px solid var(--guide-line);
  white-space: normal;
}
.guide-pager a span,
.guide-pager a strong {
  display: block;
}
.guide-pager a span {
  font-size: 13px;
}
/* FOCUS: Every interactive guide element has an explicit visible keyboard indicator. */
.guide-layout-shell :is(a, summary, [tabindex]):focus-visible,
.guides-index a:focus-visible {
  outline: 3px solid var(--guide-focus);
  outline-offset: 3px;
}
@media (min-width: 900px) {
  .guide-chapters > summary {
    display: none;
  }
}
/* MOBILE: The chapter panel moves above content and becomes a native expandable disclosure. */
@media (max-width: 899px) {
  .guide-layout-shell,
  .guides-card-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .guide-sidebar {
    position: static;
    max-height: none;
    overflow: visible;
  }
  .guide-sidebar-title {
    display: none;
  }
  .guide-pager {
    grid-template-columns: 1fr;
  }
  .guides-card {
    padding: 24px;
  }
  .workshop-table th,
  .workshop-table td {
    padding: 8px;
  }
}
/* PRINT: Omit repeated navigation; retain the current chapter and its semantic example. */
@media print {
  .guide-sidebar,
  .guide-pager,
  .guide-breadcrumb {
    display: none;
  }
  .guide-layout-shell {
    display: block;
  }
}
