/* STLSTPAscender · 升阶 — AMEDAO (amyidao.com) */
:root {
  --bg: #f3f4f6; --panel: #ffffff; --panel2: #f8f9fb; --text: #1b1f24; --muted: #6b7280; --line: #e3e6ea;
  --accent: #2c7be5; --accent2: #1f5fb8; --ok: #1f9d55; --warn: #c7811a; --bad: #d1443a; --sel: #ff9e1b;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --radius: 12px; --font: "Inter", "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #121417; --panel: #1b1e23; --panel2: #22262c; --text: #e8eaee; --muted: #9aa3ad; --line: #2c3139;
  --accent: #5b9cf0; --accent2: #7fb4f5; --ok: #3fbf74; --warn: #e0a03c; --bad: #ef6b61; --sel: #ffb347;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4); color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font); font-size: 13.5px; color: var(--text); background: var(--bg); line-height: 1.45; }
button, input, select { font: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h3 { margin: 0 0 8px; font-size: 13px; letter-spacing: .02em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
h4 { margin: 10px 0 4px; font-size: 12px; color: var(--muted); font-weight: 600; }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: 12px; margin: 4px 0 8px; }
.hint.warn { color: var(--warn); } .hint.ok { color: var(--ok); } .warn { color: var(--warn); }

.app { display: grid; grid-template-rows: auto auto 1fr auto auto auto auto; height: 100vh; min-height: 640px; }
.top { display: flex; align-items: center; gap: 18px; padding: 8px 16px; background: var(--panel); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; min-width: 260px; }
.brand .logo { display: inline-flex; }
.brand .name { font-size: 17px; line-height: 1.1; }
.brand .cn { margin-left: 8px; font-weight: 600; color: var(--accent); }
.brand .cn.en { font-size: 12px; font-weight: 500; }
html[lang="zh-CN"] .brand .name b { font-size: 20px; }
.brand .tagline { font-size: 11.5px; color: var(--muted); }
.stages { display: flex; gap: 6px; flex: 1; justify-content: center; flex-wrap: wrap; }
.pill { padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel2); color: var(--muted); font-size: 12px; }
.pill.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.pill.done { color: var(--ok); border-color: var(--ok); }
.tools { display: flex; align-items: center; gap: 8px; }
.tools .dev { font-size: 12px; color: var(--muted); padding: 4px 8px; border-radius: 8px; background: var(--panel2); }
.btn { border: 1px solid var(--line); background: var(--panel2); border-radius: 9px; padding: 7px 12px; cursor: pointer; transition: background .15s, border-color .15s; }
.btn:hover { border-color: var(--accent); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.btn.primary:hover:not(:disabled) { background: var(--accent2); }
.btn.ghost { background: transparent; }
.btn.small { padding: 4px 9px; font-size: 12px; border-radius: 7px; }
.btn.danger { border-color: var(--bad); color: var(--bad); }
.linkbtn { background: none; border: 0; padding: 0; text-align: left; cursor: pointer; color: inherit; }
.linkbtn:hover { text-decoration: underline; }

.body { display: grid; grid-template-columns: 300px 1fr 320px; gap: 12px; padding: 12px 16px; min-height: 0; }
.left, .right { overflow: auto; display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow); }
.card.attention { border-color: var(--warn); box-shadow: 0 0 0 3px rgba(199, 129, 26, .15); }
.row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 6px 0; }
.row > label, .row > span:first-child { white-space: nowrap; }
.row.wrap { flex-wrap: wrap; }
.row.wrap .inline { flex-wrap: wrap; row-gap: 4px; }
.row.actions { justify-content: flex-start; margin-top: 12px; }
.inline { display: inline-flex; align-items: center; gap: 8px; }
.num { width: 86px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel2); }
.select { padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel2); max-width: 190px; }
.chk { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.unit { color: var(--muted); font-size: 12px; }
details.adv summary { cursor: pointer; color: var(--muted); font-size: 12px; margin: 6px 0; }
.lab { display: inline-flex; align-items: center; gap: 5px; }
.help { width: 17px; height: 17px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel2); color: var(--muted); font-size: 11px; font-weight: 700; line-height: 1; padding: 0; cursor: help; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.help:hover, .help.on { border-color: var(--accent); color: var(--accent); background: rgba(44, 123, 229, .08); }
.help.wide { width: auto; border-radius: 999px; padding: 1px 8px 1px 6px; gap: 4px; font-weight: 600; text-transform: none; letter-spacing: 0; font-size: 11px; margin-left: auto; cursor: pointer; white-space: nowrap; }
h3 .help { vertical-align: middle; }
h3 { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pop { position: fixed; z-index: 60; background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; box-shadow: 0 10px 30px rgba(16, 24, 40, .18); font-size: 12.5px; line-height: 1.5; }
.pop b { display: block; margin-bottom: 6px; font-size: 13px; }
.pop .popbody div + div { margin-top: 4px; }
.pop .poptip { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); color: var(--accent2); }
.pop .poptip span { font-weight: 600; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; font-size: 12.5px; }
.kv .k { color: var(--muted); white-space: nowrap; max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.kv.compact { font-size: 12px; }
.actions.first { margin-top: 0; }
.kv .v { word-break: break-word; }
.kv .v.actions { display: flex; gap: 6px; flex-wrap: wrap; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }

.drop { border: 1.5px dashed var(--line); border-radius: var(--radius); padding: 18px 12px; text-align: center; cursor: pointer; background: var(--panel2); transition: border-color .15s, background .15s; }
.drop:hover, .drop.hover { border-color: var(--accent); background: rgba(44, 123, 229, .06); }
.drop-title { font-weight: 600; }
.drop-hint { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.segbtn { border: 0; background: var(--panel2); padding: 6px 12px; cursor: pointer; }
.segbtn.on { background: var(--accent); color: #fff; font-weight: 600; }
.dims { margin-top: 8px; display: flex; flex-direction: column; gap: 2px; }
.dims b { font-size: 15px; }

.center { display: flex; flex-direction: column; gap: 8px; min-height: 0; min-width: 0; }
.viewtabs { display: flex; gap: 4px; min-width: 0; }
.tab { border: 1px solid var(--line); background: var(--panel); border-radius: 9px 9px 0 0; padding: 6px 12px; cursor: pointer; color: var(--muted); }
.tab[aria-selected="true"] { color: var(--text); font-weight: 600; border-bottom-color: var(--panel); background: var(--panel2); }
.viewport { position: relative; flex: 1; min-height: 320px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--panel2); }
.viewport canvas { width: 100%; height: 100%; display: block; }
.vtools { position: absolute; top: 8px; right: 8px; display: flex; gap: 6px; }
.overlay { position: absolute; left: 10px; bottom: 8px; font-size: 12px; color: var(--muted); max-width: 70%; }
.legend { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 20px; }
.legend .kb { margin-left: auto; font-size: 11px; }
.ramp { display: inline-block; width: 120px; height: 10px; border-radius: 5px; background: linear-gradient(90deg, #296bdb, #33b88c, #f7c733, #db3329); }
.sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 2px; }
.sw.c0 { background: #bfb8a8; } .sw.c1 { background: #408cf2; } .sw.c2 { background: #f9bf40; } .sw.c3 { background: #f2594c; } .sw.c4 { background: #33b89e; } .sw.c5 { background: #946beb; }

.rlist, .ilist, .checks { list-style: none; margin: 0; padding: 0; }
.rlist { max-height: 160px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.ritem { display: grid; grid-template-columns: 14px 1fr auto; gap: 8px; width: 100%; text-align: left; border: 0; background: transparent; padding: 5px 8px; cursor: pointer; align-items: center; font-size: 12.5px; }
.ritem:hover { background: rgba(44, 123, 229, .08); }
.ritem.on { background: rgba(255, 158, 27, .18); font-weight: 600; }
.ritem .sw { width: 10px; height: 10px; }
.ritem[data-cls="0"] .sw { background: #bfb8a8; } .ritem[data-cls="1"] .sw { background: #408cf2; } .ritem[data-cls="2"] .sw { background: #f9bf40; } .ritem[data-cls="3"] .sw { background: #f2594c; } .ritem[data-cls="4"] .sw { background: #33b89e; } .ritem[data-cls="5"] .sw { background: #946beb; }
.ilist li { padding: 5px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.ilist li:last-child { border-bottom: 0; }
.ilist .sev2 { color: var(--warn); } .ilist .sev1 { color: var(--text); } .ilist .sev0, .ilist .muted { color: var(--muted); } .ilist .ok { color: var(--ok); }
.checks li { font-size: 12px; padding: 2px 0; } .checks .ok { color: var(--ok); } .checks .bad { color: var(--bad); } .checks .na { color: var(--muted); }
.result { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; margin-bottom: 10px; background: var(--panel2); border: 1px solid var(--line); }
.result .badge { display: inline-flex; width: 26px; height: 26px; border-radius: 50%; align-items: center; justify-content: center; font-weight: 700; color: #fff; background: var(--muted); }
.result.analytic-solid .badge, .result.mixed-solid .badge, .result.freeform-solid .badge { background: var(--ok); }
.result.open-shell .badge, .result.faceted-fallback .badge { background: var(--warn); }
.result.failed .badge { background: var(--bad); }
.result.analytic-solid, .result.freeform-solid { border-color: var(--ok); }
.result.open-shell, .result.faceted-fallback { border-color: var(--warn); }
.result.failed { border-color: var(--bad); }
.result.lvl-ok .badge { background: var(--ok); } .result.lvl-ok { border-color: var(--ok); }
.result.lvl-warn .badge { background: var(--warn); } .result.lvl-warn { border-color: var(--warn); }
.result.lvl-error .badge { background: var(--bad); } .result.lvl-error { border-color: var(--bad); }
.notes { margin: 2px 0 10px; padding: 8px 10px; border-radius: 8px; background: var(--panel2); border: 1px solid var(--line); }
.notes .hint { margin: 2px 0 6px; line-height: 1.45; } .notes .hint:last-child { margin-bottom: 0; }
.notes .hint.bad { color: var(--bad); } .notes .hint.pro { color: var(--muted); font-style: italic; }
.btn.primary.warnbtn { background: var(--warn); border-color: var(--warn); }
.checks .warnli { color: var(--warn); }

.statusbar { display: flex; align-items: center; gap: 12px; padding: 6px 16px; background: var(--panel); border-top: 1px solid var(--line); font-size: 12.5px; }
.statusbar progress { flex: 1; max-width: 360px; height: 8px; accent-color: var(--accent); }
.statusbar progress.indet { opacity: .5; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.dot.ok { background: var(--ok); } .dot.bad { background: var(--bad); } .dot.warn { background: var(--warn); }
.spin { width: 14px; height: 14px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.ad { position: relative; border: 1px dashed var(--line); border-radius: 10px; background: var(--panel2); display: flex; align-items: center; justify-content: center; text-align: center; overflow: hidden; }
.ad.filled { border-style: solid; }
.ad .adtag, .sponsors .adtag, .partner .adtag { font-size: 9px; letter-spacing: .1em; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; background: var(--panel); text-transform: uppercase; }
.ad .adtag { position: absolute; top: 4px; left: 6px; }
.adtag.inline { position: static; margin-left: auto; font-weight: 400; }
.ad img { max-width: 100%; max-height: 100%; display: block; }
.ad .adframe { border: 0; width: 100%; display: block; background: transparent; color-scheme: normal; }
.ad.corner .adframe { width: 120px; }
.ad.rail .adframe { width: 160px; }
.unitsuspect { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; font-size: 12px; line-height: 1.4; }
.hint.warn.info { color: var(--muted); }
.ad .adph { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; color: var(--muted); background: none; border: 0; cursor: pointer; font: inherit; line-height: 1.35; }
.ad .adph b { color: var(--text); }
.ad .adph:hover b { color: var(--accent); }
.adph.text { display: flex; flex-direction: column; gap: 2px; background: none; border: 0; padding: 4px 0; cursor: pointer; font: inherit; color: var(--muted); text-align: left; }
.adph.text:hover span:first-child { color: var(--accent); }
.ad.side { min-height: 250px; }
.ad.inline { min-height: 90px; margin-top: 12px; }
.ad.top { margin: 8px 16px 0; min-height: 44px; }
.ad.top .adph { flex-direction: row; gap: 14px; align-items: baseline; padding: 8px 14px; }
.ad.top img { max-height: 90px; }
.ad.banner { margin: 0 16px 6px; min-height: 60px; }
.ad.banner .adph { flex-direction: row; gap: 14px; align-items: baseline; padding: 10px; }
.ad.banner img { max-height: 90px; }
.ad.corner { position: absolute; right: 8px; bottom: 8px; width: 132px; min-height: 48px; border-radius: 8px; background: color-mix(in srgb, var(--panel) 82%, transparent); backdrop-filter: blur(4px); }
.ad.corner .adph { padding: 6px 8px; font-size: 11px; gap: 1px; }
.ad.corner .adtag { display: none; }
.ad.corner img { max-height: 48px; max-width: 120px; }
.waitbox { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; flex-direction: column; gap: 10px; background: color-mix(in srgb, var(--panel2) 55%, transparent); backdrop-filter: blur(2px); }
.waitbox.show { display: flex; }
.waitmsg { font-size: 13px; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; box-shadow: var(--shadow); }
.ad.wait { width: 300px; min-height: 250px; background: var(--panel); box-shadow: var(--shadow); }
.ad.rail { display: none; position: fixed; top: 76px; width: 160px; height: 600px; z-index: 5; background: var(--panel); }
.ad.rail.left { left: 8px; } .ad.rail.right { right: 8px; }
.ad.rail .adph { padding: 10px; font-size: 12px; }
@media (min-width: 1700px) {
  .ad.rail { display: flex; }
  /* the rails live in dedicated gutters: the page content never runs under them */
  .app { padding: 0 184px; }
  /* header and status bar keep spanning the full width; only the working area sits between the rails */
  .top, .statusbar { margin-left: -184px; margin-right: -184px; padding-left: 200px; padding-right: 200px; }
  .ad.rail { top: 70px; }
  .ad.rail.left { left: 12px; } .ad.rail.right { right: 12px; }
}
.sponsors { display: flex; align-items: center; gap: 12px; margin: 0 16px; padding: 3px 10px; border: 1px dashed var(--line); border-radius: 8px; background: var(--panel2); min-height: 30px; font-size: 11.5px; }
.sponsors .adph.text { flex-direction: row; gap: 10px; align-items: baseline; padding: 0; }
.sponsors .slogo img { height: 24px; max-width: 110px; display: block; }
.partner { border-style: dashed; }
.partner .plist { list-style: none; margin: 0; padding: 0; font-size: 12.5px; }
.partner .plist li { padding: 3px 0; }
.linkbtn.accent { color: var(--accent); }
.modal { position: fixed; inset: 0; z-index: 70; background: rgba(16, 24, 40, .45); display: flex; align-items: center; justify-content: center; padding: 16px; }
.modalcard { background: var(--panel); color: var(--text); border-radius: 14px; border: 1px solid var(--line); max-width: 720px; width: 100%; max-height: 90vh; overflow: auto; padding: 18px 22px; box-shadow: 0 20px 60px rgba(0, 0, 0, .35); }
.modalcard h2 { margin: 0 0 8px; font-size: 18px; }
.modalcard p { margin: 6px 0 12px; font-size: 13px; }
.modalcard .contact { font-size: 14px; }
.adtable { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.adtable th, .adtable td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.adtable th { color: var(--muted); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .03em; }
.foot { display: flex; gap: 8px; align-items: center; padding: 6px 16px 10px; font-size: 11.5px; color: var(--muted); flex-wrap: wrap; }
.foot .sep { opacity: .5; }

@media (max-width: 1100px) {
  .body { grid-template-columns: 260px 1fr; }
  .right { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
  .right .card { flex: 1 1 300px; }
  .ad.side { flex: 1 1 300px; }
}
@media (max-width: 760px) {
  .app { height: auto; }
  .ad.top, .ad.banner, .sponsors { margin-left: 8px; margin-right: 8px; }
  .ad.corner { display: none; }
  .body { grid-template-columns: 1fr; }
  .top { flex-wrap: wrap; }
  .stages { order: 3; width: 100%; justify-content: flex-start; }
  .viewport { min-height: 260px; }
  /* five view tabs must fit a 360 px phone: they share the row and shrink instead of pushing the page wider */
  .viewtabs { gap: 2px; }
  .tab { flex: 1 1 auto; min-width: 0; padding: 6px 4px; font-size: 12px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
