/* meringominutes.app — one stylesheet for every page.
   Tokens follow the Meringo family (meringo-web/colors_and_type.css),
   held back for a professional reader: no glows, no gradients, gold only
   where it earns attention. Dark is the family default; light follows the
   system unless the visitor chooses. */

/* ─── Fonts (self-hosted; no third-party requests) ───────────────────── */
@font-face {
  font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url('/assets/fonts/cormorant-normal-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url('/assets/fonts/cormorant-normal-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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Cormorant Garamond'; font-style: italic; font-weight: 300 700; font-display: swap;
  src: url('/assets/fonts/cormorant-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Cormorant Garamond'; font-style: italic; font-weight: 300 700; font-display: swap;
  src: url('/assets/fonts/cormorant-italic-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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('/assets/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('/assets/fonts/inter-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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ─── Tokens ─────────────────────────────────────────────────────────── */
:root {
  color-scheme: dark;

  /* Site, dark (the family palette) */
  --bg: #07040E;
  --surface-1: #1A1128;
  --surface-2: #2D1C47;
  --border: #3D2D5A;
  --text: #F4E8D0;
  --text-2: #B8A88A;
  --text-3: #907D61;          /* on --bg and --surface-1 only */
  --heading: #F4E8D0;
  --accent: #EDA040;          /* links, focus, the one primary button */
  --accent-ink: #EDA040;
  --on-accent: #1C1426;
  --focus: #EDA040;
  --rule: rgba(237, 160, 64, 0.35);

  /* The app window, re-set from the 2026-09-23 capture (dark appearance) */
  --app-window: #21201F;
  --app-bar: #282624;
  --app-border: #3A3836;
  --app-text: #ECEBEA;
  --app-text-2: #A19D99;
  --app-field: #2C2A28;
  --app-traced: #27B0B8;
  --app-traced-ink: #5CC9CF;
  --app-setaside: #D57F2C;
  --app-setaside-ink: #E7A35F;

  /* Type */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-ui: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-app: -apple-system, BlinkMacSystemFont, 'Inter', system-ui, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --text-xs: 13px;
  --text-sm: 15px;
  --text-base: 17px;
  --text-md: 19px;
  --text-lg: 24px;
  --text-xl: 32px;

  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-6: 24px; --space-8: 32px; --space-12: 48px; --space-16: 64px;
  --space-24: 96px;

  --radius-sm: 6px;
  --radius-md: 12px;
  --measure: 68ch;
  --page: 1120px;
  --gutter: 24px;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --fast: 150ms;
}

/* Light — the system asks for it and the visitor hasn't overridden it */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #FAF6EE;
    --surface-1: #F3EDE2;
    --surface-2: #EAE1D2;
    --border: #D9CDB8;
    --text: #1C1426;
    --text-2: #4E4358;
    --text-3: #6A5B50;
    --heading: #2D1C47;
    --accent: #EDA040;
    --accent-ink: #8A5A12;
    --on-accent: #1C1426;
    --focus: #2D1C47;
    --rule: rgba(138, 90, 18, 0.35);

    --app-window: #FFFFFF;
    --app-bar: #F6F5F4;
    --app-border: #DAD7D3;
    --app-text: #1D1D1F;
    --app-text-2: #6E6E73;
    --app-field: #FFFFFF;
    --app-traced: #31B9C3;
    --app-traced-ink: #0E6E75;
    --app-setaside: #F4934B;
    --app-setaside-ink: #9A4A0B;
  }
}
/* Light — chosen explicitly */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #FAF6EE;
  --surface-1: #F3EDE2;
  --surface-2: #EAE1D2;
  --border: #D9CDB8;
  --text: #1C1426;
  --text-2: #4E4358;
  --text-3: #6A5B50;
  --heading: #2D1C47;
  --accent: #EDA040;
  --accent-ink: #8A5A12;
  --on-accent: #1C1426;
  --focus: #2D1C47;
  --rule: rgba(138, 90, 18, 0.35);

  --app-window: #FFFFFF;
  --app-bar: #F6F5F4;
  --app-border: #DAD7D3;
  --app-text: #1D1D1F;
  --app-text-2: #6E6E73;
  --app-field: #FFFFFF;
  --app-traced: #31B9C3;
  --app-traced-ink: #0E6E75;
  --app-setaside: #F4934B;
  --app-setaside-ink: #9A4A0B;
}

/* ─── Base ───────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: var(--text-base);
  line-height: 1.6;
  font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; height: auto; }
p { margin: 0 0 var(--space-4); }
a { color: var(--accent-ink); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}
::selection { background: var(--surface-2); color: var(--text); }

h1, h2, h3 { color: var(--heading); margin: 0; }
h1, h2 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(44px, 6.4vw, 72px); line-height: 1.02; }
h2 { font-size: clamp(32px, 4vw, 44px); line-height: 1.1; }

.wrap { max-width: var(--page); margin: 0 auto; padding: 0 var(--gutter); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Skip link */
.skip-link {
  position: absolute; left: var(--space-4); top: -100px; z-index: 100;
  background: var(--accent); color: var(--on-accent);
  padding: var(--space-2) var(--space-4); border-radius: var(--radius-sm);
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: var(--space-4); }
#content:focus { outline: none; }

/* ─── Header ─────────────────────────────────────────────────────────── */
.site-header { border-bottom: 1px solid var(--border); }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 68px; gap: var(--space-4);
}
.brand {
  display: inline-flex; align-items: center; gap: var(--space-3);
  color: var(--heading); text-decoration: none;
}
.brand img { width: 30px; height: 30px; }
.brand span {
  font-family: var(--font-display); font-size: 25px; font-weight: 600; letter-spacing: 0;
  line-height: 1;
}
.header-note { font-size: var(--text-sm); color: var(--text-2); }
.header-end { display: flex; align-items: center; gap: var(--space-3); }
.header-note { margin: 0; }
.header-note a { color: var(--text-2); }
.brand span, .header-note a { white-space: nowrap; }
@media (max-width: 520px) { .hide-narrow { display: none; } }
@media (max-width: 440px) { .brand span { font-size: 21px; } .brand { gap: var(--space-2); } }
@media (max-width: 359px) { .header-note { display: none; } }

/* Theme toggle: System → Light → Dark. Hidden until site.js runs. */
.theme-toggle {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px; padding: 0;
  border: 1px solid var(--border); border-radius: 50%;
  background: transparent; color: var(--text-2); cursor: pointer;
  transition: color var(--fast) var(--ease), border-color var(--fast) var(--ease);
}
.theme-toggle:hover { color: var(--text); border-color: var(--text-3); }
.theme-toggle[hidden] { display: none; }
.theme-toggle svg { display: none; }
.theme-toggle[data-choice="system"] .icon-system,
.theme-toggle[data-choice="light"] .icon-light,
.theme-toggle[data-choice="dark"] .icon-dark { display: block; }

/* ─── Buttons ────────────────────────────────────────────────────────── */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 48px; padding: 0 var(--space-6);
  border-radius: 10px; border: 1px solid transparent;
  font: 600 var(--text-base)/1 var(--font-ui);
  text-decoration: none; cursor: pointer;
  transition: background-color var(--fast) var(--ease), border-color var(--fast) var(--ease);
}
.button-primary { background: var(--accent); color: var(--on-accent); }
.button-primary:hover { background: #F4C071; }
.button-quiet { color: var(--text); border-color: var(--border); background: transparent; }
.button-quiet:hover { border-color: var(--text-3); }

/* ─── Hero ───────────────────────────────────────────────────────────── */
.hero { padding: var(--space-24) 0 var(--space-16); }
.hero .wrap {
  display: grid; gap: var(--space-12);
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
}
@media (min-width: 960px) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: var(--space-16); }
}
.eyebrow {
  font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-2); margin-bottom: var(--space-6);
  display: flex; align-items: center; gap: var(--space-3);
}
.eyebrow::before { content: ''; width: 28px; height: 1px; background: var(--accent); }
.hero h1 { margin-bottom: var(--space-6); font-size: clamp(40px, 5.4vw, 64px); line-height: 1.04; }
.lead { font-size: var(--text-md); color: var(--text-2); max-width: 34em; margin-bottom: var(--space-8); }
.actions { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.fine { font-size: var(--text-sm); color: var(--text-2); }

/* ─── The app window (re-set from the app's own output) ──────────────── */
.app-window {
  background: var(--app-window);
  color: var(--app-text);
  border: 1px solid var(--app-border);
  border-radius: var(--radius-md);
  font-family: var(--font-app);
  font-size: 15px;
  line-height: 1.45;
  overflow: hidden;
}
.app-bar {
  display: flex; align-items: center; gap: var(--space-4);
  padding: var(--space-3) var(--space-4);
  background: var(--app-bar); border-bottom: 1px solid var(--app-border);
}
.app-lights { display: flex; gap: 7px; }
.app-lights i { width: 11px; height: 11px; border-radius: 50%; background: var(--app-border); }
.app-title { font-weight: 600; font-size: 14px; }
.app-body { padding: var(--space-6); }
.app-meeting { font-weight: 700; font-size: 19px; margin-bottom: 2px; }
.app-meta { color: var(--app-text-2); font-size: 13px; margin-bottom: var(--space-4); }
.app-tabs {
  display: inline-flex; border: 1px solid var(--app-border); border-radius: 7px;
  overflow: hidden; margin-bottom: var(--space-4); font-size: 13px;
}
.app-tabs span { padding: 4px 12px; color: var(--app-text-2); }
.app-tabs span + span { border-left: 1px solid var(--app-border); }
.app-tabs [aria-current] { color: var(--app-text); background: var(--app-bar); font-weight: 600; }
.app-ask { display: flex; gap: var(--space-2); align-items: flex-start; margin-bottom: var(--space-4); }
.app-field {
  flex: 1 1 auto; min-width: 0;
  background: var(--app-field); border: 1px solid var(--app-border); border-radius: 6px;
  padding: 7px 10px;
}
.app-scope {
  flex: 0 0 auto; border: 1px solid var(--app-border); border-radius: 6px;
  padding: 7px 10px; color: var(--app-text-2); white-space: nowrap;
}
.app-answer { margin: 0; font-size: 16px; }
@media (max-width: 520px) {
  :root { --gutter: 16px; }
  .hero { padding-top: var(--space-12); }
  .app-ask { flex-direction: column; align-items: stretch; }
  .app-scope { align-self: flex-start; }
  .app-body { padding: var(--space-4); }
}

.figure { margin: 0; }
.figure figcaption { margin-top: var(--space-3); font-size: var(--text-xs); color: var(--text-2); }
.note {
  margin-top: var(--space-6); padding-left: var(--space-4);
  border-left: 2px solid var(--rule);
  font-size: var(--text-sm); color: var(--text-2);
}
.note q { color: var(--text); }

/* ─── Sections ───────────────────────────────────────────────────────── */
.section { padding: var(--space-16) 0; border-top: 1px solid var(--border); }
.section h2 { margin-bottom: var(--space-6); }
.prose { max-width: var(--measure); }
.prose p { color: var(--text-2); }
.prose strong { color: var(--text); font-weight: 600; }

/* ─── Components ───────────────────────────────────────────────────── */
hr, .rule { border: 0; height: 1px; background: var(--rule); margin: var(--space-12) 0; }
.card {
  background: var(--surface-1); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: var(--space-6);
}
.card > :last-child { margin-bottom: 0; }
.grid { display: grid; gap: var(--space-6); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) { .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Facts: a definition list of label → value, each value a sourced fact */
.facts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; margin: 0 0 var(--space-6); }
.facts > div { display: grid; gap: var(--space-1); padding: var(--space-3) 0; border-top: 1px solid var(--border); }
.facts > div:last-child { border-bottom: 1px solid var(--border); }
.facts dt { font-size: var(--text-sm); color: var(--text-2); }
.facts dd { margin: 0; color: var(--text); }
@media (min-width: 640px) {
  .facts > div { grid-template-columns: minmax(0, 14em) minmax(0, 1fr); gap: var(--space-6); }
}

/* A quotation of the app's own words */
.app-quote {
  margin: 0 0 var(--space-6); padding: var(--space-4) var(--space-6);
  border-left: 2px solid var(--border); background: var(--surface-1);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-family: var(--font-app); color: var(--text);
}
.app-quote p { margin: 0; }
.app-quote cite { display: block; margin-top: var(--space-2); font-style: normal; font-size: var(--text-xs); color: var(--text-2); }

/* ─── Content pages: <main class="page"> (also the desk's page template) ─ */
main.page {
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin: 0 auto;
  padding: var(--space-16) var(--gutter) var(--space-24);
}
main.page h1 { font-size: clamp(40px, 5.4vw, 56px); line-height: 1.05; margin-bottom: var(--space-6); }
main.page h2 { font-size: clamp(28px, 3.4vw, 34px); margin: var(--space-12) 0 var(--space-4); }
main.page h3 { font: 600 var(--text-md)/1.35 var(--font-ui); margin: var(--space-8) 0 var(--space-2); }
main.page p, main.page li { color: var(--text); }
main.page .page-lede { font-size: var(--text-md); color: var(--text-2); }
main.page ul, main.page ol { padding-left: 1.25em; margin: 0 0 var(--space-6); }
main.page li { margin-bottom: var(--space-2); }
main.page li::marker { color: var(--text-3); }
main.page code { font-family: var(--font-mono); font-size: 0.92em; background: var(--surface-1); padding: 1px 5px; border-radius: 4px; }
.page-label {
  font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-2); margin-bottom: var(--space-4);
}
.table-wrap { overflow-x: auto; margin: 0 0 var(--space-6); }
main.page table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
main.page th, main.page td { text-align: left; vertical-align: top; padding: var(--space-3) var(--space-4) var(--space-3) 0; border-bottom: 1px solid var(--border); }
main.page th { color: var(--text-2); font-weight: 600; }

