:root {
  --xh-ink: #142b3c;
  --xh-muted: #526775;
  --xh-paper: #f7f7f2;
  --xh-line: #d8e0e1;
  --xh-link: #194e66;
}

.xh-resource-page { margin: 0; color: var(--xh-ink); background: var(--xh-paper); font-family: system-ui, "PingFang SC", sans-serif; }
.xh-resource-page *, .xh-resource-page *::before, .xh-resource-page *::after { box-sizing: border-box; }
.xh-resource-page a:not(.xh-brand) { color: var(--xh-link); text-underline-offset: .2em; }
.xh-resource-page .container { width: min(1180px, calc(100% - 48px)); margin-inline: auto; }
.xh-resource-page h2 { font-size: clamp(1.45rem, 2.6vw, 2rem); line-height: 1.3; }
.xh-resource-page h3 { font-size: 1.05rem; line-height: 1.4; }
.xh-resource-page p, .xh-resource-page dd { line-height: 1.65; }
.xh-resource-page :target { scroll-margin-top: 105px; }
.xh-resource-page a:focus-visible, .xh-resource-page summary:focus-visible { outline: 2px solid var(--xh-link); outline-offset: 4px; }
.xh-skip { position: fixed; z-index: 90; top: 8px; inset-inline-start: 8px; transform: translateY(-130%); background: var(--xh-paper); padding: 12px; }
.xh-skip:focus { transform: translateY(0); }
.xh-resource-intro { padding: clamp(1.75rem, 5vw, 4rem) 0 clamp(1.75rem, 5vw, 3.3rem); border-bottom: 1px solid var(--xh-line); background: #e8eef0; }
.xh-resource-intro h1 { margin: .55em 0 .3em; font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1.13; }
.xh-resource-intro p { max-width: 760px; margin: 0; color: var(--xh-muted); }
.xh-breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem; font-size: .85rem; }
.resource-jumps ul { display: flex; flex-wrap: wrap; gap: 0 .9rem; list-style: none; margin: .8rem 0 0; padding: 0; }
.resource-jumps a, .xh-service-links a { min-height: 44px; display: inline-flex; align-items: center; }
.xh-resource-index, .xh-topic-layout { padding-block: clamp(2rem, 5vw, 4rem) clamp(3rem, 7vw, 6rem); }
.xh-service-row { display: grid; grid-template-columns: 3fr 2fr; gap: clamp(1rem, 4vw, 3.1rem); align-items: center; border-top: 1px solid var(--xh-line); padding: 1rem 0; }
.xh-service-row:last-child { border-bottom: 1px solid var(--xh-line); }
.xh-service-row h3 { margin: 0 0 .3em; font-size: clamp(1.05rem, 2vw, 1.3rem); }
.xh-service-row p { margin: 0; color: var(--xh-muted); }
.xh-service-links { display: flex; flex-wrap: wrap; gap: 0 1rem; }
.xh-index-references { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; margin-top: clamp(2rem, 5vw, 5rem); }
.xh-case { border-block-start: 1px solid var(--xh-line); padding: .9rem 0; }
.xh-case h3, .xh-case p { margin: 0; }
.xh-case p { margin-top: .3rem; color: var(--xh-muted); }
.xh-case p.xh-case-status { font-size: .82rem; font-weight: 650; }
.xh-topic-layout { display: grid; grid-template-columns: minmax(135px, .65fr) minmax(0, 3fr); align-items: start; gap: clamp(1.25rem, 6vw, 5rem); }
.xh-topic-jumps { position: sticky; top: 100px; padding-inline-start: .85rem; border-inline-start: 2px solid var(--xh-line); }
.xh-topic-jumps ul { margin: 0; padding: 0; list-style: none; }
.xh-topic-jumps a { min-height: 44px; display: inline-flex; align-items: center; }
.xh-topic-content > section { margin-bottom: clamp(2.5rem, 6vw, 4.5rem); }
.xh-topic-content > section:first-child h2 { margin-top: 0; }
.xh-topic-content > section:last-child { margin-bottom: 0; }
.xh-flow { margin: 0; padding: 0 0 0 1.55rem; }
.xh-flow li, .xh-choice { border-top: 1px solid var(--xh-line); margin-block: 1.25rem; }
.xh-flow li::marker { color: var(--xh-muted); font-weight: 700; }
.resource-fields { margin: 1rem 0; }
.resource-fields div { display: grid; grid-template-columns: minmax(70px, .55fr) minmax(0, 4fr); gap: .6rem; margin-top: .35rem; }
.resource-fields dt { font-weight: 675; }
.resource-fields dd { margin: 0; color: var(--xh-muted); white-space: pre-line; overflow-wrap: anywhere; }
.xh-question { border-bottom: 1px solid var(--xh-line); }
.xh-question summary { cursor: pointer; min-height: 44px; align-content: center; padding: .7rem .3rem; font-weight: 630; overflow-wrap: anywhere; }
.xh-question summary::marker { color: var(--xh-link); }
.xh-question[open] { background: #edf2f0; }
.xh-question-body { padding: 0 1rem .5rem; }
.xh-question-body p { white-space: pre-line; }
.xh-preparation { font-size: .875rem; }
.xh-resource-footer { border-top: 1px solid var(--xh-line); padding: 2rem 0; background: #e8eef0; }
.xh-resource-footer .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.xh-resource-footer .container div { display: flex; gap: 1rem; flex-wrap: wrap; }

@media (max-width: 720px) {
  .xh-resource-page .container { width: calc(100% - 36px); }
  .xh-service-row, .xh-index-references, .xh-topic-layout { grid-template-columns: minmax(0, 1fr); gap: .5rem; }
  .xh-index-references { row-gap: 1.35rem; }
  .xh-topic-jumps { position: static; padding: 0 0 .75rem; border-inline-start: 0; border-bottom: 1px solid var(--xh-line); }
  .xh-topic-jumps ul { display: flex; flex-wrap: wrap; gap: 0 .8rem; }
  .xh-question-body { padding-inline: .55rem; }
}

@media (prefers-reduced-motion: reduce) {
  .xh-resource-page { scroll-behavior: auto; }
}
