/* 脚气（足癣）分型与疗程计算器 · 草绿 bento 卡片流 · 前缀 af- */
:root {
  --af-a: #3f6212;
  --af-a2: #65a30d;
  --af-a3: #a3e635;
  --af-soft: #ecfccb;
  --af-bg: #f4f8ec;
  --af-card: #ffffff;
  --af-card2: #f8fbf2;
  --af-txt: #1a2e05;
  --af-txt2: #43552b;
  --af-txt3: #7b8b63;
  --af-line: #d8e4c3;
  --af-line2: #edf4df;
  --af-ok: #15803d;
  --af-warn: #b45309;
  --af-bad: #b91c1c;
  --af-shadow: 0 1px 2px rgba(63, 98, 18, .05), 0 12px 32px -18px rgba(63, 98, 18, .3);
  --af-r: 16px;
  --af-r2: 11px;
}

[data-theme='dark'] .af {
  --af-a: #a3e635;
  --af-a2: #84cc16;
  --af-a3: #bef264;
  --af-soft: #26330f;
  --af-bg: #101509;
  --af-card: #1a2112;
  --af-card2: #151b0e;
  --af-txt: #f1f7e6;
  --af-txt2: #c2cfae;
  --af-txt3: #8c9b74;
  --af-line: #303c22;
  --af-line2: #232c19;
  --af-ok: #4ade80;
  --af-warn: #fbbf24;
  --af-bad: #f87171;
  --af-shadow: 0 1px 2px rgba(0, 0, 0, .45), 0 12px 32px -18px rgba(0, 0, 0, .8);
}

.af {
  background: var(--af-bg);
  color: var(--af-txt);
  padding: 26px 0 46px;
  font-size: 14.5px;
  line-height: 1.7;
}
.af-inner {
  width: min(1140px, calc(100% - 44px));
  max-width: none;
  margin: 0 auto;
}

/* ---------- 免责条 ---------- */
.af-disclaimer {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 16px;
  padding: 11px 16px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--af-a) 30%, transparent);
  background: linear-gradient(90deg, color-mix(in srgb, var(--af-a) 9%, var(--af-card)), var(--af-card));
  font-size: 13px;
  line-height: 1.6;
}
.af-disclaimer-ico {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--af-a);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}
[data-theme='dark'] .af .af-disclaimer-ico { color: #101509; }
.af-disclaimer p { margin: 0; }
.af-disclaimer b { color: var(--af-a); }

/* ---------- Hero ---------- */
.af-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
  gap: 22px;
  align-items: center;
  padding: 28px 30px 26px;
  border: 1px solid var(--af-line);
  border-radius: 22px;
  background:
    radial-gradient(520px 240px at 90% 10%, rgba(163, 230, 53, .35), transparent 66%),
    linear-gradient(120deg, var(--af-soft) 0%, var(--af-card) 72%);
  box-shadow: var(--af-shadow);
  overflow: hidden;
  position: relative;
}
.af-hero::after {
  content: '';
  position: absolute;
  left: -40px;
  top: -40px;
  width: 160px;
  height: 160px;
  border: 22px solid rgba(101, 163, 13, .1);
  border-radius: 40px;
  transform: rotate(18deg);
}
.af-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--af-card);
  border: 1px solid color-mix(in srgb, var(--af-a) 22%, transparent);
  color: var(--af-a);
  font-size: 12.5px;
  font-weight: 700;
}
.af-hero h1 {
  margin: 13px 0 0;
  font-size: clamp(25px, 3.3vw, 38px);
  line-height: 1.26;
  letter-spacing: -.6px;
  font-weight: 800;
  color: var(--af-txt);
}
.af-hero h1 em {
  display: inline-block;
  margin-top: 4px;
  font-style: normal;
  color: var(--af-a);
}
.af-sub {
  margin: 12px 0 0;
  max-width: 66ch;
  color: var(--af-txt2);
  font-size: 14.5px;
  line-height: 1.85;
}
.af-sub b { color: var(--af-txt); }
.af-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.af-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid var(--af-line);
  background: var(--af-card);
  color: var(--af-txt2);
  font-size: 12.5px;
}
.af-tag i { font-style: normal; color: var(--af-a); font-weight: 800; }

