:root {
  --bg: #06090d;
  --panel: #0b1016;
  --panel2: #0e151d;
  --line: #202b36;
  --muted: #71808d;
  --text: #edf1f3;
  --cyan: #79cfe3;
  --green: #73c69c;
  --amber: #d8aa62;
  --red: #d77777;
}
body {
  background: linear-gradient(180deg, #080c11 0, #05080b 100%);
  letter-spacing: 0;
}
.app {
  grid-template-columns: 188px 1fr;
  grid-template-rows: 62px 1fr 34px;
}
.app header {
  padding: 0 18px;
  background: #070b0f;
  border-color: #1d2730;
}
.brand.compact {
  width: 170px;
}
.brand.compact .brand-mark {
  border-radius: 4px;
  width: 32px;
  height: 32px;
  background: #0c151c;
}
.brand.compact h1 {
  font-size: calc(14px * var(--font-scale));
  letter-spacing: 0.13em;
}
.classification {
  font-size: calc(9px * var(--font-scale));
  letter-spacing: 0.18em;
  color: #566470;
  border-left: 1px solid var(--line);
  padding-left: 18px;
}
.topstate {
  font-variant-numeric: tabular-nums;
}
.topstate b {
  font-size: calc(14px * var(--font-scale));
  color: #e8edef;
}
.icon-button {
  border-radius: 3px;
  background: #0b1117;
  padding: 7px 10px;
}
.nav {
  padding: 18px 9px;
  background: #070b0f;
}
.nav-section {
  font-size: calc(8px * var(--font-scale));
  letter-spacing: 0.2em;
  color: #44515c;
  padding: 0 10px 13px;
}
.nav button {
  border-radius: 3px;
  padding: 10px 11px;
  margin-bottom: 2px;
  border-left: 2px solid transparent;
}
.nav button.active {
  background: #101820;
  color: #eaf5f7;
  border-left-color: var(--cyan);
}
.nav .glyph {
  width: 18px;
  text-align: center;
  color: #657887;
}
.nav button.active .glyph {
  color: var(--cyan);
}
.app main {
  padding: 0;
  overflow: auto;
}
.app footer {
  background: #070b0f;
  border-color: #1d2730;
  font-size: calc(9px * var(--font-scale));
  letter-spacing: 0.1em;
}
.app footer div {
  color: #67b58d;
}
.command-grid {
  min-height: calc(100vh - 96px);
  display: grid;
  grid-template-columns: 230px minmax(440px, 1fr) 310px;
  max-width: 1600px;
  margin: auto;
}
.state-rail,
.sovereign-panel {
  background: #080d12;
}
.state-rail {
  padding: 28px 22px;
  border-right: 1px solid var(--line);
}
.sovereign-panel {
  padding: 20px 14px;
  border-left: 1px solid var(--line);
}
.command-main {
  padding: 24px 28px;
}
.rail-label {
  font-size: calc(8px * var(--font-scale));
  letter-spacing: 0.2em;
  color: #5e707e;
}
.state-rail h2 {
  font-size: calc(17px * var(--font-scale));
  line-height: 1.25;
  margin: 12px 0 3px;
}
.state-rail > p {
  font-size: calc(10px * var(--font-scale));
  color: #657580;
  margin: 0 0 34px;
}
.rail-primary {
  border-top: 1px solid #19232c;
  padding: 16px 0;
  position: relative;
}
.rail-primary > span {
  display: block;
  color: #758591;
  font-size: calc(9px * var(--font-scale));
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.rail-primary strong {
  display: block;
  font-size: calc(24px * var(--font-scale));
  margin-top: 5px;
  font-weight: 520;
  font-variant-numeric: tabular-nums;
}
.rail-primary strong small {
  font-size: calc(12px * var(--font-scale));
  color: #7a8a96;
  margin-left: 2px;
}
.rail-primary > i {
  position: absolute;
  right: 0;
  bottom: 20px;
  font-size: calc(9px * var(--font-scale));
  font-style: normal;
  text-transform: uppercase;
}
.up {
  color: var(--green);
}
.down {
  color: var(--red);
}
.rail-divider {
  height: 22px;
}
.signal {
  margin: 17px 0;
}
.signal > div:first-child {
  display: flex;
  justify-content: space-between;
  font-size: calc(10px * var(--font-scale));
  color: #84929d;
}
.signal b {
  color: #cbd4d8;
}
.signal-track {
  height: 2px;
  background: #202a32;
  margin-top: 8px;
}
.signal-track i {
  display: block;
  height: 100%;
}
.signal-track .stable {
  background: var(--green);
}
.signal-track .watch {
  background: var(--amber);
}
.signal-track .critical {
  background: var(--red);
}
.hero {
  padding: 4px 0 22px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}
.hero h2 {
  font-size: calc(24px * var(--font-scale));
  font-weight: 520;
  margin: 9px 0 3px;
}
.hero p {
  font-size: calc(10px * var(--font-scale));
}
.turn span {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: calc(9px * var(--font-scale));
}
.turn strong {
  font-size: calc(26px * var(--font-scale));
  font-weight: 500;
}
.turn strong small {
  font-size: calc(12px * var(--font-scale));
  color: #617581;
}
.event-card {
  margin-top: 0;
  padding: 34px 0 0;
  border: 0;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}
.event-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: calc(9px * var(--font-scale));
  letter-spacing: 0.14em;
}
.event-meta span {
  color: var(--amber);
}
.event-meta b {
  font-weight: 500;
  color: #81909b;
}
.event-meta i {
  height: 1px;
  width: 32px;
  background: #3a4650;
}
.event-card h2 {
  font-size: clamp(
    calc(25px * var(--font-scale)),
    calc(3vw * var(--font-scale)),
    calc(38px * var(--font-scale))
  );
  font-weight: 510;
  line-height: 1.12;
  max-width: 750px;
  margin: 18px 0 14px;
}
.event-card > p {
  font-size: calc(14px * var(--font-scale));
  color: #9aa6ad;
  max-width: 720px;
}
.advisor-note {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 18px;
  border-left: 2px solid #344653;
  padding: 11px 14px;
  margin: 24px 0;
  color: #768691;
}
.advisor-note > span {
  font-size: calc(8px * var(--font-scale));
  letter-spacing: 0.14em;
  color: #668b9a;
}
.advisor-note p {
  font-size: calc(10px * var(--font-scale));
  line-height: 1.5;
  margin: 0;
}
.event-options {
  border-top: 1px solid var(--line);
  margin-top: 26px;
  gap: 0;
}
.event-options button {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  padding: 16px 8px;
  color: #d8e0e4;
  transition:
    background 0.18s,
    border-color 0.18s,
    transform 0.18s;
}
.event-options button:hover:not(:disabled) {
  background: #101820;
  border-color: #344754;
  transform: translateX(3px);
}
.event-options .option-index {
  font-size: calc(9px * var(--font-scale));
  color: #577181;
}
.event-options b {
  font-size: calc(13px * var(--font-scale));
  font-weight: 560;
}
.event-options span {
  font-size: calc(10px * var(--font-scale));
}
.event-options em {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #82929c;
}
.brief {
  border-radius: 3px;
  margin-top: 24px;
}
.ai-card,
.watchlist {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 6px;
}
.ai-title {
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line);
}
.ai-title .glyph {
  font-size: calc(22px * var(--font-scale));
}
.ai-title div {
  flex: 1;
}
.ai-title div span {
  font-size: calc(8px * var(--font-scale));
}
.ai-title div b {
  font-size: calc(11px * var(--font-scale));
  margin-top: 3px;
}
.online {
  font-size: calc(7px * var(--font-scale));
  font-style: normal;
  color: var(--green);
  letter-spacing: 0.1em;
}
.forecast {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.forecast > span {
  display: block;
  font-size: calc(8px * var(--font-scale));
  letter-spacing: 0.14em;
  color: #657784;
}
.forecast > strong {
  display: block;
  font-size: calc(23px * var(--font-scale));
  font-weight: 500;
  color: #d9ecf0;
  margin: 7px 0 18px;
}
.forecast > div {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: calc(9px * var(--font-scale));
  color: #71818c;
}
.forecast > div b {
  font-size: calc(9px * var(--font-scale));
  color: #bdc9cf;
}
.forecast .risk {
  color: var(--amber);
}
.forecast .neutral {
  color: var(--green);
}
.ai-findings p {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 7px;
  font-size: calc(10px * var(--font-scale));
  color: #8997a0;
  line-height: 1.5;
  padding: 11px 0;
  margin: 0;
  border-bottom: 1px solid #18222a;
}
.ai-findings p span {
  color: #4f7182;
}
.watchlist {
  margin-top: 22px;
}
.watchlist > .rail-label {
  margin-bottom: 10px;
}
.watchlist > div:not(.rail-label) {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid #18222a;
  font-size: calc(9px * var(--font-scale));
}
.watchlist i {
  font-style: normal;
  width: 13px;
  height: 13px;
  border: 1px solid #34424d;
  color: #60707c;
  display: grid;
  place-items: center;
}
.watchlist i.warn {
  border-color: #946d3c;
  color: var(--amber);
}
.watchlist b {
  font-size: calc(7px * var(--font-scale));
  letter-spacing: 0.08em;
  color: #677781;
}
.catalog-card,
.budget-grid,
.taxes,
.table-card,
.sector-grid article,
.diplomacy article,
.minister-grid article,
.chart-card,
.timeline {
  border-radius: 3px;
}
.page-head {
  padding-top: 24px;
}
.primary,
.secondary,
.catalog-card button,
.inline-actions button {
  border-radius: 3px;
}
.start-card {
  border-radius: 6px;
}
.choice,
.pill {
  border-radius: 3px;
}
@media (max-width: 1200px) {
  .command-grid {
    grid-template-columns: 200px minmax(420px, 1fr) 275px;
  }
  .command-main {
    padding: 22px 20px;
  }
}
@media (max-width: 980px) {
  .command-grid {
    grid-template-columns: 190px 1fr;
  }
  .sovereign-panel {
    grid-column: 1/3;
    border-left: 0;
    border-top: 1px solid var(--line);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
  .classification {
    display: none;
  }
}
@media (max-width: 760px) {
  .app {
    grid-template-columns: 1fr;
    grid-template-rows: 58px 1fr 54px;
  }
  .app main {
    padding: 0;
  }
  .command-grid {
    display: block;
  }
  .state-rail {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 15px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .state-rail > .rail-label,
  .state-rail > h2,
  .state-rail > p,
  .state-rail > .rail-divider,
  .state-rail > .signal {
    display: none;
  }
  .rail-primary {
    padding: 8px;
    border-top: 0;
  }
  .rail-primary strong {
    font-size: calc(17px * var(--font-scale));
  }
  .rail-primary > i {
    position: static;
    display: block;
    margin-top: 4px;
  }
  .command-main {
    padding: 18px 14px;
  }
  .sovereign-panel {
    display: block;
    padding: 18px 14px;
  }
  .event-card {
    padding-top: 24px;
  }
  .event-card h2 {
    font-size: calc(27px * var(--font-scale));
  }
  .event-options button {
    grid-template-columns: 30px 1fr;
  }
  .event-options em {
    grid-column: 2;
    margin-top: 8px;
  }
  .advisor-note {
    grid-template-columns: 1fr;
  }
  .nav-section {
    display: none;
  }
  .topstate span:nth-of-type(1) {
    display: block;
  }
  .topstate span:nth-of-type(2),
  .topstate i {
    display: none;
  }
  .icon-button span {
    display: none;
  }
}

/* Detailed government portrait creator */
.identity-setup {
  grid-template-columns: minmax(330px, 0.78fr) minmax(620px, 1.42fr);
  min-height: 650px;
}
.leader-preview {
  position: relative;
  overflow: hidden;
  background: linear-gradient(155deg, #0a151d 0%, #071017 58%, #0c1a22 100%);
}
.leader-preview:before {
  content: "";
  position: absolute;
  width: 340px;
  height: 340px;
  border: 1px solid rgba(95, 207, 230, 0.12);
  border-radius: 50%;
  top: 52px;
  left: 50%;
  translate: -50% 0;
  box-shadow:
    0 0 70px rgba(59, 188, 216, 0.07),
    inset 0 0 70px rgba(59, 188, 216, 0.04);
}
.leader-preview:after {
  content: "OFFIZIELLES REGIERUNGSPORTRÄT";
  position: absolute;
  bottom: 20px;
  color: #456675;
  font-size: 8px;
  letter-spacing: 2px;
}
.identity-controls {
  padding: 32px 38px;
  gap: 15px;
}
.title-selector {
  display: grid;
  gap: 8px;
}
.title-selector > span {
  color: var(--cyan);
  font-size: 10px;
  letter-spacing: 1.5px;
}
.title-selector > div {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}
.title-selector button {
  min-height: 40px;
  border: 1px solid var(--line);
  background: #081119;
  color: var(--muted);
  font-size: 11px;
}
.title-selector button.active {
  border-color: var(--cyan);
  background: var(--cyan-dim);
  color: var(--text);
  box-shadow: inset 0 -2px var(--cyan);
}
.creator-row {
  grid-template-columns: 104px repeat(5, minmax(82px, 1fr));
}
.creator-row button {
  padding: 6px 9px;
  font-size: 11px;
  line-height: 1.25;
}
.creator-swatches {
  min-height: 38px;
  padding: 2px 0;
}
.creator-swatches [data-color="blue"] {
  background: #4f829d;
}
.creator-swatches [data-color="green"] {
  background: #66866b;
}
.creator-swatches [data-color="gray"] {
  background: #84949b;
}
.creator-swatches button[data-outfit] {
  border-radius: 3px;
  width: 38px;
  background: linear-gradient(
    135deg,
    #162d3a 0 48%,
    #d5e1e3 49% 55%,
    #162d3a 56%
  );
}
.creator-swatches button[data-outfit="formal"] {
  background: linear-gradient(
    135deg,
    #17191e 0 48%,
    #eef0ed 49% 55%,
    #17191e 56%
  );
}
.creator-swatches button[data-outfit="modern"] {
  background: linear-gradient(
    135deg,
    #254653 0 48%,
    #75d5e6 49% 55%,
    #254653 56%
  );
}
.leader-avatar {
  --skin: #b77d58;
  --skin-light: #cb936a;
  --skin-shadow: #87583e;
  --hair: #20252a;
  --iris: #4f829d;
  --suit: #162d3a;
  width: 228px;
  height: 286px;
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.32));
}
.leader-avatar[data-skin="light"] {
  --skin: #e8c4a8;
  --skin-light: #f2d2b8;
  --skin-shadow: #bd8f72;
}
.leader-avatar[data-skin="deep"] {
  --skin: #815137;
  --skin-light: #9d6848;
  --skin-shadow: #593524;
}
.leader-avatar[data-skin="dark"] {
  --skin: #4d3025;
  --skin-light: #674335;
  --skin-shadow: #301e18;
}
.leader-avatar[data-eyes="green"] {
  --iris: #66866b;
}
.leader-avatar[data-eyes="brown"] {
  --iris: #69452f;
}
.leader-avatar[data-eyes="gray"] {
  --iris: #84949b;
}
.leader-avatar[data-outfit="formal"] {
  --suit: #17191e;
}
.leader-avatar[data-outfit="modern"] {
  --suit: #254653;
}
.leader-head {
  width: 116px;
  height: 151px;
  left: 56px;
  top: 37px;
  border-radius: 44% 44% 42% 42%;
  background: linear-gradient(
    100deg,
    var(--skin-shadow) -16%,
    var(--skin) 16%,
    var(--skin-light) 54%,
    var(--skin) 85%
  );
  box-shadow:
    inset 0 -10px rgba(82, 43, 29, 0.08),
    0 2px 0 rgba(255, 255, 255, 0.05);
}
.leader-avatar[data-face="angular"] .leader-head {
  clip-path: polygon(
    15% 4%,
    85% 4%,
    100% 27%,
    94% 76%,
    73% 96%,
    50% 100%,
    27% 96%,
    6% 76%,
    0 27%
  );
  border-radius: 30%;
}
.leader-avatar[data-face="round"] .leader-head {
  width: 128px;
  height: 142px;
  left: 50px;
  border-radius: 46%;
}
.leader-avatar[data-gender="female"] .leader-head {
  width: 111px;
  left: 59px;
  border-radius: 48% 48% 44% 44%;
}
.leader-avatar[data-gender="female"][data-face="round"] .leader-head {
  width: 123px;
  left: 53px;
}
.leader-ear {
  position: absolute;
  z-index: -1;
  top: 58px;
  width: 17px;
  height: 35px;
  border-radius: 60%;
  background: var(--skin);
  box-shadow: inset 0 0 0 2px rgba(80, 45, 31, 0.11);
}
.leader-ear.left {
  left: -11px;
}
.leader-ear.right {
  right: -11px;
}
.leader-ear:after {
  content: "";
  position: absolute;
  inset: 8px 5px;
  border: 1px solid var(--skin-shadow);
  border-radius: 50%;
  opacity: 0.4;
}
.leader-neck {
  left: 91px;
  top: 167px;
  width: 46px;
  height: 57px;
  background: linear-gradient(
    90deg,
    var(--skin-shadow),
    var(--skin) 34%,
    var(--skin-light)
  );
  clip-path: polygon(7% 0, 93% 0, 83% 100%, 17% 100%);
}
.leader-shoulders {
  width: 218px;
  height: 112px;
  left: 5px;
  bottom: -20px;
  border-radius: 48% 48% 0 0;
  background: linear-gradient(
    105deg,
    #0b1b23,
    var(--suit) 36%,
    color-mix(in srgb, var(--suit), #72a4b5 25%) 70%,
    #0c1b22
  );
  border-top: 1px solid rgba(103, 212, 232, 0.42);
}
.leader-shoulders:after {
  display: none;
}
.leader-shirt {
  position: absolute;
  z-index: 2;
  left: 89px;
  bottom: 5px;
  width: 50px;
  height: 91px;
  background: #d7e2e4;
  clip-path: polygon(0 0, 50% 28%, 100% 0, 83% 100%, 17% 100%);
}
.leader-avatar[data-gender="female"] .leader-shirt {
  background: #c8dde0;
  clip-path: polygon(0 0, 50% 18%, 100% 0, 86% 100%, 14% 100%);
}
.leader-lapel {
  position: absolute;
  z-index: 3;
  bottom: 15px;
  width: 55px;
  height: 83px;
  background: color-mix(in srgb, var(--suit), #91bac6 10%);
}
.leader-lapel.left {
  left: 50px;
  clip-path: polygon(0 0, 100% 35%, 55% 100%, 0 48%);
}
.leader-lapel.right {
  right: 50px;
  clip-path: polygon(100% 0, 0 35%, 45% 100%, 100% 48%);
}
.leader-hair {
  left: -6px;
  top: -13px;
  width: 128px;
  height: 49px;
  border-radius: 50% 50% 28% 22%;
  background: linear-gradient(
    110deg,
    color-mix(in srgb, var(--hair), #fff 15%),
    var(--hair) 45%,
    #111 130%
  );
  box-shadow: inset 0 -5px rgba(0, 0, 0, 0.16);
}
.hair-crop {
  clip-path: polygon(
    0 25%,
    12% 4%,
    28% 12%,
    40% 0,
    54% 11%,
    67% 1%,
    84% 13%,
    100% 8%,
    96% 79%,
    84% 64%,
    70% 70%,
    56% 58%,
    42% 70%,
    25% 58%,
    8% 77%
  );
}
.hair-parted {
  height: 57px;
  clip-path: polygon(
    0 15%,
    44% 0,
    49% 8%,
    54% 0,
    100% 18%,
    97% 82%,
    59% 55%,
    50% 25%,
    43% 56%,
    3% 84%
  );
}
.hair-wave {
  height: 64px;
  clip-path: polygon(
    0 28%,
    8% 4%,
    25% 15%,
    38% 0,
    51% 16%,
    66% 2%,
    80% 18%,
    96% 9%,
    100% 76%,
    88% 66%,
    77% 82%,
    62% 64%,
    48% 79%,
    33% 62%,
    17% 78%,
    2% 69%
  );
}
.hair-shaved {
  top: -4px;
  height: 23px;
  opacity: 0.8;
  clip-path: none;
}
.hair-long {
  height: 154px;
  width: 137px;
  left: -11px;
  top: -12px;
  z-index: -2;
  border-radius: 48% 48% 30% 30%;
  clip-path: polygon(
    0 8%,
    50% 0,
    100% 8%,
    96% 100%,
    79% 88%,
    72% 24%,
    50% 15%,
    28% 24%,
    21% 88%,
    4% 100%
  );
}
.hair-bob {
  height: 125px;
  width: 135px;
  left: -10px;
  top: -11px;
  z-index: -2;
  border-radius: 48% 48% 38% 38%;
  clip-path: polygon(
    0 9%,
    50% 0,
    100% 9%,
    96% 90%,
    78% 100%,
    72% 28%,
    50% 15%,
    28% 28%,
    22% 100%,
    4% 90%
  );
}
.leader-temple {
  position: absolute;
  z-index: 4;
  top: 20px;
  width: 11px;
  height: 44px;
  background: var(--hair);
}
.leader-temple.left {
  left: 1px;
  border-radius: 70% 0;
}
.leader-temple.right {
  right: 1px;
  border-radius: 0 70%;
}
.leader-avatar .hair-shaved ~ .leader-temple {
  height: 22px;
  opacity: 0.65;
}
.leader-eye {
  top: 61px;
  width: 21px;
  height: 9px;
  border-radius: 50%;
  background: #edf0eb;
  box-shadow:
    0 -2px var(--skin-shadow),
    inset 0 -2px rgba(38, 48, 49, 0.18);
}
.leader-eye.left {
  left: 23px;
}
.leader-eye.right {
  right: 23px;
}
.leader-iris {
  position: absolute;
  z-index: 3;
  top: 62px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--iris);
  box-shadow:
    inset 0 0 0 2px rgba(10, 20, 24, 0.5),
    0 0 0 1px rgba(0, 0, 0, 0.2);
}
.leader-iris.left {
  left: 30px;
}
.leader-iris.right {
  right: 30px;
}
.leader-brow {
  top: 49px;
  width: 23px;
  height: 4px;
  border-radius: 60%;
  background: var(--hair);
  transform: rotate(2deg);
}
.leader-brow.left {
  left: 21px;
}
.leader-brow.right {
  right: 21px;
  transform: rotate(-2deg);
}
.leader-avatar[data-gender="female"] .leader-brow {
  height: 3px;
  top: 50px;
}
.leader-avatar[data-gender="female"] .leader-eye {
  height: 8px;
  box-shadow:
    0 -2px var(--hair),
    inset 0 -2px rgba(38, 48, 49, 0.18);
}
.leader-nose {
  left: 54px;
  top: 68px;
  width: 9px;
  height: 34px;
  border-right: 2px solid rgba(68, 37, 26, 0.28);
  border-bottom: 2px solid rgba(68, 37, 26, 0.22);
  border-radius: 0 0 60% 0;
}
.leader-cheek {
  position: absolute;
  top: 88px;
  width: 25px;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(170, 80, 65, 0.1), transparent 70%);
}
.leader-cheek.left {
  left: 12px;
}
.leader-cheek.right {
  right: 12px;
}
.leader-mouth {
  left: 40px;
  top: 119px;
  width: 36px;
  height: 8px;
  border: 0;
  border-bottom: 2px solid rgba(77, 35, 34, 0.68);
  border-radius: 0 0 60% 60%;
}
.leader-avatar[data-gender="female"] .leader-mouth {
  height: 10px;
  border-bottom: 3px solid #985d60;
}
.leader-beard {
  left: 13px;
  top: 89px;
  width: 90px;
  height: 58px;
  border: 0;
  border-radius: 12% 12% 46% 46%;
  background: linear-gradient(
    180deg,
    transparent 5%,
    color-mix(in srgb, var(--hair), transparent 25%)
  );
  clip-path: polygon(
    0 0,
    18% 20%,
    22% 65%,
    50% 100%,
    78% 65%,
    82% 20%,
    100% 0,
    94% 76%,
    70% 100%,
    30% 100%,
    6% 76%
  );
}
.beard-trim {
  opacity: 0.78;
  height: 46px;
  top: 101px;
}
.beard-stubble {
  opacity: 0.28;
  background: repeating-linear-gradient(
    105deg,
    transparent 0 3px,
    var(--hair) 4px 5px
  );
  height: 43px;
  top: 101px;
}
.beard-mustache {
  top: 105px;
  left: 34px;
  width: 48px;
  height: 17px;
  background: var(--hair);
  clip-path: polygon(
    0 38%,
    35% 8%,
    50% 35%,
    65% 8%,
    100% 38%,
    77% 80%,
    51% 53%,
    23% 80%
  );
}
.leader-avatar.compact {
  width: 46px;
  height: 50px;
  filter: none;
}
.leader-avatar.compact .leader-head {
  transform: scale(0.34);
  left: 4px;
  top: 2px;
}
.leader-avatar.compact .leader-neck,
.leader-avatar.compact .leader-shoulders,
.leader-avatar.compact .leader-shirt,
.leader-avatar.compact .leader-lapel {
  display: none;
}
@media (max-width: 1150px) {
  .identity-setup {
    grid-template-columns: 1fr;
  }
  .leader-preview {
    min-height: 410px;
  }
  .title-selector > div {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 760px) {
  .identity-controls {
    padding: 22px 16px;
  }
  .creator-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .creator-row > span {
    grid-column: 1/-1;
  }
  .title-selector > div {
    grid-template-columns: 1fr 1fr;
  }
}

/* Unified state-formation and administration surfaces */
.start-shell {
  display: block;
  padding: 0;
  background: #06090d;
}
.start-card {
  width: min(1280px, 100%);
  min-height: 100vh;
  margin: auto;
  padding: 42px 48px 64px;
  background: #080d12;
  border-width: 0 1px;
  border-color: #202b36;
  box-shadow: none;
}
.start-card .brand-mark {
  border-radius: 4px;
  background: #0c151c;
}
.start-card .lead {
  font-size: calc(16px * var(--font-scale));
  color: #8997a1;
  border-bottom: 1px solid var(--line);
  padding-bottom: 26px;
  margin-bottom: 26px;
}
.start-card > label {
  max-width: none;
}
.start-card input,
.start-card select,
.split select {
  border-radius: 3px;
  background: #070c11;
  border-color: #283642;
}
.start-card h3 {
  font-size: calc(9px * var(--font-scale));
  letter-spacing: 0.18em;
  color: #7c9cac;
  margin-top: 28px;
}
.choice-grid {
  gap: 1px;
  background: #24303a;
  border: 1px solid #24303a;
}
.choice {
  border: 0;
  border-radius: 0;
  background: #090f15;
  min-height: 132px;
  padding: 17px;
}
.choice:hover {
  background: #0d161e;
}
.choice.selected {
  background: #10202a;
  border: 0;
  box-shadow: inset 0 -2px 0 var(--cyan);
}
.choice b {
  font-size: calc(13px * var(--font-scale));
}
.choice span {
  font-size: calc(11px * var(--font-scale));
}
.trait-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: #24303a;
  border: 1px solid #24303a;
}
.trait-card {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 11px;
  text-align: left;
  border: 0;
  background: #090f15;
  color: #dce4e8;
  padding: 15px;
  min-height: 86px;
}
.trait-card:hover {
  background: #0d161e;
}
.trait-card.selected {
  background: #10202a;
  box-shadow: inset 0 -2px 0 var(--cyan);
}
.trait-card .selection-box {
  width: 16px;
  height: 16px;
  border: 1px solid #40515e;
  display: grid;
  place-items: center;
  color: var(--cyan);
  font-size: calc(10px * var(--font-scale));
}
.trait-card b {
  font-size: calc(12px * var(--font-scale));
}
.trait-card div > span {
  display: block;
  color: #768691;
  font-size: calc(10px * var(--font-scale));
  line-height: 1.45;
  margin-top: 5px;
}
.setup-section {
  margin-top: 32px;
}
.setup-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
  margin-bottom: 1px;
}
.setup-heading h3 {
  margin: 0 0 5px;
}
.setup-heading p {
  margin: 0;
  color: #697985;
  font-size: calc(10px * var(--font-scale));
}
.setup-heading > span {
  font-size: calc(8px * var(--font-scale));
  letter-spacing: 0.14em;
  color: var(--cyan);
}
.difficulty-grid,
.ai-level-grid {
  display: grid;
  gap: 1px;
  background: #24303a;
  border: 1px solid #24303a;
}
.difficulty-grid {
  grid-template-columns: repeat(4, 1fr);
}
.ai-level-grid {
  grid-template-columns: repeat(3, 1fr);
}
.info-choice {
  text-align: left;
  border: 0;
  background: #090f15;
  color: #dce4e8;
  padding: 16px;
  min-height: 128px;
}
.info-choice:hover {
  background: #0d161e;
}
.info-choice.selected {
  background: #10202a;
  box-shadow: inset 0 -2px 0 var(--cyan);
}
.info-choice > span {
  display: block;
  font-size: calc(8px * var(--font-scale));
  letter-spacing: 0.12em;
  color: #638494;
}
.info-choice > b {
  display: block;
  font-size: calc(13px * var(--font-scale));
  margin-top: 8px;
}
.info-choice > p {
  font-size: calc(10px * var(--font-scale));
  line-height: 1.5;
  color: #778791;
  margin: 8px 0 0;
}
.priority-grid {
  border-radius: 0;
  background: #070c11;
  border-color: #24313b;
  padding: 18px;
}
.start-actions {
  border-top: 1px solid var(--line);
  padding-top: 24px;
}
.start-actions .primary {
  padding: 12px 18px;
}
.app main > section {
  padding: 24px;
  max-width: 1450px;
  margin: auto;
}
.catalog,
.diplomacy,
.minister-grid {
  gap: 1px;
  background: #202b34;
  border: 1px solid #202b34;
}
.catalog-card,
.diplomacy article,
.minister-grid article {
  border: 0;
  border-radius: 0;
  background: #0a1016;
}
.catalog-card:hover,
.diplomacy article:hover,
.minister-grid article:hover {
  background: #0d151c;
}
.tag {
  border-radius: 2px;
  background: #101f27;
}
.budget-grid,
.taxes,
.table-card,
.chart-card,
.timeline {
  background: #0a1016;
}
.page-head {
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}
.page-head h2 {
  font-weight: 520;
}
.meter,
.meter span {
  border-radius: 0;
}
@media (max-width: 900px) {
  .trait-grid,
  .ai-level-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .difficulty-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .start-card {
    padding: 30px 24px 50px;
  }
}
@media (max-width: 600px) {
  .trait-grid,
  .ai-level-grid,
  .difficulty-grid {
    grid-template-columns: 1fr;
  }
  .choice-grid {
    grid-template-columns: 1fr;
  }
  .start-card {
    padding: 24px 16px 44px;
  }
  .setup-heading {
    align-items: flex-start;
    gap: 12px;
  }
  .priority-grid {
    padding: 12px;
  }
}

.decision-report {
  padding: 28px 0;
}
.report-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
}
.report-head h2 {
  font-size: calc(28px * var(--font-scale));
  font-weight: 520;
  margin: 8px 0 4px;
}
.report-head p {
  font-size: calc(11px * var(--font-scale));
  color: #71818c;
  margin: 0;
}
.report-head > span {
  font-size: calc(8px * var(--font-scale));
  letter-spacing: 0.14em;
  color: #607482;
}
.report-summary {
  font-size: calc(12px * var(--font-scale));
  line-height: 1.6;
  color: #91a0a9;
  max-width: 720px;
  margin: 20px 0;
}
.impact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: #202b34;
  border: 1px solid #202b34;
  margin: 18px 0;
}
.impact-grid > div {
  background: #090f15;
  padding: 13px;
}
.impact-grid span,
.impact-grid small {
  display: block;
  font-size: calc(9px * var(--font-scale));
  color: #71818b;
}
.impact-grid strong {
  display: block;
  font-size: calc(18px * var(--font-scale));
  margin: 5px 0;
}
.positive {
  color: var(--green) !important;
}
.negative {
  color: var(--red) !important;
}
.reaction-list,
.delayed-list {
  border-top: 1px solid var(--line);
  margin: 20px 0;
  padding-top: 14px;
}
.reaction-list h3,
.delayed-list h3 {
  font-size: calc(9px * var(--font-scale));
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #718794;
}
.reaction-list > div {
  display: grid;
  grid-template-columns: 150px 50px 1fr;
  padding: 9px 0;
  border-bottom: 1px solid #19232b;
  font-size: calc(10px * var(--font-scale));
}
.reaction-list p {
  margin: 0;
  color: #71818b;
}
.delayed-list p {
  font-size: calc(10px * var(--font-scale));
  color: #8a9aa3;
  border-left: 2px solid var(--amber);
  padding: 7px 10px;
}
.table-card td small {
  display: block;
  color: #63737e;
  font-size: calc(9px * var(--font-scale));
  margin-top: 3px;
}
.minister-effect {
  display: block;
  color: #71818c;
  font-size: calc(9px * var(--font-scale));
  line-height: 1.4;
  margin-top: 10px;
}
.election-brief i {
  color: #718a98;
}
.quarter-workspace {
  padding: 26px 0 40px;
}
.agenda-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
}
.agenda-head h3 {
  font-size: calc(26px * var(--font-scale));
  font-weight: 520;
  margin: 8px 0;
}
.agenda-head p {
  color: #7f909a;
  font-size: calc(11px * var(--font-scale));
  margin: 0;
  line-height: 1.5;
}
.agenda-head > strong {
  font-size: calc(34px * var(--font-scale));
  color: var(--cyan);
  font-variant-numeric: tabular-nums;
}
.agenda-head > strong small {
  font-size: calc(13px * var(--font-scale));
  color: #627784;
}
.agenda-list {
  border: 1px solid var(--line);
  border-bottom: 0;
  margin-top: 20px;
}
.agenda-list > button {
  width: 100%;
  min-height: 72px;
  display: grid;
  grid-template-columns: 42px 1fr auto 22px;
  align-items: center;
  gap: 12px;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #090f14;
  color: #dce6e9;
  padding: 12px 16px;
}
.agenda-list > button:not(:disabled):hover {
  background: #0e1921;
  box-shadow: inset 2px 0 var(--cyan);
}
.agenda-list > button.done {
  background: #08120f;
  color: #8bb9a7;
}
.agenda-list > button > i {
  font-style: normal;
  font-size: calc(9px * var(--font-scale));
  color: #5d7886;
}
.agenda-list > button > span b,
.agenda-list > button > span small {
  display: block;
}
.agenda-list > button > span b {
  font-size: calc(12px * var(--font-scale));
  margin-bottom: 5px;
}
.agenda-list > button > span small {
  color: #71838e;
  font-size: calc(9px * var(--font-scale));
  line-height: 1.4;
}
.agenda-list > button > em {
  font-style: normal;
  font-size: calc(8px * var(--font-scale));
  letter-spacing: 0.12em;
  color: var(--amber);
}
.action-journal {
  margin-top: 20px;
  border-left: 2px solid #35596a;
  padding: 3px 0 3px 15px;
}
.action-journal > span {
  font-size: calc(8px * var(--font-scale));
  letter-spacing: 0.14em;
  color: #658190;
}
.action-journal p {
  display: flex;
  gap: 12px;
  margin: 9px 0;
  color: #91a1aa;
  font-size: calc(9px * var(--font-scale));
}
.action-journal p i {
  font-style: normal;
  color: #55717f;
}
.quarter-close {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--line);
  margin-top: 22px;
  padding-top: 18px;
}
.quarter-close div b,
.quarter-close div span {
  display: block;
}
.quarter-close div b {
  font-size: calc(11px * var(--font-scale));
  color: #c7d3d8;
}
.quarter-close div span {
  font-size: calc(9px * var(--font-scale));
  color: #71828c;
  margin-top: 5px;
}
.quarter-close .primary {
  flex: 0 0 auto;
}
.regions-surface {
  min-height: 100%;
}
.regional-scope {
  display: flex;
  gap: 22px;
  border-bottom: 1px solid var(--line);
  padding: 11px 0;
  color: #72848e;
  font-size: calc(8px * var(--font-scale));
  letter-spacing: 0.08em;
}
.regional-scope b {
  color: #70bdd1;
  margin-right: 6px;
}
.map-workspace {
  display: grid;
  grid-template-columns: minmax(480px, 1fr) 390px;
  min-height: 610px;
  border: 1px solid var(--line);
  margin-top: 18px;
}
.state-map {
  position: relative;
  min-height: 610px;
  background: #070c11;
  overflow: hidden;
}
.map-grid {
  position: absolute;
  inset: 0;
  background-size: 34px 34px;
  background-image:
    linear-gradient(rgba(64, 101, 115, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(64, 101, 115, 0.08) 1px, transparent 1px);
}
.state-map svg {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 32px;
  filter: drop-shadow(0 0 16px rgba(61, 185, 207, 0.08));
}
.state-map g {
  cursor: pointer;
  outline: none;
}
.state-map path {
  fill: #10212a;
  stroke: #416878;
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
  transition:
    fill 0.18s,
    stroke 0.18s,
    filter 0.18s;
}
.state-map g.watch path {
  fill: #292515;
  stroke: #9b8847;
}
.state-map g.critical path {
  fill: #2b161a;
  stroke: #a7555c;
}
.state-map g:hover path,
.state-map g.selected path {
  stroke: #79d7e9;
  stroke-width: 5;
  filter: drop-shadow(0 0 8px rgba(96, 210, 231, 0.65));
  fill: #153641;
}
.state-map text {
  fill: #b7c9cf;
  font-size: 15px;
  font-weight: 600;
  pointer-events: none;
  paint-order: stroke;
  stroke: #071017;
  stroke-width: 5;
}
.map-legend {
  position: absolute;
  left: 20px;
  bottom: 18px;
  display: flex;
  gap: 14px;
  font-size: calc(7px * var(--font-scale));
  letter-spacing: 0.08em;
  color: #71848e;
}
.map-legend span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.map-legend i {
  width: 8px;
  height: 8px;
  background: #416878;
}
.map-legend i.watch {
  background: #9b8847;
}
.map-legend i.critical {
  background: #a7555c;
}
.district-panel {
  border-left: 1px solid var(--line);
  background: #090f15;
  padding: 22px;
  overflow: auto;
}
.district-title > span {
  font-size: calc(7px * var(--font-scale));
  letter-spacing: 0.14em;
  color: #64a7bc;
}
.district-title h3 {
  font-size: calc(24px * var(--font-scale));
  margin: 9px 0 5px;
}
.district-title p {
  color: #81939d;
  font-size: calc(10px * var(--font-scale));
  margin: 0;
}
.district-primary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  margin: 18px 0;
}
.district-primary > div {
  background: #081017;
  padding: 11px;
}
.district-primary span,
.district-primary b {
  display: block;
}
.district-primary span {
  font-size: calc(6px * var(--font-scale));
  letter-spacing: 0.1em;
  color: #607783;
}
.district-primary b {
  font-size: calc(11px * var(--font-scale));
  margin-top: 6px;
}
.district-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 18px;
}
.district-metrics > div > span {
  display: flex;
  justify-content: space-between;
  color: #83949e;
  font-size: calc(8px * var(--font-scale));
}
.district-metrics > div > span b {
  color: #dce6e9;
}
.district-meter {
  height: 3px;
  background: #202c34;
  margin-top: 7px;
}
.district-meter i {
  height: 100%;
  display: block;
  background: var(--green);
}
.district-meter i.watch {
  background: var(--amber);
}
.district-meter i.critical {
  background: var(--red);
}
.regional-actions {
  margin-top: 22px;
  border-top: 1px solid var(--line);
}
.regional-actions > div {
  display: flex;
  justify-content: space-between;
  padding: 14px 0 9px;
  font-size: calc(7px * var(--font-scale));
  letter-spacing: 0.12em;
  color: #68818e;
}
.regional-actions > button {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  text-align: left;
  border: 1px solid var(--line);
  border-bottom: 0;
  background: #0a1218;
  color: #dce6e9;
  padding: 11px;
}
.regional-actions > button:last-child {
  border-bottom: 1px solid var(--line);
}
.regional-actions > button:hover:not(:disabled) {
  background: #10202a;
  border-color: #3f7587;
}
.regional-actions > button:disabled {
  opacity: 0.42;
}
.regional-actions b,
.regional-actions small {
  display: block;
}
.regional-actions b {
  font-size: calc(9px * var(--font-scale));
}
.regional-actions small {
  color: #6f818c;
  font-size: calc(7px * var(--font-scale));
  line-height: 1.45;
  margin-top: 4px;
}
.regional-actions em {
  font-style: normal;
  color: #75b6c8;
  font-size: calc(8px * var(--font-scale));
  white-space: nowrap;
}
.campaign-monitor {
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 18px;
}
.campaign-goals > div {
  margin-top: 12px;
}
.campaign-goals > div > span {
  display: flex;
  justify-content: space-between;
  color: #758995;
  font-size: calc(7px * var(--font-scale));
  letter-spacing: 0.06em;
}
.campaign-goals > div > span b {
  color: #b8c8cf;
}
.campaign-goals .meter,
.campaign-timeline .meter {
  height: 2px;
  margin-top: 6px;
}
.campaign-timeline > span,
.campaign-timeline > b,
.campaign-endless b,
.campaign-endless small {
  display: block;
}
.campaign-timeline > span {
  font-size: calc(7px * var(--font-scale));
  color: #718691;
  letter-spacing: 0.1em;
}
.campaign-timeline > b {
  font-size: calc(17px * var(--font-scale));
  margin-top: 7px;
}
.campaign-timeline small {
  font-size: calc(8px * var(--font-scale));
  color: #61747f;
}
.campaign-endless {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}
.campaign-endless > span {
  font-size: calc(30px * var(--font-scale));
  color: var(--cyan);
}
.campaign-endless b {
  font-size: calc(9px * var(--font-scale));
  letter-spacing: 0.09em;
}
.campaign-endless small {
  font-size: calc(7px * var(--font-scale));
  color: #697d88;
  margin-top: 4px;
}
@media (max-width: 760px) {
  .impact-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .reaction-list > div {
    grid-template-columns: 1fr auto;
  }
  .reaction-list p {
    grid-column: 1/3;
    margin-top: 4px;
  }
  .election-brief {
    display: none;
  }
}
@media (max-width: 760px) {
  .agenda-head {
    align-items: flex-start;
  }
  .agenda-head > strong {
    font-size: calc(26px * var(--font-scale));
  }
  .agenda-list > button {
    grid-template-columns: 32px 1fr 18px;
    padding: 11px 10px;
  }
  .agenda-list > button > em {
    grid-column: 2;
  }
  .quarter-close {
    align-items: stretch;
    flex-direction: column;
  }
  .quarter-close .primary {
    width: 100%;
    justify-content: center;
  }
}
@media (max-width: 980px) {
  .map-workspace {
    grid-template-columns: 1fr;
  }
  .state-map {
    min-height: 430px;
  }
  .district-panel {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .map-choice-grid {
    grid-template-columns: 1fr;
  }
  .campaign-choice-grid {
    grid-template-columns: 1fr;
  }
  .campaign-targets {
    grid-column: 1;
    grid-template-columns: 1fr;
  }
  .auth-globe {
    width: 420px;
    left: 50%;
    translate: -50% -50%;
  }
  .auth-copy {
    text-align: center;
  }
  .auth-copy p {
    margin-left: auto;
    margin-right: auto;
  }
}
@media (max-width: 600px) {
  .state-map {
    min-height: 340px;
  }
  .state-map svg {
    padding: 12px;
  }
  .state-map text {
    font-size: 12px;
  }
  .district-primary {
    grid-template-columns: 1fr;
  }
  .district-metrics {
    grid-template-columns: 1fr;
  }
  .regional-scope {
    flex-direction: column;
    gap: 7px;
  }
  .map-choice {
    min-height: 280px;
  }
  .auth-globe {
    width: 330px;
  }
  .wizard-progress {
    grid-template-columns: repeat(9, 36px);
    overflow-x: auto;
    justify-content: start;
  }
}

/* Main menu, save management and accessibility settings */
:root {
  --font-scale: 1;
}
html[data-font="system"] body {
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
}
html[data-font="serif"] body {
  font-family: Georgia, "Times New Roman", serif;
}
html[data-font="mono"] body {
  font-family: "Cascadia Mono", Consolas, "Courier New", monospace;
}
html[data-bold="true"]
  :is(p, span, small, label, td, th, button, input, select, em, output) {
  font-weight: 650 !important;
}
html[data-bold="true"] :is(h1, h2, h3, h4, b, strong) {
  font-weight: 750 !important;
}
.ui-icon {
  display: inline-block;
  flex: none;
  background: currentColor;
  mask-image: var(--icon);
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
  -webkit-mask-image: var(--icon);
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
}
html[data-graphics="reduced"] *,
html[data-graphics="reduced"] *::before,
html[data-graphics="reduced"] *::after {
  animation: none !important;
  transition: none !important;
  box-shadow: none !important;
  filter: none !important;
}
html[data-graphics="standard"] .ambient-line,
html[data-graphics="standard"] .status-scan {
  display: none;
}
html[data-graphics="standard"] .event-card,
html[data-graphics="standard"] .ai-card {
  animation: panel-in 0.22s ease-out both;
}
html[data-graphics="high"] .event-card,
html[data-graphics="high"] .decision-report {
  animation: panel-in 0.38s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
html[data-graphics="high"] .online,
html[data-graphics="high"] .menu-status i {
  animation: status-pulse 2s ease-in-out infinite;
}
html[data-graphics="high"] .ai-card {
  animation: panel-in 0.45s 0.08s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
html[data-graphics="high"] .meter span,
html[data-graphics="high"] .signal-track i {
  transition: width 0.65s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes status-pulse {
  0%,
  100% {
    opacity: 0.45;
    box-shadow: 0 0 0 0 #73c69c00;
  }
  50% {
    opacity: 1;
    box-shadow: 0 0 0 5px #73c69c16;
  }
}
.menu-shell,
.utility-shell {
  min-height: 100vh;
  background: #06090d;
  color: var(--text);
}
.menu-top {
  height: 84px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(24px, 5vw, 72px);
}
.menu-status {
  font-size: calc(8px * var(--font-scale));
  letter-spacing: 0.16em;
  color: #687985;
}
.menu-status i {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--green);
  margin-right: 8px;
}
.menu-main {
  min-height: calc(100vh - 118px);
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(360px, 520px);
  gap: 8vw;
  align-items: center;
  max-width: 1450px;
  margin: auto;
  padding: 48px clamp(24px, 6vw, 90px);
}
.menu-copy > span,
.utility-head span,
.settings-group > div > span {
  font-size: calc(9px * var(--font-scale));
  letter-spacing: 0.2em;
  color: #6d97a8;
}
.menu-copy h2 {
  font-size: clamp(
    calc(42px * var(--font-scale)),
    calc(5vw * var(--font-scale)),
    calc(72px * var(--font-scale))
  );
  font-weight: 500;
  line-height: 1.02;
  margin: 20px 0;
}
.menu-copy p {
  max-width: 540px;
  color: #7f8e98;
  line-height: 1.7;
  font-size: calc(13px * var(--font-scale));
}
.menu-actions {
  border-top: 1px solid var(--line);
}
.menu-actions > button {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  text-align: left;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: #dce5e9;
  padding: 18px 10px;
  position: relative;
}
.menu-actions > button:hover:not(:disabled) {
  background: #0d151c;
  padding-left: 16px;
}
.menu-actions > button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.menu-actions > button span {
  font-size: calc(12px * var(--font-scale));
  letter-spacing: 0.1em;
}
.menu-actions > button small {
  grid-column: 1;
  color: #667680;
  margin-top: 5px;
}
.menu-actions > button .glyph {
  grid-column: 2;
  grid-row: 1/3;
}
.menu-actions .continue {
  padding: 22px 12px;
  border-left: 2px solid var(--cyan);
  background: #0a1218;
}
.menu-actions .continue span {
  font-size: calc(9px * var(--font-scale));
  color: var(--cyan);
}
.menu-actions .continue b {
  grid-column: 1;
  font-size: calc(18px * var(--font-scale));
  margin-top: 7px;
}
.menu-actions .continue small {
  grid-column: 1;
}
.menu-shell > footer {
  height: 34px;
  border-top: 1px solid var(--line);
  padding: 11px clamp(24px, 5vw, 72px);
  font-size: calc(8px * var(--font-scale));
  letter-spacing: 0.13em;
  color: #52616c;
}
.utility-shell {
  padding-bottom: 60px;
}
.utility-head {
  height: 110px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 max(24px, calc((100vw - 1100px) / 2));
}
.utility-head > button {
  width: 38px;
  height: 38px;
  border: 1px solid #2b3944;
  background: #0a1117;
  color: #dce5e9;
  font-size: calc(23px * var(--font-scale));
}
.utility-head h1 {
  font-size: calc(24px * var(--font-scale));
  font-weight: 520;
  margin: 5px 0;
}
.slot-list {
  max-width: 1100px;
  margin: 30px auto;
  padding: 0 24px;
}
.save-slot {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: 22px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 24px 8px;
}
.slot-number {
  font-size: calc(24px * var(--font-scale));
  color: #40515d;
}
.save-slot h2 {
  font-size: calc(18px * var(--font-scale));
  margin: 6px 0;
}
.save-slot span {
  font-size: calc(8px * var(--font-scale));
  letter-spacing: 0.12em;
  color: #638494;
}
.save-slot p {
  font-size: calc(10px * var(--font-scale));
  color: #71818b;
}
.slot-metrics {
  display: flex;
  gap: 18px;
  font-size: calc(9px * var(--font-scale));
  color: #9baab2;
}
.slot-actions {
  display: flex;
  gap: 8px;
}
.slot-actions button {
  border-radius: 2px;
}
.slot-actions .danger {
  border: 1px solid #553438;
  background: transparent;
  color: #bf777d;
  padding: 10px 12px;
}
.save-slot.empty {
  opacity: 0.7;
}
.settings-screen {
  max-width: none;
}
.settings-group {
  max-width: 1100px;
  margin: auto;
  padding: 28px 24px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 40px;
}
.settings-group h2 {
  font-size: calc(17px * var(--font-scale));
  margin: 7px 0;
}
.settings-group p {
  font-size: calc(10px * var(--font-scale));
  color: #71818b;
  line-height: 1.5;
}
.setting-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: #25313a;
}
.setting-options button {
  border: 0;
  background: #090f15;
  color: #dce5e9;
  text-align: left;
  padding: 16px;
  min-height: 90px;
}
.setting-options button.selected {
  background: #10202a;
  box-shadow: inset 0 -2px var(--cyan);
}
.setting-options b,
.setting-options span {
  display: block;
}
.setting-options b {
  font-size: calc(12px * var(--font-scale));
}
.setting-options span {
  font-size: calc(9px * var(--font-scale));
  color: #71818b;
  margin-top: 7px;
  line-height: 1.4;
}
.font-options button:nth-child(2) {
  font-family: Georgia, serif;
}
.font-options button:nth-child(3) {
  font-family: Consolas, monospace;
}
.compact-setting {
  align-items: center;
}
.compact-setting input {
  width: 100%;
  accent-color: var(--cyan);
}
.toggle {
  justify-self: start;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  color: #85949d;
}
.toggle i {
  width: 38px;
  height: 20px;
  background: #25313a;
  position: relative;
}
.toggle i::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  background: #73838e;
  left: 3px;
  top: 3px;
  transition: left 0.18s;
}
.toggle.active i {
  background: #17313a;
}
.toggle.active i::after {
  left: 21px;
  background: var(--cyan);
}
@media (max-width: 760px) {
  .menu-main {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 38px;
  }
  .menu-copy h2 {
    font-size: calc(42px * var(--font-scale));
  }
  .menu-status {
    display: none;
  }
  .save-slot {
    grid-template-columns: 42px 1fr;
  }
  .slot-actions {
    grid-column: 2;
  }
  .settings-group {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .setting-options {
    grid-template-columns: 1fr;
  }
  .utility-head {
    padding: 0 18px;
  }
}

.menu-actions > button {
  grid-template-columns: 30px 1fr auto;
  column-gap: 12px;
  align-items: center;
  transition:
    background 0.18s,
    padding 0.18s,
    transform 0.18s;
}
.menu-actions > button > .ui-icon:first-child {
  grid-column: 1;
  grid-row: 1/3;
  color: #6f8793;
}
.menu-actions > button > span,
.menu-actions > button > b,
.menu-actions > button > small {
  grid-column: 2;
}
.menu-actions > button > .ui-icon:last-child {
  grid-column: 3;
  grid-row: 1/3;
}
.menu-actions .continue b,
.menu-actions .continue small {
  grid-column: 2;
}
.menu-actions > button:hover:not(:disabled) > .ui-icon:first-child {
  color: var(--cyan);
}
html[data-graphics="high"] .menu-actions > button:hover:not(:disabled) {
  transform: translateX(4px);
}
.slot-actions .primary,
.slot-actions .danger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.utility-head > button {
  display: grid;
  place-items: center;
}
.utility-head > button:hover {
  color: var(--cyan);
  border-color: #527381;
}
.settings-group > div > .ui-icon {
  float: left;
  margin: 1px 10px 18px 0;
  color: #6d97a8;
}
.settings-preview {
  max-width: 1052px;
  margin: 28px auto 4px;
  border: 1px solid #293844;
  background: #0a1117;
  padding: 22px;
  position: relative;
  overflow: hidden;
}
.settings-preview > div {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--cyan);
}
.settings-preview > div span {
  font-size: calc(8px * var(--font-scale));
  letter-spacing: 0.16em;
}
.settings-preview h2 {
  font-size: calc(22px * var(--font-scale));
  font-weight: 520;
  margin: 16px 0 6px;
}
.settings-preview p {
  font-size: calc(11px * var(--font-scale));
  color: #7c8c96;
  margin: 0;
}
.preview-meter {
  width: 180px;
  height: 2px;
  background: #22303a;
  margin-top: 20px;
}
.preview-meter i {
  display: block;
  width: 68%;
  height: 100%;
  background: var(--cyan);
}
html[data-graphics="high"] .preview-meter i {
  animation: preview-flow 1.8s ease-in-out infinite alternate;
}
html[data-graphics="standard"] .preview-meter i {
  transition: width 0.25s;
}
.range-control {
  display: grid;
  grid-template-columns: 1fr 60px;
  gap: 18px;
  align-items: center;
}
.range-control output {
  text-align: right;
  color: var(--cyan);
  font-variant-numeric: tabular-nums;
}
@keyframes preview-flow {
  from {
    width: 42%;
  }
  to {
    width: 86%;
  }
}
html[data-graphics="high"]
  :is(
    .catalog-card,
    .diplomacy article,
    .sector-grid article,
    .minister-grid article,
    .choice,
    .trait-card,
    .info-choice,
    .save-slot
  ) {
  transition:
    background 0.2s,
    border-color 0.2s,
    transform 0.2s,
    box-shadow 0.2s;
}
html[data-graphics="high"]
  :is(
    .catalog-card,
    .diplomacy article,
    .sector-grid article,
    .minister-grid article
  ):hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px #0005;
}
html[data-graphics="standard"] :is(button, .catalog-card, .diplomacy article) {
  transition:
    background 0.15s,
    border-color 0.15s;
}
html[data-graphics="reduced"] .settings-preview {
  background: #090e13;
}

