/* ==========================================================================
   工具页 · 浅色卡片主题
   参照「汽车维修报价」的清晰度：浅灰底 + 白卡片 + 深色字 + 明确边界
   仅在 body 带 tool-* 且非 quote/susp 的页面生效（这两个页面本来就是浅色）
   ========================================================================== */

/* ---------- 底色与全局文字 ---------- */
body[class*="tool-"]:not(.tool-quote):not(.tool-susp) {
  background: #f2f4f3 !important;
  color: #1b211c !important;
}

body[class*="tool-"]:not(.tool-quote):not(.tool-susp) :is(h1, h2, h3, h4, h5, h6, p, span, label, li, dt, dd, td, th, div, strong, em, b, i, summary, a) {
  color: #1b211c;
}

/* 次要说明文字 */
body[class*="tool-"]:not(.tool-quote):not(.tool-susp) :is(.m-note, .field-hint, .sub, .diagram-cap, .tool-foot, .unit-hint, .stat-label, .m-label, .cond-title, .note, .crate-note, .hint) {
  color: #5f6b62 !important;
}

/* 品牌绿保留给标题装饰与强调 */
body[class*="tool-"]:not(.tool-quote):not(.tool-susp) :is(.rec-kicker, .kicker, h1 span, .accent) {
  color: #15803d;
}

/* ---------- 卡片 ---------- */
body[class*="tool-"]:not(.tool-quote):not(.tool-susp) :is(
  .card,
  .result-card,
  .card.placeholder,
  .panel,
  .input-panel,
  .canvas-panel,
  .metric,
  .stat-card,
  .crate-card,
  .range-card,
  .bms-card,
  .compare-card,
  .fold-section,
  details,
  .table-wrap,
  .model-ref,
  .diagram,
  .formula,
  .sprocket-item,
  .big-box,
  .ratio-preview,
  .cmp-box,
  .admin-note,
  .tip,
  .alert
) {
  background: #ffffff !important;
  border-color: #e2e7e4 !important;
  box-shadow: 0 1px 2px rgba(16, 24, 20, .04), 0 8px 24px -18px rgba(16, 24, 20, .25) !important;
}

/* 结果区底色略作区分 */
body[class*="tool-"]:not(.tool-quote):not(.tool-susp) :is(#result, .result-panel, .result-section, .results, .metric) {
  background: #ffffff !important;
}

/* ---------- 输入框 ---------- */
body[class*="tool-"]:not(.tool-quote):not(.tool-susp) :is(input, textarea, select) {
  background: #ffffff !important;
  border: 1.5px solid #d6ddd8 !important;
  color: #1b211c !important;
  caret-color: #15803d !important;
  font-weight: 700 !important;
}

body[class*="tool-"]:not(.tool-quote):not(.tool-susp) :is(input, textarea, select):focus {
  border-color: #16a34a !important;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, .15) !important;
}

body[class*="tool-"]:not(.tool-quote):not(.tool-susp) :is(input, textarea)::placeholder {
  color: #9aa5a0 !important;
  font-weight: 400 !important;
}

/* 输入框两侧的单位文字 */
body[class*="tool-"]:not(.tool-quote):not(.tool-susp) :is(.big-box span, .unit, .suffix) {
  color: #6b766f !important;
}

/* ---------- 结果数值 ---------- */
body[class*="tool-"]:not(.tool-quote):not(.tool-susp) :is(
  .m-value, .rec-num, .rec-ratio, .crate-value, .stat-value,
  .kwh-number, .result-value, .metric-value, .rp-main strong,
  .ratio-preview strong, .big-number, .output-value
) {
  color: #0e7490 !important;
  -webkit-text-fill-color: #0e7490 !important;
  font-weight: 800 !important;
  text-shadow: none !important;
}

/* ---------- 标签页 / 按钮组 ---------- */
body[class*="tool-"]:not(.tool-quote):not(.tool-susp) :is(.tabs, .tabbar, .lang-bar, .lang-switch) {
  background: #ffffff !important;
  border-color: #e2e7e4 !important;
}

