/* OpenTendril shared static-site foundation
   Visual identity: dark base, green primary, purple/amber secondary accents.
   Typography: Inter (UI/body), JetBrains Mono (technical). */

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

:root {
  --bg: #07070b;
  --bg2: #0d0d14;
  --bg3: #13131f;
  --text: #e4e4ed;
  --text2: #9b9bb0;
  --text3: #6b6b80;
  --green: #00ff88;
  --green2: #00cc6a;
  --green-dim: rgba(0, 255, 136, 0.08);
  --purple: #8b5cf6;
  --amber: #ffaa00;
  --red: #ff4d6a;
  --border: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --shell-max: 1100px;
  --header-h: 64px;
  --focus-ring: 0 0 0 2px var(--bg), 0 0 0 4px var(--green);
  --font-ui: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--green);
  text-decoration: none;
  transition: opacity 0.2s ease, color 0.2s ease;
}

a:hover {
  opacity: 0.85;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

code,
pre,
.mono {
  font-family: var(--font-mono);
}

/* Skip link */
.skip-link {
  position: absolute;
  left: 12px;
  top: -100px;
  z-index: 1000;
  background: var(--green);
  color: var(--bg);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.9rem;
}

.skip-link:focus {
  top: 12px;
  box-shadow: var(--focus-ring);
}

/* Layout containers — one normal public content width */
.container {
  width: 100%;
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 0 24px;
}

.wide-content {
  width: 100%;
  max-width: var(--shell-max);
  margin: 0 auto;
}

/* ─── Site header / navigation ─── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  backdrop-filter: blur(16px);
  background: rgba(7, 7, 11, 0.82);
  border-bottom: 1px solid var(--border);
}

.site-header.is-scrolled {
  background: rgba(7, 7, 11, 0.97);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-h);
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  flex-shrink: 0;
}

.site-logo:hover {
  opacity: 1;
  color: var(--text);
}

.site-logo img {
  height: 32px;
  width: 32px;
  border-radius: 6px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav__list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 2px;
}

.site-nav__link,
.site-nav__toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--text2);
  font-size: 0.9rem;
  font-weight: 500;
  background: none;
  border: none;
  font-family: inherit;
  cursor: pointer;
  line-height: 1.2;
}

.site-nav__link:hover,
.site-nav__toggle:hover {
  color: var(--green);
  opacity: 1;
}

.site-nav__link[aria-current="page"] {
  color: var(--green);
}

.site-nav__link--github {
  background: var(--green);
  color: var(--bg);
  font-weight: 600;
  margin-left: 6px;
}

.site-nav__link--github:hover {
  color: var(--bg);
  opacity: 0.9;
}

/* Learn dropdown (desktop) */
.nav-dropdown {
  position: relative;
}

.nav-dropdown__menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 240px;
  padding: 8px;
  background: var(--bg2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  list-style: none;
  display: none;
  z-index: 220;
}

/* Visibility is JS-controlled via .is-open so aria-expanded stays authoritative. */
.nav-dropdown.is-open .nav-dropdown__menu {
  display: block;
}

.nav-dropdown__menu a {
  display: block;
  padding: 10px 12px;
  border-radius: 6px;
  color: var(--text2);
  font-size: 0.9rem;
  font-weight: 500;
}

.nav-dropdown__menu a:hover,
.nav-dropdown__menu a[aria-current="page"] {
  color: var(--green);
  background: var(--green-dim);
  opacity: 1;
}

.nav-dropdown__chevron {
  width: 12px;
  height: 12px;
  transition: transform 0.15s ease;
}

.nav-dropdown.is-open .nav-dropdown__chevron {
  transform: rotate(180deg);
}

/* Mobile menu button */
.nav-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: none;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  cursor: pointer;
  flex-shrink: 0;
}

.nav-menu-btn svg {
  width: 22px;
  height: 22px;
  display: block;
}

/* Mobile panel */
.mobile-nav {
  display: none;
  border-top: 1px solid var(--border);
  background: var(--bg);
  max-height: calc(100vh - var(--header-h));
  overflow-y: auto;
}

.mobile-nav.is-open {
  display: block;
}

