/* migr web, in Preworld's look (the company's other product, review.nice2.io): light "mission control" pages with hairline
   panels, cyan for interaction, green / amber only for results; the sign-in page in the company website's dark look.
   Fonts are self-hosted (static/fonts, SIL OFL): B612 for headings and figures, Inter for the brand, system CJK for text. */

@font-face { font-family: "B612"; font-weight: 400; font-display: swap; src: url("fonts/b612-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "B612"; font-weight: 700; font-display: swap; src: url("fonts/b612-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "B612 Mono"; font-weight: 400; font-display: swap; src: url("fonts/b612-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url("fonts/inter-latin-500-normal.woff2") format("woff2"); }

:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --raised: #e6eef8;
  --text: #1c2a3d;
  --strong: #0b1626;
  --muted: #4e5e74;
  --faint: #5e6e84;
  --border: #dce3ec;
  --edge: #c8d2de;
  --accent: #0079ad;
  --accent-strong: #005f8a;
  --accent-weak: #eef6fa;
  --accent-line: #9fcbe0;
  --on-accent: #ffffff;

  --st-queued: #5e6e84;
  --st-queued-bg: #eef2f6;
  --st-running: #0079ad;
  --st-running-bg: #e8f3f8;
  --st-passed: #0b8a5e;
  --st-passed-bg: #e7f4ef;
  --st-unresolved: #b56a00;
  --st-unresolved-bg: #f8f0e3;

  --radius: 6px;
  --radius-s: 6px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05);
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC",
          -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, Arial, sans-serif;
  --display: "B612", var(--font);
  --brand-font: "Inter", var(--font);
  --mono: "B612 Mono", ui-monospace, SFMono-Regular, "Cascadia Mono", Menlo, Consolas, monospace;
  --gutter: 16px;
  --maxw: 960px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0;
  background-color: var(--bg);
  background-image: radial-gradient(rgba(14, 26, 43, .06) 1px, transparent 1px);
  background-size: 20px 20px;
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
  overflow-x: hidden;
}
:lang(zh) body, body:lang(zh) { line-height: 1.75; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
@media (min-width: 720px) { :root { --gutter: 28px; } }

a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-strong); }
code, pre { font-family: var(--mono); font-size: .86em; }
code { overflow-wrap: anywhere; }
.wrap-any { overflow-wrap: anywhere; word-break: break-word; }
.nowrap { white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 8px; top: 8px; z-index: 50; background: var(--surface); padding: 8px 12px; border-radius: var(--radius-s); }

