/* ==========================================================================
   Little Futures — Global Education & Skills Magazine
   Local design tokens and component styles (free-design lane).
   ========================================================================== */

:root {
  --cream: #fbf6ee;
  --paper: #fffdf9;
  --paper-2: #f6efe3;
  --ink: #121a2e;
  --ink-soft: #2b3550;
  --muted: #5c6478;
  --muted-2: #838ba0;
  --line: #e9e1d4;
  --line-strong: #d8cdba;

  --navy: #16265c;
  --navy-2: #22357e;
  --indigo: #34479c;
  --saffron: #e9761d;
  --saffron-soft: #fdf0e2;
  --coral: #ef6852;
  --coral-soft: #fdeae6;
  --mint: #17a184;
  --mint-soft: #e4f5ef;
  --teal: #0e9c97;
  --sky: #2e7bd6;
  --sky-soft: #e6f0fb;
  --lilac: #6c5ce7;
  --lilac-soft: #eeebfd;
  --rose: #dd6490;
  --rose-soft: #fcebf1;
  --gold: #c8911f;
  --gold-soft: #fbf2dd;

  --r-xl: 28px;
  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 9px;
  --r-pill: 999px;

  --sh-1: 0 1px 2px rgba(18, 26, 46, 0.04), 0 10px 26px -16px rgba(18, 26, 46, 0.22);
  --sh-2: 0 2px 4px rgba(18, 26, 46, 0.05), 0 26px 60px -26px rgba(18, 26, 46, 0.34);
  --sh-float: 0 18px 40px -20px rgba(18, 26, 46, 0.45);

  --font: "Inter", "Manrope", "Plus Jakarta Sans", "Segoe UI Variable", "Segoe UI",
    system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;

  --wrap: 1240px;
  --gap: 20px;
  --dur: 190ms;
  --ease: cubic-bezier(0.2, 0.7, 0.25, 1);
}

* {
  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(--font);
  font-size: 16px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-wrap: break-word;
}

body.is-locked {
  overflow: hidden;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  border: 0;
  background: none;
  cursor: pointer;
}

input,
select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.018em;
  line-height: 1.16;
  color: var(--ink);
}

p {
  margin: 0 0 1em;
}

:focus-visible {
  outline: 3px solid var(--indigo);
  outline-offset: 2px;
  border-radius: 6px;
}

.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;
}

/* ---------------------------------------------------------------- layout */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: clamp(48px, 7vw, 84px) 0;
}

.section--tight {
  padding: clamp(34px, 5vw, 58px) 0;
}

.section--tint {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0));
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 26px;
}

.section-head__text {
  max-width: 640px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent, var(--navy));
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  opacity: 0.6;
}

.section-title {
  font-size: clamp(25px, 3.6vw, 38px);
  margin: 10px 0 8px;
}

.section-lede {
  color: var(--muted);
  font-size: 16px;
  max-width: 60ch;
  margin: 0;
}

.accent-ai { --accent: var(--lilac); }
.accent-global { --accent: var(--sky); }
.accent-arts { --accent: var(--rose); }
.accent-languages { --accent: var(--gold); }
.accent-scholarships { --accent: var(--mint); }
.accent-news { --accent: var(--saffron); }
.accent-achievers { --accent: var(--coral); }
.accent-parents { --accent: var(--teal); }
.accent-certificates { --accent: var(--indigo); }
.accent-skills { --accent: var(--navy); }

/* --------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 0 22px;
  border-radius: var(--r-pill);
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.01em;
  transition: transform var(--dur) var(--ease), background-color var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--navy);
  color: #fff;
  box-shadow: var(--sh-1);
}

.btn--primary:hover {
  background: var(--navy-2);
  box-shadow: var(--sh-2);
}

.btn--accent {
  background: var(--saffron);
  color: #fff;
  box-shadow: var(--sh-1);
}

.btn--accent:hover {
  background: #d56712;
}

.btn--ghost {
  border: 1.5px solid var(--line-strong);
  background: var(--paper);
  color: var(--ink);
}

.btn--ghost:hover {
  border-color: var(--navy);
  color: var(--navy);
  background: #fff;
}

.btn--quiet {
  color: var(--navy);
  font-weight: 650;
  padding: 0 6px;
  min-height: 40px;
}

.btn--quiet:hover {
  color: var(--saffron);
}

.btn--sm {
  min-height: 38px;
  padding: 0 16px;
  font-size: 13.5px;
}

.link-quiet {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--navy);
  font-weight: 650;
  font-size: 14.5px;
  border-bottom: 1.5px solid transparent;
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

.link-quiet:hover {
  color: var(--saffron);
  border-color: currentColor;
}

.icon {
  width: 20px;
  height: 20px;
  flex: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.icon--sm { width: 16px; height: 16px; }
.icon--xs { width: 14px; height: 14px; }

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

.masthead {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(251, 246, 238, 0.88);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease);
}

.masthead.is-stuck {
  border-bottom-color: var(--line);
  box-shadow: 0 10px 30px -24px rgba(18, 26, 46, 0.5);
}

.masthead__bar {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-align: left;
  padding: 6px 4px 6px 0;
  flex: none;
}

.brand__name,
.brand__tag {
  white-space: nowrap;
}

.brand__mark {
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 13px;
  overflow: hidden;
  background: linear-gradient(150deg, var(--navy), var(--indigo) 60%, var(--sky));
  box-shadow: var(--sh-1);
}

.brand__mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.brand__name {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.brand__tag {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 3px;
}

.nav {
  display: none;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}

.nav__item {
  position: relative;
  padding: 9px 11px;
  border-radius: var(--r-pill);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink-soft);
  white-space: nowrap;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

.nav__item:hover {
  background: rgba(22, 38, 92, 0.07);
  color: var(--navy);
}

.nav__item[aria-current="true"] {
  color: var(--navy);
  background: rgba(22, 38, 92, 0.1);
}

.tools {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--r-pill);
  display: grid;
  place-items: center;
  color: var(--ink-soft);
  position: relative;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

.icon-btn:hover {
  background: rgba(22, 38, 92, 0.08);
  color: var(--navy);
}

.icon-btn__badge {
  position: absolute;
  top: 4px;
  right: 3px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: var(--r-pill);
  background: var(--saffron);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: grid;
  place-items: center;
  border: 2px solid var(--cream);
}

/* ----------------------------------------------------- language switcher */

