/* ============================================================
   Rich content written through the page editor.

   Tailwind's preflight strips list markers, margins and padding from <ul>
   and <ol>, so markup authored in TinyMCE needs them restored explicitly.
   Everything is scoped to .rich-content, so none of it can leak into the
   nav, the cards or any utility-driven layout.

   This file is hand-written and deliberately NOT part of the Tailwind
   build: assets/css/app.css is a compiled artifact and there is no Node
   toolchain on the server, so anything appended there would be lost on
   the next rebuild. The same rules are mirrored in src/styles/main.css
   so a future rebuild keeps them.
   ============================================================ */

.rich-content > :first-child { margin-top: 0; }
.rich-content > :last-child { margin-bottom: 0; }

.rich-content p { margin: 0 0 1rem; }

/* ── Lists ───────────────────────────────────────────────── */
.rich-content ul,
.rich-content ol {
  margin: 0 0 1.25rem;
  padding-left: 1.5rem;
}

.rich-content ul { list-style: disc outside; }
.rich-content ol { list-style: decimal outside; }
.rich-content ul ul { list-style: circle outside; }
.rich-content ol ol { list-style: lower-alpha outside; }

.rich-content ul ul,
.rich-content ol ol,
.rich-content ul ol,
.rich-content ol ul {
  margin: 0.3rem 0 0.3rem;
}

.rich-content li { margin: 0 0 0.35rem; }
.rich-content li:last-child { margin-bottom: 0; }
.rich-content li::marker { color: var(--color-gold, #c9a84c); }

/* ── Headings ────────────────────────────────────────────── */
.rich-content h2,
.rich-content h3,
.rich-content h4 {
  font-family: var(--font-heading, Georgia, serif);
  color: var(--color-navy, #1a1a2e);
  line-height: 1.25;
  margin: 1.75rem 0 0.6rem;
}

.rich-content h2 { font-size: 1.5rem; font-weight: 600; }
.rich-content h3 { font-size: 1.25rem; font-weight: 600; letter-spacing: 0.01em; }
.rich-content h4 { font-size: 1.08rem; font-weight: 600; }

/* A heading straight after a list still needs its breathing room, but the
   first heading in a block must not push the block away from its own title. */
.rich-content > h2:first-child,
.rich-content > h3:first-child,
.rich-content > h4:first-child { margin-top: 0; }

.rich-content strong,
.rich-content b { font-weight: 700; color: var(--color-navy, #1a1a2e); }

/* ── Links ───────────────────────────────────────────────── */
.rich-content a {
  color: var(--color-gold, #c9a84c);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s;
}

.rich-content a:hover { color: var(--color-gold-hover, #d4b85c); }

/* ── Quotes, rules, tables, media ────────────────────────── */
.rich-content blockquote {
  margin: 1.25rem 0;
  padding: 0.2rem 0 0.2rem 1rem;
  border-left: 3px solid var(--color-gold, #c9a84c);
  color: var(--color-muted, #5f727f);
  font-style: italic;
}

.rich-content hr {
  border: 0;
  border-top: 2px solid var(--color-gold, #c9a84c);
  width: 60px;
  margin: 1.75rem 0;
}

.rich-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.25rem;
  font-size: 0.95em;
}

.rich-content th,
.rich-content td {
  border: 1px solid var(--color-border, #e5e2dc);
  padding: 0.5rem 0.75rem;
  text-align: left;
}

.rich-content th {
  background: rgba(0, 0, 0, 0.03);
  font-weight: 600;
}

.rich-content img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  margin: 0.5rem 0 1.25rem;
}

.rich-content figure { margin: 0 0 1.25rem; }

.rich-content figcaption {
  margin-top: 0.4rem;
  font-size: 0.85em;
  color: var(--color-muted, #5f727f);
}

/* On a dark section the inherited colour is white; keep headings and bold
   text readable instead of forcing them back to navy. */
.text-white .rich-content h2,
.text-white .rich-content h3,
.text-white .rich-content h4,
.text-white .rich-content strong,
.text-white .rich-content b { color: inherit; }

/* ============================================================
   Central European letters (Latin Extended)

   The site's own font files hold Western European letters only. They have
   A-acute and O-umlaut but not R-caron, S-caron, c-caron, L-stroke and the
   rest, so "DVORAK" with its proper R was drawn with a letter borrowed from
   a different, heavier font, and the same would happen to Janacek, Martinu
   or Lutoslawski.

   These two files are the Latin Extended part of the same two typefaces
   (SIL Open Font License, from Google Fonts). Each is one variable file
   covering every weight. unicode-range means a browser downloads one only
   when the page actually contains such a letter. They are declared after
   app.css on purpose: for a letter in this range the last matching face
   wins, so these are used instead of the incomplete originals.
   ============================================================ */
/* One face per weight the site uses, each with the SAME weight value as the
   original face it completes. A browser groups faces by identical weight; a
   face declared with a weight range ("300 700") is not grouped with the
   original "600" face and is never consulted. Both weights of a family point
   at the same variable file, which is downloaded once. */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/assets/fonts/cormorant-garamond-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/assets/fonts/cormorant-garamond-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/source-sans-3-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/assets/fonts/source-sans-3-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
