/* LEGACY. A Prismm publication.
   Colors and type are taken from the approved mockup. */

@font-face { font-family: "Arimo"; src: url("/assets/fonts/Arimo.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("/assets/fonts/SourceSerif4.woff2") format("woff2"); font-weight: 200 900; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("/assets/fonts/SourceSerif4-Italic.woff2") format("woff2"); font-weight: 200 900; font-style: italic; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/assets/fonts/IBMPlexMono-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/assets/fonts/IBMPlexMono-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --paper: #F4F2E9;   /* page background */
  --ink: #171917;     /* text, rules, top bar, footer */
  --lime: #E8F55A;    /* the Legacy Conversation card and group chat band */
  --rust: #B73D20;    /* the period in LEGACY., labels, first journal card */
  --stone: #E5E7DE;   /* quiet card panels, input fields */
  --muted: #5E615A;   /* secondary text */
  --hair: #C9CBC1;    /* thin dividers */

  --sans: "Arimo", Arial, "Helvetica Neue", Helvetica, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;

  --wrap: 1180px;
  --gutter: clamp(18px, 4vw, 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(--sans); font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--rust); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

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

/* Small mono labels, as in the mockup */
.label { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; line-height: 1.4; margin: 0; }
.label--rust { color: var(--rust); }
.label--muted { color: var(--muted); }

/* The "Text /" link style used across the mockup */
.slash { font-family: var(--sans); font-weight: 700; font-size: 14px; text-decoration: none; border-bottom: 1.5px solid currentColor; padding-bottom: 2px; display: inline-block; }
.slash::after { content: " /"; }
.slash:hover { color: var(--rust); }
.slash--plain { border-bottom: 0; }
.slash--plain:hover { text-decoration: underline; }
button.slash { background: none; border: 0; border-bottom: 1.5px solid currentColor; cursor: pointer; color: inherit; padding: 0 0 2px; }
button.slash--plain { border-bottom: 0; }

/* ---------- Top bar ---------- */
.topbar { background: var(--ink); color: #D9DCD2; }
.topbar .wrap { display: flex; justify-content: space-between; gap: 16px; padding-top: 7px; padding-bottom: 7px; }
.topbar .label:first-child { color: var(--lime); }

/* ---------- Masthead ---------- */
.masthead > .wrap:first-child { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 28px; padding-top: 26px; padding-bottom: 18px; }
.logo { font-family: var(--sans); font-weight: 700; font-size: clamp(52px, 8.4vw, 104px); letter-spacing: -.035em; line-height: .9; text-decoration: none; }
.logo .dot { color: var(--rust); }
.masthead .byline { font-size: 13px; line-height: 1.45; margin: 0; }
.btn { display: inline-block; background: var(--ink); color: var(--paper); font-family: var(--sans); font-weight: 700; font-size: 14px; padding: 14px 20px; border: 0; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--rust); }

.nav { border-top: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); }
.nav ul { list-style: none; margin: 0; padding: 12px 0; display: flex; gap: clamp(20px, 7vw, 92px); }
.nav a { font-weight: 700; font-size: 14px; text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--rust); }

/* ---------- Front page hero ---------- */
.hero { display: grid; grid-template-columns: 1.05fr 1fr .95fr; gap: clamp(20px, 3.5vw, 44px); padding: 26px 0 34px; }
.hero h1 { font-family: var(--sans); font-weight: 700; font-size: clamp(34px, 4.3vw, 52px); line-height: 1.08; letter-spacing: -.02em; margin: 14px 0 34px; }
.hero .dek { font-family: var(--serif); font-size: 19px; line-height: 1.45; color: var(--muted); margin: 0 0 44px; max-width: 28ch; }

.lime-card { background: var(--lime); padding: 22px 16px 26px; display: flex; flex-direction: column; text-decoration: none; }
.lime-card .big { font-family: var(--sans); font-weight: 700; font-size: clamp(46px, 6.2vw, 78px); line-height: 1.02; letter-spacing: -.02em; margin: 28px 0 24px; }
.lime-card .big span { display: block; border-bottom: 1.5px solid var(--ink); padding-bottom: 2px; }
.lime-card .foot { margin-top: auto; }
.lime-card:hover .big { color: var(--rust); }
.lime-card:hover .big span { border-color: var(--rust); }

