/* ==================================================================
   Stoic Science: main stylesheet (shared by every page)

   How this file is organised:
     1. Fonts         - Inter, self-hosted from /fonts (no Google calls)
     2. Design tokens - colours, spacing, widths as CSS variables.
                        Change a colour here and it changes everywhere.
     3. Base          - default look of plain HTML elements
     4. Layout        - the page container
     5. Header & nav
     6. Hero          - navy block with the framed headline
     7. Tagline band
     8. Sections      - white content areas
     9. Buttons
    10. Footer
    11. Accessibility helpers
    12. Inner pages   - compact page header, cards, chips, lists
    13. Blog          - post list and article pages

   Remember: after any change here, bump the ?v= number on the
   <link> tag in every page, so browsers fetch the new version.
   ================================================================== */


/* 1. FONTS ---------------------------------------------------------
   One family, three weights. font-display: swap shows text in a
   fallback font straight away, then swaps Inter in when it loads. */
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}


/* 2. DESIGN TOKENS ------------------------------------------------- */
:root {
  /* Brand colours */
  --navy: #1B2A41;          /* primary dark: hero, headings, buttons */
  --navy-deep: #142033;     /* slightly darker navy for the tagline band */
  --gold: #C8A96E;          /* accent: rules, wordmark, tagline. Only on navy,
                               never as text on white (contrast too low) */

  /* Text and surfaces */
  --text: #1F2933;          /* body text on white */
  --muted: #52606D;         /* secondary text */
  --line: #E4E7EB;          /* thin borders and dividers */
  --paper: #FFFFFF;         /* page background */
  --paper-alt: #F5F7FA;     /* light grey for alternating sections */

  /* Type */
  --font: "Inter", "Segoe UI", Arial, sans-serif;

  /* Type scale: the ONLY four text sizes on the site.
     Everything uses one of these, which keeps the look uniform. */
  --fs-sm:   0.9375rem;                     /* 15px: nav, buttons, small print, labels */
  --fs-body: 1.0625rem;                     /* 17px: body text, wordmark, card titles */
  --fs-lg:   1.5rem;                        /* 24px: section headings (h2) */
  --fs-xl:   clamp(1.5rem, 5vw, 2.5rem);    /* 24-40px: page headline (h1), grows with screen.
                                               24px minimum so "Radiopharmaceutical" fits a 320px phone */

  /* Spacing scale: use these instead of random pixel values */
  --space-1: 0.5rem;   /*  8px */
  --space-2: 1rem;     /* 16px */
  --space-3: 1.5rem;   /* 24px */
  --space-4: 2.5rem;   /* 40px */
  --space-5: 4rem;     /* 64px */

  /* Widths */
  --page-max: 880px;   /* one shared column: header, hero frame and sections
                          all start and end at the same edges */
  --text-max: 65ch;    /* comfortable reading line (about 65 characters) */
}


/* 3. BASE ---------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;   /* padding is included in widths: easier maths */
}

html {
  -webkit-text-size-adjust: 100%;   /* stop phones inflating text sizes */
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--text);
  background: var(--paper);
}

h1, h2, h3 {
  color: var(--navy);
  line-height: 1.2;
  font-weight: 600;
  margin: 0 0 var(--space-2);
  text-wrap: balance;        /* evens out line lengths: no lone word on the last line */
}
h2 { font-size: var(--fs-lg); }
h3 { font-size: var(--fs-body); }   /* same size as body, set apart by weight */

p {
  margin: 0 0 var(--space-2);
  max-width: var(--text-max);
}

a {
  color: var(--navy);
}

img {
  max-width: 100%;
  height: auto;
}


/* 4. LAYOUT --------------------------------------------------------
   .container keeps content centred, with 16px side gutters on
   phones and more breathing room on larger screens. */
.container {
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--space-2);
}
@media (min-width: 768px) {
  .container { padding: 0 var(--space-3); }
}


