/* Hallmark · pre-emit critique: P5 H5 E5 S5 R5 V5 */
/* Hallmark · genre: documentation · macrostructure: Index-First + technical manual · design-system: design.md · designed-as-app */
html { overflow-x: clip; }
body { overflow-x: clip; }
html { scroll-behavior: smooth; background: var(--color-paper); }
body.hc-body { min-width: 0; margin: 0; color: var(--color-ink); background-color: var(--color-paper); background-image: radial-gradient(circle at 0 0, var(--color-grid-dot) 1px, transparent 1.5px), linear-gradient(to right, var(--color-grid) 1px, transparent 1px), linear-gradient(to bottom, var(--color-grid) 1px, transparent 1px); background-size: 96px 96px, 48px 48px, 48px 48px; font-family: var(--font-body); font-size: var(--text-md); line-height: 1.72; text-rendering: optimizeLegibility; }
.hc-body *, .hc-body *::before, .hc-body *::after { box-sizing: border-box; }
.hc-body [hidden] { display: none !important; }
.hc-body a { color: inherit; text-decoration-thickness: 0.08em; text-underline-offset: 0.18em; }
.hc-body button, .hc-body input { font: inherit; }
.hc-body :focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; }
.hc-skip { position: fixed; z-index: 1000; top: var(--space-sm); left: var(--space-sm); padding: var(--space-xs) var(--space-sm); color: var(--color-surface); background: var(--color-ink); transform: translateY(-160%); }
.hc-skip:focus { transform: translateY(0); }
.hc-site-header { position: sticky; z-index: var(--z-sticky-nav); top: 0; display: flex; align-items: center; justify-content: space-between; min-height: var(--banner-height); padding: var(--space-xs) max(var(--space-sm), calc((100vw - var(--content-max)) / 2)); border-bottom: var(--rule-thin) solid var(--color-rule); background: var(--color-paper); }
.hc-brand { display: inline-flex; align-items: center; gap: var(--space-xs); min-width: 0; text-decoration: none; white-space: nowrap; }
.hc-brand > span { display: grid; width: 2.25rem; height: 2.25rem; place-items: center; color: var(--color-accent-ink); background: var(--color-ink); border-radius: var(--radius-input); font-family: var(--font-display); font-weight: 800; }
.hc-brand strong { font-family: var(--font-display); letter-spacing: -0.02em; }
.hc-header-actions { display: flex; align-items: center; gap: var(--space-xs); }
.hc-button, .hc-motion-toggle { display: inline-flex; min-height: var(--control-height); align-items: center; justify-content: center; padding: var(--space-2xs) var(--space-sm); border: var(--rule-thin) solid var(--color-accent); border-radius: var(--radius-input); color: var(--color-accent-ink); background: var(--color-accent); font-weight: 700; line-height: 1; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background-color var(--dur-short) var(--ease-out), border-color var(--dur-short) var(--ease-out); }
.hc-button:hover, .hc-motion-toggle:hover { background: var(--color-action); }
.hc-button:active, .hc-motion-toggle:active { background: var(--color-ink); }
.hc-button-secondary, .hc-motion-toggle { color: var(--color-ink); border-color: var(--color-rule); background: var(--color-surface); }
.hc-button-secondary:hover, .hc-motion-toggle:hover { color: var(--color-accent); background: var(--color-accent-soft); border-color: var(--color-accent); }
.hc-button:disabled, .hc-motion-toggle:disabled, .hc-category-tabs button:disabled, .hc-search input:disabled { opacity: 0.55; cursor: not-allowed; }
.hc-button[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; pointer-events: none; }
.hc-kicker { margin: 0 0 var(--space-sm); color: var(--color-accent); font-family: var(--font-mono); font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.12em; }
.hc-home-hero, .hc-directory, .hc-home-note, .hc-article-shell { width: min(calc(100% - 2 * var(--space-md)), var(--content-max)); margin-inline: auto; }
.hc-home-hero { position: relative; display: grid; min-height: 17rem; place-items: center; isolation: isolate; padding-block: var(--space-xl) var(--space-2xl); border-bottom: var(--rule-thin) solid var(--color-rule); text-align: center; }
.hc-home-intro { position: relative; z-index: 1; max-width: 58rem; }
.hc-ambient { position: absolute; z-index: -1; inset: 0; overflow: hidden; pointer-events: none; background: radial-gradient(ellipse 27rem 10rem at 50% 45%, var(--color-halo-core), transparent 78%), radial-gradient(ellipse 21rem 8rem at 58% 57%, var(--color-halo-edge), transparent 84%); animation: hc-ambient-breathe 16s ease-in-out infinite alternate; }
.hc-ambient::before { position: absolute; top: 50%; left: 50%; width: min(45rem, 90vw); height: 12rem; border: 1px solid var(--color-halo-line); border-radius: 50%; box-shadow: 0 0 24px var(--color-halo-edge), inset 0 0 20px var(--color-halo-shine); content: ""; transform: translate(-50%, -50%) rotate(-7deg); animation: hc-halo-orbit 20s ease-in-out infinite alternate; }
.hc-ambient::after { position: absolute; top: 26%; left: 81%; width: 0.3rem; height: 0.3rem; border-radius: 50%; background: var(--color-halo-shine); box-shadow: 0 0 12px var(--color-halo-line); content: ""; }
@keyframes hc-ambient-breathe { from { opacity: 0.58; transform: scale(0.97); } to { opacity: 0.9; transform: scale(1.03); } }
@keyframes hc-halo-orbit { from { transform: translate(-50%, -50%) rotate(-7deg); } to { transform: translate(-50%, -49%) rotate(4deg); } }
.motion-paused .hc-ambient, .motion-paused .hc-ambient::before, .motion-suspended .hc-ambient, .motion-suspended .hc-ambient::before { animation-play-state: paused; }
.hc-home-hero h1, .hc-article-hero h1, .hc-error-page h1 { max-width: 26ch; min-width: 0; margin: 0; color: var(--color-ink); font-family: var(--font-display); font-size: var(--text-2xl); font-style: normal; font-weight: 750; line-height: 1.16; letter-spacing: -0.035em; overflow-wrap: anywhere; }
.hc-home-hero h1 { max-width: none; }
.hc-article-hero h1 { max-width: 60rem; font-size: clamp(1.8rem, 2.4vw, 2.25rem); }
.hc-home-intro > p, .hc-lead { max-width: 68ch; margin: var(--space-sm) 0 0; color: var(--color-ink-2); font-size: var(--text-md); }
.hc-home-intro > p { margin-inline: auto; }
.hc-home-facts { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2xs) var(--space-md); margin-top: var(--space-sm); color: var(--color-ink-2); font-size: var(--text-xs); }
.hc-home-facts span { white-space: nowrap; }
.hc-home-facts strong { color: var(--color-ink); font-family: var(--font-mono); font-weight: 650; }
.hc-directory { padding-block: var(--space-xl) var(--space-2xl); }
.hc-directory-head { display: grid; align-items: end; grid-template-columns: 1fr minmax(18rem, 32rem); gap: var(--space-lg); }
.hc-directory-head h2, .hc-home-note h2, .hc-section-heading h2 { margin: 0; font-family: var(--font-display); font-style: normal; letter-spacing: -0.025em; }
.hc-directory-head h2, .hc-home-note h2 { font-size: clamp(1.5rem, 2.3vw, 2rem); }
.hc-search { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--space-xs); padding: var(--space-xs) var(--space-sm); border: var(--rule-thin) solid var(--color-rule); border-radius: var(--radius-input); background: var(--color-surface); }
.hc-search > span { font-size: var(--text-sm); font-weight: 700; white-space: nowrap; }
.hc-search input { min-width: 0; border: 0; outline: 0; color: var(--color-ink); background: transparent; }
.hc-search kbd { padding: var(--space-3xs); border: var(--rule-thin) solid var(--color-rule); border-radius: var(--radius-input); color: var(--color-ink-2); font-family: var(--font-mono); font-size: var(--text-xs); }
.hc-category-tabs { display: flex; flex-wrap: wrap; gap: var(--space-2xs); margin-top: var(--space-lg); }
.hc-category-tabs button { min-height: var(--control-height); padding: var(--space-2xs) var(--space-sm); border: var(--rule-thin) solid var(--color-rule); border-radius: var(--radius-input); color: var(--color-ink-2); background: var(--color-surface); white-space: nowrap; cursor: pointer; }
.hc-category-tabs button:hover { color: var(--color-accent); border-color: var(--color-accent); }
.hc-category-tabs button:active { background: var(--color-accent-soft); }
.hc-category-tabs button.is-active { color: var(--color-accent-ink); border-color: var(--color-accent); background: var(--color-accent); }
.hc-result-count { margin: var(--space-md) 0 var(--space-xs); color: var(--color-ink-2); font-size: var(--text-sm); }
.hc-doc-list { border-top: var(--rule-thin) solid var(--color-rule); }
.hc-doc-card { display: grid; min-width: 0; align-items: center; grid-template-columns: 3rem minmax(0, 1fr) auto; gap: var(--space-md); padding: var(--space-md) var(--space-xs); border-bottom: var(--rule-thin) solid var(--color-rule); background: var(--color-surface); text-decoration: none; transition: background-color var(--dur-short) var(--ease-out); }
.hc-doc-card:hover { background: var(--color-accent-soft); }
.hc-doc-card:active { background: var(--color-paper-2); }
.hc-doc-index { color: var(--color-ink-2); font-family: var(--font-mono); font-size: var(--text-sm); }
.hc-doc-icon { display: none; }
.hc-doc-copy { display: flex; min-width: 0; flex-direction: column; gap: var(--space-3xs); }
.hc-doc-copy strong { font-family: var(--font-display); font-size: var(--text-md); }
.hc-doc-copy > span, .hc-doc-audience { color: var(--color-ink-2); font-size: var(--text-sm); }
.hc-doc-audience { max-width: 12rem; text-align: right; }
.hc-empty { padding: var(--space-xl); border-bottom: var(--rule-thin) solid var(--color-rule); text-align: center; }
.hc-home-note { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: var(--space-2xl); padding-block: var(--space-xl); border-top: var(--rule-thin) solid var(--color-rule); }
.hc-home-note > p { margin: 0; color: var(--color-ink-2); }
.hc-breadcrumb { display: flex; align-items: center; gap: var(--space-2xs); padding-top: var(--space-lg); color: var(--color-ink-2); font-size: var(--text-sm); white-space: nowrap; }
.hc-breadcrumb a { color: var(--color-accent); }
.hc-article-hero { padding-block: var(--space-lg) var(--space-xl); border-bottom: var(--rule-thin) solid var(--color-rule); background: radial-gradient(ellipse 22rem 8rem at 84% 30%, var(--color-halo-core), transparent 80%); }
.hc-meta { display: flex; flex-wrap: wrap; gap: var(--space-xs) var(--space-xl); margin: var(--space-lg) 0 0; padding-top: var(--space-sm); border-top: var(--rule-thin) solid var(--color-rule); }
.hc-meta div { min-width: 7rem; }
.hc-meta dt { color: var(--color-ink-2); font-size: var(--text-xs); }
.hc-meta dd { margin: var(--space-3xs) 0 0; font-weight: 700; }
.hc-article-grid { display: grid; align-items: start; justify-content: center; grid-template-columns: 13rem minmax(0, var(--reading-max)); gap: clamp(var(--space-lg), 4vw, var(--space-2xl)); padding-block: var(--space-xl); }
.hc-toc { position: sticky; z-index: var(--z-sticky); top: calc(var(--banner-height) + var(--space-md)); padding: var(--space-md); border: var(--rule-thin) solid var(--color-rule); border-radius: var(--radius-input); background: var(--color-surface); }
.hc-toc p { margin: 0 0 var(--space-xs); font-weight: 700; }
.hc-toc ol { margin: 0; padding: 0; list-style: none; }
.hc-toc li + li { margin-top: var(--space-2xs); }
.hc-toc a { color: var(--color-ink-2); font-size: var(--text-sm); text-decoration: none; }
.hc-toc a:hover { color: var(--color-accent); }
.hc-article { min-width: 0; padding: var(--space-lg); border: var(--rule-thin) solid var(--color-rule); border-radius: var(--radius-card); background: var(--color-surface); }
.hc-section { scroll-margin-top: 6rem; }
.hc-section + .hc-section { margin-top: var(--space-2xl); padding-top: var(--space-xl); border-top: var(--rule-thin) solid var(--color-rule); }
.hc-section-heading { display: flex; flex-direction: column; margin-bottom: var(--space-md); }
.hc-section-heading h2 { font-size: clamp(1.45rem, 3vw, 2rem); overflow-wrap: anywhere; }
.hc-prerequisites, .hc-callout { margin-top: var(--space-md); padding: var(--space-md); border-left: 4px solid var(--color-accent); background: var(--color-accent-soft); }
.hc-prerequisites ul, .hc-callout p { margin-bottom: 0; }
.hc-callout-danger { border-left-color: var(--color-danger); background: var(--color-danger-soft); }
.hc-flow { max-width: 100%; margin: var(--space-lg) 0 0; padding: var(--space-sm); border: var(--rule-thin) solid var(--color-rule); border-radius: var(--radius-panel); background: var(--color-surface); overflow-x: auto; }
.hc-flow svg { display: block; width: 100%; height: auto; min-width: 0; }
.hc-flow-track, .hc-flow-progress { fill: none; stroke-width: 4; stroke-linecap: round; }
.hc-flow-track { stroke: var(--color-rule); }
.hc-flow-progress { stroke: var(--color-accent); stroke-dasharray: 514; stroke-dashoffset: 514; animation: hc-flow-line 4.8s var(--ease-in-out) infinite; }
.hc-flow-node circle { fill: var(--color-surface); stroke: var(--color-accent); stroke-width: 3; }
.hc-flow-node > text:not(.hc-flow-label) { fill: var(--color-accent); font-family: var(--font-mono); font-size: var(--text-md); font-weight: 700; }
.hc-flow-label { fill: var(--color-ink); font-family: var(--font-body); font-size: var(--text-sm); font-weight: 650; }
.hc-flow-node { opacity: 0.48; animation: hc-flow-node 4.8s var(--ease-in-out) infinite; }
.hc-flow-node-2 { animation-delay: 0.6s; } .hc-flow-node-3 { animation-delay: 1.2s; } .hc-flow-node-4 { animation-delay: 1.8s; }
.hc-flow figcaption { margin-top: var(--space-2xs); color: var(--color-ink-2); font-size: var(--text-sm); text-align: center; }
@keyframes hc-flow-line { 0%, 10% { stroke-dashoffset: 514; } 70%, 100% { stroke-dashoffset: 0; } }
@keyframes hc-flow-node { 0%, 100% { opacity: 0.48; transform: translateY(0); } 20%, 55% { opacity: 1; transform: translateY(-3px); } }
.motion-paused .hc-flow-progress, .motion-paused .hc-flow-node, .motion-suspended .hc-flow-progress, .motion-suspended .hc-flow-node { animation-play-state: paused; }
.hc-note { color: var(--color-ink-2); font-size: var(--text-sm); }
.hc-steps, .hc-list, .hc-checklist { margin: var(--space-md) 0 0; padding: 0; list-style: none; counter-reset: hc-step; }
.hc-steps li, .hc-list li, .hc-checklist li { position: relative; padding: var(--space-sm) 0 var(--space-sm) var(--step-indent); border-bottom: var(--rule-thin) solid var(--color-rule); }
.hc-steps li { counter-increment: hc-step; }
.hc-steps li::before, .hc-list li::before, .hc-checklist li::before { position: absolute; top: var(--space-sm); left: 0; display: grid; width: 2rem; height: 2rem; place-items: center; border: var(--rule-thin) solid var(--color-rule); border-radius: var(--radius-pill); color: var(--color-accent); background: var(--color-surface); font-family: var(--font-mono); font-size: var(--text-xs); font-weight: 700; }
.hc-steps li::before { content: counter(hc-step, decimal-leading-zero); } .hc-list li::before { content: "—"; } .hc-checklist li::before { content: "✓"; color: var(--color-accent-ink); background: var(--color-accent); }
.hc-table-wrap { max-width: 100%; margin-top: var(--space-md); border: var(--rule-thin) solid var(--color-rule); border-radius: var(--radius-card); background: var(--color-surface); overflow-x: auto; }
.hc-table { width: 100%; min-width: 42rem; border-collapse: collapse; text-align: left; }
.hc-table th, .hc-table td { padding: var(--space-xs) var(--space-sm); border-bottom: var(--rule-thin) solid var(--color-rule); vertical-align: top; }
.hc-table th { color: var(--color-ink-2); background: var(--color-paper-2); font-size: var(--text-sm); }
.hc-table tr:last-child td { border-bottom: 0; }
.hc-body code { padding: var(--space-3xs); border-radius: var(--radius-input); color: var(--color-code); background: var(--color-paper-2); font-family: var(--font-mono); font-size: 0.9em; overflow-wrap: anywhere; }
.hc-faq { border-top: var(--rule-thin) solid var(--color-rule); }
.hc-faq details { border-bottom: var(--rule-thin) solid var(--color-rule); }
.hc-faq summary { padding: var(--space-sm) 2.25rem var(--space-sm) 0; font-weight: 700; cursor: pointer; }
.hc-faq p { margin: 0; padding: 0 0 var(--space-md); color: var(--color-ink-2); }
.hc-release-list { border-top: var(--rule-thin) solid var(--color-rule); }
.hc-release { display: grid; grid-template-columns: 7rem 7rem minmax(0, 1fr); gap: var(--space-sm); padding: var(--space-md) 0; border-bottom: var(--rule-thin) solid var(--color-rule); }
.hc-release > div { display: flex; align-items: flex-start; gap: var(--space-2xs); }
.hc-release span { padding: var(--space-3xs); border-radius: var(--radius-pill); color: var(--color-accent-ink); background: var(--color-accent); font-size: var(--text-xs); }
.hc-release time, .hc-release p { margin: 0; color: var(--color-ink-2); }
.hc-pagination { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: var(--rule-thin) solid var(--color-rule); border-bottom: var(--rule-thin) solid var(--color-rule); }
.hc-pagination a { display: flex; min-width: 0; flex-direction: column; padding: var(--space-lg); text-decoration: none; }
.hc-pagination a + a { align-items: flex-end; border-left: var(--rule-thin) solid var(--color-rule); text-align: right; }
.hc-pagination small { color: var(--color-ink-2); }
.hc-pagination strong { overflow-wrap: anywhere; }
.hc-footer { display: flex; width: min(calc(100% - 2 * var(--space-md)), var(--content-max)); min-height: 6rem; align-items: center; justify-content: space-between; gap: var(--space-md); margin-inline: auto; color: var(--color-ink-2); font-size: var(--text-sm); }
.hc-footer a { white-space: nowrap; }
.hc-error-page { display: grid; min-height: 100vh; place-items: center; padding: var(--space-md); }
.hc-error-page main { max-width: 42rem; }
.hc-error-page p:not(.hc-kicker) { color: var(--color-ink-2); }
/* Restore the original site's warm, single-column article reading layout. */
.hc-article-shell { width: min(calc(100% - 48px), 980px); margin: 36px auto 80px; }
.hc-breadcrumb { padding-top: 0; margin-bottom: 24px; }
.hc-article-hero { padding: 0 0 24px; margin-bottom: 28px; border-bottom-color: rgba(15, 23, 42, 0.08); background: none; }
.hc-article-hero h1 { max-width: 100%; font-size: clamp(2rem, 3.5vw, 2.2rem); font-weight: 800; letter-spacing: -0.02em; }
.hc-lead { max-width: 68ch; margin-top: 12px; }
.hc-meta { gap: 10px 14px; margin-top: 20px; padding-top: 14px; font-size: var(--text-xs); }
.hc-article-grid { display: flex; flex-direction: column; gap: 24px; padding-block: 0 32px; }
.hc-toc { position: static; width: 100%; padding: 14px 18px; border: 1px solid var(--color-rule); border-radius: var(--radius-input); background: rgba(255, 255, 255, 0.78); }
.hc-toc ol { display: flex; flex-wrap: wrap; gap: 5px 18px; }
.hc-toc li + li { margin-top: 0; }
.hc-toc a { font-size: var(--text-xs); }
.hc-article { width: 100%; padding: 0; border: 0; border-radius: 0; background: transparent; }
.hc-section + .hc-section { margin-top: 36px; padding-top: 28px; }
.hc-section-heading h2 { font-size: 1.45rem; }
.hc-prerequisites, .hc-callout { border-left-color: #d97706; }
.hc-flow { border-radius: var(--radius-input); }
.hc-pagination { margin-top: 28px; }
@media (max-width: 980px) {
  .hc-home-note, .hc-directory-head, .hc-article-grid { grid-template-columns: minmax(0, 1fr); }
  .hc-home-hero { min-height: auto; padding-block: var(--space-xl) var(--space-xl); }
  .hc-toc { position: static; padding: var(--space-md); border: var(--rule-thin) solid var(--color-rule); }
  .hc-toc ol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2xs) var(--space-md); }
  .hc-toc li + li { margin-top: 0; }
}
@media (max-width: 620px) {
  .hc-site-header { min-height: var(--banner-height); }
  .hc-brand strong, .hc-search kbd { display: none; }
  .hc-motion-toggle { min-height: var(--control-height); padding-inline: var(--space-xs); font-size: var(--text-sm); }
  .hc-home-hero, .hc-directory, .hc-home-note, .hc-article-shell, .hc-footer { width: min(calc(100% - 2 * var(--space-sm)), var(--content-max)); }
  .hc-home-hero h1 { font-size: clamp(1.75rem, 8vw, 2.25rem); }
  .hc-home-facts { gap: 0 var(--space-sm); }
  .hc-doc-card { grid-template-columns: 2.25rem minmax(0, 1fr); gap: var(--space-sm); }
  .hc-doc-icon, .hc-doc-audience { display: none; }
  .hc-doc-copy { grid-column: 2; }
  .hc-breadcrumb { max-width: 100%; overflow: hidden; }
  .hc-breadcrumb span:not([aria-current="page"]) { display: none; }
  .hc-toc ol, .hc-pagination { grid-template-columns: minmax(0, 1fr); }
  .hc-article { padding: var(--space-sm); }
  .hc-flow { padding: var(--space-2xs); }
  .hc-flow svg { min-width: 42rem; }
  .hc-release { grid-template-columns: minmax(0, 1fr); gap: var(--space-2xs); }
  .hc-pagination a + a { align-items: flex-start; border-top: var(--rule-thin) solid var(--color-rule); border-left: 0; text-align: left; }
  .hc-footer { flex-direction: column; align-items: flex-start; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hc-body *, .hc-body *::before, .hc-body *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: var(--dur-short) !important; }
  .hc-ambient, .hc-ambient::before { animation: none !important; }
}
@media (max-width: 620px) {
  .hc-article-shell { width: min(calc(100% - 32px), 980px); margin-top: 24px; }
  .hc-toc ol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 12px; }
  .hc-article { padding: 0; }
}
