@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,500;0,600;1,500;1,600&family=IBM+Plex+Mono:wght@400;500&family=IBM+Plex+Sans:ital,wght@0,400;0,500;0,600;1,400&display=swap");

:root {
  --hcs-ink: #161310;
  --hcs-ink-raised: #1F1A16;
  --hcs-ink-hover: #26201B;
  --hcs-line: #3A332C;
  --hcs-line-strong: #53483E;
  --hcs-cream: #F4EFE6;
  --hcs-cream-dim: #C9C0B4;
  --hcs-cream-mute: #8F867A;
  --hcs-copper: #C4894A;
  --hcs-copper-hover: #D49A5C;
  --hcs-copper-soft: rgba(196, 137, 74, 0.16);
  --hcs-high: #C4563E;
  --hcs-medium: #C4894A;
  --hcs-info: #5B8F7E;
  --hcs-serif: "Cormorant Garamond", "Palatino Linotype", Palatino, "Times New Roman", serif;
  --hcs-sans: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --hcs-mono: "IBM Plex Mono", "ui-monospace", Menlo, Consolas, monospace;
  --hcs-radius: 6px;
  --hcs-measure: 42rem;
  --hcs-page: 72rem;
  --hcs-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.96 0 0 0 0 0.93 0 0 0 0 0.88 0 0 0 0.16 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background-color: var(--hcs-ink);
  background-image: var(--hcs-grain);
  background-repeat: repeat;
  background-size: 180px 180px;
  color: var(--hcs-cream);
  font-family: var(--hcs-sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--hcs-ink);
  background-image: var(--hcs-grain);
  background-repeat: repeat;
  background-size: 180px 180px;
  color: var(--hcs-cream);
}

/* Copper signature rule — accent, not a wash. */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--hcs-copper);
  z-index: 20;
  pointer-events: none;
}

::selection {
  background: var(--hcs-copper);
  color: var(--hcs-ink);
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--hcs-copper);
  color: var(--hcs-ink);
  padding: 0.5rem 0.8rem;
  z-index: 30;
}

.skip:focus { left: 0.75rem; top: 0.75rem; }

.page {
  max-width: var(--hcs-page);
  margin: 0 auto;
  padding: 2.75rem 1.5rem 4rem;
}

/* --- Masthead lockup + specimen ------------------------------------- */

.hero,
#hcs-header {
  max-width: none;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--hcs-line);
  margin-bottom: 2.75rem;
}

.hcs-masthead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(17.5rem, 22rem);
  gap: 2.25rem 3rem;
  align-items: end;
}

.hcs-kicker,
.kicker {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--hcs-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--hcs-copper);
  margin: 0 0 0.85rem;
}

.hcs-logo {
  display: block;
  flex: 0 0 auto;
  width: 1.75rem;
  height: 1.75rem;
}

.hcs-kicker > span { padding-top: 0.05rem; }

h1,
.hcs-title {
  font-family: var(--hcs-serif);
  font-weight: 500;
  font-size: clamp(3rem, 7vw, 5.15rem);
  line-height: 0.9;
  letter-spacing: -0.04em;
  margin: 0 0 1rem;
  color: var(--hcs-cream);
}

.wm-lead,
.wm-scan { display: block; }

.hcs-title::after,
h1.hcs-title::after {
  content: "";
  display: block;
  width: 3.15rem;
  height: 2px;
  background: var(--hcs-copper);
  margin-top: 0.95rem;
}

.lede,
.hcs-lede {
  font-size: 1.16rem;
  line-height: 1.55;
  color: var(--hcs-cream-dim);
  margin: 0 0 1.2rem;
  max-width: 36rem;
}

.pills,
.hcs-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pills li,
.hcs-pills li {
  font-family: var(--hcs-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hcs-cream-dim);
  border: 1px solid var(--hcs-line-strong);
  border-radius: 999px;
  padding: 0.22rem 0.65rem;
}

.hcs-credit {
  margin: 1.05rem 0 0;
  max-width: 36rem;
  font-size: 0.92rem;
  color: var(--hcs-cream-mute);
}

/* --- Code-point specimen (illustration; never the raw character) --- */

.hcs-specimen {
  background: var(--hcs-ink-raised);
  border: 1px solid var(--hcs-line);
  border-radius: 8px;
  padding: 1.05rem 1.1rem 1.15rem;
  position: relative;
}

.hcs-specimen::before {
  content: "";
  position: absolute;
  top: 0;
  left: 1.1rem;
  right: 1.1rem;
  height: 2px;
  background: var(--hcs-copper);
}

.hcs-specimen-kicker {
  font-family: var(--hcs-mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--hcs-copper);
  margin: 0.55rem 0 0.7rem;
}

.hcs-specimen-cp {
  font-family: var(--hcs-mono);
  font-size: clamp(2rem, 3.4vw, 2.45rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--hcs-copper);
  line-height: 1;
  margin: 0 0 0.28rem;
}