.lang-control {
  position: relative;
  display: flex;
  align-items: center;
  flex: none;
}

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px 3px 10px;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--line-strong);
  background: var(--paper);
  color: var(--muted);
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease);
}

.lang-toggle:hover {
  border-color: var(--navy);
  background: #fff;
  box-shadow: var(--sh-1);
}

.lang-toggle select {
  appearance: none;
  border: 0;
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235c6478' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0 center;
  background-size: 12px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
  max-width: 134px;
  min-height: 30px;
  padding: 0 17px 0 0;
  cursor: pointer;
  text-overflow: ellipsis;
}

.lang-toggle select:focus-visible {
  outline: 2px solid var(--indigo);
  outline-offset: 2px;
  border-radius: 5px;
}

.lang-status {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  z-index: 6;
  max-width: 250px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--sh-1);
  font-size: 11.5px;
  line-height: 1.35;
  color: var(--muted);
  white-space: nowrap;
}

.lang-status:empty { display: none; }
.lang-status:not(:empty) { padding: 7px 10px; }
.lang-status.error { color: #a9331d; border-color: #eec7bd; background: #fdf1ee; }

.drawer__lang {
  display: grid;
  gap: 9px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.drawer__lang label {
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.drawer__lang .lang-toggle { width: 100%; border-radius: var(--r-md); }
.drawer__lang .lang-toggle select { max-width: none; flex: 1; font-size: 14px; min-height: 34px; }
.drawer__lang .lang-status { position: static; white-space: normal; }

/* the widget's own control is driven from our selector, so it is parked
   off-canvas rather than removed, which would stop Google from populating it */
#google_translate_element {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

body > .skiptranslate,
.goog-te-banner-frame.skiptranslate,
.goog-te-balloon-frame,
.goog-tooltip,
#goog-gt-tt {
  display: none !important;
}

body { top: 0 !important; }

.drawer {
  display: none;
  border-top: 1px solid var(--line);
  background: var(--paper);
  padding: 10px 0 22px;
}

.drawer.is-open {
  display: block;
}

.drawer__list {
  display: grid;
  gap: 2px;
}

.drawer__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  text-align: left;
  padding: 15px 6px;
  font-size: 17px;
  font-weight: 650;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}

.drawer__item span.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent, var(--navy));
}

.drawer__foot {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
}

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

.hero {
  position: relative;
  padding: clamp(26px, 4vw, 52px) 0 clamp(38px, 5vw, 62px);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -14% -20% auto -20%;
  height: 460px;
  background: radial-gradient(600px 300px at 18% 12%, rgba(108, 92, 231, 0.14), transparent 68%),
    radial-gradient(560px 320px at 78% 4%, rgba(233, 118, 29, 0.14), transparent 66%),
    radial-gradient(520px 300px at 50% 40%, rgba(23, 161, 132, 0.1), transparent 70%);
  pointer-events: none;
}

.hero__grid {
  position: relative;
  display: grid;
  gap: 32px;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 15px 8px 12px;
  border-radius: var(--r-pill);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--sh-1);
  font-size: 13px;
  font-weight: 650;
  color: var(--navy);
}

.hero__badge i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--saffron);
  animation: pulse 2.6s var(--ease) infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(233, 118, 29, 0.5); }
  50% { box-shadow: 0 0 0 7px rgba(233, 118, 29, 0); }
}

.hero__title {
  font-size: clamp(35px, 8.6vw, 66px);
  line-height: 1.03;
  letter-spacing: -0.035em;
  margin: 18px 0 0;
  font-weight: 800;
}

.hero__title em {
  font-style: normal;
  color: var(--saffron);
}

.hero__lede {
  margin-top: 18px;
  font-size: 17px;
  color: var(--muted);
  max-width: 52ch;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.hero__stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hero__stat b {
  font-size: 21px;
  letter-spacing: -0.03em;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}

.hero__stat span {
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 550;
}

.hero__media {
  position: relative;
}

.collage {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-height: 340px;
}

.collage__cell {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: linear-gradient(135deg, var(--paper-2), var(--line));
  box-shadow: var(--sh-1);
}

.collage__cell:first-child {
  grid-row: span 2;
}

.collage__cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 620ms var(--ease);
}

.collage__cell:hover img {
  transform: scale(1.05);
}

.collage__cap {
  position: absolute;
  left: 10px;
  bottom: 10px;
  right: 10px;
  padding: 7px 11px;
  border-radius: var(--r-pill);
  background: rgba(18, 26, 46, 0.66);
  color: #fff;
  font-size: 11.5px;
  font-weight: 600;
  backdrop-filter: blur(6px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 14px;
}

.chip-float {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: var(--r-pill);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--sh-1);
  font-size: 13px;
  font-weight: 650;
  color: var(--ink-soft);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
    border-color var(--dur) var(--ease);
}

.chip-float:hover {
  transform: translateY(-2px);
  box-shadow: var(--sh-2);
  border-color: var(--accent, var(--navy));
}

.chip-float i {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  background: var(--accent, var(--navy));
}

/* --------------------------------------------------------- story cards */

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  text-align: left;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
    border-color var(--dur) var(--ease);
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--sh-2);
  border-color: transparent;
}

.card__media {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--paper-2), var(--line));
}

.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 620ms var(--ease);
}

.card:hover .card__media img {
  transform: scale(1.045);
}

