/*
Theme Name: Hub Docente Theme
Theme URI: https://example.invalid/
Author: Officina delle lettere
Description: Tema editoriale e didattico per un hub di materie umanistiche, progettato per lezioni, testi, percorsi, lessico e presentazioni.
Version: 0.3.3
Requires at least: 6.6
Requires PHP: 8.1
Text Domain: hub-docente-theme
*/

:root {
  --hd-paper: #f7f3ea;
  --hd-paper-light: #fcfaf5;
  --hd-paper-deep: #eee8dc;
  --hd-ink: #20201d;
  --hd-ink-soft: #484640;
  --hd-muted: #706c64;
  --hd-line: #d8d1c4;
  --hd-accent: #781f2b;
  --hd-accent-dark: #57141e;
  --hd-accent-soft: #efe0e1;
  --hd-info: #315a72;
  --hd-info-soft: #e4eef3;
  --hd-success: #3f654b;
  --hd-warning: #815a20;
  --hd-reading: 45rem;
  --hd-medium: 55rem;
  --hd-wide: 72rem;
  --hd-max: 80rem;
  --hd-serif: Georgia, 'Times New Roman', serif;
  --hd-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --hd-shadow: 0 18px 48px rgba(38, 31, 23, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--hd-paper);
  color: var(--hd-ink);
  font-family: var(--hd-serif);
  font-size: clamp(1.06rem, 1.2vw, 1.22rem);
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; }
a { color: var(--hd-accent); text-decoration-thickness: .08em; text-underline-offset: .16em; }
a:hover { color: var(--hd-accent-dark); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }

.hd-skip-link { position: fixed; left: 1rem; top: -10rem; z-index: 9999; background: var(--hd-ink); color: white; padding: .75rem 1rem; }
.hd-skip-link:focus { top: 1rem; }
.hd-container { width: min(var(--hd-max), calc(100% - clamp(2rem, 8vw, 6rem))); margin-inline: auto; }
.hd-reading { width: min(var(--hd-reading), calc(100% - 2rem)); margin-inline: auto; }
.hd-medium { width: min(var(--hd-medium), calc(100% - 2rem)); margin-inline: auto; }
.hd-wide { width: min(var(--hd-wide), calc(100% - 2rem)); margin-inline: auto; }
.hd-section { padding-block: clamp(3.5rem, 8vw, 7rem); border-top: 1px solid var(--hd-line); }
.hd-kicker, .hd-meta, .hd-label, .hd-card-type, .hd-phase-label, .hd-mastery-label, .hd-next-type {
  font-family: var(--hd-sans);
  font-size: .76rem;
  line-height: 1.35;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--hd-muted);
}
.hd-kicker { margin: 0 0 .8rem; }

h1, h2, h3, h4 { font-family: var(--hd-serif); line-height: 1.08; font-weight: 600; text-wrap: balance; }
h1 { font-size: clamp(2.45rem, 6vw, 5rem); letter-spacing: -.035em; margin: 0; }
h2 { font-size: clamp(1.65rem, 3.4vw, 2.55rem); letter-spacing: -.02em; margin-top: 2.6em; }
h3 { font-size: clamp(1.22rem, 2vw, 1.6rem); }
p, ul, ol, blockquote { margin-block: 0 1.25em; }
blockquote { margin-inline: 0; padding: 1.35rem 0 1.35rem clamp(1.15rem, 4vw, 2.35rem); border-left: 3px solid var(--hd-accent); font-size: 1.18em; }

.hd-site-header { background: color-mix(in srgb, var(--hd-paper-light) 94%, transparent); border-bottom: 1px solid var(--hd-line); position: relative; z-index: 50; }
.hd-header-inner { min-height: 5.2rem; display: flex; align-items: center; gap: 1.5rem; }
.hd-brand { color: var(--hd-ink); text-decoration: none; font-family: var(--hd-serif); font-size: clamp(1.22rem, 1.8vw, 1.6rem); font-weight: 700; line-height: 1; }
.hd-primary-nav { margin-left: auto; }
.hd-primary-nav ul { display: flex; gap: clamp(.9rem, 2vw, 1.65rem); align-items: center; list-style: none; margin: 0; padding: 0; }
.hd-primary-nav a { color: var(--hd-ink); font-family: var(--hd-sans); font-size: .88rem; text-decoration: none; }
.hd-primary-nav a:hover { color: var(--hd-accent); }
.hd-header-tools { display: flex; align-items: center; gap: .75rem; }
.hd-menu-toggle { display: none; border: 1px solid var(--hd-line); background: transparent; padding: .55rem .75rem; cursor: pointer; }
.hd-search-link { font-family: var(--hd-sans); font-size: .88rem; }

