/* shanklin.ai — Reeves journal. Set like a printed page, in purple ink.
   Three themes: ai (the machine view — tight plain text, what an AI reads),
   dark (neutral), light (longhorn cream). */
:root, [data-theme="ai"] {
  --bg: #ffffff;
  --panel: #ffffff;
  --line: #e2e2e2;
  --hairline: #eeeeee;
  --accent: #1a0dab;
  --accent-ink: #1a0dab;
  --ink: #111111;
  --body: #1f1f1f;
  --muted: #555555;
  --faint: #888888;
  --green: #0d7a52;
  --red: #c43030;
}
[data-theme="dark"] {
  --bg: #0e0e12;
  --panel: #16161b;
  --line: #2c2c34;
  --hairline: #222229;
  --accent: #a5b4fc;
  --accent-ink: #a5b4fc;
  --ink: #f4f4f6;
  --body: #c9c9d1;
  --muted: #9898a3;
  --faint: #6b6b75;
  --green: #34d399;
  --red: #f87171;
}
[data-theme="light"] {
  --bg: #faf5e9;
  --panel: #fffdf6;
  --line: #e3d5b8;
  --hairline: #ece1c8;
  --accent: #bf5700;
  --accent-ink: #9a4500;
  --ink: #1c1410;
  --body: #4a3d2e;
  --muted: #7a6a54;
  --faint: #ab9c80;
  --green: #0e7a4a;
  --red: #b03227;
}
:root {
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

::selection { background: rgba(179,157,255,0.3); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: 700px; margin: 0 auto; padding: 0 28px; }

/* ---------- masthead ---------- */
.masthead {
  border-bottom: 1px solid var(--hairline);
  padding: 14px 0;
}
.masthead .wrap {
  display: flex; align-items: baseline; justify-content: space-between;
  max-width: 880px;
}
.masthead .name {
  font-family: var(--mono); font-size: 13px; font-weight: 600;
  color: var(--ink); text-decoration: none; letter-spacing: 0;
}
.masthead .name em { color: var(--accent); font-style: normal; }
.masthead nav a {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em;
  color: var(--muted); text-decoration: none; margin-left: 24px;
}
.masthead nav a:hover { color: var(--accent); }

/* ---------- type ---------- */
h1, h2, h3 { text-wrap: balance; }
h1 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(38px, 5.4vw, 52px);
  letter-spacing: -0.015em; line-height: 1.08;
  margin: 0 0 20px;
}
h2 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(26px, 3.4vw, 32px);
  letter-spacing: -0.01em; line-height: 1.22;
  margin: 56px 0 16px;
}
h3 {
  font-family: var(--font-body); font-size: 18px; font-weight: 650;
  letter-spacing: -0.01em; margin: 36px 0 10px;
}
p { margin: 0 0 22px; color: var(--body); }
p.lede {
  font-size: 20px; line-height: 1.62; color: var(--body);
  text-wrap: pretty;
}
a { color: var(--accent-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
ul, ol { margin: 0 0 24px 26px; color: var(--body); }
li { margin-bottom: 10px; }
li::marker { color: var(--accent); }
strong { color: var(--ink); }

.kicker {
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent-ink); margin-bottom: 22px;
}
.dateline {
  font-family: var(--mono); font-size: 12.5px; color: var(--faint);
  letter-spacing: 0.04em; margin-top: 24px;
}
.dateline .sep { margin: 0 10px; color: var(--line); }

/* ---------- nameplate (blog index hero) ---------- */
.nameplate { padding: 72px 0 0; max-width: 880px; margin: 0 auto; padding-left: 28px; padding-right: 28px; }
.nameplate .who {
  font-family: var(--mono); font-size: 13px; color: var(--muted);
  margin-bottom: 26px;
}
.nameplate .who .p { color: var(--accent); }
.nameplate .who .caret {
  display: inline-block; width: 8px; height: 14px;
  background: var(--accent); vertical-align: -2px; margin-left: 6px;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.nameplate h1 {
  font-size: clamp(64px, 11vw, 118px);
  letter-spacing: -0.03em; line-height: 0.98;
  margin-bottom: 26px; font-weight: 650;
}
.nameplate h1 .it { font-style: italic; font-weight: 500; color: var(--accent); }
.nameplate .standfirst {
  font-size: 19px; line-height: 1.62; color: var(--muted);
  max-width: 560px; text-wrap: pretty; margin-bottom: 30px;
}
.nameplate .sig {
  display: flex; align-items: center; gap: 14px;
  padding: 20px 0; margin-bottom: 8px;
  border-top: 1px solid var(--hairline);
  font-size: 14px; color: var(--muted);
  max-width: 560px;
}
.nameplate .sig img {
  width: 44px; height: 44px; border-radius: 50%; object-fit: cover;
  border: 1.5px solid var(--accent); flex-shrink: 0;
}
.nameplate .sig strong { color: var(--ink); font-weight: 600; }

/* ---------- index (ruled list, not cards) ---------- */
.index { max-width: 880px; margin: 0 auto; padding: 40px 28px 0; }
.index-head {
  display: flex; align-items: baseline; justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px; margin-bottom: 0;
}
.index-head h2 {
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
  margin: 0;
}
.index-head .count { font-family: var(--mono); font-size: 12px; color: var(--faint); }

.entry {
  display: grid; grid-template-columns: 52px 1fr; gap: 8px 20px;
  padding: 30px 0;
  border-bottom: 1px solid var(--hairline);
  text-decoration: none; color: inherit;
}
.entry .num {
  font-family: var(--mono); font-size: 13px; color: var(--faint);
  padding-top: 6px;
}
.entry h3 {
  font-family: var(--font-display); font-weight: 600; font-size: 27px;
  letter-spacing: -0.01em; line-height: 1.25; color: var(--ink);
  margin: 0 0 10px; transition: color 0.15s;
}
.entry p { font-size: 15.5px; color: var(--muted); margin: 0 0 10px; line-height: 1.62; max-width: 600px; }
.entry .date { font-family: var(--mono); font-size: 12px; color: var(--faint); }
.entry:hover h3 { color: var(--accent); }
.entry:hover .num { color: var(--accent); }

/* ---------- article ---------- */
.article-head { padding: 64px 0 0; }
.article-head h1 { max-width: 640px; }
.byline {
  display: flex; align-items: center; gap: 14px;
  margin: 30px 0 0; padding: 18px 0;
  border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline);
  font-size: 14px; color: var(--muted);
}
.byline img {
  width: 46px; height: 46px; border-radius: 50%; object-fit: cover;
  border: 1.5px solid var(--accent); flex-shrink: 0;
}
.byline strong { color: var(--ink); font-weight: 600; }
.article-body { padding-top: 36px; }

/* pull quote */
.pull {
  margin: 44px 0; padding: 6px 0 6px 28px;
  border-left: 2px solid var(--accent);
}
.pull p {
  font-family: var(--font-display); font-style: italic; font-weight: 500;
  font-size: 24px; line-height: 1.45; color: var(--ink);
  margin: 0; text-wrap: pretty; letter-spacing: -0.005em;
}

/* figures, not cards */
.figures {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  margin: 40px 0;
}
.figure { padding: 24px 20px 22px; }
.figure + .figure { border-left: 1px solid var(--hairline); }
.figure .k {
  font-family: var(--mono); font-size: 10.5px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.13em; color: var(--muted);
  margin-bottom: 10px;
}
.figure .v {
  font-family: var(--mono); font-size: 27px; font-weight: 700;
  letter-spacing: -0.02em; color: var(--ink);
  font-variant-numeric: tabular-nums; line-height: 1.2;
}
.figure .v small { font-size: 13px; color: var(--muted); font-weight: 500; }
.figure .s { font-size: 12.5px; color: var(--faint); margin-top: 8px; line-height: 1.55; }

figure.chart { margin: 44px 0; }
figure.chart .figlabel {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 14px;
}
figure.chart img {
  width: 100%; border-radius: 10px; display: block;
  border: 1px solid var(--hairline);
}
figcaption {
  font-size: 13px; color: var(--faint); line-height: 1.65;
  margin-top: 14px;
}
figcaption .fn { font-family: var(--mono); color: var(--accent); }

/* data table */
table.numbers { width: 100%; border-collapse: collapse; margin: 28px 0 34px; font-size: 15.5px; }
table.numbers th, table.numbers td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--hairline); }
table.numbers thead th {
  font-family: var(--mono); font-size: 10.5px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.11em; color: var(--accent);
  border-bottom: 1px solid var(--line);
}
table.numbers td { color: var(--body); }
table.numbers td.n, table.numbers th.n {
  text-align: right; font-family: var(--mono); font-size: 14px;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
table.numbers tr.total td {
  font-weight: 700; color: var(--ink);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
table.numbers tbody tr { transition: background 0.12s; }
table.numbers tbody tr:hover { background: rgba(179,157,255,0.035); }

.callout {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 24px 0; margin: 36px 0; font-size: 15.5px; color: var(--body);
}
.callout .k {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 10px;
}
.callout strong { color: var(--ink); }
.fineprint { font-size: 13px; color: var(--faint); line-height: 1.7; }

/* timeline */
ul.timeline { list-style: none; margin: 30px 0 34px 0; }
ul.timeline li {
  padding: 22px 0 22px 28px;
  border-left: 1px solid var(--line);
  position: relative;
  margin: 0;
}
ul.timeline li::before {
  content: "";
  position: absolute; left: -4px; top: 30px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--bg); border: 1.5px solid var(--accent);
}
ul.timeline .when {
  display: block;
  font-family: var(--mono); font-size: 11.5px; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 8px;
}
ul.timeline li p { margin-bottom: 0; }

/* theme switcher */
.themes {
  display: inline-flex;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
  margin-left: 24px;
  vertical-align: baseline;
}
.themes button {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em;
  background: transparent; border: none; cursor: pointer;
  color: var(--faint); padding: 4px 11px; border-radius: 999px;
  transition: color 0.15s, background 0.15s;
}
.themes button:hover { color: var(--muted); }
.themes button.on { background: var(--hairline); color: var(--ink); }
.masthead nav { display: flex; align-items: center; }

/* chart theme swap: light chart by default (light + ai themes); dark chart only in dark theme */
figure.chart img.chart-dark { display: none; }
[data-theme="dark"] figure.chart img.chart-dark { display: block; }
[data-theme="dark"] figure.chart img.chart-light { display: none; }

/* ---------- ai theme: the machine view ---------- */
/* What an AI actually reads: tight plain text, no decoration. */
[data-theme="ai"] {
  --font-display: var(--font-body);
}
[data-theme="ai"] body {
  font-size: 15px;
  line-height: 1.6;
}
[data-theme="ai"] h1,
[data-theme="ai"] h2,
[data-theme="ai"] h3 {
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.3;
}
[data-theme="ai"] .article-head { padding: 32px 0 8px; }
[data-theme="ai"] .article-head h1 { font-size: 28px; }
[data-theme="ai"] .article-head .lede { font-size: 15px; }
[data-theme="ai"] .article-body h2 { font-size: 19px; margin: 28px 0 8px; }
[data-theme="ai"] .kicker { font-size: 11px; }
[data-theme="ai"] a { text-decoration: underline; }
[data-theme="ai"] a:hover { text-decoration: underline; }
[data-theme="ai"] .byline img,
[data-theme="ai"] .door-avatar { display: none; }
[data-theme="ai"] .byline { margin: 16px 0; }
[data-theme="ai"] .pull {
  border: none;
  border-left: 3px solid var(--line);
  padding: 0 0 0 14px;
  margin: 20px 0;
}
[data-theme="ai"] .pull p { font-size: 15px; }
[data-theme="ai"] .callout {
  background: none;
  border: 1px solid var(--line);
  padding: 14px 16px;
}
[data-theme="ai"] .figures { display: block; margin: 20px 0; }
[data-theme="ai"] .figure {
  border: none;
  border-bottom: 1px solid var(--hairline);
  padding: 10px 0;
}
[data-theme="ai"] .figure .v { font-size: 20px; }
[data-theme="ai"] .postcards { grid-template-columns: 1fr; gap: 20px; }
[data-theme="ai"] .postcard { border: none; background: none; padding: 0; }
[data-theme="ai"] .postcard figcaption { padding: 8px 0 0; }
[data-theme="ai"] .entry { padding: 14px 0; }
[data-theme="ai"] .door {
  min-height: auto;
  display: block;
  text-align: left;
  padding: 56px 28px;
}
[data-theme="ai"] .door .prompt::after { display: none; }
[data-theme="ai"] .door h1 { font-size: 34px; margin-bottom: 12px; }
[data-theme="ai"] .door p { font-size: 15px; margin-bottom: 20px; }
[data-theme="ai"] .door .enter {
  border-radius: 0;
  padding: 8px 16px;
  font-size: 14px;
}
[data-theme="ai"] .door .alt { margin-top: 20px; }
[data-theme="ai"] .corner-themes { position: static; text-align: right; padding: 12px 20px 0; }
[data-theme="ai"] .themes button { text-decoration: none; }
[data-theme="ai"] #boot .lines { font-size: 13px; line-height: 1.9; }

/* postcards */
.postcards { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 34px 0 10px; }
.postcard { margin: 0; }
.postcard img {
  width: 100%; border-radius: 12px; display: block;
  border: 1px solid var(--hairline);
  aspect-ratio: 4/3; object-fit: cover;
}
.postcard figcaption {
  font-family: var(--mono); font-size: 12px; color: var(--faint);
  margin-top: 10px; text-align: left; padding: 0; line-height: 1.6;
}

/* boot sequence */
#boot {
  position: fixed; inset: 0; z-index: 200;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.45s ease;
  cursor: pointer;
}
#boot.done { opacity: 0; pointer-events: none; }
#boot.hide { display: none; }
#boot .lines {
  font-family: var(--mono); font-size: 14px; line-height: 2.1;
  color: var(--muted); padding: 0 28px;
}
#boot .lines .p { color: var(--accent-ink); }
#boot .lines .ok { color: var(--green); }
#boot .lines .dim { color: var(--faint); }
#boot .lines .skip {
  margin-top: 18px; font-size: 11px; color: var(--faint); letter-spacing: 0.08em;
}

