/* 经营所得个税试算（T134）：左边填数，右边看结果；手机上上下排列。只在用到的页面加载。没有脚本时整块保持隐藏。 */
.cxy-calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 22px; align-items: start; margin: 22px 0; }
.cxy-calc[hidden] { display: none; }
.cxy-calc-form, .cxy-calc-result { background: var(--ztc-white); border: 1px solid var(--ztc-border); border-radius: var(--cxy-radius-card, 20px); padding: 24px 26px; min-width: 0; }
.cxy-calc-result { box-shadow: var(--ztc-shadow-panel); }

/* 纳税人类型（单选，药丸样式；圆点隐藏但仍可用键盘选择） */
.cxy-calc-q { margin: 0 0 18px; padding: 0; border: 0; min-width: 0; }
.cxy-calc-q legend { margin-bottom: 10px; padding: 0; color: var(--cxy-heading); font-size: 15px; font-weight: 700; }
.cxy-calc-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.cxy-calc-opts input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.cxy-calc-opts label { display: inline-flex; align-items: center; min-height: 38px; padding: 7px 14px; border: 1px solid var(--ztc-border); border-radius: 999px; color: var(--ztc-text); font-size: 14px; cursor: pointer; transition: border-color .2s, background-color .2s; }
.cxy-calc-opts label:hover { border-color: color-mix(in srgb, var(--ztc-action) 45%, var(--ztc-border)); }
.cxy-calc-opts input:checked + label { border-color: var(--ztc-action); background: var(--ztc-tint-info-bg); color: var(--ztc-action-hover); box-shadow: inset 0 0 0 1px var(--ztc-action); }
.cxy-calc-opts input:focus-visible + label { outline: 2px solid var(--ztc-action); outline-offset: 2px; }

.cxy-calc-field { display: block; margin: 0 0 16px; }
.cxy-calc-field span { display: block; margin-bottom: 8px; color: var(--cxy-heading); font-size: 15px; font-weight: 700; }
.cxy-calc-field input { box-sizing: border-box; width: 100%; min-height: 46px; padding: 10px 14px; border: 1px solid var(--ztc-border); border-radius: 12px; background: var(--ztc-white); color: var(--cxy-heading); font: inherit; font-size: 17px; font-variant-numeric: tabular-nums; }
.cxy-calc-field input:focus { border-color: var(--ztc-action); outline: 2px solid color-mix(in srgb, var(--ztc-action) 35%, transparent); outline-offset: 1px; }
.cxy-calc-hint { display: block; margin-top: 6px; color: var(--ztc-text-muted); font-size: 12.5px; line-height: 1.6; }

/* 结果：逐行给出算式，最后是减免后应纳税额 */
.cxy-calc-lines { display: grid; gap: 12px; margin: 0; }
.cxy-calc-lines div { display: grid; grid-template-columns: 7.2em minmax(0, 1fr); gap: 4px 12px; padding-bottom: 12px; border-bottom: 1px dashed var(--ztc-border); }
.cxy-calc-lines dt { color: var(--ztc-text-muted); font-size: 14px; }
.cxy-calc-lines dd { margin: 0; color: var(--cxy-heading); font-weight: 600; font-variant-numeric: tabular-nums; }
.cxy-calc-lines small { display: block; margin-top: 4px; color: var(--ztc-text-muted); font-size: 12.5px; font-weight: 400; line-height: 1.6; overflow-wrap: anywhere; }
.cxy-calc-total { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: 16px 0 0; }
.cxy-calc-total span { color: var(--cxy-heading); font-weight: 700; }
.cxy-calc-total strong { color: var(--ztc-action); font-size: 26px; font-variant-numeric: tabular-nums; }
.cxy-calc-total em { color: var(--ztc-text-muted); font-size: 13px; font-style: normal; }
.cxy-calc-empty { margin: 0; color: var(--ztc-text-muted); }

