/* IE 2026 visual kit ("Alien"): Syne headings, lime on deep green-black. Same tokens as the course decks. */
/* Local fonts (latin subset), no requests to third-party services. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/inter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/inter-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Syne"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/syne-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Syne"; font-style: normal; font-weight: 800; font-display: swap; src: url("fonts/syne-latin-800-normal.woff2") format("woff2"); }
:root {
  --bg: #0a110f; --card: #152025; --card-2: #1b2a2f; --line: #2a3a3f;
  --text: #f0f4f1; --body: #d7e5d8; --quiet: #9fb1a6;
  --accent: #a9f00f; --accent-2: #81b61c; --accent-ink: #0d1406; --err: #ff8a7a;
  --H: #a9f00f; --U: #5ee6c8; --P: #f5d547;
  --head: "Syne", system-ui, sans-serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; color: var(--body); font: 18px/1.55 var(--sans); }
body {
  background: var(--bg);
  background-image: radial-gradient(60rem 30rem at 85% -10%, rgba(169, 240, 15, .14), transparent 60%),
                    radial-gradient(40rem 24rem at -10% 110%, rgba(94, 230, 200, .08), transparent 60%);
  background-repeat: no-repeat;
}
.wrap { max-width: 680px; margin: 0 auto; padding: 20px 16px 48px; }
.wide { max-width: 1200px; }
.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.brand { font: 800 .95rem/1 var(--head); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.brand::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--accent); margin-right: 10px; vertical-align: 1px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 28px; box-shadow: 0 20px 60px rgba(0, 0, 0, .35); }
h1, h2, h3, .big { font-family: var(--head); color: var(--text); }
h1 { font-size: 2.5rem; font-weight: 800; line-height: 1.05; margin: 0 0 14px; letter-spacing: -.01em; }
h2 { font-size: 1.55rem; font-weight: 700; line-height: 1.25; margin: 6px 0 20px; }
h3 { margin: 0 0 8px; font-size: 1.1rem; font-weight: 700; }
.eyebrow { font: 700 .8rem/1 var(--head); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin: 0 0 12px; }
.lead { font-size: 1.15rem; color: var(--body); }
.small { color: var(--quiet); font-size: .92rem; }
/* intro: the three roles as cards */
.roles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 22px 0 26px; }
.role { background: var(--card-2); border: 1px solid var(--line); border-top: 4px solid var(--c); border-radius: 14px; padding: 14px; }
.role b { display: block; font-family: var(--head); color: var(--text); font-size: 1.02rem; }
.role span { color: var(--quiet); font-size: .85rem; }
.role[data-r=H] { --c: var(--H); } .role[data-r=U] { --c: var(--U); } .role[data-r=P] { --c: var(--P); }
.tag { display: inline-block; border: 1px solid currentColor; border-radius: 999px; padding: 3px 12px; font: 600 .85rem/1.3 var(--sans); vertical-align: middle; }
button { font: inherit; cursor: pointer; }
.primary { background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 14px; padding: 14px 26px; font: 800 1.05rem/1 var(--head); letter-spacing: .02em; transition: transform .15s, box-shadow .15s; }
.primary:hover, .primary:focus-visible { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(169, 240, 15, .3); outline: none; }
.link { background: none; border: 0; color: var(--quiet); text-decoration: underline; padding: 10px 0; }
/* question options with A/B/C chips */
.options { display: grid; gap: 12px; counter-reset: opt; }
.option { counter-increment: opt; display: flex; gap: 14px; align-items: center; min-height: 64px; text-align: left; background: var(--card-2); color: var(--text); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; transition: border-color .15s, transform .15s, background .15s; }
.option::before { content: counter(opt, upper-alpha); flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); font: 800 .95rem/1 var(--head); color: var(--accent); }
.option:hover, .option:focus-visible { border-color: var(--accent); transform: translateX(4px); outline: none; }
.option.picked { border-color: var(--accent); background: rgba(169, 240, 15, .12); }
.option.picked::before { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.nav { display: flex; justify-content: space-between; align-items: center; margin-top: 22px; gap: 12px; }
.progress { height: 8px; background: var(--line); border-radius: 8px; overflow: hidden; margin-bottom: 14px; }
.progress div { height: 100%; background: linear-gradient(90deg, var(--accent-2), var(--accent)); transition: width .3s; }
label { display: block; margin: 14px 0; font-size: .95rem; color: var(--text); }
input:not([type=radio]):not([type=checkbox]) { display: block; width: 100%; margin-top: 6px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font: inherit; }
input:not([type=radio]):not([type=checkbox]):focus { border-color: var(--accent); outline: none; }
input[type=radio] { accent-color: var(--accent); }
fieldset { border: 0; padding: 0; margin: 14px 0; }
legend { font-size: .95rem; margin-bottom: 6px; color: var(--text); }
.pill { display: inline-flex; gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; margin: 4px 6px 4px 0; }
.pill:has(input:checked) { border-color: var(--accent); background: rgba(169, 240, 15, .1); }
.error { color: var(--err); }
.tip { background: var(--card-2); border-left: 4px solid var(--accent); border-radius: 0 12px 12px 0; padding: 12px 16px; margin: 20px 0; }
.mini { background: var(--bg); border: 1px dashed var(--line); border-radius: 12px; padding: 12px 16px; font-size: .95rem; }
/* "none fits" answer and multi-pick */
.none { display: block; width: 100%; min-height: 56px; margin-top: 12px; background: transparent; color: var(--quiet); border: 1px dashed var(--line); border-radius: 14px; padding: 12px 18px; text-align: left; }
.none:hover, .none:focus-visible { border-color: var(--quiet); color: var(--text); outline: none; }
.none.picked { border-style: solid; border-color: var(--quiet); color: var(--text); }
.primary[disabled] { opacity: .4; cursor: not-allowed; transform: none; box-shadow: none; }
/* result */
.result h1 { font-size: clamp(1.9rem, 9vw, 3rem); overflow-wrap: break-word; color: var(--rc, var(--accent)); }
.result[data-r=H] { --rc: var(--H); } .result[data-r=U] { --rc: var(--U); } .result[data-r=P] { --rc: var(--P); }
.result .tag { color: var(--rc, var(--accent)); }
.result .plus { color: var(--text); font-size: .6em; white-space: nowrap; }
.mixbox { background: var(--card-2); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin: 16px 0; }
.mixbox .bar { grid-template-columns: 96px 1fr 48px; }
.lens { display: inline-block; background: rgba(169, 240, 15, .08); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
#confetti { position: fixed; inset: 0; pointer-events: none; }
/* board */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.bar { display: grid; grid-template-columns: 110px 1fr 36px; gap: 10px; align-items: center; margin: 10px 0; }
.bar .track { height: 20px; background: var(--line); border-radius: 10px; overflow: hidden; }
.bar .fill { height: 100%; background: linear-gradient(90deg, var(--accent-2), var(--accent)); }
.bar .k-U { background: var(--U); } .bar .k-P { background: var(--P); } .bar .k-K { background: var(--U); } .bar .k-B { background: var(--P); }
.bar b { color: var(--text); font-family: var(--head); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); background: var(--card-2); border-radius: 999px; padding: 4px 12px; font-size: .9rem; color: var(--text); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
td b { color: var(--text); }
th { color: var(--quiet); font-weight: 600; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tabs button { background: transparent; color: var(--text); border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; }
.tabs button.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 700; }
.big { font-size: 3.2rem; font-weight: 800; color: var(--accent); line-height: 1; }
.table-wrap { overflow-x: auto; }
@media (max-width: 520px) {
  h1 { font-size: 1.9rem; } h2 { font-size: 1.3rem; }
  .card { padding: 20px; } .roles { grid-template-columns: 1fr; } .bar { grid-template-columns: 90px 1fr 30px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
/* admin panel */
.admin .top { position: sticky; top: 0; z-index: 5; background: rgba(10, 17, 15, .92); backdrop-filter: blur(8px); padding: 12px 0; margin-bottom: 16px; }
.admin .actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.admin .actions .small { max-width: 320px; }
.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); border-radius: 12px; padding: 9px 14px; font-weight: 600; }
.ghost:hover, .ghost:focus-visible { border-color: var(--accent); outline: none; }
.ghost[disabled] { opacity: .45; cursor: not-allowed; }
.primary.sm { padding: 10px 16px; font-size: .95rem; }
.sq { width: 38px; height: 38px; padding: 0; font-size: 1.2rem; line-height: 1; }
.login { max-width: 520px; margin: 40px auto; }
.block { margin-top: 16px; }
.bar-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.bar-head h2 { margin-bottom: 4px; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.stepper { display: inline-flex; align-items: center; gap: 8px; margin-right: 6px; }
.stepper b { font-family: var(--head); color: var(--text); font-size: 1.2rem; min-width: 1.5em; text-align: center; }
.hint { margin: 12px 0 16px; }
label.inline { display: inline-flex; gap: 8px; align-items: center; margin: 0; color: var(--quiet); white-space: nowrap; }
label.inline input { accent-color: var(--accent); width: 18px; height: 18px; margin: 0; }
.teams { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.team, .unplaced { background: var(--card-2); border: 2px solid var(--line); border-radius: 16px; padding: 14px; transition: border-color .15s, background .15s; }
.unplaced { border-style: dashed; margin-bottom: 14px; }
.unplaced .members { display: flex; flex-wrap: wrap; gap: 8px; }
.unplaced .person { width: auto; min-width: 200px; }
.team.has-rule { border-color: rgba(255, 138, 122, .55); }
.team.pinned { border-color: var(--accent-2); }
.team.over, .unplaced.over { border-color: var(--accent); background: rgba(169, 240, 15, .08); }
.team-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.team-head h3 { margin: 0; margin-right: auto; }
.badge { font-size: .78rem; font-weight: 700; border-radius: 999px; padding: 3px 10px; border: 1px solid var(--line); color: var(--quiet); }
.badge.good { color: var(--accent); border-color: var(--accent-2); }
.badge.warn { color: var(--P); border-color: var(--P); }
.badge.bad { color: var(--err); border-color: var(--err); }
.icon { background: none; border: 1px solid transparent; border-radius: 8px; padding: 2px 6px; color: var(--quiet); filter: grayscale(1); opacity: .6; }
.icon:hover, .icon:focus-visible { border-color: var(--line); opacity: 1; outline: none; }
.pin[aria-pressed=true] { filter: none; opacity: 1; border-color: var(--accent-2); }
.members { display: grid; gap: 8px; min-height: 52px; }
.person { display: block; width: 100%; text-align: left; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-left: 5px solid var(--c, var(--line)); border-radius: 12px; padding: 9px 12px; cursor: grab; touch-action: manipulation; }
.person[data-r=H] { --c: var(--H); } .person[data-r=U] { --c: var(--U); } .person[data-r=P] { --c: var(--P); }
.person b { display: block; font-size: .98rem; }
.person span { display: block; color: var(--quiet); font-size: .82rem; }
.person:hover, .person:focus-visible { border-color: var(--c); outline: none; }
.person.sel { background: rgba(169, 240, 15, .14); border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.person.dragging { opacity: .4; }
.drop-hint { margin: 10px 0; text-align: center; }
.notes { list-style: none; margin: 10px 0 0; padding: 0; font-size: .82rem; }
.notes li { padding: 2px 0 2px 18px; position: relative; color: var(--quiet); }
.notes li::before { position: absolute; left: 0; }
.notes li.rule { color: var(--err); } .notes li.rule::before { content: "✕"; }
.notes li.warn { color: var(--P); } .notes li.warn::before { content: "!"; font-weight: 800; left: 4px; }
.notes li.good::before { content: "✓"; color: var(--accent); }
.results td { font-size: .9rem; }
.results .num { white-space: nowrap; font-variant-numeric: tabular-nums; }
.results tr.excluded td { opacity: .45; }
.row-actions { white-space: nowrap; }
.row-actions .link { padding: 2px 6px 2px 0; font-size: .85rem; }
.role-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; background: var(--line); }
.role-dot[data-r=H] { background: var(--H); } .role-dot[data-r=U] { background: var(--U); } .role-dot[data-r=P] { background: var(--P); }
@media (max-width: 520px) {
  .admin .top { position: static; }
  .teams { grid-template-columns: 1fr; }
  .unplaced .person { min-width: 0; width: 100%; }
}
.publish[aria-pressed=true] { border-color: var(--accent); color: var(--accent); }
#pubNote { margin: 0 0 12px; }
/* board: final teams view */
.teamwall { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.teamwall .tw { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 20px; }
.teamwall h3 { font-size: 1.4rem; color: var(--accent); margin-bottom: 12px; }
.teamwall .m { display: block; padding: 6px 0 6px 12px; border-left: 5px solid var(--c, var(--line)); margin: 6px 0; }
.teamwall .m[data-r=H] { --c: var(--H); } .teamwall .m[data-r=U] { --c: var(--U); } .teamwall .m[data-r=P] { --c: var(--P); }
.teamwall .m b { display: block; color: var(--text); font-size: 1.2rem; }
.teamwall .m span { display: block; color: var(--quiet); font-size: .95rem; }

/* Password gate (gate.js) and new admin controls */
.gate { position: fixed; inset: 0; z-index: 50; overflow: auto; background: var(--bg); }
.gate .wrap { padding-top: 12vh; }
.gate form { display: grid; gap: 12px; margin-top: 12px; }
.ghost.danger { color: var(--err); border-color: var(--err); }
.status-line { margin-top: 12px; }
