/* =========================================================================
   heygetwell.com — shared design system
   A public health-research notebook. Calm, legible, mechanism-first.
   Single stylesheet shared by every page. Edit here, it changes everywhere.
   ========================================================================= */

:root {
  /* Palette — warm paper light theme */
  --bg:            #faf8f4;
  --bg-raised:     #ffffff;
  --bg-sunken:     #f2efe8;
  --border:        #e4dfd4;
  --border-strong: #d3ccbd;
  --text:          #23201b;
  --text-soft:     #5b554b;
  --text-faint:    #8a8377;
  --accent:        #2f6f5e;   /* deep teal-green: "well" */
  --accent-soft:   #e3efe9;
  --accent-ink:    #1f4d41;
  --warn:          #a8541b;

  /* Type */
  --font-serif: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  --font-sans:  ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono:  ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;

  /* Rhythm */
  --measure: 42rem;         /* reading width for prose */
  --wide:    72rem;         /* page max width */
  --radius:  10px;
  --gap:     1.5rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:            #17181a;
    --bg-raised:     #1f2124;
    --bg-sunken:     #131416;
    --border:        #2c2f33;
    --border-strong: #3b3f44;
    --text:          #e9e6df;
    --text-soft:     #b1ada3;
    --text-faint:    #7f7b72;
    --accent:        #5bbfa3;
    --accent-soft:   #1c2b28;
    --accent-ink:    #9fe0cc;
    --warn:          #e0925a;
  }
}

/* ---- reset-ish ---- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 1.125rem;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent-ink); text-underline-offset: 2px; }
a:hover { color: var(--accent); }

/* ---- layout shells ---- */
.wrap  { max-width: var(--wide); margin: 0 auto; padding: 0 1.25rem; }
.prose { max-width: var(--measure); margin: 0 auto; padding: 0 1.25rem; }

/* ---- site header ---- */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg-raised);
}
.site-header .wrap {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; padding-top: 1.05rem; padding-bottom: 1.05rem; flex-wrap: wrap;
}
.brand {
  font-family: var(--font-sans);
  font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em;
  color: var(--text); text-decoration: none;
}
.brand span { color: var(--accent); }
.nav { display: flex; gap: 1.4rem; font-family: var(--font-sans); font-size: .95rem; }
.nav a { color: var(--text-soft); text-decoration: none; }
.nav a:hover { color: var(--accent); }

/* ---- hero / intro ---- */
.hero { padding: 3.5rem 0 2rem; }
.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem); line-height: 1.12;
  letter-spacing: -0.02em; margin: 0 0 1rem;
}
.hero .lede {
  font-size: 1.3rem; color: var(--text-soft); max-width: 40rem; margin: 0;
}

/* ---- section headings ---- */
.section-label {
  font-family: var(--font-sans); font-size: .78rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: var(--text-faint);
  margin: 3rem 0 1.1rem;
}

/* ---- topic hub cards ---- */
.topic-grid {
  display: grid; gap: var(--gap);
  grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr));
}
.topic-card {
  display: block; background: var(--bg-raised);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.4rem 1.5rem; text-decoration: none; color: inherit;
  transition: border-color .15s ease, transform .15s ease;
}
.topic-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.topic-card h3 {
  font-family: var(--font-sans); font-size: 1.2rem; margin: 0 0 .4rem;
  letter-spacing: -0.01em;
}
.topic-card p { margin: 0; color: var(--text-soft); font-size: 1rem; }
.topic-card .meta {
  margin-top: .9rem; font-family: var(--font-mono); font-size: .78rem;
  color: var(--text-faint);
}

/* ---- status pill ---- */
.pill {
  display: inline-block; font-family: var(--font-sans); font-size: .72rem;
  font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  padding: .18rem .6rem; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-ink);
  border: 1px solid var(--border);
}
.pill.active   { background: var(--accent-soft); color: var(--accent-ink); }
.pill.ongoing  { background: var(--bg-sunken);  color: var(--text-soft); }

/* ---- log entry list ---- */
.log-list { list-style: none; padding: 0; margin: 0; }
.log-list li {
  border-top: 1px solid var(--border); padding: 1.15rem 0;
}
.log-list a {
  font-family: var(--font-sans); font-size: 1.15rem; text-decoration: none;
  color: var(--text); letter-spacing: -0.01em;
}
.log-list a:hover { color: var(--accent); }
.log-list .row { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; flex-wrap: wrap; }
.log-list time, .log-list .topic-tag {
  font-family: var(--font-mono); font-size: .8rem; color: var(--text-faint);
  white-space: nowrap;
}
.log-list p { margin: .4rem 0 0; color: var(--text-soft); font-size: 1rem; }

/* ---- article (prose) ---- */
article.prose { padding-top: 2.5rem; padding-bottom: 4rem; }
article .kicker {
  font-family: var(--font-mono); font-size: .82rem; color: var(--accent);
  letter-spacing: .02em; margin: 0 0 .6rem;
}
article h1 {
  font-size: clamp(1.8rem, 4.5vw, 2.6rem); line-height: 1.15;
  letter-spacing: -0.02em; margin: 0 0 .6rem;
}
article .byline {
  font-family: var(--font-sans); font-size: .9rem; color: var(--text-faint);
  margin: 0 0 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--border);
}
article h2 { font-size: 1.6rem; letter-spacing: -0.01em; margin: 2.6rem 0 .8rem; }
article h3 { font-size: 1.25rem; font-family: var(--font-sans); margin: 2rem 0 .6rem; }
article p, article li { color: var(--text); }
article blockquote {
  margin: 1.6rem 0; padding: .4rem 0 .4rem 1.3rem;
  border-left: 3px solid var(--accent); color: var(--text-soft); font-style: italic;
}
article code {
  font-family: var(--font-mono); font-size: .88em;
  background: var(--bg-sunken); padding: .12em .38em; border-radius: 5px;
}
article pre {
  background: var(--bg-sunken); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem 1.2rem; overflow-x: auto;
}
article pre code { background: none; padding: 0; }
article hr { border: none; border-top: 1px solid var(--border); margin: 2.5rem 0; }

/* callout box for hypotheses / open questions */
.callout {
  background: var(--bg-raised); border: 1px solid var(--border);
  border-left: 3px solid var(--warn); border-radius: var(--radius);
  padding: 1rem 1.3rem; margin: 1.8rem 0;
}
.callout .callout-label {
  font-family: var(--font-sans); font-size: .75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em; color: var(--warn);
  margin: 0 0 .35rem;
}
.callout p:last-child { margin-bottom: 0; }

/* references list */
.references { font-size: .95rem; color: var(--text-soft); }
.references ol { padding-left: 1.2rem; }

/* ---- footer ---- */
.site-footer {
  border-top: 1px solid var(--border); margin-top: 4rem;
  background: var(--bg-raised);
}
.site-footer .wrap {
  padding-top: 2rem; padding-bottom: 2.5rem;
  font-family: var(--font-sans); font-size: .9rem; color: var(--text-faint);
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.site-footer a { color: var(--text-soft); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.disclaimer {
  max-width: var(--measure); margin: 1.5rem auto 0; padding: 0 1.25rem;
  font-family: var(--font-sans); font-size: .82rem; color: var(--text-faint);
  line-height: 1.55;
}