@media (max-width: 760px) {
  .cxy-calc { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .cxy-calc-form, .cxy-calc-result { padding: 20px 18px; }
}

/* T136：印花税、小规模纳税人增值税、主体所得税对比三个试算共用的补充样式 */
/* 下拉选择（印花税试算的凭证类型）：去掉系统箭头，用边框画一个，颜色跟随令牌 */
.cxy-calc-field .cxy-calc-select { position: relative; display: block; margin: 0; color: inherit; font-size: inherit; font-weight: 400; }
.cxy-calc-field .cxy-calc-select::after { content: ""; position: absolute; top: 50%; right: 16px; width: 8px; height: 8px; border-right: 2px solid var(--ztc-text-muted); border-bottom: 2px solid var(--ztc-text-muted); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.cxy-calc-field select { box-sizing: border-box; width: 100%; min-height: 46px; padding: 10px 40px 10px 14px; border: 1px solid var(--ztc-border); border-radius: 12px; background: var(--ztc-white); color: var(--cxy-heading); font: inherit; font-size: 16px; line-height: 1.4; -webkit-appearance: none; appearance: none; cursor: pointer; }
.cxy-calc-field select:focus { border-color: var(--ztc-action); outline: 2px solid color-mix(in srgb, var(--ztc-action) 35%, transparent); outline-offset: 1px; }

/* 勾选项（减半、减除 6 万元、小型微利条件） */
.cxy-calc-check { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 14px; color: var(--ztc-text); font-size: 14.5px; line-height: 1.6; cursor: pointer; }
.cxy-calc-check input { flex: none; width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--ztc-action); cursor: pointer; }
.cxy-calc-check input:focus-visible { outline: 2px solid var(--ztc-action); outline-offset: 2px; }

/* 结果下方的补充说明（文章正文给段落加了外边距和行高，试算里的段落都加 .cxy-calc 前缀压过去） */
.cxy-calc .cxy-calc-foot { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--ztc-border); color: var(--ztc-text-muted); font-size: 13px; line-height: 1.7; }

