/* EsaSim dashboard styles. Colours, fonts and shadows come from assets/themes/<theme>.css. */
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 15px/1.5 var(--sans); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: 24px; font-weight: 650; }
h2 { font-size: 17px; font-weight: 650; }
h3 { font-size: 15px; font-weight: 650; }
p { margin: 0 0 1em; }
code, .mono { font-family: var(--mono); font-size: 13px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- app shell ---------- */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side { background: var(--side); color: var(--side-ink); display: flex; flex-direction: column; padding: 16px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; color: var(--on-accent); font-weight: 700; font-size: 17px; letter-spacing: .02em; }
.brand-mark { width: 26px; height: 26px; border-radius: 7px; background: var(--brand-grad); display: grid; place-items: center; color: var(--on-accent); font-size: 13px; font-weight: 800; }
.brand small { color: var(--side-ink-2); font-weight: 500; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.switcher { position: relative; margin: 0 0 16px; }
.switcher > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-radius: 8px; background: var(--side-active); color: var(--on-accent); }
.switcher > summary::-webkit-details-marker { display: none; }
.switcher .ws-name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.switcher .ws-kind { display: block; font-size: 11px; color: var(--side-ink-2); font-weight: 500; }
.switcher .chev { color: var(--side-ink-2); }
.switcher-menu { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 20; background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-lg); padding: 6px; }
.switcher-menu form { margin: 0; }
.switcher-menu button.ws-item { width: 100%; text-align: left; background: none; border: 0; padding: 8px 10px; border-radius: 6px; font: inherit; color: var(--ink); cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.switcher-menu button.ws-item:hover { background: var(--panel-2); }
.switcher-menu .ws-item.is-current { background: var(--accent-soft); }
.switcher-menu .ws-role { font-size: 12px; color: var(--ink-3); }
.switcher-menu a.ws-new { display: block; padding: 8px 10px; border-top: 1px solid var(--line); margin-top: 6px; font-size: 14px; }
.nav-group { margin-bottom: 18px; }
.nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--side-ink-2); padding: 0 10px 6px; }
.nav a { display: flex; align-items: center; justify-content: space-between; padding: 7px 10px; border-radius: 7px; color: var(--side-ink); font-size: 14px; }
.nav a:hover { background: var(--side-active); color: var(--on-accent); text-decoration: none; }
.nav a.active { background: var(--side-active); color: var(--on-accent); font-weight: 600; box-shadow: inset 2px 0 0 var(--night-accent); }
.nav .soon { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--side-ink-2); border: 1px solid var(--night-line-2); border-radius: 4px; padding: 0 4px; }
.side-foot { margin-top: auto; border-top: 1px solid var(--side-line); padding-top: 12px; }
.side-user { display: flex; align-items: center; gap: 10px; padding: 6px 8px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; }
.side-user .who { min-width: 0; }
.side-user .who b { display: block; color: var(--on-accent); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user .who span { display: block; color: var(--side-ink-2); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-foot form button { background: none; border: 0; color: var(--side-ink-2); font: inherit; font-size: 13px; padding: 6px 10px; cursor: pointer; }
.side-foot form button:hover { color: var(--on-accent); }

.main { min-width: 0; }
.topbar { padding: 10px 32px; border-bottom: 1px solid var(--line); background: var(--panel); }
.topbar.has-tabs { padding-bottom: 0; }
.topbar h1 { margin: 0; font-size: 18px; }
.crumbs { font-size: 13px; color: var(--ink-3); margin-bottom: 2px; }
.content { padding: 28px 32px 64px; }
.page-frame { width: 100%; max-width: 1680px; margin-left: auto; margin-right: auto; }
.page-frame.narrow { max-width: 820px; }
.topbar-inner.page-frame { max-width: 1616px; } .topbar-inner.page-frame.narrow { max-width: 756px; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.content.narrow .max-640 { max-width: none; }
.banner { padding: 10px 32px; font-size: 14px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.banner.warn { background: var(--warn-soft); color: var(--warn); border-bottom: 1px solid var(--line); }
.banner form { margin: 0; }

/* ---------- surfaces ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 24px; margin-bottom: 20px; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 14px; }
.card-head p { margin: 2px 0 0; color: var(--ink-3); font-size: 14px; }
.card.danger { border-color: color-mix(in srgb, var(--bad) 35%, var(--line)); }
.grid { display: grid; gap: 20px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.stat .label { font-size: 13px; color: var(--ink-3); }
.stat .value { font-size: 26px; font-weight: 650; letter-spacing: -0.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat .sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.meter { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; margin-top: 10px; }
.meter > span { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.meter.w0 > span { width: 0; } .meter.w10 > span { width: 10%; } .meter.w20 > span { width: 20%; } .meter.w30 > span { width: 30%; }
.meter.w40 > span { width: 40%; } .meter.w50 > span { width: 50%; } .meter.w60 > span { width: 60%; } .meter.w70 > span { width: 70%; }
.meter.w80 > span { width: 80%; } .meter.w90 > span { width: 90%; } .meter.w100 > span { width: 100%; background: var(--warn); }
.empty { text-align: center; padding: 36px 16px; color: var(--ink-3); }
.empty h3 { color: var(--ink); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; margin: 0 -24px; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th { text-align: left; font-weight: 600; color: var(--ink-3); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; padding: 8px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data th:first-child, table.data td:first-child { padding-left: 24px; }
table.data th:last-child, table.data td:last-child { padding-right: 24px; }
table.data tr:last-child td { border-bottom: 0; }
table.data td.actions { text-align: right; white-space: nowrap; }
table.data td.actions form { display: inline; }
.person { display: flex; align-items: center; gap: 10px; }
.person .avatar { width: 32px; height: 32px; }
.person .who { min-width: 0; }
.person .who b { display: block; font-weight: 600; }
.person .who > span { display: block; color: var(--ink-3); font-size: 13px; }
.person .who b .muted { font-weight: 400; }

/* ---------- badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--panel-2); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; }
.badge.accent { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.badge.good { background: var(--good-soft); color: var(--good); border-color: transparent; }
.badge.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }

/* ---------- forms ---------- */
.m0 { margin: 0; }
form.stack > :first-child, .card.stack > :first-child { margin-top: 0; }
form.stack > * + *, .card.stack > * + * { margin-top: 16px; }
.card.stack > .card-head + * { margin-top: 0; }
form.stack > input[type=hidden] + * { margin-top: 0; }
.field label, .field .label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.field .hint { font-size: 13px; color: var(--ink-3); margin-top: 4px; }
.field .error { font-size: 13px; color: var(--bad); margin-top: 4px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--panel); border: 1px solid var(--line-2); border-radius: 8px; padding: 9px 12px; transition: border-color .12s, box-shadow .12s;
}
textarea { min-height: 84px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input.code-input { font-family: var(--mono); font-size: 22px; letter-spacing: .3em; text-align: center; }
.row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.row-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.check input { margin-top: 3px; }
.check b { display: block; }
.check .muted { display: block; font-size: 13px; }
.empty .max-640 { margin-left: auto; margin-right: auto; }
.kv { display: grid; grid-template-columns: 160px 1fr; gap: 8px 16px; font-size: 14px; margin: 0; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 16px; }
.inline-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.inline-form .field { flex: 1 1 200px; }
select.compact { width: auto; padding: 5px 30px 5px 10px; font-size: 13px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 600; font-size: 14px; padding: 9px 16px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--panel); color: var(--ink); cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--panel-2); text-decoration: none; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
.btn.danger:hover { background: var(--bad-soft); }
.btn.small { padding: 5px 10px; font-size: 13px; }
.btn.block { width: 100%; }
.btn.link { border: 0; background: none; color: var(--accent); padding: 0; font-weight: 500; }
.btn.link.danger { color: var(--bad); }
.btn.link:hover { text-decoration: underline; background: none; }
.btns { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.btns.center { justify-content: center; }
.btns.end { justify-content: flex-end; }
.mt-0 { margin-top: 0; } .mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; } .mb-16 { margin-bottom: 16px; }
.max-640 { max-width: 640px; }

/* ---------- alerts ---------- */
.flash { border-radius: 8px; padding: 10px 14px; margin-bottom: 18px; font-size: 14px; border: 1px solid transparent; }
.flash.success { background: var(--good-soft); color: var(--good); }
.flash.error { background: var(--bad-soft); color: var(--bad); }
.flash.info { background: var(--accent-soft); color: var(--accent); }
.flash.warn { background: var(--warn-soft); color: var(--warn); }
.secret { font-family: var(--mono); font-size: 15px; letter-spacing: .12em; background: var(--panel-2); border: 1px dashed var(--line-2); border-radius: 8px; padding: 12px 14px; word-break: break-all; }

/* ---------- auth screens ---------- */
.auth { display: grid; grid-template-columns: minmax(320px, 46%) 1fr; min-height: 100vh; }
.auth-art { background: var(--side); color: var(--side-ink); padding: 40px 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-art .brand { padding: 0; font-size: 19px; }
.auth-art h2 { color: var(--on-accent); font-size: 30px; font-weight: 650; line-height: 1.2; max-width: 420px; letter-spacing: -0.02em; }
.auth-art p { color: var(--side-ink-2); max-width: 420px; }
.auth-art .grid-lines { position: absolute; inset: 0; background-image: linear-gradient(var(--night-grid) 1px, transparent 1px), linear-gradient(90deg, var(--night-grid) 1px, transparent 1px); background-size: 32px 32px; mask-image: radial-gradient(circle at 70% 60%, #000 0%, transparent 70%); -webkit-mask-image: radial-gradient(circle at 70% 60%, #000 0%, transparent 70%); pointer-events: none; }
.auth-art > * { position: relative; }
.auth-art .loop { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 20px; }
.auth-art .loop span { border: 1px solid var(--night-line-2); border-radius: 99px; padding: 4px 12px; font-size: 13px; color: var(--side-ink); }
.auth-form { display: grid; place-items: center; padding: 40px 24px; }
.auth-form .box { width: 100%; max-width: 400px; }
.auth-form h1 { font-size: 26px; }
.auth-form .lead { color: var(--ink-3); margin-bottom: 24px; }
.auth-form .alt { margin-top: 20px; font-size: 14px; color: var(--ink-3); text-align: center; }

/* ---------- bare pages ---------- */
.bare { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.bare .card { max-width: 480px; width: 100%; text-align: center; padding: 36px; }
.bare .code { font-family: var(--mono); color: var(--ink-3); font-size: 13px; }

/* ---------- landing ---------- */
.landing { max-width: 1080px; margin: 0 auto; padding: 24px; }
.landing-nav { display: flex; justify-content: space-between; align-items: center; padding: 8px 0 48px; }
.landing-nav .brand { color: var(--ink); padding: 0; }
.hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; padding-bottom: 64px; }
.hero h1 { font-size: 44px; letter-spacing: -0.03em; font-weight: 700; line-height: 1.08; }
.hero p { font-size: 18px; color: var(--ink-2); }
.hero-panel { background: var(--side); border-radius: 16px; padding: 24px; color: var(--side-ink); font-family: var(--mono); font-size: 13px; line-height: 1.8; }
.hero-panel .ok { color: var(--code-ok); } .hero-panel .dim { color: var(--side-ink-2); } .hero-panel .hl { color: var(--code-key); }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding-bottom: 64px; }
.features .card h3 { margin-bottom: 6px; }
.features .card p { color: var(--ink-2); font-size: 14px; margin: 0; }
.footer { border-top: 1px solid var(--line); padding: 24px 0; color: var(--ink-3); font-size: 13px; display: flex; justify-content: space-between; }

/* ---------- steps (2FA setup) ---------- */
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0 0 16px; }
.steps li { counter-increment: s; position: relative; padding-left: 34px; margin-bottom: 12px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 700; display: grid; place-items: center; }

/* ---------- responsive ---------- */
.menu-toggle { display: none; }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 272px; transform: translateX(-100%); transition: transform .2s; z-index: 50; }
  body.nav-open .side { transform: none; box-shadow: 0 0 0 100vmax var(--overlay); }
  .menu-toggle { display: inline-flex; }
  .topbar, .content, .banner { padding-left: 16px; padding-right: 16px; }
  .grid.cols-2, .grid.cols-3, .grid.cols-4, .row, .row-3, .features, .hero { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .hero h1 { font-size: 34px; }
  .table-wrap { margin: 0 -24px; }
}

/* ---------- brand lockup (logo files in assets/images) ---------- */
.brand-lockup { display: inline-flex; align-items: center; gap: 10px; line-height: 1; }
.brand-logo { height: 26px; width: auto; display: block; }
/* 'auto' logos: the dark logo on a light page, the white one on a dark page (only one shows) */
.brand-logo.logo-on-dark { display: none; }
:root[data-theme="dark"] .brand-logo.logo-on-light { display: none; }
:root[data-theme="dark"] .brand-logo.logo-on-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand-logo.logo-on-light { display: none; }
  :root:not([data-theme="light"]) .brand-logo.logo-on-dark { display: block; }
}
.brand-divider { width: 1px; height: 18px; background: currentColor; opacity: .25; }
.brand-name { font-weight: 700; font-size: 17px; letter-spacing: .01em; }
.brand-suffix { font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; opacity: .6; margin-left: -2px; }
.brand-light { color: var(--on-accent); }
.brand-auto { color: var(--ink); }
.brand-dark { color: var(--ink); }

/* ---------- image tiles: placeholders until the real image is uploaded ---------- */
.tile { position: relative; margin: 0; border-radius: 14px; overflow: hidden; background: var(--panel-2); border: 1px dashed var(--line-2); }
.tile.has-img { border: 1px solid var(--line); background: var(--panel); }
.tile img, .tile video { display: block; width: 100%; height: 100%; object-fit: cover; }
.tile.ratio-16x9 { aspect-ratio: 16 / 9; } .tile.ratio-4x3 { aspect-ratio: 4 / 3; } .tile.ratio-3x2 { aspect-ratio: 3 / 2; }
.tile.ratio-1x1 { aspect-ratio: 1; } .tile.ratio-21x9 { aspect-ratio: 21 / 9; } .tile.ratio-3x4 { aspect-ratio: 3 / 4; }
.tile-inner { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 20px; text-align: center;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 24px 24px; background-position: center; }
.tile-inner > * { background: var(--panel); position: relative; }
.tile-icon { width: 34px; height: 26px; border: 2px solid var(--ink-3); border-radius: 4px; margin-bottom: 4px; background:
  radial-gradient(circle at 30% 35%, var(--ink-3) 0 3px, transparent 3.5px), linear-gradient(135deg, transparent 55%, var(--ink-3) 56% 62%, transparent 63%), var(--panel); }
.tile-file { font-size: 12px; color: var(--accent); padding: 2px 8px; border-radius: 4px; word-break: break-all; }
.tile-size { font-family: var(--mono); font-size: 11px; color: var(--ink-3); padding: 0 6px; }
.tile-desc { font-size: 13px; color: var(--ink-2); max-width: 46ch; padding: 4px 8px; border-radius: 4px; line-height: 1.4; }
.tile.shadow { box-shadow: var(--shadow-lg); }
.tile.in-content { margin: 24px 0; }

/* ---------- status labels ---------- */
.status { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; padding: 2px 8px; border-radius: 4px; border: 1px solid var(--line-2); color: var(--ink-3); vertical-align: middle; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status.live { color: var(--good); border-color: color-mix(in srgb, var(--good) 35%, transparent); }
.status.beta { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.status.soon { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); }
.dot.good { background: var(--good); } .dot.warn { background: var(--warn); } .dot.bad { background: var(--bad); } .dot.accent { background: var(--accent); }
.preview-strip { background: var(--notice-bg); color: var(--notice-ink); font-size: 13px; text-align: center; padding: 7px 16px; }
.preview-strip a { color: var(--on-accent); text-decoration: underline; }
.preview-box { margin-top: 28px; border: 1px dashed var(--line-2); border-radius: 12px; padding: 16px; }
.preview-box h2 { font-size: 15px; margin-bottom: 4px; }
.preview-box form { margin: 0; }
.preview-acc { width: 100%; text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; margin-top: 8px; cursor: pointer; font: inherit; color: var(--ink); display: grid; grid-template-columns: 1fr auto; gap: 0 12px; }
.preview-acc:hover { border-color: var(--accent); }
.preview-acc b { font-size: 14px; }
.preview-acc span { grid-column: 1; font-size: 12px; color: var(--ink-3); }
.preview-acc code { grid-column: 2; grid-row: 1 / 3; align-self: center; font-size: 11px; color: var(--ink-3); }

/* ---------- billing ---------- */
.card.highlight { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: 0 0 0 3px var(--accent-soft); }
.plan-now { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 14px 16px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; }
.pn-name { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.pn-price { font-size: 20px; font-weight: 650; font-variant-numeric: tabular-nums; }
.pn-price small { font-size: 13px; color: var(--ink-3); font-weight: 500; }
.ticks-sm { list-style: none; padding: 0; margin: 0; font-size: 14px; color: var(--ink-2); display: grid; gap: 6px; }
.ticks-sm li::before { content: "✓"; color: var(--accent); font-weight: 700; margin-right: 8px; }
.choice-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line-2); border-radius: 10px; padding: 12px 14px; cursor: pointer; font-size: 14px; }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.choice input { margin-top: 3px; }
.choice b { display: block; }
.choice .muted { display: block; font-size: 12px; }
.quote-out b, .quote-box b { display: block; font-size: 15px; padding: 9px 0; font-variant-numeric: tabular-nums; }
.quote-box { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }
.quote-box .label, .quote-out .label { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.quote-box b { padding: 2px 0 0; font-size: 17px; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.test-checkout { max-width: 560px; text-align: left !important; }
.tc-flag { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--warn); background: var(--warn-soft); border-radius: 6px; padding: 6px 10px; display: inline-block; margin-bottom: 16px; }
.test-checkout h1 { font-size: 22px; }
.tc-lines td { padding-left: 0 !important; padding-right: 0 !important; }
.tc-total td { font-weight: 700; border-top: 2px solid var(--line-2); }
.invoice-doc { max-width: 760px !important; text-align: left !important; }
.inv-head { display: flex; justify-content: space-between; gap: 24px; }
.invoice-doc .right { text-align: right; }
.invoice-doc h1 { font-size: 26px; margin: 0; }
.invoice-doc .table-wrap, .invoice-doc table.data { margin: 0; }
@media print { .no-print { display: none !important; } body { background: #fff; color: #000; } .bare { padding: 0; } .invoice-doc { border: 0; box-shadow: none; } }
@media (max-width: 900px) { .choice-row { grid-template-columns: 1fr; } }
.side .brand { text-decoration: none; padding: 6px 8px 18px; }
.side .brand .brand-name { font-size: 16px; }
.banner.preview { background: var(--notice-bg); color: var(--notice-ink); border-bottom: 1px solid var(--notice-line); }
.banner.preview .btn { background: transparent; color: var(--on-accent); border-color: var(--notice-line); }
.auth-art .brand { color: var(--on-accent); text-decoration: none; }

/* ---------- dashboard: compute ---------- */
a.stat.link { color: inherit; display: block; transition: border-color .12s; }
a.stat.link:hover { border-color: var(--accent); text-decoration: none; }
.grid.cols-3-1 { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); align-items: start; }
.meter.thin { height: 3px; margin-top: 6px; width: 90px; }
.checklist { list-style: none; padding: 0; margin: 0; font-size: 14px; display: grid; gap: 8px; }
.checklist li { padding-left: 26px; position: relative; color: var(--ink-2); }
.checklist li::before { content: ""; position: absolute; left: 0; top: 2px; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--line-2); }
.checklist li.ok { color: var(--ink-3); text-decoration: line-through; }
.checklist li.ok::before { background: var(--good); border-color: var(--good); }
.chart { margin: 0; position: relative; padding-left: 34px; }
.chart-svg { width: 100%; height: 160px; display: block; }
.card .chart-svg { height: 150px; }
.chart .grid { stroke: var(--line); stroke-width: .3; vector-effect: non-scaling-stroke; }
.chart .bar { fill: var(--accent); opacity: .85; }
.chart .bar:hover { opacity: 1; }
.chart-y { position: absolute; left: 0; top: 0; bottom: 18px; display: flex; flex-direction: column; justify-content: space-between; font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.chart-x { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-3); margin-top: 4px; }
.shares { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.shares li { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; font-size: 14px; }
.sh-val { color: var(--ink-3); font-size: 13px; font-variant-numeric: tabular-nums; }
.sh-bar { grid-column: 1 / -1; width: 100%; height: 6px; border-radius: 3px; }
.sh-bar .track { fill: var(--line); } .sh-bar .fill { fill: var(--accent); }
.worker-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.wchip { display: grid; grid-template-columns: auto 1fr; gap: 0 10px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; color: var(--ink); }
.wchip:hover { border-color: var(--accent); text-decoration: none; }
.wchip .dot { grid-row: 1 / 3; }
.wchip b { font-size: 14px; } .wchip span:last-child { font-size: 12px; color: var(--ink-3); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs a { padding: 9px 14px; color: var(--ink-2); font-weight: 600; font-size: 14px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs a.on { color: var(--accent); border-bottom-color: var(--accent); }
.tabs .count { font-size: 12px; color: var(--ink-3); font-weight: 500; margin-left: 4px; }
.toolbar.between { justify-content: space-between; align-items: center; }
.seg { display: inline-flex; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 3px; gap: 2px; }
.seg a { padding: 5px 12px; border-radius: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.seg a.on { background: var(--panel); color: var(--ink); box-shadow: var(--shadow), 0 0 0 1px var(--line); }
.seg a:hover { text-decoration: none; }
.card.flush { padding: 0; overflow: hidden; }
.card.flush .table-wrap { margin: 0; }
.card.flush .empty { padding: 32px 24px; }
.card-head.pad { padding: 18px 24px 4px; margin: 0; }
.w-240 { width: 240px !important; }
input[type=search] { width: 100%; font: inherit; color: var(--ink); background: var(--panel); border: 1px solid var(--line-2); border-radius: 8px; padding: 6px 12px; font-size: 14px; }
.compact-check { align-items: center; } .compact-check input { margin-top: 0; }
.inline-form .full { flex-basis: 100%; margin: 0; }
.inline-form .grow { flex: 3 1 300px; }
.mono-input { font-family: var(--mono) !important; font-size: 13px !important; }
.pager-row { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
tr.dim td { opacity: .5; }
.flash form.inline { display: inline; margin-left: 8px; }
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.project-grid .card { margin: 0; }
.project h2 a { color: var(--ink); }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0; }
.mini-stats.wide { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.mini-stats dt { font-size: 12px; color: var(--ink-3); }
.mini-stats dd { margin: 2px 0 0; font-weight: 600; font-size: 14px; }
details.inline-edit { display: inline-block; }
details.inline-edit > summary { list-style: none; }
details.inline-edit > summary::-webkit-details-marker { display: none; }
details.inline-edit[open] { display: block; width: 100%; }
.preset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.preset { margin: 0; display: flex; flex-direction: column; }
.preset h2 { margin-top: 10px; }
.preset p { color: var(--ink-2); font-size: 14px; flex: 1; }
.preset .btn { align-self: flex-start; }
.preset.locked { opacity: .75; }
.preset-top { display: flex; justify-content: space-between; align-items: center; }
.target-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.choice.disabled { opacity: .55; cursor: not-allowed; }
details.adv summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--accent); }
.card.sticky { position: sticky; top: 16px; }
.summary-kv { grid-template-columns: 100px 1fr; }
.row-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.job-head { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; }
.jh-status { display: flex; align-items: center; gap: 10px; }
.jh-status .meter { width: 120px; margin: 0; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 16px 12px; font-size: 14px; }
.timeline li::before { content: ""; position: absolute; left: -25px; top: 3px; width: 12px; height: 12px; border-radius: 50%; background: var(--panel); border: 2px solid var(--line-2); }
.timeline li.done::before { background: var(--accent); border-color: var(--accent); }
.timeline b { display: block; } .timeline span { color: var(--ink-3); font-size: 13px; }
pre.code { background: var(--code-bg); color: var(--code-ink); border-radius: 10px; padding: 14px 16px; font-family: var(--mono); font-size: 13px; overflow-x: auto; white-space: pre-wrap; word-break: break-all; margin: 8px 0 12px; }
pre.code.small { font-size: 12px; }
.log-bar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
pre.log { margin: 0; background: var(--code-bg); color: var(--code-ink); font-family: var(--mono); font-size: 12.5px; line-height: 1.7; padding: 14px 18px; max-height: 560px; overflow: auto; white-space: pre-wrap; }
pre.log .ts { color: var(--code-dim); }
pre.log .l-stderr { color: var(--code-err); } pre.log .l-system { color: var(--code-key); }
.gpu-groups { display: grid; gap: 14px; }
.gpu-group { display: grid; grid-template-columns: 70px 1fr; gap: 12px; align-items: start; }
.gg-label { font-size: 12px; color: var(--ink-3); padding-top: 12px; }
.gg-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.gpu-card { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 12px; display: grid; gap: 2px; background: var(--panel-2); }
.gpu-card b { font-size: 13px; }
.gpu-card span:last-child { color: var(--ink-3); }
.gpu-card.taken { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); background: var(--accent-soft); }
.gpu-pick { display: grid; gap: 8px; }
.gp-group { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.gp-group > .mono { width: 64px; }
.gp { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-2); border-radius: 8px; padding: 6px 10px; font-size: 13px; cursor: pointer; }
.gp:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.gp.taken { color: var(--ink-3); }
.unit-form { border-top: 1px solid var(--line); padding-top: 18px; display: grid; gap: 14px; }
.pair-code { font-family: var(--mono); font-size: 40px; font-weight: 500; letter-spacing: .25em; padding: 16px 20px; background: var(--panel-2); border: 1px dashed var(--line-2); border-radius: 12px; display: inline-block; margin: 4px 0 12px; }
@media (max-width: 1100px) { .grid.cols-3-1 { grid-template-columns: 1fr; } .mini-stats.wide { grid-template-columns: repeat(3, 1fr); } .card.sticky { position: static; } }
@media (max-width: 900px) { .target-pick, .row-4 { grid-template-columns: 1fr 1fr; } .job-head { grid-template-columns: 1fr; } .gpu-group { grid-template-columns: 1fr; } .gg-label { padding: 0; } .w-240 { width: 100% !important; } }
.w-80 { width: 80px !important; } .prewrap { white-space: pre-wrap; }
form.inline-form-plain { display: inline; margin: 0; }

/* ---------- theme switch (light / dark / auto) ---------- */
.theme-switch { display: inline-flex; gap: 2px; padding: 3px; border-radius: 9px; background: var(--panel-2); border: 1px solid var(--line); margin: 0; }
.theme-switch button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: var(--ink-3); font: inherit; font-size: 12px; font-weight: 600; padding: 5px 8px; border-radius: 6px; cursor: pointer; }
.theme-switch button:hover { color: var(--ink); }
.theme-switch button.on { background: var(--panel); color: var(--ink); box-shadow: var(--shadow), 0 0 0 1px var(--line); }
.theme-switch.icons .ts-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.ts-ico { width: 12px; height: 12px; border-radius: 50%; display: inline-block; flex: none; }
.ts-light .ts-ico { background: currentColor; box-shadow: 0 0 0 2px var(--panel-2), 0 0 0 3px currentColor; transform: scale(.7); }
.ts-dark .ts-ico { background: transparent; box-shadow: inset -4px -2px 0 0 currentColor; }
.ts-system .ts-ico { border: 1.5px solid currentColor; background: linear-gradient(90deg, currentColor 50%, transparent 50%); }
.on-dark .theme-switch, .site-foot .theme-switch, .side .theme-switch { background: color-mix(in srgb, var(--on-accent) 6%, transparent); border-color: var(--night-line-2); }
.on-dark .theme-switch button, .site-foot .theme-switch button, .side .theme-switch button { color: var(--side-ink-2); }
.on-dark .theme-switch button:hover, .site-foot .theme-switch button:hover, .side .theme-switch button:hover { color: var(--on-accent); }
.on-dark .theme-switch button.on, .site-foot .theme-switch button.on, .side .theme-switch button.on { background: var(--side-active); color: var(--on-accent); box-shadow: none; }
.side .theme-switch { display: flex; margin: 6px 8px 8px; }
.side .theme-switch button { flex: 1; justify-content: center; }
.side .ts-light .ts-ico { box-shadow: 0 0 0 2px var(--side), 0 0 0 3px currentColor; }
.auth-form { position: relative; } .auth-theme { position: absolute; top: 20px; right: 24px; }

/* staff: switch between the user dashboard and the platform admin */
.mode-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; padding: 3px; margin: 0 0 14px; border-radius: 9px; background: color-mix(in srgb, var(--on-accent) 6%, transparent); border: 1px solid var(--night-line-2); }
.mode-switch a { text-align: center; font-size: 12px; font-weight: 600; padding: 6px 4px; border-radius: 6px; color: var(--side-ink-2); }
.mode-switch a:hover { color: var(--on-accent); text-decoration: none; }
.mode-switch a.on { background: var(--side-active); color: var(--on-accent); }
.setup-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px 24px; }
.setup-steps li { display: flex; gap: 10px; align-items: flex-start; }
.setup-steps li .dot { margin-top: 7px; flex: none; }
.setup-steps li b { display: block; font-size: 14px; }
.setup-steps li span.small { display: block; }
.setup-steps li.ok b { color: var(--ink-3); text-decoration: line-through; font-weight: 500; }
.hw-req { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 4px; }
.hw-req .label { font-size: 12px; color: var(--ink-3); font-weight: 600; margin-right: 4px; }
.vendor-chip { display: inline-flex; align-items: baseline; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--panel-2); }
.vendor-chip small { font-weight: 500; color: var(--ink-3); font-size: 11px; }
.full-span { grid-column: 1 / -1; }
dt[hidden], dd[hidden] { display: none; }
.pack-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.choice.pack b { font-size: 18px; }
td.num.pos { color: var(--good); }
.stat.warn-stat { border-color: color-mix(in srgb, var(--warn) 50%, var(--line)); }
.stat.warn-stat .value { color: var(--warn); }
td.num.neg { color: var(--bad); }
.pad-24 { padding: 0 24px 24px; }

/* uploaded job outputs */
.output-img { max-width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line); margin-top: 12px; }
.output-text { max-height: 75vh; overflow: auto; margin-top: 12px; white-space: pre; }

