:root {
  --bg: #f5f2eb;
  --surface: #eae6dc;
  --paper: #fffdf8;
  --ink: #202b29;
  --muted: #53605b;
  --rule: #d1d4c8;
  --accent: #254d42;
  --accent-ink: #fff;
  --link: #254d42;
  --sage: #dce4db;
  --sage-rule: #bbcbbb;
  --forest: #203e35;
  --forest-rule: #688175;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 Arial, Helvetica, sans-serif;
}
a { color: var(--link); }
a:focus-visible, summary:focus-visible { outline: 2px solid currentColor; outline-offset: 5px; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 40px; }

header.top { border-bottom: 1px solid var(--rule); }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 88px; }
.brand { font-size: 22px; font-weight: 700; letter-spacing: -.04em; color: var(--ink); text-decoration: none; }
nav a { margin-left: 22px; color: var(--muted); text-decoration: none; font-size: 15px; }
nav a:hover { color: var(--ink); }

.button {
  display: inline-block; background: var(--accent); color: var(--accent-ink);
  padding: 13px 23px; border-radius: 0; text-decoration: none; font-size: 15px; font-weight: 600;
}
.button.ghost { background: transparent; color: var(--ink); border: 1px solid var(--rule); }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }

h1, h2 { font-family: Georgia, 'Times New Roman', serif; font-weight: 400; letter-spacing: -.045em; }
h1 { font-size: clamp(42px, 4.7vw, 66px); line-height: 1.05; margin: 0 0 20px; max-width: 820px; }
h2 { font-size: clamp(34px, 4vw, 48px); line-height: 1.12; margin: 0 0 20px; }
.eyebrow { color: var(--accent); font-weight: 600; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 24px; }
.lede { font-size: 18px; line-height: 1.65; color: var(--muted); max-width: 700px; margin: 0 0 28px; }
.sub { color: var(--muted); margin: 0 0 40px; max-width: 660px; }

.hero { padding: 72px 0 80px; }
.hero-layout { display: grid; grid-template-columns: 1.15fr 1fr; gap: 54px; align-items: center; }
.hero-note { margin: 26px 0 0; font-size: 13px; color: var(--muted); }

.answer-example { margin: 0; background: var(--sage); padding: 28px; border: 1px solid var(--sage-rule); }
.answer-example blockquote { margin: 0; }
.example-label { margin: 0 0 20px; color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.example-question { margin: 0 0 20px; font-family: Georgia, serif; font-size: 25px; line-height: 1.25; }
.example-answer { margin: 0; padding: 20px; background: var(--paper); font-size: 16px; line-height: 1.6; }
.example-sources { margin-top: 20px; font-size: 13px; line-height: 1.6; }
.example-sources p { margin: 5px 0 10px; }
.answer-example figcaption { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--sage-rule); color: var(--muted); font-size: 12px; line-height: 1.6; }

section { padding: 80px 0; border-top: 1px solid var(--rule); }
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card { background: var(--surface); padding: 28px; }
.card h3 { margin: 0 0 16px; font-size: 22px; line-height: 1.25; font-weight: 500; }
.card p { margin: 0; color: var(--muted); font-size: 16px; }
.card .meta { margin-top: 24px; font-size: 14px; color: var(--ink); }

#work { background: var(--paper); }
#work .grid { gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
#work .grid .card { background: var(--paper); }
.work { display: grid; gap: 42px; grid-template-columns: 1.25fr 1fr; align-items: center; margin-bottom: 40px; }
.work img { width: 100%; height: auto; display: block; border: 1px solid var(--rule); background: var(--sage); padding: 20px; }
.work h3 { margin: 0 0 8px; font-family: Georgia, serif; font-weight: 400; font-size: 30px; line-height: 1.2; }
.work ul { margin: 12px 0 0; padding-left: 20px; color: var(--muted); }
.work li { margin-bottom: 6px; }
.case-evidence { font-size: 15px; line-height: 1.6; }

