.hd-explorer {
  --hd-text: var(--obs-text, #f8ead3);
  --hd-muted: var(--obs-muted, #c5bcae);
  --hd-gold: var(--obs-gold, #dfbc79);
  --hd-line: var(--obs-line, #514937);
  --hd-surface: #152330;
  --hd-sheet: #182735;
  --hd-one: #191b1e;
  --hd-two: #a02737;
  color: var(--hd-text);
  min-width: 0;
}

.hd-explorer [hidden] { display: none !important; }
.hd-explorer h2, .hd-explorer h3, .hd-explorer h4, .hd-explorer h5 { color: var(--hd-text); }
.hd-explorer h4, .hd-explorer h5 { margin: 1.1rem 0 .45rem; }
.hd-explorer p { max-width: 70ch; }
.hd-header { margin: .7rem 0 1rem; }
.hd-header h2 { margin: .15rem 0 .8rem; }
.hd-muted { color: var(--hd-muted); }
.hd-mode-buttons, .hd-comparison-controls, .hd-categories, .hd-form-actions, .hd-picks, .hd-period {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
}
.hd-explorer button:not(.primary):not(.text-button) {
  color: var(--hd-text);
  background: var(--hd-surface);
  border: 1px solid var(--hd-line);
  border-radius: 6px;
  padding: .44rem .66rem;
  min-height: 44px;
  font: inherit;
  line-height: 1.18;
  cursor: pointer;
}
.hd-explorer button[aria-pressed="true"]:not(.primary):not(.text-button) {
  background: #e6c888;
  color: #182330;
  border-color: #e6c888;
}
.hd-explorer :is(button, a, select, input, summary):focus-visible {
  outline: 2px solid var(--hd-gold);
  outline-offset: 3px;
}
.hd-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: .4rem;
  margin: 0 0 1rem;
}
.hd-summary button {
  text-align: left;
  min-width: 0;
  align-content: start;
}
.hd-summary span, .hd-summary strong { display: block; overflow-wrap: anywhere; }
.hd-summary span { color: var(--hd-gold); font-size: .72rem; margin: 0 0 .3rem; }
.hd-summary strong { font-size: .89rem; font-weight: 600; }
.hd-composite-summary { color: var(--hd-text); margin: .6rem 0; }
.hd-composite-summary strong { color: var(--hd-gold); }
.hd-categories { margin: .6rem 0 1rem; }
.hd-categories span { display: inline-block; min-width: 1.2em; margin-left: .1em; font-variant-numeric: tabular-nums; }
.hd-workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}
.hd-chart-column { min-width: 0; }
.hd-picker { display: grid; gap: .35rem; font-size: .87rem; margin: 0 0 .65rem; }
.hd-explorer :is(select,input) {
  background: #111c28;
  color: var(--hd-text);
  border: 1px solid var(--hd-line);
  border-radius: 5px;
  min-height: 44px;
  padding: .48rem .6rem;
  font: inherit;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}
.hd-figure {
  margin: 0;
  min-width: 0;
  background: #faf4e7;
  color: #20313b;
  border: 1px solid #b8a579;
  border-radius: 11px;
  overflow: hidden;
}
.hd-figure svg { display: block; width: 100%; height: auto; max-height: 665px; }
.hd-composite { --hd-one: #095e65; --hd-two: #67366d; }
.hd-guide, .hd-half, .hd-channel-hit, .hd-channel-highlight {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.hd-guide { stroke: #9b948a; stroke-width: 5; pointer-events: none; }
.hd-half { stroke-width: 7.5; pointer-events: none; }
.hd-ink-one { stroke: var(--hd-one); }
.hd-ink-two { stroke: var(--hd-two); }
.hd-striped { stroke-dasharray: 8 10; }
.hd-channel-hit { pointer-events: stroke; stroke: transparent; stroke-width: 23; cursor: pointer; }
.hd-channel-hit:hover { stroke: #ab711f65; }
.hd-channel-highlight { stroke: #e1a13d; stroke-width: 16; opacity: .55; pointer-events: none; }
.hd-selected-channel { stroke: #915713; opacity: .65; }
.hd-center { fill: #fffdfa; stroke: #645947; stroke-width: 2.2; cursor: pointer; }
.hd-center.hd-defined { fill: #e0bb73; }
.hd-center.hd-highlight, .hd-center:hover { stroke: #93410f; stroke-width: 5; }
.hd-gate { cursor: pointer; }
.hd-gate-hit { fill: transparent; }
.hd-gate-dot { stroke: #7b6e56; stroke-width: 1.15; fill: #fffcf4; }
.hd-gate-one .hd-gate-dot { fill: var(--hd-one); stroke: var(--hd-one); }
.hd-gate-two .hd-gate-dot { fill: var(--hd-two); stroke: var(--hd-two); }
.hd-gate-both .hd-gate-dot { fill: url(#hd-dual-ink); stroke: var(--hd-one); }
.hd-color-one { stop-color: var(--hd-one); }
.hd-color-two { stop-color: var(--hd-two); }
.hd-gate text {
  fill: #27272a;
  font: 650 17.5px/1 system-ui, sans-serif;
  text-anchor: middle;
  pointer-events: none;
}
.hd-gate:not(.hd-gate-none) text { fill: #fff; }
.hd-gate.hd-highlight .hd-gate-dot, .hd-gate:hover .hd-gate-dot { stroke: #d7811f; stroke-width: 4; }
.hd-figure figcaption { display: flex; flex-wrap: wrap; gap: .38rem .68rem; padding: .7rem; font-size: .8rem; }
.hd-figure figcaption span { display: inline-flex; align-items: center; gap: .28rem; }
.hd-swatch { width: 11px; height: 11px; border-radius: 50%; border: 1px solid #6a5c43; flex: 0 0 11px; }
.hd-swatch-0 { background: var(--hd-one); }
.hd-swatch-1 { background: var(--hd-two); }
.hd-swatch-2 { background: linear-gradient(90deg,var(--hd-one) 50%,var(--hd-two) 50%); }
.hd-swatch-defined { background: #e0bb73; }
.hd-swatch-white { background: #fffdfa; }
.hd-inspector { background: var(--hd-surface); border: 1px solid var(--hd-line); border-radius: 9px; padding: .95rem; min-width: 0; }
.hd-inspector-head { display: flex; align-items: center; justify-content: space-between; gap: .4rem; }
.hd-inspector-head .eyebrow { margin: 0; }
.hd-inspector h3 { margin: .35rem 0 .55rem; }
.hd-inspector h3:focus { outline: none; }
.hd-facts { margin: .4rem 0; }
.hd-facts div { margin: .35rem 0 .55rem; }
.hd-facts dt { font-size: .76rem; color: var(--hd-gold); }
.hd-facts dd { margin: 0; overflow-wrap: anywhere; }
.hd-notes { padding: .62rem 0; margin: .6rem 0; border-top: 1px solid var(--hd-line); }
.hd-notes > summary { cursor: pointer; color: var(--hd-gold); padding: .25rem 0; }
.hd-notes ul, .hd-activation-list, .hd-stream ul { padding-left: 1.18rem; }
.hd-streams { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.hd-stream ul, .hd-activation-list { list-style: none; padding: 0; margin: 0; }
.hd-stream li, .hd-activation-list li { margin: 0 0 .3rem; }
.hd-stream li button { width: 100%; text-align: left; }
.hd-activation-list small { display: block; margin-left: .3rem; color: var(--hd-muted); }
.hd-second-form { padding: .8rem; border: 1px solid var(--hd-line); border-radius: 9px; margin: .7rem 0 .9rem; }
.hd-second-form h3 { margin: 0 0 .4rem; }
.hd-birth-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .65rem; margin: .75rem 0; }
.hd-birth-grid label { display: grid; gap: .28rem; }
.hd-period, .hd-city-options { margin-top: .3rem; }
.hd-city-options { display: flex; flex-wrap: wrap; gap: .25rem; }
.hd-status:not(:empty) { margin-bottom: 0; }
.hd-status:empty { display: none; }
.hd-consultation { margin: .7rem 0 1.35rem; }

@media (max-width: 1000px) {
  .hd-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
  .hd-workspace-grid { grid-template-columns: minmax(0, 1fr); }
  .hd-inspector:not(.hd-detail-open) { display: none; }
  .hd-inspector.hd-detail-open {
    position: fixed;
    inset: auto 0 0;
    z-index: 45;
    overflow: auto;
    overscroll-behavior: contain;
    max-height: 45vh;
    max-height: 45dvh;
    border-radius: 12px 12px 0 0;
    padding-bottom: calc(.85rem + env(safe-area-inset-bottom, 0px));
    background: var(--hd-sheet);
    box-shadow: 0 -7px 30px #08121870;
  }
}
@media (max-width: 420px) {
  .hd-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hd-birth-grid { grid-template-columns: minmax(0, 1fr); }
  .hd-explorer button:not(.primary):not(.text-button) { padding-inline: .48rem; }
}

.hd-chart-controls { display: flex; align-items: end; gap: .55rem; margin: 0 0 .65rem; }
.hd-chart-controls .hd-picker { flex: 1 1 0; min-width: 0; margin: 0; }
.hd-chart-controls [data-hd-zoom] { flex: none; }
.hd-figure [data-hd-drawing]:focus-visible { outline: 3px solid #915713; outline-offset: -4px; }
.hd-zoomed { overflow: auto; max-height: min(74vh, 690px); overscroll-behavior: contain; }
.hd-zoomed svg { min-width: 720px; max-height: none; }
@media (min-width: 801px) {
  .hd-inspector { position: sticky; top: .85rem; max-height: min(75vh, 680px); overflow: auto; }
}
@media (max-width: 800px) {
  .observatory-page.has-result[data-map="hd"] .observatory::before { inset-inline: 0; }
}

.hd-reference-text {
  border-inline-start: 2px solid var(--hd-gold);
  margin-block: 1rem;
  padding-inline-start: .85rem;
}
.hd-reference-text > h4 { margin-top: 0; }
.hd-source-credit { font-size: .8rem; color: var(--hd-muted); }
.hd-reference-disclosure { margin-block: .45rem; }
.hd-reference-disclosure > summary { color: var(--hd-gold); cursor: pointer; padding-block: .45rem; }
.hd-reference-controls { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: .5rem; }
.hd-reference-controls label { display: grid; gap: .25rem; font-size: .875rem; }
.hd-reference-results { list-style: none; padding: 0 !important; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .35rem; }
.hd-reference-results button { width: 100%; text-align: start; overflow-wrap: anywhere; }
.hd-print-button { margin-block: .65rem 0; }
.hd-connection-print { display: none; }
@media (max-width: 550px) {
  .hd-reference-controls, .hd-reference-results { grid-template-columns: minmax(0, 1fr); }
}
@media print {
  #print-chart.hd-connection-print {
    --hd-one: #095e65;
    --hd-two: #67366d;
    --hd-muted: #444;
  }
  #print-chart.hd-connection-print .hd-figure {
    margin: .3rem auto 1rem;
    max-width: 440px;
    break-inside: avoid;
    print-color-adjust: exact;
  }
  #print-chart.hd-connection-print .hd-figure svg { max-height: 580px; }
  #print-chart.hd-connection-print article { break-inside: avoid; }
  #print-chart.hd-connection-print p { line-height: 1.35; }
}
