/* topic.css — Unibuild · shared styles for topic pages
   (personas, pain pages, compliance pages, resource pages, etc).
   Inherits palette and primitives from styles.css.
*/

.sec-paper-2 { background: var(--paper-2); }


/* ── TOPIC HERO ────────────────────────────────────────────────────────── */
.tp-hero {
  position: relative;
  border-bottom: 1px solid var(--rule);
  padding: 56px 0 64px;
  overflow: hidden;
  background: linear-gradient(180deg, var(--paper) 0%, var(--paper) 60%, var(--paper-2) 100%);
}
.tp-hero::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 6px;
  background: var(--hazard);
  z-index: 1;
}

.tp-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}

.tp-hero-text h1 {
  font-family: var(--f-display);
  font-size: clamp(40px, 5.2vw, 76px);
  line-height: 0.96;
  letter-spacing: -0.035em;
  font-weight: 700;
  margin: 22px 0 0;
  text-wrap: balance;
}
.tp-hero-text h1 em {
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 400;
}
.tp-hero-text .sub {
  margin-top: 22px;
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 56ch;
  text-wrap: pretty;
}
.tp-hero-text .ctas {
  margin-top: 28px;
  display: flex; gap: 14px; flex-wrap: wrap; align-items: center;
}
.tp-hero-text .ctas .btn:first-child {
  background: var(--hazard);
  color: var(--hazard-ink);
  border-color: var(--hazard);
}
.tp-hero-text .ctas .btn-ghost {
  background: transparent;
  border: 0;
  padding: 14px 4px;
  color: var(--ink-2);
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-underline-offset: 6px;
  font-weight: 500;
}
.tp-hero-text .ctas .btn-ghost:hover {
  color: var(--ink);
  text-decoration-color: var(--ink);
  transform: none;
}
.tp-hero-text .meta {
  margin-top: 22px;
  display: flex; gap: 18px; flex-wrap: wrap;
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--ink-mute);
  letter-spacing: 0.02em;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
}
.tp-hero-text .meta span::before {
  content: "✓";
  color: var(--good);
  margin-right: 6px;
}

/* Hero side card — KPI / spec block */
.tp-spec {
  border: 1px solid var(--ink);
  background: var(--paper);
  align-self: start;
}
.tp-spec-hd {
  padding: 10px 14px;
  background: var(--ink);
  color: var(--paper);
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--f-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.tp-spec-hd .live {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--hazard);
}
.tp-spec-hd .live i {
  width: 6px; height: 6px;
  background: var(--hazard); border-radius: 50%;
  animation: pulse 1.6s ease-in-out infinite;
}
.tp-spec-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  padding: 12px 14px;
  border-bottom: 1px solid var(--rule-soft);
  gap: 12px;
}
.tp-spec-row:last-child { border-bottom: 0; }
.tp-spec-row .k {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.tp-spec-row .v {
  font-family: var(--f-display);
  font-size: 16px;
  letter-spacing: -0.015em;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.tp-spec-row .v.ok {
  color: var(--good);
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.tp-spec-row .v.warn {
  color: var(--hazard-ink);
  background: var(--hazard);
  padding: 1px 6px;
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}


/* ── TOPIC SECTION CONTENT GRID (3 cards) ──────────────────────────────── */
.tp-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}
.tp-card {
  padding: 28px 24px 28px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: background 0.18s;
}
.tp-card:hover { background: var(--paper-2); }
.tp-card .num {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-mute);
  border-top: 1px solid var(--ink);
  padding-top: 6px;
  width: 32px;
}
.tp-card h3 {
  font-family: var(--f-display);
  font-size: 22px;
  letter-spacing: -0.02em;
  font-weight: 600;
  line-height: 1.1;
  margin: 6px 0 0;
}
.tp-card p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ink-2);
}
.tp-card ul {
  list-style: none;
  padding: 0;
  margin: 4px 0 0;
  display: grid;
  gap: 6px;
  font-family: var(--f-mono);
  font-size: 11.5px;
  color: var(--ink-2);
}
.tp-card ul li {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 10px;
  align-items: baseline;
}
.tp-card ul li::before {
  content: "→";
  color: var(--ink-mute);
}
.tp-card .foot {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--rule-soft);
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-mute);
  display: flex;
  justify-content: space-between;
}
.tp-card .foot b { color: var(--ink); font-weight: 500; }


