/* ═══════════════════════════════════════════════════════════════════
   The Help Center (#help) — "The Case File" for learning Heist.

   Built from the contract tokens in tokens.css only (colour, type, space,
   radius, shadow, motion, layers), so light and dark come for free.
   Everything is scoped to .hc. Markup: app/src/pages/stubs.js and
   app/src/pages/help/helpUi.js. Component guide: docs/DESIGN-CONTRACT.md,
   "Help Center components".

   Class names the help test reads (hm-sidebar, hm-sidebar-group,
   hm-sidebar-label, hm-content, hm-right, hm-breadcrumb, hm-h1, hm-h2,
   hm-section, hm-tab) also carry legacy rules in styles.css. The .hc rules
   below restate every property that matters, so the legacy ones never show.

   Motion follows docs/brand-messaging.md, "The dossier": paper lifts and
   settles, only the stamp overshoots, transform and opacity only, nothing
   moves under prefers-reduced-motion.
   ═══════════════════════════════════════════════════════════════════ */

.hc {
  --hc-paper: var(--surface-overlay);
  --hc-ink: var(--text-primary);
  --hc-line: var(--border-default);
  --hc-folder: var(--accent);
  --hc-folder-deep: var(--accent-fill-pressed);
  --hc-bar-h: 64px;
  --hc-stamp-ease: cubic-bezier(.2, .9, .3, 1.25);
  min-height: 100%;
  background: var(--surface-page);
  color: var(--hc-ink);
  font-size: var(--font-size-body);
  line-height: var(--line-height-body);
}
html.dark .hc { --hc-folder: color-mix(in srgb, var(--accent) 45%, var(--surface-raised)); --hc-folder-deep: color-mix(in srgb, var(--accent) 30%, var(--surface-page)); }

.hc :focus-visible { outline: var(--focus-outline); outline-offset: var(--focus-ring-offset); }
.hc a { color: inherit; }
.hc kbd { font-family: var(--font-mono); font-size: var(--font-size-caption); padding: 1px 6px; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: var(--radius-badge); background: var(--surface-raised); color: var(--text-secondary); }
.hc code { font-family: var(--font-mono); font-size: .92em; padding: 1px 5px; border-radius: var(--radius-badge); background: var(--surface-inset); }
.hc .sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ── Buttons (the Help Center's own, until components.css loads app-wide) ── */
.hc-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs);
  min-height: var(--control-height-md); padding: 0 var(--control-padding-x-md);
  border: 1px solid transparent; border-radius: var(--radius-control);
  font: inherit; font-size: var(--font-size-body); font-weight: var(--font-weight-semibold); line-height: var(--line-height-control);
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: var(--transition-control);
}
.hc-btn--sm { min-height: var(--control-height-sm); padding: 0 var(--control-padding-x-sm); font-size: var(--font-size-body-sm); }
.hc-btn--primary { background: var(--accent-fill); color: var(--on-accent); box-shadow: var(--shadow-button); }
.hc-btn--primary:hover { background: var(--accent-fill-hover); }
.hc-btn--primary:active { background: var(--accent-fill-pressed); }
.hc-btn--secondary { background: var(--surface-raised); color: var(--text-primary); border-color: var(--border-control); }
.hc-btn--secondary:hover { border-color: var(--border-control-hover); background: var(--surface-hover); }
.hc-btn--secondary[aria-pressed="true"] { background: var(--accent-subtle); color: var(--accent-text); border-color: var(--accent-border); }
.hc-btn--quiet { background: transparent; color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }
.hc-btn--quiet:hover { background: var(--surface-hover); }
.hc-btn:disabled { opacity: var(--opacity-disabled); cursor: default; }
.hc-btn svg { flex: none; }

/* ── The Help bar (article pages) ── */
.hc-bar {
  position: sticky; top: 0; z-index: var(--z-sticky);
  display: flex; align-items: center; gap: var(--space-lg);
  min-height: var(--hc-bar-h); padding: var(--space-sm) var(--page-gutter);
  background: var(--surface-page); border-bottom: 1px solid var(--border-subtle);
}
.hc-bar__home { display: inline-flex; align-items: center; gap: var(--space-xs); font-weight: var(--font-weight-bold); font-size: var(--font-size-body-lg); text-decoration: none; color: var(--text-primary); white-space: nowrap; }
.hc-bar__home svg { color: var(--accent-text); }
.hc-bar .hc-search { flex: 1; max-width: 560px; }
.hc-bar__support { margin-left: auto; font-size: var(--font-size-body-sm); font-weight: var(--font-weight-semibold); color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }

/* ── Search (a combobox: results drop down under the box) ── */
.hc-search { position: relative; display: flex; align-items: center; }
.hc-search__icon { position: absolute; left: 14px; display: flex; color: var(--text-muted); pointer-events: none; }
.hc .hc-search__input {
  width: 100%; height: var(--control-height-md); margin: 0; padding: 0 44px 0 42px;
  border: 1px solid var(--border-control); border-radius: var(--radius-control);
  background: var(--surface-raised); color: var(--text-primary);
  font: inherit; font-size: var(--font-size-body); box-shadow: none; outline: none;
  transition: var(--transition-control);
}
.hc .hc-search__input::placeholder { color: var(--text-muted); }
.hc .hc-search__input:hover { border-color: var(--border-control-hover); }
.hc .hc-search__input:focus-visible { outline: var(--focus-outline); outline-offset: 0; border-color: var(--accent-border); }
.hc-search__kbd { position: absolute; right: 12px; pointer-events: none; }
.hc-search--hero .hc-search__input { height: var(--control-height-lg); padding-left: 46px; font-size: var(--font-size-body-lg); border-radius: var(--radius-card); box-shadow: var(--shadow-raised); }
.hc-search__panel {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: var(--z-dropdown);
  max-height: min(70vh, 520px); overflow-y: auto; overscroll-behavior: contain;
  border: 1px solid var(--border-default); border-radius: var(--radius-card);
  background: var(--surface-overlay); box-shadow: var(--shadow-overlay);
}
.hc-search__list { margin: 0; padding: var(--space-2xs); list-style: none; }
.hc-search__opt { display: grid; gap: 2px; padding: var(--space-sm) var(--space-md); border-radius: var(--radius-control); cursor: pointer; }
.hc-search__opt:hover, .hc-search__opt[aria-selected="true"] { background: var(--surface-selected); }
.hc-search__opt[aria-selected="true"] { box-shadow: inset 3px 0 0 var(--accent); }
.hc-search__where { font-size: var(--font-size-caption); color: var(--text-muted); }
.hc-search__title { font-weight: var(--font-weight-bold); color: var(--text-primary); }
.hc-search__snip { font-size: var(--font-size-body-sm); color: var(--text-secondary); }
.hc-search mark { background: var(--accent-subtle); color: inherit; border-radius: 2px; padding: 0 1px; }
.hc-search__empty, .hc-search__note { display: grid; gap: var(--space-2xs); padding: var(--space-md); color: var(--text-secondary); font-size: var(--font-size-body-sm); }
.hc-search__empty a { color: var(--accent-text); }
.hc-search__note { padding-bottom: var(--space-2xs); font-size: var(--font-size-caption); color: var(--text-muted); }