/* ------------------------------------------------------------------ top bar */
.topbar { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--border); background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--strong); text-decoration: none; min-width: 0; }
.brand:hover { color: var(--strong); }
.brand-word { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.brand-text { font-family: var(--brand-font); font-weight: 500; font-size: 16px; letter-spacing: -.02em; line-height: 1.15;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-sub { font-family: var(--mono); font-size: 9px; letter-spacing: .2em; text-transform: uppercase; color: var(--faint); line-height: 1.2; }
.brand-mark { width: 24px; height: 24px; flex: none; color: var(--accent); }
.top-nav { display: flex; align-items: center; gap: 4px; margin-left: 10px; margin-right: auto; }
.top-nav a { height: 32px; padding: 0 10px; border-radius: 5px; display: inline-flex; align-items: center; font-size: 13.5px;
  color: var(--muted); text-decoration: none; white-space: nowrap; }
.top-nav a:hover { background: var(--surface-2); color: var(--strong); }
.top-nav a.on { background: var(--raised); color: var(--strong); }
.top-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.lang-switch { display: inline-flex; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; background: var(--surface); }
.lang-switch a, .lang-switch span { height: 28px; padding: 0 10px; display: inline-flex; align-items: center; font-size: 12px; font-weight: 600;
  color: var(--muted); text-decoration: none; }
.lang-switch span { background: var(--raised); color: var(--strong); }
.lang-switch a:hover { color: var(--strong); background: var(--surface-2); }
.tech-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; padding: 0 8px; border-radius: 6px; color: var(--muted);
  text-decoration: none; font-size: 12.5px; white-space: nowrap; }
.tech-toggle:hover { color: var(--strong); background: var(--surface-2); }
.switch { position: relative; width: 30px; height: 17px; border-radius: 999px; background: var(--edge); transition: background .15s; flex: none; }
.knob { position: absolute; top: 2px; left: 2px; width: 13px; height: 13px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.tech-on .switch { background: var(--accent); }
.tech-on .knob { transform: translateX(13px); }
.tech-on .tech-toggle { color: var(--strong); }
.who { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.avatar { width: 28px; height: 28px; flex: none; border-radius: 6px; background: var(--raised); border: 1px solid var(--edge); display: grid;
  place-items: center; font-size: 12px; font-weight: 600; color: var(--text); }
.who-text { display: grid; line-height: 1.25; min-width: 0; max-width: 180px; }
.who-text span { font-size: 12.5px; color: var(--strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who-text small { font-size: 11px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 860px) { .who-text, .tech-label { display: none; } }
@media (max-width: 640px) {
  .topbar-inner { flex-wrap: wrap; row-gap: 0; padding-top: 6px; padding-bottom: 6px; }
  .top-nav { order: 3; width: 100%; margin: 0 0 0 -10px; }
  .brand-sub { display: none; }
}

/* ------------------------------------------------------------------ banners */
.banner { font-size: .9rem; padding: 8px 0; border-bottom: 1px solid var(--border); }
.banner-dev { background: var(--surface-2); color: var(--muted); }
.banner-fixture { background: var(--accent-weak); color: var(--text); border-bottom-color: var(--accent-line); }
.banner-fixture strong { font-weight: 600; }

/* ------------------------------------------------------------------ steps */
.steps { margin-top: 18px; }
.steps ol { list-style: none; margin: 0; padding: 6px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.steps li { min-width: 0; }
.step {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; text-decoration: none;
  color: var(--muted); font-size: 12.5px; text-align: center; border-radius: 5px; position: relative;
}
.step .num { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-family: var(--mono); font-size: 11px;
  border: 1px solid var(--edge); background: var(--surface); color: var(--faint); }
.step .lbl { max-width: 100%; line-height: 1.3; word-break: keep-all; overflow-wrap: anywhere; }
a.step:hover { background: var(--surface-2); color: var(--strong); }
.steps li.done .num { border-color: var(--accent-line); color: var(--accent); background: var(--accent-weak); }
.steps li.current .step { color: var(--strong); font-weight: 600; background: var(--raised); }
.steps li.current .num { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 700; }
.step.disabled { opacity: .5; }
@media (min-width: 640px) {
  .step { flex-direction: row; justify-content: center; gap: 8px; font-size: 13.5px; }
}

/* ------------------------------------------------------------------ type */
main { padding-top: 8px; padding-bottom: 56px; }
.hero { padding: 26px 0 6px; }
.hero.center { text-align: center; padding-top: 64px; }
h1, .h1 { font-family: var(--display); font-size: 24px; line-height: 1.3; margin: 0 0 10px; font-weight: 700; color: var(--strong); letter-spacing: 0; }
.headline { font-family: var(--display); font-size: 20px; line-height: 1.5; margin: 0 0 12px; font-weight: 700; color: var(--strong); }
@media (min-width: 720px) { h1, .h1 { font-size: 28px; } .headline { font-size: 22px; } }
.lead { font-size: 15.5px; color: var(--muted); margin: 0 0 12px; max-width: 46em; }
.eyebrow { margin: 0 0 8px; color: var(--faint); font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; font-weight: 400; }
.h2 { font-size: 16px; margin: 0 0 6px; font-weight: 600; color: var(--strong); }
.h3 { font-size: 14.5px; margin: 0 0 8px; color: var(--strong); }
.h4 { font-size: 12.5px; margin: 14px 0 6px; color: var(--muted); font-weight: 600; }
.section { margin-top: 32px; }
.hint { color: var(--muted); font-size: 13px; margin: 6px 0 0; }
.soft-note { margin: 16px 0 0; padding: 10px 14px; border-radius: var(--radius); background: var(--accent-weak); border: 1px solid var(--accent-line); font-size: 14px; }

/* ------------------------------------------------------------------ cards / forms */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); margin-top: 16px; }
.card.small { padding: 12px 16px; font-size: 13.5px; }
@media (min-width: 720px) { .card { padding: 22px 26px; } }
.form .field { margin: 14px 0 0; }
.form label { display: block; font-weight: 600; margin-bottom: 6px; color: var(--strong); font-size: 14px; }
input[type="url"], input[type="text"], input[type="password"], input[type="email"] {
  width: 100%; min-height: 42px; padding: 8px 12px; font: inherit; color: var(--text);
  background: var(--surface); border: 1px solid var(--edge); border-radius: var(--radius);
}
input[type="url"]:focus, input[type="text"]:focus, input[type="password"]:focus, input[type="email"]:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0, 121, 173, .14); }
input[type="file"] { width: 100%; font: inherit; color: var(--muted); padding: 10px; border: 1px dashed var(--edge); border-radius: var(--radius); background: var(--surface-2); }
input[type="file"]::file-selector-button { font: inherit; margin-right: 10px; padding: 5px 12px; border-radius: 6px; border: 1px solid var(--edge); background: var(--surface); color: var(--text); cursor: pointer; }
.or { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 12.5px; margin: 18px 0 4px; }
.or::before, .or::after { content: ""; height: 1px; background: var(--border); flex: 1; }
.alert { padding: 10px 14px; border-radius: var(--radius); background: #fdf1f1; border: 1px solid rgba(214, 51, 58, .4); color: #9e1f25; margin-bottom: 8px; }
.alert-info { margin-top: 16px; background: var(--accent-weak); border-color: var(--accent-line); color: var(--text); }

.targets { border: 0; padding: 0; margin: 28px 0 0; min-width: 0; }
.targets legend { padding: 0; margin-bottom: 10px; }
.target-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 640px) { .target-grid { grid-template-columns: 1fr 1fr; } }
.target { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--edge); border-radius: var(--radius); background: var(--surface); cursor: pointer; }
.target input { accent-color: var(--accent); width: 18px; height: 18px; flex: none; margin: 0; }
.target-body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.target-name { font-weight: 600; }
.target-note { font-size: .85rem; color: var(--muted); }
.target-tag { font-size: .75rem; color: var(--accent); border: 1px solid var(--accent-line); border-radius: 999px; padding: 1px 8px; flex: none; }
.target:has(input:checked) { border-color: var(--accent); background: var(--accent-weak); box-shadow: inset 0 0 0 1px var(--accent); }
.target.is-disabled { cursor: not-allowed; opacity: .5; background: var(--surface-2); }

.traffic { margin-top: 24px; border-top: 1px solid var(--border); padding-top: 14px; }
.traffic summary { cursor: pointer; font-weight: 600; color: var(--text); }
.traffic p { color: var(--muted); font-size: .95rem; }
.copyline { display: flex; align-items: stretch; gap: 8px; margin-top: 8px; min-width: 0; }
.copyline code { flex: 1; min-width: 0; display: block; padding: 10px 12px; border-radius: var(--radius-s); background: var(--surface-2); border: 1px solid var(--border); overflow-x: auto; white-space: nowrap; font-size: .82rem; }

/* ------------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 6px 16px;
  font: inherit; font-size: 14px; font-weight: 600; color: var(--text); text-decoration: none; cursor: pointer; white-space: nowrap;
  background: var(--surface); border: 1px solid var(--edge); border-radius: var(--radius);
}
.btn:hover { border-color: var(--faint); color: var(--strong); background: var(--surface); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 700; }
.btn-primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--on-accent); }
.btn-lg { min-height: 46px; padding: 10px 24px; font-size: 15px; }
.btn-small { min-height: 30px; padding: 2px 11px; font-size: 12.5px; font-weight: 500; }
.btn-block { width: 100%; margin-top: 22px; min-height: 48px; font-size: 15px; }
.btn-primary.btn-block::after, .btn-primary.btn-lg::after { content: "\2192"; font-weight: 400; margin-left: 2px; }
.btn[disabled], .btn.is-disabled { cursor: not-allowed; opacity: .55; }
.btn-primary[disabled] { background: var(--faint); border-color: var(--faint); }
.actions { margin-top: 36px; }
.action-row { display: flex; flex-wrap: wrap; gap: 12px; }
.action-row form { display: contents; }
@media (max-width: 560px) { .action-row > .btn, .action-row button { width: 100%; } }
.downloads { display: flex; flex-wrap: wrap; gap: 10px; }
.inline-form { margin-top: 14px; }
.dev-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 28px; padding: 10px 12px; border: 1px dashed var(--border); border-radius: var(--radius-s); font-size: .9rem; }
.dev-tools form { margin: 0; }

/* ------------------------------------------------------------------ figures */
.figures { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 20px; }
@media (min-width: 720px) { .figures { grid-template-columns: repeat(4, minmax(0, 1fr)); } .figures-3 { grid-template-columns: 1fr 1fr 2fr; } }
.figures-3 .fig-counts { grid-column: 1 / -1; }
@media (min-width: 720px) { .figures-3 .fig-counts { grid-column: auto; } }
.fig { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; min-width: 0; }
.fig-v { font-family: var(--display); font-size: 1.3rem; font-weight: 700; line-height: 1.3; color: var(--strong); font-variant-numeric: tabular-nums; word-break: keep-all; }
@media (min-width: 720px) { .fig-v { font-size: 1.45rem; } }
.fig-l { color: var(--faint); font-size: 12px; margin-top: 2px; }
.counts { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; height: 100%; }
.count { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; color: var(--muted); white-space: nowrap; }
.count strong { color: var(--text); font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ status (only place status colours are used) */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 11px; border: 1px solid currentColor; font-size: 12px; font-weight: 600; white-space: nowrap; flex: none; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; display: inline-block; }
.st-queued { color: var(--st-queued); }
.st-running { color: var(--st-running); }
.st-passed { color: var(--st-passed); }
.st-unresolved { color: var(--st-unresolved); }
.pill.st-queued { background: var(--st-queued-bg); }
.pill.st-running { background: var(--st-running-bg); }
.pill.st-passed { background: var(--st-passed-bg); }
.pill.st-unresolved { background: var(--st-unresolved-bg); }
.pill.st-running .dot { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .pill.st-running .dot, .spinner { animation: none; } }
.cnt { font-variant-numeric: tabular-nums; font-weight: 600; }

/* ------------------------------------------------------------------ plan items */
.items { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 14px; }
.item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
@media (min-width: 720px) { .item { padding: 22px 24px; } }
.item.is-blocker { border-color: var(--accent-line); background: linear-gradient(var(--accent-weak), var(--accent-weak)) top / 100% 4px no-repeat, var(--surface); }
.item-head { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.item-num { width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); font-weight: 650; font-size: .85rem; margin-top: 1px; }
.item-title { font-size: 1.05rem; margin: 2px 0 0; flex: 1 1 auto; min-width: 8em; font-weight: 650; }
.item-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { display: inline-block; font-size: .78rem; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); white-space: nowrap; background: var(--surface); }
.badge-auto { color: var(--accent); border-color: var(--accent-line); }
.badge-traffic { border-style: dashed; color: var(--text); }
.badge-manual { border-style: dashed; }
.badge-blocker { background: var(--accent-weak); border-color: var(--accent-line); color: var(--accent-strong); font-weight: 600; }
/* optional tier: checks the default deployment does not need, listed apart and visually quieter */
.badge-optional { border-style: dashed; color: var(--muted); font-weight: 600; }
.item.is-optional { border-style: dashed; box-shadow: none; }
.optional-why { margin-top: 12px; }
@media (max-width: 480px) { .item-badges { width: 100%; padding-left: 40px; } .badge { white-space: normal; } }

