/* Idunia editorial stylesheet — Grove tokens (parchment / forest / gold),
   Fraunces display + Inter body. Warm, on-brand, deliberately light-only.
   Shared by the articles, author, and methodology pages. */

:root {
  --parchment: #EFE5CC;
  --cream: #FBF6E9;
  --ink: #17251A;
  --forest-900: #0F2114;
  --forest-700: #1B3122;
  --forest-500: #294A34;
  --muted: #5A6A58;
  --gold: #F4CE66;
  --clay: #A94E28;
  --line: #D9CDB0;
  --maxw: 40rem;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--parchment);
  color: var(--ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 1.125rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

/* never let a long token (DOI, URL) push content past the viewport on mobile */
.post a, .post code, .post li { overflow-wrap: anywhere; }

h1, h2, h3 {
  font-family: Fraunces, Georgia, "Times New Roman", serif;
  color: var(--forest-900);
  line-height: 1.15;
  letter-spacing: -0.01em;
  font-weight: 600;
}

a { color: var(--clay); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--forest-700); }

/* ---- site chrome ---- */
header.site {
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--parchment) 88%, white);
}
header.site .bar {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
header.site .brand {
  font-family: Fraunces, serif;
  font-weight: 600;
  font-size: 1.4rem;
  color: var(--forest-900);
  text-decoration: none;
}
header.site nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  margin-left: 1rem;
}
header.site nav a:hover { color: var(--forest-700); }
header.site .bar-right { display: flex; align-items: center; gap: 1.25rem; }
header.site .applink {
  font-weight: 600; font-size: 0.9rem; text-decoration: none; white-space: nowrap;
  color: var(--gold); background: var(--forest-900);
  border: 1px solid rgba(244, 206, 102, .35);
  padding: 0.5rem 1rem; border-radius: 999px;
  transition: background .2s;
}
header.site .applink:hover { background: var(--forest-700); color: var(--gold); }
@media (max-width: 34rem) {
  header.site nav a { margin-left: 0.75rem; white-space: nowrap; }
  header.site nav a[href="/methodology"] { display: none; } /* stays in the footer */
  header.site .bar-right { gap: 0.75rem; }
  header.site .applink { padding: 0.45rem 0.8rem; }
}

/* ---- layout ---- */
main { max-width: var(--maxw); margin: 0 auto; padding: 2.5rem 1.25rem 4rem; }

main.index .lede h1 { font-size: 2.5rem; margin: 0 0 0.5rem; }
main.index .lede p { color: var(--muted); font-size: 1.2rem; margin: 0 0 2.5rem; }

/* ---- post list ---- */
.post-list { list-style: none; padding: 0; margin: 0 0 3rem; display: grid; gap: 0.25rem; }
.post-list a {
  display: block;
  padding: 1.25rem 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
}
.post-list li:last-child a { border-bottom: 1px solid var(--line); }
.post-list .t { display: block; font-family: Fraunces, serif; font-size: 1.35rem; color: var(--forest-900); font-weight: 600; }
.post-list .d { display: block; color: var(--muted); font-size: 1rem; margin-top: 0.25rem; }
.post-list time { display: block; color: var(--muted); font-size: 0.85rem; margin-top: 0.5rem; letter-spacing: 0.02em; }
.post-list a:hover .t { color: var(--clay); }
.empty { color: var(--muted); font-style: italic; padding: 2rem 0 3rem; }

/* ---- article ---- */
.post .back { display: inline-block; font-size: 0.95rem; color: var(--muted); text-decoration: none; margin-bottom: 1.5rem; }
.post .back:hover { color: var(--forest-700); }
.post h1 { font-size: 2.35rem; margin: 0 0 0.75rem; }
.post .byline { color: var(--muted); font-size: 0.95rem; margin: 0 0 2.5rem; }
.post .byline a { color: var(--forest-700); }
.post article > h2 { font-size: 1.6rem; margin: 2.5rem 0 0.75rem; }
.post article > h3 { font-size: 1.25rem; margin: 2rem 0 0.5rem; }
.post p { margin: 0 0 1.25rem; }
.post ul, .post ol { margin: 0 0 1.25rem; padding-left: 1.5rem; }
.post li { margin: 0.4rem 0; }
.post img { max-width: 100%; height: auto; border-radius: 0.5rem; margin: 1.5rem 0; }
.post hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }

blockquote {
  margin: 1.75rem 0;
  padding: 0.5rem 0 0.5rem 1.25rem;
  border-left: 3px solid var(--gold);
  color: var(--forest-700);
  font-style: italic;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.1em 0.35em;
}

/* footnote anchors -> visible Sources block */
sup.fn { font-size: 0.7em; line-height: 0; }
sup.fn a { text-decoration: none; color: var(--clay); font-weight: 600; padding: 0 0.1em; }

/* ---- subscribe ---- */
.subscribe {
  margin: 3rem 0 0;
  padding: 1.75rem;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
}
.subscribe h2 { font-size: 1.4rem; margin: 0 0 0.5rem; }
.subscribe p { color: var(--muted); font-size: 1rem; margin: 0 0 1rem; }
.subscribe form { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.subscribe input {
  flex: 1 1 14rem;
  min-width: 0;
  padding: 0.7rem 0.9rem;
  font: inherit;
  font-size: 1rem;
  border: 1px solid var(--forest-500);
  border-radius: 0.5rem;
  background: #fff;
  color: var(--ink);
}
.subscribe input:focus-visible { outline: 2px solid var(--forest-700); outline-offset: 1px; }
.subscribe button {
  padding: 0.7rem 1.4rem;
  font: inherit;
  font-weight: 600;
  color: var(--cream);
  background: var(--forest-700);
  border: 0;
  border-radius: 0.5rem;
  cursor: pointer;
}
.subscribe button:hover { background: var(--forest-900); }
.subscribe .fine { font-size: 0.85rem; color: var(--muted); margin: 0.9rem 0 0; }
.subscribe .fine a { color: var(--forest-700); }

/* ---- footer ---- */
footer.site {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
  padding: 2rem 1.25rem 3rem;
}
footer.site a { color: var(--forest-700); }
footer.site .disclose { max-width: var(--maxw); margin: 0.75rem auto 0; font-size: 0.8rem; }

.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;
}

@media (max-width: 34rem) {
  body { font-size: 1.05rem; }
  main.index .lede h1 { font-size: 2rem; }
  .post h1 { font-size: 1.9rem; }
}
