/*
 * Copyright (c) 2026 四川森普力科技有限公司
 * 联系人：姚工  Tel: 159-2808-9752 / 177-8067-0842
 * Email: mylanview@126.com
 * Web: www.sploptics.com
 *
 * 共聚焦拉曼光路说明页样式
 */

/* 每三段插入的定制联系行 */
.article-card p.kh-contact {
  margin: 4px 0 18px;
  padding: 8px 14px;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-secondary);
  background: var(--primary-bg);
  border-left: 3px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  text-align: left;
}
.article-card p.kh-contact a { color: var(--primary-dark); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }

/* 按钮与跳转提示箭头 */
.cr-btns { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; align-items: center; }
.cr-btn {
  display: inline-block; padding: 5px 12px; font-size: 0.84rem; font-weight: 600;
  color: var(--primary-dark); background: #fff; border: 1px solid var(--primary-light);
  border-radius: var(--radius-sm); cursor: pointer; transition: background var(--transition);
}
.cr-btn:hover, a.cr-btn:hover { color: var(--primary-dark); background: var(--primary-bg); }
.cr-btn-primary, a.cr-btn-primary { color: #fff; background: var(--primary); border-color: var(--primary); }
.cr-btn-primary:hover, a.cr-btn-primary:hover { color: #fff; background: var(--primary-dark); }
.cr-nudge { display: inline-flex; align-items: center; gap: 2px; margin-left: 6px; }
.cr-nudge i { font-style: normal; font-size: 1.7rem; font-weight: 900; line-height: 1; color: var(--primary); animation: crNudge 1s ease-in-out infinite; }
.cr-nudge i:nth-child(2) { animation-delay: 0.15s; opacity: 0.75; }
.cr-nudge i:nth-child(3) { animation-delay: 0.3s; opacity: 0.5; }
@keyframes crNudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(-10px); } }