/* 5. HEADER & NAV --------------------------------------------------
   Phone: wordmark on top, nav links wrap underneath.
   Wider screens: wordmark left, nav right, on one line. */
.site-header {
  background: var(--navy);
}
.site-header .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-1) var(--space-3);
  padding-top: var(--space-2);
  padding-bottom: var(--space-2);
}

/* The "Stoic Science" logo: the flask mark, then the text.
   inline-flex lines the mark up with the text's middle; gap sets the space between them. */
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  color: var(--gold);
  font-weight: 600;
  font-size: var(--fs-body);
  letter-spacing: 0.04em;
  text-decoration: none;
}
/* The mark (images/logo-mark.svg, decorative: the text is the accessible name).
   1.9em tall (about 32px) so the thin strokes stay visible; the SVG has its own padding,
   so the drawn flask is about 1.65em. width:auto keeps the square shape. */
.wordmark-mark {
  display: block;
  height: 1.9em;
  width: auto;
  flex: none;      /* never squeezed narrower when the header wraps on a phone */
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) 1.25rem;   /* 20px between links: grouped, not spread */
}
.site-nav a {
  color: #FFFFFF;
  text-decoration: none;
  font-size: var(--fs-sm);
  opacity: 0.85;
}
.site-nav a:hover {
  opacity: 1;
}
/* The current page: full opacity plus a gold underline.
   Set by aria-current="page" on that page's link. */
.site-nav a[aria-current="page"] {
  opacity: 1;
  border-bottom: 2px solid var(--gold);
  padding-bottom: 2px;
}


/* 6. HERO ----------------------------------------------------------
   Navy block; the headline sits in a thin gold frame.
   The frame fills the shared column, so its edges line up with the
   wordmark/nav above and the section text below. */
.hero {
  background: var(--navy);
  color: #FFFFFF;
  padding: var(--space-2) 0 var(--space-4);      /* 16px top, 40px bottom */
}
.hero-frame {
  border: 1px solid rgba(200, 169, 110, 0.55);   /* gold at 55% */
  padding: var(--space-4) var(--space-2);        /* phones: 40px top/bottom, 16px sides */
  text-align: center;
}
@media (min-width: 768px) {
  .hero-frame { padding: var(--space-4) var(--space-3); }   /* wider screens: 24px sides */
}
.hero h1 {
  color: #FFFFFF;
  font-size: var(--fs-xl);
  font-weight: 600;
  margin: 0;
  overflow-wrap: break-word;   /* safety net: a long word wraps instead of overflowing */
}
/* Short gold line under the headline */
.hero-rule {
  width: 64px;
  height: 2px;
  margin: var(--space-3) auto;
  border: 0;
  background: var(--gold);
}
.hero-subline {
  margin: 0 auto;
  max-width: none;
  font-size: var(--fs-sm);
  color: rgba(255, 255, 255, 0.9);
}
/* "Separated lines": the hero subline and the tagline band.
   Items sit in a centred row with gold | separators between them.
   On phones the row wraps; the separators are hidden there so a
   line never starts or ends with a stray "|". */
.sep-line {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 1rem;
}
.sep-line .sep {
  color: var(--gold);
}
@media (max-width: 599px) {
  .sep-line .sep { display: none; }
}


/* 7. TAGLINE BAND --------------------------------------------------
   Design element only (not links) until the blog exists. */