dl { margin: 0; }
.three { display: grid; gap: 10px; margin-top: 14px; }
.three > div { display: grid; grid-template-columns: 1fr; gap: 0; }
.three dt { color: var(--muted); font-size: .82rem; font-weight: 600; }
.three dd { margin: 0; }
@media (min-width: 720px) {
  .three > div { grid-template-columns: 9.5em 1fr; gap: 16px; }
  :lang(en) .three > div { grid-template-columns: 9em 1fr; }
  .three dt { font-size: .9rem; padding-top: 1px; }
}
.blocker-note { margin: 14px 0 0; font-size: .92rem; color: var(--text); padding-left: 12px; border-left: 3px solid var(--accent-line); }

.gaps, .assumptions { padding: 0; margin: 12px 0 0; list-style: none; display: grid; gap: 8px; }
.gap { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-s); }
.gap-status { font-weight: 600; font-size: .9rem; min-width: 7em; }
.gap-unsupported .gap-status, .gap-check .gap-status { color: var(--accent-strong); }
.gap-supported .gap-status { color: var(--muted); }
.gap-note { flex: 1 1 18em; min-width: 0; }
.gap-tech { width: 100%; font-size: .82rem; color: var(--muted); }
.assumptions li { padding-left: 18px; position: relative; color: var(--muted); }
.assumptions li::before { content: ""; position: absolute; left: 4px; top: .75em; width: 5px; height: 5px; border-radius: 50%; background: var(--faint); }

