/* GTM Matters. Brand: Pegasus Strategy Co (pegasusstrategy.co).
   Type: Figtree for all text, DM Serif Text italic for one accent word.
   Two themes on one palette: dark (navy ground) and light (cream ground).
   Contrast notes are against the page ground of each theme. */

@font-face {
  font-family: "Figtree";
  src: url("/fonts/figtree-var.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DM Serif Text";
  src: url("/fonts/dm-serif-text-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  --navy: #0a182d;
  --cream: #fffff8;
  --sky: #6ac0ef;
  --mint: #8adbc6;
  --gold: #deae6f;
  --grad: linear-gradient(90deg, var(--sky), var(--mint));
  --font: "Figtree", Helvetica, Arial, sans-serif;
  --serif: "DM Serif Text", Georgia, "Times New Roman", serif;
  --radius: 8px;
  --wrap: 1280px;

  /* dark theme (default) */
  --bg: #0a182d;
  --surface: #0f2139;
  --surface-2: #152c4a;
  --footer-bg: #08131f;
  --line: rgba(255, 255, 248, 0.12);
  --line-strong: rgba(255, 255, 248, 0.24);
  --head: #fffff8;
  --body: #cfd5de;      /* 11.6:1 */
  --muted: #9aa6b8;     /* 6.9:1 */
  --link: #6ac0ef;      /* 8.4:1 */
  --label: #deae6f;     /* 8.3:1 */
  --accent-grad: var(--grad);
  --answer-bg: #13294a;
  --answer-text: #eef2f7;
  --answer-label: #8adbc6;
  --band-bg: #0f2139;
  --input-bg: #0a182d;
  --chip: rgba(255, 255, 248, 0.1);
  --shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.6);
  --gsource-bg: #071222;
  --gsource-text: #fffff8;
  --gsource-line: rgba(255, 255, 248, 0.2);
  /* Animated background (src/client/bg.js): navy into deep sky and mint hues.
     The brightest color keeps --muted text at 4.6:1 or more, grain included. */
  --bgfx-back: #0a182d;
  --bgfx-1: #142a44;    /* deep navy blue */
  --bgfx-2: #16365a;    /* deep sky */
  --bgfx-3: #123a42;    /* deep mint */
  --bgfx-grain: 1;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #fffff8;
  --surface: #ffffff;
  --surface-2: #f2f4f7;
  --footer-bg: #f4f3ea;
  --line: rgba(10, 24, 45, 0.12);
  --line-strong: rgba(10, 24, 45, 0.26);
  --head: #0a182d;      /* 17.6:1 */
  --body: #33415a;      /* 10.3:1 */
  --muted: #566274;     /* 6.2:1 */
  --link: #0a639a;      /* 6.4:1 */
  --label: #84540f;     /* 6.3:1 */
  --accent-grad: linear-gradient(90deg, #168ecf, #309c80);
  --answer-bg: #0a182d;
  --answer-text: #f2f4f7;
  --answer-label: #8adbc6;
  --band-bg: #f1f1e8;
  --input-bg: #ffffff;
  --chip: rgba(10, 24, 45, 0.07);
  --shadow: 0 24px 60px -24px rgba(10, 24, 45, 0.35);
  --gsource-bg: #ffffff;
  --gsource-text: #0a182d;
  --gsource-line: rgba(10, 24, 45, 0.16);
  /* Cream into sky and mint tints. The darkest tint keeps --muted text at 4.6:1 or more. */
  --bgfx-back: #fffff8;
  --bgfx-1: #edf7f7;    /* sky tint */
  --bgfx-2: #cbe9f8;    /* sky */
  --bgfx-3: #c9f0df;    /* mint */
  --bgfx-grain: 0.8;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 136px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font: 400 17px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }

/* Animated background. Fixed behind every page. Without JavaScript or WebGL it is a
   static gradient in the same colors. bg.js adds the canvas and .is-live. */
.gm-bg {
  position: fixed; inset: 0 0 auto 0; z-index: -1; height: 100vh; height: 100lvh; pointer-events: none; overflow: hidden;
  background:
    radial-gradient(60% 55% at 12% 8%, var(--bgfx-2), transparent 72%),
    radial-gradient(55% 50% at 88% 38%, var(--bgfx-3), transparent 72%),
    radial-gradient(80% 60% at 40% 100%, var(--bgfx-1), transparent 75%),
    var(--bgfx-back);
}
.gm-bg__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 1.2s ease; }
.gm-bg.is-live .gm-bg__canvas { opacity: 1; }
a { color: inherit; }
h1, h2, h3 { color: var(--head); margin: 0; font-weight: 700; letter-spacing: -0.015em; text-wrap: balance; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; border-radius: var(--radius); }

.gm-wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .gm-wrap { padding: 0 32px; } }
.gm-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.gm-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.gm-skip { position: absolute; left: 16px; top: -60px; z-index: 60; background: var(--head); color: var(--bg); padding: 10px 16px; border-radius: var(--radius); font-weight: 600; }
.gm-skip:focus { top: 12px; }

/* Theme-aware logos and icons */
.gm-logo--light { display: none; }
[data-theme="light"] .gm-logo--light { display: block; }
[data-theme="light"] .gm-logo--dark { display: none; }
.gm-icon-moon { display: none; }
[data-theme="light"] .gm-icon-moon { display: block; }
[data-theme="light"] .gm-icon-sun { display: none; }

/* Subscriber state (cookie gm_sub=1) */
[data-sub-show] { display: none !important; }
.is-subscriber [data-sub-show] { display: revert !important; }
.is-subscriber .gm-thanks[data-sub-show] { display: flex !important; }
.is-subscriber [data-sub-hide] { display: none !important; }
.is-subscriber .gm-subscribe-cta [data-sub-show] { display: inline-flex !important; align-items: center; gap: 6px; }