.agenda .item { display: block; text-decoration: none; padding: 14px 0 16px; }
.agenda .item + .item { border-top: 1px solid var(--hair); }
.agenda .item p.t { font-family: var(--serif); font-size: clamp(19px, 1.9vw, 23px); line-height: 1.25; margin: 8px 0 0; }
.agenda .item:hover p.t { color: var(--rust); }

.explore { border-top: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); }
.explore .wrap-in { display: flex; align-items: center; flex-wrap: wrap; gap: 14px clamp(20px, 5vw, 60px); padding: 13px 0; }
.explore .label { font-weight: 500; color: var(--ink); margin-right: clamp(0px, 4vw, 60px); }
.explore a { font-size: 14px; text-decoration: none; }
.explore a:not(.label)::after { content: "  /"; }
.explore a:hover { color: var(--rust); }

/* ---------- Section heads ---------- */
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; border-bottom: 2px solid var(--ink); padding-bottom: 12px; margin: 44px 0 26px; }
.section-head h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 3.6vw, 40px); line-height: 1.1; margin: 0; }

/* ---------- Journal cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2vw, 22px); }
.card { text-decoration: none; display: flex; flex-direction: column; }
.card .panel { background: var(--stone); padding: 12px 12px 18px; min-height: 108px; display: flex; flex-direction: column; justify-content: space-between; }
.card--rust .panel { background: var(--rust); color: var(--paper); }
.card .panel .kicker { font-family: var(--sans); font-weight: 700; font-size: clamp(22px, 2.4vw, 28px); line-height: 1.02; text-transform: uppercase; margin: 22px 0 0; }
.card .panel .kicker-2 { font-family: var(--serif); font-size: clamp(22px, 2.4vw, 28px); line-height: 1.05; margin: 2px 0 0; }
.card .dek { font-family: var(--serif); font-size: 20px; line-height: 1.22; margin: 16px 0 6px; }
.card .sub { font-size: 13px; color: var(--muted); margin: 0 0 24px; }
.card .slash { margin-top: auto; align-self: flex-start; }
.card:hover .dek { color: var(--rust); }

/* ---------- Research desk ---------- */
.desk { display: grid; grid-template-columns: 1fr 2.1fr; gap: clamp(20px, 5vw, 64px); padding-bottom: 44px; }
.desk .intro h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(32px, 3.5vw, 40px); line-height: 1.08; margin: 0 0 16px; }
.desk .intro p { color: var(--muted); font-size: 15px; margin: 0; max-width: 26ch; }
.papers { list-style: none; margin: 0; padding: 0; }
.papers li + li { border-top: 1px solid var(--hair); }
.paper { display: grid; grid-template-columns: 60px 1fr; gap: 18px; padding: 14px 0; text-decoration: none; align-items: start; }
.thumb { background: var(--ink); color: var(--paper); height: 72px; border-left: 3px solid var(--rust); padding: 6px 6px; display: flex; flex-direction: column; justify-content: space-between; }
.thumb .label { font-size: 9px; }
.paper .title { font-family: var(--serif); font-size: clamp(20px, 2.2vw, 25px); line-height: 1.2; margin: 6px 0 10px; }
.paper:hover .title { color: var(--rust); }

