/* ═══════════════════════════════════════════════════════════════
   COUNTRY PAGE STYLES — shared across all 30 country pages
   Per-page overrides: --flag-1, --flag-2, --flag-3, --country-accent
   ═══════════════════════════════════════════════════════════════ */

/* ── Country hero ── */
.country-hero {
  background: var(--navy);
  color: #fff;
  padding: 3.5rem 1.5rem 3rem;
  position: relative;
  overflow: hidden;
}

.country-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    var(--flag-1, var(--navy)) 0%,
    var(--flag-2, var(--navy)) 50%,
    var(--flag-3, var(--navy)) 100%
  );
  opacity: 0.22;
  pointer-events: none;
}

.country-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(
    to right,
    var(--flag-1, var(--gold)) 33.33%,
    var(--flag-2, var(--gold)) 33.33% 66.66%,
    var(--flag-3, var(--gold)) 66.66%
  );
}

.country-hero__inner {
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* ── Hero layout with photo (new — additive, opt-in per page) ── */
.country-hero__layout {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 2.5rem;
  align-items: stretch;
}
.country-hero__content {
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr;
}
.country-hero__content .country-hero__title {
  align-self: center;
}
.country-hero__photo {
  aspect-ratio: 14 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.country-hero__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.country-hero__photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
}
@media (max-width: 780px) {
  .country-hero__layout {
    grid-template-columns: 1fr;
  }
  .country-hero__photo {
    order: 2;
    aspect-ratio: 16 / 9;
  }
}

.country-hero__breadcrumb {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  align-self: flex-start;
}
.country-hero__breadcrumb a {
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  transition: color var(--transition);
}
.country-hero__breadcrumb a:hover { color: var(--gold); }
.country-hero__breadcrumb-sep { opacity: 0.35; }

.country-hero__title {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  flex-wrap: wrap;
}
.country-hero__flag,
.country-hero__flag.fi {
  display: inline-block;
  width: 7.5rem;
  height: 5rem;
  background-size: contain;
  background-position: center left;
  background-repeat: no-repeat;
  flex-shrink: 0;
}
.country-hero__name {
  font-family: var(--font-display);
  font-size: clamp(3.25rem, 9vw, 5.5rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.0;
}
.country-hero__region {
  display: none;
  margin-top: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0.9;
}

/* ── Jump nav ── */
.jump-nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.jump-nav__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 3.5vw, 2.5rem);
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
}
.jump-nav__inner::-webkit-scrollbar { display: none; }
.jump-nav__link {
  display: inline-block;
  padding: 0.85rem 1.125rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color var(--transition), border-color var(--transition);
}
.jump-nav__link:hover,
.jump-nav__link.active {
  color: var(--navy);
  border-bottom-color: var(--country-accent, var(--gold));
}
.jump-nav__link.active {
  font-weight: 600;
}

/* ── Country overview (map + facts) ── */
.country-overview {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 0;
  max-height: 380px;
  max-width: 1060px;
  margin: 1.5rem auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.country-map {
  overflow: hidden;
  border-right: 1px solid var(--border);
  position: relative;
}

.country-map::after {
  content: 'Map borders may not reflect disputed territories.';
  position: absolute;
  bottom: 5px;
  left: 6px;
  font-size: 0.58rem;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(0, 0, 0, 0.32);
  padding: 1px 5px 2px;
  border-radius: 3px;
  pointer-events: none;
  z-index: 10;
  letter-spacing: 0.01em;
}

#country-map {
  width: 100%;
  height: 380px;
}

.country-facts {
  padding: 1.25rem;
  background: var(--surface);
  overflow-y: auto;
}

.country-facts__heading {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--country-accent, var(--gold));
}

.fact-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.fact-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.6rem 0.7rem 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.fact-card--wide {
  grid-column: 1 / -1;
}

.fact-card__header {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.fact-card__icon {
  font-size: 0.95rem;
  line-height: 1;
  flex-shrink: 0;
}

.fact-card__label {
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.fact-card__value {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.35;
}

.fact-card__extra {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.8rem;
}

@media (max-width: 580px) {
  .country-overview {
    grid-template-columns: 1fr;
    max-height: none;
    margin: 0;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
  .country-map { border-right: none; border-bottom: 1px solid var(--border); }
  #country-map { height: 260px; }
}

/* ── Geography strip ── */
/* ── Geography accordion (replaces geo-strip on updated pages) ── */
.geo-accordion-section {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.geo-accordion-section__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 3.5vw, 2.5rem);
}

.geo-accordion {
  border-bottom: 1px solid var(--border);
}

.geo-accordion:last-child {
  border-bottom: none;
}

.geo-accordion__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 0;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--navy);
  user-select: none;
}

