/*
Theme Name: Fruit Machine Guide
Description: Theme of fruitmachineguide.co.uk (GB). Reel-room palette: baize green ground, a single Union red rule, amber for every call to action, warm paper for reading. Allowed blocks: headings, text, table, lists, pros/cons, full-width image, author quote.
Version: 1.0.0
Author: WP-generator
Text Domain: wpgen
*/

/* Inter, variable, self-hosted. Two files cover weights 100-900. */
@font-face {
  font-family: "Inter";
  src: url("assets/fonts/inter-var.woff2") format("woff2-variations"),
       url("assets/fonts/inter-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("assets/fonts/inter-var-italic.woff2") format("woff2-variations"),
       url("assets/fonts/inter-var-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  /* Green carries the structure, amber is the only thing you are ever asked to
     click, red marks an edge. Paper is warm, so the reading column never looks
     like a spreadsheet. */
  --fmg-green: #0F3D2E;
  --fmg-green-deep: #0A2A20;
  --fmg-hero-wash: linear-gradient(152deg, #1A5C43 0%, #0F3D2E 56%, #0A2A20 100%);
  --fmg-red: #C8102E;
  --fmg-red-soft: #E8536A;
  --fmg-red-deep: #8E0A20;
  --fmg-amber: #F4B740;
  --fmg-amber-deep: #C98B12;
  --fmg-chalk: #FFFFFF;
  --fmg-mist: #A9C9B8;          /* light type on the green ground */
  --fmg-face: "Inter", "Segoe UI", system-ui, -apple-system, Helvetica, Arial, sans-serif;
  --fmg-ink: #17241E;
  --fmg-muted: #5E7A6C;
  --fmg-rule: #E1DDD4;
  --fmg-rule-2: #CBC5B8;
  --fmg-card: #FFFFFF;
  --fmg-paper: #F5F2EC;
  --fmg-plus: #E8F3EB;
  --fmg-plus-rule: #1F7A4D;
  --fmg-minus: #FBEAEC;
  --fmg-minus-rule: #B02334;
  --fmg-radius: 12px;
  --fmg-radius-sm: 7px;
  --fmg-width: 1160px;
  /* Mascot doubles as the icon of the "where it stalled" box. The path must be
     absolute: url() inside a custom property resolves from the file where the
     property is USED, not where it is declared. */
  --fmg-icon-snag: url('/wp-content/themes/wpgen-gb/assets/mascot.svg');
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--fmg-paper);
  color: var(--fmg-ink);
  font: 400 18px/1.72 var(--fmg-face);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-weight: 750; letter-spacing: -.4px; line-height: 1.24; }

img { max-width: 100%; height: auto; }
a { color: var(--fmg-red-deep); text-underline-offset: 2px; }
a:hover { color: var(--fmg-red); }

.fmg-shell { max-width: var(--fmg-width); margin: 0 auto; padding: 0 22px; }

/* ---------------- header ---------------- */

/* Three reel bars instead of a flag block: red, chalk, amber. The mark repeats
   the same three colours, so the header reads as one object. */
.fmg-masthead { background: var(--fmg-green); border-bottom: 1px solid #1B5340; }
.fmg-reelline { display: flex; height: 6px; }
.fmg-reelline span { display: block; height: 100%; }
.fmg-reelline span:nth-child(1) { width: 46%; background: var(--fmg-red); }
.fmg-reelline span:nth-child(2) { width: 8%; background: var(--fmg-chalk); }
.fmg-reelline span:nth-child(3) { flex: 1; background: var(--fmg-amber); }

.fmg-masthead-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 14px 0;
}

.fmg-burger {
  display: none;
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  padding: 11px 9px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(244, 183, 64, .55);
  border-radius: var(--fmg-radius-sm);
  cursor: pointer;
}
.fmg-burger span {
  display: block;
  height: 2px;
  background: var(--fmg-chalk);
  border-radius: 1px;
}
.fmg-burger span + span { margin-top: 5px; }
.fmg-burger:hover { border-color: var(--fmg-amber); }

.fmg-brand { display: flex; align-items: center; gap: 13px; text-decoration: none; }
.fmg-brand-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
}
.fmg-brand-words { display: block; line-height: 1.12; }
.fmg-brand-kicker {
  display: block;
  font-size: 10.5px;
  letter-spacing: 1.9px;
  text-transform: uppercase;
  color: var(--fmg-mist);
  margin-bottom: 4px;
}
.fmg-brand-name { display: block; font-size: 25px; font-weight: 800; letter-spacing: -.6px; }
.fmg-brand-name b { color: var(--fmg-chalk); font-weight: 800; }
.fmg-brand-name i { color: var(--fmg-amber); font-style: normal; font-weight: 800; }

/* ---------------- navigation ---------------- */

.fmg-nav { background: var(--fmg-green-deep); }
.fmg-nav ul { list-style: none; margin: 0; padding: 0; }
.fmg-nav > .fmg-shell > ul { display: flex; flex-wrap: wrap; }
.fmg-nav li { position: relative; }
.fmg-nav a,
.fmg-nav-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 14px 17px;
  color: var(--fmg-mist);
  font: 600 15px/1 var(--fmg-face);
  text-decoration: none;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  cursor: pointer;
}
.fmg-nav a:hover,
.fmg-nav-btn:hover { color: var(--fmg-chalk); border-bottom-color: var(--fmg-amber); }
.fmg-nav > .fmg-shell > ul > li.fmg-open > .fmg-nav-btn { color: var(--fmg-chalk); border-bottom-color: var(--fmg-amber); }