/* 宽版交互卡片 */
.cr-wide {
  position: relative; left: 50%; transform: translateX(-50%);
  width: min(1180px, calc(100vw - 32px)); padding: 32px 32px 36px;
}
.cr-lead { font-size: 0.94rem; line-height: 1.8; color: var(--text-secondary); margin-bottom: 14px; }
.cr-controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 10px 24px; margin-bottom: 10px; }
.cr-slider { display: grid; grid-template-columns: auto 1fr; gap: 0 10px; align-items: baseline; }
.cr-slider label { grid-row: 1; grid-column: 1; font-size: 0.88rem; font-weight: 700; color: var(--text); white-space: nowrap; }
.cr-slider output { grid-row: 1; grid-column: 2; font-size: 0.8rem; color: var(--text-muted); text-align: right; font-variant-numeric: tabular-nums; }
.cr-slider input[type="range"] { grid-row: 2; grid-column: 1 / -1; width: 100%; accent-color: var(--primary); }
.cr-toolbar { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; font-size: 0.86rem; color: var(--text-secondary); margin: 4px 0 10px; }
.cr-toolbar label { cursor: pointer; white-space: nowrap; }
.cr-stage { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; background: #f7f9fc; margin-bottom: 12px; }
.cr-stage svg { display: block; width: 100%; height: auto; }
.cr-info {
  padding: 10px 14px; font-size: 0.9rem; line-height: 1.75; color: var(--text-secondary);
  background: var(--bg-white); border: 1px dashed var(--border-dark); border-radius: var(--radius-sm); min-height: 54px;
}
.cr-info b { display: block; color: var(--text); margin-bottom: 2px; }

/* 计算器 */
.cr-inputs { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
.cr-inputs fieldset {
  min-width: 0; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 14px 10px; background: var(--bg-white);
  display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center;
}
.cr-inputs legend { font-size: 0.82rem; font-weight: 700; color: var(--primary); padding: 0 4px; }
.cr-inputs label { font-size: 0.86rem; color: var(--text-secondary); white-space: nowrap; }
.cr-inputs input[type="number"] {
  width: 72px; padding: 3px 6px; margin: 0 2px; border: 1px solid var(--border-dark); border-radius: 4px; font-size: 0.88rem; background: #fff; color: var(--text);
}
.cr-calc { display: grid; grid-template-columns: 1fr minmax(300px, 520px); gap: 18px; align-items: start; }
.cr-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 10px; }
.cr-card { background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 12px; }
.cr-card-k { font-size: 0.76rem; color: var(--text-muted); }
.cr-card-v { font-size: 1.05rem; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.cr-card-n { font-size: 0.74rem; color: var(--text-secondary); line-height: 1.4; }
.cr-chart { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.cr-chart svg { display: block; width: 100%; height: auto; }
.cr-tips { margin-top: 12px; }
.cr-tip { font-size: 0.86rem; line-height: 1.6; padding: 6px 12px; border-radius: var(--radius-sm); margin-bottom: 6px; }
.cr-tip-ok { background: rgba(16, 185, 129, 0.12); border-left: 3px solid #10b981; color: #065f46; }
.cr-tip-warn { background: rgba(245, 158, 11, 0.13); border-left: 3px solid var(--accent); color: #7a4b00; }
.cr-tip-err { background: rgba(220, 38, 38, 0.1); border-left: 3px solid #dc2626; color: #8b1a1a; }
.cr-tip-info { background: var(--primary-bg); border-left: 3px solid var(--primary); color: var(--text-secondary); }
.cr-note { font-size: 0.8rem; line-height: 1.7; color: var(--text-muted); margin-top: 10px; }

/* SVG 内部 */
#crDemoSvg text, #crSpecSvg text, #crZSvg text, #crPathSvg text, #crTradeSvg text { paint-order: stroke; stroke: #f7f9fc; stroke-width: 3px; stroke-linejoin: round; }
.cr-bg { fill: #f7f9fc; }
.cr-ptitle { font-size: 18px; font-weight: 800; fill: #22324d; }
.cr-t { font-size: 13px; font-weight: 700; fill: #22324d; }
.cr-ts { font-size: 11.5px; fill: #4a5d78; }
.cr-tick { font-size: 10.5px; fill: #7486a0; }
.cr-axis { stroke: #8a9ab0; stroke-width: 1; stroke-dasharray: 8 4 2 4; }
.cr-divider { stroke: #cbd5e1; stroke-width: 1; }
.cr-exc { fill: #ffe34d; opacity: 0.28; }
.cr-exc-in { opacity: 0.55; }
.cr-cube { fill: none; stroke: #2b4f86; stroke-width: 2; }
.cr-cube-top { fill: rgba(43, 79, 134, 0.06); stroke: #2b4f86; stroke-width: 1.6; }
.cr-cube-side { fill: rgba(43, 79, 134, 0.1); stroke: #2b4f86; stroke-width: 1.6; }
.cr-slice { stroke: #2b4f86; stroke-width: 1; stroke-dasharray: 4 3; }
.cr-plane { fill: rgba(120, 170, 230, 0.08); stroke: #2b4f86; stroke-width: 2; }
.cr-plane-oof { fill: none; stroke: #2b4f86; stroke-width: 1.4; stroke-dasharray: 6 5; }
.cr-pin { fill: #fff; stroke: #2b4f86; stroke-width: 2.4; }
.cr-pin-oof { fill: none; stroke-width: 1.5; }
.cr-collect { fill: none; stroke: #2b4f86; stroke-width: 1.2; stroke-dasharray: 5 4; }
.cr-lens { fill: rgba(140, 180, 235, 0.55); stroke: #2b4f86; stroke-width: 2; }
.cr-focal { stroke: #c98a00; stroke-width: 1; stroke-dasharray: 3 3; }
.cr-ray { fill: none; stroke-width: 1.3; opacity: 0.85; }
.cr-ray-oof { stroke-width: 1; opacity: 0.55; stroke-dasharray: 5 4; }
.cr-x { fill: none; stroke-width: 1.6; }
.cr-barbg { fill: #e2e8f0; }
.cr-flow { stroke-dasharray: 7 5; animation: crFlow 0.9s linear infinite; }
.cr-ray-oof.cr-flow { stroke-dasharray: 4 5; }
@keyframes crFlow { to { stroke-dashoffset: -12; } }
.cr-grid { stroke: #e2e8f0; stroke-width: 1; }
.cr-ax { stroke: #7486a0; stroke-width: 1; }
.cr-spec-probe { fill: none; stroke: #94a3b8; stroke-width: 1.6; stroke-dasharray: 5 3; }
.cr-spec-conf { fill: none; stroke: #1d4ed8; stroke-width: 1.8; }
.cr-z-probe { fill: none; stroke-width: 1.4; stroke-dasharray: 5 4; opacity: 0.8; }
.cr-z-conf { fill: none; stroke-width: 2; }
.cr-zline { stroke: #c98a00; stroke-width: 1.5; stroke-dasharray: 4 3; }
.cr-sweet { fill: rgba(21, 128, 61, 0.08); }
.cr-tr1 { fill: none; stroke: #2563eb; stroke-width: 2; }
.cr-tr2 { fill: none; stroke: #e4572e; stroke-width: 2; }
.cr-beam { fill: none; }
.cr-box { fill: #3b4658; }
.cr-filter { opacity: 0.8; }
.cr-dm { stroke: #2b4f86; stroke-width: 5; stroke-linecap: round; }
.cr-obj { fill: rgba(200, 206, 216, 0.75); stroke: #59677c; stroke-width: 1.2; }
.cr-sample { fill: #c8ccd4; stroke: #6c7686; }
.cr-stage { fill: #4b5566; }
.cr-pinbar { stroke: #22324d; stroke-width: 4; }
.cr-comp { cursor: pointer; }
.cr-comp:hover .cr-t { fill: var(--primary); }
.cr-comp.cr-hi .cr-t { fill: #e4572e; }
.cr-comp.cr-hi rect, .cr-comp.cr-hi ellipse, .cr-comp.cr-hi path, .cr-comp.cr-hi line { filter: drop-shadow(0 0 4px rgba(228, 87, 46, 0.9)); }

@media (prefers-reduced-motion: reduce) {
  .cr-flow, .cr-nudge i { animation: none; }
}
@media (max-width: 900px) {
  .cr-calc { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .cr-wide { padding: 22px 14px 26px; }
  .cr-inputs fieldset { width: 100%; }
  .cr-inputs label, .cr-slider label, .cr-toolbar label { white-space: normal; }
  .cr-slider { grid-template-columns: 1fr; }
  .cr-slider output { grid-row: 3; grid-column: 1; text-align: left; }
  .cr-stage { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .cr-stage svg { min-width: 760px; }
}