.geo-accordion__summary::-webkit-details-marker { display: none; }
.geo-accordion__summary::marker { display: none; }

.geo-accordion[open] > .geo-accordion__summary {
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--country-accent, var(--gold));
  margin-bottom: 1rem;
}

.geo-accordion__chevron {
  font-size: 1.1rem;
  color: var(--country-accent, var(--gold));
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.geo-accordion[open] .geo-accordion__chevron {
  transform: rotate(180deg);
}

.geo-accordion__body {
  padding-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.geo-accordion__photo {
  width: 100%;
  max-height: 340px;
  object-fit: cover;
  object-position: center;
  border-radius: 6px;
  display: block;
}

/* ── Legacy geo-strip (kept for pages not yet updated) ── */
.geo-strip {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  padding: 1.25rem 0;
}

.geo-strip__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 3.5vw, 2.5rem);
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.geo-strip__heading {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--country-accent, var(--gold));
  display: inline-block;
}

.geo-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.625rem;
}

.geo-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 0.875rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.geo-card__header {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
}

.geo-card__icon { font-size: 1rem; line-height: 1; flex-shrink: 0; }

.geo-card__name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy);
}

.geo-card__desc {
  font-size: 0.8rem;
  color: var(--text);
  line-height: 1.6;
  margin: 0;
}

.geo-funfacts {
  border: 1px solid var(--border);
  border-left: 3px solid var(--country-accent, var(--gold));
  border-radius: var(--radius);
  background: var(--bg);
  padding: 0.875rem 1.125rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.geo-funfacts__header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.geo-funfacts__icon { font-size: 1rem; line-height: 1; }

.geo-funfacts__label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--country-accent, var(--gold));
}

.geo-funfacts__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.geo-funfacts__list li {
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.65;
  padding-left: 1.1rem;
  position: relative;
}

.geo-funfacts__list li::before {
  content: '✦';
  position: absolute;
  left: 0;
  top: 0.2rem;
  font-size: 0.5rem;
  color: var(--country-accent, var(--gold));
}

/* ── At-a-glance stat band (new layout — additive, opt-in per page) ── */
.country-stats {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.country-stats__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.25rem clamp(1rem, 3.5vw, 2.5rem);
  display: flex;
  flex-wrap: wrap;
  row-gap: 1rem;
}
.country-stat {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1 1 160px;
  padding-left: 1.75rem;
  border-left: 1px solid var(--border);
}
.country-stat:first-child {
  padding-left: 0;
  border-left: none;
}
.country-stat__label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--country-accent, var(--gold));
}
.country-stat__value {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.2;
}
@media (max-width: 640px) {
  .country-stat { border-left: none; padding-left: 0; flex: 1 1 45%; }
  .country-stat__value { font-size: 1.1rem; }
}