.mobile-nav__list {
  list-style: none;
  padding: 12px 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mobile-nav__list > li > a,
.mobile-nav__list > li > button {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding: 14px 4px;
  border: none;
  border-bottom: 1px solid var(--border);
  background: none;
  color: var(--text2);
  font: inherit;
  font-size: 1.05rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.mobile-nav__list > li > a:hover,
.mobile-nav__list > li > button:hover,
.mobile-nav__list > li > a[aria-current="page"] {
  color: var(--green);
  opacity: 1;
}

.mobile-nav__sub {
  list-style: none;
  padding: 4px 0 12px 12px;
  display: none;
}

.mobile-nav__sub.is-open {
  display: block;
}

.mobile-nav__sub a {
  display: block;
  padding: 10px 4px;
  color: var(--text2);
  font-size: 0.95rem;
  font-weight: 500;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.mobile-nav__sub a:hover,
.mobile-nav__sub a[aria-current="page"] {
  color: var(--green);
  opacity: 1;
}

.mobile-nav__github {
  margin-top: 16px;
}

.mobile-nav__github a {
  display: block;
  text-align: center;
  background: var(--green);
  color: var(--bg);
  padding: 14px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  border: none !important;
}

.mobile-nav__github a:hover {
  color: var(--bg);
  opacity: 0.9;
}

@media (max-width: 860px) {
  .site-nav--desktop {
    display: none;
  }

  .nav-menu-btn {
    display: inline-flex;
  }
}

@media (min-width: 861px) {
  .mobile-nav {
    display: none !important;
  }
}

/* ─── Main / page structure ─── */
.site-main {
  flex: 1;
  padding: 48px 0 80px;
  position: relative;
  z-index: 2;
}

.page-header {
  margin-bottom: 36px;
}

.page-header__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid rgba(0, 255, 136, 0.2);
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--green);
  background: var(--green-dim);
  margin-bottom: 16px;
}

.page-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.page-header__lede {
  color: var(--text2);
  font-size: 1.05rem;
  line-height: 1.7;
}

/* Placeholder shell notice (Slice 1 only) */
.shell-placeholder {
  margin: 24px 0 40px;
  padding: 20px 22px;
  border: 1px dashed rgba(0, 255, 136, 0.25);
  border-radius: var(--radius);
  background: rgba(0, 255, 136, 0.03);
}

.shell-placeholder p {
  color: var(--text2);
  font-size: 0.95rem;
  line-height: 1.65;
}

.shell-placeholder p + p {
  margin-top: 10px;
}

.shell-placeholder strong {
  color: var(--text);
  font-weight: 600;
}

/* ─── Content primitives for later slices ─── */

/* Direct-answer / introduction block */
.direct-answer {
  margin: 0 0 36px;
  padding: 24px 26px;
  border-left: 3px solid var(--green);
  background: var(--bg2);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.direct-answer p {
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.7;
}

.direct-answer p + p {
  margin-top: 12px;
  color: var(--text2);
}

/* Wide technical content area */
.tech-panel {
  margin: 28px 0;
  padding: 24px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
}

.tech-panel pre {
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--text);
  white-space: pre-wrap;
}

/* Tables */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 24px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg2);
}

table.data-table,
table.def-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  min-width: 520px;
}

table.data-table th,
table.data-table td,
table.def-table th,
table.def-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

table.data-table th,
table.def-table th {
  color: var(--text);
  font-weight: 600;
  background: rgba(255, 255, 255, 0.02);
}

table.data-table td,
table.def-table td {
  color: var(--text2);
}

table.data-table tr:last-child td,
table.def-table tr:last-child td {
  border-bottom: none;
}

/* Automatic column allocation — no global header percentage */
table.def-table th {
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
}

/* Diagram container */
.diagram {
  margin: 28px 0;
  padding: 28px 24px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.diagram__caption {
  margin-top: 16px;
  font-size: 0.88rem;
  color: var(--text3);
  line-height: 1.55;
}

.diagram__label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 12px;
}

/* Source / evidence block */
.source-block {
  margin: 28px 0;
  padding: 18px 20px;
  border: 1px solid rgba(139, 92, 246, 0.25);
  background: rgba(139, 92, 246, 0.05);
  border-radius: var(--radius-sm);
}

.source-block__title {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 8px;
}

.source-block p,
.source-block li {
  color: var(--text2);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Source lists are intentional link stacks (no markers) */
.source-block > ul:not([class]) {
  list-style: none;
  padding: 0;
  margin: 0.5em 0 0;
}

.source-block li + li {
  margin-top: 6px;
}

/* Caution / limitation block */
.caution-block {
  margin: 28px 0;
  padding: 18px 20px;
  border: 1px solid rgba(255, 170, 0, 0.28);
  background: rgba(255, 170, 0, 0.05);
  border-radius: var(--radius-sm);
}

.caution-block__title {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 8px;
}

.caution-block p {
  color: var(--text2);
  font-size: 0.92rem;
  line-height: 1.65;
}

.caution-block p + p {
  margin-top: 0.75em;
}

/* Ordinary unclassed lists in callouts — global reset strips list padding */
.caution-block > ul:not([class]),
.caution-block > ol:not([class]) {
  margin: 1em 0;
  padding-left: 1.35em;
  color: var(--text2);
  font-size: 0.92rem;
  line-height: 1.65;
}

.caution-block > ul:not([class]) > li + li,
.caution-block > ol:not([class]) > li + li {
  margin-top: 0.45em;
}

/* Related reading */
.related-reading {
  margin: 48px 0 0;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.related-reading h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.related-reading ul {
  list-style: none;
  display: grid;
  gap: 8px;
}

.related-reading a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text2);
  font-weight: 500;
}

.related-reading a:hover {
  color: var(--green);
  opacity: 1;
}

/* CTA block */
.cta-block {
  margin: 40px 0;
  padding: 28px 24px;
  text-align: center;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.cta-block h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.cta-block p {
  color: var(--text2);
  max-width: 36rem;
  margin: 0 auto 20px;
  line-height: 1.65;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  font-family: inherit;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

.btn-primary {
  background: var(--green);
  color: var(--bg);
}

.btn-primary:hover {
  background: var(--green2);
  color: var(--bg);
  opacity: 1;
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text);
}

.btn-secondary:hover {
  border-color: var(--green);
  color: var(--green);
  opacity: 1;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ─── Footer ─── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0 48px;
  background: var(--bg);
  position: relative;
  z-index: 2;
}

.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  justify-content: center;
  margin-bottom: 20px;
}

