/* =========================================================================
   ForeverMe Academy — stylesheet
   Same brand family and accessible palette as the SensPod site, but a warmer,
   editorial voice: Lora serif display, Poppins body, and a coral "Join Us"
   CTA that stands apart from the green used everywhere else.
   ========================================================================= */

:root {
  /* Brand palette (from the registered logo) */
  --cream: #f8f5e3;
  --white: #ffffff;
  --blue: #3b4478;
  --peach: #fccbad;
  --coral: #f1647a;
  --gold: #dec524;
  --lime: #85be41;
  --green: #00ab69;
  --teal: #008385;

  /* Text-bearing variants — each clears 4.5:1 as text on cream AND as a
     surface under white text (see the SensPod site notes). */
  --green-deep: #00804f;
  --teal-deep: #007c7e;
  --gold-deep: #7e7005;
  --coral-deep: #b74c5d;
  --lime-deep: #4e7717;

  --ink: #3b4478;
  --ink-muted: #5d6592;
  --rule: rgba(59, 68, 120, 0.14);
  --rule-strong: rgba(59, 68, 120, 0.26);

  /* Brand typography (per ForeverMe brand guidelines):
     Barlow — headings & display · Poppins — body & UI · Lora — elegant accents */
  --display: "Barlow", "Poppins", system-ui, sans-serif;
  --serif: "Lora", Georgia, serif;
  --body: "Poppins", system-ui, sans-serif;

  --s1: 8px; --s2: 12px; --s3: 16px; --s4: 24px; --s5: 32px; --s6: 48px; --s7: 64px; --s8: 96px;
  --section: clamp(60px, 8vw, 120px);
  --gutter: clamp(20px, 5vw, 72px);

  --radius: 20px;
  --radius-sm: 12px;
  --shadow-sm: 0 2px 10px rgba(59, 68, 120, 0.06);
  --shadow: 0 14px 40px rgba(59, 68, 120, 0.1);
  --shadow-lg: 0 28px 70px rgba(59, 68, 120, 0.14);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 220ms;

  /* Buttons (12px rounded rect, matching the brand decision) */
  --btn-radius: 12px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; line-height: 1.15; margin: 0; letter-spacing: -0.01em; text-wrap: balance; }
p, ul, ol, figure, blockquote { margin: 0; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 300;
  background: var(--blue); color: #fff; padding: 14px 22px; border-radius: 0 0 12px 0; font-weight: 600; text-decoration: none;
}
.skip:focus { left: 0; }
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px;
}
::selection { background: var(--peach); color: var(--blue); }

/* ---------- Layout ------------------------------------------------------- */

