/* ==========================================================================
   Regions, round 3 (src/features/hubs/relations.js): the "Key relationships"
   chapter cards on a region page, and /regions/compare (two regions side by
   side). Prefix: hc-.
   ========================================================================== */

.hc-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.hc-kicker { margin: 0 0 0.25rem; color: var(--accent-dark); font-family: var(--font-serif); font-variant-caps: all-small-caps; letter-spacing: 0.16em; font-size: 1rem; }
.hc-h2 { margin: 0; font-family: var(--font-serif); font-weight: 560; font-size: clamp(1.5rem, 2.4vw, 2rem); letter-spacing: -0.01em; color: var(--ink); }
.hc-h3 { margin: 0 0 0.6rem; font-family: var(--font-serif); font-weight: 560; font-size: 1.2rem; color: var(--ink); }
.hc-lede { margin: 0.4rem 0 0; color: var(--muted); max-width: 44rem; }

/* ------------------------------------------------------- Chapter cards */
.hc-rel { margin: var(--s-5) 0; }
.hc-rel-head { margin-bottom: var(--s-3); }
.hc-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: var(--s-3); margin: 0; padding: 0; list-style: none; }
.hc-card {
  position: relative; display: flex; flex-direction: column; padding: 1.2rem 1.15rem 1.05rem;
  background: radial-gradient(130% 90% at 15% 0%, #F8F6FB 0%, #EEE8F6 62%, #E5DDF0 100%); color: #2C2238;
  border-radius: 6px; box-shadow: 0 16px 30px -22px rgba(42, 27, 69, 0.55), 0 2px 6px rgba(42, 27, 69, 0.08);
}
.hc-card::before { content: ""; position: absolute; inset: 7px; border: 1.5px solid rgba(44, 34, 56, 0.7); border-radius: 3px; pointer-events: none; }
.hc-card-num { display: flex; justify-content: space-between; margin: 0.1rem 0.2rem 0; font-family: var(--font-serif); font-variant-caps: all-small-caps; letter-spacing: 0.16em; font-size: 0.86rem; color: #695881; }
.hc-shape { display: block; width: 100%; height: 6.5rem; margin: 0.5rem 0 0.2rem; }
.hc-shape path { fill: #B9A2D8; stroke: #2C2238; stroke-width: 1.6; stroke-linejoin: round; vector-effect: non-scaling-stroke; filter: drop-shadow(0 4px 0 #7F67A6); }
.hc-card-name { margin: 0.3rem 0.2rem 0; font-family: var(--font-serif); font-weight: 560; font-size: 1.35rem; line-height: 1.15; color: var(--ink); }
.hc-card-tally { margin: 0.35rem 0.2rem 0; font-size: 0.8rem; color: #695881; font-variant-numeric: lining-nums; }
.hc-card-links { margin: 0.75rem 0.2rem 0; padding: 0; list-style: none; }
.hc-card-links li { padding: 0.45rem 0; border-top: 0.75px solid rgba(44, 34, 56, 0.25); font-family: var(--font-serif); font-size: 1rem; line-height: 1.3; }
.hc-card-links a { color: var(--ink); text-decoration: underline; text-decoration-color: rgba(110, 66, 166, 0.35); text-underline-offset: 3px; }
.hc-card-links a:hover { text-decoration-color: currentColor; }
.hc-card-k { display: block; font-family: var(--font); font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase; color: #695881; margin-bottom: 0.1rem; }
.hc-card-more { margin: auto 0.2rem 0; padding-top: 0.8rem; font-size: 0.84rem; font-weight: 600; color: var(--accent-dark) !important; }

.hc-form { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin-top: var(--s-3); padding: 0.8rem 1rem; background: var(--mist); border-left: 2px solid var(--accent); }
.hc-form label { font-family: var(--font-serif); font-size: 1.05rem; color: var(--ink); }
.hc-form select, .hc-pick select { min-height: 2.4rem; padding: 0.3rem 0.6rem; border: 1px solid var(--line); border-radius: 2px; background: #fff; font: inherit; color: var(--text); max-width: 100%; }
.hc-go { min-height: 2.4rem; padding: 0.35rem 1rem; border: 0; border-radius: 2px; background: var(--ink); color: #fff; font: 600 0.88rem var(--font); cursor: pointer; }
.hc-go:hover, .hc-go:focus-visible { background: var(--accent-dark); }

/* -------------------------------------------------------- Compare page */
.hc { background: #FBF9FC; }
.hc-wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--s-3); }
.hc-hero { padding: var(--s-4) 0 var(--s-5); background: var(--ink); color: var(--on-ink); }
.hc-crumbs ol { display: flex; flex-wrap: wrap; gap: 0.3rem; margin: 0 0 var(--s-3); padding: 0; list-style: none; font-size: 0.84rem; color: var(--on-ink-muted); }
.hc-crumbs li:not(:last-child)::after { content: "/"; margin-left: 0.4rem; opacity: 0.6; }
.hc-crumbs a { color: inherit; }
.hc-hero .hc-kicker { color: #D3C0EA; }
.hc-title { margin: 0 0 var(--s-3); font-family: var(--font-serif); font-weight: 560; font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.05; letter-spacing: -0.02em; color: #fff; }
.hc-title em { font-style: italic; font-weight: 400; color: var(--accent-soft); }
.hc-pick { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.8rem; }
.hc-pick label { display: grid; gap: 0.25rem; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--on-ink-muted); }
.hc-pick .hc-go { background: #D3C0EA; color: var(--ink); }
.hc-pick .hc-go:hover { background: #fff; }

.hc-body { padding-top: var(--s-4); padding-bottom: var(--s-5); }
.hc-sides { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); margin: calc(-1 * var(--s-5)) 0 var(--s-4); }
.hc-side { position: relative; display: grid; gap: 0.2rem; padding: 0.8rem 0.8rem 0.9rem; background: #fff; border-radius: 4px; box-shadow: 0 18px 34px -24px rgba(42, 27, 69, 0.6); text-decoration: none; color: var(--ink); border-top: 3px solid var(--accent); }
.hc-side.is-b { border-top-color: #B091DA; }
.hc-side svg { display: block; width: 100%; height: auto; max-height: 190px; }
.hc-side-name { font-family: var(--font-serif); font-size: 1.3rem; font-weight: 560; }
.hc-side-sum { font-size: 0.82rem; color: var(--muted); font-variant-numeric: tabular-nums; }

.hc-duel { width: 100%; margin-top: var(--s-3); border-collapse: separate; border-spacing: 0 6px; table-layout: fixed; }
.hc-duel thead th { padding: 0 0 0.4rem; font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.hc-duel thead th:first-child { text-align: right; }
.hc-duel thead th:last-child { text-align: left; }
.hc-mid { width: 11.5rem; text-align: center; padding: 0 0.8rem; font-family: var(--font-serif); font-weight: 500; font-size: 1rem; color: var(--ink); }
.hc-n { position: relative; height: 2.3rem; padding: 0; }
.hc-bar { position: absolute; top: 0.25rem; bottom: 0.25rem; width: var(--w); min-width: 2px; border-radius: 2px; transform-origin: inherit; animation: hc-grow 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.hc-n.is-a .hc-bar { right: 0; background: linear-gradient(270deg, var(--accent) 0%, #8E66C1 100%); transform-origin: 100% 50%; }
.hc-n.is-b .hc-bar { left: 0; background: linear-gradient(90deg, #B091DA 0%, #CBB5E6 100%); transform-origin: 0 50%; }
.hc-v { position: absolute; top: 50%; transform: translateY(-50%); font-family: var(--font-serif); font-size: 1.15rem; font-variant-numeric: lining-nums tabular-nums; color: var(--ink); }
.hc-n.is-a .hc-v { right: min(calc(var(--w) + 0.45rem), calc(100% - 2rem)); }
.hc-n.is-b .hc-v { left: min(calc(var(--w) + 0.45rem), calc(100% - 2rem)); }
.hc-duel tr.is-zero .hc-v { color: var(--muted); }
.hc-duel tr.is-zero .hc-mid { color: var(--muted); }
@keyframes hc-grow { from { transform: scaleX(0); } }
.hc-note { margin: var(--s-2) 0 0; font-size: 0.82rem; color: var(--muted); max-width: 48rem; }
.hc-lists { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); margin-top: var(--s-4); padding-top: var(--s-3); border-top: 1px solid var(--line); }
.hc-list ul { margin: 0 0 0.6rem; padding-left: 1.1rem; }
.hc-list li { margin: 0.3rem 0; }
.hc-list a { color: var(--ink); }
.hc-none { color: var(--muted); font-style: italic; }
.hc-more { font-weight: 600; color: var(--accent-dark) !important; font-size: 0.88rem; }

@media (max-width: 700px) {
  .hc-wrap { padding: 0 var(--s-2); }
  .hc-sides { grid-template-columns: 1fr 1fr; gap: 0.6rem; }
  .hc-side-name { font-size: 1.02rem; }
  .hc-mid { width: 7.2rem; font-size: 0.86rem; padding: 0 0.4rem; }
  .hc-lists { grid-template-columns: 1fr; gap: var(--s-3); }
  .hc-pick label, .hc-pick select { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .hc-bar { animation: none; }
}