.fmg-nav-arrow {
  width: 8px; height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform .15s;
}
.fmg-open > .fmg-nav-btn .fmg-nav-arrow { transform: rotate(-135deg) translate(-3px, -3px); }

.fmg-nav .sub-menu {
  display: none;
  position: absolute;
  z-index: 40;
  top: 100%;
  left: 0;
  min-width: 258px;
  padding: 7px 0;
  background: #12402F;
  border: 1px solid #1C5541;
  border-top: 3px solid var(--fmg-amber);
  border-radius: 0 0 var(--fmg-radius-sm) var(--fmg-radius-sm);
  box-shadow: 0 20px 42px rgba(0, 0, 0, .46);
}
.fmg-nav li.fmg-open > .sub-menu { display: block; }

/* Desktop: the dropdown opens on hover as well as on click. The click handler
   in nav.js stays, so keyboard and touch users are unaffected; :focus-within
   covers tabbing through the menu. Below 981px the burger owns the menu and
   hover means nothing, hence the media query. */
@media (min-width: 981px) {
  .fmg-nav > .fmg-shell > ul > li.menu-item-has-children:hover > .sub-menu,
  .fmg-nav > .fmg-shell > ul > li.menu-item-has-children:focus-within > .sub-menu { display: block; }
  .fmg-nav > .fmg-shell > ul > li.menu-item-has-children:hover > .fmg-nav-btn,
  .fmg-nav > .fmg-shell > ul > li.menu-item-has-children:focus-within > .fmg-nav-btn {
    color: var(--fmg-chalk);
    border-bottom-color: var(--fmg-amber);
  }
  .fmg-nav > .fmg-shell > ul > li.menu-item-has-children:hover > .fmg-nav-btn .fmg-nav-arrow,
  .fmg-nav > .fmg-shell > ul > li.menu-item-has-children:focus-within > .fmg-nav-btn .fmg-nav-arrow {
    transform: rotate(-135deg) translate(-3px, -3px);
  }
}
.fmg-nav .sub-menu a { padding: 10px 17px; font-weight: 500; border-bottom: 0; }
.fmg-nav .sub-menu a:hover { background: rgba(244, 183, 64, .14); }

/* ---------------- hero ---------------- */

.fmg-hero {
  position: relative;
  background: var(--fmg-hero-wash);
  color: #E9F4EE;
  padding: 46px 0 42px;
  border-bottom: 4px solid var(--fmg-amber);
}
.fmg-hero h1 { margin: 0 0 15px; font-size: 41px; color: var(--fmg-chalk); }
.fmg-standfirst { margin: 0 0 18px; font-size: 19px; color: #C3DDCE; max-width: 64ch; }
.fmg-standfirst a { color: var(--fmg-amber); }

.fmg-hero-grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: 34px; align-items: center; }
.fmg-hero-solo .fmg-hero-grid { grid-template-columns: 1fr; }
.fmg-hero-art img { display: block; width: 100%; border-radius: var(--fmg-radius); }

