/* -- Minimum Wage Survivor — game.css (halftone) -------- */

.mws-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.mws-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem 1rem 2rem;
}

.mws-logo { margin-bottom: 1.5rem; }
.mws-logo .logo-img { height: 40px; }

/* -- Screens -------------------------------------------- */
.mws-screen { display: none; width: 100%; max-width: 620px; }
.mws-screen.active { display: block; }

/* -- Shared --------------------------------------------- */
.btn-primary {
  display: inline-block;
  background: var(--ht-ink);
  color: var(--ht-bg);
  border: 2px solid var(--ht-ink);
  padding: 0.85rem 2.25rem;
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--font-body);
  font-family: var(--font-ui);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
}
.btn-primary:hover { background: var(--ht-accent); border-color: var(--ht-accent); color: #fff; }
.btn-primary:disabled { opacity: 0.35; cursor: not-allowed; }

.btn-secondary {
  display: inline-block;
  background: transparent;
  color: var(--ht-ink);
  border: 1.5px solid var(--ht-ink);
  padding: 0.7rem 1.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font-ui);
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}
.btn-secondary:hover { background: var(--ht-ink); color: var(--ht-bg); }

/* -- INTRO ---------------------------------------------- */
.mws-intro { text-align: center; padding-top: 1rem; }

.mws-intro h1 {
  font-family: var(--font-display);
  color: var(--ht-ink);
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0px;
  margin-bottom: 0.5rem;
}

.intro-sub {
  color: var(--ht-ink-mid);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.wage-badge {
  display: inline-block;
  background: var(--ht-ink);
  color: var(--ht-bg);
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  font-family: var(--font-display);
  padding: 0.65rem 2rem;
  border-radius: 4px;
  margin: 0.25rem 0;
}

.takehome-badge {
  display: inline-block;
  background: transparent;
  border: 1.5px solid var(--ht-accent-sage);
  color: var(--ht-ink-mid);
  font-size: clamp(1.1rem, 3vw, 1.4rem);
  font-weight: 700;
  font-family: var(--font-ui);
  padding: 0.5rem 1.75rem;
  border-radius: 4px;
  margin: 0.5rem 0 1rem;
}

.intro-question {
  color: var(--ht-ink);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 2rem;
  opacity: 0.8;
}

/* -- YEAR SELECT ---------------------------------------- */
.year-select {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin: 0 0 1.1rem;
}
.year-pill {
  background: transparent;
  border: 1.5px solid rgba(var(--ht-ink-raw),0.3);
  color: var(--ht-ink);
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s;
}
.year-pill:hover { border-color: var(--ht-accent); color: var(--ht-accent); }
.year-pill.selected {
  background: var(--ht-ink);
  border-color: var(--ht-ink);
  color: var(--ht-bg);
}

.wage-note {
  max-width: 480px;
  margin: 0 auto 1.25rem;
  font-size: 0.78rem;
  line-height: 1.5;
  color: rgba(var(--ht-ink-raw),0.55);
}

/* -- SETUP ---------------------------------------------- */
.mws-setup h2 {
  font-family: var(--font-display);
  color: var(--ht-ink);
  font-size: 1.6rem;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  text-align: center;
}

.mws-section {
  background: rgba(var(--ht-ink-raw),0.04);
  border: 1.5px solid rgba(var(--ht-ink-raw),0.2);
  border-radius: 6px;
  padding: 1.1rem 1.25rem;
  margin-bottom: 0.85rem;
}

.section-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--ht-ink-mid);
  opacity: 0.65;
  margin-bottom: 0.85rem;
  font-family: var(--font-ui);
}

/* Housing options */
.housing-options { display: flex; flex-direction: column; gap: 0.5rem; }

.housing-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.85rem;
  border: 1.5px solid rgba(var(--ht-ink-raw),0.15);
  border-radius: 6px;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s;
  background: transparent;
}
.housing-option:hover { border-color: var(--ht-accent); }
.housing-option.selected {
  border-color: var(--ht-accent);
  background: rgba(52,84,209,0.06);
}
.housing-option input[type="radio"] {
  accent-color: var(--ht-accent);
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  cursor: pointer;
}
.h-info { flex: 1; min-width: 0; }
.h-name { font-weight: 600; color: var(--ht-ink); font-size: 0.88rem; }
.h-detail { color: rgba(var(--ht-ink-raw),0.45); font-size: 0.75rem; margin-top: 0.1rem; }
.h-cost { font-weight: 700; color: var(--ht-accent); font-size: 0.95rem; white-space: nowrap; }

