:root {
  --color-primary: #1d4ed8;
  --color-primary-deep: #0b2c5c;
  --color-primary-soft: #dbeafe;
  --color-accent: #0379b3;
  --color-accent-soft: #e6f0f5;
  --color-warning: #f59e0b;
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-surface-soft: #f6f9fb;
  --color-text: #0f172a;
  --color-muted: #64748b;
  --color-border: #e2e8f0;
  --color-border-strong: #cbd5e1;
  --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.07);
  --shadow-card: 0 18px 48px rgba(15, 23, 42, 0.09);
  --radius-soft: 8px;
  --radius-panel: 10px;
}

body.docs-body {
  color: var(--color-text);
  background: #ffffff;
  font-family: "Microsoft YaHei", "Noto Sans SC", "PingFang SC", Arial, sans-serif;
}

.docs-topbar {
  border-bottom-color: rgba(203, 213, 225, 0.75);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
  backdrop-filter: blur(18px);
}

.chapter-page .docs-topbar {
  background: rgba(255, 255, 255, 0.94);
}

.brand-mark {
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.28), 0 8px 20px rgba(15, 118, 110, 0.2);
}

.topbar-logo {
  max-height: 34px;
  object-fit: contain;
}

.docs-shell {
  grid-template-columns: clamp(232px, 15vw, 276px) minmax(0, 1fr) clamp(390px, 24vw, 520px);
}

.docs-sidebar {
  border-right-color: var(--color-border);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.96)),
    #f8fafc;
  padding: 24px 18px 42px;
}

.sidebar-chapter + .sidebar-chapter {
  border-top-color: var(--color-border);
}

.sidebar-chapter summary {
  padding: 9px 10px;
  border-radius: var(--radius-soft);
  color: var(--color-text);
  font-size: 16px;
}

.sidebar-chapter summary:hover {
  background: #eef6ff;
  color: var(--color-primary-deep);
}

.docs-sidebar a {
  position: relative;
  margin: 2px 0;
  padding: 8px 10px 8px 14px;
  border-left: 3px solid transparent;
  border-radius: 7px;
  color: #475569;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.docs-sidebar a:hover {
  border-left-color: rgba(29, 78, 216, 0.36);
  background: #eff6ff;
  color: var(--color-primary-deep);
  transform: translateX(1px);
}

.docs-sidebar a.is-active {
  border-left-color: var(--color-accent);
  background: linear-gradient(90deg, var(--color-accent-soft), rgba(230, 245, 241, 0.55));
  color: var(--color-accent);
  font-weight: 800;
}

.docs-content {
  background: transparent;
}

.doc-article {
  width: min(100%, 1060px);
  padding-top: clamp(34px, 4.2vw, 58px);
  padding-right: clamp(22px, 3vw, 42px);
  padding-left: clamp(22px, 3vw, 42px);
}

.section-toc {
  position: sticky;
  top: 76px;
  align-self: start;
  max-height: calc(100vh - 98px);
  margin: 24px 12px 0 0;
  padding: 12px 10px;
  overflow-y: auto;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius-panel);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(18px);
}

