/*
  PageCraft — style.css
  =====================
  Sections:
     1. Custom Properties (Color Tokens)
     2. Reset
     3. Base / Typography
     4. Layout
     5. Skip Link & Visually Hidden
     6. Header & Navigation
     7. Theme Toggle Button
     8. Code Blocks & Syntax Highlighting
     9. Cards
    10. Hero (homepage)
    11. Section Intro
    12. Footer
    13. Content Page Typography
    14. Breadcrumb
    15. Blockquotes & Callouts
    16. Success Criteria Boxes
    17. WCAG Principle Sections
    18. Definition Lists (Level A / AA / AAA)
    19. Resource Lists
    20. Footnotes
*/


/* ============================================================
   1. CUSTOM PROPERTIES — COLOR TOKENS
   ============================================================
   All colors live here as CSS custom properties (also called CSS
   variables). Nothing in this file uses a raw color value — every
   color references a token like var(--color-text).

   Why? Because dark/light mode switching is then a single operation:
   redefine the tokens on <html>, and every element on the page updates
   instantly. No JavaScript touching individual elements, no class toggling
   on hundreds of nodes.

   Tokens are defined in four blocks:

   a) :root              — dark mode, our default
   b) prefers-color-scheme: light
                         — light mode when the system prefers it AND the
                           user hasn't made a manual choice yet
   c) [data-theme="dark"]  — manual override: always dark
   d) [data-theme="light"] — manual override: always light

   Blocks (c) and (d) appear after (b) in source order. When specificity
   is equal — and [data-theme] and :root inside a media query have the
   same specificity — later declarations win. So the attribute blocks
   always override the media query. This is how the JS toggle works.

   All color pairs pass WCAG AA (4.5:1 minimum for normal text).
   ============================================================ */

:root {
  /* dark mode — default */
  --color-bg:               #1a1714;
  --color-surface:          #221f1a;
  --color-text:             #e8e2d9;
  --color-text-secondary:   #9b9188;
  --color-accent:           #7fcba0;
  --color-accent-secondary: #e8a060;
  --color-link:             #85b5d6;
  --color-string:           #c4a0d6;
  --color-comment:          #918b88;
  --color-border:           #3a342c;
  --color-accent-border:    #7fcba0;
}

@media (prefers-color-scheme: light) {
  /*
    Applied when:
      - the system/browser reports a light preference, AND
      - no data-theme attribute has been set on <html> by JavaScript

    If JavaScript is disabled, this block handles system-light users
    entirely. If JS is enabled, the head script sets data-theme
    before the page paints, and blocks (c)/(d) below take over.
  */
  :root {
    --color-bg:               #faf7f0;
    --color-surface:          #f0ece2;
    --color-text:             #1c1914;
    --color-text-secondary:   #6b6158;
    --color-accent:           #246947;
    --color-accent-secondary: #964f20;
    --color-link:             #1a538a;
    --color-string:           #7a3a8a;
    --color-comment:          #6b6158;
    --color-border:           #d4cec4;
    --color-accent-border:    #246947;
  }
}

[data-theme="dark"] {
  /* manual override: user clicked the toggle → always dark */
  --color-bg:               #1a1714;
  --color-surface:          #221f1a;
  --color-text:             #e8e2d9;
  --color-text-secondary:   #9b9188;
  --color-accent:           #7fcba0;
  --color-accent-secondary: #e8a060;
  --color-link:             #85b5d6;
  --color-string:           #c4a0d6;
  --color-comment:          #918b88;
  --color-border:           #3a342c;
  --color-accent-border:    #7fcba0;
}

[data-theme="light"] {
  /* manual override: user clicked the toggle → always light */
  --color-bg:               #faf7f0;
  --color-surface:          #f0ece2;
  --color-text:             #1c1914;
  --color-text-secondary:   #6b6158;
  --color-accent:           #246947;
  --color-accent-secondary: #964f20;
  --color-link:             #1a538a;
  --color-string:           #7a3a8a;
  --color-comment:          #6b6158;
  --color-border:           #d4cec4;
  --color-accent-border:    #246947;
}


