:root {
  --ink: #071426;
  --muted: #5e6b7c;
  --paper: #f7f9fc;
  --card: #ffffff;
  --line: #dce3ed;
  --blue: #0f62fe;
  --blue-dark: #0846b8;
  --green: #04a957;
  --yellow: #ffd21c;
  --orange: #ff7a00;
  --red: #dc2638;
  --purple: #7b3ff2;
  --shadow: 0 14px 40px rgba(7, 20, 38, 0.14);
  --radius: 22px;
  font-family: Inter, ui-rounded, "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }

body { margin: 0; min-height: 100vh; background: var(--paper); }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 4px solid rgba(15, 98, 254, .28); outline-offset: 2px; }
.hidden { display: none !important; }
.eyebrow { color: var(--blue); font-size: .72rem; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.fine-print { color: var(--muted); font-size: .78rem; line-height: 1.45; }
.muted { color: var(--muted); }
.positive { color: var(--green) !important; }
.negative { color: var(--red) !important; }
.warning { color: #9b5500 !important; }

.welcome { min-height: 100vh; display: grid; grid-template-columns: minmax(280px, 1.1fr) minmax(320px, .9fr); background: #071426; }
.welcome-art { min-height: 100vh; background: linear-gradient(90deg, transparent 55%, #071426 100%), url('/assets/tshirt-business-tycoon-concept.png') center/cover no-repeat; }
.welcome-panel { color: white; display: flex; flex-direction: column; justify-content: center; padding: clamp(32px, 6vw, 88px); }
.welcome h1 { margin: 12px 0 8px; max-width: 620px; font-size: clamp(2.5rem, 6vw, 5.3rem); line-height: .9; letter-spacing: -.055em; }
.promise { color: #cfe1ff; max-width: 520px; font-size: clamp(1rem, 2vw, 1.3rem); }
.setup-card { display: grid; gap: 15px; max-width: 520px; margin-top: 20px; padding: 22px; color: var(--ink); background: rgba(255,255,255,.98); border-radius: var(--radius); box-shadow: var(--shadow); }
label { display: grid; gap: 7px; color: var(--ink); font-size: .84rem; font-weight: 800; }
input, select { min-height: 48px; width: 100%; padding: 11px 13px; color: var(--ink); background: white; border: 1px solid #b8c3d1; border-radius: 12px; }

.btn { min-height: 46px; padding: 11px 18px; border: 0; border-radius: 13px; font-weight: 900; transition: transform .12s ease, filter .12s ease; }
.btn:hover { filter: brightness(.98); transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn.primary { color: white; background: linear-gradient(135deg, var(--blue), #00a3ff); box-shadow: 0 8px 20px rgba(15, 98, 254, .25); }
.btn.secondary { color: var(--ink); background: #eaf1ff; }
.btn.success { color: white; background: var(--green); }
.btn.danger { color: white; background: var(--red); }
.btn.ghost { color: var(--blue); background: transparent; border: 2px solid var(--blue); }
.btn.jumbo { min-height: 56px; font-size: 1rem; }
.btn:disabled { cursor: not-allowed; opacity: .46; filter: grayscale(.2); transform: none; }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.app-shell { min-height: 100vh; padding-bottom: 92px; }
.topbar { position: sticky; z-index: 20; top: 0; display: flex; justify-content: space-between; align-items: center; min-height: 68px; padding: 10px max(18px, env(safe-area-inset-left)); color: white; background: rgba(7,20,38,.97); backdrop-filter: blur(12px); }
.brand-lockup { display: flex; align-items: center; gap: 10px; }
.brand-lockup div { display: grid; }
.brand-lockup span { font-weight: 950; }
.brand-lockup small { color: #aabbd2; }
.icon-button { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; color: inherit; background: transparent; border: 0; border-radius: 50%; font-size: 1.6rem; }

.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; color: white; background: #17304e; border-bottom: 1px solid #234160; }
.stat-strip div { display: grid; place-items: center; min-height: 62px; padding: 8px; background: var(--ink); text-align: center; }
.stat-strip span { color: #98abc2; font-size: .68rem; font-weight: 800; text-transform: uppercase; }
.stat-strip strong { font-size: 1rem; }

main { width: min(1180px, 100%); margin: 0 auto; padding: 22px 18px 36px; }
.view { display: none; animation: appear .18s ease; }
.view.active { display: block; }
@keyframes appear { from { opacity: .2; transform: translateY(5px); } }
.page-title { margin: 0 0 6px; font-size: clamp(1.65rem, 4vw, 2.5rem); letter-spacing: -.04em; }
.page-lead { margin: 0 0 22px; color: var(--muted); line-height: 1.55; }

.hero-card { position: relative; overflow: hidden; display: grid; grid-template-columns: 1.3fr .7fr; min-height: 245px; margin-bottom: 18px; color: white; background: linear-gradient(135deg, #0d4ed3, #03a65b); border-radius: 28px; box-shadow: var(--shadow); }
.hero-copy { z-index: 1; padding: clamp(24px, 5vw, 52px); }
.hero-card h1 { max-width: 700px; margin: 8px 0; font-size: clamp(2rem, 5vw, 4rem); line-height: .96; letter-spacing: -.05em; }
.hero-card p { max-width: 600px; color: #e1eeff; line-height: 1.55; }
.hero-mark { display: grid; place-items: center; font-size: clamp(7rem, 18vw, 14rem); transform: rotate(-8deg); filter: drop-shadow(0 16px 14px rgba(0,0,0,.18)); }

.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { padding: 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 7px 22px rgba(7,20,38,.06); }
.card h2, .card h3 { margin: 0 0 8px; letter-spacing: -.025em; }
.card p { line-height: 1.5; }
.card-header { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.tag { display: inline-flex; align-items: center; min-height: 27px; padding: 5px 9px; color: var(--blue-dark); background: #e8f0ff; border-radius: 999px; font-size: .72rem; font-weight: 900; }
.tag.green { color: #076c3b; background: #ddfaeb; }
.tag.orange { color: #8b4700; background: #fff0dc; }
.tag.red { color: #a01325; background: #ffe2e7; }
.tag.purple { color: #5821b3; background: #eee4ff; }

.progress { overflow: hidden; height: 10px; background: #e6ebf2; border-radius: 999px; }
.progress > span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--blue), var(--green)); border-radius: inherit; transition: width .25s ease; }
.meter-row { display: grid; grid-template-columns: 105px 1fr 42px; align-items: center; gap: 10px; margin: 9px 0; font-size: .8rem; font-weight: 750; }
.metric-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 12px 0; }
.metric { padding: 10px; background: #f4f7fb; border-radius: 12px; }
.metric span { display: block; color: var(--muted); font-size: .68rem; text-transform: uppercase; }
.metric strong { font-size: 1rem; }

.contract-card { display: grid; gap: 12px; border-top: 7px solid var(--blue); }
.contract-card.selected { outline: 4px solid rgba(15,98,254,.18); }
.contract-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.contract-facts div { padding: 8px; background: #f4f7fb; border-radius: 11px; text-align: center; }
.contract-facts small { display: block; color: var(--muted); }
.contract-facts strong { font-size: .93rem; }
.requirement-list, .reason-list { margin: 10px 0; padding-left: 20px; }
.requirement-list li, .reason-list li { margin: 6px 0; line-height: 1.4; }

.stepper { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 12px; }
.step { min-width: 120px; padding: 10px; color: var(--muted); background: #edf1f6; border-radius: 12px; font-size: .75rem; font-weight: 900; text-align: center; }
.step.done { color: #076c3b; background: #ddfaeb; }
.step.current { color: white; background: var(--blue); }

.supplier-card { position: relative; }
.supplier-card.recommended::after { content: "BEST FIT"; position: absolute; top: 10px; right: 10px; padding: 4px 7px; color: #5d4700; background: var(--yellow); border-radius: 999px; font-size: .62rem; font-weight: 950; }
.price { font-size: 1.8rem; font-weight: 950; letter-spacing: -.04em; }
.price small { color: var(--muted); font-size: .72rem; letter-spacing: normal; }

.studio-canvas { position: relative; display: grid; place-items: center; min-height: 315px; overflow: hidden; background: radial-gradient(circle at 50% 30%, #fff, #e8edf5); border: 1px dashed #9ba9b9; border-radius: var(--radius); }
.shirt-preview { position: relative; display: grid; place-items: center; width: 230px; height: 245px; color: #152037; background: #fff; clip-path: polygon(20% 0, 36% 8%, 64% 8%, 80% 0, 100% 16%, 87% 42%, 77% 34%, 77% 100%, 23% 100%, 23% 34%, 13% 42%, 0 16%); filter: drop-shadow(0 14px 16px rgba(7,20,38,.15)); }
.shirt-preview.dark { color: white; background: #172235; }
.shirt-preview.blue { color: white; background: #175de0; }
.shirt-preview.red { color: white; background: #d8263e; }
.shirt-preview span { width: 118px; text-align: center; font-size: 1.2rem; font-weight: 950; line-height: 1.05; text-transform: uppercase; }
.choice-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.choice-pills label { display: block; }
.choice-pills input { position: absolute; opacity: 0; pointer-events: none; }
.choice-pills span { display: inline-block; padding: 9px 12px; background: #eef2f7; border: 2px solid transparent; border-radius: 999px; font-size: .78rem; }
.choice-pills input:checked + span { color: var(--blue-dark); background: #e4eeff; border-color: var(--blue); }

.press-machine { padding: 18px; color: white; background: linear-gradient(160deg, #1b2b43, #071426); border-radius: 24px; box-shadow: var(--shadow); }
.press-display { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0; }
.digital { padding: 18px; color: #7dffb9; background: #06100c; border: 2px solid #2e4f40; border-radius: 12px; font: 900 1.65rem/1 ui-monospace, monospace; text-align: center; }
.control-group { margin: 14px 0; }
.control-group label { color: #d9e7f8; }
input[type="range"] { padding: 0; accent-color: var(--yellow); }
.target-note { padding: 10px 12px; color: #263300; background: var(--yellow); border-radius: 11px; font-size: .8rem; font-weight: 900; }

.ledger { width: 100%; border-collapse: collapse; font-size: .82rem; }
.ledger th, .ledger td { padding: 10px 7px; border-bottom: 1px solid var(--line); text-align: left; }
.ledger th:last-child, .ledger td:last-child { text-align: right; }
.statement-line { display: flex; justify-content: space-between; gap: 20px; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.statement-line.total { margin-top: 6px; border-top: 2px solid var(--ink); border-bottom: 0; font-size: 1.05rem; font-weight: 950; }

.bottom-nav { position: fixed; z-index: 30; right: 0; bottom: 0; left: 0; display: grid; grid-template-columns: repeat(5, 1fr); min-height: 74px; padding-bottom: env(safe-area-inset-bottom); background: rgba(255,255,255,.98); border-top: 1px solid var(--line); box-shadow: 0 -8px 25px rgba(7,20,38,.08); }
.nav-button { display: grid; place-items: center; align-content: center; gap: 2px; color: #5f6c7d; background: transparent; border: 0; font-size: .68rem; font-weight: 850; }
.nav-button span { font-size: 1.25rem; }
.nav-button.active { color: var(--blue); }

.drawer { position: fixed; z-index: 60; top: 0; right: 0; display: grid; align-content: start; gap: 12px; width: min(390px, 90vw); height: 100vh; padding: 24px; color: var(--ink); background: white; box-shadow: -20px 0 45px rgba(7,20,38,.2); }
.drawer-head, .modal-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.drawer h2 { margin: 0; }
.backdrop { position: fixed; z-index: 50; inset: 0; background: rgba(7,20,38,.58); }

.modal-layer { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 18px; background: rgba(7,20,38,.72); }
.modal-card { overflow: auto; width: min(680px, 100%); max-height: 88vh; padding: 24px; background: white; border-radius: 25px; box-shadow: 0 30px 90px rgba(0,0,0,.3); }
.modal-card h2 { margin: 8px 0 12px; font-size: 1.8rem; }
.modal-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.impact-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.impact { padding: 7px 10px; background: #eef2f7; border-radius: 9px; font-size: .78rem; font-weight: 900; }
.toast { position: fixed; z-index: 120; left: 50%; bottom: 92px; transform: translateX(-50%); padding: 11px 16px; color: white; background: #071426; border-radius: 999px; box-shadow: var(--shadow); font-size: .82rem; font-weight: 800; }

.empty-state { padding: 34px 20px; background: white; border: 1px dashed #9eabbc; border-radius: var(--radius); text-align: center; }
.empty-state .big { display: block; margin-bottom: 10px; font-size: 3rem; }
.alert { padding: 13px 15px; border-left: 5px solid var(--orange); background: #fff2e4; border-radius: 12px; line-height: 1.45; }
.mission-list { display: grid; gap: 9px; }
.mission { display: grid; grid-template-columns: 27px 1fr; align-items: start; gap: 8px; }
.mission-mark { display: grid; place-items: center; width: 25px; height: 25px; color: white; background: #aab4c2; border-radius: 50%; font-weight: 900; }
.mission.done .mission-mark { background: var(--green); }

@media (max-width: 820px) {
  .welcome { grid-template-columns: 1fr; }
  .welcome-art { min-height: 43vh; background: linear-gradient(0deg, #071426 0%, transparent 36%), url('/assets/tshirt-business-tycoon-concept.png') center 22%/cover no-repeat; }
  .welcome-panel { padding: 26px 20px 44px; }
  .welcome h1 { font-size: 3.1rem; }
  .hero-card { grid-template-columns: 1fr; }
  .hero-mark { display: none; }
  .grid.two, .grid.three { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  main { padding: 18px 12px 32px; }
  .stat-strip strong { font-size: .9rem; }
  .hero-copy { padding: 24px 20px; }
  .contract-facts { grid-template-columns: repeat(2, 1fr); }
  .press-display { grid-template-columns: 1fr; }
  .modal-card { padding: 19px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}

@media (prefers-contrast: more) {
  :root { --line: #667384; }
  .card { border-width: 2px; }
}
