/* ============================================================
   月嫂与育儿嫂费用预算器 · 独立视觉：暖杏纸 + 赭红 + 账本小票
   ============================================================ */

.ncb-page {
  --ncb-bg: #fbf5ec;
  --ncb-bg-2: #f5e9d8;
  --ncb-card: #ffffff;
  --ncb-soft: #f8f0e5;
  --ncb-soft-2: #efe1cf;
  --ncb-ink: #2b2019;
  --ncb-muted: #7d6a5b;
  --ncb-line: #e8dccb;
  --ncb-accent: #b4532a;
  --ncb-accent-2: #d98b52;
  --ncb-olive: #5c6b3f;
  --ncb-gold: #a8791f;
  --ncb-ok: #1c7a52;
  --ncb-warn: #a35a08;
  --ncb-bad: #b42318;
  --ncb-shadow: 0 12px 34px rgba(96, 60, 30, .08);

  background: var(--ncb-bg);
  color: var(--ncb-ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.75;
  padding-bottom: 48px;
  transition: background-color .2s ease, color .2s ease;
}

:root[data-theme="dark"] .ncb-page {
  --ncb-bg: #14100c;
  --ncb-bg-2: #1b1510;
  --ncb-card: #1e1812;
  --ncb-soft: #261e16;
  --ncb-soft-2: #32261b;
  --ncb-ink: #f2e8dc;
  --ncb-muted: #b4a08e;
  --ncb-line: #382c21;
  --ncb-accent: #e89468;
  --ncb-accent-2: #f0b68c;
  --ncb-olive: #a7b579;
  --ncb-gold: #e5b45c;
  --ncb-ok: #5fd39c;
  --ncb-warn: #f0b45f;
  --ncb-bad: #f08a80;
  --ncb-shadow: 0 12px 34px rgba(0, 0, 0, .4);
}

html[data-theme="dark"] .ncb-page { color-scheme: dark; }

.ncb-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 20px 0;
}

/* ---------- 面包屑 ---------- */
.ncb-crumb {
  font-size: 13px;
  color: var(--ncb-muted);
  margin-bottom: 14px;
}
.ncb-crumb a { color: var(--ncb-muted); text-decoration: none; }
.ncb-crumb a:hover { color: var(--ncb-accent); }

/* ---------- Hero ---------- */
.ncb-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 214px;
  gap: 20px;
  align-items: center;
  background:
    radial-gradient(560px 210px at 90% -10%, rgba(217, 139, 82, .26), transparent 70%),
    linear-gradient(135deg, var(--ncb-bg-2), var(--ncb-card) 74%);
  border: 1px solid var(--ncb-line);
  border-radius: 22px;
  padding: 26px 28px;
  box-shadow: var(--ncb-shadow);
  margin-bottom: 20px;
}
.ncb-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--ncb-accent);
  background: rgba(180, 83, 42, .1);
  border-radius: 999px;
  padding: 3px 10px;
  margin-bottom: 8px;
}
.ncb-hero h1 {
  font-size: 28px;
  line-height: 1.35;
  margin: 0 0 10px;
  letter-spacing: -.01em;
}
.ncb-hero p {
  margin: 0;
  font-size: 14.5px;
  color: var(--ncb-muted);
  max-width: 650px;
}
.ncb-hero p b { color: var(--ncb-ink); }
.ncb-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.ncb-hero-meta span {
  font-size: 12px;
  color: var(--ncb-accent);
  background: var(--ncb-soft);
  border: 1px solid var(--ncb-line);
  border-radius: 8px;
  padding: 4px 10px;
  font-weight: 600;
}

