:root {
  --ink: #171611;
  --paper: #f2eddf;
  --paper-deep: #e5dcc7;
  --acid: #d9f36a;
  --rust: #a6462e;
  --muted: #676153;
  --line: rgba(23, 22, 17, 0.22);
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .16;
  background-image: radial-gradient(rgba(23,22,17,.35) .55px, transparent .55px);
  background-size: 5px 5px;
}
a { color: inherit; }
button, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--rust); outline-offset: 4px; }
.skip-link {
  position: fixed; top: .75rem; left: .75rem; z-index: 50;
  padding: .7rem 1rem; background: var(--acid); color: var(--ink);
  transform: translateY(-180%); transition: transform .2s ease;
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  width: min(calc(100% - 2rem), var(--max));
  margin: 0 auto;
  min-height: 78px;
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
  border-bottom: 1px solid var(--line);
}
.parent-link { display: inline-flex; align-items: center; gap: .7rem; font-size: .78rem; font-weight: 800; letter-spacing: .16em; text-decoration: none; }
.parent-mark { display: grid; place-items: center; width: 2rem; height: 2rem; background: var(--ink); color: var(--paper); border-radius: 50%; font-family: Georgia, serif; font-style: italic; font-size: 1.1rem; }
nav { display: flex; align-items: center; gap: 1.4rem; }
nav a { font-size: .78rem; text-decoration: none; border-bottom: 1px solid transparent; }
nav a:hover { border-color: currentColor; }

main > section { width: min(calc(100% - 2rem), var(--max)); margin-inline: auto; }
.hero { min-height: 670px; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, .55fr); gap: clamp(2rem, 6vw, 7rem); align-items: center; padding: clamp(5rem, 12vw, 9rem) 0; }
.eyebrow, .section-index, .micro-label { margin: 0 0 1.2rem; text-transform: uppercase; letter-spacing: .15em; font-size: .72rem; font-weight: 800; }
h1, h2, h3, p { overflow-wrap: anywhere; }
h1 { margin: 0; max-width: 900px; font-family: Georgia, "Times New Roman", serif; font-weight: 400; font-size: clamp(3.4rem, 8.3vw, 7.7rem); line-height: .88; letter-spacing: -.055em; }
h1 em { color: var(--rust); font-weight: 400; }
.lead { max-width: 660px; margin: 2rem 0 0; font-family: Georgia, serif; font-size: clamp(1.25rem, 2.5vw, 2rem); line-height: 1.3; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 2.2rem; }
.button { display: inline-flex; min-height: 47px; align-items: center; justify-content: center; padding: .75rem 1.15rem; border: 1px solid var(--ink); text-decoration: none; cursor: pointer; transition: background .2s ease, color .2s ease, transform .2s ease; }
.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--ink); color: var(--paper); }
.button-primary:hover { background: var(--rust); }
.button-quiet { background: transparent; }
.button-quiet:hover { background: var(--acid); }
.catalog-card { position: relative; padding: 1.5rem; border: 1px solid var(--ink); box-shadow: 12px 12px 0 var(--acid); transform: rotate(1.2deg); background: var(--paper); }
.catalog-card::before { content: ""; position: absolute; width: 70px; height: 18px; top: -11px; left: 50%; transform: translateX(-50%) rotate(-2deg); background: rgba(166,70,46,.45); }
.catalog-number { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .76rem; }
.catalog-card dl { margin: 2.2rem 0; border-top: 1px solid var(--line); }
.catalog-card dl div { display: grid; grid-template-columns: 90px 1fr; gap: 1rem; padding: .75rem 0; border-bottom: 1px solid var(--line); }
.catalog-card dt { color: var(--muted); font-size: .76rem; }
.catalog-card dd { margin: 0; font-weight: 700; }
.catalog-card p { margin: 0; font-size: .8rem; color: var(--muted); }