/* ============================================================
   2. RESET
   ============================================================
   A minimal reset — we're not zeroing everything, just correcting
   the browser defaults that consistently cause problems.

   box-sizing: border-box  — padding and border are included in the
   element's stated width. Without this, adding padding to a 100%-wide
   element makes it overflow its container. The default (content-box)
   is almost never what you want.

   margin: 0 on body  — browsers add a default margin to <body>.
   We'll add spacing explicitly where we want it.

   max-width + display: block on images  — prevents images from
   overflowing their containers and removes the baseline gap that
   appears under inline images (a consequence of images being
   inline elements by default).
   ============================================================ */

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

body {
  margin: 0;
}

img,
video {
  max-width: 100%;
  display: block;
}

ul,
ol {
  /* Remove default padding so we can control list indentation ourselves */
  padding-inline-start: 1.25rem;
}


/* ============================================================
   3. BASE / TYPOGRAPHY
   ============================================================
   Both fonts are loaded via <link> in each page's <head> — look
   for the Google Fonts preconnect and stylesheet links there.
   We reference them here by name only.

   Space Mono for headings  — monospace signals technical context
   without feeling cold. It also reads differently from body text,
   giving the site a distinct voice.

   Atkinson Hyperlegible for body  — designed specifically for
   low-vision readers. Letterforms are highly distinct: 1, l, I are
   clearly different; 0 and O don't blur together.

   Courier New, Courier, monospace for code  — the system fallback
   chain. No web font needed for code; the monospace system fonts
   are universally available.

   font-size: 1rem (16px)  — browser default, and the accessibility
   minimum. Never set a base font size below 16px.

   line-height: 1.67  — generous leading. Research consistently shows
   that line heights between 1.5 and 1.7 are easiest to read for
   long-form text.
   ============================================================ */

body {
  font-family: 'Atkinson Hyperlegible', system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.67;
  color: var(--color-text);
  background-color: var(--color-bg);
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Space Mono', monospace;
  color: var(--color-accent);
  line-height: 1.25;
  font-weight: 700;
  margin-block-start: 0;
}

p {
  margin-block-start: 0;
}

a {
  /*
    Links are always underlined — color alone must never be the only
    indicator that something is a link. This is a WCAG 1.4.1 requirement
    (Use of Color). Many users have color vision deficiencies, and even
    those who don't can find link boundaries ambiguous in dense text.

    Underlining is also just the old-web convention. We're honoring it
    because it's correct, not just nostalgic.
  */
  color: var(--color-link);
  text-decoration: underline;
}

a:hover {
  text-decoration-thickness: 2px;
}

a:focus-visible {
  /*
    :focus-visible shows an outline for keyboard users but not mouse
    users. This is preferable to :focus (which shows on click too) and
    much better than outline: none (which removes focus rings entirely —
    a common accessibility mistake).
  */
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 2px;
}

code, kbd, samp {
  font-family: 'Courier New', Courier, monospace;
}


/* ============================================================
   4. LAYOUT
   ============================================================
   A single centered container with a max-width keeps long lines
   readable. Lines longer than ~75 characters are harder to read —
   the eye has to travel farther to find the start of the next line.

   padding-inline is the logical-property version of padding-left
   and padding-right. Logical properties work with writing direction,
   so they're the right choice for any site that might support
   right-to-left text in the future.
   ============================================================ */