.fmg-crumbs { font-size: 13px; color: #8FB3A1; margin-bottom: 15px; }
.fmg-crumbs a { color: #8FB3A1; text-decoration: none; }
.fmg-crumbs a:hover { color: var(--fmg-chalk); text-decoration: underline; }

.fmg-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.fmg-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(169, 201, 184, .28);
  border-radius: 999px;
  color: #E8F3EC;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}
.fmg-chip:hover { background: var(--fmg-amber); border-color: var(--fmg-amber); color: var(--fmg-green); }

/* ---------------- byline ---------------- */

.fmg-byline { display: flex; flex-wrap: wrap; gap: 26px; align-items: center; margin: 22px 0 16px; }
.fmg-byline-person { display: flex; align-items: center; gap: 11px; font-size: 14px; }
.fmg-byline-person img { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--fmg-amber); object-fit: cover; }
.fmg-byline-meta a { color: var(--fmg-chalk); font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--fmg-amber); }
.fmg-byline-meta a:hover { color: var(--fmg-amber); }
.fmg-byline-role { color: #8FB3A1; }
.fmg-byline-date { margin-left: auto; }

.fmg-notice {
  margin: 0;
  padding: 14px 17px;
  background: rgba(0, 0, 0, .27);
  border-left: 4px solid var(--fmg-red);
  border-radius: 0 var(--fmg-radius-sm) var(--fmg-radius-sm) 0;
  font-size: 13.5px;
  line-height: 1.62;
  color: #BAD3C5;
}
.fmg-notice-age,
.fmg-age {
  display: inline-block;
  padding: 1px 7px;
  margin-right: 6px;
  background: var(--fmg-red);
  border-radius: 3px;
  color: var(--fmg-chalk);
  font-size: 12px;
  font-weight: 800;
  vertical-align: 1px;
}

/* ---------------- content ---------------- */

.fmg-main { padding: 34px 0 58px; }
.fmg-panel {
  background: var(--fmg-card);
  border: 1px solid var(--fmg-rule);
  border-radius: var(--fmg-radius);
  padding: 34px 42px 42px;
  box-shadow: 0 1px 2px rgba(11, 27, 51, .05);
}

/* H2 carries a three-bar reel tab instead of a plain rule: the section edge is
   the one place the mark repeats down the page. */
.fmg-prose h2 {
  position: relative;
  margin: 46px 0 16px;
  padding-left: 20px;
  font-size: 28px;
}
.fmg-prose h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: .2em;
  width: 8px;
  height: .9em;
  background: linear-gradient(180deg, var(--fmg-red) 0 34%, var(--fmg-amber) 34% 67%, var(--fmg-green) 67% 100%);
  border-radius: 2px;
}
.fmg-prose h2:first-child { margin-top: 4px; }
.fmg-prose h3 { margin: 32px 0 10px; font-size: 21px; }
.fmg-prose h4 { margin: 24px 0 8px; font-size: 17px; }
.fmg-prose p { margin: 0 0 18px; }
.fmg-prose ul, .fmg-prose ol { margin: 0 0 22px; padding-left: 22px; }
.fmg-prose li { margin-bottom: 9px; }
.fmg-prose li::marker { color: var(--fmg-amber-deep); font-weight: 700; }
.fmg-prose figure { margin: 32px 0; }
.fmg-prose figure img { display: block; width: 100%; border-radius: var(--fmg-radius); }
.fmg-prose figcaption { margin-top: 10px; font-size: 14px; color: var(--fmg-muted); }
.fmg-prose strong { font-weight: 700; }

/* Tables scroll instead of squeezing: a five column comparison cannot be made
   to fit 360 px without turning the numbers into confetti. */