/* ---------- door (root landing) ---------- */
.corner-themes {
  position: fixed; top: 20px; right: 22px; z-index: 50;
}
.door {
  min-height: calc(100vh - 110px);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; padding: 48px 24px 32px;
}
.door .prompt {
  font-family: var(--mono); font-size: 13px;
  color: var(--muted); margin-bottom: 26px;
  letter-spacing: 0.04em;
}
.door .prompt::after {
  content: "▍"; color: var(--accent-ink);
  animation: blink 1.1s steps(1) infinite;
  margin-left: 2px;
}
@keyframes blink { 50% { opacity: 0; } }
.door-avatar {
  width: 72px; height: 72px; border-radius: 50%;
  object-fit: cover; margin-bottom: 26px;
  border: 1px solid var(--line);
}
.door h1 {
  font-size: clamp(72px, 13vw, 160px);
  line-height: 1; margin: 0 0 22px;
}
.door h1 .dot { color: var(--accent-ink); }
.door p {
  color: var(--muted); font-size: 17px;
  max-width: 440px; margin: 0 0 38px;
}
.door .enter {
  font-family: var(--mono); font-size: 15px;
  color: var(--bg); background: var(--accent-ink);
  padding: 15px 42px; border-radius: 999px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.door .enter:hover { transform: translateY(-2px); opacity: 0.92; color: var(--bg); }
.door .alt { margin-top: 30px; font-size: 13px; color: var(--faint); }
.door .alt a { color: var(--muted); }
.door .alt a:hover { color: var(--accent-ink); }
.door-foot { border-top: none; }

/* ---------- brand page ---------- */
.swatches { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 20px 0 8px; }
.swatch { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.swatch .chip { height: 84px; }
.swatch .meta { padding: 12px 14px; font-size: 13px; }
.swatch .meta strong { display: block; font-size: 14px; margin-bottom: 2px; }
.swatch .meta code { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.type-sample { border: 1px solid var(--line); border-radius: 10px; padding: 20px 22px; margin: 12px 0; }
.type-sample .tname { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.type-sample .display { font-family: var(--font-display); font-size: 34px; }
.type-sample .body-t { font-size: 16px; }
.type-sample .mono-t { font-family: var(--mono); font-size: 14px; }
.donts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0; }
.dont { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; font-size: 14px; color: var(--muted); }
.dont strong { color: var(--ink); display: block; margin-bottom: 4px; font-size: 14px; }
.sig-block { border: 1px solid var(--line); border-radius: 10px; padding: 20px 22px; margin: 12px 0; font-size: 14px; }
.sig-block pre { font-family: var(--mono); font-size: 13px; white-space: pre-wrap; color: var(--body); }
.asset-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 16px 0; }
.asset-row a {
  font-family: var(--mono); font-size: 13px;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 10px 20px; color: var(--body);
}
.asset-row a:hover { color: var(--accent-ink); border-color: var(--accent); }

/* letterhead (print page) */
.letterhead-sheet {
  max-width: 720px; margin: 40px auto; background: #fff; color: #111;
  padding: 64px 64px 72px; border: 1px solid var(--line); border-radius: 4px;
}
.letterhead-sheet .lh-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.letterhead-sheet .lh-name { font-family: var(--font-display); font-size: 30px; }
.letterhead-sheet .lh-name em { font-style: normal; color: #6d28d9; }
.letterhead-sheet .lh-contact { font-family: var(--mono); font-size: 12px; color: #555; text-align: right; }
.letterhead-sheet .lh-rule { border: none; border-top: 2px solid #6d28d9; margin: 16px 0 32px; }
.letterhead-sheet .lh-date { font-family: var(--mono); font-size: 13px; color: #555; margin-bottom: 24px; }
.letterhead-sheet .lh-subject { font-weight: 600; margin-bottom: 16px; }
.letterhead-sheet .lh-body p { margin-bottom: 16px; font-size: 15px; line-height: 1.7; color: #222; }
.letterhead-sheet .lh-body .placeholder { color: #999; }
.letterhead-sheet .lh-sign { margin-top: 40px; }
.letterhead-sheet .lh-sign .sig { font-family: var(--font-display); font-size: 26px; font-style: italic; }
.lh-toolbar { max-width: 720px; margin: 24px auto 0; display: flex; gap: 12px; align-items: center; }
.lh-toolbar a.back { font-size: 14px; color: var(--muted); }
.lh-toolbar button {
  font-family: var(--mono); font-size: 13px; cursor: pointer;
  background: var(--accent-ink); color: #fff; border: none;
  padding: 10px 22px; border-radius: 999px;
}
@media print {
  .lh-toolbar, .masthead, footer.site, #boot { display: none !important; }
  body { background: #fff; }
  .letterhead-sheet { border: none; margin: 0; max-width: none; padding: 0; border-radius: 0; }
}

/* ---------- footer ---------- */
footer.site { margin-top: 96px; border-top: 1px solid var(--hairline); padding: 28px 0 56px; }
footer.site .wrap { max-width: 880px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
footer.site .colophon { font-family: var(--mono); font-size: 12px; color: var(--faint); }
footer.site .fine { font-size: 12.5px; color: var(--faint); }

@media (prefers-reduced-motion: reduce) {
  .nameplate .who .caret { animation: none; }
  html { scroll-behavior: auto; }
}

@media (max-width: 640px) {
  .wrap { padding: 0 20px; }
  .nameplate, .index { padding-left: 20px; padding-right: 20px; }
  .nameplate { padding-top: 52px; }
  .nameplate h1 { font-size: clamp(56px, 17vw, 84px); }
  .figures { grid-template-columns: 1fr; }
  .figure + .figure { border-left: none; border-top: 1px solid var(--hairline); }
  .postcards { grid-template-columns: 1fr; }
  .masthead .wrap { max-width: none; }
}