/* ─── Footer ─────────────────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--border); padding: var(--space-12) 0 var(--space-16); }
.site-footer .wrap {
  display: grid; gap: var(--space-8);
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 760px) {
  .site-footer .wrap { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
}
.footer-mark { display: flex; gap: var(--space-4); align-items: flex-start; }
.footer-mark img { width: 44px; height: 44px; border-radius: 10px; flex: 0 0 auto; }
.footer-mark p { margin: 0; font-size: var(--text-sm); color: var(--text-2); }
.footer-mark strong { color: var(--text); font-weight: 600; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); font-size: var(--text-sm); }
.footer-links a { color: var(--text-2); text-decoration: none; }
.footer-links a:hover { color: var(--text); text-decoration: underline; }
.footer-tagline {
  font-family: var(--font-display); font-size: 22px; line-height: 1.3; color: var(--heading);
  margin: var(--space-6) 0 0;
}
.footer-tagline em { color: var(--accent-ink); }
.footer-legal { font-size: var(--text-xs); color: var(--text-2); margin-top: var(--space-4); }

/* ─── 404 ────────────────────────────────────────────────────────────── */
.not-found { padding: var(--space-24) 0; min-height: 60vh; }
.not-found .app-window { max-width: 620px; margin-top: var(--space-8); }
.not-found .back { margin-top: var(--space-6); }

/* ─── Motion ─────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
