:root{
  --bg:#0b0912; --surface:#16112a; --surface2:#1f1838; --line:#2e2550;
  --text:#f3efff; --muted:#a79dc9; --violet:#b14cff; --violet-dk:#6f21b8; --gold:#ffd23f; --mint:#3bf0b0;
  --s1:4px; --s2:8px; --s3:12px; --s4:16px; --s5:24px; --s6:32px; --s7:48px; --s8:64px;
  --r:14px; --maxw:1080px;
}
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  margin:0; background:var(--bg); color:var(--text);
  font-family:Inter,system-ui,-apple-system,"Segoe UI",sans-serif;
  font-size:17px; line-height:1.65;
  background-image:radial-gradient(900px 420px at 50% -160px,rgba(177,76,255,.28),transparent 70%);
  background-repeat:no-repeat;
}
h1,h2,h3,.brand__name,.btn{font-family:"Bricolage Grotesque",Inter,system-ui,sans-serif}
h1,h2,h3{line-height:1.15; letter-spacing:-.02em; margin:0 0 var(--s3)}
h1{font-size:clamp(30px,7vw,54px); font-weight:800}
h2{font-size:clamp(22px,3.6vw,30px); font-weight:700; margin-top:var(--s7)}
h3{font-size:19px; font-weight:700; margin-top:var(--s5)}
p{margin:0 0 var(--s4)}
a{color:var(--violet)}
a:hover{color:var(--gold)}
.wrap{width:100%; max-width:var(--maxw); margin:0 auto; padding:0 var(--s4)}
.skip{position:absolute; left:-999px; top:0; background:var(--gold); color:#160c26; padding:var(--s2) var(--s3); z-index:9}
.skip:focus{left:var(--s4); top:var(--s4)}

/* header */
.topbar{border-bottom:1px solid var(--line); background:rgba(11,9,18,.86); backdrop-filter:blur(8px); position:sticky; top:0; z-index:5}
.topbar__in{display:flex; align-items:center; justify-content:space-between; gap:var(--s4); min-height:60px}
.brand{display:flex; align-items:center; gap:var(--s2); text-decoration:none; color:var(--text)}
.brand__mark{display:grid; place-items:center; width:30px; height:30px; border-radius:8px; background:linear-gradient(160deg,var(--violet),var(--violet-dk)); font-family:"Bricolage Grotesque",sans-serif; font-weight:800; font-size:17px; color:#fff}
.brand__name{font-weight:800; font-size:18px; letter-spacing:-.02em}
.brand__name em{font-style:normal; color:var(--gold)}
.nav{display:flex; gap:var(--s4); font-size:15px; font-weight:500}
.nav a{color:var(--muted); text-decoration:none}
.nav a:hover{color:var(--text)}
@media (max-width:640px){ .nav{gap:var(--s3); font-size:13.5px} .nav a:nth-child(2){display:none} }

/* hero */
.hero{padding:var(--s6) 0 var(--s5)}
.eyebrow{margin:0 0 var(--s2); font-size:13px; letter-spacing:.14em; text-transform:uppercase; color:var(--mint); font-weight:600}
.dek{font-size:clamp(17px,2.4vw,20px); color:var(--muted); max-width:62ch}

/* play card */
.play{position:relative; margin:var(--s5) 0 var(--s4); border:1px solid var(--line); border-radius:var(--r); background:linear-gradient(180deg,var(--surface),#120e22); box-shadow:0 24px 60px -30px rgba(177,76,255,.55); overflow:hidden}
.btn{display:inline-flex; align-items:center; justify-content:center; gap:var(--s2); min-height:46px; padding:0 var(--s5); border-radius:999px; border:1px solid transparent; font-size:16px; font-weight:700; cursor:pointer; text-decoration:none; transition:transform .12s ease, background .12s ease}
.btn--primary{background:var(--violet); color:#fff; box-shadow:0 10px 26px -12px rgba(177,76,255,.9)}
.btn--primary:hover{transform:translateY(-1px); background:#c06bff}
.btn--ghost{background:transparent; border-color:var(--line); color:var(--text)}
.btn--ghost:hover{border-color:var(--violet)}


.play__board{padding:var(--s4)}
.board__head{display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:var(--s3); margin-bottom:var(--s4)}
.board__hint{margin:0; font-size:14px; color:var(--muted)}
.board__tools{display:flex; gap:var(--s2)}
.tierrow{display:grid; grid-template-columns:64px 1fr; gap:var(--s3); align-items:stretch; margin-bottom:var(--s2)}
.tierrow__label{display:grid; place-items:center; border-radius:10px; font-family:"Bricolage Grotesque",sans-serif; font-weight:800; font-size:22px; color:#160c26}
.tierrow[data-tier="S"] .tierrow__label{background:var(--gold)}
.tierrow[data-tier="A"] .tierrow__label{background:var(--mint)}
.tierrow[data-tier="B"] .tierrow__label{background:#8fa4ff}
.tierrow[data-tier="C"] .tierrow__label{background:#b58cff}
.tierrow[data-tier="D"] .tierrow__label{background:#6c6488; color:#f3efff}
.tierrow__slots{display:flex; flex-wrap:wrap; gap:var(--s2); min-height:56px; padding:var(--s2); border:1px dashed var(--line); border-radius:10px; background:rgba(31,24,56,.5); transition:border-color .12s, background .12s; cursor:pointer}
.tierrow__slots.is-target{border-color:var(--violet); background:rgba(177,76,255,.12)}
.pool{display:flex; flex-wrap:wrap; gap:var(--s2); margin-top:var(--s4); padding-top:var(--s4); border-top:1px solid var(--line)}
.chip{display:inline-flex; align-items:center; gap:6px; padding:9px 14px; border-radius:999px; border:1px solid var(--line); background:var(--surface2); color:var(--text); font-size:14.5px; font-weight:600; cursor:pointer; min-height:40px}
.chip:hover{border-color:var(--violet)}
.chip[aria-pressed="true"]{background:var(--violet); border-color:var(--violet); color:#fff}
.chip--placed{cursor:pointer}
.chip small{font-weight:400; color:var(--muted)}
.pool__empty{margin:0; font-size:14px; color:var(--muted)}

/* article */
article{max-width:74ch}
article h2{margin-top:var(--s7)}
article ul,article ol{padding-left:22px; margin:0 0 var(--s4); color:var(--text)}
article li{margin-bottom:var(--s2)}
.lede{font-size:19px; color:var(--text)}
.note{border-left:3px solid var(--gold); background:rgba(255,210,63,.07); padding:var(--s3) var(--s4); border-radius:0 10px 10px 0; color:var(--text); font-size:15.5px; margin:0 0 var(--s5)}

/* single static tier board */
.ladder{list-style:none; padding:0; margin:0 0 var(--s5)}
.ladder>li{display:grid; grid-template-columns:56px 1fr; gap:var(--s3); align-items:stretch; margin:0 0 var(--s2); padding:0; border:1px solid var(--line); border-radius:12px; overflow:hidden; background:var(--surface)}
.ladder__tag{display:grid; place-items:center; font-family:"Bricolage Grotesque",sans-serif; font-size:22px; font-weight:800; color:#160c26}
.ladder li[data-tier="S"] .ladder__tag{background:var(--gold)}
.ladder li[data-tier="A"] .ladder__tag{background:var(--mint)}
.ladder li[data-tier="B"] .ladder__tag{background:#8fa4ff}
.ladder li[data-tier="C"] .ladder__tag{background:#b58cff}
.ladder li[data-tier="D"] .ladder__tag{background:#6c6488; color:#f3efff}
.ladder__body{padding:var(--s3) var(--s4) var(--s3) 0}
.ladder__name{display:block; font-weight:700; font-size:17px}
.ladder__name span{font-weight:500; font-size:14px; color:var(--muted); margin-left:var(--s2)}
.ladder__line{display:block; font-size:14.5px; color:var(--muted); margin-top:2px}

/* table */
.table-wrap{overflow-x:auto; border:1px solid var(--line); border-radius:12px; margin:0 0 var(--s5)}
table{border-collapse:collapse; width:100%; font-size:15px; min-width:440px}
th,td{text-align:left; padding:12px 14px; border-bottom:1px solid var(--line)}
th{background:var(--surface2); font-family:"Bricolage Grotesque",sans-serif; font-weight:700; font-size:14px; letter-spacing:.02em}
tr:last-child td{border-bottom:0}
td strong{color:var(--text)}

/* faq */
details{border:1px solid var(--line); border-radius:12px; background:var(--surface); margin:0 0 var(--s2); padding:0 var(--s4)}
details summary{cursor:pointer; padding:var(--s3) 0; font-weight:600; font-size:16px}
details[open] summary{color:var(--gold)}
details p{font-size:15.5px; color:var(--muted); margin:0 0 var(--s3)}

/* footer */
.foot{margin-top:var(--s8); border-top:1px solid var(--line); background:#08060f; padding:var(--s6) 0 var(--s4)}
.foot__in{display:flex; flex-wrap:wrap; gap:var(--s5); justify-content:space-between}
.foot__brand{max-width:44ch}
.foot__brand p{font-size:13.5px; color:var(--muted); margin-top:var(--s2)}
.foot__nav{display:flex; flex-wrap:wrap; gap:var(--s4); font-size:14px}
.foot__nav a{color:var(--muted); text-decoration:none}
.foot__nav a:hover{color:var(--text)}
.foot__base{margin-top:var(--s5); padding-top:var(--s3); border-top:1px solid var(--line); font-size:13px; color:#6b6386}

/* legal / info pages */
.prose{max-width:72ch}
.prose h2{font-size:22px; margin-top:var(--s6)}
.prose ul{padding-left:22px}
.prose h1+p{color:var(--muted); font-size:15px}

@media (max-width:640px){
  body{font-size:16px}
  .tierrow{grid-template-columns:44px 1fr}
  .tierrow__label,.ladder__tag{font-size:17px}
  h2{margin-top:var(--s6)}
}

/* Named-Stand board: existing cabinet, with a visible pool and usable targets. */
.quick-reference{margin:10px 0 0;font-size:13px;line-height:1.5;color:var(--text)}
.quick-reference a{font-size:12px;color:var(--muted)}
.board__head{margin-bottom:8px;gap:8px}
.board__head h2{margin:0;font-size:24px}
.board__head .btn{min-height:44px;padding:0 16px;font-size:14px}
.board__hint{line-height:1.5}
.board__status{min-height:2.8em;margin:6px 0 10px;color:var(--gold);font-size:12px;line-height:1.4;overflow-wrap:anywhere}
.unranked{border:1px solid var(--line);border-radius:10px;background:rgba(31,24,56,.5);padding:8px 10px;margin-bottom:12px;min-width:0}
.pool__head{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:28px}
.pool__head h3{margin:0;font:600 13px Inter,system-ui,sans-serif;color:var(--muted)}
.board__return{min-height:44px;padding:6px 10px;border:1px solid var(--line);border-radius:8px;background:var(--surface2);color:var(--text);font:600 12px Inter,system-ui,sans-serif;cursor:pointer;flex-shrink:0}
.pool{max-height:136px;overflow-y:auto;overscroll-behavior-y:auto;margin:0;padding:4px 3px;border:0;gap:6px;touch-action:pan-y}
.pool:empty::after{content:"All Stands placed. Select one and use Return to Unranked to unrank it.";color:var(--muted);font-size:13px}
.chip{font-family:inherit;font-size:13px;line-height:1.35;min-height:44px;max-width:100%;padding:8px 12px;white-space:normal;overflow-wrap:anywhere;text-align:left;touch-action:pan-y;cursor:grab}
.chip.is-dragging{opacity:.5}
.tierrow{grid-template-columns:50px minmax(0,1fr);gap:8px}
.tierrow__label{border:0;min-height:44px;cursor:pointer}
.tierrow__slots{min-width:0;min-height:48px;padding:6px;gap:6px}
.tierrow__slots:empty::before{content:"Place a Stand";align-self:center;color:var(--muted);font-size:12px;pointer-events:none}
.unranked.is-target,.board__return.is-target,.tierrow__slots.is-target{border-color:var(--violet)}
.tierrow__label.is-target{outline:2px solid var(--violet);outline-offset:1px}
:where(a,button,summary):focus-visible{outline:3px solid var(--gold);outline-offset:3px}
.board__source{margin:12px 0 0;color:var(--muted);font-size:12px;line-height:1.5}
.board__source a{color:var(--text)}

/* Author reference lists, retaining the existing tier-row chrome. */
.source-list{padding:0}
.source-list>li{width:100%;grid-template-columns:56px minmax(0,1fr)}
.source-list>li>.ladder__tag{align-self:stretch}
.source-list>li[data-tier="Untested / TBD"] .ladder__tag{background:var(--surface2);color:var(--muted);font-size:11px;line-height:1.4;word-spacing:56px;padding:6px}
.source-list .ladder__body{padding:12px 12px 12px 0;min-width:0}
.source-stands{display:flex;flex-wrap:wrap;gap:6px 14px;margin:0;padding:0;list-style:none}
.source-list .source-stands{margin:0;padding:0}
.source-stands li{margin:0;font-size:14px;line-height:1.6;overflow-wrap:anywhere}
.source-stands li:not(:last-child)::after{content:";"}
.source-stands strong{font-weight:600}
.source-stands span{color:var(--muted);font-size:12px}
.source-meta{font-size:14px;margin-bottom:8px}
.source-method,.source-note{font-size:13px;line-height:1.65;color:var(--muted)}
.source-method{border-left:2px solid var(--violet);padding-left:12px;margin-bottom:18px}
@media (max-width:640px){
  .board__head h2{font-size:21px}
  .board__hint{font-size:12px}
  .pool{max-height:100px}
  .pool__head h3{font-size:12px}
  .tierrow{grid-template-columns:40px minmax(0,1fr)}
  .source-list>li{grid-template-columns:42px minmax(0,1fr);gap:10px}
  .source-stands li{font-size:13px}
  .source-stands span{font-size:11px}
  .content-grid .rail{order:0}
}