.section-toc-title {
  margin: 0 0 10px 4px;
  color: var(--color-muted);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.section-toc a {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 3px 0;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #475569;
  font-size: 15px;
  line-height: 1.35;
  text-decoration: none;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.section-toc a:hover {
  border-color: rgba(29, 78, 216, 0.18);
  background: linear-gradient(135deg, #f8fafc, #eff6ff);
  color: var(--color-primary-deep);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
  transform: translateY(-1px);
}

.section-toc a.is-active {
  border-color: rgba(15, 118, 110, 0.22);
  background: linear-gradient(135deg, var(--color-accent-soft), rgba(230, 245, 241, 0.48));
  color: var(--color-accent);
  font-weight: 800;
  box-shadow: 0 4px 14px rgba(15, 118, 110, 0.1);
}

.page-minimap {
  --mini-track-top: 52px;
  --mini-track-bottom: 16px;
  --mini-viewport-top: 52px;
  --mini-viewport-height: 72px;
  height: calc(100vh - 98px);
  max-height: 720px;
  min-height: 420px;
  margin-right: 12px;
  padding: 12px 10px;
  overflow: visible;
}

.page-minimap::before,
.page-minimap::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.page-minimap::before {
  top: var(--mini-track-top);
  right: 16px;
  bottom: var(--mini-track-bottom);
  left: 16px;
  border: 1px solid rgba(203, 213, 225, 0.68);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(15, 23, 42, 0.035) 1px, transparent 1px),
    rgba(248, 250, 252, 0.8);
  background-size: 12px 12px;
}

.page-minimap::after {
  top: var(--mini-viewport-top);
  right: 12px;
  left: 12px;
  height: var(--mini-viewport-height);
  border: 2px solid rgba(29, 78, 216, 0.44);
  border-radius: 8px;
  background: rgba(219, 234, 254, 0.26);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.72), 0 6px 14px rgba(29, 78, 216, 0.12);
}

.page-minimap .section-toc-title {
  margin: 0 0 8px;
  color: var(--color-muted);
  font-size: 12px;
  line-height: 1.2;
  text-align: center;
  letter-spacing: 0.04em;
}

.page-minimap a,
.page-minimap a:hover,
.page-minimap a.is-active {
  position: absolute;
  right: 20px;
  left: 22px;
  z-index: 1;
  display: block;
  margin: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: transparent;
  font-size: 0;
  line-height: 0;
  transform: none;
}

.page-minimap a::before {
  content: "";
  position: absolute;
  top: 1px;
  bottom: 1px;
  left: 0;
  width: var(--mini-line-width, 78%);
  min-height: 3px;
  border-radius: 4px;
  background:
    repeating-linear-gradient(
      180deg,
      rgba(100, 116, 139, 0.58) 0,
      rgba(100, 116, 139, 0.58) 2px,
      transparent 2px,
      transparent 5px
    );
  opacity: 0.74;
}

.page-minimap a:nth-of-type(3n + 1)::before {
  width: calc(var(--mini-line-width, 78%) - 8%);
}

.page-minimap a:nth-of-type(3n + 2)::before {
  width: calc(var(--mini-line-width, 78%) + 6%);
}

.page-minimap a:hover::before,
.page-minimap a:focus-visible::before {
  background:
    repeating-linear-gradient(
      180deg,
      rgba(29, 78, 216, 0.72) 0,
      rgba(29, 78, 216, 0.72) 2px,
      transparent 2px,
      transparent 5px
    );
  opacity: 1;
}

.page-minimap a.is-active::before {
  background:
    repeating-linear-gradient(
      180deg,
      rgba(15, 118, 110, 0.9) 0,
      rgba(15, 118, 110, 0.9) 2px,
      transparent 2px,
      transparent 5px
    );
  opacity: 1;
}

.page-minimap a::after {
  content: attr(data-label);
  position: absolute;
  top: 50%;
  right: calc(100% + 14px);
  width: max-content;
  max-width: 210px;
  padding: 7px 10px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-soft);
  color: var(--color-text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  opacity: 0;
  transform: translateY(-50%) translateX(4px);
  transition: opacity 140ms ease, transform 140ms ease;
  pointer-events: none;
}

.page-minimap a:hover::after,
.page-minimap a:focus-visible::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.knowledge-graph-panel {
  position: sticky;
  top: 76px;
  align-self: start;
  height: calc(100vh - 98px);
  max-height: 860px;
  padding: 20px clamp(18px, 1.6vw, 26px) 22px 0;
}

.knowledge-graph-card {
  display: flex;
  height: 100%;
  min-height: 520px;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(203, 213, 225, 0.86);
  border-radius: 10px;
  background:
    radial-gradient(circle at 24% 16%, rgba(20, 184, 166, 0.15), transparent 30%),
    radial-gradient(circle at 82% 72%, rgba(59, 130, 246, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 250, 252, 0.9)),
    rgba(255, 255, 255, 0.9);
  box-shadow: 0 22px 58px rgba(15, 23, 42, 0.1);
  backdrop-filter: blur(18px);
  contain: content;
}

.knowledge-graph-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px 10px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.82);
}

.knowledge-graph-header strong,
.knowledge-graph-header span {
  display: block;
}

.knowledge-graph-header strong {
  color: var(--color-text);
  font-size: 16px;
  line-height: 1.25;
}