/* worker settings */
.settings-form .grid { gap: 16px 24px; }
.check-row { display: flex; flex-wrap: wrap; gap: 8px 20px; padding-top: 4px; }
.check-row label, .inline-choice label { display: inline-flex; align-items: center; gap: 6px; font-weight: 450; }
.inline-choice { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.time-input { width: 7.5em; }
fieldset.field { border: 0; padding: 0; margin: 16px 0 0; }
fieldset.field legend { font-weight: 600; font-size: 14px; margin-bottom: 4px; padding: 0; }
.install-list { display: grid; gap: 10px; margin: 6px 0 4px; }
.install-item { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px 2px; background: var(--panel); }
.install-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.install-item pre.code { margin: 8px 0 6px; }
.install-item p { margin: 0 0 8px; }
/* OS tabs in "Connect the machine": radio buttons, no script needed */
.os-tabs { margin-top: 12px; }
.os-radio { position: absolute; opacity: 0; pointer-events: none; }
.os-labels { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.os-label { padding: 8px 14px; cursor: pointer; border: 1px solid transparent; border-bottom: 0; border-radius: 8px 8px 0 0; font-weight: 500; color: var(--ink-2); margin-bottom: -1px; }
.os-label:hover { color: var(--ink); }
.os-panel { display: none; }
.os-panel .install-item { margin-bottom: 10px; }
#os-windows:checked ~ .os-panels .os-panel-windows, #os-linux:checked ~ .os-panels .os-panel-linux, #os-macos:checked ~ .os-panels .os-panel-macos { display: block; }
#rp-windows:checked ~ .os-panels .os-panel-windows, #rp-linux:checked ~ .os-panels .os-panel-linux, #rp-macos:checked ~ .os-panels .os-panel-macos { display: block; }
#rp-windows:checked ~ .os-labels .os-label-windows, #rp-linux:checked ~ .os-labels .os-label-linux, #rp-macos:checked ~ .os-labels .os-label-macos { color: var(--ink); border-color: var(--line); background: var(--panel); }
#os-windows:checked ~ .os-labels .os-label-windows, #os-linux:checked ~ .os-labels .os-label-linux, #os-macos:checked ~ .os-labels .os-label-macos { color: var(--ink); border-color: var(--line); background: var(--panel); }
.os-radio:focus-visible ~ .os-labels .os-label { outline: none; }
#os-windows:focus-visible ~ .os-labels .os-label-windows, #os-linux:focus-visible ~ .os-labels .os-label-linux, #os-macos:focus-visible ~ .os-labels .os-label-macos { outline: 2px solid var(--accent); }
.install-item pre.code { white-space: pre-wrap; word-break: break-all; }
.pair-wait { display: flex; align-items: center; gap: 8px; margin-top: -4px; }
.spinner-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pairpulse 1.2s ease-in-out infinite; flex: none; }
@keyframes pairpulse { 0%, 100% { opacity: .25; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.1); } }
@media (prefers-reduced-motion: reduce) { .spinner-dot { animation: none; } }
.row-new { background: color-mix(in srgb, var(--accent) 8%, transparent); }

