:root {
  color-scheme: light;
  --ink: #111111;
  --muted: #5d626b;
  --paper: #f4f2ef;
  --paper-strong: #ffffff;
  --surface: #ffffff;
  --surface-strong: #eceef1;
  --line: #d7d9de;
  --line-strong: #aeb3bd;
  --charcoal: #17191d;
  --charcoal-2: #24272d;
  --dark-gray: #343842;
  --mid-gray: #727782;
  --off-white: #f8f7f4;
  --accent: #d71920;
  --accent-strong: #a90f16;
  --accent-soft: #ffe2e3;
  --shadow: 0 20px 48px rgba(17, 17, 17, 0.16);
  --shadow-hard: 12px 12px 0 rgba(17, 17, 17, 0.18);
  --radius: 6px;
  --max: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

a {
  color: inherit;
}

code {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  padding: 1px 5px;
  font: 0.95em ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  overflow-wrap: anywhere;
}

.hero {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(120deg, rgba(215, 25, 32, 0.34), transparent 31%),
    linear-gradient(155deg, #050505 0%, var(--charcoal) 45%, var(--charcoal-2) 100%);
  color: var(--off-white);
  padding: 24px clamp(20px, 5vw, 64px) 72px;
}

.hero::after {
  position: absolute;
  right: -120px;
  bottom: -180px;
  width: 520px;
  height: 520px;
  border: 1px solid rgba(248, 247, 244, 0.08);
  content: "";
  transform: rotate(22deg);
}

.hero-library,
.hero-compact {
  min-height: 620px;
}

.site-nav {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: var(--max);
  margin: 0 auto 78px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--off-white);
  font-size: 1.05rem;
  font-weight: 850;
  text-decoration: none;
}

.brand-mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(248, 247, 244, 0.2);
  background: var(--accent);
  color: #fff;
  font-size: 0.78rem;
  line-height: 1;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.nav-link {
  border: 1px solid transparent;
  color: rgba(248, 247, 244, 0.76);
  font-size: 0.94rem;
  font-weight: 700;
  text-decoration: none;
}

.nav-cta {
  border-color: rgba(248, 247, 244, 0.22);
  border-radius: var(--radius);
  padding: 8px 11px;
  color: var(--off-white);
}

.nav-link:hover,
.card-link:hover,
.button:hover {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: end;
  max-width: var(--max);
  margin: 0 auto;
}

.hero-copy {
  max-width: 880px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #ff4a50;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.05;
  letter-spacing: 0;
}

h1 {
  max-width: 900px;
  font-size: clamp(3.4rem, 8vw, 7.25rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 3.25rem);
}

h3 {
  font-size: clamp(1.2rem, 2vw, 1.6rem);
}

.lede {
  max-width: 790px;
  margin: 22px 0 0;
  color: rgba(248, 247, 244, 0.82);
  font-size: clamp(1.1rem, 2.3vw, 1.45rem);
}

.hero-actions,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 10px 16px;
  font-weight: 850;
  text-decoration: none;
}

.button-primary {
  background: var(--accent);
  color: #fff;
}

.button-secondary {
  border-color: rgba(248, 247, 244, 0.32);
  color: var(--off-white);
}

.hero-panel,
.artifact-card,
.kpi-card,
.callout,
.calculator,
.table-wrap,
.principle-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-panel {
  border-color: rgba(248, 247, 244, 0.18);
  background: rgba(248, 247, 244, 0.08);
  box-shadow: none;
  overflow: hidden;
  backdrop-filter: blur(8px);
}

.hero-status {
  border-left: 4px solid var(--accent);
}

.status-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(248, 247, 244, 0.12);
}

.status-light {
  width: 10px;
  height: 10px;
  background: var(--accent);
}

.metric-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 20px;
  border-bottom: 1px solid rgba(248, 247, 244, 0.12);
}

.metric-row:last-child {
  border-bottom: 0;
}

.metric-row span {
  color: rgba(248, 247, 244, 0.68);
}

.metric-row strong {
  text-align: right;
}

.about-hero {
  padding-bottom: 58px;
}

.about-hero-grid {
  align-items: center;
}

.about-hero-panel {
  background:
    linear-gradient(180deg, rgba(248, 247, 244, 0.13), rgba(248, 247, 244, 0.06)),
    rgba(248, 247, 244, 0.08);
}

.about-actions {
  margin-top: 28px;
}

.about-signal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 16px;
  border-top: 1px solid rgba(248, 247, 244, 0.12);
}