.knowledge-graph-header span {
  margin-top: 2px;
  color: var(--color-muted);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.knowledge-graph-reset {
  flex: 0 0 auto;
  padding: 6px 10px;
  border: 1px solid rgba(15, 118, 110, 0.22);
  border-radius: 999px;
  background: rgba(230, 245, 241, 0.72);
  color: var(--color-accent);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.knowledge-graph-reset:hover,
.knowledge-graph-reset:focus-visible {
  border-color: rgba(15, 118, 110, 0.44);
  background: #deedf5;
  outline: none;
}

.knowledge-graph-canvas {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
}

.knowledge-graph-canvas.is-panning {
  cursor: grabbing;
}

.knowledge-graph-canvas.is-panning .knowledge-graph-viewport {
  transition: none;
}

.knowledge-graph-canvas::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.035) 1px, transparent 1px);
  background-size: 18px 18px;
  mask-image: linear-gradient(180deg, transparent, #000 8%, #000 92%, transparent);
  pointer-events: none;
}

.knowledge-graph-svg {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 660px;
}

.strain-article mjx-container[display="true"] {
  display: block !important;
  width: 100% !important;
  max-width: 100%;
  min-width: 0 !important;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 2px;
}

.strain-article mjx-container[display="true"] > svg {
  max-width: 100% !important;
  min-width: 0 !important;
  height: auto !important;
}

.strain-demo-card {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.28fr);
  align-items: start;
  gap: 20px;
  margin: 22px 0;
  padding: 18px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-panel);
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.72), rgba(255, 255, 255, 0.96)),
    #ffffff;
  box-shadow: var(--shadow-soft);
}

.strain-demo-card.strain-kinematics {
  grid-template-columns: minmax(280px, 0.64fr) minmax(0, 1.36fr);
}

.strain-demo-card.strain-kinematics-3d {
  align-items: stretch;
}

.strain-demo-card.strain-kinematics .demo-copy,
.strain-demo-card.strain-kinematics .strain-svg-wrap {
  align-self: start;
}

.strain-demo-card > * {
  min-width: 0;
}

.strain-demo-card.strain-kinematics-3d .strain-svg-wrap {
  align-self: stretch;
}

.strain-demo-card.strain-kinematics-3d .strain-svg-wrap svg {
  height: 100%;
  min-height: 390px;
}

.component-equations {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 14px 0 24px;
}

.component-equations > div {
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: #f8fafc;
}

.component-equations strong {
  display: block;
  margin-bottom: 8px;
  color: var(--color-primary-deep);
  font-size: 15px;
  font-weight: 900;
}

.component-equations span {
  display: block;
  color: #26323f;
  line-height: 1.8;
}

.component-equations mjx-container {
  margin: 0 !important;
  max-width: 100%;
}

.uniaxial-strain-figure {
  margin: 24px 0;
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: #ffffff;
}

.uniaxial-diagram {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  aspect-ratio: 900 / 520;
}

.uniaxial-strain-svg {
  display: block;
  width: 100%;
  height: auto;
}

.uniaxial-strain-figure figcaption {
  margin: 10px 0 0;
  color: #475569;
  font-size: 15px;
  line-height: 1.65;
  text-align: center;
}

.uniaxial-title {
  fill: #dc2626;
  font-family: "Microsoft YaHei", "Noto Sans SC", "PingFang SC", Arial, sans-serif;
  font-size: 32px;
  font-weight: 900;
}

.uniaxial-ref,
.uniaxial-dim {
  stroke: #111827;
  stroke-width: 2.4;
  stroke-linecap: round;
  fill: none;
}

.uniaxial-ref {
  stroke-width: 2.2;
}