.hd-button { display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem; padding: .68rem 1rem; border: 1px solid transparent; border-radius: .2rem; font-family: var(--hd-sans); font-size: .9rem; font-weight: 650; line-height: 1; text-decoration: none; cursor: pointer; }
.hd-button-primary { background: var(--hd-accent); color: white; }
.hd-button-primary:hover { background: var(--hd-accent-dark); color: white; }
.hd-button-secondary { background: transparent; border-color: var(--hd-line); color: var(--hd-ink); }
.hd-button-secondary:hover { border-color: var(--hd-ink); color: var(--hd-ink); }

.hd-hero { padding-block: clamp(4.5rem, 10vw, 9rem); }
.hd-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(20rem, .82fr); gap: clamp(3rem, 8vw, 8rem); align-items: start; }
.hd-hero-intro { max-width: 42rem; margin-top: 1.5rem; color: var(--hd-ink-soft); font-size: 1.1em; }
.hd-primary-actions { border-top: 1px solid var(--hd-line); }
.hd-primary-actions a { display: grid; grid-template-columns: 2.5rem 1fr; column-gap: 1rem; padding-block: 1.35rem; border-bottom: 1px solid var(--hd-line); color: var(--hd-ink); text-decoration: none; }
.hd-primary-actions a:hover { background: var(--hd-paper-light); padding-inline: .8rem; margin-inline: -.8rem; }
.hd-primary-actions span { grid-row: 1 / 3; font-family: var(--hd-sans); font-size: .78rem; color: var(--hd-muted); }
.hd-primary-actions strong { font-size: 1.24em; line-height: 1.2; }
.hd-primary-actions small { color: var(--hd-muted); font-family: var(--hd-sans); font-size: .84rem; line-height: 1.45; margin-top: .25rem; }

.hd-onboarding { background: var(--hd-info-soft); border-block: 1px solid color-mix(in srgb, var(--hd-info) 25%, transparent); }
.hd-onboarding-inner { display: flex; gap: 2rem; align-items: center; justify-content: space-between; padding-block: 1rem; }
.hd-onboarding p { margin: .2rem 0 0; font-family: var(--hd-sans); font-size: .88rem; color: var(--hd-ink-soft); }
.hd-onboarding button { border: 0; border-bottom: 1px solid currentColor; background: transparent; font-family: var(--hd-sans); font-size: .85rem; cursor: pointer; white-space: nowrap; }

.hd-feature-section { background: var(--hd-paper-light); }
.hd-feature { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(18rem, .6fr); gap: clamp(3rem, 8vw, 7rem); align-items: center; }
.hd-feature h2 { margin-top: 0; font-size: clamp(2.1rem, 5vw, 4.3rem); }
.hd-feature-question { font-size: clamp(1.25rem, 2vw, 1.65rem); max-width: 50rem; }
.hd-feature-aside { border-left: 1px solid var(--hd-line); padding-left: clamp(1.5rem, 4vw, 3rem); }
.hd-feature-facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin: 2rem 0; }
.hd-feature-facts div { border-top: 1px solid var(--hd-line); padding-top: .75rem; }
.hd-feature-facts dt { font-family: var(--hd-sans); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--hd-muted); }
.hd-feature-facts dd { margin: .25rem 0 0; }

.hd-section-heading { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(15rem, .75fr); gap: 3rem; align-items: end; margin-bottom: 2.5rem; }
.hd-section-heading h2 { margin: 0; }
.hd-section-heading > p { margin: 0; color: var(--hd-muted); font-family: var(--hd-sans); font-size: .92rem; }
.hd-explore-links { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--hd-line); }
.hd-explore-links a { min-height: 10rem; display: flex; flex-direction: column; justify-content: space-between; padding: 1.25rem; border-right: 1px solid var(--hd-line); border-bottom: 1px solid var(--hd-line); color: var(--hd-ink); text-decoration: none; }
.hd-explore-links a:first-child { border-left: 1px solid var(--hd-line); }
.hd-explore-links a:hover { background: var(--hd-paper-light); }
.hd-explore-links strong { font-size: 1.3em; }
.hd-explore-links span { color: var(--hd-muted); font-family: var(--hd-sans); font-size: .85rem; }
.hd-explore-all { margin: 1.25rem 0 0; font-family: var(--hd-sans); font-size: .88rem; }

