/* /learn-mexico-vs-germany-japan: its own sheet, loaded after site.css.
   One idea runs the page: three countries, three colours, used the same way
   everywhere. Slate is Germany, brick is Japan, blue is Mexico. The hero draws
   the three trips to scale; the regulators part draws who stands between the
   lab and the infusion; the trip part turns three clocks.
   Script: scripts/learn-mexico-vs-germany-japan.js. With that script absent
   every part is visible, every fold is open and every link still jumps. */

html:has(body.mgj) {
  --hc-nav-h: 64px;            /* fallback; the script sets the real header height */
  --hc-bar-h: 52px;
  /* every jump, anchor and Tab stop lands below the header and the bar */
  scroll-padding-top: calc(var(--hc-nav-h) + var(--hc-bar-h) + 12px);
}
.mgj {
  --gj-de: #5b6472;            /* Germany: marks and lines */
  --gj-de-ink: #414a58;        /* the same, as text on white */
  --gj-de-n: #c8ced8;          /* the same, on navy */
  --gj-jp: #b4513c;            /* Japan */
  --gj-jp-ink: #8c3a29;
  --gj-jp-n: #eda994;
  --gj-mx: var(--accent-blue); /* Mexico */
  --gj-mx-ink: var(--accent-blue-hover);
  --gj-mx-n: var(--accent-ice);
  --gj-ease: cubic-bezier(.16, 1, .3, 1);
  --gj-gut: clamp(20px, 4vw, 56px);
}
.gj-lane--de, .gj-country--de, .gj-th--de, .gj-leg--de, .gj-lead--de, .gj-pick--de, .gj-verdict--de { --k: var(--gj-de); --k-ink: var(--gj-de-ink); --k-n: var(--gj-de-n); }
.gj-lane--jp, .gj-country--jp, .gj-th--jp, .gj-leg--jp, .gj-lead--jp, .gj-pick--jp, .gj-verdict--jp { --k: var(--gj-jp); --k-ink: var(--gj-jp-ink); --k-n: var(--gj-jp-n); }
.gj-lane--mx, .gj-country--mx, .gj-th--mx, .gj-leg--mx, .gj-lead--mx, .gj-pick--mx, .gj-verdict--mx { --k: var(--gj-mx); --k-ink: var(--gj-mx-ink); --k-n: var(--gj-mx-n); }

/* ============ GROUND RULES ============ */
.gj-wrap { max-width: calc(1240px + 2 * var(--gj-gut)); margin-inline: auto; padding-inline: var(--gj-gut); }
/* text fills its column; the column sets the measure */
.mgj main p { max-width: none; margin: 0; text-wrap: wrap; }
.mgj main a:not(.btn) { border-bottom: 0; }
.mgj :where(main ul, main ol, main dl, main dd, main figure) { margin: 0; padding: 0; list-style: none; }
.mgj main h2 {
  font-family: var(--font-display); font-weight: 300; color: var(--ink);
  font-size: clamp(1.9rem, 3.3vw, 3rem); line-height: 1.1; letter-spacing: -.01em;
  margin: 0; max-width: none; text-wrap: wrap;
}
.mgj main h3 { font-family: var(--font-display); font-weight: 400; color: var(--ink); margin: 0; max-width: none; text-wrap: wrap; letter-spacing: 0; }
.mgj main :is(a, .btn, summary):focus-visible { outline: 2px solid var(--accent-blue); outline-offset: 3px; border-radius: 4px; }
.mgj :is(.gj-trip, .gj-verdict) :is(a, summary):focus-visible { outline-color: var(--accent-ice); }
/* a part that receives focus after a jump is not itself a control */
.mgj main :is(h1, h2, h3, section)[tabindex="-1"]:focus { outline: none; }

/* drawings share one pen */
.mgj main svg :is(path, circle, rect) { fill: none; stroke: var(--ink); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* a term the glossary defines */
.gj-term { color: inherit; text-decoration: underline dotted; text-decoration-color: var(--accent-blue); text-decoration-thickness: 1.5px; text-underline-offset: 4px; transition: color 200ms, text-decoration-color 200ms; }
.gj-term:hover { color: var(--accent-blue-hover); text-decoration-style: solid; }
/* a link inside a sentence */
.gj-link { color: var(--accent-blue-hover); text-decoration: underline; text-decoration-color: rgba(45, 110, 177, .4); text-underline-offset: 4px; transition: color 200ms, text-decoration-color 200ms; }
.gj-link:hover { color: var(--accent-blue); text-decoration-color: currentColor; }

/* the onward link: the arrow leans the way it points */
.gj-go { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-size: 16px; font-weight: 600; color: var(--accent-blue-hover); text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 5px; transition: color 200ms, text-decoration-color 260ms; }
.gj-go span { display: inline-block; transition: transform 360ms var(--gj-ease); }
.gj-go:hover { color: var(--accent-blue); text-decoration-color: currentColor; }
.gj-go:hover span { transform: translateX(6px); }
.gj-go:hover .gj-go__back { transform: translateX(-6px); }
.gj-go[href^="#"]:hover span { transform: translateY(4px) rotate(90deg); }

/* ============ REVEALS ============
   Hidden only once the script has said it is running (gj-js on <html>), so
   with no script nothing is ever hidden. Each part comes in its own way. */
.gj-js [data-r] { transition: opacity 620ms ease, transform 820ms var(--gj-ease); }
.gj-js [data-r]:not(.is-in) { opacity: 0; transform: translateY(18px); }
.gj-js [data-r="left"]:not(.is-in) { transform: translateX(-36px); }
.gj-js [data-r="right"]:not(.is-in) { transform: translateX(36px); }
/* these hold their place and move their insides */
.gj-js :is([data-r="rows"], [data-r="clocks"], [data-r="ticks"], [data-r="scale"], [data-r="map"]):not(.is-in) { opacity: 1; transform: none; }

/* ============ HERO ============ */
.gj-hero { padding-block: clamp(36px, 5vw, 72px) clamp(48px, 6vw, 88px); }
.gj-hero__h1 { font-family: var(--font-display); font-weight: 300; font-size: clamp(2.1rem, 4.3vw, 3.9rem); line-height: 1.06; letter-spacing: -.015em; color: var(--ink); margin: 0 0 clamp(28px, 4vw, 56px); max-width: none; text-wrap: wrap; }
/* a heading that has to wrap breaks where the styling changes */
.gj-hero__h1 > .h-lead, .gj-hero__h1 > em { display: inline-block; }
.gj-hero__h1 > em { color: var(--accent-blue); }
.gj-hero__row { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 88px); align-items: center; }
.gj-hero__answer { font-size: clamp(1.12rem, 1.5vw, 1.3rem); line-height: 1.6; color: var(--ink); margin-bottom: 20px !important; }