/* ═══ HOME ═══ */
.hc-home { max-width: var(--page-max-width); margin: 0 auto; padding: var(--space-3xl) var(--page-gutter) var(--space-5xl); }
.hc-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: var(--space-4xl); align-items: center; padding-bottom: var(--space-2xl); }
.hc-eyebrow { margin: 0 0 var(--space-sm); font-size: var(--font-size-eyebrow); font-weight: var(--font-weight-bold); letter-spacing: var(--tracking-eyebrow); text-transform: uppercase; color: var(--text-muted); }
.hc-hero__title { margin: 0; font-size: var(--font-size-display); font-weight: var(--font-weight-heavy); line-height: var(--line-height-tight); letter-spacing: var(--tracking-display); color: var(--text-primary); }
.hc-hero__title > span { display: block; }
.hc-hero__accent { margin-top: .1em; color: var(--accent-text); }
.hc-hero__title:focus { outline: none; }
.hc-hero__lede { margin: var(--space-lg) 0 var(--space-xl); max-width: 32em; font-size: var(--font-size-body-lg); line-height: var(--line-height-body); color: var(--text-secondary); }
.hc-popular { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs) var(--space-sm); margin-top: var(--space-md); }
.hc-popular__label { font-size: var(--font-size-body-sm); color: var(--text-muted); }
.hc-popular__list { display: flex; flex-wrap: wrap; gap: var(--space-xs); margin: 0; padding: 0; list-style: none; }
.hc-chip { display: inline-flex; align-items: center; min-height: var(--control-height-sm); padding: 0 var(--space-sm); border: 1px solid var(--border-control); border-radius: var(--radius-pill); background: var(--surface-raised); color: var(--text-primary); font-size: var(--font-size-body-sm); text-decoration: none; transition: var(--transition-control); }
.hc-chip:hover { border-color: var(--accent-border); color: var(--accent-text); }

/* The bands of the home page */
.hc-band { margin-top: var(--space-4xl); }
.hc-band--tight { margin-top: var(--space-xl); }
.hc-band__head { margin-bottom: var(--space-lg); }
.hc-band__title { margin: 0; font-size: var(--font-size-h2); font-weight: var(--font-weight-heavy); line-height: var(--line-height-title); letter-spacing: var(--tracking-title); color: var(--text-primary); }
.hc-band__sub { margin: var(--space-2xs) 0 0; color: var(--text-secondary); }
.hc-band--tight .hc-band__title { margin-bottom: var(--space-md); }
.hc-more { display: inline-flex; align-items: center; gap: var(--space-2xs); margin-top: var(--space-lg); font-weight: var(--font-weight-semibold); color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }

/* ── The Help File dossier ── */
.hc-dossier { display: flex; justify-content: center; perspective: 1200px; }
.hc-dossier__open { display: block; width: min(calc(100% - 32px), 400px); margin-right: 32px; color: inherit; text-decoration: none; border-radius: var(--radius-modal); }
.hc-dossier__open:focus-visible { outline-offset: 8px; }
.hc-dossier__folder {
  position: relative; display: block; height: 300px; margin-top: 30px;
  border-radius: 6px var(--radius-modal) var(--radius-modal) var(--radius-modal);
  background: var(--hc-folder);
  box-shadow: var(--shadow-overlay);
  animation: hc-rise .7s var(--ease-enter) backwards;
}
.hc-dossier__folder::before { content: ""; position: absolute; left: 0; top: -26px; width: 46%; height: 30px; border-radius: 10px 10px 0 0; background: var(--hc-folder); }
.hc-dossier__tab { position: absolute; left: 18px; top: -19px; z-index: 1; font-size: var(--font-size-caption); font-weight: var(--font-weight-heavy); letter-spacing: .14em; text-transform: uppercase; color: var(--text-inverse); }
html.dark .hc-dossier__tab { color: var(--text-primary); }
/* Index tabs peeking from the right edge */
.hc-dossier__index {
  position: absolute; right: -30px; z-index: 0; width: 64px; padding: 6px 6px 6px 0;
  border-radius: 0 var(--radius-control) var(--radius-control) 0;
  background: var(--surface-muted); color: var(--text-secondary);
  font-size: 10px; font-weight: var(--font-weight-heavy); letter-spacing: .06em; text-transform: uppercase; text-align: right;
  transition: translate var(--duration-base) var(--ease-enter);
}
.hc-dossier__index--1 { top: 40px; }
.hc-dossier__index--2 { top: 82px; background: var(--hc-paper); }
.hc-dossier__index--3 { top: 124px; }
/* Layered paper */
.hc-dossier__paper, .hc-dossier__sheet { position: absolute; left: 16px; right: 16px; border-radius: 4px; background: var(--hc-paper); box-shadow: var(--shadow-raised); }
.hc-dossier__paper--back { top: 10px; bottom: 20px; rotate: 2.2deg; background: var(--surface-muted); transition: rotate var(--duration-slow) var(--ease-enter), translate var(--duration-slow) var(--ease-enter); }
.hc-dossier__paper--mid { top: 16px; bottom: 16px; rotate: -1.4deg; transition: rotate var(--duration-slow) var(--ease-enter), translate var(--duration-slow) var(--ease-enter); }
.hc-dossier__sheet {
  top: 22px; bottom: 12px; z-index: 1; display: flex; flex-direction: column; gap: var(--space-xs);
  padding: var(--space-xl) var(--space-xl) var(--space-lg);
  color: var(--text-primary);
  transition: translate .55s var(--ease-enter), rotate .55s var(--ease-enter);
  animation: hc-sheet .75s .15s var(--ease-enter) backwards;
}
.hc-dossier__clip { position: absolute; left: -6px; top: -24px; color: var(--text-muted); animation: hc-clip .45s .9s var(--ease-enter) backwards; }
.hc-dossier__kicker { font-size: var(--font-size-caption); font-weight: var(--font-weight-heavy); letter-spacing: .12em; text-transform: uppercase; color: var(--accent-text); }
.hc-dossier__head { font-size: 22px; font-weight: var(--font-weight-heavy); line-height: 1.1; letter-spacing: -.02em; }
.hc-dossier__checks { display: grid; gap: var(--space-xs); margin-top: var(--space-xs); padding-top: var(--space-sm); border-top: 1px dashed var(--border-strong); }
.hc-dossier__check { display: flex; align-items: center; gap: var(--space-xs); font-size: var(--font-size-body); color: var(--text-secondary); }
.hc-dossier__box { flex: none; width: 16px; height: 16px; border: 2px solid var(--border-control); border-radius: var(--radius-choice); }
.hc-dossier__cue { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; font-size: var(--font-size-body-sm); font-weight: var(--font-weight-bold); color: var(--accent-text); }
.hc-dossier__cue svg { transition: translate var(--duration-base) var(--ease-standard); }
.hc-dossier__stamp {
  position: absolute; right: 18px; bottom: 20px; padding: 6px 10px; border: 3px solid var(--accent); border-radius: 6px;
  color: var(--accent); font-size: 12px; font-weight: 900; line-height: 1.05; letter-spacing: .12em; text-align: center; text-transform: uppercase;
  rotate: -10deg; opacity: .9;
  animation: hc-stamp .5s 1.2s var(--hc-stamp-ease) backwards;
}
html:not(.dark) .hc-dossier__stamp { mix-blend-mode: multiply; }
/* Lift on hover or keyboard focus: the sheet pulls up, the papers fan, the tabs peek out. */
@media (hover: hover) {
  .hc-dossier__open:hover .hc-dossier__sheet { translate: 0 -16px; rotate: -1.8deg; }
  .hc-dossier__open:hover .hc-dossier__paper--mid { rotate: -3deg; translate: -4px -4px; }
  .hc-dossier__open:hover .hc-dossier__paper--back { rotate: 4deg; translate: 6px -2px; }
  .hc-dossier__open:hover .hc-dossier__index { translate: 8px 0; }
  .hc-dossier__open:hover .hc-dossier__cue svg { translate: 3px 0; }
}
.hc-dossier__open:focus-visible .hc-dossier__sheet { translate: 0 -16px; rotate: -1.8deg; }
.hc-dossier__open:focus-visible .hc-dossier__index { translate: 8px 0; }
.hc-dossier__open:active .hc-dossier__sheet { translate: 0 -8px; }