.uniaxial-long-bar {
  fill: url(#uniaxialBar);
  stroke: #0f172a;
  stroke-width: 4.5;
}

.uniaxial-small-cell {
  fill: #facc15;
  stroke: #0f172a;
  stroke-width: 3.5;
}

.uniaxial-force {
  stroke: #f97316;
  stroke-width: 5.5;
  stroke-linecap: round;
  fill: none;
}

.uniaxial-segment {
  fill: #facc15;
  stroke: #0f172a;
  stroke-width: 4.2;
}

.uniaxial-segment.is-deformed {
  fill: #eab308;
}

.uniaxial-extension-guide {
  stroke: #94a3b8;
  stroke-dasharray: 7 7;
  stroke-width: 2;
  fill: none;
}

.math-label {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.94);
  color: #111827;
  font-size: clamp(11px, 2.1vw, 24px);
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.math-label mjx-container {
  margin: 0 !important;
}

.label-x-top {
  left: 32%;
  top: 16.5%;
}

.label-dx {
  left: 54%;
  top: 48.2%;
}

.label-force {
  left: 93%;
  top: 33%;
  color: #dc2626;
  font-size: clamp(13px, 2.4vw, 28px);
}

.label-x-bottom {
  left: 29%;
  top: 75%;
}

.label-u-a {
  left: 44.5%;
  top: 59.5%;
}

.label-u-b {
  left: 61.5%;
  top: 52.8%;
}

.label-a,
.label-ap {
  left: 39%;
}

.label-b {
  left: 60%;
}

.label-bp {
  left: 66.5%;
}

.label-a {
  top: 90%;
}

.label-b {
  top: 90%;
}

.label-ap {
  top: 76%;
}

.label-bp {
  top: 76%;
}

.strain-control-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 100%;
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-panel);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.strain-control-fieldset {
  display: grid;
  flex: 1;
  align-content: space-evenly;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 14px 12px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: #f8fafc;
}

.strain-control-fieldset legend {
  padding: 0 6px;
  color: #094461;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.2;
}

.strain-number-field {
  display: grid;
  grid-template-columns: 46px minmax(76px, 1fr) 78px;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.strain-number-field > span {
  color: #64748b;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.strain-number-field > span mjx-container {
  margin: 0 !important;
  color: inherit !important;
  font-size: 20px !important;
  line-height: 1 !important;
}

.strain-number-field input[type="range"] {
  min-width: 0;
  accent-color: #0379b3;
}

.strain-number-field .strain-number {
  width: 78px;
  height: 34px;
  box-sizing: border-box;
  padding: 4px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #0f172a;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
}

.strain-reset-button {
  min-height: 36px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #094461;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.strain-reset-button:hover {
  border-color: #0379b3;
  background: #0379b3;
  color: #ffffff;
}

.strain-card-caption {
  grid-column: 1 / -1;
  min-width: 0;
  margin: 0;
  padding: 12px 14px 0;
  border-top: 1px solid rgba(15, 118, 110, 0.14);
  color: #0b2c5c;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.45;
  text-align: center;
}

.demo-copy .eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: 10px;
  padding: 5px 12px;
  border-radius: 999px;
  background: #e3eff5;
  color: #0379b3;
  font-size: 14px;
  font-weight: 800;
}

.demo-copy h3 {
  margin: 0 0 10px;
  color: #0b2c5c;
  font-size: 20px;
}

.demo-copy p {
  margin: 0 0 16px;
  color: var(--color-muted);
  line-height: 1.75;
}

.segmented-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.segmented-controls button {
  border: 1px solid rgba(15, 118, 110, 0.24);
  border-radius: 999px;
  background: #ffffff;
  color: #0379b3;
  padding: 8px 14px;
  font-weight: 800;
  cursor: pointer;
}

.segmented-controls button.is-active {
  background: #0379b3;
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.18);
}

.demo-note {
  padding: 12px 14px;
  border-left: 4px solid #0379b3;
  border-radius: 8px;
  background: #f5f9fb;
  color: #163240 !important;
  font-weight: 700;
}

.strain-svg-wrap {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-panel);
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

.strain-svg-wrap svg {
  display: block;
  width: 100%;
  height: auto;
}