/* 纯 CSS 马赛克插画 */
.af-hero-art {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 9px;
  height: 216px;
}
.af-art-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border-radius: 16px;
  border: 1px solid rgba(63, 98, 18, .14);
  background: rgba(255, 255, 255, .72);
  box-shadow: 0 8px 22px -16px rgba(63, 98, 18, .5);
  overflow: hidden;
}
[data-theme='dark'] .af .af-art-tile { background: rgba(26, 33, 18, .8); border-color: rgba(163, 230, 53, .16); }
.af-art-tile.t1 {
  background: linear-gradient(140deg, #3f6212, #65a30d);
  border-color: transparent;
  animation: afTile 5s ease-in-out infinite;
}
.af-art-tile.t2 b, .af-art-tile.t3 b { color: var(--af-a); font-size: 26px; font-weight: 800; letter-spacing: -1px; }
.af-art-tile.t2 small, .af-art-tile.t3 small, .af-art-tile.t4 small { color: var(--af-txt3); font-size: 10.5px; }
.af-art-tile.t2 { animation: afTile 5s ease-in-out .5s infinite; }
.af-art-tile.t3 { animation: afTile 5s ease-in-out 1s infinite; }
.af-art-tile.t4 {
  flex-direction: row;
  gap: 7px;
  background: linear-gradient(140deg, #ecfccb, #d9f99d);
}
[data-theme='dark'] .af .af-art-tile.t4 { background: linear-gradient(140deg, #2a3a13, #364a16); }
@keyframes afTile {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
.af-art-foot {
  position: relative;
  width: 40px;
  height: 62px;
  border-radius: 18px 18px 15px 15px;
  background: #ecfccb;
  transform: rotate(-8deg);
  box-shadow: inset -5px 0 8px rgba(63, 98, 18, .18);
}
.af-art-foot::before,
.af-art-foot::after {
  content: '';
  position: absolute;
  top: -8px;
  width: 11px;
  height: 15px;
  border-radius: 8px 8px 4px 4px;
  background: #ecfccb;
}
.af-art-foot::before { left: 3px; }
.af-art-foot::after { right: 3px; height: 12px; top: -6px; }
.af-art-shield {
  width: 30px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px 10px 14px 14px;
  background: var(--af-a);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  clip-path: polygon(50% 0, 100% 14%, 100% 62%, 50% 100%, 0 62%, 0 14%);
}
[data-theme='dark'] .af .af-art-shield { color: #101509; }

/* ---------- Bento ---------- */
.af-bento {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
  align-items: stretch;
}
.af-card {
  padding: 17px 17px 18px;
  border: 1px solid var(--af-line);
  border-radius: var(--af-r);
  background: var(--af-card);
  box-shadow: var(--af-shadow);
  min-width: 0;
}
.af-c-type { grid-column: span 4; }
.af-c-site { grid-column: span 5; }
.af-c-sev { grid-column: span 3; }
.af-c-dur { grid-column: span 4; }
.af-c-cond { grid-column: span 4; }
.af-c-result { grid-column: span 4; grid-row: span 2; }
.af-c-heat { grid-column: span 8; }
.af-c-course { grid-column: span 12; }

.af-card-h {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 9px;
  margin-bottom: 12px;
}
.af-card-h h2 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -.2px;
}
.af-no {
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--af-a);
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .4px;
}
[data-theme='dark'] .af .af-no { color: #101509; }
.af-card-h small { color: var(--af-txt3); font-size: 11.5px; text-align: right; }

.af-field { margin-bottom: 12px; }
.af-field.mt { margin-top: 13px; }
.af-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
}
.af-label label { font-size: 13px; font-weight: 600; }
.af-label label b { color: var(--af-bad); }
.af-hint { color: var(--af-txt3); font-size: 11px; }
.af-control {
  border: 1px solid var(--af-line);
  border-radius: var(--af-r2);
  background: var(--af-card2);
}
.af-control select {
  width: 100%;
  padding: 9px 10px;
  border: 0;
  background: transparent;
  color: var(--af-txt);
  font-size: 13px;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--af-txt3) 50%), linear-gradient(135deg, var(--af-txt3) 50%, transparent 50%);
  background-position: calc(100% - 15px) 50%, calc(100% - 10px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.af-numbox {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--af-line);
  border-radius: var(--af-r2);
  background: var(--af-card2);
  overflow: hidden;
}
.af-numbox input {
  flex: 1;
  min-width: 0;
  padding: 8px 9px;
  border: 0;
  background: transparent;
  color: var(--af-txt);
  font-size: 14px;
  font-weight: 700;
  outline: none;
}
.af-numbox span { display: flex; align-items: center; padding: 0 9px; background: var(--af-line2); color: var(--af-txt3); font-size: 11px; }
.af-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.af-err { display: none; margin-top: 5px; color: var(--af-bad); font-size: 11.5px; }
.af-err.on { display: block; }
.af-field.bad .af-numbox,
.af-field.bad .af-control { border-color: var(--af-bad); box-shadow: 0 0 0 3px color-mix(in srgb, var(--af-bad) 13%, transparent); }

.af-range-single { display: flex; align-items: center; gap: 12px; margin: 3px 0 2px; color: var(--af-txt3); font-size: 12px; }
.af-range-single b { color: var(--af-a); font-size: 13.5px; }
input[type='range'] {
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  width: 100%;
  border-radius: 999px;
  background: var(--af-line);
  outline: none;
}
input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--af-a);
  border: 3px solid var(--af-card);
  box-shadow: 0 0 0 1px var(--af-a);
  cursor: pointer;
}
input[type='range']::-moz-range-thumb { width: 16px; height: 16px; border: none; border-radius: 50%; background: var(--af-a); cursor: pointer; }

.af-seg { display: flex; gap: 5px; padding: 4px; border-radius: var(--af-r2); background: var(--af-line2); }
.af-segbtn {
  flex: 1;
  padding: 8px 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--af-txt2);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.af-segbtn.on { background: var(--af-card); color: var(--af-a); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.af-segbtn:hover { color: var(--af-a); }

.af-chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.af-check {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 9px;
  border: 1px solid var(--af-line);
  border-radius: 9px;
  background: var(--af-card2);
  color: var(--af-txt2);
  font-size: 12px;
  cursor: pointer;
  transition: border-color .18s, background .18s, color .18s;
}
.af-check input {
  flex: none;
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--af-line);
  border-radius: 5px;
  appearance: none;
  position: relative;
  cursor: pointer;
}
.af-check input:checked { background: var(--af-a); border-color: var(--af-a); }
.af-check input:checked::after {
  content: '✓';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}
[data-theme='dark'] .af .af-check input:checked::after { color: #101509; }
.af-check:has(input:checked) { border-color: var(--af-a); background: var(--af-soft); color: var(--af-txt); }

.af-presets { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 13px; }
.af-presets span { width: 100%; color: var(--af-txt3); font-size: 11.5px; }
.af-presets button {
  padding: 5px 9px;
  border: 1px solid var(--af-line);
  border-radius: 999px;
  background: var(--af-card2);
  color: var(--af-txt2);
  font-size: 11.5px;
  cursor: pointer;
}
.af-presets button:hover { border-color: var(--af-a2); color: var(--af-a); }

.af-tip {
  margin: 10px 0 0;
  padding: 8px 10px;
  border-left: 3px solid var(--af-a2);
  border-radius: 0 8px 8px 0;
  background: var(--af-line2);
  color: var(--af-txt3);
  font-size: 11.8px;
  line-height: 1.7;
}

/* ---------- 结果卡 ---------- */
.af-result {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--af-line);
  border-radius: var(--af-r);
  background: var(--af-card);
  box-shadow: var(--af-shadow);
  overflow: hidden;
}
.af-result-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 15px;
  border-bottom: 1px solid var(--af-line2);
}
.af-result-h h2 { margin: 0; font-size: 14px; font-weight: 800; }
.af-badge {
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--af-line2);
  color: var(--af-txt3);
  font-size: 11px;
  font-weight: 700;
}
.af-badge.ok { background: color-mix(in srgb, var(--af-ok) 15%, transparent); color: var(--af-ok); }
.af-badge.warn { background: color-mix(in srgb, var(--af-warn) 16%, transparent); color: var(--af-warn); }
.af-badge.bad { background: color-mix(in srgb, var(--af-bad) 15%, transparent); color: var(--af-bad); }