body[class*="tool-"]:not(.tool-quote):not(.tool-susp) :is(.tab, .lang-option) {
  color: #4b554f !important;
  background: transparent !important;
}

body[class*="tool-"]:not(.tool-quote):not(.tool-susp) :is(.tab.active, .lang-option.active) {
  background: #e8f5ec !important;
  color: #15803d !important;
  font-weight: 800 !important;
}

/* ---------- 顶栏 ---------- */
body[class*="tool-"]:not(.tool-quote):not(.tool-susp) .aq-topbar {
  background: transparent !important;
  border: 0 !important;
}

body[class*="tool-"]:not(.tool-quote):not(.tool-susp) :is(.aq-back, .aqx-langbar) {
  background: #ffffff !important;
  border: 1px solid #dfe5e1 !important;
  color: #34403a !important;
}

body[class*="tool-"]:not(.tool-quote):not(.tool-susp) .aq-back span,
body[class*="tool-"]:not(.tool-quote):not(.tool-susp) .aq-back svg {
  color: #34403a !important;
  stroke: #34403a !important;
}

/* ---------- 分享卡 ---------- */
body[class*="tool-"]:not(.tool-quote):not(.tool-susp) .share-card {
  background: #ffffff !important;
  border: 1px solid #e2e7e4 !important;
  box-shadow: 0 1px 2px rgba(16, 24, 20, .04) !important;
}

body[class*="tool-"]:not(.tool-quote):not(.tool-susp) .share-h {
  color: #16201a !important;
}

body[class*="tool-"]:not(.tool-quote):not(.tool-susp) .share-desc,
body[class*="tool-"]:not(.tool-quote):not(.tool-susp) .share-eyebrow,
body[class*="tool-"]:not(.tool-quote):not(.tool-susp) .share-qrcap {
  color: #5f6b62 !important;
}

/* 浅色底上用黑色 LOGO */
body[class*="tool-"]:not(.tool-quote):not(.tool-susp) .share-logo {
  filter: invert(1) brightness(.15);
}

/* ---------- 示意图 / 画布 ---------- */
body[class*="tool-"]:not(.tool-quote):not(.tool-susp) :is(.diagram, .canvas-panel, .chain-svg, canvas) {
  background: #fbfcfb !important;
}

/* ---------- 表格 ---------- */
body[class*="tool-"]:not(.tool-quote):not(.tool-susp) :is(table, thead, tbody, tr, td, th) {
  background: #ffffff !important;
  border-color: #e6ebe8 !important;
  color: #1b211c !important;
}

body[class*="tool-"]:not(.tool-quote):not(.tool-susp) thead th {
  background: #f4f7f5 !important;
  color: #3c4740 !important;
}

/* ---------- 徽章 / 标签 ---------- */
body[class*="tool-"]:not(.tool-quote):not(.tool-susp) :is(.badge, .tag, .rec-tag, .chip, .pill) {
  background: #eef6f1 !important;
  border-color: #cfe6d8 !important;
  color: #15803d !important;
}


/* 浅色主题：选中态补色（分段按钮/选项） */
body[class*="tool-"]:not(.tool-quote):not(.tool-susp) :is(
  [class*="option"].active,
  [class*="type"].active,
  [class*="seg"].active,
  [class*="mode"].active,
  .tab.active,
  .lang-option.active
) {
  background: #22c55e !important;
  border-color: #16a34a !important;
  color: #04240f !important;
  font-weight: 800 !important;
}

body[class*="tool-"]:not(.tool-quote):not(.tool-susp) :is([class*="option"], [class*="type"], [class*="seg"], [class*="mode"]) {
  background: #f7faf8 !important;
  border-color: #dfe5e1 !important;
  color: #35413a !important;
}


/* 链轮示意图：浅底 + 绿色描边（深色填充在白底上会变黑块） */
body[class*="tool-"]:not(.tool-quote):not(.tool-susp) .diagram {
  background: #f7fbf8 !important;
  border-color: #d9e7de !important;
}