.strain-3d-motion-svg {
  background:
    linear-gradient(#edf2f7 1px, transparent 1px),
    linear-gradient(90deg, #edf2f7 1px, transparent 1px),
    #ffffff;
  background-size: 28px 28px;
}

.strain-3d-frame {
  color: #171e21;
}

.strain-3d-frame line {
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
}

.strain-3d-frame circle {
  fill: currentColor;
  opacity: 0.78;
}

.strain-3d-axis-label {
  overflow: visible;
  pointer-events: none;
  color: #171e21;
}

text.strain-3d-axis-label {
  fill: currentColor;
  font-family: "Cambria Math", "STIX Two Math", "Times New Roman", serif;
  font-size: 19px;
  font-style: italic;
  font-weight: 700;
  dominant-baseline: middle;
}

.strain-3d-axis-label div {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  min-width: 28px;
  height: 30px;
  color: inherit;
  font-family: "Cambria Math", "STIX Two Math", "Times New Roman", serif;
  font-size: 21px;
  font-weight: 900;
  line-height: 1;
}

.strain-3d-axis-label mjx-container {
  margin: 0 !important;
  color: inherit !important;
  font-size: 21px !important;
  line-height: 1 !important;
}

.strain-3d-cube polygon {
  stroke: #7253b8;
  stroke-width: 2.4;
  stroke-linejoin: round;
}

.strain-3d-cube [data-cube-face="0"],
.strain-3d-cube [data-cube-face="1"] {
  fill: rgba(209, 198, 246, 0.72);
}

.strain-3d-cube [data-cube-face="2"],
.strain-3d-cube [data-cube-face="3"] {
  fill: rgba(239, 233, 255, 0.9);
}

.strain-3d-cube [data-cube-face="4"],
.strain-3d-cube [data-cube-face="5"] {
  fill: rgba(224, 214, 252, 0.76);
}

.strain-3d-cube polyline {
  fill: none;
  stroke: #7253b8;
  stroke-width: 2.4;
  stroke-linejoin: round;
}

.strain-3d-original {
  opacity: 0.26;
}

.strain-3d-original polygon {
  fill: rgba(230, 226, 242, 0.34);
  stroke: #9d8cc8;
  stroke-dasharray: 6 5;
  stroke-width: 1.8;
}

.strain-3d-original polyline {
  stroke: #9d8cc8;
  stroke-dasharray: 6 5;
  stroke-width: 1.6;
}

.strain-demo-card [data-moving-cell] {
  transform-box: fill-box;
  transform-origin: center;
}

.strain-demo-card.is-animating [data-moving-cell] {
  filter: drop-shadow(0 10px 18px rgba(15, 118, 110, 0.22));
}

.strain-sliders {
  display: grid;
  gap: 11px;
}

.strain-sliders label,
.compat-slider {
  display: grid;
  grid-template-columns: 86px minmax(150px, 1fr) 92px;
  align-items: center;
  gap: 10px;
  color: #334155;
  font-weight: 800;
  font-size: 17px;
}

.strain-sliders input,
.compat-slider input {
  accent-color: #0379b3;
}

.strain-number,
.compat-number {
  width: 92px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid rgba(15, 118, 110, 0.22);
  border-radius: 8px;
  background: #ffffff;
  color: #0379b3;
  font: inherit;
  font-weight: 900;
  text-align: right;
}

.strain-number:focus,
.compat-number:focus {
  outline: 2px solid rgba(15, 118, 110, 0.22);
  border-color: rgba(15, 118, 110, 0.58);
}

.strain-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 22px;
  row-gap: 0;
  padding: 14px 18px;
  border-top: 1px solid rgba(15, 118, 110, 0.14);
  background: #ffffff;
}

.strain-results span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 38px;
  padding: 6px 0;
  border-bottom: 1px dashed rgba(15, 118, 110, 0.14);
  border-radius: 0;
  background: transparent;
  color: #334155;
  font-weight: 800;
  overflow: hidden;
}

.strain-results span:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.strain-results b {
  flex: 0 0 auto;
  color: #0379b3;
  font-size: 17px;
  font-weight: 900;
}

.strain-results mjx-container {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 82%;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  overflow: visible !important;
  font-size: 104% !important;
}

.strain-results mjx-container svg {
  max-width: 100%;
}

.strain-svg-wrap text {
  font-family: "Microsoft YaHei", "Noto Sans SC", "PingFang SC", Arial, sans-serif;
  font-weight: 800;
}

.strain-axis line {
  stroke: #171e21;
  stroke-width: 2.5;
  stroke-linecap: round;
}

.strain-axis text {
  fill: #171e21;
  font-family: "Times New Roman", serif;
  font-size: 18px;
  font-style: italic;
  font-weight: 700;
}

.svg-caption-inline {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin: 0;
  padding: 10px 12px;
  border-top: 1px solid rgba(15, 118, 110, 0.12);
  background: #fbfdfe;
  color: #64748b;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.4;
}

.svg-caption-inline span:last-child {
  color: #0379b3;
}

.formula-grid,
.concept-cards,
.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.formula-grid article,
.concept-cards article,
.summary-grid article {
  padding: 18px;
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 12px;
  background: #fbfdfe;
}

.formula-grid h3,
.concept-cards h3,
.summary-grid h3 {
  margin: 0 0 10px;
  color: #0b2c5c;
  font-size: 19px;
}