.about-signal {
  display: inline-grid;
  min-height: 42px;
  place-items: center;
  border: 1px solid rgba(248, 247, 244, 0.2);
  border-radius: var(--radius);
  background: rgba(248, 247, 244, 0.08);
  color: var(--off-white);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

main {
  background:
    linear-gradient(180deg, #ffffff 0, var(--paper) 340px),
    var(--paper);
}

.page-shell,
.section-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding-right: clamp(20px, 5vw, 64px);
  padding-left: clamp(20px, 5vw, 64px);
}

.page-shell {
  padding-top: 56px;
  padding-bottom: 80px;
}

.about-shell {
  display: grid;
  gap: 28px;
  padding-top: 0;
}

.about-callout,
.about-throughline,
.about-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.about-callout {
  display: grid;
  grid-template-columns: minmax(180px, 0.45fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 54px);
  margin-top: -42px;
  padding: clamp(26px, 5vw, 44px);
  border-color: #1c1c1c;
  position: relative;
  z-index: 2;
}

.about-callout-kicker {
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 850;
  text-transform: uppercase;
}

.about-callout-copy {
  color: var(--dark-gray);
  font-size: 1.08rem;
}

.about-callout-copy h2 {
  margin-bottom: 18px;
  color: var(--ink);
}

.about-callout-copy p:first-of-type {
  margin-top: 0;
}

.about-callout-copy p:last-child {
  margin-bottom: 0;
}

.about-throughline {
  display: grid;
  grid-template-columns: minmax(220px, 0.6fr) minmax(0, 1.4fr);
  gap: 28px;
  padding: clamp(24px, 4vw, 36px);
  background:
    linear-gradient(135deg, rgba(215, 25, 32, 0.09), transparent 38%),
    var(--surface);
}

.about-throughline-header h2 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.about-rail {
  display: grid;
  gap: 12px;
}

.about-rail-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  background: rgba(244, 242, 239, 0.72);
  padding: 14px 16px;
}

.about-rail-item span {
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 850;
}

.about-rail-item strong {
  color: var(--charcoal);
  font-size: 1rem;
}

.about-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.about-card {
  display: grid;
  align-content: start;
  gap: 16px;
  padding: clamp(22px, 4vw, 32px);
}

.about-card h2 {
  font-size: clamp(1.55rem, 2.6vw, 2.35rem);
}

.about-card .copy-stack {
  font-size: 1rem;
}

.about-not-card {
  border-color: #1c1c1c;
  background: var(--charcoal);
  color: var(--off-white);
}

.about-not-card .copy-stack {
  color: rgba(248, 247, 244, 0.78);
}

.section {
  padding: 72px 0;
}

.page-shell .section {
  margin-bottom: 72px;
  padding: 0;
}

.library-section {
  margin-top: -44px;
}

.contract-section {
  margin-top: -44px;
  position: relative;
  z-index: 2;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 28px;
}

.section-lede {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.compact-heading {
  max-width: 620px;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.2fr);
  gap: 36px;
  align-items: start;
}

.copy-stack {
  color: var(--dark-gray);
  font-size: 1.05rem;
}

.copy-stack > *:first-child {
  margin-top: 0;
}

.copy-stack > *:last-child {
  margin-bottom: 0;
}

.card-grid,
.kpi-grid,
.principle-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.card-grid-featured {
  grid-template-columns: minmax(0, 1fr);
}

.featured-artifact-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
}

.featured-artifact-rail .featured-artifact-compact {
  min-height: 0;
  gap: 18px;
  padding: 20px;
}

.featured-artifact-compact .card-meta,
.featured-artifact-compact .provenance-row,
.featured-artifact-compact .topic-row {
  gap: 6px;
}

.featured-artifact-compact .topic-row {
  display: none;
}

.featured-artifact-compact .card-meta .date-badge {
  display: none;
}

.featured-artifact-compact h3 {
  font-size: 1.08rem;
}

.featured-artifact-compact p {
  font-size: 0.94rem;
}

.catalog-card-results {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.browse-cta {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  gap: clamp(24px, 4vw, 46px);
  align-items: center;
  border: 1px solid #1c1c1c;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-hard);
  padding: clamp(24px, 5vw, 42px);
}

.browse-cta p {
  color: var(--muted);
}

.landing-artifacts {
  margin-top: 0;
}

.recent-artifacts-block {
  display: grid;
  gap: 16px;
  margin-top: 34px;
}

.recent-artifact-list {
  display: grid;
  gap: 12px;
}

.recent-artifact-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 18px;
  align-items: center;
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 16px 18px;
  box-shadow: 0 10px 24px rgba(17, 17, 17, 0.06);
}