.card__media--wide { aspect-ratio: 16 / 9; }
.card__media--tall { aspect-ratio: 4 / 5; }
.card__media--square { aspect-ratio: 1 / 1; }
.card__media--hero { aspect-ratio: 3 / 2; }

.card__body {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 17px 18px 19px;
  flex: 1;
}

.card__kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.card__title {
  font-size: 18px;
  line-height: 1.28;
}

.card__dek {
  color: var(--muted);
  font-size: 14.5px;
  margin: 0;
}

.card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 12px;
  font-size: 12.5px;
  color: var(--muted-2);
}

.card--feature {
  grid-column: 1 / -1;
}

.card--feature .card__media { aspect-ratio: 16 / 10; }
.card--feature .card__title { font-size: clamp(23px, 4.4vw, 34px); line-height: 1.12; }
.card--feature .card__body { padding: 22px 22px 24px; gap: 12px; }
.card--feature .card__dek { font-size: 16.5px; }

.card--row {
  flex-direction: row;
  align-items: stretch;
}

.card--row .card__media {
  width: 38%;
  min-width: 118px;
  flex: none;
  aspect-ratio: auto;
}

.card--row .card__body { padding: 14px 16px; gap: 6px; }
.card--row .card__title { font-size: 15.5px; }
.card--row .card__dek { display: none; }

.card--plain {
  background: transparent;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  padding: 16px 0;
  flex-direction: row;
  gap: 14px;
  align-items: baseline;
}

.card--plain:hover {
  transform: none;
  box-shadow: none;
}

.card--plain .card__num {
  font-size: 13px;
  font-weight: 750;
  color: var(--saffron);
  font-variant-numeric: tabular-nums;
  width: 26px;
  flex: none;
}

.card--plain .card__title { font-size: 16px; }

.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: var(--accent-soft, var(--sky-soft));
  color: var(--accent, var(--sky));
}

.tag--neutral {
  background: var(--paper-2);
  color: var(--muted);
}

.tag--outline {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--muted);
}

.save-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--r-pill);
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  color: var(--muted);
  flex: none;
  transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease),
    border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.save-btn:hover {
  color: var(--navy);
  background: #fff;
  transform: scale(1.06);
}

.save-btn[aria-pressed="true"] {
  color: #fff;
  background: var(--saffron);
  border-color: var(--saffron);
}

.save-btn[aria-pressed="true"] svg {
  fill: currentColor;
}

.card__bookmark {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
}

.read-mins {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* ----------------------------------------------------------------- grid */

.grid {
  display: grid;
  gap: var(--gap);
}

/* Mobile-first: multi-column grids collapse to a single readable column.
   Columns are added back at the tablet and desktop breakpoints below. */
.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
.grid--4 { grid-template-columns: 1fr; }
.grid > * { min-width: 0; }

.picks {
  display: grid;
  gap: var(--gap);
}

.picks__side {
  display: grid;
  gap: var(--gap);
}

.picks__list {
  display: grid;
  gap: 12px;
}

/* ------------------------------------------------------------ story rail */

.rail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.rail {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 0 18px;
  margin: 0;
  scrollbar-width: thin;
  overscroll-behavior-x: contain;
}

.rail::-webkit-scrollbar { height: 6px; }
.rail::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 99px;
}

.rail > * {
  flex: 0 0 min(78vw, 300px);
  scroll-snap-align: start;
}

.rail-nav {
  display: flex;
  gap: 8px;
}

.rail-nav .icon-btn {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  background: var(--paper);
}

/* ------------------------------------------------------- editorial bits */

.note {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: var(--paper-2);
  border: 1px solid var(--line);
  font-size: 13.5px;
  color: var(--muted);
}

.note strong { color: var(--ink); }

.knowledge {
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 20px 20px 18px;
  box-shadow: var(--sh-1);
}

.knowledge__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.knowledge__head .icon {
  color: var(--accent, var(--navy));
}

.knowledge__title {
  font-size: 16px;
  font-weight: 750;
}

.knowledge ul {
  margin: 0;
  padding-left: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.knowledge li {
  display: flex;
  gap: 10px;
  font-size: 14.5px;
  color: var(--ink-soft);
}

.knowledge li::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-top: 8px;
  border-radius: 50%;
  background: var(--accent, var(--navy));
  flex: none;
}

.stat-strip {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stat {
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 14px 15px;
}

.stat b {
  display: block;
  font-size: 24px;
  letter-spacing: -0.03em;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}

.stat span {
  font-size: 12.5px;
  color: var(--muted);
}

/* --------------------------------------------------------- skills index */

.index-panel {
  display: grid;
  gap: 24px;
  padding: clamp(20px, 3vw, 32px);
  border-radius: var(--r-xl);
  background: linear-gradient(160deg, #16265c, #22357e 55%, #34479c);
  color: #e9ecfb;
  box-shadow: var(--sh-2);
}

.index-panel .section-title,
.index-panel .section-lede { color: #fff; }
.index-panel .eyebrow { color: #ffd9a8; }
.index-panel .section-lede { color: rgba(233, 236, 251, 0.82); }

.bars {
  display: grid;
  gap: 15px;
}

.bar {
  display: grid;
  gap: 7px;
}

.bar__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
}

.bar__label { font-weight: 650; }

.bar__value {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: #ffd9a8;
}

.bar__track {
  height: 10px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.16);
  overflow: hidden;
}

.bar__fill {
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: linear-gradient(90deg, #ffd9a8, #ff9d3d);
  transition: width 900ms var(--ease);
}

.index-panel .note {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.16);
  color: rgba(233, 236, 251, 0.85);
}

.index-panel .note strong { color: #fff; }

.index-side {
  display: grid;
  gap: 14px;
  align-content: start;
}

.index-side .card {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.index-side .card:hover { background: rgba(255, 255, 255, 0.14); }
.index-side .card__dek { color: rgba(233, 236, 251, 0.78); }
.index-side .card__title { color: #fff; }
.index-side .card__foot { color: rgba(233, 236, 251, 0.7); }

/* ------------------------------------------------------------- explorer */

.segmented {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 5px;
  border-radius: var(--r-pill);
  background: var(--paper-2);
  border: 1px solid var(--line);
  scrollbar-width: none;
}

.segmented::-webkit-scrollbar { display: none; }

.segmented__btn {
  padding: 9px 16px;
  border-radius: var(--r-pill);
  font-size: 13.5px;
  font-weight: 650;
  color: var(--muted);
  white-space: nowrap;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

.segmented__btn[aria-pressed="true"] {
  background: var(--paper);
  color: var(--navy);
  box-shadow: var(--sh-1);
}

.country-grid {
  display: grid;
  gap: var(--gap);
}

.country-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--paper);
  text-align: left;
  box-shadow: var(--sh-1);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.country-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--sh-2);
}

.country-card__flag {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--accent-soft, var(--sky-soft));
  color: var(--accent, var(--sky));
  font-weight: 800;
  font-size: 14px;
}

.country-card__name {
  font-size: 17px;
  font-weight: 750;
}

.country-card__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 7px;
  font-size: 14px;
  color: var(--muted);
}

.country-card__list li {
  display: flex;
  gap: 8px;
}

.country-card__list li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-top: 8px;
  background: var(--accent, var(--sky));
  flex: none;
}