.strain-equation-panel,
.strain-summary-panel {
  margin: 22px 0;
}

.strain-equation-panel p {
  margin: 0 0 12px;
}

.strain-equation-panel p:last-child,
.strain-summary-panel p:last-child {
  margin-bottom: 0;
}

.strain-clean-list {
  margin: 8px 0 0;
  padding-left: 22px;
  color: #334155;
  line-height: 1.85;
}

.strain-clean-list li + li {
  margin-top: 8px;
}

.callout-note {
  margin: 22px 0;
  padding: 18px 20px;
  border-left: 5px solid #0379b3;
  border-radius: 12px;
  background: #f4f9fb;
}

.callout-note strong {
  color: #0b2c5c;
  font-size: 18px;
}

.knowledge-graph-viewport {
  will-change: transform;
  transition: none;
}

.knowledge-cluster rect {
  fill: rgba(255, 255, 255, 0.44);
  stroke: rgba(148, 163, 184, 0.46);
  stroke-dasharray: 6 8;
}

.knowledge-cluster text {
  fill: rgba(71, 85, 105, 0.78);
  font-family: "Microsoft YaHei", "Noto Sans SC", "PingFang SC", Arial, sans-serif;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  pointer-events: none;
}

.knowledge-link {
  stroke: rgba(100, 116, 139, 0.3);
  stroke-linecap: round;
  stroke-width: 1.35;
  transition: stroke 160ms ease, stroke-width 160ms ease, opacity 160ms ease;
}

.knowledge-link.is-hidden,
.knowledge-node.is-hidden {
  display: none;
}

.knowledge-link.is-related {
  stroke: rgba(20, 184, 166, 0.78);
  stroke-width: 2.2;
}

.knowledge-node {
  cursor: pointer;
  outline: none;
}

.knowledge-node circle {
  fill: rgba(255, 255, 255, 0.95);
  stroke: rgba(100, 116, 139, 0.72);
  stroke-width: 1.6;
  filter: drop-shadow(0 7px 12px rgba(15, 23, 42, 0.14));
  transition: fill 160ms ease, stroke 160ms ease, stroke-width 160ms ease, r 160ms ease, filter 160ms ease;
}

.knowledge-node text {
  fill: #334155;
  font-family: "Microsoft YaHei", "Noto Sans SC", "PingFang SC", Arial, sans-serif;
  font-size: 12px;
  font-weight: 800;
  paint-order: stroke;
  pointer-events: none;
  stroke: rgba(255, 255, 255, 0.84);
  stroke-linejoin: round;
  stroke-width: 4px;
  text-anchor: middle;
}

.knowledge-node.is-small text {
  font-size: 10.8px;
}

.knowledge-node[data-expandable="true"] circle {
  stroke-dasharray: 5 3;
}

.knowledge-node.is-expanded circle {
  fill: #ecf7fd;
  stroke-dasharray: none;
}

.knowledge-node[data-parent="method"] circle,
.knowledge-node[data-parent="tasks"] circle,
.knowledge-node[data-parent="assumptions"] circle,
.knowledge-node[data-parent="meaning"] circle {
  stroke: rgba(14, 116, 144, 0.66);
}

.knowledge-node[data-parent="force-stress"] circle,
.knowledge-node[data-parent="equilibrium"] circle,
.knowledge-node[data-parent="cauchy"] circle,
.knowledge-node[data-parent="transform"] circle,
.knowledge-node[data-parent="principal"] circle,
.knowledge-node[data-parent="max-shear"] circle,
.knowledge-node[data-parent="octahedral"] circle,
.knowledge-node[data-parent="deviatoric"] circle {
  stroke: rgba(37, 99, 235, 0.62);
}

.knowledge-node.is-hub circle {
  fill: rgba(230, 245, 241, 0.98);
  stroke: rgba(15, 118, 110, 0.78);
}

.knowledge-node:hover circle,
.knowledge-node:focus-visible circle {
  fill: #eff6ff;
  stroke: rgba(29, 78, 216, 0.88);
  stroke-width: 2.2;
}

.knowledge-node.is-related circle {
  stroke: rgba(15, 118, 110, 0.86);
}

.knowledge-node.is-related text {
  fill: #0379b3;
}

.knowledge-node.is-active circle {
  fill: #0379b3;
  stroke: #0379b3;
  stroke-width: 2.6;
  filter: drop-shadow(0 10px 18px rgba(15, 118, 110, 0.28));
}

