/* 居家适老化改造优先级 · 独立主题（木质橙 #C2410C + 苔绿 #3F6212 · 左侧竖向步骤轨 + 户型图） */
:root {
  --raf-a: #c2410c;
  --raf-a2: #ea580c;
  --raf-a3: #9a3412;
  --raf-b: #3f6212;
  --raf-b2: #4d7c0f;
  --raf-bsoft: #ecfccb;
  --raf-soft: #ffedd5;
  --raf-bg: #fdf8f2;
  --raf-card: #ffffff;
  --raf-card2: #fff7ee;
  --raf-txt: #2c1a10;
  --raf-txt2: #6b4a34;
  --raf-txt3: #a4866d;
  --raf-line: #eeddc9;
  --raf-line2: #f7ecdd;
  --raf-ok: #4d7c0f;
  --raf-ok-soft: #ecfccb;
  --raf-warnb: #b45309;
  --raf-bad: #dc2626;
  --raf-bad-soft: #feecec;
  --raf-shadow: 0 1px 2px rgba(194, 65, 12, .07), 0 14px 32px -18px rgba(194, 65, 12, .38);
  --raf-r: 12px;
  --raf-r2: 9px;
}
[data-theme='dark'] .raf {
  --raf-a: #f97316;
  --raf-a2: #fb923c;
  --raf-a3: #fdba74;
  --raf-b: #84cc16;
  --raf-b2: #a3e635;
  --raf-bsoft: #1c2a0a;
  --raf-soft: #31190a;
  --raf-bg: #170e06;
  --raf-card: #22150b;
  --raf-card2: #2b1b0f;
  --raf-txt: #fbeadd;
  --raf-txt2: #d5b795;
  --raf-txt3: #a4866d;
  --raf-line: #47301c;
  --raf-line2: #3a2716;
  --raf-ok: #a3e635;
  --raf-ok-soft: #1c2a0a;
  --raf-warnb: #fbbf24;
  --raf-bad: #f87171;
  --raf-bad-soft: #3d1a19;
  --raf-shadow: 0 1px 2px rgba(0, 0, 0, .45), 0 14px 32px -18px rgba(0, 0, 0, .7);
}

.raf { background: var(--raf-bg); color: var(--raf-txt); padding: 28px 0 46px; }
.raf-inner { width: min(1140px, calc(100% - 44px)); max-width: none; margin: 0 auto; }
.raf-frame { max-width: 960px; margin: 0 auto; }