.container {
  max-width: 60rem;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

main {
  padding-block: 3rem 4rem;
}


/* ============================================================
   5. SKIP LINK & VISUALLY HIDDEN
   ============================================================
   The skip link is the first focusable element on every page. It
   lets keyboard users jump directly to the main content, bypassing
   the navigation. Without it, someone tabbing through the page must
   hit every nav link on every page load before reaching the content.

   It's visually hidden until focused — then it appears at the top
   of the viewport. This approach serves keyboard users without
   cluttering the visual design for mouse users.

   The .visually-hidden class is a standard pattern for content that
   should be available to screen readers but invisible on screen.
   Never use display: none or visibility: hidden for this purpose —
   those remove the content from the accessibility tree entirely.
   ============================================================ */

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 999;
  padding: 0.5rem 1rem;
  background-color: var(--color-accent);
  color: var(--color-bg);
  font-family: 'Space Mono', monospace;
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 0 0 4px 4px;
}

.skip-link:focus {
  top: 0;
}

.visually-hidden {
  /*
    Moves the element off-screen without hiding it from assistive tech.
    The specific values (1px dimensions, negative margin, clip) are
    the result of years of cross-browser and cross-screen-reader testing.
    Don't simplify this — each property is doing something.

    clip: rect() is the legacy form and is deprecated in CSS. clip-path:
    inset(50%) is the modern replacement and does the same job. Both are
    included here for broadest compatibility — older browsers use clip,
    modern browsers use clip-path.
  */
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}


/* ============================================================
   6. HEADER & NAVIGATION
   ============================================================
   The 3px top border on the header is the primary retro gesture —
   it echoes the thick colored horizontal rules and header bars of
   early web design. One line, high contrast, applied to the <header>
   wrapper rather than the <nav> itself so it spans the full width.

   The <nav> element is a landmark — screen readers can jump directly
   to landmarks without tabbing through every element. aria-label
   distinguishes this nav from any others on the page (like a footer
   nav). See the HTML for the full aria-label explanation.

   The logo uses margin-inline-end: auto to push the nav links and
   toggle to the right. This is the flexbox "spacer" pattern — one
   flex item with auto margin consumes all available space on that
   side, pushing siblings to the opposite end.
   ============================================================ */

header {
  /*
    position: sticky keeps the nav visible as the user scrolls.
    z-index: 100 ensures it appears above page content.
    Without z-index, sticky elements can slip behind other positioned
    elements.
  */
  border-top: 3px solid var(--color-accent-border);
  background-color: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: 60rem;
  margin-inline: auto;
  padding-inline: 1.5rem;
  padding-block: 0.875rem;
}

.nav-logo {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--color-accent);
  text-decoration: none;
  margin-inline-end: auto;
}

.nav-logo:hover {
  text-decoration: underline;
}

.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  font-family: 'Space Mono', monospace;
  font-size: 0.875rem;
  color: var(--color-text);
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--color-accent);
  text-decoration: underline;
}

.nav-links a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/*
  aria-current="page" is set by JavaScript on whichever nav link matches
  the current page. It lets screen reader users know which section they're
  in when they reach the navigation, and gives sighted users a visual
  indicator too. The underline + accent color combination means it's not
  communicated by color alone (WCAG 1.4.1).
*/
.nav-links a[aria-current="page"] {
  color: var(--color-accent);
  text-decoration: underline;
}


/* ============================================================
   7. THEME TOGGLE BUTTON
   ============================================================
   The toggle is a <button> — not a <div>, not an <a>. Buttons are
   keyboard-focusable and activated by both Enter and Space by default.
   They're announced as "button" by screen readers. A <div> with an
   onclick gives you none of that without significant extra work.

   min-width/min-height: 44px  — WCAG 2.5.5 (Target Size) recommends
   interactive targets be at least 44x44px for touch accuracy. The
   icon itself can be smaller; the tap/click area must not be.

   The actual label text is supplied by JavaScript via aria-label,
   which overrides the icon text for screen readers. The icon is
   visual chrome only. See the bottom <script> in the HTML for how
   the label updates with the theme state.
   ============================================================ */

.theme-toggle {
  background: none;
  border: 1px solid transparent;
  cursor: pointer;
  color: var(--color-accent-secondary);
  font-size: 1.1rem;
  padding: 0;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  line-height: 1;
}

.theme-toggle:hover {
  background-color: var(--color-border);
  border-color: var(--color-border);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}