.hd-question-grid { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--hd-line); }
.hd-question { min-height: 8rem; display: flex; align-items: end; padding: 1.25rem; border-bottom: 1px solid var(--hd-line); border-right: 1px solid var(--hd-line); color: var(--hd-ink); text-decoration: none; font-size: clamp(1.15rem, 2vw, 1.5rem); }
.hd-question:nth-child(odd) { border-left: 1px solid var(--hd-line); }
.hd-question:hover { background: var(--hd-paper-light); }

.hd-word-band { background: var(--hd-paper-deep); }
.hd-word-list { display: flex; flex-wrap: wrap; gap: .8rem 1.6rem; }
.hd-word-link { color: var(--hd-ink); font-size: clamp(1.35rem, 3vw, 2.15rem); text-decoration: none; border-bottom: 1px solid transparent; }
.hd-word-link:hover { border-color: currentColor; }

.hd-page-header, .hd-archive-header { padding-block: clamp(3rem, 8vw, 6rem); background: var(--hd-paper-light); border-bottom: 1px solid var(--hd-line); }
.hd-page-header .hd-summary, .hd-archive-header .hd-summary { max-width: 55rem; margin-top: 1.4rem; font-size: clamp(1.18rem, 2.2vw, 1.6rem); color: var(--hd-ink-soft); }
.hd-breadcrumbs { display: flex; flex-wrap: wrap; gap: .35rem .55rem; margin-bottom: 1.4rem; font-family: var(--hd-sans); font-size: .76rem; color: var(--hd-muted); }
.hd-breadcrumbs a { color: inherit; }
.hd-route-context { margin-bottom: 1rem; font-family: var(--hd-sans); font-size: .84rem; color: var(--hd-muted); }
.hd-route-context a { color: var(--hd-ink-soft); }
.hd-meta-row { display: flex; flex-wrap: wrap; gap: .65rem 1.5rem; margin-top: 1.25rem; font-family: var(--hd-sans); font-size: .82rem; color: var(--hd-muted); }
.hd-taxonomies { display: flex; flex-wrap: wrap; gap: .5rem .9rem; margin-top: 1rem; }
.hd-taxonomies a { color: var(--hd-ink-soft); font-family: var(--hd-sans); font-size: .78rem; }
.hd-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.8rem; }
.hd-actions-focused { align-items: center; }
.hd-tools-menu { position: relative; font-family: var(--hd-sans); font-size: .86rem; }
.hd-tools-menu summary { min-height: 2.75rem; display: inline-flex; align-items: center; padding: .68rem 1rem; border: 1px solid var(--hd-line); cursor: pointer; list-style: none; }
.hd-tools-menu summary::-webkit-details-marker { display: none; }
.hd-tools-menu[open] > div { position: absolute; left: 0; top: calc(100% + .35rem); min-width: 12rem; z-index: 20; display: grid; background: var(--hd-paper-light); border: 1px solid var(--hd-line); box-shadow: var(--hd-shadow); }
.hd-tools-menu a, .hd-tools-menu button { display: block; padding: .7rem .9rem; border: 0; border-bottom: 1px solid var(--hd-line); background: transparent; color: var(--hd-ink); text-align: left; text-decoration: none; cursor: pointer; }

.hd-content-layout { display: grid; grid-template-columns: minmax(0, var(--hd-reading)) minmax(12rem, 1fr); gap: clamp(3rem, 7vw, 7rem); align-items: start; padding-block: clamp(3rem, 7vw, 6rem); }
.hd-entry-content { min-width: 0; }
.hd-entry-content > :first-child { margin-top: 0; }
.hd-entry-content h2 { scroll-margin-top: 2rem; }
.hd-entry-content h3 { margin-top: 2.2em; }
.hd-entry-content li { margin-bottom: .45em; }
.hd-threshold { padding-bottom: clamp(2.5rem, 6vw, 4.5rem); border-bottom: 1px solid var(--hd-line); }
.hd-threshold h2 { margin: 0 0 1rem; }
.hd-threshold-text { font-size: 1.12em; }
.hd-main-lesson { padding-top: clamp(2.5rem, 6vw, 4.5rem); }
.hd-phase-label { margin: 0 0 1.5rem; padding-bottom: .65rem; border-bottom: 1px solid var(--hd-line); }