/* three trips, one scale: 14 hours is the full width */
.gj-lanes { display: grid; gap: clamp(18px, 2.4vw, 30px); }
.gj-lane { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 6px 16px; }
.gj-lane__to { font-size: 16px; font-weight: 500; color: var(--k-ink); }
.gj-lane__hr { font-size: 15px; color: var(--ink-muted); font-variant-numeric: tabular-nums lining-nums; }
.gj-lane__hr b { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.7rem, 2.6vw, 2.3rem); line-height: 1; color: var(--ink); }
.gj-lane__track { grid-column: 1 / -1; position: relative; display: block; height: 34px; width: calc(var(--h) / 14 * (100% - 16px)); }
/* where every trip starts */
.gj-lane__track::before { content: ""; position: absolute; left: -4px; top: 50%; width: 9px; height: 9px; margin-top: -4.5px; border-radius: 50%; background: var(--ink); }
.gj-lane__line { position: absolute; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px; background: repeating-linear-gradient(90deg, var(--k) 0 9px, transparent 9px 15px); transform-origin: left; }
/* the drive is a road, not a flight path */
.gj-lane--mx .gj-lane__line { background: var(--k); }
.gj-lane__pin { position: absolute; right: -8px; top: 50%; width: 16px; height: 16px; margin-top: -8px; box-sizing: border-box; border: 2px solid var(--k); border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 8px var(--k); }
.gj-lane__run { position: absolute; inset: 0; display: block; }
.gj-lane__craft { position: absolute; right: 14px; top: 50%; width: 34px; height: 26px; margin-top: -24px; overflow: visible; }
.gj-lane--mx .gj-lane__craft { width: 34px; height: 19px; margin-top: -21px; }
.mgj main .gj-lane__craft :is(path, circle) { stroke: var(--k-ink); fill: #fff; stroke-width: 1.3; }
.gj-lanes__rule { display: block; height: 9px; width: calc(100% - 16px); margin-top: 14px; border-right: 1px solid var(--border-strong); background: repeating-linear-gradient(90deg, var(--border-strong) 0 1px, transparent 1px calc(100% / 14)); }
.gj-hero__fig figcaption { margin-top: 10px; font-size: 15px; color: var(--ink-muted); }

/* first paint: the heading, the answer, then all three leave at once and
   each arrives when its hours are up */
@keyframes gj-up { from { opacity: 0; transform: translateY(22px); } }
@keyframes gj-line { from { transform: scaleX(0); } }
@keyframes gj-fly { from { transform: translateX(-100%); } }
@keyframes gj-pop { from { transform: scale(0); opacity: 0; } 70% { transform: scale(1.25); opacity: 1; } }
@keyframes gj-rise { from { opacity: 0; transform: translateY(12px); } }
.gj-js .gj-hero__h1 > * { animation: gj-up 900ms var(--gj-ease) both; }
.gj-js .gj-hero__h1 > em { animation-delay: 110ms; }
.gj-js .gj-hero__text > * { animation: gj-up 900ms var(--gj-ease) 240ms both; }
.gj-js .gj-hero__text > a { animation-delay: 340ms; }
.gj-js .gj-lane > span:not(.gj-lane__track) { animation: gj-rise 700ms var(--gj-ease) 360ms both; }
/* the trips leave once the drawing is on screen (is-go), so a phone, where
   it sits below the answer, sees them too */
.gj-js .gj-hero__fig:not(.is-go) .gj-lane__line { transform: scaleX(0); }
.gj-js .gj-hero__fig:not(.is-go) .gj-lane__run { transform: translateX(-100%); }
.gj-js .gj-hero__fig:not(.is-go) .gj-lane__pin { opacity: 0; }
.gj-js .gj-hero__fig.is-go .gj-lane__line { animation: gj-line calc(var(--h) * 170ms) linear var(--go, 300ms) both; }
.gj-js .gj-hero__fig.is-go .gj-lane__run { animation: gj-fly calc(var(--h) * 170ms) linear var(--go, 300ms) both; }
.gj-js .gj-hero__fig.is-go .gj-lane__pin { animation: gj-pop 420ms var(--gj-ease) calc(var(--go, 300ms) + var(--h) * 170ms) both; }
.gj-js .gj-hero__fig figcaption, .gj-js .gj-lanes__rule { animation: gj-rise 700ms var(--gj-ease) 600ms both; }
/* the figure keeps its width while it counts */
.gj-lane__hr b { display: inline-block; min-width: 1.5em; text-align: right; }

/* ============ CONTENTS BAR (follows the reader) ============ */
.mgj .hc-bar {
  /* under the phone menu's sheet (55) and backdrop (50), over the page */
  position: fixed; left: 0; right: 0; top: var(--hc-nav-h); z-index: 49;
  height: var(--hc-bar-h);
  background: rgba(255, 255, 255, .94);
  -webkit-backdrop-filter: saturate(180%) blur(12px); backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
  transform: translateY(-8px); opacity: 0; visibility: hidden;
  transition: opacity 260ms, transform 360ms var(--gj-ease), visibility 0s 360ms;
}
.mgj .hc-bar.is-on { transform: none; opacity: 1; visibility: visible; transition: opacity 260ms, transform 360ms var(--gj-ease); }
body.mgj.nav-open .hc-bar { opacity: 0; visibility: hidden; }
.mgj .hc-bar__track {
  max-width: calc(1240px + 2 * var(--gj-gut)); margin: 0 auto; padding: 0 var(--gj-gut);
  height: 100%; display: flex; align-items: stretch; gap: clamp(18px, 2.4vw, 32px);
  overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; scroll-padding-inline: 28px;
}
.mgj .hc-bar__track::-webkit-scrollbar { display: none; }
.mgj .hc-bar__track a {
  position: relative; flex: none; display: flex; align-items: center;
  font-size: 14px; font-weight: 500; color: var(--ink-muted); white-space: nowrap;
  transition: color 200ms;
}
.mgj .hc-bar__track a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: var(--accent-blue); transform: scaleX(0); transform-origin: left;
  transition: transform 360ms var(--gj-ease);
}
.mgj .hc-bar__track a:hover, .mgj .hc-bar__track a[aria-current] { color: var(--ink); }
.mgj .hc-bar__track a:hover::after { transform: scaleX(.35); }
.mgj .hc-bar__track a[aria-current]::after { transform: scaleX(1); }
.mgj .hc-bar__track a:focus-visible { outline: 2px solid var(--accent-blue); outline-offset: -4px; border-radius: 4px; }
.mgj .hc-bar__progress {
  position: absolute; left: 0; top: 0; height: 2px; width: 100%;
  background: var(--accent-ice); transform-origin: left; transform: scaleX(var(--hc-p, 0));
}