/* ── Geography layout (new — map + category switcher, additive) ── */
.geo-layout {
  display: grid;
  grid-template-columns: 2fr minmax(220px, 1fr);
  gap: 1.5rem;
  align-items: stretch;
}
.geo-layout__map {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.geo-layout__map #country-map {
  width: 100%;
  height: 340px;
}
.geo-layout__map-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: var(--surface);
  font-size: 0.7rem;
  color: var(--text-muted);
}
.geo-layout__map-caption a {
  color: var(--country-accent, var(--gold));
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.geo-layout__map-caption a:hover { text-decoration: underline; }

.geo-layout__panel {
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.geo-tabs {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1;
}
.geo-tab {
  flex: 1;
  display: flex;
  align-items: center;
  font-family: var(--font-display);
  font-size: 1.4rem;
  line-height: 1.25;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1.25rem;
  text-align: left;
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}
.geo-tab:hover {
  color: var(--navy);
}
.geo-tab.active {
  color: var(--navy);
  background: color-mix(in srgb, var(--country-accent, var(--gold)) 14%, var(--surface));
  border-color: var(--country-accent, var(--gold));
}

.geo-tabpanel {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  margin-top: 1.75rem;
}
.geo-tabpanel[hidden] {
  display: none;
}

@media (max-width: 780px) {
  .geo-layout { grid-template-columns: 1fr; }
}

/* ── Page body ── */
.country-body {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem clamp(1rem, 3.5vw, 2.5rem) 3rem;
}

/* ── Section labels ── */
.section-label {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--country-accent, var(--gold));
}
.section-label h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--navy);
}
.section-label__sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}
.section-desc {
  display: block;
  width: 100%;
  max-width: none;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0 0 1.25rem;
}
.section-desc--key {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.parent-note {
  margin-top: 2rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
}
.parent-note__heading {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 0.5rem;
}
.parent-note__body {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: none;
  margin: 0;
}

/* ── Recipe card ── */
.recipe-section { margin-bottom: 3.5rem; }
.recipe-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.recipe-card__header {
  background: var(--gold);
  padding: 1rem 1.5rem;
}
.recipe-card__header h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff;
}
.recipe-card__header p {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.85);
  margin-top: 0.2rem;
}
.recipe-card__body {
  display: grid;
  grid-template-columns: 1fr 2fr;
}
.recipe-card__ingredients {
  padding: 1.5rem;
  background: #f5f3f0;
  border-right: 1px solid var(--border);
}
.recipe-card__ingredients h4,
.recipe-card__steps h4 {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.recipe-card__ingredients ul {
  list-style: disc;
  padding-left: 1.1rem;
  font-size: 0.88rem;
  line-height: 1.9;
  color: var(--text);
}
.recipe-card__steps { padding: 1.5rem; }
.recipe-card__steps ol {
  list-style: decimal;
  padding-left: 1.1rem;
  font-size: 0.88rem;
  line-height: 1.9;
  color: var(--text);
}
.recipe-card__steps li + li { margin-top: 0.25rem; }

@media (max-width: 580px) {
  .recipe-card__body { grid-template-columns: 1fr; }
  .recipe-card__ingredients { border-right: none; border-bottom: 1px solid var(--border); }
}

/* ── Level sections ── */
.level-section {
  margin-bottom: 3rem;
  scroll-margin-top: 56px;
}

/* ── Book list ── */
.book-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.875rem;
  align-items: start;
}
.book-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), border-color var(--transition);
}
.book-item:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--country-accent, var(--gold));
}
.book-item__num { display: none; }
.book-item__title {
  font-family: var(--font-display);
  font-size: 0.97rem;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.3;
}
.book-item__title a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--country-accent, var(--gold));
  transition: border-color var(--transition), color var(--transition);
}
.book-item__title a:hover { color: var(--country-accent, var(--navy)); }
.book-item__author {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
}
.book-item__note {
  font-size: 0.82rem;
  color: var(--text);
  margin-top: 0.25rem;
  line-height: 1.55;
}
.book-item__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: stretch;
  margin-top: 0.2rem;
}
.book-item__grade {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: var(--navy);
  border-radius: 99px;
  padding: 0.15rem 0.55rem;
}
.book-item__grade--ymg     { background: #2d6a4f; }
.book-item__grade--omg     { background: #5b4b7a; }
.book-item__grade--advanced{ background: #722f1a; }
.book-item__course {
  font-size: 0.79rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: 0.5rem;
  padding-top: 0.45rem;
  border-top: 1px solid var(--border);
}
.book-item__course strong {
  color: var(--navy);
  font-weight: 600;
}
.book-item__content-note {
  font-size: 0.77rem;
  color: #7a4010;
  background: rgba(139, 69, 19, 0.07);
  border-left: 2px solid #c0742a;
  padding: 0.28rem 0.55rem;
  border-radius: 0 4px 4px 0;
  margin-top: 0.35rem;
  line-height: 1.45;
}
.book-guide-note {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
  /* Span full width if placed adjacent to a grid section */
  width: 100%;
}
.book-guide-note__summary {
  padding: 0.75rem 1.25rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  letter-spacing: 0.03em;
}
.book-guide-note__summary::after {
  content: '▾';
  font-size: 0.7rem;
  transition: transform 0.15s;
}
details[open] .book-guide-note__summary::after { transform: rotate(180deg); }
.book-guide-note__body {
  padding: 0 1.25rem 1rem;
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--text);
  border-top: 1px solid var(--border);
}
.book-guide-note__body p { margin: 0.75rem 0; }
.book-guide-note__defs { margin: 0.5rem 0 0; }
.book-guide-note__defs > div {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.3rem 0.75rem;
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--border);
}
.book-guide-note__defs > div:last-child { border-bottom: none; }
.book-guide-note__defs dt { font-weight: 600; color: var(--navy); white-space: nowrap; }
.book-guide-note__defs dd { margin: 0; }

/* Book cover image — Option A: above (default, no extra class needed) */
.book-item__cover {
  width: 100%;
  max-height: 200px;
  object-fit: contain;
  object-position: left top;
  border-radius: 4px;
  margin-bottom: 0.1rem;
}

/* Book cover image — side thumbnail, fixed 3:4 box */
.book-item--cover-side {
  flex-direction: row;
  align-items: flex-start;
  gap: 0.85rem;
}
.book-item--cover-side .book-item__cover {
  flex-shrink: 0;
  width: 72px;
  height: 96px;
  object-fit: contain;
  object-position: center center;
  background: #e8e0d5;
  border-radius: 4px;
  margin-bottom: 0;
}
.book-item--cover-side .book-item__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

/* note + course + content-note span full card width below the cover+body row */
.book-item--wide-desc {
  flex-wrap: wrap;
}
.book-item--wide-desc .book-item__note,
.book-item--wide-desc .book-item__course,
.book-item--wide-desc .book-item__content-note {
  flex: 0 0 100%;
  margin-top: 0.15rem;
}

.book-item__genre,
.book-item__tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.3;
  color: #3a5a8c;
  background: rgba(59, 90, 140, 0.10);
  border-radius: 99px;
  padding: 0.15rem 0.55rem;
  width: min-content;
  text-transform: capitalize;
}
.book-subhead {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 1.25rem 0 0.6rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
}
.book-subhead:first-of-type { margin-top: 0.25rem; }
.book-section__sub {
  grid-column: 1 / -1;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--country-accent, var(--navy));
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
  margin-top: 0.5rem;
}
.book-section__sub:first-child { margin-top: 0; }