.site-footer__nav a,
.site-footer__nav button {
  color: var(--text2);
  font-size: 0.88rem;
  font-weight: 500;
  background: none;
  border: none;
  font-family: inherit;
  cursor: pointer;
  padding: 0;
}

.site-footer__nav a:hover,
.site-footer__nav button:hover {
  color: var(--green);
  opacity: 1;
}

.site-footer__meta {
  text-align: center;
  color: var(--text3);
  font-size: 0.82rem;
  line-height: 1.6;
}

.site-footer__meta a {
  color: var(--text3);
}

.site-footer__meta a:hover {
  color: var(--text2);
  opacity: 1;
}

/* ─── Contact modal ─── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  padding: 20px;
}

.modal-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: var(--bg3);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  width: 100%;
  max-width: 440px;
  padding: 32px;
  position: relative;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text2);
  cursor: pointer;
  padding: 6px;
  border-radius: 4px;
  display: flex;
}

.modal-close:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.modal-icon {
  width: 48px;
  height: 48px;
  background: var(--green-dim);
  color: var(--green);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.modal-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: #fff;
}

.modal-subtitle {
  color: var(--text2);
  font-size: 0.95rem;
  margin-bottom: 24px;
  line-height: 1.5;
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text2);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 12px 14px;
  background: #09090b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 2px rgba(0, 255, 136, 0.1);
}

.form-control::placeholder {
  color: rgba(255, 255, 255, 0.25);
}

textarea.form-control {
  resize: vertical;
  min-height: 80px;
}

.form-status {
  margin-top: 1rem;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 500;
}

.optional-toggle {
  color: var(--green);
  font-size: 0.85rem;
  font-weight: 600;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  margin-bottom: 1.25rem;
}

.optional-toggle:hover {
  opacity: 0.85;
}

/* reCAPTCHA */
.grecaptcha-badge {
  visibility: hidden !important;
}

.recaptcha-notice {
  text-align: center;
  font-size: 0.78rem;
  color: var(--text3);
  margin-top: 16px;
  line-height: 1.5;
}

.recaptcha-notice a {
  color: var(--text2);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: #10b981;
  color: #fff;
  padding: 1rem 2rem;
  border-radius: 100px;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(16, 185, 129, 0.4);
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Ambient overlays (restrained) */
.noise-overlay {
  position: fixed;
  inset: 0;
  opacity: 0.025;
  pointer-events: none;
  z-index: 500;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* 404 layout */
.page-404 {
  min-height: calc(100vh - var(--header-h) - 160px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 24px;
}

.page-404__code {
  font-size: clamp(4.5rem, 14vw, 8rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.05em;
  background: linear-gradient(135deg, var(--green), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
}

.page-404 h1 {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.page-404 p {
  color: var(--text2);
  max-width: 400px;
  margin: 0 auto 28px;
  line-height: 1.6;
}

/* Conduct page specifics (preserve form styles) */
.conduct-page .page-wrapper {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px 40px;
}

.conduct-page .info-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 40px;
}

.conduct-page .info-card {
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg2);
  font-size: 0.92rem;
  color: var(--text2);
  line-height: 1.7;
}

.conduct-page .info-card strong {
  color: var(--text);
  font-weight: 600;
}

.conduct-page .info-card.warning {
  border-color: rgba(255, 170, 0, 0.2);
  background: rgba(255, 170, 0, 0.04);
}

.conduct-page .info-card.warning strong {
  color: var(--amber);
}

.conduct-page .info-card.security {
  border-color: rgba(139, 92, 246, 0.2);
  background: rgba(139, 92, 246, 0.04);
}

.conduct-page .info-card.security strong {
  color: var(--purple);
}

.conduct-page .form-section {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 32px;
}

.conduct-page .form-section-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.conduct-page .form-section-desc {
  font-size: 0.85rem;
  color: var(--text3);
  margin-bottom: 24px;
}

.conduct-page .required-marker {
  color: var(--red);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 100px;
  background: rgba(255, 77, 106, 0.08);
  border: 1px solid rgba(255, 77, 106, 0.15);
}

.conduct-page .optional-marker {
  color: var(--text3);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.conduct-page .form-label .req {
  color: var(--red);
  margin-left: 2px;
}

.conduct-page .form-hint {
  display: block;
  font-size: 0.78rem;
  color: var(--text3);
  margin-top: 4px;
  line-height: 1.5;
}

.conduct-page .form-group {
  margin-bottom: 20px;
}

.conduct-page .safety-check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 77, 106, 0.2);
  background: rgba(255, 77, 106, 0.03);
  cursor: pointer;
}

.conduct-page .safety-check input[type="checkbox"] {
  appearance: none;
  width: 20px;
  height: 20px;
  min-width: 20px;
  border: 2px solid rgba(255, 77, 106, 0.4);
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  margin-top: 2px;
  position: relative;
}

.conduct-page .safety-check input[type="checkbox"]:checked {
  background: var(--red);
  border-color: var(--red);
}

.conduct-page .safety-check input[type="checkbox"]:checked::after {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.conduct-page .safety-check-text {
  font-size: 0.9rem;
  color: var(--text2);
  line-height: 1.5;
}

.conduct-page .safety-check-text strong {
  color: var(--red);
  display: block;
  margin-bottom: 2px;
}

.conduct-page .toggle-btn {
  color: var(--green);
  font-size: 0.85rem;
  font-weight: 600;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 0;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
}

.conduct-page .toggle-btn svg {
  width: 14px;
  height: 14px;
  transition: transform 0.2s;
}

.conduct-page .toggle-btn.open svg {
  transform: rotate(180deg);
}

.conduct-page .privacy-notice {
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.04);
  background: var(--bg2);
  margin-bottom: 32px;
}

.conduct-page .privacy-notice h2,
.conduct-page .privacy-notice h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.conduct-page .privacy-notice ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.conduct-page .privacy-notice li {
  font-size: 0.85rem;
  color: var(--text2);
  line-height: 1.6;
  padding-left: 16px;
  position: relative;
}

.conduct-page .privacy-notice li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--purple);
  opacity: 0.5;
}

.conduct-page .confirm-state {
  display: none;
  text-align: center;
  padding: 60px 0;
}

.conduct-page .confirm-state.visible {
  display: block;
}

.conduct-page .confirm-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: rgba(0, 255, 136, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  color: var(--green);
}

.conduct-page .confirm-state h2 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.conduct-page .confirm-state p {
  color: var(--text2);
  font-size: 1rem;
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.7;
}

.conduct-page .confirm-state p + p {
  margin-top: 12px;
}

.conduct-page .btn-primary {
  width: 100%;
}

.conduct-page .page-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: 100px;
  font-size: 0.8rem;
  color: var(--purple);
  margin-bottom: 20px;
  background: rgba(139, 92, 246, 0.06);
}