/* Thin bar above the page header: workspace on the left, theme and the account menu on the right */
.userbar { background: var(--panel-2); border-bottom: 1px solid var(--line); padding: 0 32px; font-size: 13px; }
.userbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; }
.userbar-ws { color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.userbar-right { display: flex; align-items: center; gap: 10px; }
.userbar .theme-switch { padding: 2px; }
.userbar .theme-switch button { padding: 4px 6px; }
.usermenu { position: relative; }
.usermenu summary { list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 3px 6px; border-radius: 8px; }
.usermenu summary::-webkit-details-marker { display: none; }
.usermenu summary:hover, .usermenu[open] summary { background: var(--panel); }
.usermenu .avatar { width: 26px; height: 26px; font-size: 11px; }
.um-who { display: flex; flex-direction: column; line-height: 1.15; }
.um-who b { font-weight: 600; color: var(--ink); }
.um-who span { color: var(--ink-3); font-size: 11px; }
.usermenu .chev { color: var(--ink-3); font-size: 10px; }
.usermenu-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 220px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-lg); padding: 6px; display: flex; flex-direction: column; }
.usermenu-menu a, .usermenu-menu button { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 6px; color: var(--ink); text-decoration: none; font: inherit; font-size: 14px; background: none; border: 0; text-align: left; cursor: pointer; width: 100%; }
.usermenu-menu a:hover, .usermenu-menu button:hover { background: var(--panel-2); }
.usermenu-menu form { margin: 0; border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; }
.um-head { display: flex; flex-direction: column; padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.um-head span { color: var(--ink-3); font-size: 12px; }
.usermenu-menu .soon { font-size: 10px; }
/* Tabs under the page header (Computing, Team, projects) */
.page-tabs { display: flex; gap: 2px; margin-top: 8px; overflow-x: auto; }
.page-tabs a { padding: 8px 12px 9px; color: var(--ink-2); text-decoration: none; font-size: 14px; font-weight: 500; border-bottom: 2px solid transparent; white-space: nowrap; }
.page-tabs a:hover { color: var(--ink); }
.page-tabs a.on { color: var(--ink); border-bottom-color: var(--accent); }
@media (max-width: 900px) {
  .userbar { padding: 0 16px; }
  .um-who span { display: none; }
}
@media (max-width: 520px) {
  .um-who { display: none; }
}
.org-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); margin: 0; }
.org-row:first-of-type { border-top: 0; }
.nav .nav-off { display: flex; align-items: center; justify-content: space-between; padding: 7px 10px; color: var(--side-ink-2); font-size: 14px; cursor: default; }
/* ---------- projects: cards ---------- */
.psearch { position: relative; display: flex; align-items: center; gap: 12px; margin: 0 0 18px; max-width: 560px; }
.psearch-icon { position: absolute; left: 12px; color: var(--ink-3); pointer-events: none; }
.psearch input[type=search] { padding: 9px 12px 9px 36px; font-size: 15px; border-radius: 10px; }
.psearch input[type=search]:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.psearch-count { white-space: nowrap; }
.psearch-none { margin: 4px 0 24px; }
.psearch-none .link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; text-decoration: underline; }
.pgrid [hidden], .psearch-none[hidden], [data-psearch-section][hidden] { display: none !important; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 20px; margin-bottom: 28px; }
.pcard { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; color: var(--ink); text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s; }
.pcard:hover { border-color: var(--line-2); box-shadow: var(--shadow-lg); transform: translateY(-2px); text-decoration: none; }
.pcard:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pcard-cover { position: relative; display: block; aspect-ratio: 5 / 2; background: var(--panel-2); }
.pcard-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pcard-live { position: absolute; left: 12px; top: 12px; display: inline-flex; align-items: center; gap: 6px; background: rgba(10, 14, 24, .72); color: #fff; font-size: 12px; font-weight: 600; padding: 4px 9px; border-radius: 999px; }
.pcard-live .spinner-dot { background: #6ee7a8; }
.pcard-wrap { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pcard-wrap > .pcard { flex: 1; }
.pcard-demo { background: rgba(37, 99, 235, .85); }
.pcard-admin { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 4px; }
.demo-intro { margin-bottom: 16px; }
.demo-intro p { margin: 6px 0 0; }
.pcard-body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; flex: 1; }
.pcard-type { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-weight: 600; }
.pcard-name { font-size: 17px; font-weight: 650; line-height: 1.25; }
.pcard-desc { color: var(--ink-2); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.pcard-stats { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--ink-3); margin-top: 4px; }
.pcard-stats b { color: var(--ink); font-weight: 600; }
.pcard-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); }
.pcard-new { align-items: center; justify-content: center; gap: 8px; min-height: 260px; border-style: dashed; color: var(--ink-2); font-weight: 600; background: transparent; }
.pcard-new:hover { color: var(--accent); border-color: var(--accent); }
.pcard-plus { font-size: 34px; line-height: 1; font-weight: 300; }
.section-title { font-size: 17px; margin: 8px 0 4px; }
.cover-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.cover-opt { position: relative; display: block; cursor: pointer; border-radius: 8px; overflow: hidden; border: 2px solid transparent; }
.cover-opt img { display: block; width: 100%; height: auto; aspect-ratio: 5 / 2; object-fit: cover; }
.cover-opt input { position: absolute; opacity: 0; pointer-events: none; }
.cover-opt:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 30%, transparent); }
.cover-opt:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
textarea { width: 100%; }
/* ---------- project space ---------- */
.pspace-banner { position: relative; border-radius: 14px; overflow: hidden; margin-bottom: 20px; aspect-ratio: 6 / 1; min-height: 120px; background: var(--panel-2); }
.pspace-banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pspace-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8, 12, 22, .72), rgba(8, 12, 22, .1) 70%); }
.pspace-banner-text { position: absolute; left: 24px; bottom: 18px; right: 24px; z-index: 1; color: #fff; }
.pspace-banner-text h2 { margin: 2px 0; font-size: 24px; color: #fff; }
.pspace-banner-text p { margin: 0; opacity: .85; max-width: 760px; }
.pspace-banner-text .pcard-type { color: rgba(255, 255, 255, .75); }
.danger-zone { border-color: color-mix(in srgb, var(--bad) 35%, var(--line)); }
.check-list { display: flex; flex-direction: column; gap: 2px; padding-left: 26px; max-height: 260px; overflow-y: auto; }
.card-head.pad, .pad { padding: 18px 20px 0; }
p.pad { padding-bottom: 16px; }
.toolbar.m0 { margin: 0; }
.live-list { display: flex; flex-direction: column; }
.live-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 1.2fr); gap: 16px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.live-row:first-child { border-top: 0; }
.live-row:hover { text-decoration: none; background: var(--panel-2); }
.live-row > span:first-child { display: flex; flex-direction: column; }
.live-prog { display: flex; align-items: center; gap: 10px; }
.live-prog .meter { flex: 1; margin: 0; }
.bp-demo { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 20px 0; }
.bp-demo span { border: 1px solid var(--line-2); background: var(--panel-2); color: var(--ink); border-radius: 10px; padding: 10px 14px; font-weight: 600; font-size: 14px; }
.bp-demo i { width: 28px; height: 2px; background: var(--accent); position: relative; }
.bp-demo i::after { content: ""; position: absolute; right: -2px; top: -4px; border: 5px solid transparent; border-left-color: var(--accent); border-right: 0; }
@media (max-width: 900px) { .live-row { grid-template-columns: 1fr; } .pspace-banner { aspect-ratio: 3 / 1; } }
/* ---------- run inside a project ---------- */
.preset-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.preset-opt { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); text-decoration: none; background: var(--panel); }
.preset-opt:hover { border-color: var(--line-2); text-decoration: none; }
.preset-opt.on { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 25%, transparent); }
.preset-opt.locked { opacity: .55; }
.preset-opt .chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.mcard { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 12px 40px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); cursor: pointer; }
.mcard.static { padding-left: 14px; cursor: default; }
.mcard > input[type=radio] { position: absolute; left: 14px; top: 15px; margin: 0; accent-color: var(--accent); }
.mcard:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 25%, transparent); }
.mcard:has(input:disabled) { cursor: not-allowed; opacity: .6; }
.mcard-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.mstate { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--ink-3); }
.mstate .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); }
.m-available .mstate, .m-auto .mstate { color: var(--good); } .m-available .dot, .m-auto .dot { background: var(--good); }
.m-busy .mstate { color: var(--accent); } .m-busy .dot { background: var(--accent); }
.m-full .mstate, .m-paused .mstate { color: var(--warn); } .m-full .dot, .m-paused .dot { background: var(--warn); }
.m-cloud .dot { background: var(--accent); }
.slots { display: flex; gap: 3px; } .slots i { width: 14px; height: 6px; border-radius: 3px; background: var(--line-2); } .slots i.on { background: var(--accent); }
.mcard-runs { display: flex; flex-direction: column; gap: 2px; color: var(--ink-2); }
.vendor-chip.small { font-size: 11px; padding: 1px 6px; }
.um-label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); padding: 6px 10px 2px; font-weight: 600; }
.usermenu-menu form.um-ws { border: 0; margin: 0; padding: 0; }
.usermenu-menu .um-ws button:disabled { cursor: default; font-weight: 600; background: none; opacity: 1; color: var(--ink); }
.um-check { color: var(--accent); }
.um-sep { border-top: 1px solid var(--line); margin: 4px 0; }
.usermenu-menu { max-height: calc(100vh - 70px); overflow-y: auto; }
/* ---------- flows (Blueprint tab) ---------- */
.flow-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.flow-head p { margin: 0; max-width: 760px; }
.fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.fcard { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); overflow: hidden; }
.fcard-main { display: flex; flex-direction: column; gap: 6px; padding: 16px; color: var(--ink); text-decoration: none; flex: 1; }
.fcard-main:hover { background: var(--panel-2); text-decoration: none; }
.fcard-icons { display: flex; gap: 6px; margin-bottom: 4px; }
.fcard-icons i, i[data-icon] { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }
i[data-icon] svg { width: 16px; height: 16px; }
.fcard-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--ink-2); }
.fcard-actions { display: flex; gap: 8px; padding: 10px 16px; border-top: 1px solid var(--line); margin: 0; }
dialog.modal { border: 1px solid var(--line); border-radius: 14px; padding: 24px; width: min(720px, calc(100vw - 32px)); background: var(--panel); color: var(--ink); box-shadow: var(--shadow-lg); }
dialog.modal::backdrop { background: rgba(10, 14, 24, .5); }
.tpl-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.tpl-opt { display: flex; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.tpl-opt > span { display: flex; flex-direction: column; gap: 3px; }
.tpl-opt:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 25%, transparent); }

/* ==========================================================================
   0.7: menu with icons that folds to a rail; one-row page header; full-height pages
   ========================================================================== */
.shell { grid-template-columns: 232px 1fr; transition: grid-template-columns .18s ease; }
@media (max-width: 900px) { .shell { grid-template-columns: minmax(0, 1fr); } }
@media (min-width: 901px) { .shell.nav-min { grid-template-columns: 60px 1fr; } }
.side { padding: 12px 10px; overflow-x: hidden; }
.side-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 10px; min-height: 36px; }
.side .brand { padding: 4px 6px; min-width: 0; overflow: hidden; }
.brand-min { display: none; }
.side-toggle { flex: none; display: inline-grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 7px; background: none; color: var(--side-ink-2); cursor: pointer; padding: 0; }
.side-toggle:hover { background: var(--side-active); color: var(--on-accent); }
.side-toggle .when-min { display: none; }
.side svg.ni { flex: none; width: 18px; height: 18px; }
.nav a, .nav .nav-off { justify-content: flex-start; gap: 10px; padding: 7px 9px; white-space: nowrap; }
.nav a .nl, .nav .nav-off .nl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.nav a svg.ni { opacity: .85; } .nav a.active svg.ni, .nav a:hover svg.ni { opacity: 1; }
.nav-group { margin-bottom: 14px; }
.mode-switch a { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.mode-switch svg.ni { width: 14px; height: 14px; }
@media (min-width: 901px) {
.shell.nav-min .side { padding: 12px 8px; }
.shell.nav-min .side-top { flex-direction: column; gap: 8px; }
.shell.nav-min .brand-lockup { display: none; }
.shell.nav-min .brand-min { display: grid; }
.shell.nav-min .side .brand { padding: 2px 0; }
.shell.nav-min .side-toggle .when-open { display: none; }
.shell.nav-min .side-toggle .when-min { display: block; }
.shell.nav-min .nav .nl, .shell.nav-min .nav .soon { display: none; }
.shell.nav-min .nav a, .shell.nav-min .nav .nav-off { justify-content: center; padding: 9px 0; }
.shell.nav-min .nav-label { height: 1px; padding: 0; margin: 0 8px 10px; overflow: hidden; color: transparent; background: var(--side-line); }
}

/* One row: crumbs / title, the tabs, the actions */
.topbar { padding: 0 24px; }
.topbar.has-tabs { padding-bottom: 0; }
.topbar-inner { min-height: 48px; gap: 18px; align-items: stretch; }
.topbar-inner.page-frame { max-width: 1680px; }
.topbar-inner.page-frame.full { max-width: none; }
.tb-title { display: flex; align-items: center; gap: 8px; min-width: 0; flex: none; max-width: 40%; }
.tb-title .crumbs { margin: 0; font-size: 13px; white-space: nowrap; }
.tb-sep { color: var(--ink-3); opacity: .6; }
.topbar h1 { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .page-tabs { margin: 0; flex: 1; min-width: 0; align-self: stretch; align-items: stretch; }
.topbar .page-tabs a { display: inline-flex; align-items: center; padding: 0 11px; font-size: 13.5px; border-bottom-width: 2px; margin-bottom: -1px; }
.topbar .btns { display: flex; align-items: center; gap: 8px; margin-left: auto; flex: none; }
.content { padding: 24px 28px 56px; }
.userbar { padding: 0 24px; }
.userbar-inner { min-height: 36px; }
@media (max-width: 1100px) {
  .topbar-inner { flex-wrap: wrap; row-gap: 0; }
  .tb-title { max-width: none; flex: 1; min-height: 44px; }
  .topbar .page-tabs { order: 3; flex-basis: 100%; min-height: 38px; }
}
@media (max-width: 900px) {
  .side-toggle { display: none; }
  .topbar, .userbar { padding-left: 16px; padding-right: 16px; }
}

/* Pages that fill the window (the blueprint editor): no page scroll, no padding */
body.fill { overflow: hidden; }
body.fill .main { display: flex; flex-direction: column; height: 100vh; min-height: 0; }
body.fill .content.fill { flex: 1; min-height: 0; padding: 0; max-width: none; overflow: hidden; display: flex; flex-direction: column; }
body.fill .content.fill > .flash { margin: 10px 16px 0; }
/* Blueprint tab: the editor fills the page under the project header */
.bp-start { flex: 1; overflow-y: auto; display: grid; place-items: start center; padding: 48px 24px; background: var(--panel-2); }
.bp-start-card { width: min(860px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 28px; box-shadow: var(--shadow); }
.bp-start-card h2 { margin-top: 0; }
.tpl-go { padding: 0; margin: 0; }
.tpl-go button { all: unset; box-sizing: border-box; display: flex; flex-direction: column; gap: 3px; width: 100%; padding: 12px 14px; cursor: pointer; border-radius: 10px; }
.tpl-go:hover { border-color: var(--accent); }
.tpl-go button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.type-pick { display: flex; gap: 8px; flex-wrap: wrap; }
.type-pick select { flex: 1 1 220px; }
.type-pick input { flex: 1 1 200px; }
.type-pick input[hidden] { display: none; }
.tpl-projects { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
a.tpl-opt { color: var(--ink); text-decoration: none; }
a.tpl-opt:hover { border-color: var(--accent); }
.share-rows { display: flex; flex-direction: column; gap: 6px; }
.share-row { display: grid; grid-template-columns: minmax(140px, 1fr) minmax(220px, 2fr) auto auto; gap: 8px; align-items: center; }
.share-row .check { margin: 0; white-space: nowrap; }
.share-row .share-note { grid-column: 1 / -1; color: var(--ink-2); line-height: 1.45; }
.bad-text { color: var(--bad, #c0392b); font-weight: 550; }
@media (max-width: 900px) { .share-row { grid-template-columns: 1fr; } }
/* ---------- data ---------- */
.data-intro { max-width: 860px; }
.steps-list { padding-left: 20px; display: grid; gap: 8px; margin: 12px 0 18px; }
.inline-search input { height: 32px; border: 1px solid var(--line-2); border-radius: 8px; padding: 0 10px; background: var(--panel); color: var(--ink); font: inherit; font-size: 13px; min-width: 220px; }
.seg.pad-x { padding: 0 20px 12px; display: flex; gap: 4px; flex-wrap: wrap; }
.seg.pad-x a { padding: 5px 10px; border-radius: 8px; border: 1px solid var(--line); font-size: 13px; color: var(--ink-2); text-decoration: none; }
.seg.pad-x a.on { border-color: var(--accent); color: var(--ink); background: var(--accent-soft); }
.ds-previews { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; padding: 0 20px 16px; }
.ds-previews figure { margin: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--panel-2); }
.ds-previews img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--panel-2); }
.ds-previews figcaption { font-size: 11.5px; color: var(--ink-3); padding: 5px 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-versions { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.ds-versions a { display: flex; flex-direction: column; gap: 1px; padding: 8px 10px; border-radius: 9px; border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.ds-versions li.on a { border-color: var(--accent); background: var(--accent-soft); }
.ds-head pre { max-height: 160px; overflow: auto; margin: 6px 0 0; white-space: pre-wrap; }
.pager { display: flex; gap: 10px; align-items: center; justify-content: center; }
.brand-mark-img { width: 28px; height: 28px; object-fit: contain; display: block; border-radius: 6px; }
.shell.nav-min .brand-min { place-items: center; }
.folder-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.folder-card { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--ink); text-decoration: none; }
.folder-card:hover { border-color: var(--accent); text-decoration: none; }
.folder-ico { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.folder-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.folder-txt b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.folder-trail { font-size: 14px; margin-bottom: 14px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.fold-row { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); }
.fold-row svg { color: var(--accent); }

/* ---------- EsaSim library ---------- */
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.lib-card { display: flex; flex-direction: column; gap: 6px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); color: var(--ink); text-decoration: none; }
.lib-card:hover { border-color: var(--accent); text-decoration: none; }
.lib-icons { display: flex; gap: 6px; margin-bottom: 4px; }
.lib-icons i { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }
.lib-icons svg { width: 16px; height: 16px; }
.lib-meta { display: flex; flex-wrap: wrap; gap: 2px 12px; color: var(--ink-2); margin-top: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--panel); color: var(--ink-2); font-size: 13px; text-decoration: none; }
.chip svg { width: 14px; height: 14px; }
.chip:hover { color: var(--ink); text-decoration: none; border-color: var(--ink-3); }
.chip.on { background: var(--ink); color: var(--panel); border-color: var(--ink); }
.chip.on .muted { color: inherit; opacity: .7; }
.lib-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.lib-item { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); overflow: hidden; min-width: 0; }
.lib-prev { position: relative; aspect-ratio: 4 / 3; background: var(--panel-2); display: grid; place-items: center; overflow: hidden; border-bottom: 1px solid var(--line); }
.lib-prev img, .lib-prev video { width: 100%; height: 100%; object-fit: cover; display: block; background: #000; }
.lib-prev a { display: block; width: 100%; height: 100%; }
.lib-head { align-self: stretch; justify-self: stretch; margin: 0; padding: 10px 12px; font-size: 11px; line-height: 1.45; color: var(--ink-2); overflow: hidden; white-space: pre; font-family: var(--mono, ui-monospace, monospace); }
.lib-big { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--ink-3); font-size: 12px; font-weight: 650; letter-spacing: .04em; }
.lib-big svg { width: 44px; height: 44px; stroke-width: 1.4; }
.lib-3d { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); display: inline-flex; gap: 6px; align-items: center; }
.lib-3d svg { width: 14px; height: 14px; }
.lib-info { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px 4px; min-width: 0; }
.lib-info b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lib-act { padding: 6px 12px 12px; margin-top: auto; }
.lib-act .btn svg { width: 14px; height: 14px; margin-right: 4px; vertical-align: -2px; }
.lib-dlg { width: min(1000px, calc(100vw - 32px)); height: min(720px, calc(100vh - 48px)); padding: 0; border: 1px solid var(--line-2); border-radius: 14px; background: var(--panel); color: var(--ink); overflow: hidden; }
.lib-dlg[open] { display: flex; flex-direction: column; }
.lib-dlg::backdrop { background: rgba(10, 14, 22, .55); }
.lib-dlg-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.lib-dlg-b { flex: 1; min-height: 0; }
.lib-dlg-b iframe { width: 100%; height: 100%; border: 0; display: block; }
.lib-thumb img { width: 56px; height: 42px; object-fit: cover; border-radius: 6px; display: block; }
.lib-item-form { display: flex; flex-direction: column; gap: 4px; min-width: 220px; }
.lib-item-form input { padding: 5px 8px; font-size: 13px; }
.lib-up-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.lib-up-list li { display: grid; grid-template-columns: minmax(0, 1fr) 160px minmax(0, 1fr); gap: 10px; align-items: center; font-size: 13px; }
.lib-up-list .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-up-list .bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.lib-up-list .bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .3s; }
.lib-up-list li.ok .bar i { background: var(--good); }
.lib-up-list li.err .st { color: var(--bad); }
@media (max-width: 640px) { .lib-up-list li { grid-template-columns: 1fr; gap: 4px; } .lib-items { grid-template-columns: 1fr 1fr; } }
.lib-up-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.lib-sort { width: 72px; }
.lib-acts { white-space: nowrap; }
.lib-acts form.inline { display: inline; }

/* Workspace / Platform admin switch, in the top bar next to the account menu (platform staff only) */
.userbar .mode-switch { display: inline-flex; grid-template-columns: none; gap: 2px; padding: 2px; margin: 0; border-radius: 9px; background: var(--panel); border: 1px solid var(--line-2); }
.userbar .mode-switch a { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 7px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.userbar .mode-switch a:hover { color: var(--ink); background: var(--panel-2); }
.userbar .mode-switch a.on { background: var(--ink); color: var(--panel); }
.userbar .mode-switch svg.ni { width: 14px; height: 14px; }
@media (max-width: 640px) { .userbar .mode-switch .nl { display: none; } .userbar .mode-switch a { padding: 5px 8px; } }

/* The open project, under Projects in the menu, until it is closed */
.nav-sub { display: flex; align-items: center; margin: 1px 0 2px 18px; border-radius: 7px; }
.nav-sub a { flex: 1; min-width: 0; padding: 5px 8px; font-size: 13px; color: var(--side-ink-2); gap: 8px; }
.nav-sub.on a { color: var(--on-accent); font-weight: 600; }
.nav-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--night-accent); flex: none; }
/* an open project with a run going: its dot blinks green, so the menu tells at a glance which projects are running */
.nav-sub.run .nav-dot { background: #2fd27a; box-shadow: 0 0 0 0 rgba(47, 210, 122, .7); animation: nav-run 1.1s ease-in-out infinite; }
@keyframes nav-run { 0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(47, 210, 122, .65); } 50% { opacity: .2; box-shadow: 0 0 0 4px rgba(47, 210, 122, 0); } }
@media (prefers-reduced-motion: reduce) { .nav-sub.run .nav-dot { animation-duration: 2.4s; } }
.nav-sub form { margin: 0; }
.nav-close { all: unset; cursor: pointer; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 6px; color: var(--side-ink-2); font-size: 16px; line-height: 1; margin-right: 4px; }
.nav-close:hover, .nav-close:focus-visible { background: var(--side-active); color: var(--on-accent); }
.shell.nav-min .nav-sub { margin: 1px 0 2px; justify-content: center; }
.shell.nav-min .nav-sub a { justify-content: center; padding: 6px 0; }
.shell.nav-min .nav-sub .nl, .shell.nav-min .nav-sub form { display: none; }