/* Hero 右侧账本小票 */
.ncb-art {
  position: relative;
  height: 156px;
}
.ncb-slip {
  position: absolute;
  width: 108px;
  height: 132px;
  background: var(--ncb-card);
  border: 1px solid var(--ncb-line);
  border-radius: 6px;
  box-shadow: var(--ncb-shadow);
  padding: 12px 10px;
}
.ncb-slip::before {
  content: "";
  position: absolute;
  left: 10px; right: 10px; top: 12px;
  height: 6px;
  border-radius: 3px;
  background: var(--ncb-soft-2);
}
.ncb-slip::after {
  content: "";
  position: absolute;
  left: 10px; right: 10px; bottom: 16px;
  height: 1px;
  background: repeating-linear-gradient(90deg, var(--ncb-line) 0 6px, transparent 6px 11px);
}
.ncb-slip em {
  position: absolute;
  left: 10px; right: 10px; top: 28px;
  height: 46px;
  background: repeating-linear-gradient(180deg, var(--ncb-soft) 0 5px, transparent 5px 13px);
  font-style: normal;
}
.ncb-slip:nth-child(1) { left: 2px; top: 16px; transform: rotate(-7deg); }
.ncb-slip:nth-child(2) { left: 76px; top: 2px; transform: rotate(2deg); border-color: var(--ncb-accent-2); }
.ncb-slip:nth-child(3) { left: 148px; top: 20px; transform: rotate(8deg); }
.ncb-slip:nth-child(2)::before { background: var(--ncb-accent-2); opacity: .55; }

/* ---------- 主栅格 ---------- */
.ncb-grid {
  display: grid;
  grid-template-columns: 1fr 410px;
  gap: 20px;
  align-items: start;
}
.ncb-col { min-width: 0; }

/* ---------- 卡片 ---------- */
.ncb-card {
  background: var(--ncb-card);
  border: 1px solid var(--ncb-line);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--ncb-shadow);
}
.ncb-card + .ncb-card { margin-top: 16px; }
.ncb-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.ncb-card-head h2 {
  font-size: 17px;
  margin: 0;
  letter-spacing: -.01em;
}
.ncb-card-head span {
  font-size: 12px;
  color: var(--ncb-muted);
}

/* ---------- 表单 ---------- */
.ncb-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 14px;
}
.ncb-fields.gap { margin-top: 12px; }
.ncb-field { min-width: 0; }
.ncb-field.full { grid-column: 1 / -1; }
.ncb-field.full.gap { margin-top: 12px; }
.ncb-field > label {
  display: block;
  font-size: 12.5px;
  color: var(--ncb-muted);
  font-weight: 600;
  margin-bottom: 5px;
}
.ncb-input, .ncb-select {
  width: 100%;
  box-sizing: border-box;
  height: 40px;
  padding: 0 11px;
  font-size: 15px;
  color: var(--ncb-ink);
  background: var(--ncb-soft);
  border: 1px solid var(--ncb-line);
  border-radius: 9px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  font-variant-numeric: tabular-nums;
}
.ncb-select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 30px;
  background-image: linear-gradient(45deg, transparent 50%, var(--ncb-muted) 50%), linear-gradient(135deg, var(--ncb-muted) 50%, transparent 50%);
  background-position: calc(100% - 16px) 18px, calc(100% - 11px) 18px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.ncb-input:focus, .ncb-select:focus {
  border-color: var(--ncb-accent);
  box-shadow: 0 0 0 3px rgba(180, 83, 42, .14);
  background-color: var(--ncb-card);
}
.ncb-unit { position: relative; }
.ncb-unit .ncb-input { padding-right: 42px; }
.ncb-unit em {
  position: absolute;
  right: 11px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  font-style: normal;
  color: var(--ncb-muted);
  pointer-events: none;
}

/* 分段选择 */
.ncb-seg {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  background: var(--ncb-soft);
  border: 1px solid var(--ncb-line);
  border-radius: 11px;
  padding: 5px;
}
.ncb-seg.two { grid-template-columns: repeat(2, 1fr); }
.ncb-seg label {
  position: relative;
  display: block;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--ncb-muted);
  border-radius: 8px;
  padding: 7px 4px;
  cursor: pointer;
  transition: background .15s, color .15s, box-shadow .15s;
}
.ncb-seg input { position: absolute; opacity: 0; pointer-events: none; }
.ncb-seg input:checked + span {
  color: #fff;
  background: linear-gradient(135deg, var(--ncb-accent), var(--ncb-accent-2));
  box-shadow: 0 3px 10px rgba(180, 83, 42, .25);
}
.ncb-seg label span {
  display: block;
  border-radius: 8px;
  padding: 6px 2px;
  transition: background .15s, color .15s;
}
.ncb-seg input:focus-visible + span {
  outline: 2px solid var(--ncb-accent);
  outline-offset: 2px;
}