/* Type */
.gm-h1 { font-size: clamp(34px, 6vw, 60px); line-height: 1.08; letter-spacing: -0.025em; max-width: 18ch; }
.gm-h2 { font-size: clamp(26px, 3.4vw, 38px); line-height: 1.15; }
.gm-h3 { font-size: 20px; line-height: 1.3; }
.gm-accent {
  font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: 0;
  background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-right: 0.06em;
}
.gm-kicker { color: var(--label); font-weight: 600; font-size: 15px; margin-bottom: 14px; }
.gm-label { color: var(--label); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 8px; }
.gm-meta { color: var(--muted); font-size: 14px; margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.gm-count { display: inline-flex; align-items: center; font-size: 13px; font-weight: 700; padding: 2px 9px; border-radius: var(--radius); background: var(--chip); color: var(--body); vertical-align: middle; letter-spacing: 0; }

/* Author name links open the side panel */
.gm-author { color: var(--body); font-weight: 600; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; position: relative; z-index: 1; }
.gm-author:hover { color: var(--link); text-decoration-color: currentColor; }
.gm-meta .gm-author { display: inline-flex; align-items: center; min-height: 32px; }

/* Buttons and links */
.gm-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 22px; border-radius: var(--radius); border: 0;
  background: var(--grad); color: var(--navy); font-weight: 650; font-size: 16px; white-space: nowrap;
  text-decoration: none; cursor: pointer; transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.gm-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 24px -10px rgba(106, 192, 239, 0.6); }
.gm-btn:disabled { opacity: 0.6; cursor: progress; transform: none; }
.gm-btn--sm { min-height: 44px; padding: 0 18px; font-size: 15px; }
.gm-btn--ghost { background: transparent; color: var(--head); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.gm-btn--ghost:hover { box-shadow: inset 0 0 0 1.5px var(--link); }
.gm-link { color: var(--link); font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; background: none; border: 0; padding: 0; cursor: pointer; font-size: inherit; }
.gm-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.gm-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 28px; }

/* Google preferred source badge */
.gm-gsource { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px 0 10px; border-radius: var(--radius); border: 1px solid var(--gsource-line); background: var(--gsource-bg); color: var(--gsource-text); font-size: 13px; line-height: 1; font-weight: 500; white-space: nowrap; text-decoration: none; flex: none; }
/* The badge looks 34px tall; its tap area is 44px. */
.gm-gsource::before { content: ""; position: absolute; inset: -5px 0; }
.gm-gsource:hover { border-color: var(--link); }
.gm-gsource svg { flex: none; }

/* Header */
.gm-header { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(140%) blur(12px); -webkit-backdrop-filter: saturate(140%) blur(12px); border-bottom: 1px solid var(--line); }
.gm-header__inner { display: flex; align-items: center; gap: 20px; min-height: 68px; }
.gm-logo { display: flex; align-items: center; min-height: 44px; flex: none; }
.gm-logo img { width: 150px; height: auto; }
.gm-nav { flex: 1; display: flex; justify-content: flex-start; margin-left: 12px; }
.gm-nav__contact { display: none; }
.gm-nav__contact button { display: inline-flex; align-items: center; min-height: 44px; width: 100%; padding: 0 12px; border: 0; background: none; color: var(--body); font-weight: 500; font-size: 17px; text-align: left; cursor: pointer; border-radius: var(--radius); }
.gm-nav__contact button:hover { color: var(--head); background: var(--chip); }
.gm-nav__list { display: flex; gap: 4px; }
.gm-nav__list a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; color: var(--body); text-decoration: none; font-weight: 500; font-size: 15px; border-radius: var(--radius); }
.gm-nav__list a:hover, .gm-nav__list a[aria-current="page"] { color: var(--head); background: var(--chip); }
.gm-header__tools { display: flex; align-items: center; gap: 8px; }
.gm-theme, .gm-icon-btn, .gm-menu-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: var(--radius); background: transparent; color: var(--head); cursor: pointer; }
.gm-theme:hover, .gm-icon-btn:hover, .gm-menu-btn:hover { border-color: var(--line-strong); background: var(--chip); }
.gm-menu-btn { display: none; }
/* Theme switcher, Subscribe and the mobile menu share one height. */
.gm-theme, .gm-icon-btn, .gm-menu-btn, .gm-header__tools .gm-subscribe-cta { height: 44px; min-height: 44px; }
.no-js .gm-contact-btn, .no-js .gm-js-only, .no-js .gm-nav__contact { display: none !important; }
.gm-subscribe-cta svg { margin-right: -2px; }
@media (max-width: 759px) {
  .gm-header__inner { gap: 8px; }
  .gm-logo img { width: 128px; }
  .gm-menu-btn { display: inline-flex; }
  .gm-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; padding: 8px 16px 16px; background: var(--bg); border-bottom: 1px solid var(--line); }
  .gm-nav.is-open { display: block; }
  .gm-nav__list { flex-direction: column; }
  .gm-nav__list a { width: 100%; font-size: 17px; }
  .no-js .gm-nav { display: block; position: static; padding: 0; border: 0; }
  .gm-header__tools { margin-left: auto; }
  .gm-nav { margin-left: 0; }
  .gm-contact-btn { display: none; }
  .gm-nav__contact { display: block; }
  .gm-subscribe-cta { padding: 0 14px; }
}

/* Intro (About page) */
.gm-intro { padding: 56px 0 40px; position: relative; overflow: hidden; }
.gm-intro::before {
  content: ""; position: absolute; inset: -40% -10% auto auto; width: 720px; height: 720px; pointer-events: none;
  background: radial-gradient(closest-side, rgba(106, 192, 239, 0.16), rgba(138, 219, 198, 0.06) 55%, transparent);
}
.gm-intro .gm-wrap { position: relative; }
.gm-intro__sub { font-size: clamp(17px, 2vw, 20px); max-width: 60ch; margin: 20px 0 0; }
@media (min-width: 900px) { .gm-intro { padding: 88px 0 56px; } }

/* Featured + side column */
.gm-top { padding: 40px 0 48px; }
.gm-top__grid { display: grid; gap: 32px; }
@media (min-width: 900px) { .gm-top__grid { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 40px; align-items: stretch; } }