.statement, .outputs, .safety, .faq { padding: clamp(4rem, 9vw, 8rem) 0; display: grid; grid-template-columns: minmax(170px, .34fr) minmax(0, 1fr); gap: 2rem; border-top: 1px solid var(--line); }
.statement h2, .outputs h2, .safety h2, .faq h2, .closing h2 { margin: 0; font-family: Georgia, serif; font-weight: 400; font-size: clamp(2.4rem, 5vw, 4.8rem); line-height: 1; letter-spacing: -.04em; }
.statement div > p { max-width: 800px; font-size: clamp(1.15rem, 2vw, 1.5rem); }
.archive-section, .protocol { width: 100%; max-width: none; background: var(--ink); color: var(--paper); padding: clamp(4rem, 8vw, 7rem) max(1rem, calc((100vw - var(--max)) / 2)); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 2rem; margin-bottom: 3rem; }
.section-heading h2 { margin: 0; font-family: Georgia, serif; font-size: clamp(2.4rem, 5vw, 4.5rem); font-weight: 400; line-height: 1; }
.section-note { max-width: 390px; margin: 0; color: #c9c2b3; font-size: .9rem; }
.archive-grid { display: grid; grid-template-columns: minmax(280px, .8fr) minmax(0, 1.2fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.question-form { padding: 1.4rem; border: 1px solid rgba(242,237,223,.35); background: #22211a; }
.question-form > label:first-child { display: block; margin-bottom: .7rem; font-family: Georgia, serif; font-size: 1.4rem; }
textarea, select { width: 100%; color: inherit; background: transparent; border: 1px solid rgba(242,237,223,.42); border-radius: 0; }
textarea { resize: vertical; min-height: 150px; padding: 1rem; font-family: Georgia, serif; font-size: 1.2rem; }
select { min-height: 45px; padding: .55rem .7rem; }
select option { color: var(--ink); background: var(--paper); }
.field-meta { display: flex; justify-content: space-between; gap: 1rem; margin: .55rem 0 1.4rem; color: #bdb5a6; font-size: .7rem; }
.form-pair { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.form-pair label, .filter-label { font-size: .75rem; }
.form-pair select, .filter-label select { display: block; margin-top: .35rem; }
.form-actions { display: flex; align-items: center; gap: 1rem; margin-top: 1.4rem; }
.question-form .button-primary { border-color: var(--acid); background: var(--acid); color: var(--ink); }
.question-form .button-primary:hover { background: var(--paper); }
.text-button { border: 0; border-bottom: 1px solid currentColor; padding: .2rem 0; background: transparent; color: var(--paper); cursor: pointer; }
.status { min-height: 1.5em; margin: .75rem 0 0; color: var(--acid); font-size: .78rem; }
.shelf-head { display: flex; align-items: end; justify-content: space-between; gap: 1.5rem; }
.shelf h3 { margin: 0; font-family: Georgia, serif; font-size: 2rem; font-weight: 400; }
.filter-label { min-width: 160px; }
.shelf-tools { display: flex; flex-wrap: wrap; gap: .45rem; margin: 1.4rem 0; padding-bottom: 1.2rem; border-bottom: 1px solid rgba(242,237,223,.25); }
.small-button { min-height: 38px; border: 1px solid rgba(242,237,223,.45); padding: .5rem .75rem; background: transparent; color: var(--paper); cursor: pointer; }
.small-button:hover { background: var(--paper); color: var(--ink); }
.small-button.danger { margin-left: auto; color: #ffaf97; }
.empty-state { padding: 2rem; border: 1px dashed rgba(242,237,223,.3); color: #bbb3a5; font-family: Georgia, serif; font-size: 1.15rem; text-align: center; }
.question-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.question-card { position: relative; padding: 1.1rem 5.5rem 1.1rem 1.1rem; border-left: 4px solid var(--acid); background: var(--paper); color: var(--ink); transition: transform .2s ease, box-shadow .2s ease; }
.question-card.is-drawn { transform: translateX(-7px); box-shadow: 7px 7px 0 var(--acid); }
.question-card p { margin: .35rem 0 .8rem; font-family: Georgia, serif; font-size: 1.2rem; }
.card-meta { display: flex; flex-wrap: wrap; gap: .6rem; color: var(--muted); font-size: .67rem; text-transform: uppercase; letter-spacing: .08em; }
.card-actions { position: absolute; top: .85rem; right: .85rem; display: flex; gap: .3rem; }
.icon-button { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line); background: transparent; cursor: pointer; }
.icon-button:hover { background: var(--acid); }

.protocol { background: var(--rust); }
.protocol .section-note { color: #f2d9cd; }
.protocol-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid rgba(242,237,223,.35); }
.protocol-list li { display: grid; grid-template-columns: 70px 1fr; gap: 1.2rem; padding: 1.25rem 0; border-bottom: 1px solid rgba(242,237,223,.35); }
.protocol-list li > span { color: var(--acid); font-family: ui-monospace, monospace; }
.protocol-list h3 { margin: 0; font-family: Georgia, serif; font-size: 1.35rem; font-weight: 400; }
.protocol-list p { margin: .2rem 0 0; max-width: 720px; color: #f5ded5; }
.output-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 2rem; }
.output-grid article { min-height: 210px; padding: 1.4rem; background: var(--paper); }
.output-grid h3 { margin: 0 0 3rem; font-family: Georgia, serif; font-size: 1.35rem; font-weight: 400; }
.output-grid p { color: var(--muted); }
.safety { background: var(--acid); width: 100%; max-width: none; padding-inline: max(1rem, calc((100vw - var(--max)) / 2)); }
.safety-copy { max-width: 780px; font-size: 1.05rem; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { padding: 1.1rem 2.2rem 1.1rem 0; cursor: pointer; font-weight: 700; }
.faq details p { max-width: 720px; color: var(--muted); }
.closing { padding: clamp(5rem, 10vw, 9rem) 0; text-align: center; }
.closing h2 { max-width: 900px; margin-inline: auto; }
.closing > p:not(.eyebrow, .inactive-note) { max-width: 650px; margin: 1.5rem auto 0; }
.closing .hero-actions { justify-content: center; }
.inactive-note { margin-top: 1.5rem; color: var(--muted); font-size: .78rem; }
footer { width: min(calc(100% - 2rem), var(--max)); margin: 0 auto; padding: 1.5rem 0 2.5rem; display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--line); font-size: .72rem; }
footer p { margin: 0; }
footer a { font-weight: 800; }

@media (max-width: 820px) {
  nav { display: none; }
  .hero { min-height: auto; grid-template-columns: 1fr; padding-top: 4.5rem; }
  .catalog-card { max-width: 440px; margin-left: 0; }
  .statement, .outputs, .safety, .faq { grid-template-columns: 1fr; }
  .archive-grid { grid-template-columns: 1fr; }
  .section-heading { display: grid; }
  .output-grid { grid-template-columns: 1fr; }
  .output-grid article { min-height: auto; }
  .output-grid h3 { margin-bottom: 1rem; }
}
@media (max-width: 560px) {
  .site-header { min-height: 66px; }
  .hero { padding-top: 3.5rem; }
  h1 { font-size: clamp(3rem, 16vw, 4.8rem); }
  .form-pair { grid-template-columns: 1fr; }
  .field-meta, .shelf-head, footer { align-items: flex-start; flex-direction: column; }
  .filter-label { width: 100%; }
  .small-button.danger { margin-left: 0; }
  .question-card { padding-right: 1.1rem; padding-top: 4rem; }
  .card-actions { left: 1rem; right: auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
