:root {
  --bg: #f7faf9;
  --surface: #ffffff;
  --ink: #14243a;
  --muted: #657184;
  --line: #dde6e4;
  --blue: #2c688d;
  --blue-soft: #e8f1f6;
  --green: #2e9d87;
  --green-soft: #e7f5ef;
  --dark: #112638;
  --copper: #b96d42;
  --zinc: #8995a2;
  --shadow: 0 18px 60px rgba(30, 53, 69, .08);
  --radius: 24px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", "Noto Sans TC", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 85% 0%, rgba(46,157,135,.08), transparent 26rem),
    radial-gradient(circle at 0% 18%, rgba(44,104,141,.06), transparent 24rem),
    var(--bg);
  line-height: 1.55;
}

a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { cursor: pointer; }

.shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 0 max(20px, calc((100vw - 1180px) / 2));
  background: rgba(247,250,249,.86);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(221,230,228,.75);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.02em; }
.brand b { color: var(--green); }
.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: linear-gradient(140deg, var(--blue), var(--green));
  color: white;
  font-weight: 800;
}
.nav { display: flex; gap: 26px; color: var(--muted); font-size: 14px; }
.nav a:hover { color: var(--ink); }

.hero {
  min-height: 700px;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 56px;
  align-items: center;
  padding: 86px 0 70px;
}
.eyebrow {
  margin: 0 0 14px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .18em;
}
h1, h2, h3, p { margin-top: 0; }
.hero h1 {
  margin-bottom: 24px;
  font-size: clamp(44px, 6vw, 76px);
  line-height: 1.03;
  letter-spacing: -.055em;
}
.hero h1 span { color: var(--blue); }
.hero-lead {
  max-width: 680px;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.8;
}
.hero-actions { display: flex; gap: 12px; margin-top: 32px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 14px;
  font-weight: 700;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.button:hover { transform: translateY(-1px); }
.button.primary { background: var(--dark); color: white; box-shadow: 0 10px 28px rgba(17,38,56,.18); }
.button.ghost { border-color: var(--line); background: rgba(255,255,255,.68); }
.button.soft { background: #eef4f3; color: var(--ink); }
.button.full { width: 100%; margin-top: 10px; }

.hero-visual {
  position: relative;
  min-height: 460px;
  border-radius: 38px;
  background: linear-gradient(145deg, #eef5f7, #edf7f1 75%);
  border: 1px solid #dbe8e4;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.hero-visual::before,
.hero-visual::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
}
.hero-visual::before { width: 230px; height: 230px; background: rgba(44,104,141,.08); right: -80px; top: -60px; }
.hero-visual::after { width: 180px; height: 180px; background: rgba(46,157,135,.08); left: -60px; bottom: -50px; }
.cell-mini { position: absolute; inset: 72px 56px 68px; }
.beaker {
  position: absolute;
  bottom: 28px;
  width: 150px;
  height: 190px;
  border: 3px solid rgba(20,36,58,.16);
  border-top: 0;
  border-radius: 0 0 30px 30px;
  background: linear-gradient(to top, var(--liquid) 0 58%, transparent 58%);
}
.beaker::before {
  content: "";
  position: absolute;
  width: 34px;
  height: 170px;
  top: -66px;
  left: 58px;
  border-radius: 8px;
  background: var(--metal);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.08);
}
.beaker span { position: absolute; inset: auto 0 12px; text-align: center; font-weight: 800; }
.beaker small { position: absolute; inset: auto 0 78px; text-align: center; color: rgba(20,36,58,.62); }
.beaker.zinc { left: 10px; --metal: var(--zinc); --liquid: rgba(137,149,162,.17); }
.beaker.copper { right: 10px; --metal: var(--copper); --liquid: rgba(44,104,141,.25); }
.bridge {
  position: absolute;
  left: 50%; top: 130px;
  width: 170px; height: 78px;
  transform: translateX(-50%);
  border: 16px solid #c8d6d4;
  border-bottom: 0;
  border-radius: 90px 90px 0 0;
}
.wire-line {
  position: absolute;
  top: 16px; left: 85px; right: 85px; height: 100px;
  border-top: 4px solid var(--dark);
  border-radius: 50%;
}
.electron { position: absolute; top: -4px; font-size: 13px; font-weight: 800; color: var(--blue); animation: drift 3s linear infinite; }
.e1 { left: 110px; }.e2 { left: 110px; animation-delay: 1.5s; }
@keyframes drift { from { transform: translateX(0); opacity: 0; } 10%, 90% { opacity: 1; } to { transform: translateX(260px); opacity: 0; } }
.metric-float {
  position: absolute;
  right: 24px;
  bottom: 22px;
  display: grid;
  gap: 2px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(10px);
  box-shadow: 0 12px 30px rgba(20,36,58,.10);
}
.metric-float small, .metric-float span { color: var(--muted); }
.metric-float strong { font-size: 28px; letter-spacing: -.03em; }

.section { padding: 90px 0; }
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 50px;
  margin-bottom: 36px;
}
.section-heading h2 { margin-bottom: 0; font-size: clamp(34px, 4vw, 52px); letter-spacing: -.045em; line-height: 1.1; }
.section-heading > p { max-width: 520px; margin-bottom: 4px; color: var(--muted); }
.section-heading.inverse h2, .section-heading.inverse > p { color: white; }
.section-heading.inverse .eyebrow { color: #6dd7be; }

.experiment-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.experiment-card {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  padding: 25px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 8px 30px rgba(30,53,69,.035);
}
.experiment-card .step { color: var(--green); font: 800 12px/1 monospace; letter-spacing: .12em; }
.experiment-card h3 { margin: 54px 0 12px; font-size: 23px; letter-spacing: -.02em; }
.experiment-card p { color: var(--muted); }
.experiment-card strong { margin-top: auto; font-size: 13px; color: var(--blue); }

.simulator-section { background: var(--dark); color: white; }
.sim-layout { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 18px; align-items: start; }
.control-panel, .sim-stage { border-radius: 24px; }
.control-panel { padding: 22px; background: #183144; border: 1px solid rgba(255,255,255,.08); position: sticky; top: 92px; }
.mode-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 24px; padding: 4px; background: rgba(255,255,255,.06); border-radius: 13px; }
.mode { min-height: 38px; border: 0; border-radius: 10px; background: transparent; color: #9fb0bd; font-size: 13px; font-weight: 700; }
.mode.active { background: white; color: var(--dark); }
.control-group { margin-bottom: 21px; }
.control-group label { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 10px; color: #d8e4ea; font-size: 13px; font-weight: 700; }
.control-group output { color: #6dd7be; }
.control-group input[type="range"] { width: 100%; accent-color: #6dd7be; }
.ticks { display: flex; justify-content: space-between; color: #8397a5; font-size: 10px; }
.split-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.control-group select { width: 100%; min-height: 42px; padding: 0 10px; border: 1px solid rgba(255,255,255,.12); border-radius: 11px; background: #10293b; color: white; }
.hint { margin: 8px 0 0; color: #9fb0bd; font-size: 11px; line-height: 1.6; }

.sim-stage { padding: 18px; background: #f3f7f7; color: var(--ink); }
.prediction-card { padding: 16px 18px; border-radius: 17px; background: white; border: 1px solid #dde7e6; }
.prediction-card > span { color: var(--green); font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.prediction-card p { margin: 5px 0 10px; font-weight: 700; }
.prediction-actions { display: flex; gap: 8px; }
.prediction-actions button { border: 1px solid var(--line); border-radius: 10px; background: #f7faf9; padding: 7px 12px; color: var(--ink); }
.prediction-actions button:hover { border-color: var(--green); }
.prediction-feedback { margin-top: 8px; min-height: 20px; color: var(--muted); font-size: 12px; }
.prediction-feedback.correct { color: #287e6c; }
.prediction-feedback.wrong { color: #a24f43; }

.cell-stage { margin-top: 14px; padding: 12px 10px 5px; border-radius: 20px; background: white; border: 1px solid #dde7e6; overflow: hidden; }
.cell-stage svg { width: 100%; display: block; }
.vessel { fill: rgba(250,252,252,.8); stroke: #afc0c7; stroke-width: 3; }
.solution { transition: opacity .2s ease; }
.zn-solution { fill: rgba(137,149,162,.20); }
.cu-solution { fill: rgba(44,104,141,.28); }
.zn-electrode { fill: #8d98a2; }
.cu-electrode { fill: #b76c43; }
.wire { fill: none; stroke: #263b4c; stroke-width: 5; stroke-linecap: round; }
.salt-bridge { fill: none; stroke: #b9cdca; stroke-width: 21; stroke-linecap: round; }
.electron-flow circle { fill: #2e9d87; }
.svg-label { fill: #2e9d87; font-weight: 800; font-size: 18px; }
.svg-title { fill: #1b3448; font-weight: 800; font-size: 18px; }
.svg-small { fill: #71818c; font-size: 14px; }
.reaction-row { display: flex; justify-content: space-between; gap: 20px; padding: 0 28px 14px; color: var(--muted); font: 600 13px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; }

.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 12px; }
.metric-card { padding: 16px; border-radius: 16px; background: white; border: 1px solid #dde7e6; }
.metric-card.accent { background: var(--green-soft); border-color: #cce8dd; }
.metric-card small, .metric-card span { display: block; color: var(--muted); font-size: 11px; }
.metric-card strong { display: block; margin: 8px 0 5px; font-size: 24px; letter-spacing: -.035em; }
.equation-panel { display: flex; justify-content: space-between; gap: 24px; margin-top: 10px; padding: 17px 18px; border-radius: 16px; background: #e8eef2; }
.equation-panel small { color: var(--blue); font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.equation-panel p { margin: 3px 0 0; font: 700 16px ui-monospace, SFMono-Regular, Menlo, monospace; }
.equation-values { display: grid; justify-items: end; color: var(--muted); font-size: 11px; }

.labbook-layout { display: grid; grid-template-columns: 1.1fr .9fr; gap: 16px; }
.chart-card, .table-card { background: white; border: 1px solid var(--line); border-radius: 22px; padding: 20px; box-shadow: 0 8px 32px rgba(30,53,69,.04); }
.chart-head { display: flex; justify-content: space-between; gap: 16px; align-items: start; }
.chart-head small { color: var(--green); font-weight: 800; letter-spacing: .1em; }
.chart-head h3 { margin: 4px 0 0; font-size: 19px; }
.text-button { border: 0; background: transparent; color: var(--blue); font-weight: 700; font-size: 12px; }
#trialChart { width: 100%; min-height: 300px; margin-top: 8px; }
.empty-state { color: var(--muted); text-align: center; padding: 70px 20px; }
.table-wrap { overflow-x: auto; margin-top: 14px; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th, td { padding: 10px 8px; border-bottom: 1px solid #edf1f0; text-align: left; white-space: nowrap; }
th { color: var(--muted); font-weight: 700; }

.compare-section { padding-top: 20px; }
.compare-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.compare-grid article { padding: 26px; min-height: 230px; border-radius: 22px; background: linear-gradient(145deg, #fff, #f5f8f8); border: 1px solid var(--line); }
.compare-kicker { color: var(--green); font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.compare-grid h3 { margin: 42px 0 10px; font-size: 22px; }
.compare-grid p { color: var(--muted); }

.research-section { background: #eef5f2; }
.research-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.research-grid article { padding: 22px; border-radius: 20px; background: rgba(255,255,255,.74); border: 1px solid rgba(208,223,217,.9); }
.research-grid span { color: var(--blue); font: 800 11px ui-monospace, monospace; }
.research-grid h3 { margin: 42px 0 8px; }
.research-grid p { margin-bottom: 0; color: var(--muted); font-size: 14px; }
.sources { margin-top: 18px; padding: 24px; border-radius: 22px; background: white; border: 1px solid #d8e5e1; }
.sources h3 { margin-bottom: 14px; }
.sources a { display: block; padding: 11px 0; color: var(--blue); border-top: 1px solid #edf2f0; font-size: 13px; }
.sources a:first-of-type { border-top: 0; }

.site-footer { display: flex; justify-content: space-between; gap: 40px; padding-top: 34px; padding-bottom: 34px; color: var(--muted); font-size: 12px; }
.site-footer div { display: grid; }
.site-footer strong { color: var(--ink); font-size: 14px; }
.site-footer p { max-width: 620px; margin: 0; text-align: right; }

@media (max-width: 980px) {
  .nav { display: none; }
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-visual { min-height: 400px; }
  .experiment-grid { grid-template-columns: 1fr 1fr; }
  .sim-layout { grid-template-columns: 1fr; }
  .control-panel { position: static; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .labbook-layout { grid-template-columns: 1fr; }
  .research-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .shell { width: min(100% - 24px, 1180px); }
  .site-header { min-height: 64px; padding: 0 14px; }
  .hero { padding-top: 56px; gap: 28px; }
  .hero h1 { font-size: 44px; }
  .hero-lead { font-size: 16px; }
  .hero-visual { min-height: 330px; }
  .cell-mini { inset: 60px 22px 50px; transform: scale(.82); transform-origin: center; }
  .metric-float { right: 12px; bottom: 12px; }
  .section { padding: 66px 0; }
  .section-heading { display: block; }
  .section-heading > p { margin-top: 15px; }
  .experiment-grid, .compare-grid, .research-grid { grid-template-columns: 1fr; }
  .experiment-card { min-height: 220px; }
  .experiment-card h3 { margin-top: 34px; }
  .split-controls, .metric-grid { grid-template-columns: 1fr 1fr; }
  .reaction-row, .equation-panel, .site-footer { display: block; }
  .reaction-row span { display: block; margin-top: 6px; }
  .equation-values { justify-items: start; margin-top: 12px; }
  .site-footer p { margin-top: 14px; text-align: left; }
}
/* Product UI layer — deliberately quiet, utility-first, and easy to evolve. */
:root {
  --bg: #f7f8f8;
  --surface: #ffffff;
  --ink: #17252d;
  --muted: #66747c;
  --line: #e1e6e8;
  --blue: #315f73;
  --blue-soft: #edf3f5;
  --green: #3d786d;
  --green-soft: #edf4f1;
  --dark: #17252d;
  --shadow: none;
  --radius: 12px;
}

body {
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
}

.shell { width: min(1120px, calc(100% - 40px)); }

.site-header {
  min-height: 58px;
  padding: 0 max(20px, calc((100vw - 1120px) / 2));
  background: rgba(247,248,248,.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.brand { gap: 8px; font-size: 14px; font-weight: 650; }
.brand b { color: inherit; font-weight: 650; }
.brand-mark {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: #244653;
  font-size: 12px;
  font-weight: 700;
}
.nav { gap: 20px; font-size: 13px; }

.hero {
  min-height: 0;
  grid-template-columns: minmax(0, 760px);
  gap: 0;
  padding: 54px 0 34px;
  border-bottom: 1px solid var(--line);
}
.hero-visual { display: none; }
.hero .eyebrow { display: none; }
.hero h1 {
  max-width: 760px;
  margin-bottom: 14px;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.12;
  letter-spacing: -.035em;
  font-weight: 680;
}
.hero h1 span { color: inherit; }
.hero-lead {
  max-width: 760px;
  margin-bottom: 0;
  font-size: 15px;
  line-height: 1.7;
}
.hero-actions { margin-top: 22px; }

.button {
  min-height: 40px;
  padding: 0 15px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 650;
  transition: background .12s ease, border-color .12s ease;
}
.button:hover { transform: none; }
.button.primary { background: #244653; box-shadow: none; }
.button.ghost { background: transparent; }
.button.soft { background: #f0f3f3; }

.section { padding: 52px 0; }
.section-heading {
  align-items: start;
  gap: 32px;
  margin-bottom: 24px;
}
.section-heading h2 {
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.2;
  letter-spacing: -.028em;
  font-weight: 680;
}
.section-heading > p { max-width: 480px; font-size: 13px; line-height: 1.65; }
.eyebrow {
  margin-bottom: 8px;
  color: #7b878d;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
}

#course { padding-top: 38px; }
.experiment-grid { gap: 10px; }
.experiment-card {
  min-height: 0;
  padding: 18px;
  border-radius: 11px;
  box-shadow: none;
}
.experiment-card .step { color: #879399; font-size: 10px; }
.experiment-card h3 { margin: 18px 0 8px; font-size: 17px; }
.experiment-card p { margin-bottom: 18px; font-size: 13px; }
.experiment-card strong { color: #4d6875; font-size: 11px; font-weight: 600; }

.simulator-section {
  background: #f3f5f5;
  color: var(--ink);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.section-heading.inverse h2,
.section-heading.inverse > p { color: var(--ink); }
.section-heading.inverse .eyebrow { color: #7b878d; }

.sim-layout { grid-template-columns: 300px minmax(0, 1fr); gap: 12px; }
.control-panel,
.sim-stage { border-radius: 12px; }
.control-panel {
  top: 74px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
}
.mode-switch {
  gap: 3px;
  margin-bottom: 20px;
  padding: 3px;
  background: #f1f3f3;
  border-radius: 9px;
}
.mode { min-height: 34px; border-radius: 7px; color: #69777e; font-size: 12px; }
.mode.active { background: white; color: var(--ink); box-shadow: 0 1px 2px rgba(24,37,45,.08); }
.control-group { margin-bottom: 18px; }
.control-group label { color: #42515a; font-size: 12px; font-weight: 600; }
.control-group output { color: #315f73; }
.control-group input[type="range"] { accent-color: #315f73; }
.ticks { color: #929da2; }
.control-group select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}
.hint { color: #7b878d; }

.sim-stage {
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
}
.prediction-card,
.cell-stage,
.metric-card,
.equation-panel {
  border-radius: 10px;
  box-shadow: none;
}
.prediction-card { padding: 14px 15px; background: #fbfcfc; border-color: var(--line); }
.prediction-card > span { color: #65747b; letter-spacing: .08em; }
.prediction-card p { font-size: 13px; font-weight: 600; }
.prediction-actions button {
  border-radius: 7px;
  background: #fff;
  font-size: 12px;
}
.prediction-actions button:hover { border-color: #819199; }

.cell-stage { margin-top: 10px; border-color: var(--line); }
.svg-label { fill: #4a716b; }
.electron-flow circle { fill: #4a716b; }
.reaction-row { font-size: 12px; }

.metric-grid { gap: 8px; margin-top: 8px; }
.metric-card { padding: 14px; border-color: var(--line); }
.metric-card.accent { background: #f4f7f6; border-color: #dce6e2; }
.metric-card strong { font-size: 20px; }
.equation-panel { margin-top: 8px; padding: 14px 15px; background: #f4f6f7; }
.equation-panel small { color: #65747b; }

.chart-card,
.table-card,
.research-grid article,
.sources {
  border-radius: 11px;
  box-shadow: none;
}
.chart-card,
.table-card { padding: 17px; }
.chart-head small { color: #77848a; }
.text-button { color: #315f73; }

.compare-section { display: none; }

.research-section {
  background: #f7f8f8;
  border-top: 1px solid var(--line);
}
.research-grid { gap: 10px; }
.research-grid article { padding: 18px; background: #fff; border-color: var(--line); }
.research-grid span { color: #77848a; }
.research-grid h3 { margin: 20px 0 7px; font-size: 16px; }
.research-grid p { font-size: 13px; }
.sources { margin-top: 12px; padding: 18px; border-color: var(--line); }
.sources a { color: #315f73; }

.site-footer {
  padding-top: 24px;
  padding-bottom: 24px;
  border-top: 1px solid var(--line);
}

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

@media (max-width: 640px) {
  .shell { width: min(100% - 24px, 1120px); }
  .site-header { min-height: 54px; }
  .hero { padding: 38px 0 28px; }
  .hero h1 { font-size: 30px; }
  .section { padding: 40px 0; }
  .experiment-grid,
  .research-grid { grid-template-columns: 1fr; }
}


/* Electrochemistry simulator v2 */
[hidden] { display: none !important; }

.section-heading.inverse > p {
  color: var(--muted);
}

.model-status {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  min-height: 36px;
  margin-bottom: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fbfcfc;
  color: var(--muted);
  font-size: 11px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-weight: 700;
}

.status-badge.theory {
  color: #315f73;
  background: #eaf1f4;
}

.status-badge.empirical {
  color: #6c5a2e;
  background: #f5f0e2;
}

#modelWarning {
  margin-left: auto;
  color: #9a5a49;
  font-weight: 650;
}

.control-group.compact output {
  display: block;
  margin-top: 3px;
  color: #315f73;
  font-size: 10px;
  font-weight: 600;
}

.fruit-body {
  fill: #f4e5a9;
  stroke: #d4bf72;
  stroke-width: 3;
}

.model-footnote {
  margin-top: 8px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fbfcfc;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}

.model-footnote strong {
  color: var(--ink);
  font-weight: 650;
}

.chart-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.table-card .empty-state {
  margin: 14px 0 0;
}

.model-grid {
  grid-template-columns: repeat(4, 1fr);
}

.validation-card {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 24px;
  margin-top: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
}

.validation-card small {
  color: #77848a;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
}

.validation-card h3 {
  margin: 4px 0 0;
  font-size: 17px;
}

.validation-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.validation-grid span {
  padding: 9px 10px;
  border-radius: 8px;
  background: #f5f7f7;
  color: #526169;
  font-size: 11px;
}

#trialChart {
  min-height: 300px;
}

.table-wrap table {
  min-width: 660px;
}

@media (max-width: 980px) {
  .model-grid { grid-template-columns: 1fr 1fr; }
  .validation-card { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .model-grid,
  .validation-grid { grid-template-columns: 1fr; }

  .model-status {
    align-items: flex-start;
  }

  #modelWarning {
    width: 100%;
    margin-left: 0;
  }

  .cell-stage {
    overflow-x: auto;
  }

  .cell-stage svg {
    min-width: 650px;
  }
}


.simulator-sources {
  display: flex;
  align-items: flex-start;
  gap: 18px;
}

.simulator-sources > strong {
  flex: 0 0 auto;
  font-size: 12px;
}

.simulator-sources > div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 14px;
}

.simulator-sources a {
  font-size: 11px;
  text-decoration: underline;
  text-decoration-color: #c8d2d6;
  text-underline-offset: 3px;
}

@media (max-width: 640px) {
  .simulator-sources { display: block; }
  .simulator-sources > div { margin-top: 8px; }
}
/* Shared Norelyn brand layer, matched to Norelyn-site. */
body {
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", "PingFang TC", sans-serif;
}

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

.brand img { display: block; }

.brand .brand-mark {
  width: 22px;
  height: 22px;
  border-radius: 0;
  background: transparent;
}

.brand-wordmark {
  width: auto;
  height: 18px;
}

.brand-divider {
  width: 1px;
  height: 18px;
  margin-left: 2px;
  background: var(--line);
}

.brand-product {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -.01em;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
}

.powered-by {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 12px;
  transition: opacity .12s ease;
}

.powered-by:hover { opacity: .68; }

.powered-by img {
  display: block;
  width: auto;
  height: 14px;
}

@media (max-width: 640px) {
  .brand-wordmark { height: 16px; }
  .brand-product { font-size: 12px; }
}