.gm-feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.gm-feature__media { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-2); }
/* Desktop: the image grows so the card bottom lines up with the subscribe card. */
@media (min-width: 900px) { .gm-feature__media { aspect-ratio: auto; flex: 1 1 auto; min-height: 280px; } }
.gm-feature__media .gm-thumb { width: 100%; height: 100%; object-fit: cover; object-position: center top; transition: transform 0.4s ease; }
.gm-feature:hover .gm-thumb { transform: scale(1.02); }
.gm-feature__body { padding: 24px; }
.gm-feature__title { font-size: clamp(28px, 3.4vw, 42px); line-height: 1.12; letter-spacing: -0.022em; margin-bottom: 14px; }
.gm-feature__title a, .gm-latest__title a, .gm-card__title a, .gm-rec__title a { text-decoration: none; }
.gm-feature__title a:hover, .gm-latest__title a:hover, .gm-card__title a:hover, .gm-rec__title a:hover { text-decoration: underline; text-decoration-color: var(--link); text-underline-offset: 4px; }
.gm-feature__excerpt { font-size: 18px; line-height: 1.6; margin-bottom: 18px; }
@media (max-width: 599px) { .gm-feature__more { display: none; } .gm-feature__excerpt { font-size: 17px; } }
@media (min-width: 720px) { .gm-feature__body { padding: 28px 32px 32px; } }

.gm-side { display: flex; flex-direction: column; gap: 28px; }
.gm-side .gm-subcard { margin-top: auto; }
.gm-section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.gm-latest__item { padding: 14px 0; border-bottom: 1px solid var(--line); }
.gm-latest__item:last-child { border-bottom: 0; }
.gm-latest__title { font-size: 17px; line-height: 1.35; margin-bottom: 6px; }

.gm-subcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; position: relative; overflow: hidden; }
.gm-subcard::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--grad); }
.gm-subcard__h { font-size: 21px; line-height: 1.3; margin-bottom: 10px; }

/* Forms */
.gm-sub-form { display: flex; flex-wrap: wrap; gap: 8px; }
.gm-sub-form input[type="email"] { flex: 1 1 200px; min-width: 0; min-height: 48px; padding: 0 18px; border-radius: var(--radius); border: 1px solid var(--line-strong); background: var(--input-bg); color: var(--head); font-size: 16px; }
.gm-sub-form--stack { flex-direction: column; }
.gm-sub-form--stack input[type="email"] { flex: none; width: 100%; }
.gm-sub-form--stack .gm-btn { width: 100%; }
.gm-form-msg { flex-basis: 100%; margin: 4px 0 0; font-size: 14.5px; min-height: 0; }
.gm-form-msg:empty { display: none; }
.gm-form-msg.is-error { color: #ff9c8f; }
[data-theme="light"] .gm-form-msg.is-error { color: #b42318; }
.gm-form-msg.is-ok { color: var(--body); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
input:focus, textarea:focus { outline: 2px solid var(--link); outline-offset: 1px; border-color: transparent; }
.gm-field { display: grid; gap: 6px; margin-bottom: 14px; }
.gm-field label { color: var(--head); font-weight: 600; font-size: 15px; }
.gm-opt { color: var(--muted); font-weight: 400; }
.gm-field input, .gm-field textarea, .gm-field select { width: 100%; min-height: 48px; padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--line-strong); background: var(--input-bg); color: var(--head); font-size: 16px; }
.gm-field textarea { resize: vertical; min-height: 120px; }
.gm-field select { appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 40px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }
.gm-field select:focus { outline: 2px solid var(--link); outline-offset: 1px; border-color: transparent; }
.gm-contact .gm-btn { width: 100%; }
.gm-consult .gm-btn { width: 100%; }

.gm-thanks { display: flex; gap: 14px; align-items: flex-start; text-align: left; }
.gm-thanks__icon { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: var(--grad); color: var(--navy); }
.gm-thanks__h { color: var(--head); font-weight: 700; font-size: 18px; margin-bottom: 4px; }
.gm-thanks p:last-child { margin: 0; }

/* Subscribe band: full-width pre-footer on every page */
.gm-band { background: var(--band-bg); border-top: 1px solid var(--line); }
.gm-band__inner { padding: 56px 0 60px; text-align: center; }
.gm-band__h { font-size: clamp(24px, 3vw, 32px); line-height: 1.2; margin-bottom: 10px; }
.gm-band__text { max-width: 58ch; margin: 0 auto 22px; }
.gm-band .gm-sub-form { max-width: 560px; margin: 0 auto; padding: 6px; border-radius: var(--radius); border: 1px solid var(--line-strong); background: var(--input-bg); flex-wrap: nowrap; }
.gm-band .gm-sub-form input[type="email"] { border: 0; background: transparent; padding-left: 16px; }
.gm-band .gm-sub-form input[type="email"]:focus { outline-offset: -2px; }
.gm-band .gm-form-msg { position: absolute; left: 0; right: 0; top: calc(100% + 10px); text-align: center; }
.gm-band .gm-sub-form { position: relative; }
.gm-band .gm-thanks { max-width: 520px; margin: 0 auto; }
@media (max-width: 520px) {
  .gm-band .gm-sub-form { flex-direction: column; border-radius: var(--radius); }
  .gm-band .gm-sub-form .gm-btn { width: 100%; }
  .gm-band .gm-sub-form input[type="email"] { flex: none; width: 100%; }
  .gm-band .gm-form-msg { position: static; }
}
@media (min-width: 720px) { .gm-band__inner { padding: 72px 0 76px; } }

/* Feed */
.gm-feed { padding: 64px 0; border-top: 1px solid var(--line); }
.gm-feed__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.no-js .gm-search, .no-js .gm-more { display: none; }
.gm-search { position: relative; display: flex; align-items: center; color: var(--muted); }
.gm-search svg { position: absolute; left: 14px; pointer-events: none; }
.gm-search input { width: 260px; min-height: 46px; padding: 0 16px 0 38px; border-radius: var(--radius); border: 1px solid var(--line-strong); background: var(--surface); color: var(--head); font-size: 16px; }
@media (max-width: 560px) { .gm-search, .gm-search input { width: 100%; } }

.gm-grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .gm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .gm-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; } }
.gm-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: border-color 0.2s ease, transform 0.2s ease; }
.gm-card:hover { border-color: color-mix(in srgb, var(--link) 50%, transparent); transform: translateY(-2px); }
.gm-card[hidden] { display: none; }
.gm-card__media { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-2); }
.gm-thumb { width: 100%; height: 100%; object-fit: cover; }
/* Card images with a light version follow the theme switcher. Dark is the default, as with the tokens. */
.gm-theme-light { display: none !important; }
:root[data-theme="light"] .gm-theme-light { display: block !important; }
:root[data-theme="light"] .gm-theme-dark { display: none !important; }
.gm-thumb--empty { display: flex; align-items: flex-end; padding: 16px; background: linear-gradient(135deg, rgba(106, 192, 239, 0.32), rgba(138, 219, 198, 0.14) 50%, rgba(222, 174, 111, 0.26)), var(--surface-2); }
.gm-thumb--empty span { font-family: var(--serif); font-style: italic; font-size: 24px; color: var(--head); line-height: 1.1; }
.gm-card__body { padding: 20px 20px 18px; display: flex; flex-direction: column; flex: 1; }
.gm-card__title { font-size: 19px; line-height: 1.3; margin-bottom: 10px; }
.gm-card__excerpt { font-size: 15.5px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.gm-card .gm-meta { margin-top: auto; }
.gm-empty { color: var(--muted); padding: 24px 0; }
.gm-more { display: flex; justify-content: center; margin-top: 32px; }
.gm-more[hidden] { display: none; }

/* Recommended */
.gm-rec { padding: 64px 0 72px; border-top: 1px solid var(--line); }
.gm-rec .gm-section-head { margin-bottom: 24px; }
.gm-rec__list { display: grid; grid-auto-flow: column; grid-auto-columns: 72%; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; scrollbar-width: thin; }
.gm-rec__item { scroll-snap-align: start; display: flex; flex-direction: column; gap: 8px; }
@media (min-width: 640px) { .gm-rec__list { grid-auto-columns: 40%; } }
@media (min-width: 1000px) { .gm-rec__list { grid-auto-flow: row; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); grid-auto-columns: unset; overflow: visible; } }
.gm-rec__media { display: block; }
.gm-rec__media .gm-thumb { aspect-ratio: 4 / 3; height: auto; border-radius: var(--radius); border: 1px solid var(--line); margin-bottom: 4px; }
.gm-rec__item .gm-label { margin: 0; }
.gm-rec__title { font-size: 16.5px; line-height: 1.35; font-weight: 650; }

