/* Passerie — public site. Typography-led, no framework, no JS. */

:root {
  --paper:   #faf8f4;
  --ink:     #1c1a17;
  --muted:   #6b645c;
  --rule:    #e4ded4;
  --accent:  #a84b2a;
  --code-bg: #f2ede5;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:   #15130f;
    --ink:     #ece7de;
    --muted:   #9a9186;
    --rule:    #2e2a24;
    --accent:  #e08a5f;
    --code-bg: #1e1b16;
  }
}

* { 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: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 43rem;
  margin: 0 auto;
  padding: 4rem 1.5rem 6rem;
}

/* ---- masthead ---- */

.masthead {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding-bottom: 1.25rem;
  margin-bottom: 3rem;
  border-bottom: 1px solid var(--rule);
}

.wordmark {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}

.masthead .tag {
  font-size: 0.8rem;
  color: var(--muted);
}

/* ---- type ---- */

h1 {
  font-family: var(--serif);
  font-size: clamp(2.1rem, 6vw, 2.9rem);
  line-height: 1.12;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 0.6rem;
}

.standfirst {
  font-size: 1.16rem;
  line-height: 1.55;
  color: var(--muted);
  margin: 0 0 3rem;
}

h2 {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 3rem 0 0.85rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--rule);
}

h2:first-of-type { border-top: none; padding-top: 0; }

p { margin: 0 0 1.1rem; }

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

strong { font-weight: 640; }

.lede-note {
  font-size: 0.98rem;
  color: var(--muted);
  border-left: 2px solid var(--rule);
  padding-left: 1rem;
  margin: 0 0 1.1rem;
}

/* ---- code ---- */

pre, code { font-family: var(--mono); }

pre {
  background: var(--code-bg);
  border: 1px solid var(--rule);
  border-radius: 5px;
  padding: 0.95rem 1.1rem;
  overflow-x: auto;
  font-size: 0.9rem;
  line-height: 1.55;
  margin: 0 0 1.3rem;
}

pre code { font-size: inherit; }

p code, li code, td code {
  background: var(--code-bg);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 0.08em 0.34em;
  font-size: 0.88em;
  word-break: break-word;
}

/* ---- facts table ---- */

table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.4rem;
  font-size: 0.96rem;
}

th, td {
  text-align: left;
  vertical-align: top;
  padding: 0.6rem 0.9rem 0.6rem 0;
  border-bottom: 1px solid var(--rule);
}

th {
  font-weight: 560;
  color: var(--muted);
  width: 42%;
  padding-right: 1.4rem;
}

tr:last-child th, tr:last-child td { border-bottom: none; }

.table-scroll { overflow-x: auto; }

/* ---- lists ---- */

ul { margin: 0 0 1.2rem; padding-left: 1.15rem; }
li { margin-bottom: 0.5rem; }
li::marker { color: var(--muted); }

/* ---- callout ---- */

.callout {
  background: var(--code-bg);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 1.15rem 1.3rem;
  margin: 0 0 1.4rem;
}

.callout p:last-child { margin-bottom: 0; }

.callout h3 {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 640;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.6rem;
}

/* ---- footer ---- */

footer {
  margin-top: 4.5rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--rule);
  font-size: 0.88rem;
  color: var(--muted);
}

footer a { color: var(--muted); }

/* ---- landing ---- */

.landing-links {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
}

.landing-links li {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--rule);
}

.landing-links a { font-weight: 560; }

.landing-links span {
  display: block;
  color: var(--muted);
  font-size: 0.94rem;
}
