:root {
  --hhd-ivory: #faf7f0;
  --hhd-paper: #fffdf8;
  --hhd-plum: #24172f;
  --hhd-teal: #00645f;
  --hhd-teal-dark: #004b48;
  --hhd-amber: #f4bb52;
  --hhd-coral: #c54f3f;
  --hhd-mist: #dceae5;
  --hhd-line: #887d8f;
  --hhd-muted: #5f5864;
  --hhd-display: "Trebuchet MS", "Avenir Next", Avenir, Arial, sans-serif;
  --hhd-text: Charter, "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --hhd-ui: Verdana, Geneva, Tahoma, sans-serif;
  --hhd-shell: min(1180px, calc(100% - 2rem));
  --hhd-reading: 74ch;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--hhd-plum);
  background: var(--hhd-ivory);
  font: 1.05rem/1.68 var(--hhd-text);
}

img { max-width: 100%; height: auto; }
a { color: var(--hhd-teal-dark); text-underline-offset: .18em; text-decoration-thickness: .08em; }
a:hover { color: var(--hhd-coral); }
:focus-visible { outline: 3px solid var(--hhd-coral); outline-offset: 4px; }

.hhd-skip {
  position: absolute;
  z-index: 100;
  top: .5rem;
  left: .5rem;
  padding: .75rem 1rem;
  color: #fff;
  background: var(--hhd-plum);
  transform: translateY(-160%);
}
.hhd-skip:focus { transform: translateY(0); }

.hhd-shell { width: var(--hhd-shell); margin-inline: auto; }
.hhd-reading { max-width: var(--hhd-reading); }

.hhd-site-header {
  border-bottom: 1px solid var(--hhd-line);
  background: rgba(250, 247, 240, .97);
}
.hhd-header-row {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.hhd-brand {
  display: inline-flex;
  align-items: center;
  gap: .72rem;
  color: var(--hhd-plum);
  font: 700 .93rem/1.2 var(--hhd-ui);
  text-decoration: none;
}
.hhd-brand img { width: 42px; height: 42px; }
.hhd-nav { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1rem; }
.hhd-nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--hhd-plum);
  font: 700 .77rem/1.2 var(--hhd-ui);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.hhd-hero { padding: clamp(3.5rem, 8vw, 7.5rem) 0 3.5rem; border-bottom: 1px solid var(--hhd-line); }
.hhd-kicker,
.hhd-label,
.hhd-section-code,
.hhd-rank,
.hhd-meta {
  font: 700 .75rem/1.35 var(--hhd-ui);
  text-transform: uppercase;
  letter-spacing: .08em;
}
.hhd-kicker { color: var(--hhd-teal-dark); }
h1,
h2,
h3 { font-family: var(--hhd-display); color: var(--hhd-plum); }
h1 {
  max-width: 18ch;
  margin: .6rem 0 1.3rem;
  font-size: clamp(2.15rem, 5vw, 3.9rem);
  line-height: 1.02;
  letter-spacing: -.035em;
}
h2 { margin: 0 0 1rem; font-size: clamp(1.72rem, 3vw, 2.7rem); line-height: 1.1; letter-spacing: -.025em; }
h3 { margin: 0 0 .65rem; font-size: clamp(1.2rem, 2vw, 1.55rem); line-height: 1.25; }
p { margin: 0 0 1rem; }
.hhd-lead { max-width: 70ch; font-size: clamp(1.12rem, 2vw, 1.32rem); line-height: 1.58; }
.hhd-byline { margin: 1.3rem 0 .35rem; font: .9rem/1.55 var(--hhd-ui); }
.hhd-freshness, .hhd-affiliation { color: var(--hhd-muted); font: .82rem/1.55 var(--hhd-ui); }
.hhd-answer {
  position: relative;
  max-width: 82ch;
  margin-top: 2.1rem;
  padding: 1.35rem 0 1.35rem 2rem;
  border-left: 5px solid var(--hhd-amber);
  font-size: 1.08rem;
}
.hhd-answer::before {
  content: "01";
  position: absolute;
  left: -1.1rem;
  top: -1.1rem;
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  color: #fff;
  background: var(--hhd-teal-dark);
  font: 700 .7rem/1 var(--hhd-ui);
}