/* About page */
.gm-about { padding: 56px 0; border-top: 1px solid var(--line); }
.gm-about__inner > * { max-width: 760px; }
.gm-about .gm-h2 { margin-bottom: 20px; }
.gm-about p { font-size: 18px; }
.gm-team { padding: 56px 0 64px; border-top: 1px solid var(--line); }
.gm-team__lede { margin: 12px 0 28px; max-width: 60ch; }
.gm-team__grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .gm-team__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 760px) { .gm-team__grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .gm-team__grid { grid-template-columns: repeat(5, 1fr); } }
.gm-person { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); text-decoration: none; transition: border-color 0.2s ease, transform 0.2s ease; }
.gm-person:hover { border-color: var(--link); transform: translateY(-2px); }
.gm-person img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; margin-bottom: 8px; }
.gm-person__name { color: var(--head); font-weight: 700; font-size: 18px; }
.gm-person__role { color: var(--muted); font-size: 14.5px; line-height: 1.4; }

/* FAQ */
.gm-faq { padding: 64px 0 80px; border-top: 1px solid var(--line); }
.gm-faq__grid { display: grid; gap: 32px; }
@media (min-width: 900px) { .gm-faq__grid { grid-template-columns: 1fr 1.6fr; gap: 56px; } .gm-faq__grid > div:first-child { position: sticky; top: 100px; align-self: start; } }
.gm-faq__lede { margin-top: 16px; max-width: 34ch; }
.gm-faq__list { border-top: 1px solid var(--line); }
.gm-faq__item { border-bottom: 1px solid var(--line); }
.gm-faq__item summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; padding: 14px 0; cursor: pointer; list-style: none; }
.gm-faq__item summary::-webkit-details-marker { display: none; }
.gm-faq__item summary h3 { font-size: 18px; line-height: 1.35; font-weight: 600; }
.gm-faq__item summary:hover h3 { color: var(--link); }
.gm-faq__icon { flex: none; position: relative; width: 28px; height: 28px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.gm-faq__icon::before, .gm-faq__icon::after { content: ""; position: absolute; left: 50%; top: 50%; width: 11px; height: 1.75px; background: var(--head); border-radius: 2px; transform: translate(-50%, -50%); transition: transform 0.2s ease; }
.gm-faq__icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.gm-faq__item[open] .gm-faq__icon { background: var(--grad); box-shadow: none; }
.gm-faq__item[open] .gm-faq__icon::before, .gm-faq__item[open] .gm-faq__icon::after { background: var(--navy); }
.gm-faq__item[open] .gm-faq__icon::after { transform: translate(-50%, -50%) rotate(0deg); }
.gm-faq__item p { padding: 0 44px 22px 0; margin: 0; }

/* ---------- Article page ---------- */
.gm-post { padding-top: 32px; }
.gm-post__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 56px; padding-bottom: 56px; }
.gm-post__head, .gm-post__body, .gm-post__toc { min-width: 0; }
@media (min-width: 1000px) {
  .gm-post__grid { grid-template-columns: 240px minmax(0, 720px); justify-content: center; }
  .gm-post__head { grid-column: 2; }
  .gm-post__toc { grid-column: 1; grid-row: 2; }
  .gm-post__body { grid-column: 2; grid-row: 2; }
}
.gm-back { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--link); font-weight: 600; text-decoration: none; margin-bottom: 8px; }
.gm-back:hover { text-decoration: underline; text-underline-offset: 4px; }
.gm-post__title { font-size: clamp(30px, 4.4vw, 46px); line-height: 1.12; letter-spacing: -0.022em; margin: 4px 0 16px; }
.gm-post__deck { font-size: clamp(17px, 1.8vw, 19px); color: var(--body); margin-bottom: 24px; }
.gm-post__meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; padding: 14px 0; border-top: 1px solid var(--line); margin-bottom: 24px; }

