/* Project: Common Ground Accessibility
 * Author: Laurie Kamrowski-Fick
 * Copyright © 2026 Common Ground Accessibility
 * Concepts library: introductory content, format filters, and expandable learning cards.
 */
/* COLOR PALETTE: All colors must be kept in this :root block. Use var(--...) in the rules below. */
:root {
  --concept-ink: #173e35;
  --concept-muted: #435c53;
  --concept-paper: #faf8f1;
  --concept-white: #fff;
  --concept-line: #ccd2c5;
  --concept-surface: #eef0e6;
  --concept-accent: #536b32;
  --concept-tag: #e1edb7;
  --concept-focus: #a34a18;
}
/* INTRODUCTION: Preserve the established serif heading, cream canvas, and spacious rhythm. */
.concept-hero {
  padding: 64px 0 48px;
}
.concept-hero h1 {
  max-width: 18ch;
  overflow-wrap: anywhere;
}
.concept-hero-note {
  max-width: 70ch;
  color: var(--concept-muted);
}
.concept-hero .actions {
  flex-wrap: wrap;
  margin-top: 28px;
}
/* FILTER PANEL: Visible text labels and native inputs remain operable with keyboard and touch. */
.concept-filter-section {
  background: var(--concept-surface);
  border-block: 1px solid var(--concept-line);
  padding: 32px 0;
}
.concept-filter-section h2 {
  margin: 0 0 20px;
  font-size: 30px;
}
.concept-search-fields {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}
.concept-search-fields label {
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
}
.concept-search-fields input,
.concept-search-fields select {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 12px;
  border: 1px solid var(--concept-muted);
  background: var(--concept-white);
  color: var(--concept-ink);
  font: inherit;
}
.concept-format-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  border: 0;
  padding: 0;
  margin: 22px 0 0;
}
.concept-format-options legend {
  font-weight: 700;
  margin-bottom: 8px;
}
.concept-format-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 6px 12px;
  border: 1px solid var(--concept-line);
  background: var(--concept-paper);
  cursor: pointer;
}
.concept-format-options input {
  width: 20px;
  height: 20px;
  accent-color: var(--concept-ink);
}
.concept-format-options label:has(input:checked) {
  background: var(--concept-tag);
  border-color: var(--concept-ink);
}
.concept-filter-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 16px;
}
.concept-filter-footer p {
  max-width: 75ch;
  margin: 0;
  font-size: 14px;
}
.concept-reset {
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--concept-ink);
  background: var(--concept-ink);
  color: var(--concept-white);
  font: inherit;
  cursor: pointer;
}
/* CONTEXT AND RESULTS: The count changes without moving focus or reordering cards. */
.concept-context {
  padding-block: 24px;
  color: var(--concept-muted);
}
.concept-context p {
  max-width: 90ch;
  margin: 0;
}
.concept-results {
  padding-bottom: 56px;
  scroll-margin-top: 24px;
}
.concept-results-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-bottom: 24px;
}
.concept-results-heading h2 {
  font-size: 36px;
  margin: 0;
}
.concept-results-heading p {
  color: var(--concept-muted);
  margin: 0;
}
.concept-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}
/* CARD CONTENT: Format tags use readable words, with color only as an additional visual cue. */
.concept-card {
  min-width: 0;
  background: var(--concept-white);
  border: 1px solid var(--concept-line);
  border-top: 4px solid var(--concept-accent);
  padding: 28px;
  scroll-margin-top: 24px;
  overflow-wrap: anywhere;
}
.concept-topic {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--concept-accent);
}
.concept-card h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 30px;
  line-height: 1.2;
  margin: 0 0 16px;
}
.concept-summary {
  margin: 0 0 20px;
}
.concept-tag-label {
  font-size: 13px;
  font-weight: 700;
  margin: 16px 0 8px;
}
.concept-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.concept-tags li {
  background: var(--concept-surface);
  color: var(--concept-ink);
  padding: 5px 9px;
  font-size: 13px;
}
/* DISCLOSURES: Native summary exposes expanded state; examples scroll locally instead of widening the page. */
.concept-explanation {
  border-top: 1px solid var(--concept-line);
  margin-top: 22px;
}
.concept-explanation summary {
  min-height: 48px;
  padding: 14px 0 4px;
  font-weight: 700;
  cursor: pointer;
}
.concept-explanation dt {
  font-weight: 700;
  margin-top: 18px;
}
.concept-explanation dd {
  margin: 4px 0 0;
}
.concept-explanation pre {
  padding: 16px;
  background: var(--concept-surface);
  color: var(--concept-ink);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 14px;
}
.concept-sources {
  padding-left: 20px;
  margin: 0;
}
.concept-sources li {
  margin-bottom: 10px;
}
.concept-empty {
  background: var(--concept-surface);
  border: 1px solid var(--concept-line);
  padding: 24px;
}
.concept-return {
  margin-top: 32px;
}
/* ACCESSIBILITY: Keep hidden results out of layout and provide a distinct keyboard-focus outline. */
.concepts-page [hidden] {
  display: none !important;
}
.concepts-page :is(input, select, button, summary, a):focus-visible {
  outline: 3px solid var(--concept-focus);
  outline-offset: 4px;
}
.concept-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
/* SMALL SCREENS: Stack search fields and cards, preserving source order and comfortable controls. */
@media (max-width: 760px) {
  .concept-hero {
    padding: 40px 0 32px;
  }
  .concept-grid,
  .concept-search-fields {
    grid-template-columns: 1fr;
  }
  .concept-card {
    padding: 22px;
  }
  .concept-format-options label {
    flex: 1 1 145px;
  }
}
/* PRINT: Use one column and omit filters; expand desired explanations before printing. */
@media print {
  .concept-filter-section,
  .concept-return {
    display: none !important;
  }
  .concept-grid {
    display: block;
  }
  .concept-card {
    margin-bottom: 20px;
    break-inside: avoid;
  }
}