/* Bars never show scrollbars: tab rows scroll sideways by touch, wheel or trackpad, and never vertically
   (on Windows with display scaling, a 1px rounding used to show a vertical scrollbar). */
.page-tabs { overflow-y: hidden; scrollbar-width: none; }
.page-tabs::-webkit-scrollbar { display: none; }
.tabs { overflow: visible; flex-wrap: wrap; row-gap: 2px; }

/* Worker page: install hints, sharing the accelerators, job-file space */
.hints-box { border: 1px solid var(--line); border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 8px; padding: 12px 16px; }
.hints-box p { margin: 0; }
.hints-box ul { margin: 6px 0 6px 18px; padding: 0; }
.hints-box li { margin: 2px 0; }
.accent-text { color: var(--accent); font-weight: 500; }
.gpu-groups-pick { display: none; margin-top: 10px; gap: 8px 16px; flex-wrap: wrap; }
.gpu-share:has(input[value="groups"]:checked) .gpu-groups-pick { display: flex; }
.gpu-groups-pick .hint { flex-basis: 100%; }
.gg-pick { display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.gg-pick select { width: auto; min-width: 0; padding: 4px 8px; }
.data td.nowrap { white-space: nowrap; }
.narrow-col { max-width: 720px; }
.toolbar select.w-auto { width: auto; min-width: 180px; }
.blk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.blk-card { display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--panel); }
.blk-code { max-height: 560px; overflow: auto; margin: 0; counter-reset: ln; font-size: 12.5px; line-height: 1.55; }
.blk-code .l { display: block; white-space: pre; }
.blk-code .l::before { counter-increment: ln; content: counter(ln); display: inline-block; width: 3.2em; margin-right: 1em; text-align: right; color: var(--ink-3); user-select: none; }
.blk-code .l.c { color: var(--ink-3); }
form.inline { display: inline; margin: 0; }
.btn-link { border: 0; background: none; padding: 0; color: var(--accent); font: inherit; cursor: pointer; text-decoration: underline; }
table.data.compact td, table.data.compact th { padding-top: 6px; padding-bottom: 6px; }
.field label.check { display: flex; font-weight: 400; margin: 8px 0 0; }
.vh-dlg { border: 1px solid var(--line-2); border-radius: 14px; padding: 20px; width: min(520px, calc(100vw - 32px)); background: var(--panel); color: var(--ink); box-shadow: var(--shadow-lg); }
.vh-dlg::backdrop { background: rgba(8, 12, 20, .55); }
.vh-dlg h2 { margin: 0; font-size: 18px; } .vh-dlg h3 { margin: 16px 0 8px; font-size: 14px; }
.vh-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -4px -6px 12px 0; }
.vh-x { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--ink-2); font-size: 22px; line-height: 1; cursor: pointer; }
.vh-x:hover { background: var(--panel-2); color: var(--ink); }
.vh-x:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.vh-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.vh-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.vh-row select { flex: 1; min-width: 200px; width: auto; } .vh-row input { width: 160px; }
.vh-prev { display: block; max-width: 100%; max-height: 240px; margin: 0 auto 12px; border-radius: 8px; background: #000; }
.btns form.inline { display: inline-flex; margin: 0; }
#gh-form [hidden] { display: none !important; }

/* Save to GitHub: the step-by-step window */
dialog.gh-log { width: min(620px, calc(100vw - 32px)); padding: 20px 22px; }
dialog.gh-log h2 { margin: 0 0 14px; font-size: 1.1rem; text-align: center; }
.gh-mark { width: 56px; height: 56px; margin: 2px auto 12px; border-radius: 50%; display: grid; place-items: center; background: var(--panel-2); border: 1px solid var(--line); color: var(--ink); transition: color .2s, background .2s, border-color .2s; }
.gh-mark svg { display: block; }
dialog.gh-log[data-state=busy] .gh-mark { animation: gh-pulse 1.6s ease-in-out infinite; }
dialog.gh-log[data-state=ok] .gh-mark { color: var(--good); border-color: currentColor; }
dialog.gh-log[data-state=error] .gh-mark { color: var(--bad); border-color: currentColor; }
dialog.gh-log[data-state=warn] .gh-mark { color: var(--warn); border-color: currentColor; }
.gh-status.gh-warn { color: var(--warn); font-weight: 600; }
@keyframes gh-pulse { 50% { box-shadow: 0 0 0 6px var(--accent-soft); } }
@media (prefers-reduced-motion: reduce) { dialog.gh-log[data-state=busy] .gh-mark { animation: none; } }
.gh-steps { list-style: none; margin: 0; padding: 10px 12px; max-height: 50vh; overflow: auto; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; font-size: .86rem; display: flex; flex-direction: column; gap: 5px; min-height: 64px; }
.gh-steps li { display: flex; gap: 10px; align-items: baseline; line-height: 1.4; }
.gh-steps .gh-t { flex: none; width: 3.6em; text-align: right; font-family: var(--mono); font-size: .78rem; color: var(--ink-3); }
.gh-steps .gh-x { overflow-wrap: anywhere; color: var(--ink-2); }
.gh-steps .gh-ok .gh-x { color: var(--good); }
.gh-steps .gh-warn .gh-x { color: var(--warn); }
.gh-steps .gh-error .gh-x { color: var(--bad); font-weight: 600; }
.gh-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.gh-status { display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--ink-2); flex: 1 1 240px; }
.gh-status.gh-ok { color: var(--good); font-weight: 600; }
.gh-status.gh-error { color: var(--bad); font-weight: 600; }
.gh-foot .btns { margin: 0; }
dialog.gh-log [hidden] { display: none !important; }