.conduct-page .page-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--purple);
}

.conduct-page .highlight {
  background: linear-gradient(135deg, var(--green), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@media (max-width: 640px) {
  .site-main {
    padding: 32px 0 60px;
  }

  .container {
    padding: 0 16px;
  }

  .conduct-page .form-section {
    padding: 20px;
  }

  .conduct-page .privacy-notice {
    padding: 16px;
  }

  .diagram,
  .tech-panel {
    padding: 18px 14px;
  }
}

/* ─── Thesis / long-form page patterns (Slice 2) ─── */

.hero-thesis {
  padding: 24px 0 12px;
}

.hero-thesis h1 {
  font-size: clamp(2rem, 4.5vw, 2.85rem);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.025em;
  margin-bottom: 18px;
}

.hero-thesis .lede {
  color: var(--text2);
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  line-height: 1.7;
  margin-bottom: 28px;
}

.hero-thesis .lede strong {
  color: var(--text);
  font-weight: 600;
}

.section-block {
  margin: 48px 0;
}

.section-block > h2 {
  font-size: clamp(1.35rem, 2.5vw, 1.65rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 14px;
}

.section-block > p,
.section-block .prose p {
  color: var(--text2);
  line-height: 1.75;
}

.section-block > p + p,
.section-block .prose p + p {
  margin-top: 1em;
}

/* Ordinary prose lists only — classed component lists own their own layout */
.section-block .prose ul:not([class]),
.section-block .prose ol:not([class]) {
  margin: 1em 0;
  padding-left: 1.35em;
  color: var(--text2);
  line-height: 1.75;
}

.section-block .prose ul:not([class]) > li + li,
.section-block .prose ol:not([class]) > li + li {
  margin-top: 0.45em;
}

.section-block .prose strong {
  color: var(--text);
  font-weight: 600;
}

/* Vertical concept flow */
.flow-diagram {
  margin: 24px auto 12px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  max-width: 520px;
}

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

.flow-node {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg2);
  text-align: center;
}

.flow-node__label {
  font-weight: 600;
  color: var(--text);
  font-size: 0.98rem;
}

.flow-node__hint {
  display: block;
  margin-top: 4px;
  font-size: 0.82rem;
  color: var(--text3);
  font-family: var(--font-mono);
}

.flow-node--external {
  border-color: rgba(139, 92, 246, 0.35);
  background: rgba(139, 92, 246, 0.06);
}

.flow-node--external .flow-node__label {
  color: #c4b5fd;
}

.flow-node--core {
  border-color: rgba(0, 255, 136, 0.35);
  background: var(--green-dim);
}

.flow-node--core .flow-node__label {
  color: var(--green);
}

.flow-node--human {
  border-color: rgba(255, 170, 0, 0.35);
  background: rgba(255, 170, 0, 0.06);
}

.flow-node--human .flow-node__label {
  color: var(--amber);
}

.flow-arrow {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 28px;
  color: var(--text3);
  font-size: 1.1rem;
  line-height: 1;
  user-select: none;
}

/* Paradox triad */
.paradox-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 24px 0 12px;
}

@media (max-width: 720px) {
  .paradox-grid {
    grid-template-columns: 1fr;
  }
}

.paradox-card {
  padding: 20px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg2);
}