/* ============ WHO REGULATES ============ */
.gj-reg { padding-block: clamp(48px, 6vw, 96px) clamp(40px, 5vw, 72px); border-top: 1px solid var(--border); }
.gj-reg__head { margin-bottom: clamp(28px, 4vw, 56px); }
.gj-reg__intro { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px clamp(24px, 5vw, 88px); margin-top: clamp(18px, 2.4vw, 32px); }
.gj-reg__intro p { font-size: 18px; line-height: 1.7; color: var(--ink-soft); }

.gj-country { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 5vw, 88px); align-items: start; padding-block: clamp(28px, 3.6vw, 48px); border-top: 3px solid var(--k); }
.mgj main .gj-country h3 { font-size: clamp(1.5rem, 2.3vw, 2rem); line-height: 1.15; }
.gj-country__agency { margin-top: 8px !important; font-size: 15px; line-height: 1.5; color: var(--ink-muted); }
.gj-country__body > p, .gj-country .gj-more > p { font-size: 17px; line-height: 1.7; color: var(--ink-soft); }
.gj-country .gj-more > p { margin-top: 14px !important; }
.gj-country__body strong { font-weight: 600; color: var(--ink); }
.gj-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; margin-top: 18px !important; border-top: 1px solid var(--border); }
.gj-facts li { position: relative; padding: 12px 0 12px 20px; border-bottom: 1px solid var(--border); font-size: 15.5px; line-height: 1.45; color: var(--ink); }
.gj-facts li::before { content: ""; position: absolute; left: 0; top: 19px; width: 8px; height: 8px; border-radius: 50%; background: var(--k); }

/* lab, then whoever stands in the middle, then the hospital */
.gj-chain { margin-top: clamp(18px, 2.4vw, 28px) !important; max-width: 460px; }
.gj-chain__svg { display: block; width: 100%; height: auto; overflow: visible; }
.mgj main .gj-chain__link { stroke: var(--border-strong); stroke-dasharray: 3 7; }
.mgj main .gj-chain__head { stroke: var(--ink-muted); }
.mgj main .gj-chain__gate :is(path, circle) { stroke: var(--k-ink); }
.mgj main .gj-chain__ring { stroke: var(--k); stroke-width: 1.4; opacity: .28; transform-box: fill-box; transform-origin: center; }
.mgj main .gj-chain__rider { fill: var(--k); stroke: #fff; stroke-width: 2; }
.mgj main .gj-dot { fill: var(--k); stroke: none; }
.gj-chain figcaption { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 6px; font-size: 14px; line-height: 1.35; color: var(--ink-muted); text-align: center; }
.gj-chain figcaption span:nth-child(2) { color: var(--k-ink); font-weight: 600; }
/* while it is on screen: a vial leaves the lab, waits at the middle step
   while that step answers, and goes on to the hospital */
@keyframes gj-ride {
  0% { transform: translateX(0); opacity: 0; } 6% { opacity: 1; }
  34% { transform: translateX(84px); opacity: 1; } 38% { transform: translateX(84px); opacity: 0; }
  60% { transform: translateX(164px); opacity: 0; } 64% { transform: translateX(164px); opacity: 1; }
  92% { transform: translateX(248px); opacity: 1; } 100% { transform: translateX(248px); opacity: 0; }
}
@keyframes gj-gate { 0%, 34% { transform: scale(1); opacity: .28; } 46% { transform: scale(1.12); opacity: 1; } 62%, 100% { transform: scale(1); opacity: .28; } }
.gj-chain.is-live .gj-chain__rider { animation: gj-ride 5.2s linear infinite; }
.gj-chain.is-live .gj-chain__ring { animation: gj-gate 5.2s ease-in-out infinite; }

.gj-read { margin-top: clamp(8px, 1vw, 16px); padding-top: clamp(28px, 3.6vw, 48px); border-top: 1px solid var(--border-strong); }
.gj-read p { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.25rem, 1.9vw, 1.6rem); line-height: 1.45; color: var(--ink); margin-bottom: 12px !important; }