/* ============================================================
   8. CODE BLOCKS & SYNTAX HIGHLIGHTING
   ============================================================
   <pre> preserves whitespace and wraps in a scrollable block.
   overflow-x: auto prevents the block from breaking the page layout
   on narrow screens while still allowing wide code to scroll.

   Inline <code> (inside a paragraph) gets a subtle background and
   border to distinguish it from surrounding text without needing
   a color-only indicator.

   pre code resets the inline-code styles — inside a <pre>, the
   <code> is the content container, not a highlighted inline snippet.

   Syntax highlighting uses four semantic span classes:
     .tag   — HTML element names (e.g., <nav>, <section>)
     .attr  — HTML attribute names (e.g., href, aria-label)
     .str   — attribute values and strings (e.g., "main navigation")
     .cmt   — code comments

   These are applied by hand in the HTML using <span> elements.
   No JavaScript library needed for static examples. This keeps the
   source readable and the highlighting intentional.
   ============================================================ */

pre {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  line-height: 1.5;
  margin-block: 1.5rem;
}

code {
  font-size: 0.9em;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 2px;
  padding: 0.125em 0.35em;
}

pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 1em;
}

.tag  { color: var(--color-accent); }
.attr { color: var(--color-accent-secondary); }
.str  { color: var(--color-string); }
.cmt  { color: var(--color-comment); font-style: italic; }


/* ============================================================
   9. CARDS
   ============================================================
   Cards are used on the section landing pages to present links
   to individual content pages.

   The grid uses auto-fill with a minmax() to create a responsive
   multi-column layout without any media queries. auto-fill creates
   as many columns as will fit; minmax(16rem, 1fr) sets a minimum
   column width of 16rem and allows columns to grow equally. When
   the container is too narrow for two 16rem columns, the grid
   automatically collapses to one column. This is responsive design
   without a breakpoint.
   ============================================================ */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 1.5rem;
  margin-block-start: 2rem;
}

.card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  /*
    prefers-reduced-motion: reduce — some users configure their OS to
    minimize motion because animations cause problems for them (vestibular
    disorders, epilepsy, cognitive differences). WCAG 2.3.3 (AAA) asks us
    to respect this. The transition is removed entirely when the user has
    requested reduced motion; the hover state still changes (border color
    updates immediately), just without the animation.
  */
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

@media (prefers-reduced-motion: reduce) {
  .card {
    transition: none;
  }
}

.card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  border-color: var(--color-accent-border);
}

.card-title {
  margin-block: 0 0.5rem;
  font-size: 1.125rem;
  color: var(--color-accent);
}

.card-desc {
  color: var(--color-text-secondary);
  margin-block-end: 1.25rem;
  flex: 1;
  font-size: 0.9375rem;
}

.card-link {
  display: inline-block;
  font-family: 'Space Mono', monospace;
  font-size: 0.8125rem;
  color: var(--color-accent);
  /*
    Always underlined — color alone must never be the only indicator
    that something is a link. WCAG 1.4.1 (Use of Color). The site
    teaches this rule; the site itself must follow it.
  */
  text-decoration: underline;
  margin-block-start: auto;
  align-self: flex-start;
}

.card-link:hover {
  text-decoration-thickness: 2px;
}

.card-link:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 2px;
}


/* ============================================================
  10. HERO (homepage)
   ============================================================
   The hero section introduces the site. It uses clamp() for the
   heading size — clamp(min, preferred, max) lets the font scale
   fluidly between the min and max values based on viewport width,
   without a media query. 5vw is the preferred size at any viewport;
   at very small screens it floors at 1.75rem, at large screens it
   caps at 2.75rem.
   ============================================================ */

.hero {
  padding-block: 3rem 2rem;
  border-bottom: 1px solid var(--color-border);
  margin-block-end: 3rem;
}

.hero-title {
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  margin-block-end: 0.5rem;
}