.country-card__foot {
  font-size: 12.5px;
  color: var(--muted-2);
  border-top: 1px solid var(--line);
  padding-top: 10px;
  margin-top: auto;
}

/* ---------------------------------------------------------------- ages */

.age-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--paper);
  text-align: left;
  overflow: hidden;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
    border-color var(--dur) var(--ease);
}

.age-card__media {
  position: relative;
  z-index: 1;
  display: block;
  border-radius: var(--r-md);
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, var(--paper-2), var(--line));
  margin-bottom: 4px;
}

.age-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 620ms var(--ease);
}

.age-card:hover .age-card__media img { transform: scale(1.05); }

.age-card::after {
  content: "";
  position: absolute;
  right: -34px;
  bottom: -34px;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: var(--accent-soft, var(--lilac-soft));
  opacity: 0.75;
  transition: transform 420ms var(--ease);
}

.age-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--sh-2);
  border-color: var(--accent, var(--navy));
}

.age-card:hover::after { transform: scale(1.14); }

.age-card__range {
  position: relative;
  z-index: 1;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent, var(--lilac));
}

.age-card__title {
  position: relative;
  z-index: 1;
  font-size: 19px;
}

.age-card__dek {
  position: relative;
  z-index: 1;
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}

.age-card__count {
  position: relative;
  z-index: 1;
  margin-top: auto;
  font-size: 12.5px;
  color: var(--muted-2);
  font-weight: 600;
}

/* -------------------------------------------------------------- calendar */

.calendar {
  display: grid;
  gap: 14px;
}

.cal-filters {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--paper);
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.field select {
  min-height: 46px;
  padding: 0 14px;
  border-radius: var(--r-md);
  border: 1.5px solid var(--line-strong);
  background: var(--paper);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235c6478' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
  padding-right: 40px;
}

.field select:focus-visible { border-color: var(--navy); }

.event {
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 14px;
  padding: 15px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--paper);
  transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.event:hover { box-shadow: var(--sh-1); transform: translateY(-2px); }

.event__date {
  border-radius: var(--r-md);
  background: var(--accent-soft, var(--mint-soft));
  color: var(--accent, var(--mint));
  display: grid;
  place-items: center;
  align-content: center;
  padding: 8px 4px;
  text-align: center;
}

.event__date b {
  font-size: 20px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.event__date span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.event__title { font-size: 16px; margin-bottom: 5px; }
.event__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 8px;
}

.event__source {
  font-size: 12px;
  color: var(--muted-2);
  word-break: break-word;
}

/* --------------------------------------------------------------- skills */

.skill-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skill-opt {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 17px;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--line-strong);
  background: var(--paper);
  font-size: 14.5px;
  font-weight: 650;
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease),
    color var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.skill-opt:hover { transform: translateY(-2px); }

.skill-opt[aria-pressed="true"] {
  border-color: var(--accent, var(--navy));
  background: var(--accent-soft, var(--sky-soft));
  color: var(--accent, var(--navy));
}

.skill-opt i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--accent, var(--navy));
}

.skill-result {
  margin-top: 20px;
  padding: 20px;
  border-radius: var(--r-lg);
  border: 1px dashed var(--line-strong);
  background: var(--paper);
}

.skill-result h4 { font-size: 17px; margin-bottom: 4px; }
.skill-result p { color: var(--muted); font-size: 14.5px; }

.path {
  display: grid;
  gap: 0;
  padding-left: 4px;
}

.path__step {
  position: relative;
  padding: 0 0 20px 30px;
  border-left: 2px solid var(--line);
}

.path__step:last-child {
  border-left-color: transparent;
  padding-bottom: 0;
}

.path__step::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--paper);
  border: 3px solid var(--accent, var(--mint));
}

.path__step h4 { font-size: 15.5px; }
.path__step p { font-size: 14px; color: var(--muted); margin: 4px 0 0; }

/* --------------------------------------------------------- big question */

.question {
  border-radius: var(--r-xl);
  border: 1px solid var(--line);
  background: linear-gradient(160deg, var(--paper), var(--paper-2));
  padding: clamp(22px, 3.4vw, 34px);
  box-shadow: var(--sh-1);
}

.question__title {
  font-family: var(--font-serif);
  font-size: clamp(25px, 4.4vw, 40px);
  line-height: 1.14;
  letter-spacing: -0.02em;
  margin: 12px 0 8px;
}

.viewpoint {
  padding: 18px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--paper);
  min-height: 168px;
}

