@import url('https://fonts.googleapis.com/css2?family=Literata:ital,opsz,wght@0,7..72,400;0,7..72,500;0,7..72,600;1,7..72,400;1,7..72,500&display=swap');

:root {
  --bg: #FFFFFF;
  --text: #1A1714;
  --muted: #807A70;
  --soft: #C2BDB3;
  --rule: rgba(26, 23, 20, 0.08);
  /* Accent: a slightly warmer, less aggressive clay-rust. */
  --accent: #9C5235;
  --accent-soft: rgba(156, 82, 53, 0.16);
  --accent-tinted: #8D5B47;   /* for inline link text — warm without being loud */
  --serif: 'Literata', 'Charter', 'Iowan Old Style', Georgia, serif;
  --easing: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-page: 380ms;
  --transition-bar: 460ms;
}

::selection {
  background: var(--accent-soft);
  color: var(--text);
}

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

html, body { height: 100%; }

html {
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  color-scheme: light;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-optical-sizing: auto;
  font-feature-settings: 'kern', 'liga', 'onum';
  overflow: hidden;
}

body {
  display: grid;
  grid-template-columns: 45% 55%;
  align-items: stretch;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 200ms var(--easing);
}
a:hover { color: var(--accent); }

button:focus-visible,
a:focus-visible {
  outline: 1.5px solid var(--accent);
  outline-offset: 4px;
  border-radius: 2px;
}

/* === Sidebar =============================================================== */
.sidebar {
  position: relative;
  padding: clamp(2rem, 5vw, 5rem);
  display: grid;
  grid-template-rows: auto 1fr auto;
  border-right: 1px solid var(--rule);
  overflow: hidden;
}

.sidebar-header h1 {
  font-weight: 500;
  font-style: italic;
  font-size: clamp(1.5rem, 2vw, 1.75rem);
  letter-spacing: -0.005em;
}

.sidebar-header p {
  font-style: italic;
  font-size: 0.9375rem;
  color: var(--muted);
  letter-spacing: 0.02em;
  margin-top: 0.25rem;
}

.sidebar nav {
  align-self: center;
}

/* The dock — calm, readable list */
.dock {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: clamp(1.125rem, 1.5vw, 1.5rem);
  padding: 1.5rem 0;
}

/* Rolling half-circle.
   Each li gets a --d (distance from hovered item, 0–4).
   Offset follows a quadratic falloff so the focused item sits at the arc's apex
   and items further away roll back along the curve. */
.dock li {
  --d: 0;
  --R: clamp(20px, 2.5vw, 36px);
  --factor: max(0, calc(1 - (var(--d) * var(--d)) / 16));
  transform: translate3d(0, 0, 0);
  transition: transform 340ms var(--easing);
}

.dock.curving li {
  transform: translate3d(calc(var(--R) * var(--factor)), 0, 0);
}

.dock button {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  position: relative;
  color: var(--muted);
  transform-origin: 0 50%;
  transition:
    color 180ms var(--easing),
    transform 220ms var(--easing),
    opacity 180ms var(--easing);
}

