:root {
  --paper: #edefea;
  --ink: #1c2726;
  --ink-soft: #46524f;
  --moss: #2f4d40;
  --fog: #c8d0ca;
  --night: #15201f;
  --night-line: #2c3b39;
  --night-text: #e4e9e3;
  --night-soft: #9fb0aa;
  --brass: #c9a66b;
  --display: "Gloock", Georgia, serif;
  --body: "Public Sans", system-ui, sans-serif;
  --measure: 66ch;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
}

a { color: var(--moss); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; border-radius: 2px; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 24px; }

/* Header */
.site-head { padding: 28px 0 0; }
.site-head .wrap { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.wordmark { font-family: var(--display); font-size: 1.35rem; color: var(--ink); text-decoration: none; }
.site-nav { display: flex; gap: 22px; flex-wrap: wrap; }
.site-nav a { color: var(--ink-soft); text-decoration: none; font-size: 0.97rem; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; }

/* Hero */
.hero { padding: 72px 0 40px; }
.hero h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.6rem, 6.4vw, 4.9rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin: 0 0 28px;
  max-width: 15ch;
}
.portrait { display: block; width: 128px; height: 128px; border-radius: 50%; object-fit: cover; margin: 0 0 28px; }
.onset { display: block; width: 100%; height: auto; border-radius: 6px; margin: 0 0 28px; }
.lede { font-size: 1.22rem; line-height: 1.55; max-width: 52ch; margin: 0; color: var(--ink); }
.lede + .lede { margin-top: 14px; color: var(--ink-soft); }

/* Agent panel: the one bold element */
.agent {
  background: var(--night);
  color: var(--night-text);
  border-radius: 6px;
  padding: 28px 28px 22px;
  margin: 8px 0 72px;
}
.agent-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.agent-head h2 { font-family: var(--display); font-weight: 400; font-size: 1.6rem; margin: 0; }
.agent-note { font-size: 0.88rem; color: var(--night-soft); margin: 0; }
.agent-log { display: flex; flex-direction: column; gap: 14px; max-height: 420px; overflow-y: auto; padding-right: 4px; margin-bottom: 18px; }
.msg { max-width: 62ch; line-height: 1.55; }
.msg p { margin: 0 0 8px; }
.msg p:last-child { margin-bottom: 0; }
.msg.bot { color: var(--night-text); }
.msg.you { align-self: flex-end; background: var(--night-line); padding: 10px 14px; border-radius: 6px; }
.msg a { color: var(--brass); }
.msg.thinking { color: var(--night-soft); }
.starters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.starters button {
  font: inherit; font-size: 0.92rem;
  background: transparent; color: var(--night-text);
  border: 1px solid var(--night-line); border-radius: 999px;
  padding: 7px 14px; cursor: pointer;
}
.starters button:hover { border-color: var(--brass); }
.agent-form { display: flex; gap: 10px; }
.agent-form input {
  flex: 1; min-width: 0;
  font: inherit; color: var(--night-text);
  background: #1d2a29; border: 1px solid var(--night-line); border-radius: 4px;
  padding: 12px 14px;
}
.agent-form input::placeholder { color: var(--night-soft); }
.agent-form button {
  font: inherit; font-weight: 600;
  background: var(--brass); color: var(--night);
  border: 0; border-radius: 4px; padding: 0 20px; cursor: pointer;
}
.agent-form button:disabled { opacity: 0.55; cursor: default; }

/* Content sections */
section.block { padding: 8px 0 64px; }
section.block > h2 {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(1.7rem, 3.2vw, 2.3rem); line-height: 1.15;
  margin: 0 0 18px; max-width: 26ch;
}
.prose { max-width: var(--measure); }
.prose p { margin: 0 0 16px; }
.prose h3 { font-size: 1.08rem; margin: 30px 0 8px; }
.prose ul { padding-left: 20px; margin: 0 0 16px; }
.prose li { margin-bottom: 6px; }

blockquote.said {
  margin: 28px 0; padding: 4px 0 4px 22px;
  border-left: 3px solid var(--brass);
  font-family: var(--display); font-size: 1.45rem; line-height: 1.35;
  max-width: 40ch;
}

/* Two doors */
.doors { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-top: 1px solid var(--fog); }
.door { padding: 32px 32px 36px 0; }
.door + .door { padding-left: 32px; border-left: 1px solid var(--fog); }
.door h3 { font-family: var(--display); font-weight: 400; font-size: 1.75rem; margin: 0 0 10px; }
.door p { margin: 0 0 16px; max-width: 42ch; color: var(--ink-soft); }
.door a { font-weight: 600; }

/* Proof list */
.proof { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--fog); }
.proof li { display: grid; grid-template-columns: 180px 1fr; gap: 24px; padding: 18px 0; border-bottom: 1px solid var(--fog); }
.proof .where { color: var(--ink-soft); font-size: 0.95rem; }
.proof .what a { font-weight: 600; }
.proof .what span { display: block; color: var(--ink-soft); font-size: 0.95rem; margin-top: 2px; }

/* Levels (teaching) */
.levels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; border-top: 1px solid var(--fog); padding-top: 24px; margin-top: 8px; }
.levels h3 { font-size: 1.05rem; margin: 0 0 6px; }
.levels p { margin: 0; color: var(--ink-soft); }

/* Footer */
.site-foot { border-top: 1px solid var(--fog); padding: 32px 0 48px; color: var(--ink-soft); font-size: 0.95rem; }
.site-foot .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

@media (max-width: 760px) {
  .hero { padding: 48px 0 28px; }
  .portrait { width: 96px; height: 96px; margin-bottom: 22px; }
  .agent { padding: 22px 18px 18px; margin-bottom: 56px; }
  .agent-form { flex-direction: column; }
  .agent-form button { padding: 12px; }
  .doors { grid-template-columns: 1fr; }
  .door, .door + .door { padding: 26px 0; border-left: 0; }
  .door + .door { border-top: 1px solid var(--fog); }
  .proof li { grid-template-columns: 1fr; gap: 4px; }
  .levels { grid-template-columns: 1fr; gap: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