/* ── Account-aware pieces ── */
.hc-slot[hidden] { display: none; }
.hc-recs { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--space-md); margin: 0; padding: 0; list-style: none; }
.hc-rec { display: flex; flex-direction: column; gap: var(--space-2xs); padding: var(--space-lg); border: 1px solid var(--border-default); border-top: 3px solid var(--accent); border-radius: var(--radius-card); background: var(--surface-raised); box-shadow: var(--shadow-raised); }
.hc-rec--danger { border-top-color: var(--danger-solid); }
.hc-rec--neutral { border-top-color: var(--border-strong); }
.hc-rec__title { font-size: var(--font-size-body-lg); font-weight: var(--font-weight-bold); }
.hc-rec__text { color: var(--text-secondary); }
.hc-rec__actions { display: flex; flex-wrap: wrap; gap: var(--space-xs); margin-top: var(--space-sm); }

/* First-month checklist: an index card with stamps */
.hc-check { margin-top: var(--space-xl); padding: var(--space-xl); border: 1px solid var(--border-default); border-radius: var(--radius-card); background: var(--hc-paper); box-shadow: var(--shadow-raised); }
.hc-check__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-md); }
.hc-check__title { margin: 0; font-size: var(--font-size-h3); font-weight: var(--font-weight-heavy); }
.hc-check__count { font-size: var(--font-size-body-sm); color: var(--text-muted); }
.hc-check__bar { height: 6px; margin: var(--space-sm) 0 var(--space-md); border-radius: var(--radius-pill); background: var(--surface-inset); overflow: hidden; }
.hc-check__bar span { display: block; width: var(--hc-progress, 0%); height: 100%; border-radius: inherit; background: var(--accent); }
.hc-check__list { display: grid; margin: 0; padding: 0; list-style: none; }
.hc-check__item { position: relative; display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: var(--space-sm); align-items: center; padding: var(--space-sm) 0; border-bottom: 1px dashed var(--border-subtle); }
.hc-check__item:last-child { border-bottom: 0; }
.hc-check__mark { display: grid; place-items: center; width: 22px; height: 22px; border: 2px solid var(--border-control); border-radius: var(--radius-pill); color: var(--success-text); }
.hc-check__item.is-done .hc-check__mark { border-color: transparent; }
.hc-check__text { display: grid; gap: 1px; }
.hc-check__text > span { font-size: var(--font-size-body-sm); color: var(--text-secondary); }
.hc-check__item.is-done .hc-check__text strong { color: var(--text-secondary); }
.hc-check__item.is-next { background: var(--accent-subtle); margin: 0 calc(var(--space-sm) * -1); padding-left: var(--space-sm); padding-right: var(--space-sm); border-radius: var(--radius-control); }
.hc-check__go { display: flex; align-items: center; gap: var(--space-sm); }
.hc-check__how { font-size: var(--font-size-body-sm); color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }

/* The rubber stamp: lands once, with the stamp's own overshoot */
.hc-stamp {
  display: inline-block; padding: 3px 8px; border: 2px solid var(--success-solid); border-radius: 5px;
  color: var(--success-text); font-size: 11px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; line-height: 1.1;
  rotate: -6deg; animation: hc-stamp .5s var(--hc-stamp-ease) backwards;
}
.hc-stamp--static { position: absolute; top: var(--space-lg); right: var(--space-lg); animation: none; }
.hc-demo__heist .hc-stamp { border-color: var(--accent); color: var(--accent-text); }

/* ── Getting-started guides (numbered index cards) ── */
.hc-guides { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--space-md); margin: 0; padding: 0; list-style: none; }
.hc-guide { position: relative; display: grid; gap: var(--space-2xs); height: 100%; padding: var(--space-lg) var(--space-lg) var(--space-lg) 64px; border: 1px solid var(--border-default); border-radius: var(--radius-card); background: var(--surface-raised); color: var(--text-primary); text-decoration: none; box-shadow: var(--shadow-raised); transition: translate var(--duration-base) var(--ease-enter), border-color var(--duration-fast) var(--ease-standard); }
.hc-guide:hover { translate: 0 -3px; border-color: var(--accent-border); }
.hc-guide__num { position: absolute; left: var(--space-lg); top: var(--space-lg); display: grid; place-items: center; width: 30px; height: 30px; border-radius: var(--radius-pill); background: var(--accent-fill); color: var(--on-accent); font-weight: var(--font-weight-heavy); }
.hc-guide__title { font-weight: var(--font-weight-bold); font-size: var(--font-size-body-lg); }
.hc-guide__sub { font-size: var(--font-size-body-sm); color: var(--text-secondary); }

