/* ============================================================
   PINN MMP Prediction — Stylesheet v2
   英文/数字：Times New Roman
   中文：苹方 / 微软雅黑 / 宋体
   配色：学术冷灰 + 靛蓝主色
============================================================ */

:root {
  /* Surface / backgrounds */
  --bg:            #f3f5f9;
  --bg-soft:       #eef1f7;
  --surface:       #ffffff;
  --surface-soft:  #f7f9fc;
  --surface-alt:   #fbfcfe;

  /* Borders */
  --border:        #e2e7f0;
  --border-strong: #cfd6e2;

  /* Text */
  --text:          #1b2234;
  --text-soft:     #4c5671;
  --text-muted:    #858fa5;
  --text-inverse:  #ffffff;

  /* Brand */
  --primary:       #1e3a8a;
  --primary-dark:  #152c6b;
  --primary-soft:  #e8edfb;
  --accent:        #0e7490;
  --accent-2:      #5b21b6;
  --highlight:     #b45309;

  /* Status */
  --success:       #15803d;
  --warning:       #b45309;
  --danger:        #b91c1c;

  /* Radii */
  --radius-xl:     20px;
  --radius-lg:     14px;
  --radius-md:     9px;
  --radius-sm:     6px;

  /* Shadows */
  --shadow-sm:     0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md:     0 4px 18px rgba(15, 23, 42, 0.07);
  --shadow-lg:     0 14px 38px rgba(15, 23, 42, 0.09);

  /* Fonts  ——  Times New Roman 在前，中文由系统字体兜底 */
  --font-sans:     "Times New Roman", "Times", Georgia,
                   "PingFang SC", "Microsoft YaHei", "SimSun", serif;
  --font-cn:       "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
                   "SimSun", "Times New Roman", sans-serif;
  --font-mono:     "Times New Roman", "Cambria", "Courier New", monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  color: var(--text);
  background: var(--bg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-variant-ligatures: common-ligatures;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(1200px 520px at 12% -6%, rgba(30, 58, 138, 0.08), transparent 60%),
    radial-gradient(1000px 540px at 108% 8%, rgba(14, 116, 144, 0.07), transparent 60%),
    linear-gradient(180deg, #eef1f7, #f8fafd 60%);
}

a { color: inherit; text-decoration: none; }
i, em { font-style: italic; }
b, strong { font-weight: 700; }

/* 中文字符用另一套字体（Unicode range 覆盖常见 CJK） */
:lang(zh), :where(h1, h2, h3, h4, p, span, label, li, button, td, th) {
  /* 让西文走 Times，中文走系统字体：这依赖于浏览器按字形查找。
     通过将 serif + 中文 sans 都写进 font-family 实现。 */
}

/* 显式中文段：包裹 <em class="cn"> 时用宋体风 */
.cn { font-family: var(--font-cn); font-style: normal; font-weight: 400; }

/* ============================================================
   Layout wrapper
============================================================ */
.app {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 28px 40px;
}

/* ============================================================
   Top Bar
============================================================ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
  margin: 0 -28px 0;
}

.topbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(30, 58, 138, 0.25);
}
.logo svg { width: 22px; height: 22px; }
.logo.small { width: 36px; height: 36px; border-radius: 10px; }
.logo.small svg { width: 18px; height: 18px; }

.brand-text { line-height: 1.15; }
.brand-name {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text);
}
.brand-tag {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  font-style: italic;
}

.topnav {
  display: flex;
  gap: 28px;
  font-size: 15px;
  color: var(--text-soft);
  font-variant: small-caps;
  letter-spacing: 0.06em;
}
.topnav a {
  position: relative;
  padding: 6px 2px;
  transition: color .15s ease;
}
.topnav a:hover { color: var(--primary); }
.topnav a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .2s ease;
}
.topnav a:hover::after { transform: scaleX(1); }

/* ============================================================
   Hero
============================================================ */
.hero {
  padding: 56px 0 36px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(380px, 1fr);
  gap: 36px;
  align-items: center;
}

@media (max-width: 980px) { .hero-grid { grid-template-columns: 1fr; } }

.kicker {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.hero h1 {
  margin: 0 0 16px;
  font-size: 44px;
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: -0.005em;
  color: var(--text);
}
.hero h1 i {
  color: var(--primary);
  font-weight: 700;
}

.lead {
  margin: 0 0 28px;
  font-size: 17px;
  color: var(--text-soft);
  line-height: 1.7;
  max-width: 640px;
  font-family: var(--font-cn);
}
.lead i { font-family: var(--font-sans); color: var(--primary); }

.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Stat cards in hero */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px; height: 100%;
  background: linear-gradient(180deg, var(--primary), var(--accent));
}
.stat-name {
  display: block;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
}
.stat-num {
  display: block;
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.stat-num em {
  font-size: 18px;
  color: var(--text-soft);
  margin-left: 2px;
}
.stat-sub {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
}

/* ============================================================
   Section frame
============================================================ */
.section {
  padding: 64px 0;
  border-top: 1px solid var(--border);
}
.section-alt {
  background: linear-gradient(180deg, var(--surface-alt), transparent);
  border-radius: var(--radius-xl);
  padding: 56px 40px 64px;
  margin-top: 24px;
}

.section-head {
  max-width: 720px;
  margin: 0 auto 36px;
  text-align: center;
}
.section-tag {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--primary);
  text-transform: uppercase;
  font-style: italic;
}
.section-head h2 {
  margin: 8px 0 10px;
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.005em;
}
.section-head p {
  margin: 0;
  color: var(--text-soft);
  font-size: 16px;
  font-family: var(--font-cn);
}

/* ============================================================
   Main predictor layout
============================================================ */
.main {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(340px, 1fr);
  gap: 22px;
  align-items: start;
}

@media (max-width: 980px) { .main { grid-template-columns: 1fr; } }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #ffffff, #fafcff);
}

.card-head h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--text);
}

.head-actions {
  display: flex;
  gap: 8px;
}

.badge {
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-weight: 700;
  letter-spacing: 0.04em;
  font-style: italic;
}

/* ============================================================
   Form
============================================================ */
.form { padding: 22px 24px 26px; }

.group + .group { margin-top: 26px; }

.group-title {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: 0.01em;
}
.group-title .idx {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 26px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  font-style: italic;
}
.group-title em {
  font-family: var(--font-cn);
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 400;
  font-style: normal;
  letter-spacing: 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
  gap: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.field:hover { border-color: var(--border-strong); background: #fff; }
.field:focus-within {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.12);
}

.field-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.field-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.unit {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
}
.field-hint {
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-cn);
  letter-spacing: 0;
}

.field input[type="number"] {
  width: 100%;
  padding: 8px 0;
  font-size: 20px;
  font-family: var(--font-sans);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--text);
  background: transparent;
  border: none;
  outline: none;
}

.field input[type=number]::-webkit-outer-spin-button,
.field input[type=number]::-webkit-inner-spin-button {
  -webkit-appearance: none; margin: 0;
}
.field input[type=number] { -moz-appearance: textfield; }

/* ============================================================
   Buttons
============================================================ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 22px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(30, 58, 138, 0.28);
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
  font-family: var(--font-cn);
}
.btn-primary span { font-family: var(--font-sans); font-style: italic; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(30, 58, 138, 0.34); }
.btn-primary:disabled { opacity: 0.7; cursor: not-allowed; }

.btn-submit {
  width: 100%;
  height: 50px;
  margin-top: 26px;
  font-size: 16px;
  letter-spacing: 0.06em;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  height: 42px;
  padding: 0 22px;
  border: 1.5px solid var(--primary);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--primary);
  font-weight: 700;
  font-family: var(--font-cn);
  cursor: pointer;
  transition: all .15s ease;
}
.btn-outline:hover { background: var(--primary-soft); }

.btn-loader {
  width: 14px; height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-soft);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s ease;
  font-family: var(--font-sans);
  letter-spacing: 0.04em;
}
.btn-ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}

/* ============================================================
   Result panel
============================================================ */
.result-card {
  position: sticky;
  top: 84px;
}

.result-body {
  padding: 24px;
  min-height: 320px;
  display: flex;
  flex-direction: column;
}

.result-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 32px 12px;
  color: var(--text-muted);
  text-align: center;
}
.result-empty svg { width: 42px; height: 42px; opacity: 0.45; }
.result-empty p { margin: 8px 0 0; font-size: 14px; font-family: var(--font-cn); color: var(--text-soft); }
.result-empty small { font-size: 12px; color: var(--text-muted); font-family: var(--font-cn); }