.af-verdict { padding: 13px 15px 10px; text-align: center; background: linear-gradient(180deg, var(--af-soft), transparent 92%); }
.af-verdict-label { display: block; color: var(--af-txt3); font-size: 11.5px; }
.af-verdict strong { display: inline-block; margin-top: 1px; color: var(--af-a); font-size: 34px; line-height: 1.1; font-weight: 800; letter-spacing: -1.2px; }
.af-verdict-unit { margin-left: 3px; color: var(--af-txt2); font-size: 12px; }
.af-verdict p { margin: 5px 0 0; color: var(--af-txt2); font-size: 12px; line-height: 1.6; }

.af-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--af-line2); border-top: 1px solid var(--af-line2); border-bottom: 1px solid var(--af-line2); }
.af-kpi { padding: 10px 13px; background: var(--af-card); }
.af-kpi small { display: block; color: var(--af-txt3); font-size: 10.5px; }
.af-kpi b { display: inline-block; margin-top: 1px; font-size: 16px; font-weight: 800; color: var(--af-txt); letter-spacing: -.3px; }
.af-kpi em { margin-left: 3px; color: var(--af-txt3); font-style: normal; font-size: 10px; }

.af-advice { padding: 12px 15px 12px; }
.af-advice h3 { margin: 0 0 6px; font-size: 12.5px; font-weight: 700; }
.af-advice ul { margin: 0; padding-left: 16px; }
.af-advice li { margin-bottom: 4px; color: var(--af-txt2); font-size: 12px; line-height: 1.72; }
.af-warn {
  margin: auto 13px 13px;
  padding: 9px 10px;
  border: 1px solid color-mix(in srgb, var(--af-warn) 35%, transparent);
  border-radius: 9px;
  background: color-mix(in srgb, var(--af-warn) 10%, transparent);
  color: var(--af-txt2);
  font-size: 11.8px;
  line-height: 1.66;
}
.af-warn strong { margin-right: 5px; color: var(--af-warn); }