.fmg-prose .wp-block-table,
.fmg-prose table { width: 100%; }
.fmg-prose .wp-block-table { overflow-x: auto; margin: 28px 0; border-radius: var(--fmg-radius); }
.fmg-prose table { border-collapse: collapse; font-size: 15.5px; min-width: 520px; }
.fmg-prose th, .fmg-prose td { padding: 12px 14px; border: 1px solid var(--fmg-rule-2); text-align: left; vertical-align: top; }
.fmg-prose thead th { background: var(--fmg-green); color: var(--fmg-chalk); font-weight: 700; border-color: #1C5541; }
.fmg-prose tbody tr:nth-child(even) td { background: #FAF8F4; }

.fmg-pullquote,
.fmg-prose blockquote {
  position: relative;
  margin: 30px 0;
  padding: 24px 28px 24px 30px;
  background: #FBF8F2;
  border: 1px solid var(--fmg-rule);
  border-left: 5px solid var(--fmg-amber);
  border-radius: 0 var(--fmg-radius) var(--fmg-radius) 0;
  font-size: 18.5px;
  font-style: italic;
  color: #1F3A2E;
}
.fmg-pullquote p, .fmg-prose blockquote p { margin: 0 0 10px; }
.fmg-pullquote cite, .fmg-prose blockquote cite,
.fmg-pullquote footer, .fmg-prose blockquote footer {
  display: block;
  font-size: 14px;
  font-style: normal;
  font-weight: 700;
  color: var(--fmg-red-deep);
}

/* pros and cons: two columns, one green, one red */
.fmg-proscons { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 30px 0; }
.fmg-proscons > div { padding: 18px 22px; border-radius: var(--fmg-radius); }
.fmg-proscons > div:first-child { background: var(--fmg-plus); border-left: 5px solid var(--fmg-plus-rule); }
.fmg-proscons > div:last-child { background: var(--fmg-minus); border-left: 5px solid var(--fmg-minus-rule); }
.fmg-proscons h4 { margin: 0 0 10px; font-size: 15px; text-transform: uppercase; letter-spacing: .8px; }
.fmg-proscons ul { margin: 0; padding-left: 18px; }
.fmg-proscons li { font-size: 16px; }

/* "where it stalled": the box where a test did not go to plan */
.fmg-snag {
  position: relative;
  margin: 32px 0;
  padding: 20px 24px 20px 78px;
  background: #FFF8EC;
  border: 1px solid #EBD6A8;
  border-left: 5px solid var(--fmg-amber);
  border-radius: var(--fmg-radius);
}
.fmg-snag::before {
  content: "";
  position: absolute;
  left: 22px;
  top: 20px;
  width: 40px;
  height: 40px;
  background: var(--fmg-icon-snag) center/contain no-repeat;
}
.fmg-snag h4 { margin: 0 0 8px; font-size: 15px; text-transform: uppercase; letter-spacing: .8px; color: var(--fmg-red-deep); }
.fmg-snag p { margin: 0; font-size: 16.5px; }

/* ---------------- FAQ ---------------- */

.fmg-faq { margin: 36px 0 8px; border-top: 1px solid var(--fmg-rule); }
.fmg-faq-item { border-bottom: 1px solid var(--fmg-rule); }
.fmg-faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 18px 2px;
  background: none;
  border: 0;
  cursor: pointer;
  text-align: left;
  font: 700 17.5px/1.45 var(--fmg-face);
  color: var(--fmg-ink);
}
.fmg-faq-q:hover { color: var(--fmg-red); }
.fmg-faq-icon {
  position: relative;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  background: var(--fmg-green);
  border-radius: 50%;
}
.fmg-faq-icon::before, .fmg-faq-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: var(--fmg-chalk);
  transform: translate(-50%, -50%);
}
.fmg-faq-icon::before { width: 11px; height: 2px; }
.fmg-faq-icon::after { width: 2px; height: 11px; transition: transform .15s; }
.fmg-faq-item.fmg-open .fmg-faq-icon { background: var(--fmg-amber); }
.fmg-faq-item.fmg-open .fmg-faq-icon::before { background: var(--fmg-green); }
.fmg-faq-item.fmg-open .fmg-faq-icon::after { transform: translate(-50%, -50%) scaleY(0); }
.fmg-faq-a { display: none; padding: 0 2px 20px; }
.fmg-faq-item.fmg-open .fmg-faq-a { display: block; }
.fmg-faq-a p:last-child { margin-bottom: 0; }

/* ---------------- how we test ---------------- */