.ui-icon {
  display: block;
  object-fit: contain;
  background: none !important;
  mask: none !important;
  -webkit-mask: none !important;
}
.brand-mark .ui-icon {
  width: 20px !important;
  height: 20px !important;
}
.nav button.active .ui-icon,
.primary .ui-icon {
  filter: brightness(1.35);
}
.wizard-shell {
  min-height: 100vh;
  padding: 0;
  background: #06090d;
}
.wizard-top {
  height: 72px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 4vw, 58px);
}
.wizard-top > button {
  border: 0;
  background: transparent;
  color: #6f7f89;
  font-size: calc(9px * var(--font-scale));
  letter-spacing: 0.1em;
}
.wizard-top > button:hover {
  color: #dce7eb;
}
.wizard-progress {
  height: 62px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  max-width: 1160px;
  margin: auto;
  border-bottom: 1px solid var(--line);
}
.wizard-progress > div {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #4e5c66;
  position: relative;
}
.wizard-progress > div::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--cyan);
  transition: width 0.25s;
}
.wizard-progress > div.active::after,
.wizard-progress > div.done::after {
  width: 100%;
}
.wizard-progress span {
  font-size: calc(8px * var(--font-scale));
  font-variant-numeric: tabular-nums;
}
.wizard-progress b {
  font-size: calc(9px * var(--font-scale));
  font-weight: 500;
}
.wizard-progress .active {
  color: #dce6ea;
}
.wizard-progress .active span,
.wizard-progress .done span {
  color: var(--cyan);
}
.wizard-main {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
  padding: 44px 0 52px;
}
.wizard-heading {
  max-width: 720px;
  margin-bottom: 30px;
}
.wizard-heading > span {
  font-size: calc(8px * var(--font-scale));
  letter-spacing: 0.18em;
  color: #6d97a8;
}
.wizard-heading h2 {
  font-size: calc(32px * var(--font-scale));
  font-weight: 520;
  margin: 12px 0 8px;
}
.wizard-heading p {
  font-size: calc(11px * var(--font-scale));
  line-height: 1.6;
  color: #74848e;
  max-width: 650px;
}
.wizard-content {
  min-height: 330px;
}
.name-step {
  display: block;
  max-width: 720px;
  padding-top: 36px;
}
.name-step > span {
  display: block;
  font-size: calc(8px * var(--font-scale));
  letter-spacing: 0.15em;
  color: #6d97a8;
  margin-bottom: 10px;
}
.name-step input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #3b4e5b;
  background: transparent;
  color: #edf3f5;
  font-size: calc(30px * var(--font-scale));
  padding: 13px 0;
  outline: 0;
}
.name-step input:focus {
  border-color: var(--cyan);
}
.name-step small {
  display: block;
  text-align: right;
  color: #53636e;
  margin-top: 8px;
}
.wizard-content .choice {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 6px 12px;
  align-content: start;
}
.wizard-content .choice > .ui-icon {
  grid-row: 1/3;
  color: #7994a1;
}
.wizard-content .choice > b,
.wizard-content .choice > span {
  grid-column: 2;
}
.wizard-content .info-choice > .ui-icon {
  margin-bottom: 10px;
}
.wizard-content .info-choice > small {
  display: block;
  color: #779ba9;
  font-size: calc(8px * var(--font-scale));
  margin-top: 12px;
}
.wizard-content .ai-level-grid {
  grid-template-columns: repeat(3, 1fr);
}
.priority-total {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 0 4px 13px;
  margin-bottom: 1px;
  color: #9a696d;
}
.priority-total > span {
  font-size: calc(8px * var(--font-scale));
  letter-spacing: 0.15em;
}
.priority-total strong {
  font-size: calc(24px * var(--font-scale));
  font-weight: 520;
}
.priority-total small {
  font-size: calc(10px * var(--font-scale));
  color: #677985;
}
.priority-total.valid {
  color: var(--green);
}
.setup-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: #23303a;
  margin-top: 14px;
}
.setup-summary > div {
  background: #090f15;
  padding: 13px;
}
.setup-summary span,
.setup-summary b {
  display: block;
}
.setup-summary span {
  font-size: calc(7px * var(--font-scale));
  letter-spacing: 0.14em;
  color: #617582;
}
.setup-summary b {
  font-size: calc(10px * var(--font-scale));
  margin-top: 5px;
}
.wizard-actions {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  margin-top: 26px;
  padding-top: 20px;
}
.wizard-actions button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.wizard-actions .secondary {
  background: transparent;
  border-color: transparent;
  color: #7d8d97;
}
.wizard-actions .secondary:hover {
  color: #dce7eb;
}
html[data-graphics="high"] .wizard-content {
  animation: wizard-in 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes wizard-in {
  from {
    opacity: 0;
    transform: translateX(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (max-width: 760px) {
  .wizard-progress b {
    display: none;
  }
  .wizard-progress {
    height: 48px;
  }
  .wizard-main {
    width: min(100% - 28px, 1160px);
    padding-top: 28px;
  }
  .wizard-heading h2 {
    font-size: calc(25px * var(--font-scale));
  }
  .wizard-content {
    min-height: 420px;
  }
  .wizard-content .ai-level-grid {
    grid-template-columns: 1fr;
  }
  .setup-summary {
    grid-template-columns: 1fr;
  }
  .wizard-top > button {
    font-size: 0;
  }
  .wizard-top > button::after {
    content: "Beenden";
    font-size: calc(9px * var(--font-scale));
  }
}

.wizard-progress {
  grid-template-columns: repeat(9, 1fr);
}
.map-choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.map-choice {
  text-align: left;
  border: 0;
  background: #080e13;
  color: #dce7ea;
  padding: 15px;
  min-height: 310px;
}
.map-choice:hover {
  background: #0c161d;
}
.map-choice.selected {
  background: #0d1d25;
  box-shadow: inset 0 -2px var(--cyan);
}
.map-choice-preview {
  height: 150px;
  border-bottom: 1px solid #20303a;
  margin: -4px -4px 14px;
  display: grid;
  place-items: center;
}
.map-choice-preview svg {
  width: 100%;
  height: 100%;
}
.map-choice-preview path {
  fill: #0d2029;
  stroke: #54899a;
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
  transition: 0.2s;
}
.map-choice:hover path,
.map-choice.selected path {
  fill: #123440;
  stroke: #7bd6e8;
}
.map-choice > span,
.map-choice > small {
  display: block;
  font-size: calc(7px * var(--font-scale));
  letter-spacing: 0.12em;
  color: #5f8797;
}
.map-choice > b {
  display: block;
  font-size: calc(16px * var(--font-scale));
  margin: 8px 0;
}
.map-choice > p {
  color: #7d8e98;
  font-size: calc(10px * var(--font-scale));
  line-height: 1.55;
  min-height: 48px;
}
.campaign-choice-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.campaign-choice {
  text-align: left;
  border: 0;
  background: #080e13;
  color: #dce7ea;
  padding: 18px;
  min-height: 160px;
}
.campaign-choice.selected {
  background: #10222b;
  box-shadow: inset 0 -2px var(--cyan);
}
.campaign-choice > span {
  display: block;
  font-size: calc(7px * var(--font-scale));
  letter-spacing: 0.14em;
  color: #6593a4;
}
.campaign-choice > b {
  display: block;
  font-size: calc(14px * var(--font-scale));
  margin: 10px 0;
}
.campaign-choice > p {
  color: #7b8c96;
  font-size: calc(10px * var(--font-scale));
  line-height: 1.5;
}
.campaign-targets {
  grid-column: 1/4;
  background: #081017;
  padding: 18px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.campaign-targets label > span {
  display: flex;
  justify-content: space-between;
  font-size: calc(8px * var(--font-scale));
  letter-spacing: 0.1em;
  color: #75909d;
}
.campaign-targets input {
  width: 100%;
  margin-top: 14px;
}
.tutorial-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  max-width: 900px;
  margin-top: 34px;
}
.tutorial-choice {
  min-height: 230px;
  padding: 30px;
  text-align: left;
  background: #091017;
  border: 0;
  border-bottom: 2px solid transparent;
  color: #dce7eb;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  transition:
    background 0.18s,
    border-color 0.18s,
    transform 0.18s;
}
.tutorial-choice:hover {
  background: #0d1821;
}
.tutorial-choice.selected {
  background: #10232d;
  border-color: var(--cyan);
}
.tutorial-choice > span {
  font-size: calc(8px * var(--font-scale));
  letter-spacing: 0.16em;
  color: var(--cyan);
}
.tutorial-choice > b {
  font-size: calc(18px * var(--font-scale));
  font-weight: 600;
}
.tutorial-choice > p {
  color: #8195a0;
  line-height: 1.65;
  margin: 0;
  max-width: 390px;
}

.tutorial-layer {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(2, 5, 8, 0.2),
    transparent 35%,
    rgba(2, 5, 8, 0.12)
  );
}
.tutorial-card {
  pointer-events: auto;
  position: fixed;
  right: 26px;
  bottom: 34px;
  width: min(410px, calc(100vw - 32px));
  padding: 20px 22px;
  background: #0b141b;
  border: 1px solid #4d8499;
  border-top: 3px solid var(--cyan);
  box-shadow:
    0 18px 70px #000,
    0 0 32px rgba(77, 188, 225, 0.12);
  z-index: 202;
}
.tutorial-card-head {
  display: flex;
  justify-content: space-between;
  color: var(--cyan);
  font-size: calc(8px * var(--font-scale));
  letter-spacing: 0.14em;
}
.tutorial-card > .meter {
  margin: 12px 0 18px;
  height: 2px;
}
.tutorial-card h2 {
  font-size: calc(19px * var(--font-scale));
  margin: 0 0 9px;
  color: #f0f5f7;
}
.tutorial-card p {
  font-size: calc(10px * var(--font-scale));
  line-height: 1.65;
  color: #9cafb8;
  margin: 0;
}
.tutorial-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}
.tutorial-actions > button:first-child {
  border: 0;
  background: transparent;
  color: #6f828d;
  padding: 8px 0;
}
.tutorial-actions .primary {
  display: flex;
  align-items: center;
  gap: 7px;
}
.tutorial-actions > span {
  font-size: calc(7px * var(--font-scale));
  letter-spacing: 0.11em;
  color: var(--cyan);
  text-align: right;
}
.tutorial-target {
  position: relative !important;
  z-index: 201 !important;
  outline: 2px solid var(--cyan) !important;
  outline-offset: 5px;
  box-shadow:
    0 0 0 5px rgba(93, 206, 238, 0.12),
    0 0 35px rgba(93, 206, 238, 0.32) !important;
}
html[data-graphics="high"] .tutorial-target {
  animation: tutorial-focus 1.25s ease-in-out infinite alternate;
}
@keyframes tutorial-focus {
  from {
    outline-color: #4ba7c6;
    box-shadow:
      0 0 0 4px rgba(93, 206, 238, 0.08),
      0 0 18px rgba(93, 206, 238, 0.18);
  }
  to {
    outline-color: #83e3ff;
    box-shadow:
      0 0 0 7px rgba(93, 206, 238, 0.14),
      0 0 42px rgba(93, 206, 238, 0.38);
  }
}
html[data-graphics="reduced"] .tutorial-target {
  animation: none !important;
}
.tutorial-card .ui-icon {
  filter: none;
}
@media (max-width: 760px) {
  .tutorial-choice-grid {
    grid-template-columns: 1fr;
  }
  .tutorial-choice {
    min-height: 170px;
  }
  .tutorial-card {
    right: 16px;
    bottom: 16px;
  }
  .wizard-progress {
    overflow: hidden;
  }
  .wizard-progress > div {
    min-width: 0;
  }
  .tutorial-target {
    outline-offset: 2px;
  }
}

/* Structured policy, investment and research workspaces */
.nav-group + .nav-group {
  margin-top: 20px;
}
.nav-group .nav-section {
  padding-bottom: 7px;
}
.resource-head {
  align-items: flex-end;
  margin-bottom: 0;
}
.resource-head > div:first-child > p {
  margin: 7px 0 0;
  color: #71828c;
  font-size: calc(10px * var(--font-scale));
}
.resource-strip {
  display: flex;
  gap: 1px;
  background: var(--line);
}
.resource-strip > div {
  min-width: 112px;
  background: #090f15;
  padding: 10px 13px;
}
.resource-strip span,
.resource-strip b {
  display: block;
}
.resource-strip span {
  font-size: calc(7px * var(--font-scale));
  letter-spacing: 0.12em;
  color: #647985;
}
.resource-strip b {
  font-size: calc(13px * var(--font-scale));
  margin-top: 5px;
  font-variant-numeric: tabular-nums;
}
.catalog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.department-tabs {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
}
.department-tabs button,
.scope-filter button,
.research-tabs button {
  border: 0;
  background: transparent;
  color: #71838e;
  padding: 8px 10px;
  font-size: calc(9px * var(--font-scale));
}
.department-tabs button:hover,
.scope-filter button:hover,
.research-tabs button:hover {
  color: #dce7eb;
  background: #0d151c;
}
.department-tabs button.active,
.scope-filter button.active {
  color: #e8f2f5;
  background: #12212a;
}
.department-tabs button span {
  margin-left: 7px;
  color: #506874;
}
.scope-filter {
  display: flex;
  border: 1px solid var(--line);
  flex: none;
}
.scope-filter button + button {
  border-left: 1px solid var(--line);
}
.catalog-workspace {
  display: grid !important;
  grid-template-columns: minmax(420px, 1fr) minmax(340px, 440px) !important;
  gap: 1px !important;
  max-width: none !important;
  margin: 18px 0 0 !important;
  border: 1px solid var(--line);
  background: var(--line) !important;
  align-items: stretch;
}
.measure-list {
  background: #080d12;
  min-height: 540px;
}
.list-caption {
  display: flex;
  justify-content: space-between;
  padding: 12px 17px;
  border-bottom: 1px solid var(--line);
  font-size: calc(8px * var(--font-scale));
  letter-spacing: 0.13em;
  color: #66808e;
}
.measure-list > button {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  text-align: left;
  padding: 15px 17px;
  background: #090f15;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: #dce5e9;
  position: relative;
}
.measure-list > button:hover {
  background: #0d171e;
}
.measure-list > button.selected {
  background: #10202a;
  box-shadow: inset 2px 0 var(--cyan);
}
.measure-list > button.owned {
  opacity: 0.68;
}
.measure-list > button > div:first-child,
.measure-list > button h3,
.measure-list > button p {
  grid-column: 1;
}
.measure-list > button h3 {
  font-size: calc(14px * var(--font-scale));
  margin: 9px 0 5px;
}
.measure-list > button p {
  font-size: calc(10px * var(--font-scale));
  line-height: 1.45;
  color: #7f909a;
  margin: 0;
  max-width: 650px;
}
.status-label {
  font-size: calc(7px * var(--font-scale));
  letter-spacing: 0.12em;
  color: var(--green);
  margin-left: 8px;
}
.measure-meta {
  grid-column: 2 !important;
  grid-row: 1/4;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 5px;
  color: #93a5af;
  font-size: calc(9px * var(--font-scale));
  font-variant-numeric: tabular-nums;
}
.measure-meta .ui-icon {
  margin-top: 5px;
  opacity: 0.45;
}
.measure-inspector {
  background: #0b1218;
  padding: 25px;
  display: flex;
  flex-direction: column;
  min-height: 540px;
  position: sticky;
  top: 0;
}
.inspector-heading > span,
.measure-inspector section > h3,
.decision-block span {
  font-size: calc(8px * var(--font-scale));
  letter-spacing: 0.14em;
  color: #648393;
}
.inspector-heading h2 {
  font-size: calc(22px * var(--font-scale));
  line-height: 1.22;
  margin: 12px 0 9px;
}
.inspector-heading p {
  font-size: calc(11px * var(--font-scale));
  line-height: 1.6;
  color: #8999a2;
  margin: 0;
}
.measure-inspector section {
  border-top: 1px solid var(--line);
  margin-top: 22px;
  padding-top: 16px;
}
.measure-inspector section > h3 {
  margin: 0 0 11px;
}
.effect-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.effect-chips > span {
  border: 1px solid #263640;
  background: #0a1015;
  padding: 7px 8px;
  font-size: calc(8px * var(--font-scale));
  color: #8b9ba4;
}
.effect-chips b {
  color: #dce7eb;
  margin-left: 3px;
}
.effect-chips .benefit {
  border-left-color: #579a79;
}
.effect-chips .cost {
  border-left-color: #ad6c6c;
}
.delayed-impact {
  border-left: 2px solid var(--amber);
  padding-left: 11px;
}
.delayed-impact + .delayed-impact {
  margin-top: 13px;
}
.delayed-impact > span {
  font-size: calc(7px * var(--font-scale));
  letter-spacing: 0.12em;
  color: var(--amber);
}
.delayed-impact > p,
.muted-copy {
  font-size: calc(9px * var(--font-scale));
  line-height: 1.5;
  color: #7d8e98;
}
.decision-block {
  margin-top: auto;
  padding-top: 24px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
}
.decision-block span,
.decision-block b {
  display: block;
}
.decision-block b {
  font-size: calc(12px * var(--font-scale));
  margin-top: 5px;
}
.decision-block .primary:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}
.research-tabs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: 16px;
}
.research-tabs button {
  background: #090f15;
  text-align: left;
  padding: 13px 15px;
  display: flex;
  justify-content: space-between;
}
.research-tabs button.active {
  background: #10202a;
  color: #edf5f7;
  box-shadow: inset 0 -2px var(--cyan);
}
.research-tabs button span {
  color: #5f7c89;
}
.research-workspace {
  display: grid !important;
  grid-template-columns: minmax(380px, 1fr) minmax(340px, 440px) !important;
  gap: 1px !important;
  max-width: none !important;
  margin: 18px 0 0 !important;
  background: var(--line) !important;
  border: 1px solid var(--line);
}
.tech-path {
  background: #080d12;
  padding: 24px;
  min-height: 540px;
}
.path-heading {
  margin-bottom: 25px;
}
.path-heading > span {
  font-size: calc(8px * var(--font-scale));
  letter-spacing: 0.15em;
  color: #617e8c;
}
.path-heading h3 {
  font-size: calc(20px * var(--font-scale));
  margin: 7px 0;
}
.tech-path > button {
  width: 100%;
  min-height: 112px;
  display: grid;
  grid-template-columns: 74px 42px 1fr;
  align-items: center;
  text-align: left;
  border: 0;
  border-top: 1px solid var(--line);
  background: #090f15;
  color: #dce6ea;
  padding: 15px;
  position: relative;
}
.tech-path > button:last-child {
  border-bottom: 1px solid var(--line);
}
.tech-path > button:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 109px;
  bottom: -14px;
  height: 28px;
  width: 1px;
  background: #42616e;
  z-index: 2;
}
.tech-path > button:hover {
  background: #0d171e;
}
.tech-path > button.selected {
  background: #10202a;
  box-shadow: inset 2px 0 var(--cyan);
}
.tech-path > button.locked {
  opacity: 0.48;
}
.tech-level {
  font-size: calc(8px * var(--font-scale));
  letter-spacing: 0.12em;
  color: #66808c;
}
.tech-path > button > i {
  width: 30px;
  height: 30px;
  border: 1px solid #39515d;
  display: grid;
  place-items: center;
  font-style: normal;
  color: var(--cyan);
}
.tech-path > button.done > i {
  background: #173126;
  border-color: #4e8a6a;
  color: var(--green);
}
.tech-path > button div b,
.tech-path > button div span {
  display: block;
}
.tech-path > button div b {
  font-size: calc(14px * var(--font-scale));
}
.tech-path > button div span {
  font-size: calc(8px * var(--font-scale));
  letter-spacing: 0.1em;
  color: #70838e;
  margin-top: 7px;
}
.requirement {
  border-left: 2px solid var(--green);
  padding: 9px 11px;
  color: #8fa69a;
  background: #0a1511;
  font-size: calc(9px * var(--font-scale));
}
.requirement.missing {
  border-color: var(--amber);
  color: #ae9b79;
  background: #16130d;
}
.subview-tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
  margin: 16px 0;
}
.subview-tabs button {
  border: 0;
  background: transparent;
  color: #71828d;
  padding: 12px 16px;
  border-bottom: 2px solid transparent;
}
.subview-tabs button.active {
  color: #e7f1f4;
  border-color: var(--cyan);
  background: #0d171e;
}
.subview-tabs button span {
  margin-left: 8px;
  color: #55717e;
}
.sector-overview {
  max-width: none;
  grid-template-columns: repeat(3, 1fr);
}
html[data-graphics="high"]
  :is(
    .measure-list > button,
    .tech-path > button,
    .department-tabs button,
    .research-tabs button
  ) {
  transition:
    background 0.18s,
    color 0.18s,
    box-shadow 0.18s;
}
@media (max-width: 1050px) {
  .catalog-workspace,
  .research-workspace {
    grid-template-columns: 1fr !important;
  }
  .measure-inspector {
    position: static;
    min-height: 440px;
  }
  .research-tabs {
    grid-template-columns: repeat(3, 1fr);
  }
  .sector-overview {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 760px) {
  .nav-group {
    display: contents;
  }
  .nav-group + .nav-group {
    margin: 0;
  }
  .resource-head {
    align-items: flex-start;
  }
  .resource-strip {
    width: 100%;
    margin-top: 14px;
    overflow: auto;
  }
  .catalog-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
  .department-tabs {
    flex-wrap: nowrap;
    width: 100%;
    overflow-x: auto;
  }
  .department-tabs button {
    white-space: nowrap;
  }
  .research-tabs {
    display: flex;
    overflow-x: auto;
  }
  .research-tabs button {
    min-width: 130px;
  }
  .catalog-workspace,
  .research-workspace {
    margin-top: 12px !important;
  }
  .measure-list > button {
    grid-template-columns: 1fr;
  }
  .measure-meta {
    grid-column: 1 !important;
    grid-row: auto;
    align-items: flex-start;
    flex-direction: row;
    margin-top: 10px;
  }
  .measure-meta .ui-icon {
    margin: 0 0 0 auto;
  }
  .measure-inspector {
    padding: 20px;
    min-height: 420px;
  }
  .tech-path {
    padding: 14px;
  }
  .tech-path > button {
    grid-template-columns: 62px 36px 1fr;
  }
  .tech-path > button:not(:last-child)::after {
    left: 93px;
  }
  .decision-block {
    align-items: stretch;
    flex-direction: column;
  }
}

/* Interface-wide legibility, focus and explanation pass */
:root {
  --muted-readable: #8b9ba5;
  --muted-strong: #a1afb7;
}
:is(button, input, select, [tabindex]):focus-visible {
  outline: 2px solid var(--cyan) !important;
  outline-offset: 2px;
  z-index: 5;
}
button:disabled {
  cursor: not-allowed;
}
.app
  :is(
    p,
    td,
    .choice span,
    .trait-card div > span,
    .info-choice > p,
    .measure-list > button p,
    .inspector-heading p,
    .ai-findings p,
    .advisor-note p
  ) {
  color: var(--muted-readable);
}
.event-card > p,
.report-summary,
.menu-copy p,
.wizard-heading p,
.settings-preview p {
  color: var(--muted-strong);
}
.advisor-note {
  border-left-color: #547181;
  background: #091017;
  padding: 14px 16px;
}
.advisor-note p {
  font-size: calc(11px * var(--font-scale));
  line-height: 1.65;
}
.advisor-note > span {
  color: #7db1c3;
}
.event-options button {
  min-height: 82px;
  padding: 15px 10px;
}
.event-options button > div {
  min-width: 0;
}
.event-options button > div > span {
  color: #94a3ab;
  line-height: 1.45;
}
.event-options button:hover:not(:disabled),
.event-options button:focus-visible {
  background: #111d25;
  box-shadow: inset 3px 0 var(--cyan);
}
.choice-preview {
  display: block;
  margin-top: 9px;
  color: #718894;
  font-size: calc(8px * var(--font-scale));
  letter-spacing: 0.06em;
  line-height: 1.45;
}
.choice-preview i {
  font-style: normal;
  color: #78b2c5;
  font-size: calc(7px * var(--font-scale));
  letter-spacing: 0.12em;
  margin-right: 7px;
}
.choice-preview i:not(:first-child) {
  margin-left: 12px;
  color: var(--amber);
}
.watchlist .all-clear {
  grid-template-columns: 20px 1fr !important;
  padding: 13px 0 !important;
}
.watchlist .all-clear i {
  border-color: #47775e !important;
  color: var(--green) !important;
}
.watchlist .all-clear span {
  color: #9baba4;
}
.watchlist .all-clear b {
  grid-column: 2;
  margin-top: 3px;
  color: #668d77;
}
.watchlist .warning-row {
  background: #120f0b;
  padding-left: 5px !important;
  padding-right: 5px !important;
}
.watchlist .warning-row b {
  color: var(--amber) !important;
}
[data-tip] {
  position: relative;
  cursor: help;
}
[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  left: 0;
  bottom: calc(100% + 9px);
  width: max-content;
  max-width: 280px;
  padding: 9px 11px;
  background: #111c24;
  border: 1px solid #3b5664;
  color: #d5e1e6;
  font-size: calc(9px * var(--font-scale));
  font-weight: 500;
  line-height: 1.45;
  text-transform: none;
  letter-spacing: 0;
  box-shadow: 0 10px 30px #000b;
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition:
    opacity 0.15s,
    transform 0.15s;
  z-index: 300;
  pointer-events: none;
}
[data-tip]:hover::after,
[data-tip]:focus-visible::after {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.turn[data-tip]::after,
.forecast [data-tip]::after {
  left: auto;
  right: 0;
}
.state-rail [data-tip]::after {
  left: 4px;
}
.signal[data-tip] {
  padding: 2px 0;
}
.setting-options button,
.tutorial-choice,
.choice,
.trait-card,
.info-choice,
.save-slot,
.measure-list > button,
.tech-path > button {
  min-width: 0;
}
.setting-options button:focus-visible,
.choice:focus-visible,
.trait-card:focus-visible,
.info-choice:focus-visible,
.tutorial-choice:focus-visible {
  box-shadow: inset 0 -2px var(--cyan);
}
.table-card th {
  color: #91a3ad;
}
.table-card td {
  color: #a8b5bc;
}
.table-card tbody tr:hover {
  background: #0e1820;
}
.sector-grid article > span,
.sector-grid small,
.minister-effect,
.diplomacy .mini {
  color: #84959f;
}
.reaction-list p {
  color: #8d9ca5;
}
.delayed-list p {
  color: #9aa8af;
}
.menu-actions > button small,
.save-slot p,
.settings-group p,
.setting-options span,
.wizard-heading p,
.info-choice > p {
  color: #82939d;
}
.wizard-progress > div {
  min-width: 0;
}
.wizard-progress b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wizard-actions button,
.menu-actions > button,
.setting-options button {
  min-height: 42px;
}
.resource-strip > div {
  min-height: 58px;
}
.resource-strip span {
  color: #78909c;
}
.department-tabs button,
.scope-filter button,
.research-tabs button,
.subview-tabs button {
  min-height: 40px;
}
.measure-list > button,
.tech-path > button {
  contain: layout paint;
}
@media (max-width: 1350px) and (min-width: 981px) {
  .command-grid {
    grid-template-columns: 205px minmax(430px, 1fr) 280px;
  }
  .state-rail {
    padding: 24px 18px;
  }
  .sovereign-panel {
    padding: 18px 12px;
  }
  .command-main {
    padding: 22px;
  }
  .advisor-note {
    grid-template-columns: 90px 1fr;
  }
}
@media (max-width: 900px) {
  [data-tip]::after {
    max-width: 220px;
  }
  .resource-strip > div {
    min-width: 130px;
  }
  .page-head h2 {
    overflow-wrap: anywhere;
  }
}
@media (max-width: 760px) {
  .event-options button {
    min-height: 96px;
  }
  .choice-preview i:not(:first-child) {
    display: block;
    margin: 5px 0 0;
  }
  .state-rail [data-tip]::after {
    display: none;
  }
  .table-card {
    max-width: 100%;
    overflow-x: auto;
  }
  .table-card table {
    min-width: 760px;
  }
  .sector-overview {
    grid-template-columns: 1fr;
  }
  .tutorial-card {
    max-height: min(48vh, 390px);
    overflow: auto;
  }
  .wizard-actions {
    position: sticky;
    bottom: 0;
    background: #06090d;
    z-index: 10;
    padding-bottom: 10px;
  }
}
html[data-graphics="reduced"] [data-tip]::after {
  transition: none;
}

/* Active guided tutorial: fixed stacking, adaptive placement and click beacon */
.tutorial-layer {
  z-index: 1000;
  background: linear-gradient(
    90deg,
    rgba(2, 5, 8, 0.18),
    transparent 42%,
    rgba(2, 5, 8, 0.1)
  );
}
.tutorial-layer.action-required {
  background: rgba(2, 5, 8, 0.2);
}
.tutorial-card {
  z-index: 1002;
  right: auto;
  bottom: auto;
  max-height: calc(100vh - 32px);
  overflow: auto;
}
.tutorial-target {
  z-index: auto !important;
  isolation: auto;
  outline-width: 2px !important;
  outline-offset: 5px;
  scroll-margin: 100px;
}
.tutorial-action-target {
  outline-width: 3px !important;
  outline-color: #8ee9ff !important;
  cursor: pointer !important;
}
.tutorial-click-marker {
  position: fixed;
  z-index: 1003;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #071015;
  background: var(--cyan);
  border: 1px solid #b9f4ff;
  padding: 7px 10px;
  box-shadow:
    0 6px 25px #000c,
    0 0 22px rgba(121, 207, 227, 0.5);
  font-size: calc(8px * var(--font-scale));
  font-weight: 800;
  letter-spacing: 0.12em;
  white-space: nowrap;
  transform: translate(-50%, -50%);
}
.tutorial-click-marker i {
  font-style: normal;
  font-size: calc(18px * var(--font-scale));
  line-height: 0.7;
}
.tutorial-click-marker::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  border: 7px solid transparent;
  border-top-color: var(--cyan);
  transform: translateX(-50%);
}
html[data-graphics="high"] .tutorial-click-marker {
  animation: click-beacon 0.72s ease-in-out infinite alternate;
}
html[data-graphics="high"] .tutorial-action-target {
  animation: tutorial-action-focus 0.78s ease-in-out infinite alternate;
}
@keyframes click-beacon {
  from {
    transform: translate(-50%, -50%);
  }
  to {
    transform: translate(-50%, calc(-50% + 7px));
  }
}
@keyframes tutorial-action-focus {
  from {
    outline-offset: 3px;
    filter: brightness(1);
  }
  to {
    outline-offset: 8px;
    filter: brightness(1.14);
  }
}
.tutorial-nudge {
  animation: tutorial-nudge 0.24s ease-in-out 2 !important;
}
@keyframes tutorial-nudge {
  0%,
  100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(5px);
  }
}
@media (max-width: 760px) {
  .tutorial-layer {
    background: rgba(2, 5, 8, 0.12);
  }
  .tutorial-card {
    width: calc(100vw - 32px);
    max-height: 42vh;
  }
  .tutorial-click-marker {
    font-size: calc(7px * var(--font-scale));
    padding: 6px 8px;
  }
  .tutorial-target {
    scroll-margin: 170px;
  }
}
html[data-graphics="reduced"]
  :is(.tutorial-click-marker, .tutorial-action-target, .tutorial-nudge) {
  animation: none !important;
  filter: none !important;
}