.paradox-card h3 {
  font-size: 1rem;
  font-weight: 650;
  margin-bottom: 10px;
  color: var(--text);
}

.paradox-card p {
  color: var(--text2);
  font-size: 0.92rem;
  line-height: 1.6;
  margin: 0;
}

.paradox-card--bad {
  border-color: rgba(255, 77, 106, 0.22);
}

.paradox-card--alt {
  border-color: rgba(0, 255, 136, 0.28);
  background: rgba(0, 255, 136, 0.04);
}

.paradox-card__path {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text3);
  margin-bottom: 10px;
  display: block;
}

/* Term list (minimal taxonomy) — uses shell width */
.term-list {
  list-style: none;
  padding: 0;
  margin: 1em 0;
  display: grid;
  gap: 10px;
}

.term-list li {
  display: grid;
  grid-template-columns: minmax(110px, 140px) 1fr;
  gap: 12px 16px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg2);
  align-items: baseline;
}

@media (max-width: 520px) {
  .term-list li {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

.term-list dt,
.term-list .term {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--green);
}

.term-list .def {
  color: var(--text2);
  font-size: 0.92rem;
  line-height: 1.55;
}

/* Autonomy vs authority visual */
.axis-diagram {
  margin: 24px 0 12px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg2);
}

.axis-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

@media (max-width: 640px) {
  .axis-pair {
    grid-template-columns: 1fr;
  }
}

.axis-card {
  padding: 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
}

.axis-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.axis-card p {
  color: var(--text2);
  font-size: 0.92rem;
  line-height: 1.6;
  margin: 0;
}

.axis-card--autonomy {
  border-color: rgba(139, 92, 246, 0.3);
}

.axis-card--autonomy h3 {
  color: #c4b5fd;
}

.axis-card--authority {
  border-color: rgba(255, 170, 0, 0.3);
}

.axis-card--authority h3 {
  color: var(--amber);
}

.axis-insight {
  padding: 14px 16px;
  border-left: 3px solid var(--green);
  background: var(--green-dim);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text);
  font-size: 0.98rem;
  line-height: 1.55;
  font-weight: 500;
}

/* Control matrix */
.control-matrix .table-wrap {
  margin-top: 16px;
}

/* Hypothesis callout */
.hypothesis-block {
  margin: 20px 0;
  padding: 22px 24px;
  border: 1px solid rgba(139, 92, 246, 0.3);
  background: rgba(139, 92, 246, 0.06);
  border-radius: var(--radius);
}

.hypothesis-block__label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 10px;
}

.hypothesis-block p {
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.7;
  margin: 0;
}

/* Results reporting structure (not data) */
.report-format {
  margin: 20px 0;
  padding: 20px 22px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: var(--bg2);
}

.report-format__note {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 14px;
}

.report-format dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.report-format .row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}

.report-format .row:last-child {
  border-bottom: none;
}

.report-format dt {
  color: var(--text2);
  font-size: 0.92rem;
}

.report-format dd {
  color: var(--text3);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  margin: 0;
}

.report-format .row--separate {
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 170, 0, 0.25);
  border-bottom: none;
}

.report-format .row--separate dt {
  color: var(--amber);
  font-weight: 600;
}

/* Explore cards */
.explore-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 14px;
  margin-top: 20px;
}

.explore-card {
  display: block;
  padding: 18px 18px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg2);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.explore-card:hover {
  border-color: rgba(0, 255, 136, 0.3);
  background: rgba(0, 255, 136, 0.04);
  opacity: 1;
  color: var(--text);
}

.explore-card__title {
  font-weight: 650;
  font-size: 1rem;
  margin-bottom: 6px;
  color: var(--green);
}

.explore-card__desc {
  font-size: 0.88rem;
  color: var(--text2);
  line-height: 1.5;
}

/* Side-by-side compare for prompt vs environment */
.compare-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 20px 0;
}

@media (max-width: 640px) {
  .compare-pair {
    grid-template-columns: 1fr;
  }
}

.compare-card {
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg2);
}

.compare-card h3 {
  font-size: 0.85rem;
  font-weight: 650;
  margin-bottom: 8px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.compare-card p {
  color: var(--text);
  font-size: 0.98rem;
  line-height: 1.55;
  margin: 0;
  font-family: var(--font-mono);
}

.compare-card--soft {
  border-color: rgba(255, 170, 0, 0.25);
}

.compare-card--hard {
  border-color: rgba(0, 255, 136, 0.3);
}

/* Inline figcaption styling */
.diagram__caption strong {
  color: var(--text2);
  font-weight: 600;
}

.wide-breakout {
  max-width: var(--shell-max);
  margin-left: auto;
  margin-right: auto;
}

.site-main--thesis {
  padding-top: 36px;
}

@media (max-width: 640px) {
  .site-main--thesis {
    padding-top: 24px;
  }

  .axis-diagram {
    padding: 16px;
  }
}

/* Source metadata next to external links */
.source-meta {
  color: var(--text3);
  font-size: 0.85rem;
}

/* Formula / equation callout */
.formula-line {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--green);
  padding: 14px 18px;
  border: 1px solid rgba(0, 255, 136, 0.22);
  background: var(--green-dim);
  border-radius: var(--radius-sm);
  line-height: 1.55;
}