.gm-post__toc { margin-bottom: 24px; }
@media (min-width: 1000px) { .gm-post__toc { position: sticky; top: 92px; align-self: start; max-height: calc(100vh - 110px); overflow-y: auto; margin: 0; } }
.gm-toc__box { border-top: 1px solid var(--line); }
@media (max-width: 999px) { .gm-toc__box { border: 1px solid var(--line); border-radius: var(--radius); padding: 0 16px; background: var(--surface); } }
.gm-toc__title { display: flex; align-items: center; justify-content: space-between; min-height: 48px; cursor: pointer; list-style: none; color: var(--muted); font-size: 12.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.gm-toc__title::-webkit-details-marker { display: none; }
.gm-toc__title::after { content: "+"; font-size: 18px; font-weight: 400; letter-spacing: 0; }
.gm-toc__box[open] .gm-toc__title::after { content: "\2212"; }
.gm-toc__list { counter-reset: toc; padding-bottom: 12px; }
.gm-toc__list li { counter-increment: toc; border-top: 1px solid var(--line); }
.gm-toc__list a { display: grid; grid-template-columns: 28px 1fr; gap: 4px; padding: 9px 0; min-height: 40px; color: var(--body); text-decoration: none; font-size: 14.5px; line-height: 1.4; }
.gm-toc__list a::before { content: counter(toc, decimal-leading-zero); font-size: 12px; color: var(--muted); padding-top: 2px; font-variant-numeric: tabular-nums; }
.gm-toc__list a:hover { color: var(--head); }
.gm-toc__list a[aria-current="true"] { color: var(--head); font-weight: 600; }
.gm-toc__list a[aria-current="true"]::before { color: var(--link); }

.gm-answer { background: var(--answer-bg); color: var(--answer-text); border-radius: var(--radius); padding: 22px 24px 24px; margin: 0 0 32px; position: relative; overflow: hidden; }
.gm-answer::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--grad); }
.gm-answer__label { color: var(--answer-label); font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 8px; }
.gm-answer p { margin: 0; font-size: 18px; line-height: 1.65; color: var(--answer-text); }

/* Video with chapters (posts with a "video" entry in posts.json) */
.gm-video { margin: 0 0 36px; }
.gm-video__label { margin-bottom: 12px; color: var(--label); }
.gm-video__frame { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); }
.gm-video__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.gm-chapters { margin-top: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 0 16px; }
.gm-chapters__title { display: flex; align-items: center; gap: 10px; min-height: 48px; cursor: pointer; list-style: none; color: var(--muted); font-size: 12.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.gm-chapters__title::-webkit-details-marker { display: none; }
.gm-chapters__title span { font-variant-numeric: tabular-nums; letter-spacing: 0; padding: 2px 8px; border-radius: 999px; background: var(--chip); color: var(--body); }
.gm-chapters__title::after { content: "+"; margin-left: auto; font-size: 18px; font-weight: 400; letter-spacing: 0; }
.gm-chapters[open] .gm-chapters__title::after { content: "\2212"; }
.gm-chapters__list { padding-bottom: 8px; }
.gm-chapters__list li { border-top: 1px solid var(--line); }
.gm-chapters__list a { display: grid; grid-template-columns: 56px 1fr; gap: 10px; align-items: baseline; min-height: 44px; padding: 10px 0; color: var(--body); text-decoration: none; font-size: 15.5px; line-height: 1.4; }
.gm-chapters__list time { color: var(--link); font-weight: 650; font-variant-numeric: tabular-nums; }
.gm-chapters__list a:hover span, .gm-chapters__list a[aria-current="true"] span { color: var(--head); }
.gm-chapters__list a[aria-current="true"] { font-weight: 600; }
@media (min-width: 700px) { .gm-chapters__list { columns: 2; column-gap: 28px; } .gm-chapters__list li { break-inside: avoid; } }

.gm-prose { font-size: 18px; line-height: 1.7; }
.gm-prose > * + * { margin-top: 0; }
.gm-prose p { margin: 0 0 1.1em; }
.gm-prose h2 { font-size: clamp(24px, 2.6vw, 30px); line-height: 1.2; margin: 1.8em 0 0.6em; }
.gm-prose h3 { font-size: 21px; line-height: 1.3; margin: 1.5em 0 0.5em; }
.gm-prose h2:first-child, .gm-prose h3:first-child { margin-top: 0; }
.gm-prose strong { color: var(--head); font-weight: 650; }
.gm-prose a { color: var(--link); text-underline-offset: 3px; }
.gm-prose ul, .gm-prose ol { margin: 0 0 1.2em; padding-left: 1.4em; }
.gm-prose ul { list-style: disc; }
.gm-prose ol { list-style: decimal; }
.gm-prose li { margin: 0.35em 0; padding-left: 0.2em; }
.gm-prose li::marker { color: var(--label); }
.gm-prose blockquote { margin: 1.4em 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--mint); color: var(--head); font-size: 19px; }
.gm-prose code { font-size: 0.9em; padding: 2px 6px; border-radius: var(--radius); background: var(--chip); }
.gm-prose pre { overflow-x: auto; padding: 16px; border-radius: var(--radius); background: var(--surface-2); font-size: 15px; }
.gm-table { overflow-x: auto; margin: 1.2em 0 1.6em; border-radius: var(--radius); }
.gm-table:focus-visible { outline-offset: 2px; }
.gm-prose table { width: 100%; border-collapse: collapse; font-size: 15.5px; line-height: 1.5; }
.gm-prose thead th { background: var(--surface-2); color: var(--head); text-align: left; font-weight: 650; }
.gm-prose th, .gm-prose td { padding: 10px 12px; border: 1px solid var(--line); vertical-align: top; min-width: 120px; }
.gm-prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.gm-prose .gm-figure { margin: 1.6em 0 1.8em; }
.gm-prose .gm-figure img { width: 100%; height: auto; border-radius: var(--radius); }
.gm-prose .gm-figure:first-child { margin-top: 0; }
.gm-prose .gm-figure figcaption { margin-top: 10px; font-size: 14px; line-height: 1.55; color: var(--muted); }

/* Explorer: CSS-only option picker inside an article. Radio inputs come first, then the
   labels, then one panel per option, in the same order. Works without JavaScript and
   under the strict CSP (no inline style or script). Up to five options. */
