/*!
 * AminosInfo — Article Theme  v1.1.0
 *
 * Most articles on the site now carry the AminosInfo palette in their own markup,
 * recoloured at source. This stylesheet covers only what cannot be done there:
 *   1. the ai-* monographs, whose colours come from CSS custom properties
 *   2. the display face for article headings
 *   3. one shared treatment for table heads, so tables match across every article
 * It deliberately sets no body, link or heading COLOURS outside the ai-* system:
 * those are already correct in the markup, and overriding them blindly is how
 * light text ends up on a light panel.
 */

:root{
  --sat-paper:#f5f1e8;
  --sat-paper-2:#ece6d8;
  --sat-white:#fffdf8;
  --sat-ink:#10201c;
  --sat-ink-2:#34443f;
  --sat-muted:#5f6e68;
  --sat-accent:#0f6b5a;
  --sat-accent-deep:#0a4a3e;
  --sat-accent-soft:#eaf1ee;
  --sat-accent-mid:#3f8d7d;
  --sat-gold:#a67c3d;
  --sat-gold-soft:#f7f1e4;
  --sat-gold-light:#dcc08a;
  --sat-pine:#0b2722;
  --sat-pine-2:#113630;
  --sat-line:#ddd6c5;
  --sat-line-soft:#e9e3d5;
  --sat-brick:#9a3b2a;
  --sat-brick-soft:#f8eee9;
  --sat-on-dark:#efe9dc;
  --sat-on-dark-dim:#c3cdc4;
  --sat-display:"Newsreader","Iowan Old Style","Palatino Linotype",Georgia,serif;
}

/* ======================================================================
   SYSTEM A — the ai-* article system (104 posts)
   Tokens first, then the hard-coded literals the template also carries.
   ====================================================================== */
[id^="ai-"]{
  --ai-ink:var(--sat-ink) !important;
  --ai-muted:var(--sat-muted) !important;
  --ai-teal:var(--sat-accent) !important;
  --ai-cyan:var(--sat-gold-light) !important;
  --ai-deep:var(--sat-pine) !important;
  --ai-line:var(--sat-line) !important;
  --ai-soft:var(--sat-paper-2) !important;
  --ai-gold:var(--sat-gold) !important;
  --ai-purple:var(--sat-gold) !important;
}

/* links */
[id^="ai-"] a{ color:var(--sat-accent) !important; }
[id^="ai-"] a:hover{ color:var(--sat-accent-deep) !important; }
[id^="ai-"] a:focus-visible,
[id^="ai-"] summary:focus-visible,
[id^="ai-"] [tabindex]:focus-visible{ outline-color:var(--sat-gold) !important; }