body[class*="tool-"]:not(.tool-quote):not(.tool-susp) .spr-ring {
  fill: #eef8f1 !important;
  stroke: #16a34a !important;
  stroke-width: 2 !important;
}

body[class*="tool-"]:not(.tool-quote):not(.tool-susp) .spr-hub {
  fill: #d6f0de !important;
  stroke: #16a34a !important;
}

body[class*="tool-"]:not(.tool-quote):not(.tool-susp) .spr-tooth {
  stroke: #34d399 !important;
}

body[class*="tool-"]:not(.tool-quote):not(.tool-susp) .chain-path {
  stroke: #34d399 !important;
}

body[class*="tool-"]:not(.tool-quote):not(.tool-susp) .spr-label {
  fill: #1b211c !important;
}

body[class*="tool-"]:not(.tool-quote):not(.tool-susp) .diagram-cap {
  color: #5f6b62 !important;
}

/* 圆角输入框给足左侧内边距，避免数字贴着边框 */
body[class*="tool-"]:not(.tool-quote):not(.tool-susp) :is(input, select, textarea) {
  padding-left: 14px !important;
}


/* 去掉外层容器的边框/圆角/阴影，避免页面四角出现多余的弧线 */
body[class*="tool-"]:not(.tool-quote):not(.tool-susp) :is(
  .container, .calculator-container, .page, .app, main, .workspace, .dashboard
) {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

body[class*="tool-"]:not(.tool-quote):not(.tool-susp) .aq-topbar,
body[class*="tool-"]:not(.tool-quote):not(.tool-susp) .aq-topbar::before,
body[class*="tool-"]:not(.tool-quote):not(.tool-susp) .aq-topbar::after {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}


/* ==========================================================================
   更清晰的描边与字重
   ========================================================================== */

/* 卡片/模块：黑色细描边，边界一目了然 */
body[class*="tool-"]:not(.tool-quote):not(.tool-susp) :is(
  .card, .result-card, .panel, .input-panel, .canvas-panel,
  .metric, .stat-card, .crate-card, .range-card, .bms-card,
  .compare-card, .fold-section, details, .table-wrap,
  .diagram, .formula, .sprocket-item, .big-box, .ratio-preview, .cmp-box
) {
  border: 1px solid #1b211c !important;
  box-shadow: none !important;
}

/* 输入框：黑描边 + 纯黑文字 */
body[class*="tool-"]:not(.tool-quote):not(.tool-susp) :is(input, textarea, select) {
  border: 1.5px solid #1b211c !important;
  color: #000000 !important;
  font-weight: 800 !important;
}

/* 正文与标签：颜色加深、字重提高 */
body[class*="tool-"]:not(.tool-quote):not(.tool-susp) :is(h1, h2, h3, h4, h5, h6) {
  color: #000000 !important;
  font-weight: 800 !important;
}

body[class*="tool-"]:not(.tool-quote):not(.tool-susp) :is(label, .cond-title, .m-label, .stat-label) {
  color: #111713 !important;
  font-weight: 700 !important;
}

body[class*="tool-"]:not(.tool-quote):not(.tool-susp) :is(p, span, li, td, th) {
  color: #1a201b !important;
}

/* 说明文字：比正文略浅，但不再发灰 */
body[class*="tool-"]:not(.tool-quote):not(.tool-susp) :is(.m-note, .field-hint, .sub, .diagram-cap, .tool-foot, .unit-hint) {
  color: #3d4640 !important;
  font-weight: 500 !important;
}

/* 表格线也更清楚 */
body[class*="tool-"]:not(.tool-quote):not(.tool-susp) :is(table, th, td) {
  border-color: #1b211c !important;
}

body[class*="tool-"]:not(.tool-quote):not(.tool-susp) thead th {
  background: #eef2ef !important;
  color: #000000 !important;
  font-weight: 800 !important;
}