.viewpoint__who {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--accent, var(--navy));
  margin-bottom: 8px;
}

.viewpoint__who i {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent-soft, var(--sky-soft));
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
  color: var(--accent, var(--sky));
}

.viewpoint p { font-size: 15px; color: var(--ink-soft); margin: 0; }

/* ------------------------------------------------------------------ CTA */

.cta-band {
  border-radius: var(--r-xl);
  padding: clamp(24px, 4vw, 42px);
  background: linear-gradient(135deg, #16265c, #34479c 62%, #2e7bd6);
  color: #fff;
  display: grid;
  gap: 20px;
  box-shadow: var(--sh-2);
}

.cta-band h3 { color: #fff; font-size: clamp(22px, 3.4vw, 32px); }
.cta-band p { color: rgba(255, 255, 255, 0.82); margin: 8px 0 0; max-width: 56ch; }
.cta-band .btn--ghost { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.3); color: #fff; }
.cta-band .btn--ghost:hover { background: rgba(255, 255, 255, 0.22); color: #fff; }

/* -------------------------------------------------------------- article */

.reader { padding-bottom: 40px; }

.progress {
  position: sticky;
  top: 72px;
  height: 3px;
  background: var(--line);
  z-index: 40;
}

.progress__bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--saffron), var(--coral));
  transition: width 90ms linear;
}

.article-head {
  padding: clamp(24px, 4vw, 44px) 0 0;
  max-width: 900px;
}

.article-title {
  font-size: clamp(30px, 6.4vw, 52px);
  line-height: 1.06;
  letter-spacing: -0.035em;
  margin: 16px 0 0;
}

.article-standfirst {
  font-size: 18px;
  color: var(--muted);
  margin-top: 16px;
  max-width: 62ch;
}

.byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 13.5px;
  color: var(--muted);
}

.byline strong { color: var(--ink); }

.figure {
  margin: 26px 0 0;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: var(--paper-2);
  box-shadow: var(--sh-1);
}

.figure img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.figure figcaption {
  padding: 11px 16px;
  font-size: 12.5px;
  color: var(--muted);
  background: var(--paper);
  border-top: 1px solid var(--line);
}

.article-layout {
  display: grid;
  gap: 34px;
  padding-top: 30px;
}

.prose { max-width: 68ch; }

.prose h3 {
  font-size: clamp(20px, 2.9vw, 26px);
  margin: 34px 0 12px;
  letter-spacing: -0.025em;
}

.prose p { font-size: 17px; line-height: 1.75; color: var(--ink-soft); }

.prose p:first-of-type::first-letter {
  font-family: var(--font-serif);
  float: left;
  font-size: 3.1em;
  line-height: 0.82;
  padding: 6px 10px 0 0;
  color: var(--navy);
  font-weight: 700;
}

.pull {
  margin: 26px 0;
  padding: 18px 22px;
  border-left: 4px solid var(--accent, var(--saffron));
  background: var(--paper);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  font-family: var(--font-serif);
  font-size: 20px;
  line-height: 1.42;
  color: var(--ink);
}

.aside {
  display: grid;
  gap: 18px;
  align-content: start;
}

.toc {
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 16px;
}

.toc__title {
  font-size: 12.5px;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.toc ol { margin: 0; padding-left: 18px; display: grid; gap: 8px; }
.toc button { font-size: 14.5px; text-align: left; color: var(--ink-soft); }
.toc button:hover { color: var(--saffron); }

.sources {
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 16px;
  font-size: 13.5px;
  color: var(--muted);
}

.sources h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 10px; }
.sources ul { margin: 0; padding-left: 18px; display: grid; gap: 8px; }
.sources li { word-break: break-word; }

.takeaway {
  border-radius: var(--r-lg);
  padding: 18px;
  background: var(--mint-soft);
  border: 1px solid rgba(23, 161, 132, 0.22);
}

.takeaway h4 { color: #0d7a64; font-size: 15px; margin-bottom: 8px; }
.takeaway ul { margin: 0; padding-left: 18px; display: grid; gap: 8px; font-size: 14.5px; color: #14604f; }

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

.overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  background: rgba(18, 26, 46, 0.45);
  backdrop-filter: blur(4px);
  padding: 0;
}

.overlay.is-open { display: block; }

.overlay__panel {
  background: var(--cream);
  width: 100%;
  height: 100%;
  overflow-y: auto;
  padding: 18px 0 60px;
  animation: overlayIn 260ms var(--ease);
}

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

.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 8px 16px;
  border-radius: var(--r-pill);
  background: var(--paper);
  border: 1.5px solid var(--line-strong);
  box-shadow: var(--sh-1);
}

.search-bar input {
  flex: 1;
  min-height: 46px;
  border: 0;
  background: none;
  font-size: 16.5px;
  outline: none;
  min-width: 0;
}

.search-suggest {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.suggest-chip {
  padding: 8px 14px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-strong);
  background: var(--paper);
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.suggest-chip:hover { border-color: var(--navy); color: var(--navy); }

.empty {
  padding: 40px 20px;
  text-align: center;
  border-radius: var(--r-lg);
  border: 1px dashed var(--line-strong);
  background: var(--paper);
  color: var(--muted);
}

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

.footer {
  background: #101a38;
  color: rgba(233, 236, 251, 0.78);
  padding: clamp(34px, 4.4vw, 52px) 0 clamp(30px, 3.6vw, 44px);
  margin-top: 20px;
}

.footer__grid {
  display: grid;
  gap: 30px;
  max-width: 52ch;
}

.footer__brand {
  color: #fff;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.footer__claim {
  font-family: var(--font-serif);
  font-size: 17px;
  color: #ffd9a8;
  margin-top: 8px;
}

.footer__grid p:last-child { margin-bottom: 0; }

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.footer__link {
  padding: 9px 17px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: rgba(233, 236, 251, 0.86);
  font-size: 13.5px;
  font-weight: 650;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease),
    border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.footer__link:hover {
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(255, 255, 255, 0.44);
  color: #fff;
  transform: translateY(-2px);
}

.footer__link:active { transform: translateY(0) scale(0.97); }

/* ------------------------------------------- copyright / contact / privacy */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: none;
  background: rgba(18, 26, 46, 0.52);
  backdrop-filter: blur(5px);
  padding: 20px;
  overflow-y: auto;
}