.fmg-method {
  margin: 38px 0;
  padding: 28px 30px;
  background: var(--fmg-green);
  border-radius: var(--fmg-radius);
  color: #E4F1EA;
}
.fmg-method-title { margin: 0 0 8px; font-size: 22px; color: var(--fmg-chalk); border: 0; padding: 0; }
.fmg-method-title::before, .fmg-method-title::after { display: none; }
.fmg-method-lead { margin: 0 0 22px; font-size: 16px; color: #A6C6B4; max-width: 72ch; }
.fmg-method-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin: 0; padding: 0; list-style: none; }
.fmg-method-card { display: flex; flex-direction: column; gap: 10px; padding: 17px; background: rgba(255, 255, 255, .06); border-radius: var(--fmg-radius-sm); border-top: 3px solid rgba(255, 255, 255, .3); }
.fmg-method-card.fmg-step-clock { border-top-color: var(--fmg-amber); }
.fmg-method-mark { display: flex; align-items: center; gap: 9px; color: var(--fmg-amber); }
.fmg-method-icon { width: 26px; height: 26px; }
.fmg-method-no { font-size: 13px; font-weight: 800; color: #7FA491; }
.fmg-method-body { display: block; }
.fmg-method-step-title { display: block; font-size: 16px; margin-bottom: 4px; color: var(--fmg-chalk); }
.fmg-method-note { display: block; font-size: 14px; color: #A2C2AF; line-height: 1.5; }
.fmg-method-detail { display: block; margin-top: 9px; font-size: 14px; color: #8EB09C; line-height: 1.55; }
.fmg-method-more { margin: 20px 0 0; font-size: 15px; }
.fmg-method-more a { color: var(--fmg-amber); font-weight: 600; }

/* ---------------- banner ---------------- */

.fmg-promo { display: block; margin: 36px 0; border-radius: var(--fmg-radius); overflow: hidden; }
.fmg-promo img { display: block; width: 100%; }

/* ---------------- author card ---------------- */

.fmg-authorcard {
  display: flex;
  gap: 22px;
  margin-top: 26px;
  padding: 26px 30px;
  background: var(--fmg-card);
  border: 1px solid var(--fmg-rule);
  border-top: 4px solid var(--fmg-amber);
  border-radius: var(--fmg-radius);
}
.fmg-authorcard > img { flex: 0 0 76px; width: 76px; height: 76px; border-radius: 50%; object-fit: cover; }
.fmg-authorcard h2 { margin: 0 0 4px; font-size: 20px; border: 0; padding: 0; }
.fmg-authorcard h2::before, .fmg-authorcard h2::after { display: none; }
.fmg-authorcard p { margin: 0 0 12px; font-size: 16px; }
.fmg-authorcard .fmg-byline-role { color: var(--fmg-muted); font-size: 14.5px; }
.fmg-authorcard-link { font-weight: 600; }

.fmg-portrait { margin-top: 20px; }
.fmg-portrait img { width: 190px; height: 190px; border-radius: var(--fmg-radius); border: 4px solid var(--fmg-amber); object-fit: cover; }
.fmg-portrait-city { display: block; margin-top: 8px; font-size: 14px; color: #8FB3A1; }
.fmg-hero-author .fmg-hero-grid { grid-template-columns: 1fr; }

/* ---------------- child listing ---------------- */

.fmg-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 34px; }
.fmg-card {
  padding: 21px 23px;
  background: #FAF8F4;
  border: 1px solid var(--fmg-rule);
  border-radius: var(--fmg-radius);
}
.fmg-card:hover { border-color: var(--fmg-rule-2); }
.fmg-card-kicker { display: inline-block; margin-bottom: 8px; font-size: 11.5px; font-weight: 800; letter-spacing: 1.3px; text-transform: uppercase; color: var(--fmg-red-deep); }
.fmg-card-title { display: block; font-size: 19px; font-weight: 800; color: var(--fmg-ink); text-decoration: none; }
.fmg-card-title:hover { color: var(--fmg-red); }
.fmg-card-text { margin: 9px 0 0; font-size: 15.5px; color: #486054; }
.fmg-card-foot { display: flex; gap: 14px; margin-top: 14px; font-size: 13px; color: var(--fmg-muted); }
.fmg-card-empty { color: var(--fmg-muted); }

/* ---------------- footer ---------------- */

.fmg-foot { background: var(--fmg-green); color: #A9C9B8; padding: 46px 0 26px; font-size: 15px; border-top: 4px solid var(--fmg-amber); }
.fmg-foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 32px; }
.fmg-foot h4 { margin: 0 0 14px; font-size: 14px; color: var(--fmg-chalk); text-transform: uppercase; letter-spacing: 1.2px; }
.fmg-foot p { margin: 0 0 12px; line-height: 1.62; }
.fmg-foot ul { list-style: none; margin: 0; padding: 0; }
.fmg-foot li { margin-bottom: 9px; }
.fmg-foot a { color: #BDD8C9; text-decoration: none; }
.fmg-foot a:hover { color: var(--fmg-chalk); text-decoration: underline; }
.fmg-foot-note { margin-top: 30px; padding-top: 20px; border-top: 1px solid #1C5541; font-size: 13px; line-height: 1.65; color: #84A894; }

/* ---------------- self-assessment ---------------- */

.fmg-quiz { margin: 32px 0; }
.fmg-quiz-app { background: #FAF8F4; border: 1px solid var(--fmg-rule); border-radius: var(--fmg-radius); padding: 24px 26px; }
.fmg-quiz-intro { margin: 0 0 18px; font-size: 16px; color: #486054; }
.fmg-quiz-progress { margin: 16px 0 0; font-size: 14px; color: var(--fmg-muted); }
.fmg-quiz-send { padding: 12px 24px; background: var(--fmg-amber); color: var(--fmg-green); border: 0; border-radius: var(--fmg-radius-sm); font: 800 16px var(--fmg-face); cursor: pointer; }
.fmg-quiz-send:hover { background: var(--fmg-amber-deep); color: var(--fmg-chalk); }
.fmg-quiz-send:disabled { background: #C7CFD9; color: #6C7A8A; cursor: not-allowed; }

.fmg-quiz-form { margin: 0; }
.fmg-quiz-q { margin: 0 0 16px; padding: 16px 18px; background: var(--fmg-card); border: 1px solid var(--fmg-rule); border-radius: var(--fmg-radius-sm); }
.fmg-quiz-q.fmg-quiz-done { border-color: var(--fmg-amber); }
.fmg-quiz-q legend { display: flex; gap: 10px; align-items: baseline; padding: 0; font-weight: 700; font-size: 17px; }
.fmg-quiz-no { flex: 0 0 26px; width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; background: var(--fmg-green); color: var(--fmg-chalk); border-radius: 50%; font-size: 13px; }
.fmg-quiz-wording { display: inline-block; }
.fmg-quiz-choices { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.fmg-quiz-choices input { position: absolute; opacity: 0; width: 0; height: 0; }
.fmg-quiz-choices label { padding: 9px 17px; background: #F2EFE9; border: 1px solid var(--fmg-rule-2); border-radius: 999px; font-size: 15px; font-weight: 600; cursor: pointer; }
.fmg-quiz-choices label:hover { border-color: var(--fmg-amber); }
.fmg-quiz-choices input:checked + label { background: var(--fmg-green); border-color: var(--fmg-green); color: var(--fmg-chalk); }
.fmg-quiz-choices input:focus-visible + label { outline: 2px solid var(--fmg-amber); outline-offset: 2px; }
.fmg-quiz-again { margin-top: 16px; padding: 10px 18px; background: none; border: 1px solid var(--fmg-rule-2); border-radius: var(--fmg-radius-sm); font: 600 15px var(--fmg-face); cursor: pointer; }
.fmg-quiz-result { display: none; margin-top: 24px; padding: 22px 24px; background: var(--fmg-card); border: 1px solid var(--fmg-rule); border-left: 5px solid var(--fmg-amber); border-radius: var(--fmg-radius); }
.fmg-quiz-result.fmg-quiz-shown { display: block; }
.fmg-quiz-result h4 { margin: 0 0 8px; font-size: 19px; }
.fmg-quiz-badge { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; margin-bottom: 16px; }
.fmg-quiz-b-title { font-size: 21px; font-weight: 800; }
.fmg-quiz-b-value { font-size: 15px; color: var(--fmg-muted); }
.fmg-quiz-badge.fmg-lvl0 .fmg-quiz-b-title { color: #1F7A4D; }
.fmg-quiz-badge.fmg-lvl1 .fmg-quiz-b-title { color: #5C8C33; }
.fmg-quiz-badge.fmg-lvl2 .fmg-quiz-b-title { color: #B57616; }
.fmg-quiz-badge.fmg-lvl3 .fmg-quiz-b-title { color: var(--fmg-red); }
.fmg-quiz-scale-svg { width: 100%; height: auto; }
.fmg-quiz-g-band, .fmg-quiz-g-axis { font: 600 13px var(--fmg-face); fill: #5E7A6C; }
.fmg-quiz-g-value { font: 800 19px var(--fmg-face); fill: #17241E; }
.fmg-quiz-part { margin-bottom: 12px; }
.fmg-quiz-part-head { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 5px; }
.fmg-quiz-part-name { font-weight: 600; }
.fmg-quiz-part-value { color: var(--fmg-muted); }
.fmg-quiz-part-track { height: 8px; background: var(--fmg-rule); border-radius: 4px; overflow: hidden; }
.fmg-quiz-part-fill { height: 100%; }
.fmg-quiz-list { margin: 10px 0 0; padding-left: 20px; }
.fmg-quiz-list li { margin-bottom: 8px; }
.fmg-quiz-warning { margin-top: 18px; padding: 14px 16px; background: var(--fmg-minus); border-left: 4px solid var(--fmg-red); border-radius: 0 var(--fmg-radius-sm) var(--fmg-radius-sm) 0; font-size: 14.5px; }
.fmg-quiz-parts { display: block; margin-top: 18px; }
.fmg-quiz-parts-note { margin-top: 10px; font-size: 15px; color: #486054; }
.fmg-quiz-note { margin-top: 14px; font-size: 13.5px; color: var(--fmg-muted); }

/* ---------------- responsive ---------------- */

@media (max-width: 980px) {
  body { font-size: 17px; }
  .fmg-hero h1 { font-size: 31px; }
  .fmg-hero-grid { grid-template-columns: 1fr; gap: 24px; }
  .fmg-hero-art { order: -1; }
  .fmg-panel { padding: 24px 22px 30px; }
  .fmg-prose h2 { font-size: 24px; }
  .fmg-method-steps { grid-template-columns: repeat(2, 1fr); }
  .fmg-foot-grid { grid-template-columns: 1fr 1fr; }
  .fmg-cards { grid-template-columns: 1fr; }
  .fmg-proscons { grid-template-columns: 1fr; }

  .fmg-burger { display: block; }
  .fmg-nav { display: none; }
  .fmg-nav.fmg-open { display: block; }
  .fmg-nav > .fmg-shell > ul { display: block; }
  .fmg-nav .sub-menu { position: static; display: none; min-width: 0; box-shadow: none; border: 0; border-left: 3px solid var(--fmg-amber); margin-left: 16px; border-radius: 0; }
  .fmg-nav li.fmg-open > .sub-menu { display: block; }

/* Desktop: the dropdown opens on hover as well as on click. The click handler
   in nav.js stays, so keyboard and touch users are unaffected; :focus-within
   covers tabbing through the menu. Below 981px the burger owns the menu and
   hover means nothing, hence the media query. */
@media (min-width: 981px) {
  .fmg-nav > .fmg-shell > ul > li.menu-item-has-children:hover > .sub-menu,
  .fmg-nav > .fmg-shell > ul > li.menu-item-has-children:focus-within > .sub-menu { display: block; }
  .fmg-nav > .fmg-shell > ul > li.menu-item-has-children:hover > .fmg-nav-btn,
  .fmg-nav > .fmg-shell > ul > li.menu-item-has-children:focus-within > .fmg-nav-btn {
    color: var(--fmg-chalk);
    border-bottom-color: var(--fmg-amber);
  }
  .fmg-nav > .fmg-shell > ul > li.menu-item-has-children:hover > .fmg-nav-btn .fmg-nav-arrow,
  .fmg-nav > .fmg-shell > ul > li.menu-item-has-children:focus-within > .fmg-nav-btn .fmg-nav-arrow {
    transform: rotate(-135deg) translate(-3px, -3px);
  }
}
  .fmg-nav-btn { width: 100%; justify-content: space-between; }
  body.fmg-nav-lock { overflow: hidden; }
}

@media (max-width: 620px) {
  .fmg-hero { padding: 30px 0 28px; }
  .fmg-hero h1 { font-size: 26px; }
  .fmg-standfirst { font-size: 17px; }
  .fmg-brand-name { font-size: 20px; }
  .fmg-brand-badge { width: 44px; height: 44px; }
  .fmg-panel { padding: 20px 16px 26px; }
  .fmg-method { padding: 20px 18px; }
  .fmg-method-steps { grid-template-columns: 1fr; }
  .fmg-foot-grid { grid-template-columns: 1fr; }
  .fmg-authorcard { flex-direction: column; }
  .fmg-byline-date { margin-left: 0; }
  .fmg-snag { padding: 18px; }
  .fmg-snag::before { position: static; display: block; margin-bottom: 10px; }
}
