:root {
  --bg: #0b1020;
  --panel: #131a2e;
  --panel-2: #1a2340;
  --line: #26304f;
  --text: #e8ecf6;
  --muted: #8b95b3;
  --accent: #f5b942;
  --accent-ink: #1b1405;
  --good: #3ecf8e;
  --bad: #ff6b6b;
  --warn: #ffb547;
  --blue: #5ea2ff;
  --radius: 16px;
  font-family: 'Nunito', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.45; }
button, input, select { font: inherit; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.good { color: var(--good); }
.bad { color: var(--bad); }
.num { font-variant-numeric: tabular-nums; }
.center { text-align: center; }
.portrait { flex: 0 0 auto; border-radius: 50%; box-shadow: 0 2px 0 rgba(0, 0, 0, .25); }

/* Buttons & inputs */
.btn { border: 1px solid var(--line); background: var(--panel-2); color: var(--text); padding: 8px 14px; border-radius: 10px; cursor: pointer; transition: transform .08s, filter .15s; }
.btn:hover { border-color: var(--muted); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 800; box-shadow: 0 3px 0 #b8841f; }
.btn.primary:hover { filter: brightness(1.07); }
.btn.big { padding: 12px 20px; font-size: 16px; }
.btn.small { padding: 6px 12px; font-size: 13px; }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
input { background: #0e1428; border: 1px solid var(--line); color: var(--text); padding: 10px 12px; border-radius: 10px; width: 100%; }
input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.big-input { font-size: 18px; padding: 12px 14px; }
label { display: block; font-size: 12px; color: var(--muted); margin: 12px 0 4px; font-weight: 700; }
.hint { color: var(--muted); font-size: 12px; }

/* Speech bubbles */
.speech { display: flex; gap: 12px; align-items: flex-start; }
.speech > div, .speech > p { position: relative; background: #f8f9fa; color: #1b1f2e; border-radius: 14px; padding: 10px 14px; margin: 0; }
.speech > div::before, .speech > p::before { content: ''; position: absolute; left: -7px; top: 16px; border: 7px solid transparent; border-left: 0; border-right-color: #f8f9fa; }
.speech p { margin: 0; }
.speech > div p + p { margin-top: 4px; }
.speech b { display: block; font-size: 12px; color: #3b5bdb; margin-bottom: 2px; }
.speech.big > div { font-size: 16px; }
.speech.small > div, .speech.small > p { font-size: 13px; padding: 8px 12px; }

/* Landing */
.landing { min-height: 100vh; display: grid; grid-template-columns: 1.35fr 1fr; }
.hero { padding: 40px 48px; display: flex; flex-direction: column; justify-content: center; gap: 18px; background: radial-gradient(circle at 15% 10%, #23305a 0, transparent 50%); }
.logo { font-weight: 900; letter-spacing: .6px; font-size: 14px; color: var(--accent); text-transform: uppercase; white-space: nowrap; }
.hero h1 { font-size: 46px; line-height: 1.05; margin: 0; font-weight: 900; letter-spacing: -.5px; }
.lead { font-size: 18px; color: #c3cbe2; max-width: 600px; margin: 0; }
.scene { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.scene svg.city { display: block; width: 100%; height: 240px; }
.hero-stats { display: flex; gap: 28px; flex-wrap: wrap; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats b { font-size: 24px; font-weight: 900; }
.hero-stats span { color: var(--muted); font-size: 12px; }
.cast { display: flex; gap: 14px; flex-wrap: wrap; }
.cast-member { display: flex; flex-direction: column; align-items: center; width: 92px; text-align: center; }
.cast-member b { font-size: 13px; margin-top: 4px; }
.cast-member span { font-size: 11px; color: var(--muted); }
.auth { display: flex; align-items: center; justify-content: center; padding: 32px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.auth .card { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 14px; }
.tabs { display: flex; gap: 6px; background: #0e1428; padding: 4px; border-radius: 12px; }
.tabs button { flex: 1; background: none; border: 0; color: var(--muted); padding: 9px; border-radius: 9px; cursor: pointer; font-weight: 700; }
.tabs button.active { background: var(--panel-2); color: var(--text); }
.form-error { color: var(--bad); min-height: 18px; margin-top: 10px; font-size: 13px; }
.auth .btn.primary { width: 100%; margin-top: 16px; }

/* Company creation */
.create { max-width: 980px; margin: 0 auto; padding: 32px 20px 48px; display: flex; flex-direction: column; gap: 6px; }
.create .speech { margin: 14px 0; }
.sectors { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.sector { text-align: center; background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius); padding: 14px 12px; cursor: pointer; color: var(--text); display: flex; flex-direction: column; align-items: center; gap: 6px; transition: transform .12s, border-color .12s; }
.sector:hover { transform: translateY(-3px); }
.sector.active { border-color: var(--accent); background: #1f2640; }
.sector b { font-size: 15px; }
.sector span { color: var(--muted); font-size: 12px; }
.row-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }

/* Topbar & hero scene */
.topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px; padding: 10px 20px; background: rgba(11, 16, 32, .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.topbar .company { font-weight: 900; font-size: 17px; }
.topbar .spacer { flex: 1; }
.pill { background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font-size: 13px; white-space: nowrap; }
.pill.accent { border-color: var(--accent); color: var(--accent); font-weight: 700; }
.pill.level { background: linear-gradient(90deg, #5f3dc4, #3b5bdb); border: 0; font-weight: 800; }
.hero-scene { position: relative; max-width: 1500px; margin: 16px auto 0; padding: 0 20px; }
.hero-scene .scene svg.city { height: 250px; }
.speech.overlay { position: absolute; left: 36px; top: 16px; max-width: 460px; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .35)); }
.speech.overlay > div { font-size: 14px; }

main.cockpit { padding: 16px 20px 48px; max-width: 1500px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }

/* KPIs */
.kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: flex; gap: 12px; align-items: center; min-width: 0; overflow: hidden; }
.kpi-icon { font-size: 26px; width: 46px; height: 46px; display: grid; place-items: center; background: var(--panel-2); border-radius: 14px; flex: 0 0 auto; }
.kpi-body { min-width: 0; flex: 1; }
.kpi span { color: var(--muted); font-size: 12px; display: block; font-weight: 700; }
.kpi b { font-size: 21px; display: block; font-weight: 900; white-space: nowrap; }
.kpi small { color: var(--muted); font-size: 12px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar { height: 7px; background: #0e1428; border-radius: 4px; overflow: hidden; margin-top: 6px; }
.bar i { display: block; height: 100%; border-radius: 4px; transition: width .6s; }
.kpis.pulse .kpi { animation: pulse 1.1s ease; }
@keyframes pulse { 30% { transform: scale(1.03); border-color: var(--accent); } }

/* Crises */
.crises { display: flex; flex-direction: column; gap: 12px; }
.crisis { display: flex; gap: 18px; background: linear-gradient(135deg, #3a1d24, #241827); border: 2px solid #c2410c; border-radius: var(--radius); padding: 18px; animation: shake .6s ease 1; }
@keyframes shake { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }
.crisis-who { display: flex; flex-direction: column; align-items: center; width: 110px; text-align: center; flex: 0 0 auto; }
.crisis-who b { margin-top: 6px; }
.crisis-who span { font-size: 11px; color: #e3cfd6; }
.crisis-body { flex: 1; min-width: 0; }
.crisis-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.alarm { background: #e03131; color: #fff; font-weight: 900; font-size: 12px; padding: 3px 9px; border-radius: 6px; animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .55; } }
.deadline { color: var(--warn); font-weight: 800; font-variant-numeric: tabular-nums; }
.crisis h4 { margin: 8px 0; font-size: 20px; font-weight: 900; }
.bubble { background: #f8f9fa; color: #1b1f2e; border-radius: 14px; padding: 10px 14px; margin-bottom: 12px; }
.options { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.option { text-align: left; background: rgba(0, 0, 0, .3); border: 2px solid #6b2f3a; color: var(--text); border-radius: 12px; padding: 12px; cursor: pointer; transition: transform .1s, border-color .1s; }
.option:hover { border-color: var(--accent); transform: translateY(-2px); }
.option b { display: block; margin-bottom: 2px; }
.option span { font-size: 12px; color: #c9b3bb; }

/* Layout */
.grid { display: grid; grid-template-columns: 380px 1fr 380px; gap: 16px; align-items: start; }
.col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
h3 { margin: 0 0 12px; font-size: 15px; font-weight: 900; display: flex; align-items: center; gap: 8px; }
h3 .spacer { flex: 1; }
.charts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.chart svg { width: 100%; height: auto; display: block; }
.empty { color: var(--muted); font-size: 13px; padding: 6px 0; }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-block; background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.chip.good { color: var(--good); border-color: #1f5a43; background: #10261f; }
.chip.bad { color: var(--bad); border-color: #6b2f3a; background: #2a1418; }
.chip.warn { color: var(--warn); border-color: #6b5320; background: #2a2212; }
.chip.accent { color: var(--accent); border-color: #6b5320; }

/* Decisions */
.dtabs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; background: #0e1428; padding: 4px; border-radius: 12px; margin-bottom: 14px; }
.dtabs button { background: none; border: 0; color: var(--muted); padding: 6px 2px; border-radius: 9px; cursor: pointer; font-weight: 800; font-size: 11.5px; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; }
.dtabs .tab-icon { font-size: 18px; }
.dtabs button.active { background: var(--panel-2); color: var(--text); }
.dbody { display: flex; flex-direction: column; gap: 14px; }
.stepper { background: var(--panel-2); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.stepper-title { font-weight: 800; display: flex; gap: 8px; align-items: center; }
.stepper-row { display: flex; align-items: center; gap: 6px; }
.stepper-value { flex: 1; text-align: center; font-size: 20px; font-weight: 900; white-space: nowrap; }
.step { background: #0e1428; border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 8px 0; width: 48px; flex: 0 0 auto; cursor: pointer; font-weight: 800; font-size: 13px; }
.step:hover { border-color: var(--accent); }
.step:active { transform: scale(.95); }
.stepper-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.auto-note { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #b9c5ff; background: #1d2550; border-radius: 10px; padding: 6px 10px; }
.warn-note { font-size: 12px; color: var(--warn); }
.invest { display: flex; gap: 12px; align-items: center; background: var(--panel-2); border-radius: 14px; padding: 12px; }
.invest > div { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.rules { display: flex; flex-direction: column; gap: 12px; }
.toggle { display: flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; font-weight: 700; }
.toggle input { display: none; }
.toggle i { width: 40px; height: 22px; background: #2a3457; border-radius: 999px; position: relative; transition: .15s; flex: 0 0 auto; }
.toggle i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--muted); transition: .15s; }
.toggle input:checked + i { background: rgba(94, 162, 255, .4); }
.toggle input:checked + i::after { left: 21px; background: var(--blue); }

/* Badges */
.medals { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.medal-cell { display: flex; flex-direction: column; align-items: center; text-align: center; font-size: 10px; color: var(--muted); gap: 2px; }
.medal.locked { opacity: .55; }
.medal:not(.locked) { filter: drop-shadow(0 0 6px rgba(245, 185, 66, .45)); }

/* Rivals */
.rivals { display: flex; flex-direction: column; gap: 10px; }
.rival { display: flex; gap: 10px; align-items: center; background: var(--panel-2); border-radius: 12px; padding: 8px 10px; }
.rival-name { display: flex; gap: 6px; align-items: center; margin-bottom: 4px; }
details.card summary { cursor: pointer; font-weight: 900; }
details.card[open] summary { margin-bottom: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
td { padding: 6px 4px; border-bottom: 1px solid var(--line); }
td.r { text-align: right; }

/* Messages */
.chat { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; max-height: 380px; overflow: auto; }
.chat li { display: flex; gap: 8px; align-items: flex-start; }
.chat li > div { background: var(--panel-2); border-radius: 4px 12px 12px 12px; padding: 6px 10px; }
.chat .who { font-size: 11px; color: var(--muted); font-weight: 700; }
.chat p { margin: 2px 0 0; font-size: 13px; }

/* Newspaper */
.newspaper { background: #f4efe3; color: #1d1a14; border-color: #d8ccb0; }
.masthead { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 3px double #1d1a14; padding-bottom: 6px; margin-bottom: 10px; }
.masthead span { font-family: Georgia, 'Times New Roman', serif; font-weight: 900; font-size: 22px; letter-spacing: 1px; }
.masthead small { font-family: Georgia, serif; font-style: italic; color: #6b6150; }
.lead-story h4 { font-family: Georgia, serif; font-size: 20px; line-height: 1.2; margin: 0 0 8px; }
.byline { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #6b6150; font-style: italic; }
.stories { list-style: none; margin: 12px 0 0; padding: 0; border-top: 1px solid #d8ccb0; }
.stories li { display: flex; gap: 8px; padding: 7px 0; border-bottom: 1px solid #e3d9c2; font-family: Georgia, serif; font-size: 13px; }
.stories .day { color: #8a7f6a; font-size: 11px; min-width: 32px; padding-top: 2px; }
.newspaper .empty { color: #6b6150; }

/* Podium */
.podium { display: flex; align-items: flex-end; justify-content: center; gap: 8px; margin-bottom: 12px; }
.place { flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
.place b { font-size: 12px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.place span { font-size: 12px; color: var(--muted); }
.medal-emoji { font-size: 28px; }
.place .block { width: 100%; margin-top: 4px; border-radius: 10px 10px 0 0; display: grid; place-items: center; font-weight: 900; font-size: 20px; color: var(--accent-ink); }
.p1 .block { height: 70px; background: linear-gradient(#ffd43b, #f5b942); }
.p2 .block { height: 50px; background: linear-gradient(#e9ecef, #adb5bd); }
.p3 .block { height: 36px; background: linear-gradient(#f0a868, #c27a3e); }
.place.me b { color: var(--accent); }
.ranking { margin: 0; padding-left: 26px; display: flex; flex-direction: column; gap: 4px; }
.ranking li { padding: 5px 0; border-bottom: 1px solid var(--line); }
.ranking li > * { vertical-align: middle; }
.ranking .rk-name { margin-right: 6px; }
.ranking b { float: right; }
.ranking li.me { color: var(--accent); font-weight: 800; }

/* Toasts & confetti */
.toasts { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 50; display: flex; flex-direction: column; gap: 8px; align-items: center; width: max-content; max-width: 92vw; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; background: #f8f9fa; color: #1b1f2e; padding: 8px 16px 8px 8px; border-radius: 999px; z-index: 20; max-width: 92vw; box-shadow: 0 10px 30px rgba(0, 0, 0, .45); font-weight: 700; animation: pop .25s ease; }
.toast.bad { outline: 3px solid var(--bad); }
.toast.good { outline: 3px solid var(--good); }
@keyframes pop { from { transform: translateY(20px); opacity: 0; } }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 30; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 9px; height: 14px; border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(105vh) rotate(720deg); } }

/* City animations */
.city .cloud { animation: drift 40s linear infinite alternate; }
.city .cloud.c2 { animation-duration: 55s; }
.city .cloud.c3 { animation-duration: 33s; }
@keyframes drift { to { transform: translateX(120px); } }
.city .smoke { animation: smoke 3s ease-in-out infinite; opacity: .8; }
.city .smoke.s2 { animation-delay: 1.5s; }
@keyframes smoke { 50% { transform: translateY(-6px); opacity: .4; } }
.city .flag { transform-box: fill-box; transform-origin: left center; animation: wave 1.4s ease-in-out infinite; }
@keyframes wave { 50% { transform: scaleX(.8); } }
.city .rain { animation: rain .6s linear infinite; }
@keyframes rain { to { transform: translateY(12px); } }
.city .sun { transform-box: fill-box; transform-origin: center; animation: glow 4s ease-in-out infinite; }
@keyframes glow { 50% { transform: scale(1.06); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

@media (max-width: 1250px) {
  .grid { grid-template-columns: 1fr 1fr; }
  .grid .col.side { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; }
  .kpis { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 760px) {
  .landing { grid-template-columns: 1fr; }
  .hero { padding: 28px 16px; }
  .hero h1 { font-size: 32px; }
  .scene svg.city, .hero-scene .scene svg.city { height: 170px; }
  .auth { padding: 16px; }
  .grid, .grid .col.side, .charts { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .kpi { padding: 10px; gap: 8px; }
  .kpi-icon { width: 38px; height: 38px; font-size: 22px; }
  .kpi b { font-size: 17px; }
  main.cockpit { padding: 12px 12px 32px; }
  .hero-scene { padding: 0 12px; }
  .speech.overlay { position: static; max-width: none; margin-top: 10px; }
  .topbar { position: static; padding: 8px 12px; gap: 8px; flex-wrap: wrap; backdrop-filter: none; }
  .topbar .logo, .pill.level, .topbar .pill:not(.accent) { display: none; }
  .topbar .company { flex: 1; font-size: 16px; }
  .topbar .spacer { display: none; }
  .crisis { flex-direction: column; gap: 8px; }
  .crisis-who { flex-direction: row; width: auto; gap: 10px; text-align: left; }
  .medals { grid-template-columns: repeat(4, 1fr); }
  .cast-member { width: 76px; }
}

/* Leadership team */
.recruit { max-width: 1180px; margin: 0 auto; padding: 28px 20px 140px; display: flex; flex-direction: column; gap: 22px; }
.role-block { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.role-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.role-head h3 { margin: 0; }
.role-head > div { flex: 1; }
.role-icon { font-size: 28px; width: 50px; height: 50px; display: grid; place-items: center; background: var(--panel-2); border-radius: 14px; }
.candidates { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.candidates.compact { grid-template-columns: 1fr; margin-top: 10px; }
.candidate { background: var(--panel-2); border: 2px solid transparent; border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 8px; transition: border-color .12s, transform .12s; }
.candidate:hover { transform: translateY(-2px); }
.candidate.selected { border-color: var(--accent); background: #232b4a; }
.candidate .btn { align-self: flex-start; }
.cand-head { display: flex; gap: 10px; align-items: center; }
.stars { color: var(--accent); letter-spacing: 1px; font-size: 15px; }
.stars.small { font-size: 12px; }
.cv { margin: 0; padding-left: 18px; font-size: 12.5px; color: #c3cbe2; }
.quote { background: #f8f9fa; color: #1b1f2e; border-radius: 12px; padding: 8px 10px; font-size: 13px; }
.reference { font-size: 12.5px; color: var(--muted); }
.recruit-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: flex; justify-content: center; align-items: center; gap: 24px; padding: 14px 20px; background: rgba(19, 26, 46, .97); border-top: 1px solid var(--line); flex-wrap: wrap; }
.team-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.member { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 3px; }
.member b { font-size: 13px; }
.member > span:not(.chip):not(.stars) { font-size: 11px; color: var(--muted); }
.exec { background: var(--panel-2); border-radius: 14px; padding: 10px 12px; display: flex; gap: 10px; align-items: center; }
.exec.vacant-role { flex-direction: column; align-items: stretch; border: 1px dashed #4a5580; }
.exec-row { display: flex; gap: 10px; align-items: center; }
.exec-body { flex: 1; min-width: 0; }
.portrait.vacant { box-shadow: none; }
@media (max-width: 900px) { .candidates { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .team-strip { grid-template-columns: repeat(2, 1fr); } .medals { grid-template-columns: repeat(4, 1fr); } .recruit-bar { gap: 10px; } }

/* Right-hand picker */
.step-title { margin: 8px 0 0; font-size: 26px; font-weight: 900; }
.assistants { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 10px; }
.assistant { background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 10px; transition: border-color .12s, transform .12s; }
.assistant:hover { transform: translateY(-2px); }
.assistant.selected { border-color: var(--accent); background: #1f2640; }
.assistant .btn { align-self: flex-start; }
.big-name { font-size: 18px; }
.tagline { color: var(--accent); font-weight: 800; font-size: 13px; }
.objective { display: flex; flex-direction: column; gap: 2px; font-size: 13px; background: var(--panel-2); border-radius: 10px; padding: 8px 10px; }
details.switch summary { cursor: pointer; font-weight: 800; color: var(--muted); }
.switch-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
@media (max-width: 760px) { .assistants { grid-template-columns: 1fr; } }

/* ---------- Navigation & pages ---------- */
.topbar { flex-wrap: wrap; }
.nav { flex-basis: 100%; display: flex; gap: 4px; margin-top: 6px; }
.nav a { display: flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 10px; color: var(--muted); text-decoration: none; font-weight: 800; font-size: 13px; position: relative; }
.nav a:hover { color: var(--text); background: var(--panel-2); }
.nav a.active { color: var(--text); background: var(--panel-2); box-shadow: inset 0 -2px 0 var(--accent); }
.nav .badge { position: absolute; top: 2px; right: 2px; background: var(--bad); color: #fff; font-style: normal; font-size: 10px; border-radius: 999px; padding: 0 5px; }
.pill.league { background: #1d2550; border-color: #3b5bdb; }
main.page { max-width: 1300px; margin: 0 auto; padding: 18px 20px 100px; display: flex; flex-direction: column; gap: 16px; }
.page-head h2 { margin: 0 0 4px; font-size: 26px; font-weight: 900; }
.page-head p { margin: 0; max-width: 760px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.card.highlight { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.spaced { margin-top: 14px; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.tabs.small { padding: 3px; }
.tabs.small button { padding: 5px 10px; font-size: 12px; }
.city-tabs { max-width: 640px; }
select, textarea { background: #0e1428; border: 1px solid var(--line); color: var(--text); padding: 10px 12px; border-radius: 10px; width: 100%; font: inherit; }
textarea { resize: vertical; }
select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.form { display: flex; flex-direction: column; gap: 10px; }
.summary { background: var(--panel-2); border-radius: 10px; padding: 10px 12px; font-weight: 700; }
button.link { background: none; border: 0; color: var(--muted); cursor: pointer; text-decoration: underline; font: inherit; font-size: 12px; }
.big-number { font-size: 32px; font-weight: 900; }
.big-title { font-size: 22px; font-weight: 900; margin-bottom: 4px; }
.bar.big { height: 12px; border-radius: 6px; }
.bar.big i { background: var(--accent); }
.tagline { color: var(--accent); font-weight: 800; font-size: 13px; }

/* Contracts */
.contract { background: var(--panel-2); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; border-left: 4px solid var(--line); }
.contract.live { border-left-color: var(--good); }
.contract-head { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
details summary { cursor: pointer; color: var(--muted); font-weight: 800; margin: 6px 0; }

/* Stock market */
.holding { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.quotes { display: flex; flex-direction: column; }
.quote-row { display: grid; grid-template-columns: 40px 1fr 90px 100px 90px; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.q-name { display: flex; flex-direction: column; min-width: 0; }
.q-name b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-price { display: flex; flex-direction: column; align-items: flex-end; font-size: 12px; }
.q-price b { font-size: 14px; }
.spark { width: 90px; height: 26px; }

/* Town hall */
.person { display: flex; gap: 12px; align-items: center; }
.candidate-pol { background: var(--panel-2); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.poll { position: relative; height: 22px; background: #0e1428; border-radius: 11px; overflow: hidden; }
.poll i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #3b5bdb, #5ea2ff); border-radius: 11px; }
.poll span { position: relative; padding-left: 10px; font-weight: 900; font-size: 12px; line-height: 22px; }

/* Challenges & seasons */
.season-banner { display: flex; gap: 18px; align-items: center; background: linear-gradient(120deg, #5f3dc4, #1d2550 70%); border-radius: var(--radius); padding: 18px 22px; }
.season-banner h3 { margin: 0 0 4px; font-size: 20px; }
.season-banner p { margin: 0 0 10px; color: #d0d7ff; }
.season-banner > div:last-child { flex: 1; }
.season-num { font-size: 15px; font-weight: 900; background: var(--accent); color: var(--accent-ink); padding: 10px 14px; border-radius: 14px; white-space: nowrap; }
.challenge { border-color: #6b5320; }
.trophies { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-bottom: 12px; }
.trophy { background: var(--panel-2); border-radius: 12px; padding: 10px; text-align: center; display: flex; flex-direction: column; gap: 4px; }
.trophy span { font-size: 30px; }
.trophy b { font-size: 12px; }
.hof ol { margin: 6px 0 14px; }
.challenge-mini { display: flex; gap: 12px; align-items: center; text-decoration: none; color: var(--text); border-color: #6b5320; }
.challenge-mini > div { flex: 1; }
.challenge-mini .bar i { background: var(--accent); }
.big-emoji { font-size: 32px; }

/* Leagues */
.world-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px; border-radius: 10px; background: var(--panel-2); margin-bottom: 8px; }
.world-row.current { box-shadow: inset 0 0 0 1px var(--good); }
.invite { margin-top: 12px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.code { font-size: 22px; letter-spacing: 3px; color: var(--accent); background: #0e1428; padding: 4px 12px; border-radius: 8px; }

/* Board */
.board-members { display: flex; gap: 14px; margin-bottom: 10px; }
.board-members .member span { font-size: 11px; color: var(--muted); }
.confidence { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; font-weight: 800; }
.objectives { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.objectives li { display: flex; gap: 8px; }
.objectives li.done { color: var(--good); }
.card.board.danger { border-color: var(--bad); }
.muted-card p { margin: 0; }

/* Checklist & crises statement */
.checklist { border-color: #3b5bdb; background: linear-gradient(160deg, #1d2550, var(--panel)); }
.checklist ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.checklist li { display: flex; gap: 8px; font-size: 13px; }
.checklist li.done { color: var(--muted); text-decoration: line-through; }
.statement { margin-bottom: 12px; }
.statement label { color: #f3d9df; margin-top: 0; }
.statement textarea { background: rgba(0, 0, 0, .3); border-color: #6b2f3a; }

/* City picker */
.cities { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.city-card { text-align: left; background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius); padding: 14px; cursor: pointer; color: var(--text); display: flex; flex-direction: column; gap: 4px; }
.city-card b { font-size: 17px; }
.city-card p { margin: 4px 0; font-size: 13px; color: #c3cbe2; }
.city-card.active { border-color: var(--accent); background: #1f2640; }

/* Newspaper articles */
.article { font-family: Georgia, serif; font-size: 14px; line-height: 1.5; margin: 0 0 8px; color: #3d362a; }
.article.small { font-size: 12px; margin: 4px 0 0; }

/* Tutorial */
.tour { position: fixed; inset: auto 0 0 0; z-index: 40; display: flex; justify-content: center; padding: 16px; pointer-events: none; }
.tour-card { pointer-events: auto; display: flex; gap: 14px; align-items: flex-start; max-width: 620px; width: 100%; background: #f8f9fa; color: #1b1f2e; border-radius: 18px; padding: 16px; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); border: 3px solid var(--accent); animation: pop .25s ease; }
.tour-card b { color: #3b5bdb; font-size: 13px; }
.tour-card p { margin: 6px 0 10px; font-size: 15px; }
.tour-card .btn:not(.primary) { background: #e9ecef; color: #1b1f2e; border-color: #ced4da; }
.tour-target { position: relative; z-index: 30; box-shadow: 0 0 0 4px var(--accent), 0 0 0 9999px rgba(5, 8, 18, .6) !important; border-radius: var(--radius); transition: box-shadow .2s; }

@media (max-width: 900px) {
  .grid2, .cities { grid-template-columns: 1fr; }
  .quote-row { grid-template-columns: 34px 1fr 80px 70px; }
  .quote-row .spark { display: none; }
}
@media (max-width: 760px) {
  .topbar .btn.small:not(:last-of-type) { display: none; }
  .nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; margin: 0; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); background: rgba(11, 16, 32, .97); border-top: 1px solid var(--line); justify-content: space-around; }
  .nav a { flex-direction: column; gap: 2px; padding: 4px 6px; font-size: 10px; }
  .nav .nav-icon { font-size: 20px; }
  main.cockpit { padding-bottom: 90px; }
  main.page { padding: 14px 12px 100px; }
  .season-banner { flex-direction: column; align-items: flex-start; }
  .tour { padding: 10px 10px 84px; }
  .tour-card { flex-direction: column; }
}

@media (max-width: 760px) { .toasts { bottom: 86px; } }
