:root {
  --ink: #17221d;
  --ink-soft: #405149;
  --paper: #f3f0e8;
  --paper-deep: #e8e2d5;
  --white: #fffdf8;
  --copper: #d86636;
  --copper-dark: #a9421f;
  --sage: #b7c9b9;
  --line: #cdc8bb;
  --line-dark: #829087;
  --success: #286345;
  --error: #9f352d;
  --shadow: 0 18px 55px rgb(23 34 29 / 9%);
  --radius-sm: 0.55rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;
  --shell: 1180px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.035'/%3E%3C/svg%3E");
  content: "";
  pointer-events: none;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--copper) 80%, white);
  outline-offset: 3px;
}

.shell {
  width: min(calc(100% - 2.5rem), var(--shell));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.7rem 1rem;
  color: var(--white);
  background: var(--ink);
  border-radius: var(--radius-sm);
  transform: translateY(-150%);
  transition: transform 150ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: relative;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: rgb(243 240 232 / 90%);
  backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 5rem;
}

.brand {
  display: inline-flex;
  gap: 0.7rem;
  align-items: center;
  color: var(--ink);
  font-weight: 760;
  letter-spacing: -0.025em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 2.15rem;
  height: 2.15rem;
  place-items: center;
  color: var(--paper);
  background: var(--ink);
  border-radius: 50% 50% 50% 18%;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

.site-header nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.site-header nav a {
  position: relative;
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 650;
  text-decoration: none;
}

.site-header nav a:hover,
.site-header nav a[aria-current="page"] {
  color: var(--ink);
}

.site-header nav a[aria-current="page"]::after {
  position: absolute;
  right: 0;
  bottom: -0.55rem;
  left: 0;
  height: 2px;
  background: var(--copper);
  content: "";
}

.eyebrow,
.role-kicker {
  margin: 0 0 0.7rem;
  color: var(--copper-dark);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.3;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3,
h4 {
  margin-top: 0;
  line-height: 1.08;
}

h1,
h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: -0.045em;
}

h1 {
  margin-bottom: 1.5rem;
  font-size: clamp(3.1rem, 8vw, 7.5rem);
}

h2 {
  margin-bottom: 1rem;
  font-size: clamp(2.1rem, 4.2vw, 4rem);
}

h3 {
  letter-spacing: -0.02em;
}

.button {
  display: inline-flex;
  gap: 1.5rem;
  align-items: center;
  justify-content: space-between;
  min-height: 3.2rem;
  padding: 0.85rem 1.1rem 0.85rem 1.25rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 750;
  text-decoration: none;
  transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  color: var(--white);
  background: var(--ink);
}

.button-primary:hover {
  background: var(--copper-dark);
}

.button-secondary {
  color: var(--ink);
  background: transparent;
  border-color: var(--line-dark);
}

.button-secondary:hover {
  color: var(--white);
  background: var(--ink);
  border-color: var(--ink);
}

.button-light {
  color: var(--ink);
  background: var(--paper);
}

.button-light:hover {
  color: var(--white);
  background: var(--copper-dark);
}

/* Homepage */
.home-intro {
  min-height: calc(88vh - 4rem);
  padding-block: clamp(3.75rem, 7vw, 6rem);
  border-bottom: 1px solid var(--line);
}

.home-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(390px, 0.9fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: center;
}

.home-hero-copy h1 {
  max-width: 900px;
  font-size: clamp(3.7rem, 7.4vw, 7rem);
}

.home-lede {
  max-width: 760px;
  margin: 0 0 2rem;
  color: var(--ink-soft);
  font-size: clamp(1.15rem, 2.1vw, 1.5rem);
}

.home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.hero-note {
  margin: 1rem 0 0;
  color: var(--ink-soft);
  font-size: 0.76rem;
}

.hero-system {
  padding: 1.4rem;
  color: var(--paper);
  background: var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.hero-system-heading {
  display: grid;
  gap: 0.15rem;
  padding: 0.6rem 0.65rem 1.2rem;
  border-bottom: 1px solid rgb(243 240 232 / 20%);
}

.hero-system-heading span,
.choice-number,
.steps-grid li > span {
  color: var(--copper);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-system-heading strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  font-weight: 500;
}

.hero-flow {
  display: grid;
  justify-items: center;
  padding: 1.2rem 0.35rem 0.35rem;
}

.hero-flow-node {
  width: min(100%, 11.5rem);
  padding: 0.75rem 0.8rem;
  text-align: center;
  border: 1px solid rgb(243 240 232 / 28%);
  border-radius: var(--radius-sm);
}

.hero-flow-node.is-human {
  color: var(--ink);
  background: var(--sage);
  border-color: var(--sage);
}

.hero-flow-node.is-lead {
  border-color: var(--copper);
}

.hero-flow-node.is-review {
  color: var(--white);
  border-color: var(--copper);
}

.hero-flow-node span,
.hero-flow-node strong,
.hero-flow-node small {
  display: block;
}

.hero-flow-node span {
  margin-bottom: 0.15rem;
  color: var(--copper);
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-flow-node.is-human span {
  color: var(--copper-dark);
}

.hero-flow-node strong {
  font-size: 0.8rem;
}

.hero-flow-node small {
  margin-top: 0.15rem;
  color: var(--sage);
  font-size: 0.61rem;
}

.hero-flow-node.is-human small {
  color: var(--ink-soft);
}

.hero-flow-line {
  position: relative;
  width: 1px;
  height: 2.4rem;
  background: rgb(243 240 232 / 32%);
}

.hero-flow-line span {
  position: absolute;
  top: 50%;
  left: 0.8rem;
  width: max-content;
  color: var(--sage);
  font-size: 0.55rem;
  letter-spacing: 0.04em;
  transform: translateY(-50%);
}

.hero-flow-roles {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  width: 100%;
  padding-top: 1.6rem;
}

.hero-flow-roles::before {
  position: absolute;
  top: 0;
  right: 16.67%;
  left: 16.67%;
  border-top: 1px solid rgb(243 240 232 / 32%);
  content: "";
}

.hero-flow-roles .hero-flow-node {
  position: relative;
  min-width: 0;
  width: auto;
}

.hero-flow-roles .hero-flow-node::before {
  position: absolute;
  top: -1.65rem;
  left: 50%;
  width: 1px;
  height: 1.6rem;
  background: rgb(243 240 232 / 32%);
  content: "";
}

.hero-flow-return {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 1rem;
  padding-top: 0.8rem;
  color: var(--sage);
  border-top: 1px dashed rgb(243 240 232 / 24%);
  font-size: 0.57rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero-flow-return i {
  color: var(--copper);
  font-style: normal;
}

.home-section {
  padding-block: clamp(4rem, 7vw, 6.5rem);
  border-bottom: 1px solid var(--line);
}

.section-intro {
  max-width: 670px;
}

.section-intro-wide {
  max-width: 850px;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.section-intro > p:last-child {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.04rem;
}

.text-link {
  display: inline-flex;
  gap: 1rem;
  align-items: center;
  min-height: 2.75rem;
  margin-top: 1.25rem;
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 800;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.3rem;
}

.text-link:hover {
  color: var(--copper-dark);
}

.problem-grid,
.organization-grid,
.difference-grid,
.efficiency-grid,
.final-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(420px, 1.2fr);
  gap: clamp(3rem, 8vw, 8rem);
  align-items: center;
}

.hidden-work-panel {
  padding: clamp(1.5rem, 4vw, 2.5rem);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.hidden-work-panel blockquote,
.prompt-card blockquote {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  letter-spacing: -0.03em;
  line-height: 1.25;
}

.hidden-work-panel > p {
  margin: 1.5rem 0 0.75rem;
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.responsibility-cloud,
.prompt-facets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.responsibility-cloud li,
.prompt-facets span {
  padding: 0.45rem 0.7rem;
  color: var(--ink-soft);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
}

.hidden-work-panel > small {
  display: block;
  margin-top: 1.25rem;
  color: var(--ink-soft);
  font-size: 0.72rem;
}

.comparison-section {
  background: var(--paper-deep);
}

.prompt-comparison {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) auto minmax(0, 1.28fr);
  gap: 1rem;
  align-items: stretch;
}

.prompt-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 26rem;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.prompt-card.is-basic {
  color: var(--ink-soft);
}

.prompt-card.is-structured {
  color: var(--paper);
  background: var(--ink);
  border-color: var(--ink);
}

.prompt-card-label {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 2rem;
}

.prompt-card-label span {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  color: var(--white);
  background: var(--copper-dark);
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 800;
}

.prompt-card-label strong {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.prompt-card > p {
  margin: 1.5rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
}

.prompt-card.is-structured blockquote {
  align-self: center;
  color: var(--white);
  font-size: clamp(1.35rem, 2.4vw, 2rem);
}

.prompt-card.is-basic blockquote {
  align-self: center;
  overflow-wrap: normal;
  word-break: normal;
}

.prompt-card.is-structured .prompt-facets {
  margin-top: 2rem;
}

.prompt-card.is-structured .prompt-facets span {
  color: var(--sage);
  background: transparent;
  border-color: rgb(243 240 232 / 25%);
}

.comparison-arrow {
  display: grid;
  width: 3rem;
  height: 3rem;
  place-items: center;
  align-self: center;
  color: var(--white);
  background: var(--copper-dark);
  border-radius: 50%;
  font-size: 1.2rem;
}

.org-example {
  padding: clamp(1.5rem, 4vw, 3rem);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.org-tier {
  display: flex;
  justify-content: center;
}

.org-role {
  min-width: 11rem;
  padding: 0.8rem 0.9rem;
  text-align: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.org-role.is-human {
  color: var(--paper);
  background: var(--ink);
  border-color: var(--ink);
}

.org-role.is-review {
  border-color: var(--copper);
}

.org-role span {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--copper-dark);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.org-role.is-human span {
  color: var(--sage);
}

.org-role strong {
  display: block;
  font-size: 0.76rem;
}

.org-connector {
  width: 1px;
  height: 2rem;
  margin-inline: auto;
  background: var(--line-dark);
}

.org-tree-lines {
  display: block;
  width: 100%;
  height: 2.5rem;
  overflow: visible;
}

.org-tree-lines path {
  fill: none;
  stroke: var(--line-dark);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.org-specialists {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.55rem;
}

.org-specialists .org-role {
  min-width: 0;
}

.right-size-section {
  background: var(--white);
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.choice-grid article {
  padding: clamp(1.75rem, 4vw, 3.5rem);
  background: var(--paper);
}

.choice-grid article + article {
  border-left: 1px solid var(--line);
}

.choice-grid article.is-emphasized {
  color: var(--paper);
  background: var(--ink);
}

.choice-grid h3 {
  margin: 1rem 0 2rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 500;
}

.plain-list {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.plain-list li {
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.is-emphasized .plain-list li {
  color: var(--paper);
  border-color: rgb(243 240 232 / 20%);
}

.difference-section,
.home-final {
  color: var(--paper);
  background: var(--ink);
  border-bottom-color: rgb(243 240 232 / 15%);
}

.difference-section .eyebrow,
.home-final .eyebrow {
  color: var(--copper);
}

.difference-section .section-intro > p:last-child,
.home-final p {
  color: #c9d2cc;
}

.layer-system {
  overflow: hidden;
  border: 1px solid rgb(243 240 232 / 25%);
  border-radius: var(--radius-md);
}

.layer-system ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.layer-system li {
  position: relative;
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  gap: 0.85rem;
  padding: 1rem 2.8rem 1rem 1rem;
  border-bottom: 1px solid rgb(243 240 232 / 18%);
}

.layer-system li:not(:last-child)::after {
  position: absolute;
  right: 1.15rem;
  bottom: -0.6rem;
  z-index: 1;
  width: 1.2rem;
  height: 1.2rem;
  color: var(--ink);
  background: var(--copper);
  border-radius: 50%;
  content: "↓";
  font-size: 0.65rem;
  line-height: 1.2rem;
  text-align: center;
}

.layer-system span {
  color: var(--copper);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.62rem;
}

.layer-system strong,
.layer-system small {
  display: block;
}

.layer-system strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
  font-weight: 500;
}

.layer-system small {
  margin-top: 0.15rem;
  color: var(--sage);
  font-size: 0.65rem;
}

.layer-system > p {
  margin: 0;
  padding: 1rem;
  color: var(--paper);
  background: rgb(243 240 232 / 8%);
  font-size: 0.75rem;
  font-weight: 750;
  text-align: center;
}

.risk-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line-dark);
  border-left: 1px solid var(--line);
}

.risk-grid article {
  min-height: 16rem;
  padding: 1.4rem;
  background: var(--white);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.risk-grid span {
  color: var(--copper-dark);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.risk-grid h3 {
  margin: 2.5rem 0 1rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.45rem;
  font-weight: 500;
}

.risk-grid p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.efficiency-section {
  background: var(--paper-deep);
}

.efficiency-grid {
  align-items: start;
}

.efficiency-flow {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 2rem;
}

.efficiency-flow strong {
  flex: 1;
  padding: 1rem;
  text-align: center;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
}

.efficiency-flow span {
  color: var(--copper-dark);
}

.efficiency-grid > div:last-child > p {
  margin: 0;
  color: var(--ink-soft);
}

.how-section .button {
  margin-top: 2rem;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line-dark);
  list-style: none;
}

.steps-grid li {
  min-height: 19rem;
  padding: 1.5rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.steps-grid li:first-child {
  border-left: 1px solid var(--line);
}

.steps-grid h3 {
  margin: 4rem 0 1rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.7rem;
  font-weight: 500;
}

.steps-grid p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.template-preview-section {
  background: var(--paper-deep);
}

.template-preview-heading {
  display: flex;
  gap: 2rem;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.template-preview-heading .text-link {
  flex: 0 0 auto;
}

.home-template-grid {
  padding-top: 0;
}

.home-template-grid .template-card {
  min-height: 31rem;
}

.home-template-grid .card-body {
  padding-top: 3rem;
}

.home-final {
  padding-block: clamp(4rem, 7vw, 6rem);
}

.final-grid {
  align-items: end;
}

.final-grid h2 {
  margin-bottom: 0;
}

.final-grid > div:last-child > p {
  max-width: 620px;
  margin: 0 0 1.5rem;
  font-size: 1.05rem;
}

.site-footer {
  padding-block: 1.5rem;
  color: var(--ink-soft);
  background: var(--paper);
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: flex;
  gap: 2rem;
  justify-content: space-between;
  align-items: center;
}

.footer-brand {
  display: grid;
  gap: 0.1rem;
}

.footer-brand strong {
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 800;
}

.footer-brand span {
  font-size: 0.7rem;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.25rem;
  justify-content: flex-end;
}

.site-footer nav a {
  min-height: 2.75rem;
  align-content: center;
  color: var(--ink-soft);
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
}

.site-footer nav a:hover {
  color: var(--copper-dark);
}

/* Trust pages */
.trust-main {
  min-height: calc(100vh - 12rem);
}

.trust-hero {
  max-width: 960px;
  padding-block: clamp(3.75rem, 7vw, 6.5rem) clamp(2.5rem, 5vw, 4rem);
  border-bottom: 1px solid var(--line-dark);
}

.trust-hero h1 {
  max-width: 850px;
  margin-bottom: 1.25rem;
  font-size: clamp(3.3rem, 7vw, 6rem);
}

.trust-lede {
  max-width: 760px;
  margin: 0;
  color: var(--ink-soft);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
}

.trust-content {
  max-width: 960px;
  padding-block: clamp(2.75rem, 5vw, 4.5rem);
}

.trust-content section {
  display: grid;
  grid-template-columns: minmax(180px, 0.45fr) minmax(0, 1fr);
  gap: 1.5rem 3rem;
  padding-block: 1.75rem;
  border-bottom: 1px solid var(--line);
}

.trust-content section:first-child {
  padding-top: 0;
}

.trust-content h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.65rem;
  font-weight: 500;
}

.trust-content section > p {
  grid-column: 2;
  margin: 0;
  color: var(--ink-soft);
}

.trust-content section > p + p {
  margin-top: -0.65rem;
}

.trust-content > .button {
  margin-top: 2rem;
}

.trust-content .contact-placeholder {
  padding: clamp(1.5rem, 4vw, 2.5rem);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.contact-placeholder .eyebrow {
  grid-column: 1 / -1;
}

/* 404 */
.not-found-main {
  display: grid;
  min-height: calc(100vh - 10rem);
  place-items: center;
  padding-block: clamp(3.5rem, 7vw, 6rem);
}

.not-found-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.72fr);
  gap: clamp(3rem, 8vw, 8rem);
  align-items: center;
}

.not-found-grid h1 {
  max-width: 760px;
  font-size: clamp(3.5rem, 7.5vw, 6.5rem);
}

.not-found-copy {
  max-width: 600px;
  color: var(--ink-soft);
  font-size: 1.1rem;
}

.not-found-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.disconnected-diagram {
  display: grid;
  justify-items: center;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.diagram-node {
  min-width: 8.5rem;
  padding: 0.75rem 0.9rem;
  text-align: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.diagram-node.is-root {
  color: var(--paper);
  background: var(--ink);
  border-color: var(--ink);
}

.diagram-node.is-disconnected {
  border-color: var(--copper);
  animation: disconnected-pulse 3s ease-in-out infinite;
}

.diagram-node span,
.diagram-node strong {
  display: block;
}

.diagram-node span {
  color: var(--copper-dark);
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.diagram-node.is-root span {
  color: var(--sage);
}

.diagram-node strong {
  font-size: 0.75rem;
}

.diagram-line {
  width: 1px;
  height: 2rem;
  background: var(--line-dark);
}

.diagram-row {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.diagram-row::before {
  position: absolute;
  top: -1rem;
  right: 25%;
  left: 25%;
  border-top: 1px solid var(--line-dark);
  content: "";
}

.diagram-row .diagram-node {
  position: relative;
}

.diagram-row .diagram-node::before {
  position: absolute;
  top: -1rem;
  left: 50%;
  width: 1px;
  height: 1rem;
  background: var(--line-dark);
  content: "";
}

.diagram-break {
  display: grid;
  justify-items: center;
  height: 4.5rem;
  color: var(--copper-dark);
}

.diagram-break span {
  width: 1px;
  height: 1.4rem;
  background-image: linear-gradient(var(--line-dark) 50%, transparent 50%);
  background-size: 1px 6px;
}

.diagram-break i {
  font-style: normal;
  font-weight: 800;
}

@keyframes disconnected-pulse {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

/* Library */
.library-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.65fr);
  gap: clamp(2.5rem, 8vw, 8rem);
  align-items: end;
  padding-block: clamp(3.5rem, 7vw, 6rem) clamp(2.5rem, 5vw, 4rem);
}

.library-hero h1 {
  margin: 0;
  font-size: clamp(3rem, 6.7vw, 6rem);
}

.library-hero > p {
  margin: 0 0 0.7rem;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.library-section {
  padding-bottom: clamp(4rem, 7vw, 6.5rem);
}

.library-toolbar {
  display: flex;
  gap: 2rem;
  align-items: center;
  justify-content: space-between;
  padding-block: 1.25rem;
  border-top: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line);
}

.result-count {
  flex: 0 0 auto;
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.filter-group button {
  min-height: 2.3rem;
  padding: 0.45rem 0.8rem;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 700;
}

.filter-group button:hover,
.filter-group button[aria-pressed="true"] {
  color: var(--white);
  background: var(--ink);
  border-color: var(--ink);
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  padding-top: 1rem;
}

.template-card {
  display: flex;
  min-height: 35rem;
  padding: 1.35rem;
  color: inherit;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: 0 0 0 rgb(23 34 29 / 0%);
  text-decoration: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.template-card:hover,
.template-card:focus-visible {
  border-color: var(--line-dark);
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}

.card-topline {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  justify-content: space-between;
}

.category-pill {
  display: inline-block;
  padding: 0.35rem 0.55rem;
  color: var(--copper-dark);
  background: #f7e4d9;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
}

.version {
  color: var(--ink-soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.65rem;
}

.card-body {
  padding: 4rem 0 2rem;
}

.card-body h2 {
  margin-bottom: 1rem;
  font-size: clamp(2rem, 3vw, 2.8rem);
}

.template-card:hover .card-body h2,
.template-card:focus-visible .card-body h2 {
  color: var(--copper-dark);
}

.card-body p {
  margin: 0;
  color: var(--ink-soft);
}

.card-meta {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 1rem;
  margin: auto 0 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.card-meta div,
.detail-meta div {
  min-width: 0;
}

.card-meta dt,
.detail-meta dt {
  margin-bottom: 0.2rem;
  color: var(--ink-soft);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card-meta dd,
.detail-meta dd {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 650;
  line-height: 1.4;
}

.card-link {
  display: flex;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 800;
  text-decoration: none;
}

.notice,
.loading {
  padding-block: 6rem;
}

.notice .button {
  margin-top: 1rem;
}

/* Persistent page navigation */
.detail-site-header,
.home-site-header {
  position: sticky;
  z-index: 30;
  top: 0;
}

.detail-site-header .header-inner,
.home-site-header .header-inner {
  min-height: 4rem;
}

.persistent-back-link {
  display: inline-flex;
  gap: 0.45rem;
  align-items: center;
  min-height: 2.75rem;
  white-space: nowrap;
}

.detail-hero {
  padding-block: 2rem clamp(3rem, 6vw, 5.5rem);
  color: var(--paper);
  background: var(--ink);
}

.back-link {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: clamp(3rem, 6vw, 5.5rem);
  color: var(--sage);
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
}

.back-link:hover {
  color: var(--white);
}

.detail-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem;
  align-items: start;
}

.detail-title-row h1 {
  max-width: 920px;
  margin-bottom: 1.4rem;
  font-size: clamp(3.3rem, 7.8vw, 7rem);
}

.detail-summary {
  max-width: 760px;
  margin: 0;
  color: #c9d2cc;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
}

.template-stamp {
  display: grid;
  width: 7rem;
  height: 7rem;
  place-content: center;
  text-align: center;
  border: 1px solid rgb(243 240 232 / 30%);
  border-radius: 50%;
  transform: rotate(5deg);
}

.template-stamp span {
  display: block;
  color: var(--sage);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.65rem;
}

.template-stamp strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
}

.detail-meta {
  display: grid;
  grid-template-columns: 0.5fr 0.8fr 2fr;
  gap: 2rem;
  margin: clamp(3rem, 6vw, 5rem) 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgb(243 240 232 / 25%);
}

.detail-meta dt {
  color: var(--sage);
}

.detail-meta dd {
  color: var(--white);
}

.detail-layout {
  display: grid;
  grid-template-columns: 185px minmax(0, 1fr);
  gap: clamp(3rem, 7vw, 7rem);
  align-items: start;
}

.detail-nav {
  position: sticky;
  top: 5.5rem;
  display: grid;
  gap: 0.55rem;
  padding-block: 4.5rem;
}

.detail-nav p {
  margin: 0 0 0.45rem;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.detail-nav a {
  color: var(--ink-soft);
  font-size: 0.76rem;
  text-decoration: none;
}

.detail-nav a:nth-of-type(n + 5):not(:last-child) {
  padding-left: 0.7rem;
  border-left: 1px solid var(--line);
  font-size: 0.7rem;
}

.detail-nav a:hover {
  color: var(--copper-dark);
}

.detail-content {
  min-width: 0;
}

.detail-section {
  padding-block: clamp(3.5rem, 7vw, 6rem);
  border-bottom: 1px solid var(--line);
}

.section-heading {
  max-width: 800px;
  margin-bottom: 2.5rem;
}

.section-heading > p:last-child {
  max-width: 670px;
  color: var(--ink-soft);
}

.large-copy {
  max-width: 800px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.45rem, 3vw, 2.2rem);
  letter-spacing: -0.025em;
  line-height: 1.35;
}

.platforms {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.platforms h3 {
  margin-bottom: 0.8rem;
  font-size: 0.8rem;
  text-transform: uppercase;
}

.platforms > div {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.platforms span {
  padding: 0.45rem 0.7rem;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.72rem;
}

.hierarchy {
  overflow: hidden;
  padding: clamp(1.5rem, 4vw, 3rem);
  background: var(--paper-deep);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.hierarchy-level {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.hierarchy-level + .hierarchy-level {
  padding-top: 2.8rem;
}

.hierarchy-level + .hierarchy-level::before {
  position: absolute;
  top: 0;
  left: 50%;
  width: 1px;
  height: 2rem;
  background: var(--line-dark);
  content: "";
}

.hierarchy-node {
  width: min(100%, 200px);
  padding: 0.8rem 0.9rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 15px rgb(23 34 29 / 5%);
  text-align: center;
}

.hierarchy-node.is-human {
  color: var(--white);
  background: var(--ink);
  border-color: var(--ink);
}

.hierarchy-node span {
  display: block;
  margin-bottom: 0.15rem;
  color: var(--copper-dark);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hierarchy-node.is-human span {
  color: var(--sage);
}

.hierarchy-node strong {
  display: block;
  font-size: 0.8rem;
}

.rationale {
  display: grid;
  grid-template-columns: minmax(160px, 0.5fr) minmax(0, 1fr);
  gap: 1.5rem 3rem;
  margin-top: 2rem;
  padding: 2rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.rationale h3 {
  grid-row: 1 / span 3;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.5rem;
}

.rationale p {
  margin: 0;
  color: var(--ink-soft);
}

.instruction-stack {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  margin-bottom: 1.5rem;
  padding: 1rem;
  color: var(--paper);
  background: var(--ink);
  border-radius: var(--radius-md);
}

.instruction-stack span {
  flex: 1;
  padding: 0.75rem;
  text-align: center;
  border: 1px solid rgb(243 240 232 / 24%);
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.instruction-stack i {
  color: var(--copper);
  font-style: normal;
}

.protocol-disclosures {
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.protocol-disclosures details + details {
  border-top: 1px solid var(--line);
}

.protocol-disclosures summary {
  position: relative;
  display: grid;
  grid-template-columns: minmax(180px, 0.55fr) minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  padding: 1.25rem 3.5rem 1.25rem 1.4rem;
  cursor: pointer;
  list-style: none;
}

.protocol-disclosures summary::-webkit-details-marker {
  display: none;
}

.protocol-disclosures summary::after {
  position: absolute;
  right: 1.4rem;
  width: 1.8rem;
  height: 1.8rem;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 50%;
  content: "+";
  font-size: 1rem;
  line-height: 1.65rem;
  text-align: center;
}

.protocol-disclosures details[open] summary::after {
  content: "−";
}

.protocol-disclosures summary span {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.2rem;
  font-weight: 600;
}

.protocol-disclosures summary small {
  color: var(--ink-soft);
  font-size: 0.76rem;
}

.disclosure-body {
  padding: 0 1.4rem 1.5rem;
  border-top: 1px solid var(--line);
}

.disclosure-body > p:first-child {
  max-width: 760px;
  color: var(--ink-soft);
}

.epistemic-labels,
.format-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-block: 1rem;
}

.epistemic-labels span,
.format-fields span {
  padding: 0.4rem 0.6rem;
  color: var(--copper-dark);
  background: #f7e4d9;
  border-radius: 999px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.64rem;
  font-weight: 800;
}

.constitution-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.constitution-group {
  padding: 1rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.constitution-group h4,
.split-disclosure h4 {
  margin-bottom: 0.7rem;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.rules-compact .rule-card:first-child {
  border-top: 0;
}

.handoff-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  padding: 0;
  list-style: none;
}

.handoff-fields li {
  display: grid;
  gap: 0.15rem;
  padding: 0.8rem;
  background: var(--paper);
  border-radius: var(--radius-sm);
}

.handoff-fields strong {
  color: var(--copper-dark);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.66rem;
}

.handoff-fields span {
  color: var(--ink-soft);
  font-size: 0.75rem;
}

.split-disclosure {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(180px, 0.5fr);
  gap: 2rem;
  padding-top: 1.25rem;
}

.agent-list {
  border-top: 1px solid var(--line-dark);
}

.agent-card {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr);
  gap: 1.5rem;
  padding-block: 3rem;
  border-bottom: 1px solid var(--line);
}

.agent-index {
  padding-top: 0.3rem;
  color: var(--copper-dark);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.75rem;
}

.agent-heading {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.agent-heading h3 {
  margin-bottom: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 500;
}

.agent-purpose {
  max-width: 750px;
  margin: 1rem 0 2rem;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.agent-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.agent-columns > div:only-child {
  grid-column: span 2;
}

.agent-columns h4,
.human-grid h3 {
  margin-bottom: 0.75rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.check-list,
.compact-list {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.check-list li,
.compact-list li {
  position: relative;
  padding-left: 1rem;
  color: var(--ink-soft);
  font-size: 0.8rem;
}

.check-list li::before,
.compact-list li::before {
  position: absolute;
  top: 0.72em;
  left: 0;
  width: 0.3rem;
  height: 0.3rem;
  background: var(--copper);
  border-radius: 50%;
  content: "";
}

.instruction-block {
  overflow: hidden;
  color: var(--paper);
  background: var(--ink);
  border-radius: var(--radius-md);
}

.instruction-heading {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid rgb(243 240 232 / 18%);
}

.copy-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 0.5rem;
}

.instruction-heading span {
  display: block;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.instruction-heading p {
  margin: 0.2rem 0 0;
  color: var(--sage);
  font-size: 0.7rem;
}

.copy-button {
  flex: 0 0 auto;
  min-height: 2.35rem;
  padding: 0.5rem 0.8rem;
  color: var(--paper);
  background: transparent;
  border: 1px solid rgb(243 240 232 / 35%);
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 750;
}

.copy-button:hover {
  color: var(--ink);
  background: var(--paper);
}

.copy-button.is-secondary {
  color: var(--sage);
  border-color: transparent;
}

.copy-button.is-secondary:hover {
  color: var(--paper);
  background: rgb(243 240 232 / 10%);
}

.copy-button[data-state="success"] {
  color: var(--white);
  background: var(--success);
  border-color: var(--success);
}

.copy-button[data-state="error"] {
  color: var(--white);
  background: var(--error);
  border-color: var(--error);
}

.instruction-block pre {
  max-height: 26rem;
  margin: 0;
  padding: 1.3rem;
  overflow: auto;
  color: #e5eae6;
  white-space: pre-wrap;
  word-break: break-word;
}

.instruction-block code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.78rem;
  line-height: 1.75;
}

.rules-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.rules-layout > div {
  padding: 1.5rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.rules-layout > div > h3 {
  margin-bottom: 2rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.5rem;
}

.rule-card {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: 0.7rem;
  padding-block: 1rem;
  border-top: 1px solid var(--line);
}

.rule-card > span {
  color: var(--copper-dark);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.65rem;
}

.rule-card h3 {
  margin-bottom: 0.35rem;
  font-family: inherit;
  font-size: 0.88rem;
}

.rule-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.human-card {
  padding: clamp(1.8rem, 5vw, 4rem);
  color: var(--paper);
  background: var(--ink);
  border-radius: var(--radius-lg);
}

.human-card h2 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
}

.human-card .large-copy {
  color: #c9d2cc;
}

.human-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgb(243 240 232 / 20%);
}

.human-grid h3 {
  color: var(--sage);
}

.human-grid li {
  color: var(--paper);
}

@media (max-width: 980px) {
  .home-hero-grid,
  .problem-grid,
  .organization-grid,
  .difference-grid,
  .efficiency-grid,
  .final-grid,
  .not-found-grid {
    grid-template-columns: 1fr;
  }

  .home-intro {
    min-height: auto;
  }

  .hero-system {
    width: min(100%, 680px);
  }

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

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

  .template-card:last-child {
    grid-column: span 2;
    min-height: 28rem;
  }

  .detail-layout {
    grid-template-columns: 1fr;
  }

  .detail-nav {
    display: none;
  }
}

@media (max-width: 760px) {
  .shell {
    width: min(calc(100% - 1.5rem), var(--shell));
  }

  .header-inner {
    min-height: 4.35rem;
  }

  .brand-mark {
    width: 1.9rem;
    height: 1.9rem;
  }

  .site-header nav {
    gap: 0.8rem;
  }

  .home-intro {
    min-height: auto;
    padding-block: 3.5rem;
  }

  .home-hero-copy h1 {
    font-size: clamp(3.3rem, 12vw, 5.5rem);
  }

  .home-actions,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .home-actions .button {
    width: 100%;
  }

  .proof-grid,
  .library-hero,
  .detail-title-row {
    grid-template-columns: 1fr;
  }

  .prompt-comparison,
  .choice-grid,
  .risk-grid,
  .steps-grid {
    grid-template-columns: 1fr;
  }

  .prompt-card {
    min-height: auto;
  }

  .prompt-card-label {
    margin-bottom: 1.5rem;
  }

  .comparison-arrow {
    transform: rotate(90deg);
  }

  .org-specialists {
    position: relative;
    grid-template-columns: 1fr;
    gap: 0.65rem;
    margin-left: 1rem;
    padding-left: 1.5rem;
    border-left: 1px solid var(--line-dark);
  }

  .org-tree-lines {
    display: none;
  }

  .org-specialists .org-role {
    position: relative;
    text-align: left;
  }

  .org-specialists .org-role::before {
    position: absolute;
    top: 50%;
    left: -1.55rem;
    width: 1.5rem;
    border-top: 1px solid var(--line-dark);
    content: "";
  }

  .choice-grid article + article {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .risk-grid article {
    min-height: auto;
  }

  .efficiency-flow {
    align-items: stretch;
    flex-direction: column;
  }

  .efficiency-flow span {
    text-align: center;
    transform: rotate(90deg);
  }

  .steps-grid li {
    min-height: auto;
    border-left: 1px solid var(--line);
  }

  .steps-grid h3 {
    margin-top: 2rem;
  }

  .template-preview-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .trust-content section {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    padding-block: 1.5rem;
  }

  .trust-content section > p {
    grid-column: auto;
  }

  .trust-content section > p + p {
    margin-top: 0;
  }

  .site-footer nav {
    justify-content: flex-start;
  }

  .not-found-actions,
  .not-found-actions .button {
    width: 100%;
  }

  .not-found-actions {
    flex-direction: column;
  }

  .library-hero {
    padding-block: 3rem 2.5rem;
  }

  .library-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .filter-group {
    width: 100%;
    justify-content: flex-start;
  }

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

  .template-card,
  .template-card:last-child {
    grid-column: auto;
    min-height: 30rem;
  }

  .card-body {
    padding-top: 3rem;
  }

  .template-stamp {
    width: 5.5rem;
    height: 5.5rem;
    order: -1;
  }

  .detail-title-row h1 {
    font-size: clamp(3rem, 15vw, 5rem);
  }

  .detail-meta {
    grid-template-columns: 1fr 1fr;
  }

  .detail-meta div:last-child {
    grid-column: span 2;
  }

  .rationale,
  .agent-columns,
  .rules-layout,
  .human-grid,
  .constitution-grid,
  .handoff-fields,
  .split-disclosure {
    grid-template-columns: 1fr;
  }

  .instruction-stack {
    align-items: stretch;
    flex-direction: column;
  }

  .instruction-stack i {
    text-align: center;
    transform: rotate(90deg);
  }

  .protocol-disclosures summary {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .rationale h3,
  .agent-columns > div:only-child {
    grid-row: auto;
    grid-column: auto;
  }

  .agent-card {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .instruction-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .copy-actions,
  .copy-button {
    width: 100%;
  }

  .copy-actions {
    flex-direction: column;
  }
}

@media (max-width: 430px) {
  .site-header nav a {
    font-size: 0.78rem;
  }

  .brand {
    gap: 0.45rem;
    font-size: 0.9rem;
  }

  h1 {
    font-size: 2.9rem;
  }

  .home-hero-copy h1 {
    font-size: 2.85rem;
  }

  .home-intro h1 br,
  .library-hero h1 br {
    display: none;
  }

  .filter-group {
    flex-wrap: nowrap;
    padding-bottom: 0.5rem;
    overflow-x: auto;
  }

  .filter-group button {
    flex: 0 0 auto;
  }

  .card-meta,
  .detail-meta {
    grid-template-columns: 1fr;
  }

  .detail-meta div:last-child {
    grid-column: auto;
  }

  .hierarchy {
    padding: 1.2rem 0.8rem;
  }

  .hierarchy-node {
    width: 100%;
  }

  .org-specialists {
    margin-left: 0.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