/* ── Which AI setup? ── */
.hc-paths { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--space-lg); }
.hc-path { position: relative; display: flex; flex-direction: column; gap: var(--space-sm); padding: var(--space-xl); border: 1px solid var(--border-default); border-radius: var(--radius-card); background: var(--surface-raised); box-shadow: var(--shadow-raised); }
.hc-path--recommended { border: 2px solid var(--accent-border); background: var(--hc-paper); }
.hc-path__tag { margin: 0; font-size: var(--font-size-eyebrow); font-weight: var(--font-weight-bold); letter-spacing: var(--tracking-eyebrow); text-transform: uppercase; color: var(--accent-text); }
.hc-path:not(.hc-path--recommended) .hc-path__tag { color: var(--text-muted); }
.hc-path__title { margin: 0; font-size: var(--font-size-h3); font-weight: var(--font-weight-heavy); }
.hc-path__text { margin: 0; color: var(--text-secondary); }
.hc-path__list { margin: 0 0 var(--space-sm); padding-left: 1.2em; color: var(--text-secondary); }
.hc-path .hc-btn { align-self: flex-start; margin-top: auto; }

/* ── Topic index cards ── */
.hc-topics { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: var(--space-md); margin: 0; padding: 0; list-style: none; }
.hc-topic__card {
  position: relative; display: flex; flex-direction: column; gap: var(--space-xs); height: 100%;
  padding: var(--space-lg); border: 1px solid var(--border-default); border-radius: var(--radius-control);
  background: var(--surface-raised); box-shadow: var(--shadow-raised);
  transition: translate .4s var(--ease-enter), border-color var(--duration-fast) var(--ease-standard);
}
/* The index-card tab along the top */
.hc-topic__card::before { content: ""; position: absolute; left: var(--space-lg); top: -1px; width: 44px; height: 4px; border-radius: 0 0 3px 3px; background: var(--accent); }
.hc-topic__card:hover, .hc-topic__card:focus-within { translate: 0 -4px; border-color: var(--accent-border); }
.hc-topic__icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--radius-control); background: var(--accent-subtle); color: var(--accent-text); }
.hc-topic__title { margin: var(--space-2xs) 0 0; font-size: var(--font-size-body-lg); font-weight: var(--font-weight-heavy); }
.hc-topic__title a { text-decoration: none; }
.hc-topic__title a:hover { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }
.hc-topic__blurb { margin: 0; font-size: var(--font-size-body-sm); color: var(--text-secondary); }
.hc-topic__list { display: grid; gap: 2px; margin: var(--space-2xs) 0 0; padding: var(--space-xs) 0 0; border-top: 1px dashed var(--border-subtle); list-style: none; }
.hc-topic__list a { display: block; padding: 3px 0; font-size: var(--font-size-body-sm); color: var(--text-primary); text-decoration: none; }
.hc-topic__list a:hover { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }
.hc-topic__foot { margin-top: auto; padding-top: var(--space-xs); font-size: var(--font-size-caption); color: var(--text-muted); }

/* ── Prompt cards ── */
.hc-prompt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--space-md); margin: 0; padding: 0; list-style: none; }
.hc-prompt { display: flex; flex-direction: column; gap: var(--space-xs); height: 100%; padding: var(--space-lg); border: 1px solid var(--border-default); border-radius: var(--radius-card); background: var(--surface-raised); }
.hc-prompt__title { margin: 0; font-size: var(--font-size-body-lg); font-weight: var(--font-weight-bold); }
.hc-prompt__purpose { margin: 0; font-size: var(--font-size-body-sm); color: var(--text-secondary); }
.hc-prompt__text { padding: var(--space-sm); border-left: 3px solid var(--accent); border-radius: 0 var(--radius-control) var(--radius-control) 0; background: var(--surface-inset); font-size: var(--font-size-body-sm); line-height: var(--line-height-body); color: var(--text-primary); white-space: pre-wrap; }
.hc-prompt__foot { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-sm); margin-top: auto; padding-top: var(--space-2xs); }
.hc-prompt__needs { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; list-style: none; }
.hc-prompt__needs li { padding: 2px 8px; border-radius: var(--radius-pill); background: var(--neutral-subtle); color: var(--neutral-text); font-size: var(--font-size-caption); }

/* ── Copy box and copy button ── */
.hc-copy { margin: var(--space-md) 0; border: 1px solid var(--border-default); border-radius: var(--radius-card); background: var(--surface-inset); overflow: hidden; }
.hc-copy__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); padding: var(--space-xs) var(--space-xs) var(--space-xs) var(--space-md); border-bottom: 1px solid var(--border-subtle); background: var(--surface-raised); }
.hc-copy__label { font-size: var(--font-size-caption); font-weight: var(--font-weight-bold); color: var(--text-secondary); }
.hc-copy__text { padding: var(--space-sm) var(--space-md); font-size: var(--font-size-body-sm); line-height: var(--line-height-body); white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text-primary); }
.hc-copy--mono .hc-copy__text { font-family: var(--font-mono); font-size: var(--font-size-body); }
.hc-copy__btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: var(--control-height-sm); padding: 0 var(--space-sm);
  border: 1px solid var(--border-control); border-radius: var(--radius-control); background: var(--surface-raised); color: var(--text-primary);
  font: inherit; font-size: var(--font-size-body-sm); font-weight: var(--font-weight-semibold); cursor: pointer; transition: var(--transition-control);
}
.hc-copy__btn:hover { border-color: var(--accent-border); color: var(--accent-text); }
.hc-copy__btn.is-copied { border-color: var(--success-border); background: var(--success-subtle); color: var(--success-text); }

/* ── Support card ── */
.hc-support { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-lg); margin-top: var(--space-4xl); padding: var(--space-xl) var(--space-2xl); border: 1px dashed var(--border-strong); border-radius: var(--radius-card); background: var(--hc-paper); }
.hc-support__title { margin: 0; font-size: var(--font-size-h3); font-weight: var(--font-weight-heavy); }
.hc-support__text { margin: var(--space-2xs) 0 0; max-width: 46em; color: var(--text-secondary); }
.hc-support__actions { display: flex; flex-wrap: wrap; gap: var(--space-xs); }