.wrap { max-width: 1180px; margin-inline: auto; padding-inline: var(--gutter); }
.wrap--narrow { max-width: 760px; }
.section { padding-block: var(--section); }
.surface-white { background: var(--white); }
.surface-cream { background: var(--cream); }
.surface-blush { background: linear-gradient(180deg, #fbeee6 0%, #f8f5e3 100%); }
.surface-blue { background: var(--blue); color: rgba(255, 255, 255, 0.86); }
.surface-blue h1, .surface-blue h2, .surface-blue h3 { color: #fff; }
.center { text-align: center; }
.center .btn-row, .btn-row.center { justify-content: center; }

/* ---------- Type --------------------------------------------------------- */

.eyebrow {
  font-family: var(--body); font-weight: 700; font-size: 12px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--teal-deep); margin: 0 0 var(--s3);
}
.surface-blue .eyebrow { color: var(--peach); }
.accent-teal { color: var(--teal-deep); }
.accent-coral { color: var(--coral-deep); }
.accent-gold { color: var(--gold-deep); }
.accent-lime { color: var(--lime-deep); }
.accent-green { color: var(--green-deep); }

.h-hero { font-size: clamp(38px, 6vw, 68px); line-height: 1.06; letter-spacing: -0.02em; }
.h-hero em { font-family: var(--serif); font-style: italic; color: var(--coral-deep); }
.h-hero--serif { font-family: var(--serif); font-style: italic; }
.h-section { font-size: clamp(28px, 3.6vw, 46px); }
.h-sub { font-size: clamp(22px, 2.4vw, 30px); }

.lede { font-size: clamp(18px, 1.9vw, 22px); line-height: 1.55; color: var(--ink-muted); max-width: 60ch; }
.surface-blue .lede { color: rgba(255, 255, 255, 0.84); }
.muted { color: var(--ink-muted); }
.lead-para { font-family: var(--serif); font-style: italic; font-size: clamp(20px, 2.4vw, 28px); line-height: 1.5; color: var(--teal-deep); max-width: 40ch; margin: 0 auto; }

.sechead { max-width: 66ch; margin: 0 auto clamp(38px, 5vw, 60px); text-align: center; }
.sechead--left { margin-left: 0; text-align: left; }
.sechead .lede { margin: var(--s3) auto 0; }
.sechead--left .lede { margin-left: 0; }

.prose { max-width: 68ch; font-size: clamp(17px, 1.2vw, 19px); line-height: 1.8; }
.prose > * + * { margin-top: var(--s4); }
.prose h2 { font-size: clamp(22px, 2.4vw, 30px); margin-top: clamp(36px, 4vw, 52px); }
.prose strong { font-weight: 600; }
.prose em { font-style: italic; color: var(--teal-deep); }
.prose ul { list-style: none; padding: 0; }
.prose ul li { position: relative; padding: 6px 0 6px 28px; }
.prose ul li::before { content: ""; position: absolute; left: 4px; top: 15px; width: 8px; height: 8px; border-radius: 50%; background: var(--green-deep); }

.pullquote {
  font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: clamp(21px, 2.6vw, 30px); line-height: 1.4; color: var(--blue);
  border-left: 4px solid var(--coral-deep); padding-left: var(--s4); margin-top: var(--s5);
}
.bigquote {
  font-family: var(--serif); font-style: italic; font-size: clamp(24px, 3.4vw, 40px);
  line-height: 1.35; color: var(--teal-deep); text-align: center; max-width: 20ch;
  margin: clamp(48px, 6vw, 80px) auto 0;
}

/* ---------- Buttons ------------------------------------------------------ */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 52px; padding: 15px 30px; border: 1.5px solid transparent; border-radius: var(--btn-radius);
  font: 700 16px/1 var(--body); text-decoration: none; cursor: pointer; touch-action: manipulation;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.btn .i { flex-shrink: 0; opacity: 0.85; }
.btn:active { transform: scale(0.985); }

/* Join Us — the primary action button, brand green (per brand guidelines:
   "Primary Green for CTAs and key actions"). */
.btn--join { background: var(--green-deep); color: #fff; }
.btn--join:hover { background: #006f44; transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0, 128, 79, 0.28); }

.btn--primary { background: var(--green-deep); color: #fff; }
.btn--primary:hover { background: #006f44; transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0, 128, 79, 0.26); }

.btn--ghost { background: transparent; color: var(--ink); border-color: var(--rule-strong); }
.btn--ghost:hover { background: rgba(59, 68, 120, 0.06); border-color: var(--blue); }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s5); }

.tlink { color: var(--green-deep); font-weight: 600; text-decoration: none; border-bottom: 2px solid var(--coral); padding-bottom: 2px; white-space: nowrap; }
.tlink:hover { border-bottom-color: var(--green-deep); }

/* ---------- Header / nav ------------------------------------------------- */

.masthead {
  position: sticky; top: 0; z-index: 100;
  background: rgba(248, 245, 227, 0.9); backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--rule);
}
/* Masthead spans more of the viewport than the 1180 content cap so the
   bilingual nav (longer French labels) fits on one row before collapsing. */
.masthead__inner { display: flex; align-items: center; gap: var(--s3); min-height: 74px; padding-block: 10px; max-width: 1400px; padding-inline: clamp(20px, 4vw, 48px); }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; flex-shrink: 0; text-decoration: none; }
.brand img { height: 42px; width: auto; }
.brand__word { font-family: var(--serif); font-style: italic; font-weight: 600; font-size: 20px; color: var(--coral-deep); }

.nav { display: flex; align-items: center; gap: 1px; margin-left: auto; }
.nav__link {
  display: inline-flex; align-items: center; gap: 5px; min-height: 44px; padding: 9px 10px;
  border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--ink);
  font: 500 14.5px/1.2 var(--body); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.nav__link:hover { background: rgba(59, 68, 120, 0.07); }
.nav__link[aria-current="page"], .nav__link[data-section-active="true"] { font-weight: 600; color: var(--teal-deep); }
.nav__toggle .i--caret { opacity: 0.55; transition: transform var(--dur) var(--ease); }
.nav__toggle[aria-expanded="true"] .i--caret { transform: rotate(180deg); }
.nav__cta { min-height: 46px; padding: 12px 22px; white-space: nowrap; flex-shrink: 0; }

/* Nav tail: Join CTA + language toggle */
.nav__tail { display: flex; align-items: center; gap: var(--s2); margin-left: var(--s2); }
.langtoggle { display: inline-flex; align-items: center; gap: 2px; padding: 3px 6px; border: 1px solid var(--rule-strong); border-radius: 999px; flex-shrink: 0; }
.langtoggle__globe { display: inline-grid; place-items: center; margin: 0 2px 0 3px; color: var(--ink-muted); }
.langtoggle__globe .i { width: 15px; height: 15px; }
.langtoggle a { display: inline-grid; place-items: center; min-width: 34px; min-height: 40px; padding: 0 6px; border-radius: 999px; color: var(--ink-muted); font: 600 13px/1 var(--body); text-decoration: none; transition: background var(--dur) var(--ease), color var(--dur) var(--ease); }
.langtoggle a[aria-current="true"] { background: var(--blue); color: #fff; }
.langtoggle a:hover:not([aria-current="true"]) { background: rgba(59, 68, 120, 0.08); color: var(--ink); }

.hasmenu { position: relative; }
.menu {
  position: absolute; top: calc(100% + 10px); left: 0; z-index: 200; min-width: 210px; padding: 8px;
  background: var(--white); border: 1px solid var(--rule); border-radius: 16px; box-shadow: var(--shadow-lg);
}
.menu a { display: flex; align-items: center; min-height: 44px; padding: 10px 14px; border-radius: 10px; color: var(--ink); font-size: 15px; font-weight: 500; text-decoration: none; transition: background var(--dur) var(--ease), color var(--dur) var(--ease); }
.menu a:hover { background: rgba(59, 68, 120, 0.07); }
.menu a[aria-current="page"] { color: #00797a; font-weight: 600; background: rgba(0, 131, 133, 0.09); }

.navtoggle { display: none; margin-left: auto; width: 48px; height: 48px; padding: 0; border: 1.5px solid var(--rule-strong); border-radius: 12px; background: transparent; color: var(--ink); cursor: pointer; }
.navtoggle svg { margin: auto; }
.navscrim { position: fixed; inset: 0; z-index: 99; background: rgba(59, 68, 120, 0.45); }

/* ---------- Footer ------------------------------------------------------- */

.sitefoot { background: var(--blue); color: rgba(255, 255, 255, 0.75); padding-block: var(--s8) var(--s6); font-size: 15px; }
.sitefoot a { color: rgba(255, 255, 255, 0.75); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; }
.sitefoot a:hover { color: #fff; text-decoration: underline; }
.sitefoot__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: var(--s6) var(--s5); }
.footmark { display: inline-block; background: var(--cream); padding: 12px 16px; border-radius: 12px; }
.footmark img { height: 48px; width: auto; }
.footmark__word { font-family: var(--serif); font-style: italic; font-weight: 600; color: var(--peach); margin-top: 8px; }
.sitefoot h3 { font-family: var(--body); font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--peach); margin-bottom: var(--s2); }
.sitefoot ul { list-style: none; padding: 0; }
.sitefoot__base { margin-top: var(--s7); padding-top: var(--s4); border-top: 1px solid rgba(255, 255, 255, 0.18); display: flex; flex-wrap: wrap; gap: var(--s3) var(--s5); justify-content: space-between; font-size: 13.5px; color: rgba(255, 255, 255, 0.6); }

/* ---------- Hero --------------------------------------------------------- */

.hero { padding-block: clamp(56px, 8vw, 104px); }
.hero__inner { text-align: center; max-width: 62ch; margin-inline: auto; }
.hero__inner .lede { margin: var(--s4) auto 0; }
.hero--tint { background: radial-gradient(120% 90% at 50% -10%, rgba(0, 131, 133, 0.1) 0%, rgba(0, 131, 133, 0) 60%), var(--cream); }
.hero--tint .wrap--narrow, .hero--join .wrap--narrow, .hero--feelings .wrap--narrow { text-align: center; }
.hero--tint .lede, .hero--join .lede, .hero--feelings .lede { margin-top: var(--s4); margin-inline: auto; }
.hero--join { background: radial-gradient(120% 90% at 50% -10%, rgba(241, 100, 122, 0.14) 0%, rgba(241, 100, 122, 0) 62%), var(--cream); }
.hero--feelings { background: linear-gradient(180deg, #fbe7de 0%, #f8f5e3 100%); }

.chip-icon { display: inline-grid; place-items: center; width: 60px; height: 60px; margin: 0 auto var(--s4); border-radius: 18px; background: rgba(0, 131, 133, 0.1); }
.chip-icon.accent-green { background: rgba(0, 128, 79, 0.1); }
.chip-icon .i { width: 28px; height: 28px; }

/* ---------- Cards & tiles ------------------------------------------------ */

.grid { display: grid; gap: var(--s4); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.card { background: var(--white); border: 1px solid var(--rule); border-radius: var(--radius); padding: clamp(24px, 2.6vw, 34px); }
.surface-cream .card { box-shadow: var(--shadow-sm); }
.surface-blue .card { background: rgba(255, 255, 255, 0.07); border-color: rgba(255, 255, 255, 0.17); }
.card h3 { font-size: 22px; margin-bottom: var(--s1); }
.card p { color: var(--ink-muted); font-size: 15.5px; }
.surface-blue .card p { color: rgba(255, 255, 255, 0.85); }
.card__tag { font-family: var(--body); font-weight: 800; font-size: 13px; letter-spacing: 0.06em; margin-bottom: var(--s2); }

.tilecard { display: block; background: var(--white); border: 1px solid var(--rule); border-radius: var(--radius); padding: clamp(24px, 2.6vw, 32px); color: inherit; text-decoration: none; box-shadow: var(--shadow-sm); transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.tilecard:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--teal-deep); }
.tilecard__i { display: inline-grid; place-items: center; width: 48px; height: 48px; margin-bottom: var(--s3); border-radius: 13px; background: rgba(0, 131, 133, 0.09); }
.tilecard__i.accent-coral { background: rgba(241, 100, 122, 0.12); }
.tilecard__i.accent-gold { background: rgba(222, 197, 36, 0.16); }
.tilecard__i.accent-green { background: rgba(0, 128, 79, 0.1); }
.tilecard__i.accent-lime { background: rgba(133, 190, 65, 0.16); }
.tilecard__i .i { width: 22px; height: 22px; }
.tilecard h3 { font-size: 20px; margin-bottom: var(--s1); }
.tilecard p { color: var(--ink-muted); font-size: 15px; }

/* ---------- Stat band ---------------------------------------------------- */

.statband { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s3); margin-top: clamp(32px, 4vw, 48px); }
.statband--4 { grid-template-columns: repeat(4, 1fr); }
.statband--5 { grid-template-columns: repeat(5, 1fr); }
.statile__measure { display: block; margin-top: 8px; font-size: 11px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-muted); }
.statile--dark .statile__measure { color: var(--peach); }
.statile { padding: var(--s4) var(--s3); background: var(--white); border: 1px solid var(--rule); border-radius: var(--radius); text-align: center; }
.statile b { display: block; font-family: var(--display); font-weight: 700; font-size: clamp(30px, 3.6vw, 46px); line-height: 1; color: var(--coral-deep); }
.statile p { margin-top: 8px; font-size: 13.5px; line-height: 1.35; color: var(--ink-muted); }
.statile--dark { background: rgba(255, 255, 255, 0.07); border-color: rgba(255, 255, 255, 0.17); }
.statile--dark b { color: var(--peach); }
.statile--dark p { color: rgba(255, 255, 255, 0.82); }

/* The source line under a figure. A statistic without its citation is worth
   less than no statistic at all — so it ships on the tile, not in a footnote. */
.statile__cite { display: block; margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--rule); font-size: 11.5px; font-style: normal; line-height: 1.4; color: var(--ink-muted); }
.statile--dark .statile__cite { border-top-color: rgba(255, 255, 255, 0.17); color: rgba(255, 255, 255, 0.72); }

/* A word rather than a numeral ("Most"): the display size would wrap mid-word. */
.statile--word b { font-size: clamp(22px, 2.4vw, 30px); }

/* What the figures cannot say. Reads as an honest caveat, not a disclaimer. */
.statband__note { max-width: 74ch; margin: clamp(22px, 2.6vw, 30px) auto 0; text-align: center; font-size: 14px; line-height: 1.6; color: var(--ink-muted); }

/* ---------- Product band (text + pod render) ------------------------------ */

.podband { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.podband__media { margin: 0; }
/* A white plinth: the renders carry their own near-white backdrops, so a plain
   white plate hides that variance against the blue surface. */
.podband__media img { display: block; width: 100%; height: auto; border-radius: var(--radius); background: #fff; }

@media (max-width: 820px) {
  .podband { grid-template-columns: 1fr; }
  /* Text first on a phone — the picture supports the claim, it is not the claim. */
  .podband__media { order: 2; max-width: 420px; }
}

/* ---------- The Circle: status list -------------------------------------- */

/* Each row is a whole-row link with its real status on the right, so nobody
   clicks into an empty page expecting a live programme. */
.statuslist { list-style: none; margin: clamp(28px, 3.4vw, 44px) auto 0; padding: 0; max-width: 780px; border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; background: var(--white); }
.statusrow + .statusrow { border-top: 1px solid var(--rule); }
.statusrow a { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); min-height: 44px; padding: clamp(16px, 1.8vw, 20px) clamp(18px, 2vw, 24px); color: inherit; text-decoration: none; }
.statusrow a:hover { background: var(--cream); }
.statusrow a:focus-visible { outline: 3px solid var(--teal-deep); outline-offset: -3px; }
.statusrow__text b { display: block; font-family: var(--display); font-weight: 700; font-size: 17px; }
.statusrow__text span { display: block; margin-top: 3px; font-size: 14.5px; line-height: 1.45; color: var(--ink-muted); }

/* The status is a fact, not a warning — quiet, but never ambiguous. Text, not
   colour alone, carries the meaning. */
.statusrow__state { flex: none; padding: 5px 12px; border: 1px solid var(--rule-strong, var(--rule)); border-radius: var(--radius-pill, 12px); font-family: var(--display); font-weight: 700; font-size: 11.5px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-muted); white-space: nowrap; }

.statuslist__note { max-width: 74ch; margin: clamp(20px, 2.4vw, 26px) auto 0; text-align: center; font-size: 14px; line-height: 1.6; color: var(--ink-muted); }

/* The one-line promise under the hero buttons — what "join" actually means. */
.hero__ctanote { margin-top: 16px; font-size: 14.5px; color: var(--ink-muted); }

@media (max-width: 560px) {
  .statusrow a { flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* ---------- Band (two-column blue) --------------------------------------- */

.band { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.band__cta { display: flex; justify-content: flex-end; }

/* ---------- Feelings movements ------------------------------------------- */

.movements { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s4); margin-top: clamp(36px, 4vw, 56px); }
.movement { position: relative; margin: 0; padding: clamp(28px, 3vw, 40px) clamp(24px, 2.6vw, 32px); background: var(--white); border: 1px solid var(--rule); border-radius: var(--radius); border-top: 5px solid var(--mv); box-shadow: var(--shadow-sm); }
.movement__n { font-family: var(--display); font-weight: 700; font-size: 15px; color: var(--mv); }
.movement h3 { font-size: clamp(22px, 2.4vw, 28px); margin: var(--s2) 0 var(--s2); }
.movement p { color: var(--ink-muted); font-size: 15.5px; }

.method-more { margin-top: clamp(32px, 4vw, 48px); display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); align-items: center; font-size: 15px; color: var(--ink-muted); }
/* Standalone nav links carry a full touch target, not inline text height. */
.method-more .tlink { display: inline-flex; align-items: center; min-height: 44px; }

/* ---------- Notes, empty states ------------------------------------------ */

.note { padding: clamp(20px, 2.4vw, 28px); background: var(--cream); border-left: 5px solid var(--teal-deep); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.note b { font-family: var(--display); font-weight: 700; }
.surface-white .note { background: var(--cream); }

.todo { margin-top: var(--s3); padding: 13px 16px; border-left: 4px solid var(--coral); border-radius: 0 10px 10px 0; background: rgba(241, 100, 122, 0.09); font-size: 14px; line-height: 1.55; color: var(--ink); }
.todo b { font-family: var(--body); font-weight: 700; color: #a5384b; }
.todo--onDark { background: rgba(255, 255, 255, 0.1); border-left-color: var(--peach); color: rgba(255, 255, 255, 0.9); }
.todo--onDark b { color: var(--peach); }

.emptybox { padding: clamp(28px, 3.4vw, 44px); background: var(--cream); border: 1px dashed var(--rule-strong); border-radius: var(--radius); text-align: center; }
.emptybox h3 { font-size: 20px; margin-bottom: var(--s2); }
.emptybox p { color: var(--ink-muted); max-width: 46ch; margin: 0 auto; }

.signupcard { margin-top: clamp(28px, 3vw, 40px); padding: clamp(24px, 3vw, 40px); background: var(--cream); border-radius: var(--radius); }

/* ---------- Forms -------------------------------------------------------- */

.contactgrid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(32px, 5vw, 64px); align-items: start; }
.capture { max-width: 520px; }
.field { margin-bottom: var(--s4); }
.field label { display: block; margin-bottom: 7px; font-size: 14.5px; font-weight: 600; }
.req { color: var(--coral-deep); }
.field input, .field select {
  width: 100%; min-height: 50px; padding: 13px 16px; border: 1.5px solid var(--rule-strong);
  border-radius: 12px; background: var(--white); color: var(--ink); font: 400 16px/1.5 var(--body);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5L6 8l3.5-3.5' fill='none' stroke='%233b4478' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 42px; }
.field input:hover, .field select:hover { border-color: var(--blue); }
.field input:focus, .field select:focus { outline: none; border-color: var(--teal-deep); box-shadow: 0 0 0 3px rgba(0, 131, 133, 0.16); }
.field--check { display: flex; align-items: flex-start; gap: 12px; }
.field--check input { width: 22px; height: 22px; min-height: 0; margin-top: 2px; flex-shrink: 0; accent-color: var(--coral-deep); }
.field--check label { margin: 0; font-weight: 400; font-size: 15px; line-height: 1.5; }
.hp { position: absolute; left: -9999px; }

/* ---------- Motion ------------------------------------------------------- */

.js-reveals .reveal { opacity: 0; transform: translateY(18px); transition: opacity 620ms var(--ease), transform 620ms var(--ease); }
.js-reveals .reveal.is-in { opacity: 1; transform: none; }
.js-reveals .reveal-stagger > * { opacity: 0; transform: translateY(18px); transition: opacity 560ms var(--ease), transform 560ms var(--ease); }
.js-reveals .reveal-stagger.is-in > * { opacity: 1; transform: none; }
.js-reveals .reveal-stagger.is-in > *:nth-child(2) { transition-delay: 60ms; }
.js-reveals .reveal-stagger.is-in > *:nth-child(3) { transition-delay: 120ms; }
.js-reveals .reveal-stagger.is-in > *:nth-child(4) { transition-delay: 180ms; }

[hidden] { display: none !important; }
.no-js .reveal, .no-js .reveal-stagger > * { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .js-reveals .reveal, .js-reveals .reveal-stagger > * { opacity: 1; transform: none; }
}

/* ---------- Screen-reader only ------------------------------------------- */

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Learning Hub menu -------------------------------------------- */

.nav__toggle--hub .i:first-child { width: 17px; height: 17px; opacity: 0.8; }
.menu--hub { min-width: 288px; padding: 12px; }
.menu__lede { margin: 4px 8px 10px; font-size: 13px; line-height: 1.45; color: var(--ink-muted); }
.menu__ext { align-items: flex-start; gap: 10px; }
.menu__ext .menu__text { display: flex; flex-direction: column; gap: 1px; }
.menu__ext .menu__text b { font-weight: 600; font-size: 14.5px; }
.menu__ext .menu__text span { font-size: 12.5px; color: var(--ink-muted); font-weight: 400; }
.menu__ext .i { margin-left: auto; margin-top: 4px; opacity: 0.6; flex-shrink: 0; }

/* ---------- Small button ------------------------------------------------- */

.btn--sm { min-height: 46px; padding: 12px 20px; font-size: 15px; }

/* ---------- Daily insight ------------------------------------------------ */

.dailycard {
  margin: 0; padding: clamp(28px, 4vw, 52px); background: var(--white);
  border: 1px solid var(--rule); border-left: 6px solid var(--coral-deep);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.dailycard__meta { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s2); margin-bottom: var(--s4); }
.dailycard__date { font-size: 13.5px; font-weight: 600; color: var(--ink-muted); }
.dailycard__quote {
  font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: clamp(24px, 3.4vw, 38px); line-height: 1.32; color: var(--blue);
}
.dailycard__theme { margin-top: var(--s4); font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--teal-deep); }

.insightlist { list-style: none; padding: 0; display: grid; gap: var(--s3); }
.insightrow { padding: clamp(20px, 2.4vw, 28px); background: var(--white); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.insightrow__theme { display: block; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 6px; }
.insightrow p { font-family: var(--serif); font-style: italic; font-size: clamp(17px, 1.8vw, 21px); line-height: 1.4; color: var(--ink); }

/* ---------- Training modules --------------------------------------------- */

.modules { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s4); margin-top: clamp(36px, 4vw, 52px); }
.modules--4 { grid-template-columns: repeat(4, 1fr); }
.module { position: relative; margin: 0; padding: clamp(24px, 2.6vw, 32px); background: var(--white); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.module__n { font-family: var(--display); font-weight: 700; font-size: 14px; color: var(--coral-deep); }
.module__i { display: inline-grid; place-items: center; width: 46px; height: 46px; margin: var(--s2) 0 var(--s3); border-radius: 13px; background: rgba(0, 131, 133, 0.09); }
.module__i .i { width: 22px; height: 22px; }
.module h3 { font-size: 19px; margin-bottom: var(--s1); }
.module p { color: var(--ink-muted); font-size: 15px; }

.ticklist { list-style: none; padding: 0; margin-top: var(--s4); display: grid; gap: var(--s2); }
.ticklist li { position: relative; padding-left: 32px; line-height: 1.5; color: rgba(255, 255, 255, 0.9); }
.ticklist li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--peach) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%233b4478' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center / 14px no-repeat;
}

/* ---------- Shop / Purchase ---------------------------------------------- */

.shopgrid { display: grid; gap: var(--s3); margin-top: clamp(28px, 3vw, 40px); }
.shopgrid--2 { grid-template-columns: repeat(2, 1fr); }
.shopgrid--3 { grid-template-columns: repeat(3, 1fr); }
.shopcard {
  display: flex; align-items: center; gap: var(--s3);
  padding: clamp(18px, 2vw, 24px); background: var(--white);
  border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.shopcard__body { flex: 1; min-width: 0; }
.shopcard h3 { font-size: 19px; }
.shopcard__sub { color: var(--ink-muted); font-size: 14.5px; margin-top: 3px; }
.shopcard__meta { font-size: 13px; font-weight: 600; color: var(--teal-deep); margin-top: 6px; font-variant-numeric: tabular-nums; }
.shopcard__i { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: rgba(0, 131, 133, 0.09); flex-shrink: 0; }
.shopcard__i.accent-gold { background: rgba(222, 197, 36, 0.16); }
.shopcard__i .i { width: 21px; height: 21px; }
/* Product photo: fixed square frame, image fully visible (contain, never cropped). */
.shopthumb { display: grid; place-items: center; width: 88px; height: 88px; flex-shrink: 0; border-radius: 14px; background: var(--cream); border: 1px solid var(--rule); overflow: hidden; }
.shopthumb img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.pricetag { font-family: var(--display); font-weight: 700; font-size: 20px; color: var(--coral-deep); flex-shrink: 0; font-variant-numeric: tabular-nums; }

.swatch { width: 46px; height: 46px; border-radius: 12px; flex-shrink: 0; box-shadow: inset 0 0 0 1px rgba(59, 68, 120, 0.12); }
.swatch--green { background: linear-gradient(150deg, #4e7717, #85be41); }
.swatch--teal { background: linear-gradient(150deg, #007c7e, #6fc9cb); }
.swatch--coral { background: linear-gradient(150deg, #b74c5d, #fccbad); }
.swatch--gold { background: linear-gradient(150deg, #7e7005, #dec524); }
.swatch--blue { background: linear-gradient(150deg, #2a3160, #6b74b0); }

/* ---------- Responsive --------------------------------------------------- */

@media (max-width: 1280px) {
  .nav { display: none; }
  .navtoggle { display: flex; }
  .masthead__inner { min-height: 66px; }
  .nav.is-open {
    display: flex; position: fixed; inset: 66px 0 0; z-index: 200; flex-direction: column; align-items: stretch;
    gap: 2px; margin: 0; padding: var(--s4) var(--gutter) var(--s8); background: var(--cream); overflow-y: auto; overscroll-behavior: contain;
  }
  .nav.is-open .nav__link { justify-content: space-between; width: 100%; padding: 15px 16px; font-size: 17px; }
  .nav.is-open .hasmenu { position: static; }
  .nav.is-open .menu { position: static; min-width: 0; margin: 2px 0 10px; padding: 4px; border: 0; border-left: 3px solid var(--rule); border-radius: 0; box-shadow: none; background: transparent; }
  .nav.is-open .menu a { padding: 13px 16px; }
  .nav.is-open .nav__tail { flex-direction: column; align-items: stretch; width: 100%; gap: var(--s3); margin: var(--s4) 0 0; }
  .nav.is-open .nav__cta { justify-content: center; }
  .nav.is-open .langtoggle { justify-content: center; align-self: center; }
}

@media (max-width: 900px) {
  .band, .contactgrid { grid-template-columns: 1fr; }
  .band__cta { justify-content: flex-start; }
  .grid--3, .grid--4, .movements { grid-template-columns: 1fr; }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .statband, .statband--4, .statband--5 { grid-template-columns: repeat(2, 1fr); }
  .sitefoot__grid { grid-template-columns: 1fr 1fr; }
  .modules, .modules--4, .shopgrid--3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .grid--4, .statband, .statband--4, .statband--5, .sitefoot__grid { grid-template-columns: 1fr; }
  .modules, .modules--4, .shopgrid--2, .shopgrid--3 { grid-template-columns: 1fr; }
  .btn { width: 100%; }
  .btn--sm { width: auto; }
  .btn-row { flex-direction: column; }
  .center .btn-row, .btn-row.center { align-items: center; }
  .nav__cta { width: auto; }
  .shopcard { flex-wrap: wrap; }
  .pricetag { margin-left: auto; }
}

@media print {
  .masthead, .navtoggle, .btn-row { display: none !important; }
  body { background: #fff; }
}

/* =========================================================================
   Insights archive + reader (ForeverMe Insights newsletter)
   Namespaced .fmi-* components, rendered by assets/js/insights.js into
   #insights-app. Built entirely on the Academy design tokens above.
   ========================================================================= */

/* Per-series accent — maps each series onto the brand palette. */
.fmi-hero[data-accent], .fmi-card[data-accent], .fmi-chip[data-accent],
.fmi-sec__badge[data-accent], .fmi-reader__hero[data-accent] { --ac: var(--blue); --ac-deep: var(--blue); --ac-tint: rgba(59, 68, 120, 0.1); }
[data-accent="coral"] { --ac: var(--coral); --ac-deep: var(--coral-deep); --ac-tint: rgba(241, 100, 122, 0.13); }
[data-accent="gold"]  { --ac: var(--gold);  --ac-deep: var(--gold-deep);  --ac-tint: rgba(222, 197, 36, 0.18); }
[data-accent="lime"]  { --ac: var(--lime);  --ac-deep: var(--lime-deep);  --ac-tint: rgba(133, 190, 65, 0.18); }
[data-accent="green"] { --ac: var(--green); --ac-deep: var(--green-deep); --ac-tint: rgba(0, 128, 79, 0.1); }
[data-accent="teal"]  { --ac: var(--teal);  --ac-deep: var(--teal-deep);  --ac-tint: rgba(0, 131, 133, 0.1); }
[data-accent="blue"]  { --ac: var(--blue);  --ac-deep: var(--blue);       --ac-tint: rgba(59, 68, 120, 0.1); }

#insights-app { display: block; }
#insights-app:focus { outline: none; }

.fmi-fade { animation: fmi-fade 480ms var(--ease) both; }
@keyframes fmi-fade { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .fmi-fade { animation: none; } }

/* ---------- Featured hero ------------------------------------------------ */
.fmi-hero {
  display: flex; align-items: flex-end; position: relative; margin-bottom: var(--s5);
  padding: clamp(28px, 5vw, 56px); min-height: clamp(280px, 34vw, 420px);
  border-radius: var(--radius); overflow: hidden; color: #fff; text-decoration: none;
  background-size: cover; background-position: center; box-shadow: var(--shadow);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.fmi-hero:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.fmi-hero:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.fmi-hero__inner { position: relative; max-width: 760px; display: block; }
.fmi-hero__kicker { display: block; font: 700 12.5px/1 var(--body); letter-spacing: 0.16em; text-transform: uppercase; color: var(--peach); margin-bottom: var(--s3); }
.fmi-hero__title { display: block; font-family: var(--display); font-weight: 700; font-size: clamp(28px, 5vw, 52px); line-height: 1.03; letter-spacing: -0.01em; text-wrap: balance; }
.fmi-hero__sub { display: block; margin-top: var(--s3); font-family: var(--serif); font-style: italic; font-size: clamp(17px, 2.2vw, 23px); line-height: 1.4; color: rgba(255, 255, 255, 0.92); max-width: 60ch; }
.fmi-hero__read { display: inline-flex; align-items: center; gap: 7px; margin-top: var(--s4); font: 700 15px/1 var(--body); color: #fff; }
.fmi-hero__read .i { transition: transform var(--dur) var(--ease); }
.fmi-hero:hover .fmi-hero__read .i { transform: translateX(4px); }

/* ---------- Controls: search + count ------------------------------------- */
.fmi-controls { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); margin-bottom: var(--s3); }
.fmi-search { position: relative; flex: 1 1 260px; min-width: 240px; }
.fmi-search__icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); display: inline-grid; place-items: center; color: var(--teal-deep); pointer-events: none; }
.fmi-search input {
  width: 100%; min-height: 52px; padding: 13px 46px 13px 46px; border: 1.5px solid var(--rule-strong);
  border-radius: 999px; background: var(--white); color: var(--ink); font: 400 16px/1.5 var(--body);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.fmi-search input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.fmi-search input:hover { border-color: var(--blue); }
.fmi-search input:focus { outline: none; border-color: var(--teal-deep); box-shadow: 0 0 0 3px rgba(0, 131, 133, 0.16); }
.fmi-search__clear { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); display: inline-grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--cream); color: var(--ink-muted); cursor: pointer; transition: background var(--dur) var(--ease), color var(--dur) var(--ease); }
.fmi-search__clear:hover { background: rgba(59, 68, 120, 0.1); color: var(--ink); }
.fmi-count { font: 600 14px/1 var(--body); color: var(--ink-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- Series tabs -------------------------------------------------- */
.fmi-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: var(--s5); }
.fmi-tab {
  min-height: 40px; padding: 8px 16px; border: 1.5px solid var(--rule-strong); border-radius: 999px;
  background: var(--white); color: var(--ink); font: 600 14px/1 var(--body); cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.fmi-tab:hover { border-color: var(--blue); }
.fmi-tab:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.fmi-tab.is-active { background: var(--blue); border-color: var(--blue); color: #fff; }

/* ---------- Archive grid ------------------------------------------------- */
.fmi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--s4); }
.fmi-card {
  display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--rule);
  border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit; box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.fmi-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--ac); }
.fmi-card:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.fmi-card__media { position: relative; display: block; aspect-ratio: 8 / 5; background: var(--cream); overflow: hidden; border-bottom: 4px solid var(--ac); }
.fmi-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 480ms var(--ease); }
.fmi-card:hover .fmi-card__media img { transform: scale(1.05); }
.fmi-card__num { position: absolute; top: 12px; left: 12px; padding: 5px 11px; border-radius: 999px; background: rgba(47, 55, 106, 0.82); color: #fff; font: 800 13px/1 var(--display); letter-spacing: 0.02em; backdrop-filter: blur(4px); }
.fmi-card__body { display: flex; flex-direction: column; align-items: flex-start; gap: 9px; padding: var(--s4) clamp(18px, 2vw, 24px) clamp(20px, 2.4vw, 26px); flex: 1; }
.fmi-chip { display: inline-block; padding: 4px 11px; border-radius: 999px; background: var(--ac-tint); color: var(--ac-deep); font: 700 12px/1.3 var(--body); letter-spacing: 0.02em; }
.fmi-card__title { font-family: var(--display); font-weight: 700; font-size: 20px; line-height: 1.16; color: var(--blue); }
.fmi-card__sub { font-family: var(--serif); font-style: italic; font-size: 15px; line-height: 1.4; color: var(--ink-muted); }
.fmi-card__read { margin-top: auto; padding-top: 4px; display: inline-flex; align-items: center; gap: 6px; font: 600 14.5px/1 var(--body); color: var(--green-deep); }
.fmi-card__read .i { transition: transform var(--dur) var(--ease); }
.fmi-card:hover .fmi-card__read .i { transform: translateX(3px); }

.fmi-empty { padding: clamp(40px, 6vw, 72px) var(--s4); text-align: center; background: var(--cream); border: 1px dashed var(--rule-strong); border-radius: var(--radius); }
.fmi-empty p { color: var(--ink-muted); font-size: 17px; margin-bottom: var(--s4); }

/* ---------- Reader: toolbar --------------------------------------------- */
.fmi-reader { display: block; }
.fmi-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s4); }
.fmi-toolbar__actions { display: flex; flex-wrap: wrap; gap: var(--s2); }
.fmi-toolbar .btn { min-height: 46px; }
.fmi-toolbar .btn .i { flex-shrink: 0; }

/* ---------- Reader: issue hero ------------------------------------------ */
.fmi-reader__hero {
  position: relative; padding: clamp(30px, 5vw, 58px); border-radius: var(--radius); overflow: hidden;
  color: #fff; background-size: cover; background-position: center; box-shadow: var(--shadow); margin-bottom: var(--s5);
}
.fmi-reader__tag { display: inline-flex; align-items: center; gap: 4px; padding: 7px 15px; border-radius: 999px; background: rgba(255, 255, 255, 0.15); border: 1px solid rgba(255, 255, 255, 0.28); font: 700 12px/1 var(--body); letter-spacing: 0.06em; text-transform: uppercase; }
.fmi-reader__tag b { color: var(--gold); }
.fmi-reader__hero h1 { margin: var(--s3) 0 0; font-family: var(--display); font-weight: 700; font-size: clamp(28px, 5.4vw, 52px); line-height: 1.04; letter-spacing: -0.01em; max-width: 20ch; text-wrap: balance; }
.fmi-reader__sub { margin: var(--s3) 0 0; font-family: var(--serif); font-style: italic; font-size: clamp(18px, 2.4vw, 25px); line-height: 1.4; color: rgba(255, 255, 255, 0.92); max-width: 52ch; }
.fmi-reader__pos { display: inline-block; margin-top: var(--s4); font: 600 13px/1 var(--body); letter-spacing: 0.04em; color: rgba(255, 255, 255, 0.7); }

/* ---------- Reader: article --------------------------------------------- */
.fmi-article { max-width: 760px; margin-inline: auto; }
.fmi-sec { background: var(--white); border: 1px solid var(--rule); border-radius: var(--radius); padding: clamp(24px, 3vw, 34px); box-shadow: var(--shadow-sm); margin-bottom: var(--s4); }
.fmi-sec__head { display: flex; align-items: center; gap: var(--s3); margin-bottom: var(--s3); }
.fmi-sec__badge { flex: 0 0 auto; display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: var(--ac-tint); color: var(--ac-deep); font: 800 15px/1 var(--display); }
.fmi-sec__head h2 { font-family: var(--display); font-weight: 700; font-size: clamp(20px, 2.4vw, 26px); line-height: 1.14; color: var(--blue); }
.fmi-sec p { margin: 0 0 var(--s3); color: var(--ink); line-height: 1.7; }
.fmi-sec p:last-child { margin-bottom: 0; }
.fmi-sec--rachel { background: linear-gradient(180deg, #fffdf6, #fbf7e6); border-left: 6px solid var(--lime); }
.fmi-sec--feature { background: linear-gradient(135deg, #eef8f1, #e3f1ec); border: 1px dashed var(--green-deep); }
.fmi-sec--feature .fmi-sec__head h2 { color: var(--green-deep); }
.fmi-sec--quote { margin: 0 0 var(--s4); text-align: center; background: linear-gradient(135deg, var(--green-deep), var(--teal-deep)); border: 0; color: #fff; }
.fmi-sec--quote blockquote { margin: 0 auto; font-family: var(--serif); font-style: italic; font-weight: 500; font-size: clamp(21px, 3vw, 30px); line-height: 1.35; max-width: 26ch; }
.fmi-sec--quote p { color: rgba(255, 255, 255, 0.92); margin-top: var(--s3); }

/* ---------- Reader: pager ----------------------------------------------- */
.fmi-pager { display: flex; gap: var(--s3); margin-top: var(--s5); max-width: 760px; margin-inline: auto; }
.fmi-pager__slot { flex: 1; display: flex; flex-direction: column; gap: 5px; padding: 16px 20px; background: var(--white); border: 1px solid var(--rule); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); text-decoration: none; transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.fmi-pager__slot:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--teal-deep); }
.fmi-pager__slot.is-empty { visibility: hidden; box-shadow: none; }
.fmi-pager__slot.is-next { text-align: right; }
.fmi-pager__lbl { font: 700 11.5px/1 var(--body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--teal-deep); }
.fmi-pager__ttl { font-family: var(--display); font-weight: 700; font-size: 16px; line-height: 1.2; color: var(--blue); }

@media (max-width: 560px) {
  .fmi-grid { grid-template-columns: 1fr; }
  .fmi-toolbar { flex-direction: column; align-items: stretch; }
  .fmi-toolbar .btn { width: 100%; justify-content: center; }
  .fmi-toolbar__actions { flex-wrap: nowrap; }
  .fmi-toolbar__actions .btn { flex: 1; }
  .fmi-pager { flex-direction: column; }
  .fmi-pager__slot.is-empty { display: none; }
  .fmi-pager__slot.is-next { text-align: left; }
}

/* ---------- Print: clean single-column issue ---------------------------- */
@media print {
  #insights-app .fmi-toolbar, #insights-app .fmi-pager { display: none !important; }
  .fmi-reader__hero { box-shadow: none !important; color: #111 !important; background: none !important; border: 1px solid #ddd; }
  .fmi-reader__hero .fmi-reader__tag { background: none; border-color: #ccc; color: #333; }
  .fmi-reader__hero h1, .fmi-reader__sub, .fmi-reader__pos { color: #111 !important; }
  .fmi-reader__tag b { color: #333 !important; }
  .fmi-article { max-width: 100%; }
  .fmi-sec { box-shadow: none !important; border: 1px solid #eee; break-inside: avoid; margin-bottom: 12px; }
  .fmi-sec--quote { color: #fff !important; }
}

/* ---------- Site search --------------------------------------------------- */

/* The trigger sits in the masthead beside the hamburger, so it is reachable on
   mobile without opening the drawer first. */
.searchtoggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-family: var(--body);
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.searchtoggle:hover {
  background: rgba(59, 68, 120, 0.06);
  border-color: var(--ink);
}

.searchtoggle:focus-visible {
  outline: 3px solid var(--teal-deep);
  outline-offset: 2px;
}

@media (max-width: 1180px) {
  /* Beside the hamburger the label costs more room than it earns; the button
     keeps its 44px target and its accessible name comes from aria-label. */
  .searchtoggle__label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
  }

  .searchtoggle {
    padding: 0;
    width: 44px;
    justify-content: center;
  }
}

/* --- the dialog --- */

.searchdlg {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  grid-template-rows: auto 1fr;
}

.searchdlg[hidden] {
  display: none;
}

.searchdlg__scrim {
  position: fixed;
  inset: 0;
  /* Strong enough to isolate the panel from whatever page is behind it. */
  background: rgba(24, 28, 52, 0.55);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

.searchdlg__panel {
  position: relative;
  width: min(680px, calc(100vw - 32px));
  max-height: min(76vh, 720px);
  margin: clamp(16px, 8vh, 88px) auto 0;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: searchIn 180ms var(--ease) both;
}

@keyframes searchIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: none; }
}

.searchdlg__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 10px 18px;
  border-bottom: 1px solid var(--rule);
  flex: none;
}

.searchdlg__icon {
  display: grid;
  place-items: center;
  color: var(--ink-muted);
  flex: none;
}

.searchdlg__input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  border: 0;
  background: transparent;
  /* 16px minimum stops iOS zooming the page on focus. */
  font-family: var(--body);
  font-size: 17px;
  color: var(--ink);
}

.searchdlg__input::placeholder {
  color: var(--ink-muted);
}

.searchdlg__input:focus {
  outline: none;
}

.searchdlg__input::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

.searchdlg__close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-muted);
  cursor: pointer;
}

.searchdlg__close:hover {
  background: var(--cream);
  color: var(--ink);
}

.searchdlg__close:focus-visible {
  outline: 3px solid var(--teal-deep);
  outline-offset: -2px;
}

.searchdlg__status {
  padding: 12px 18px 0;
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-muted);
  flex: none;
}

.searchdlg__status:empty {
  display: none;
}

.searchdlg__results {
  list-style: none;
  margin: 0;
  padding: 8px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1;
}

.searchdlg__hint {
  padding: 12px 18px;
  margin: 0;
  border-top: 1px solid var(--rule);
  font-size: 12.5px;
  color: var(--ink-muted);
  flex: none;
}

@media (max-width: 620px) {
  /* On a phone the hint competes with the results for a short viewport. */
  .searchdlg__hint {
    display: none;
  }

  .searchdlg__panel {
    max-height: calc(100dvh - 32px);
  }
}

/* --- one result --- */

.sresult a {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  color: inherit;
  text-decoration: none;
}

.sresult a:hover,
.sresult[aria-selected="true"] a {
  background: var(--cream);
}

.sresult a:focus-visible {
  outline: 3px solid var(--teal-deep);
  outline-offset: -3px;
}

.sresult__page {
  display: block;
  font-family: var(--display);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal-deep);
}

.sresult__title {
  display: block;
  margin-top: 3px;
  font-weight: 600;
  font-size: 16px;
  line-height: 1.35;
  color: var(--ink);
}

.sresult__snip {
  display: block;
  margin-top: 4px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink-muted);
  /* Two lines, so a long section never pushes the next result off screen. */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Why this result matched. Underline as well as tint, so the emphasis is not
   carried by colour alone. */
.sresult mark {
  background: rgba(222, 197, 36, 0.32);
  color: inherit;
  border-radius: 3px;
  padding: 0 1px;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

/* The page behind the dialog must not scroll while it is open. */
.search-open,
.search-open body {
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .searchdlg__panel {
    animation: none;
  }
}