.knowledge-node.is-active text {
  fill: #ffffff;
  stroke: rgba(15, 118, 110, 0.72);
}

.knowledge-graph-help {
  margin: 0;
  padding: 9px 14px 12px;
  border-top: 1px solid rgba(226, 232, 240, 0.82);
  color: var(--color-muted);
  font-size: 12px;
  line-height: 1.45;
}

.doc-section {
  position: relative;
  padding: 48px 0;
  border-bottom-color: var(--color-border);
}

.doc-section:first-child {
  padding-top: 0;
}

.chapter-label {
  color: var(--color-accent);
  font-size: 17px;
  letter-spacing: 0.08em;
}

.doc-article h1,
.doc-article h2,
.doc-article .chapter-section-title {
  color: var(--color-text);
}

.doc-article h1 {
  font-size: clamp(36px, 4vw, 48px);
  letter-spacing: -0.025em;
}

.doc-article h2,
.doc-article .chapter-section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-border);
  font-size: clamp(26px, 3vw, 34px);
}

.doc-article h2::before,
.doc-article .chapter-section-title::before {
  content: "";
  flex: none;
  width: 6px;
  height: 1.08em;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--color-primary), var(--color-accent));
}

.doc-article h3 {
  color: var(--color-primary-deep);
  font-size: clamp(19px, 2vw, 23px);
}

.doc-article p {
  color: #26323f;
  line-height: 1.85;
}

.doc-article .lead,
.doc-quote,
.tensor-summary {
  border-left-color: var(--color-accent);
  background: linear-gradient(90deg, var(--color-accent-soft), rgba(255, 255, 255, 0.78));
}

.chapter-route,
.learning-goals article,
.tensor-ladder article,
.notation-grid article,
.concept-grid article,
.compare-row article,
.boundary-tabs article,
.formula-map article,
.quiz-list article,
.doc-details,
.formula-panel,
.compare-panel,
.stress-transform-embed-card,
.stress-principal-embed-card,
.stress-max-shear-embed-card,
.chapter-next {
  border-color: var(--color-border);
  border-radius: var(--radius-panel);
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
}

.chapter-route {
  background:
    linear-gradient(135deg, rgba(219, 234, 254, 0.52), rgba(230, 245, 241, 0.52)),
    var(--color-surface);
}

.route-node {
  border-color: var(--color-border);
  background: rgba(255, 255, 255, 0.88);
  color: #334155;
}

.route-node:hover,
.route-node:focus-visible,
.route-node.is-selected {
  border-color: rgba(29, 78, 216, 0.36);
  background: var(--color-primary-soft);
  color: var(--color-primary-deep);
}

.route-detail {
  border-left-color: var(--color-accent);
  background: #ffffff;
}

.learning-goals article,
.tensor-ladder article,
.notation-grid article,
.concept-grid article,
.compare-row article,
.boundary-tabs article,
.formula-map article,
.quiz-list article {
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.learning-goals article:hover,
.tensor-ladder article:hover,
.notation-grid article:hover,
.concept-grid article:hover,
.compare-row article:hover,
.boundary-tabs article:hover,
.formula-map article:hover,
.quiz-list article:hover {
  border-color: rgba(29, 78, 216, 0.28);
  box-shadow: var(--shadow-card);
  transform: translateY(-1px);
}

.learning-goals span,
.tensor-ladder span,
.concept-grid span,
.boundary-tabs span,
.formula-map span {
  color: var(--color-accent);
}

.doc-details {
  background: #ffffff;
}

.doc-details summary {
  border-bottom: 1px solid transparent;
  color: var(--color-text);
}

.doc-details[open] summary {
  border-bottom-color: var(--color-border);
  background: linear-gradient(90deg, #f8fafc, #eef6ff);
  color: var(--color-primary-deep);
}

.formula-panel,
.stress-transform-expansion {
  background: #f8fafc;
  border-color: var(--color-border);
}

.formula-panel {
  padding: 20px 22px;
}

.formula-panel h3 {
  color: var(--color-primary-deep);
}

.doc-article mjx-container[display="true"] {
  display: block;
  max-width: 100%;
  margin: 1.2rem 0;
  padding: 1rem 1.25rem;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background: #f8fafc;
  overflow-x: auto;
  overflow-y: hidden;
  box-sizing: border-box;
}

.stress-transform-expansion {
  border-radius: var(--radius-panel);
}

.stress-transform-formula-list {
  gap: 10px;
}

.cauchy-application-panel,
.compare-panel {
  background: #f8fafc;
}

.stress-transform-embed-card {
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.72), rgba(255, 255, 255, 0.96)),
    #ffffff;
}

