:root {
  --ink: #10100f;
  --paper: #eeeae0;
  --paper-dark: #d9d4c8;
  --orange: #ef5a29;
  --lime: #d8ff3e;
  --muted: #716e65;
  --line: rgba(16,16,15,.18);
  --white: #faf8f2;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Segoe UI", Arial, sans-serif;
  min-height: 100vh;
}
button { font: inherit; }
button:focus-visible, input:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.noise {
  position: fixed; inset: 0; pointer-events: none; z-index: 20; opacity: .14;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.25'/%3E%3C/svg%3E");
}
.topbar {
  height: 72px; border-bottom: 1px solid var(--line); padding: 0 4vw;
  display: flex; align-items: center; justify-content: space-between;
}
.brand { color: inherit; text-decoration: none; display: flex; gap: 11px; align-items: center; font-weight: 800; letter-spacing: -.06em; }
.brand b { color: var(--orange); }
.brand-ball { width: 25px; height: 25px; border-radius: 50%; background: var(--orange); border: 2px solid var(--ink); position: relative; }
.brand-ball::before, .brand-ball::after { content: ""; position: absolute; background: var(--ink); }
.brand-ball::before { width: 2px; height: 100%; left: 10px; }
.brand-ball::after { height: 2px; width: 100%; top: 10px; }
.top-actions { display: flex; align-items: center; gap: 20px; }
.icon-button, .dialog-close {
  width: 36px; height: 36px; border: 1px solid var(--ink); background: transparent; border-radius: 50%; cursor: pointer; font-weight: 700;
}
.knowledge-toggle { display: flex; align-items: center; gap: 9px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; cursor: pointer; }
.knowledge-toggle input { position: absolute; opacity: 0; }
.toggle-track { width: 38px; height: 21px; background: var(--ink); border-radius: 20px; padding: 3px; display: block; }
.toggle-track span { display: block; width: 15px; height: 15px; border-radius: 50%; background: var(--paper); transition: .2s ease; }
.knowledge-toggle input:checked + .toggle-track { background: var(--orange); }
.knowledge-toggle input:checked + .toggle-track span { transform: translateX(17px); }
main { max-width: 1500px; margin: auto; padding: 0 4vw 70px; }
.hero { min-height: 285px; padding: 45px 0 36px; display: flex; align-items: end; justify-content: space-between; gap: 30px; }
.eyebrow { margin: 0 0 14px; font-size: 11px; font-weight: 800; letter-spacing: .18em; color: var(--orange); }
h1, h2, h3, p { margin-top: 0; }
h1 { font-family: "Barlow Condensed", sans-serif; font-size: clamp(64px, 8vw, 122px); line-height: .78; margin: 0; text-transform: uppercase; letter-spacing: -.045em; }
h1 em { color: var(--orange); font-weight: 800; }
.hero-copy { max-width: 365px; font-size: 14px; line-height: 1.7; color: var(--muted); margin: 0 0 3px; }
.score-strip { background: var(--ink); color: var(--white); min-height: 96px; display: grid; grid-template-columns: 150px 1fr 170px; align-items: center; padding: 20px 26px; gap: 28px; }
.score-block { display: flex; flex-direction: column; border-right: 1px solid rgba(255,255,255,.18); }
.score-block.right { border: 0; border-left: 1px solid rgba(255,255,255,.18); padding-left: 26px; }
.score-label, .progress-labels { font-size: 9px; letter-spacing: .16em; color: #aaa79f; font-weight: 700; }
.score-block strong { font-family: Impact, "Arial Narrow", sans-serif; font-size: 42px; line-height: 1; letter-spacing: -.04em; }
.score-block strong span { font-size: 15px; color: var(--orange); letter-spacing: 0; }
.progress-labels { display: flex; justify-content: space-between; margin-bottom: 11px; }
.progress-track, .fit-meter { height: 5px; background: rgba(255,255,255,.16); overflow: hidden; }
.progress-track span, .fit-meter i { display: block; height: 100%; width: 0; background: var(--lime); transition: width .45s ease; }
.game-grid { display: grid; grid-template-columns: minmax(360px, .9fr) minmax(500px, 1.45fr); border: 1px solid var(--line); border-top: 0; }
.roster-panel, .draft-panel { padding: 27px; min-width: 0; }
.roster-panel { border-right: 1px solid var(--line); }
.section-heading { display: flex; align-items: start; justify-content: space-between; margin-bottom: 22px; }
.section-heading div { display: flex; align-items: center; gap: 10px; }
.section-heading span { color: var(--orange); font-size: 10px; font-weight: 800; }
.section-heading h2 { font-family: Impact, "Arial Narrow", sans-serif; font-size: 28px; text-transform: uppercase; line-height: 1; margin: 0; }
.section-heading small { font-size: 8px; font-weight: 800; letter-spacing: .17em; color: var(--muted); }
.court {
  aspect-ratio: 4 / 5; max-height: 555px; background: #c96d40; border: 2px solid var(--ink); position: relative; overflow: hidden;
  background-image: repeating-linear-gradient(90deg, transparent 0, transparent 38px, rgba(30,17,8,.07) 39px, rgba(255,255,255,.04) 40px);
}
.court::after { content: ""; position: absolute; inset: 12px; border: 2px solid rgba(238,234,224,.75); pointer-events: none; }
.court-lines .half-circle { position: absolute; width: 36%; aspect-ratio: 1; border: 2px solid rgba(238,234,224,.75); border-radius: 50%; left: 32%; top: -18%; }
.court-lines .paint { position: absolute; width: 39%; height: 29%; border: 2px solid rgba(238,234,224,.75); left: 30.5%; top: 12px; }
.court-lines .rim { position: absolute; width: 18%; aspect-ratio: 1; border: 2px solid rgba(238,234,224,.75); border-radius: 50%; left: 41%; top: 17%; }
.position-slot { position: absolute; z-index: 2; width: 92px; transform: translate(-50%, -50%); }
.position-slot.pg { left: 50%; top: 77%; }
.position-slot.sg { left: 21%; top: 58%; }
.position-slot.sf { left: 79%; top: 58%; }
.position-slot.pf { left: 28%; top: 31%; }
.position-slot.c { left: 72%; top: 31%; }
.slot-empty, .slot-filled { text-align: center; }
.slot-circle { margin: auto; width: 44px; height: 44px; border: 1px dashed var(--white); border-radius: 50%; background: rgba(16,16,15,.15); display: grid; place-items: center; color: var(--white); font: 700 15px "Barlow Condensed"; }
.slot-name { margin-top: 6px; display: inline-block; max-width: 100%; background: var(--ink); color: var(--white); padding: 3px 6px; text-transform: uppercase; font: 700 11px "Barlow Condensed"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot-filled .slot-circle { background: var(--lime); color: var(--ink); border: 2px solid var(--ink); font-size: 13px; }
.fit-card { margin-top: 14px; border: 1px solid var(--line); background: var(--paper-dark); padding: 13px 15px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; }
.fit-card span, .fit-card strong { font-size: 9px; letter-spacing: .1em; font-weight: 800; }
.fit-card strong { letter-spacing: 0; text-align: right; }
.fit-meter { background: rgba(16,16,15,.16); }
.fit-meter i { background: var(--orange); }
.draw-stage { min-height: 215px; background: var(--paper-dark); border: 1px solid var(--line); padding: 16px; display: grid; grid-template-columns: 1fr 24px 1fr; align-items: stretch; gap: 8px; }
.draw-card { background: var(--white); border: 1px solid var(--ink); padding: 18px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; transition: transform .25s ease; }
.draw-card::after { content: ""; position: absolute; width: 100px; height: 100px; background: var(--orange); border-radius: 50%; opacity: .08; right: -35px; top: -35px; }
.draw-card h3 { font: 800 27px/1 "Barlow Condensed"; text-transform: uppercase; margin: 0 0 4px; }
.draw-card p { color: var(--muted); font-size: 10px; margin: 0; text-transform: uppercase; letter-spacing: .07em; }
.card-kicker { font-size: 8px; font-weight: 800; letter-spacing: .18em; color: var(--orange); }
.team-mark { width: 66px; height: 66px; background: var(--ink); color: var(--lime); display: grid; place-items: center; border-radius: 50%; font: 800 29px "Barlow Condensed"; transform: rotate(-7deg); }
.season-card strong { font: 800 clamp(38px, 5vw, 65px)/.8 "Barlow Condensed"; letter-spacing: -.07em; color: var(--orange); }
.plus { display: grid; place-items: center; font: 800 25px "Barlow Condensed"; }
.draw-button, .secondary-button {
  margin-top: 12px; border: 2px solid var(--ink); background: var(--lime); min-height: 54px; padding: 0 16px 0 19px;
  width: 100%; display: flex; align-items: center; justify-content: space-between; cursor: pointer; font-size: 11px; letter-spacing: .12em; font-weight: 800; transition: .2s ease;
}
.draw-button:hover { background: var(--orange); transform: translateY(-2px); }
.draw-button:disabled { opacity: .35; pointer-events: none; }
.draw-button i { font-style: normal; font-size: 22px; }
.player-section { margin-top: 28px; }
.player-section-title { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--ink); padding-bottom: 9px; }
.player-section-title p { margin: 0; font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.player-section-title p span { color: var(--orange); }
.player-section-title small { font-size: 9px; color: var(--muted); }
.player-list { display: grid; gap: 7px; padding-top: 8px; }
.player-row {
  min-height: 77px; background: rgba(255,255,255,.45); border: 1px solid var(--line); padding: 10px 13px;
  display: grid; grid-template-columns: 38px minmax(120px, 1.3fr) minmax(180px, 1fr) 34px; align-items: center; gap: 13px; cursor: pointer; transition: .18s ease;
}
.player-row:hover { border-color: var(--ink); background: var(--white); transform: translateX(3px); }
.player-number { width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: var(--white); display: grid; place-items: center; font: 800 15px "Barlow Condensed"; }
.player-info strong { display: block; font: 800 19px/1 "Barlow Condensed"; text-transform: uppercase; }
.player-info span { display: block; font-size: 9px; color: var(--muted); margin-top: 5px; font-weight: 600; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.stat { text-align: center; border-left: 1px solid var(--line); }
.stat strong { display: block; font: 700 17px "Barlow Condensed"; }
.stat span { font-size: 7px; letter-spacing: .12em; color: var(--muted); }
.knowledge-blur .stat strong { color: var(--muted); user-select: none; }
.select-arrow { font-size: 20px; color: var(--orange); }
.results { margin-top: 36px; background: var(--ink); color: var(--white); padding: clamp(25px, 5vw, 60px); }
.result-top { display: grid; grid-template-columns: 1fr 1fr; gap: 35px; align-items: end; }
.result-top h2 { font: 800 clamp(100px, 17vw, 230px)/.7 "Barlow Condensed"; color: var(--lime); letter-spacing: -.07em; margin: 20px 0 26px; }
.result-label { font-size: 9px; letter-spacing: .17em; color: #aaa79f; }
.outcome-card { border-top: 1px solid rgba(255,255,255,.3); padding-top: 18px; }
.outcome-card span { font-size: 9px; letter-spacing: .17em; color: var(--orange); font-weight: 800; }
.outcome-card strong { display: block; font: 800 clamp(38px, 6vw, 80px)/.92 "Barlow Condensed"; text-transform: uppercase; margin: 14px 0; }
.outcome-card p { font-size: 12px; color: #aaa79f; line-height: 1.6; max-width: 480px; }
.result-metrics { display: grid; grid-template-columns: repeat(6, 1fr); border: 1px solid rgba(255,255,255,.2); margin-top: 40px; }
.metric { padding: 18px 13px; border-right: 1px solid rgba(255,255,255,.2); }
.metric:last-child { border: 0; }
.metric span { display: block; font-size: 8px; color: #aaa79f; letter-spacing: .12em; }
.metric strong { font: 800 29px "Barlow Condensed"; color: var(--orange); }
.result-actions { display: flex; gap: 10px; justify-content: end; margin-top: 20px; }
.secondary-button { width: auto; background: transparent; color: var(--white); border-color: rgba(255,255,255,.4); margin: 12px 0 0; }
.draw-button.compact { width: 210px; margin-bottom: 0; }
dialog { width: min(530px, calc(100vw - 32px)); background: var(--paper); color: var(--ink); border: 2px solid var(--ink); padding: 34px; }
dialog::backdrop { background: rgba(16,16,15,.75); backdrop-filter: blur(3px); }
dialog h2, .position-card h2 { font: 800 46px/.95 "Barlow Condensed"; text-transform: uppercase; }
dialog li { padding: 8px 0; font-size: 13px; line-height: 1.5; }
dialog p:last-child { font-size: 12px; line-height: 1.6; margin-bottom: 0; }
.dialog-close { position: absolute; right: 13px; top: 13px; font-size: 20px; }
.position-modal { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 15px; }
.position-modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(16,16,15,.8); backdrop-filter: blur(4px); }
.position-card { position: relative; z-index: 1; background: var(--paper); border: 2px solid var(--ink); padding: 32px; width: min(560px, 100%); }
.position-card h2 { margin-bottom: 8px; }
.position-card > p:not(.eyebrow) { color: var(--muted); font-size: 12px; }
.position-options { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; margin-top: 25px; }
.position-choice { aspect-ratio: 1; border: 1px solid var(--ink); background: var(--white); cursor: pointer; font: 800 22px "Barlow Condensed"; transition: .15s ease; }
.position-choice:hover { background: var(--lime); transform: translateY(-3px); }
.position-choice.good-fit::after { content: "FIT"; display: block; color: var(--orange); font: 800 7px "DM Sans"; letter-spacing: .12em; }
.draw-stage.drawing .draw-card { animation: shuffle .35s ease 2; }
@keyframes shuffle { 50% { transform: translateY(-5px) rotate(1deg); filter: blur(2px); } }

@media (max-width: 980px) {
  .game-grid { grid-template-columns: 1fr; }
  .roster-panel { border-right: 0; border-bottom: 1px solid var(--line); }
  .court { max-width: 450px; margin: auto; }
  .result-metrics { grid-template-columns: repeat(3, 1fr); }
  .metric:nth-child(3) { border-right: 0; }
  .metric:nth-child(-n+3) { border-bottom: 1px solid rgba(255,255,255,.2); }
}
@media (max-width: 650px) {
  .topbar { padding: 0 18px; }
  .knowledge-toggle { font-size: 0; gap: 0; }
  main { padding: 0 12px 40px; }
  .hero { min-height: 230px; display: block; padding-top: 45px; }
  .hero-copy { margin-top: 25px; }
  .score-strip { grid-template-columns: 75px 1fr; padding: 16px; gap: 14px; }
  .score-block.right { display: none; }
  .score-block strong { font-size: 34px; }
  .roster-panel, .draft-panel { padding: 16px; }
  .draw-stage { min-height: 180px; padding: 8px; grid-template-columns: 1fr 12px 1fr; gap: 4px; }
  .draw-card { padding: 11px; }
  .draw-card h3 { font-size: 19px; }
  .team-mark { width: 48px; height: 48px; font-size: 22px; }
  .season-card strong { font-size: 34px; }
  .player-row { grid-template-columns: 34px 1fr 20px; gap: 9px; }
  .stats { grid-column: 1 / -1; order: 4; }
  .stat:first-child { border-left: 0; }
  .player-section-title small { display: none; }
  .result-top { grid-template-columns: 1fr; }
  .result-top h2 { font-size: 125px; }
  .result-metrics { grid-template-columns: repeat(2, 1fr); }
  .metric, .metric:nth-child(3) { border-right: 1px solid rgba(255,255,255,.2); border-bottom: 1px solid rgba(255,255,255,.2); }
  .metric:nth-child(even) { border-right: 0; }
  .metric:nth-child(n+5) { border-bottom: 0; }
  .result-actions { flex-direction: column; }
  .secondary-button, .draw-button.compact { width: 100%; }
  .position-options { grid-template-columns: repeat(5, 1fr); }
  .position-choice { font-size: 17px; }
}
