:root {
  color-scheme: light;
  --ink: #182136;
  --muted: #51586a;
  --paper: #f9f6ef;
  --line: #cec9c0;
  --purple: #513488;
  --navy: #141932;
  --gutter: clamp(1.1rem, 4vw, 3.25rem);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1.0625rem/1.65 Inter, system-ui, sans-serif; }
.wrap { max-width: 1200px; margin: auto; padding: 0 var(--gutter) 3rem; }
.wrap > header, .brand, nav, .post-meta { display: flex; align-items: center; gap: 1rem; }
.wrap > header { justify-content: space-between; padding: .85rem 0; }
.brand { color: inherit; gap: .55rem; text-decoration: none; }
.brand svg { width: 32px; height: 32px; }
nav svg { display: block; fill: var(--muted); }
a { color: var(--purple); text-underline-offset: .18em; }
a:hover, summary:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid #ac72e6; outline-offset: 3px; }
.masthead { padding: clamp(1.4rem, 5vw, 4.5rem); color: #faf7ff; background: linear-gradient(115deg, #10162e 20%, #342453 82%, #49326c); border-top: 5px solid #9472c8; }
.edition, .coverage, .period, .timeline small, dt { font-weight: 600; }
.edition { margin: 0 0 1.3rem; color: #dcc7ff; letter-spacing: .12em; text-transform: uppercase; font-size: .78rem; }
h1 { font-size: clamp(2.2rem, 6vw, 5.3rem); letter-spacing: -.055em; line-height: 1.04; margin: 0; }
h1 span { display: block; margin-top: .22em; font-size: .64em; letter-spacing: -.035em; color: #e0cfff; }
.standfirst { max-width: 58ch; margin: 1.35rem 0; font-size: clamp(1rem, 1.7vw, 1.3rem); line-height: 1.5; }
.coverage, .post-meta { margin: .35rem 0 0; font-size: .85rem; }
.post-meta { gap: .45rem; flex-wrap: wrap; color: #d7d0e0; }
.census { padding: 1.2rem var(--gutter); background: #ebe5f1; display: flex; align-items: center; gap: 3vw; flex-wrap: wrap; }
.census dl { display: flex; gap: clamp(1.5rem, 4vw, 4rem); margin: 0; }
.census dl div { display: flex; flex-direction: column-reverse; }
.census dt, .census p { font-size: .86rem; }
.census dd { margin: 0; font-size: clamp(2rem, 4vw, 3.6rem); line-height: 1.08; font-weight: 800; letter-spacing: -.035em; color: #332252; }
.census p { margin: 0; }
.chapters { flex-wrap: wrap; gap: .5rem 1.5rem; padding: 1rem 0; margin-bottom: 2.8rem; border-bottom: 1px solid var(--line); font-size: .94rem; }
.post-content > :is(p,h2,h3,ul,ol) { max-width: 65ch; margin-inline: auto; }
.post-content > h2, .post-content > h3 { max-width: none; width: min(100%, 69rem); }
h2 { margin: 3.8rem 0 1.15rem; border-top: 1px solid var(--line); padding-top: 1rem; font-size: clamp(1.6rem, 3.3vw, 2.7rem); letter-spacing: -.045em; line-height: 1.16; }
h3 { line-height: 1.3; letter-spacing: -.025em; }
li { margin-bottom: .5em; }
.post-content > .timeline { max-width: 58rem; list-style: none; padding: 0; }
.timeline li { display: grid; grid-template-columns: 12rem 1fr; gap: 1.6rem; margin: 0; }
.period { color: var(--purple); padding-top: 1rem; }
.timeline li > div { position: relative; padding: 1rem 0 1.6rem 1.6rem; border-left: 2px solid #bbabc9; }
.timeline li > div::before { content: ""; position: absolute; top: 1.55rem; left: -6px; width: 10px; height: 10px; border-radius: 50%; background: var(--purple); }
.timeline h3, .timeline p { margin: 0 0 .4rem; }
.timeline small { color: var(--muted); }
.projects, .scorecard, .post-content > .architecture-key { display: grid; gap: 1rem; margin-block: 2rem; }
.projects { grid-template-columns: repeat(2,minmax(0,1fr)); }
.projects p, .scorecard section { padding: clamp(1rem, 2vw, 1.75rem); border-top: 3px solid #796993; background: #f0ece5; margin: 0; }
.projects strong:first-child { display: block; font-size: 1.15em; margin-bottom: .6rem; }
.projects p:last-child { grid-column: 1 / -1; background: var(--navy); color: var(--paper); padding-inline: max(1.25rem, calc((100% - 65ch)/2)); }
figure { margin: 2rem 0 1.25rem; }
picture, picture img { display: block; width: 100%; height: auto; }
figcaption { max-width: 78ch; margin: .75rem auto; font-size: .92rem; color: var(--muted); }
.post-content > .architecture-key, .scorecard { max-width: none; grid-template-columns: repeat(3,minmax(0,1fr)); }
.architecture-key { padding-left: 0; list-style-position: inside; }
.architecture-key li { padding: 1rem; border-top: 1px solid var(--line); }
.architecture-key li::marker { color: var(--purple); font-weight: 800; }
.scorecard h3 { margin: 0; font-size: 1.4rem; }
.scorecard dt { color: var(--purple); margin-top: 1rem; font-size: .9rem; }
.scorecard dd { margin: .15rem 0 0; }
table { border-collapse: collapse; width: 100%; }
th, td { border-bottom: 1px solid var(--line); text-align: left; padding: .6rem; vertical-align: top; }
.substack-cta { background: var(--navy); }
.rmax-footer, .rmax-footer .footer-copy { color: var(--muted); }
@media (max-width: 760px) {
  .projects, .post-content > .architecture-key, .scorecard { grid-template-columns: minmax(0,1fr); }
  .timeline li { display: block; border-top: 1px solid var(--line); padding: .9rem 0; }
  .timeline li > div { border: 0; padding: .4rem 0; }
  .timeline li > div::before { display: none; }
  .census { gap: .8rem; }
  .census dl { width: 100%; }
  table { display: block; overflow-x: auto; }
}