/* ═══ ARTICLE ═══ */
.hc-article { max-width: var(--page-max-width); margin: 0 auto; padding: 0 var(--page-gutter) var(--space-5xl); }
.hc-topics-toggle { display: none; }
.hc .hc-layout {
  display: grid; grid-template-columns: 240px minmax(0, 1fr) 200px; grid-template-areas: "nav main toc";
  gap: var(--space-3xl); align-items: start; padding-top: var(--space-2xl);
}
/* The topic menu: one category open at a time */
.hc-nav { grid-area: nav; }
.hc .hm-sidebar { display: block; position: static; width: auto; max-height: none; overflow: visible; gap: 0; margin: 0; padding: 0; border: 0; background: transparent; }
.hc .hc-nav__home { display: inline-flex; padding: 0; border: 0; border-radius: 0; white-space: normal; align-items: center; gap: var(--space-xs); margin-bottom: var(--space-md); font-size: var(--font-size-body-sm); font-weight: var(--font-weight-semibold); color: var(--accent-text); text-decoration: none; }
.hc-nav__home:hover { text-decoration: underline; text-underline-offset: 3px; }
.hc .hm-sidebar-group { display: block; margin: 0; border-top: 1px solid var(--border-subtle); }
.hc .hm-sidebar-label { margin: 0; padding: 0; white-space: normal; font-size: inherit; letter-spacing: normal; text-transform: none; color: inherit; }
.hc-nav__group {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-xs); width: 100%;
  min-height: var(--tap-target-min); margin: 0; padding: 0 var(--space-2xs); border: 0; border-radius: 0; background: transparent;
  color: var(--text-primary); font: inherit; font-size: var(--font-size-body); font-weight: var(--font-weight-bold); text-align: left; cursor: pointer; box-shadow: none;
}
.hc-nav__group:hover { color: var(--accent-text); background: transparent; opacity: 1; }
.hc-nav__group svg { flex: none; color: var(--text-muted); transition: rotate var(--duration-base) var(--ease-standard); }
.hc-nav__group[aria-expanded="true"] svg { rotate: 180deg; }
.hc-nav__items { margin: 0 0 var(--space-sm); padding: 0; list-style: none; }
.hc-nav__items[hidden] { display: none; }
.hc .hc-nav__link, .hc .hc-nav__link.hm-tab {
  display: block; margin: 0; padding: 6px var(--space-sm); border: 0; border-left: 2px solid var(--border-subtle); border-radius: 0;
  background: transparent; color: var(--text-secondary); font-size: var(--font-size-body-sm); font-weight: var(--font-weight-regular); line-height: 1.4;
  text-decoration: none; white-space: normal; transition: color var(--duration-fast) var(--ease-standard), border-color var(--duration-fast) var(--ease-standard);
}
.hc .hc-nav__link:hover { color: var(--text-primary); border-left-color: var(--border-strong); }
.hc .hc-nav__link.active { color: var(--accent-text); border-left-color: var(--accent); background: var(--accent-subtle); font-weight: var(--font-weight-regular); }

/* The article column */
.hc .hm-content { grid-area: main; min-width: 0; padding: 0; overflow: visible; }
.hc-doc { max-width: var(--measure); }
.hc .hm-breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 var(--space-md); font-size: var(--font-size-body-sm); color: var(--text-muted); }
.hc .hm-breadcrumb span { color: var(--text-muted); cursor: default; }
.hc .hm-breadcrumb a { color: var(--text-secondary); text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; }
.hc .hm-breadcrumb a:hover { color: var(--accent-text); }
.hc-h1 { margin: 0; }
.hc-h1:focus { outline: none; }
.hc .hm-h1 { margin: 0; font-size: clamp(28px, 2.6vw, 38px); font-weight: var(--font-weight-heavy); line-height: 1.1; letter-spacing: var(--tracking-display); color: var(--text-primary); }
.hc-lede { margin: var(--space-sm) 0 0; font-size: var(--font-size-body-lg); line-height: var(--line-height-body); color: var(--text-secondary); }
.hc-meta { display: inline-flex; align-items: center; gap: 6px; margin: var(--space-md) 0 0; padding: 3px 10px 3px 8px; border-radius: var(--radius-pill); background: var(--success-subtle); color: var(--success-text); font-size: var(--font-size-caption); }
.hc-doc__body { margin-top: var(--space-xl); }

/* Sections and text */
.hc .hm-section { margin: 0 0 var(--space-2xl); scroll-margin-top: calc(var(--hc-bar-h) + var(--space-md)); }
.hc-h2 { margin: 0 0 var(--space-sm); }
.hc-h2:focus { outline: none; }
.hc .hm-h2 { margin: 0; font-size: var(--font-size-h2); font-weight: var(--font-weight-heavy); line-height: var(--line-height-title); letter-spacing: var(--tracking-title); color: var(--text-primary); }
.hc-h3 { margin: var(--space-lg) 0 var(--space-xs); font-size: var(--font-size-h3); font-weight: var(--font-weight-bold); line-height: var(--line-height-title); }
.hc-p { margin: 0 0 var(--space-md); font-size: 15.5px; line-height: 1.7; color: var(--text-primary); }
.hc-ul { margin: 0 0 var(--space-md); padding-left: 1.3em; font-size: 15.5px; line-height: 1.7; }
.hc-ul li { margin-bottom: var(--space-2xs); }
.hc-ul li::marker { color: var(--accent); }
.hc-doc strong { font-weight: var(--font-weight-bold); color: var(--text-primary); }
.hc-xlink, .hc-doc .hc-p a, .hc-doc .hc-ul a, .hc-faq__a a, .hc-pairs a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }
.hc-applink { display: inline-flex; align-items: center; gap: 4px; font-weight: var(--font-weight-semibold); color: var(--accent-text); }

/* Numbered steps: ink numbers in burgundy circles, joined by a dashed rule */
.hc-steps { counter-reset: hc-step; display: grid; gap: var(--space-md); margin: var(--space-md) 0 var(--space-lg); padding: 0; list-style: none; }
.hc-step { position: relative; display: grid; gap: 2px; padding-left: 46px; counter-increment: hc-step; }
.hc-step::before { content: counter(hc-step); position: absolute; left: 0; top: -2px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: var(--radius-pill); background: var(--accent-fill); color: var(--on-accent); font-weight: var(--font-weight-heavy); font-size: var(--font-size-body); }
.hc-step:not(:last-child)::after { content: ""; position: absolute; left: 14px; top: 32px; bottom: calc(var(--space-md) * -1); border-left: 2px dashed var(--border-strong); }
.hc-step__title { font-size: var(--font-size-body-lg); font-weight: var(--font-weight-bold); color: var(--text-primary); }
.hc-step__body { font-size: 15px; line-height: 1.65; color: var(--text-secondary); }
.hc-step__body a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }

/* Callouts: tip, warning, before-you-start, shortcut, done */
.hc-callout { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: var(--space-sm); margin: var(--space-md) 0 var(--space-lg); padding: var(--space-md) var(--space-lg); border: 1px solid var(--info-border); border-left-width: 4px; border-radius: var(--radius-control); background: var(--info-subtle); }
.hc-callout__icon { display: flex; padding-top: 2px; color: var(--info-text); }
.hc-callout__title { display: block; margin-bottom: 2px; font-weight: var(--font-weight-bold); color: var(--text-primary); }
.hc-callout__body p { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--text-primary); }
.hc-callout__body .hc-ul { margin: var(--space-2xs) 0 0; font-size: 14.5px; }
.hc-callout__body a { color: var(--accent-text); text-decoration: underline; }
.hc-callout--warn { border-color: var(--warning-border); background: var(--warning-subtle); }
.hc-callout--warn .hc-callout__icon { color: var(--warning-text); }
.hc-callout--needs { border-color: var(--border-strong); background: var(--hc-paper); background-image: repeating-linear-gradient(transparent 0 27px, var(--border-subtle) 27px 28px); }
.hc-callout--needs .hc-callout__icon { color: var(--text-secondary); }
.hc-callout--shortcut { border-color: var(--accent-border); background: var(--accent-subtle); }
.hc-callout--shortcut .hc-callout__icon { color: var(--accent-text); }
.hc-callout--done { border-color: var(--success-border); background: var(--success-subtle); }
.hc-callout--done .hc-callout__icon { color: var(--success-text); }

/* Screenshots: a print on the desk; click shows it larger */
.hc-shot { margin: var(--space-md) 0 var(--space-xl); }
.hc-shot__open { position: relative; display: block; width: 100%; margin: 0; padding: 0; border: 1px solid var(--border-default); border-radius: var(--radius-card); background: var(--surface-inset); box-shadow: var(--shadow-raised); overflow: hidden; cursor: zoom-in; transition: translate var(--duration-base) var(--ease-enter); }
.hc-shot__open:hover { translate: 0 -2px; }
.hc-shot__img { display: block; width: 100%; height: auto; aspect-ratio: 1280 / 800; }
html.dark .hc-shot__img--light, html:not(.dark) .hc-shot__img--dark { display: none; }
.hc-shot__zoom { position: absolute; top: var(--space-xs); right: var(--space-xs); display: grid; place-items: center; width: 28px; height: 28px; border-radius: var(--radius-control); background: var(--surface-overlay); color: var(--text-secondary); box-shadow: var(--shadow-raised); opacity: .9; }
.hc-shot figcaption { margin-top: var(--space-xs); font-size: var(--font-size-body-sm); color: var(--text-muted); }
.hc-zoom { width: min(96vw, 1320px); max-width: none; max-height: 94vh; padding: var(--space-md); border: 1px solid var(--border-default); border-radius: var(--radius-modal); background: var(--surface-overlay); color: var(--text-primary); box-shadow: var(--shadow-modal); }
.hc-zoom::backdrop { background: var(--scrim); }
.hc-zoom__img { display: block; width: 100%; height: auto; max-height: calc(94vh - 90px); object-fit: contain; border-radius: var(--radius-control); }
.hc-zoom__cap { margin: var(--space-xs) 0 0; font-size: var(--font-size-body-sm); color: var(--text-secondary); }
.hc-zoom__close { float: right; display: grid; place-items: center; width: var(--tap-target-min); height: var(--tap-target-min); margin: -4px -4px 4px 8px; border: 1px solid var(--border-control); border-radius: var(--radius-pill); background: var(--surface-raised); color: var(--text-primary); cursor: pointer; }

/* Term / answer lists */
.hc-pairs { display: grid; grid-template-columns: minmax(140px, 30%) minmax(0, 1fr); gap: var(--space-sm) var(--space-lg); margin: var(--space-md) 0; }
.hc-pairs dt { font-weight: var(--font-weight-bold); color: var(--text-primary); }
.hc-pairs dd { margin: 0; color: var(--text-secondary); line-height: 1.6; }
.hc-pairs--compact { gap: var(--space-2xs) var(--space-md); font-size: var(--font-size-body-sm); }
.hc-pill { display: inline-block; margin-left: 4px; padding: 1px 7px; border-radius: var(--radius-pill); background: var(--neutral-subtle); color: var(--neutral-text); font-size: var(--font-size-caption); font-weight: var(--font-weight-semibold); }

/* FAQ: paper folders that open */
.hc-faq { display: grid; gap: var(--space-xs); }
.hc-faq__item { border: 1px solid var(--border-default); border-radius: var(--radius-control); background: var(--surface-raised); scroll-margin-top: calc(var(--hc-bar-h) + var(--space-md)); }
.hc-faq__item[open] { background: var(--hc-paper); box-shadow: var(--shadow-raised); }
.hc-faq__q { display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); min-height: var(--tap-target-min); padding: var(--space-sm) var(--space-md); font-weight: var(--font-weight-bold); cursor: pointer; list-style: none; }
.hc-faq__q::-webkit-details-marker { display: none; }
.hc-faq__q::after { content: "+"; flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: var(--radius-pill); background: var(--accent-subtle); color: var(--accent-text); font-weight: var(--font-weight-heavy); }
.hc-faq__item[open] .hc-faq__q::after { content: "\2212"; }
.hc-faq__a { padding: 0 var(--space-md) var(--space-md); color: var(--text-secondary); line-height: 1.65; }