/* 主体对比：填数在上、结果在下，四张卡片两列 */
.cxy-calc-wide { grid-template-columns: minmax(0, 1fr); }
.cxy-calc-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.cxy-calc-card { min-width: 0; padding: 14px 16px; border: 1px solid var(--ztc-border); border-radius: 14px; background: var(--ztc-white); }
.cxy-calc .cxy-calc-card h3 { margin: 0 0 6px; color: var(--cxy-heading); font-size: 14.5px; font-weight: 700; line-height: 1.45; }
.cxy-calc .cxy-calc-card-tax { margin: 0; color: var(--ztc-action); font-size: 21px; font-weight: 700; line-height: 1.35; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cxy-calc .cxy-calc-card-rate { margin: 2px 0 8px; color: var(--cxy-heading); font-size: 13px; line-height: 1.5; font-variant-numeric: tabular-nums; }
.cxy-calc .cxy-calc-card-note { margin: 0; color: var(--ztc-text-muted); font-size: 12.5px; line-height: 1.6; overflow-wrap: anywhere; }
@media (max-width: 520px) {
  .cxy-calc-cards { grid-template-columns: minmax(0, 1fr); }
}

/* 文章页里试算结果区的段落同样不吃正文段落的外边距（T136） */
.cxy-calc .cxy-calc-total { margin: 16px 0 0; line-height: 1.5; }
.cxy-calc .cxy-calc-empty { margin: 0; line-height: 1.7; }

/* 金额不拆行（T136 补）：文章正文给文字设了 overflow-wrap: anywhere，试算区改回正常断行，金额与“元”整体不换行 */
.cxy-calc { overflow-wrap: normal; }
.cxy-calc-num, .cxy-calc .cxy-calc-total strong { white-space: nowrap; }
/* 文章页 768 起右侧有目录，正文列只有约 470–600px：900px 以下试算改为上下排列 */
@media (max-width: 900px) {
  .cxy-kb-prose .cxy-calc { grid-template-columns: minmax(0, 1fr); }
}

/* Business calculator controls. The surrounding article and site navigation keep their own layout. */
.cxy-ux { --cxy-ux-blue: var(--cxy-blue, #006ed6); --cxy-ux-ink: var(--cxy-heading, #0b1f3a); --cxy-ux-muted: var(--cxy-text-muted, #4a5a70); --cxy-ux-wash: var(--cxy-surface-subtle, #eef5ff); color: var(--cxy-ux-ink); min-width: 0; margin-block: 20px; }
.cxy-ux [hidden] { display: none !important; }
.cxy-ux :is(button, input, select, textarea, summary, a) { box-sizing: border-box; }
.cxy-ux-choices { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cxy-ux .cxy-ux-choices button, .cxy-ux .cxy-ux-action, .cxy-ux .cxy-ux-source { display: inline-flex; justify-content: center; align-items: center; min-width: 44px; min-height: 44px; max-width: 100%; padding: 8px 14px; border: 1px solid var(--ztc-border, #cdd9e8); border-radius: 14px; background: white; color: var(--cxy-ux-ink); font: inherit; font-size: 14px; line-height: 1.45; text-align: start; text-decoration: none; overflow-wrap: anywhere; cursor: pointer; }
.cxy-ux .cxy-ux-choices button:hover, .cxy-ux .cxy-ux-choices button[aria-pressed="true"] { border-color: var(--cxy-ux-blue); background: var(--cxy-ux-wash); color: var(--cxy-blue-deep, #005bb5); }
.cxy-ux .cxy-ux-modes { width: fit-content; max-width: 100%; margin: 0 0 18px; padding: 4px; gap: 2px; border-radius: 16px; background: var(--cxy-ux-wash); }
.cxy-ux .cxy-ux-modes button { background: transparent; border: 0; font-weight: 600; }
.cxy-ux .cxy-ux-modes button[aria-pressed="true"], .cxy-ux .cxy-ux-action { color: white; background: var(--cxy-ux-blue); }
.cxy-ux .cxy-ux-action { border-color: transparent; font-weight: 600; margin-top: 12px; }
.cxy-ux .cxy-ux-action[aria-disabled="true"] { color: var(--cxy-ux-muted); background: var(--cxy-ux-wash); cursor: default; }
.cxy-ux .cxy-ux-choices strong { font-size: 14px; margin-inline-end: 4px; }
.cxy-ux .cxy-ux-status, .cxy-ux .cxy-calc-hint { color: var(--cxy-ux-muted); font-size: 13px; line-height: 1.6; margin: 6px 0 12px; }
.cxy-ux .cxy-ux-status:empty { display: none; }
.cxy-ux .cxy-calc { margin: 14px 0 0; }
.cxy-ux .cxy-ux-units { margin-bottom: 16px; }
.cxy-ux .cxy-ux-units button { border-radius: 10px; }
.cxy-ux .cxy-ux-amount { display: block; position: relative; margin: 0; min-width: 0; }
.cxy-ux .cxy-ux-amount input { width: 100%; min-width: 0; padding-right: 4em; margin: 0; font-variant-numeric: tabular-nums; }
.cxy-ux .cxy-ux-suffix { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); margin: 0; pointer-events: none; font-size: 14px; font-weight: 400; color: var(--cxy-ux-muted); }
.cxy-ux .cxy-calc-check, .cxy-ux .cxy-calc-opts label, .cxy-ux summary, .cxy-ux [type="submit"] { box-sizing: border-box; min-height: 44px; min-width: 44px; }
.cxy-ux .cxy-calc-check { align-items: center; margin-block: 2px; }
.cxy-ux .cxy-calc-check input { margin-block: 0; }
.cxy-ux .cxy-calc-check small { display: block; color: var(--cxy-ux-muted); font-size: 13px; }
.cxy-ux .cxy-ux-deductions { margin: 12px 0 18px; padding: 0; min-inline-size: 0; border: 0; }
.cxy-ux .cxy-ux-deductions legend, .cxy-ux-ai > label { display: block; color: var(--cxy-ux-ink); font-weight: 700; font-size: 18px; }
.cxy-ux .cxy-ux-deductions details { padding: 0; border: 0; border-bottom: 1px solid var(--ztc-border, #cdd9e8); margin: 0; border-radius: 0; background: transparent; }
.cxy-ux .cxy-ux-deductions summary { cursor: pointer; padding: 12px 0; font-size: 15px; line-height: 1.5; font-weight: 600; }
.cxy-ux .cxy-ux-deductions summary small { color: var(--cxy-ux-muted); font-size: 13px; font-weight: 400; margin-inline-start: 6px; }
.cxy-ux .cxy-ux-options { padding: 8px 0 2px 12px; margin: 0 0 8px 8px; border-left: 2px solid var(--cxy-ux-blue); }
.cxy-ux .cxy-ux-options .cxy-calc-field { margin-bottom: 8px; }
.cxy-ux .cxy-ux-source { color: var(--cxy-blue-deep, #005bb5); border: 0; padding: 4px 0; }
.cxy-ux .cxy-ux-sum, .cxy-ux .cxy-ux-warning { padding: 10px 14px; background: var(--cxy-ux-wash); border-radius: 12px; font-size: 14px; line-height: 1.65; margin: 12px 0; }
.cxy-ux .cxy-ux-jump { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; font-size: 14px; color: var(--cxy-blue-deep, #005bb5); }
.cxy-ux .cxy-ux-result { scroll-margin-top: 5rem; }
.cxy-ux .cxy-ux-return { margin-top: 16px; }
.cxy-ux .cxy-ux-return summary { padding-block: 12px; cursor: pointer; font-size: 14px; }
.cxy-ux .cxy-ux-return label { display: block; font-size: 14px; line-height: 1.6; }
.cxy-ux .cxy-calc-result > strong { display: block; font-size: 20px; line-height: 1.5; margin-block: 8px 16px; }
.cxy-ux .cxy-calc-result, .cxy-ux-result { min-width: 0; overflow-wrap: anywhere; }
.cxy-ux .cxy-calc-lines dd, .cxy-ux .cxy-calc-card-tax, .cxy-ux .cxy-calc-num { white-space: normal; overflow-wrap: anywhere; }
.cxy-ux .cxy-ux-ai { padding: 20px; border: 1px solid var(--ztc-border, #cdd9e8); border-radius: 18px; background: white; }
.cxy-ux .cxy-ux-ai textarea { display: block; width: 100%; resize: vertical; min-height: 96px; padding: 12px; margin: 10px 0; border: 1px solid var(--ztc-border, #cdd9e8); border-radius: 12px; color: var(--cxy-ux-ink); background: white; font: inherit; font-size: 16px; }
.cxy-ux .cxy-ux-ai .cxy-ux-choices { display: grid; grid-template-columns: minmax(0,1fr); justify-items: start; }
.cxy-ux .cxy-ux-ai .cxy-ux-choices button { display: block; white-space: normal; }
.cxy-ux .cxy-calc-field select { min-width: 0; max-width: 100%; }
.cxy-ux :is(button, a, select, textarea, input, summary):focus-visible { outline: 2px solid var(--cxy-ux-blue); outline-offset: 2px; }
@media (max-width: 760px) {
  .cxy-ux .cxy-calc { grid-template-columns: minmax(0,1fr); }
  .cxy-ux .cxy-ux-ai, .cxy-ux .cxy-calc-form, .cxy-ux .cxy-calc-result { padding: 16px; }
  .cxy-ux .cxy-ux-modes { width: 100%; box-sizing: border-box; display: grid; grid-template-columns: minmax(0,0.8fr) minmax(0,1.2fr); }
  .cxy-ux .cxy-ux-modes button { width: 100%; padding-inline: 8px; white-space: normal; }
  .cxy-ux .cxy-ux-ai .cxy-ux-choices button { width: 100%; }
  .cxy-ux .cxy-ux-options { margin-inline-start: 0; padding-inline-start: 8px; }
}