.tutorial-layer,
.tutorial-layer.action-required {
  background: transparent;
}
.tutorial-focus-frame {
  position: fixed;
  z-index: 1001;
  pointer-events: none;
  border: 3px solid #72cde4;
  background: rgba(16, 38, 48, 0.08);
  box-shadow:
    0 0 0 9999px rgba(2, 5, 8, 0.58),
    0 0 0 5px rgba(114, 205, 228, 0.16),
    0 0 32px rgba(114, 205, 228, 0.38);
  transition:
    left 0.18s ease,
    top 0.18s ease,
    width 0.18s ease,
    height 0.18s ease;
}
.tutorial-focus-frame > span {
  position: absolute;
  left: -3px;
  top: -29px;
  height: 27px;
  display: flex;
  align-items: center;
  background: #72cde4;
  color: #061016;
  padding: 0 10px;
  font-size: calc(8px * var(--font-scale));
  font-weight: 800;
  letter-spacing: 0.12em;
  white-space: nowrap;
}
.tutorial-focus-frame.clickable {
  border-width: 4px;
  border-color: #a1ecff;
  background: rgba(68, 180, 210, 0.1);
  box-shadow:
    0 0 0 9999px rgba(2, 5, 8, 0.68),
    0 0 0 7px rgba(126, 222, 246, 0.2),
    0 0 42px rgba(126, 222, 246, 0.55);
}
.tutorial-focus-frame.clickable > span {
  left: -4px;
  background: #a1ecff;
}
html[data-graphics="high"] .tutorial-focus-frame.clickable {
  animation: frame-attention 0.8s ease-in-out infinite alternate;
}
@keyframes frame-attention {
  from {
    border-color: #70cbe2;
    box-shadow:
      0 0 0 9999px rgba(2, 5, 8, 0.65),
      0 0 0 5px rgba(126, 222, 246, 0.14),
      0 0 24px rgba(126, 222, 246, 0.38);
  }
  to {
    border-color: #c5f5ff;
    box-shadow:
      0 0 0 9999px rgba(2, 5, 8, 0.7),
      0 0 0 9px rgba(126, 222, 246, 0.24),
      0 0 48px rgba(126, 222, 246, 0.62);
  }
}
@media (max-width: 760px) {
  .tutorial-focus-frame {
    box-shadow:
      0 0 0 9999px rgba(2, 5, 8, 0.48),
      0 0 0 4px rgba(114, 205, 228, 0.18);
  }
  .tutorial-focus-frame.clickable {
    box-shadow:
      0 0 0 9999px rgba(2, 5, 8, 0.58),
      0 0 0 5px rgba(126, 222, 246, 0.2);
  }
  .tutorial-focus-frame > span {
    top: -25px;
    height: 23px;
    font-size: calc(7px * var(--font-scale));
  }
}
html[data-graphics="reduced"] .tutorial-focus-frame {
  transition: none !important;
  animation: none !important;
}