/* ---------- 热力格 ---------- */
.af-heat {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}
.af-heat-cell {
  position: relative;
  min-height: 58px;
  padding: 8px 9px;
  border: 1px solid var(--af-line);
  border-radius: 10px;
  background: var(--af-card2);
  color: var(--af-txt3);
  font-size: 11px;
  overflow: hidden;
  transition: background .25s, border-color .25s, color .25s;
}
.af-heat-cell b { display: block; color: var(--af-txt2); font-size: 11.5px; font-weight: 700; }
.af-heat-cell small { display: block; margin-top: 2px; font-size: 10px; opacity: .85; }
.af-heat-cell::after {
  content: '';
  position: absolute;
  right: -18px;
  bottom: -18px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--af-a2);
  opacity: 0;
  transition: opacity .25s;
}
.af-heat-cell.on { border-color: color-mix(in srgb, var(--af-a) 40%, var(--af-line)); color: var(--af-txt); }
.af-heat-cell.on::after { opacity: .18; }
.af-heat-cell.on.lv2 { background: color-mix(in srgb, var(--af-a2) 16%, var(--af-card)); }
.af-heat-cell.on.lv2::after { opacity: .26; }
.af-heat-cell.on.lv3 { background: color-mix(in srgb, var(--af-a) 24%, var(--af-card)); }
.af-heat-cell.on.lv3::after { opacity: .38; }
.af-heat-note { margin: 10px 0 0; color: var(--af-txt3); font-size: 11.5px; }