/* hero */
[id^="ai-"] .ai-hero{
  background:
    radial-gradient(ellipse at 100% 0,rgba(15,107,90,.38),transparent 58%),
    linear-gradient(150deg,var(--sat-pine) 0%,var(--sat-pine-2) 55%,#17433a 100%) !important;
}
[id^="ai-"] .ai-hero{ color:var(--sat-on-dark) !important; }
[id^="ai-"] .ai-hero:after{ border-color:rgba(220,192,138,.22) !important; box-shadow:none !important; }
[id^="ai-"] .ai-eyebrow{ color:var(--sat-gold-light) !important; }
[id^="ai-"] .ai-hero h2{ color:#fff !important; }
[id^="ai-"] .ai-hero h2 span{ color:var(--sat-on-dark) !important; }
[id^="ai-"] .ai-hero .ai-lead{ color:var(--sat-on-dark) !important; }
[id^="ai-"] .ai-hero .ai-meta{ color:var(--sat-on-dark-dim) !important; }
[id^="ai-"] .ai-hero .ai-actions a{
  background:var(--sat-gold-light) !important;
  border-color:var(--sat-gold-light) !important;
  color:var(--sat-pine) !important;
}
[id^="ai-"] .ai-hero .ai-actions a:last-child{
  background:transparent !important;
  border-color:rgba(239,233,220,.42) !important;
  color:var(--sat-on-dark) !important;
}

/* status strip, notes */
[id^="ai-"] .ai-status>div{ background:var(--sat-white) !important; border-top-color:var(--sat-accent) !important; }
[id^="ai-"] .ai-status span{ color:var(--sat-muted) !important; }
[id^="ai-"] .ai-note{
  border-color:var(--sat-line) !important;
  border-left-color:var(--sat-accent) !important;
  background:var(--sat-accent-soft) !important;
}
[id^="ai-"] .ai-note.ai-amber{
  border-color:var(--sat-line) !important;
  border-left-color:var(--sat-gold) !important;
  background:var(--sat-gold-soft) !important;
}
[id^="ai-"] .ai-note.ai-neutral{
  border-color:var(--sat-line) !important;
  border-left-color:var(--sat-muted) !important;
  background:var(--sat-paper-2) !important;
}

/* contents, sections */
[id^="ai-"] .ai-toc{ background:var(--sat-paper-2) !important; border-color:var(--sat-line) !important; }
[id^="ai-"] .ai-toc a{ color:var(--sat-ink-2) !important; }
[id^="ai-"] .ai-toc a:before{ color:var(--sat-accent) !important; }
[id^="ai-"] .ai-section{ background:var(--sat-white) !important; border-color:var(--sat-line) !important; }
[id^="ai-"] .ai-section .ai-num{ color:var(--sat-accent) !important; }
[id^="ai-"] .ai-deck{ color:var(--sat-muted) !important; }
[id^="ai-"] .ai-card .ai-label{ color:var(--sat-muted) !important; }
[id^="ai-"] .ai-caption,[id^="ai-"] .ai-refs small{ color:var(--sat-muted) !important; }

/* accent-coded cards and pills */
[id^="ai-"] .ai-receptor{ border-top-color:var(--sat-accent) !important; }
[id^="ai-"] .ai-receptor:nth-child(2){ border-top-color:var(--sat-gold) !important; }
[id^="ai-"] .ai-receptor:nth-child(3){ border-top-color:var(--sat-accent-mid) !important; }
[id^="ai-"] .ai-pill{ background:var(--sat-accent-soft) !important; color:var(--sat-accent-deep) !important; }
[id^="ai-"] .ai-pill.ai-pending{ background:var(--sat-gold-soft) !important; color:#7d5a1d !important; }

/* tables */
[id^="ai-"] table{ background:var(--sat-white) !important; }
[id^="ai-"] caption{ background:var(--sat-paper-2) !important; color:var(--sat-ink-2) !important; }
[id^="ai-"] th{ background:var(--sat-pine) !important; color:#fff !important; }
[id^="ai-"] tbody tr:nth-child(even){ background:var(--sat-paper) !important; }

/* timeline, maths, lists, FAQ */
[id^="ai-"] .ai-timeline{ border-left-color:var(--sat-line) !important; }
[id^="ai-"] .ai-timeline li:before{ background:var(--sat-accent) !important; border-color:var(--sat-white) !important; }
[id^="ai-"] .ai-timeline time{ color:var(--sat-accent) !important; }
[id^="ai-"] .ai-math{ border-color:var(--sat-line) !important; background:var(--sat-accent-soft) !important; }
[id^="ai-"] .ai-math .ai-math-title{ color:var(--sat-muted) !important; }
[id^="ai-"] .ai-math .ai-equation{ color:var(--sat-accent-deep) !important; }
[id^="ai-"] .ai-question-list li{ background:var(--sat-paper-2) !important; border-color:var(--sat-line) !important; }
[id^="ai-"] .ai-question-list strong{ color:var(--sat-ink) !important; }
[id^="ai-"] details{ background:var(--sat-white) !important; border-color:var(--sat-line) !important; }
[id^="ai-"] summary{ color:var(--sat-ink) !important; }
[id^="ai-"] summary:after{ color:var(--sat-accent) !important; }
[id^="ai-"] details[open] summary{ background:var(--sat-accent-soft) !important; }
[id^="ai-"] .ai-glossary div{ background:var(--sat-paper-2) !important; border-color:var(--sat-line) !important; }
[id^="ai-"] .ai-glossary dt{ color:var(--sat-ink) !important; }
[id^="ai-"] .ai-glossary dd{ color:var(--sat-muted) !important; }

/* closing panel */
[id^="ai-"] .ai-end{ background:var(--sat-pine) !important; color:var(--sat-on-dark) !important; }
[id^="ai-"] .ai-end h2{ color:#fff !important; }
[id^="ai-"] .ai-end a{ color:var(--sat-gold-light) !important; }


/* ======================================================================
   Typography — article headings take the site's display face.
   Colour is deliberately NOT set here: each article already carries the
   right one, including white headings on dark panels.
   ====================================================================== */
.aip-entry-content h1,.aip-entry-content h2,.aip-entry-content h3,.aip-entry-content h4{
  font-family:var(--sat-display) !important;
  font-weight:600 !important;
  letter-spacing:-.015em !important;
}
[id^="ai-"] .ai-eyebrow,[id^="ai-"] .ai-num,[id^="ai-"] .ai-label,
[id^="ai-"] .ai-status span,[id^="ai-"] .ai-pill,[id^="ai-"] caption,
[id^="ai-"] .ai-math .ai-math-title,[id^="ai-"] .ai-timeline time{
  font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif !important;
  letter-spacing:.06em !important;
}

/* ======================================================================
   Table heads — one treatment everywhere, so tables read the same from
   article to article. Both ground and text are set, so this can't strand
   dark text on a dark ground.
   ====================================================================== */
.aip-entry-content th{ background:var(--sat-pine) !important; color:#fff !important; }

/* Leave the peptide-database plugin alone */
.aip-entry-content .sa-pdb h1,.aip-entry-content .sa-pdb h2,
.aip-entry-content .sa-pdb h3,.aip-entry-content .sa-pdb h4{ font-family:inherit !important; }
.aip-entry-content .sa-pdb th{ background:inherit !important; color:inherit !important; }