/* Compare card secondary note */
.compare-card__note {
  margin-top: 10px !important;
  font-family: var(--font-ui) !important;
  font-size: 0.85rem !important;
  color: var(--text3) !important;
  line-height: 1.5 !important;
}

/* Containment dimension cards */
.dimension-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 12px;
  margin: 20px 0;
}

.dimension-card {
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg2);
}

.dimension-card h3 {
  font-size: 0.92rem;
  font-weight: 650;
  color: var(--green);
  margin-bottom: 8px;
  font-family: var(--font-mono);
}

.dimension-card p {
  margin: 0;
  color: var(--text2);
  font-size: 0.9rem;
  line-height: 1.55;
}

/* Body vs boundary (Terrarium / Sprout) */
.body-boundary {
  display: flex;
  justify-content: center;
  margin: 8px 0;
}

.body-boundary__outer {
  width: min(100%, 360px);
  padding: 20px 18px 18px;
  border: 2px dashed rgba(0, 255, 136, 0.35);
  border-radius: var(--radius);
  background: rgba(0, 255, 136, 0.03);
  text-align: center;
}

.body-boundary__label {
  display: block;
  font-weight: 700;
  color: var(--green);
  font-size: 1rem;
}

.body-boundary__hint {
  display: block;
  font-size: 0.8rem;
  color: var(--text3);
  font-family: var(--font-mono);
  margin-top: 2px;
}

.body-boundary__inner {
  margin-top: 14px;
  padding: 16px 14px;
  border: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: var(--radius-sm);
  background: rgba(139, 92, 246, 0.08);
}

.body-boundary__sprout {
  display: block;
  font-weight: 650;
  color: #c4b5fd;
  font-size: 0.98rem;
}

/* Stacked boundary path diagram */
.boundary-stack {
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.boundary-stack__layer {
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg2);
  text-align: center;
  font-size: 0.92rem;
  font-weight: 550;
  color: var(--text);
}

.boundary-stack__layer--external {
  border-color: rgba(139, 92, 246, 0.35);
  background: rgba(139, 92, 246, 0.06);
  color: #c4b5fd;
}

.boundary-stack__layer--core {
  border-color: rgba(0, 255, 136, 0.35);
  background: var(--green-dim);
  color: var(--green);
}

.boundary-stack__arrow {
  display: flex;
  justify-content: center;
  height: 22px;
  align-items: center;
  color: var(--text3);
  font-size: 1rem;
  user-select: none;
}

.boundary-stack__box {
  padding: 16px 16px 14px;
  border: 2px solid rgba(0, 255, 136, 0.3);
  border-radius: var(--radius);
  background: rgba(0, 255, 136, 0.04);
}

.boundary-stack__box-title {
  text-align: center;
  font-weight: 700;
  color: var(--green);
  margin-bottom: 10px;
  font-size: 0.95rem;
}

.boundary-stack__dims {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

@media (max-width: 390px) {
  .boundary-stack__dims {
    grid-template-columns: 1fr;
  }
}

.boundary-stack__dims li {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text2);
}

.flow-diagram--wide {
  max-width: 560px;
}

@media (max-width: 640px) {
  .table-wrap table.def-table {
    font-size: 0.88rem;
  }

  .table-wrap table.def-table th,
  .table-wrap table.def-table td {
    padding: 10px 12px;
  }
}


/* ===== Slice 4 — human-control boundary diagrams ===== */

/* Four human controls */
.control-quad {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 20px auto 12px;
  max-width: 640px;
}

@media (max-width: 520px) {
  .control-quad {
    grid-template-columns: 1fr;
  }
}

.control-quad__card {
  padding: 16px 16px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg2);
}

.control-quad__card h3 {
  font-size: 0.98rem;
  font-weight: 650;
  color: var(--text);
  margin: 0 0 6px;
}

.control-quad__card p {
  margin: 0;
  color: var(--text2);
  font-size: 0.9rem;
  line-height: 1.55;
}

.control-quad__card--observe {
  border-color: rgba(0, 255, 136, 0.3);
  background: rgba(0, 255, 136, 0.04);
}

.control-quad__card--observe h3 {
  color: var(--green);
}

.control-quad__card--accept {
  border-color: rgba(255, 170, 0, 0.3);
  background: rgba(255, 170, 0, 0.05);
}

.control-quad__card--accept h3 {
  color: var(--amber);
}

.control-quad__verb {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text3);
  margin-bottom: 8px;
}

/* Independent observation lane — vertical centred stack */
.obs-lane {
  margin: 20px auto 12px;
  padding: 20px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg2);
  max-width: 640px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.obs-lane__exec {
  padding: 14px 16px;
  border: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: var(--radius-sm);
  background: rgba(139, 92, 246, 0.06);
  text-align: center;
}

.obs-lane__exec-label {
  display: block;
  font-weight: 650;
  color: #c4b5fd;
  font-size: 0.98rem;
}

.obs-lane__exec-hint {
  display: block;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text3);
}

/* Centred connector between execution and observer */
.obs-lane__connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text3);
  font-size: 0.85rem;
  user-select: none;
  padding: 8px 0 6px;
}

.obs-lane__connector span {
  line-height: 1.15;
}