.ncb-hint {
  font-size: 12px;
  color: var(--ncb-muted);
  margin: 10px 0 0;
  line-height: 1.7;
}
.ncb-hint b { color: var(--ncb-ink); }

.ncb-error {
  margin-top: 12px;
  padding: 9px 12px;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--ncb-warn);
  background: rgba(163, 90, 8, .08);
  border: 1px solid rgba(163, 90, 8, .22);
  border-radius: 9px;
}
.ncb-error:empty { display: none; }

/* 隐性支出勾选区 */
.ncb-checks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}
.ncb-check {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--ncb-soft);
  border: 1px solid var(--ncb-line);
  border-radius: 9px;
  padding: 8px 10px;
  font-size: 13px;
  cursor: pointer;
}
.ncb-check input { accent-color: var(--ncb-accent); width: 15px; height: 15px; }
.ncb-check span { flex: 1; color: var(--ncb-muted); }
.ncb-check b { color: var(--ncb-ink); font-variant-numeric: tabular-nums; }
.ncb-check input[type="number"] {
  width: 62px;
  height: 28px;
  box-sizing: border-box;
  padding: 0 5px;
  font-size: 12.5px;
  text-align: right;
  color: var(--ncb-ink);
  background: var(--ncb-card);
  border: 1px solid var(--ncb-line);
  border-radius: 6px;
  outline: none;
  font-variant-numeric: tabular-nums;
}
.ncb-check input[type="number"]:focus { border-color: var(--ncb-accent); }
.ncb-check i {
  font-style: normal;
  font-size: 11px;
  color: var(--ncb-muted);
  margin-left: -4px;
}

/* ---------- 汇总卡 ---------- */
.ncb-summary {
  position: sticky;
  top: 14px;
  background: var(--ncb-card);
  border: 1px solid var(--ncb-line);
  border-radius: 18px;
  padding: 20px;
  box-shadow: var(--ncb-shadow);
}
.ncb-sum-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.ncb-sum-head h2 { font-size: 16px; margin: 0; }
.ncb-badge {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ncb-accent);
  background: var(--ncb-soft);
  border-radius: 999px;
  padding: 3px 9px;
  white-space: nowrap;
}
.ncb-total {
  font-size: 40px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--ncb-accent);
  font-variant-numeric: tabular-nums;
}
.ncb-total small {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ncb-muted);
  margin-left: 4px;
}
.ncb-total-sub {
  font-size: 12.5px;
  color: var(--ncb-muted);
  margin-top: 2px;
}

/* 占比条 */
.ncb-bar {
  display: flex;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--ncb-soft-2);
  margin: 14px 0 8px;
}
.ncb-bar i { display: block; height: 100%; width: 0; }
.ncb-bar .b1 { background: var(--ncb-accent); }
.ncb-bar .b2 { background: var(--ncb-accent-2); }
.ncb-bar .b3 { background: var(--ncb-gold); }
.ncb-bar .b4 { background: var(--ncb-olive); }
.ncb-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  font-size: 11.5px;
  color: var(--ncb-muted);
  margin-bottom: 14px;
}
.ncb-legend span::before {
  content: "";
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 2px;
  margin-right: 5px;
  vertical-align: 1px;
  background: currentColor;
}
.ncb-legend .l1 { color: var(--ncb-accent); }
.ncb-legend .l2 { color: var(--ncb-accent-2); }
.ncb-legend .l3 { color: var(--ncb-gold); }
.ncb-legend .l4 { color: var(--ncb-olive); }