/* ── Activity chips ── */
.activity-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
  margin-top: 1.25rem;
}
.activity-chip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--country-accent, var(--gold));
  border-radius: var(--radius-lg);
  padding: 0.875rem 1rem;
  font-size: 0.88rem;
  color: var(--text);
  box-shadow: var(--shadow-sm);
  line-height: 1.45;
}
.activity-chip strong {
  display: block;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.15rem;
  font-size: 0.82rem;
}

/* ── Prev / Next nav ── */
.page-nav {
  display: none;
}
.page-nav__link {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  text-decoration: none;
  color: var(--text);
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  transition: border-color var(--transition), box-shadow var(--transition);
  min-width: 140px;
}
.page-nav__link:hover {
  border-color: var(--country-accent, var(--gold));
  box-shadow: var(--shadow-sm);
}
.page-nav__link--next { text-align: right; margin-left: auto; }
.page-nav__label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
}
.page-nav__country {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.page-nav__country .fi {
  display: inline-block;
  width: 1.5rem;
  height: 1rem;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  flex-shrink: 0;
}
.page-nav__back {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: color var(--transition);
}
.page-nav__back:hover { color: var(--navy); }

/* ═══════════════════════════════════════════════════════════════
   ACTIVITIES SYSTEM — recipes, games, grade-tab cards, modal
   ═══════════════════════════════════════════════════════════════ */

/* ── Section spacing ── */
.content-section { padding: 0; margin-bottom: 2.5rem; scroll-margin-top: 130px; }

/* ── Recipe cards ── */
.recipes-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: start;
}
.recipe-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.recipe-card__header {
  padding: 1rem 1.5rem 0.875rem;
  background: var(--navy);
  border-bottom: 3px solid var(--country-accent, var(--gold));
}
.recipe-card__header h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: #fff;
  margin: 0;
}
.recipe-card__cultural {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.75);
  margin: 0.3rem 0 0;
  line-height: 1.55;
}
.recipe-card__body { display: block; padding: 1.25rem 1.5rem; }
.recipe-card__instructions {
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 1rem;
}
.recipe-card__link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.recipe-card__link a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--country-accent, var(--navy));
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
  transition: opacity var(--transition);
}
.recipe-card__link a:hover { opacity: 0.75; }
.recipe-card__link a::after { content: ' →'; }

/* ── Game cards ── */
.games-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: start;
}
.game-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--country-accent, var(--gold));
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-sm);
}
.game-card__name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.35rem;
}
.game-card__desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0 0 1rem;
}
.game-card__sections {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.game-card__section-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--country-accent, var(--gold));
  margin-bottom: 0.3rem;
}
.game-card__section-body {
  font-size: 0.84rem;
  color: var(--text);
  line-height: 1.65;
}
.game-card__link { margin-top: 1rem; }
.game-card__link a {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--country-accent, var(--navy));
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  transition: opacity var(--transition);
}
.game-card__link a:hover { opacity: 0.7; }
@media (max-width: 540px) {
  .recipes-list,
  .games-list { grid-template-columns: 1fr; }
}