.recent-artifact-item h3 {
  font-size: 1.1rem;
}

.recent-artifact-item p {
  margin: 6px 0 0;
  color: var(--muted);
}

.compact-featured-badge {
  border-color: rgba(215, 25, 32, 0.26);
  background: rgba(215, 25, 32, 0.08);
  color: var(--accent);
}

.catalog-list-results {
  display: grid;
  gap: 12px;
}

.catalog-list-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 20px;
  align-items: center;
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 16px 18px;
  box-shadow: 0 10px 24px rgba(17, 17, 17, 0.06);
}

.catalog-list-item h3 {
  font-size: 1.1rem;
}

.catalog-list-item p {
  margin: 6px 0 0;
  color: var(--muted);
}

.compact-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 0;
  margin-top: 9px;
  color: var(--mid-gray);
  font-size: 0.82rem;
  font-weight: 800;
}

.compact-meta span {
  display: inline-flex;
  align-items: center;
}

.compact-meta span + span::before {
  width: 4px;
  height: 4px;
  margin: 0 10px;
  background: var(--line-strong);
  content: "";
}

.compact-type {
  color: var(--accent-strong);
}

.compact-strong {
  color: var(--charcoal);
}

.compact-topic-row {
  margin-top: 10px;
}

.browse-cta {
  grid-template-columns: minmax(0, 1fr) max-content;
  box-shadow: none;
}

.featured-catalog-cta {
  margin-top: 26px;
  border-radius: 18px;
  padding: 22px;
}

.proof-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.proof-tile {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 16px;
}

.proof-tile strong,
.proof-tile span {
  display: block;
}

.proof-tile strong {
  color: var(--charcoal);
  font-size: 0.95rem;
}

.proof-tile span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.35;
}

.catalog-hero {
  min-height: 320px;
}

.catalog-hero-grid {
  min-height: 240px;
}

.catalog-hero {
  padding-bottom: 44px;
}

.catalog-hero .site-nav {
  margin-bottom: 34px;
}

.catalog-hero-grid {
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.45fr);
  gap: clamp(24px, 4vw, 44px);
  align-items: center;
}

.catalog-hero h1 {
  font-size: clamp(3.2rem, 7vw, 5.4rem);
}

.catalog-hero .lede {
  max-width: 680px;
  margin-top: 14px;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
}

.catalog-hero .status-header,
.catalog-hero .metric-row {
  padding: 14px 16px;
}

.catalog-browser-section {
  position: relative;
  z-index: 1;
  margin-top: 0;
  padding-top: 72px;
}

.catalog-controls {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  padding: 16px;
}

.catalog-search-label {
  color: var(--dark-gray);
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.catalog-controls-full {
  gap: 16px;
}

.catalog-search-row {
  display: grid;
  gap: 8px;
}

.filter-panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.58);
  padding: 14px;
}

.catalog-toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 0.28fr) max-content;
  gap: 14px;
  align-items: end;
  justify-content: space-between;
}

.view-toggle-wrap {
  display: grid;
  gap: 6px;
}

.view-toggle-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.view-toggle {
  display: flex;
  overflow: hidden;
  min-width: 0;
  border: 1px solid #1c1c1c;
  border-radius: 14px;
  background: #f4f2ef;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.view-toggle button {
  appearance: none;
  min-height: 42px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--dark-gray);
  padding: 8px 14px;
  font-weight: 850;
  letter-spacing: 0;
  cursor: pointer;
}

.view-toggle button:last-child {
  border-right: 0;
}

.view-toggle button:hover,
.view-toggle button:focus-visible {
  background: var(--surface-strong);
}

.view-toggle button.active {
  background: var(--accent);
  color: var(--off-white);
}

.catalog-result-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.result-count {
  color: var(--dark-gray);
  font-size: 0.95rem;
  font-weight: 900;
}

.filter-grid label {
  gap: 6px;
}

.filter-grid span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.catalog-status,
.catalog-empty,
.catalog-fallback {
  margin: 14px 0;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
}

.catalog-fallback {
  border-left: 4px solid var(--accent);
  background: var(--surface-strong);
  padding: 14px 16px;
}

.catalog-table-wrap {
  width: 100%;
  box-shadow: none;
}

.catalog-table-wrap table {
  min-width: 980px;
}

.catalog-table-wrap a {
  color: var(--accent-strong);
  font-weight: 850;
  text-decoration: none;
}

.artifact-card,
.kpi-card,
.callout,
.principle-card {
  padding: 22px;
}