/* ---------- Group chat band ---------- */
.band { background: var(--lime); padding: clamp(18px, 3vw, 26px); display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 4vw, 48px); margin: 12px 0 30px; }
.band h2 { font-family: var(--sans); font-weight: 700; font-size: clamp(24px, 2.6vw, 30px); line-height: 1.12; margin: 12px 0 16px; }
.band p { font-size: 14px; margin: 0; max-width: 40ch; }
.band blockquote { font-family: var(--serif); font-size: clamp(22px, 2.5vw, 28px); line-height: 1.15; margin: 12px 0 20px; min-height: 3.45em; }
.band .actions { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; font-size: 13px; }
.band .count { font-family: var(--mono); font-size: 11px; color: #4B4F28; }
.toast { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }

/* ---------- Letter signup ---------- */
.letter { border-top: 2px solid var(--ink); display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 4vw, 48px); padding: 18px 0 30px; }
.letter h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(24px, 2.7vw, 30px); line-height: 1.15; margin: 12px 0 14px; }
.letter .fine { font-size: 13px; color: var(--muted); margin: 0; }
.signup .row { display: flex; gap: 8px; margin-top: 8px; }
.signup input[type="email"] { flex: 1; min-width: 0; font: 15px var(--sans); background: var(--stone); border: 1.5px solid transparent; padding: 12px 14px; color: var(--ink); border-radius: 0; }
.signup input[type="email"]:focus { outline: none; border-color: var(--ink); }
.signup input::placeholder { color: #8A8D84; }
.signup .msg { font-size: 13px; margin: 10px 0 0; min-height: 1.4em; }
.signup .msg.err { color: var(--rust); }
.signup .consent { font-size: 12px; color: var(--muted); margin: 10px 0 0; }
.signup .hp { position: absolute; left: -9999px; }
.signup.done .row { display: none; }

/* ---------- Footer ---------- */
.site-foot { background: var(--ink); color: #D9DCD2; margin-top: 40px; }
.site-foot .wrap { display: grid; grid-template-columns: 1fr 1.6fr auto; gap: 28px; padding-top: 26px; padding-bottom: 26px; align-items: start; }
.site-foot .mark { font-weight: 700; font-size: 30px; letter-spacing: -.02em; color: var(--paper); margin: 0; line-height: 1; }
.site-foot .mark .dot { color: var(--rust); }
.site-foot p { font-size: 13px; margin: 6px 0 0; }
.site-foot nav a { font-size: 13px; text-decoration: none; display: block; margin-bottom: 4px; }
.site-foot nav a:hover { color: var(--lime); }

/* ---------- Article pages ---------- */
.article-head { padding: 34px 0 26px; border-bottom: 2px solid var(--ink); display: grid; grid-template-columns: 1fr; gap: 0; }
.article-head .t1 { font-family: var(--sans); font-weight: 700; text-transform: uppercase; font-size: clamp(40px, 6.5vw, 78px); line-height: .98; letter-spacing: -.02em; margin: 16px 0 4px; }
.article-head .t2 { font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 4.6vw, 54px); line-height: 1.06; margin: 0 0 18px; }
.article-head .standfirst { font-family: var(--serif); font-size: clamp(19px, 2vw, 22px); line-height: 1.45; color: var(--muted); max-width: 44ch; margin: 0; }
.article-head .meta { margin-top: 20px; }
.article-head--rust { background: var(--rust); color: var(--paper); border-bottom: 0; margin-top: 26px; padding-left: clamp(16px, 3vw, 32px); padding-right: clamp(16px, 3vw, 32px); }
.article-head--rust .standfirst, .article-head--rust .label { color: #F6D9CF; }
.article-head--stone { background: var(--stone); border-bottom: 0; margin-top: 26px; padding-left: clamp(16px, 3vw, 32px); padding-right: clamp(16px, 3vw, 32px); }
.article-head--lime { background: var(--lime); border-bottom: 0; margin-top: 26px; padding-left: clamp(16px, 3vw, 32px); padding-right: clamp(16px, 3vw, 32px); }
.article-head--lime .standfirst { color: #3E4120; }

.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: clamp(24px, 5vw, 72px); padding-top: 34px; }
.prose { font-family: var(--serif); font-size: 19px; line-height: 1.62; max-width: 66ch; }
.prose p { margin: 0 0 1.05em; }
.prose h2 { font-family: var(--sans); font-weight: 700; font-size: 25px; line-height: 1.2; letter-spacing: -.01em; margin: 1.9em 0 .6em; }
.prose h3 { font-family: var(--sans); font-weight: 700; font-size: 19px; margin: 1.6em 0 .45em; }
.prose ul, .prose ol { padding-left: 1.25em; margin: 0 0 1.1em; }
.prose li { margin-bottom: .45em; }
.prose li::marker { color: var(--rust); }
.prose strong { font-weight: 650; }
.prose a { text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose a:hover { color: var(--rust); }
.prose blockquote { margin: 1.6em 0; padding: 18px 20px; background: var(--lime); font-size: 23px; line-height: 1.3; }
.prose blockquote p { margin: 0; }
.prose hr { border: 0; border-top: 1px solid var(--hair); margin: 2em 0; }
.prose table { border-collapse: collapse; width: 100%; font-family: var(--sans); font-size: 15px; line-height: 1.4; margin: 1.2em 0 1.6em; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--hair); }
.prose th { font-family: var(--mono); font-weight: 500; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; border-bottom: 1.5px solid var(--ink); }
.table-scroll { overflow-x: auto; }
.prose .note { font-family: var(--sans); font-size: 14px; color: var(--muted); }
.prose .checklist { list-style: none; padding-left: 0; }
.prose .checklist li { padding-left: 30px; position: relative; }
.prose .checklist li::before { content: ""; position: absolute; left: 0; top: .35em; width: 16px; height: 16px; border: 1.5px solid var(--ink); }

.aside .box { border-top: 2px solid var(--ink); padding-top: 12px; margin-bottom: 34px; }
.aside .box h2 { font-family: var(--serif); font-weight: 400; font-size: 22px; line-height: 1.2; margin: 10px 0 10px; }
.aside .box p { font-size: 14px; color: var(--muted); margin: 0 0 12px; }
.aside .toc { list-style: none; margin: 10px 0 0; padding: 0; font-size: 14px; }
.aside .toc li { margin-bottom: 8px; }
.aside .toc a { text-decoration: none; }
.aside .toc a:hover { color: var(--rust); }
.aside .sticky { position: sticky; top: 20px; }

.table-q { background: var(--lime); padding: 22px 22px 24px; margin: 2.4em 0 0; }
.table-q blockquote { background: none; padding: 0; margin: 10px 0 16px; font-family: var(--serif); font-size: clamp(24px, 2.8vw, 30px); line-height: 1.15; }
.table-q .actions { display: flex; gap: 20px; flex-wrap: wrap; font-family: var(--sans); font-size: 13px; }

.disclaimer { font-family: var(--sans); font-size: 13px; color: var(--muted); border-top: 1px solid var(--hair); padding-top: 14px; margin-top: 2.4em; max-width: 66ch; }
.more { margin-top: 20px; }

/* ---------- White paper pages ---------- */
.wp-cover { background: var(--ink); color: var(--paper); border-left: 8px solid var(--rust); margin-top: 26px; padding: clamp(22px, 4vw, 44px); display: grid; grid-template-columns: 1fr auto; gap: 24px; }
.wp-cover .label { color: #B9BCB2; }
.wp-cover h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(38px, 5.6vw, 66px); line-height: 1.04; margin: 18px 0 16px; max-width: 16ch; }
.wp-cover .standfirst { font-family: var(--serif); font-size: clamp(18px, 2vw, 21px); line-height: 1.45; color: #D9DCD2; max-width: 50ch; margin: 0 0 24px; }
.wp-cover .num { font-family: var(--mono); font-size: clamp(48px, 7vw, 88px); line-height: 1; color: var(--rust); }
.wp-cover .actions { display: flex; flex-wrap: wrap; gap: 12px 22px; align-items: center; }
.btn--lime { background: var(--lime); color: var(--ink); }
.btn--lime:hover { background: var(--paper); color: var(--ink); }
.wp-cover .slash { color: var(--paper); }
.sources { font-family: var(--sans); font-size: 14px; line-height: 1.5; }
.sources li { margin-bottom: .7em; word-break: break-word; }

/* ---------- Index pages ---------- */
.page-head { padding: 28px 0 0; }
.page-head h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(34px, 4.4vw, 48px); line-height: 1.08; margin: 12px 0 0; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { border-bottom: 1px solid var(--hair); }
.list a { display: grid; grid-template-columns: 200px 1fr; gap: 20px; padding: 18px 0; text-decoration: none; }
.list .t { font-family: var(--serif); font-size: 24px; line-height: 1.2; margin: 0 0 4px; }
.list .d { color: var(--muted); font-size: 15px; margin: 0; }
.list a:hover .t { color: var(--rust); }
.weeks { list-style: none; padding: 0; margin: 0; counter-reset: none; }
.weeks li { display: grid; grid-template-columns: 90px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--hair); }
.weeks .q { font-family: var(--serif); font-size: 20px; line-height: 1.3; margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr 1fr; }
  .hero .agenda { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
  .hero .agenda > .label { grid-column: 1 / -1; }
  .agenda .item + .item { border-top: 0; }
  .article-layout { grid-template-columns: 1fr; }
  .aside .sticky { position: static; }
}
@media (max-width: 720px) {
  .topbar .wrap { flex-direction: column; gap: 2px; }
  .masthead > .wrap:first-child { grid-template-columns: 1fr; gap: 12px; }
  .masthead .btn { justify-self: start; }
  .hero, .hero .agenda, .cards, .desk, .band, .letter { grid-template-columns: 1fr; }
  .hero .dek { margin-bottom: 24px; }
  .lime-card { min-height: 0; }
  .site-foot .wrap { grid-template-columns: 1fr; }
  .list a { grid-template-columns: 1fr; gap: 6px; }
  .wp-cover { grid-template-columns: 1fr; }
  .wp-cover .num { order: -1; }
  .signup .row { flex-direction: column; }
  .weeks li { grid-template-columns: 1fr; gap: 4px; }
}

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

/* ---------- Print / PDF ---------- */
@media print {
  @page { size: Letter; margin: 0.75in 0.8in; }
  body { background: #fff; font-size: 11pt; }
  .topbar, .nav, .masthead .btn, .aside, .letter-block, .site-foot nav, .no-print, .table-q .actions { display: none !important; }
  .masthead .wrap { padding: 0 0 8px; }
  .logo { font-size: 40px; }
  .wrap { max-width: none; padding: 0; }
  .article-layout { display: block; padding-top: 18px; }
  .prose { max-width: none; font-size: 11pt; line-height: 1.5; }
  .prose h2 { font-size: 15pt; break-after: avoid; }
  .prose h3 { break-after: avoid; }
  .prose table, .prose blockquote { break-inside: avoid; }
  .wp-cover { -webkit-print-color-adjust: exact; print-color-adjust: exact; break-after: page; break-inside: avoid; min-height: 7.3in; align-content: center; margin-top: 18px; }
  .prose blockquote, .table-q { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .site-foot { background: none; color: var(--ink); margin-top: 20px; border-top: 1px solid var(--ink); }
  .site-foot .mark { color: var(--ink); }
  a { text-decoration: none; }
  .prose a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 8.5pt; color: var(--muted); word-break: break-all; }
}

.article-head h1 { margin: 0; font-size: inherit; font-weight: inherit; }

/* ---------- Playbook: 52 conversations ---------- */
.prose h3.convo-group { font-family: var(--serif); font-weight: 400; font-size: 30px; line-height: 1.15; border-top: 2px solid var(--ink); padding-top: 14px; margin: 2.2em 0 .3em; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; }
.prose .convo-intro { color: var(--muted); font-size: 17px; margin-bottom: 1.2em; }
.convo { border-left: 3px solid var(--lime); padding: 2px 0 4px 18px; margin: 0 0 1.8em; scroll-margin-top: 16px; }
.convo h4 { font-family: var(--sans); font-weight: 700; font-size: 20px; margin: 6px 0 4px; }
.convo .cq { font-family: var(--serif); font-size: 24px; line-height: 1.25; margin: 0 0 .5em; }
.convo p { font-size: 17px; margin: 0 0 .6em; }
.convo .step { background: var(--stone); padding: 10px 12px; font-family: var(--sans); font-size: 15px; }
.convo .deeper { font-family: var(--sans); font-size: 14px; }
.convo:target { border-left-color: var(--rust); }
.prose table.worksheet td { height: 40px; }
.prose table.worksheet td:first-child { width: 38%; }
@media print {
  .convo { break-inside: avoid; border-left: 2px solid #A9B03A; }
  .convo .cq { font-size: 14pt; }
  .convo p { font-size: 10.5pt; }
  .convo .step { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .convo .deeper { display: none; }
  .prose h3.convo-group { break-before: page; font-size: 20pt; }
  .prose h2 { break-before: auto; }
  table.worksheet { break-inside: auto; }
  table.worksheet tr { break-inside: avoid; }
}
.convo p.label { font-size: 11px; margin: 0; }
@media print { .convo p.label { font-size: 7.5pt; } }