/* Sliders */
.slider-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.7rem;
}
.slider-row:last-child { margin-bottom: 0; }
.slider-lbl { width: 90px; flex-shrink: 0; }
.slider-lbl span { display: block; font-size: 0.88rem; color: var(--ht-ink); font-weight: 600; }
.slider-lbl small { display: block; font-size: 0.7rem; color: rgba(var(--ht-ink-raw),0.4); line-height: 1.3; }
.mws-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 2px;
  background: rgba(var(--ht-ink-raw),0.15);
  outline: none;
  cursor: pointer;
}
.mws-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--ht-ink);
  cursor: pointer;
}
.mws-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--ht-ink);
  border: none;
  cursor: pointer;
}
.slider-val { width: 44px; text-align: right; font-weight: 700; color: var(--ht-accent); font-size: 0.85rem; flex-shrink: 0; }

/* Bills breakdown */
.bills-list { font-size: 0.8rem; color: rgba(var(--ht-ink-raw),0.5); line-height: 1.8; }
.bills-total { font-weight: 700; color: var(--ht-ink); }

/* Budget summary */
.mws-summary {
  background: rgba(var(--ht-ink-raw),0.04);
  border: 1.5px solid rgba(var(--ht-ink-raw),0.2);
  border-radius: 6px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}

.sum-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.88rem;
  padding: 0.22rem 0;
  color: var(--ht-ink);
}
.sum-row.dim { color: rgba(var(--ht-ink-raw),0.5); }
.sum-divider { border: none; border-top: 1px solid rgba(var(--ht-ink-raw),0.12); margin: 0.4rem 0; }
.sum-remaining-row { font-size: 1.15rem; font-weight: 700; padding: 0.3rem 0 0; }