.tagline-band {
  background: var(--navy-deep);
  color: var(--gold);
  text-align: center;
  padding: var(--space-3) var(--space-2);   /* 24px top/bottom: a bit taller */
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.tagline-band p {
  margin: 0 auto;
  max-width: none;
}


/* 8. SECTIONS ------------------------------------------------------
   SITE-WIDE ALIGNMENT RULE (decided 25 Oct 2026):
   "Centered layout, left-aligned reading text."
   - Headings, intros, short card text, labels and buttons: centered,
     on the same axis as the hero.
   - Anything meant for reading (bullet lists, long paragraphs such as
     the About story or blog posts): left-aligned text inside a
     centered column. Use .tick-list or .reading for those. */
.section {
  padding: var(--space-4) 0 var(--space-5);      /* 40px top, 64px bottom */
  text-align: center;
}
/* Paragraphs have a max width; auto side margins keep them on the centre line */
.section p {
  margin-left: auto;
  margin-right: auto;
}
/* Long-form text: a centered column with left-aligned lines */
.reading {
  max-width: var(--text-max);
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}
.section-alt {
  background: var(--paper-alt);
}
/* Bold one-line closer (no longer used on pages; "Let's talk" is now the primary button) */
.lead-out {
  font-weight: 600;
  color: var(--navy);
}


/* 9. BUTTONS -------------------------------------------------------
   .btn is the base; .btn-primary is the filled navy version.
   These are <a> links styled as buttons (they go to other pages). */
.button-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;   /* centered, per the alignment rule */
  gap: var(--space-1) var(--space-2);
  margin-top: var(--space-3);
}
.btn {
  display: inline-block;
  padding: 0.7rem 1.25rem;
  border: 1px solid var(--navy);
  color: var(--navy);
  background: transparent;
  font-weight: 600;
  font-size: var(--fs-sm);
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s;
}
.btn:hover {
  background: var(--navy);
  color: #FFFFFF;
}
.btn-primary {
  background: var(--navy);
  color: #FFFFFF;
}
.btn-primary:hover {
  background: var(--navy-deep);
}


/* 10. FOOTER ------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: var(--space-3) 0;
  font-size: var(--fs-sm);
  color: var(--muted);
}
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-1);
}
.site-footer p {
  margin: 0;
}
.site-footer a {
  color: var(--muted);
}


/* 11. ACCESSIBILITY HELPERS ---------------------------------------- */

/* Visible focus ring for keyboard users, on every link and control.
   Navy on light backgrounds; gold inside the navy areas, where
   navy wouldn't show. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 3px;
}
.site-header :focus-visible,
.hero :focus-visible {
  outline-color: var(--gold);
}

/* "Skip to content" link: hidden until a keyboard user tabs to it */
.skip-link {
  position: absolute;
  left: var(--space-2);
  top: -100px;
  background: var(--paper);
  color: var(--navy);
  padding: var(--space-1) var(--space-2);
  z-index: 10;
}
.skip-link:focus {
  top: var(--space-1);
}

/* Visitors who ask their system for less motion get no transitions */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}


/* 12. INNER PAGES --------------------------------------------------
   Building blocks for About, Services, Sample Work and Contact. */

/* Compact navy page header: a shorter cousin of the Home hero */
.page-hero {
  background: var(--navy);
  color: #FFFFFF;
  padding: var(--space-4) 0;
  text-align: center;
}
.page-hero h1 {
  color: #FFFFFF;
  font-size: var(--fs-xl);
  margin: 0;
}
.page-hero p {
  margin: var(--space-2) auto 0;
  color: rgba(255, 255, 255, 0.9);
}

/* Short intro line under a section heading */
.section-intro {
  color: var(--muted);
}

/* Card grid: one column on phones, two from 640px wide */
.card-grid {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-3);
}
@media (min-width: 640px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  /* Odd number of cards: the last one spans the full row
     instead of sitting alone next to an empty gap */
  .card-grid:not(.cols-3) > .card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}
/* Three columns, used for the engagement models.
   Alex's call: their heading is centered, the card text stays left. */
@media (min-width: 768px) {
  .card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
}
.card-grid.cols-3 .card {
  text-align: left;
}

/* A card: white box, thin border, gold line on top */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 3px solid var(--gold);
  padding: var(--space-3);
}
.card h3 {
  margin-bottom: var(--space-1);
}
.card p {
  margin: 0 auto;            /* auto keeps text centred in a wide card */
  font-size: var(--fs-sm);
  color: var(--muted);
}
/* The one line that sets a card apart (e.g. the radiochemistry differentiator) */
.card .card-note {
  margin-top: var(--space-2);
  color: var(--navy);
  font-weight: 600;
}

