* { box-sizing: border-box; }
html, body { margin: 0; background: #fff; color: #263b3a; font: 16px/1.55 "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Arial, sans-serif; }
.c4-card { max-width: 1000px; margin: 0 auto; padding: 18px; border: 1px solid #cbded8; border-radius: 6px; background: #fff; }
.c4-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin: 0 0 12px; }
.c4-title { margin: 0; color: #2d5873; font-size: 17px; font-weight: 700; }
.c4-hint { margin: 0; color: #64748b; font-size: 14px; }
.c4-layout { display: grid; grid-template-columns: minmax(230px, .68fr) minmax(0, 1.5fr); gap: 18px; align-items: center; }
.c4-controls { min-width: 0; }
.c4-field { display: grid; grid-template-columns: 52px minmax(60px, 1fr) 74px; align-items: center; gap: 8px; margin: 0 0 8px; }
.c4-field > span { color: #4b5d66; font-size: 15px; white-space: nowrap; }
.c4-field small { color: #8a99a3; font-size: 12px; }
input[type="range"] { width: 100%; margin: 0; accent-color: #2b7db5; cursor: pointer; }
.c4-num { width: 100%; min-width: 0; height: 32px; padding: 3px 5px; border: 1px solid #cad5e5; border-radius: 7px; color: #172334; background: #fff; font: inherit; font-size: 14.5px; text-align: center; font-variant-numeric: tabular-nums; }
.c4-seg { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.c4-seg button, .c4-btn { min-height: 34px; padding: 5px 12px; border: 1px solid #cad5e5; border-radius: 6px; color: #216c68; background: #fff; font: inherit; font-size: 14.5px; font-weight: 600; cursor: pointer; }
.c4-seg button:hover, .c4-btn:hover { border-color: #2b7db5; background: #f2f8fa; }
.c4-seg button.is-active { border-color: #0079ba; color: #fff; background: #0079ba; }
.c4-btn.wide { display: block; width: 100%; margin-top: 8px; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid #2b7db5; outline-offset: 2px; }
.c4-figure { min-width: 0; }
.c4-figure svg { display: block; width: 100%; height: auto; }
.c4-readouts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin: 14px 0 0; padding-top: 12px; border-top: 1px solid #e0e9e7; }
.c4-readouts div { padding: 6px 10px; border-radius: 6px; background: #f5f9f8; }
.c4-readouts dt { color: #64748b; font-size: 13.5px; }
.c4-readouts dd { margin: 0; color: #17334a; font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c4-note { min-height: calc(3.1em + 18px); margin: 12px 0 0; padding: 9px 12px; border-left: 3px solid #2d7b70; border-radius: 0 6px 6px 0; color: #22516b; background: #f3f9f7; font-size: 15px; }
.c4-note.warn { border-left-color: #ad512c; background: #fdf5f0; color: #7a3b1f; }
.c4-svg-text { font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Arial, sans-serif; }
mjx-container { margin: 0 !important; }
@media (max-width: 640px) {
  .c4-card { padding: 13px; }
  .c4-layout { grid-template-columns: 1fr; gap: 12px; }
  .c4-field { grid-template-columns: 48px minmax(60px, 1fr) 68px; }
}
.c4-seg button { font-size: 14px; }
.sym-layout { display: grid; grid-template-columns: minmax(200px, .62fr) minmax(0, 1.6fr); gap: 18px; align-items: start; }
.sym-left svg { display: block; width: 100%; max-width: 280px; height: auto; margin: 0 auto; }
.count { margin: 4px 0 0; text-align: center; color: #2d5873; }
.count span { font-size: 42px; font-weight: 700; color: #2d7b70; line-height: 1.1; }
.count small { margin-left: 6px; font-size: 15px; }
.example { margin: 6px 0 0; color: #4b5d66; font-size: 14px; text-align: center; }
.vec-row { display: flex; align-items: center; gap: 6px; }
.vec { flex: none; font-size: 14px; }
.matrix { flex: 1; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 3px; min-width: 0; }
.matrix button { min-height: 40px; padding: 0; border: 0; border-radius: 4px; font: inherit; font-size: 13px; font-variant-numeric: tabular-nums; cursor: pointer; transition: background .25s, color .25s; }
.matrix .ind { background: #2d7b70; color: #fff; font-weight: 700; }
.matrix .eq { background: #bfe5de; color: #17423d; }
.matrix .der { background: #d9cff6; color: #3d2a7a; font-size: 11.5px; }
.matrix .zero { background: #f4f6f7; color: #b4bfc5; }
.matrix .low { background: #fff; color: #c5ced3; outline: 1px dashed #dbe3e6; }
.matrix button.sel { outline: 2.5px solid #ad512c; outline-offset: -1px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 10px 0 0; color: #4b5d66; font-size: 13px; }
.legend i { display: inline-block; width: 14px; height: 11px; margin-right: 5px; border-radius: 2px; vertical-align: -1px; }
.k-ind { background: #2d7b70; } .k-eq { background: #bfe5de; } .k-der { background: #d9cff6; } .k-zero { background: #f4f6f7; border: 1px solid #dbe3e6; } .k-low { background: #fff; border: 1px dashed #c5ced3; }
.info { margin: 10px 0 0; padding: 9px 12px; border-left: 3px solid #ad512c; border-radius: 0 6px 6px 0; background: #fdf5f0; color: #5c3420; font-size: 14.5px; min-height: 64px; }
@media (max-width: 700px) { .sym-layout { grid-template-columns: 1fr; } .vec { display: none; } .matrix button { min-height: 34px; font-size: 11.5px; } }

/* 统一：SVG 内文字字号、说明文字颜色（2026-11-21） */
svg text:is([font-size="11"], [font-size="12"], [font-size="12.5"], [font-size="13"], [font-size="13.5"]) { font-size: 14px; }
.c4-readouts dt { color: #2d5873; font-size: 14px; }