.tutorial-target,
.tutorial-action-target {
  animation: none !important;
  outline: none !important;
  box-shadow: none !important;
  filter: none !important;
}
.tutorial-focus-frame.clickable {
  animation: frame-border-pulse 0.8s ease-in-out infinite alternate !important;
}
@keyframes frame-border-pulse {
  from {
    border-color: #72cde4;
  }
  to {
    border-color: #d2f8ff;
  }
}

.audio-settings > div:first-child > .toggle {
  margin-top: 16px;
}
.audio-mixer {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.audio-range {
  display: grid;
  grid-template-columns: 180px 1fr 52px;
  align-items: center;
  gap: 16px;
  background: #090f15;
  padding: 13px 15px;
  color: #a6b4bc;
}
.audio-range span {
  font-size: calc(10px * var(--font-scale));
}
.audio-range input {
  width: 100%;
  accent-color: var(--cyan);
}
.audio-range output {
  text-align: right;
  color: var(--cyan);
  font-size: calc(9px * var(--font-scale));
  font-variant-numeric: tabular-nums;
}
@media (max-width: 760px) {
  .audio-range {
    grid-template-columns: 1fr 50px;
  }
  .audio-range span {
    grid-column: 1/3;
  }
  .audio-range input {
    grid-column: 1;
  }
  .audio-range output {
    grid-column: 2;
  }
}

.auth-shell {
  min-height: 100vh;
  background: #06090d;
}
.auth-shell > header {
  height: 84px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 clamp(24px, 5vw, 72px);
}
.auth-shell > main {
  min-height: calc(100vh - 84px);
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(360px, 500px);
  align-items: center;
  gap: 8vw;
  max-width: 1400px;
  margin: auto;
  padding: 48px clamp(24px, 6vw, 90px);
}
.auth-copy > span {
  font-size: calc(9px * var(--font-scale));
  letter-spacing: 0.2em;
  color: #6d97a8;
}
.auth-copy h2 {
  font-size: clamp(
    calc(42px * var(--font-scale)),
    calc(5vw * var(--font-scale)),
    calc(68px * var(--font-scale))
  );
  font-weight: 500;
  line-height: 1.03;
  margin: 20px 0;
}
.auth-copy p {
  max-width: 570px;
  color: #91a1aa;
  line-height: 1.7;
  font-size: calc(12px * var(--font-scale));
}
.auth-panel {
  border: 1px solid #2a3a45;
  background: #091017;
  padding: 28px;
}
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: -28px -28px 28px;
  background: var(--line);
  gap: 1px;
}
.auth-tabs button {
  border: 0;
  background: #080d12;
  color: #71828c;
  padding: 14px;
}
.auth-tabs button.active {
  background: #10202a;
  color: #e9f3f6;
  box-shadow: inset 0 -2px var(--cyan);
}
.auth-panel > h2 {
  font-size: calc(24px * var(--font-scale));
  margin: 9px 0 24px;
}
.auth-panel > label {
  display: block;
  margin: 17px 0;
}
.auth-panel > label > span {
  display: block;
  font-size: calc(8px * var(--font-scale));
  letter-spacing: 0.14em;
  color: #7895a2;
  margin-bottom: 8px;
}
.auth-panel input {
  width: 100%;
  height: 45px;
  border: 1px solid #30414d;
  background: #070c11;
  color: #edf4f6;
  padding: 0 12px;
  outline: 0;
}
.auth-panel input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 2px rgba(121, 207, 227, 0.12);
}
.auth-panel > .primary {
  width: 100%;
  justify-content: center;
  margin-top: 10px;
}
.auth-panel > small {
  display: block;
  color: #71838d;
  line-height: 1.5;
  margin-top: 13px;
}
.auth-error {
  border-left: 2px solid var(--red);
  background: #190d10;
  color: #dba0a3 !important;
  padding: 10px 12px;
  font-size: calc(10px * var(--font-scale));
}
.auth-success {
  margin: 0;
  padding: 12px 14px;
  border-left: 2px solid var(--green);
  background: rgba(102, 210, 161, 0.08);
  color: var(--green);
}
.auth-loading {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
  background: #06090d;
  color: var(--cyan);
}
.auth-loading span {
  font-size: calc(8px * var(--font-scale));
  letter-spacing: 0.16em;
}
.account-status {
  display: flex;
  align-items: center;
  gap: 18px;
}
.account-status > span {
  font-size: calc(9px * var(--font-scale));
  letter-spacing: 0.1em;
  color: #9baab2;
}
.account-status > span i {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--green);
  margin-right: 7px;
}
.account-status button {
  border: 1px solid #2a3a45;
  background: #0a1117;
  color: #8798a2;
  padding: 8px 10px;
}
.account-status button:hover {
  color: #e6eff2;
  border-color: #526d7a;
}
.auth-panel label > small {
  display: block;
  color: #71838d;
  margin-top: 7px;
  line-height: 1.4;
}
.auth-panel .auth-remember {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  cursor: pointer;
  margin: 20px 0;
}
.auth-panel .auth-remember > input {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  margin: 2px 0 0;
  padding: 0;
  accent-color: var(--cyan);
}
.auth-panel .auth-remember > span {
  display: block;
  margin: 0;
  letter-spacing: 0;
}
.auth-panel .auth-remember b {
  display: block;
  color: #c9d6dc;
  font-size: calc(10px * var(--font-scale));
  font-weight: 600;
}
.auth-panel .auth-remember small {
  display: block;
  color: #71838d;
  font-size: calc(8px * var(--font-scale));
  margin-top: 4px;
  line-height: 1.45;
}
.auth-copy {
  position: relative;
  isolation: isolate;
}
.auth-copy > span,
.auth-copy > h2,
.auth-copy > p {
  position: relative;
  z-index: 2;
}
.auth-globe {
  position: absolute;
  z-index: 0;
  width: min(720px, 58vw);
  aspect-ratio: 1;
  left: -180px;
  top: 50%;
  translate: 0 -50%;
  border: 1px solid rgba(109, 174, 194, 0.18);
  border-radius: 50%;
  opacity: 0.55;
  overflow: hidden;
  animation: globe-drift 38s linear infinite;
  pointer-events: none;
}
.globe-longitudes,
.globe-latitudes {
  position: absolute;
  inset: 0;
}
.globe-longitudes i,
.globe-latitudes i {
  position: absolute;
  inset: 7%;
  border: 1px solid rgba(112, 191, 211, 0.2);
  border-radius: 50%;
}
.globe-longitudes i:nth-child(1) {
  transform: scaleX(0.22);
}
.globe-longitudes i:nth-child(2) {
  transform: scaleX(0.5);
}
.globe-longitudes i:nth-child(3) {
  transform: scaleX(0.74);
}
.globe-longitudes i:nth-child(4) {
  transform: scaleX(0.9);
}
.globe-latitudes i:nth-child(1) {
  transform: scaleY(0.22);
}
.globe-latitudes i:nth-child(2) {
  transform: scaleY(0.5);
}
.globe-latitudes i:nth-child(3) {
  transform: scaleY(0.74);
}
.globe-latitudes i:nth-child(4) {
  transform: scaleY(0.9);
}
.auth-globe > span {
  position: absolute;
  inset: 20%;
  border: 1px dashed rgba(112, 191, 211, 0.13);
  border-radius: 46% 54% 58% 42%;
  transform: rotate(28deg);
}
@keyframes globe-drift {
  to {
    transform: rotate(360deg);
  }
}
html[data-graphics="reduced"] .auth-globe {
  animation: none;
}
@media (max-width: 980px) {
  .auth-globe {
    width: 540px;
    left: 50%;
    translate: -50% -50%;
  }
}
@media (max-width: 600px) {
  .auth-globe {
    width: 390px;
    left: 50%;
    translate: -50% -50%;
  }
}