.artifact-card {
  display: flex;
  min-height: 245px;
  flex-direction: column;
  justify-content: space-between;
  border-color: #1c1c1c;
}

.artifact-card-featured {
  min-height: 280px;
  border-top: 6px solid var(--accent);
  background:
    linear-gradient(135deg, rgba(215, 25, 32, 0.08), transparent 30%),
    #fff;
  box-shadow: var(--shadow-hard);
}

.artifact-card p,
.kpi-card p,
.callout p,
.principle-card p {
  color: var(--muted);
}

.artifact-card h3 {
  max-width: 780px;
}

.validation-note {
  margin-bottom: 0;
  font-size: 0.95rem;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.card-meta span,
.privacy-badge,
.source-badge,
.topic-badge,
.date-badge,
.credibility-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--dark-gray);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.source-badge {
  border-color: #b8c0cb;
  background: #eef2f6;
  color: #29313b;
}

.source-badge-strong {
  border-color: #1c1c1c;
  background: var(--charcoal);
  color: var(--off-white);
}

.topic-badge {
  border-color: var(--line);
  background: var(--off-white);
  color: var(--muted);
  text-transform: none;
}

.tag-badge {
  border-color: #e2c3c5;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.date-badge {
  border-color: #d6dbe2;
  background: #f7f8fa;
  color: var(--mid-gray);
}

.more-badge {
  border-style: dashed;
  color: var(--mid-gray);
}

.credibility-badge {
  border-color: #1c1c1c;
  background: var(--charcoal);
  color: var(--off-white);
}

.provenance-row,
.topic-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.card-kicker {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.card-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 28px;
}

.card-link {
  color: var(--accent-strong);
  font-weight: 850;
  text-decoration: none;
}

.model-section {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.principles-section {
  background: var(--charcoal);
  color: var(--off-white);
}

.principles-section .section-lede,
.principles-section .principle-card p {
  color: rgba(248, 247, 244, 0.7);
}

.principle-grid {
  align-items: stretch;
}

.principle-card {
  border-color: rgba(248, 247, 244, 0.14);
  background: rgba(248, 247, 244, 0.06);
  box-shadow: none;
}

.rule-number {
  display: inline-block;
  margin-bottom: 30px;
  color: #ff4a50;
  font-weight: 900;
}

.kpi-card strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1;
}

.kpi-card span {
  color: var(--muted);
  font-size: 0.92rem;
}

.callout {
  background: var(--surface-strong);
}

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

table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  background: var(--surface);
}

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--charcoal);
  color: var(--off-white);
  font-size: 0.78rem;
  text-transform: uppercase;
}

tr:last-child td {
  border-bottom: 0;
}

.calculator {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.85fr);
  gap: 24px;
  padding: 22px;
}

.input-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font: inherit;
  padding: 11px 12px;
}

select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font: inherit;
  padding: 10px 12px;
}

input:focus,
select:focus {
  border-color: var(--accent);
  outline: 2px solid var(--accent-soft);
}

.output-grid {
  display: grid;
  gap: 12px;
}

.output-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.output-row:last-child {
  border-bottom: 0;
}

.output-row strong {
  text-align: right;
}

.note-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding-left: 20px;
}

.pattern-hero {
  min-height: 360px;
  padding-bottom: 46px;
}

.pattern-hero .site-nav {
  margin-bottom: 36px;
}

.pattern-hero-grid {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.48fr);
  align-items: center;
}

.pattern-hero h1 {
  font-size: clamp(3.2rem, 7vw, 5.4rem);
}

.pattern-hero .lede {
  max-width: 720px;
  margin-top: 14px;
  font-size: clamp(1rem, 1.6vw, 1.22rem);
}

.pattern-intro-section {
  position: relative;
  z-index: 1;
  margin-top: 0;
  padding-top: 72px;
}

.pattern-principle-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.pattern-principle-card {
  border-color: #1c1c1c;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 14px 32px rgba(17, 17, 17, 0.08);
}

.pattern-principle-card p {
  color: var(--muted);
}

.pattern-source-section {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.pattern-list-section {
  padding-top: 58px;
}

.pattern-list {
  display: grid;
  gap: 22px;
}

.pattern-card {
  overflow: hidden;
  border: 1px solid #1c1c1c;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 14px 34px rgba(17, 17, 17, 0.08);
}

.pattern-card-header,
.pattern-card-body {
  padding: clamp(20px, 4vw, 30px);
}

.pattern-card-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  align-items: start;
  border-top: 6px solid var(--accent);
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(215, 25, 32, 0.08), transparent 32%),
    #fff;
}