.dock .label {
  display: block;
  font-weight: 500;
  font-size: clamp(1.625rem, 2vw, 2.125rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-feature-settings: 'lnum', 'kern';
}

/* When any button is hovered, dim every other button. */
.dock:has(button:hover) button {
  opacity: 0.38;
}
/* The hovered button is the focus: full ink, a touch bigger. */
.dock button:hover,
.dock button:focus-visible {
  color: var(--text);
  opacity: 1;
  transform: scale(1.06);
}

/* Active state — italic + accent dot in the gutter. Stays at baseline size. */
.dock button.active {
  color: var(--text);
}
.dock button.active .label {
  font-style: italic;
}
.dock button.active::before {
  content: "";
  position: absolute;
  left: -1.25rem;
  top: 50%;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  transform: translateY(-50%);
  transition: opacity 180ms var(--easing);
}
/* When another button is being hovered, fade the active dot too — focus belongs to the hover. */
.dock:has(button:hover) button.active:not(:hover)::before {
  opacity: 0.38;
}

/* Caption strip */
.dock .caption { display: none; }
.dock-caption {
  margin-top: 1.25rem;
  min-height: 1.4rem;
  font-style: italic;
  font-size: 0.9375rem;
  line-height: 1.4;
  letter-spacing: 0.01em;
  color: var(--muted);
  opacity: 0;
  transition: opacity 200ms var(--easing);
  pointer-events: none;
}
.dock-caption.visible { opacity: 1; }

/* Sidebar footer / colophon */
.sidebar-footer {
  font-size: 0.9375rem;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  letter-spacing: 0.01em;
}

.sidebar-footer .row {
  display: flex;
  gap: 1.25rem;
  align-items: baseline;
}

.sidebar-footer a {
  font-style: italic;
  border-bottom: 1px solid transparent;
  transition: border-color 200ms var(--easing);
  padding-bottom: 1px;
}
.sidebar-footer a:hover { border-color: var(--accent); }

.colophon {
  font-style: italic;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--soft);
  max-width: 38ch;
}

.colophon-date { font-variant-numeric: lining-nums; }

/* === Content panel ========================================================= */
.content {
  position: relative;
  padding: clamp(2rem, 5vw, 6rem) clamp(2rem, 5vw, 5rem);
  overflow-y: auto;
  scroll-behavior: smooth;
}

.content::-webkit-scrollbar { width: 0; }
.content { scrollbar-width: none; }

/* Scroll progress */
.scroll-progress {
  position: absolute;
  top: 0; right: 0;
  width: 2px;
  height: 0;
  background: var(--accent);
  opacity: 0;
  border-radius: 1.5px;
  transition:
    opacity 320ms var(--easing),
    height 80ms linear;
  pointer-events: none;
  z-index: 5;
}
.scroll-progress.visible { opacity: 0.55; }

/* Empty state */
.empty-state {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  gap: 1.25rem;
  opacity: 1;
  transition: opacity 380ms var(--easing);
}

.empty-state.gone {
  opacity: 0;
  pointer-events: none;
}

.empty-state .epigraph {
  font-style: italic;
  font-size: 1.125rem;
  line-height: 1.55;
  color: var(--text);
  max-width: 34ch;
  letter-spacing: -0.005em;
}