.obs-lane__observer {
  padding: 14px 16px;
  border: 1px solid rgba(0, 255, 136, 0.35);
  border-radius: var(--radius-sm);
  background: var(--green-dim);
  text-align: center;
}

.obs-lane__observer-label {
  display: block;
  font-weight: 650;
  color: var(--green);
  font-size: 0.95rem;
}

.obs-lane__observer-hint {
  display: block;
  margin-top: 4px;
  font-size: 0.85rem;
  color: var(--text2);
  line-height: 1.5;
}

.obs-lane__continues {
  margin-top: 14px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text3);
}

.obs-lane__handoff {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  max-width: 280px;
  margin-left: auto;
  margin-right: auto;
}

.obs-lane__handoff .flow-node {
  width: 100%;
}

/* Accept / reject fork */
.accept-fork {
  margin: 20px auto 12px;
  max-width: 420px;
}

.accept-fork__split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 4px;
}

.accept-fork__choice {
  padding: 14px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg2);
  text-align: center;
}

.accept-fork__choice--yes {
  border-color: rgba(0, 255, 136, 0.35);
  background: rgba(0, 255, 136, 0.05);
  color: var(--green);
  font-weight: 650;
}

.accept-fork__choice--no {
  border-color: rgba(255, 77, 106, 0.28);
  background: rgba(255, 77, 106, 0.05);
  color: #ff8fa3;
  font-weight: 650;
}

.accept-fork__choice span {
  display: block;
  margin-top: 4px;
  font-weight: 400;
  font-size: 0.8rem;
  color: var(--text3);
  font-family: var(--font-mono);
}

/* Two boundaries (runtime vs acceptance) */
.two-boundary {
  margin: 20px auto 12px;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
}

.two-boundary__box {
  padding: 16px 18px;
  border-radius: var(--radius);
  text-align: center;
}

.two-boundary__box--runtime {
  border: 2px solid rgba(0, 255, 136, 0.35);
  background: rgba(0, 255, 136, 0.05);
}

.two-boundary__box--accept {
  border: 2px solid rgba(255, 170, 0, 0.4);
  background: rgba(255, 170, 0, 0.06);
}

.two-boundary__title {
  display: block;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 4px;
}

.two-boundary__box--runtime .two-boundary__title {
  color: var(--green);
}

.two-boundary__box--accept .two-boundary__title {
  color: var(--amber);
}

.two-boundary__sub {
  display: block;
  font-size: 0.88rem;
  color: var(--text2);
  line-height: 1.5;
}

.two-boundary__mid {
  text-align: center;
  padding: 10px 12px;
  font-size: 0.88rem;
  color: var(--text2);
}

.two-boundary__arrow {
  display: flex;
  justify-content: center;
  height: 24px;
  align-items: center;
  color: var(--text3);
  user-select: none;
}

/* Ladder of separately grantable ops — uses shell width */
.grant-ladder {
  list-style: none;
  padding: 0;
  margin: 1em 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.grant-ladder li {
  display: grid;
  grid-template-columns: minmax(110px, 140px) 1fr;
  gap: 10px 14px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg2);
  align-items: baseline;
}

@media (max-width: 520px) {
  .grant-ladder li {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

.grant-ladder .op {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--green);
}

.grant-ladder .op-def {
  color: var(--text2);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* ===== Slice 5 — architecture / taxonomy / docs ===== */

/* Five concerns list — uses shell width */
.concern-list {
  list-style: none;
  padding: 0;
  margin: 1em 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.concern-list li {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg2);
  align-items: start;
}

.concern-list__n {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--green-dim);
  border: 1px solid rgba(0, 255, 136, 0.3);
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
}

.concern-list h3 {
  font-size: 1rem;
  font-weight: 650;
  color: var(--text);
  margin: 0 0 4px;
}

.concern-list p {
  margin: 0;
  color: var(--text2);
  font-size: 0.92rem;
  line-height: 1.55;
}

/* Trust architecture diagram */
.trust-arch {
  max-width: 720px;
  margin: 0 auto;
}

.trust-arch__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.trust-arch__split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.trust-arch__branch {
  display: flex;
  flex-direction: column;
}

.trust-arch__zone {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg2);
  text-align: center;
}

.trust-arch__zone-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 6px;
}

.trust-arch__term {
  display: block;
  font-weight: 650;
  font-size: 0.98rem;
  color: var(--text);
}

.trust-arch__hint {
  display: block;
  margin-top: 4px;
  font-size: 0.82rem;
  color: var(--text3);
  line-height: 1.45;
}

.trust-arch__zone--external {
  border-color: rgba(139, 92, 246, 0.35);
  background: rgba(139, 92, 246, 0.06);
}

.trust-arch__zone--external .trust-arch__term {
  color: #c4b5fd;
}

.trust-arch__zone--identity {
  border-color: rgba(139, 92, 246, 0.25);
  background: rgba(139, 92, 246, 0.04);
}

.trust-arch__zone--core {
  border-color: rgba(0, 255, 136, 0.35);
  background: var(--green-dim);
}

.trust-arch__zone--core .trust-arch__term {
  color: var(--green);
}