.gm-explore { margin: 1.6em 0 1.8em; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.gm-prose .gm-explore__title { margin: 0 0 14px; color: var(--head); font-size: 19px; font-weight: 700; line-height: 1.3; }
.gm-explore__input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.gm-explore__picker { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.gm-explore__picker label { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: var(--radius); color: var(--head); font-size: 15.5px; font-weight: 600; cursor: pointer; }
.gm-explore__picker label:hover { border-color: var(--link); }
.gm-explore__panel { display: none; }
.gm-explore__input:nth-of-type(1):checked ~ .gm-explore__panels > .gm-explore__panel:nth-child(1),
.gm-explore__input:nth-of-type(2):checked ~ .gm-explore__panels > .gm-explore__panel:nth-child(2),
.gm-explore__input:nth-of-type(3):checked ~ .gm-explore__panels > .gm-explore__panel:nth-child(3),
.gm-explore__input:nth-of-type(4):checked ~ .gm-explore__panels > .gm-explore__panel:nth-child(4),
.gm-explore__input:nth-of-type(5):checked ~ .gm-explore__panels > .gm-explore__panel:nth-child(5) { display: block; }
.gm-explore__input:nth-of-type(1):checked ~ .gm-explore__picker > label:nth-child(1),
.gm-explore__input:nth-of-type(2):checked ~ .gm-explore__picker > label:nth-child(2),
.gm-explore__input:nth-of-type(3):checked ~ .gm-explore__picker > label:nth-child(3),
.gm-explore__input:nth-of-type(4):checked ~ .gm-explore__picker > label:nth-child(4),
.gm-explore__input:nth-of-type(5):checked ~ .gm-explore__picker > label:nth-child(5) { background: var(--accent-grad); border-color: transparent; color: var(--navy); }
.gm-explore__input:nth-of-type(1):focus-visible ~ .gm-explore__picker > label:nth-child(1),
.gm-explore__input:nth-of-type(2):focus-visible ~ .gm-explore__picker > label:nth-child(2),
.gm-explore__input:nth-of-type(3):focus-visible ~ .gm-explore__picker > label:nth-child(3),
.gm-explore__input:nth-of-type(4):focus-visible ~ .gm-explore__picker > label:nth-child(4),
.gm-explore__input:nth-of-type(5):focus-visible ~ .gm-explore__picker > label:nth-child(5) { outline: 2px solid var(--link); outline-offset: 3px; }
.gm-prose .gm-explore__lead { margin: 0 0 16px; font-size: 16.5px; line-height: 1.55; }
.gm-meter { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; margin-bottom: 14px; font-size: 15px; }
.gm-meter__label { color: var(--body); }
.gm-meter__value { color: var(--head); font-weight: 700; font-variant-numeric: tabular-nums; }
.gm-meter progress { grid-column: 1 / -1; width: 100%; height: 10px; border: 0; border-radius: 5px; background: var(--chip); -webkit-appearance: none; appearance: none; overflow: hidden; }
.gm-meter progress::-webkit-progress-bar { background: var(--chip); border-radius: 5px; }
.gm-meter progress::-webkit-progress-value { background: var(--accent-grad); border-radius: 5px; }
.gm-meter progress::-moz-progress-bar { background: var(--accent-grad); border-radius: 5px; }
.gm-prose .gm-explore__note { margin: 6px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
@media (max-width: 520px) { .gm-explore { padding: 18px 16px; } .gm-explore__picker label { padding: 0 12px; font-size: 15px; } }

/* Checklist: native checkboxes, nothing saved. */
.gm-prose .gm-check { padding-left: 1.4em; }
.gm-prose .gm-check li { margin: 0.5em 0; }
.gm-check label { display: flex; gap: 12px; align-items: flex-start; min-height: 44px; cursor: pointer; }
.gm-check input { flex: none; width: 22px; height: 22px; margin: 4px 0 0; accent-color: var(--link); cursor: pointer; }
.gm-check input:checked + span, .gm-check input:checked + span strong { color: var(--muted); }

.gm-authorbox { display: flex; gap: 18px; align-items: flex-start; margin-top: 48px; padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.gm-authorbox img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex: none; }
.gm-authorbox .gm-label { margin-bottom: 4px; }
.gm-authorbox__name { font-size: 20px; }
.gm-authorbox__team { color: var(--head); font-size: 15px; font-weight: 600; margin: 2px 0 0; }
.gm-authorbox__role { color: var(--muted); font-size: 15px; margin: 4px 0 14px; }
.gm-authorbox__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.gm-related { padding: 56px 0 72px; border-top: 1px solid var(--line); }
.gm-related__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.gm-carousel__nav { display: flex; gap: 10px; }
.no-js .gm-carousel__nav { display: none; }
.gm-carousel__btn { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius); border: 1px solid var(--line-strong); background: var(--surface); color: var(--head); cursor: pointer; }
.gm-carousel__btn:hover:not(:disabled) { border-color: var(--link); color: var(--link); }
.gm-carousel__btn:disabled { opacity: 0.4; cursor: default; }
.gm-carousel { display: grid; grid-auto-flow: column; grid-auto-columns: 86%; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding-bottom: 6px; scrollbar-width: none; }
.gm-carousel::-webkit-scrollbar { display: none; }
.gm-carousel:focus-visible { outline-offset: 4px; }
@media (min-width: 720px) { .gm-carousel { grid-auto-columns: calc((100% - 24px) / 2); gap: 24px; } }
@media (min-width: 1100px) { .gm-carousel { grid-auto-columns: calc((100% - 48px) / 3); } }
.gm-rcard { scroll-snap-align: start; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.gm-rcard__media { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-2); }
.gm-rcard__media img, .gm-rcard__media .gm-thumb--empty { width: 100%; height: 100%; object-fit: cover; }
.gm-rcard__body { display: flex; flex-direction: column; flex: 1; padding: 22px 22px 20px; }
.gm-rcard__title { font-size: 20px; line-height: 1.3; margin-bottom: 12px; }
.gm-rcard__title a { text-decoration: none; }
.gm-rcard__title a:hover { text-decoration: underline; text-decoration-color: var(--link); text-underline-offset: 4px; }
.gm-rcard__excerpt { font-size: 15.5px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 20px; }
.gm-rcard__by { margin-top: auto; display: flex; align-items: center; gap: 12px; font-size: 14.5px; line-height: 1.35; color: var(--muted); }
.gm-rcard__by img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: none; }
.gm-rcard__by .gm-author { display: inline-flex; align-items: center; min-height: 32px; }
.gm-rcard__by time { display: block; }

/* ---------- Side panel ---------- */
.gm-panel {
  margin: 0 0 0 auto; padding: 0; border: 0; height: 100dvh; max-height: 100dvh; width: min(480px, 100vw); max-width: 100vw;
  background: var(--bg); color: var(--body); box-shadow: var(--shadow); border-left: 1px solid var(--line);
  display: none; flex-direction: column;
}
.gm-panel[open] { display: flex; animation: gm-slide 0.28s ease-out; }
.gm-panel::backdrop { background: rgba(5, 12, 24, 0.55); backdrop-filter: blur(2px); }
@keyframes gm-slide { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.gm-panel__bar { display: flex; justify-content: flex-end; padding: 12px 12px 0; flex: none; }
.gm-panel__close { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius); border: 1px solid var(--line); background: transparent; color: var(--head); cursor: pointer; }
.gm-panel__close:hover { background: var(--chip); }
.gm-panel__body { overflow-y: auto; padding: 4px 28px 32px; flex: 1; }
.gm-panel__title { font-size: 26px; line-height: 1.2; margin: 6px 0 6px; }
.gm-panel__title:focus { outline: none; }
.gm-panel__back { margin-bottom: 4px; }
.gm-panel p { font-size: 16.5px; }
.gm-bio__photo { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; margin-bottom: 16px; border: 3px solid var(--surface-2); }
.gm-bio__role { color: var(--label); font-weight: 600; font-size: 15px; margin-bottom: 16px; }
.gm-bio__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.gm-bio__actions .gm-btn { flex: 1 1 160px; }
@media (max-width: 520px) { .gm-panel__body { padding: 4px 20px 28px; } }

/* Footer */
.gm-footer { border-top: 1px solid var(--line); background: var(--footer-bg); padding: 40px 0 28px; font-size: 15px; }
.gm-footer__grid { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 40px; }
.gm-footer__brand { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.gm-footer__brand img { width: 150px; height: auto; }
.gm-footer__brand p { color: var(--muted); margin: 0; }
.gm-footer__nav ul { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 24px; }
.gm-footer__nav a, .gm-footer__nav button { color: var(--body); text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0; border: 0; background: none; font: inherit; font-weight: 500; cursor: pointer; }
.gm-footer__nav a:hover, .gm-footer__nav button:hover { color: var(--head); text-decoration: underline; text-underline-offset: 3px; }
.gm-footer__badge { margin-top: 24px; }
.gm-footer__base { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); }
.gm-footer__base p { margin: 0; }
.gm-footer__base a { color: var(--link); }
.gm-footer__base .gm-gsource { color: var(--gsource-text); }

/* ---------- Topic bar under the logo line ---------- */
.gm-subnav { border-top: 1px solid var(--line); }
.gm-subnav__list { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; margin: 0 -12px; padding: 0; }
.gm-subnav__list::-webkit-scrollbar { display: none; }
.gm-subnav__list li { flex: none; }
.gm-subnav__list a { position: relative; display: inline-flex; align-items: center; min-height: 48px; padding: 0 12px; color: var(--body); text-decoration: none; font-weight: 650; font-size: 15px; white-space: nowrap; }
.gm-subnav__list a:hover { color: var(--head); }
.gm-subnav__list a[aria-current="page"] { color: var(--head); }
.gm-subnav__list a[aria-current="page"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--accent-grad); }
/* The divider sets Directory and Jobs apart from the article topics. */
.gm-subnav__list li:nth-last-child(2) { margin-left: 12px; padding-left: 12px; border-left: 1px solid var(--line); }
@media (max-width: 759px) {
  .gm-subnav__list a { font-size: 14.5px; padding: 0 10px; }
  .gm-subnav__list li:nth-last-child(2) { margin-left: 6px; padding-left: 6px; }
}