.empty-state .epigraph .attribution {
  display: block;
  margin-top: 0.5rem;
  font-style: normal;
  font-size: 0.875rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.empty-state .hint {
  font-style: italic;
  font-size: 0.9375rem;
  color: var(--muted);
}

/* Page (directional transitions) */
.page {
  --enter-from: 12px;
  --exit-to: -12px;
  opacity: 0;
  transform: translateY(var(--enter-from));
  transition:
    opacity var(--transition-page) var(--easing),
    transform var(--transition-page) var(--easing);
  max-width: 38rem;
}

/* Active state uses transform: none so sticky descendants (case-strip) work.
   Any non-none transform on an ancestor creates a containing block and breaks
   position: sticky inside it. */
.page.active {
  opacity: 1;
  transform: none;
}

.page.exiting {
  opacity: 0;
  transform: translateY(var(--exit-to));
}

.page[hidden] { display: none; }

.page .kicker {
  font-style: italic;
  font-size: 0.9375rem;
  color: var(--muted);
  margin-bottom: 1rem;
  letter-spacing: 0.02em;
}

.page h2 {
  font-weight: 500;
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.018em;
  margin-bottom: 2rem;
}

.page h2 em { font-style: italic; }

.page .intro {
  font-style: italic;
  font-size: 1.25rem;
  line-height: 1.55;
  color: var(--text);
  margin-bottom: 2.5rem;
  max-width: 32rem;
}

.page h3 {
  font-weight: 500;
  font-size: 1.25rem;
  font-style: italic;
  margin: 2.5rem 0 0.5rem;
  letter-spacing: -0.005em;
}

.page p {
  font-size: 1.0625rem;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.page p.meta {
  font-style: italic;
  color: var(--muted);
  font-size: 0.9375rem;
  margin-top: -0.25rem;
}

.page .entries {
  list-style: none;
  border-top: 1px solid var(--rule);
}

.page .entries li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem;
  align-items: baseline;
  padding: 1rem 0;
  border-bottom: 1px solid var(--rule);
}

.page .entries .title { font-size: 1.0625rem; }

.page .entries .desc {
  display: block;
  font-style: italic;
  font-size: 0.9375rem;
  color: var(--muted);
  margin-top: 0.125rem;
  line-height: 1.55;
}

.page .entries .when {
  font-style: italic;
  font-size: 0.9375rem;
  color: var(--muted);
  white-space: nowrap;
  font-variant-numeric: lining-nums;
}

.page a.inline {
  color: var(--accent-tinted);
  border-bottom: 1px solid var(--soft);
  transition: color 200ms var(--easing), border-color 200ms var(--easing);
  padding-bottom: 1px;
}
.page a.inline:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* === Work index =========================================================== */

.work-index {
  list-style: none;
  margin: 1rem 0 2rem;
  border-top: 1px solid var(--rule);
}
.work-index li {
  border-bottom: 1px solid var(--rule);
}
.work-index a {
  display: grid;
  grid-template-columns: 2.5rem 1fr auto;
  gap: 1.25rem;
  align-items: baseline;
  padding: 1.125rem 0.25rem 1.125rem 0;
  transition: background 180ms var(--easing), padding 180ms var(--easing);
}
.work-index a:hover {
  background: rgba(139, 58, 31, 0.03);
  padding-left: 0.625rem;
  opacity: 1;
}
.work-index .wi-num {
  font-style: italic;
  font-feature-settings: 'lnum';
  font-size: 1rem;
  color: var(--soft);
  letter-spacing: 0.01em;
}
.work-index a:hover .wi-num { color: var(--accent); }
.work-index .wi-body {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}
.work-index .wi-company {
  font-family: inherit;
  font-weight: 500;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  color: var(--text);
}
.work-index .wi-tag {
  font-style: italic;
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.4;
}
.work-index .wi-year {
  font-style: italic;
  font-size: 0.875rem;
  color: var(--muted);
  font-feature-settings: 'lnum';
  white-space: nowrap;
}
.work-index-note {
  font-style: italic;
  font-size: 0.9375rem;
  color: var(--muted);
  margin-top: 1.5rem;
}

/* === Case pages: persistent strip + back link ============================ */

.case-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1.5rem;
  margin: 2.25rem 0 2.5rem;
  padding: 0.875rem 0;
  /* Single hairline above only — feels less boxed than two */
  border-top: 1px solid var(--rule);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 3;
}

/* Long-form reading shouldn't track nav. Essays drop the sticky behavior. */
.essay-page .case-strip {
  position: static;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
/* Backdrop blur for the sticky strip so content beneath fades through it gracefully */
@supports (backdrop-filter: blur(8px)) {
  .case-strip {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }
}

/* Small italic section label on the left (Work / Practice / Writing) */
.case-strip .strip-section {
  font-style: italic;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  padding-right: 0.5rem;
  border-right: 1px solid var(--rule);
  margin-right: 0.25rem;
  white-space: nowrap;
}

.case-strip .strip-item {
  font-style: italic;
  font-size: 0.9375rem;
  color: var(--muted);
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  transition: color 180ms var(--easing), border-color 180ms var(--easing);
  position: relative;
}
.case-strip .strip-item:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
  opacity: 1;
}
.case-strip .strip-item.active {
  color: var(--text);
  font-style: italic;
}
.case-strip .strip-item.active::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  background: var(--accent);
  border-radius: 50%;
  margin-right: 0.45em;
  vertical-align: middle;
}

.case-back {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-style: italic;
  font-size: 0.9375rem;
}