/* ---------- 条形图 ---------- */
.af-bars { display: grid; grid-template-columns: 1.1fr .9fr; gap: 20px; }
.af-bar-block { min-width: 0; }
.af-bar-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 9px; font-size: 12px; color: var(--af-txt2); }
.af-bar-head b { color: var(--af-txt); font-size: 12.5px; }
.af-track { position: relative; height: 16px; border-radius: 999px; background: var(--af-line2); }
.af-track.risk { height: 12px; margin-top: 2px; }
.af-fill { display: block; height: 100%; width: 0; border-radius: 999px; transition: width .45s ease; }
.af-fill.course { background: linear-gradient(90deg, var(--af-a3), var(--af-a2), var(--af-a)); }
.af-fill.risk { background: linear-gradient(90deg, #65a30d, #ca8a04 55%, #b91c1c); }
.af-marker {
  position: absolute;
  top: -4px;
  left: 0;
  width: 2px;
  height: 24px;
  background: var(--af-a);
  transform: translateX(-50%);
  transition: left .45s ease;
}
.af-marker::after {
  content: '';
  position: absolute;
  left: 50%;
  top: -7px;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: var(--af-a);
}
.af-scale { display: flex; justify-content: space-between; margin-top: 8px; color: var(--af-txt3); font-size: 9.5px; }
.af-bar-note { margin: 9px 0 0; color: var(--af-txt3); font-size: 11.3px; line-height: 1.6; }

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

/* ---------- 方案 / 表格 / 步骤 ---------- */
.af-card + .af-card { margin-top: 16px; }
.af-bento .af-card { margin-top: 0; }
.af-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.af-plan {
  position: relative;
  padding: 15px 15px 14px;
  border: 1.5px solid var(--af-line);
  border-radius: 13px;
  background: var(--af-card2);
  transition: border-color .2s, box-shadow .2s;
}
.af-plan.rec { border-color: var(--af-a); background: var(--af-card); box-shadow: 0 0 0 3px color-mix(in srgb, var(--af-a) 13%, transparent); }
.af-plan-tag {
  position: absolute;
  right: 11px;
  top: -10px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--af-a);
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
}
[data-theme='dark'] .af .af-plan-tag { color: #101509; }
.af-plan h3 { margin: 0; font-size: 14.5px; font-weight: 800; }
.af-plan h3 span { display: block; margin-top: 2px; color: var(--af-txt3); font-size: 11px; font-weight: 600; }
.af-plan-p { margin: 7px 0 9px; color: var(--af-txt3); font-size: 11.5px; }
.af-plan dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 9px; margin: 0; font-size: 12px; }
.af-plan dt { color: var(--af-txt3); }
.af-plan dd { margin: 0; text-align: right; font-weight: 600; }
.af-plan-meta { margin-top: 8px; color: var(--af-txt3); font-size: 11.2px; line-height: 1.64; }
.af-plan-meta strong { color: var(--af-ok); }
.af-plan-pick {
  width: 100%;
  margin-top: 10px;
  padding: 8px;
  border: 0;
  border-radius: 9px;
  background: var(--af-line2);
  color: var(--af-txt2);
  font-size: 12.3px;
  font-weight: 700;
  cursor: pointer;
}
.af-plan.rec .af-plan-pick { background: var(--af-a); color: #fff; }
[data-theme='dark'] .af .af-plan.rec .af-plan-pick { color: #101509; }

.af-table-wrap { overflow-x: auto; border: 1px solid var(--af-line); border-radius: 12px; }
.af-table { width: 100%; min-width: 540px; border-collapse: collapse; font-size: 12.8px; }
.af-table th, .af-table td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--af-line2); }
.af-table th { background: var(--af-line2); color: var(--af-txt2); font-size: 11.8px; font-weight: 700; }
.af-table td:nth-child(2) { font-weight: 600; }
.af-table td:last-child { color: var(--af-txt3); font-size: 11.8px; }
.af-table tr:last-child td { border-bottom: 0; }

.af-steps { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 9px; }
.af-steps li {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 12px;
  align-items: start;
  color: var(--af-txt2);
  font-size: 13px;
  line-height: 1.8;
}
.af-steps li b { color: var(--af-txt); }
.af-steps li em { display: block; margin-top: 3px; color: var(--af-a); font-style: normal; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }

.af-textarea {
  width: 100%;
  min-height: 120px;
  padding: 12px;
  border: 1px solid var(--af-line);
  border-radius: 12px;
  background: var(--af-card2);
  color: var(--af-txt);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
  line-height: 1.7;
  resize: vertical;
}
.af-tip code, .af-textarea + .af-actions code { padding: 1px 5px; border-radius: 4px; background: var(--af-card); color: var(--af-a); font-size: 11.5px; }

/* ---------- 红旗 / 历史 ---------- */
.af-flag {
  margin-top: 16px;
  padding: 17px 19px 18px;
  border: 1px solid color-mix(in srgb, var(--af-bad) 28%, var(--af-line));
  border-radius: var(--af-r);
  background: var(--af-card);
  box-shadow: var(--af-shadow);
}
.af-flag h3 { margin: 0 0 10px; color: var(--af-bad); font-size: 13.5px; font-weight: 800; }
.af-flag-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 18px; }
.af-flag p { margin: 0; color: var(--af-txt2); font-size: 12.4px; line-height: 1.72; }
.af-flag b { color: var(--af-txt); }

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

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .af-hero { grid-template-columns: 1fr; }
  .af-hero-art { display: none; }
  .af-bento { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .af-c-type { grid-column: span 3; }
  .af-c-site { grid-column: span 3; }
  .af-c-sev { grid-column: span 2; }
  .af-c-dur { grid-column: span 2; }
  .af-c-cond { grid-column: span 2; }
  .af-c-result { grid-column: span 6; grid-row: auto; }
  .af-c-heat { grid-column: span 6; }
  .af-c-course { grid-column: span 6; }
  .af-bars { grid-template-columns: 1fr; gap: 14px; }
  .af-plans { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .af-inner { width: calc(100% - 28px); }
  .af-hero { padding: 22px 18px; border-radius: 16px; }
  .af-bento { grid-template-columns: 1fr; }
  .af-c-type, .af-c-site, .af-c-sev, .af-c-dur, .af-c-cond,
  .af-c-result, .af-c-heat, .af-c-course { grid-column: auto; grid-row: auto; }
  .af-grid2,
  .af-chips { grid-template-columns: 1fr 1fr; }
  .af-flag-grid { grid-template-columns: 1fr; }
  .af-actions .af-btn { flex: 1 1 44%; }
  .af-heat-cell { min-height: 52px; padding: 7px; }
  .af-verdict strong { font-size: 30px; }
}

/* ---------- 打印 ---------- */
@media print {
  .af-actions,
  .af-history,
  .af-msg,
  .af-flag,
  .af-textarea,
  .tsk-crumb-bar { display: none !important; }
  .af { padding: 0; background: #fff; }
  .af-card,
  .af-result { box-shadow: none; border-color: #ddd; break-inside: avoid; }
  .af-hero { box-shadow: none; }
}

/* ---------- 全局对齐 ---------- */
.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}}
