/**
 * The marketing frontpage's look for signed-in pages: paper teal,
 * Instrument Serif display, JetBrains Mono labels, white cards.
 *
 * Scoped to .mg-wrap so the signed-in navbar, footer and Bootstrap pieces
 * keep theirs. Used by the archives and the subscribe page; Stats
 * (views/logged-in/stats.php) and MG Jodo carry the same tokens inline.
 * A page loads it with the fonts:
 *   $head_extra .= mg_look_head();   // components/global_functions.php
 */
.mg-wrap {
  --paper: #F4F9F9; --paper-2: #E8F3F3; --paper-3: #D5E9E9;
  --ink: #0D2126; --ink-2: #1C3236; --ink-soft: #456770; --ink-mute: #4e666a;
  --rule: #C9DFE0; --rule-soft: #E1ECEC;
  --accent: #53a3a4; --accent-ink: #027497; --accent-soft: #CFE5E6; --accent-2: #286F6F;
  --shadow-1: 0 1px 0 rgba(13,33,38,.05), 0 2px 6px rgba(13,33,38,.06);
  --shadow-2: 0 2px 0 rgba(13,33,38,.05), 0 18px 40px -18px rgba(13,33,38,.25);
  background: var(--paper);
  color: var(--ink);
  font-family: "Instrument Sans", system-ui, sans-serif;
}
.mg-page { max-width: 1100px; margin: 0 auto; padding: 40px 20px 72px; }
.mg-wrap [hidden] { display: none !important; }
.mg-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Head: eyebrow chip, display heading with one italic teal word, lede. */
.mg-eyebrow { display: inline-flex; align-items: center; gap: 10px; font: 500 11px "JetBrains Mono", monospace; text-transform: uppercase;
  letter-spacing: .18em; color: var(--ink-soft); padding: 6px 12px 6px 10px; border: 1px solid var(--rule); border-radius: 999px; background: #fff; }
.mg-eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: #2E8B4E; }
.mg-wrap h1.mg-display { font-family: "Instrument Serif", serif; font-weight: 400; font-size: clamp(44px, 6vw, 76px); line-height: .98;
  letter-spacing: -.025em; margin: 18px 0 14px; color: var(--ink); text-wrap: balance; }
.mg-wrap h1 em, .mg-wrap h2 em, .mg-wrap h3 em { font-style: italic; color: var(--accent-ink); }
.mg-lede { font-size: 18px; color: var(--ink-soft); max-width: 640px; margin: 0 0 28px; }
.mg-wrap h2.mg-h2 { font-family: "Instrument Serif", serif; font-weight: 400; font-size: clamp(30px, 4vw, 42px); line-height: 1.02; letter-spacing: -.02em; margin: 0; }
.mg-tag { font: 500 11px "JetBrains Mono", monospace; text-transform: uppercase; letter-spacing: .16em; color: var(--ink-mute); }
.mg-section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin: 0 0 16px; }
@media (max-width: 700px) { .mg-section-head { flex-direction: column; align-items: flex-start; } }

/* Pills: tabs and filters. Active is ink. */
.mg-pills { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 0 0 20px; }
.mg-pill { display: inline-flex; align-items: center; gap: 6px; font: 600 15px "Instrument Sans", sans-serif; padding: 9px 16px; border-radius: 999px;
  border: 1px solid var(--rule); background: #fff; color: var(--ink); cursor: pointer; text-decoration: none; min-height: 40px;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.mg-pill:hover { border-color: var(--accent); color: var(--ink); }
.mg-pill.active, .mg-pill[aria-current="page"], .mg-pill[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.mg-pills .mg-tag { margin-right: 4px; }

/* Cards and notes. */
.mg-card { background: #fff; border: 1px solid var(--rule); border-radius: 20px; padding: 22px; box-shadow: var(--shadow-1); }
.mg-card h3 { font-family: "Instrument Serif", serif; font-weight: 400; font-size: 30px; line-height: 1.05; margin: 0; }
.mg-note { background: var(--paper-2); border: 1px solid var(--accent); border-radius: 16px; padding: 14px 18px; margin: 0 0 18px; color: var(--ink); }
.mg-note.warm { background: #fffbeb; border-color: #f59e0b; }
.mg-note a, .mg-lede a { color: var(--accent-ink); text-decoration: underline; }   /* links inside text: underlined, not just coloured */

/* Tables: mono uppercase heads, hairline rows. */
.mg-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; position: relative; }   /* relative: keeps hidden .mg-sr text inside, or it widens the page */
.mg-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.mg-table th { font: 500 10.5px "JetBrains Mono", monospace; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-mute);
  text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--rule); white-space: nowrap; background: none; }
.mg-table td { padding: 11px 10px; border-bottom: 1px solid var(--rule-soft); vertical-align: middle; }
.mg-table tbody tr:hover td { background: var(--paper); }
.mg-table .num, .mg-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.mg-table .center { text-align: center; }
.mg-table .muted { color: var(--ink-mute); }

/* Buttons. */
.mg-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 15px "Instrument Sans", sans-serif;
  padding: 11px 20px; border-radius: 999px; border: 1px solid var(--rule); background: #fff; color: var(--ink); text-decoration: none; cursor: pointer; }
.mg-btn:hover { border-color: var(--accent); color: var(--ink); }
.mg-btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; box-shadow: 0 1px 0 rgba(13,33,38,.25), 0 10px 22px -10px rgba(13,33,38,.5); }
.mg-btn.primary:hover { background: var(--ink-2); color: #fff; }

.mg-wrap a:focus-visible, .mg-wrap button:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 2px; }