.interactive-demo-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: var(--radius-soft);
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-primary-deep), var(--color-accent));
}

.interactive-demo-title span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.interactive-demo-title strong {
  font-size: 17px;
  line-height: 1.35;
}

.stress-transform-embed-card > p {
  color: #334155;
}

.stress-principal-embed-card > p,
.stress-max-shear-embed-card > p {
  margin: 8px 0 0;
}

.stress-transform-embed,
.stress-explorer-embed {
  border-color: var(--color-border-strong);
  border-radius: var(--radius-panel);
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

.tensor-svg-figure,
.coord-transform-figure,
.stress-components-figure,
.force-card-figure,
.figure-card,
figure {
  max-width: 100%;
}

.doc-article figure img,
.doc-article figure svg {
  border-radius: var(--radius-soft);
}

.doc-article figure {
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-panel);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.doc-article figcaption {
  color: var(--color-muted);
  text-align: center;
}

.chapter-next {
  background:
    linear-gradient(135deg, rgba(219, 234, 254, 0.56), rgba(230, 245, 241, 0.56)),
    #ffffff;
}

.chapter-next a {
  color: var(--color-primary-deep);
}

.site-footer {
  border-top-color: var(--color-border);
  background: rgba(248, 250, 252, 0.96);
}

.docs-body.footer-fixed .site-footer {
  background: rgba(248, 250, 252, 0.94);
  box-shadow: 0 -10px 28px rgba(15, 23, 42, 0.08);
}

.ai-chat-fab {
  box-shadow: 0 12px 28px rgba(15, 118, 110, 0.22);
}

@media (max-width: 920px) {
  .component-equations,
  .strain-demo-card,
  .formula-grid,
  .concept-cards,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .strain-demo-card.strain-kinematics {
    grid-template-columns: 1fr;
  }

  .strain-sliders label,
  .compat-slider {
    grid-template-columns: 78px minmax(100px, 1fr) 84px;
  }
}

@media (max-width: 1460px) {
  .docs-shell {
    grid-template-columns: clamp(232px, 22vw, 276px) minmax(0, 1fr);
  }

  .knowledge-graph-panel {
    display: none;
  }
}

@media (max-width: 1080px) {
  .docs-shell {
    grid-template-columns: 1fr;
  }

  .docs-sidebar {
    background: #ffffff;
  }

  .section-toc {
    display: none;
  }
}

@media (max-width: 760px) {
  .doc-section {
    padding: 36px 0;
  }

  .doc-article h2,
  .doc-article .chapter-section-title {
    align-items: flex-start;
    font-size: 25px;
  }

  .formula-panel,
  .stress-transform-embed-card,
  .stress-principal-embed-card,
  .stress-max-shear-embed-card,
  .stress-transform-expansion {
    padding: 14px;
  }

  .interactive-demo-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
}

/* 手机屏幕：章节目录默认收起（点“目录”展开），顶栏只留校徽、标题和入口按钮（1.4 补充） */
.docs-toc-toggle { display: none; }
@media (max-width: 760px) {
  .docs-toc-toggle {
    display: flex; align-items: center; justify-content: space-between; width: calc(100% - 32px);
    margin: 12px 16px 0; padding: 10px 14px; border: 1px solid #b8d1dd; border-radius: 8px;
    background: #eaf4fa; color: #025f8d; font: 600 14px/1.4 "Microsoft YaHei", "微软雅黑", sans-serif; cursor: pointer;
  }
  .docs-toc-toggle::after { content: "▾"; }
  .docs-toc-toggle[aria-expanded="true"]::after { content: "▴"; }
  .docs-sidebar.is-collapsed { display: none; }
  .docs-topbar .topbar-logo { display: none; }
  .docs-topbar .docs-brand small { display: none; }
  .docs-topbar .docs-brand strong { font-size: 15px; line-height: 1.35; }
  .docs-topbar .university-emblem { width: 36px; height: auto; }
}