.c-ok     { color: #1a8f4e; }
.c-tight  { color: #9a6c00; }
.c-danger { color: #c45a00; }
.c-broke  { color: #b91c1c; }

.sum-status {
  font-size: 0.8rem;
  padding: 0.45rem 0.75rem;
  border-radius: 4px;
  margin-top: 0.5rem;
  line-height: 1.4;
  border: 1.5px solid;
}
.sum-status.ok     { background: rgba(74,222,128,0.12); color: #1a8f4e; border-color: rgba(74,222,128,0.4); }
.sum-status.tight  { background: rgba(251,191,36,0.12); color: #9a6c00; border-color: rgba(251,191,36,0.4); }
.sum-status.danger { background: rgba(249,115,22,0.12); color: #c45a00; border-color: rgba(249,115,22,0.4); }
.sum-status.broke  { background: rgba(239,68,68,0.12);  color: #b91c1c; border-color: rgba(239,68,68,0.4); }

/* -- SIMULATE ------------------------------------------- */
.sim-header { text-align: center; margin-bottom: 1.25rem; }

.sim-month-lbl {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--ht-ink-mid);
  margin-bottom: 0.2rem;
  font-family: var(--font-ui);
}

.sim-balance {
  font-size: clamp(2.2rem, 7vw, 3.2rem);
  font-weight: 700;
  transition: color 0.4s;
  line-height: 1;
  margin-bottom: 0.2rem;
  font-family: var(--font-display);
}
.sim-balance-lbl { font-size: 0.75rem; color: rgba(var(--ht-ink-raw),0.4); }

.sim-b-ok     { color: #1a8f4e; }
.sim-b-tight  { color: #9a6c00; }
.sim-b-danger { color: #c45a00; }
.sim-b-broke  { color: #b91c1c; }

.month-bar-wrap {
  background: rgba(var(--ht-ink-raw),0.1);
  border-radius: 4px;
  height: 7px;
  margin: 0.85rem 0 0.3rem;
  overflow: hidden;
}
.month-bar {
  height: 100%;
  background: var(--ht-ink);
  border-radius: 4px;
  transition: width 0.45s ease;
  width: 0%;
}

.month-bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: rgba(var(--ht-ink-raw),0.3);
  margin-bottom: 1rem;
}

.events-log {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 2px;
}

.event-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  background: rgba(var(--ht-ink-raw),0.04);
  border-radius: 4px;
  padding: 0.65rem 0.85rem;
  border-left: 3px solid rgba(var(--ht-ink-raw),0.15);
  animation: evSlide 0.28s ease;
}
.event-card.ev-neg  { border-left-color: #b91c1c; }
.event-card.ev-pos  { border-left-color: #1a8f4e; }
.event-card.ev-info { border-left-color: var(--ht-accent); }

.ev-text {
  flex: 1;
  font-size: 0.83rem;
  color: var(--ht-ink);
  line-height: 1.35;
}
.ev-day { font-size: 0.7rem; opacity: 0.45; display: block; margin-bottom: 0.1rem; }
.ev-amt { font-weight: 700; font-size: 0.88rem; white-space: nowrap; flex-shrink: 0; }
.ev-amt.neg { color: #b91c1c; }
.ev-amt.pos { color: #1a8f4e; }

@keyframes evSlide {
  from { opacity: 0; transform: translateX(-8px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* -- RESULT --------------------------------------------- */
.mws-result { text-align: center; padding-top: 0.5rem; }

.result-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.9rem;
  font-weight: 900;
  margin: 0 auto 0.5rem;
  font-family: var(--font-body);
}
.result-icon.ri-survived { background: rgba(74,222,128,0.12); color: #1a8f4e; border: 2px solid rgba(74,222,128,0.5); }
.result-icon.ri-failed   { background: rgba(239,68,68,0.12);  color: #b91c1c; border: 2px solid rgba(239,68,68,0.5); }

.result-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  text-transform: uppercase;
  letter-spacing: 0px;
  margin-bottom: 0.5rem;
}
.result-survived .result-title { color: #1a8f4e; }
.result-failed   .result-title { color: #b91c1c; }

.result-body {
  color: var(--ht-ink);
  font-size: 0.95rem;
  line-height: 1.6;
  opacity: 0.8;
  margin-bottom: 1.25rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin: 0 0 1.25rem;
  text-align: left;
}
.stat-card {
  background: rgba(var(--ht-ink-raw),0.05);
  border: 1.5px solid rgba(var(--ht-ink-raw),0.18);
  border-radius: 6px;
  padding: 0.85rem 1rem;
}
.stat-lbl { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 3px; color: var(--ht-ink-mid); opacity: 0.65; margin-bottom: 0.25rem; font-family: var(--font-ui); }
.stat-val { font-size: 1.2rem; font-weight: 700; color: var(--ht-ink); font-family: var(--font-display); }

.eye-opener {
  background: rgba(52,84,209,0.06);
  border: 1.5px solid rgba(52,84,209,0.25);
  border-radius: 6px;
  padding: 0.85rem 1.1rem;
  font-size: 0.87rem;
  color: var(--ht-ink);
  line-height: 1.6;
  text-align: left;
  margin-bottom: 0.65rem;
}
.eye-opener strong { color: var(--ht-accent); }

.result-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.5rem;
}

.share-btn {
  background: var(--ht-ink);
  color: var(--ht-bg);
  font-weight: 700;
  border: 2px solid var(--ht-ink);
  padding: 0.85rem 2rem;
  border-radius: 4px;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  width: 100%;
  max-width: 280px;
}
.share-btn:hover { background: var(--ht-accent); border-color: var(--ht-accent); color: #fff; }

/* -- CHOICE EVENTS ------------------------------------- */
.event-card.ev-choice {
  border-left-color: #b37700;
  flex-direction: column;
  align-items: stretch;
  background: rgba(245,158,11,0.06);
  padding-bottom: 0.85rem;
}

.choice-badge {
  display: inline-block;
  background: var(--ht-ink);
  color: var(--ht-bg);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  margin-left: 0.35rem;
  vertical-align: middle;
  font-family: var(--font-ui);
}

.choice-question {
  margin-top: 0.3rem;
  font-size: 0.86rem;
  color: var(--ht-ink);
  line-height: 1.4;
}

.choice-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-top: 0.65rem;
}

.choice-opt {
  background: rgba(var(--ht-ink-raw),0.04);
  border: 1.5px solid rgba(var(--ht-ink-raw),0.15);
  border-radius: 6px;
  padding: 0.6rem 0.65rem;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-body);
  transition: background 0.15s, border-color 0.15s;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}
.choice-opt:hover:not(:disabled) { background: rgba(var(--ht-ink-raw),0.1); border-color: var(--ht-ink); }
.choice-opt:disabled { opacity: 0.5; cursor: default; }

.co-label  { font-size: 0.8rem; font-weight: 700; color: var(--ht-ink); }
.co-detail { font-size: 0.7rem; color: rgba(var(--ht-ink-raw),0.45); }
.co-amount { font-size: 0.8rem; font-weight: 700; margin-top: 0.2rem; }
.co-amount.pos     { color: #1a8f4e; }
.co-amount.neg     { color: #b91c1c; }
.co-amount.neutral { color: rgba(var(--ht-ink-raw),0.45); }

.choice-result-pill {
  display: inline-block;
  font-size: 0.7rem;
  font-style: italic;
  color: rgba(var(--ht-ink-raw),0.5);
  margin-left: 0.3rem;
}

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

/* End-of-month continue button (replaces the auto-jump to results) */
.sim-continue-wrap {
  display: flex;
  justify-content: center;
  padding: 14px 0 6px;
}
.sim-continue { animation: fadeIn 0.4s ease-out; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