.pattern-kicker {
  margin: 0 0 8px;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.pattern-summary {
  max-width: 840px;
  margin: 12px 0 0;
  color: var(--muted);
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  margin: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #f7f8fa;
  color: var(--dark-gray);
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 850;
}

.badge-status {
  border-color: #1f7a4d;
  background: #e9f7ef;
  color: #155c38;
}

.badge-draft {
  border-color: #b7791f;
  background: #fff5dd;
  color: #7a4a00;
}

.detail-grid,
.posture-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.posture-grid {
  margin-top: 18px;
}

.detail-card {
  min-width: 0;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.detail-card-full {
  grid-column: 1 / -1;
}

.detail-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.detail-value {
  margin: 0;
  overflow-wrap: anywhere;
}

.small {
  color: var(--muted);
  font-size: 0.94rem;
}

.path-section {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}

.path-group {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.path-group h4 {
  margin: 0 0 10px;
  color: var(--charcoal);
  font-size: 1rem;
}

.path-list {
  display: grid;
  gap: 9px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.path-list li {
  min-width: 0;
  border-left: 3px solid var(--line);
  padding-left: 10px;
}

.path-list code,
.path-list a,
.detail-value code {
  overflow-wrap: anywhere;
}

.path-list a {
  color: var(--accent-strong);
  font-weight: 850;
  text-decoration: none;
}

.path-list a:hover {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.path-note {
  display: inline-flex;
  margin-left: 6px;
  color: var(--mid-gray);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.path-public {
  border-left-color: var(--accent);
}

.path-empty {
  color: var(--muted);
  font-style: italic;
}

.pattern-footer {
  border-top: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  padding: 28px 0 42px;
}

.featured-empty {
  border-left: 5px solid var(--accent);
  border-radius: var(--radius);
  background: #fff;
  padding: 16px 18px;
}

@media (max-width: 820px) {
  .hero {
    padding-bottom: 52px;
  }

  .site-nav {
    align-items: flex-start;
    margin-bottom: 48px;
  }

  .nav-links {
    gap: 8px;
  }

  .hero-grid,
  .split-section,
  .about-callout,
  .about-throughline,
  .browse-cta,
  .catalog-toolbar,
  .pattern-hero-grid,
  .calculator {
    grid-template-columns: 1fr;
  }

  .card-grid,
  .about-card-grid,
  .featured-artifact-grid,
  .catalog-card-results,
  .kpi-grid,
  .principle-grid,
  .pattern-principle-grid,
  .input-grid,
  .filter-grid {
    grid-template-columns: 1fr;
  }

  .artifact-card {
    min-height: 220px;
  }

  .featured-artifact-rail .featured-artifact-compact {
    min-height: 0;
  }

  .recent-artifact-item,
  .catalog-list-item {
    grid-template-columns: 1fr;
  }

  .pattern-card-header,
  .detail-grid,
  .posture-grid {
    grid-template-columns: 1fr;
  }

  .meta {
    justify-content: flex-start;
  }

  .browse-cta {
    align-items: start;
  }

  .proof-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .about-callout {
    margin-top: -24px;
  }
}

@media (max-width: 560px) {
  .site-nav {
    flex-direction: column;
  }

  .nav-links {
    justify-content: flex-start;
  }

  .proof-strip,
  .catalog-toolbar {
    grid-template-columns: 1fr;
  }

  .view-toggle {
    width: 100%;
  }

  .view-toggle button {
    flex: 1;
    padding-inline: 8px;
  }

  h1 {
    font-size: clamp(3rem, 16vw, 4.5rem);
  }

  .about-signal-grid {
    grid-template-columns: 1fr;
  }

  .about-rail-item {
    grid-template-columns: 1fr;
  }
}

@media print {
  body {
    background: #fff;
    color: #111;
  }

  .hero,
  .principles-section {
    background: #fff;
    color: #111;
    padding: 24px 0;
  }

  .site-nav,
  .hero-actions,
  .button-row {
    display: none;
  }

  .page-shell {
    max-width: none;
    padding: 0;
  }

  .hero-panel,
  .artifact-card,
  .kpi-card,
  .callout,
  .calculator,
  .table-wrap,
  .principle-card {
    box-shadow: none;
    break-inside: avoid;
  }

  .section {
    margin-bottom: 28px;
    padding: 0;
  }

  .about-callout,
  .about-throughline,
  .about-card {
    box-shadow: none;
    break-inside: avoid;
  }
}
