:root {
  color-scheme: light;
  --bg: #ffffff;
  --panel: #ffffff;
  --panel-2: #f5f8fa;
  --panel-3: #edf3f5;
  --line: #d7e0e5;
  --text: #18232d;
  --muted: #617482;
  --teal: #187b6b;
  --teal-dark: #acdcd3;
  --amber: #b86a13;
  --blue: #367bc1;
  --red: #c74f4f;
  --shadow: 0 18px 55px rgba(28,48,61,.14);
  font-family: Calibri, "SimHei", "Heiti SC", "PingFang SC", Arial, sans-serif;
  font-size: 18px;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); }
body { min-height: 100vh; }
button, input, select { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, [contenteditable]:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
[hidden] { display: none !important; }

.login-screen { min-height: 100vh; display: grid; grid-template-columns: minmax(280px, .9fr) minmax(360px, 1.1fr); align-items: center; max-width: 1100px; margin: auto; padding: 5vw; gap: 8vw; }
.login-screen::before { content: ""; position: fixed; inset: 0; background: radial-gradient(circle at 20% 35%, rgba(24,123,107,.08), transparent 30%), radial-gradient(circle at 80% 80%, rgba(184,106,19,.06), transparent 26%); pointer-events: none; }
.login-mark { position: relative; height: 360px; display: flex; align-items: center; justify-content: center; gap: 11px; color: var(--teal); font-family: Calibri, "SimHei", "Heiti SC", sans-serif; font-size: 2rem; font-weight: 700; }
.login-mark::before, .login-mark::after { content: ""; position: absolute; width: 270px; height: 270px; border: 1px solid #c9dcd8; border-radius: 50%; }
.login-mark::after { width: 180px; height: 180px; border-color: #d8e4e1; }
.login-mark span { z-index: 1; width: 58px; height: 58px; display: grid; place-items: center; background: #ffffff; border: 1px solid var(--teal-dark); border-radius: 14px; box-shadow: var(--shadow); }
.login-mark i { width: 24px; height: 1px; background: var(--teal); z-index: 1; }
.login-card { max-width: 430px; width: 100%; padding: 42px; border: 1px solid var(--line); background: rgba(255,255,255,.96); border-radius: 20px; box-shadow: var(--shadow); }
.login-card h1 { margin: 7px 0 12px; font-size: 2.2rem; letter-spacing: -.04em; }
.login-copy { color: var(--muted); line-height: 1.7; margin: 0 0 28px; }
.eyebrow { color: var(--teal); font-family: Calibri, "SimHei", "Heiti SC", sans-serif; font-size: .75rem; font-weight: 700; letter-spacing: .15em; margin: 0; }
label { display: grid; gap: 7px; color: var(--muted); font-size: .92rem; }
input, select { width: 100%; border: 1px solid var(--line); background: #ffffff; color: var(--text); border-radius: 9px; padding: 11px 12px; }
textarea { width: 100%; resize: vertical; border: 1px solid var(--line); background: #ffffff; color: var(--text); border-radius: 9px; padding: 11px 12px; font: inherit; line-height: 1.6; }
.login-card label + label { margin-top: 15px; }
.login-card .primary-button { width: 100%; margin-top: 8px; }
.form-error { min-height: 1.2em; color: var(--red); font-size: .86rem; }

.primary-button, .secondary-button, .danger-button, .icon-button { border: 0; cursor: pointer; border-radius: 9px; min-height: 40px; padding: 0 17px; }
.primary-button { color: #ffffff; background: var(--teal); font-weight: 720; }
.primary-button:hover { background: #126b5d; }
.primary-button.compact { min-height: 38px; font-size: .94rem; white-space: nowrap; }
.secondary-button { background: var(--panel-3); border: 1px solid var(--line); }
.secondary-button.compact { min-height: 38px; padding: 0 13px; font-size: .94rem; white-space: nowrap; }
.topbar-refresh { display: inline-flex; align-items: center; gap: 5px; }
.topbar-refresh:disabled { opacity: .7; cursor: wait; }
.topbar-refresh.is-refreshing .refresh-icon { animation: refresh-spin .75s linear infinite; }
@keyframes refresh-spin { to { transform: rotate(360deg); } }
.danger-button { color: #ad3838; background: rgba(199,79,79,.09); border: 1px solid rgba(199,79,79,.3); }
.icon-button { background: transparent; font-size: 1.5rem; width: 40px; padding: 0; color: var(--muted); }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 250px 1fr; }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 21px 14px 17px; background: #f8fafb; border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: 30; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 8px 22px; }
.brand-glyph { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; color: var(--teal); background: #e8f4f1; border: 1px solid #b7d9d2; font-family: Georgia, serif; font-size: 1.4rem; }
.brand strong, .brand span { display: block; }
.brand strong { font-size: 1.02rem; }
.brand span { color: var(--muted); font-family: Calibri, "SimHei", "Heiti SC", sans-serif; font-size: .64rem; letter-spacing: .1em; margin-top: 3px; }
.nav-label { margin: 22px 11px 7px; color: #71828d; font-family: Calibri, "SimHei", "Heiti SC", sans-serif; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; }
.nav-item { width: 100%; display: flex; align-items: center; gap: 11px; border: 0; border-radius: 9px; padding: 10px 11px; background: transparent; color: #425866; text-align: left; cursor: pointer; font-size: .96rem; }
.notification-dot { width: 9px !important; height: 9px; margin-left: auto; border-radius: 50%; background: #d9485f; box-shadow: 0 0 0 3px rgba(217,72,95,.14); }
.nav-item:hover { color: var(--text); background: #edf3f5; }
.nav-item.active { color: #145f54; background: #e4f3f0; box-shadow: inset 3px 0 var(--teal); }
.nav-item > span:first-child { width: 19px; text-align: center; }
.area-dot { width: 9px !important; height: 9px; border-radius: 50%; margin: 0 5px; }
.area-dot.amg { background: var(--teal); }
.area-dot.blas { background: var(--amber); }
.area-dot.symbolic { background: var(--blue); }
.area-dot.solverchallenge26 { background: #8b5cf6; }
.sidebar-footer { margin-top: auto; border-top: 1px solid var(--line); padding-top: 10px; }

.main { min-width: 0; }
.topbar { height: 72px; position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 0 28px; background: rgba(255,255,255,.92); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.search-wrap { max-width: 600px; flex: 1; display: flex; align-items: center; gap: 8px; background: #f7f9fa; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; }
.search-wrap input { border: 0; background: transparent; padding: 9px 4px; }
.search-wrap input:focus { outline: none; }
.search-wrap kbd { padding: 3px 6px; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); font-size: .67rem; }
.menu-button { display: none; }
.workspace { padding: 28px; max-width: 1600px; margin: 0 auto; }

.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 25px; }
.page-head h1 { margin: 4px 0 0; font-size: clamp(1.55rem, 2.5vw, 2.25rem); letter-spacing: -.04em; }
.page-head p { margin: 7px 0 0; color: var(--muted); }
.date-chip { color: var(--muted); font-family: Calibri, "SimHei", "Heiti SC", sans-serif; font-size: .82rem; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 14px; margin-bottom: 27px; }
.dashboard-metrics { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
.metric-card { min-height: 132px; padding: 20px; background: linear-gradient(145deg, #ffffff, #f7fafb); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 5px 18px rgba(31,54,68,.05); }
.metric-card .metric-icon { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: .82rem; }
.metric-card strong { display: block; margin-top: 21px; font-family: Calibri, "SimHei", "Heiti SC", sans-serif; font-size: 2rem; font-weight: 600; }
.metric-card span:last-child { color: var(--muted); font-size: .88rem; }
.section-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(290px, .55fr); gap: 18px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.panel-head { padding: 17px 19px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); }
.panel-head h2 { margin: 0; font-size: 1.08rem; }
.panel-head button { color: var(--teal); background: none; border: 0; cursor: pointer; }
.recent-list { display: grid; }
.recent-item { display: grid; grid-template-columns: 10px 1fr auto; gap: 13px; align-items: center; padding: 15px 19px; border-bottom: 1px solid #e5ebee; cursor: pointer; }
.recent-item:last-child { border-bottom: 0; }
.recent-item:hover { background: #f6f9fa; }
.recent-item h3 { margin: 0 0 5px; font-size: 1rem; font-weight: 650; }
.recent-item p { margin: 0; color: var(--muted); font-size: .82rem; }
.recent-item time { color: #718390; font-family: Calibri, "SimHei", "Heiti SC", sans-serif; font-size: .8rem; }
.record-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); }
.record-dot.paper { background: var(--amber); }.record-dot.experiment { background: var(--blue); }.record-dot.question { background: #d78eea; }.record-dot.log { background: #99b777; }
.area-cards { padding: 11px; display: grid; gap: 10px; }
.area-card { border: 1px solid var(--line); border-radius: 11px; padding: 17px; background: #fbfcfd; cursor: pointer; }
.area-card:hover { border-color: #9dbbb5; background: #f4faf8; transform: translateY(-1px); }
.area-card h3 { margin: 0 0 6px; font-size: 1.02rem; }
.area-card p { margin: 0; color: var(--muted); font-size: .84rem; }

.area-toolbar, .records-toolbar { display: flex; align-items: center; gap: 9px; margin-bottom: 18px; flex-wrap: wrap; }
.segmented { display: inline-flex; padding: 3px; border-radius: 10px; border: 1px solid var(--line); background: #f4f7f8; }
.segmented button { border: 0; background: transparent; color: var(--muted); border-radius: 7px; padding: 8px 13px; cursor: pointer; }
.segmented button.active { background: var(--panel-3); color: var(--text); }
.spacer { flex: 1; }
.live-log-status { margin-left: auto; color: var(--teal); font-size: .86rem; font-weight: 650; white-space: nowrap; }
.record-table { width: 100%; border-collapse: collapse; }
.record-table th { padding: 12px 15px; color: var(--muted); text-align: left; font-size: .78rem; letter-spacing: .08em; border-bottom: 1px solid var(--line); }
.record-table td { padding: 14px 15px; border-bottom: 1px solid #e5ebee; font-size: .94rem; }
.record-table tr { cursor: pointer; }
.record-table tbody tr:hover { background: #f5f9fa; }
.record-table tr.task-completed td { color: #8a989e; text-decoration: line-through; }
.record-table tr.task-completed .task-toggle { text-decoration: none; }
.record-table .task-drag-handle { display: inline-block; margin-right: 10px; color: #81929a; cursor: grab; user-select: none; font-size: 1.2rem; line-height: 1; vertical-align: middle; }
.record-table .task-drag-handle:active { cursor: grabbing; }
.record-table tr.task-dragging { opacity: .42; }
.record-table tr.task-sortable-row td { transition: background-color .12s ease; }
.task-toggle { width: 17px; height: 17px; margin: 0 9px 0 0; vertical-align: -3px; accent-color: var(--teal); cursor: pointer; }
.tag { display: inline-block; padding: 3px 7px; margin: 2px; border-radius: 5px; background: #e9f1f3; color: #3c5967; font-size: .75rem; }
.status { display: inline-flex; align-items: center; gap: 6px; color: #526874; font-size: .84rem; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--teal); }
.status.blocked::before { background: var(--red); }.status.done::before, .status.verified::before { background: #99c071; }.status.planned::before { background: var(--muted); }
.empty-state { min-height: 280px; display: grid; place-items: center; text-align: center; color: var(--muted); padding: 35px; }
.empty-state strong { display: block; color: var(--text); margin-bottom: 7px; }

.canvas-shell { position: relative; height: calc(100vh - 175px); min-height: 520px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background-color: #fbfcfd; background-image: radial-gradient(#d8e1e6 1px, transparent 1px); background-size: 24px 24px; touch-action: none; }
.canvas-toolbar { position: absolute; top: 12px; left: 12px; z-index: 10; display: flex; gap: 7px; padding: 6px; background: rgba(255,255,255,.96); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); }
.canvas-toolbar button { border: 1px solid #d6e0e4; border-radius: 7px; padding: 8px 10px; background: #f4f7f8; cursor: pointer; font-size: .84rem; }
.canvas-status { position: absolute; right: 13px; bottom: 10px; z-index: 10; color: var(--muted); font-family: Calibri, "SimHei", "Heiti SC", sans-serif; font-size: .76rem; }
.canvas-surface { position: absolute; inset: 0; transform-origin: 0 0; }
.canvas-lines { position: absolute; inset: 0; width: 2400px; height: 1600px; overflow: visible; pointer-events: none; }
.canvas-lines line { stroke: #769b94; stroke-width: 2; }
.canvas-lines text { fill: #526d76; font-size: 13px; }
.canvas-node { position: absolute; width: 210px; min-height: 90px; padding: 13px 14px; border: 1px solid #9fc6be; border-radius: 11px; background: #ffffff; box-shadow: 0 10px 25px rgba(24,52,61,.12); cursor: grab; user-select: none; touch-action: none; }
.canvas-node:active { cursor: grabbing; }
.canvas-node.selected { border-color: var(--teal); box-shadow: 0 0 0 2px rgba(116,214,195,.16), var(--shadow); }
.canvas-node .node-type { color: var(--teal); font-family: Calibri, "SimHei", "Heiti SC", sans-serif; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.canvas-node h3 { margin: 8px 0 0; font-size: .98rem; line-height: 1.45; }
.canvas-node p { margin: 7px 0 0; color: var(--muted); font-size: .8rem; }

dialog { color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 15px; box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(4,8,12,.72); backdrop-filter: blur(5px); }
.record-dialog { width: min(1040px, calc(100vw - 32px)); height: min(860px, calc(100vh - 32px)); padding: 0; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; padding: 17px 21px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { margin: 3px 0 0; font-size: 1.2rem; }
.record-form { height: calc(100% - 77px); display: flex; flex-direction: column; padding: 18px 21px; }
.record-fields { display: grid; grid-template-columns: minmax(260px, 2fr) repeat(3, minmax(120px, .75fr)) minmax(160px, 1fr); gap: 10px; }
.editor-toolbar { display: flex; align-items: center; gap: 5px; margin-top: 14px; padding: 7px; border: 1px solid var(--line); border-bottom: 0; border-radius: 9px 9px 0 0; background: #f4f7f8; }
.editor-toolbar button { border: 1px solid #d5dfe4; border-radius: 5px; background: #ffffff; color: #344b57; min-height: 30px; padding: 0 9px; cursor: pointer; font-size: .82rem; }
.editor-toolbar span { margin-left: auto; color: var(--muted); font-size: .76rem; padding-right: 7px; }
.rich-editor { flex: 1; overflow: auto; min-height: 280px; padding: 22px; border: 1px solid var(--line); background: #ffffff; font-size: 1rem; line-height: 1.8; }
.rich-editor:empty::before { content: attr(data-placeholder); color: #8797a1; }
.rich-editor h2 { color: var(--teal); font-size: 1.28rem; margin-top: 1.6em; }
.rich-editor code { padding: 2px 5px; background: #edf2f4; border-radius: 4px; font-family: Calibri, "SimHei", "Heiti SC", sans-serif; }
.rich-editor .formula { display: block; padding: 13px; background: #f7f4ed; border-left: 3px solid var(--amber); font-family: Calibri, "SimHei", "Heiti SC", sans-serif; font-style: italic; }
.rich-editor img { max-width: min(100%, 760px); height: auto; border-radius: 8px; }
.asset-list { display: flex; gap: 7px; flex-wrap: wrap; padding-top: 9px; }
.asset-pill { display: inline-flex; align-items: center; gap: 7px; padding: 5px 9px; border-radius: 7px; background: #eaf1f3; color: #365866; font-size: .78rem; text-decoration: none; }
.dialog-actions { display: flex; align-items: center; gap: 9px; padding-top: 13px; }
.dialog-actions span { flex: 1; }
.small-dialog { width: min(440px, calc(100vw - 30px)); padding: 0; }
.small-dialog > form:last-child { padding: 20px; display: grid; gap: 14px; }
.small-dialog p { color: var(--muted); line-height: 1.6; margin: 0; }
.dataset-dialog { width: min(880px, calc(100vw - 32px)); padding: 0; }
.dataset-form { display: grid; gap: 19px; padding: 21px; }
.dataset-fields { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 13px; }
.dataset-fields .wide-field:first-child { grid-column: span 2; }
.dataset-fields .wide-field:last-child { grid-column: span 2; }
.experiment-picker { display: flex; align-items: center; gap: 23px; margin: 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; }
.experiment-picker legend { padding: 0 7px; color: var(--muted); font-size: .9rem; }
.experiment-picker label { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: .94rem; }
.experiment-picker input { width: 18px; height: 18px; accent-color: var(--teal); }
.result-dialog { width: min(1050px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; }
.result-form { display: grid; gap: 18px; padding: 21px; }
.result-base-fields { display: grid; grid-template-columns: .8fr 1.4fr 1fr; gap: 13px; }
.result-field-section { padding: 17px; border: 1px solid var(--line); border-radius: 11px; background: #fafcfc; }
.result-field-grid { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 13px; }
.dataset-list-table td:first-child { font-weight: 650; }
.dataset-list-table tr { cursor: pointer; }
.experiment-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.experiment-badge { border: 1px solid #bad7d1; border-radius: 999px; padding: 5px 10px; color: #17695c; background: #edf8f5; font-size: .8rem; cursor: pointer; }
.experiment-badge.symbolic { color: #346697; border-color: #bfd2e4; background: #f0f6fb; }
.experiment-badge.blas { color: #99601f; border-color: #e4d1b9; background: #fbf6ee; }
.dataset-detail-head { align-items: center; }
.back-button { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; color: var(--muted); background: #ffffff; cursor: pointer; }
.matrix-stats { display: grid; grid-template-columns: repeat(4, minmax(130px, 1fr)); gap: 12px; margin-bottom: 22px; }
.matrix-stat { padding: 15px 17px; border: 1px solid var(--line); border-radius: 11px; background: #fafcfd; }
.matrix-stat span { display: block; color: var(--muted); font-size: .78rem; margin-bottom: 6px; }
.matrix-stat strong { font-family: Calibri, "SimHei", "Heiti SC", sans-serif; font-size: 1.12rem; }
.experiment-section { margin-top: 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); overflow: hidden; }
.experiment-section-head { display: flex; align-items: center; gap: 14px; padding: 17px 19px; border-bottom: 1px solid var(--line); background: #f8fafb; }
.experiment-section-head h2 { margin: 0; font-size: 1.14rem; }
.experiment-section-head p { margin: 4px 0 0; color: var(--muted); font-size: .82rem; }
.experiment-section-head .spacer { flex: 1; }
.branch-strip { display: flex; align-items: center; gap: 9px; padding: 13px 19px; border-bottom: 1px solid var(--line); }
.branch-root { padding: 6px 11px; border-radius: 7px; color: #12685a; background: #e8f5f2; font-weight: 700; }
.branch-arrow { color: #8da0aa; }
.branch-child { padding: 5px 9px; border: 1px solid var(--line); border-radius: 7px; color: #526773; background: #ffffff; font-size: .84rem; }
.branch-child.active { border-color: #78b6aa; color: #12685a; background: #eef8f6; font-weight: 700; }
.results-scroll { overflow-x: auto; }
.results-table { width: 100%; min-width: 1510px; border-collapse: collapse; }
.result-field-grid .wide-field { grid-column: span 2; }
.results-table.symbolic-table { min-width: 900px; }
.results-table.sc26-core-table { min-width: 1450px; }
.results-table.sc26-detail-table { min-width: 2050px; }
.sc26-core-table td.sc26-description, .sc26-detail-table td.sc26-description { min-width: 230px; max-width: 340px; white-space: normal; text-align: left; vertical-align: top; line-height: 1.5; }
.sc26-detail-table td:nth-last-child(3) { min-width: 250px; }
.sc26-detail-table td:nth-last-child(2) { min-width: 340px; }
.sc26-detail-table td:last-child { min-width: 250px; }
.sc26-table-section + .sc26-table-section { margin-top: 28px; }
.sc26-table-section h3 { margin: 0 0 12px; font-size: 1.05rem; }
.results-table.sc26-solver-table { min-width: 1650px; }
.sc26-solver-table td.sc26-description { min-width: 320px; max-width: 440px; white-space: normal; text-align: left; vertical-align: top; line-height: 1.5; }
.sc26-rules-note { max-width: 980px; margin: 6px 0 0; color: var(--muted); font-size: .88rem; line-height: 1.5; }
.results-table.latest-amg-table { min-width: 1480px; }
.results-table th { padding: 11px 12px; white-space: nowrap; color: var(--muted); background: #fbfcfd; border-bottom: 1px solid var(--line); font-size: .82rem; text-align: right; }
.results-table th:first-child, .results-table th:nth-child(2), .results-table td:first-child, .results-table td:nth-child(2) { text-align: left; }
.results-table td { padding: 12px; white-space: nowrap; border-bottom: 1px solid #e7edef; text-align: right; font-size: .92rem; }
.results-table tbody tr { cursor: pointer; }
.results-table tbody tr:hover { background: #f5faf8; }
.results-table tbody tr.linglong-row td { font-weight: 700; }
.amg-branch-summary { padding: 22px; }
.amg-applications-section { padding: 24px; }
.amg-applications-section h2 { margin: 3px 0 20px; font-size: 1.55rem; }
.amg-application-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.amg-application-card { display: flex; flex-direction: column; justify-content: space-between; min-height: 125px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #f8fafb; color: var(--text); text-align: left; cursor: pointer; font: inherit; }
.amg-application-card:hover, .amg-application-card.active { border-color: #55b4a7; background: #eaf8f5; }
.amg-application-card.active { box-shadow: inset 3px 0 #008d7d; }
.amg-application-card-head { display: flex; align-items: center; gap: 13px; min-width: 0; }
.amg-application-card-head img { width: 58px; height: 58px; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: #fff; object-fit: contain; }
.amg-application-card-head strong, .amg-application-card-head small { display: block; }
.amg-application-card-head strong { font-size: 1.17rem; }
.amg-application-card-head small, .amg-application-card-foot { color: var(--muted); font-size: .9rem; }
.amg-application-card-foot { margin-top: 13px; }
.amg-application-detail { margin-top: 20px; padding: 25px; }
.amg-application-detail-head { display: flex; align-items: center; gap: 20px; }
.amg-application-detail-head img { width: 112px; height: 112px; padding: 10px; border: 1px solid var(--line); border-radius: 15px; background: #fff; object-fit: contain; }
.amg-application-detail-head h2 { margin: 4px 0 12px; font-size: 1.8rem; }
.amg-application-description { max-width: 1000px; margin: 21px 0; font-size: 1.05rem; line-height: 1.8; }
.amg-application-links { display: flex; flex-wrap: wrap; gap: 10px; }
.amg-application-links a { padding: 8px 12px; border: 1px solid #cbdfe0; border-radius: 20px; color: #08786d; text-decoration: none; font-weight: 700; }
.amg-application-links a:hover { background: #eaf8f5; }
.amg-application-data { margin-top: 23px; padding-top: 20px; border-top: 1px solid var(--line); }
.amg-application-data h3 { margin: 0 0 8px; font-size: 1.18rem; }
.amg-application-data p { margin: 0; color: var(--muted); }
.amg-application-test-info { display: grid; gap: 7px; margin: 12px 0 18px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: #f8fafb; }
.amg-application-test-info > div { overflow-wrap: anywhere; line-height: 1.5; }
.amg-application-test-info b { color: var(--text); }
.amg-application-table { width: 100%; min-width: 1540px; border-collapse: collapse; }
.amg-application-table th { padding: 11px 12px; white-space: nowrap; color: var(--muted); background: #fbfcfd; border-bottom: 1px solid var(--line); text-align: left; font-size: .84rem; }
.amg-application-table td { padding: 12px; white-space: nowrap; border-bottom: 1px solid #e7edef; font-size: .92rem; font-variant-numeric: tabular-nums; }
.amg-application-table tbody tr:hover { background: #f5faf8; }
.amg-application-table .linglong-row td { font-weight: 700; background: #f5faf9; }
.opm-case { margin-top: 20px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.opm-case-head { padding: 16px 18px; background: #f8fafb; }
.opm-case-head h4 { margin: 0 0 10px; font-size: 1.23rem; }
.opm-case-head p { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin: 0; color: #526773; }
.opm-case-head code { overflow-wrap: anywhere; color: var(--text); }
.amg-application-data .opm-case-note { padding: 14px 18px; background: #fffaf1; border-top: 1px solid #efe3ca; color: #564a36; line-height: 1.7; }
.amg-application-table.opm-benchmark-table { min-width: 1450px; }
.opm-benchmark-table th:not(:first-child), .opm-benchmark-table td:not(:first-child) { text-align: right; }
.amg-branch-summary h2 { margin: 3px 0 7px; font-size: 1.5rem; }
.amg-branch-summary > div > p:last-child { margin: 0; color: var(--muted); }
.linglong-module-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 22px; }
.module-switch { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: #f3f7f8; flex: 0 0 auto; }
.module-switch button { border: 0; border-radius: 7px; padding: 9px 14px; background: transparent; color: #536873; font-size: .92rem; cursor: pointer; }
.module-switch button.active { color: #0e5f52; background: #ffffff; box-shadow: 0 1px 5px rgba(32,65,75,.12); font-weight: 700; }
.dual-gpu-section { margin-top: 18px; }
.multi-gpu-table { min-width: 1120px; }
.multi-gpu-table thead tr:first-child th { text-align: center; border-bottom-color: #b9cbd1; }
.multi-gpu-table thead tr:first-child th:first-child { text-align: left; }
.multi-gpu-table td:not(:first-child), .multi-gpu-table thead tr:nth-child(2) th { text-align: right; font-variant-numeric: tabular-nums; }
.multi-gpu-table .speedup-cell { color: #116859; font-weight: 700; background: #f5faf9; }
.current-dual-table { width: 100%; min-width: 1180px; table-layout: fixed; }
.current-dual-table th, .current-dual-table td { padding: 10px 8px; white-space: nowrap; }
.current-dual-table .col-method { width: 130px; }
.current-dual-table .col-cards { width: 70px; }
.current-dual-table .col-time { width: 90px; }
.current-dual-table .col-speedup { width: 125px; }
.current-dual-table .col-levels { width: 60px; }
.current-dual-table .col-iterations { width: 70px; }
.current-dual-table .col-residual { width: 115px; }
.current-dual-table .col-status { width: 210px; }
.current-dual-table th { text-align: right !important; }
.current-dual-table th:first-child { text-align: left !important; }
.symbolic-benchmark-table { min-width: 1380px; }
.cudss-comparison-table { min-width: 1500px; }
.bsc-comparison-table { width: 100%; min-width: 1360px; table-layout: fixed; }
.bsc-table-section + .bsc-table-section { margin-top: 24px; }
.bsc-table-section h3 { margin: 0 0 10px; font-size: 1rem; }
.symbolic-benchmark-table.bsc-comparison-table th, .symbolic-benchmark-table.bsc-comparison-table td { padding: 7px 6px; }
.symbolic-benchmark-table.bsc-comparison-table th:first-child, .symbolic-benchmark-table.bsc-comparison-table td:first-child { width: 180px; }
.symbolic-benchmark-table.bsc-comparison-table th:nth-child(2), .symbolic-benchmark-table.bsc-comparison-table td:nth-child(2) { width: 105px; }
.symbolic-benchmark-table.bsc-comparison-table th:nth-child(3), .symbolic-benchmark-table.bsc-comparison-table td:nth-child(3) { width: 120px; }
.symbolic-benchmark-table.bsc-comparison-table th:nth-child(4), .symbolic-benchmark-table.bsc-comparison-table td:nth-child(4) { width: 75px; }
.symbolic-benchmark-table.bsc-comparison-table th:nth-child(5), .symbolic-benchmark-table.bsc-comparison-table td:nth-child(5) { width: 105px; }
.symbolic-benchmark-table.bsc-comparison-table th:nth-child(6), .symbolic-benchmark-table.bsc-comparison-table td:nth-child(6) { width: 125px; }
.symbolic-benchmark-table.bsc-comparison-table th:nth-child(7), .symbolic-benchmark-table.bsc-comparison-table td:nth-child(7) { width: 130px; }
.symbolic-benchmark-table.bsc-comparison-table th:nth-child(8), .symbolic-benchmark-table.bsc-comparison-table td:nth-child(8) { width: 100px; }
.symbolic-benchmark-table.bsc-comparison-table th:nth-child(9), .symbolic-benchmark-table.bsc-comparison-table td:nth-child(9) { width: 100px; }
.symbolic-benchmark-table.bsc-comparison-table th:nth-child(10), .symbolic-benchmark-table.bsc-comparison-table td:nth-child(10) { width: 90px; }
.symbolic-benchmark-table.bsc-comparison-table th:nth-child(11), .symbolic-benchmark-table.bsc-comparison-table td:nth-child(11) { width: 100px; }
.symbolic-benchmark-table.bsc-comparison-table th:nth-child(12), .symbolic-benchmark-table.bsc-comparison-table td:nth-child(12) { width: 125px; }
.symbolic-benchmark-table.bsc-comparison-table td:first-child { white-space: normal; overflow-wrap: anywhere; }
.symbolic-benchmark-table.bsc-comparison-table th:last-child .symbolic-sort-button { white-space: normal; }
.symbolic-benchmark-table th, .symbolic-benchmark-table td { white-space: nowrap; }
.symbolic-benchmark-table th:nth-child(n+4), .symbolic-benchmark-table td:nth-child(n+4) { padding-left: 8px; padding-right: 8px; }
.symbolic-sort-button { border: 0; padding: 0; color: inherit; background: transparent; font: inherit; font-weight: inherit; cursor: pointer; white-space: nowrap; }
.symbolic-sort-button:hover { color: var(--teal); }
.symbolic-sort-button:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 3px; }
.symbolic-total-row { font-weight: 700; background: #f5faf9; }
.platform-times-table { width: 100%; min-width: 1760px; table-layout: fixed; }
.platform-times-table th, .platform-times-table td { padding: 8px 6px; }
.platform-times-table th { white-space: normal; text-align: center; line-height: 1.3; }
.platform-times-table th .symbolic-sort-button { white-space: normal; text-align: center; line-height: 1.3; }
.platform-times-table th:first-child, .platform-times-table td:first-child { width: 190px; text-align: left; }
.platform-times-table th:nth-child(2), .platform-times-table td:nth-child(2) { width: 100px; }
.platform-times-table th:nth-child(3), .platform-times-table td:nth-child(3) { width: 128px; }
.platform-times-table th:nth-child(4), .platform-times-table td:nth-child(4) { width: 82px; }
.platform-times-table th:nth-child(5), .platform-times-table td:nth-child(5) { width: 105px; }
.platform-times-table th:nth-child(6), .platform-times-table td:nth-child(6) { width: 112px; }
.platform-times-table th:nth-child(7), .platform-times-table td:nth-child(7) { width: 138px; }
.platform-times-table th:nth-child(n+8), .platform-times-table td:nth-child(n+8) { width: 78px; }
.platform-times-table td { font-variant-numeric: tabular-nums; }
.platform-times-table td:first-child { color: var(--teal); font-weight: 700; }
.platform-times-table .symbolic-total-row td:first-child { color: inherit; }
.amg-platform-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.amg-platform-card { padding: 16px; border: 1px solid var(--line); border-radius: 11px; background: #fafcfc; font-family: Calibri, "SimHei", "Heiti SC", "PingFang SC", Arial, sans-serif; font-size: .92rem; }
.amg-platform-card > span { display: block; color: var(--muted); font-size: .82rem; }
.amg-platform-card > strong { display: block; margin: 4px 0 10px; font-size: 1rem; }
.amg-platform-card p { margin: 6px 0; overflow-wrap: anywhere; font-size: .92rem; line-height: 1.5; }
.amg-platform-card p > b { white-space: nowrap; }
.amg-platform-card code { color: var(--text); font: inherit; }
.amg-data-filters { margin: 18px 0; padding: 18px; }
.amg-filter-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 15px; }
.amg-filter-title h2 { margin: 0; font-size: 1.08rem; }
.amg-filter-title p { margin: 4px 0 0; color: var(--muted); font-size: .84rem; }
.amg-speedup-toggle { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-size: .9rem; white-space: nowrap; cursor: pointer; }
.amg-speedup-toggle input { width: 17px; height: 17px; margin: 0; accent-color: var(--teal); }
.amg-filter-groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.amg-filter-group { min-width: 0; margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.amg-filter-group legend { padding: 0 5px; font-weight: 700; }
.amg-filter-count { margin-left: 8px; color: var(--muted); font-size: .82rem; font-weight: 400; }
.amg-filter-actions { display: flex; gap: 8px; margin-bottom: 9px; }
.amg-filter-actions button { padding: 3px 8px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--teal); font-size: .78rem; cursor: pointer; }
.amg-filter-actions button:hover { border-color: var(--teal); background: #f2faf8; }
.amg-filter-options { display: flex; flex-wrap: wrap; gap: 7px 12px; }
.amg-filter-option { display: inline-flex; align-items: center; gap: 6px; color: var(--text); font-size: .84rem; line-height: 1.35; cursor: pointer; }
.amg-filter-option input { width: 16px; height: 16px; margin: 0; accent-color: var(--teal); }
.amg-speedup-panel { margin: 18px 0; padding: 18px; }
.amg-speedup-panel .experiment-section-head { margin: 0 0 12px; }
.amg-speedup-panel .experiment-section-head h2 { margin: 0; font-size: 1.1rem; }
.amg-speedup-panel .experiment-section-head p, .amg-speedup-note { margin: 5px 0 0; color: var(--muted); font-size: .83rem; line-height: 1.5; }
.results-table.amg-speedup-table { min-width: 0; table-layout: fixed; }
.results-table.amg-speedup-table th, .results-table.amg-speedup-table td { padding: 9px 10px; white-space: normal; overflow-wrap: anywhere; text-align: center; }
.results-table.amg-speedup-table th:first-child, .results-table.amg-speedup-table td:first-child { width: 34%; text-align: left; }
.results-table.amg-speedup-table th:nth-child(2), .results-table.amg-speedup-table td:nth-child(2) { width: 22%; text-align: left; }
.results-table.amg-speedup-table td:nth-child(n+3) { color: var(--teal); font-weight: 700; }
.results-table.amg-speedup-table th { font-size: .85rem; }
.results-table.amg-speedup-table td { font-size: .9rem; }
.amg-speedup-result .results-scroll { margin-top: 10px; }
.amg-pending { display: flex; gap: 13px; align-items: center; margin-top: 18px; padding: 16px 18px; }
.method-primary { color: #12685a; font-weight: 700; }
.method-compare { color: #536b78; }
.auto-value { color: #176e60; font-weight: 700; }
.no-results { padding: 30px 19px; color: var(--muted); text-align: center; }
.blas-placeholder { padding: 30px 19px; color: var(--muted); }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 100; padding: 12px 16px; border-radius: 9px; color: #ffffff; background: #29424d; border: 1px solid #405f6b; box-shadow: var(--shadow); opacity: 0; transform: translateY(8px); pointer-events: none; transition: .2s ease; }
.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 1050px) {
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .record-fields { grid-template-columns: 2fr 1fr 1fr; }
  .record-fields label:last-child { grid-column: span 2; }
  .result-field-grid { grid-template-columns: repeat(3, minmax(150px, 1fr)); }
  .result-field-grid .wide-field { grid-column: span 2; }
}
@media (max-width: 780px) {
  .login-screen { grid-template-columns: 1fr; padding: 24px; }
  .login-mark { display: none; }
  .login-card { margin: auto; padding: 30px 24px; }
  .app-shell { display: block; }
  .sidebar { position: fixed; left: 0; transform: translateX(-105%); width: 270px; transition: transform .2s ease; box-shadow: var(--shadow); }
  .sidebar.open { transform: translateX(0); }
  .menu-button { display: block; }
  .topbar { padding: 0 12px; height: 64px; }
  .search-wrap kbd { display: none; }
  .topbar .compact { font-size: 0; width: 40px; padding: 0; }
  .topbar .compact::first-letter { font-size: 1.2rem; }
  .topbar .topbar-refresh { flex: none; display: grid; place-items: center; }
  .topbar-refresh .refresh-icon { font-size: 1.35rem; }
  .topbar-refresh .refresh-label { display: none; }
  .workspace { padding: 18px 13px; }
  .section-grid { grid-template-columns: 1fr; }
  .record-fields { grid-template-columns: 1fr 1fr; }
  .record-fields .title-field, .record-fields label:last-child { grid-column: 1 / -1; }
  .record-dialog { width: 100vw; height: 100vh; max-width: none; max-height: none; border-radius: 0; }
  .editor-toolbar { overflow-x: auto; }
  .record-table th:nth-child(3), .record-table td:nth-child(3), .record-table th:nth-child(4), .record-table td:nth-child(4) { display: none; }
  .canvas-shell { height: calc(100vh - 155px); }
  .dataset-dialog, .result-dialog { width: 100vw; height: 100vh; max-width: none; max-height: none; overflow: auto; border-radius: 0; }
  .dataset-fields, .result-base-fields { grid-template-columns: 1fr 1fr; }
  .dataset-fields .wide-field:first-child, .dataset-fields .wide-field:last-child { grid-column: 1 / -1; }
  .result-field-grid { grid-template-columns: 1fr 1fr; }
  .result-field-grid .wide-field { grid-column: span 2; }
  .matrix-stats { grid-template-columns: 1fr 1fr; }
  .linglong-module-head { flex-direction: column; }
  .module-switch { width: 100%; }
  .module-switch button { flex: 1; }
  .amg-filter-groups { grid-template-columns: 1fr; }
  .amg-filter-title { align-items: flex-start; flex-direction: column; gap: 12px; }
}
@media (max-width: 520px) {
  .amg-application-detail-head img { width: 78px; height: 78px; }
  .amg-application-detail-head h2 { font-size: 1.45rem; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .metric-card { min-height: 112px; padding: 15px; }
  .metric-card strong { margin-top: 16px; font-size: 1.6rem; }
  .page-head { align-items: flex-start; flex-direction: column; }
  .date-chip { display: none; }
  .record-fields { grid-template-columns: 1fr; }
  .record-fields .title-field, .record-fields label:last-child { grid-column: auto; }
  .dataset-fields, .result-base-fields, .result-field-grid { grid-template-columns: 1fr; }
  .amg-platform-grid { grid-template-columns: 1fr; }
  .result-field-grid .wide-field { grid-column: auto; }
  .dataset-fields .wide-field:first-child, .dataset-fields .wide-field:last-child { grid-column: auto; }
  .experiment-picker { align-items: flex-start; flex-direction: column; gap: 11px; }
}

/* Single-GPU hardware inventory: compact selection, expandable configuration. */
.amg-single-summary .linglong-module-head { margin-bottom: 0; }
.amg-hardware-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 16px; }
.amg-hardware-head h2 { margin: 0; font-size: 1.15rem; }
.amg-hardware-head p { margin: 6px 0 0; color: var(--muted); font-size: .92rem; }
.amg-hardware-controls { display: flex; align-items: center; gap: 12px; }
.amg-hardware-controls .amg-filter-actions { margin: 0; white-space: nowrap; }
.amg-hardware-search { width: 240px; max-width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: #fff; }
.amg-hardware-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.amg-hardware-card { display: flex; align-items: flex-start; gap: 10px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fafcfc; cursor: pointer; transition: border-color .15s, background .15s; min-width: 0; }
.amg-hardware-card:hover { border-color: var(--teal); }
.amg-hardware-card.is-selected { border-color: #8ecac3; background: #f0faf8; }
.amg-hardware-card:focus-within { outline: 2px solid var(--teal); outline-offset: 2px; }
.amg-hardware-card input { flex: 0 0 auto; width: 17px; height: 17px; margin: 3px 0 0; accent-color: var(--teal); }
.amg-hardware-card-body { display: grid; gap: 5px; min-width: 0; }
.amg-hardware-vendor { color: var(--teal); font-size: .86rem; font-weight: 600; }
.amg-hardware-card strong { color: var(--text); font-size: 1.07rem; line-height: 1.35; overflow-wrap: break-word; }
.amg-hardware-coverage { color: var(--muted); font-size: .88rem; line-height: 1.45; }
.amg-single-filters .amg-filter-groups { grid-template-columns: 1fr 1fr; margin-top: 18px; }
.amg-single-filters .amg-filter-option { padding: 6px 10px; border: 1px solid var(--line); border-radius: 7px; font-size: .92rem; background: #fff; }
.amg-single-filters .amg-filter-option:has(input:checked) { background: #f0faf8; border-color: #8ecac3; }
.amg-single-filter-footer { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-top: 16px; border-top: 1px solid var(--line); padding-top: 16px; }
.amg-single-filter-footer .amg-speedup-toggle { padding: 3px 0; }
.amg-hardware-configs { flex: 1; min-width: 0; }
.amg-hardware-configs > summary { width: fit-content; cursor: pointer; font-weight: 700; }
.amg-hardware-configs > summary span { margin-left: 10px; font-weight: 400; color: var(--muted); font-size: .92rem; }
.amg-hardware-config-list { margin-top: 14px; }
.amg-hardware-config { border: 1px solid var(--line); border-radius: 8px; margin-top: 8px; background: #fafcfc; }
.amg-hardware-config > summary { padding: 12px 14px; cursor: pointer; }
.amg-hardware-config > summary strong { margin-left: 5px; }
.amg-hardware-config > summary span { margin-left: 16px; color: var(--muted); font-size: .92rem; }
.amg-hardware-config-fields { margin: 0; padding: 0 16px 16px; font-size: .96rem; line-height: 1.6; }
.amg-hardware-config-fields > div { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.amg-hardware-config-fields dt { font-weight: 700; white-space: nowrap; }
.amg-hardware-config-fields dd { margin: 0; overflow-wrap: anywhere; }
.amg-hardware-config-fields code { font: inherit; }
.amg-hardware-search-empty { color: var(--muted); margin: 14px 0; }
@media (max-width: 1350px) { .amg-hardware-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 950px) {
  .amg-hardware-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .amg-hardware-head { align-items: flex-start; flex-direction: column; gap: 12px; }
}
@media (max-width: 600px) {
  .amg-hardware-grid, .amg-single-filters .amg-filter-groups { grid-template-columns: 1fr; }
  .amg-hardware-controls { width: 100%; }
  .amg-hardware-search { flex: 1; min-width: 0; }
  .amg-single-filter-footer { flex-direction: column-reverse; }
  .amg-hardware-configs { width: 100%; }
  .amg-hardware-config > summary span { display: block; margin: 5px 0 0 20px; }
  .amg-hardware-config-fields > div { grid-template-columns: 80px minmax(0, 1fr); gap: 8px; }
}

#quick-add,[data-add-record],#add-dataset,#edit-dataset,[data-add-result],.task-drag-handle,#canvas-add,#canvas-link,#canvas-remove{display:none!important}
#public-stamp{position:fixed;bottom:8px;right:12px;padding:6px 12px;border:1px solid #d5e5e5;border-radius:8px;background:#fff;color:#526a73;font-size:12px;z-index:100;pointer-events:none}
.public-record-body{padding:24px;overflow:auto;max-height:75vh;overflow-wrap:anywhere}.public-record-body img{max-width:100%}#public-record-dialog{width:min(900px,92vw)}
[data-result-id]{cursor:default!important}.canvas-node{pointer-events:none}
