/* Text Analysis International — shared styles (2026 refresh) */

:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --text: #1c1d26;
  --muted: #5b5e6e;
  --line: #e4e2dc;
  --brand: #14147a;      /* navy from the original logo */
  --accent: #b0127f;     /* magenta from the original logo */
  --green: #18803a;
  --notice-bg: #f3f1ff;
  --radius: 10px;
  --max: 1080px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: Charter, "Bitstream Charter", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12131a;
    --surface: #1b1c25;
    --text: #e8e8ee;
    --muted: #a2a5b6;
    --line: #2d2f3c;
    --brand: #a9a9ff;
    --accent: #f27cc9;
    --green: #6fd38e;
    --notice-bg: #1f1f33;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 var(--font);
}

img { max-width: 100%; height: auto; }

a { color: var(--brand); text-underline-offset: 2px; }
a:hover { color: var(--accent); }

h1, h2, h3 { font-family: var(--serif); line-height: 1.2; font-weight: 700; }
h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 0 0 .5rem; letter-spacing: -.01em; }
h2 { font-size: 1.6rem; margin: 2.5rem 0 .75rem; }
h3 { font-size: 1.15rem; margin: 0 0 .35rem; }

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

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--surface); padding: 8px 12px; z-index: 10; }

/* Header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.brand img { width: 48px; border-radius: 6px; background: #fff; padding: 2px; }
.brand strong { display: block; font-family: var(--serif); font-size: 1.1rem; }
.brand span { display: block; font-size: .8rem; color: var(--muted); }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: .95rem; }
.site-nav a { text-decoration: none; color: var(--muted); padding: 4px 0; border-bottom: 2px solid transparent; }
.site-nav a:hover { color: var(--text); }
.site-nav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); }

/* Hero */
.hero { padding: 56px 0 32px; }
.hero .lede { font-size: 1.2rem; color: var(--muted); max-width: 46rem; margin: 0; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 600; color: var(--accent); margin: 0 0 .75rem; }

.notice {
  background: var(--notice-bg); border-left: 4px solid var(--brand);
  border-radius: var(--radius); padding: 16px 20px; margin: 28px 0 0; max-width: 46rem;
}
.notice p { margin: 0; }

.button {
  display: inline-block; background: var(--brand); color: var(--bg); text-decoration: none;
  padding: 10px 18px; border-radius: 8px; font-weight: 600; font-size: .95rem;
}
.button:hover { background: var(--accent); color: #fff; }
.button.ghost { background: transparent; color: var(--brand); border: 1px solid var(--line); }
.button.ghost:hover { border-color: var(--accent); color: var(--accent); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }

/* Feature: book */
.feature {
  display: grid; grid-template-columns: 220px 1fr; gap: 32px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; margin: 24px 0;
}
.feature img { border-radius: 6px; box-shadow: 0 6px 20px rgba(0,0,0,.18); }
.feature h2 { margin-top: 0; }
@media (max-width: 640px) {
  .feature { grid-template-columns: 1fr; padding: 20px; }
  .feature img { max-width: 200px; }
}

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin: 16px 0; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; text-decoration: none; color: var(--text); display: block;
}
a.card:hover { border-color: var(--accent); color: var(--text); }
.card p { margin: 0; color: var(--muted); font-size: .95rem; }

/* Prose pages */
.prose { max-width: 46rem; }
.prose p, .prose li { color: var(--text); }
.page-head { padding: 48px 0 8px; }
.page-head .lede { font-size: 1.15rem; color: var(--muted); max-width: 46rem; margin: 0; }

/* Timeline */
.timeline { list-style: none; padding: 0; margin: 16px 0; max-width: 46rem; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 22px 24px; }
.timeline li::before {
  content: ""; position: absolute; left: -7px; top: 8px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--surface); border: 2px solid var(--accent);
}
.timeline .when { font-weight: 700; font-family: var(--serif); display: block; }

/* People */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.person h3 { margin-bottom: 0; }
.person .role { color: var(--accent); font-size: .9rem; margin: 0 0 8px; }

/* Quotes */
.quotes { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
blockquote {
  margin: 0; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px;
}
blockquote p { margin: 0 0 12px; font-family: var(--serif); font-size: 1.05rem; }
blockquote footer { color: var(--muted); font-size: .88rem; }

/* Download table */
.files { width: 100%; border-collapse: collapse; margin: 12px 0 8px; font-size: .95rem; }
.files th, .files td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.files th { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.files td.size { white-space: nowrap; color: var(--muted); }
.files td small { display: block; color: var(--muted); }
@media (max-width: 640px) {
  .files thead { display: none; }
  .files tr { display: block; border-bottom: 1px solid var(--line); padding: 10px 0; }
  .files td { display: block; border: 0; padding: 2px 0; }
}

/* Archive pages */
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: .75rem; }
.crumbs a { color: var(--muted); }
.crumbs span { margin: 0 4px; }

.subnav { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 20px; }
.subnav a {
  font-size: .88rem; text-decoration: none; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; background: var(--surface);
}
.subnav a:hover { color: var(--text); border-color: var(--accent); }
.subnav a[aria-current="page"] { color: var(--bg); background: var(--brand); border-color: var(--brand); }

.archived {
  font-size: .85rem; color: var(--muted); max-width: 46rem;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 8px 0; margin: 0 0 24px;
}

.legacy h2 { font-size: 1.3rem; margin: 2rem 0 .5rem; clear: both; }
.legacy figure.shot { margin: 16px 0 24px; }
.legacy figure.shot img {
  display: block; border: 1px solid var(--line); border-radius: 6px;
  background: #fff; padding: 4px; box-shadow: 0 2px 10px rgba(0,0,0,.06);
}
.legacy img.inline { float: right; max-width: 40%; margin: 4px 0 12px 16px; background: #fff; border-radius: 4px; }
.legacy::after { content: ""; display: block; clear: both; }
.legacy code { font-size: .92em; background: var(--notice-bg); padding: 1px 4px; border-radius: 4px; }

.table-wrap { overflow-x: auto; margin: 16px 0 24px; }
table.data { border-collapse: collapse; font-size: .92rem; min-width: 100%; }
table.data th, table.data td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
table.data th { background: var(--notice-bg); font-size: .8rem; letter-spacing: .04em; text-transform: uppercase; }
table.data p { margin: 0 0 6px; }
table.data p:last-child { margin: 0; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 46rem; margin: 40px 0 0; }
.pager a {
  display: block; text-decoration: none; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px 16px; color: var(--text); font-weight: 600;
}
.pager a:hover { border-color: var(--accent); }
.pager small { display: block; font-weight: 400; color: var(--muted); font-size: .8rem; }
.pager .next { text-align: right; }

.toc { max-width: 46rem; padding-left: 1.4rem; margin: 20px 0 28px; }
.toc li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.toc li a { font-weight: 600; }
.toc li span { display: block; color: var(--muted); font-size: .92rem; }

.archive-list { columns: 2 260px; column-gap: 32px; padding: 0; list-style: none; margin: 8px 0; }
.archive-list li { padding: 4px 0; break-inside: avoid; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 64px; padding: 28px 0 40px; color: var(--muted); font-size: .88rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; }
.site-footer a { color: var(--muted); }
.site-footer p { margin: 0; }
