/* Shared styles for articles, legal pages and 404. The landing page has its own inline styles. */
:root {
  --bg: #FBF8F3;
  --surface: #FFFFFF;
  --ink: #1B1A17;
  --ink-2: #4A4740;
  --line: #E4DDD0;
  --soft: #F3EEE5;
  --hl: #FAC775;
  --btn: #1B1A17;
  --btn-hover: #34322C;
  --btn-ink: #FFFFFF;
  --focus: #1D5FD1;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15140F;
    --surface: #201E19;
    --ink: #F4F1EA;
    --ink-2: #D2CDC2;
    --line: #38352D;
    --soft: #2A2822;
    --hl: #EF9F27;
    --btn: #FAC775;
    --btn-hover: #FFD691;
    --btn-ink: #241401;
    --focus: #85B7EB;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: Figtree, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 18px;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

/* Header */
html { scroll-padding-top: 96px; scrollbar-gutter: stable; }
.site-head { position: sticky; top: 0; z-index: 10; width: 100%; background: var(--bg); border-bottom: 1px solid var(--line); padding: 16px max(32px, calc((100% - 1136px) / 2)); display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 24px; text-decoration: none; color: inherit; letter-spacing: -0.01em; }
.logo svg { width: 36px; height: 36px; }
.head-cta { min-height: 48px; padding: 0 20px; border-radius: 12px; background: var(--btn); color: var(--btn-ink); font-weight: 600; font-size: 17px; text-decoration: none; display: inline-flex; align-items: center; white-space: nowrap; }
.head-cta:hover { background: var(--btn-hover); }

/* Reading column */
main { flex: 1; }
.prose { max-width: 700px; margin: 0 auto; padding: 32px 24px 88px; }
.kicker { font-size: 15px; font-weight: 600; color: var(--ink-2); margin: 0 0 14px; letter-spacing: 0.01em; }
.kicker a { color: inherit; text-decoration: none; }
.kicker a:hover { text-decoration: underline; }
.prose h1 { font-size: clamp(34px, 5vw, 46px); line-height: 1.12; letter-spacing: -0.022em; font-weight: 700; margin: 0 0 18px; }
.dek { font-family: Literata, Georgia, serif; font-size: 22px; line-height: 1.5; color: var(--ink-2); margin: 0 0 26px; }
.byline { font-size: 15px; color: var(--ink-2); padding-bottom: 28px; margin: 0 0 40px; border-bottom: 1px solid var(--line); }
.byline:has(+ .listen) { padding-bottom: 0; margin-bottom: 20px; border-bottom: 0; }

/* Listen bar under the article hero */
.listen { display: flex; align-items: center; gap: 16px; margin: 0 0 40px; padding: 14px 20px 14px 14px; border-radius: 16px; background: var(--soft); color: inherit; text-decoration: none; transition: background .15s; }
.listen:hover { background: var(--line); }
.listen-play { width: 48px; height: 48px; border-radius: 50%; background: var(--btn); color: var(--btn-ink); display: grid; place-items: center; flex: none; }
.listen-play svg { width: 22px; height: 22px; margin-left: 2px; }
.listen-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.listen-text strong { font-size: 18px; font-weight: 600; }
.listen-text span { font-size: 15px; color: var(--ink-2); }
.listen-go { margin-left: auto; font-size: 16px; font-weight: 600; white-space: nowrap; }

.body { font-family: Literata, Georgia, serif; font-size: 21px; line-height: 1.75; }
.body p { margin: 0 0 1.4em; }
.body h2 { font-family: Figtree, system-ui, sans-serif; font-size: 28px; line-height: 1.25; letter-spacing: -0.012em; font-weight: 700; margin: 2em 0 0.6em; }
.body h3 { font-family: Figtree, system-ui, sans-serif; font-size: 22px; line-height: 1.3; font-weight: 700; margin: 1.6em 0 0.5em; }
.body ul, .body ol { padding-left: 1.3em; margin: 0 0 1.4em; }
.body li { margin: 0 0 0.5em; padding-left: 0.2em; }
.body a { color: inherit; text-decoration: underline; text-decoration-color: var(--hl); text-decoration-thickness: 3px; text-underline-offset: 4px; }
.body a:hover { text-decoration-color: currentColor; }
.body strong { font-weight: 600; }
.body blockquote { margin: 1.6em 0; padding: 0 0 0 22px; border-left: 3px solid var(--hl); font-style: italic; color: var(--ink-2); }
.body kbd { font-family: Figtree, system-ui, sans-serif; font-size: 0.8em; padding: 2px 8px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; background: var(--surface); }
.body hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 0 0 1.6em; border: 1px solid var(--line); border-radius: 14px; }
.body table { width: 100%; border-collapse: collapse; font-family: Figtree, system-ui, sans-serif; font-size: 17px; line-height: 1.45; min-width: 560px; }
.body th, .body td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.body th { background: var(--soft); font-weight: 600; font-size: 15px; }
.body tr:last-child td { border-bottom: 0; }

/* End-of-article call to action */
.callout { margin: 3em 0 0; padding: 28px; border-radius: 18px; background: var(--soft); font-family: Figtree, system-ui, sans-serif; }
.callout h2 { margin: 0 0 8px; font-size: 24px; }
.callout p { margin: 0 0 20px; font-size: 18px; line-height: 1.5; color: var(--ink-2); }
.body a.head-cta { color: var(--btn-ink); text-decoration: none; }
.body a.head-cta:hover { color: var(--btn-ink); }
.callout .head-cta { min-height: 56px; font-size: 19px; padding: 0 26px; }

/* Article list */
.post-list { list-style: none; padding: 0; margin: 0; }
.post-list li { padding: 28px 0; border-bottom: 1px solid var(--line); }
.post-list li:first-child { padding-top: 0; }
.post-list a { text-decoration: none; color: inherit; display: block; }
.post-list h2 { font-size: 26px; line-height: 1.25; letter-spacing: -0.012em; margin: 0 0 8px; font-weight: 700; }
.post-list a:hover h2 { text-decoration: underline; text-decoration-color: var(--hl); text-decoration-thickness: 3px; text-underline-offset: 4px; }
.post-list p { font-family: Literata, Georgia, serif; font-size: 19px; line-height: 1.6; color: var(--ink-2); margin: 0 0 10px; }
.post-list .meta { font-size: 15px; color: var(--ink-2); }

/* Footer */
footer { border-top: 1px solid var(--line); }
footer .in { max-width: 1080px; margin: 0 auto; padding: 16px 24px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 16px; color: var(--ink-2); }
footer nav { display: flex; gap: 20px; }
footer a { color: inherit; text-decoration: none; }
footer a:hover { text-decoration: underline; }

@media (max-width: 560px) {
  .site-head { padding: 18px 16px; }
  .head-cta { min-height: 44px; padding: 0 14px; font-size: 16px; }
  .prose { padding: 20px 16px 64px; }
  .body { font-size: 20px; }
  .dek { font-size: 20px; }
  .listen-go { display: none; }
  footer .in { padding: 16px; }
}