.case-page .case-title {
  font-family: inherit;
  font-weight: 500;
  font-size: clamp(2rem, 3vw, 2.625rem);
  line-height: 1.05;
  letter-spacing: -0.018em;
  margin-bottom: 1.5rem;
}
.case-page .case-title em {
  font-style: italic;
  color: var(--accent);
}

.page .case-title {
  font-family: inherit;
  font-weight: 500;
  font-size: clamp(1.875rem, 2.6vw, 2.25rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin-bottom: 1.25rem;
  font-style: normal;
}
.page .case-title em {
  font-style: italic;
  color: var(--accent);
}

.page .case-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2rem;
  margin: 0 0 2rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  font-size: 0.9375rem;
}
.page .case-meta > div {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}
.page .case-meta dt {
  font-style: italic;
  font-size: 0.8125rem;
  color: var(--muted);
  letter-spacing: 0.01em;
}
.page .case-meta dd {
  color: var(--text);
  font-feature-settings: 'lnum';
}

.page .case h4,
.case-page h4 {
  font-style: italic;
  font-weight: 500;
  font-size: 1.0625rem;
  color: var(--muted);
  letter-spacing: 0.01em;
  margin: 2rem 0 0.5rem;
}

.page .case-note {
  font-style: italic;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--muted);
  border-left: 2px solid var(--soft);
  padding-left: 1rem;
  margin: 2rem 0;
  max-width: 36rem;
}

/* === 5-tier framework diagram ============================================= */

.framework {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  margin: 2rem 0 1rem;
}

.tier {
  display: grid;
  grid-template-columns: 3rem 4px 1fr;
  gap: 0 1.25rem;
  align-items: start;
  padding: 1rem 0.875rem 1rem 0;
  border-radius: 6px;
  transition: background 200ms var(--easing), transform 200ms var(--easing);
}

.tier:hover {
  background: rgba(139, 58, 31, 0.04);
  transform: translateX(2px);
}

.tier-num {
  font-style: italic;
  font-feature-settings: 'lnum';
  font-size: 1.5rem;
  color: var(--soft);
  line-height: 1.1;
}

.tier-bar {
  align-self: stretch;
  width: 4px;
  border-radius: 2px;
  background: var(--soft);
}