/* "Chips": short labels in a row, used for the standards list */
.chip-list {
  list-style: none;
  margin: var(--space-3) 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-1);
}
.chip-list li {
  border: 1px solid var(--navy);
  color: var(--navy);
  padding: 0.35rem 0.85rem;
  font-size: var(--fs-sm);
  font-weight: 600;
}

/* Plain list with small gold squares instead of bullets.
   Reading text: the list block sits centered (fit-content + auto
   margins) but its lines stay left-aligned, so the squares line up. */
.tick-list {
  list-style: none;
  margin: var(--space-3) auto 0;
  padding: 0;
  width: fit-content;
  max-width: var(--text-max);
  text-align: left;
}
.tick-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: var(--space-1);
}
.tick-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 0.5rem;
  height: 0.5rem;
  background: var(--gold);   /* decorative shape, not text: fine on white */
}

/* Notice callout: a short "please note" box.
   Soft gold background, gold edge, round "!" badge, small italic text.
   Reading text, so it is left-aligned inside a centered column. */
.notice {
  display: flex;
  gap: var(--space-2);
  align-items: flex-start;
  max-width: var(--text-max);
  margin: 0 auto;
  padding: var(--space-2) var(--space-3);
  background: rgba(200, 169, 110, 0.18);   /* gold at 18%: a pale gold tint */
  border-left: 4px solid var(--gold);
  text-align: left;
}
/* The round "!" badge */
.notice-icon {
  flex: 0 0 auto;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: var(--gold);
  color: var(--navy);
  font-weight: 700;
  font-style: normal;
  text-align: center;
  line-height: 1.75rem;
}
.notice p {
  margin: 0;
  font-size: var(--fs-sm);
  font-style: italic;
  color: var(--text);
}
.notice strong {
  font-style: normal;
}
/* Less space around a section that only holds a notice */
.section-tight {
  padding: var(--space-3) 0;
}

/* Document entries (Sample Work): small code label above the title */
.doc-code {
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: var(--space-1);
}
/* "Coming soon" entries: same card, quieter */
.card.is-pending {
  border-top-color: var(--line);
}
.card .status {
  margin-top: var(--space-2);
  font-weight: 600;
  color: var(--muted);
}
.card .button-row {
  margin-top: var(--space-2);
}

/* Inside a .reading column, lists and chips line up on the left
   with the text instead of centering */
.reading .chip-list {
  justify-content: flex-start;
  margin-bottom: var(--space-2);
}
.reading .tick-list {
  margin-left: 0;
  width: auto;
}

/* chip-grid: boxes fill each row edge to edge.
   2 per row on phones, 4 per row from 600px. flex-grow (the first 1)
   lets a shorter last row stretch its boxes to the full width, so
   long labels like "Raw material testing" stay on one line. */
.chip-list.chip-grid {
  justify-content: center;
}
.chip-grid li {
  flex: 1 1 calc((100% - var(--space-1)) / 2);       /* 2 per row */
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3.5rem;        /* room for two lines, so all boxes match */
  line-height: 1.3;          /* tighter lines: a two-line label still fits */
  text-align: center;
}
@media (min-width: 600px) {
  .chip-grid li {
    flex-basis: calc((100% - 3 * var(--space-1)) / 4); /* 4 per row */
  }
}
.reading h2 {
  margin-top: var(--space-4);
}
.reading h2:first-child {
  margin-top: 0;
}

/* CONTACT FORM ------------------------------------------------------
   Labels sit above their fields; fields fill the column width. */