.hcs-specimen-name {
  font-family: var(--hcs-serif);
  font-style: italic;
  font-weight: 500;
  font-size: 1.2rem;
  color: var(--hcs-cream);
  margin: 0 0 1.15rem;
  letter-spacing: -0.01em;
}

.hcs-specimen-diagram {
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 0;
  margin: 0 0 1.55rem;
  padding: 0.15rem 0 1.35rem;
  border-top: 1px solid var(--hcs-line);
  border-bottom: 1px solid var(--hcs-line);
  padding-top: 0.95rem;
}

.hcs-spec-tok {
  font-family: var(--hcs-mono);
  font-size: 0.92rem;
  color: var(--hcs-cream);
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.hcs-spec-gap {
  position: relative;
  display: inline-flex;
  align-items: flex-end;
  justify-content: center;
  width: 1.55rem;
  height: 1.2rem;
  flex: 0 0 1.55rem;
}

.hcs-spec-ibar {
  display: block;
  width: 2px;
  height: 1.15rem;
  background: var(--hcs-copper);
  position: relative;
}

.hcs-spec-ibar::before,
.hcs-spec-ibar::after {
  content: "";
  position: absolute;
  left: -4px;
  width: 10px;
  height: 2px;
  background: var(--hcs-copper);
}

.hcs-spec-ibar::before { top: 0; }
.hcs-spec-ibar::after { bottom: 0; }

.hcs-spec-gap-label {
  position: absolute;
  top: calc(100% + 0.4rem);
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--hcs-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  color: var(--hcs-copper);
  white-space: nowrap;
}

.hcs-specimen-meta {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.55rem 0.7rem;
  margin: 0 0 0.85rem;
}

.hcs-specimen-meta div { min-width: 0; }

.hcs-specimen-meta dt {
  font-family: var(--hcs-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--hcs-cream-mute);
  margin: 0 0 0.15rem;
}

.hcs-specimen-meta dd {
  margin: 0;
  font-family: var(--hcs-mono);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--hcs-cream);
}

.hcs-specimen-meta dd.cp,
.hcs-specimen-meta .cp {
  color: var(--hcs-copper);
}

.hcs-specimen-note {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--hcs-cream-mute);
}

@media (max-width: 840px) {
  .hcs-masthead {
    grid-template-columns: 1fr;
    gap: 1.75rem;
    align-items: stretch;
  }
  .hcs-specimen { max-width: 26rem; }
}

/* --- Sections ------------------------------------------------------- */

section {
  margin: 0 0 2.75rem;
  max-width: var(--hcs-page);
}

section > h2,
.section-title {
  font-family: var(--hcs-serif);
  font-weight: 500;
  font-size: clamp(1.85rem, 3vw, 2.25rem);
  letter-spacing: -0.025em;
  margin: 0 0 0.75rem;
  line-height: 1.1;
}

.section-kicker {
  font-family: var(--hcs-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--hcs-copper);
  margin: 0 0 0.35rem;
}

p { max-width: var(--hcs-measure); }

a {
  color: var(--hcs-copper);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

a:hover { border-bottom-color: var(--hcs-copper); }

.note, .muted { color: var(--hcs-cream-mute); }

ul.plain, ol.plain {
  max-width: var(--hcs-measure);
  padding-left: 1.15rem;
}

ul.plain li, ol.plain li { margin: 0.3rem 0; }

.codes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16.5rem, 1fr));
  gap: 0.65rem 1rem;
  margin: 1rem 0 0;
}

.code-item {
  background: var(--hcs-ink-raised);
  border: 1px solid var(--hcs-line);
  border-radius: var(--hcs-radius);
  padding: 0.8rem 0.9rem;
}

.code-item dt {
  font-family: var(--hcs-mono);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--hcs-copper);
  margin: 0 0 0.25rem;
}

.code-item dd {
  margin: 0;
  font-size: 0.86rem;
  color: var(--hcs-cream-dim);
  line-height: 1.45;
}

pre, code, .mono, .hcs-mono {
  font-family: var(--hcs-mono);
  font-variant-ligatures: none;
}

code, .illust-note .cp {
  text-transform: none !important;
  font-variant: normal !important;
  font-variant-caps: normal !important;
}
code {
  font-size: 0.86em;
  color: var(--hcs-cream);
  white-space: nowrap;
}

pre code {
  white-space: pre;
}

/* IBM Plex Mono hyphen does not fill the em, so "--json" reads as "- - json". */
.hcs-dd {
  letter-spacing: -0.18em;
}

.illust-note .cp {
  font-family: var(--hcs-mono);
  color: var(--hcs-copper);
  font-weight: 500;
  font-size: 0.86em;
}

pre {
  background: var(--hcs-ink-raised);
  border: 1px solid var(--hcs-line);
  border-radius: var(--hcs-radius);
  padding: 1rem 1.1rem;
  overflow-x: auto;
  font-size: 0.82rem;
  line-height: 1.5;
  max-width: 48rem;
  color: var(--hcs-cream);
}