/* Severity gradient: hot rust at tier 1, fading toward muted at tier 5 */
.tier[data-tier="1"] .tier-bar { background: var(--accent); }
.tier[data-tier="2"] .tier-bar { background: #B4633F; }
.tier[data-tier="3"] .tier-bar { background: #A4825A; }
.tier[data-tier="4"] .tier-bar { background: #91978C; }
.tier[data-tier="5"] .tier-bar { background: var(--soft); }

.tier-body h5 {
  font-family: inherit;
  font-weight: 500;
  font-style: italic;
  font-size: 1.0625rem;
  color: var(--text);
  margin: 0 0 0.375rem;
  letter-spacing: -0.005em;
}
.tier-body p {
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--text);
  margin: 0;
}

/* === Practice projects ==================================================== */

.page .project {
  padding-top: 2.5rem;
  margin-top: 2.5rem;
  border-top: 1px solid var(--rule);
}
.page .project:first-of-type {
  padding-top: 0;
  margin-top: 0;
  border-top: none;
}
.page .project h3 {
  margin-top: 0;
}
.page .project-meta {
  font-style: italic;
  font-size: 0.9375rem;
  color: var(--muted);
  margin-top: -0.25rem;
  margin-bottom: 1.25rem;
}

/* === Essay typography ===================================================== */

.essay-body {
  max-width: 36rem;
}

/* Marker is a button. Looks like a small italic accent superscript;
   clicking shows the note in the same tooltip used for glossary terms.
   Padding + negative margin give a generous hit area without changing layout. */
.sidenote-marker {
  appearance: none;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  font-feature-settings: 'sups';
  font-size: 0.85em;
  color: var(--accent);
  font-style: italic;
  line-height: inherit;
  vertical-align: baseline;
  /* Larger hit area; negative margin offsets the padding so the layout doesn't shift. */
  padding: 0.35em 0.3em;
  margin: -0.35em 0 -0.35em -0.15em;
  border-radius: 3px;
  transition: background 160ms var(--easing), color 160ms var(--easing);
}
.sidenote-marker:hover,
.sidenote-marker:focus-visible,
.sidenote-marker[aria-expanded="true"] {
  background: var(--accent-soft);
  color: var(--text);
}
.sidenote-marker:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

/* Hidden block at the end of each essay-body holds the note bodies.
   JS pulls innerHTML into the tooltip when a marker is clicked. */
.essay-notes { display: none; }

/* Narrow screens: inline block-quote under the paragraph */
@media (max-width: 1099px) {
  .sidenote {
    margin: 0.75rem 0;
    padding-left: 0.875rem;
    border-left: 2px solid var(--soft);
  }
}

.essay-body .essay-lede {
  font-style: italic;
  font-size: 1.1875rem;
  line-height: 1.55;
  color: var(--text);
  margin: 0 0 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--rule);
  max-width: 32rem;
}

.essay-body p {
  font-size: 1.0625rem;
  line-height: 1.75;
  margin-bottom: 1.25rem;
}

.essay-body p em {
  font-style: italic;
}

/* Forthcoming rows in an index — same grid layout, no link, quieter. */
.work-index li:not(:has(a)) {
  display: grid;
  grid-template-columns: 2.5rem 1fr auto;
  gap: 1.25rem;
  align-items: baseline;
  padding: 1.125rem 0.25rem 1.125rem 0;
  opacity: 0.65;
}
.work-index .wi-company.forthcoming {
  color: var(--muted);
  font-style: italic;
  font-weight: 400;
}

/* === Available page ======================================================= */

.page#available .offerings {
  list-style: none;
  margin: 1rem 0 2rem;
  padding: 0;
}
.page#available .offerings li {
  padding: 0.875rem 0;
  border-top: 1px solid var(--rule);
  font-size: 1.0625rem;
  line-height: 1.55;
}
.page#available .offerings li:last-child {
  border-bottom: 1px solid var(--rule);
}
.page#available .offerings .o-title {
  font-style: italic;
  font-weight: 500;
  color: var(--text);
  margin-right: 0.375rem;
}

.page#available .status {
  font-style: italic;
  font-size: 1.0625rem;
  color: var(--text);
  border-left: 2px solid var(--accent);
  padding: 0.25rem 0 0.25rem 1rem;
  margin: 0.5rem 0 1.5rem;
  max-width: 36rem;
}

/* === Glossary ============================================================ */

/* Inline term — looks like emphasized text with a dotted accent rule */
.term {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 0 0 1px;
  margin: 0;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  font-style: inherit;
  color: inherit;
  cursor: pointer;
  border-bottom: 1px dotted var(--accent);
  transition: color 180ms var(--easing), border-color 180ms var(--easing);
  line-height: inherit;
  display: inline;
}
.term:hover,
.term:focus-visible,
.term[aria-expanded="true"] {
  color: var(--accent);
}

/* Tooltip — quiet footnote card, anchored to the term */
.term-tooltip {
  position: absolute;
  z-index: 100;
  width: 320px;
  max-width: calc(100vw - 2rem);
  background: var(--bg);
  border: 1px solid var(--rule);
  box-shadow: 0 12px 32px -8px rgba(26, 23, 20, 0.18),
              0 2px 6px rgba(26, 23, 20, 0.06);
  padding: 1rem 1.125rem 0.875rem;
  font-family: var(--serif);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 200ms var(--easing), transform 200ms var(--easing);
  pointer-events: none;
}
.term-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.term-tooltip .tt-title {
  font-style: italic;
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--text);
  margin-bottom: 0.5rem;
  letter-spacing: -0.005em;
}
.term-tooltip .tt-def {
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--text);
  margin-bottom: 0.875rem;
}
.term-tooltip .tt-more {
  display: block;
  text-align: right;
  font-style: italic;
  font-size: 0.8125rem;
  color: var(--accent);
  border-top: 1px solid var(--rule);
  padding-top: 0.625rem;
}
.term-tooltip .tt-more:hover { opacity: 1; text-decoration: underline; }