.result-error {
  margin-top: 8px;
  padding: 12px 14px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--danger);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-family: var(--font-cn);
}

/* Main MMP display */
.result-main {
  text-align: center;
  padding: 4px 0 22px;
  border-bottom: 1px dashed var(--border);
}
.result-label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.18em;
  font-weight: 600;
  margin-bottom: 8px;
  text-transform: uppercase;
}
.result-label i { color: var(--primary); }

.result-value {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
  font-variant-numeric: tabular-nums;
}
.result-value #mmp-mean {
  font-size: 64px;
  font-weight: 700;
  letter-spacing: -0.01em;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
}
.result-unit {
  font-size: 18px;
  font-weight: 600;
  font-style: italic;
  color: var(--text-soft);
}

.result-ci {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--primary-soft);
}
.ci-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--primary-dark);
  text-transform: uppercase;
}
.ci-range {
  font-size: 14px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.ci-range b { font-weight: 700; }
.ci-sep { color: var(--text-muted); margin: 0 2px; }

.result-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 20px;
}
.meta-item {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.meta-name {
  font-size: 10.5px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  font-weight: 700;
  text-transform: uppercase;
}
.meta-item b {
  font-size: 15px;
  color: var(--text);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* Fold bars */
.fold-list { margin-top: 22px; }
.fold-list h4 {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-soft);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.fold-bars {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.fold-row {
  display: grid;
  grid-template-columns: 62px 1fr 72px;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.fold-name {
  color: var(--text-muted);
  font-style: italic;
  letter-spacing: 0.02em;
}
.fold-track {
  position: relative;
  height: 9px;
  background: var(--surface-soft);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.fold-fill {
  position: absolute;
  inset: 0 auto 0 0;
  background: linear-gradient(90deg, var(--accent), var(--primary));
  border-radius: 999px;
  transition: width .5s cubic-bezier(.2,.8,.2,1);
}
.fold-val {
  text-align: right;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   History table
============================================================ */
.history-card { margin-top: 24px; }
.history-table-wrap {
  padding: 8px 14px 18px;
  overflow-x: auto;
}
.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.history-table thead th {
  font-weight: 700;
  color: var(--text-soft);
  padding: 10px 12px;
  border-bottom: 1.5px solid var(--border);
  text-align: right;
  letter-spacing: 0.02em;
  background: var(--surface-soft);
}
.history-table thead th:first-child,
.history-table thead th:nth-child(2) { text-align: left; }
.history-table tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: right;
  color: var(--text);
}
.history-table tbody td:first-child,
.history-table tbody td:nth-child(2) { text-align: left; }
.history-table tbody tr:hover td { background: var(--surface-alt); }
.history-table .idx-col {
  color: var(--text-muted);
  font-style: italic;
}
.history-table .mono { color: var(--text-soft); }
.history-table .mmp-col {
  font-weight: 700;
  color: var(--primary-dark);
}

/* ============================================================
   Architecture section
============================================================ */
.arch-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  margin-bottom: 28px;
}
@media (min-width: 1100px) {
  .arch-grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.arch-card, .loss-card {
  padding: 28px;
}
.arch-card h3, .loss-card h3 {
  margin: 0 0 22px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.arch-viz {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 16px 8px;
  flex-wrap: nowrap;
}

.layer {
  flex: 0 1 90px;
  min-width: 68px;
  padding: 14px 8px;
  text-align: center;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: transform .2s ease;
}
.layer:hover { transform: translateY(-3px); border-color: var(--primary); }

.layer-in {
  background: linear-gradient(160deg, #e8edfb, #f5f7ff);
  border-color: #c9d3f2;
}
.layer-out {
  background: linear-gradient(160deg, #e6f4f1, #f2faf8);
  border-color: #b8dfd5;
}
.layer-title {
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
}
.layer-dim {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin: 2px 0;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.layer-sub {
  font-size: 10px;
  color: var(--text-soft);
  font-style: italic;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.arrow {
  flex: 0 0 14px;
  height: 2px;
  background: var(--border-strong);
  position: relative;
}
.arrow::after {
  content: '';
  position: absolute;
  right: -4px; top: -3px;
  border-left: 5px solid var(--border-strong);
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
}

.arch-notes {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 18px;
  font-size: 13px;
  color: var(--text-soft);
}
.arch-notes > div {
  padding: 10px 14px;
  background: var(--surface-soft);
  border-radius: var(--radius-sm);
  font-family: var(--font-cn);
}
.arch-notes b {
  color: var(--primary);
  margin-right: 8px;
  font-family: var(--font-sans);
  font-style: italic;
  font-weight: 700;
}

/* Loss card */
.loss-eq {
  padding: 16px 18px;
  background: linear-gradient(180deg, #f8faff, #fbfdff);
  border: 1px solid #dee5f4;
  border-radius: var(--radius-md);
  margin-bottom: 18px;
}
.eq-main {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  padding: 8px 0 14px;
  border-bottom: 1px dashed #cdd6ea;
  margin-bottom: 12px;
  line-height: 1.6;
}
.eq-main em { color: var(--primary); font-style: italic; }
.λ, .eq-main .λ {
  color: var(--accent);
  font-weight: 700;
}
.eq-list {
  margin: 0;
  padding-left: 0;
  list-style: none;
  font-size: 14px;
  color: var(--text-soft);
  font-family: var(--font-cn);
}
.eq-list li { padding: 4px 0; }
.eq-list b { color: var(--primary-dark); margin-right: 6px; font-family: var(--font-sans); }

.weight-schedule h4 {
  margin: 0 0 12px;
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--text-soft);
  text-transform: uppercase;
  font-weight: 700;
}

.phases { display: flex; flex-direction: column; gap: 10px; }
.phase {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.phase-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 8px;
  font-style: italic;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  font-size: 14px;
}
.phase:nth-child(2) .phase-num { background: linear-gradient(135deg, var(--accent-2), var(--primary)); }
.phase:nth-child(3) .phase-num { background: linear-gradient(135deg, var(--highlight), var(--accent-2)); }

.phase-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.phase-desc {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
}

/* Hyperparameter meta row */
.meta-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}
@media (max-width: 900px) { .meta-row { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 540px) { .meta-row { grid-template-columns: repeat(2, 1fr); } }

.meta-cell {
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.meta-cell span {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 4px;
  font-family: var(--font-cn);
}
.meta-cell b {
  font-size: 18px;
  color: var(--text);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   Feature cards grid
============================================================ */
.feature-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.feature-card {
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
  position: relative;
  overflow: hidden;
}
.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 3px;
  background: var(--primary);
}
.feature-inj::before { background: linear-gradient(90deg, #1e3a8a, #3b82f6); }
.feature-oil::before { background: linear-gradient(90deg, #0e7490, #14b8a6); }
.feature-cond::before { background: linear-gradient(90deg, #b45309, #d97706); }

.feature-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.feature-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  text-transform: uppercase;
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
}
.feature-inj .feature-tag { color: var(--primary); border-color: #c9d3f2; }
.feature-oil .feature-tag { color: var(--accent); border-color: #b8dfd5; }
.feature-cond .feature-tag { color: var(--highlight); border-color: #e9d5a8; }

.feature-unit {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
}
.feature-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.feature-math {
  font-size: 15px;
  color: var(--primary);
  font-style: italic;
  margin-bottom: 10px;
  font-weight: 600;
  padding: 4px 10px;
  background: var(--primary-soft);
  display: inline-block;
  border-radius: 6px;
}
.feature-desc {
  font-size: 13px;
  color: var(--text-soft);
  font-family: var(--font-cn);
  margin-bottom: 10px;
  min-height: 38px;
}
.feature-range {
  font-size: 12px;
  color: var(--text-muted);
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}
.feature-range span { font-style: italic; margin-right: 6px; }
.feature-range b {
  color: var(--text);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

/* ============================================================
   Workflow
============================================================ */
.workflow {
  display: flex;
  align-items: stretch;
  gap: 0;
  flex-wrap: wrap;
}
.step {
  flex: 1;
  min-width: 220px;
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.step-num {
  flex-shrink: 0;
  width: 38px; height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-weight: 700;
  font-style: italic;
  font-size: 16px;
  box-shadow: 0 4px 14px rgba(30, 58, 138, 0.28);
}
.step-body h4 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
.step-body p {
  margin: 0;
  font-size: 13px;
  color: var(--text-soft);
  font-family: var(--font-cn);
  line-height: 1.6;
}
.step-body p i { font-family: var(--font-sans); color: var(--primary); }

.step-line {
  flex: 0 0 26px;
  align-self: center;
  height: 2px;
  background: linear-gradient(90deg, var(--border-strong), transparent);
  position: relative;
}
@media (max-width: 900px) { .step-line { display: none; } }

/* ============================================================
   Footer
============================================================ */
.foot {
  margin-top: 48px;
  padding: 28px 0 8px;
  border-top: 1px solid var(--border);
}
.foot-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  color: var(--text-muted);
  font-size: 13px;
}
.foot-col { display: flex; flex-direction: column; gap: 6px; }
.foot-col:last-child { text-align: right; font-style: italic; letter-spacing: 0.02em; }
.brand.mini .brand-name { font-size: 16px; }
.brand.mini .brand-tag { font-size: 11px; }

/* ============================================================
   Responsive
============================================================ */
@media (max-width: 640px) {
  .app { padding: 0 16px 28px; }
  .topbar { margin: 0 -16px; }
  .topbar-inner { padding: 12px 16px; }
  .topnav { display: none; }
  .hero h1 { font-size: 32px; }
  .section-alt { padding: 48px 18px; }
  .result-value #mmp-mean { font-size: 50px; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .result-meta { grid-template-columns: 1fr 1fr; }
}


/* ============================================================
   Home page
============================================================ */
.home-app {
  max-width: 960px;
  padding-top: 80px;
  text-align: center;
}

.home-hero {
  margin-bottom: 48px;
}
.home-hero .logo {
  margin: 0 auto 24px;
  width: 64px; height: 64px;
  border-radius: 18px;
}
.home-hero .logo svg { width: 30px; height: 30px; }

.home-hero h1 {
  font-size: 38px;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}
.home-hero h1 span {
  display: block;
  font-size: 22px;
  font-weight: 400;
  color: var(--text-soft);
  margin-top: 8px;
  font-family: var(--font-cn);
}

.home-lead {
  font-size: 16px;
  color: var(--text-soft);
  max-width: 560px;
  margin: 0 auto;
  font-family: var(--font-cn);
}

/* Model cards */
.model-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 22px;
  text-align: left;
}

.model-card {
  display: flex;
  flex-direction: column;
  padding: 28px 28px 22px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
}
.model-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 4px;
}
.model-pinn::before { background: linear-gradient(90deg, #1e3a8a, #0e7490); }
.model-catboost::before { background: linear-gradient(90deg, #b45309, #d97706); }

.model-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.mc-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
  width: fit-content;
}
.model-pinn .mc-badge { background: var(--primary-soft); color: var(--primary-dark); }
.model-catboost .mc-badge { background: #fef3c7; color: #92400e; }

.model-card h2 {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 700;
}

.mc-desc {
  font-size: 14px;
  color: var(--text-soft);
  margin: 0 0 18px;
  flex: 1;
  font-family: var(--font-cn);
  line-height: 1.6;
}

.mc-stats {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
  padding: 12px 0;
  border-top: 1px dashed var(--border);
  border-bottom: 1px dashed var(--border);
}
.mc-stats > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mc-stats span {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  font-weight: 700;
  text-transform: uppercase;
}
.mc-stats b {
  font-size: 16px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.mc-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}
.mc-tags span {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.mc-cta {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.04em;
}
.model-catboost .mc-cta { color: #b45309; }

.home-foot {
  margin-top: 56px;
  text-align: center;
}

/* Stats bar on predict page */
.hero-stats-bar {
  display: flex;
  gap: 0;
  justify-content: center;
  flex-wrap: wrap;
  padding: 0;
  margin: 20px 0 22px;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.hero-stats-bar .stat-card {
  flex: 1;
  min-width: 0;
  padding: 22px 20px 18px;
  border-radius: 0;
  border: none;
  box-shadow: none;
  background: transparent;
  text-align: center;
  position: relative;
}
.hero-stats-bar .stat-card::before {
  display: none;
}
.hero-stats-bar .stat-card + .stat-card::after {
  content: '';
  position: absolute;
  left: 0;
  top: 18%;
  height: 64%;
  width: 1px;
  background: var(--border);
}
.hero-stats-bar .stat-card:hover {
  transform: none;
  box-shadow: none;
  background: var(--surface-soft);
}
.hero-stats-bar .stat-name {
  display: block;
  font-size: 11px;
  letter-spacing: 0.12em;
  margin-bottom: 6px;
}
.hero-stats-bar .stat-num {
  font-size: 34px;
  display: block;
  line-height: 1;
}
.hero-stats-bar .stat-sub {
  margin-top: 6px;
  font-size: 12px;
}
.hero-stats-bar .stat-desc {
  display: block;
  margin-top: 8px;
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-cn);
  line-height: 1.4;
}


/* ============================================================
   CatBoost theme overrides
============================================================ */
.theme-catboost .topbar { border-bottom-color: #e9d5a8; }
.theme-catboost .stat-card::before { background: linear-gradient(180deg, #b45309, #d97706); }
.theme-catboost .logo-cb { background: linear-gradient(135deg, #b45309, #d97706); box-shadow: 0 8px 22px rgba(180, 83, 9, 0.25); }
.idx-cb { background: linear-gradient(135deg, #b45309, #d97706) !important; }
.btn-cb { background: linear-gradient(135deg, #92400e, #d97706) !important; box-shadow: 0 6px 20px rgba(180, 83, 9, 0.28) !important; }
.btn-cb:hover { box-shadow: 0 10px 26px rgba(180, 83, 9, 0.34) !important; }
.badge-cb { background: #fef3c7 !important; color: #92400e !important; }
.cb-gradient {
  background: linear-gradient(135deg, #b45309, #d97706) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  color: transparent !important;
}
.cb-fill { background: linear-gradient(90deg, #d97706, #b45309) !important; }

.theme-catboost .topnav a.active { color: #b45309; }
.theme-catboost .topnav a.active::after { background: linear-gradient(90deg, #b45309, #d97706); transform: scaleX(1); }
.theme-pinn .topnav a.active { color: var(--primary); }
.theme-pinn .topnav a.active::after { background: linear-gradient(90deg, var(--primary), var(--accent)); transform: scaleX(1); }

/* Feature importance chart */
.fi-chart {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.fi-row {
  display: grid;
  grid-template-columns: 120px 1fr 60px;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}
.fi-name {
  font-weight: 600;
  color: var(--text);
  text-align: right;
  font-size: 13px;
}
.fi-bar-track {
  height: 22px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}
.fi-bar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  background: linear-gradient(90deg, #d97706, #b45309);
  border-radius: 6px;
  transition: width .6s cubic-bezier(.2,.8,.2,1);
}
.fi-val {
  font-weight: 700;
  color: var(--text-soft);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
}

/* Loss equation lambda color */
.lam { color: var(--accent); font-weight: 700; }


/* ============================================================
   Arch card extra sections (fill whitespace)
============================================================ */
.arch-extra {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px dashed var(--border);
}
.arch-extra h4 {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.02em;
}
.arch-extra p {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--text-soft);
  font-family: var(--font-cn);
}

/* Constraint grid */
.constraint-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.constraint-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}
.constraint-item.neg {
  background: #fef2f2;
  border: 1px solid #fecaca;
}
.constraint-item.pos {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}
.c-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}
.constraint-item.neg .c-arrow {
  background: #dc2626;
  color: #fff;
}
.constraint-item.pos .c-arrow {
  background: #16a34a;
  color: #fff;
}

/* Data flow list */
.data-flow-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.df-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--text-soft);
  font-family: var(--font-cn);
  padding: 8px 12px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.df-num {
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  font-family: var(--font-sans);
}

/* ============================================================
   UI refresh for PINN and CatBoost pages
============================================================ */
.ui-refresh {
  --font-sans: "Inter", "Segoe UI", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  --font-cn: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
  --radius-lg: 8px;
  --radius-md: 8px;
  --radius-sm: 6px;
  --shadow-sm: 0 1px 2px rgba(18, 24, 38, 0.05);
  --shadow-md: 0 12px 34px rgba(18, 24, 38, 0.08);
  --shadow-lg: 0 22px 60px rgba(18, 24, 38, 0.13);
}

.ui-refresh.theme-pinn {
  --primary: #2354a7;
  --primary-dark: #173a77;
  --primary-soft: #eaf1ff;
  --accent: #0f8b8d;
  --accent-2: #7c3aed;
  --highlight: #c26a22;
}

.ui-refresh.theme-catboost {
  --primary: #a24b12;
  --primary-dark: #743408;
  --primary-soft: #fff3df;
  --accent: #c78312;
  --accent-2: #0f766e;
  --highlight: #3866b8;
}

.ui-refresh {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(238, 244, 255, 0.65) 38%, rgba(244, 248, 246, 0.82)),
    radial-gradient(860px 520px at 15% -8%, rgba(35, 84, 167, 0.16), transparent 60%),
    radial-gradient(760px 500px at 95% 10%, rgba(15, 139, 141, 0.12), transparent 58%),
    #f5f7fb;
}

.ui-refresh.theme-catboost {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 247, 232, 0.7) 40%, rgba(241, 248, 246, 0.82)),
    radial-gradient(820px 520px at 16% -8%, rgba(194, 106, 34, 0.15), transparent 60%),
    radial-gradient(740px 500px at 95% 12%, rgba(15, 118, 110, 0.12), transparent 58%),
    #f7f5f1;
}

.ui-refresh .app {
  max-width: 1320px;
}

.ui-refresh .topbar {
  background: rgba(255, 255, 255, 0.74);
  border-bottom: 1px solid rgba(196, 204, 218, 0.75);
}

.ui-refresh .brand-name {
  letter-spacing: 0;
}

.ui-refresh .brand-tag,
.ui-refresh .topnav {
  letter-spacing: 0;
  font-style: normal;
  font-variant: normal;
}

.model-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 26px;
  align-items: stretch;
  padding: 34px 0 22px;
}

.model-hero-copy,
.hero-panel {
  border: 1px solid rgba(204, 211, 224, 0.9);
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.model-hero-copy {
  position: relative;
  min-height: 250px;
  padding: 34px 36px;
  color: #142033;
  background:
    linear-gradient(112deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.78)),
    linear-gradient(90deg, rgba(35, 84, 167, 0.13), rgba(15, 139, 141, 0.08));
}

.theme-catboost .model-hero-copy {
  background:
    linear-gradient(112deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.78)),
    linear-gradient(90deg, rgba(194, 106, 34, 0.14), rgba(15, 118, 110, 0.08));
}

.model-hero-copy::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent), var(--accent-2));
}

.model-hero h1 {
  max-width: 760px;
  margin: 12px 0 12px;
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1.08;
  letter-spacing: 0;
}

.model-hero p {
  max-width: 680px;
  margin: 0;
  color: #526073;
  font-size: 16px;
  line-height: 1.8;
  font-family: var(--font-cn);
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.hero-chips span {
  padding: 7px 11px;
  border: 1px solid rgba(35, 84, 167, 0.18);
  border-radius: 6px;
  color: var(--primary-dark);
  background: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  font-weight: 700;
}

.hero-panel {
  min-height: 250px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  background:
    linear-gradient(145deg, rgba(17, 31, 55, 0.95), rgba(26, 43, 74, 0.92)),
    #142033;
  color: #fff;
}

.theme-catboost .hero-panel {
  background:
    linear-gradient(145deg, rgba(84, 44, 15, 0.94), rgba(37, 66, 65, 0.9)),
    #2c2118;
}

.node-row,
.tree-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.node-row span {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255,255,255,0.94), rgba(117, 201, 203, 0.78));
  box-shadow: 0 0 0 8px rgba(255,255,255,0.08), 0 12px 26px rgba(0,0,0,0.2);
}

.node-row:nth-child(2) span {
  width: 58px;
  height: 58px;
  background: linear-gradient(135deg, #ffffff, #9db9f6);
}

.tree-row span {
  width: 66px;
  height: 38px;
  border-radius: 6px;
  background: linear-gradient(135deg, rgba(255,255,255,0.94), rgba(250, 196, 103, 0.84));
  box-shadow: 0 8px 22px rgba(0,0,0,0.2);
}

.tree-row:nth-child(2) span {
  width: 48px;
}

.panel-caption {
  margin-top: 6px;
  text-align: center;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 4px 0 22px;
}

.metric-card {
  position: relative;
  padding: 18px 18px 16px;
  border: 1px solid rgba(204, 211, 224, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.metric-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
}

.metric-card span {
  display: block;
  color: #697589;
  font-size: 12px;
  font-weight: 800;
}

.metric-card b {
  display: block;
  margin-top: 5px;
  color: #172033;
  font-size: 30px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.metric-card em {
  display: block;
  margin-top: 8px;
  color: #7b8798;
  font-size: 12px;
  font-style: normal;
}

.predictor-shell {
  grid-template-columns: minmax(0, 1.62fr) minmax(360px, 0.8fr);
}

.ui-refresh .card {
  border-color: rgba(204, 211, 224, 0.92);
  border-radius: 8px;
  box-shadow: var(--shadow-md);
}

.ui-refresh .card-head {
  padding: 18px 22px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.96), rgba(249,251,255,0.92));
}

.ui-refresh .card-head h3 {
  font-size: 18px;
}

.head-note {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 12px;
  font-family: var(--font-cn);
}

.ui-refresh .field {
  padding: 13px 14px;
  border-radius: 8px;
  background: #f8fafc;
}

.ui-refresh .field input[type="number"] {
  font-family: var(--font-sans);
  font-size: 22px;
  letter-spacing: 0;
}

.ui-refresh .field-hint {
  min-height: 36px;
  line-height: 1.5;
}

.ui-refresh .btn-primary,
.ui-refresh .btn-ghost,
.ui-refresh .badge {
  border-radius: 8px;
  letter-spacing: 0;
  font-style: normal;
}

.ui-refresh .btn-primary span {
  font-family: var(--font-cn);
  font-style: normal;
}

.ui-refresh .result-card {
  top: 86px;
}

.ui-refresh .result-body {
  min-height: 390px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.94), rgba(248,250,252,0.96)),
    radial-gradient(420px 220px at 50% 0, rgba(35,84,167,0.10), transparent 68%);
}

.theme-catboost.ui-refresh .result-body {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.94), rgba(252,249,244,0.96)),
    radial-gradient(420px 220px at 50% 0, rgba(194,106,34,0.10), transparent 68%);
}

.ui-refresh .result-empty svg {
  width: 58px;
  height: 58px;
  color: var(--primary);
  opacity: 0.7;
}

.ui-refresh .result-value #mmp-mean {
  font-size: 72px;
}

.ui-refresh .result-ci {
  border-radius: 8px;
}

.ui-refresh .meta-item {
  border-radius: 8px;
  background: #fff;
}

.model-detail {
  margin-top: 28px;
}

.ui-refresh .section-alt {
  border: 1px solid rgba(204, 211, 224, 0.78);
  border-radius: 8px;
  background: rgba(255,255,255,0.58);
}

.ui-refresh .arch-card,
.ui-refresh .loss-card,
.fi-card {
  padding: 26px;
}

.ui-refresh .layer {
  border-radius: 8px;
}

.table-card,
.fi-card {
  padding: 22px 24px;
  overflow-x: auto;
}

.table-card h3 {
  margin: 0 0 14px;
  font-size: 16px;
}

.spaced-card {
  margin-top: 22px;
}

.ui-refresh .history-table thead th {
  background: #f5f7fb;
}

.ui-refresh .fi-row {
  grid-template-columns: 150px 1fr 64px;
}

.ui-refresh .fi-bar-track,
.ui-refresh .fi-bar-fill {
  border-radius: 6px;
}

@media (max-width: 980px) {
  .model-hero,
  .predictor-shell {
    grid-template-columns: 1fr;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ui-refresh .result-card {
    position: static;
  }
}

@media (max-width: 640px) {
  .model-hero {
    padding-top: 22px;
  }

  .model-hero-copy {
    padding: 26px 22px;
  }

  .hero-panel {
    min-height: 210px;
  }

  .metric-grid {
    grid-template-columns: 1fr;
  }

  .ui-refresh .card-head {
    align-items: flex-start;
    gap: 12px;
    flex-direction: column;
  }

  .ui-refresh .result-value #mmp-mean {
    font-size: 56px;
  }

  .ui-refresh .fi-row {
    grid-template-columns: 92px 1fr 50px;
  }
}

/* ============================================================
   Full page reconstruction v4
   English: Times New Roman / Chinese fallback: SimSun
============================================================ */
.page-redesign {
  --paper: #f4f0e7;
  --ink: #181713;
  --muted: #6d665c;
  --line: #d5cabc;
  --panel: #fffaf0;
  --deep: #17202a;
  --deep-2: #243647;
  --gold: #b4873b;
  --green: #126b61;
  --blue: #214d88;
  --redesign-accent: #214d88;
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Times New Roman", "SimSun", "宋体", serif;
  background:
    linear-gradient(90deg, rgba(24,23,19,0.045) 1px, transparent 1px),
    linear-gradient(180deg, rgba(24,23,19,0.035) 1px, transparent 1px),
    linear-gradient(135deg, #f8f4ec 0%, #efe7d9 42%, #f7f3ea 100%);
  background-size: 36px 36px, 36px 36px, auto;
  -webkit-font-smoothing: antialiased;
  letter-spacing: 0;
}

.page-catboost {
  --redesign-accent: #a15b14;
  --deep: #251f19;
  --deep-2: #3a2c20;
  --gold: #c0832a;
  --green: #116457;
  background:
    linear-gradient(90deg, rgba(24,23,19,0.045) 1px, transparent 1px),
    linear-gradient(180deg, rgba(24,23,19,0.035) 1px, transparent 1px),
    linear-gradient(135deg, #f9f0df 0%, #eee1cc 42%, #f6f0e4 100%);
  background-size: 36px 36px, 36px 36px, auto;
}

.page-redesign * {
  box-sizing: border-box;
}

.redesign-shell {
  width: min(1440px, calc(100% - 40px));
  margin: 0 auto;
  padding: 22px 0 56px;
}

.redesign-nav {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px 18px;
  border: 1px solid rgba(24, 23, 19, 0.18);
  background: rgba(255, 250, 240, 0.82);
  box-shadow: 0 18px 40px rgba(57, 43, 28, 0.08);
  backdrop-filter: blur(10px);
}

.nav-mark {
  display: grid;
  grid-template-columns: auto auto;
  align-items: end;
  gap: 10px;
  color: var(--ink);
}

.mark-core {
  padding: 8px 12px;
  color: #fff;
  background: var(--deep);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0;
}

.mark-sub {
  padding-bottom: 5px;
  color: var(--muted);
  font-size: 14px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  border: 1px solid var(--line);
  background: #fbf5ea;
}

.nav-links a {
  min-width: 92px;
  padding: 10px 18px;
  text-align: center;
  color: #3f3930;
  border: 1px solid transparent;
  font-size: 15px;
}

.nav-links a.active,
.nav-links a:hover {
  color: #fff;
  background: var(--redesign-accent);
  border-color: rgba(0,0,0,0.08);
}

.grand-hero {
  min-height: 520px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(380px, 0.9fr);
  gap: 18px;
  margin-top: 18px;
}

.hero-copy,
.instrument-board,
.input-workbench,
.result-observatory,
.knowledge-section,
.table-section,
.importance-section {
  border: 1px solid rgba(24, 23, 19, 0.18);
  box-shadow: 0 22px 56px rgba(57, 43, 28, 0.10);
}

.hero-copy {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 52px;
  overflow: hidden;
  background:
    linear-gradient(115deg, rgba(255,250,240,0.95), rgba(255,250,240,0.78)),
    linear-gradient(135deg, rgba(33,77,136,0.16), rgba(18,107,97,0.10));
}

.page-catboost .hero-copy {
  background:
    linear-gradient(115deg, rgba(255,250,240,0.95), rgba(255,250,240,0.78)),
    linear-gradient(135deg, rgba(161,91,20,0.18), rgba(17,100,87,0.10));
}

.hero-copy::before {
  content: "";
  position: absolute;
  inset: 28px;
  border: 1px solid rgba(24, 23, 19, 0.12);
  pointer-events: none;
}

.eyebrow {
  margin: 0;
  color: var(--redesign-accent);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
}

.hero-copy h1 {
  position: relative;
  max-width: 760px;
  margin: 18px 0 18px;
  font-size: clamp(54px, 7vw, 96px);
  line-height: 0.98;
  letter-spacing: 0;
  font-weight: 700;
}

.hero-lead {
  position: relative;
  max-width: 720px;
  margin: 0;
  color: #514b43;
  font-size: 19px;
  line-height: 1.9;
}

.hero-actions {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.hero-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 150px;
  height: 48px;
  border: 1px solid rgba(24, 23, 19, 0.22);
  font-size: 17px;
  font-weight: 700;
}

.hero-action.primary {
  color: #fff;
  background: var(--deep);
}

.hero-action.secondary {
  color: var(--ink);
  background: rgba(255,255,255,0.55);
}

.instrument-board {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 34px;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(23,32,42,0.96), rgba(36,54,71,0.95)),
    var(--deep);
}

.instrument-board::before {
  content: "";
  position: absolute;
  inset: 24px;
  border: 1px solid rgba(255,255,255,0.16);
}

.board-title {
  position: relative;
  font-size: 28px;
  font-weight: 700;
}

.neural-map {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 72px;
  gap: 12px;
  margin: 34px 0;
}

.map-cell,
.search-matrix span {
  display: block;
  border: 1px solid rgba(255,255,255,0.22);
  background: linear-gradient(135deg, rgba(255,255,255,0.20), rgba(180,135,59,0.48));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
}

.map-cell.tall {
  grid-row: span 2;
}

.map-cell.wide {
  grid-column: span 2;
}

.board-scale {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: rgba(255,255,255,0.74);
  font-size: 14px;
}

.tree-board {
  background:
    linear-gradient(135deg, rgba(37,31,25,0.97), rgba(58,44,32,0.95)),
    var(--deep);
}

.search-matrix {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin: 38px 0;
}

.search-matrix span {
  aspect-ratio: 1;
}

.search-matrix .hot {
  background: linear-gradient(135deg, rgba(255,255,255,0.34), rgba(192,131,42,0.95));
}

.data-ribbon {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-top: 18px;
  border: 1px solid rgba(24, 23, 19, 0.18);
  background: var(--panel);
  box-shadow: 0 18px 46px rgba(57, 43, 28, 0.08);
}

.ribbon-item {
  min-height: 146px;
  padding: 24px 26px;
  border-right: 1px solid var(--line);
}

.ribbon-item:last-child {
  border-right: none;
}

.ribbon-item span,
.training-strip span,
.result-metrics span {
  display: block;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.ribbon-item b {
  display: block;
  margin-top: 8px;
  font-size: 46px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.ribbon-item em {
  display: block;
  margin-top: 10px;
  color: var(--redesign-accent);
  font-size: 16px;
  font-style: normal;
}

.prediction-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(390px, 0.85fr);
  gap: 18px;
  align-items: start;
  margin-top: 18px;
}

.input-workbench,
.result-observatory,
.knowledge-section,
.table-section,
.importance-section {
  background: rgba(255, 250, 240, 0.92);
}

.workbench-head,
.observatory-head,
.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 30px;
  border-bottom: 1px solid var(--line);
}

.workbench-head h2,
.observatory-head h2,
.section-title h2 {
  margin: 8px 0 0;
  font-size: 32px;
  line-height: 1.15;
}

.bench-tools {
  display: flex;
  gap: 8px;
}

.bench-tools button {
  height: 40px;
  padding: 0 18px;
  border: 1px solid rgba(24,23,19,0.22);
  color: var(--ink);
  background: #fff8ed;
  font-family: "Times New Roman", "SimSun", "宋体", serif;
  font-size: 15px;
  cursor: pointer;
}

.bench-tools button:hover {
  color: #fff;
  background: var(--redesign-accent);
}

.redesign-form {
  padding: 0;
}

.feature-band {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  border-bottom: 1px solid var(--line);
}

.band-label {
  padding: 24px 22px;
  border-right: 1px solid var(--line);
  background: rgba(24,23,19,0.035);
}

.band-label span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-bottom: 18px;
  color: #fff;
  background: var(--deep);
  font-size: 22px;
  font-weight: 700;
}

.band-label b,
.band-label em {
  display: block;
}

.band-label b {
  font-size: 22px;
}

.band-label em {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
  font-style: normal;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 0;
}

.feature-field {
  min-height: 154px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,0.32);
}

.feature-field:hover,
.feature-field:focus-within {
  background: #fffaf0;
  box-shadow: inset 0 0 0 2px rgba(33, 77, 136, 0.16);
}

.page-catboost .feature-field:hover,
.page-catboost .feature-field:focus-within {
  box-shadow: inset 0 0 0 2px rgba(161, 91, 20, 0.18);
}

.feature-field span {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.feature-field b {
  font-size: 17px;
}

.feature-field em,
.feature-field small {
  color: var(--muted);
  font-style: normal;
}

.feature-field input {
  width: 100%;
  padding: 4px 0 8px;
  border: none;
  border-bottom: 2px solid rgba(24,23,19,0.24);
  outline: none;
  color: var(--ink);
  background: transparent;
  font-family: "Times New Roman", "SimSun", "宋体", serif;
  font-size: 34px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.feature-field input:focus {
  border-bottom-color: var(--redesign-accent);
}

.feature-field small {
  min-height: 38px;
  font-size: 13px;
  line-height: 1.45;
}

.predict-command {
  width: 100%;
  height: 72px;
  border: none;
  color: #fff;
  background: linear-gradient(90deg, var(--deep), var(--redesign-accent));
  font-family: "Times New Roman", "SimSun", "宋体", serif;
  font-size: 24px;
  font-weight: 700;
  cursor: pointer;
}

.predict-command:hover {
  filter: brightness(1.05);
}

.predict-command:disabled {
  opacity: 0.72;
  cursor: not-allowed;
}

.result-observatory {
  position: sticky;
  top: 18px;
  min-height: 680px;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(23,32,42,0.98), rgba(36,54,71,0.97)),
    var(--deep);
}

.page-catboost .result-observatory {
  background:
    linear-gradient(180deg, rgba(37,31,25,0.98), rgba(58,44,32,0.97)),
    var(--deep);
}

.observatory-head {
  border-bottom-color: rgba(255,255,255,0.16);
}

.observatory-head h2,
.observatory-head .eyebrow {
  color: #fff;
}

.observatory-head span {
  color: rgba(255,255,255,0.72);
}

.result-empty {
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 18px;
  padding: 34px;
  color: rgba(255,255,255,0.76);
  text-align: center;
}

.result-empty svg {
  width: 82px;
  height: 82px;
  color: var(--gold);
  opacity: 1;
}

.page-redesign .result-empty p {
  margin: 0;
  color: rgba(255,255,255,0.76);
  font-size: 17px;
  line-height: 1.7;
}

.result-content {
  padding: 34px;
}

.mmp-display {
  padding: 28px 0 32px;
  border-bottom: 1px solid rgba(255,255,255,0.16);
  text-align: center;
}

.mmp-display span {
  display: block;
  color: rgba(255,255,255,0.68);
  font-size: 15px;
  font-weight: 700;
}

.mmp-display b {
  display: block;
  margin-top: 10px;
  color: #fff;
  font-size: clamp(64px, 8vw, 108px);
  line-height: 0.9;
  font-variant-numeric: tabular-nums;
}

.mmp-display em {
  display: block;
  margin-top: 12px;
  color: var(--gold);
  font-size: 22px;
  font-style: normal;
}

.ci-display {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 12px;
  align-items: center;
  margin-top: 22px;
  padding: 15px 16px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.06);
}

.ci-display span {
  color: rgba(255,255,255,0.66);
}

.ci-display b,
.ci-display i {
  color: #fff;
  font-size: 18px;
  font-style: normal;
}

.result-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 16px;
}

.result-metrics div {
  min-height: 88px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.06);
}

.result-metrics span {
  color: rgba(255,255,255,0.62);
}

.result-metrics b {
  display: block;
  margin-top: 10px;
  color: #fff;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.page-redesign .fold-list {
  margin-top: 26px;
}

.page-redesign .fold-list h4 {
  margin: 0 0 14px;
  color: rgba(255,255,255,0.68);
  font-size: 15px;
  letter-spacing: 0;
  text-transform: none;
}

.page-redesign .fold-row {
  grid-template-columns: 66px 1fr 72px;
  color: #fff;
}

.page-redesign .fold-name {
  color: rgba(255,255,255,0.66);
}

.page-redesign .fold-track {
  height: 12px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.08);
}

.page-redesign .fold-fill {
  background: linear-gradient(90deg, var(--gold), #fff1b8);
}

.page-redesign .fold-val {
  color: #fff;
}

.knowledge-section,
.table-section,
.importance-section {
  margin-top: 18px;
}

.knowledge-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
}

.knowledge-panel {
  min-height: 220px;
  padding: 28px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,0.28);
}

.knowledge-panel.large {
  grid-column: span 2;
}

.knowledge-panel h3 {
  margin: 0 0 14px;
  font-size: 25px;
}

.knowledge-panel p {
  margin: 0;
  color: #514b43;
  font-size: 17px;
  line-height: 1.8;
}

.layer-pipeline {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  overflow-x: auto;
}

.layer-pipeline span {
  min-width: 96px;
  min-height: 96px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: #fff;
  background: var(--deep);
  font-size: 28px;
  font-weight: 700;
}

.layer-pipeline small {
  margin-top: 6px;
  color: rgba(255,255,255,0.72);
  font-size: 13px;
  font-weight: 400;
}

.layer-pipeline i {
  width: 34px;
  height: 2px;
  flex: 0 0 34px;
  background: var(--redesign-accent);
}

.training-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  border-bottom: 1px solid var(--line);
}

.training-strip div {
  padding: 22px;
  border-right: 1px solid var(--line);
}

.training-strip b {
  display: block;
  margin-top: 8px;
  font-size: 27px;
}

.table-wrap,
.importance-chart {
  padding: 24px 28px 30px;
  overflow-x: auto;
}

.page-redesign .history-table {
  min-width: 720px;
  font-family: "Times New Roman", "SimSun", "宋体", serif;
}

.page-redesign .history-table thead th {
  padding: 15px 14px;
  color: #fff;
  background: var(--deep);
  border-color: rgba(255,255,255,0.12);
  font-size: 16px;
  letter-spacing: 0;
}

.page-redesign .history-table tbody td {
  padding: 15px 14px;
  border-color: var(--line);
  background: rgba(255,255,255,0.25);
  font-size: 16px;
}

.importance-chart {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.page-redesign .fi-row {
  display: grid;
  grid-template-columns: 150px minmax(260px, 1fr) 70px;
  align-items: center;
  gap: 14px;
}

.page-redesign .fi-name {
  color: var(--ink);
  font-size: 16px;
  text-align: right;
}

.page-redesign .fi-bar-track {
  height: 30px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.38);
}

.page-redesign .fi-bar-fill {
  background: linear-gradient(90deg, var(--redesign-accent), var(--gold));
}

.page-redesign .fi-val {
  color: var(--ink);
  font-size: 16px;
}

.page-redesign .result-error {
  margin: 22px 28px;
  padding: 14px 16px;
  border: 1px solid #f0b9aa;
  color: #7c1f1a;
  background: #fff1ed;
}

@media (max-width: 1120px) {
  .grand-hero,
  .prediction-stage {
    grid-template-columns: 1fr;
  }

  .result-observatory {
    position: static;
    min-height: 560px;
  }

  .knowledge-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .training-strip,
  .data-ribbon {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  .redesign-shell {
    width: min(100% - 24px, 1440px);
    padding-top: 12px;
  }

  .redesign-nav,
  .workbench-head,
  .observatory-head,
  .section-title {
    align-items: stretch;
    flex-direction: column;
  }

  .nav-links {
    width: 100%;
    overflow-x: auto;
  }

  .nav-links a {
    min-width: 84px;
  }

  .hero-copy {
    padding: 38px 24px;
  }

  .hero-copy::before {
    inset: 16px;
  }

  .hero-copy h1 {
    font-size: 46px;
  }

  .instrument-board {
    min-height: 380px;
    padding: 24px;
  }

  .feature-band {
    grid-template-columns: 1fr;
  }

  .band-label {
    border-right: none;
  }

  .data-ribbon,
  .training-strip,
  .knowledge-grid {
    grid-template-columns: 1fr;
  }

  .knowledge-panel.large {
    grid-column: span 1;
  }

  .result-metrics {
    grid-template-columns: 1fr;
  }

  .page-redesign .fi-row {
    grid-template-columns: 94px minmax(160px, 1fr) 54px;
  }
}

/* ============================================================
   Clean unified interface v5
   Chinese: SimSun / English: Times New Roman
============================================================ */
.clean-ui {
  --clean-bg: #f7f8fb;
  --clean-card: #ffffff;
  --clean-card-soft: #f3f6fa;
  --clean-text: #1f2937;
  --clean-muted: #6b7280;
  --clean-line: #dce3ec;
  --clean-blue: #2f6fbe;
  --clean-blue-soft: #e8f1ff;
  --clean-teal: #12837c;
  --clean-orange: #c66a1e;
  --clean-shadow: 0 16px 42px rgba(31, 41, 55, 0.08);
  margin: 0;
  min-height: 100vh;
  color: var(--clean-text);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.8), rgba(247,248,251,0.95)),
    radial-gradient(760px 360px at 14% -10%, rgba(47,111,190,0.13), transparent 62%),
    radial-gradient(680px 340px at 92% 2%, rgba(18,131,124,0.10), transparent 60%),
    var(--clean-bg);
  font-family: "Times New Roman", "SimSun", "宋体", serif;
  letter-spacing: 0;
}

@keyframes cleanPageIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cleanPanelIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.clean-ui * {
  box-sizing: border-box;
}

.clean-ui [hidden] {
  display: none !important;
}

.clean-ui sub {
  font-family: inherit;
  font-size: 0.72em;
  font-weight: inherit;
  line-height: 0;
  vertical-align: sub;
}

.clean-shell {
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;
  padding: 24px 0 52px;
  animation: cleanPageIn 220ms ease-out both;
}

.clean-nav {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 0 18px;
  border: 1px solid var(--clean-line);
  border-radius: 16px;
  background: rgba(255,255,255,0.82);
  box-shadow: 0 10px 30px rgba(31, 41, 55, 0.06);
  backdrop-filter: blur(10px);
}

.clean-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-symbol {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--clean-blue), var(--clean-teal));
  font-size: 22px;
  font-weight: 700;
}

.clean-brand b,
.clean-brand em {
  display: block;
  line-height: 1.15;
}

.clean-brand b {
  font-size: 18px;
}

.clean-brand em {
  color: var(--clean-muted);
  font-size: 13px;
  font-style: normal;
}

.clean-nav nav {
  display: flex;
  gap: 6px;
}

.clean-nav nav a {
  padding: 9px 15px;
  border-radius: 10px;
  color: var(--clean-muted);
  font-size: 15px;
}

.clean-nav nav a.active,
.clean-nav nav a:hover {
  color: var(--clean-blue);
  background: var(--clean-blue-soft);
}

.home-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(560px, 1.1fr);
  gap: 24px;
  align-items: stretch;
  margin-top: 26px;
}

.home-intro,
.compare-card,
.model-summary,
.clean-panel,
.clean-info-grid article,
.clean-note {
  border: 1px solid var(--clean-line);
  border-radius: 18px;
  background: rgba(255,255,255,0.9);
  box-shadow: var(--clean-shadow);
  animation: cleanPanelIn 260ms ease-out both;
}

.compare-card,
.clean-panel,
.clean-info-grid article,
.clean-button,
.panel-tools button,
.clean-submit,
.clean-nav nav a {
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    color 180ms ease,
    opacity 180ms ease;
}

.compare-card:hover,
.clean-info-grid article:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 48px rgba(31, 41, 55, 0.11);
}

.clean-button:hover,
.panel-tools button:hover,
.clean-submit:hover {
  transform: translateY(-1px);
}

.model-compare .compare-card:nth-child(2),
.summary-metrics,
.clean-workspace,
.clean-info-grid,
.clean-note {
  animation-delay: 60ms;
}

.home-intro {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 520px;
  padding: 44px;
}

.clean-kicker {
  margin: 0;
  color: var(--clean-blue);
  font-size: 14px;
  font-weight: 700;
}

.home-intro h1,
.model-summary h1 {
  margin: 16px 0 16px;
  font-size: clamp(38px, 5vw, 66px);
  line-height: 1.08;
  letter-spacing: 0;
}

.home-intro p,
.model-summary p,
.compare-card p,
.clean-info-grid p,
.panel-head p {
  color: var(--clean-muted);
  font-size: 17px;
  line-height: 1.75;
}

.home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.clean-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
  height: 44px;
  padding: 0 18px;
  border: 1px solid var(--clean-line);
  border-radius: 12px;
  color: var(--clean-text);
  background: #fff;
  font-size: 16px;
  font-weight: 700;
}

.clean-button.primary {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--clean-blue), var(--clean-teal));
}

.model-compare {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.compare-card {
  position: relative;
  min-height: 250px;
  display: flex;
  flex-direction: column;
  padding: 28px;
  overflow: hidden;
}

.compare-card::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, var(--clean-blue), var(--clean-teal));
}

.compare-card.accent::after {
  background: linear-gradient(180deg, var(--clean-orange), var(--clean-teal));
}

.model-label {
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--clean-blue);
  background: var(--clean-blue-soft);
  font-size: 13px;
  font-weight: 700;
}

.compare-card.accent .model-label {
  color: var(--clean-orange);
  background: #fff1df;
}

.compare-card h2 {
  margin: 16px 0 8px;
  font-size: 30px;
}

.compare-card p {
  margin: 0;
  max-width: 720px;
}

.compare-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: auto 0 18px;
  padding-top: 22px;
}

.compare-metrics div,
.summary-metrics div,
.clean-result-meta div,
.clean-note div {
  padding: 14px;
  border: 1px solid var(--clean-line);
  border-radius: 12px;
  background: var(--clean-card-soft);
}

.compare-metrics span,
.summary-metrics span,
.clean-result-meta span,
.clean-note span {
  display: block;
  color: var(--clean-muted);
  font-size: 13px;
  font-weight: 700;
}

.compare-metrics b,
.summary-metrics b,
.clean-note b {
  display: block;
  margin-top: 5px;
  font-size: 24px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.compare-card > em {
  color: var(--clean-blue);
  font-size: 16px;
  font-style: normal;
  font-weight: 700;
}

.clean-note {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 24px;
  padding: 14px;
}

.clean-note div {
  text-align: center;
  background: #fff;
}

.clean-note b {
  color: var(--clean-blue);
}

.model-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(430px, 0.9fr);
  gap: 24px;
  align-items: end;
  margin-top: 26px;
  padding: 34px;
}

.model-summary h1 {
  font-size: clamp(34px, 4.4vw, 56px);
}

.summary-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.clean-catboost .brand-symbol,
.clean-catboost .clean-submit {
  background: linear-gradient(135deg, var(--clean-orange), var(--clean-teal));
}

.clean-catboost .clean-kicker,
.clean-catboost .clean-nav nav a.active,
.clean-catboost .clean-nav nav a:hover {
  color: var(--clean-orange);
}

.clean-catboost .clean-nav nav a.active,
.clean-catboost .clean-nav nav a:hover {
  background: #fff1df;
}

.clean-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(360px, 0.85fr);
  gap: 24px;
  align-items: start;
  margin-top: 24px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 26px;
  border-bottom: 1px solid var(--clean-line);
}

.panel-head.compact {
  padding: 22px 24px;
}

.panel-head h2 {
  margin: 0;
  font-size: 26px;
}

.panel-head p {
  margin: 6px 0 0;
  font-size: 14px;
}

.panel-tools {
  display: flex;
  gap: 8px;
}

.panel-tools button {
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--clean-line);
  border-radius: 10px;
  color: var(--clean-text);
  background: #fff;
  font-family: "Times New Roman", "SimSun", "宋体", serif;
  font-size: 14px;
  cursor: pointer;
}

.panel-tools button:hover {
  color: var(--clean-blue);
  background: var(--clean-blue-soft);
}

.clean-form {
  padding: 24px 26px 26px;
}

.clean-group + .clean-group {
  margin-top: 24px;
}

.clean-group h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  font-size: 20px;
}

.clean-group h3 span {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  color: #fff;
  background: var(--clean-blue);
  font-size: 15px;
}

.clean-catboost .clean-group h3 span {
  background: var(--clean-orange);
}

.clean-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  gap: 12px;
}

.clean-field {
  min-height: 142px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 14px;
  border: 1px solid var(--clean-line);
  border-radius: 14px;
  background: var(--clean-card-soft);
}

.clean-field:focus-within {
  border-color: rgba(47,111,190,0.55);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(47,111,190,0.10);
}

.clean-field span {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.clean-field b {
  font-size: 16px;
}

.clean-field em,
.clean-field small {
  color: var(--clean-muted);
  font-style: normal;
}

.clean-field input {
  width: 100%;
  padding: 5px 0;
  border: none;
  border-bottom: 1px solid #c8d1dd;
  outline: none;
  color: var(--clean-text);
  background: transparent;
  font-family: "Times New Roman", "SimSun", "宋体", serif;
  font-size: 26px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.clean-field small {
  margin-top: auto;
  font-size: 12px;
  line-height: 1.45;
}

.clean-submit {
  width: 100%;
  height: 50px;
  margin-top: 24px;
  border: none;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--clean-blue), var(--clean-teal));
  font-family: "Times New Roman", "SimSun", "宋体", serif;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
}

.result-panel {
  position: sticky;
  top: 20px;
  min-height: 640px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.result-panel .result-empty {
  flex: 1;
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 22px;
  margin: 24px;
  padding: 34px 26px;
  border: 1px solid #d7e0eb;
  border-radius: 16px;
  color: var(--clean-muted);
  background:
    radial-gradient(260px 180px at 50% 18%, rgba(47,111,190,0.12), transparent 72%),
    linear-gradient(180deg, rgba(248,250,252,0.96), rgba(255,255,255,0.98));
  text-align: center;
}

.result-panel .result-empty p {
  margin: 0;
  color: var(--clean-muted);
  font-size: 15px;
  line-height: 1.8;
}

.result-panel .result-empty strong {
  color: var(--clean-text);
  font-size: 22px;
}

.empty-orbit {
  width: 126px;
  height: 126px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(47,111,190,0.22);
  border-radius: 50%;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.88), rgba(232,241,255,0.88));
  box-shadow: inset 0 0 0 12px rgba(47,111,190,0.05);
}

.empty-orbit span {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--clean-blue), var(--clean-teal));
  font-size: 18px;
  font-weight: 700;
}