.tagline {
  font-family: 'Space Mono', monospace;
  color: var(--color-text-secondary);
  font-size: 1rem;
  margin-block-end: 1.5rem;
}

.hero-desc {
  max-width: 44rem;
  margin-block-end: 0;
  font-size: 1.0625rem;
}

.view-source-note {
  margin-block-start: 3rem;
  color: var(--color-text-secondary);
  font-size: 0.9375rem;
}

/* ============================================================
  11. SECTION INTRO
   ============================================================
   Used on Learn and Build landing pages above the card grid.
   ============================================================ */

.section-intro {
  max-width: 44rem;
  margin-block-end: 0;
  font-size: 1.0625rem;
  color: var(--color-text-secondary);
}

/* ============================================================
  12. FOOTER
   ============================================================ */

footer {
  border-top: 1px solid var(--color-border);
  padding-block: 2rem;
  text-align: center;
  color: var(--color-text-secondary);
  font-size: 0.875rem;
  font-family: 'Space Mono', monospace;
}

footer p {
  margin: 0;
}


/* ============================================================
  13. CONTENT PAGE TYPOGRAPHY
   ============================================================
   The landing pages (index.html files) use the card grid pattern.
   The content pages (what-is-wcag.html, perceivable.html, etc.)
   use running prose. These styles handle that context.

   Headings: the base h1–h6 styles set color, font-family, and
   margin-block-start: 0. This section adds sizing and bottom
   spacing appropriate for long-form content.

   <hr> elements separate major sections. We style them to be
   subtle — the border color tokens keep them visible but quiet
   against both light and dark backgrounds.

   Paragraphs: the base p has margin-block-start: 0. We add a
   bottom margin here to create vertical rhythm between paragraphs.
   This is not set in section 3 because landing pages have their
   own spacing via card and hero styles.

   <ul> and <ol> in content: browser defaults give lists decent
   spacing, but adding explicit block margin ensures they breathe
   within the surrounding paragraphs.
   ============================================================ */

/*
  Page-level heading. Larger than h2 but still comfortable at
  narrow widths — clamp() scales it smoothly.
*/
.container h1 {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  margin-block-end: 1.5rem;
}

/*
  Section headings. The top margin creates a visual "paragraph break"
  between sections. Because <hr> elements come before h2 in the
  content pages, and we want h2 to feel attached to what follows
  (not floating between the hr and its content), the top margin is
  smaller than it would otherwise be.
*/
.container h2 {
  font-size: clamp(1.125rem, 2.5vw, 1.375rem);
  margin-block-end: 0.75rem;
  margin-block-start: 1.5rem;
}

/*
  Sub-section headings. Used inside .success-criteria and other
  grouped content. Slightly de-emphasized — accent-secondary color
  instead of accent — so they don't compete with h2 section headings.
*/
.container h3 {
  font-size: 0.9375rem;
  color: var(--color-accent-secondary);
  margin-block-end: 0.5rem;
  margin-block-start: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/*
  Paragraphs in content context get explicit bottom margin so
  stacked paragraphs breathe. 1.25rem ≈ 20px at default font size,
  which is comfortable without feeling like double-spaced text.
*/
.container p {
  margin-block-end: 1.25rem;
}

/*
  Section dividers. These visually separate guideline sections on the
  WCAG content pages. We use the border color token so they adapt to
  light/dark mode automatically. margin-block provides generous
  breathing room above and below.
*/
.container hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin-block: 2.5rem;
}

/*
  In-content lists. Adds vertical margin so lists breathe within
  surrounding paragraphs, and a slightly looser line height for
  multi-line list items.
*/
.container ul,
.container ol {
  margin-block-end: 1.25rem;
  line-height: 1.7;
}

.container li + li {
  margin-block-start: 0.375rem;
}