.ncb-break {
  margin: 0;
  padding: 0;
  border-top: 1px dashed var(--ncb-line);
}
.ncb-break > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--ncb-line);
}
.ncb-break dt {
  font-size: 13px;
  color: var(--ncb-muted);
}
.ncb-break dd {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.ncb-break > div.hi dd { color: var(--ncb-accent); }
.ncb-break small {
  display: block;
  font-size: 11.5px;
  color: var(--ncb-muted);
  font-weight: 400;
}

.ncb-tip {
  margin: 14px 0 0;
  padding: 10px 12px;
  font-size: 12.5px;
  line-height: 1.7;
  border-radius: 10px;
  background: var(--ncb-soft);
  border: 1px solid var(--ncb-line);
  color: var(--ncb-muted);
}
.ncb-tip b { color: var(--ncb-ink); }
.ncb-tip.warn {
  color: var(--ncb-warn);
  background: rgba(163, 90, 8, .08);
  border-color: rgba(163, 90, 8, .2);
}

/* ---------- 操作按钮 ---------- */
.ncb-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 20px;
}
.ncb-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(135deg, var(--ncb-accent), var(--ncb-accent-2));
  color: #fff;
  box-shadow: 0 6px 16px rgba(180, 83, 42, .22);
  transition: transform .12s, box-shadow .12s, opacity .12s;
}
.ncb-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(180, 83, 42, .3); }
.ncb-btn:active { transform: translateY(0); }
.ncb-btn.ghost {
  background: var(--ncb-card);
  color: var(--ncb-ink);
  border: 1px solid var(--ncb-line);
  box-shadow: none;
}
.ncb-btn.ghost:hover { border-color: var(--ncb-accent); color: var(--ncb-accent); }
.ncb-btn.link {
  background: none;
  color: var(--ncb-accent);
  box-shadow: none;
  padding: 10px 6px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.ncb-btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

/* ---------- 内容块 ---------- */
.ncb-block {
  background: var(--ncb-card);
  border: 1px solid var(--ncb-line);
  border-radius: 16px;
  padding: 22px 24px;
  box-shadow: var(--ncb-shadow);
  margin-top: 18px;
}
.ncb-block h2 {
  font-size: 19px;
  margin: 0 0 10px;
  letter-spacing: -.01em;
}
.ncb-block h3 {
  font-size: 15px;
  margin: 18px 0 8px;
}
.ncb-block p {
  font-size: 14px;
  color: var(--ncb-muted);
  margin: 0 0 10px;
}
.ncb-block p b { color: var(--ncb-ink); }

.ncb-tbl-wrap { overflow-x: auto; margin: 14px -4px 0; }
.ncb-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ncb-table th {
  text-align: left;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ncb-muted);
  background: var(--ncb-soft);
  padding: 9px 10px;
  border-bottom: 1px solid var(--ncb-line);
  white-space: nowrap;
}
.ncb-table th:first-child { border-radius: 8px 0 0 8px; }
.ncb-table th:last-child { border-radius: 0 8px 8px 0; }
.ncb-table td { padding: 10px; border-bottom: 1px solid var(--ncb-line); }
.ncb-table tbody tr:last-child td { border-bottom: none; }
.ncb-table td.num, .ncb-table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ncb-table td b { font-variant-numeric: tabular-nums; }
.ncb-table tr.hi td { background: rgba(180, 83, 42, .06); }
.ncb-table td.ok { color: var(--ncb-ok); font-weight: 700; }
.ncb-table td.bad { color: var(--ncb-bad); font-weight: 700; }

