@font-face {
  font-family: Thmanyah;
  src: url("../fonts/thmanyahsans-Regular.woff2") format("woff2");
  font-display: swap;
  font-weight: 400;
}
@font-face {
  font-family: Thmanyah;
  src: url("../fonts/thmanyahsans-Bold.woff2") format("woff2");
  font-display: swap;
  font-weight: 700;
}
@font-face {
  font-family: ThmanyahDisplay;
  src: url("../fonts/thmanyahserifdisplay-Black.woff2") format("woff2");
  font-display: swap;
  font-weight: 900;
}
:root {
  --bg: #17100f;
  --panel: #231817;
  --panel2: #30211f;
  --ink: #f2e9df;
  --muted: #b7a49a;
  --line: #e7c9b12a;
  --accent: #bd875f;
  --accent-ink: #160d0b;
  --axis: #8f3f45;
  --allies: #5f7880;
  --neutral: #5c514d;
  --occupied: #a0714f;
  --max: 1180px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #eee7df;
  --panel: #fffaf4;
  --panel2: #e3d6cb;
  --ink: #281b18;
  --muted: #6e5a51;
  --line: #3b241a28;
  --accent: #7a3f35;
  --accent-ink: #fff;
  --axis: #93464b;
  --allies: #607d87;
  --neutral: #b7aaa2;
  --occupied: #a46f4c;
  color-scheme: light;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Thmanyah, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.7;
  overflow-x: hidden;
  transition:
    background 0.25s,
    color 0.25s;
}
button,
input,
select {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
img {
  display: block;
  max-width: 100%;
}
.topbar {
  height: 58px;
  position: relative;
  z-index: 100;
  max-width: calc(var(--max) - 40px);
  margin: 14px auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 30px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  background: none;
  border: 0;
  white-space: nowrap;
}
.brand b {
  font-size: 12px;
}
.logo {
  min-width: 38px;
  height: 28px;
  padding: 0 5px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  display: grid;
  place-items: center;
  direction: ltr;
  font-family: Arial, sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: -0.4px;
  background: var(--panel2);
  box-shadow: inset 0 -2px 0 #9e4d45;
}
.topbar nav {
  display: flex;
  gap: 2px;
}
.topbar nav button {
  background: none;
  border: 0;
  padding: 7px 6px;
  border-radius: 20px;
  color: var(--muted);
  font-size: 10px;
}
.topbar nav button.active,
.topbar nav button:hover {
  background: var(--panel2);
  color: var(--ink);
}
.head-actions {
  display: flex;
  gap: 4px;
}
.head-actions > button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 50%;
  display: grid;
  place-content: center;
}
.hamb {
  display: none !important;
}
.mobile-nav {
  position: fixed;
  z-index: 300;
  inset: 0;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
  transform: translateY(-110%);
  transition: 0.35s;
}
.mobile-nav.open {
  transform: none;
}
.mobile-nav > button:not(.close) {
  font-family: ThmanyahDisplay;
  font-size: 27px;
  background: none;
  border: 0;
}
.mobile-nav .close {
  position: absolute;
  top: 20px;
  left: 20px;
  padding: 8px 14px;
  background: none;
  border: 1px solid var(--line);
  border-radius: 25px;
}
.overline {
  margin: 0 0 9px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.06em;
}
.outline {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  padding: 9px 15px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
}
.outline:hover {
  border-color: var(--accent);
}
.hero {
  max-width: var(--max);
  min-height: 500px;
  margin: 0 auto;
  padding: 28px 24px 34px;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 38px;
  align-items: center;
}
.hero-photo {
  height: 360px;
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: var(--panel);
}
.hero-photo:after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, #120b0a35, transparent 52%),
    linear-gradient(90deg, #120b0a0e, #120b0a20);
}
.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  filter: grayscale(.9) sepia(.12) brightness(.88) contrast(1.04);
}
.hero-photo span {
  position: absolute;
  z-index: 2;
  bottom: 14px;
  right: 15px;
  color: #e9ece9;
  font-size: 9px;
}
.hero-content {
  max-width: 620px;
}
.hero h1,
.page-title h1,
.detail-hero h1 {
  font-family: ThmanyahDisplay;
  line-height: 0.95;
  letter-spacing: -0.01em;
  margin: 0;
}
.hero h1 {
  font-size: clamp(40px, 5vw, 67px);
  white-space: nowrap;
}
.hero-years {
  font-family: ThmanyahDisplay;
  color: var(--muted);
  font-size: 26px;
  margin: 8px 0 16px;
  direction: ltr;
  text-align: right;
}
.hero-content > p {
  max-width: 510px;
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 20px;
}
.war-numbers,
.panel,
.map-entry,
.entry-grid {
  max-width: var(--max);
  margin: 14px auto;
}
.war-numbers {
  padding: 28px 24px;
}
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}
.section-head p {
  font-size: 9px;
  color: var(--muted);
  margin: 0;
}
.section-head h2,
.journey-entry h2,
.map-entry h2 {
  font-family: ThmanyahDisplay;
  font-size: clamp(28px, 3.2vw, 41px);
  line-height: 1;
  margin: 0;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin-top: 17px;
}
.metrics article {
  min-height: 88px;
  padding: 15px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 13px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.metrics b {
  font-family: ThmanyahDisplay;
  font-size: 23px;
  line-height: 1;
}
.metrics span {
  font-size: 10px;
  color: var(--muted);
}
.panel {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  padding: 28px;
}
.war-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  padding: 18px 24px;
}
.war-stats > div {
  min-height: 88px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel2);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.war-stats b {
  font-family: ThmanyahDisplay;
  font-size: 24px;
  line-height: 1.1;
}
.war-stats span {
  color: var(--muted);
  font-size: 10px;
}
.journey-entry {
  display: grid;
  grid-template-columns: 0.58fr 1.42fr;
  gap: 32px;
}
.journey-entry > div:first-child > p:not(.overline),
.map-entry > div > p {
  color: var(--muted);
  max-width: 430px;
  font-size: 12px;
}
.mini-years {
  display: flex;
  overflow-x: auto;
  gap: 6px;
  padding-bottom: 5px;
}
.mini-years button {
  min-width: 95px;
  height: 100px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--panel2);
  padding: 11px;
  text-align: right;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.mini-years b {
  font-size: 15px;
}
.mini-years span {
  font-size: 9px;
  color: var(--muted);
}
.map-entry {
  padding: 26px 24px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 35px;
  align-items: center;
}
.home-map {
  height: 240px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #1a1110;
  cursor: pointer;
}
.home-map svg {
  width: 100%;
  height: 100%;
}
.home-map path {
  stroke: #150e0d;
  stroke-width: 0.7;
}
.home-map .axis-control {
  fill: var(--axis);
}
.home-map .allies-control {
  fill: var(--allies);
}
.home-map .occupied-control {
  fill: var(--occupied);
}
.home-map .neutral {
  fill: var(--neutral);
}
.map-year {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 14px;
  font-family: ThmanyahDisplay;
  font-size: 31px;
  color: #fff;
}
.entry-grid {
  padding: 0 24px 50px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.visual-entry {
  height: 220px;
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: var(--panel);
  cursor: pointer;
}
.visual-entry img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(.92) sepia(.1) brightness(.72) contrast(1.03);
}
.visual-entry:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #0d0807e8, transparent 75%);
}
.visual-entry > div {
  position: absolute;
  z-index: 2;
  right: 18px;
  bottom: 17px;
  color: #f1f3f1;
}
.visual-entry h2 {
  font-family: ThmanyahDisplay;
  font-size: 29px;
  margin: 0 0 4px;
}
.visual-entry button {
  background: none;
  border: 0;
  border-bottom: 1px solid currentColor;
  padding: 2px 0;
  font-size: 10px;
}
.page {
  min-height: 85vh;
}
.page-title {
  max-width: var(--max);
  margin: 0 auto;
  padding: 58px 24px 34px;
}
.page-title h1 {
  font-size: clamp(42px, 6vw, 72px);
  margin-bottom: 18px;
}
.page-title > p:last-child {
  color: var(--muted);
  max-width: 650px;
  font-size: 12px;
}
.journey-tabs {
  max-width: var(--max);
  margin: 0 auto 12px;
  padding: 6px 24px;
  display: flex;
  overflow-x: auto;
  gap: 5px;
}
.journey-tabs button {
  min-width: 104px;
  height: 82px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--panel);
  color: var(--muted);
}
.journey-tabs button.active {
  background: var(--panel2);
  color: var(--ink);
  border-color: var(--accent);
}
.journey-tabs small {
  font-size: 8px;
}
.journey-tabs b {
  font-size: 14px;
}
.journey-tabs span {
  font-size: 8px;
}
.stage-detail,
.story-stage {
  max-width: calc(var(--max) - 48px);
  margin: 0 auto 70px;
  position: relative;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  padding: 34px;
  overflow: hidden;
}
.big-year {
  position: absolute;
  top: 8px;
  left: 24px;
  font-family: ThmanyahDisplay;
  font-size: clamp(58px, 8vw, 96px);
  color: var(--line);
  line-height: 1;
  white-space: nowrap;
}
.stage-detail h2,
.story-stage h2 {
  font-family: ThmanyahDisplay;
  font-size: 42px;
  line-height: 1;
  margin: 0 0 12px;
}
.stage-intro {
  max-width: 700px;
  color: var(--muted);
  font-size: 13px;
}
.summary-events {
  margin-top: 30px;
  max-width: 800px;
}
.stage-image {
  position: relative;
  width: min(800px, 100%);
  height: auto;
  aspect-ratio: 16 / 9;
  margin: 26px 0 30px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #120b0a;
}
.stage-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: grayscale(.9) sepia(.08) brightness(.78) contrast(1.04);
}
.stage-image::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(0deg, #070a09d9, transparent 55%);
}
.stage-image figcaption {
  position: absolute;
  z-index: 2;
  right: 16px;
  bottom: 13px;
  color: #f1f3ef;
  font-size: 9px;
}
.summary-events article {
  display: grid;
  grid-template-columns: 120px 12px 1fr;
  gap: 13px;
  min-height: 95px;
}
.summary-events time {
  font-size: 9px;
  color: var(--muted);
  padding-top: 4px;
}
.summary-events i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 7px;
  position: relative;
}
.summary-events i:after {
  content: "";
  position: absolute;
  top: 10px;
  right: 3px;
  width: 1px;
  height: 78px;
  background: var(--line);
}
.summary-events article:last-child i:after {
  display: none;
}
.summary-events h3 {
  font-size: 14px;
  margin: 0 0 3px;
}
.summary-events p {
  font-size: 11px;
  color: var(--muted);
  margin: 0;
}
.journey-deep {
  margin-top: 15px;
}
.story-stage > header {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 25px;
  align-items: start;
  margin-bottom: 28px;
}
.story-stage > header > span {
  font-family: ThmanyahDisplay;
  font-size: clamp(54px, 7vw, 86px);
  line-height: 0.8;
  color: var(--line);
  white-space: nowrap;
}
.story-stage > header p:last-child {
  max-width: 700px;
  color: var(--muted);
  font-size: 12px;
}
.accordions {
  display: grid;
  gap: 7px;
}
.accordions article {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  overflow: hidden;
}
.accordions article > button {
  width: 100%;
  min-height: 66px;
  border: 0;
  background: none;
  display: grid;
  grid-template-columns: 130px 1fr 30px;
  gap: 14px;
  align-items: center;
  text-align: right;
  padding: 12px 16px;
}
.accordions time {
  font-size: 9px;
  color: var(--muted);
}
.accordions strong {
  font-size: 14px;
}
.accordions i {
  font-style: normal;
  font-size: 20px;
  text-align: left;
}
.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s;
}
.accordions article.open .accordion-body {
  max-height: 500px;
}
.accordion-body p {
  max-width: 760px;
  margin: 0;
  padding: 0 160px 12px 46px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.9;
}
.always-open .accordion-body p:first-child {
  padding-top: 16px;
}
.stage-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 15px;
  margin-top: 22px;
}
.stage-nav button {
  background: none;
  border: 0;
  font-size: 10px;
}
.stage-nav button:disabled {
  opacity: 0.25;
}
.stage-nav span {
  font-size: 9px;
  color: var(--muted);
}
.map-shell {
  max-width: var(--max);
  margin: 0 auto 80px;
  padding: 0 24px;
}
.map-toolbar {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 15px 15px 0 0;
  background: var(--panel);
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.mode-tabs,
.map-zoom {
  display: flex;
  gap: 4px;
}
.mode-tabs button,
.map-zoom button {
  border: 0;
  background: transparent;
  border-radius: 9px;
  padding: 7px 11px;
  font-size: 10px;
  color: var(--muted);
}
.mode-tabs button.active,
.map-zoom button:hover {
  background: var(--panel2);
  color: var(--ink);
}
.map-zoom button {
  font-size: 18px;
  width: 35px;
}
.year-control {
  display: grid;
  grid-template-columns: 36px minmax(150px, 270px) 58px;
  gap: 9px;
  align-items: center;
  direction: ltr;
}
.year-control button {
  width: 35px;
  height: 35px;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
}
.year-control input {
  accent-color: var(--accent);
  width: 100%;
}
.year-control output {
  font-family: ThmanyahDisplay;
  font-size: 21px;
}
.map-canvas {
  height: 570px;
  position: relative;
  background: #17100f;
  overflow: hidden;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 18px 18px;
  touch-action: none;
  cursor: grab;
}
.map-canvas:before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(#fff07 1px, transparent 1px),
    linear-gradient(90deg, #fff07 1px, transparent 1px);
  background-size: 38px 38px;
}
.map-canvas svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.map-canvas g {
  transition: transform 0.12s;
}
.map-canvas path {
  stroke: #120b0a;
  stroke-width: 0.22;
  vector-effect: non-scaling-stroke;
  transition: fill 0.3s;
}
.map-canvas path:hover {
  stroke: #fff;
  stroke-width: 1;
}
.map-canvas .axis-control {
  fill: var(--axis);
}
.map-canvas .allies-control {
  fill: var(--allies);
}
.map-canvas .occupied-control {
  fill: var(--occupied);
}
.map-canvas .neutral {
  fill: var(--neutral);
  pointer-events: none;
}
.map-canvas text {
  fill: #f1f3f1;
  font-family: Thmanyah;
  font-size: 7px;
  text-anchor: middle;
  paint-order: stroke;
  stroke: #101412;
  stroke-width: 2px;
  pointer-events: none;
}
.map-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
}
.snapshot {
  position: absolute;
  top: 13px;
  right: 14px;
  color: #e7ebe8;
  font-size: 9px;
}
.map-legend {
  position: absolute;
  right: 13px;
  bottom: 13px;
  z-index: 3;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  padding: 8px 10px;
  background: #111715e8;
  border: 1px solid #ffffff1b;
  border-radius: 10px;
  color: #d2d7d3;
  font-size: 8px;
}
.map-legend span:before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--neutral);
  margin-left: 5px;
}
.map-legend .axis-control:before {
  background: var(--axis);
}
.map-legend .allies-control:before {
  background: var(--allies);
}
.map-legend .occupied-control:before {
  background: var(--occupied);
}
.map-legend .map-zoom {
  direction: ltr;
  margin-inline-start: 3px;
}
.map-legend .map-zoom button {
  width: 28px;
  height: 28px;
  padding: 0;
  color: #f1f3f1;
  border: 1px solid #ffffff24;
  background: #ffffff0a;
}
.map-legend .map-zoom button:hover {
  color: #fff;
  background: #ffffff16;
}
.map-legend .map-zoom input {
  width: 92px;
}
.country-card {
  position: absolute;
  z-index: 4;
  top: 13px;
  left: 13px;
  width: 235px;
  padding: 17px;
  background: #eef1ed;
  color: #151918;
  border-radius: 12px;
  box-shadow: 0 18px 50px #0006;
  cursor: auto;
}
.country-card button {
  float: left;
  background: none;
  border: 0;
  font-size: 20px;
}
.country-card small {
  color: #69716c;
  font-size: 8px;
}
.country-card h3 {
  font-family: ThmanyahDisplay;
  font-size: 27px;
  margin: 5px 0;
}
.country-card p {
  font-size: 10px;
  line-height: 1.8;
}
.filters {
  max-width: var(--max);
  margin: 0 auto 18px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 8px;
}
.filters input,
.filters select {
  height: 43px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  padding: 0 13px;
  font-size: 11px;
}
.item-grid {
  max-width: var(--max);
  margin: 0 auto 80px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.item-card {
  min-height: 320px;
  position: relative;
  padding: 0 18px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.card-image {
  width: calc(100% + 36px);
  height: 132px;
  margin: 0 -18px 14px;
  object-fit: cover;
  object-position: top;
  filter: grayscale(.9) sepia(.08) brightness(.78);
}
.bookmark {
  position: absolute;
  left: 12px;
  top: 12px;
  width: 33px;
  height: 33px;
  border: 1px solid #ffffff38;
  border-radius: 50%;
  background: #1118;
  display: grid;
  place-content: center;
  color: #fff;
}
.bookmark svg {
  width: 15px;
}
.bookmark.saved {
  background: var(--accent);
  color: var(--accent-ink);
}
.item-card > small {
  color: var(--muted);
  font-size: 8px;
}
.item-card h2 {
  font-family: ThmanyahDisplay;
  font-size: 25px;
  line-height: 1.05;
  margin: 5px 0 8px;
}
.item-card p {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.75;
}
.card-open {
  align-self: flex-start;
  margin-top: auto;
  padding: 5px 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: none;
  font-size: 10px;
}
.country-grid {
  max-width: var(--max);
  margin: 0 auto 80px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.country-item {
  position: relative;
  min-height: 260px;
  display: grid;
  grid-template-columns: 150px 1fr;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  overflow: hidden;
}
.country-bookmark {
  position: absolute;
  z-index: 3;
  top: 12px;
  left: 12px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid #ffffff35;
  border-radius: 50%;
  background: #111715cc;
  color: #fff;
  backdrop-filter: blur(7px);
}
.country-bookmark.saved {
  background: var(--accent);
  color: var(--accent-ink);
}
.country-bookmark svg {
  width: 16px;
}
.country-item > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(.9) sepia(.08) brightness(.76);
}
.country-copy {
  padding: 18px;
  display: flex;
  flex-direction: column;
}
.country-copy > small {
  font-size: 8px;
  color: var(--muted);
}
.country-copy h2 {
  font-family: ThmanyahDisplay;
  font-size: 27px;
  margin: 4px 0;
}
.country-copy > p {
  font-size: 10px;
  color: var(--muted);
  margin: 0 0 12px;
}
.country-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: auto;
}
.country-facts span {
  min-height: 53px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.country-facts small {
  display: block;
  color: var(--muted);
  font-size: 7px;
}
.country-facts b {
  font-size: 9px;
}
.country-copy > button {
  align-self: flex-start;
  margin-top: 10px;
  border: 0;
  border-bottom: 1px solid;
  background: none;
  padding: 3px 0;
  font-size: 9px;
}
.empty {
  max-width: var(--max);
  margin: 15px auto 80px;
  padding: 70px 20px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 17px;
}
.empty h2 {
  font-family: ThmanyahDisplay;
  font-size: 30px;
}
.empty p {
  color: var(--muted);
}
.back {
  margin: 34px max(24px, calc((100vw - var(--max)) / 2 + 24px)) 10px;
  display: flex;
  gap: 7px;
  background: none;
  border: 0;
}
.detail-hero {
  max-width: var(--max);
  min-height: 360px;
  margin: 0 auto;
  padding: 20px 24px 40px;
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 38px;
  align-items: center;
}
.detail-hero img {
  width: 100%;
  height: 310px;
  object-fit: cover;
  object-position: top;
  border-radius: 14px;
  filter: grayscale(.88) sepia(.08) brightness(.82);
}
.detail-hero h1 {
  font-size: clamp(42px, 6vw, 72px);
  margin-bottom: 16px;
}
.detail-hero > div > p:not(.overline) {
  max-width: 650px;
  color: var(--muted);
  font-size: 12px;
}
.detail-actions {
  display: flex;
  gap: 7px;
  margin-top: 16px;
}
.detail-actions button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: 10px;
}
.fact-strip {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px 38px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.fact-strip div {
  min-height: 82px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--panel);
  padding: 13px;
}
.fact-strip span {
  display: block;
  color: var(--muted);
  font-size: 8px;
  margin-bottom: 6px;
}
.fact-strip b {
  font-size: 11px;
}
.detail-text {
  max-width: 740px;
  margin: 0 auto 90px;
  padding: 0 24px;
}
.detail-text h2 {
  font-family: ThmanyahDisplay;
  font-size: 31px;
  margin: 0 0 18px;
}
.detail-text p {
  color: var(--muted);
  font-size: 12px;
  line-height: 2;
  margin: 0 0 16px;
}
.search-layer {
  position: fixed;
  z-index: 500;
  inset: 0;
  background: #120b0ad8;
  backdrop-filter: blur(12px);
  display: grid;
  place-items: start center;
  padding: 8vh 18px;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s;
}
.search-layer.open {
  opacity: 1;
  pointer-events: auto;
}
.search-box {
  width: min(720px, 100%);
  max-height: 82vh;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 23px;
  overflow: auto;
}
.search-close {
  float: left;
  background: none;
  border: 0;
}
.search-box label {
  display: block;
  font-family: ThmanyahDisplay;
  font-size: 27px;
  margin: 17px 0 11px;
}
.search-box input {
  width: 100%;
  height: 50px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 14px;
}
.search-results {
  margin-top: 10px;
}
.search-results > button {
  width: 100%;
  display: grid;
  grid-template-columns: 62px 1fr auto;
  gap: 10px;
  text-align: right;
  padding: 11px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
}
.search-results span,
.search-results small {
  font-size: 8px;
  color: var(--muted);
}
.not-found {
  text-align: center;
  padding: 120px 20px;
}
.not-found > b {
  font-family: ThmanyahDisplay;
  font-size: 110px;
  color: var(--line);
}
.not-found h1 {
  font-family: ThmanyahDisplay;
  font-size: 38px;
}
@media (max-width: 1000px) {
  .topbar {
    margin-inline: 12px;
  }
  .topbar nav {
    display: none;
  }
  .hamb {
    display: grid !important;
  }
  .hero {
    grid-template-columns: 1fr 1fr;
    gap: 25px;
  }
  .hero h1 {
    font-size: 48px;
  }
  .journey-entry {
    grid-template-columns: 1fr;
  }
  .item-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .country-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 700px) {
  .war-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 12px;
    gap: 7px;
  }
  .war-stats > div { min-height: 78px; padding: 11px; }
  .war-stats b { font-size: 21px; }

  body {
    font-size: 13px;
  }
  .topbar {
    height: 54px;
    margin: 8px 8px 0;
    padding: 0 9px;
  }
  .head-actions > button {
    width: 32px;
    height: 32px;
  }
  .brand b {
    font-size: 10px;
  }
  .hero {
    min-height: auto;
    display: flex;
    flex-direction: column;
    padding: 18px 12px 25px;
    gap: 17px;
  }
  .hero-photo {
    order: 1;
    width: 100%;
    height: 280px;
  }
  .hero-content {
    order: 2;
    width: 100%;
  }
  .hero h1 {
    font-size: clamp(34px, 10.2vw, 48px);
    white-space: nowrap;
  }
  .hero-years {
    font-size: 21px;
    margin: 5px 0 10px;
  }
  .hero-content > p {
    font-size: 12px;
  }
  .outline {
    width: 100%;
    min-height: 43px;
  }
  .war-numbers {
    padding: 22px 12px;
  }
  .section-head {
    display: block;
  }
  .section-head h2 {
    margin-top: 4px;
  }
  .metrics {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .metrics article {
    min-height: 72px;
  }
  .metrics b {
    font-size: 20px;
  }
  .panel {
    margin: 8px;
    padding: 20px 14px;
  }
  .mini-years button {
    min-width: 86px;
    height: 88px;
  }
  .map-entry {
    display: flex;
    flex-direction: column;
    padding: 20px 12px;
    gap: 18px;
  }
  .home-map {
    width: 100%;
    height: 220px;
  }
  .map-entry > div:last-child {
    width: 100%;
  }
  .entry-grid {
    grid-template-columns: 1fr;
    padding: 0 8px 35px;
    gap: 7px;
  }
  .visual-entry {
    height: 190px;
  }
  .page-title {
    padding: 42px 13px 25px;
  }
  .page-title h1 {
    font-size: 42px;
  }
  .journey-tabs {
    padding: 5px 8px;
  }
  .journey-tabs button {
    min-width: 92px;
    height: 74px;
  }
  .stage-detail,
  .story-stage {
    margin: 0 8px 50px;
    padding: 25px 15px;
  }
  .big-year {
    position: static;
    display: block;
    font-size: 58px;
    margin-bottom: 7px;
  }
  .stage-detail h2,
  .story-stage h2 {
    font-size: 35px;
  }
  .summary-events article {
    grid-template-columns: 80px 10px 1fr;
    gap: 8px;
    min-height: 105px;
  }
  .summary-events time {
    font-size: 8px;
  }
  .summary-events i:after {
    height: 88px;
  }
  .story-stage > header {
    display: block;
  }
  .story-stage > header > span {
    display: block;
    font-size: 55px;
    margin-bottom: 15px;
  }
  .accordions article > button {
    grid-template-columns: 82px 1fr 24px;
    gap: 8px;
    padding: 10px;
  }
  .accordions time {
    font-size: 8px;
  }
  .accordions strong {
    font-size: 12px;
  }
  .accordion-body p {
    padding: 0 12px 11px;
    font-size: 11px;
  }
  .stage-nav button {
    font-size: 8px;
  }
  .map-shell {
    padding: 0 8px;
  }
  .map-toolbar {
    display: grid;
    grid-template-columns: 1fr auto;
  }
  .year-control {
    grid-column: 1/-1;
    grid-template-columns: 35px 1fr 52px;
  }
  .map-canvas {
    height: 62svh;
    min-height: 470px;
  }
  .map-legend {
    right: 7px;
    left: 7px;
    bottom: 7px;
    flex-wrap: wrap;
  }
  .country-card {
    top: 8px;
    left: 8px;
    right: 8px;
    width: auto;
  }
  .snapshot {
    top: 9px;
    right: 10px;
  }
  .filters {
    padding: 0 8px;
    grid-template-columns: 1fr;
  }
  .item-grid {
    padding: 0 8px;
    grid-template-columns: 1fr;
  }
  .item-card {
    min-height: 290px;
  }
  .card-image {
    height: 145px;
  }
  .country-grid {
    padding: 0 8px;
  }
  .country-item {
    grid-template-columns: 105px 1fr;
    min-height: 245px;
  }
  .country-copy {
    padding: 13px;
  }
  .country-facts {
    grid-template-columns: 1fr 1fr;
  }
  .detail-hero {
    display: block;
    padding: 15px 12px 30px;
  }
  .detail-hero img {
    height: 300px;
    margin-bottom: 20px;
  }
  .fact-strip {
    padding: 0 8px 30px;
    grid-template-columns: 1fr 1fr;
  }
  .detail-text {
    margin-bottom: 65px;
    padding: 0 13px;
  }
  .search-layer {
    padding: 12px 8px;
  }
  .search-box {
    padding: 17px;
  }
  .search-results > button {
    grid-template-columns: 48px 1fr;
  }
  .search-results small {
    display: none;
  }
}
@media (max-width: 380px) {
  .head-actions > button:first-child {
    display: none;
  }
  .hero h1 {
    font-size: 33px;
  }
  .brand b {
    font-size: 9px;
  }
  .country-item {
    grid-template-columns: 90px 1fr;
  }
  .fact-strip {
    grid-template-columns: 1fr;
  }
  .summary-events article {
    grid-template-columns: 67px 9px 1fr;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

/* الإصدار المنقح */
.font-tools {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}
.font-tools button {
  width: 31px;
  height: 32px;
  border: 0;
  background: transparent;
  font-size: 10px;
}
.font-tools button + button {
  border-right: 1px solid var(--line);
}
.font-tools button:disabled {
  opacity: 0.3;
}
.hero-years {
  margin-top: 14px;
  margin-bottom: 18px;
  unicode-bidi: isolate;
}
.hero-summary p {
  margin: 0 0 9px !important;
}
.hero-content > .outline {
  margin-top: 9px;
}
.hero-photo img {
  object-position: center 12%;
  filter: grayscale(.88) sepia(.1) brightness(.9) contrast(1.04);
}
.journey-entry {
  margin-top: 8px;
}
.entry-grid {
  grid-template-columns: repeat(4, 1fr);
}
.home-map-legend {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 3;
  display: flex;
  gap: 7px;
  padding: 7px 9px;
  border: 1px solid #ffffff20;
  border-radius: 9px;
  background: #1b1211e8;
  color: #fff;
  font-size: 8px;
}
.home-map-legend span:before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  margin-left: 4px;
  background: var(--neutral);
}
.home-map-legend .axis-control:before {
  background: var(--axis);
}
.home-map-legend .allies-control:before {
  background: var(--allies);
}
.home-map-legend .occupied-control:before {
  background: var(--occupied);
}
.alliances {
  margin-top: 18px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--panel);
  max-width: 700px;
}
.alliances p {
  margin: 2px 0 !important;
  color: var(--muted) !important;
  font-size: 10px !important;
}
.alliances b {
  color: var(--ink);
}
.journey-summary-switch {
  margin-top: 12px;
  max-width: 100%;
  white-space: normal;
  line-height: 1.7;
}
.journey-tabs {
  overflow-x: auto;
  overflow-y: hidden;
  touch-action: pan-x;
  overscroll-behavior-inline: contain;
  align-items: stretch;
}
.journey-tabs button {
  flex: 0 0 auto;
  touch-action: manipulation;
}
.journey-progress {
  position: relative;
  z-index: 2;
  margin-bottom: 28px;
}
.journey-progress > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 9px;
}
.journey-progress b {
  font-weight: 400;
}
.journey-progress > i {
  display: block;
  width: 100%;
  height: 3px;
  border-radius: 4px;
  background: var(--line);
  overflow: hidden;
}
.journey-progress > i > span {
  display: block;
  height: 100%;
  background: var(--accent);
  transition: width 0.35s;
}
.summary-stage .big-year {
  top: 58px;
}
.story-bridge {
  margin-top: 4px !important;
  padding-top: 10px !important;
  border-top: 1px solid var(--line);
  color: var(--ink) !important;
}
.map-toolbar {
  display: grid;
  grid-template-columns: auto auto minmax(320px, 0.9fr);
  justify-content: space-between;
  align-items: center;
}
.map-name {
  font-size: 10px;
  white-space: nowrap;
}
.map-zoom {
  align-items: center;
}
.map-zoom input {
  width: 105px;
  accent-color: var(--accent);
}
.map-share {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: transparent;
  font-size: 9px;
  white-space: nowrap;
}
.map-share svg {
  width: 15px;
}
.map-canvas text {
  font-weight: 700;
  letter-spacing: 0;
  paint-order: stroke;
  stroke: #140d0c;
  fill: #fff;
  pointer-events: none;
}
.map-canvas path {
  stroke-width: 0.18;
}
.map-canvas {
  cursor: grab;
}
.map-canvas:active {
  cursor: grabbing;
}
.card-image {
  width: calc(100% + 36px);
  min-width: calc(100% + 36px);
  max-width: none;
  height: 185px;
  flex: 0 0 auto;
  align-self: center;
  display: block;
  object-fit: cover;
  object-position: center;
  margin: 0 -18px 14px;
  margin-inline: -18px;
}
.item-card.people .card-image {
  object-position: center 12%;
}
.item-card {
  min-height: 370px;
}
.item-card .bookmark {
  position: static;
  width: 34px;
  height: 34px;
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.item-card .bookmark.saved {
  background: var(--accent);
  color: var(--accent-ink);
}
.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 13px;
}
.card-open {
  margin-top: 0;
}
.card-date {
  display: block;
  color: var(--ink);
  font-size: 9px;
  margin: 0 0 7px;
}
.country-filter {
  grid-template-columns: 1fr 300px;
  align-items: center;
}
.country-filter > span {
  font-size: 10px;
  color: var(--muted);
}
.country-item > img {
  object-position: center 12%;
}
.detail-hero.portrait img {
  object-position: center 10%;
}
.fact-strip.four {
  grid-template-columns: repeat(4, 1fr);
}
.content-nav {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 45px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.content-nav button {
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
  font-size: 10px;
}
.content-nav button:disabled {
  opacity: 0.3;
}
html[data-font="small"]
  :where(
    p,
    small,
    time,
    button,
    input,
    select,
    dd,
    dt,
    .hero-years,
    .card-date
  ) {
  font-size: calc(1em - 1px) !important;
}
html[data-font="large"]
  :where(
    p,
    small,
    time,
    button,
    input,
    select,
    dd,
    dt,
    .hero-years,
    .card-date
  ) {
  font-size: calc(1em + 2px) !important;
}
@media (max-width: 1000px) {
  .entry-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .map-toolbar {
    grid-template-columns: auto auto;
  }
  .year-control {
    grid-column: 1/-1;
  }
  .map-share {
    justify-self: end;
  }
}
@media (max-width: 700px) {
  .font-tools {
    display: flex;
  }
  .font-tools button {
    width: 28px;
    height: 30px;
  }
  .head-actions {
    gap: 2px;
  }
  .head-actions > button {
    width: 31px;
    height: 31px;
  }
  .brand {
    gap: 5px;
  }
  .brand b {
    display: block;
    max-width: 96px;
    font-size: 10px;
    line-height: 1.2;
    white-space: normal;
  }
  .logo {
    min-width: 34px;
    height: 27px;
  }
  .stage-image {
    height: 205px;
    margin: 20px 0 24px;
  }
  .hero-years {
    margin-top: 11px;
    margin-bottom: 14px;
  }
  .hero-summary p {
    font-size: 11px !important;
  }
  .entry-grid {
    grid-template-columns: 1fr;
  }
  .visual-entry {
    height: 180px;
  }
  .journey-progress {
    margin-bottom: 22px;
  }
  .summary-stage .big-year {
    top: auto;
  }
  .map-toolbar {
    grid-template-columns: 1fr auto;
  }
  .map-name {
    display: none;
  }
  .map-zoom input {
    width: 78px;
  }
  .map-share {
    grid-column: 1/-1;
    justify-self: stretch;
    justify-content: center;
  }
  .year-control {
    grid-column: 1/-1;
  }
  .map-canvas text {
    font-weight: 700;
  }
  .item-card {
    min-height: 360px;
  }
  .card-image {
    height: 205px;
  }
  .country-filter {
    grid-template-columns: 1fr;
  }
  .country-filter > span {
    display: none;
  }
  .fact-strip.four {
    grid-template-columns: 1fr 1fr;
  }
  .content-nav button {
    flex: 1;
    padding-inline: 7px;
  }
  .detail-hero.portrait img {
    object-position: center 8%;
  }
}
@media (max-width: 380px) {
  .fact-strip.four {
    grid-template-columns: 1fr;
  }
  .map-zoom input {
    width: 70px;
  }
}
.journey-tabs b,
.mini-years b {
  white-space: nowrap;
  font-size: 12px;
}
.always-open {
  gap: 10px;
}
.always-open .accordion-body {
  max-height: none;
  overflow: visible;
  padding: 6px 0 8px;
}
.event-heading {
  min-height: 64px;
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  direction: ltr;
}
.event-heading time {
  font-size: 9px;
  color: var(--muted);
  direction: ltr;
  unicode-bidi: isolate;
  text-align: left;
  white-space: nowrap;
}
.event-heading strong {
  font-size: 14px;
  direction: rtl;
  text-align: right;
}
.always-open article {
  background: var(--bg);
}
@media (max-width: 700px) {
  .journey-tabs b,
  .mini-years b {
    font-size: 11px;
  }
  .event-heading {
    grid-template-columns: 82px 1fr;
    gap: 8px;
    padding: 10px;
  }
  .event-heading time {
    font-size: 8px;
  }
  .event-heading strong {
    font-size: 12px;
  }
}

@media (min-width: 701px) {
  .stage-image img {
    object-fit: cover;
  }
  .story-stage > header {
    direction: ltr;
  }
  .story-stage > header > span {
    justify-self: start;
    text-align: left;
    direction: ltr;
  }
  .story-stage > header > div {
    direction: rtl;
  }
}

@media (max-width: 700px) {
  .page-title h1 {
    font-size: 48px;
  }
  .stage-detail h2,
  .story-stage h2 {
    font-size: 42px;
    line-height: 1.08;
  }
  .stage-image {
    height: auto;
    aspect-ratio: 16 / 9;
  }
  .stage-image img {
    height: 100%;
    object-fit: cover;
  }
}
/* Educational additions retain the existing card and typography system. */
.map-disclaimer,
.method-note {
  max-width: 1100px;
  margin: 0 auto 24px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  background: var(--surface);
  line-height: 1.8;
}
.educational-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.educational-grid .panel {
  padding: 24px;
  overflow: hidden;
}
.section-card-image {
  display: block;
  width: calc(100% + 48px);
  height: 190px;
  margin: -24px -24px 20px;
  object-fit: cover;
}
.learning-check {
  margin-top: 24px;
  padding: 24px;
  line-height: 1.9;
}
.educational-grid h2 {
  margin-top: 0;
}
.educational-grid p {
  line-height: 1.9;
}
.review-strip {
  margin-top: 28px;
  padding: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
}
.review-strip .outline {
  margin-inline-start: auto;
}
.site-footer {
  padding: 28px max(20px, 5vw);
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 20px;
}
.site-footer button {
  color: inherit;
  background: none;
  border: 0;
  text-decoration: underline;
  cursor: pointer;
}
.map-canvas path[role="button"]:focus {
  outline: none;
  stroke: #fff;
  stroke-width: 2.5px;
}
.map-text-alternative {
  max-width: 1100px;
  margin: 24px auto;
}
.map-text-alternative > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.map-text-alternative p {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  font-size: 11px;
}
.map-text-alternative span {
  opacity: .72;
}
.society-sections {
  display: grid;
  gap: 28px;
}
.society-section {
  padding: 0;
  overflow: hidden;
}
.society-image {
  width: 100%;
  height: 310px;
  object-fit: cover;
  object-position: center;
  filter: grayscale(.9) sepia(.1) brightness(.72) contrast(1.04);
  display: block;
}
.society-copy {
  padding: 28px;
}
.society-copy > h2 {
  margin-top: 0;
  font-size: clamp(26px, 4vw, 46px);
}
.society-intro {
  max-width: 850px;
  line-height: 1.9;
}
.society-items {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.society-items article {
  padding: 18px;
  border: 1px solid var(--line);
}
.society-items h3 {
  margin-top: 0;
}
.society-items p {
  margin-bottom: 0;
  line-height: 1.8;
}
@media (max-width: 700px) {
  .map-text-alternative p { padding: 8px 9px; font-size: 9px; gap: 7px; }

  .educational-grid {
    grid-template-columns: 1fr;
  }
  .review-strip .outline {
    margin-inline-start: 0;
  }
  .site-footer {
    flex-direction: column;
  }
  .map-text-alternative > div {
    grid-template-columns: 1fr;
    padding-inline: 14px;
  }
  .map-text-alternative p {
    padding: 9px 11px;
    font-size: 10px;
  }
  .society-image {
    height: auto;
    aspect-ratio: 16 / 9;
  }
  .society-copy {
    padding: 20px;
  }
  .society-items {
    grid-template-columns: 1fr;
  }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* 2026-07 refinements: broader imagery, richer country cards, clearer map listing */
.hero-photo img {
  object-position: center 36%;
  filter: grayscale(1) brightness(.76) contrast(1.06);
}
.card-image {
  height: 220px;
}
.item-card p,
.country-copy > p,
.detail-text p {
  line-height: 1.95;
}
.country-item {
  grid-template-columns: 220px 1fr;
  min-height: 300px;
}
.country-copy {
  justify-content: flex-start;
  gap: 8px;
}
.country-copy h2 {
  line-height: 1.28;
}
.country-facts {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.country-facts span:last-child {
  grid-column: 1 / -1;
}
.detail-hero.portrait {
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
}
.map-text-alternative {
  max-width: 1100px;
  margin: 24px auto;
}
.map-text-alternative > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.map-text-alternative p {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  font-size: 11px;
}
.map-text-alternative span {
  opacity: .72;
}

@media (max-width: 1000px) {
  .country-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .hero-photo {
    min-height: 270px;
  }
  .card-image {
    height: 235px;
  }
  .country-item {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .country-item > img {
    height: 235px;
  }
  .country-copy {
    padding: 15px 15px 18px;
  }
  .country-copy h2 {
    font-size: 29px;
  }
  .country-facts {
    grid-template-columns: 1fr 1fr;
  }
  .country-facts span:last-child {
    grid-column: 1 / -1;
  }
  .detail-hero.portrait img {
    height: 360px;
  }
  .map-toolbar {
    gap: 12px;
  }
  .map-text-alternative > div {
    grid-template-columns: 1fr;
    padding-inline: 14px;
  }
  .map-text-alternative p {
    padding: 9px 11px;
    font-size: 10px;
  }
}

/* 2026-07-25 follow-up fixes: restore WW2-like countries layout, better hero, quicker visible image rendering */
.hero-photo img {
  object-position: center 22%;
  filter: grayscale(1) brightness(.83) contrast(1.04);
}
.country-grid {
  max-width: var(--max);
  margin: 0 auto 80px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.country-item {
  position: relative;
  min-height: 260px;
  display: grid;
  grid-template-columns: 150px 1fr;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  overflow: hidden;
}
.country-item > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) brightness(.72);
}
.country-copy {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.country-copy > p {
  font-size: 10px;
  color: var(--muted);
  margin: 0 0 12px;
  line-height: 1.9;
}
.country-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 8px;
}
.country-facts span:last-child {
  grid-column: auto;
}
.map-text-alternative > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 700px) {
  .country-grid {
    padding: 0 8px;
  }
  .country-item {
    grid-template-columns: 105px 1fr;
    min-height: 245px;
  }
  .country-copy {
    padding: 13px;
  }
  .country-facts {
    grid-template-columns: 1fr 1fr;
  }
  .country-facts span:last-child {
    grid-column: 1 / -1;
  }
  .detail-hero.portrait img {
    height: 320px;
  }
  .map-text-alternative > div {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 380px) {
  .country-item {
    grid-template-columns: 90px 1fr;
  }
}