.hd-mastery-contract { margin-block: clamp(3rem, 7vw, 5rem); }
.hd-mastery-contract > h2 { margin: 0 0 1.8rem; }
.hd-mastery-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--hd-line); border-left: 1px solid var(--hd-line); }
.hd-mastery-grid article { padding: 1.25rem; border-right: 1px solid var(--hd-line); border-bottom: 1px solid var(--hd-line); }
.hd-mastery-grid h3 { margin: 0 0 .75rem; font-family: var(--hd-sans); font-size: .92rem; }
.hd-mastery-grid p { margin: 0; font-size: .94em; }

.hd-toc { position: sticky; top: 1.5rem; border-top: 1px solid var(--hd-line); padding-top: 1rem; font-family: var(--hd-sans); font-size: .78rem; }
.hd-toc-title { font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.hd-toc ol { list-style: none; padding: 0; margin: 0; }
.hd-toc li { margin: 0; }
.hd-toc a { display: block; padding: .42rem 0; color: var(--hd-muted); text-decoration: none; border-left: 2px solid transparent; padding-left: .65rem; }
.hd-toc a.is-active { color: var(--hd-ink); border-left-color: var(--hd-accent); }
.hd-toc-note { margin-top: 1.2rem; color: var(--hd-muted); font-size: .92em; }

.hd-lexeme-section { margin-block: clamp(4rem, 8vw, 7rem); padding-top: clamp(2.5rem, 5vw, 4rem); border-top: 3px double var(--hd-line); }
.hd-lexeme-grid { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--hd-line); border-left: 1px solid var(--hd-line); }
.hd-lexeme-card { padding: 1.25rem; border-right: 1px solid var(--hd-line); border-bottom: 1px solid var(--hd-line); }
.hd-lexeme-card h3 { margin: .2rem 0 .55rem; }
.hd-lexeme-card p:last-child { margin: 0; color: var(--hd-ink-soft); font-size: .92em; }
.hd-mastery-label { margin: 0; color: var(--hd-accent); }

.hd-seminar { margin-block: clamp(4rem, 8vw, 7rem); padding: clamp(1.5rem, 4vw, 2.75rem); border: 1px solid var(--hd-line); background: var(--hd-paper-light); }
.hd-seminar h2 { margin-top: 0; }
.hd-seminar-content > :last-child { margin-bottom: 0; }

.hd-network { margin-block: clamp(3rem, 6vw, 5rem); border-top: 1px solid var(--hd-line); border-bottom: 1px solid var(--hd-line); }
.hd-network > summary { display: flex; justify-content: space-between; gap: 2rem; padding-block: 1.2rem; cursor: pointer; list-style: none; font-family: var(--hd-sans); }
.hd-network > summary::-webkit-details-marker { display: none; }
.hd-network > summary span { font-weight: 700; }
.hd-network > summary small { color: var(--hd-muted); }
.hd-network[open] > summary { border-bottom: 1px solid var(--hd-line); }
.hd-relations { padding-block: 2rem; }
.hd-relations h2 { margin: 0 0 1.5rem; }
.hd-relation-list { list-style: none; margin: 0; padding: 0; }
.hd-relation-list li { display: grid; grid-template-columns: minmax(10rem, .7fr) minmax(0, 1.3fr); gap: 1.5rem; padding-block: 1.1rem; border-top: 1px solid var(--hd-line); }
.hd-relation-list span { color: var(--hd-ink-soft); }

.hd-next-step { margin-block: clamp(4rem, 8vw, 7rem); padding: clamp(1.5rem, 4vw, 3rem); background: var(--hd-accent-soft); border-left: 4px solid var(--hd-accent); }
.hd-next-step h2 { margin: .25rem 0 1rem; }
.hd-next-step h2 a { color: var(--hd-ink); text-decoration: none; }
.hd-next-step .hd-button { margin-top: .5rem; }