/* ---------- Hero：左侧竖向步骤轨 + 文案 + 户型图 ---------- */
.raf-hero {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 220px;
  gap: 20px;
  align-items: stretch;
  padding: 26px 26px 24px;
  border: 1px solid var(--raf-line);
  border-radius: var(--raf-r);
  background:
    radial-gradient(520px 240px at 96% 2%, rgba(63, 98, 18, .14), transparent 66%),
    radial-gradient(460px 240px at 0% 100%, rgba(234, 88, 12, .12), transparent 70%),
    linear-gradient(150deg, var(--raf-card), var(--raf-card2));
  box-shadow: var(--raf-shadow);
  position: relative;
  overflow: hidden;
}
.raf-hero::after {
  content: ''; position: absolute; inset: auto 0 0 0; height: 3px;
  background: linear-gradient(90deg, var(--raf-a), var(--raf-b2), transparent);
  opacity: .75;
}
.raf-rail {
  display: flex; flex-direction: column; gap: 0;
  border-right: 1px dashed var(--raf-line);
  padding-right: 16px;
}
.raf-rail-step {
  display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 9px;
  align-items: center; position: relative;
  padding: 9px 0; font-size: 11.5px; font-weight: 700; color: var(--raf-txt3);
}
.raf-rail-step::before {
  content: ''; position: absolute; left: 12px; top: 34px; bottom: -9px;
  width: 2px; background: var(--raf-line);
}
.raf-rail-step:last-child::before { display: none; }
.raf-rail-step i {
  width: 26px; height: 26px; border-radius: 8px;
  display: grid; place-items: center; font-style: normal;
  font-size: 12px; font-weight: 800;
  color: var(--raf-txt3); background: var(--raf-line2);
  border: 1px solid var(--raf-line);
}
.raf-rail-step.done { color: var(--raf-txt); }
.raf-rail-step.done i { color: #fff; background: var(--raf-b); border-color: var(--raf-b); }
[data-theme='dark'] .raf .raf-rail-step.done i { color: #1c2a0a; }
.raf-rail-step span { line-height: 1.4; }

.raf-kicker {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 700; letter-spacing: .3px;
  color: var(--raf-a3); background: var(--raf-soft);
  border: 1px solid color-mix(in srgb, var(--raf-a) 26%, transparent);
  padding: 5px 11px; border-radius: 8px;
}
.raf-hero h1 {
  margin: 12px 0 0; font-size: clamp(25px, 3vw, 36px);
  line-height: 1.28; letter-spacing: -.5px; font-weight: 800;
}
.raf-hero h1 em {
  font-style: normal; display: inline-block; margin-top: 3px;
  color: var(--raf-a);
  background: linear-gradient(180deg, transparent 62%, rgba(63, 98, 18, .2) 62%);
  padding: 0 2px;
}
.raf-sub {
  margin: 12px 0 0; font-size: 14px; line-height: 1.85;
  color: var(--raf-txt2); max-width: 58ch;
}
.raf-sub b { color: var(--raf-txt); font-weight: 700; }
.raf-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 15px; }
.raf-tag {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12.5px; color: var(--raf-txt2);
  background: var(--raf-card2); border: 1px solid var(--raf-line);
  padding: 5px 10px; border-radius: 7px;
}
.raf-tag i { color: var(--raf-b2); font-style: normal; font-weight: 800; }
.raf-hero-cta { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.raf-cta {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, var(--raf-a), var(--raf-a3));
  color: #fff; font-size: 14px; font-weight: 700;
  padding: 11px 22px; border-radius: 8px; text-decoration: none;
  box-shadow: 0 10px 22px -10px color-mix(in srgb, var(--raf-a) 75%, transparent);
  transition: transform .14s, box-shadow .2s;
}
.raf-cta:hover { transform: translateY(-1px); }
[data-theme='dark'] .raf .raf-cta { color: #2c1002; }
.raf-cta-note { font-size: 12px; color: var(--raf-txt3); }

.raf-hero-art { position: relative; display: grid; place-items: center; }
.raf-hero-art svg { width: 100%; max-width: 220px; height: auto; }
.raf-hero-art text { font-family: inherit; }
.raf-art-chip {
  position: absolute; bottom: -4px; left: 50%; transform: translateX(-50%);
  font-size: 11px; font-weight: 700; white-space: nowrap;
  padding: 4px 10px; border-radius: 999px;
  background: var(--raf-card); border: 1px solid var(--raf-line);
  color: var(--raf-bad); box-shadow: var(--raf-shadow);
}

/* ---------- 免责条 ---------- */
.raf-alert {
  display: flex; align-items: center; gap: 10px;
  margin-top: 16px; padding: 12px 16px;
  background: var(--raf-soft);
  border: 1px solid color-mix(in srgb, var(--raf-a) 30%, transparent);
  border-left: 4px solid var(--raf-a);
  border-radius: 9px;
  font-size: 13px; line-height: 1.7; color: var(--raf-txt);
}
.raf-alert-i { color: var(--raf-warnb); font-size: 16px; flex: none; }
.raf-alert strong { font-weight: 700; }

/* ---------- 卡片 ---------- */
.raf-card {
  margin-top: 16px; padding: 20px 22px 22px;
  background: var(--raf-card); border: 1px solid var(--raf-line);
  border-radius: var(--raf-r); box-shadow: var(--raf-shadow);
}
.raf-card-h {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; margin-bottom: 16px; flex-wrap: wrap;
}
.raf-card-h h2 {
  margin: 0; font-size: 16.5px; font-weight: 800; letter-spacing: -.2px;
  display: flex; align-items: center; gap: 9px;
}
.raf-no {
  font-size: 11px; font-weight: 800; letter-spacing: .4px; color: #fff;
  background: var(--raf-b); padding: 3px 7px; border-radius: 5px;
}
[data-theme='dark'] .raf .raf-no { color: #1c2a0a; }
.raf-card-h small { font-size: 12px; color: var(--raf-txt3); }
.raf-card-h small b { color: var(--raf-b2); font-weight: 800; }
.raf-req { color: var(--raf-bad); font-size: 13px; font-weight: 800; margin-left: 2px; }

.raf-grid2 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.raf-span2 { grid-column: 1 / -1; }
.raf-field { margin-bottom: 4px; }
.raf-label { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 7px; }
.raf-label label { font-size: 13px; font-weight: 600; }
.raf-label label b { color: var(--raf-bad); }
.raf-hint { font-size: 11px; color: var(--raf-txt3); }
.raf-err { display: none; margin-top: 6px; font-size: 12px; color: var(--raf-bad); line-height: 1.5; }
.raf-err.on { display: block; }

.raf-control { border: 1px solid var(--raf-line); border-radius: var(--raf-r2); background: var(--raf-card2); }
.raf-control select {
  width: 100%; border: 0; background: transparent; color: var(--raf-txt);
  font-size: 13px; padding: 10px 30px 10px 11px; outline: none; cursor: pointer;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--raf-txt3) 50%),
    linear-gradient(135deg, var(--raf-txt3) 50%, transparent 50%);
  background-position: calc(100% - 15px) 50%, calc(100% - 10px) 50%;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}

.raf-tip {
  margin: 14px 0 0; font-size: 12.5px; line-height: 1.8; color: var(--raf-txt3);
  background: var(--raf-line2); border-left: 3px solid var(--raf-b2);
  padding: 9px 12px; border-radius: 0 8px 8px 0;
}
.raf-tip b { color: var(--raf-txt2); }

/* ---------- 按钮 ---------- */
.raf-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 16px; }
.raf-actions.tight { margin-top: 12px; }
.raf-btn {
  border: 1px solid var(--raf-line); background: var(--raf-card); color: var(--raf-txt);
  font-size: 13px; font-weight: 600; padding: 10px 16px; border-radius: 8px;
  cursor: pointer; transition: transform .12s, box-shadow .18s, background .18s;
}
.raf-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 18px -12px rgba(140, 60, 10, .7); }
.raf-btn.primary {
  background: linear-gradient(135deg, var(--raf-a), var(--raf-a3));
  border-color: transparent; color: #fff;
}
[data-theme='dark'] .raf .raf-btn.primary { color: #2c1002; }
.raf-btn.ghost { background: transparent; color: var(--raf-txt2); }
.raf-msg { margin-top: 10px; font-size: 12.5px; line-height: 1.6; color: var(--raf-txt3); }

/* ---------- 结果 ---------- */
#rafResultCard { scroll-margin-top: 78px; }
.raf-badge {
  font-size: 11.5px; font-weight: 800; padding: 4px 11px; border-radius: 999px;
  background: var(--raf-line2); color: var(--raf-txt3); white-space: nowrap;
}
.raf-badge.on { background: var(--raf-bsoft); color: var(--raf-b); }
.raf-badge.wait { background: var(--raf-line2); color: var(--raf-txt3); }

.raf-summary {
  padding: 13px 15px; border-radius: 10px;
  background: var(--raf-card2); border: 1px solid var(--raf-line);
  font-size: 13px; line-height: 1.85; color: var(--raf-txt2);
}
.raf-summary b { color: var(--raf-txt); }

.raf-floormap { margin-top: 16px; border: 1px solid var(--raf-line); border-radius: 12px; background: var(--raf-card2); padding: 12px; }
.raf-floormap svg { width: 100%; max-width: 460px; height: auto; display: block; margin: 0 auto; }
.raf-floormap text { font-family: inherit; }
.raf-hot { opacity: 0; transition: opacity .4s; }
.raf-hot.on { opacity: 1; }
.raf-hot.on circle { animation: rafPulse 2.2s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
@keyframes rafPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.35); } }