/* ============================================================
  14. BREADCRUMB
   ============================================================
   The breadcrumb uses <nav aria-label="Breadcrumb"><ol> so that:
   - Screen readers expose it as a distinct "Breadcrumb" navigation
     landmark, separate from "Main navigation."
   - The ordered list communicates hierarchy — position in the list
     tells you position in the site structure.
   - aria-current="page" on the last item tells screen reader users
     which page they're on without relying on visual styling.

   CSS separators (›) are placed via ::before on all items after the
   first. Screen readers in most modern browsers skip CSS-generated
   content, so they don't announce the separators. This is the correct
   approach — no extra aria-hidden spans needed in the HTML.

   The breadcrumb nav inherits flex display from the global nav rule
   in section 6. We reset it to block here because the breadcrumb
   lives inside .container (which already handles width and padding)
   and should behave as a normal block element.
   ============================================================ */

.breadcrumb {
  /* Override the flex layout, max-width, and padding from the
     global nav {} rule — the breadcrumb is inside .container
     and doesn't need any of that. */
  display: block;
  max-width: none;
  margin-inline: 0;
  padding-inline: 0;
  padding-block: 0;
  margin-block-end: 2rem;
}

.breadcrumb ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  font-family: 'Space Mono', monospace;
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
}

.breadcrumb li {
  display: flex;
  align-items: center;
}

/*
  The › separator is generated content — it appears between list
  items. display: flex on each <li> lets us align the separator and
  text vertically. This approach keeps the HTML clean (no separator
  spans or entities needed in the markup) and works visually.
*/
.breadcrumb li + li::before {
  content: '›';
  padding-inline: 0.5rem;
  color: var(--color-text-secondary);
}

.breadcrumb a {
  color: var(--color-text-secondary);
  text-decoration: none;
}

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

.breadcrumb a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/*
  The last breadcrumb item (aria-current="page") is plain text —
  no anchor, since you're already on this page. We make it slightly
  more prominent than the ancestor links to distinguish current
  location from history.
*/
.breadcrumb [aria-current="page"] {
  color: var(--color-text);
}


/* ============================================================
  15. BLOCKQUOTES & CALLOUTS
   ============================================================
   Two blockquote variants are used in content pages:

   .scope-note — the "note on scope" at the top of each POUR page,
   explaining which criteria the page covers. Quiet, secondary color,
   a left border to distinguish it from body text.

   .resource-callout — inline tips pointing to external tools or
   resources mid-article (e.g., "Try this contrast checker"). Warmer
   tone, accent-secondary color, meant to feel like a helpful sidebar
   note rather than a disclaimer.

   Both use a left border (border-inline-start) rather than full
   background fill. A full background can overwhelm the reading
   experience on pages with many callouts. The border draws the eye
   without interrupting the text flow.

   border-inline-start is the logical-property form of border-left.
   It flips to border-right in RTL layouts, so content remains
   visually correct if the site ever supports Arabic or Hebrew.
   ============================================================ */

blockquote {
  /* Base reset — browsers add unwieldy margins and sometimes italic
     to blockquotes. We'll style each variant explicitly. */
  margin-inline: 0;
  margin-block: 0;
}

.scope-note {
  border-inline-start: 3px solid var(--color-border);
  padding-inline-start: 1.25rem;
  margin-block: 1.5rem;
  color: var(--color-text-secondary);
  font-size: 0.9375rem;
}

.scope-note p {
  margin-block-end: 0;
}

.resource-callout {
  border-inline-start: 3px solid var(--color-accent-secondary);
  padding-inline-start: 1.25rem;
  background-color: var(--color-surface);
  border-radius: 0 4px 4px 0;
  padding-block: 0.875rem;
  margin-block: 1.5rem;
  font-size: 0.9375rem;
}

.resource-callout p {
  margin-block-end: 0;
}


/* ============================================================
  16. SUCCESS CRITERIA BOXES
   ============================================================
   Each guideline section on the POUR pages ends with a
   .success-criteria box summarizing the testable WCAG requirements
   that section covers. This gives readers a quick reference they
   can scan without re-reading the prose.

   The box uses .color-surface as the background so it contrasts
   gently with the page background — enough to be visually distinct,
   not so much that it feels like a warning or error state.

   Criterion numbers like 1.4.3 are wrapped in <code> in the HTML.
   Their inline-code styling (from section 8) renders them with a
   subtle background and border, making them scannable at a glance —
   the way version numbers or reference codes look in documentation.
   ============================================================ */