.hd-teacher-notes { margin-block: 3rem; padding: 1.5rem; border: 1px dashed var(--hd-warning); background: #f7ecda; }
.hd-teacher-notes > :last-child { margin-bottom: 0; }

.hd-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--hd-line); border-left: 1px solid var(--hd-line); }
.hd-card { min-height: 17rem; display: flex; flex-direction: column; padding: 1.35rem; border-right: 1px solid var(--hd-line); border-bottom: 1px solid var(--hd-line); background: transparent; }
.hd-card:hover { background: var(--hd-paper-light); }
.hd-card h3 { margin: .4rem 0 .75rem; }
.hd-card h3 a { color: var(--hd-ink); text-decoration: none; }
.hd-card p { color: var(--hd-ink-soft); }
.hd-card-meta { margin-top: auto; font-family: var(--hd-sans); font-size: .78rem; color: var(--hd-muted) !important; }
.hd-archive-grid { padding-block: clamp(3rem, 7vw, 6rem); }
.hd-pagination { margin-top: 2rem; font-family: var(--hd-sans); }
.hd-filter-nav { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 2rem; }
.hd-filter-nav a { padding: .45rem .72rem; border: 1px solid var(--hd-line); color: var(--hd-ink); font-family: var(--hd-sans); font-size: .78rem; text-decoration: none; }
.hd-filter-nav a.is-current { background: var(--hd-ink); color: white; border-color: var(--hd-ink); }

.hd-explore-directory { border-top: 1px solid var(--hd-line); }
.hd-explore-directory > a { display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: center; padding-block: 1.6rem; border-bottom: 1px solid var(--hd-line); color: var(--hd-ink); text-decoration: none; }
.hd-explore-directory h2 { margin: 0 0 .35rem; }
.hd-explore-directory p { margin: 0; color: var(--hd-muted); }
.hd-explore-directory span { font-family: var(--hd-sans); font-size: .8rem; color: var(--hd-muted); }
.hd-explore-directory > a:hover h2 { color: var(--hd-accent); }

.hd-path-steps { list-style: none; padding: 0; margin: 3rem 0; counter-reset: hd-step; }
.hd-path-step { counter-increment: hd-step; position: relative; display: grid; grid-template-columns: 3rem 1fr; gap: 1.2rem; padding: 1.5rem 0; border-top: 1px solid var(--hd-line); }
.hd-path-step::before { content: counter(hd-step, decimal-leading-zero); font-family: var(--hd-sans); font-size: .78rem; color: var(--hd-muted); }
.hd-path-step h3 { margin: 0 0 .5rem; }

.hd-text-tools { display: flex; flex-wrap: wrap; gap: .6rem; margin-block: 2rem; }
.hd-bilingual { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1px; background: var(--hd-line); border: 1px solid var(--hd-line); }
.hd-bilingual[data-hd-view='both'] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hd-text-panel { background: var(--hd-paper-light); padding: clamp(1rem, 3vw, 2rem); }
.hd-text-panel h2 { margin-top: 0; }
.hd-text-panel pre { white-space: pre-wrap; font: inherit; line-height: 1.85; margin: 0; }
.hd-text-panel.is-hidden { display: none; }
.hd-poetry { margin: 0; padding-block: .25rem; }
.hd-verse-line { display: grid; grid-template-columns: 3.1rem minmax(0, 1fr); column-gap: .85rem; align-items: baseline; line-height: 1.72; }
.hd-verse-line.is-stanza-first { margin-top: .72rem; }
.hd-verse-line:first-child { margin-top: 0; }
.hd-verse-number { color: var(--hd-accent); font-family: var(--hd-sans); font-size: .78em; font-variant-numeric: tabular-nums; text-align: right; user-select: none; }
.hd-verse-text { min-width: 0; }
.hd-note-ref { margin-left: .18rem; font-family: var(--hd-sans); font-size: .62em; line-height: 1; vertical-align: super; }
.hd-note-ref a { text-decoration: none; }
.hd-verse-line.is-indented .hd-verse-text { padding-left: 1.45em; }
.hd-poetic-commentary { display: grid; gap: 2.2rem; margin-top: 2.5rem; }
.hd-poetic-nav { padding: 1rem 1.2rem; border: 1px solid var(--hd-line); background: var(--hd-paper-light); }
.hd-poetic-nav h2 { margin: 0 0 .75rem; font-size: 1.15rem; }
.hd-poetic-nav ol { margin: 0; padding-left: 1.2rem; columns: 2; }
.hd-poetic-nav a { color: var(--hd-ink); text-decoration: none; }
.hd-poetic-nav a:hover { color: var(--hd-accent); text-decoration: underline; }
.hd-poetic-section { padding-top: 1.2rem; border-top: 1px solid var(--hd-line); scroll-margin-top: 2rem; }
.hd-poetic-section > h2 { margin-top: 0; }
.hd-poetic-range { margin-top: -.8rem; color: var(--hd-muted); font-family: var(--hd-sans); font-size: .82rem; }
.hd-study-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin-top: 1.4rem; border: 1px solid var(--hd-line); background: var(--hd-line); }
.hd-study-block { min-width: 0; padding: 1.1rem; background: var(--hd-paper-light); }
.hd-study-block h3 { margin: 0 0 .75rem; font-family: var(--hd-sans); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--hd-muted); }
.hd-study-block p:last-child { margin-bottom: 0; }
.hd-section-notes { list-style: none; margin: 0; padding: 0; }
.hd-section-notes li { margin: 0 0 .85rem; }
.hd-section-notes a { font-family: var(--hd-sans); font-size: .82rem; text-decoration: none; }
.hd-note-back { display: inline-block; margin-left: .35rem; font-family: var(--hd-sans); font-size: .8rem; }