.raf-matrix { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.raf-pcol { border: 1px solid var(--raf-line); border-radius: 11px; background: var(--raf-card2); overflow: hidden; }
.raf-pcol h3 {
  margin: 0; padding: 11px 13px; font-size: 13px; font-weight: 800;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  color: #fff; background: var(--raf-a);
}
[data-theme='dark'] .raf .raf-pcol h3 { color: #2c1002; }
.raf-pcol h3 span { font-size: 10.5px; font-weight: 700; opacity: .85; }
.raf-pcol.p1 h3 { background: var(--raf-warnb); }
[data-theme='dark'] .raf .raf-pcol.p1 h3 { color: #2b1802; }
.raf-pcol.p2 h3 { background: var(--raf-b); }
[data-theme='dark'] .raf .raf-pcol.p2 h3 { color: #1c2a0a; }
.raf-pitems { padding: 11px; display: flex; flex-direction: column; gap: 8px; min-height: 60px; }
.raf-pitem {
  border: 1px solid var(--raf-line); border-radius: 9px;
  background: var(--raf-card); padding: 10px 11px;
}
.raf-pitem b { display: block; font-size: 12.5px; font-weight: 800; color: var(--raf-txt); }
.raf-pitem .raf-price { display: inline-block; margin-top: 4px; font-size: 11.5px; font-weight: 800; color: var(--raf-a); }
.raf-pitem p { margin: 5px 0 0; font-size: 11.5px; line-height: 1.65; color: var(--raf-txt3); }
.raf-pitem .raf-promote {
  display: inline-block; margin-left: 6px; font-size: 9.5px; font-weight: 800;
  color: #fff; background: var(--raf-b); border-radius: 999px; padding: 1px 6px;
}
[data-theme='dark'] .raf .raf-pitem .raf-promote { color: #1c2a0a; }
.raf-pempty { margin: 0; font-size: 12px; color: var(--raf-txt3); padding: 4px 2px 8px; }

/* ---------- 预算 ---------- */
.raf-budget { display: flex; flex-direction: column; gap: 10px; }
.raf-bud-row {
  display: grid; grid-template-columns: 118px minmax(0, 1fr) 110px; gap: 12px;
  align-items: center; border: 1px solid var(--raf-line); border-radius: 10px;
  padding: 11px 13px; background: var(--raf-card2);
}
.raf-bud-row .raf-bud-lb { font-size: 12.5px; font-weight: 800; color: var(--raf-txt2); }
.raf-bud-track { position: relative; height: 12px; border-radius: 999px; background: var(--raf-line2); overflow: hidden; }
.raf-bud-fill {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0;
  border-radius: 999px; background: linear-gradient(90deg, var(--raf-a2), var(--raf-a));
  transition: width .45s cubic-bezier(.22, .8, .3, 1);
}
.raf-bud-fill.g1 { background: linear-gradient(90deg, var(--raf-b2), var(--raf-b)); }
.raf-bud-row b { font-size: 12.5px; color: var(--raf-txt); text-align: right; white-space: nowrap; }
.raf-bud-conc {
  padding: 13px 15px; border-radius: 10px; font-size: 13px; line-height: 1.85;
  border: 1px solid var(--raf-line); background: var(--raf-card2); color: var(--raf-txt2);
}
.raf-bud-conc.ok { border-color: var(--raf-b); background: var(--raf-bsoft); color: var(--raf-txt); }
.raf-bud-conc.gap { border-color: color-mix(in srgb, var(--raf-a) 40%, transparent); background: var(--raf-soft); color: var(--raf-txt); }
.raf-bud-conc b { color: var(--raf-a3); }
.raf-bud-conc.ok b { color: var(--raf-b); }

/* ---------- 施工 / 验收 ---------- */
.raf-sub-h { margin: 18px 0 10px; font-size: 13.5px; font-weight: 800; color: var(--raf-txt); display: flex; align-items: center; gap: 8px; }
.raf-sub-h::before { content: ''; width: 4px; height: 14px; border-radius: 2px; background: var(--raf-a); }
.raf-craft { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.raf-craft li {
  padding: 10px 12px; font-size: 12.5px; line-height: 1.8; color: var(--raf-txt2);
  background: var(--raf-card2); border: 1px solid var(--raf-line); border-radius: 9px;
}
.raf-craft li b { color: var(--raf-txt); }
.raf-checklist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.raf-check {
  display: flex; align-items: flex-start; gap: 9px; cursor: pointer;
  border: 1px solid var(--raf-line); border-radius: 9px;
  padding: 9px 11px; font-size: 12.5px; line-height: 1.6;
  color: var(--raf-txt2); background: var(--raf-card2);
  transition: border-color .18s, background .18s;
}
.raf-check input {
  appearance: none; width: 16px; height: 16px; flex: none; margin-top: 1px;
  border: 1.5px solid var(--raf-line); border-radius: 4px;
  position: relative; cursor: pointer; background: var(--raf-card);
}
.raf-check input:checked { background: var(--raf-b); border-color: var(--raf-b); }
.raf-check input:checked::after {
  content: '✓'; position: absolute; inset: 0; display: grid; place-items: center;
  color: #fff; font-size: 10px; font-weight: 900;
}
[data-theme='dark'] .raf .raf-check input:checked::after { color: #1c2a0a; }
.raf-check:has(input:checked) { border-color: color-mix(in srgb, var(--raf-b) 45%, transparent); background: var(--raf-bsoft); }

/* ---------- 表格 ---------- */
.raf-table-wrap { overflow-x: auto; border: 1px solid var(--raf-line); border-radius: 10px; }
.raf-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 560px; }
.raf-table th, .raf-table td { padding: 10px 13px; text-align: left; border-bottom: 1px solid var(--raf-line2); }
.raf-table th { background: var(--raf-line2); font-size: 12px; font-weight: 700; color: var(--raf-txt2); }
.raf-table td { color: var(--raf-txt2); }
.raf-table td b { color: var(--raf-txt); }
.raf-table td:last-child { font-size: 12px; color: var(--raf-txt3); }
.raf-table tr:last-child td { border-bottom: 0; }

.raf-history { display: flex; flex-direction: column; gap: 8px; }
.raf-hist-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border: 1px solid var(--raf-line); border-radius: 9px;
  padding: 10px 12px; background: var(--raf-card2); font-size: 12.5px;
  color: var(--raf-txt2);
}
.raf-hist-item button {
  border: 0; border-radius: 7px; padding: 5px 10px; cursor: pointer;
  font-size: 12px; font-weight: 700; color: var(--raf-b); background: var(--raf-bsoft);
}
.raf-empty { margin: 0; font-size: 12.5px; color: var(--raf-txt3); }

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .raf-hero { grid-template-columns: minmax(0, 1fr); }
  .raf-rail { display: none; }
  .raf-hero-art { display: none; }
}
@media (max-width: 860px) {
  .raf-grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .raf-matrix { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .raf-inner { width: calc(100% - 28px); }
  .raf-hero { padding: 20px 16px 18px; }
  .raf-card { padding: 16px 16px 18px; }
  .raf-grid2 { grid-template-columns: 1fr; }
  .raf-checklist { grid-template-columns: 1fr; }
  .raf-actions .raf-btn { flex: 1 1 44%; }
  .raf-bud-row { grid-template-columns: 1fr; gap: 7px; }
  .raf-bud-row b { text-align: left; }
}

/* ---------- 打印：隐藏导航与底部，只留结果 ---------- */
@media print {
  .raf { padding: 0; background: #fff; }
  .nav-header, .footer, .tsk-crumb-bar, .tbk-zone,
  .raf-actions, .raf-msg, .raf-hero, .raf-checklist input,
  .raf-history, .raf-checklist, .raf-craft { display: none !important; }
  .raf-card { box-shadow: none; border-color: #ddd; break-inside: avoid; margin-top: 10px; }
  .raf-alert { break-inside: avoid; }
}

/* ---------- 面包屑对齐 ---------- */
.tsk-crumb-bar-in{width:min(1140px,calc(100% - 44px))!important;max-width:none!important;margin:0 auto!important;padding:11px 0!important}
@media (max-width:700px){.tsk-crumb-bar-in{width:calc(100% - 28px)!important;padding:9px 0!important}}