/* Note mode: hide title + more, italicize the body */
.term-tooltip.mode-note .tt-title,
.term-tooltip.mode-note .tt-more {
  display: none;
}
.term-tooltip.mode-note .tt-def {
  font-style: italic;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--text);
  margin-bottom: 0;
}
.term-tooltip.mode-note .tt-def p { margin-bottom: 0.5rem; }
.term-tooltip.mode-note .tt-def p:last-child { margin-bottom: 0; }

/* Glossary page — TOC and entries */
.glossary-toc {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem 1.25rem;
  margin: 0 0 2.5rem;
  padding: 0.875rem 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  font-size: 0.9375rem;
}
.glossary-toc a {
  font-style: italic;
  color: var(--muted);
  padding-bottom: 1px;
  border-bottom: 1px solid transparent;
  transition: color 180ms var(--easing), border-color 180ms var(--easing);
}
.glossary-toc a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
  opacity: 1;
}

.glossary-entry {
  padding: 2rem 0 1rem;
  border-top: 1px solid var(--rule);
  scroll-margin-top: 1rem;
}
.glossary-entry:first-of-type { border-top: none; padding-top: 0; }
.glossary-entry h3 {
  font-family: inherit;
  font-weight: 500;
  font-style: italic;
  font-size: 1.5rem;
  color: var(--text);
  margin-bottom: 0.625rem;
  letter-spacing: -0.005em;
}
.glossary-entry .glossary-def {
  font-style: italic;
  font-size: 1.0625rem;
  line-height: 1.5;
  color: var(--text);
  margin-bottom: 0.875rem;
  border-left: 2px solid var(--accent);
  padding-left: 0.875rem;
  max-width: 36rem;
}
.glossary-entry p {
  max-width: 38rem;
}

/* Used-in line at the bottom of each glossary entry, generated by JS */
.glossary-used-in {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--rule);
  font-size: 0.9375rem;
  color: var(--muted);
  font-style: italic;
}
.glossary-used-in-label {
  color: var(--muted);
  font-style: italic;
  margin-right: 0.375em;
}

/* === View Transitions =====================================================
   When supported, the browser swaps page snapshots. Tune duration/easing
   to match the rest of the site's motion vocabulary. */
@view-transition { navigation: auto; }
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 360ms;
  animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}

/* === Misc micro-copy ====================================================== */

.placeholder-note {
  font-size: 0.9375rem;
  color: var(--muted);
  margin-top: -0.75rem;
  margin-bottom: 2rem;
}

kbd {
  font-family: inherit;
  font-style: italic;
  font-size: inherit;
  color: var(--text);
  border-bottom: 1px solid var(--soft);
  padding: 0 0.125rem;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
  .dock li { transform: none !important; opacity: 1 !important; }
  .dock .caption { opacity: 1 !important; }
}

/* Responsive: stack on mobile, drop magnification */
@media (max-width: 820px) {
  html { overflow: auto; font-size: 17px; }
  body { grid-template-columns: 1fr; height: auto; min-height: 100%; }

  .sidebar {
    border-right: none;
    border-bottom: 1px solid var(--rule);
    padding: 1.75rem 1.5rem 2.5rem;
    overflow: visible;
  }

  .dock { padding: 1.5rem 0 0.5rem; gap: 1rem; }
  .dock .label { font-size: 1.5rem; }
  .dock button.active::before { left: -0.875rem; }
  .dock-caption { display: none; } /* no hover on touch */
  .dock.curving li { transform: none; }

  .active-bar { left: -1rem; }

  .content {
    padding: 2rem 1.5rem 4rem;
    overflow: visible;
  }

  .empty-state {
    position: relative; inset: auto;
    padding: 1rem 0 2rem;
  }
}