.modal-overlay.is-open { display: grid; place-items: center; }

.modal {
  width: 100%;
  max-width: 720px;
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-float);
  overflow: hidden;
}

.modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 22px 16px;
  border-bottom: 1px solid var(--line);
}

.modal__title {
  font-size: clamp(20px, 3vw, 27px);
  margin-top: 8px;
}

.modal__body {
  padding: 20px 22px 8px;
  overflow-y: auto;
}

.modal__body p {
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.modal__body h4 {
  font-size: 16px;
  margin: 22px 0 7px;
}

.modal__body h4:first-child { margin-top: 0; }

.modal__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 4px 0 6px;
}

.email-chip {
  display: inline-flex;
  align-items: center;
  padding: 9px 16px;
  border-radius: var(--r-pill);
  background: var(--paper-2);
  border: 1px solid var(--line);
  font-size: 14.5px;
  font-weight: 700;
  color: var(--navy);
  user-select: all;
  word-break: break-all;
}

.modal__foot {
  padding: 14px 22px 20px;
  border-top: 1px solid var(--line);
}

.modal__meta {
  font-size: 12.5px;
  color: var(--muted-2);
}

@media (max-width: 640px) {
  .modal-overlay { padding: 12px; }
  .modal { max-height: calc(100vh - 24px); border-radius: var(--r-lg); }
  .modal__head { padding: 18px 18px 14px; }
  .modal__body { padding: 16px 18px 6px; }
  .modal__foot { padding: 12px 18px 18px; }
  .modal__body p { font-size: 15px; }
}

/* ---------------------------------------------------- sticky mobile nav */

.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 55;
  display: flex;
  background: rgba(255, 253, 249, 0.96);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
}

.tabbar button {
  flex: 1;
  display: grid;
  justify-items: center;
  gap: 3px;
  padding: 7px 2px;
  border-radius: var(--r-md);
  font-size: 10.5px;
  font-weight: 650;
  color: var(--muted);
  transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}

.tabbar button[aria-current="true"] { color: var(--navy); background: rgba(22, 38, 92, 0.07); }

/* ------------------------------------------------------------ animation */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 620ms var(--ease), transform 620ms var(--ease);
  will-change: opacity, transform;
}

.reveal.in {
  opacity: 1;
  transform: none;
}

.reveal[data-delay="1"] { transition-delay: 70ms; }
.reveal[data-delay="2"] { transition-delay: 140ms; }
.reveal[data-delay="3"] { transition-delay: 210ms; }
.reveal[data-delay="4"] { transition-delay: 280ms; }

.img-fallback {
  background: linear-gradient(135deg, var(--lilac-soft), var(--sky-soft) 55%, var(--mint-soft)) !important;
}

/* --------------------------------------------------------- breakpoints */