.hd-lexeme-page .hd-page-header { text-align: left; }
.hd-lexeme-title { font-size: clamp(3.3rem, 9vw, 7rem); }
.hd-definition { max-width: 48rem; font-size: clamp(1.25rem, 2vw, 1.65rem); }
.hd-definition-list { display: grid; grid-template-columns: minmax(9rem, .35fr) minmax(0, 1fr); margin: 0 0 3rem; }
.hd-definition-list dt, .hd-definition-list dd { padding: 1rem 0; border-top: 1px solid var(--hd-line); }
.hd-definition-list dt { font-family: var(--hd-sans); font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; }
.hd-definition-list dd { margin: 0; }

.hd-search-form { display: flex; gap: .5rem; max-width: 48rem; margin-top: 2rem; }
.hd-search-form input[type='search'] { flex: 1; min-width: 0; padding: .85rem 1rem; border: 1px solid var(--hd-line); background: var(--hd-paper-light); }
.hd-search-form button { padding: .8rem 1rem; border: 0; background: var(--hd-accent); color: white; cursor: pointer; }

.hd-presentation-shell { min-height: calc(100vh - 5rem); background: #11110f; color: white; }
.hd-presentation-toolbar { position: sticky; top: 0; z-index: 30; display: flex; justify-content: center; align-items: center; gap: .6rem; padding: .7rem; background: rgba(17, 17, 15, .94); border-bottom: 1px solid rgba(255,255,255,.18); }
.hd-presentation-toolbar .hd-button { color: white; border-color: rgba(255,255,255,.35); }
.hd-slide-count { min-width: 5rem; text-align: center; font-family: var(--hd-sans); font-size: .82rem; }
.hd-presentation { min-height: calc(100vh - 8rem); display: grid; place-items: center; padding: 3vw; }
.hd-presentation > .hd-slides { display: contents; }
.hd-slide { display: none; width: min(88vw, 85rem); aspect-ratio: 16 / 9; padding: clamp(2rem, 6vw, 7rem); background: var(--hd-paper-light); color: var(--hd-ink); align-content: center; overflow: auto; }
.hd-slide.is-active { display: grid; }
.hd-slide h2 { margin: 0 0 1rem; font-size: clamp(2.6rem, 6vw, 6rem); }
.hd-slide p, .hd-slide li { font-size: clamp(1.35rem, 2.5vw, 2.5rem); line-height: 1.35; }
.hd-slide-kicker { font-family: var(--hd-sans); text-transform: uppercase; letter-spacing: .08em; }
.hd-slide--cover, .hd-slide--question, .hd-slide--conclusion { text-align: center; }
.hd-slide .wp-block-columns { width: 100%; }

.hd-site-footer { border-top: 1px solid var(--hd-line); padding-block: 2.5rem; background: var(--hd-paper-light); }
.hd-footer-grid { display: flex; justify-content: space-between; gap: 2rem; align-items: end; }
.hd-footer-grid p { margin: .35rem 0 0; color: var(--hd-muted); font-family: var(--hd-sans); font-size: .8rem; }

@media (max-width: 980px) {
  .hd-hero-grid, .hd-feature, .hd-section-heading { grid-template-columns: 1fr; gap: 2.25rem; }
  .hd-explore-links { grid-template-columns: repeat(2, 1fr); }
  .hd-grid { grid-template-columns: repeat(2, 1fr); }
  .hd-mastery-grid { grid-template-columns: 1fr; }
  .hd-content-layout { grid-template-columns: minmax(0, 1fr); }
  .hd-toc { position: static; order: -1; padding: 1rem; border: 1px solid var(--hd-line); background: var(--hd-paper-light); }
  .hd-toc ol { columns: 2; }
  .hd-feature-aside { border-left: 0; border-top: 1px solid var(--hd-line); padding: 2rem 0 0; }
}

@media (max-width: 760px) {
  .hd-header-inner { min-height: 4.4rem; }
  .hd-menu-toggle { display: inline-flex; margin-left: auto; }
  .hd-primary-nav { display: none; position: absolute; inset: 4.4rem 0 auto 0; background: var(--hd-paper-light); border-bottom: 1px solid var(--hd-line); padding: 1rem; }
  .hd-primary-nav.is-open { display: block; }
  .hd-primary-nav ul { display: grid; gap: 0; }
  .hd-primary-nav a { display: block; padding: .8rem; border-bottom: 1px solid var(--hd-line); }
  .hd-header-tools { gap: .45rem; }
  .hd-header-tools .hd-search-link:last-child { display: none; }
  .hd-explore-links, .hd-question-grid, .hd-grid, .hd-lexeme-grid { grid-template-columns: 1fr; }
  .hd-explore-links a, .hd-question, .hd-card, .hd-lexeme-card { border-left: 1px solid var(--hd-line); }
  .hd-question { min-height: 6rem; }
  .hd-verse-line { grid-template-columns: 2.35rem minmax(0, 1fr); column-gap: .55rem; }
  .hd-verse-line.is-indented .hd-verse-text { padding-left: .8em; }
  .hd-relation-list li { grid-template-columns: 1fr; gap: .5rem; }
  .hd-network > summary { display: grid; gap: .25rem; }
  .hd-bilingual, .hd-bilingual[data-hd-view='both'] { grid-template-columns: 1fr; }
  .hd-poetic-nav ol { columns: 1; }
  .hd-study-grid { grid-template-columns: 1fr; }
  .hd-footer-grid { display: block; }
  .hd-toc ol { columns: 1; }
  .hd-onboarding-inner { align-items: start; }
  .hd-feature-facts { grid-template-columns: 1fr 1fr; }
  .hd-definition-list { grid-template-columns: 1fr; }
  .hd-definition-list dt { padding-bottom: .25rem; }
  .hd-definition-list dd { padding-top: 0; }
  .hd-slide { width: 94vw; min-height: 70vh; aspect-ratio: auto; }
  .hd-presentation-toolbar { flex-wrap: wrap; }
}

@media (max-width: 520px) {
  .hd-container { width: min(100% - 1.5rem, var(--hd-max)); }
  h1 { font-size: clamp(2.25rem, 12vw, 3.5rem); }
  .hd-hero { padding-block: 3.5rem; }
  .hd-primary-actions a { grid-template-columns: 2rem 1fr; }
  .hd-meta-row { display: grid; gap: .4rem; }
  .hd-actions { display: grid; grid-template-columns: 1fr; }
  .hd-button, .hd-tools-menu summary { width: 100%; }
  .hd-tools-menu[open] > div { width: 100%; }
  .hd-mastery-grid article { padding: 1rem; }
  .hd-onboarding-inner { display: grid; }
  .hd-explore-directory > a { grid-template-columns: 1fr; gap: .4rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

@media print {
  .hd-site-header, .hd-site-footer, .hd-toc, .hd-actions, .hd-tools-menu, .hd-onboarding, .hd-network > summary, .hd-presentation-toolbar { display: none !important; }
  body { background: white; color: black; font-size: 11.5pt; }
  .hd-container, .hd-reading, .hd-medium, .hd-wide { width: 100%; max-width: none; }
  .hd-page-header, .hd-archive-header { background: white; padding: 0 0 1.5rem; }
  .hd-content-layout { display: block; padding: 0; }
  a { color: black; text-decoration: none; }
  .hd-network:not([open]) .hd-relations { display: block; }
  .hd-card, .hd-lexeme-card, .hd-mastery-grid article { break-inside: avoid; }
  .hd-seminar, .hd-next-step, .hd-teacher-notes { background: white; }
}