.contact-form {
  max-width: 560px;
  margin: var(--space-3) auto 0;
  text-align: left;
}
.contact-form label {
  display: block;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--navy);
  margin: var(--space-2) 0 0.35rem;
}
/* "(optional)" next to a label */
.contact-form label .optional {
  font-weight: 400;
  color: var(--muted);
}
/* Small grey helper line under a label */
.contact-form .hint {
  margin: 0 0 0.35rem;
  font-size: var(--fs-sm);
  color: var(--muted);
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  font: inherit;               /* use the site font, not the browser's default */
  font-size: var(--fs-body);
  color: var(--text);
  background: var(--paper);
  border: 1px solid #9AA5B1;   /* darker than --line so the box edge is easy to see */
  border-radius: 0;
}
.contact-form textarea {
  resize: vertical;            /* visitors can make it taller, not wider */
}
/* Send button: full width of the form, so it lines up with the fields */
.contact-form button {
  width: 100%;
  margin-top: var(--space-3);
  cursor: pointer;
  font-family: inherit;        /* site font; size comes from .btn */
}
/* The spam trap checkbox: present in the page, invisible to people */
.contact-form .botcheck {
  position: absolute;
  left: -9999px;
}
/* Result line written by the script ("Thank you..." or an error) */
.form-status {
  margin-top: var(--space-2);
  font-weight: 600;
  color: var(--navy);
}

/* Closing call-to-action block: a little less space above it,
   since it follows straight on from the section before */
.closing-cta {
  padding-top: var(--space-3);
}


/* 13. BLOG ---------------------------------------------------------
   The list page (blog/index.html) and one page per post.
   Posts are long-form reading text, so they use the .reading column
   (left-aligned lines in a centered column), per the alignment rule. */

/* Post list (Industry Insights page): the classic blog archive layout.
   One entry per post, newest first, divided by thin lines:
   meta line (date · category · reading time), big linked title,
   one-line excerpt, "Read more". Centred column, left-aligned text. */
.post-list {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 720px;
  text-align: left;
}
.post-list li {
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--line);
}
.post-list li:first-child {
  padding-top: 0;
}
/* Paragraphs inside the list line up on the left edge (override the
   site-wide centred-paragraph rule from section 8) */
.post-list p {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}
.post-list h2 {
  font-size: var(--fs-lg);
  margin: 0 0 var(--space-1);
}
.post-list h2 a {
  color: var(--navy);
  text-decoration: none;
}
.post-list h2 a:hover {
  text-decoration: underline;
}
.post-list .post-excerpt {
  margin: 0 0 var(--space-1);
  max-width: none;
  color: var(--text);
}
.read-more {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--navy);
  text-decoration: none;
}
.read-more:hover {
  text-decoration: underline;
}
/* Small "follow" line under the list (RSS feed) */
.feed-note {
  max-width: 720px;
  margin: var(--space-3) auto 0;
  font-size: var(--fs-sm);
  color: var(--muted);
  text-align: left;
}

/* Date and category line, above a post title or in the list */
.post-meta {
  font-size: var(--fs-sm);
  color: var(--muted);
  margin-bottom: var(--space-1);
}
.post-meta .post-cat {
  font-weight: 600;
  color: var(--navy);
}

/* A single post */
.post p,
.post li {
  margin-left: 0;
}
.post a {
  color: var(--navy);
}
/* Sources box at the end of every post */
.post-sources {
  margin-top: var(--space-4);
  padding-top: var(--space-2);
  border-top: 1px solid var(--line);
  font-size: var(--fs-sm);
  color: var(--muted);
}
.post-sources h2 {
  font-size: var(--fs-body);
  margin: 0 0 var(--space-1);
}
.post-sources ul {
  padding-left: 1.1rem;
  margin: 0;
}
.post-sources li {
  margin-bottom: 0.35rem;
  overflow-wrap: anywhere;   /* long URLs wrap instead of overflowing on phones */
}
/* "Back to all posts" link */
.back-link {
  display: inline-block;
  margin-top: var(--space-3);
  font-size: var(--fs-sm);
  font-weight: 600;
}