.hhd-section { padding: clamp(3.2rem, 7vw, 6rem) 0; border-bottom: 1px solid var(--hhd-line); }
.hhd-section-head { max-width: 78ch; margin-bottom: 2rem; }
.hhd-section-code { display: block; margin-bottom: .65rem; color: var(--hhd-teal-dark); }
.hhd-thread-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 4rem minmax(0, 1fr);
  gap: 0 1.4rem;
}
.hhd-thread-grid::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  border-left: 2px dashed var(--hhd-teal);
}
.hhd-thread-node {
  position: relative;
  grid-column: 2;
  align-self: start;
  justify-self: center;
  z-index: 1;
  width: 2.35rem;
  height: 2.35rem;
  display: grid;
  place-items: center;
  border: 2px solid var(--hhd-teal-dark);
  border-radius: 50%;
  color: var(--hhd-plum);
  background: var(--hhd-amber);
  font: 700 .74rem/1 var(--hhd-ui);
}
.hhd-thread-item {
  margin-bottom: 2rem;
  padding: 1.35rem;
  border: 1px solid var(--hhd-line);
  background: var(--hhd-paper);
}
.hhd-thread-item:nth-of-type(4n+1) { grid-column: 1; }
.hhd-thread-item:nth-of-type(4n+3) { grid-column: 3; }
.hhd-thread-item ul { margin: .65rem 0 0; padding-left: 1.2rem; }

.hhd-switch {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  border: 1px solid var(--hhd-line);
  background: var(--hhd-line);
}
.hhd-switch > div { padding: 1.35rem; background: var(--hhd-paper); }
.hhd-switch strong { display: block; margin-bottom: .4rem; font-family: var(--hhd-display); }

.hhd-method-list,
.hhd-provider-list,
.hhd-check-list { list-style: none; margin: 0; padding: 0; }
.hhd-method-list { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--hhd-line); }
.hhd-method-list > li { min-width: 0; padding: 1.25rem; border-right: 1px dashed var(--hhd-line); border-bottom: 1px dashed var(--hhd-line); background: var(--hhd-paper); }
.hhd-method-list > li:nth-child(3n) { border-right: 0; }
.hhd-method-list > li:nth-last-child(-n+3) { border-bottom: 0; }
.hhd-method-list .hhd-rank { display: block; margin-bottom: .55rem; color: var(--hhd-coral); }
.hhd-evidence-key { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1.25rem; }
.hhd-evidence-key span { padding: .45rem .65rem; border: 1px solid var(--hhd-teal-dark); background: var(--hhd-mist); font: 700 .75rem/1.25 var(--hhd-ui); }

