/* Pentith. house style
   Ink #1A1714 . Cream #F5EEE1 . Accent #7A1F1F . Muted #6B6660 . Rule #D8CFC4 */

:root {
  --ink: #1A1714;
  --cream: #F5EEE1;
  --accent: #7A1F1F;
  --muted: #6B6660;
  --rule: #D8CFC4;
  --rule-soft: #E4DACB;
  --paper: #FFFFFF;

  --display: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", serif;
  --body: "Helvetica Neue", Helvetica, Arial, sans-serif;

  --measure: 950px;
  --gutter: 32px;
  --rail: 240px;
  --channel: 40px;
}

*, *::before, *::after { 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: 16.5px;
  line-height: 1.64;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--measure); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- The ledger grid. One hairline, full height of the page. ---------- */

.cols { display: grid; grid-template-columns: minmax(0, 1fr) var(--rail); }
.col-main { padding-right: var(--channel); border-right: 1px solid var(--rule); }
.col-rail { padding-left: var(--channel); }

/* ---------- Nameplate ---------- */

.letterhead { background: var(--cream); border-bottom: 1px solid var(--rule); }

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 34px 0 30px;
  border-bottom: 1px solid var(--rule-soft);
}

.wordmark {
  font-family: var(--display);
  font-size: 36px;
  line-height: 1;
  letter-spacing: -0.005em;
  color: var(--ink);
  text-decoration: none;
  border: 0;
}

.nav { display: flex; gap: 24px; font-size: 14px; white-space: nowrap; }
.nav a { color: var(--muted); text-decoration: none; border: 0; padding-bottom: 3px; border-bottom: 1px solid transparent; }
.nav a:hover { color: var(--ink); border-bottom-color: var(--rule); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }

/* ---------- Hero ---------- */

.hero { padding-top: 72px; padding-bottom: 72px; }
.hero.compact { padding-top: 56px; padding-bottom: 56px; }

h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(29px, 3.5vw, 40px);
  line-height: 1.14;
  letter-spacing: -0.02em;
  margin: 0;
}

.standfirst {
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(19px, 2.1vw, 22px);
  line-height: 1.38;
  color: var(--accent);
  margin: 16px 0 0;
}

.lede { font-size: 17px; line-height: 1.6; margin: 24px 0 0; }
.lede + .lede { margin-top: 14px; }

/* ---------- Reference rail ---------- */

.portrait { display: block; width: 100%; height: auto; margin: 0 0 14px; }
.caption { font-size: 12.5px; color: var(--muted); line-height: 1.5; margin: 0; padding-top: 10px; border-top: 1px solid var(--rule); }

.ref { margin: 0; padding: 0; }
.ref dt { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.ref dd { margin: 3px 0 0; font-size: 14px; line-height: 1.45; }
.ref .item { padding: 14px 0; border-bottom: 1px solid var(--rule); }
.ref .item:first-child { padding-top: 0; }
.ref .item:last-child { border-bottom: 0; }

.railhead {
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
}

.railnote { font-size: 13.5px; color: var(--muted); line-height: 1.55; margin: 0 0 14px; }

/* ---------- Links: ink by default, accent on hover ---------- */

a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--rule); }
a:hover { color: var(--accent); border-bottom-color: var(--accent); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Accent has exactly one job: the two things you must not miss. */

.cta { margin: 40px 0 0; }
.cta a {
  font-family: var(--display);
  font-size: 21px;
  color: var(--accent);
  border-bottom: 1.5px solid var(--accent);
  padding-bottom: 3px;
}
.cta a:hover { color: var(--ink); border-bottom-color: var(--ink); }
.cta .note { display: block; font-size: 13.5px; color: var(--muted); margin-top: 14px; line-height: 1.55; }

/* ---------- Sections. Rule above the heading, never a sandwich. ---------- */

section { padding: 56px 0 0; }
section:first-of-type { padding-top: 48px; }
section:last-of-type { padding-bottom: 72px; }

h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 21px;
  line-height: 1.3;
  margin: 0;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
}

.h2note { font-size: 14px; color: var(--muted); margin: 6px 0 28px; }

h3 { font-family: var(--display); font-weight: 700; font-size: 17.5px; line-height: 1.35; margin: 0 0 8px; }

p { margin: 0 0 14px; }
p:last-child { margin-bottom: 0; }

/* ---------- Outcomes ---------- */

.outcomes { margin: 0; padding: 0; list-style: none; }
.outcomes li { border-bottom: 1px solid var(--rule); padding: 18px 0; }
.outcomes li:first-child { padding-top: 0; }
.outcomes .what { display: block; font-family: var(--display); font-weight: 700; font-size: 17px; line-height: 1.35; }
.outcomes .how { display: block; font-size: 15px; color: var(--muted); line-height: 1.55; margin-top: 6px; }

/* ---------- Record table, figures right aligned like a ledger ---------- */