/* Tool groups, tips and lists of cards */
.hc-toolgrid, .hc-tipgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--space-sm); margin: var(--space-md) 0; padding: 0; list-style: none; }
.hc-tool, .hc-tipcard { display: grid; gap: var(--space-2xs); padding: var(--space-md); border: 1px solid var(--border-default); border-radius: var(--radius-control); background: var(--surface-raised); }
.hc-tool__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-xs); }
.hc-tool__count { padding: 1px 8px; border-radius: var(--radius-pill); background: var(--accent-subtle); color: var(--accent-text); font-size: var(--font-size-caption); font-weight: var(--font-weight-bold); }
.hc-tool__desc, .hc-tipcard > span:last-child { font-size: var(--font-size-body-sm); color: var(--text-secondary); line-height: 1.55; }
.hc-tipcard__tag { justify-self: start; padding: 1px 8px; border-radius: var(--radius-pill); background: var(--accent-subtle); color: var(--accent-text); font-size: var(--font-size-caption); font-weight: var(--font-weight-bold); }
.hc-tipcard a { color: var(--accent-text); }
.hc-topic-list, .hc-related__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--space-sm); margin: 0; padding: 0; list-style: none; }
.hc-card-link { display: grid; gap: 2px; height: 100%; padding: var(--space-md); border: 1px solid var(--border-default); border-radius: var(--radius-control); background: var(--surface-raised); color: var(--text-primary); text-decoration: none; transition: border-color var(--duration-fast) var(--ease-standard), translate var(--duration-base) var(--ease-enter); }
.hc-card-link:hover { border-color: var(--accent-border); translate: 0 -2px; }
.hc-card-link__name { font-weight: var(--font-weight-bold); }
.hc-card-link__sub { font-size: var(--font-size-body-sm); color: var(--text-secondary); line-height: 1.5; }

/* AI providers side by side */
.hc-providers { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--space-lg); margin: var(--space-lg) 0; }
.hc-provider { padding: var(--space-lg); border: 1px solid var(--border-default); border-radius: var(--radius-card); background: var(--surface-raised); }
.hc-provider .hc-h3 { margin-top: 0; }
.hc-provider__who { margin: 0 0 var(--space-sm); font-size: var(--font-size-body-sm); color: var(--text-secondary); }

/* Prompt library filter */
.hc-filter { display: flex; flex-wrap: wrap; gap: var(--space-xs); margin: var(--space-md) 0 0; }
.hc-filter__btn { min-height: var(--control-height-sm); padding: 0 var(--space-sm); border: 1px solid var(--border-control); border-radius: var(--radius-pill); background: var(--surface-raised); color: var(--text-primary); font: inherit; font-size: var(--font-size-body-sm); cursor: pointer; transition: var(--transition-control); }
.hc-filter__btn:hover { border-color: var(--accent-border); }
.hc-filter__btn[aria-pressed="true"] { border-color: var(--accent-border); background: var(--accent-subtle); color: var(--accent-text); }

/* The sample conversation */
.hc-demo { margin: var(--space-md) 0; padding: var(--space-lg); border: 1px solid var(--border-default); border-radius: var(--radius-modal); background: var(--surface-inset); }
.hc-demo__label { display: inline-block; margin: 0 0 var(--space-md); padding: 2px 10px; border: 2px solid var(--accent); border-radius: 5px; color: var(--accent-text); font-size: 11px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; rotate: -2deg; }
.hc-demo__thread { display: grid; gap: var(--space-sm); margin: 0; padding: 0; list-style: none; }
.hc-demo__thread > li[hidden] { display: none; }
.hc-demo__msg { display: grid; gap: 2px; max-width: 85%; padding: var(--space-sm) var(--space-md); border-radius: var(--radius-card); line-height: 1.55; }
.hc-demo__msg--you { justify-self: end; border-bottom-right-radius: 4px; background: var(--accent-fill); color: var(--on-accent); }
.hc-demo__msg--ai { justify-self: start; border-bottom-left-radius: 4px; background: var(--surface-raised); border: 1px solid var(--border-default); }
.hc-demo__who { font-size: var(--font-size-caption); font-weight: var(--font-weight-bold); opacity: .8; }
.hc-demo__tool { justify-self: start; max-width: 85%; padding: var(--space-sm) var(--space-md); border: 1px dashed var(--border-strong); border-radius: var(--radius-control); background: var(--surface-raised); font-size: var(--font-size-body-sm); }
.hc-demo__tool-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-weight: var(--font-weight-bold); color: var(--text-secondary); }
.hc-demo__tool ul { margin: var(--space-2xs) 0 0; padding-left: 1.2em; color: var(--text-secondary); }
.hc-demo__heist { position: relative; display: grid; gap: 2px; justify-self: stretch; padding: var(--space-md); border: 1px solid var(--border-default); border-top: 3px solid var(--accent); border-radius: var(--radius-control); background: var(--hc-paper); }
.hc-demo__heist .hc-stamp { position: absolute; right: var(--space-md); top: 50%; translate: 0 -50%; }
.hc-demo__thread > li.is-new { animation: hc-in .35s var(--ease-enter) backwards; }
.hc-demo__controls { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs); margin-top: var(--space-lg); }
.hc-demo__count { margin-left: auto; font-size: var(--font-size-body-sm); color: var(--text-muted); }

/* Banners from the account's state */
.hc-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-sm) var(--space-md); margin-top: var(--space-lg); padding: var(--space-sm) var(--space-md); border: 1px solid var(--accent-border); border-radius: var(--radius-control); background: var(--accent-subtle); }
.hc-banner--success { border-color: var(--success-border); background: var(--success-subtle); }
.hc-banner--danger { border-color: var(--danger-border); background: var(--danger-subtle); }
.hc-banner--neutral { border-color: var(--border-strong); background: var(--surface-raised); }

/* Related, feedback, previous / next */
.hc-related { margin-top: var(--space-3xl); }
.hc-related__title, .hc-feedback__title { margin: 0 0 var(--space-sm); font-size: var(--font-size-h3); font-weight: var(--font-weight-heavy); }
.hc-feedback { margin-top: var(--space-2xl); padding: var(--space-lg); border: 1px dashed var(--border-strong); border-radius: var(--radius-card); background: var(--hc-paper); }
.hc-feedback__choices, .hc-feedback__actions { display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.hc-feedback__more { margin-top: var(--space-md); }
.hc-feedback__label { display: block; margin-bottom: var(--space-2xs); font-weight: var(--font-weight-semibold); }
.hc-feedback__text { width: 100%; min-height: 84px; padding: var(--space-sm); border: 1px solid var(--border-control); border-radius: var(--radius-control); background: var(--surface-raised); color: var(--text-primary); font: inherit; resize: vertical; }
.hc-feedback__hint { margin: var(--space-2xs) 0 var(--space-sm); font-size: var(--font-size-body-sm); color: var(--text-muted); }
.hc-feedback__hint a { color: var(--accent-text); }
.hc-feedback__done { margin: var(--space-xs) 0 0; font-weight: var(--font-weight-semibold); color: var(--success-text); }
.hc-feedback__done:empty { display: none; }
.hc-prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-sm); margin-top: var(--space-2xl); }
.hc-prevnext__link { display: grid; gap: 2px; padding: var(--space-sm) var(--space-md); border: 1px solid var(--border-default); border-radius: var(--radius-control); color: var(--text-primary); text-decoration: none; font-weight: var(--font-weight-semibold); }
.hc-prevnext__link span { font-size: var(--font-size-caption); font-weight: var(--font-weight-semibold); color: var(--text-muted); }
.hc-prevnext__link--next { text-align: right; }
.hc-prevnext__link:hover { border-color: var(--accent-border); }