/* Leader identity and international competition */
.identity-setup {
  display: grid;
  grid-template-columns: minmax(250px, 0.7fr) minmax(460px, 1.3fr);
  border: 1px solid var(--line);
  background: #091118;
  min-height: 470px;
}
.leader-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 34px;
  border-right: 1px solid var(--line);
  background: radial-gradient(
    circle at 50% 40%,
    rgba(85, 205, 230, 0.1),
    transparent 45%
  );
}
.leader-preview > span,
.leader-preview > small {
  color: var(--muted);
}
.leader-preview > b {
  font-size: 22px;
}
.identity-controls {
  padding: 28px;
  display: grid;
  gap: 18px;
  align-content: center;
}
.identity-controls > label {
  display: grid;
  gap: 7px;
}
.identity-controls > label > span,
.creator-row > span,
.creator-swatches > span {
  color: var(--cyan);
  font-size: 10px;
  letter-spacing: 1.5px;
}
.identity-controls input,
.identity-controls select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  background: #071018;
  color: var(--text);
  padding: 0 14px;
}
.creator-row {
  display: grid;
  grid-template-columns: 92px repeat(4, 1fr);
  align-items: center;
  gap: 7px;
}
.creator-row button {
  min-height: 38px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: transparent;
}
.creator-row button.active {
  border-color: var(--cyan);
  background: var(--cyan-dim);
  color: var(--text);
}
.creator-swatches {
  display: flex;
  align-items: center;
  gap: 9px;
}
.creator-swatches span:not(:first-child) {
  margin-left: 18px;
}
.creator-swatches button {
  width: 30px;
  height: 30px;
  border: 2px solid #1d313b;
  border-radius: 50%;
  background: #a77858;
}
.creator-swatches button.active {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}
.creator-swatches [data-color="light"] {
  background: #e8c4a8;
}
.creator-swatches [data-color="medium"] {
  background: #b77d58;
}
.creator-swatches [data-color="deep"] {
  background: #815137;
}
.creator-swatches [data-color="dark"] {
  background: #4d3025;
}
.creator-swatches [data-color="brown"] {
  background: #66452f;
}
.creator-swatches [data-color="blond"] {
  background: #c5a56b;
}
.creator-swatches [data-color="silver"] {
  background: #aab4b9;
}
.creator-swatches [data-color="copper"] {
  background: #9b4e32;
}
.leader-avatar {
  --skin: #b77d58;
  --hair: #20252a;
  --suit: #162c38;
  position: relative;
  width: 178px;
  height: 210px;
  overflow: hidden;
  flex: 0 0 auto;
}
.leader-avatar[data-skin="light"] {
  --skin: #e8c4a8;
}
.leader-avatar[data-skin="deep"] {
  --skin: #815137;
}
.leader-avatar[data-skin="dark"] {
  --skin: #4d3025;
}
.leader-avatar[data-hair="brown"] {
  --hair: #66452f;
}
.leader-avatar[data-hair="blond"] {
  --hair: #c5a56b;
}
.leader-avatar[data-hair="silver"] {
  --hair: #aab4b9;
}
.leader-avatar[data-hair="copper"] {
  --hair: #9b4e32;
}
.leader-head {
  position: absolute;
  z-index: 3;
  width: 94px;
  height: 122px;
  left: 42px;
  top: 25px;
  border-radius: 43% 43% 46% 46%;
  background: var(--skin);
  box-shadow:
    inset 10px 0 rgba(0, 0, 0, 0.08),
    inset -8px 0 rgba(255, 255, 255, 0.04);
}
.leader-neck {
  position: absolute;
  z-index: 2;
  left: 72px;
  top: 126px;
  width: 36px;
  height: 40px;
  background: var(--skin);
}
.leader-shoulders {
  position: absolute;
  z-index: 1;
  width: 164px;
  height: 83px;
  bottom: -18px;
  left: 7px;
  border-radius: 50% 50% 0 0;
  background: linear-gradient(90deg, #0d202a, var(--suit) 45%, #213b47);
  border-top: 2px solid rgba(101, 211, 232, 0.34);
}
.leader-shoulders:after {
  content: "";
  position: absolute;
  left: 70px;
  top: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top: 34px solid #cbdbe0;
}
.leader-hair {
  position: absolute;
  z-index: 5;
  left: -3px;
  top: -8px;
  width: 100px;
  height: 42px;
  background: var(--hair);
  border-radius: 48% 52% 22% 20%;
}
.hair-parted {
  clip-path: polygon(0 0, 100% 0, 100% 75%, 54% 45%, 44% 100%, 0 75%);
}
.hair-long {
  height: 104px;
  width: 108px;
  left: -7px;
  z-index: -1;
  border-radius: 45% 45% 30% 30%;
}
.hair-shaved {
  height: 19px;
  top: -2px;
  opacity: 0.8;
}
.leader-eye {
  position: absolute;
  top: 51px;
  width: 7px;
  height: 4px;
  border-radius: 50%;
  background: #0d1820;
}
.leader-eye.left,
.leader-brow.left {
  left: 24px;
}
.leader-eye.right,
.leader-brow.right {
  right: 24px;
}
.leader-brow {
  position: absolute;
  top: 43px;
  width: 16px;
  height: 2px;
  background: var(--hair);
}
.leader-nose {
  position: absolute;
  left: 45px;
  top: 55px;
  width: 5px;
  height: 23px;
  border-right: 2px solid rgba(30, 20, 17, 0.3);
  border-bottom: 2px solid rgba(30, 20, 17, 0.2);
}
.leader-mouth {
  position: absolute;
  left: 35px;
  top: 91px;
  width: 24px;
  height: 5px;
  border-bottom: 2px solid rgba(48, 20, 20, 0.7);
  border-radius: 50%;
}
.leader-beard {
  position: absolute;
  z-index: 4;
  left: 14px;
  top: 76px;
  width: 66px;
  height: 43px;
  border-radius: 10% 10% 45% 45%;
  border-bottom: 10px solid var(--hair);
}
.beard-trim {
  opacity: 0.68;
  height: 29px;
}
.beard-full {
  background: linear-gradient(180deg, transparent, var(--hair));
}
.leader-avatar.compact {
  width: 42px;
  height: 46px;
  transform: none;
}
.leader-avatar.compact .leader-head {
  transform: scale(0.32);
  transform-origin: 0 0;
  left: 6px;
  top: 3px;
}
.leader-avatar.compact .leader-neck,
.leader-avatar.compact .leader-shoulders {
  display: none;
}
.leader-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding-right: 16px;
  border-right: 1px solid var(--line);
}
.leader-chip span {
  display: grid;
}
.leader-chip small {
  color: var(--muted);
  font-size: 8px;
  text-transform: uppercase;
}
.leader-chip b {
  font-size: 11px;
}
.world-surface {
  padding: 34px 42px 70px;
}
.world-hero {
  min-height: 190px;
  display: grid;
  grid-template-columns: 1fr 220px 260px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(58, 181, 209, 0.08), transparent 58%);
}
.world-leader {
  display: flex;
  align-items: center;
  gap: 22px;
}
.world-leader span,
.rank-seal span,
.prestige-block span {
  color: var(--cyan);
  font-size: 10px;
  letter-spacing: 1.4px;
}
.world-leader h2 {
  margin: 7px 0 4px;
  font-size: 30px;
}
.world-leader p {
  margin: 0;
  color: var(--muted);
}
.rank-seal,
.prestige-block {
  min-height: 105px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 24px;
  border-left: 1px solid var(--line);
}
.rank-seal strong,
.prestige-block strong {
  font-size: 42px;
  color: var(--text);
}
.rank-seal small,
.prestige-block small {
  color: var(--muted);
  font-size: 9px;
}
.world-grid {
  display: grid;
  grid-template-columns: minmax(680px, 1.45fr) minmax(330px, 0.7fr);
  gap: 28px;
  padding-top: 26px;
}
.section-title {
  display: flex;
  justify-content: space-between;
  align-items: end;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
}
.section-title span {
  color: var(--cyan);
  font-size: 11px;
  letter-spacing: 1.4px;
}
.section-title small {
  color: var(--muted);
}
.ranking-board article {
  display: grid;
  grid-template-columns: 52px minmax(150px, 1fr) 2.2fr 54px 68px;
  min-height: 78px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  transition: 0.2s ease;
}
.ranking-board article:hover {
  background: #0c1820;
  padding-left: 7px;
}
.ranking-board article.player {
  background: rgba(64, 190, 218, 0.1);
  border-left: 3px solid var(--cyan);
}
.rank-number {
  color: #587687;
  font-size: 17px;
  text-align: center;
}
.rank-identity {
  display: grid;
  gap: 4px;
}
.rank-identity span {
  color: var(--muted);
  font-size: 10px;
}
.rank-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
}
.rank-metrics span {
  display: grid;
  color: #638092;
  font-size: 8px;
}
.rank-metrics b {
  color: var(--text);
  font-size: 11px;
  margin-top: 4px;
}
.rank-trend {
  text-align: center;
}
.rank-trend.up,
.positive {
  color: var(--green);
}
.rank-trend.down,
.negative {
  color: var(--red);
}
.rank-score {
  font-size: 20px;
  text-align: center;
}
.world-side {
  display: grid;
  gap: 24px;
  align-content: start;
}
.mission-panel,
.asset-panel,
.global-panel {
  border: 1px solid var(--line);
  background: #091219;
  padding: 20px;
}
.mission-panel article {
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}
.mission-panel article > div:first-child,
.asset-panel article > div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}
.mission-panel article span {
  color: var(--amber);
  font-size: 9px;
}
.mission-panel article p {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}
.mission-progress {
  height: 3px;
  background: #1b2b34;
  margin: 10px 0 7px;
}
.mission-progress i {
  display: block;
  height: 100%;
  background: var(--cyan);
}
.mission-panel article.complete {
  opacity: 0.65;
}
.mission-panel article.complete .mission-progress i {
  background: var(--green);
}
.portfolio-total {
  display: flex;
  justify-content: space-between;
  align-items: end;
  padding: 20px 0;
}
.portfolio-total span {
  color: var(--muted);
  font-size: 9px;
}
.portfolio-total strong {
  font-size: 21px;
}
.asset-panel article {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.asset-panel article span,
.asset-panel article small,
.empty-portfolio {
  color: var(--muted);
  font-size: 10px;
}
.empty-portfolio {
  line-height: 1.6;
}
.global-panel article {
  display: grid;
  grid-template-columns: 28px 1fr 44px;
  gap: 10px;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
.global-panel article > b {
  color: #587687;
}
.global-panel article div {
  display: grid;
  gap: 3px;
}
.global-panel article span {
  color: var(--muted);
  font-size: 9px;
}
.global-panel article em {
  color: var(--cyan);
  font-style: normal;
  text-align: right;
}
@media (max-width: 1150px) {
  .world-grid {
    grid-template-columns: 1fr;
  }
  .world-hero {
    grid-template-columns: 1fr 180px;
  }
  .prestige-block {
    display: none;
  }
  .identity-setup {
    grid-template-columns: 1fr;
  }
  .leader-preview {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}
@media (max-width: 760px) {
  .world-surface {
    padding: 20px 14px;
  }
  .world-hero {
    grid-template-columns: 1fr;
  }
  .rank-seal {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .ranking-board article {
    grid-template-columns: 40px 1fr 54px 54px;
  }
  .rank-metrics {
    display: none;
  }
  .creator-row {
    grid-template-columns: 1fr 1fr;
  }
  .creator-row > span {
    grid-column: 1/-1;
  }
  .creator-swatches {
    flex-wrap: wrap;
  }
  .leader-chip {
    display: none;
  }
}
@media (max-width: 760px) {
  .auth-shell > main {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 34px;
  }
  .auth-copy h2 {
    font-size: calc(39px * var(--font-scale));
  }
  .auth-panel {
    padding: 22px;
  }
  .auth-tabs {
    margin: -22px -22px 24px;
  }
  .account-status > span {
    display: none;
  }
}