/* ── TOPIC LIST · FACTS / DUTIES ───────────────────────────────────────── */
.tp-facts {
  display: grid;
  grid-template-columns: 220px 1fr;
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}
.tp-facts-row { display: contents; }
.tp-facts-cat {
  padding: 22px 24px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: var(--paper-2);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.tp-facts-cat .num {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 0.06em;
}
.tp-facts-cat h4 {
  font-family: var(--f-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
}
.tp-facts-list {
  padding: 18px 20px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
  align-content: flex-start;
  background: var(--paper);
}
.tp-facts-list span {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--ink);
  border: 1px solid var(--rule);
  padding: 5px 10px;
  background: var(--paper);
}


/* ── CROSS-LINKS · RELATED PAGES STRIP ─────────────────────────────────── */
.tp-cross {
  margin-top: 16px;
  border: 1px solid var(--rule);
  background: var(--paper);
  padding: 0;
}
.tp-cross-hd {
  padding: 14px 22px;
  background: var(--paper-2);
  border-bottom: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.tp-cross-hd b {
  color: var(--ink);
  font-weight: 500;
}
.tp-cross-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.tp-cross-item {
  padding: 22px 22px 24px;
  border-right: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--ink);
  text-decoration: none;
  transition: background 0.18s;
}
.tp-cross-item:last-child { border-right: 0; }
.tp-cross-item:hover { background: var(--paper-2); }
.tp-cross-item .eyebrow {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-mute);
}
.tp-cross-item h4 {
  font-family: var(--f-display);
  font-size: 19px;
  letter-spacing: -0.02em;
  font-weight: 600;
  margin: 0;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}
.tp-cross-item h4 .arr {
  font-family: var(--f-mono);
  font-size: 14px;
  color: var(--ink-mute);
  transition: transform 0.15s ease;
}
.tp-cross-item:hover h4 .arr { transform: translateX(3px); color: var(--ink); }
.tp-cross-item p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-2);
}


/* ── PROSE BAND · LONG-READ COPY ───────────────────────────────────────── */
.tp-prose {
  display: grid;
  grid-template-columns: 200px minmax(0, 720px) 1fr;
  gap: 48px;
  margin: 0 auto;
}
.tp-prose-aside {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-mute);
  border-top: 1px solid var(--ink);
  padding-top: 6px;
  align-self: start;
  text-transform: uppercase;
}
.tp-prose-body {
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-2);
}
.tp-prose-body h3 {
  font-family: var(--f-display);
  font-size: 24px;
  letter-spacing: -0.02em;
  font-weight: 600;
  color: var(--ink);
  margin: 28px 0 10px;
  text-wrap: balance;
}
.tp-prose-body h3 em {
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 400;
}
.tp-prose-body h3:first-child { margin-top: 0; }
.tp-prose-body p { margin: 0 0 16px; max-width: 64ch; }
.tp-prose-body ul {
  margin: 0 0 16px;
  padding-left: 18px;
  max-width: 64ch;
}
.tp-prose-body ul li { margin-bottom: 6px; }
.tp-prose-body strong { color: var(--ink); font-weight: 600; }
.tp-prose-body a {
  color: var(--ink);
  border-bottom: 1px solid var(--rule);
}
.tp-prose-body a:hover {
  border-bottom-color: var(--ink);
}


/* ── RESPONSIVE ────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .tp-hero { padding: 40px 0 48px; }
  .tp-hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .tp-cards { grid-template-columns: repeat(2, 1fr); }
  .tp-cross-grid { grid-template-columns: 1fr; }
  .tp-cross-item { border-right: 0; border-bottom: 1px solid var(--rule); }
  .tp-cross-item:last-child { border-bottom: 0; }
  .tp-facts { grid-template-columns: 1fr; }
  .tp-facts-cat { border-right: 0; }
  .tp-prose { grid-template-columns: 1fr; gap: 20px; }
}

@media (max-width: 720px) {
  .tp-hero { padding: 32px 0 40px; }
  .tp-hero-text h1 { font-size: clamp(34px, 9vw, 52px); }
  .tp-cards { grid-template-columns: 1fr; }
}