/* Industry Insights link in the header -------------------------------
   Sits on its own between the wordmark and the menu (the header row uses
   space-between, so the gaps on both sides are equal). Gold pill + a small
   pulsing dot: the "live" part of the site. */
.insights-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.85rem;
  border: 1px solid rgba(200, 169, 110, 0.6);
  border-radius: 999px;
  color: var(--gold);
  font-size: var(--fs-sm);
  font-weight: 600;
  text-decoration: none;
}
.insights-link:hover,
.insights-link[aria-current="page"] {
  background: rgba(200, 169, 110, 0.15);
}
.live-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--gold);
  animation: live-pulse 2.4s ease-in-out infinite;
}
@keyframes live-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.35; }
}
@media (prefers-reduced-motion: reduce) {
  .live-dot { animation: none; }
}

/* Article structure (house style, 25 Oct 2026) ------------------------
   Every post: Introduction, Core message, Takeaway (h2), plus optional
   figures and tables. References are numbered superscript marks [n] that
   jump to the References list; only the list links out to the sources. */
.post h2 {
  font-size: var(--fs-body);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: var(--space-4) 0 var(--space-1);
}
.post h2:first-child {
  margin-top: 0;
}
/* Reference mark: small superscript [n], links down to the reference */
.post sup.ref {
  font-size: 0.72em;
  line-height: 0;
  margin-left: 0.1em;
}
.post sup.ref a {
  text-decoration: none;
  font-weight: 600;
  color: var(--navy);
}
.post sup.ref a:hover {
  text-decoration: underline;
}
/* Numbered reference list at the end of the post */
.references {
  margin-top: var(--space-4);
  padding-top: var(--space-2);
  border-top: 1px solid var(--line);
  font-size: var(--fs-sm);
  color: var(--muted);
}
.references h2 {
  margin-top: 0;
}
.references ol {
  padding-left: 1.6rem;
  margin: 0;
}
.references li {
  margin-bottom: 0.45rem;
  overflow-wrap: anywhere;
  scroll-margin-top: var(--space-3);   /* leave room above when jumped to */
}
.references li:target {
  background: rgba(200, 169, 110, 0.18);   /* briefly mark the reference you jumped to */
}
/* Optional figure (image + caption) */
.post figure {
  margin: var(--space-3) 0;
}
.post figure img {
  display: block;
  border: 1px solid var(--line);
}
.post figcaption {
  margin-top: var(--space-1);
  font-size: var(--fs-sm);
  color: var(--muted);
}
/* Optional table */
.post .table-wrap {
  overflow-x: auto;   /* wide tables scroll on phones instead of breaking the page */
  margin: var(--space-3) 0;
}
.post table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
}
.post th {
  background: var(--navy);
  color: #FFFFFF;
  text-align: left;
  font-weight: 600;
  padding: 0.5rem 0.65rem;
}
.post td {
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.post table caption {
  caption-side: bottom;
  text-align: left;
  padding-top: var(--space-1);
  color: var(--muted);
}

/* Journal layout for articles (Alex, 25 Oct 2026) ----------------------
   - The text column is as wide as the header row: from the "S" of the
     wordmark to the last letter of "Contact" (the shared .container width).
   - Paragraphs are justified, each starting with a first-line indent,
     like a peer-reviewed journal. Hyphenation keeps the spacing even.
   - Section headings and the References heading are centred. */
.reading.post {
  max-width: none;
}
.post p {
  max-width: none;
  text-align: justify;
  text-indent: 2em;
  hyphens: auto;
  -webkit-hyphens: auto;
}
.post h2,
.references h2 {
  text-align: center;
}
.post ol,
.post ul {
  text-align: justify;
  hyphens: auto;
}
.references ol {
  text-align: left;   /* reference entries stay left-aligned: long URLs don't justify well */
}

/* Sub-headings inside an article section (### in draft.md): small, navy, left-aligned */
.post h3 {
  font-size: var(--fs-body);
  color: var(--navy);
  margin: var(--space-3) 0 var(--space-1);
}