.checks { margin: 0 0 56px; padding: 32px; background: var(--sage); border: 1px solid var(--sage-rule); }
.checks h3 { margin: 0 0 6px; font-family: Georgia, serif; font-weight: 400; font-size: 26px; line-height: 1.2; }
.checks > p { margin: 0 0 24px; color: var(--muted); font-size: 15px; max-width: 700px; }
.flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 28px; counter-reset: step; }
.flow li { position: relative; background: var(--paper); padding: 16px; font-size: 14px; line-height: 1.5; color: var(--muted); counter-increment: step; }
.flow li strong { display: block; margin-bottom: 4px; color: var(--ink); font-size: 15px; }
.flow li strong::before { content: counter(step) ". "; color: var(--accent); }
.flow li:not(:last-child)::after { content: "→"; position: absolute; right: -22px; top: 50%; transform: translateY(-50%); color: var(--accent); font-size: 18px; }
.flow li.gate { background: var(--accent); color: #d1ddd4; }
.flow li.gate strong { color: #fff; }
.flow li.gate strong::before { color: #b9d3bd; }
.outcomes { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 20px; font-size: 14px; }
.outcomes p { margin: 0; padding: 14px 16px; border-left: 3px solid var(--accent); background: var(--paper); }
.outcomes p.fail { border-left-color: #8a3b2e; }

#services { background: var(--forest); color: #f6f3eb; }
#services .eyebrow { color: #b9d3bd; }
#services .sub, #services .card p { color: #d1ddd4; }
#services .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--forest-rule); }
#services .card { background: transparent; display: flex; flex-direction: column; padding: 28px 24px; }
#services .card + .card { border-left: 1px solid var(--forest-rule); }
#services .service-fit { min-height: 2.8em; margin-bottom: 14px; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: #b9d3bd; }
#services .card h3 { min-height: 2.5em; }
#services .card > p:not(.service-fit):not(.meta) { flex-grow: 1; }
#services .card .meta { color: #fff; font-size: 13px; margin: 24px 0; }
#services .meta strong { display: block; font-size: 28px; font-weight: 400; margin-bottom: 8px; }
#services .button { align-self: flex-start; background: #f6f3eb; color: var(--forest); }
#services details { margin-top: 24px; border-top: 1px solid var(--forest-rule); padding-top: 16px; }
#services summary { cursor: pointer; font-size: 14px; font-weight: 600; }
#services details p { margin-top: 16px; font-size: 14px; }

.books { display: grid; gap: 56px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.book { display: flex; gap: 26px; align-items: flex-start; }
.book img { width: 150px; height: auto; box-shadow: 0 4px 16px rgba(0,0,0,.18); flex: none; }
.book h3 { margin: 0 0 6px; font-family: Georgia, serif; font-size: 25px; font-weight: 400; line-height: 1.25; }
.book p { margin: 0 0 10px; color: var(--muted); font-size: 16px; }
.book-status { font-weight: 600; }

#about { background: #e1e7dd; }
#about .wrap { display: grid; grid-template-columns: 1fr 2fr; column-gap: 60px; }
#about .wrap > div:first-child { grid-row: span 2; }
#about .sub { max-width: none; }
.portrait { display: block; width: 100%; max-width: 290px; height: auto; margin-top: 28px; }
.facts { display: grid; gap: 24px; grid-template-columns: repeat(2, 1fr); grid-column: 2; margin-top: 8px; padding-top: 28px; border-top: 1px solid #aab9ac; }
.fact strong { display: block; font-family: Georgia, serif; font-weight: 400; font-size: 40px; line-height: 1.1; }
.fact span { color: var(--muted); font-size: 15px; }

.contact { padding: 80px 0; }
.contact .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 0 70px; }
.contact h2 { grid-column: 1; }
.contact p { color: var(--muted); max-width: 620px; margin: 0 0 25px; }
.contact .alt { grid-column: 1; margin-top: 22px; font-size: 15px; }
.form { grid-column: 2; grid-row: 1 / span 4; width: 100%; max-width: 620px; display: grid; gap: 14px; }
.form .row { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: 15px; }
.form .opt { color: var(--muted); font-weight: 400; }
.form input, .form select, .form textarea {
  font: inherit; font-weight: 400; color: var(--ink); background: var(--paper);
  border: 1px solid var(--rule); border-radius: 0; padding: 10px 12px; width: 100%;
}
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.form button { justify-self: start; border: 0; cursor: pointer; font: inherit; font-weight: 600; }
.form button[disabled] { opacity: .6; cursor: default; }
.form .status { margin: 0; min-height: 1.6em; }
.form .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

footer { border-top: 1px solid var(--rule); padding: 28px 0; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

/* Case study page */
.case { padding: 64px 0 80px; }
.case .wrap > * { max-width: 760px; }
.case .wrap > .work-shot, .case .wrap > .checks { max-width: none; }
.case h2 { font-size: clamp(28px, 3.2vw, 38px); margin-top: 56px; }
.case p, .case li { color: var(--ink); }
.case ul, .case ol { padding-left: 22px; }
.case li { margin-bottom: 8px; }
.case code { font-size: 15px; background: var(--surface); padding: 1px 5px; }
.case pre { background: var(--paper); border: 1px solid var(--rule); padding: 18px; overflow-x: auto; font-size: 14px; line-height: 1.5; }
.work-shot { margin: 40px 0; }
.work-shot img { width: 100%; height: auto; display: block; border: 1px solid var(--rule); background: var(--sage); padding: 20px; }

@media (max-width: 1000px) {
  #services .grid { grid-template-columns: 1fr; }
  #services .card { padding: 28px 0; }
  #services .card + .card { border-left: 0; border-top: 1px solid var(--forest-rule); }
  #services .service-fit, #services .card h3 { min-height: 0; }
  .flow { grid-template-columns: 1fr; gap: 26px; }
  .flow li:not(:last-child)::after { content: "↓"; right: auto; left: 16px; top: auto; bottom: -24px; transform: none; }
}
@media (max-width: 850px) {
  .wrap { padding: 0 24px; }
  .hero-layout, .work, #about .wrap, .contact .wrap { grid-template-columns: 1fr; gap: 32px; }
  .answer-example { max-width: 600px; }
  .hero { padding: 45px 0; }
  section, .contact { padding: 52px 0; }
  .facts, .form, .contact h2, .contact .alt { grid-column: auto; grid-row: auto; }
  .books { grid-template-columns: 1fr; }
  .checks { padding: 22px; }
  .outcomes { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .form .row { grid-template-columns: 1fr; }
  nav a:not(.button) { display: none; }
}
@media (max-width: 420px) {
  .brand { font-size: 20px; }
  .book { gap: 18px; }
  .book img { width: 100px; }
}
.answer-example figcaption .button { margin-bottom: 10px; font-size: 14px; }
#try .card h3 { font-family: Georgia, serif; font-weight: 400; }
.try-state { margin: 0 0 12px; color: var(--accent) !important; font-size: 12px !important; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.form fieldset.billing { border: 1px solid var(--rule); padding: 12px 14px; margin: 0; display: grid; gap: 8px; }
.form fieldset.billing legend { font-weight: 600; font-size: 15px; padding: 0 4px; }
.form label.choice { display: flex; gap: 8px; align-items: baseline; font-weight: 400; }
.form label.choice input { width: auto; }
#try .card h3 a { color: inherit; text-decoration-color: var(--rule); text-underline-offset: 4px; }
#try .card h3 a:hover { text-decoration-color: var(--accent); }
#services .try-first { margin-top: 14px; font-size: 14px; }
#services .try-first a { color: #f6f3eb; }

/* The demo page */
.demo .wrap > * { max-width: 760px; }
.demo .limits { color: var(--muted); padding-left: 22px; }
.demo .notice { background: var(--sage); border: 1px solid var(--sage-rule); padding: 14px 16px; font-size: 15px; }
.demo .expired { border-left: 3px solid #8a3b2e; padding: 10px 14px; background: var(--paper); }
.demo .files { list-style: none; padding: 0; margin: 16px 0; }
.demo .files li { padding: 10px 0; border-bottom: 1px solid var(--rule); font-size: 15px; }
.demo .files .skipped { color: var(--muted); }
.demo .ask { display: flex; gap: 10px; margin: 24px 0 8px; }
.demo .ask input { flex: 1; font: inherit; padding: 10px 12px; border: 1px solid var(--rule); background: var(--paper); }
.demo .ask button, .demo .upload button { border: 0; cursor: pointer; font: inherit; font-weight: 600; }
.demo .left { color: var(--muted); font-size: 14px; }
.demo .answer { background: var(--paper); border: 1px solid var(--rule); padding: 18px; margin: 16px 0; }
.demo .answer .q { font-family: Georgia, serif; font-size: 20px; margin: 0 0 10px; }
.demo .answer .sources { list-style: none; padding: 0; margin: 12px 0 0; font-size: 14px; }
.demo .answer .sources li { margin-top: 6px; }
.demo .answer .sources button { background: none; border: 0; color: var(--link); text-decoration: underline; cursor: pointer; font: inherit; padding: 0; margin-left: 8px; }
.demo .answer blockquote { margin: 8px 0 0; padding: 10px 14px; background: var(--surface); white-space: pre-wrap; }
.demo .offer { background: var(--forest); color: #f6f3eb; padding: 24px; margin: 24px 0; }
.demo .offer a { color: #fff; }
.demo .offer .button { background: #f6f3eb; color: var(--forest); }
.demo .status { min-height: 1.6em; }