.success-criteria {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 1.25rem 1.5rem;
  margin-block: 1.5rem;
}

/*
  The h3 inside .success-criteria overrides the global .container h3
  rule above. We keep uppercase + letter-spacing but use the accent
  color here to give the box its own voice. The small bottom margin
  keeps the list visually close to its label.
*/
.success-criteria h3 {
  color: var(--color-accent);
  margin-block-start: 0;
  margin-block-end: 0.75rem;
}

.success-criteria ul {
  margin-block-end: 0;
  padding-inline-start: 1.25rem;
}

.success-criteria li + li {
  margin-block-start: 0.5rem;
}

/*
  De-emphasize the compliance level label at the end of each criterion
  (e.g., "— Level AA"). This text matters, but it shouldn't compete
  visually with the criterion description.
*/
.success-criteria code {
  font-size: 0.8125rem;
}


/* ============================================================
  17. WCAG PRINCIPLE SECTIONS
   ============================================================
   Styles for elements specific to what-is-wcag.html and the
   POUR principle deep-dive pages.

   .pour-principle — each <section> on what-is-wcag.html wrapping
   one of the four POUR principle summaries. A subtle border-top
   (not the accent color — that's for section headings) marks the
   start of each principle block without adding visual noise.

   .principle-link — the "Perceivable in depth →" links at the
   bottom of each POUR section on what-is-wcag.html. Styled like a
   small button or action cue — monospace, accent color, no
   background. Arrow (→) is a content-forward indicator.

   .principle-label — the "(In Depth)" span inside the h1 on each
   POUR page (e.g., "Perceivable (In Depth)"). This is a subtitle
   rather than part of the main heading — smaller, text-secondary,
   normal weight so it doesn't read as a separate heading.
   ============================================================ */

.pour-principle {
  padding-block-start: 1.5rem;
  border-top: 1px solid var(--color-border);
  margin-block-start: 1.5rem;
}

/*
  The first .pour-principle doesn't need a top divider — the <hr>
  above the h2 already creates separation. This removes the redundant
  double line between the "How WCAG is structured" section and the
  first principle.
*/
.pour-principle:first-of-type {
  border-top: none;
  padding-block-start: 0;
  margin-block-start: 0;
}

.pour-principle h3 {
  color: var(--color-accent);
  font-size: 1.0625rem;
  margin-block-start: 0;
  margin-block-end: 0.75rem;
  text-transform: none;
  letter-spacing: 0;
}

.principle-link {
  display: inline-block;
  font-family: 'Space Mono', monospace;
  font-size: 0.8125rem;
  color: var(--color-accent);
  text-decoration: underline;
  margin-block-start: 0.75rem;
}

.principle-link:hover {
  text-decoration-thickness: 2px;
}

.principle-link:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 2px;
}

.principle-label {
  font-size: 0.875em;
  font-weight: 400;
  color: var(--color-text-secondary);
  /* Prevent the subtitle from wrapping to its own line on narrow
     screens — keep it visually attached to the principle name. */
  white-space: nowrap;
}


/* ============================================================
  18. DEFINITION LISTS (LEVEL A / AA / AAA)
   ============================================================
   The .level-list class is used on the <dl> that defines the three
   WCAG compliance levels on what-is-wcag.html.

   <dl> (description list) is semantically correct for term–definition
   pairs. The browser's default rendering stacks <dt> and <dd> with
   the <dd> indented. We keep the structure but refine the visual
   presentation to match the content page aesthetic.

   Each <dt> is rendered in monospace at accent color — consistent
   with how headings work on this site, since level names ("Level A",
   "Level AA") function as sub-headings. The <dd> is normal body text.
   ============================================================ */