/* 报价对比 */
.ncb-quote {
  display: grid;
  grid-template-columns: 1fr 150px;
  gap: 12px;
  align-items: end;
  margin-top: 14px;
}
.ncb-quote-out {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.ncb-qbox {
  background: var(--ncb-soft);
  border: 1px solid var(--ncb-line);
  border-radius: 10px;
  padding: 10px 12px;
}
.ncb-qbox span {
  display: block;
  font-size: 11.5px;
  color: var(--ncb-muted);
  margin-bottom: 3px;
}
.ncb-qbox b {
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}
.ncb-qbox b.ok { color: var(--ncb-ok); }
.ncb-qbox b.bad { color: var(--ncb-bad); }
.ncb-qbox small {
  display: block;
  font-size: 11.5px;
  color: var(--ncb-muted);
  margin-top: 2px;
}

/* 清单 */
.ncb-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.ncb-list li {
  position: relative;
  background: var(--ncb-soft);
  border: 1px solid var(--ncb-line);
  border-radius: 10px;
  padding: 11px 13px 11px 34px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ncb-muted);
}
.ncb-list li::before {
  content: "!";
  position: absolute;
  left: 11px;
  top: 11px;
  width: 15px; height: 15px;
  border-radius: 50%;
  background: var(--ncb-accent);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 15px;
  text-align: center;
}
.ncb-list li b { color: var(--ncb-ink); }

/* FAQ */
.ncb-faq { margin-top: 18px; }
.ncb-faq details {
  background: var(--ncb-card);
  border: 1px solid var(--ncb-line);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 8px;
}
.ncb-faq summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  list-style: none;
}
.ncb-faq summary::-webkit-details-marker { display: none; }
.ncb-faq summary::before {
  content: "+";
  display: inline-block;
  width: 18px;
  color: var(--ncb-accent);
  font-weight: 800;
}
.ncb-faq details[open] summary::before { content: "−"; }
.ncb-faq p {
  margin: 8px 0 0 18px;
  font-size: 13px;
  color: var(--ncb-muted);
}

.ncb-disclaimer {
  margin-top: 20px;
  padding: 12px 16px;
  font-size: 12px;
  line-height: 1.75;
  color: var(--ncb-muted);
  background: var(--ncb-soft);
  border: 1px dashed var(--ncb-line);
  border-radius: 10px;
}

/* AI */
.ncb-ai {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  background: var(--ncb-soft);
  border: 1px solid var(--ncb-line);
  border-radius: 14px;
  padding: 14px 16px;
}
.ncb-ai p { margin: 0; flex: 1; min-width: 220px; font-size: 12.5px; color: var(--ncb-muted); }
.ncb-ai-status {
  flex-basis: 100%;
  font-size: 12.5px;
  color: var(--ncb-muted);
  white-space: pre-wrap;
  line-height: 1.8;
}
.ncb-ai-status:empty { display: none; }
.ncb-ai-status.err { color: var(--ncb-bad); }

/* ---------- 响应式 ---------- */
@media (max-width: 1020px) {
  .ncb-grid { grid-template-columns: 1fr; }
  .ncb-summary { position: static; }
  .ncb-art { display: none; }
  .ncb-hero { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .ncb-fields { grid-template-columns: 1fr; }
  .ncb-checks { grid-template-columns: 1fr; }
  .ncb-quote { grid-template-columns: 1fr; }
  .ncb-quote-out { grid-template-columns: 1fr; }
  .ncb-seg { grid-template-columns: repeat(2, 1fr); }
  .ncb-list { grid-template-columns: 1fr; }
  .ncb-actions .ncb-btn { flex: 1; justify-content: center; }
}
@media (max-width: 600px) {
  .ncb-shell { padding: 12px 12px 0; }
  .ncb-hero { padding: 20px 18px; }
  .ncb-hero h1 { font-size: 22px; }
  .ncb-block { padding: 17px 15px; }
  .ncb-card-head { flex-direction: column; align-items: flex-start; gap: 2px; }
  .ncb-table { font-size: 11.5px; }
  .ncb-table th, .ncb-table td { padding: 8px 6px; }
}

/* ---------- 打印 ---------- */
@media print {
  .ncb-page { background: #fff; padding: 0; }
  .ncb-crumb, .ncb-hero-meta, .ncb-actions, .ncb-faq, .ncb-art,
  .ncb-disclaimer, .ncb-ai { display: none !important; }
  .ncb-hero, .ncb-card, .ncb-summary, .ncb-block { box-shadow: none; border-color: #bbb; }
  .ncb-grid { grid-template-columns: 1fr 1fr; }
  .ncb-summary { position: static; }
  .ncb-block { break-inside: avoid; }
}