@media (min-width: 700px) {
  .grid--2-sm { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3,
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .picks__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .country-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .calendar { grid-template-columns: 260px 1fr; align-items: start; }
  .cal-filters { position: sticky; top: 92px; }
  .index-panel { grid-template-columns: 1.35fr 1fr; }
  .hero__grid { grid-template-columns: 1fr; }
  .cta-band { grid-template-columns: 1.4fr 1fr; align-items: center; }

}

@media (min-width: 700px) {
  .grid--3-sm { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 900px) {
  .grid--3-sm { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .article-layout { grid-template-columns: minmax(0, 1fr) 300px; }
  .country-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .knowledge-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1040px) {
  /* Two-tier masthead: brand and utilities on row one, the full section
     nav on its own row so seven long labels never push the icons off screen. */
  .masthead__bar { flex-wrap: wrap; padding-top: 6px; }
  .nav {
    display: flex;
    order: 3;
    flex: 0 0 100%;
    justify-content: center;
    gap: 2px;
    margin-left: 0;
    padding: 6px 0 9px;
    border-top: 1px solid var(--line);
  }
  .nav__item { padding: 8px 10px; font-size: 14px; }
  .tools { margin-left: auto; }
  .drawer { display: none !important; }
  .progress { top: 122px; }
  .hero__grid { grid-template-columns: 1.03fr 1fr; align-items: center; gap: 44px; }
  .picks { grid-template-columns: 1.5fr 1fr; align-items: start; }
  .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .country-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .collage { min-height: 460px; }
  .rail > * { flex-basis: 300px; }
  .card--feature .card__media { aspect-ratio: 21 / 9; }
}

@media (min-width: 1180px) {
  .wrap { padding: 0 28px; }
}

@media (max-width: 1039px) {
  .card--feature { grid-column: auto; }
  .card--feature .card__media { aspect-ratio: 16 / 10; }
}

@media (max-width: 379px) {
  /* Very narrow handsets: keep the brand and the three utility buttons on
     one row instead of letting them collide. */
  .masthead__bar { gap: 6px; }
  .masthead__bar { min-height: 60px; }
  .brand { gap: 8px; }
  .brand__name { font-size: 17px; }
  .brand__mark { width: 38px; height: 38px; border-radius: 11px; }
  .icon-btn { width: 38px; height: 38px; }
  .wrap { padding: 0 16px; }
  .lang-toggle { padding: 2px 6px 2px 7px; gap: 3px; }
  .lang-toggle select { max-width: 78px; font-size: 11.5px; min-height: 26px; padding-right: 14px; }
  .lang-toggle .icon { width: 13px; height: 13px; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .masthead__bar { min-height: 64px; }
  /* Search and saved live in the bottom tab bar on phones, so the header
     keeps only the brand and the language selector. */
  .tools-hide-mobile { display: none; }
  .lang-toggle { padding: 2px 7px 2px 8px; gap: 4px; }
  .lang-toggle select { max-width: 96px; font-size: 12px; min-height: 28px; padding-right: 15px; }
  .lang-toggle .icon { width: 14px; height: 14px; }
  .lang-status { max-width: 200px; }
  .brand__tag { display: none; }
  .hero__title { letter-spacing: -0.03em; }
  .collage { grid-template-columns: 1fr 1fr; grid-template-rows: repeat(2, 120px); min-height: 0; }
  .collage__cell:first-child { grid-column: span 2; grid-row: span 1; }
  .prose p:first-of-type::first-letter { font-size: 2.7em; }
  .tabbar { display: flex; }
  .has-tabbar { padding-bottom: 76px; }
  .progress { top: 64px; }
  .figure img { aspect-ratio: 4 / 3; }
}

@media (min-width: 641px) {
  .tabbar { display: none; }
}

/* --------------------------------------------- button-based card shell */

.card-wrap {
  position: relative;
  display: block;
}

.card-wrap .save-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
}

.card,
.card--plain,
.card--row,
.knowledge,
.country-card,
.age-card,
.event {
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
}

.card__media,
.card__body,
.card__kicker,
.card__title,
.card__dek,
.card__foot {
  display: block;
}

.card__kicker,
.card__foot { display: flex; }

.card--row .card__body { display: flex; }
.card--plain { display: flex; }

.knowledge {
  display: block;
  cursor: pointer;
  transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.knowledge:hover {
  transform: translateY(-3px);
  box-shadow: var(--sh-2);
  border-color: transparent;
}

.knowledge__head { display: flex; }

.age-card { cursor: pointer; }

.country-card__flag.byMonogram { display: grid; }

.event__meta span + span::before {
  content: "·";
  margin-right: 10px;
  color: var(--line-strong);
}

.event__meta span {
  display: inline-flex;
  align-items: center;
}

.event__meta span:first-child::before { content: none; }

.card--row .card__media img,
.card--plain .card__media img {
  height: 100%;
}

.prose mark,
.empty mark { background: #ffe6a8; color: inherit; }

.rail .card-wrap { flex: 0 0 min(78vw, 300px); }

.tabbar button span { font-size: 10.5px; }

@media (min-width: 1040px) {
  .picks__list { grid-template-columns: 1fr; }
}

@media (max-width: 699px) {
  .country-grid { grid-template-columns: 1fr; }
  .event { grid-template-columns: 54px 1fr; gap: 12px; }
}

/* ==========================================================================
   Motion layer
   Entrance, hover, feedback and view transitions. Every effect is short,
   single-purpose and fully disabled under prefers-reduced-motion at the end
   of this file. Elements opt in at runtime via app.js, so no-JS rendering
   still shows a complete static page.
   ========================================================================== */

/* ---------------------------------------------------------- entrance */

.reveal {
  opacity: 0;
  transform: translateY(20px);
}

.reveal.in {
  opacity: 1;
  transform: none;
  transition: opacity 660ms var(--ease), transform 660ms var(--ease);
}

.reveal[data-delay="0"] { transition-delay: 0ms; }
.reveal[data-delay="1"] { transition-delay: 55ms; }
.reveal[data-delay="2"] { transition-delay: 110ms; }
.reveal[data-delay="3"] { transition-delay: 165ms; }
.reveal[data-delay="4"] { transition-delay: 220ms; }
.reveal[data-delay="5"] { transition-delay: 275ms; }
.reveal[data-delay="6"] { transition-delay: 330ms; }

.reveal--zoom { transform: translateY(20px) scale(0.965); }
.reveal--side { transform: translateX(-22px); }
.reveal.in.reveal--side { transform: none; }

/* ------------------------------------------------------ view + panels */

@keyframes viewIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

#app.view-enter { animation: viewIn 460ms var(--ease); }

@keyframes panelIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.panel-enter { animation: panelIn 380ms var(--ease); }

/* ------------------------------------------------------------- cards */

.card {
  transition: transform 260ms var(--ease), box-shadow 260ms var(--ease),
    border-color 260ms var(--ease);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--sh-2);
}

.card:active { transform: translateY(-2px) scale(0.994); }

.card-wrap:hover .card:not(.card--plain) { border-color: var(--accent, var(--navy)); }

.card__media img,
.figure img,
.collage__cell img,
.age-card__media img {
  transition: transform 680ms var(--ease), opacity 520ms var(--ease);
}

.card:hover .card__media img { transform: scale(1.07); }

.card__title {
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 1.5px;
  transition: background-size 340ms var(--ease);
}

.card:hover .card__title { background-size: 100% 1.5px; }

.card--row:hover { transform: translateY(-4px); }
.card--row:hover .card__media img { transform: scale(1.06); }
.card--plain:hover .card__title { background-size: 100% 1.5px; }

/* ------------------------------------------- media load-in + shimmer */

.media-loading {
  background: linear-gradient(100deg, var(--paper-2) 34%, #ffffff 50%, var(--paper-2) 66%);
  background-size: 240% 100%;
  animation: shimmer 1.5s linear infinite;
}

.media-loading img { opacity: 0; }

@keyframes shimmer {
  from { background-position: 130% 0; }
  to { background-position: -130% 0; }
}

/* ----------------------------------------------------------- buttons */

.btn {
  transition: transform 200ms var(--ease), background-color 200ms var(--ease),
    box-shadow 200ms var(--ease), color 200ms var(--ease), border-color 200ms var(--ease);
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.97); }
.btn .icon { transition: transform 240ms var(--ease); }
.btn:hover .icon { transform: translateX(4px); }
.btn--ghost:hover .icon { transform: none; }

.link-quiet .icon { transition: transform 240ms var(--ease); }
.link-quiet:hover .icon { transform: translateX(4px); }

.icon-btn {
  transition: background-color 190ms var(--ease), color 190ms var(--ease),
    transform 190ms var(--ease);
}

.icon-btn:hover { transform: translateY(-1px) scale(1.06); }
.icon-btn:active { transform: scale(0.93); }

.nav__item::after {
  content: "";
  position: absolute;
  left: 11px;
  right: 11px;
  bottom: 4px;
  height: 2px;
  border-radius: 2px;
  background: var(--saffron);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 260ms var(--ease);
}

.nav__item:hover::after,
.nav__item[aria-current="true"]::after { transform: scaleX(1); }

.segmented__btn {
  transition: background-color 200ms var(--ease), color 200ms var(--ease),
    transform 220ms var(--ease), box-shadow 220ms var(--ease);
}

.segmented__btn:hover { transform: translateY(-1px); }
.segmented__btn[aria-pressed="true"] { transform: translateY(0) scale(1.035); }
.segmented__btn:active { transform: scale(0.96); }

.chip-float { transition: transform 220ms var(--ease), box-shadow 220ms var(--ease), border-color 220ms var(--ease); }
.chip-float:active { transform: translateY(0) scale(0.96); }

.skill-opt:active { transform: scale(0.96); }

@keyframes savePop {
  0% { transform: scale(1); }
  42% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

.save-btn.is-bumped { animation: savePop 460ms var(--ease); }

@keyframes badgeBump {
  0% { transform: scale(1); }
  45% { transform: scale(1.5); }
  100% { transform: scale(1); }
}

.icon-btn__badge.is-bumped { animation: badgeBump 460ms var(--ease); }

/* -------------------------------------------------------------- rails */

.rail { cursor: grab; }

.rail.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
  user-select: none;
}

.rail-hold { position: relative; }

.rail-hold::before,
.rail-hold::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 14px;
  width: 44px;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transition: opacity 240ms var(--ease);
}

.rail-hold::before {
  left: 0;
  background: linear-gradient(90deg, var(--cream) 12%, rgba(251, 246, 238, 0));
}

.rail-hold::after {
  right: 0;
  background: linear-gradient(270deg, var(--cream) 12%, rgba(251, 246, 238, 0));
}

.rail-hold.can-left::before { opacity: 1; }
.rail-hold.can-right::after { opacity: 1; }

/* ----------------------------------------------------- module details */

.collage__cell {
  transition: transform 420ms var(--ease), box-shadow 420ms var(--ease);
}

.collage__cell:hover {
  transform: translateY(-5px);
  box-shadow: var(--sh-2);
  z-index: 2;
}

.knowledge .icon { transition: transform 260ms var(--ease); }
.knowledge:hover .icon { transform: rotate(-14deg) scale(1.12); }

.age-card__range { transition: letter-spacing 280ms var(--ease); }
.age-card:hover .age-card__range { letter-spacing: 0.16em; }

.country-card__flag { transition: transform 300ms var(--ease); }
.country-card:hover .country-card__flag { transform: rotate(-6deg) scale(1.08); }

.event::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16%;
  bottom: 16%;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--accent, var(--navy));
  transform: scaleY(0.2);
  transform-origin: top;
  transition: transform 260ms var(--ease);
}

.event:hover::before { transform: scaleY(1); }

@keyframes dotPop {
  0% { transform: scale(0.35); }
  62% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

.path__step.reveal.in::before { animation: dotPop 560ms var(--ease) both; }

.tabbar button {
  transition: color 190ms var(--ease), background-color 190ms var(--ease),
    transform 190ms var(--ease);
}

.tabbar button:active { transform: scale(0.9); }
.tabbar button[aria-current="true"] .icon { transform: translateY(-1px) scale(1.08); }
.tabbar .icon { transition: transform 220ms var(--ease); }

/* ------------------------------------------------------------ reading */

.prose h3,
[id^="sec-"],
[id^="ch-"] { scroll-margin-top: 150px; }

.progress__bar { transition: width 130ms linear; }

.masthead {
  transition: border-color 240ms var(--ease), background-color 240ms var(--ease),
    box-shadow 240ms var(--ease);
}

.brand__mark,
.brand__name { transition: width 240ms var(--ease), height 240ms var(--ease),
  font-size 240ms var(--ease), border-radius 240ms var(--ease); }

.masthead.is-stuck .masthead__bar { min-height: 60px; }
.masthead.is-stuck .brand__mark { width: 38px; height: 38px; border-radius: 11px; }
.masthead.is-stuck .brand__name { font-size: 17px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover,
  .card:hover,
  .age-card:hover,
  .country-card:hover,
  .event:hover,
  .chip-float:hover,
  .skill-opt:hover { transform: none; }
  .card:hover .card__media img,
  .collage__cell:hover img { transform: none; }
  .hero__badge i { animation: none; }
  .bar__fill { transition: none; }
  .overlay__panel { animation: none; }
  .footer__link:hover,
  .icon-btn:hover,
  .collage__cell:hover,
  .btn:hover,
  .tabbar button:active,
  .segmented__btn:hover,
  .segmented__btn[aria-pressed="true"] { transform: none; }
  .country-card:hover .country-card__flag,
  .knowledge:hover .icon,
  .btn:hover .icon,
  .link-quiet:hover .icon { transform: none; }
  .card__title,
  .card:hover .card__title { background-size: 0 !important; }
  .age-card:hover .age-card__range { letter-spacing: 0.1em; }
  .masthead.is-stuck .masthead__bar { min-height: 72px; }
  .masthead.is-stuck .brand__mark { width: 46px; height: 46px; }
  .masthead.is-stuck .brand__name { font-size: 19px; }
  * { transition-duration: 0.01ms !important; }
  *,
  *::before,
  *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}