/* native "Read more": opened for print, found by in-page search.
   On a wide screen every fold is open and its summary is not shown. */
.gj-more > summary { display: none; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; list-style: none; font-size: 16px; font-weight: 600; color: var(--accent-blue-hover); transition: color 200ms; -webkit-tap-highlight-color: transparent; }
.gj-more > summary::-webkit-details-marker { display: none; }
.gj-more > summary::after { content: ""; width: 9px; height: 9px; margin-top: -4px; border-right: 2px solid; border-bottom: 2px solid; transform: rotate(45deg); transition: transform 360ms var(--gj-ease); }
.gj-more > summary:hover { color: var(--accent-blue); }
.gj-more > summary:hover::after { transform: translateY(3px) rotate(45deg); }
.gj-more[open] > summary::after { margin-top: 4px; transform: rotate(-135deg); }
.gj-more[open] > summary:hover::after { transform: translateY(-3px) rotate(-135deg); }
.gj-more__shut, .gj-more[open] > summary .gj-more__open { display: none; }
.gj-more[open] > summary .gj-more__shut { display: inline; }
@keyframes gj-unfold { from { opacity: 0; transform: translateY(-8px); } }

/* ============ SIDE BY SIDE ============ */
.gj-cmp { padding-block: clamp(48px, 6vw, 96px); border-top: 1px solid var(--border); }
.mgj .gj-cmp h2 { margin-bottom: clamp(28px, 4vw, 48px); }
.gj-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.gj-table thead td, .gj-table tbody th { width: 19%; }
.gj-table thead th { padding: 0 20px 18px; text-align: left; vertical-align: bottom; border-bottom: 3px solid var(--k); }
.gj-th > span { display: block; font-family: var(--font-display); font-size: 1.7rem; font-weight: 400; line-height: 1.1; color: var(--ink); }
.gj-th small { display: block; margin-top: 4px; font-family: var(--font-body); font-size: 14px; font-weight: 400; color: var(--ink-muted); }
/* the mark always sits above the name: beside it, a short name (Japan) kept it on the line while longer ones wrapped under */
.gj-badge { display: block; flex: none; width: 52px; height: 52px; margin: 0 0 10px; overflow: visible; }
.mgj main .gj-badge :is(path, circle) { stroke: var(--k-ink); stroke-width: 1.5; }
.gj-table tbody th { padding: 22px 16px 22px 0; text-align: left; vertical-align: top; font-size: 15px; font-weight: 500; line-height: 1.5; color: var(--ink-muted); border-bottom: 1px solid var(--border); }
.gj-table tbody td { padding: 20px; vertical-align: top; font-size: 15.5px; line-height: 1.55; color: var(--ink-soft); border-bottom: 1px solid var(--border); }
.gj-table tbody td + td { border-left: 1px solid var(--border); }
.gj-table tbody strong { display: block; font-family: var(--font-display); font-size: 1.32rem; font-weight: 400; line-height: 1.2; margin-bottom: 4px; color: var(--ink); }
.gj-table td[data-who="Germany"] strong { color: var(--gj-de-ink); }
.gj-table td[data-who="Japan"] strong { color: var(--gj-jp-ink); }
.gj-table td[data-who="Mexico"] strong { color: var(--gj-mx-ink); }
.gj-table--more tbody tr:last-child :is(th, td) { border-bottom: 0; }
.gj-js .gj-table[data-r] tbody tr { transition: opacity 520ms ease, transform 720ms var(--gj-ease); transition-delay: calc(var(--i) * 80ms); }
.gj-js .gj-table[data-r]:not(.is-in) tbody tr { opacity: 0; transform: translateY(14px); }