.placeholder {
  background: var(--hcs-ink-raised);
  border: 1px dashed var(--hcs-line-strong);
  border-radius: 10px;
  padding: 1.15rem 1.2rem;
  max-width: 42rem;
}

.placeholder strong {
  display: block;
  font-family: var(--hcs-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--hcs-copper);
  margin-bottom: 0.45rem;
}

.placeholder p { margin: 0.35rem 0; }

.demo-live {
  background: var(--hcs-ink-raised);
  border: 1px solid var(--hcs-line);
  border-top: 2px solid var(--hcs-copper);
  border-radius: var(--hcs-radius);
  padding: 1.25rem 1.35rem 1.1rem;
  max-width: 42rem;
}

.demo-live p { margin: 0.45rem 0; }

.demo-live-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--hcs-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--hcs-copper);
}

.demo-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--hcs-info);
  box-shadow: 0 0 0 3px rgba(91, 143, 126, 0.2);
}

.demo-live-meta {
  font-family: var(--hcs-mono);
  font-size: 0.82rem;
  color: var(--hcs-cream-mute);
}

.demo-cta,
.demo-cta:hover {
  border-bottom: 0;
}

.demo-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.35rem;
  padding: 0.6rem 1.05rem;
  border-radius: var(--hcs-radius);
  background: var(--hcs-copper);
  color: var(--hcs-ink);
  font-weight: 600;
  text-decoration: none;
}

.demo-cta:hover,
.demo-cta:focus-visible {
  background: var(--hcs-copper-hover);
  color: var(--hcs-ink);
}

.placeholder .planned {
  font-family: var(--hcs-mono);
  font-size: 0.84rem;
  color: var(--hcs-cream-dim);
}

.illust-note {
  background: transparent;
  border: 0;
  border-left: 2px solid var(--hcs-copper);
  padding: 0.15rem 0 0.15rem 0.9rem;
  margin: 0 0 1rem;
  max-width: 46rem;
  color: var(--hcs-cream-dim);
  font-size: 0.92rem;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 0.85rem;
}

.tabs button {
  font-family: var(--hcs-sans);
  font-size: 0.85rem;
  background: var(--hcs-ink-raised);
  color: var(--hcs-cream-dim);
  border: 1px solid var(--hcs-line);
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
  cursor: pointer;
}

.tabs button:hover { border-color: var(--hcs-line-strong); color: var(--hcs-cream); }

.tabs button[aria-selected="true"] {
  border-color: var(--hcs-copper);
  color: var(--hcs-cream);
  background: var(--hcs-copper-soft);
}

.panel { display: none; }
.panel.is-active { display: block; }

.table-wrap { overflow-x: auto; }

table.findings {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  margin: 0.5rem 0 0.75rem;
}

table.findings th {
  font-family: var(--hcs-mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--hcs-cream-mute);
  text-align: left;
  padding: 0.45rem 0.7rem 0.5rem 0;
  border-bottom: 1px solid var(--hcs-line);
  white-space: nowrap;
}

table.findings td {
  padding: 0.62rem 0.7rem 0.62rem 0;
  border-bottom: 1px solid var(--hcs-line);
  vertical-align: top;
}

.cp { font-family: var(--hcs-mono); color: var(--hcs-copper); font-size: 0.84rem; font-weight: 500; }
.num, .det { font-family: var(--hcs-mono); font-size: 0.84rem; color: var(--hcs-cream-dim); }
.why { color: var(--hcs-cream-dim); }

.sev {
  font-family: var(--hcs-mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 0.15rem 0.45rem;
  border: 1px solid transparent;
}

.sev-high { color: var(--hcs-high); border-color: var(--hcs-high); background: rgba(196, 86, 62, 0.12); }
.sev-medium { color: var(--hcs-medium); border-color: var(--hcs-medium); background: rgba(196, 137, 74, 0.12); }
.sev-info { color: var(--hcs-info); border-color: var(--hcs-info); background: rgba(91, 143, 126, 0.12); }

.badge {
  font-family: var(--hcs-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--hcs-info);
  color: var(--hcs-info);
  background: rgba(91, 143, 126, 0.12);
  margin-right: 0.5rem;
}

.badge-fail {
  border-color: var(--hcs-high);
  color: var(--hcs-high);
  background: rgba(196, 86, 62, 0.12);
}

.status {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0.25rem 0 0.5rem;
  color: var(--hcs-cream-dim);
  font-size: 0.92rem;
}

footer {
  border-top: 1px solid var(--hcs-line);
  padding-top: 1.35rem;
  color: var(--hcs-cream-mute);
  font-size: 0.88rem;
}

footer p { margin: 0.25rem 0; }

.footer-sig {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  column-gap: 1.25rem;
  row-gap: 0.2rem;
  max-width: none;
}

.footer-links span {
  display: inline-block;
}

.hcs-logo-sm {
  width: 1.35rem;
  height: 1.35rem;
  margin-top: 0.05rem;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