/* ── Activity grade tabs ── */
.act-tabs {
  display: flex;
  gap: 0.375rem;
  margin-bottom: 1.25rem;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0;
}
.act-tab {
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  padding: 0.6rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition);
  white-space: nowrap;
}
.act-tab:hover { color: var(--navy); }
.act-tab.active {
  color: var(--navy);
  border-bottom-color: var(--country-accent, var(--gold));
}

/* ── Activity grid ── */
.act-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.875rem;
}

/* ── Activity card ── */
.act-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.125rem 0.875rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), border-color var(--transition);
}
.act-card:hover { box-shadow: var(--shadow-md); border-color: var(--country-accent, var(--gold)); }
.act-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--country-accent, var(--navy));
  background: color-mix(in srgb, var(--country-accent, var(--gold)) 12%, transparent);
  border-radius: 99px;
  padding: 0.2rem 0.55rem;
  width: fit-content;
}
.act-card__title {
  font-family: var(--font-display);
  font-size: 0.97rem;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.3;
  margin: 0;
}
.act-card__oneliner {
  font-size: 0.82rem;
  color: var(--text);
  line-height: 1.55;
  margin: 0;
  flex: 1;
}
.act-see-more {
  align-self: flex-start;
  background: none;
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 0.3rem 0.8rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--country-accent, var(--navy));
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
  margin-top: 0.25rem;
}
.act-see-more:hover {
  background: color-mix(in srgb, var(--country-accent, var(--gold)) 10%, transparent);
  border-color: var(--country-accent, var(--gold));
}

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 20, 40, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 900;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  padding: 1.5rem;
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}
.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  max-width: 640px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 2rem;
  position: relative;
  transform: translateY(16px);
  transition: transform 0.22s ease;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}
.modal-overlay.active .modal { transform: translateY(0); }
.modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 2rem;
  height: 2rem;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition), border-color var(--transition);
}
.modal__close:hover { color: var(--navy); border-color: var(--navy); }
.modal__badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--country-accent, var(--navy));
  margin-bottom: 0.5rem;
}
.modal__title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.3;
  margin: 0 2rem 1rem 0;
}
.modal__full {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.75;
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.modal__field {
  line-height: 1.65;
}
.modal__field strong {
  color: var(--navy);
}
.modal__links {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
}
.modal__links a {
  font-size: 0.82rem;
  color: var(--country-accent, var(--navy));
  word-break: break-all;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  transition: opacity var(--transition);
  width: fit-content;
}
.modal__links a:hover { opacity: 0.7; }
.modal__bookconn {
  font-size: 0.85rem;
  color: var(--text);
  background: color-mix(in srgb, var(--country-accent, var(--gold)) 8%, var(--bg));
  border-left: 3px solid var(--country-accent, var(--gold));
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 0.6rem 0.875rem;
  line-height: 1.6;
  display: block;
  margin-top: 0.25rem;
}
.modal__bookconn-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--country-accent, var(--gold));
  margin-bottom: 0.2rem;
  display: block;
}

/* ── Printable outline map link ── */
.outline-map-link {
  margin-bottom: 1rem;
}
.outline-map-link a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--country-accent, var(--navy));
  background: color-mix(in srgb, var(--country-accent, var(--navy)) 8%, var(--bg));
  border: 1px solid color-mix(in srgb, var(--country-accent, var(--navy)) 25%, transparent);
  border-radius: 6px;
  padding: 0.4rem 0.85rem;
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}
.outline-map-link a:hover {
  background: color-mix(in srgb, var(--country-accent, var(--navy)) 15%, var(--bg));
}

/* ── Print-and-Go row ── */
.print-and-go {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.6rem;
  font-size: 0.82rem;
  background: color-mix(in srgb, var(--country-accent, var(--navy)) 6%, var(--bg));
  border-left: 3px solid var(--country-accent, var(--navy));
  border-radius: 0 6px 6px 0;
  padding: 0.55rem 0.8rem;
  margin-bottom: 0.75rem;
}
.print-and-go__label {
  font-weight: 700;
  color: var(--navy);
  white-space: nowrap;
  margin-right: 0.2rem;
}
.print-and-go__sep {
  color: var(--text-muted);
  font-size: 0.75rem;
}
.print-and-go a {
  color: var(--country-accent, var(--navy));
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
.print-and-go span { color: var(--text-muted); }

/* ── Game grade-range badges ── */
.game-card__grades {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0.2rem 0 0.5rem;
}
.game-card__grades span {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: var(--navy);
  border-radius: 99px;
  padding: 0.12rem 0.55rem;
}