.record { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 15px; line-height: 1.5; }
.record th, .record td { border: 1px solid var(--rule); padding: 10px 13px; text-align: left; vertical-align: top; }
.record thead th { background: var(--ink); color: #FFFFFF; font-family: var(--body); font-weight: 700; font-size: 13px; }
.record tbody th { font-weight: 700; width: 26%; }
.record .figure { width: 27%; text-align: right; font-family: var(--body); font-weight: 700; font-variant-numeric: lining-nums tabular-nums; }
.record thead th.figure { font-family: var(--body); }

/* ---------- Record as a figure grid, hairlines carry the ledger ---------- */

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; border-top: 1px solid var(--rule); border-left: 1px solid var(--rule); }
.stats > div { padding: 16px 14px 18px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); display: flex; flex-direction: column; }
.stats .lead { grid-column: span 2; background: var(--cream); }
.stats dt { order: 2; font-size: 12.5px; font-weight: 700; color: var(--ink); margin-top: 6px; }
.stats .fig { order: 1; margin: 0; font-family: var(--display); font-weight: 400; font-size: 38px; line-height: 1; letter-spacing: -0.02em; color: var(--ink); font-variant-numeric: lining-nums; }
.stats .lead .fig { font-size: 46px; color: var(--accent); }
.stats .det { order: 3; margin: 4px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--muted); }

/* ---------- Entries ---------- */

.trigger {
  border-left: 2px solid var(--rule);
  padding-left: 16px;
  margin: 0 0 18px;
  font-size: 15.5px;
  color: var(--muted);
  line-height: 1.55;
}

.trigger .label { color: var(--ink); font-weight: 700; }

.includes { list-style: none; margin: 16px 0 0; padding: 0; font-size: 15px; color: var(--muted); }
.includes li { padding: 4px 0 4px 16px; position: relative; line-height: 1.55; }
.includes li::before { content: ""; position: absolute; left: 0; top: 14px; width: 7px; height: 1px; background: var(--muted); }

.step { border-top: 1px solid var(--rule); padding: 18px 0; }
.step:first-of-type { border-top: 0; padding-top: 0; }
.step .name { font-family: var(--display); font-weight: 700; font-size: 17px; }
.step.numbered { display: grid; grid-template-columns: 72px minmax(0, 1fr); }
.step .num { font-family: var(--display); font-weight: 400; font-size: 60px; line-height: 0.7; color: #A09380; }
.step .term { font-size: 13.5px; color: var(--muted); margin: 2px 0 8px; }

/* ---------- Fit ---------- */

.fit { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.fit.quad { row-gap: 34px; }
.fit ul { list-style: none; margin: 0; padding: 0; font-size: 15px; }
.fit li { padding: 6px 0 6px 18px; position: relative; line-height: 1.55; }
.fit li::before { content: ""; position: absolute; left: 0; top: 15px; width: 8px; height: 1px; background: var(--rule); }
.fit .no li { color: var(--muted); }

/* ---------- Pull band, the rule carries straight through ---------- */

.band { background: var(--cream); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.band .col-main { padding-top: 48px; padding-bottom: 48px; }
.band p { font-family: var(--display); font-size: clamp(19px, 2.2vw, 23px); line-height: 1.42; color: var(--accent); margin: 0; }

/* ---------- Footer ---------- */

.foot { background: var(--cream); border-top: 1px solid var(--rule); padding: 32px 0 44px; font-size: 12.5px; line-height: 1.65; color: var(--muted); }
.foot p { margin: 0 0 8px; max-width: 54em; }
.foot .fca { font-size: 11px; margin-top: 10px; }
.foot a { color: var(--muted); border-bottom-color: var(--rule-soft); }
.footnav { margin: 0 0 18px; display: flex; gap: 20px; font-size: 13.5px; }
.footnav a { color: var(--ink); }

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  :root { --channel: 0px; }
  .cols { grid-template-columns: 1fr; }
  .col-main { padding-right: 0; border-right: 0; }
  .col-rail { padding-left: 0; padding-top: 28px; margin-top: 28px; border-top: 1px solid var(--rule); padding-bottom: 8px; }
  .portrait { max-width: 176px; margin-bottom: 22px; }
  .hero, .hero.compact { padding-bottom: 40px; }
  .band .col-main { padding-top: 40px; padding-bottom: 40px; }
  .band .col-rail { display: none; }
}

@media (max-width: 620px) {
  :root { --gutter: 20px; }
  .masthead { padding: 26px 0 22px; }
  .wordmark { font-size: 30px; }
  .nav { gap: 18px; font-size: 13.5px; }
  .hero, .hero.compact { padding-top: 44px; }
  .fit { grid-template-columns: 1fr; gap: 26px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats .fig { font-size: 32px; }
  .stats .lead .fig { font-size: 38px; }
  .record, .record tbody, .record tr, .record th, .record td { display: block; width: auto; text-align: left; }
  .record thead { display: none; }
  .record tr { border: 1px solid var(--rule); margin-bottom: -1px; padding: 11px 13px; }
  .record th, .record td { border: 0; padding: 0; }
  .record tbody th, .record .figure { width: auto; text-align: left; }
  .record .figure { margin-top: 3px; }
  .footnav { flex-wrap: wrap; gap: 14px; }
  .step.numbered { grid-template-columns: 52px minmax(0, 1fr); }
  .step .num { font-size: 46px; }
}

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

@media print {
  .nav, .band, .footnav, .col-rail { display: none; }
  .portrait { display: none; }
  .col-main { border-right: 0; padding-right: 0; }
  body { font-size: 11pt; color: #000; }
  a { color: #000; border: 0; }
  .letterhead { background: none; }
}