/* ---------- Page intro for topic, directory and jobs pages ---------- */
.gm-intro--page { padding: 48px 0 32px; }
.gm-intro--page::before { display: none; }
.gm-h1--page { font-size: clamp(32px, 5vw, 52px); max-width: 22ch; }
@media (min-width: 900px) { .gm-intro--page { padding: 64px 0 40px; } }
.gm-topic { padding: 8px 0 64px; }

/* ---------- Filter chips ---------- */
.gm-chips { display: flex; flex-direction: column; gap: 2px; }
.gm-chips__group { color: var(--muted); font-size: 13px; font-weight: 600; padding: 14px 12px 4px; }
.gm-chip { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 44px; padding: 0 12px; border: 0; border-radius: var(--radius); background: transparent; color: var(--body); font-size: 15px; text-align: left; cursor: pointer; }
.gm-chip:hover { background: var(--chip); color: var(--head); }
.gm-chip[aria-pressed="true"] { background: var(--head); color: var(--bg); font-weight: 650; }
.gm-chip__n { font-size: 13px; color: inherit; opacity: 0.75; font-variant-numeric: tabular-nums; }
.gm-chips--row { flex-direction: row; flex-wrap: wrap; gap: 8px; margin: -8px 0 24px; }
.gm-chips--row .gm-chip { width: auto; border: 1px solid var(--line-strong); }
.gm-chips--row .gm-chip[aria-pressed="true"] { border-color: var(--head); }
.no-js .gm-dir__filters, .no-js .gm-chips--row { display: none; }