/* ============ THE TRIP ============ */
.gj-trip { background: var(--ink); color: #fff; padding-block: clamp(56px, 7vw, 104px); }
.gj-trip__head { margin-bottom: clamp(36px, 5vw, 64px); }
.gj-trip__head p { margin-top: clamp(14px, 2vw, 22px) !important; }
.mgj .gj-trip h2 { color: #fff; }
.gj-trip__head p { font-size: 18px; line-height: 1.7; color: rgba(255, 255, 255, .84); }
.gj-trip__cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: auto auto auto 1fr; gap: 0 clamp(24px, 4vw, 64px); }
.gj-leg { display: grid; grid-row: span 4; grid-template-rows: subgrid; align-content: start; }
.gj-clock { display: block; width: clamp(96px, 10vw, 128px); height: auto; margin-bottom: 22px; overflow: visible; }
.mgj main .gj-clock__face { stroke: rgba(255, 255, 255, .5); }
.mgj main .gj-clock__tk { stroke: rgba(255, 255, 255, .5); stroke-width: 1.4; }
/* how far the hour has moved, swept from noon */
.mgj main .gj-clock__arc { stroke: var(--k-n); stroke-width: 5; opacity: .5; stroke-linecap: butt; stroke-dasharray: min(var(--turn), 12) 12; }
.gj-js .gj-clock__arc { transition: stroke-dasharray calc(600ms + var(--turn) * 110ms) cubic-bezier(.3, 0, .2, 1) 200ms; }
.gj-js .gj-trip__cols:not(.is-in) .gj-clock__arc { stroke-dasharray: 0 12; }
/* noon in Los Angeles, left where it was */
.mgj main .gj-clock__la { stroke: rgba(255, 255, 255, .34); stroke-dasharray: 2 5; }
.gj-clock__hand { transform-origin: 60px 60px; transform: rotate(calc(var(--turn) * 30deg)); }
.mgj main .gj-clock__hand path { stroke: var(--k-n); stroke-width: 3; }
.mgj main .gj-clock__hub { fill: var(--k-n); stroke: none; }
.gj-js .gj-clock__hand { transition: transform calc(600ms + var(--turn) * 110ms) cubic-bezier(.3, 0, .2, 1) 200ms; }
.gj-js .gj-trip__cols:not(.is-in) .gj-clock__hand { transform: rotate(0deg); }
.mgj main .gj-leg h3 { font-family: var(--font-body); font-size: 16px; font-weight: 500; line-height: 1.4; color: var(--k-n); }
.gj-leg h3 b { display: block; margin-top: 6px; font-family: var(--font-display); font-weight: 300; font-size: clamp(1.9rem, 3vw, 2.7rem); line-height: 1.05; color: #fff; font-variant-numeric: lining-nums; }
.gj-leg__sub { margin-top: 10px !important; font-size: 15.5px; line-height: 1.5; color: rgba(255, 255, 255, .78); }
.gj-trip .gj-more > summary { color: #c9def2; }
.gj-trip .gj-more > summary:hover { color: #fff; }
.gj-leg dl { margin-top: 20px !important; border-top: 1px solid rgba(255, 255, 255, .2); }
.gj-leg dl > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 16px; padding: 11px 0; border-bottom: 1px solid rgba(255, 255, 255, .14); font-size: 15px; line-height: 1.45; }
.gj-leg dt { color: rgba(255, 255, 255, .78); }
.gj-leg dd { color: #fff; text-align: right; font-variant-numeric: tabular-nums lining-nums; }
.gj-leg dd span { display: block; font-size: 14px; color: rgba(255, 255, 255, .72); }
.gj-js .gj-leg { transition: opacity 620ms ease, transform 820ms var(--gj-ease); }
.gj-js .gj-leg:nth-child(2) { transition-delay: 120ms; }
.gj-js .gj-leg:nth-child(3) { transition-delay: 240ms; }
.gj-js .gj-trip__cols:not(.is-in) .gj-leg { opacity: 0; transform: translateY(18px); }
.gj-trip__foot { margin-top: clamp(32px, 4vw, 56px) !important; padding-top: clamp(24px, 3vw, 40px); border-top: 1px solid rgba(255, 255, 255, .2); font-size: clamp(1.08rem, 1.4vw, 1.25rem); line-height: 1.65; color: #fff; }

/* ============ WHERE EACH IS AHEAD ============ */
.gj-ahead { background: var(--accent-wash); padding-block: clamp(56px, 7vw, 96px); }
.gj-ahead__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px 40px; margin-bottom: clamp(24px, 3vw, 40px); }
.gj-ahead__head p { font-size: 18px; line-height: 1.6; color: var(--ink-soft); }
.gj-lead { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(20px, 5vw, 88px); align-items: start; padding-block: clamp(24px, 3vw, 40px); border-top: 1px solid var(--border-strong); }
.gj-lead__id { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 18px; align-items: center; }
.gj-lead__id .gj-badge { grid-row: span 2; width: 64px; height: 64px; margin: 0; align-self: start; }
.mgj main .gj-lead__id h3 { font-size: clamp(1.7rem, 2.6vw, 2.3rem); line-height: 1.1; color: var(--k-ink); }
.gj-lead__id p { font-size: 16.5px; line-height: 1.5; color: var(--ink-soft); }
.gj-ticks { columns: 2; column-gap: clamp(24px, 3vw, 48px); }
.gj-ticks li { position: relative; break-inside: avoid; padding: 0 0 14px 30px; font-size: 16.5px; line-height: 1.5; color: var(--ink); }
/* a tick, drawn with two borders */
.gj-ticks li::before { content: ""; position: absolute; left: 3px; top: 5px; width: 13px; height: 7px; border-left: 2px solid var(--k); border-bottom: 2px solid var(--k); transform: rotate(-45deg); transform-origin: center; }
@keyframes gj-tick { from { opacity: 0; transform: rotate(-45deg) scale(0); } 70% { opacity: 1; transform: rotate(-45deg) scale(1.3); } }
.gj-js .gj-lead[data-r] .gj-ticks li { transition: opacity 520ms ease; }
.gj-js .gj-lead[data-r]:not(.is-in) .gj-ticks li { opacity: 0; }
.gj-js .gj-lead[data-r]:not(.is-in) .gj-lead__id { opacity: 0; transform: translateX(-24px); }
.gj-js .gj-lead__id { transition: opacity 620ms ease, transform 820ms var(--gj-ease); }
.gj-js .gj-lead.is-in .gj-ticks li::before { animation: gj-tick 420ms var(--gj-ease) both; }
.gj-js .gj-lead .gj-ticks li:nth-child(1), .gj-js .gj-lead.is-in .gj-ticks li:nth-child(1)::before { transition-delay: 120ms; animation-delay: 160ms; }
.gj-js .gj-lead .gj-ticks li:nth-child(2), .gj-js .gj-lead.is-in .gj-ticks li:nth-child(2)::before { transition-delay: 210ms; animation-delay: 250ms; }
.gj-js .gj-lead .gj-ticks li:nth-child(3), .gj-js .gj-lead.is-in .gj-ticks li:nth-child(3)::before { transition-delay: 300ms; animation-delay: 340ms; }
.gj-js .gj-lead .gj-ticks li:nth-child(4), .gj-js .gj-lead.is-in .gj-ticks li:nth-child(4)::before { transition-delay: 390ms; animation-delay: 430ms; }
.gj-js .gj-lead .gj-ticks li:nth-child(5), .gj-js .gj-lead.is-in .gj-ticks li:nth-child(5)::before { transition-delay: 480ms; animation-delay: 520ms; }
.gj-js .gj-lead .gj-ticks li:nth-child(6), .gj-js .gj-lead.is-in .gj-ticks li:nth-child(6)::before { transition-delay: 570ms; animation-delay: 610ms; }

/* ============ WHICH TO CHOOSE ============ */
.gj-which { padding-block: clamp(56px, 7vw, 104px); }
.gj-which__lede { margin-top: clamp(14px, 2vw, 22px) !important; font-size: 18px; line-height: 1.7; color: var(--ink-soft); }
.gj-which__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 88px); align-items: start; margin-top: clamp(28px, 4vw, 52px); }
.gj-pick { position: relative; padding: 2px 0 2px clamp(20px, 2.4vw, 32px); }
.gj-pick::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; border-radius: 2px; background: var(--k); transform-origin: top; }
.gj-pick + .gj-pick { margin-top: clamp(28px, 3.4vw, 44px); }
.mgj main .gj-pick h3 { font-size: clamp(1.6rem, 2.5vw, 2.2rem); font-weight: 300; line-height: 1.15; color: var(--k-ink); margin-bottom: 10px; }
.gj-pick p { font-size: 17px; line-height: 1.7; color: var(--ink-soft); }
@keyframes gj-grow { from { transform: scaleY(0); } }
.gj-js .gj-pick.is-in::before { animation: gj-grow 720ms var(--gj-ease) 160ms both; }
.gj-js .gj-pick:nth-child(2) { transition-delay: 120ms; }
.gj-js .gj-pick:nth-child(3) { transition-delay: 240ms; }

.gj-name { position: sticky; top: calc(var(--hc-nav-h) + var(--hc-bar-h) + 28px); padding: clamp(22px, 2.6vw, 34px); border: 1px solid var(--border-strong); border-radius: 8px; }
.gj-seals { display: block; width: 100%; max-width: 320px; height: auto; margin-bottom: 18px; overflow: visible; }
.mgj main .gj-seals__row :is(circle, path) { stroke: var(--ink); }
.mgj main .gj-seals__row .gj-seals__in { stroke: var(--border-strong); stroke-dasharray: 2 5; }
.mgj main .gj-seals__glass circle { stroke: var(--accent-blue); stroke-width: 2.4; fill: rgba(234, 241, 248, .55); }
.mgj main .gj-seals__glass path { stroke: var(--accent-blue); stroke-width: 4; }
/* the glass goes from one to the next, and they look the same each time */
@keyframes gj-scan { 0%, 18% { transform: translateX(0); } 33%, 51% { transform: translateX(98px); } 66%, 84% { transform: translateX(196px); } 100% { transform: translateX(0); } }
.gj-seals.is-live .gj-seals__glass { animation: gj-scan 7s var(--gj-ease) infinite; }
.mgj main .gj-name h3 { font-size: clamp(1.4rem, 2vw, 1.75rem); line-height: 1.2; margin-bottom: 10px; }
.gj-name p { font-size: 16.5px; line-height: 1.7; color: var(--ink-soft); }

/* ============ THE VERDICT ============ */
.gj-verdict { background: var(--ink); color: #fff; padding-block: clamp(56px, 7vw, 104px); }
.gj-verdict__top { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: clamp(28px, 5vw, 88px); align-items: center; }
/* regulation in one pan, time in the other */
.gj-scale { display: block; width: 100%; max-width: 280px; height: auto; justify-self: center; overflow: visible; }
.mgj main .gj-scale :is(path, circle) { stroke: rgba(255, 255, 255, .86); }
.mgj main .gj-scale .gj-scale__load { stroke: var(--accent-ice); }
.gj-scale__beam { transform-origin: 120px 44px; transform: rotate(7deg); }
.gj-scale__pan--doc { transform-origin: 34px 44px; transform: rotate(-7deg); }
.gj-scale__pan--clock { transform-origin: 206px 44px; transform: rotate(-7deg); }
.gj-js .gj-scale :is(.gj-scale__beam, .gj-scale__pan) { transition: transform 1500ms cubic-bezier(.34, 1.4, .5, 1) 300ms; }
.gj-js .gj-scale:not(.is-in) :is(.gj-scale__beam, .gj-scale__pan) { transform: rotate(0deg); }
.gj-verdict__big { font-family: var(--font-display); font-weight: 300; font-size: clamp(1.45rem, 2.5vw, 2.2rem); line-height: 1.35; color: #fff; }
.gj-verdict__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px) clamp(32px, 5vw, 88px); margin-top: clamp(32px, 4vw, 56px) !important; padding-top: clamp(28px, 3.4vw, 44px); border-top: 1px solid rgba(255, 255, 255, .2); }
.gj-verdict__list li { position: relative; padding-left: 22px; font-size: 17px; line-height: 1.65; color: rgba(255, 255, 255, .88); }
.gj-verdict__list li::before { content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 3px; border-radius: 2px; background: var(--k-n); }
.gj-verdict__list li:last-child { grid-column: 1 / -1; font-size: clamp(1.1rem, 1.5vw, 1.3rem); color: #fff; }
.gj-js .gj-verdict__list li:nth-child(2) { transition-delay: 140ms; }
.gj-js .gj-verdict__list li:nth-child(3) { transition-delay: 280ms; }

/* ============ MORE ON WHY MEXICO ============ */
.gj-rel { padding-block: clamp(56px, 7vw, 96px); }
.gj-rel__grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(24px, 5vw, 88px); align-items: start; }
.gj-rel__up { display: flex; flex-direction: column; align-items: flex-start; margin-top: clamp(12px, 2vw, 22px) !important; }
/* the section this page belongs to: a map, a road across it, a pin */
.gj-map { display: block; width: clamp(120px, 14vw, 168px); height: auto; margin-top: clamp(20px, 3vw, 36px); overflow: visible; }
.mgj main .gj-map__road { stroke: var(--border-strong); stroke-dasharray: 3 6; }
.mgj main .gj-map__pin :is(path, circle) { stroke: var(--accent-blue); fill: #fff; }
.gj-map__pin { transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes gj-drop { from { opacity: 0; transform: translateY(-26px); } 60% { opacity: 1; transform: translateY(0) scaleY(.9); } to { transform: none; } }
.gj-js .gj-map:not(.is-in) .gj-map__pin { opacity: 0; }
.gj-js .gj-map.is-in .gj-map__pin { animation: gj-drop 700ms var(--gj-ease) 250ms both; }
.gj-route { border-top: 1px solid var(--border-strong); }
.mgj .gj-route a { display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: 16px; align-items: center; min-height: 44px; padding: 20px 0; border-bottom: 1px solid var(--border); color: var(--ink); }
.gj-route__t { font-family: var(--font-display); font-size: clamp(1.3rem, 1.9vw, 1.6rem); font-weight: 400; line-height: 1.25; transition: color 200ms, transform 420ms var(--gj-ease); }
.gj-route__go { justify-self: end; font-size: 20px; color: var(--accent-blue-hover); transition: transform 360ms var(--gj-ease); }
.gj-route a:hover .gj-route__t, .gj-route a:focus-visible .gj-route__t { color: var(--accent-blue-hover); transform: translateX(6px); }
.gj-route a:hover .gj-route__go, .gj-route a:focus-visible .gj-route__go { transform: translateX(8px); }
.gj-js .gj-route li:nth-child(n+2) { transition-delay: 70ms; }
.gj-js .gj-route li:nth-child(n+3) { transition-delay: 140ms; }
.gj-js .gj-route li:nth-child(n+4) { transition-delay: 210ms; }
.gj-js .gj-route li:nth-child(n+5) { transition-delay: 280ms; }
.gj-js .gj-route li:nth-child(n+6) { transition-delay: 350ms; }

/* ============ SELF-ASSESSMENT ============ */
.gj-end { border-top: 1px solid var(--border); padding-block: clamp(56px, 7vw, 96px); background: #fff; }
.gj-end .assess-band__inner { max-width: 720px; margin: 0 auto; padding: 0 var(--gj-gut); display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.mgj main .gj-end .assess-band__title { text-wrap: balance; }
.mgj main .gj-end .assess-band__lede { font-size: 18px; line-height: 1.6; color: var(--ink-soft); }
.gj-end .btn { margin-top: 6px; }
.gj-end .assess-band__note { font-size: 14px; color: var(--ink-muted); }

/* ============ ARRIVING BY A JUMP ============
   The heading a jump lands on is underlined once, so the eye finds it. */
@keyframes gj-here { from { background-size: 0 2px; } 60% { background-size: 100% 2px; } to { background-size: 100% 0; } }
.mgj main h2.is-here { background: linear-gradient(var(--accent-blue), var(--accent-blue)) no-repeat left bottom / 100% 0; animation: gj-here 1400ms var(--gj-ease); }
.mgj main :is(.gj-trip, .gj-verdict) h2.is-here { background-image: linear-gradient(var(--accent-ice), var(--accent-ice)); }

/* ============ NARROWER ============ */
@media (max-width: 1100px) {
  /* the bar's track can scroll here, so its edges fade */
  .mgj .hc-bar__track { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 28px), transparent); }
}
@media (max-width: 960px) {
  .gj-hero__row, .gj-reg__intro, .gj-country, .gj-lead, .gj-verdict__top, .gj-which__grid, .gj-rel__grid { grid-template-columns: minmax(0, 1fr); }
  .gj-name { position: static; }
  .gj-trip__cols { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; gap: 40px; }
  .gj-leg { display: grid; grid-row: auto; grid-template-rows: none; grid-template-columns: auto minmax(0, 1fr); column-gap: 20px; align-items: center; }
  .gj-leg .gj-clock { grid-row: span 2; width: 84px; margin-bottom: 0; }
  .gj-leg .gj-more { grid-column: 1 / -1; }
  .gj-verdict__list { grid-template-columns: minmax(0, 1fr); }
  .gj-ticks { columns: 1; }
  .gj-js [data-r="left"]:not(.is-in), .gj-js [data-r="right"]:not(.is-in) { transform: translateY(18px); }
}
@media (max-width: 760px) {
  /* what a reader can skip sits behind a fold */
  .gj-more > summary { display: inline-flex; }
  .gj-more[open] > :not(summary) { animation: gj-unfold 420ms var(--gj-ease); }
  .gj-country .gj-more { margin-top: 6px; }
  .gj-leg .gj-more { margin-top: 8px; }
  .gj-leg dl { margin-top: 4px !important; }
  .gj-facts { grid-template-columns: minmax(0, 1fr); }
  .gj-lead { gap: 8px; }
  .gj-lead .gj-more[open] > summary { margin-bottom: 8px; }

  /* the table keeps its three answers, with each row's question set above them */
  .gj-table, .gj-table thead, .gj-table tbody { display: block; }
  /* the three headings become a key: who stands in the middle, in each colour */
  .gj-table thead tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .gj-table thead td { display: none; }
  .gj-table thead th { display: block; padding: 0 0 12px; }
  .gj-th .gj-badge { display: block; width: 48px; height: 48px; margin: 0 0 8px; }
  .gj-th > span { font-size: 1.3rem; }
  .gj-th small { font-size: 13px; line-height: 1.35; }
  .gj-table tbody tr { display: block; padding-block: 18px; border-bottom: 1px solid var(--border); }
  .gj-table--more tbody tr:first-child { padding-top: 18px; }
  .gj-table--more tbody tr:last-child { border-bottom: 0; padding-bottom: 0; }
  .gj-table tbody th { display: block; width: auto; padding: 0 0 8px; border: 0; font-size: 15px; font-weight: 600; color: var(--ink); }
  .gj-table tbody td { display: grid; grid-template-columns: 84px minmax(0, 1fr); column-gap: 12px; padding: 7px 0; border: 0 !important; font-size: 15px; }
  .gj-table tbody td::before { content: attr(data-who); grid-row: span 2; font-size: 14px; font-weight: 600; line-height: 1.6; }
  .gj-table td[data-who="Germany"]::before { color: var(--gj-de-ink); }
  .gj-table td[data-who="Japan"]::before { color: var(--gj-jp-ink); }
  .gj-table td[data-who="Mexico"]::before { color: var(--gj-mx-ink); }
  .gj-table tbody strong { font-size: 1.14rem; margin-bottom: 2px; }
  .gj-table tbody td > span { grid-column: 2; }
}
@media (max-width: 600px) {
  html:has(body.mgj) { --hc-bar-h: 48px; }
  .mgj .hc-bar__track { gap: 22px; }
  .gj-chain figcaption { font-size: 13px; }
  .gj-lead__id .gj-badge { width: 52px; height: 52px; }
  .gj-end .btn { width: 100%; }
}

/* ============ STILL ============
   Reduced motion: every drawing holds its finished state and nothing moves. */
@media (prefers-reduced-motion: reduce) {
  .mgj main *, .mgj main *::before, .mgj main *::after { animation: none !important; transition: none !important; }
  .gj-js [data-r]:not(.is-in), .gj-js .gj-table[data-r]:not(.is-in) tbody tr, .gj-js .gj-trip__cols:not(.is-in) .gj-leg,
  .gj-js .gj-lead[data-r]:not(.is-in) :is(.gj-ticks li, .gj-lead__id) { opacity: 1 !important; transform: none !important; }
  .gj-js .gj-trip__cols:not(.is-in) .gj-clock__hand { transform: rotate(calc(var(--turn) * 30deg)) !important; }
  .gj-js .gj-trip__cols:not(.is-in) .gj-clock__arc { stroke-dasharray: min(var(--turn), 12) 12 !important; }
  .gj-js .gj-scale:not(.is-in) .gj-scale__beam { transform: rotate(7deg) !important; }
  .gj-js .gj-scale:not(.is-in) .gj-scale__pan { transform: rotate(-7deg) !important; }
  .gj-js .gj-map:not(.is-in) .gj-map__pin { opacity: 1 !important; }
  .gj-chain__rider { display: none; }
  .gj-js .gj-hero__fig:not(.is-go) :is(.gj-lane__line, .gj-lane__run) { transform: none !important; }
  .gj-js .gj-hero__fig:not(.is-go) .gj-lane__pin { opacity: 1 !important; }
  .mgj .hc-bar { transition: none !important; }
  .gj-go:hover span, .gj-route a:hover :is(.gj-route__t, .gj-route__go) { transform: none; }
}
@media print {
  .mgj .hc-bar { display: none !important; }
  .gj-js [data-r], .gj-js .gj-table tbody tr, .gj-js .gj-leg, .gj-js .gj-ticks li, .gj-js .gj-lead__id { opacity: 1 !important; transform: none !important; animation: none !important; }
  .gj-js .gj-clock__hand { transform: rotate(calc(var(--turn) * 30deg)) !important; transition: none !important; }
  .gj-more > summary { display: none !important; }
  .gj-js .gj-hero__fig :is(.gj-lane__line, .gj-lane__run) { transform: none !important; animation: none !important; }
  .gj-js .gj-hero__fig .gj-lane__pin { opacity: 1 !important; animation: none !important; }
  .gj-js .gj-map__pin { opacity: 1 !important; animation: none !important; }
  .mgj main .gj-scale :is(path, circle) { stroke: var(--ink); }
  .gj-trip, .gj-verdict { background: #fff; color: var(--ink); }
  .mgj :is(.gj-trip, .gj-verdict) :is(h2, h3, h3 b, p, li, dt, dd, dd span) { color: var(--ink) !important; }
  .mgj main :is(.gj-clock__face, .gj-clock__tk, .gj-clock__la, .gj-clock__hand path) { stroke: var(--ink); }
  .gj-chain__rider { display: none; }
  .gj-name { position: static; }
}

/* Paper is taken the instant the print dialog opens: nothing may still be fading or sliding in. */
@media print {
  main *, main *::before, main *::after { animation: none !important; transition: none !important; }
}
