/* Expedition theme. Keep reading surfaces opaque; artwork supplies the atmosphere. */
:root {
  --pcv-bg: #e8eff0;
  --pcv-surface: #ffffff;
  --pcv-surface-strong: #f4f8f7;
  --pcv-border: #c6d3d7;
  --pcv-text: #1c3542;
  --pcv-muted: #4b626e;
  --pcv-text-muted: #4b626e;
  --pcv-primary: #176b64;
  --pcv-secondary: #96632b;
  --pcv-accent: #2b6179;
  --pcv-tertiary: #287a73;
  --pcv-pop: #895b2b;
  --pcv-success: #1c6a4e;
  --pcv-shadow: 0 8px 24px #102b3610;
  --pcv-radius: 20px;
  --bs-body-color: #1c3542;
  --bs-secondary-color: #4b626e;
  --bs-primary: #176b64;
  --bs-primary-rgb: 23, 107, 100;
  --bs-secondary-rgb: 75, 98, 110;
  --bs-success-rgb: 28, 106, 78;
  --bs-link-color: #176b64;
  --bs-link-hover-color: #104e4a;
}

body {
  color: var(--pcv-text);
  line-height: 1.6;
  background: radial-gradient(ellipse at 90% 0, #d5e4e7, transparent 42rem), #e8eff0;
}
.app-shell::before, .app-shell::after { display: none; }
.fade-up { opacity: 1; transform: none; animation: none; }
::selection { background: #cce8dd; color: #142e3a; }
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid #9a6527;
  outline-offset: 3px;
}

/* Navigation remains distinct from the light work area. */
.navbar .container {
  background: #183541;
  border: 1px solid #44606b;
  border-radius: 18px;
  box-shadow: 0 8px 24px #142c351a;
  backdrop-filter: none;
}
.brand-logo { width: 3.25rem; height: 3.25rem; filter: none; }
.brand-mark { letter-spacing: .01em; }
.brand-submark { color: #cfdee2; font-size: .75rem; letter-spacing: .06em; }
.navbar-nav .nav-link { color: #edf5f6; border-radius: 10px; }
.navbar-nav .nav-link:is(.active, :hover, :focus-visible), .nav-audience:hover {
  background: #31505c;
  color: #fff;
}
.nav-audience, .nav-user-pill { background: #294955; color: #f5fafb; border-radius: 10px; }
.nav-profile-dropdown { background: #183541; border-color: #55717c; }
.nav-profile-action { color: #f3f8f9; font-size: .9375rem; }
.nav-profile-action:is(:hover, :focus-visible) { background: #31505c; }

/* Shared reading surfaces: no text over translucent colored glows. */
.hero-panel, .content-panel, .subject-card, .api-card, .news-card, .contact-card,
.metric-card, .player-card, .galaxy-panel, .auth-card, .auth-promo, .profile-card,
.result-table, .badge-card, .rank-card, .player-stat, .world-view-card,
.question-panel, .mockup-sidepanel, .mockup-card, .reward-card {
  background: #fff;
  border-color: var(--pcv-border);
  box-shadow: var(--pcv-shadow);
  backdrop-filter: none;
}
.subject-card:is(.math, .hejne, .logic, .chemistry, .czech),
.mockup-card:is(.math, .hejne, .logic, .chemistry, .czech) { background: #fff; }
.subject-card::after { display: none; }
.subject-hook, .mockup-hook {
  background: #edf4f2;
  border: 1px solid #d0dfdb;
  border-radius: 12px;
  color: #24453f;
  font-weight: 500;
}
.subject-card:is(.math, .hejne, .logic, .chemistry, .czech) .subject-hook strong,
.subject-hook strong { color: #145d56; }
.subject-icon:is(.math, .hejne, .logic, .chemistry, .czech) { background: #244f5d; }
.subject-mission-group {
  background: #f3f7f7;
  border-color: #c6d3d7;
  box-shadow: none;
  backdrop-filter: none;
}
.subject-mission-summary-pill, .subject-mission-group-count,
.subject-mission-type-pill, .subject-mission-search-clear {
  background: #e6f0ed;
  color: #23564f;
}
.section-kicker, .hero-kicker {
  color: #23564f;
  background: #e3efeb;
  font-size: .875rem;
  letter-spacing: .05em;
}
.section-title { font-size: clamp(1.8rem, 3.4vw, 2.7rem); line-height: 1.18; letter-spacing: -.035em; }
.hero-title { letter-spacing: -.04em; }
.hero-lead, .section-lead, .card-copy { color: var(--pcv-muted); line-height: 1.65; }
.text-muted { color: #4b626e !important; }
.tag { background: #e9eff1; color: #304d5a; font-size: .875rem; }
.tag-active { background: #dbeee6; color: #145b46; }
.tag-ok { background: #e1f1e7; color: #1c6146; }
.tag-warning { background: #f7ead2; color: #76501b; }
.tag-danger { background: #fae7e5; color: #8b3332; }
.status-badge { background: #e4f1e9; color: #245d47; font-size: .875rem; }
.status-badge::before { display: none; }

/* Home: let the existing planetary illustrations set the visual tone. */
.hero-panel { background: #f8fbfa; }
.home-main .hero-title { font-size: clamp(2.2rem, 4.5vw, 3.7rem); max-width: 16ch; }
.hero-visual { background: #142f3e; min-height: 19rem; border-color: #365967; border-radius: 16px; box-shadow: none; }
.hero-visual::after, .hero-burst::before, .hero-burst::after { display: none; }
.hero-visual-image { position: absolute; inset: 0; height: 100%; margin: 0; object-fit: cover; object-position: 65% center; animation: none; }
.hero-visual-badge { background: #f5faf8; border-color: #c5d8d4; color: #193a44; border-radius: 10px; box-shadow: 0 3px 12px #10212e25; }
.hero-visual-badge span { font-size: .875rem; color: #405f6b; }
.hero-burst { background: #193e4a; border: 1px solid #42616c; border-radius: 16px; padding: 1.25rem; color: #fff; }
.hero-side-grid { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
.burst-title { font-size: 1.35rem; line-height: 1.4; }
.burst-label { background: #2c525d; color: #e7f2f1; font-size: .875rem; letter-spacing: .035em; }
.burst-copy { color: #d8e7eb; font-size: 1rem; line-height: 1.6; }
.hero-grid .metric-card { background: #fff; border-color: #c6d3d7; border-radius: 14px; }
.metric-value { color: #1b4f59; }
.metric-label { color: #4b626e; font-size: .9375rem; }
.hero-start-card { background: #fff; border-color: #bbcfd0; border-radius: 14px; }
.hero-start-copy { color: #4b626e; font-size: 1rem; }
.hero-interactive-link:is(:hover, :focus-visible), .hero-start-card:is(:hover, :focus-visible) { transform: none; border-color: #497d7b; box-shadow: 0 4px 15px #163d461c; }
.planet-landscape { border-radius: 14px; }
.content-panel.planet-mission-intro { background: #142e3b; color: #fff; }
.planet-mission-intro .section-lead { color: #e4edf0; }
.planet-mission-intro .tag { color: #f3f8fa; background: #294654; }
.planet-mission-intro .exercise-task-title { color: #c1e3d9; }

/* Buttons and fields have strong text contrast and a visible keyboard focus. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35em;
  min-height: 44px;
  font-weight: 700;
  letter-spacing: 0;
  text-align: center;
  box-shadow: none;
}
.subject-mission-card { display: flex; flex-direction: column; }
.subject-mission-card > .planet-landscape { flex-shrink: 0; }
.subject-mission-card-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem;
  margin-top: auto;
  padding-top: .25rem;
}
.btn-primary { --bs-btn-bg: #176b64; --bs-btn-border-color: #176b64; --bs-btn-color: #fff; --bs-btn-hover-bg: #104e4a; --bs-btn-hover-border-color: #104e4a; --bs-btn-active-bg: #104e4a; --bs-btn-active-border-color: #104e4a; background: #176b64; border: 1px solid #176b64; color: #fff; }
.btn-primary:is(:hover, :focus-visible, :active) { background: #104e4a; border-color: #104e4a; color: #fff; }
.btn-outline-primary { --bs-btn-color: #176b64; --bs-btn-border-color: #438680; --bs-btn-hover-bg: #176b64; --bs-btn-hover-border-color: #176b64; --bs-btn-hover-color: #fff; --bs-btn-active-bg: #176b64; --bs-btn-active-border-color: #176b64; }
.btn-outline-dark, .btn-outline-secondary { --bs-btn-color: #294652; --bs-btn-border-color: #7a909b; --bs-btn-hover-bg: #294652; --bs-btn-hover-border-color: #294652; --bs-btn-hover-color: #fff; border-color: #7a909b; }
.btn-outline-warning { --bs-btn-color: #75501c; --bs-btn-border-color: #a58142; --bs-btn-hover-bg: #f3e5c9; --bs-btn-hover-border-color: #8d692a; --bs-btn-hover-color: #624411; }
.btn-success { --bs-btn-bg: #1c6a4e; --bs-btn-border-color: #1c6a4e; --bs-btn-hover-bg: #144f3a; --bs-btn-hover-border-color: #144f3a; }
.btn:disabled, .btn.disabled { opacity: 1; color: #5b7079; background: #e9eeef; border-color: #becdd1; }
.btn:focus-visible { outline: 3px solid #9a6527; outline-offset: 3px; box-shadow: none; }
.form-control, .form-select, .auth-input, .subject-mission-search-input {
  color: #1c3542;
  background-color: #fff;
  border: 1px solid #7a939d;
  min-height: 46px;
  font-size: 1rem;
}
.form-control::placeholder, .auth-input::placeholder { color: #586e79; opacity: 1; }
.form-control:focus, .form-select:focus, .auth-input:focus, .subject-mission-search-input:focus {
  color: #1c3542;
  background-color: #fff;
  border-color: #176b64;
  outline: 3px solid #9a6527;
  outline-offset: 2px;
  box-shadow: none;
}
.form-label { color: #294652; font-weight: 700; }
.form-text { color: #4b626e; font-size: .875rem; }
.form-check-input:checked { background-color: #176b64; border-color: #176b64; }
.form-check-input:focus { border-color: #176b64; box-shadow: 0 0 0 3px #176b6430; }

/* Mission setup: readable options take precedence over decorative instruments. */
.difficulty-picker { background: #f6f9f8; box-shadow: none; border-radius: 16px; }
.difficulty-cockpit { background: #edf4f2; border-color: #b8ccca; color: #1c3542; box-shadow: none; }
.difficulty-cockpit-backdrop, .difficulty-cockpit-instruments { display: none; }
.difficulty-cockpit-head { padding: 1.1rem; border-radius: 12px; background: #1a3945; color: #fff; }
.difficulty-cockpit-kicker { color: #bce1d6; font-size: .875rem; letter-spacing: .05em; }
.difficulty-cockpit .exercise-task-title { color: #f6fafb; }
.difficulty-cockpit-head .exercise-task-title { display: block; margin: .2rem 0; font-size: 1.15rem; letter-spacing: 0; }
.difficulty-cockpit-lead { color: #d7e7eb; font-size: 1rem; max-width: 44rem; }
.difficulty-cockpit-group { padding: 1rem; background: #fff; border-color: #c2d2d4; border-radius: 12px; }
.difficulty-picker-group-label { color: #1c3542; font-size: 1.05rem; letter-spacing: 0; }
.difficulty-cockpit-group-copy { color: #4b626e; font-size: 1rem; line-height: 1.55; }
.difficulty-cockpit-group-badge { background: #e4efeb; color: #205c53; border: 1px solid #c4d9d2; border-radius: 10px; font-size: .9375rem; letter-spacing: 0; }
.difficulty-cockpit-group-status { display: flex; align-items: center; gap: .6rem; padding: .4rem .65rem; background: #f1f6f4; border-color: #d6e2dd; min-width: 0; }
.difficulty-cockpit-group-status strong { color: #205c53; font-size: 1.1rem; }
.difficulty-cockpit-group-status span { color: #4b626e; font-size: .875rem; }
.difficulty-choice-grid { gap: .7rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.question-count-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.difficulty-choice {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .4rem .6rem;
  min-height: 6.5rem;
  padding: .9rem;
  border: 2px solid #9cb3ba;
  border-radius: 10px;
  background: #f9fbfa;
  color: #1c3542;
  box-shadow: none;
  transition: background-color 140ms ease, border-color 140ms ease;
}
.difficulty-choice::before, .difficulty-choice-corners, .difficulty-choice-chip, .difficulty-choice-footer { display: none; }
.difficulty-choice-title { grid-column: 1; grid-row: 1; align-self: center; font-size: 1.05rem; line-height: 1.4; }
.difficulty-choice-copy { grid-column: 1 / -1; color: #455f69; font-size: .9375rem; line-height: 1.55; }
.difficulty-choice-toggle { grid-column: 2; grid-row: 1; width: 1.4rem; height: 1.4rem; margin: 0; align-self: center; }
.difficulty-choice-toggle-track { background: #fff; border: 2px solid #708e98; border-radius: 5px; box-shadow: none; }
.difficulty-choice-toggle-thumb { display: none; }
.difficulty-choice.active { background: #e6f3ed; border-color: #176b64; box-shadow: none; }
.difficulty-choice.active .difficulty-choice-toggle-track { background: #176b64; border-color: #176b64; }
.difficulty-choice.active .difficulty-choice-toggle::after { content: "✓"; position: absolute; inset: 0; color: #fff; text-align: center; font-size: 1rem; font-weight: 900; line-height: 1.4rem; }
.difficulty-choice:is(:hover, :focus-visible):not(:disabled) { border-color: #176b64; background: #eff7f4; box-shadow: none; transform: none; }
.difficulty-choice:focus-visible { outline: 3px solid #9a6527; outline-offset: 3px; }
.count-choice { background: #fff; border: 2px solid #9cb3ba; border-radius: 10px; min-height: 78px; padding: .7rem; }
.count-choice.active { background: #e6f3ed; color: #18584f; border-color: #176b64; box-shadow: none; }
.count-choice-copy { font-size: .875rem; color: #4b626e; }
.count-choice-value { color: #1c3542; }
.count-choice:is(:hover, :focus-visible) { border-color: #176b64; transform: none; }

/* The exercise itself stays a quiet, high-contrast workspace. */
.challenge-screen:is(.math, .hejne, .logic, .chemistry, .czech) { background: #dfe9eb; border-color: #bdcfd4; box-shadow: none; }
.question-panel, .mockup-sidepanel { background: #fff; box-shadow: none; }
.exercise-task-lead { background: #f0f5f5; border-color: #d5e1e3; box-shadow: none; }
.exercise-task-title { color: #2b5260; font-size: .875rem; letter-spacing: .04em; }
.exercise-task-instruction { color: #1c3542; font-size: clamp(1.25rem, 2.4vw, 1.75rem); line-height: 1.6; }
.exercise-tip-card { background: #fcf4e2; border-color: #dcc69a; box-shadow: none; }
.exercise-tip-label { color: #75501c; font-size: .875rem; }
.exercise-tip-text { color: #61481f; font-weight: 600; line-height: 1.6; }
.fill-in-prompt-text { color: #1c3542; font-size: clamp(1.25rem, 2.4vw, 1.75rem); line-height: 1.9; }
.fill-in-input {
  flex-shrink: 0;
  width: calc(var(--fill-in-size, 8ch) + .6em + 4px);
  min-width: calc(2ch + .6em + 4px);
  max-width: 100%;
  min-height: 44px;
  height: 1.7em;
  margin-inline: .3em;
  padding: .1em .3em;
  color: #123f45;
  background: #fff;
  border: 2px solid #467c7b;
  border-radius: 8px;
  font-family: inherit;
  font-size: inherit;
  line-height: 1.2;
  box-shadow: none;
}
.fill-in-input:focus {
  border-color: #176b64;
  background: #f0f8f5;
  outline: 2px solid #9a6527;
  outline-offset: 2px;
  box-shadow: none;
}
.choice-pill { background: #fff; border-color: #8aa4ad; color: #1c3542; min-height: 52px; }
.choice-pill:is(.active-selected, .active) { background: #e3f1eb; border-color: #176b64; color: #164d45; box-shadow: inset 0 0 0 1px #176b64; }
.choice-pill:is(:hover, :focus-visible):not(:disabled) { border-color: #176b64; transform: none; }
.choice-key { background: #e8eff0; color: #294652; }
.choice-pill.active .choice-key { background: #176b64; color: #fff; }
.exercise-progress-bar, .xp-meter { background: #dbe6e8; }
.exercise-progress-fill, .xp-fill { background: #28766d; }
.reward-card { background: #f4f8f7; border-color: #cddbdc; border-radius: 14px; box-shadow: none; }
.reward-value { color: #244c57; }
.reward-label, .player-stat-label { color: #4b626e; font-size: .9375rem; }
.question-list button, .question-list-item { font-size: .9375rem; }
.question-list-number { font-size: .9375rem; }
.question-list-item.pending { border-color: #9db1ba; color: #48616e; }
.question-list-item:hover { border-color: #176b64; background: #edf6f2; }
.question-list-item.active { background: #285b66; border-color: #285b66; color: #fff; }
.question-list-item:is(.correct, .answered) { border-color: #1c6a4e; color: #1c6a4e; }
.question-list-item:is(.correct, .answered).active { background: #1c6a4e; color: #fff; }
.question-list-item.wrong { border-color: #a0383d; color: #a0383d; }
.question-list-item.wrong.active { background: #a0383d; color: #fff; }
.question-list-item.todo { background: #fff5e5; border-color: #9a702e; color: #77521e; }
.question-list-item.todo.active { background: #875c1f; color: #fff; }
.fauna-unknown { color: #1d6460; }

/* Account pages, result summaries and dialogs follow the same surface system. */
.player-avatar { background: #285b66; }
.reward-pill { background: #e4efeb; border-color: #c6d9d2; color: #23564f; }
.audience-picker-dialog, .pcv-modal .modal-content.pcv-modal-card { background: #fff; border-color: #bccfd3; }
.audience-card { background: #f8fbfa; border: 2px solid #a5babf; }
.audience-card.is-active { background: #e6f3ed; border-color: #176b64; box-shadow: none; }
.audience-card:is(:hover, :focus-visible) { border-color: #176b64; transform: none; }
.audience-card-pitch { color: #4b626e; font-size: .9375rem; }
.audience-card-age { color: #3b5966; font-size: .9375rem; }
.audience-card-badge { font-size: .8125rem; letter-spacing: .02em; }
.badge-card.locked, .world-node.locked, .galaxy-map-world-locked { opacity: 1; }
.result-metric-label { color: #4b626e; font-size: .875rem; }
.review-row { border-color: #becfd3; background: #fff; box-shadow: none; }
.review-row-prompt { color: #1c3542; line-height: 1.65; }
.review-row-explanation { background: #f3f7f5; }
.world-view-card:is(.world-view-current, .world-view-unlocked, .world-view-locked) { background: #fff; }
.world-view-card.world-view-current { border-color: #578f80; }
.world-view-card.world-view-locked { border-color: #b9c9ce; opacity: 1; }

@media (max-width: 991.98px) {
  .navbar .container { border-radius: 14px; }
  .navbar-nav .nav-link { padding: .7rem .85rem; }
  .hero-visual { min-height: 18rem; }
}
@media (max-width: 767.98px) {
  .difficulty-choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 575.98px) {
  .brand-logo { width: 2.75rem; height: 2.75rem; }
  .brand-mark { font-size: 1.05rem; }
  .brand-submark { font-size: .6875rem; letter-spacing: .035em; }
  .home-main .hero-title { font-size: 2.25rem; max-width: 17ch; }
  .hero-panel, .home-main .content-panel { padding: 1.2rem; }
  .hero-visual { min-height: 16rem; }
  .hero-side-grid { grid-template-columns: 1fr; }
  .hero-visual-badge { padding: .6rem .7rem; max-width: calc(100% - 2rem); }
  .hero-visual-badge strong { font-size: 1.05rem; }
  .hero-visual-badge span { font-size: .875rem; }
  .section-title { font-size: 1.8rem; }
  .challenge-screen { padding: .85rem; }
  .question-panel, .mockup-sidepanel { padding: 1rem; }
  .difficulty-picker { padding: .85rem; }
  .difficulty-cockpit-head, .difficulty-cockpit-group { padding: .85rem; }
  .difficulty-cockpit-group-status { justify-items: start; }
  .difficulty-cockpit-group-status span { text-align: left; }
  .difficulty-choice { min-height: 0; }
  .difficulty-choice-grid { grid-template-columns: 1fr; }
  .question-count-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .difficulty-cockpit-group-meta { gap: .6rem; }
  .difficulty-cockpit-group-badge { min-width: 2.4rem; height: 2.4rem; }
  .count-choice { padding: .6rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}