.trust-arch__zone--exec {
  border-color: var(--border-strong);
  background: var(--bg3);
}

.trust-arch__zone--observe {
  border-color: rgba(0, 255, 136, 0.28);
  background: rgba(0, 255, 136, 0.04);
}

.trust-arch__zone--human {
  border-color: rgba(255, 170, 0, 0.35);
  background: rgba(255, 170, 0, 0.06);
}

.trust-arch__zone--human .trust-arch__term {
  color: var(--amber);
}

.trust-arch__arrow {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 28px;
  color: var(--text3);
  font-size: 1.1rem;
  user-select: none;
}

@media (max-width: 560px) {
  .trust-arch__row,
  .trust-arch__split {
    grid-template-columns: 1fr;
  }
}

/* Interface parity fan-in */
.parity-fan {
  max-width: 480px;
  margin: 0 auto;
  text-align: center;
}

.parity-fan__sources {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.parity-fan__src {
  padding: 12px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg2);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.parity-fan__arrow {
  margin: 12px 0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text3);
}

.parity-fan__core {
  padding: 16px 18px;
  border: 1px solid rgba(0, 255, 136, 0.35);
  border-radius: var(--radius-sm);
  background: var(--green-dim);
}

.parity-fan__core-label {
  display: block;
  font-weight: 650;
  color: var(--green);
  font-size: 0.98rem;
}

.parity-fan__core-hint {
  display: block;
  margin-top: 4px;
  font-size: 0.82rem;
  color: var(--text3);
  font-family: var(--font-mono);
}

.parity-fan__view {
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-sm);
  background: var(--bg2);
}

.parity-fan__view-label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text2);
}

.parity-fan__view-hint {
  display: block;
  margin-top: 4px;
  font-size: 0.82rem;
  color: var(--text3);
  line-height: 1.45;
}

@media (max-width: 420px) {
  .parity-fan__sources {
    grid-template-columns: 1fr;
  }
}

/* Agent decomposition */
.agent-decomp {
  max-width: 520px;
  margin: 0 auto;
}

.agent-decomp__root {
  padding: 14px 18px;
  border: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: var(--radius-sm);
  background: rgba(139, 92, 246, 0.06);
  text-align: center;
}

.agent-decomp__root-label {
  font-weight: 650;
  color: #c4b5fd;
  font-size: 1rem;
}

.agent-decomp__arrow {
  text-align: center;
  margin: 12px 0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text3);
}

.agent-decomp__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.agent-decomp__list li {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(140px, 1.1fr);
  gap: 10px 14px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg2);
  align-items: baseline;
}

.agent-decomp__role {
  font-size: 0.88rem;
  color: var(--text2);
}

.agent-decomp__term {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--green);
}

@media (max-width: 480px) {
  .agent-decomp__list li {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

/* Organism map */
.organism-map {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.organism-map__band {
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg2);
}

.organism-map__band--external {
  border-color: rgba(139, 92, 246, 0.3);
  background: rgba(139, 92, 246, 0.05);
}

.organism-map__band--core {
  border-color: rgba(0, 255, 136, 0.3);
  background: var(--green-dim);
}

.organism-map__band--human {
  border-color: rgba(255, 170, 0, 0.3);
  background: rgba(255, 170, 0, 0.05);
}

.organism-map__band-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 10px;
}

.organism-map__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.organism-map__chips span {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--bg);
  font-size: 0.88rem;
  color: var(--text);
  font-weight: 500;
}

.organism-map__chip--external {
  border-color: rgba(139, 92, 246, 0.4) !important;
  color: #c4b5fd !important;
}

.organism-map__arrow {
  display: flex;
  justify-content: center;
  height: 24px;
  align-items: center;
  color: var(--text3);
  user-select: none;
}

.organism-map__split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 4px 0;
}

.organism-map__col {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg2);
}

@media (max-width: 560px) {
  .organism-map__split {
    grid-template-columns: 1fr;
  }
}

/* Taxonomy term table anchors */
.term-table tr[id] {
  scroll-margin-top: calc(var(--header-h) + 16px);
}

.term-table th[scope="row"] {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--green);
}

table.term-table {
  min-width: 720px;
}

table.term-table th:first-child,
table.term-table td:first-child {
  min-width: 140px;
}

/* Non-conflation list */
.non-conflation {
  list-style: none;
  padding: 0;
  margin: 1em 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.non-conflation li {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg2);
  color: var(--text2);
  font-size: 0.94rem;
  line-height: 1.55;
}

.non-conflation strong {
  color: var(--text);
  font-weight: 600;
}

/* Docs recommended path — uses shell width */
.docs-path {
  list-style: none;
  padding: 0;
  margin: 1em 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.docs-path > li {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 14px;
  padding: 18px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg2);
  align-items: start;
}

.docs-path__n {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--green-dim);
  border: 1px solid rgba(0, 255, 136, 0.3);
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
}

.docs-path h3 {
  font-size: 1.02rem;
  font-weight: 650;
  color: var(--text);
  margin: 0 0 6px;
}

.docs-path p {
  margin: 0;
  color: var(--text2);
  font-size: 0.92rem;
  line-height: 1.55;
}

.direct-answer .btn {
  margin-top: 8px;
  display: inline-flex;
}
