/* Site Hub: soft lavender admin interface, white rounded cards, one purple accent. Light only on purpose. */
:root {
  color-scheme: light;
  --bg: #f4f3fb; --card: #ffffff; --line: #ecebf5; --line-2: #dcdaee; --text: #16143a; --muted: #6b6990;
  --accent: #7357e3; --accent-2: #5b3fd0; --accent-soft: #efebfd; --accent-ink: #ffffff;
  --ok: #11713a; --ok-bg: #e0f4e8; --warn: #8a5100; --warn-bg: #fff0d1; --bad: #b0241c; --bad-bg: #fde6e3; --mute-bg: #f1f0f9;
  --radius: 20px; --shadow: 0 1px 2px rgba(60, 40, 140, .04), 0 6px 20px rgba(60, 40, 140, .04);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", Consolas, Menlo, monospace;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--accent-2); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent); }
h1 { font-size: 1.6rem; margin: 0; line-height: 1.25; letter-spacing: -.015em; }
h2 { font-size: 1.05rem; margin: 0 0 .6rem; letter-spacing: -.005em; }
h3 { font-size: .95rem; margin: 1rem 0 .4rem; display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
p { margin: .5em 0; }
code { font-family: var(--mono); font-size: .86em; background: var(--mute-bg); padding: 1px 5px; border-radius: 6px; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 50%, white); outline-offset: 2px; border-radius: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: #fff; padding: 8px 12px; border-radius: 10px; z-index: 50; }
.skip:focus { left: 8px; }
.hint { color: var(--muted); font-size: .86rem; font-weight: 400; } .center { text-align: center; }
.warn-text { color: var(--warn); }

/* ---- left rail ---- */
body { display: grid; grid-template-columns: 232px minmax(0, 1fr); align-items: start; min-height: 100vh; }
body.anon { display: block; }
body.anon .top { position: static; width: auto; height: auto; border: 0; background: none; padding: 28px 0 0; }
body.anon .top .inner { justify-content: center; }
.shell { min-width: 0; }
.top { position: sticky; top: 0; height: 100vh; background: #fff; z-index: 20; display: flex; flex-direction: column; box-shadow: 1px 0 0 var(--line); }
.top .inner { display: flex; flex-direction: column; gap: 18px; height: 100%; padding: 24px 16px 18px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--text); text-decoration: none; font-size: 1.2rem; letter-spacing: -.02em; padding: 0 10px 6px; }
.brand:hover { color: var(--text); }
.logo { width: 32px; height: 32px; padding: 7px; border-radius: 50%; background: var(--accent); color: #fff; display: inline-block; flex: none; }
.top nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; scrollbar-width: none; }
.nav-label { margin: 14px 12px 6px; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; color: #a3a1bf; }
.top nav a, .nav-foot > a { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; padding: 10px 12px; border-radius: 12px; font-weight: 600; white-space: nowrap; transition: background .12s, color .12s; }
.top nav a .ico, .nav-foot > a .ico { flex: none; color: var(--muted); }
.top nav a:hover, .nav-foot > a:hover { background: var(--mute-bg); color: var(--text); }
.top a[aria-current] { background: var(--accent-soft); color: var(--accent-2); font-weight: 750; }
.top a[aria-current] .ico { color: var(--accent); }
.nav-foot { display: flex; flex-direction: column; gap: 2px; }
.top .signout { margin: 0; } .top .signout .btn { width: 100%; justify-content: flex-start; color: #f2672d; padding: 10px 12px; border-radius: 12px; font-weight: 650; }
.top .signout .btn:hover { background: #fff1ea; color: #d94f17; }
.progress { position: fixed; top: 0; left: 232px; right: 0; height: 3px; overflow: hidden; z-index: 40; }
.progress.on::before { content: ""; position: absolute; inset: 0; width: 40%; background: var(--accent); border-radius: 3px; animation: slide 1s ease-in-out infinite; }
body.anon .progress { left: 0; }
@keyframes slide { 0% { left: -40%; } 100% { left: 100%; } }

/* ---- top bar ---- */
.topbar { display: flex; align-items: center; gap: 12px; padding: 22px 32px 0; max-width: 1400px; margin: 0 auto; width: 100%; }
.tsearch { flex: 1; display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 18px; background: #fff; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-weight: 400; flex-direction: row; }
.tsearch:focus-within { border-color: var(--accent); outline: 3px solid color-mix(in srgb, var(--accent) 18%, white); }
.tsearch input { border: 0; padding: 0; background: transparent; outline: none; font-size: .95rem; height: 100%; }
.tsearch input:focus { outline: none; }
.round { width: 46px; height: 46px; border-radius: 50%; background: #fff; border: 1px solid var(--line); display: inline-grid; place-items: center; color: var(--text); text-decoration: none; flex: none; transition: border-color .12s, background .12s; }
.round:hover { border-color: var(--accent); color: var(--accent-2); background: #fbfaff; }
.round.sm { width: 32px; height: 32px; } .round.sm svg { width: 16px; height: 16px; }
.vsep { width: 1px; height: 36px; background: var(--line-2); margin: 0 4px; }
.me { display: flex; align-items: center; gap: 10px; font-weight: 700; white-space: nowrap; }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; background: linear-gradient(145deg, #f1ecff, #d8cdfa); color: var(--accent-2); font-weight: 800; flex: none; }

.wrap { width: 100%; max-width: 1400px; margin: 0 auto; padding: 24px 32px 80px; outline: none; }

/* ---- page header ---- */
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-sub { margin: 4px 0 0; color: var(--muted); }
.head-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.proj-title { display: flex; align-items: center; gap: 14px; }
.titlebar { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 14px; flex-wrap: wrap; }
.titlebar.tight { margin-bottom: 8px; align-items: center; }
.thumb { width: 46px; height: 46px; border-radius: 14px; object-fit: cover; background: var(--mute-bg); flex: none; }
.thumb.big { width: 60px; height: 60px; border-radius: 16px; }

/* ---- dashboard ---- */
.dash { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; align-items: start; }
.dash-main, .dash-side { min-width: 0; }
.dash-side .card { margin-bottom: 18px; }
.hero { position: relative; overflow: hidden; border-radius: 26px; padding: 32px 36px; margin-bottom: 18px; color: #fff; background: linear-gradient(120deg, #7b5ce8 0%, #6a4bdc 55%, #7a5ce6 100%); }
.hero h1 { font-size: 1.95rem; max-width: 560px; color: #fff; position: relative; letter-spacing: -.02em; }
.eyebrow { margin: 0 0 10px; font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .85); position: relative; }
.hero-sub { margin: 10px 0 22px; max-width: 520px; color: rgba(255, 255, 255, .92); position: relative; }
.hero-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; position: relative; }
.pill-dark { display: inline-flex; align-items: center; gap: 12px; background: #15131f; color: #fff; text-decoration: none; font-weight: 650; padding: 6px 6px 6px 22px; border-radius: 999px; transition: transform .12s, background .12s; }
.pill-dark:hover { background: #000; color: #fff; transform: translateY(-1px); }
.pill-dark .go { width: 34px; height: 34px; border-radius: 50%; background: #fff; color: #15131f; display: inline-grid; place-items: center; }
.pill-dark .go svg { width: 16px; height: 16px; }
.on-hero .btn { background: rgba(255, 255, 255, .18); color: #fff; border: 1px solid rgba(255, 255, 255, .3); padding: 10px 18px; }
.on-hero .btn:hover { background: rgba(255, 255, 255, .28); color: #fff; border-color: rgba(255, 255, 255, .5); }
.hero [class^="spark-"] { position: absolute; color: #fff; pointer-events: none; display: block; }
.spark-a { width: 150px; height: 150px; right: 70px; top: -14px; opacity: .2; }
.spark-b { width: 64px; height: 64px; right: 250px; bottom: 18px; opacity: .22; }
.spark-c { width: 34px; height: 34px; right: 28px; bottom: 34px; opacity: .3; }

.stat-card h2, .accounts-card h2 { font-size: 1.05rem; }
.ring { position: relative; width: 150px; height: 150px; margin: 4px auto 6px; }
.ring svg { display: block; }
.ring-bg { stroke: #ece8fb; } .ring-fg { stroke: var(--accent); transition: stroke-dasharray .4s ease; }
.ring-face { position: absolute; inset: 14px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(150deg, #f6f3ff, #e3dbfb); color: var(--accent-2); font-size: 2.8rem; font-weight: 800; }
.ring-pct { position: absolute; top: 4px; right: -4px; background: var(--accent); color: #fff; font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.greet { text-align: center; font-weight: 800; font-size: 1.12rem; margin: 6px 0 0; }
.minibars { margin-top: 16px; padding: 14px 12px 12px; background: var(--bg); border-radius: 18px; }
.minibars svg { width: 100%; height: auto; display: block; }
.bar-a { fill: var(--accent); } .bar-b { fill: #c6b9f4; } .bar-c { fill: #e2dcf8; }
i.bar-a { background: var(--accent); } i.bar-b { background: #c6b9f4; } i.bar-c { background: #e2dcf8; }
.minibars-key { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .8rem; color: var(--muted); }
.minibars-key i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }
.minibars-key b { color: var(--text); }
.card-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; } .card-title h2 { margin: 0; }
.people { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 14px; }
.person { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.person .avatar { width: 44px; height: 44px; }
.person-main { display: flex; flex-direction: column; min-width: 0; } .person-main strong { font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-main small { color: var(--muted); font-size: .76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- cards ---- */
.card { background: var(--card); border: 1px solid #f0eff8; border-radius: var(--radius); padding: 20px 22px; margin: 0 0 18px; box-shadow: var(--shadow); }
.card.flush { padding: 0; overflow-x: auto; }
.card .pad { padding: 18px 22px 0; }
.card.narrow { max-width: 440px; margin: 56px auto; }
.danger-zone { border-color: #f0b8b3; }
.empty { text-align: center; padding: 44px 22px; }
.how { text-align: left; max-width: 460px; margin: 14px auto 20px; padding-left: 20px; display: grid; gap: 6px; }

/* ---- buttons, badges, flashes ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 650; padding: 9px 18px; border-radius: 999px; border: 1px solid var(--line-2); background: #fff; color: var(--text); cursor: pointer; text-decoration: none; line-height: 1.2; transition: background .12s, border-color .12s, box-shadow .12s, transform .12s; }
.btn:hover { border-color: var(--accent); color: var(--accent-2); background: #fbfaff; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-sm { padding: 6px 14px; font-size: .84rem; }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); box-shadow: 0 4px 12px rgba(115, 87, 227, .28); }
.btn-primary:hover { background: var(--accent-2); border-color: var(--accent-2); color: #fff; }
.btn-soft { background: var(--accent-soft); color: var(--accent-2); border-color: transparent; }
.btn-soft:hover { background: #e4ddfc; color: var(--accent-2); border-color: transparent; }
.btn-block { display: flex; width: 100%; padding: 12px 18px; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--mute-bg); border-color: transparent; color: var(--text); }
.btn-danger { background: var(--bad); color: #fff; border-color: var(--bad); }
.btn-danger:hover { background: #8f1c15; color: #fff; }
form.is-busy .btn { opacity: .6; cursor: progress; }
.badge { display: inline-block; font-size: .74rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; letter-spacing: .01em; }
.b-ok { background: var(--ok-bg); color: var(--ok); } .b-warn { background: var(--warn-bg); color: var(--warn); }
.b-bad { background: var(--bad-bg); color: var(--bad); } .b-mute { background: var(--mute-bg); color: var(--muted); }
.flash { padding: 12px 18px; border-radius: 14px; margin-bottom: 16px; font-weight: 600; border: 1px solid transparent; transition: opacity .35s; }
.flash-ok { background: var(--ok-bg); color: var(--ok); border-color: #bfe5cd; } .flash-err { background: var(--bad-bg); color: var(--bad); border-color: #f4c3be; }
.flash-info { background: var(--accent-soft); color: var(--accent-2); border-color: #d9d0fb; } .flash-fade { opacity: 0; }

/* ---- forms ---- */
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack.wide { max-width: 860px; }
label { display: flex; flex-direction: column; gap: 4px; font-weight: 650; }
label .hint { font-weight: 400; }
input, select, textarea { font: inherit; color: var(--text); background: #fff; border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 13px; width: 100%; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: 3px solid color-mix(in srgb, var(--accent) 20%, white); outline-offset: 0; }
input[type=radio], input[type=checkbox] { width: auto; accent-color: var(--accent); }
textarea { resize: vertical; }
.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 600; } .check.small { font-weight: 500; font-size: .86rem; }
.addr { display: flex; align-items: center; gap: 6px; font-weight: 400; } .addr input { max-width: 260px; }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 18px; align-items: start; } .grid2 .card { margin: 0; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 12px; } .actions.tight { margin: 0; }
form.inline { display: inline; }
.counter { font-size: .8rem; color: var(--muted); font-weight: 400; } .counter.over { color: var(--warn); }
.accent { margin: 14px 0 4px; } .hue { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-weight: 400; }
.hue input[type=range] { width: 220px; padding: 0; } .hue input[name=accent] { width: 72px; }
.hue-preview { --h: 160; width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: hsl(var(--h) 80% 55%); display: inline-block; }
details { margin-top: 12px; } summary { cursor: pointer; font-weight: 650; }

/* ---- KPI tiles ---- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { display: flex; flex-direction: column; gap: 2px; background: var(--card); border: 1px solid #f0eff8; border-radius: 22px; padding: 16px 18px 12px; box-shadow: var(--shadow); color: var(--text); text-decoration: none; min-width: 0; }
a.kpi:hover { border-color: #cfc4f6; color: var(--text); }
.kpi.pill { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 14px; align-items: center; padding: 16px 18px; }
.kpi.pill .spark { grid-column: 1 / -1; margin-top: 8px; }
.kpi-body { display: flex; flex-direction: column; min-width: 0; }
.bubble { width: 48px; height: 48px; border-radius: 16px; display: inline-grid; place-items: center; }
.bubble svg { width: 22px; height: 22px; }
.tone-purple { background: #efebfd; color: #6a4bdc; } .tone-pink { background: #fcebf7; color: #c93aa6; }
.tone-blue { background: #e5f1fd; color: #2778cc; } .tone-green { background: #e3f6ec; color: #1b8f60; }
.kpi-label { color: var(--muted); font-size: .8rem; font-weight: 500; }
.kpi-value { font-size: 1.6rem; font-weight: 800; line-height: 1.15; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.kpi-foot { display: flex; gap: 8px; align-items: baseline; min-height: 18px; }
.kpi .spark { width: 100%; height: 34px; margin-top: 4px; }
.kpi-note { margin: -4px 0 14px; }
.delta { font-size: .78rem; font-weight: 700; } .delta.up { color: var(--ok); } .delta.down { color: var(--bad); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--card); border: 1px solid #f0eff8; border-radius: 18px; padding: 14px 18px; } .stat .n { font-size: 1.8rem; font-weight: 800; } .stat .l { color: var(--muted); font-size: .85rem; }

/* ---- setup card, alerts, running strip ---- */
.setup-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.bar { height: 8px; background: var(--mute-bg); border-radius: 99px; overflow: hidden; margin: 6px 0 12px; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; width: 0; }
.bar-1 { width: 33%; } .bar-2 { width: 67%; } .bar-3 { width: 100%; }
.card-summary { cursor: pointer; padding: 2px 0; } details[open] > .card-summary { margin-bottom: 10px; }
.setup-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.setup-list li { display: flex; align-items: center; gap: 8px; }
.tick-box { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-2); display: inline-block; }
.setup-list .done .tick-box { background: var(--ok); border-color: var(--ok); } .setup-list .done { color: var(--muted); }
.alerts { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; }
.alerts li { position: relative; padding: 10px 12px 10px 32px; border-radius: 12px; background: var(--mute-bg); font-size: .9rem; }
.alerts li::before { content: ""; position: absolute; left: 13px; top: 16px; width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.alerts .al-warn { background: var(--warn-bg); } .alerts .al-warn::before { background: #e0a100; }
.alerts .al-bad { background: var(--bad-bg); } .alerts .al-bad::before { background: var(--bad); }
.alerts .al-info { background: var(--accent-soft); } .alerts .al-info::before { background: var(--accent); }
.running { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 18px; background: var(--accent-soft); border-color: #d9d0fb; border-radius: 18px; }
.chip-link { background: #fff; border: 1px solid #d9d0fb; padding: 2px 10px; border-radius: 99px; text-decoration: none; font-size: .86rem; font-weight: 600; }
.pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }

/* ---- project list ---- */
.toolbar { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 18px 22px; flex-wrap: wrap; }
.toolbar h2 { margin: 0; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font: inherit; font-weight: 650; font-size: .84rem; padding: 6px 14px; border-radius: 99px; border: 1px solid var(--line-2); background: #fff; color: var(--muted); cursor: pointer; }
.chip:hover { border-color: var(--accent); color: var(--accent-2); }
.chip[aria-pressed=true] { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip .count { opacity: .75; font-variant-numeric: tabular-nums; margin-left: 2px; }
.card.projects-card { overflow: visible; }
.list-head, .proj { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) 70px 70px minmax(0, .7fr) 164px; gap: 12px; align-items: center; padding: 12px 22px; }
.list-head { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: #a3a1bf; font-weight: 700; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fcfbff; padding-top: 10px; padding-bottom: 10px; }
.projects { list-style: none; margin: 0; padding: 0; }
.proj { border-bottom: 1px solid var(--line); transition: background .12s; } .proj:last-child { border-bottom: 0; border-radius: 0 0 var(--radius) var(--radius); } .proj:hover { background: #fbfaff; } .proj[hidden] { display: none; }
.proj.broken { display: block; }
.proj-main { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); min-width: 0; }
.proj-name { display: flex; flex-direction: column; min-width: 0; } .proj-name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proj small, .proj-game small { color: var(--muted); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proj-game { display: flex; flex-direction: column; min-width: 0; } .proj-game span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proj-state { display: flex; gap: 6px; flex-wrap: wrap; }
.proj-metric { display: grid; grid-template-columns: auto 1fr; gap: 0 8px; align-items: baseline; } .proj-metric .spark { grid-column: 1 / -1; width: 100%; height: 22px; }
.metric-num { font-weight: 750; font-variant-numeric: tabular-nums; }
.proj-next { text-align: right; }
.empty-filter { padding: 16px; text-align: center; }
.stepper { display: flex; list-style: none; padding: 0; margin: 0; align-items: center; }
.st { position: relative; width: 22px; height: 22px; display: grid; place-items: center; }
.st::before { content: ""; width: 11px; height: 11px; border-radius: 50%; background: #fff; border: 2px solid var(--line-2); position: relative; z-index: 1; }
.st + .st::after { content: ""; position: absolute; left: -11px; right: 11px; top: 50%; height: 2px; background: var(--line-2); transform: translateY(-50%); }
.st-done::before { background: var(--ok); border-color: var(--ok); } .st-done + .st::after { background: var(--ok); }
.st-warn::before { background: #e0a100; border-color: #e0a100; } .st-warn + .st::after { background: #e0a100; }
.st-now::before { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.page-head .stepper { margin-right: 6px; }

/* ---- project page ---- */
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 20px; align-items: start; }
.side { position: sticky; top: 20px; }
.step { scroll-margin-top: 20px; }
.step-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; } .step-head h2 { margin: 0; flex: 1; }
.num { width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-2); display: grid; place-items: center; font-weight: 800; font-size: .85rem; flex: none; }
.joblist { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.problems { margin: 10px 0; padding-left: 18px; color: var(--bad); } .problems .okline { color: var(--ok); } .okline { color: var(--ok); }
.plain { list-style: none; padding: 0; margin: 6px 0; display: grid; gap: 4px; }
.theme-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 10px 0; }
.theme { border: 2px solid var(--line); border-radius: 18px; padding: 12px; gap: 6px; cursor: pointer; background: #fff; }
.theme:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); } .theme input { position: absolute; opacity: 0; }
.sw { display: flex; height: 26px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); } .sw i { flex: 1; }
.sw-0f1115 { background: #0f1115; } .sw-181b22 { background: #181b22; } .sw-4be07a { background: #4be07a; }
.sw-f6f7fb { background: #f6f7fb; } .sw-ffffff { background: #ffffff; } .sw-1f9d55 { background: #1f9d55; }
.sw-14102b { background: #14102b; } .sw-1d1741 { background: #1d1741; } .sw-ff5cc8 { background: #ff5cc8; }
.game-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 10px; }
.game-pick { display: flex; flex-direction: column; text-align: left; gap: 4px; padding: 8px; border-radius: 16px; border: 2px solid var(--line); background: #fff; cursor: pointer; font: inherit; color: var(--text); }
.game-pick:hover { border-color: var(--accent); } .game-pick[aria-pressed=true] { border-color: var(--accent); background: var(--accent-soft); }
.game-pick img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; background: var(--mute-bg); }
.chosen { font-weight: 700; }
.rule { border-top: 1px solid var(--line); padding: 12px 0; } .rule textarea { font-family: var(--mono); font-size: .8rem; }

/* ---- tables and charts ---- */
table.list { width: 100%; border-collapse: collapse; }
table.list th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: #a3a1bf; padding: 12px 18px; border-bottom: 1px solid var(--line); background: #fcfbff; }
table.list td { padding: 12px 18px; border-bottom: 1px solid var(--line); vertical-align: top; } table.list tr:last-child td { border-bottom: 0; }
table.list.small th, table.list.small td { padding: 6px 10px; font-size: .88rem; }
table.list tfoot td { border-top: 2px solid var(--line); background: #fcfbff; }
.num-cell { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; } .wrap-cell { word-break: break-word; max-width: 320px; }
.chart { margin: 8px 0 16px; } .chart svg { width: 100%; height: auto; display: block; }
.chart figcaption { display: flex; gap: 16px; flex-wrap: wrap; font-size: .85rem; color: var(--muted); }
.lg { display: inline-flex; align-items: center; gap: 6px; } .dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.ln { stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.ln-google { stroke: #7357e3; } .ln-bing { stroke: #0f9a73; } .ln-site { stroke: #d9820f; }
.dot.ln-google { background: #7357e3; } .dot.ln-bing { background: #0f9a73; } .dot.ln-site { background: #d9820f; }
.axis { stroke: var(--line); stroke-width: 1; } .tick { fill: var(--muted); font-size: 10px; }
.spark { width: 90px; height: 24px; } .top-tables { margin-top: 8px; align-items: start; }

/* ---- logs: light, coloured per line ---- */
.log-card { overflow: hidden; }
.log-bar { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); background: #fcfbff; flex-wrap: wrap; } .spacer { flex: 1; }
pre.log { margin: 0; padding: 12px 0; background: #fbfaff; color: #1b1a3a; max-height: 62vh; overflow: auto; font: 13px/1.6 var(--mono); white-space: normal; }
.lr { display: flex; gap: 12px; padding: 0 18px; } .lr:hover { background: #f3f1fc; }
.ts { color: #9795b6; flex: none; user-select: none; } .msg { white-space: pre-wrap; word-break: break-word; min-width: 0; }
.l-err { color: var(--bad); font-weight: 600; } .l-warn { color: var(--warn); } .l-ok { color: var(--ok); }
.result { margin-top: 14px; }

/* ---- toasts and job drawer ---- */
.toasts { position: fixed; right: 16px; top: 16px; display: grid; gap: 8px; z-index: 60; width: min(380px, calc(100vw - 32px)); }
.toast { display: grid; grid-template-columns: auto 1fr auto; align-items: start; gap: 10px; background: #fff; border: 1px solid #bfe5cd; border-radius: 16px; padding: 12px 14px; box-shadow: 0 10px 28px rgba(60, 40, 140, .16); font-weight: 600; animation: pop .18s ease-out; }
.toast::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--ok); margin-top: 6px; }
.toast-err { border-color: #f4c3be; } .toast-err::before { background: var(--bad); }
.toast-x { border: 0; background: none; font-size: 1.2rem; line-height: 1; color: var(--muted); cursor: pointer; }
@keyframes pop { from { transform: translateY(-6px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer { position: fixed; right: 16px; bottom: 16px; width: min(400px, calc(100vw - 32px)); display: grid; gap: 10px; z-index: 55; } .drawer[hidden] { display: none; }
.dj { background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 12px 30px rgba(60, 40, 140, .18); padding: 12px 14px; }
.dj-fail { border-color: #f0b8b3; }
.dj-head { display: flex; align-items: center; gap: 8px; } .dj-title { font-weight: 700; flex: 1; text-decoration: none; color: var(--text); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dj-status { font-size: .74rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--mute-bg); color: var(--muted); }
.dj-status.s-running { background: var(--warn-bg); color: var(--warn); } .dj-status.s-done { background: var(--ok-bg); color: var(--ok); } .dj-status.s-failed { background: var(--bad-bg); color: var(--bad); }
.dj-x { border: 0; background: none; font-size: 1.2rem; line-height: 1; color: var(--muted); cursor: pointer; }
.dj-tail { margin-top: 6px; font: 12px/1.5 var(--mono); max-height: 96px; overflow: hidden; } .dj-tail .lr { padding: 0; gap: 8px; }

.inline-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin: 12px 0; }
.inline-form .grow { flex: 1 1 260px; margin: 0; }

/* ---- responsive ---- */
@media (max-width: 1240px) { .dash { grid-template-columns: 1fr; } .dash-side { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; } .dash-side .card { margin: 0; } }
@media (max-width: 1100px) { .list-head { display: none; } .proj { grid-template-columns: minmax(0, 1fr) auto; row-gap: 8px; } .proj-game, .proj-metric { display: none; } .proj-state { grid-column: 1; } .proj-next { grid-column: 2; grid-row: 1 / span 2; align-self: center; } .stepper { grid-column: 1; } }
@media (max-width: 900px) {
  .cols { grid-template-columns: 1fr; } .side { position: static; }
  .wrap { padding: 18px 14px 80px; } .topbar { padding: 14px 14px 0; } .hero { padding: 24px 22px; } .hero h1 { font-size: 1.5rem; }
  .me { display: none; } .vsep { display: none; }
  body { display: block; }
  .top { position: sticky; height: auto; width: auto; box-shadow: 0 1px 0 var(--line); }
  .top .inner { flex-direction: row; align-items: center; gap: 10px; padding: 8px 12px; height: auto; }
  .brand { padding: 0; } .brand { font-size: 1rem; }
  .top nav { flex-direction: row; overflow-x: auto; align-items: center; } .nav-label, .nav-foot .nav-label { display: none; }
  .top nav a, .nav-foot > a { padding: 8px 10px; } .top nav a span, .nav-foot > a span { display: none; } .top a[aria-current] span { display: inline; }
  .nav-foot { flex-direction: row; } .top .signout .btn { width: auto; }
  .progress { left: 0; } .toasts { top: 64px; } }
.engine h2 { display: flex; align-items: center; gap: 8px; } .engine .stats { margin: 10px 0; }
.engine-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; } .engine-rows li { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; }
.conn-cell { max-width: 260px; } .conn-cell .hint { margin-top: 4px; font-size: .78rem; line-height: 1.35; }
.review-item .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.review-meta { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 6px 16px; margin: 0 0 14px; padding: 14px 16px; background: var(--accent-soft); border-radius: 14px; }
.review-meta dt { color: var(--muted); font-size: .86rem; } .review-meta dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.review-body { max-width: 72ch; } .review-body h4 { margin: 18px 0 6px; } .review-body p, .review-body li { line-height: 1.55; }
@media (max-width: 700px) { .review-meta { grid-template-columns: 1fr; } }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; } .pill-n { opacity: .7; font-weight: 500; margin-left: 4px; }
.stats-row { margin-top: 4px; } .kw-banner { background: var(--accent-soft); border-color: transparent; } .kw-banner h2 { margin: 0 0 4px; }
.kwtable { min-width: 820px; } .kwtable td.kw-cell { min-width: 230px; overflow-wrap: break-word; word-break: normal; } .kwtable td { vertical-align: top; } .kwtable td.parent-cell { min-width: 130px; color: var(--muted); }
.card.flush:has(.kwtable) { overflow-x: auto; } .kwtable .btn { white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