/* ------------------------------------------------------------------ technical details */
.tech { display: none; }
.tech-on .tech { display: block; }
.tech-on .tech-inline { display: inline; }
.item-tech { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--border); font-size: .88rem; }
.eng-title { margin: 0 0 10px; font-weight: 600; }
.kvs { display: grid; gap: 6px; }
.kv { display: grid; grid-template-columns: 1fr; }
.kv dt { color: var(--muted); font-size: .8rem; }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
@media (min-width: 640px) { .kv { grid-template-columns: 9em 1fr; gap: 12px; } .kv dt { font-size: .88rem; } }
.ladder { list-style: none; padding: 0; margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 4px; }
.ladder li { display: inline-flex; align-items: center; gap: 4px; }
.ladder li + li::before { content: "\2192"; color: var(--faint); }
.ladder code { padding: 1px 6px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border); }
.ladder li.on code { background: var(--accent-weak); border-color: var(--accent); color: var(--accent-strong); }
.incidents { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.inc-head { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.rule { color: var(--accent-strong); }
.loc { font-family: var(--mono); font-size: .82rem; color: var(--muted); overflow-wrap: anywhere; }
.snippet { margin: 4px 0 0; padding: 8px 10px; background: var(--surface-2); border-radius: 6px; border: 1px solid var(--border); white-space: pre-wrap; overflow-wrap: anywhere; font-size: .8rem; }
.files { margin: 0; padding-left: 18px; }

/* ------------------------------------------------------------------ progress */
.live-inner > .headline { margin-top: 0; }
.progress-list { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 8px; }
.prow { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.prow .pill { margin-top: 2px; min-width: 5.6em; justify-content: center; }
.prow-body { flex: 1; min-width: 0; }
.prow-title { font-weight: 600; }
.prow-activity { color: var(--muted); font-size: .93rem; }
.prow-needs { font-size: .9rem; margin-top: 4px; }
.prow-tech { font-size: .82rem; margin-top: 8px; color: var(--muted); }
.st-row-running { border-color: var(--st-running); }
@media (max-width: 480px) { .prow { flex-direction: column; gap: 6px; align-items: stretch; } .prow .pill { align-self: flex-start; } }

.spinner { width: 34px; height: 34px; margin: 0 auto 18px; border-radius: 50%; border: 3px solid var(--border); border-top-color: var(--accent); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------------ results */
.cards { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 20px; }
@media (min-width: 760px) { .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.rcard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; min-width: 0; }
.rcard-title { font-size: .9rem; color: var(--muted); margin: 0; font-weight: 600; }
.rcard-word { font-size: 1.4rem; font-weight: 650; margin: 4px 0 0; display: flex; align-items: center; gap: 8px; }
.rcard-word .dot { width: 10px; height: 10px; }
.tone-passed .rcard-word { color: var(--st-passed); }
.tone-unresolved .rcard-word { color: var(--st-unresolved); }
.tone-queued .rcard-word { color: var(--st-queued); }
.rcard-count { margin: 2px 0 0; font-size: .88rem; color: var(--muted); }
.rcard-lines { margin: 12px 0 0; padding-left: 18px; font-size: .92rem; display: grid; gap: 6px; }
.more summary { cursor: pointer; color: var(--accent); font-size: .88rem; margin-top: 8px; }
.unresolved { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 10px; }
.ucard { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--st-unresolved); border-radius: var(--radius); padding: 16px 18px; }
.ucard-title { margin: 0; font-weight: 600; }
.steps-list { padding-left: 22px; display: grid; gap: 14px; margin: 12px 0 0; }
.steps-list .btn-small { margin-left: 6px; }
.steps-list > li, .cmd-list > li, .prow-body, .three > div > dd, .progress-list > li, .items > li, .unresolved > li, .plain-list > li, .cards > *, .opt-rows > li { min-width: 0; }  /* long commands scroll inside .copyline instead of widening the page */

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: var(--radius-s); background: var(--surface); margin-top: 12px; }
.table { border-collapse: collapse; width: 100%; font-size: .86rem; }
.table th, .table td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.table th { color: var(--faint); font-weight: 600; background: var(--surface-2); white-space: nowrap; font-size: 11.5px; letter-spacing: .04em; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.dec { font-weight: 600; white-space: nowrap; }
.dec-pass { color: var(--st-passed); }
.dec-fail, .dec-inconclusive { color: var(--st-unresolved); }
.tag { font-size: 11px; height: 20px; padding: 0 7px; border-radius: 4px; border: 1px solid var(--edge); color: var(--muted); display: inline-flex; align-items: center; white-space: nowrap; }
.admin-table td { white-space: normal; }
.admin-table { min-width: 900px; }
.tenant-table { min-width: 620px; }
.table td.nowrap, .table .nowrap { white-space: nowrap; }

/* ------------------------------------------------------------------ tooltip */
.term { border-bottom: 1px dotted currentColor; cursor: help; text-decoration: none; }
.term:focus-visible { outline-offset: 1px; }
.tip {
  position: fixed; z-index: 100; max-width: min(300px, calc(100vw - 32px)); padding: 8px 12px; border-radius: 8px;
  background: var(--strong); color: #fff; font-size: .85rem; line-height: 1.5; box-shadow: 0 6px 20px rgba(0,0,0,.18);
  pointer-events: none;
}

/* ------------------------------------------------------------------ footer */
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; color: var(--faint); font-size: .82rem; padding-top: 24px; padding-bottom: 32px; border-top: 1px solid var(--border); }
.footer a { color: var(--faint); }

/* ------------------------------------------------------------------ print */
.print-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 20px 0 0; }
.print-brand { font-weight: 650; }
@media print {
  :root { --bg: #fff; --surface: #fff; --surface-2: #f4f4f4; --text: #000; --muted: #444; --border: #ccc; --shadow: none; }
  body { background: #fff; font-size: 11pt; }
  .no-print, .topbar, .steps, .footer, .dev-tools, .actions, .banner-dev { display: none !important; }
  .wrap { max-width: none; padding: 0; }
  .item, .fig, .gap, .rcard, .ucard, .card { break-inside: avoid; box-shadow: none; }
  .term { border-bottom: 0; }
  a { color: inherit; text-decoration: none; }
  .hero { padding-top: 8px; }
}

/* results: report confidence (1-5) */
.conf-head { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.conf-dots { display: inline-flex; gap: 4px; color: var(--border); }
.conf-dots .dot { width: 10px; height: 10px; }
.conf-dots .dot.on { color: var(--accent); }
.conf-score { color: var(--muted); font-variant-numeric: tabular-nums; }
.conf-reasons { margin: 8px 0 0; padding-left: 18px; }
.conf-hint { margin: 8px 0 0; }

/* auth: login link / logout button in the top bar, login page */
.auth-link { height: 32px; padding: 0 12px; border-radius: 6px; display: inline-flex; align-items: center; font-size: 13px; font-weight: 600;
  background: var(--accent); color: var(--on-accent); text-decoration: none; }
.auth-link:hover { background: var(--accent-strong); color: var(--on-accent); }
.auth-out { display: inline; margin: 0; }
.auth-out button { font: inherit; font-size: 12.5px; color: var(--muted); background: none; border: 1px solid var(--border); border-radius: 6px;
  height: 28px; padding: 0 10px; cursor: pointer; }
.auth-out button:hover { color: var(--strong); border-color: var(--edge); }
.login-card { max-width: 440px; }
.banner-auth { background: var(--accent-weak); border-bottom-color: var(--accent-line); }

/* results / deploy: downloads and signature details */
.downloads { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.dl-note { display: block; font-size: .8rem; color: var(--muted); font-weight: 400; }
.hashes { display: grid; grid-template-columns: minmax(150px, max-content) 1fr; gap: 6px 16px; margin: 12px 0 0; font-size: .86rem; }
.hashes dt { color: var(--muted); }
.hashes dd { margin: 0; min-width: 0; }
.cmd-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 8px; }
.cmd-label { font-size: .85rem; color: var(--muted); }
.warn-note { margin: 12px 0 0; padding: 10px 14px; border-radius: var(--radius-s); border: 1px solid var(--border); border-left: 4px solid var(--st-unresolved); background: var(--surface); }
.pending-list { margin: 8px 0 0; padding-left: 18px; font-size: .92rem; }

/* ------------------------------------------------------------------ accessibility helpers */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.btn:focus-visible, .tech-toggle:focus-visible, .lang-toggle:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
select { font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-s); min-height: 40px; padding: 6px 10px; max-width: 100%; }
select:focus-visible, input[type="checkbox"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ------------------------------------------------------------------ results: next steps, GPU phase */
.next { border-left: 4px solid var(--accent); }
.next .h3 { margin: 0 0 4px; }
.next-list { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.gpu-note { margin: 16px 0 0; padding: 10px 14px; border-radius: var(--radius-s); border: 1px solid var(--border); background: var(--surface); display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 1px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.gpu-queued { color: var(--st-queued); } .chip.gpu-queued { background: var(--st-queued-bg); }
.gpu-running { color: var(--st-running); } .chip.gpu-running { background: var(--st-running-bg); }
.gpu-verified { color: var(--st-passed); } .chip.gpu-verified { background: var(--st-passed-bg); }
.gpu-failed { color: var(--st-unresolved); } .chip.gpu-failed { background: var(--st-unresolved-bg); }
.gpu-simulated, .gpu-inconclusive { color: var(--st-queued); }
.chip.gpu-simulated, .chip.gpu-inconclusive { background: var(--st-queued-bg); }
.gpu-note > span:not(.chip), .gpu-note .muted { color: var(--text); }
.gpu-note.gpu-failed { border-left: 4px solid var(--st-unresolved); }
.chip.gpu-running .dot { animation: pulse 1.4s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .chip.gpu-running .dot { animation: none; } }
.conf-title { margin: 0; font-size: 1rem; }
.conf-head .h3 { margin: 0; }
.ucard-title { font-size: 1rem; }

/* ------------------------------------------------------------------ progress rows */
h2.prow-title { font-size: 1rem; margin: 0; line-height: 1.5; }
.prow-what { font-size: .92rem; color: var(--text); }
.prow-story { font-size: .9rem; margin-top: 4px; padding-left: 10px; border-left: 2px solid var(--border); }
.attempts { margin-top: 8px; }
.attempts .table { font-size: .8rem; }

/* ------------------------------------------------------------------ optimization card */
.opt .rcard { margin-top: 12px; }
.opt-rows { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 10px; }
.opt-row { padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-s); background: var(--bg); }
.opt-label { font-weight: 600; font-size: .95rem; }
.opt-vals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 12px; margin-top: 4px; }
.opt-vals dt { color: var(--muted); font-size: .78rem; }
.opt-vals dd { margin: 0; font-variant-numeric: tabular-nums; }
@media (max-width: 420px) { .opt-vals { grid-template-columns: 1fr 1fr; } }
.opt-tech { margin-top: 12px; }
.plain-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 10px; }
.ilist { padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-s); }
.ilist p { margin: 0; }
.ilist p + p { margin-top: 4px; }

/* ------------------------------------------------------------------ deploy */
.deploy-top .action-row { align-items: center; }
.deploy-top .btn[disabled] { font-weight: 500; }

/* ------------------------------------------------------------------ operator view */
.filters .filter-row { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; }
.filters .field { margin: 0; display: flex; flex-direction: column; min-width: 0; }
.filters .field label { font-weight: 600; font-size: .85rem; margin-bottom: 4px; }
.filters .grow { flex: 1 1 14em; }
.filters input[type="text"] { min-height: 40px; }
.filter-actions { margin-top: 10px; }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.att { display: inline-block; font-size: .78rem; color: var(--st-unresolved); border: 1px solid currentColor; border-radius: 999px; padding: 0 8px; margin: 1px 4px 1px 0; white-space: nowrap; }
.row-attention td:first-child { box-shadow: inset 3px 0 0 var(--st-unresolved); }
.row-head { font-weight: 600; color: var(--text); background: none; white-space: normal; }
@media (max-width: 560px) { .filters .field { flex: 1 1 100%; } .filters select { width: 100%; } }

/* ------------------------------------------------------------------ sign-in page: the company website's dark look (as Preworld's) */
body.page-login {
  --bg: #080a0e; --surface: rgba(11, 14, 20, .78); --surface-2: rgba(255, 255, 255, .03); --raised: rgba(255, 255, 255, .08);
  --text: #e0e3e9; --strong: #f2f2ef; --muted: #9298a4; --faint: #8f96a2;
  --border: rgba(220, 229, 249, .14); --edge: rgba(255, 255, 255, .21);
  --accent: #b5c9ed; --accent-strong: #c6d7f9; --accent-weak: rgba(181, 201, 237, .08); --accent-line: rgba(181, 201, 237, .4); --on-accent: #171a21;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --radius: 0; --shadow: none;
  color-scheme: dark; background: #080a0e; background-image: none; position: relative; min-height: 100vh;
}
body.page-login .topbar { background: rgba(8, 10, 14, .6); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
body.page-login .lang-switch { background: transparent; border-radius: 0; }
body.page-login .lang-switch span { background: rgba(255, 255, 255, .1); }
body.page-login .footer { position: relative; z-index: 1; border-top-color: var(--border); }
body.page-login main { position: relative; z-index: 1; }
.sky { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
  background: radial-gradient(ellipse 120% 42% at 50% 118%, rgba(138, 179, 234, .13), rgba(71, 126, 203, .05) 45%, transparent 70%); }
.sky::before { content: ""; position: absolute; inset: -12%; background: radial-gradient(ellipse at 72% 46%, rgba(43, 84, 128, .3), transparent 45%),
  radial-gradient(ellipse at 22% 26%, rgba(35, 62, 96, .22), transparent 44%); animation: sky-drift 32s ease-in-out infinite alternate; }
.sky::after { content: ""; position: absolute; inset: 0; opacity: .75; background-size: 640px 520px;
  background-image: radial-gradient(1px 1px at 7% 13%, rgba(255, 255, 255, .7), transparent 60%), radial-gradient(1px 1px at 23% 71%, rgba(255, 255, 255, .45), transparent 60%),
    radial-gradient(1.5px 1.5px at 38% 27%, rgba(214, 228, 255, .7), transparent 60%), radial-gradient(1px 1px at 52% 83%, rgba(255, 255, 255, .4), transparent 60%),
    radial-gradient(1px 1px at 66% 9%, rgba(255, 255, 255, .55), transparent 60%), radial-gradient(1.5px 1.5px at 81% 57%, rgba(214, 228, 255, .55), transparent 60%),
    radial-gradient(1px 1px at 93% 31%, rgba(255, 255, 255, .5), transparent 60%), radial-gradient(1px 1px at 47% 56%, rgba(255, 255, 255, .3), transparent 60%); }
@keyframes sky-drift { from { transform: translate3d(-2%, -1%, 0) scale(1); } to { transform: translate3d(2%, 1.5%, 0) scale(1.06); } }
@media (prefers-reduced-motion: reduce) { .sky::before { animation: none; } }
.login { width: min(460px, 100%); margin: clamp(32px, 9vh, 96px) auto 0; display: grid; gap: 18px; position: relative; z-index: 1; }
.login-head { display: grid; justify-items: center; gap: 12px; margin-bottom: 10px; text-align: center; }
.login-plate { margin: 0; display: inline-flex; align-items: center; gap: 12px; font-size: 11px; font-weight: 500; letter-spacing: .18em; color: #b8c4d7; }
.login-plate::before { content: "\2726"; font-size: 14px; letter-spacing: 0; color: var(--accent); }
.login-title { font-family: var(--font); font-weight: 400; font-size: clamp(34px, 7vw, 50px); line-height: 1.12; letter-spacing: -.02em; margin: 0; }
.login-sub { margin: 0; max-width: 440px; font-size: 14px; line-height: 1.8; color: var(--muted); }
.login-card { margin: 0; padding: 0; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.login-card-head { min-height: 44px; padding: 12px 18px; border-bottom: 1px solid var(--border); font-size: 11px; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: #b8c4d7; }
details.login-card > summary.login-card-head { cursor: pointer; border-bottom: 0; list-style: none; }
details.login-card[open] > summary.login-card-head { border-bottom: 1px solid var(--border); }
.login-card-body { padding: 18px; }
.login-card-body .btn-block { margin-top: 4px; }
body.page-login .btn-primary { background: #eeefec; border-color: #eeefec; color: #171a21; font-weight: 500; letter-spacing: .03em; }
body.page-login .btn-primary:hover { background: #fff; border-color: #fff; color: #171a21; }
body.page-login .btn:not(.btn-primary) { border-color: var(--edge); background: rgba(255, 255, 255, .01); color: var(--text); }
body.page-login input[type="password"] { background: rgba(255, 255, 255, .03); border-color: var(--edge); color: var(--strong); }
body.page-login .alert { background: rgba(235, 154, 154, .08); border-color: rgba(235, 154, 154, .35); color: #f0a7a7; }

.check.auto-start { margin-top: 22px; font-weight: 600; color: var(--strong); font-size: 14px; }
.check.auto-start + .hint { margin-left: 24px; }
.runs-table { min-width: 620px; }
.runs-table td:first-child { min-width: 14em; }