.level-list {
  margin-block: 1.5rem;
}

.level-list dt {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  color: var(--color-accent-secondary);
  font-size: 0.9375rem;
  margin-block-start: 1.25rem;
}

/*
  First dt doesn't need extra top margin — the surrounding prose
  already creates space above the list.
*/
.level-list dt:first-child {
  margin-block-start: 0;
}

.level-list dd {
  margin-inline-start: 0;
  margin-block-start: 0.25rem;
  color: var(--color-text);
}


/* ============================================================
  19. RESOURCE LISTS
   ============================================================
   .resource-list is the <ul> used in "Going Deeper" sections.
   Standard list, but with slightly more spacing between items
   and a custom bullet that matches the site's aesthetic — a
   small accent-colored marker instead of the browser default disc.

   list-style: none removes the default bullet, then we add our
   own via ::before. This gives us color control — the default
   disc inherits text color, but we want the accent color.
   ============================================================ */

.resource-list {
  list-style: none;
  padding-inline-start: 0;
  margin-block: 1rem;
}

.resource-list li {
  padding-inline-start: 1.25rem;
  position: relative;
  margin-block-start: 0.75rem;
}

.resource-list li:first-child {
  margin-block-start: 0;
}

/*
  The accent-colored › serves as our bullet. It's placed with
  absolute positioning so it doesn't affect the text's left margin.
  font-family: monospace ensures the character renders at a
  consistent size and position across fonts.
*/
.resource-list li::before {
  content: '›';
  position: absolute;
  inset-inline-start: 0;
  color: var(--color-accent);
  font-family: 'Space Mono', monospace;
  font-size: 0.875rem;
  line-height: 1.7;
}


/* ============================================================
  20. FOOTNOTES
   ============================================================
   Footnotes use the <section aria-label="Footnotes"> pattern so
   screen readers can identify the section when navigating by
   landmarks. The <ol> provides numbered footnotes automatically.

   The visual styling de-emphasizes footnotes — they're reference
   material, not main content. Smaller text, secondary color, a
   top border to separate them from the main body without a full
   section divider.

   Inline footnote references in the body text use
   <sup><a href="#fn1" ...>[1]</a></sup>. The <sup> element moves
   the number to superscript (which is conventional and readable).
   The anchor links to the footnote below and has an aria-label
   so screen reader users hear "footnote 1" rather than just "[1]".

   The .fn-return link at the end of each footnote (↩) provides a
   way back to the inline reference. This is the standard accessible
   footnote pattern — keyboard and screen reader users can navigate
   to a footnote and return to their reading position.
   ============================================================ */

.footnotes {
  border-top: 1px solid var(--color-border);
  padding-block-start: 1.5rem;
  margin-block-start: 0.5rem;
}

.footnotes h2 {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  margin-block-start: 0;
  margin-block-end: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footnotes ol {
  padding-inline-start: 1.25rem;
  margin-block-end: 0;
}

.footnotes li {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-block-start: 0.5rem;
}

.footnotes li:first-child {
  margin-block-start: 0;
}

.footnotes a {
  /* Footnote links inherit link color. Keep them readable against
     the de-emphasized footnote text color. */
  font-size: inherit;
}

.fn-return {
  /* The ↩ return arrow. margin-inline-start creates a small gap
     between the footnote text and the return link so they don't
     run together. */
  margin-inline-start: 0.5rem;
  text-decoration: none;
  color: var(--color-text-secondary);
  font-size: 0.8125rem;
}

.fn-return:hover {
  color: var(--color-link);
  text-decoration: underline;
}

/*
  Inline footnote reference superscripts in the body text. The
  default <sup> applies a font-size: smaller — we fine-tune it here
  for consistency across browsers and make the link accessible.
*/
sup a {
  font-size: 0.75em;
  text-decoration: none;
  color: var(--color-accent-secondary);
}

sup a:hover {
  text-decoration: underline;
}