.clean-catboost .empty-orbit {
  border-color: rgba(198,106,30,0.24);
  background:
    linear-gradient(135deg, rgba(255,255,255,0.88), rgba(255,241,223,0.88));
}

.clean-catboost .empty-orbit span {
  background: linear-gradient(135deg, var(--clean-orange), var(--clean-teal));
}

.empty-preview {
  width: 100%;
  display: grid;
  gap: 10px;
  margin-top: 4px;
}

.empty-preview div {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--clean-line);
  border-radius: 12px;
  background: rgba(255,255,255,0.76);
  text-align: left;
}

.empty-preview b {
  color: var(--clean-blue);
  font-size: 14px;
}

.clean-catboost .empty-preview b {
  color: var(--clean-orange);
}

.empty-preview span {
  color: var(--clean-muted);
  font-size: 14px;
  font-weight: 700;
}

.result-panel .result-content {
  flex: 1;
  padding: 22px 24px 24px;
}

.clean-result-main {
  padding: 24px 18px 26px;
  border: 1px solid var(--clean-line);
  border-radius: 18px;
  background:
    radial-gradient(360px 180px at 50% 0, rgba(47,111,190,0.12), transparent 70%),
    linear-gradient(180deg, #ffffff, #f8fbff);
  text-align: center;
}

.clean-catboost .clean-result-main {
  background:
    radial-gradient(360px 180px at 50% 0, rgba(198,106,30,0.12), transparent 70%),
    linear-gradient(180deg, #ffffff, #fffaf4);
}

.clean-result-main span {
  color: var(--clean-muted);
  font-size: 13px;
  font-weight: 700;
}

.clean-result-main b {
  display: block;
  margin-top: 6px;
  color: var(--clean-blue);
  font-size: 76px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.clean-catboost .clean-result-main b {
  color: var(--clean-orange);
}

.clean-result-main em {
  display: block;
  color: var(--clean-muted);
  font-size: 18px;
  font-style: normal;
}

.clean-ci {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--clean-card-soft);
}

.clean-ci span {
  color: var(--clean-muted);
  font-size: 13px;
}

.clean-ci b,
.clean-ci i {
  font-size: 16px;
  font-style: normal;
}

.clean-result-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.clean-result-meta div {
  min-height: 78px;
  padding: 13px 12px;
}

.clean-result-meta b {
  display: block;
  margin-top: 5px;
  font-size: 14px;
}

.clean-ui .fold-list {
  margin-top: 22px;
  padding: 16px;
  border: 1px solid var(--clean-line);
  border-radius: 16px;
  background: #fff;
}

.clean-ui .fold-list h4 {
  margin: 0 0 10px;
  color: var(--clean-muted);
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
}

.clean-ui .fold-row {
  grid-template-columns: 60px 1fr 58px;
  font-size: 13px;
}

.clean-ui .fold-track {
  height: 8px;
  border: none;
  background: #e4eaf2;
}

.clean-ui .fold-fill {
  background: linear-gradient(90deg, var(--clean-blue), var(--clean-teal));
}

.clean-ui .cb-fill {
  background: linear-gradient(90deg, var(--clean-orange), var(--clean-teal)) !important;
}

.clean-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.clean-info-grid article {
  padding: 22px;
}

.clean-info-grid h3 {
  margin: 0 0 8px;
  font-size: 22px;
}

.clean-info-grid p {
  margin: 0;
  font-size: 15px;
}

.model-note {
  margin-top: 24px;
}

.importance-panel,
.clean-table-panel {
  margin-top: 24px;
  overflow-x: auto;
}

.importance-panel .fi-chart {
  padding: 22px 24px 26px;
}

.clean-ui .fi-row {
  grid-template-columns: 130px minmax(180px, 1fr) 54px;
}

.clean-ui .fi-bar-track {
  height: 18px;
  border: none;
  border-radius: 999px;
  background: #e4eaf2;
}

.clean-ui .fi-bar-fill {
  border-radius: 999px;
  background: linear-gradient(90deg, var(--clean-orange), var(--clean-teal));
}

.clean-ui .history-table {
  min-width: 720px;
  font-family: "Times New Roman", "SimSun", "宋体", serif;
}

.clean-ui .history-table thead th {
  padding: 12px 14px;
  color: var(--clean-muted);
  background: var(--clean-card-soft);
  border-color: var(--clean-line);
  font-size: 14px;
  letter-spacing: 0;
}

.clean-ui .history-table tbody td {
  padding: 12px 14px;
  border-color: var(--clean-line);
  font-size: 14px;
}

.clean-ui .result-error {
  margin: 0 24px 24px;
  padding: 12px 14px;
  border: 1px solid #fecaca;
  border-radius: 12px;
  color: #b91c1c;
  background: #fef2f2;
}

@media (max-width: 980px) {
  .home-layout,
  .model-summary,
  .clean-workspace {
    grid-template-columns: 1fr;
  }

  .home-intro {
    min-height: auto;
  }

  .result-panel {
    position: static;
  }

  .clean-info-grid,
  .clean-note {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 620px) {
  .clean-shell {
    width: min(100% - 24px, 1240px);
    padding-top: 14px;
  }

  .clean-nav {
    height: auto;
    align-items: stretch;
    flex-direction: column;
    padding: 14px;
  }

  .clean-nav nav {
    overflow-x: auto;
  }

  .home-intro,
  .model-summary {
    padding: 26px;
  }

  .compare-metrics,
  .summary-metrics,
  .clean-result-meta,
  .clean-info-grid,
  .clean-note {
    grid-template-columns: 1fr;
  }

  .panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  .clean-result-main b {
    font-size: 54px;
  }
}

/* Home refinement: calmer academic landing page */
.clean-home .clean-shell {
  width: min(1160px, calc(100% - 40px));
}

.clean-home .home-layout {
  grid-template-columns: minmax(0, 0.92fr) minmax(500px, 1.08fr);
  gap: 20px;
}

.clean-home .home-intro {
  min-height: 430px;
  padding: 38px 40px;
  justify-content: center;
}

.clean-home .home-intro h1 {
  max-width: 620px;
  margin: 14px 0 18px;
  font-size: clamp(34px, 4.2vw, 52px);
  line-height: 1.16;
}

.clean-home .home-intro p {
  max-width: 650px;
  font-size: 16px;
  line-height: 1.85;
}

.clean-home .model-compare {
  gap: 16px;
}

.clean-home .compare-card {
  min-height: 220px;
  padding: 24px 26px;
}

.clean-home .compare-card h2 {
  margin-top: 14px;
  font-size: 26px;
}

.clean-home .compare-card p {
  font-size: 15px;
  line-height: 1.75;
}

.clean-home .compare-metrics {
  margin-top: 18px;
  margin-bottom: 14px;
  padding-top: 0;
}

.clean-home .compare-card > em {
  color: var(--clean-muted);
  font-size: 14px;
}

.clean-home .clean-note {
  box-shadow: 0 10px 28px rgba(31, 41, 55, 0.05);
}

@media (max-width: 980px) {
  .clean-home .home-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .clean-home .clean-shell {
    width: min(100% - 24px, 1160px);
  }

  .clean-home .home-intro {
    padding: 28px 24px;
  }

  .clean-home .home-intro h1 {
    font-size: 34px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .clean-ui *,
  .clean-ui *::before,
  .clean-ui *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
}