/* ---------- Directory ---------- */
.gm-spot { padding: 0 0 24px; }
.gm-spot__inner { display: grid; gap: 16px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); position: relative; overflow: hidden; }
.gm-spot__inner::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--accent-grad); }
.gm-spot__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.gm-spot__head .gm-label { margin-bottom: 4px; }
.gm-spot__name { font-size: 24px; line-height: 1.2; }
.gm-spot__blurb { margin: 4px 0 0; font-size: 16px; }
.gm-spot__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; }
.gm-spot__problems { display: grid; gap: 10px; }
.gm-spot__problems li { display: flex; flex-direction: column; gap: 2px; font-size: 15px; line-height: 1.5; }
.gm-spot__ph { color: var(--head); font-weight: 700; }
@media (max-width: 899px) {
  .gm-spot__pt { display: none; }
  .gm-spot__problems { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .gm-spot__problems li { padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); font-size: 14px; line-height: 1.35; }
}
@media (max-width: 439px) { .gm-spot__problems { grid-template-columns: 1fr; } .gm-spot__problems li { padding: 8px 12px; } }
@media (min-width: 900px) {
  .gm-spot__inner { padding: 18px 28px; gap: 12px; }
  .gm-spot__head { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  .gm-spot__problems { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; padding-top: 12px; border-top: 1px solid var(--line); }
}

.gm-dir { padding: 24px 0 64px; border-top: 1px solid var(--line); }
.gm-dir__grid { display: grid; gap: 24px; }
.gm-dir__grid > * { min-width: 0; }
.gm-dir__fhead { display: flex; align-items: center; justify-content: space-between; padding: 0 12px; }
@media (min-width: 1000px) {
  .gm-dir__grid { grid-template-columns: 260px minmax(0, 1fr); gap: 40px; }
  .gm-dir__filters { position: sticky; top: 140px; align-self: start; max-height: calc(100vh - 160px); overflow-y: auto; }
}
@media (max-width: 999px) {
  /* Phones and tablets: one row of chips that scrolls sideways. */
  .gm-dir__filters .gm-chips { flex-direction: row; flex-wrap: nowrap; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 8px -16px 0; padding: 0 16px 4px; }
  .gm-dir__filters .gm-chips::-webkit-scrollbar { display: none; }
  .gm-dir__filters .gm-chips li { flex: none; }
  .gm-dir__filters .gm-chip { width: auto; border: 1px solid var(--line-strong); white-space: nowrap; }
  .gm-dir__filters .gm-chip[aria-pressed="true"] { border-color: var(--head); }
  .gm-dir__filters .gm-chips__group { display: none; }
  .gm-dir__fhead { padding: 0; }
  .gm-dir__grid { gap: 16px; }
}
@media (max-width: 759px) {
  .gm-chips--row { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: -8px -16px 20px; padding: 0 16px 4px; }
  .gm-chips--row::-webkit-scrollbar { display: none; }
  .gm-chips--row li { flex: none; }
  .gm-chips--row .gm-chip { white-space: nowrap; }
}
.gm-dgrid { display: grid; gap: 16px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 640px) { .gm-dgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .gm-dgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.gm-dcard { display: flex; flex-direction: column; padding: 18px 18px 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color 0.2s ease; }
.gm-dcard[hidden] { display: none; }
.gm-dcard:hover { border-color: color-mix(in srgb, var(--link) 50%, transparent); }
.gm-dcard--featured { border-color: color-mix(in srgb, var(--label) 60%, transparent); }
.gm-dcard__name { font-size: 19px; line-height: 1.25; }
.gm-dcard__host { color: var(--muted); font-size: 14px; margin: 2px 0 10px; }
.gm-dcard__blurb { font-size: 15.5px; line-height: 1.55; margin-bottom: 4px; }
.gm-dcard__more { margin-top: auto; border-top: 1px solid var(--line); }
.gm-dcard__more > summary { display: flex; align-items: center; gap: 4px; min-height: 44px; color: var(--link); font-weight: 650; font-size: 15px; cursor: pointer; list-style: none; }
.gm-dcard__more > summary::-webkit-details-marker { display: none; }
.gm-dcard__more > summary:hover { text-decoration: underline; text-underline-offset: 4px; }
.gm-dcard__more[open] > summary svg { transform: rotate(90deg); }
.gm-dcard__more .gm-ddet { padding: 4px 0 14px; }
.gm-dcard__more .gm-ddet > .gm-label, .gm-dcard__more .gm-ddet__blurb { display: none; }
.gm-ddet p { font-size: 15.5px; }
.gm-ddet__blurb { font-size: 17px; color: var(--head); }
.gm-ddet__h { color: var(--head); font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; margin: 22px 0 8px; }
.gm-ddet__list { display: grid; gap: 6px; margin-bottom: 4px; }
.gm-ddet__list li { position: relative; padding-left: 18px; font-size: 15.5px; }
.gm-ddet__list li::before { content: ""; position: absolute; left: 2px; top: 0.62em; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.gm-ddet__ref { margin: 20px 0 16px; border: 1px solid var(--line); border-radius: var(--radius); }
.gm-ddet__ref div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; padding: 10px 14px; font-size: 15px; }
.gm-ddet__ref div + div { border-top: 1px solid var(--line); }
.gm-ddet__ref dt { color: var(--muted); }
.gm-ddet__ref dd { margin: 0; color: var(--head); overflow-wrap: anywhere; }
.gm-ddet a { color: var(--link); }
.gm-ddet__ref a { display: inline-flex; align-items: center; min-height: 24px; }
.gm-ddet__src { display: grid; gap: 4px; }
.gm-ddet__src a { display: inline-flex; align-items: center; min-height: 32px; font-size: 15px; }
.gm-ddet__note { color: var(--muted); font-size: 14px !important; margin-top: 16px; }
.gm-ddet .gm-btn { color: var(--navy); }
.gm-panel__view--dir .gm-ddet > .gm-label { margin-top: 2px; }
.gm-dir__note { color: var(--muted); font-size: 14px; margin-top: 28px; }

/* ---------- Jobs ---------- */
.gm-jobs { padding: 40px 0 64px; border-top: 1px solid var(--line); }
.gm-jobs__sub { color: var(--muted); font-size: 15px; margin: 8px 0 0; }
.gm-joblist { display: grid; gap: 0; border-top: 1px solid var(--line); }
.gm-job { display: grid; gap: 14px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.gm-job[hidden] { display: none; }
.gm-job__co { display: flex; flex-wrap: wrap; gap: 6px; color: var(--muted); font-size: 14.5px; margin: 0 0 6px; }
.gm-job__co strong { color: var(--label); font-weight: 700; }
.gm-job__title { font-size: 21px; line-height: 1.3; margin-bottom: 8px; }
.gm-job__sum { max-width: 70ch; font-size: 16px; margin-bottom: 10px; }
.gm-job__fam { font-weight: 600; }
.gm-job__paylabel { color: var(--muted); font-size: 13px; margin: 0; }
.gm-job__pay { color: var(--head); font-size: 22px; font-weight: 750; letter-spacing: -0.01em; margin: 0; font-variant-numeric: tabular-nums; white-space: nowrap; }
.gm-job__note { color: var(--muted); font-size: 13px; margin: 2px 0 0; }
.gm-job__side .gm-link { margin-top: 4px; }
@media (min-width: 760px) {
  .gm-job { grid-template-columns: minmax(0, 1fr) 220px; gap: 40px; align-items: start; }
  .gm-job__side { text-align: right; }
  .gm-job__side .gm-link { justify-content: flex-end; }
}