/* "On this page" */
.hc .hm-right { display: block; grid-area: toc; position: sticky; top: calc(var(--hc-bar-h) + var(--space-lg)); width: auto; padding: 0; border: 0; }
.hc-toc__box { margin: 0; }
.hc-toc__title { margin-bottom: var(--space-xs); font-size: var(--font-size-body-sm); font-weight: var(--font-weight-bold); color: var(--text-primary); cursor: pointer; list-style: none; }
.hc-toc__title::-webkit-details-marker { display: none; }
.hc .hm-right a { display: block; padding: 5px 0 5px var(--space-sm); border-left: 2px solid var(--border-subtle); color: var(--text-secondary); font-size: var(--font-size-body-sm); line-height: 1.4; text-decoration: none; }
.hc .hm-right a:hover { color: var(--text-primary); }
.hc .hm-right a.active { color: var(--accent-text); border-left-color: var(--accent); }

/* ═══ Motion ═══ */
@keyframes hc-rise { from { translate: 0 26px; opacity: 0; } }
@keyframes hc-sheet { from { translate: 0 -30px; rotate: -4deg; opacity: 0; } }
@keyframes hc-clip { from { translate: 0 -14px; opacity: 0; } }
@keyframes hc-stamp { 0% { scale: 1.7; opacity: 0; } 60% { opacity: 1; } 100% { scale: 1; } }
@keyframes hc-in { from { translate: 0 8px; opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .hc *, .hc *::before, .hc *::after { animation: none; transition: none; }
  .hc-dossier__open:hover .hc-dossier__sheet, .hc-dossier__open:focus-visible .hc-dossier__sheet,
  .hc-dossier__open:hover .hc-dossier__paper--mid, .hc-dossier__open:hover .hc-dossier__paper--back,
  .hc-dossier__open:hover .hc-dossier__index, .hc-dossier__open:focus-visible .hc-dossier__index,
  .hc-topic__card:hover, .hc-topic__card:focus-within, .hc-guide:hover, .hc-card-link:hover, .hc-shot__open:hover { translate: none; }
}

/* ═══ Widths ═══ */
@media (max-width: 1100px) {
  .hc .hc-layout { grid-template-columns: 220px minmax(0, 1fr); grid-template-areas: "nav toc" "nav main"; row-gap: var(--space-lg); }
  .hc .hm-right { position: static; }
  .hc-toc__box { padding: var(--space-sm) var(--space-md); border: 1px solid var(--border-default); border-radius: var(--radius-control); background: var(--surface-raised); }
  .hc-toc__title { margin: 0; }
  .hc-toc__box[open] .hc-toc__title { margin-bottom: var(--space-xs); }
  .hc-toc__title::after { content: " \25BE"; color: var(--text-muted); }
  .hc-hero { grid-template-columns: minmax(0, 1fr); gap: var(--space-2xl); }
  .hc-dossier { justify-content: flex-start; }
}
@media (max-width: 900px) {
  .hc .hc-layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "nav" "toc" "main"; gap: var(--space-md); padding-top: var(--space-md); }
  .hc-topics-toggle {
    display: inline-flex; align-items: center; gap: var(--space-xs); margin-top: var(--space-md);
    min-height: var(--tap-target-min); padding: 0 var(--space-md);
    border: 1px solid var(--border-control); border-radius: var(--radius-control); background: var(--surface-raised); color: var(--text-primary);
    font: inherit; font-weight: var(--font-weight-semibold); cursor: pointer;
  }
  .hc-topics-toggle[aria-expanded="true"] { border-color: var(--accent-border); color: var(--accent-text); }
  .hc .hc-layout:not(.is-nav-open) .hc-nav { display: none; }
  .hc .hc-layout.is-nav-open .hc-nav { padding: var(--space-md); border: 1px solid var(--border-default); border-radius: var(--radius-card); background: var(--surface-raised); }
  .hc-bar { flex-wrap: wrap; gap: var(--space-sm); padding: var(--space-sm) var(--page-gutter-mobile); }
  .hc-bar .hc-search { order: 3; flex-basis: 100%; max-width: none; }
  .hc-bar__support { margin-left: auto; }
  .hc-article { padding-left: var(--page-gutter-mobile); padding-right: var(--page-gutter-mobile); }
  .hc-home { padding: var(--space-xl) var(--page-gutter-mobile) var(--space-4xl); }
  .hc .hm-h1 { font-size: 28px; }
}
@media (max-width: 640px) {
  .hc-pairs { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .hc-pairs dd { margin-bottom: var(--space-sm); }
  .hc-prevnext { grid-template-columns: minmax(0, 1fr); }
  .hc-prevnext__link--next { text-align: left; }
  .hc-support { padding: var(--space-lg); }
  .hc-search__kbd { display: none; }
  .hc-dossier__folder { height: 270px; }
  .hc-demo__msg, .hc-demo__tool { max-width: 100%; }
  .hc-check__item { grid-template-columns: 24px minmax(0, 1fr); }
  .hc-check__go { grid-column: 2; }
  .hc .hc-search__input { font-size: var(--font-size-body-lg); }
}
@media (pointer: coarse) {
  .hc-btn, .hc-copy__btn, .hc-filter__btn, .hc-chip { min-height: var(--tap-target-min); }
  .hc .hc-nav__link, .hc .hm-right a, .hc-topic__list a { padding-top: 10px; padding-bottom: 10px; }
}

/* The app's legacy input normaliser (styles.css "Inputs & selects", theme.css
   "Inputs Normalization") reaches every textarea under #app-root with ID
   specificity and !important. Restate the feedback box's look the same way;
   the search box avoids it by having no type attribute. */
#app-root .hc .hc-feedback__text {
  background: var(--surface-raised) !important;
  border: 1px solid var(--border-control) !important;
  color: var(--text-primary) !important;
  box-shadow: none !important;
  padding: var(--space-sm);
  border-radius: var(--radius-control);
}
#app-root .hc .hc-feedback__text:focus-visible { outline: var(--focus-outline); outline-offset: 0; border-color: var(--accent-border) !important; }

/* A finished first-month checklist collapses to one line. */
.hc-check--done { display: flex; align-items: center; gap: var(--space-lg); padding: var(--space-md) var(--space-xl); }
.hc-check--done .hc-stamp { flex: none; }
.hc-check__done-text { margin: 0; color: var(--text-secondary); }