.hhd-provider-list { counter-reset: provider; }
.hhd-provider {
  counter-increment: provider;
  display: grid;
  grid-template-columns: minmax(7rem, .36fr) minmax(0, 1fr);
  gap: 1.5rem;
  padding: 2rem 0;
  border-top: 2px solid var(--hhd-plum);
}
.hhd-provider:last-child { border-bottom: 2px solid var(--hhd-plum); }
.hhd-provider-id { min-width: 0; }
.hhd-provider-id::before { content: counter(provider, decimal-leading-zero); display: block; color: var(--hhd-coral); font: 800 2.3rem/1 var(--hhd-display); }
.hhd-provider[data-rank="1"] { padding-inline: 1.25rem; background: #f5ead0; }
.hhd-provider dl { display: grid; grid-template-columns: minmax(10rem, .33fr) minmax(0, 1fr); margin: 0; }
.hhd-provider dt, .hhd-provider dd { margin: 0; padding: .55rem 0; border-top: 1px dashed var(--hhd-line); }
.hhd-provider dt { padding-right: 1rem; font: 700 .78rem/1.45 var(--hhd-ui); }

.hhd-proof-chain { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.hhd-proof { padding: 1.2rem; border-top: 7px solid var(--hhd-teal); background: var(--hhd-paper); }
.hhd-proof p:last-child { margin-bottom: 0; }

.hhd-table-wrap { overflow-x: auto; border: 1px solid var(--hhd-line); background: var(--hhd-paper); }
table { width: 100%; min-width: 780px; border-collapse: collapse; }
caption { padding: 1rem; text-align: left; font: 700 .83rem/1.5 var(--hhd-ui); }
th, td { padding: .85rem; border-top: 1px solid var(--hhd-line); text-align: left; vertical-align: top; }
th { color: #fff; background: var(--hhd-plum); font: 700 .76rem/1.35 var(--hhd-ui); }
td:first-child { font: 700 .75rem/1.35 var(--hhd-ui); color: var(--hhd-teal-dark); }

.hhd-check-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; border: 1px solid var(--hhd-line); background: var(--hhd-line); }
.hhd-check-grid > section { padding: 1.5rem; background: var(--hhd-paper); }
.hhd-check-grid ul { margin: .6rem 0 0; padding-left: 1.2rem; }

.hhd-faq { border-top: 1px solid var(--hhd-line); }
.hhd-faq details { border-bottom: 1px solid var(--hhd-line); }
.hhd-faq summary { min-height: 54px; padding: 1rem .3rem; cursor: pointer; font: 700 1rem/1.4 var(--hhd-display); }
.hhd-faq details > p { max-width: 78ch; padding: 0 .3rem 1rem; }

.hhd-source-list { columns: 2; column-gap: 2rem; padding-left: 1.2rem; }
.hhd-source-list li { break-inside: avoid; margin-bottom: .75rem; }
.hhd-note { max-width: 80ch; color: var(--hhd-muted); font-size: .94rem; }

.hhd-page-hero { padding: clamp(3rem, 7vw, 5.4rem) 0 2.8rem; border-bottom: 1px solid var(--hhd-line); }
.hhd-page-hero h1 { max-width: 20ch; font-size: clamp(2rem, 4.2vw, 3.45rem); }
.hhd-page-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(14rem, .34fr); gap: 2.5rem; }
.hhd-page-grid aside { align-self: start; padding: 1.2rem; border-left: 4px solid var(--hhd-amber); background: var(--hhd-paper); }
.hhd-step-list { list-style: none; counter-reset: step; padding: 0; }
.hhd-step-list > li { counter-increment: step; padding: 1.25rem 0 1.25rem 4rem; border-top: 1px dashed var(--hhd-line); }
.hhd-step-list > li::before { content: counter(step, decimal-leading-zero); float: left; margin-left: -4rem; color: var(--hhd-coral); font: 800 1.6rem/1 var(--hhd-display); }

.hhd-site-footer { padding: 2.6rem 0; color: #fff; background: var(--hhd-plum); }
.hhd-site-footer a { color: #fff; }
.hhd-footer-grid { display: grid; grid-template-columns: .65fr 1.35fr; gap: 2rem; }
.hhd-footer-nav { display: flex; flex-wrap: wrap; gap: .65rem 1rem; font: .78rem/1.5 var(--hhd-ui); }
.hhd-commercial { margin-top: 1.4rem; color: #f5ead0; font: .79rem/1.55 var(--hhd-ui); }

@media (max-width: 860px) {
  .hhd-header-row { align-items: flex-start; flex-direction: column; padding-block: .8rem; }
  .hhd-nav { width: 100%; }
  .hhd-thread-grid { grid-template-columns: 2.3rem minmax(0, 1fr); gap: 0 1rem; }
  .hhd-thread-grid::before { left: 1.15rem; }
  .hhd-thread-node { grid-column: 1; }
  .hhd-thread-item:nth-of-type(4n+1), .hhd-thread-item:nth-of-type(4n+3) { grid-column: 2; }
  .hhd-switch, .hhd-method-list, .hhd-proof-chain { grid-template-columns: 1fr 1fr; }
  .hhd-method-list > li { border-right: 1px dashed var(--hhd-line); border-bottom: 1px dashed var(--hhd-line); }
  .hhd-method-list > li:nth-child(3n) { border-right: 1px dashed var(--hhd-line); }
  .hhd-method-list > li:nth-child(2n) { border-right: 0; }
  .hhd-method-list > li:nth-last-child(-n+3) { border-bottom: 1px dashed var(--hhd-line); }
  .hhd-method-list > li:last-child { border-bottom: 0; }
  .hhd-page-grid, .hhd-footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  body { background: var(--hhd-ivory); font-size: 1rem; }
  .hhd-shell { width: min(100% - 1.25rem, 1180px); }
  .hhd-nav { gap: .1rem .75rem; }
  .hhd-nav a { font-size: .7rem; }
  .hhd-hero { padding-top: 3rem; }
  h1 { font-size: clamp(2.15rem, 10vw, 2.85rem); }
  .hhd-answer { padding-left: 1.25rem; }
  .hhd-switch, .hhd-method-list, .hhd-proof-chain, .hhd-check-grid { grid-template-columns: 1fr; }
  .hhd-method-list > li, .hhd-method-list > li:nth-child(2n), .hhd-method-list > li:nth-child(3n) { border-right: 0; border-bottom: 1px dashed var(--hhd-line); }
  .hhd-provider { grid-template-columns: 1fr; gap: .9rem; }
  .hhd-provider dl { grid-template-columns: 1fr; }
  .hhd-provider dt { padding-bottom: .1rem; }
  .hhd-provider dd { padding-top: 0; border-top: 0; }
  .hhd-source-list { columns: 1; }
}

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

@media print {
  .hhd-site-header, .hhd-skip { display: none; }
  body { background: #fff; color: #000; font-size: 11pt; }
  a { color: #000; text-decoration: none; }
  .hhd-section { padding: 1.5rem 0; }
  .hhd-thread-grid::before { display: none; }
}
