/* EQD2 Calculator — shared styles for static content pages (about, author, FAQ) */
/* Matches the document register of terms.html: large headings, readable prose, */
/* rounded tinted teal panels, generous spacing. Built on the site design tokens. */

:root {
  --bg: #FAFAF7;
  --text: #1F1F1F;
  --muted: #6B6B6B;
  --faint: #A8A6A0;
  --rule: #E7E5DE;
  --rule-strong: #D9D6CD;
  --accent: oklch(0.55 0.08 200);
  --accent-soft: oklch(0.93 0.03 200);

  --ff-ui: 'IBM Plex Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
  --ff-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); }
body {
  font-family: var(--ff-ui);
  font-size: 17px;
  line-height: 1.65;
  font-feature-settings: 'ss01';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

::selection { background: var(--accent-soft); color: var(--text); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

.page { max-width: 860px; margin: 0 auto; padding: 48px 32px 110px; }

/* ---- Header (minimal nav, matches calculator brand) ---- */
.site-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 44px;
  color: var(--muted);
  font-size: 13px;
}
.site-head__brand { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.site-head__name {
  font-family: var(--ff-mono);
  font-weight: 500;
  color: var(--text);
  font-size: 13px;
  letter-spacing: 0.04em;
}
.site-head__name a { color: var(--text); text-decoration: none; }
.site-head__sep { color: var(--faint); }
.site-head__back { color: var(--accent); font-size: 13px; white-space: nowrap; text-decoration: none; }
.site-head__back:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---- Title block (document register) ---- */
.lede h1 {
  font-family: var(--ff-ui);
  font-weight: 600;
  font-size: clamp(30px, 5vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  color: var(--text);
}
.lede__cred {
  font-size: 19px;
  color: var(--muted);
  margin: 0 0 28px;
  line-height: 1.4;
}
.lede__intro {
  font-size: 18px;
  line-height: 1.6;
  color: var(--text);
  max-width: 46rem;
  margin: 0;
}

/* ---- Byline (author attribution + connect) ---- */
.byline {
  max-width: 46rem;
  margin: 24px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
}
.byline__links { margin-top: 4px; display: inline-block; }
.byline__sep { margin: 0 8px; color: var(--rule-strong); }

/* ---- Tinted teal panel (the terms.html "CONTENTS" box treatment) ---- */
.panel {
  background: var(--accent-soft);
  border-radius: 14px;
  padding: 28px 32px;
  margin: 28px 0;
  max-width: 46rem;
}
.panel__label {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 18px;
}
.panel p { margin: 0 0 12px; }
.panel p:last-child { margin: 0; }
.panel .formula-line {
  font-family: var(--ff-mono);
  font-size: 16px;
  color: var(--text);
  margin: 0 0 12px;
  line-height: 1.4;
}
.panel .formula-line:last-child { margin: 0; }

/* At-a-glance rows inside a panel */
.glance { display: grid; gap: 12px; }
.glance__row { display: flex; gap: 16px; }
.glance__k {
  flex: 0 0 132px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 600;
  padding-top: 3px;
}
.glance__v { flex: 1; min-width: 0; font-size: 16px; }
.glance__colon { display: none; }  /* shown only as a fallback when this stylesheet fails to load */

/* ---- Sections (document register: readable Title-case headings) ---- */
section { max-width: 46rem; }
.sec { margin-top: 44px; }
.sec h2 {
  font-family: var(--ff-ui);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0 0 14px;
  line-height: 1.25;
}
.sec h3 {
  font-family: var(--ff-ui);
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  margin: 22px 0 6px;
}
.sec p { margin: 0 0 16px; color: var(--text); }
.sec p:last-child { margin-bottom: 0; }
.muted { color: var(--muted); }

/* ---- Inline supporting formula (gray inset) ---- */
.formula {
  font-family: var(--ff-mono);
  font-size: 15px;
  color: var(--text);
  background: color-mix(in oklab, var(--text) 3%, transparent);
  padding: 12px 16px;
  border-radius: 8px;
  margin: 8px 0 16px;
  overflow-x: auto;
  white-space: nowrap;
}

/* ---- Definition-style lists (education, etc.) ---- */
.deflist { list-style: none; margin: 6px 0 0; padding: 0; }
.deflist li {
  display: flex;
  gap: 18px;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
}
.deflist li:last-child { border-bottom: 0; }
.deflist__year {
  font-family: var(--ff-mono);
  font-size: 14px;
  color: var(--faint);
  flex: 0 0 56px;
  padding-top: 2px;
}
.deflist__body { flex: 1; min-width: 0; }
.deflist__body strong { font-weight: 600; }
.deflist__body span { color: var(--muted); }

/* ---- Publication list ---- */
.pubs { list-style: none; margin: 0; padding: 0; }
.pubs li {
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 15px;
  line-height: 1.55;
}
.pubs li:last-child { border-bottom: 0; }
.pubs .pubs__venue { color: var(--muted); font-style: italic; }

/* ---- Simple bullet list ---- */
ul.plain { margin: 8px 0 0; padding-left: 20px; }
ul.plain li { margin: 6px 0; }

/* ---- "Next" inline link to the deeper page ---- */
.golink { margin-top: 20px; font-size: 16px; }

/* ---- Footer (matches calculator: centered disclaimer + legal line) ---- */
.site-foot {
  margin-top: 60px;
  padding-top: 34px;
  border-top: 1px solid var(--rule-strong);
  text-align: center;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.6;
}
.site-foot__disclaimer { max-width: 42rem; margin: 0 auto 20px; }
.site-foot__disclaimer p { margin: 0 0 6px; }
.site-foot__disclaimer p:last-child { margin-bottom: 0; }
.site-foot__legal { color: var(--faint); font-size: 13px; }
.site-foot__legal a { color: var(--muted); }
.site-foot__sep { margin: 0 8px; color: var(--rule-strong); }

@media (max-width: 640px) {
  .page { padding: 36px 20px 90px; }
  .site-head { margin-bottom: 34px; }
  .lede__cred { font-size: 17px; }
  .lede__intro { font-size: 17px; }
  .panel { padding: 22px 22px; border-radius: 12px; }
  .glance__row { flex-direction: column; gap: 2px; }
  .glance__k { flex-basis: auto; padding-top: 0; }
  .sec h2 { font-size: 20px; }
  .deflist li { flex-direction: column; gap: 2px; }
  .deflist__year { flex-basis: auto; }
}

/* ---- Reference list (numbered citations) ---- */
.refs {
  margin: 6px 0 0;
  padding-left: 22px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}
.refs li { margin: 7px 0; padding-left: 4px; }
.refs li em { font-style: italic; }
.sec sup { font-size: 0.7em; line-height: 0; vertical-align: super; color: var(--accent); font-weight: 500; }