/* the version at the foot of the menu (expanded menu only) */
.side-foot { margin-top: auto; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding-top: 14px; }
.shell.nav-min .side-foot { display: none; }
.side-plan { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 8px; font-size: 11.5px; color: var(--side-ink-2); text-decoration: none; }
a.side-plan:hover { background: color-mix(in srgb, var(--on-accent, #fff) 8%, transparent); color: var(--on-accent, #fff); }
.side-plan .plan-badge { margin-left: 0; background: transparent !important; }
.side-plan .plan-badge.plan-free { color: var(--side-ink-2) !important; border-color: color-mix(in srgb, var(--side-ink-2) 50%, transparent); }
.side-plan .plan-badge.plan-pro { color: #8fb0ff !important; border-color: color-mix(in srgb, #8fb0ff 55%, transparent); }
.side-plan .plan-badge.plan-enterprise { color: #c4a5ff !important; border-color: color-mix(in srgb, #c4a5ff 55%, transparent); }
.side-ver { padding: 6px 8px 2px; font-size: 11.5px; color: var(--side-ink-2); text-decoration: none; letter-spacing: .02em; white-space: nowrap; opacity: .75; }
.side-ver:hover { color: var(--on-accent); opacity: 1; }
.shell.nav-min .side-ver { display: none; }
.gh-repo { overflow-wrap: anywhere; }
/* a project's readme (its first page) */
.readme-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; max-width: 1300px; margin: 0 auto; }
@media (max-width: 1180px) { .readme-layout { grid-template-columns: minmax(0, 1fr) 260px; } }
@media (max-width: 960px) { .readme-layout { grid-template-columns: 1fr; } .readme-side { order: -1; position: static; } }
.readme { padding: 36px 48px 40px; line-height: 1.7; font-size: 15.5px; overflow: hidden; min-width: 0; }
@media (max-width: 640px) { .readme { padding: 22px 20px 26px; } }
.readme > :first-child { margin-top: 0; }
/* the project's cover, edge to edge on top of the readme (as on GitHub) */
.readme .readme-cover { display: block; width: calc(100% + 96px); max-width: none; height: auto; aspect-ratio: 5 / 2; object-fit: cover; margin: -36px -48px 32px; border-radius: 0; }
@media (max-width: 640px) { .readme .readme-cover { width: calc(100% + 40px); margin: -22px -20px 22px; } }
/* the side: what the project is made of */
.readme-side .card { margin-bottom: 0; }
.readme-side h3, .readme-side h4 { font-size: 15px; }
.readme-flows { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; counter-reset: rf; }
.readme-flows li { padding: 12px 0; border-top: 1px solid var(--line); display: grid; gap: 2px; }
.readme-flows li:first-child { border-top: 0; padding-top: 2px; }
.readme-flows li:last-child { padding-bottom: 0; }
.readme-flows li b { font-size: 14px; line-height: 1.35; }
.readme-flows li .muted { font-size: 12px; }
.readme-flows li p { margin: 4px 0 0; font-size: 13px; line-height: 1.5; color: var(--ink-2); }
.readme-blocks { list-style: none; margin: 0; padding: 0; font-size: 13px; display: grid; gap: 6px; }
.readme h2 { font-size: 26px; margin: 0 0 14px; } .readme h3 { font-size: 19px; margin: 28px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line); } .readme h4 { font-size: 16px; margin: 22px 0 8px; } .readme h5, .readme h6 { font-size: 14px; margin: 18px 0 6px; }
.readme p, .readme ul, .readme ol, .readme blockquote, .readme table, .readme pre { margin: 0 0 14px; }
.readme ul, .readme ol { padding-left: 22px; } .readme li { margin: 4px 0; }
.readme li.task { list-style: none; margin-left: -22px; display: flex; gap: 8px; align-items: baseline; }
.readme li.task .tick { width: 14px; height: 14px; border: 1.5px solid var(--line-2); border-radius: 4px; flex: none; transform: translateY(2px); }
.readme li.task .tick.on { background: var(--accent); border-color: var(--accent); }
.readme code { background: var(--panel-2); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; font-size: .88em; }
.readme pre.code { padding: 12px 14px; overflow-x: auto; font-size: 13px; }
.readme blockquote { border-left: 3px solid var(--accent); padding: 4px 14px; color: var(--ink-2); background: var(--panel-2); border-radius: 0 8px 8px 0; }
.readme blockquote p { margin: 0; }
.readme table { border-collapse: collapse; display: block; overflow-x: auto; font-size: 14px; }
.readme th, .readme td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; vertical-align: top; } .readme th { background: var(--panel-2); }
.readme img { max-width: 100%; height: auto; border-radius: 8px; vertical-align: middle; }
/* GitHub-style top of a readme: <div align="center"> … </div>, and shields.io badges drawn here */
.readme .md-center { text-align: center; } .readme .md-right { text-align: right; }
.readme .md-center > p > img:only-child { display: block; margin: 0 auto; }
.readme .md-center h2 { font-size: 30px; margin: 10px 0 6px; } .readme .md-center h3 { border-bottom: 0; }
.readme .md-center ul, .readme .md-center ol { display: inline-block; text-align: left; }
.readme .md-missing { display: inline-block; padding: 1px 8px; border: 1px dashed var(--line-2); border-radius: 6px; color: var(--ink-3); font-size: 12px; }
.shield { display: inline-flex; vertical-align: middle; margin: 2px 1px; border-radius: 4px; overflow: hidden; font: 600 11px/1 system-ui, -apple-system, "Segoe UI", sans-serif; letter-spacing: .01em; }
.shield > span { padding: 4px 7px; color: #fff; white-space: nowrap; }
.shield .sh-l { background: #555; }
.sh-m.sh-green { background: #2e9e44; } .sh-m.sh-blue { background: #1f6fbf; } .sh-m.sh-orange { background: #d9731b; } .sh-m.sh-red { background: #c9372c; }
.sh-m.sh-yellow { background: #b59200; } .sh-m.sh-grey { background: #8a8f98; } .sh-m.sh-purple { background: #7048c4; } .sh-m.sh-teal { background: #138a8a; } .sh-m.sh-dark { background: #24292f; }
a:has(> .shield) { text-decoration: none; }
/* Readme pictures (Data tab) */
.pics-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.pic-card { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--panel); display: flex; flex-direction: column; }
.pic-card .pic-thumb { height: 110px; display: flex; align-items: center; justify-content: center; background: var(--panel-2); }
.pic-card .pic-thumb img { max-width: 100%; max-height: 110px; object-fit: contain; }
.pic-card .pic-meta { padding: 8px 10px; display: grid; gap: 4px; font-size: 12px; min-width: 0; }
.pic-card .pic-meta b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pic-card code { font-size: 11px; overflow-wrap: anywhere; user-select: all; }
.pic-card form { margin: 0; }
.readme hr { border: 0; border-top: 1px solid var(--line); margin: 22px 0; }
.readme-side { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 14px; align-self: start; }
.readme-side > * { margin: 0; }
.readme-side .btn { justify-content: center; }
.readme-side > .btn { width: 100%; }
.readme-toc { padding: 14px 16px; } .readme-toc h4 { margin: 0 0 8px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
.readme-toc ul { list-style: none; margin: 0; padding: 0; font-size: 13px; } .readme-toc li { margin: 5px 0; } .readme-toc li.lv3 { padding-left: 12px; }
.readme-toc a { color: var(--ink-2); } .readme-toc a:hover { color: var(--accent); }
textarea.readme-edit { font-family: var(--mono, ui-monospace, monospace); font-size: 13px; line-height: 1.5; min-height: 320px; }

/* ---------- Marketplace ---------- */
.mk-intro { max-width: 780px; }
.mk-kinds { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-bottom: 8px; }
.mk-kind { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); color: var(--ink); text-decoration: none; }
.mk-kind:hover { border-color: var(--accent); text-decoration: none; }
.mk-kind .ni { width: 26px; height: 26px; color: var(--accent); flex: none; margin-top: 2px; }
.mk-kind b { display: block; font-size: 15px; }
.mk-row-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 26px 0 10px; }
.mk-row-head h2 { margin: 0; font-size: 18px; }
.mk-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.mk-filters input[type=search] { flex: 1 1 260px; min-width: 0; }
.mk-filters select { width: auto; }
.mk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.mk-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); color: var(--ink); text-decoration: none; overflow: hidden; }
.mk-card:hover { border-color: var(--accent); text-decoration: none; }
.mk-cover { aspect-ratio: 16 / 9; background: var(--panel-2); display: grid; place-items: center; color: var(--ink-3); overflow: hidden; }
.mk-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mk-cover .ni { width: 40px; height: 40px; opacity: .45; }
.mk-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.mk-body b { font-size: 15px; line-height: 1.3; }
.mk-body .small { line-height: 1.4; }
.mk-meta { display: flex; gap: 8px; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 8px; font-size: 12px; color: var(--ink-3); }
.mk-price { font-weight: 700; color: var(--ink); }
.mk-price.free { color: var(--good); }
.mk-stars { color: #e9a21b; white-space: nowrap; }
.mk-show { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 22px; align-items: start; }
@media (max-width: 960px) { .mk-show { grid-template-columns: 1fr; } }
.mk-hero { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 14px; border: 1px solid var(--line); display: block; margin-bottom: 18px; background: var(--panel-2); }
.mk-hero.empty-cover { display: grid; place-items: center; color: var(--ink-3); }
.mk-hero.empty-cover .ni { width: 56px; height: 56px; opacity: .4; }
.mk-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.mk-big-price { font-size: 28px; font-weight: 700; line-height: 1.1; }
.mk-side dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 13px; margin: 14px 0 0; }
.mk-side dt { color: var(--ink-3); }
.mk-side dd { margin: 0; overflow-wrap: anywhere; }
.mk-side .btn.wide { width: 100%; justify-content: center; }
.mk-code { max-height: 460px; overflow: auto; font-size: 12px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px; white-space: pre; }
.mk-thumb { width: 72px; height: 44px; object-fit: cover; border-radius: 6px; display: block; background: var(--panel-2); }
.mk-rating { border-top: 1px solid var(--line); padding: 12px 0; }
.mk-rating:first-of-type { border-top: 0; }
.mk-rating .reply { margin: 8px 0 0 14px; padding-left: 10px; border-left: 2px solid var(--line); }
.mk-star-input { display: inline-flex; flex-direction: row-reverse; gap: 2px; }
.mk-star-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.mk-star-input label { font-size: 24px; line-height: 1; cursor: pointer; color: var(--line); }
.mk-star-input input:checked ~ label, .mk-star-input label:hover, .mk-star-input label:hover ~ label { color: #e9a21b; }
.mk-star-input input:focus-visible + label { outline: 2px solid var(--accent); border-radius: 4px; }
.mk-steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.mk-steps li { counter-increment: s; display: flex; gap: 10px; align-items: baseline; }
.mk-steps li::before { content: counter(s); flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 12px; display: grid; place-items: center; }
.mk-stat { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.mk-stat div { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--panel); }
.mk-stat b { display: block; font-size: 22px; }
.mk-lead { font-size: 16px; }
.mk-stars .off { color: var(--line); }
.mk-narrow { max-width: 760px; }
.mk-files-actions { white-space: nowrap; }
.pre-line { white-space: pre-line; }
form.stack.compact > * + * { margin-top: 6px; }
.mk-side details summary, .actions details summary { cursor: pointer; }
.actions details form input { min-width: 180px; }
.opt-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.opt-tile { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer; background: var(--panel); }
.opt-tile:hover { border-color: var(--line-2); }
.opt-tile:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.mail-cols > div > * + * { margin-top: 14px; }
.mail-cols h3 { margin: 6px 0 2px; }
@media (max-width: 1100px) { .opt-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .opt-tiles { grid-template-columns: 1fr; } }
.text-warn { color: var(--warn); }
.access-list { display: grid; gap: 4px; padding-left: 26px; }

/* a Save to <long repository name> button wraps inside its card instead of running out of it */
#github .btns .btn { max-width: 100%; white-space: normal; overflow-wrap: anywhere; text-align: left; height: auto; min-height: 36px; }

/* ---------- working together on GitHub: branches, pull requests, merges, history ---------- */
.center { text-align: center; }
dialog.modal.narrow { width: min(520px, calc(100vw - 32px)); }
dialog.modal .gh-mark { margin-top: 0; }
/* the branch switcher in the project's header */
.br-menu { position: relative; display: inline-block; }
.br-menu > summary { list-style: none; cursor: pointer; max-width: 220px; }
.br-menu > summary::-webkit-details-marker { display: none; }
.br-menu .br-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 140px; }
.br-menu .br-chev { width: 14px; height: 14px; transform: rotate(90deg); opacity: .6; transition: transform .15s; }
.br-menu[open] .br-chev { transform: rotate(-90deg); }
.br-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; width: 320px; max-width: calc(100vw - 32px); background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 8px; display: flex; flex-direction: column; gap: 2px; text-align: left; }
.br-head { margin: 4px 8px 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
.br-item { display: flex; gap: 10px; align-items: flex-start; padding: 8px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.br-item:hover { background: var(--panel-2); text-decoration: none; }
.br-item.on { background: var(--accent-soft); }
.br-item .ni { flex: none; margin-top: 2px; color: var(--ink-3); }
.br-item > span { display: flex; flex-direction: column; min-width: 0; }
.br-item b { font-weight: 600; overflow-wrap: anywhere; }
.br-foot { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; border-radius: 0 0 8px 8px; }
.br-new { border-top: 1px solid var(--line); margin-top: 6px; padding: 10px 8px 4px; display: flex; flex-direction: column; gap: 6px; }
.br-row { display: flex; gap: 6px; }
.br-row input { flex: 1; min-width: 0; }
/* a branch or a fork, above the tabs */
.tw-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 10px 14px; margin-bottom: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); font-size: 14px; }
.tw-bar.flash { border-color: transparent; }
.tw-bar > .ni, .tw-what > .ni { flex: none; }
.tw-what { display: inline-flex; gap: 8px; align-items: center; flex: 1 1 280px; min-width: 0; }
.tw-what > span { overflow-wrap: anywhere; }
.tw-bar .btns { margin: 0; flex-wrap: wrap; }
.tw-pr { display: inline-flex; gap: 6px; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; text-decoration: none; border: 1px solid var(--line); color: var(--ink); }
.tw-pr:hover { text-decoration: none; background: var(--panel-2); }
.tw-pr .ni { width: 15px; height: 15px; }
.tw-open { color: var(--good); border-color: color-mix(in srgb, var(--good) 40%, var(--line)); }
.tw-merged { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.tw-closed { color: var(--ink-3); }
.tw-pr .tw-ok { color: var(--good); font-weight: 500; }
.tw-pr .tw-no { color: var(--warn); font-weight: 500; }
.tw-pr .muted { font-weight: 500; }
.tw-note { margin: -10px 0 16px 4px; }
.sync-other { margin: -10px 0 16px 4px; color: var(--ink-3); }
.sync-other .btns { margin-top: 8px; }
/* importing: pull, fork or copy */
.imode { display: grid; gap: 8px; border: 0; padding: 0; }
.imode legend { font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.imode-opt { display: flex; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.imode-opt > span { display: flex; flex-direction: column; gap: 3px; }
.imode-opt b { display: inline-flex; gap: 6px; align-items: center; }
.imode-opt input { margin-top: 3px; width: auto; flex: none; }
.imode-opt:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 25%, transparent); }
/* history */
.hist-list { list-style: none; margin: 0; padding: 0; position: relative; }
.hist-list::before { content: ""; position: absolute; left: 13px; top: 14px; bottom: 14px; width: 2px; background: var(--line); }
.hist-list li { display: flex; gap: 12px; align-items: center; padding: 8px 0; position: relative; }
.hist-dot { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--panel); border: 1px solid var(--line); color: var(--ink-3); z-index: 1; }
.hist-dot .ni { width: 15px; height: 15px; }
.hist-merge .hist-dot { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.hist-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; color: var(--ink); text-decoration: none; padding: 6px 10px; border-radius: 8px; }
.hist-main:hover { background: var(--panel-2); text-decoration: none; }
.hist-main b { font-weight: 600; overflow-wrap: anywhere; }
.hist-main .small { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.hist-av { border-radius: 50%; vertical-align: -4px; }
.hist-sha { font-size: 12px; color: var(--ink-3); flex: none; }
/* one commit */
.commit-top { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.commit-top > div:first-child { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.commit-top .btns { margin: 0; }
.commit-body { margin: 6px 0 0; white-space: pre-wrap; font: inherit; font-size: 14px; color: var(--ink-2); background: var(--panel-2); border-radius: 8px; padding: 10px 12px; }
.badge .ni { width: 13px; height: 13px; vertical-align: -2px; margin-right: 3px; }
.chg-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.chg-added .chg-badge { background: var(--good-soft); color: var(--good); border-color: transparent; }
.chg-removed .chg-badge { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.chg-changed .chg-badge { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.chg-lines { margin: 0; padding-left: 20px; font-size: 14px; display: grid; gap: 3px; }
.gdiff-wrap { overflow: auto; max-height: 520px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); padding: 8px; }
.gdiff { display: block; max-width: 100%; height: auto; margin: 0 auto; font-family: var(--font, inherit); }
.gdiff .gd-node rect { fill: var(--panel); stroke: var(--line); stroke-width: 1.5; }
.gdiff .gd-t { font-size: 15px; font-weight: 600; fill: var(--ink); }
.gdiff .gd-s { font-size: 12px; fill: var(--ink-3); }
.gdiff .gd-add rect { fill: var(--good-soft); stroke: var(--good); stroke-width: 2.5; }
.gdiff .gd-del rect { fill: var(--bad-soft); stroke: var(--bad); stroke-width: 2.5; stroke-dasharray: 7 5; }
.gdiff .gd-del .gd-t { text-decoration: line-through; fill: var(--bad); }
.gdiff .gd-chg rect { fill: var(--warn-soft); stroke: var(--warn); stroke-width: 2.5; }
.gdiff .gd-same { opacity: .7; }
.gdiff .gd-edge { fill: none; stroke: var(--ink-3); stroke-width: 2; opacity: .55; }
.gdiff .gd-edge.gd-add { stroke: var(--good); opacity: 1; stroke-width: 2.5; }
.gdiff .gd-edge.gd-del { stroke: var(--bad); opacity: 1; stroke-dasharray: 6 5; }
.gdiff .gd-arrow { fill: var(--ink-3); }
.gdiff-key { display: flex; gap: 14px; flex-wrap: wrap; }
.gdiff-key span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; border: 2px solid; }
.gdiff-key .k-add::before { border-color: var(--good); background: var(--good-soft); }
.gdiff-key .k-chg::before { border-color: var(--warn); background: var(--warn-soft); }
.gdiff-key .k-del::before { border-color: var(--bad); background: var(--bad-soft); border-style: dashed; }
.gdiff-key .k-same::before { border-color: var(--line); background: var(--panel); }
.tdiff { font-family: var(--mono); font-size: 12.5px; line-height: 1.55; border: 1px solid var(--line); border-radius: 10px; overflow: auto; max-height: 520px; }
.tdl { display: flex; min-width: max-content; }
.tdm { flex: none; width: 26px; text-align: center; color: var(--ink-3); user-select: none; }
.tdx { white-space: pre; padding-right: 12px; }
.tdl-add { background: var(--good-soft); } .tdl-add .tdm { color: var(--good); }
.tdl-del { background: var(--bad-soft); } .tdl-del .tdm { color: var(--bad); }
.tdl-gap { background: var(--panel-2); color: var(--ink-3); }
/* the merge: what to keep */
.merge-head { align-items: center; }
.merge-head p { max-width: 640px; margin-left: auto; margin-right: auto; }
.clash { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.clash legend { font-weight: 600; padding: 0 4px; font-size: 14px; }
.clash code { overflow-wrap: anywhere; }
.clash pre, .clash-was { margin: 4px 0 0; font-family: var(--mono); font-size: 12.5px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 240px; overflow: auto; background: var(--panel-2); border-radius: 6px; padding: 8px 10px; }
.clash-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; }
.clash-opt { display: flex; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; min-width: 0; }
.clash-opt > span { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.clash-opt input { margin-top: 3px; }
.clash-opt:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 25%, transparent); }
.merge-foot { justify-content: center; }
@media (max-width: 640px) { .br-pop { position: fixed; left: 16px; right: 16px; top: 120px; width: auto; } }
/* the header keeps room for every tab: Commit shows its word only on wide screens */
.br-commit .br-commit-l { display: none; }
@media (min-width: 1600px) { .br-commit .br-commit-l { display: inline; } }
/* a project on GitHub has one more tab and the branch menu: tighter tabs, and on their own row below 1366 px */
@media (max-width: 1700px) { .topbar-inner:has(.br-menu) .page-tabs a, .topbar-inner:has(.gh-save) .page-tabs a { padding: 0 9px; } }
@media (max-width: 1365px) {
  .topbar-inner:has(.br-menu) { flex-wrap: wrap; row-gap: 0; }
  .topbar-inner:has(.br-menu) .tb-title { max-width: none; flex: 1; min-height: 44px; }
  .topbar-inner:has(.br-menu) .page-tabs { order: 3; flex-basis: 100%; min-height: 38px; }
}
.field.imode .imode-opt { display: flex; align-items: flex-start; font-weight: 400; margin: 0; }
.field.imode .imode-opt input { height: auto; margin-top: 4px; }
.field.imode .imode-opt b { font-weight: 600; }

/* ---- projects live on GitHub (update 88) ---- */
.need-gh { max-width: 640px; margin: 0 auto; text-align: center; align-items: center; padding: 28px 24px; }
.need-gh .btns { justify-content: center; }
.home-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.home-bar > span { flex: 1 1 320px; }
.home-bar svg { width: 16px; height: 16px; vertical-align: -3px; margin-right: 4px; }
.pub .card-head { align-items: flex-start; }
.pub-list { list-style: none; margin: 0; padding: 0; }
.pub-item { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.pub-item:first-child { border-top: 0; padding-top: 4px; }
.pub-v { flex: 0 0 auto; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--panel-2); border: 1px solid var(--line); }
.pub-v svg { width: 16px; height: 16px; }
.pub-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pub-notes { color: var(--ink-2, inherit); }
.pub-item > .btns { flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 720px) {
  .pub .card-head { flex-direction: column; align-items: stretch; }
  .pub-item { flex-wrap: wrap; }
  .pub-main { flex: 1 1 calc(100% - 44px); }
  .pub-item > .btns { width: 100%; justify-content: flex-start; padding-left: 44px; }
}
.need-gh .gh-mark svg, #pub-dlg .gh-mark svg { width: 26px; height: 26px; }

/* ---- API endpoints (update 90) ---- */
.endpoint.is-off { opacity: .75; }
.endpoint .code, .ep-code { white-space: pre-wrap; word-break: break-all; margin: 0; }
.ep-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 20px; align-items: start; }
.ep-grid .label { display: block; margin-bottom: 6px; }
.key-once { display: grid; gap: 10px; }
.ep-pick { align-items: end; }
.ep-pick .field { flex: 1 1 280px; } .ep-pick .ep-go { flex: 0 0 auto; }
.ep-inputs input[type=text] { min-width: 150px; }
.ep-inputs input[type=checkbox] { width: auto; height: auto; }
.ep-now { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 900px) { .ep-grid { grid-template-columns: 1fr; } }
/* a project's header has eleven tabs: next to its GitHub buttons they get a row of their own on narrower screens */
@media (max-width: 1500px) {
  .topbar-inner:has(.page-tabs a:nth-child(11)) { flex-wrap: wrap; row-gap: 0; }
  .topbar-inner:has(.page-tabs a:nth-child(11)) .tb-title { max-width: none; flex: 1; min-height: 44px; }
  .topbar-inner:has(.page-tabs a:nth-child(11)) .page-tabs { order: 3; flex-basis: 100%; min-height: 38px; }
}
.endpoint .card-head .btns { flex-wrap: nowrap; flex: 0 0 auto; }
.endpoint .code, .ep-code { word-break: normal; overflow-wrap: anywhere; }
@media (max-width: 720px) { .endpoint .card-head { flex-direction: column; align-items: stretch; } .endpoint .card-head .btns { flex-wrap: wrap; } }

/* ---------- Setup after signing up (/app/welcome) ---------- */
.ob { display: grid; grid-template-columns: 250px minmax(0, 780px); gap: 40px; justify-content: center; padding: 8px 0 48px; }
.ob-rail { position: sticky; top: 24px; align-self: start; }
.ob-kicker { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin: 0 0 10px; }
.ob-steps { list-style: none; margin: 0 0 20px; padding: 0; position: relative; }
.ob-steps::before { content: ""; position: absolute; left: 15px; top: 18px; bottom: 18px; width: 2px; background: var(--line); }
.ob-step a { position: relative; display: flex; gap: 12px; align-items: center; padding: 10px 8px 10px 0; color: var(--ink); border-radius: 10px; }
.ob-step a:hover { text-decoration: none; }
.ob-step a:hover .ob-name b { color: var(--accent); }
.ob-dot { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700;
  background: var(--panel); border: 2px solid var(--line); color: var(--ink-3); position: relative; z-index: 1; }
.ob-dot svg { width: 16px; height: 16px; }
.ob-name { display: flex; flex-direction: column; line-height: 1.3; }
.ob-name b { font-size: 14px; }
.ob-name span { font-size: 12.5px; color: var(--ink-3); }
.ob-step.is-done .ob-dot { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.ob-step.is-here .ob-dot { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.ob-step.is-done.is-here .ob-dot { color: var(--on-accent); }
.ob-step.is-skipped .ob-name span { font-style: italic; }
.ob-leave { margin: 0; padding-left: 2px; }
.ob-card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 36px 40px; }
.ob-card h1 { font-size: 28px; letter-spacing: -0.02em; display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.ob-card h1 svg { width: 26px; height: 26px; }
.ob-lead { font-size: 16px; color: var(--ink-2, var(--ink)); max-width: 62ch; margin-bottom: 24px; }
.ob-hello h1 { font-size: 34px; }
.ob-overview { list-style: none; padding: 0; margin: 0 0 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ob-overview li { display: flex; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); }
.ob-overview b { display: block; margin-bottom: 2px; }
.ob-overview span:not(.ob-ic) { font-size: 13.5px; color: var(--ink-3); }
.ob-ic { flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.ob-ic svg { width: 18px; height: 18px; }
.ob-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 8px; }
.ob-actions.end { justify-content: flex-end; border-top: 1px solid var(--line); padding-top: 18px; margin-top: 24px; }
.ob-skip { color: var(--ink-3); font-size: 14px; }
.ob-skip:hover { color: var(--ink); }
.ob-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.ob-choice { position: relative; border: 1px solid var(--line); border-radius: 12px; padding: 20px; background: var(--panel); }
.ob-choice.is-best { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ob-choice h3 { font-size: 16px; margin-bottom: 6px; }
.ob-choice p { font-size: 14px; color: var(--ink-3); }
.ob-tag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 2px 8px; margin-bottom: 8px; }
.ob-tag.soft { color: var(--ink-3); background: var(--panel-2); }
.ob-layout-body .ob-tag { margin: 0 0 0 6px; vertical-align: 1px; }
.ob-guide { margin: 4px 0 12px; font-size: 14px; }
.ob-guide summary { cursor: pointer; color: var(--accent); font-weight: 600; }
.ob-howto { margin: 10px 0 8px; padding-left: 20px; }
.ob-howto li { margin-bottom: 8px; }
.ob-perms { margin-top: 6px; border-collapse: collapse; font-size: 13px; }
.ob-perms td { padding: 4px 10px 4px 0; vertical-align: top; }
.ob-perms td:first-child { font-weight: 600; white-space: nowrap; }
.ob-inline-form { display: flex; gap: 8px; }
.ob-inline-form input { flex: 1; min-width: 0; }
.ob-linked { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 14px; border-radius: 10px; background: var(--accent-soft); font-size: 14px; margin-bottom: 20px; }
.ob-linked svg { width: 16px; height: 16px; color: var(--accent); }
.ob-fs { border: 0; padding: 0; margin: 0; }
.ob-fs legend { font-weight: 650; font-size: 15px; margin-bottom: 10px; padding: 0; }
.ob-fs .check { margin-bottom: 10px; }
.ob-layouts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ob-layout { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 12px; padding: 16px; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.ob-layout:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ob-layout input { margin-top: 4px; accent-color: var(--accent); }
.ob-layout-body { display: block; font-size: 14px; }
.ob-layout-body > .muted { display: block; font-size: 13px; margin: 4px 0 10px; }
.ob-tree { margin: 0; padding: 10px 12px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--line); font: 12px/1.6 var(--mono); color: var(--ink-3); white-space: pre; overflow-x: auto; }
.ob-tree b { color: var(--ink); font-weight: 600; }
.ob-more summary { cursor: pointer; font-size: 14px; color: var(--ink-3); }
.ob-note { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--ink-3); margin: 0; }
.ob-note svg { flex: none; width: 16px; height: 16px; margin-top: 1px; }
.ob-ticks { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 6px; }
.ob-ticks li { padding-left: 24px; position: relative; font-size: 14.5px; }
.ob-ticks li::before { content: ""; position: absolute; left: 4px; top: 6px; width: 9px; height: 5px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
.ob-demos { margin-bottom: 16px; }
.ob-summary { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 8px; max-width: 420px; }
.ob-summary li { display: flex; align-items: center; gap: 12px; }
.ob-summary li b { flex: 1; }
.ob-summary .ob-dot { width: 26px; height: 26px; }
.ob-summary li.is-done .ob-dot { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.ob-remind { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; margin-bottom: 16px; border-radius: var(--radius);
  border: 1px solid var(--accent); background: var(--accent-soft); }
.ob-remind b { display: block; }
.ob-remind .muted { font-size: 13px; }
@media (max-width: 1000px) {
  .ob { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .ob-rail { position: static; }
  .ob-steps { display: flex; gap: 4px; overflow-x: auto; margin-bottom: 8px; }
  .ob-steps::before { display: none; }
  .ob-name span { display: none; }
  .ob-leave { display: none; }
}
@media (max-width: 700px) {
  .ob-card { padding: 24px 20px; }
  .ob-overview, .ob-choices, .ob-layouts { grid-template-columns: 1fr; }
}
.ob-leave .btn-link { text-align: left; text-decoration: none; color: var(--ink-3); }
.ob-leave .btn-link:hover { color: var(--ink); text-decoration: underline; }
.ob-layout, .ob-layout-body, .ob-choice { min-width: 0; }
.ob-layout-body { flex: 1; }

/* Copy icon on code and commands (assets/copy-code.js) */
.copy-wrap { position: relative; }
.copy-wrap > pre { padding-right: 46px; }
.copy-btn { position: absolute; top: 6px; right: 6px; display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border-radius: 7px; cursor: pointer;
  border: 1px solid var(--line); background: var(--panel); color: var(--ink-3); opacity: .75; transition: opacity .15s, color .15s, border-color .15s; }
.copy-wrap:hover .copy-btn, .copy-btn:focus-visible { opacity: 1; }
.copy-btn:hover { color: var(--accent); border-color: var(--accent); }
.copy-btn.done { color: var(--good); border-color: var(--good); opacity: 1; }
.install-item .copy-wrap > pre.code, .copy-wrap > pre.code { margin-top: 8px; }
.copy-wrap > pre.code ~ .copy-btn { top: 14px; }

/* Sign-up while EsaSim is invite only */
.auth-form .eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin: 0 0 8px; }
.auth-form textarea { width: 100%; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.auth-form .row { grid-template-columns: 1fr 1fr; }
@media (max-width: 560px) { .auth-form .row { grid-template-columns: 1fr; } }
.error-text { color: var(--bad); }

/* Avatars: a picture (GitHub) when there is one */
.avatar.has-img { background: var(--panel-2); overflow: hidden; }
.avatar.has-img img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }

/* Toasts: messages that slide in at the bottom right */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 300; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; pointer-events: none; max-width: min(420px, calc(100vw - 40px)); }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 16px; border-radius: 12px; background: var(--panel); color: var(--ink);
  border: 1px solid var(--line); border-left: 4px solid var(--accent); box-shadow: var(--shadow-lg); font-size: 14px; line-height: 1.4;
  animation: toast-in .35s cubic-bezier(.2, .9, .3, 1.2) both; }
.toast.success { border-left-color: var(--good); }
.toast.warn { border-left-color: var(--warn, #c98a12); }
.toast.error { border-left-color: var(--bad); }
.toast-msg { flex: 1; }
.toast .btn { flex: none; }
.toast-x { flex: none; border: 0; background: none; color: var(--ink-3); font-size: 20px; line-height: 1; cursor: pointer; padding: 0 4px; }
.toast-x:hover { color: var(--ink); }
.toast.out { animation: toast-out .25s ease-in both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(24px); } }
@media (prefers-reduced-motion: reduce) { .toast, .toast.out { animation: none; } }
.flash.demo-first { display: flex; align-items: center; gap: 16px; justify-content: space-between; }
.flash.demo-first .btn { flex: none; }
@media (max-width: 700px) { .flash.demo-first { flex-direction: column; align-items: flex-start; } }

/* The setup list (and a project's Hugging Face pop-up) */
.setup-pop { width: min(560px, calc(100vw - 32px)); border: 1px solid var(--line); border-radius: 16px; padding: 24px 26px 18px; background: var(--panel); color: var(--ink); box-shadow: var(--shadow-lg); }
.setup-pop::backdrop { background: rgb(8 10 18 / .55); }
.setup-pop[open] { animation: toast-in .3s cubic-bezier(.2, .9, .3, 1.1) both; }
.setup-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.setup-head h2 { font-size: 20px; margin: 0 0 4px; }
.setup-head p { margin: 0; font-size: 14px; }
.setup-group { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin: 16px 0 6px; }
.setup-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.setup-list li { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.setup-list li.is-needed { border-color: var(--accent); background: var(--accent-soft); }
.setup-list li.is-done { opacity: .75; }
.setup-mark { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; }
.setup-list li.is-needed .setup-mark { border-color: var(--accent); }
.setup-list li.is-done .setup-mark { background: var(--good); border-color: var(--good); color: #fff; }
.setup-mark svg { width: 13px; height: 13px; }
.setup-text { flex: 1; display: flex; flex-direction: column; font-size: 14px; line-height: 1.35; }
.setup-text span { color: var(--ink-3); font-size: 13px; }
.setup-list .btn { flex: none; }
.setup-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; }
.ob-group { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin: 14px 0 2px; }
.checklist .needed { color: var(--accent); font-weight: 600; margin-left: 6px; } .checklist li .muted { margin-left: 6px; }
.meter + .checklist { margin-top: 20px; }

/* ---------- The confirm dialog (EsaAsk in app.js), in place of the browser's own ---------- */
.btn.danger.solid { background: var(--bad); color: var(--panel); border-color: var(--bad); }
.btn.danger.solid:hover { background: color-mix(in srgb, var(--bad) 86%, #000); }
.ask-dlg { width: min(440px, calc(100vw - 32px)); border: 1px solid var(--line); border-radius: 16px; padding: 22px 22px 18px; background: var(--panel); color: var(--ink); box-shadow: var(--shadow-lg); }
.ask-dlg::backdrop { background: rgb(8 10 18 / .5); }
.ask-dlg[open] { animation: toast-in .25s cubic-bezier(.2, .9, .3, 1.1) both; }
.ask-body { display: flex; gap: 14px; align-items: flex-start; }
.ask-mark { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.ask-dlg.is-danger .ask-mark { color: var(--bad); background: var(--bad-soft); }
.ask-body h2 { margin: 2px 0 6px; font-size: 17px; line-height: 1.35; overflow-wrap: anywhere; }
.ask-body p { margin: 0; color: var(--ink-2); font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.ask-body p[hidden] { display: none; }
.ask-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
@media (max-width: 480px) { .ask-foot { flex-direction: column-reverse; } .ask-foot .btn { width: 100%; justify-content: center; } }

/* ---------- The red count next to Overview (unread messages, workers to update by hand) and the Messages card ---------- */
.nav a .nav-count { margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--bad); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; font-variant-numeric: tabular-nums; }
.nav a { position: relative; }
@media (min-width: 901px) { .shell.nav-min .nav a .nav-count { position: absolute; top: 3px; right: 6px; min-width: 16px; height: 16px; line-height: 16px; font-size: 10px; padding: 0 4px; box-shadow: 0 0 0 2px var(--side); } }
.msg-list { list-style: none; margin: 0; padding: 0; }
.msg-list > li { border-top: 1px solid var(--line); }
.msg-list > li:first-child { border-top: 0; }
.msg-list details > summary { list-style: none; cursor: pointer; display: flex; align-items: flex-start; gap: 10px; padding: 12px 0; }
.msg-list details > summary::-webkit-details-marker { display: none; }
.msg-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; background: transparent; }
.msg-list li.unread .msg-dot { background: var(--bad); }
.msg-list li.important .msg-title::after { content: "Important"; margin-left: 8px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--bad); }
.msg-title { font-weight: 600; } .msg-list li:not(.unread) .msg-title { font-weight: 500; color: var(--ink-2); }
.msg-meta { display: block; font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.msg-body { padding: 0 0 14px 18px; color: var(--ink-2); font-size: 14px; }
.msg-body > :first-child { margin-top: 0; } .msg-body > :last-child { margin-bottom: 0; }
.msg-list details[open] .msg-title { color: var(--ink); }
.upd-list { list-style: none; margin: 0; padding: 0; }
.upd-list li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line); }
.upd-list li:first-child { border-top: 0; padding-top: 4px; }
.upd-list .upd-ico { flex: none; color: var(--bad); margin-top: 2px; }
.upd-list .upd-ico.warn { color: var(--warn); }
.card.attention { border-color: color-mix(in srgb, var(--bad) 35%, var(--line)); }
.upd-notice .mt-8 { margin-top: 8px; }
.aud-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.aud-count { font-weight: 600; }
.text-bad { color: var(--bad); }
.ver-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ver-form { align-items: flex-end; gap: 12px; }
.ver-form .field { margin: 0; }
[data-announce-form] fieldset.field { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; }
[data-announce-form] fieldset legend { font-weight: 600; font-size: 13px; margin-bottom: 4px; padding: 0; }
.upd-list.compact li { padding: 8px 0; }
.upd-how { margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--line); color: var(--ink-2); }
.ver-form input { max-width: 220px; }

/* ---------- Admin › Billing: payment modes, the keys of each Stripe environment, products and prices ---------- */
.pay-modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.pay-mode { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; background: var(--panel); }
.pay-mode > span { display: flex; flex-direction: column; gap: 3px; font-size: 14px; }
.pay-mode .muted { font-size: 12.5px; }
.pay-mode input { margin-top: 3px; }
.pay-mode:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.pay-mode.live:has(input:checked) { border-color: var(--good); box-shadow: 0 0 0 1px var(--good); }
.pay-state { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.env-keys { gap: 16px; }
.env-box { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px 16px; margin: 0; display: grid; gap: 12px; min-width: 0; }
.env-box legend { font-weight: 700; padding: 0 6px; margin-left: -6px; }
.env-box.live legend { color: var(--good); }
.env-box .field { margin: 0; }
.price-table input.price-id { width: 100%; min-width: 200px; }
.price-table tr.plan-start td { border-top: 2px solid var(--line); }
.price-actions { padding: 16px 24px; display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; border-top: 1px solid var(--line); }
.price-env { display: inline-flex; gap: 8px; align-items: center; }
.text-good { color: var(--good); }
.nowrap { white-space: nowrap; }
.bill-x { padding: 0 24px; }

/* A project's Compute tab: every worker you may use (filters, tick to select) and your selection beside it */
.pk-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.pk-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pk-filters input[type=search], .pk-filters select { height: 36px; padding-top: 0; padding-bottom: 0; font-size: 14px; }
.pk-filters input[type=search] { flex: 1 1 220px; min-width: 0; width: auto; }
.pk-filters select { width: auto; flex: none; padding-left: 10px; }
.pk-tg { position: relative; display: inline-flex; cursor: pointer; }
.pk-tg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pk-tg span { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 99px; font-size: 13px; font-weight: 600; color: var(--ink-2); background: var(--panel); white-space: nowrap; }
.pk-tg span::before { content: ''; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--ink-3); }
.pk-tg input:checked + span { border-color: var(--accent); color: var(--ink); background: var(--accent-soft); }
.pk-tg input:checked + span::before { background: var(--accent); border-color: var(--accent); }
.pk-tg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.pk-bar { display: flex; align-items: center; gap: 12px; margin: 14px 0 8px; min-height: 32px; }
.pk-sp { flex: 1; }
.pk-link { border: 0; background: none; padding: 0; color: var(--accent); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.pk-needs { margin: 0 0 8px; }
.pk-list { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.pk-list:empty { display: none; }
.pk-empty { padding: 16px; margin: 0; }
.pk-row { display: grid; grid-template-columns: 18px minmax(0, 1fr) minmax(0, 1.15fr) 150px; gap: 3px 14px; align-items: center; padding: 11px 14px; border-top: 1px solid var(--line); background: var(--panel); cursor: pointer; }
.pk-row:first-child { border-top: 0; }
.pk-row[hidden] { display: none; }
.pk-row:hover { background: var(--panel-2); }
.pk-row.on { background: color-mix(in srgb, var(--accent) 7%, var(--panel)); }
.pk-row.blocked { cursor: default; }
.pk-row.blocked > .pk-main b, .pk-row.blocked > .pk-hw { opacity: .6; }
.pk-row > input { margin: 0; width: 16px; height: 16px; accent-color: var(--accent); }
.pk-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pk-main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk-main .mstate { font-weight: 500; }
.m-held .mstate, .m-incompatible .mstate { color: var(--ink-3); }
.pk-held { display: flex; align-items: flex-start; gap: 5px; line-height: 1.35; font-size: 12px; font-weight: 600; color: var(--warn); min-width: 0; }
.pk-held svg { width: 13px; height: 13px; flex: none; margin-top: 2px; }
.pk-held a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.pk-hw { min-width: 0; }
.pk-side { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.pk-tag { font-size: 11.5px; padding: 1px 8px; border-radius: 99px; background: var(--panel-2); border: 1px solid var(--line); color: var(--ink-2); white-space: nowrap; }
.pk-runs, .pk-why { grid-column: 2 / -1; }
.pk-why { display: inline-flex; align-items: center; gap: 5px; color: var(--warn); }
.pk-why svg { width: 13px; height: 13px; flex: none; }
.pk-none { padding: 14px 0 0; margin: 0; }
.pk-other { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.pk-other svg { width: 16px; height: 16px; flex: none; color: var(--ink-3); }
.pk-other .badge { margin-left: auto; }
.pk-sel { position: sticky; top: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); padding: 14px; }
.pk-sel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.pk-sel-head h3 { margin: 0; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.pk-n { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; background: var(--accent); color: var(--on-accent, #fff); font-size: 12px; font-weight: 700; }
.pk-sel-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pk-sel-list li { display: flex; align-items: center; gap: 10px; padding: 8px 6px 8px 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
.pk-sel-ic { display: grid; color: var(--ink-3); }
.pk-sel-ic svg { width: 16px; height: 16px; }
.pk-sel-list li.busy { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.pk-sel-list li.busy .pk-sel-ic, .pk-working { color: var(--accent); }
.pk-sel-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pk-sel-main > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn-x { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 6px; background: none; color: var(--ink-3); cursor: pointer; }
.btn-x svg { width: 14px; height: 14px; }
.btn-x:hover:not(:disabled) { background: var(--panel-2); color: var(--bad); }
.btn-x:disabled { opacity: .35; cursor: not-allowed; }
.pk-sel-empty { display: flex; flex-direction: column; gap: 4px; padding: 6px 2px 4px; }
.pk-sel-foot { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.pk-idle select { display: inline-block; width: auto; padding: 2px 24px 2px 6px; font-size: 13px; margin: 0 2px; }
.pk-wait { cursor: progress; }
.pk-limits > summary { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; cursor: pointer; list-style: none; }
.pk-limits > summary::-webkit-details-marker { display: none; }
.pk-limits > summary h2 { margin: 0; display: inline-flex; align-items: center; gap: 8px; }
.pk-limits > summary h2::before { content: ''; width: 7px; height: 7px; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: rotate(-45deg); transition: transform .15s; }
.pk-limits[open] > summary h2::before { transform: rotate(45deg); }
.pk-limits[open] > summary { margin-bottom: 14px; }
@media (max-width: 900px) {
  .pk-grid { grid-template-columns: minmax(0, 1fr); }
  .pk-sel { position: static; order: -1; }
}
@media (max-width: 600px) {
  .pk-row { grid-template-columns: 18px minmax(0, 1fr); }
  .pk-side:empty { display: none; }
  .pk-hw, .pk-side { grid-column: 2; justify-content: flex-start; }
  .pk-filters select { flex: 0 0 calc(50% - 4px); width: calc(50% - 4px); min-width: 0; }
  .pk > .card-head { flex-direction: column; gap: 10px; }
}

/* The EsaSim agent: a button in the top bar (a round one in the blueprint editor) and a panel that slides in from the right */
.agent-btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: 99px; background: var(--panel); color: var(--ink); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.agent-btn svg { width: 15px; height: 15px; color: var(--accent); }
.agent-btn:hover { border-color: var(--accent); }
html.agent-open .agent-btn { border-color: var(--accent); background: var(--accent-soft); }
.agent-fab { position: fixed; right: 16px; bottom: 16px; z-index: 900; display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border: 0; border-radius: 99px; background: var(--accent); color: var(--on-accent, #fff); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; box-shadow: 0 6px 20px rgba(0, 0, 0, .25); }
.agent-fab svg { width: 16px; height: 16px; }
html.agent-open .agent-fab { display: none; }
.agent-panel { position: fixed; top: 0; right: 0; bottom: 0; z-index: 1000; width: 440px; max-width: 100vw; display: flex; flex-direction: column; background: var(--panel); border-left: 1px solid var(--line); box-shadow: -12px 0 40px rgba(0, 0, 0, .18); transform: translateX(100%); transition: transform .2s ease; color: var(--ink); }
.agent-panel.on { transform: none; }
.agent-panel[hidden] { display: none; }
.agent-head { display: flex; align-items: center; gap: 8px; padding: 12px 12px 12px 16px; border-bottom: 1px solid var(--line); }
.agent-mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); }
.agent-mark svg { width: 16px; height: 16px; }
.agent-title { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.agent-title .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agent-ib { display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 8px; background: none; color: var(--ink-2); cursor: pointer; }
.agent-ib:hover { background: var(--panel-2); color: var(--ink); }
.agent-ib svg { width: 16px; height: 16px; }
.agent-hist { border-bottom: 1px solid var(--line); max-height: 45%; overflow: auto; padding: 8px; display: flex; flex-direction: column; gap: 2px; background: var(--panel-2); }
.agent-hist p { margin: 6px 8px; }
.agent-body { flex: 1; overflow: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.agent-msg { max-width: 92%; padding: 10px 13px; border-radius: 12px; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.agent-msg.me { align-self: flex-end; background: var(--accent); color: var(--on-accent, #fff); border-bottom-right-radius: 4px; }
.agent-msg.ai { align-self: flex-start; background: var(--panel-2); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.agent-msg.ai > :first-child { margin-top: 0; }
.agent-msg.ai > :last-child { margin-bottom: 0; }
.agent-msg.ai p, .agent-msg.ai ul, .agent-msg.ai ol { margin: 0 0 8px; }
.agent-msg.ai pre { font-size: 12px; max-height: 260px; overflow: auto; }
.agent-msg.ai table { font-size: 12.5px; }
.agent-call { align-self: stretch; font-size: 12.5px; color: var(--ink-2); }
.agent-call summary { display: flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; padding: 2px 0; }
.agent-call summary::-webkit-details-marker { display: none; }
.agent-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); flex: none; }
.agent-call.st-ok .agent-dot { background: var(--good); }
.agent-call.st-bad .agent-dot { background: var(--bad); }
.agent-call.st-warn .agent-dot { background: var(--warn); }
.agent-args { margin: 4px 0 4px 15px; padding: 0 0 0 10px; border-left: 2px solid var(--line); list-style: none; font-family: var(--mono, ui-monospace, monospace); font-size: 11.5px; color: var(--ink-2); overflow-wrap: anywhere; }
.agent-err { margin: 4px 0 4px 15px; color: var(--bad); }
.agent-sub-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; font-weight: 600; color: var(--ink); }
.agent-sub > summary { min-width: 0; }
.agent-sub-st { flex: none; white-space: nowrap; }
.agent-sub.is-running .agent-dot { animation: agent-dot 1s infinite ease-in-out; }
.agent-sub-box { margin: 6px 0 4px 3px; padding: 2px 0 2px 12px; border-left: 2px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.agent-sub-box .agent-notice { align-self: flex-start; text-align: left; }
.agent-msg.agent-sub-msg { align-self: stretch; max-width: none; font-size: 12.5px; background: var(--panel-2); }
.agent-card { align-self: stretch; border: 1px solid color-mix(in srgb, var(--warn) 45%, var(--line)); border-radius: 12px; padding: 12px 14px; background: color-mix(in srgb, var(--warn) 6%, var(--panel)); display: flex; flex-direction: column; gap: 8px; }
.agent-card-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.agent-card .agent-args { margin-left: 0; }
.agent-code summary { cursor: pointer; font-size: 12.5px; color: var(--accent); font-weight: 600; }
.agent-code pre { margin: 6px 0 0; max-height: 280px; overflow: auto; font-size: 11.5px; padding: 10px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--line); white-space: pre; }
.agent-card-b { display: flex; justify-content: flex-end; gap: 8px; }
.agent-notice { align-self: center; font-size: 12.5px; color: var(--ink-3); text-align: center; }
.agent-empty { margin: auto 0; text-align: center; padding: 0 12px; }
.agent-empty p { margin: 0 0 6px; }
.agent-tries { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.agent-try { border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--ink); padding: 8px 12px; font: inherit; font-size: 13px; cursor: pointer; text-align: left; }
.agent-try:hover { border-color: var(--accent); }
.agent-dots { display: flex; gap: 4px; padding: 6px 2px; }
.agent-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); animation: agent-dot 1s infinite ease-in-out; }
.agent-dots i:nth-child(2) { animation-delay: .15s; } .agent-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes agent-dot { 0%, 80%, 100% { opacity: .25; transform: none; } 40% { opacity: 1; transform: translateY(-3px); } }
.agent-sp { flex: 1; }
@media (max-width: 600px) { .agent-panel { width: 100vw; } .agent-btn .nl { display: none; } .agent-btn { padding: 0 9px; } }
@media (prefers-reduced-motion: reduce) { .agent-panel { transition: none; } .agent-dots i { animation: none; } }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.ag-form label:not(.check):not(.pay-mode) { display: block; }
.ag-form .hint { display: block; margin-top: 4px; font-size: 12.5px; color: var(--ink-3); font-weight: 400; }
.ag-form td select { min-width: 150px; }
.ag-usage { margin-top: 24px; }
.agent-panel [hidden] { display: none !important; }

.agent-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.agent-file { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 3px 4px 3px 9px; border: 1px solid var(--line); border-radius: 99px; background: var(--panel-2); font-size: 12px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agent-file.wait { opacity: .6; padding-right: 9px; }
.agent-file-x { border: 0; background: none; color: var(--ink-3); cursor: pointer; font-size: 15px; line-height: 1; padding: 0 4px; }
.agent-msg.me .agent-files { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.agent-msg.me .agent-file { background: rgba(255, 255, 255, .18); border-color: rgba(255, 255, 255, .35); color: inherit; padding-right: 9px; }
.agent-panel.drop .agent-body { outline: 2px dashed var(--accent); outline-offset: -8px; }
.ag-test { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 8px; background: var(--panel-2); }

/* agent panel: width dragged from its left edge */
.agent-panel { width: 440px; min-width: 360px; }
.agent-grip { position: absolute; left: -4px; top: 0; bottom: 0; width: 8px; cursor: ew-resize; z-index: 2; touch-action: none; }
.agent-grip::after { content: ''; position: absolute; left: 3px; top: 50%; width: 2px; height: 40px; margin-top: -20px; border-radius: 2px; background: var(--line); opacity: 0; transition: opacity .15s; }
.agent-grip:hover::after, .agent-grip:focus-visible::after, .agent-panel.sizing .agent-grip::after { opacity: 1; background: var(--accent); }
.agent-panel.sizing { transition: none; user-select: none; }
.agent-panel.sizing iframe { pointer-events: none; }
/* turns, with their actions on hover */
.agent-turn { display: flex; flex-direction: column; gap: 2px; max-width: 92%; }
.agent-turn.me { align-self: flex-end; align-items: flex-end; }
.agent-turn.ai { align-self: flex-start; align-items: flex-start; }
.agent-turn .agent-msg { max-width: 100%; }
.agent-msg.me.editing { outline: 2px dashed color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 2px; opacity: .75; }
.agent-acts { display: flex; gap: 2px; opacity: 0; transition: opacity .12s; min-height: 26px; }
.agent-turn:hover .agent-acts, .agent-turn:focus-within .agent-acts { opacity: 1; }
@media (hover: none) { .agent-acts { opacity: 1; } }
.agent-act { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 8px; border: 0; border-radius: 6px; background: none; color: var(--ink-3); font: inherit; font-size: 12px; cursor: pointer; }
.agent-act svg { width: 13px; height: 13px; }
.agent-act:hover { background: var(--panel-2); color: var(--ink); }
.agent-act.ok { color: var(--good); }
.agent-copy-ta { position: fixed; left: -9999px; top: 0; }
/* the composer: one rounded box with the text, the files, the model and a round send button */
.agent-compose { padding: 10px 12px 10px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.agent-editing { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 8px; background: var(--accent-soft); color: var(--ink); font-size: 12.5px; }
.agent-editing svg { width: 14px; height: 14px; color: var(--accent); flex: none; }
.agent-editing span { flex: 1; }
.agent-box { display: flex; flex-direction: column; gap: 6px; padding: 8px 8px 8px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); transition: border-color .12s, box-shadow .12s; }
.agent-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.agent-box textarea { width: 100%; min-height: 24px; max-height: 240px; padding: 4px 0; border: 0; outline: 0; background: none; box-shadow: none; resize: none; font: inherit; font-size: 14px; line-height: 1.5; color: var(--ink); }
.agent-box textarea:focus { box-shadow: none; outline: 0; }
.agent-row { display: flex; align-items: center; gap: 6px; }
.agent-tool { display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 8px; background: none; color: var(--ink-2); cursor: pointer; }
.agent-tool:hover { background: var(--panel-2); color: var(--ink); }
.agent-tool svg { width: 17px; height: 17px; }
.agent-model { width: auto; max-width: 60%; height: 30px; padding: 0 26px 0 10px; border-radius: 99px; font-size: 12.5px; background-color: var(--panel-2); border-color: transparent; }
.agent-go { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border: 0; border-radius: 50%; background: var(--accent); color: var(--on-accent, #fff); cursor: pointer; transition: transform .1s, opacity .12s; }
.agent-go svg { width: 17px; height: 17px; stroke-width: 2.4; }
.agent-go:hover:not(:disabled) { transform: scale(1.06); }
.agent-go:disabled { opacity: .35; cursor: default; }
.agent-go.stop { background: var(--ink); color: var(--panel); }
.agent-go.stop svg { fill: currentColor; width: 14px; height: 14px; }
.agent-hint { margin: 0; font-size: 11.5px; color: var(--ink-3); text-align: center; }
.agent-panel.is-busy .agent-hint { visibility: hidden; }
/* past conversations, each with a delete button */
.agent-hist-row { display: flex; align-items: center; gap: 4px; padding: 0; border-radius: 8px; }
.agent-hist-row:hover, .agent-hist-row.on { background: var(--panel); }
.agent-hist-open { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 10px; border: 0; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.agent-hist-open b { font-size: 13.5px; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agent-hist-x { display: grid; place-items: center; width: 28px; height: 28px; margin-right: 6px; border: 0; border-radius: 6px; background: none; color: var(--ink-3); cursor: pointer; opacity: 0; }
.agent-hist-row:hover .agent-hist-x, .agent-hist-x:focus-visible { opacity: 1; }
.agent-hist-x:hover { background: var(--panel-2); color: var(--bad); }
.agent-hist-x svg { width: 14px; height: 14px; }
@media (max-width: 600px) { .agent-panel { width: 100vw !important; min-width: 0; } .agent-grip { display: none; } .agent-hint { display: none; } .agent-hist-x { opacity: 1; } }
.ag-limit { display: flex; flex-direction: column; gap: 6px; }
.ag-limit input[type=number]:disabled { opacity: .55; }
.agent-lock { display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.agent-lock-i svg { width: 18px; height: 18px; margin-top: 2px; }
.agent-lock-t { flex: 1 1 320px; min-width: 0; }
.agent-lock-b { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
/* the Agent button while an answer is in progress (the panel closed) */
.agent-btn.agent-busy, .agent-fab.agent-busy { position: relative; }
.agent-btn.agent-busy::after, .agent-fab.agent-busy::after { content: ''; position: absolute; top: 3px; right: 3px; width: 8px; height: 8px; border-radius: 50%; background: var(--warn, #d97706); box-shadow: 0 0 0 2px var(--panel, #fff); animation: agent-pulse 1.2s infinite ease-in-out; }
@keyframes agent-pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .agent-btn.agent-busy::after, .agent-fab.agent-busy::after { animation: none; } }
/* the close card: what the agent's answer puts in place */
.agent-changes { display: flex; flex-direction: column; gap: 6px; max-height: 52vh; overflow: auto; margin: 0 -4px; padding: 0 4px; }
.agent-ch-p { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.agent-ch { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: var(--panel); display: flex; flex-direction: column; gap: 4px; }
.agent-ch-t { display: flex; align-items: baseline; gap: 8px; font-size: 13px; font-weight: 600; min-width: 0; }
.agent-ch-t > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.agent-ch-k { flex: none; font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 99px; background: var(--panel-2); color: var(--ink-2); border: 1px solid var(--line); }
.agent-ch-k.k-new { color: var(--good, #15803d); border-color: color-mix(in srgb, var(--good, #15803d) 40%, var(--line)); }
.agent-ch-k.k-publish { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.agent-ch-l { margin: 0; padding: 0 0 0 2px; list-style: none; font-size: 12px; color: var(--ink-2); }
.agent-ch-l li { overflow-wrap: anywhere; }
.agent-diff pre { white-space: pre; line-height: 1.45; }
.agent-diff .dl { display: inline-block; min-width: 100%; }
.agent-diff .dl-add { background: color-mix(in srgb, var(--good, #15803d) 14%, transparent); color: var(--ink); }
.agent-diff .dl-del { background: color-mix(in srgb, var(--bad, #b91c1c) 12%, transparent); color: var(--ink-2); }
.agent-diff .dl-eq { color: var(--muted); }
.agent-diff .dl-skip { color: var(--muted); font-style: italic; }
.ag-limit [hidden] { display: none !important; }
/* the workspace's plan (top bar, workspace switcher) */
.plan-badge { display: inline-block; vertical-align: 1px; margin-left: 4px; padding: 0 6px; border-radius: 99px; border: 1px solid var(--line); font-size: 9.5px !important; font-weight: 700; letter-spacing: .05em; line-height: 15px; text-transform: uppercase; color: var(--ink-3) !important; background: var(--panel); text-decoration: none; white-space: nowrap; }
.plan-badge.plan-pro { color: var(--accent) !important; border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: color-mix(in srgb, var(--accent) 8%, var(--panel)); }
.plan-badge.plan-enterprise { color: var(--violet, #7c3aed) !important; border-color: color-mix(in srgb, var(--violet, #7c3aed) 45%, var(--line)); background: color-mix(in srgb, var(--violet, #7c3aed) 8%, var(--panel)); }
a.plan-badge:hover { border-color: currentColor; }
.um-ws .plan-badge { margin-left: 6px; }
/* stars: a project's (its header, cards) and a person's (the sum of their projects') */
.star-wrap { display: inline-flex; align-items: center; gap: 4px; vertical-align: middle; }
.star-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; }
.star-btn .star-n { margin-left: 2px; padding: 0 6px; border-radius: 99px; background: var(--panel-2); font-size: 11.5px; font-weight: 700; color: var(--ink-2); }
.star-btn.on svg { fill: #e3a008; stroke: #e3a008; }
.star-btn:disabled { opacity: 1; cursor: default; }
.star-gh { display: inline-flex; align-items: center; gap: 3px; padding: 0 4px; color: var(--ink-3); cursor: pointer; font-size: 12px; }
.star-gh svg { width: 14px; height: 14px; }
.star-gh input { margin: 0; }
.pcard-stars { left: auto; right: 12px; gap: 4px; }
.pcard-stars svg { width: 13px; height: 13px; fill: #f5c542; stroke: #f5c542; }
.user-stars { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.user-stars svg { width: 12px; height: 12px; fill: #e3a008; stroke: #e3a008; }
.user-stars.big { font-size: 15px; gap: 5px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 99px; }
.user-stars.big svg { width: 16px; height: 16px; }
.user-stars.big span { font-weight: 500; color: var(--ink-3); }
.star-btn:disabled { border-style: dashed; background: transparent; }

/* Readme tab > Edit */
.rd-edit { max-width: 1100px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.rd-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.rd-head h2 { margin: 0 0 2px; }
.rd-cover-top { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px; align-items: center; }
.rd-cover-now img { display: block; width: 100%; height: auto; aspect-ratio: 5 / 2; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); }
.rd-cover-text { gap: 8px; }
.rd-upload { align-self: flex-start; cursor: pointer; }
.rd-sub { margin: 4px 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); }
.cover-opt .cover-name { position: absolute; left: 0; right: 0; bottom: 0; padding: 2px 6px; font-size: 11px; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.65)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rd-text { padding: 0; overflow: hidden; }
.rd-tabs { display: flex; align-items: center; gap: 2px; padding: 6px 8px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.rd-tabs button { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 8px 8px 0 0; font-size: 13px; color: var(--ink-3); border: 1px solid transparent; border-bottom: none; margin-bottom: -1px; }
.rd-tabs button svg { width: 15px; height: 15px; }
.rd-tabs button.on { color: var(--ink); background: var(--panel); border-color: var(--line); }
.rd-tabs button:focus-visible { outline: 2px solid var(--accent); }
.rd-tabs-note { margin-left: auto; padding: 6px 4px; }
.rd-panes textarea.readme-edit { display: block; width: 100%; border: 0; border-radius: 0; min-height: 480px; padding: 16px; resize: vertical; box-shadow: none; }
.rd-panes textarea.readme-edit:focus { outline: none; }
.rd-preview { padding: 20px 24px; min-height: 480px; }
.rd-foot { padding: 10px 16px; border-top: 1px solid var(--line); margin: 0; }
@media (max-width: 760px) { .rd-cover-top { grid-template-columns: 1fr; } .rd-tabs-note { display: none; } }
.cover-opt[hidden] { display: none; }

/* Settings > Results and cache, Hardware needed */
.rs-opt { display: grid; grid-template-columns: 18px 1fr; gap: 10px; align-items: start; cursor: pointer; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.rs-opt input { margin-top: 3px; }
.rs-opt > span { display: flex; flex-direction: column; gap: 2px; }
.rs-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.rs-cache legend { font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.seg label { cursor: pointer; }
.seg label input { position: absolute; opacity: 0; pointer-events: none; }
.seg label span { display: block; padding: 5px 12px; border-radius: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.seg label input:checked + span { background: var(--panel); color: var(--ink); box-shadow: var(--shadow), 0 0 0 1px var(--line); }
.seg label input:focus-visible + span { outline: 2px solid var(--accent); }
.rs-cache .flash { margin-top: 8px; display: flex; gap: 8px; align-items: center; }
.rs-cache .flash[hidden] { display: none; }
.rs-hw { border-top: 1px solid var(--line); padding-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.rs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.rs-grid .field { margin: 0; }
.rs-grid .rs-model { grid-column: span 2; }
.rs-grid .rs-model[hidden] { display: none; }
.unit { display: flex; align-items: center; gap: 6px; }
.unit input { flex: 1; min-width: 0; }
.unit span { color: var(--ink-3); font-size: 13px; }
.rs-now { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.seg label { position: relative; }

/* Compute tab: a worker opened in the list */
.pk-more { all: unset; cursor: pointer; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 6px; color: var(--ink-3); margin-left: auto; }
.pk-more:hover { background: var(--panel-2); color: var(--ink); }
.pk-more:focus-visible { outline: 2px solid var(--accent); }
.pk-more svg { width: 16px; height: 16px; transition: transform .15s; }
.pk-row.open .pk-more svg { transform: rotate(90deg); }
.pk-d-wrap { grid-column: 1 / -1; display: block; cursor: default; }
.pk-d-wrap[hidden] { display: none; }
.pk-detail { margin: 8px 0 2px 32px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); }
.pk-d-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.pk-detail .kv { margin: 0; }
.pk-d-h { margin: 0 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); }
.pk-d-h + * + .pk-d-h, .pk-gpus + .pk-d-h, .pk-d-grid p + .pk-d-h { margin-top: 12px; }
.pk-gpus, .pk-hold { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.pk-hold li { display: flex; justify-content: space-between; gap: 10px; }
.pk-wipe { margin-top: 12px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
@media (max-width: 760px) { .pk-d-grid { grid-template-columns: 1fr; } .pk-detail { margin-left: 0; } }
.pk-proj { display: flex; gap: 8px; align-items: center; margin: 0 0 8px; padding: 8px 12px; border-radius: 8px; background: var(--accent-soft); }
.pk-proj svg { width: 16px; height: 16px; flex: none; }
.pk-detail .kv { grid-template-columns: 96px minmax(0, 1fr); }

/* Computing > Your workers: a worker opened in the list */
.w-tog { all: unset; cursor: pointer; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; color: var(--ink-3); margin: 0 4px 0 -6px; vertical-align: middle; }
.w-tog:hover { background: var(--panel-2); color: var(--ink); }
.w-tog:focus-visible { outline: 2px solid var(--accent); }
.w-tog svg { width: 15px; height: 15px; transition: transform .15s; }
.w-row.open .w-tog svg { transform: rotate(90deg); }
.w-row.open > td { border-bottom-color: transparent; }
.w-more[hidden] { display: none; }
.w-more > td { background: var(--panel-2); padding: 14px 18px 18px; }
.w-cfg { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1.2fr); gap: 16px 22px; }
.w-cfg-up { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; font-size: 13px; padding: 8px 12px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); }
.w-cfg-up.w-up-bad, .w-cfg-up.w-up-warn { border-color: color-mix(in srgb, var(--warn) 50%, var(--line)); background: var(--warn-soft); }
.w-cfg-up span.muted { flex-basis: 100%; }
.w-cfg .pk-detail { margin: 0; background: var(--panel); }
.w-cfg-set { padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.w-cfg-set .kv { grid-template-columns: 150px minmax(0, 1fr); margin-bottom: 8px; }
@media (max-width: 960px) { .w-cfg { grid-template-columns: 1fr; } }

/* The account menu at the bottom of the sidebar (photo, name, workspace); it opens upward, over the page */
.side-foot { align-items: stretch; }
.side-foot .side-plan, .side-foot .side-ver { align-self: flex-start; }
.side-um { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--side-line, rgba(255,255,255,.08)); }
.side-um summary { padding: 6px 8px; border-radius: 10px; color: var(--side-ink); }
.side-um summary:hover, .side-um[open] summary { background: color-mix(in srgb, var(--on-accent, #fff) 8%, transparent); }
.side-um .avatar { width: 30px; height: 30px; font-size: 12px; flex: none; }
.side-um .um-who { flex: 1; min-width: 0; }
.side-um .um-who b { color: var(--on-accent, #fff); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-um .um-who span { display: block; color: var(--side-ink-2); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-um .chev { color: var(--side-ink-2); font-size: 12px; }
.side-um .usermenu-menu { position: fixed; top: auto; right: auto; left: 12px; bottom: 64px; min-width: 248px; z-index: 60; }
.shell.nav-min .side-foot { display: flex; }
.shell.nav-min .side-foot .side-plan, .shell.nav-min .side-foot .side-ver { display: none; }
.shell.nav-min .side-um { border-top: 0; margin-top: 0; padding-top: 0; }
.shell.nav-min .side-um summary { justify-content: center; padding: 6px 0; }
.shell.nav-min .side-um .um-who, .shell.nav-min .side-um .chev { display: none; }
.side-um .usermenu-menu { color: var(--ink); font-size: 14px; }
.side-um .usermenu-menu .um-head b { color: var(--ink); }
.side-foot .side-um .usermenu-menu form button { color: var(--ink); font-size: 14px; padding: 8px 10px; width: 100%; text-align: left; }
.side-foot .side-um .usermenu-menu form button:hover { color: var(--ink); background: var(--panel-2); }
.side-foot .side-um .usermenu-menu .um-ws button:disabled { color: var(--ink); background: none; }

/* Demo and public cards: Clone into my workspace, a small round button on the cover */
.pcard-wrap { position: relative; }
.pcard-clone { position: absolute; top: 48px; right: 10px; margin: 0; z-index: 2; }
.pcard-clone button { all: unset; cursor: pointer; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: rgba(10,14,22,.62); color: #fff; backdrop-filter: blur(4px); transition: background .15s, transform .15s; }
.pcard-clone button:hover { background: var(--accent); transform: scale(1.06); }
.pcard-clone button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pcard-clone svg { width: 16px; height: 16px; }
.rd-clone .btn { justify-content: center; width: 100%; }

/* Admin › Public projects to review */
.pr-signals { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.pr-file { border-top: 1px solid var(--line); padding: 6px 0; }
.pr-file summary { cursor: pointer; display: flex; justify-content: space-between; gap: 12px; }
.pr-code { max-height: 420px; overflow: auto; font-size: 12px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin: 8px 0 4px; white-space: pre-wrap; word-break: break-word; }

/* 0.12.86: the top bar stays in view while the page scrolls */
.userbar { position: sticky; top: 0; z-index: 45; }
.side-foot .side-ver { padding-top: 2px; }

/* 0.12.86: cards stand off the page: a soft shadow in light mode, a faint blue glow in dark mode */
:root {
  --lift-a: light-dark(rgba(16, 19, 26, .06), rgba(0, 0, 0, 0));
  --lift-b: light-dark(rgba(16, 19, 26, .10), rgba(0, 0, 0, .35));
  --lift-glow: light-dark(rgba(0, 0, 0, 0), rgba(92, 141, 255, .16));
  --lift-ring: light-dark(rgba(0, 0, 0, 0), rgba(122, 162, 255, .10));
  --lift-hover-b: light-dark(rgba(16, 19, 26, .18), rgba(0, 0, 0, .45));
  --lift-hover-glow: light-dark(rgba(0, 0, 0, 0), rgba(92, 141, 255, .30));
}
.card, .stat, .pcard { box-shadow: 0 1px 2px var(--lift-a), 0 10px 26px -14px var(--lift-b), 0 0 24px -8px var(--lift-glow), 0 0 0 1px var(--lift-ring); }
.card.flush, .card.danger-zone { box-shadow: 0 1px 2px var(--lift-a), 0 10px 26px -14px var(--lift-b), 0 0 24px -8px var(--lift-glow), 0 0 0 1px var(--lift-ring); }
.pcard:hover { box-shadow: 0 2px 4px var(--lift-a), 0 22px 44px -18px var(--lift-hover-b), 0 0 34px -6px var(--lift-hover-glow), 0 0 0 1px var(--lift-ring); }

/* ---------- 0.12.87: the top bar stays out of the page; search with categories; demo cards ---------- */
/* The page scrolls in .main-scroll, under the top bar, so its scroll bar starts below the bar (wide screens; on a
   phone the window scrolls as before). */
@media (min-width: 901px) {
  body:not(.fill) .main { height: 100vh; height: 100dvh; display: flex; flex-direction: column; }
  body:not(.fill) .main-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
  body:not(.fill) .userbar { position: relative; flex: none; }
}
.main-scroll:focus { outline: none; }
body.fill .main-scroll { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }

/* Search, centred, with the categories next to it */
.pfind { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 14px; margin: 0 auto 22px; max-width: 1100px; }
.pfind .psearch { flex: 0 1 420px; min-width: 240px; margin: 0; max-width: none; }
.pfind .psearch input[type=search] { padding-right: 76px; border-radius: 999px; }
.pfind .psearch-count { position: absolute; right: 14px; pointer-events: none; }
.psearch-none { text-align: center; }
.pcats { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.pcat { all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--ink-2); font-size: 13px; font-weight: 550; white-space: nowrap; transition: border-color .15s, background .15s, color .15s; }
.pcat:hover { border-color: var(--line-2); color: var(--ink); }
.pcat:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pcat i { width: 8px; height: 8px; border-radius: 50%; background: var(--pt, var(--ink-3)); }
.pcat.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.pcat.on i { box-shadow: 0 0 0 2px var(--bg); }

/* A colour per category: the label on the card and the dot of its filter */
.pt-robotics { --pt: light-dark(#2563eb, #7aa2ff); }
.pt-autonomous-vehicles { --pt: light-dark(#c2410c, #fb923c); }
.pt-drones { --pt: light-dark(#0e7490, #38bdf8); }
.pt-manufacturing { --pt: light-dark(#a16207, #facc15); }
.pt-defense { --pt: light-dark(#475569, #a3b1c6); }
.pt-medical { --pt: light-dark(#be123c, #fb7185); }
.pt-marine { --pt: light-dark(#0f766e, #2dd4bf); }
.pt-curation { --pt: light-dark(#7c3aed, #b794ff); }
.pt-research { --pt: light-dark(#15803d, #4ade80); }
.pt-other, .pt-own { --pt: var(--ink-3); }
.pcard-type[class*=pt-] { color: var(--pt); }
.pcard-type-x { color: var(--ink-3); }

/* Demo cards: a bigger picture, the esacode mark in its corner */
.pcard-big .pcard-cover { aspect-ratio: 16 / 9; }
.pcard-big .pcard-body { padding: 12px 16px 14px; gap: 4px; }
.pcard-big .pcard-name { font-size: 16px; }
.pcard-big .pcard-desc { font-size: 13.5px; }
.pcard-big .pcard-stats { font-size: 12.5px; }
.pcard-cover .pcard-mark { position: absolute; right: 10px; bottom: 10px; width: 18px; height: auto; object-fit: contain; padding: 6px 7px; box-sizing: content-box; border-radius: 9px; background: rgba(10, 14, 24, .55); backdrop-filter: blur(4px); opacity: .95; }
