:root {
  --bg: #f4f7fb;
  --surface: rgba(255, 255, 255, 0.95);
  --surface-strong: #ffffff;
  --surface-soft: #eef3f8;
  --text: #162033;
  --muted: #607089;
  --line: rgba(22, 32, 51, 0.12);
  --shadow: 0 22px 46px rgba(26, 42, 78, 0.12);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --easy: #111111;
  --medium: #b98200;
  --hard: #bf4d2c;
  --realistic: #8f2e2e;
  --primary: #144b7d;
  --primary-deep: #0f3558;
  --success: #26734d;
  --warning: #8c5a10;
  --danger: #a23232;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Avenir Next", Avenir, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(20, 75, 125, 0.14), transparent 24%),
    radial-gradient(circle at bottom right, rgba(191, 77, 44, 0.1), transparent 26%),
    linear-gradient(180deg, #f8fbff 0%, var(--bg) 100%);
}

body.easy-mode {
  background: #ffffff;
  color: #111111;
}

body.medium-mode {
  background:
    radial-gradient(circle at top left, rgba(244, 173, 66, 0.22), transparent 24%),
    radial-gradient(circle at bottom right, rgba(57, 121, 200, 0.18), transparent 30%),
    linear-gradient(180deg, #fff9ef 0%, #f3f8ff 100%);
}

body.hard-mode {
  background:
    radial-gradient(circle at top left, rgba(227, 90, 57, 0.22), transparent 22%),
    radial-gradient(circle at top right, rgba(74, 153, 123, 0.18), transparent 24%),
    radial-gradient(circle at bottom left, rgba(241, 183, 62, 0.16), transparent 26%),
    linear-gradient(180deg, #fff5f2 0%, #f7fbff 100%);
}

body.realistic-mode {
  background:
    linear-gradient(180deg, #b8c6d6 0%, #c9d4df 100%);
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
}

.shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 22px 56px;
}

.hero,
.card,
.panel,
.modal-card,
.toast,
.popup-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.easy-mode .hero,
.easy-mode .card,
.easy-mode .panel,
.easy-mode .modal-card,
.easy-mode .toast,
.easy-mode .popup-card {
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
  border: 2px solid #111111;
  background: #ffffff;
}

.hero {
  padding: 34px;
  margin-bottom: 22px;
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  color: var(--muted);
}

.easy-mode .eyebrow,
.easy-mode .muted {
  color: #303030;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  font-size: clamp(2rem, 4vw, 3.35rem);
  letter-spacing: -0.04em;
}

.muted {
  color: var(--muted);
}

.home-grid,
.dashboard-grid,
.two-column {
  display: grid;
  gap: 22px;
}

.home-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-grid {
  grid-template-columns: 1.2fr 0.95fr;
  align-items: start;
}

.two-column {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card,
.panel {
  padding: 24px;
}

.home-grid .card {
  display: flex;
  flex-direction: column;
}

.level-badge,
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
}

.level-badge.easy {
  background: #111111;
  color: #ffffff;
}

.level-badge.medium {
  background: linear-gradient(135deg, #ebc55f, var(--medium));
  color: #2c2100;
}

.level-badge.hard {
  background: linear-gradient(135deg, #f39b78, var(--hard));
  color: #fff7f2;
}

.level-badge.expert {
  background: linear-gradient(135deg, #d97a7a, var(--realistic));
  color: #fff7f7;
}

.cta,
.secondary,
.tab-button,
.tiny-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.cta:hover,
.secondary:hover,
.tab-button:hover,
.tiny-button:hover {
  transform: translateY(-1px);
}

.cta {
  padding: 14px 18px;
  color: #ffffff;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--primary-deep));
  box-shadow: 0 16px 28px rgba(15, 53, 88, 0.2);
}

.secondary {
  padding: 13px 16px;
  background: rgba(20, 75, 125, 0.08);
  color: var(--text);
  font-weight: 700;
}

.easy-mode .cta,
.easy-mode .secondary,
.easy-mode .tab-button,
.easy-mode .tiny-button {
  background: #ffffff;
  color: #111111;
  border: 2px solid #111111;
  box-shadow: none;
}

.task-list,
.details-list,
.ledger,
.nav-list,
.score-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-grid .card .cta {
  margin-top: auto;
}

.goal-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.goal-item {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
}

.easy-mode .goal-item {
  border-radius: 0;
  border: 1px solid #111111;
  background: #ffffff;
}

.goal-box {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid currentColor;
  font-size: 0.88rem;
  font-weight: 800;
  flex: 0 0 auto;
}

.goal-item.completed {
  color: var(--muted);
  text-decoration: line-through;
}

.task-list li,
.details-list li,
.score-list li {
  margin-bottom: 12px;
}

.details-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.details-list strong {
  white-space: nowrap;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 22px 0;
}

.summary-box {
  padding: 18px;
  border-radius: 20px;
  background: var(--surface-soft);
  border: 1px solid rgba(20, 75, 125, 0.08);
}

.easy-mode .summary-box {
  border-radius: 0;
  border: 1px solid #111111;
  background: #ffffff;
}

.summary-box span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.86rem;
}

.summary-box strong {
  font-size: 1.36rem;
}

.page-top {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
}

.utility-row,
.button-row,
.inline-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.tab-button {
  padding: 12px 14px;
  background: rgba(22, 32, 51, 0.06);
  font-weight: 700;
  color: var(--text);
}

.tab-button.active {
  background: rgba(20, 75, 125, 0.14);
}

.panel.hidden,
.modal.hidden,
.toast.hidden,
.popup.hidden,
.hidden {
  display: none;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(100%, 520px);
  padding: 32px;
}

.login-form {
  display: grid;
  gap: 14px;
}

.access-note {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(20, 75, 125, 0.08);
  border: 1px solid rgba(20, 75, 125, 0.12);
}

.easy-mode .access-note {
  border-radius: 0;
  background: #ffffff;
  border: 2px solid #111111;
}

.payment-form,
.field-grid {
  display: grid;
  gap: 14px;
}

.field-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

label {
  display: grid;
  gap: 8px;
  font-weight: 700;
  font-size: 0.93rem;
}

input,
select {
  width: 100%;
  padding: 14px 15px;
  border: 1px solid rgba(22, 32, 51, 0.16);
  border-radius: 14px;
  background: #ffffff;
  color: var(--text);
}

.easy-mode input,
.easy-mode select {
  border-radius: 0;
  border: 2px solid #111111;
}

input:focus,
select:focus {
  outline: 2px solid rgba(20, 75, 125, 0.12);
  border-color: rgba(20, 75, 125, 0.5);
}

.payment-choice {
  display: grid;
  gap: 10px;
}

.choice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.8);
}

.easy-mode .choice {
  border-radius: 0;
  border: 1px solid #111111;
  background: #ffffff;
}

.choice input {
  width: auto;
  margin-top: 2px;
}

.status {
  min-height: 1.5rem;
  font-weight: 700;
}

.status.success {
  color: var(--success);
}

.status.error {
  color: var(--danger);
}

.ledger {
  border-top: 1px solid var(--line);
}

.ledger li {
  display: grid;
  grid-template-columns: 108px 1fr auto auto;
  gap: 14px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.ledger li.selectable {
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease;
}

.ledger li.selectable:hover {
  background: rgba(20, 75, 125, 0.05);
  transform: translateY(-1px);
}

.ledger li.resolved {
  opacity: 0.72;
}

.ledger small {
  display: block;
  color: var(--muted);
}

.amount {
  font-weight: 800;
}

.pending {
  color: inherit;
  font-style: italic;
}

.fraud {
  color: var(--danger);
}

.tiny-button {
  padding: 9px 12px;
  background: rgba(162, 50, 50, 0.08);
  color: var(--danger);
  font-weight: 800;
}

.selected-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(22, 32, 51, 0.08);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.promo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.realistic-stack {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 18px;
  margin-top: 18px;
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.mini-card {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(20, 75, 125, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(240, 246, 255, 0.9));
}

.realistic-banner {
  padding: 18px 20px;
  border-radius: 22px;
  color: #132033;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.5), transparent 25%),
    linear-gradient(135deg, rgba(255, 205, 101, 0.55), rgba(113, 195, 255, 0.38), rgba(255, 137, 137, 0.34));
  border: 1px solid rgba(20, 75, 125, 0.14);
}

.realistic-mode .hero {
  background: linear-gradient(180deg, #0b3053 0%, #18466f 100%);
  border-color: rgba(10, 35, 61, 0.35);
  color: #ffffff;
}

.realistic-mode .hero .muted,
.realistic-mode .hero .eyebrow,
.realistic-mode .hero .summary-box span,
.realistic-mode .hero .realistic-banner p {
  color: rgba(255, 255, 255, 0.82);
}

.realistic-mode .summary-box {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.realistic-mode .summary-box strong {
  color: #ffffff;
}

.realistic-mode .panel {
  background: linear-gradient(180deg, #e3ebf3 0%, #f1f5f9 100%);
  border-color: rgba(12, 43, 72, 0.14);
}

.realistic-mode .tab-button.active {
  background: #103b66;
  color: #ffffff;
}

.realistic-mode .realistic-banner {
  color: #ffffff;
  background: linear-gradient(135deg, #183f68 0%, #235d69 55%, #426297 100%);
  border-color: rgba(255, 255, 255, 0.14);
}

.realistic-mode .mini-card:nth-child(1) {
  background: linear-gradient(180deg, #c6911d 0%, #e1ae44 100%);
  color: #1f1605;
}

.realistic-mode .mini-card:nth-child(2) {
  background: linear-gradient(180deg, #2f5e8d 0%, #4878ab 100%);
  color: #ffffff;
}

.realistic-mode .mini-card:nth-child(3) {
  background: linear-gradient(180deg, #2f7668 0%, #4b9888 100%);
  color: #ffffff;
}

.realistic-mode .mini-card .muted,
.realistic-mode .mini-card p,
.realistic-mode .mini-card strong {
  color: inherit;
}

.ticker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.ticker span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  font-size: 0.82rem;
  font-weight: 700;
}

.status-chip {
  border: 1px solid rgba(255, 255, 255, 0.18);
  cursor: pointer;
  color: #0f2035;
  background: rgba(255, 255, 255, 0.92);
  transition: transform 160ms ease, background 160ms ease;
}

.status-chip:hover {
  transform: translateY(-1px);
  background: #ffffff;
}

.promo-box {
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(20, 75, 125, 0.08), rgba(20, 75, 125, 0.02));
  border: 1px solid rgba(20, 75, 125, 0.08);
}

.alert {
  padding: 16px 18px;
  border-radius: 18px;
  margin-bottom: 16px;
  background: rgba(191, 77, 44, 0.1);
  border: 1px solid rgba(191, 77, 44, 0.18);
}

.fraud-alert {
  background: rgba(162, 50, 50, 0.12);
  border-color: rgba(162, 50, 50, 0.24);
}

.modal,
.popup {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(9, 18, 31, 0.35);
  z-index: 20;
}

.popup {
  place-items: end;
  padding: 24px;
  background: transparent;
  pointer-events: none;
}

.popup-card {
  width: min(360px, 100%);
  padding: 22px;
  pointer-events: auto;
}

.modal-card {
  width: min(560px, 100%);
  padding: 28px;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: min(360px, calc(100vw - 44px));
  padding: 20px;
  z-index: 18;
}

.reference-card {
  max-width: 780px;
  margin: 0 auto;
}

.reference-block {
  padding: 18px;
  margin-top: 16px;
  border-radius: 20px;
  background: var(--surface-soft);
  border: 1px solid rgba(20, 75, 125, 0.08);
}

.easy-note {
  margin-top: 20px;
  padding: 16px;
  border: 2px dashed #111111;
}

.site-credit {
  margin: 18px auto 0;
  padding: 0 22px 20px;
  text-align: center;
  font-size: 0.78rem;
  color: rgba(22, 32, 51, 0.5);
}

.realistic-mode .site-credit,
.hard-mode .site-credit,
.medium-mode .site-credit {
  color: rgba(22, 32, 51, 0.52);
}

.easy-mode .site-credit {
  color: rgba(17, 17, 17, 0.55);
}

@media (max-width: 1100px) {
  .home-grid,
  .summary-strip,
  .promo-grid,
  .dashboard-grid,
  .two-column,
  .realistic-stack,
  .mini-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .field-grid,
  .ledger li {
    grid-template-columns: 1fr;
  }

  .page-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .shell {
    padding: 20px 14px 40px;
  }

  .site-credit {
    padding: 0 14px 16px;
  }
}
