/* ==========================================================
   A8 · 算法备案触发判定 —— 「判例册 / 决策树」设计系统
   暖灰 + 墨黑 + 柠檬黄；衬线标题、粗边框、树枝连线与印章式结论。
   ========================================================== */
.aft-page, .aft-modal, .aft-toast {
    --aft-bg: #f7f5f1;
    --aft-card: #fffefb;
    --aft-card2: #f2efe8;
    --aft-ink: #14181f;
    --aft-ink2: #4b5060;
    --aft-ink3: #888b95;
    --aft-lemon: #a8860c;
    --aft-lemon-soft: #fbf1cf;
    --aft-red: #a8322d;
    --aft-red-soft: #fae7e4;
    --aft-green: #2f6749;
    --aft-green-soft: #e4f1e8;
    --aft-line: #d8d2c4;
    --aft-line2: #eae5da;
    --aft-shadow: 3px 3px 0 rgba(20, 24, 31, .08), 0 12px 26px rgba(20, 24, 31, .06);
    --aft-serif: Georgia, "Songti SC", "SimSun", serif;
}
:root[data-theme="dark"] .aft-page,
:root[data-theme="dark"] .aft-modal,
:root[data-theme="dark"] .aft-toast {
    --aft-bg: #111318;
    --aft-card: #1a1e25;
    --aft-card2: #22262e;
    --aft-ink: #f1eee7;
    --aft-ink2: #b9bbc3;
    --aft-ink3: #84868f;
    --aft-lemon: #e6c55c;
    --aft-lemon-soft: #33301a;
    --aft-red: #f08d86;
    --aft-red-soft: #38211f;
    --aft-green: #79c79b;
    --aft-green-soft: #1c3226;
    --aft-line: #353a43;
    --aft-line2: #2a2f37;
    --aft-shadow: 3px 3px 0 rgba(0, 0, 0, .34), 0 12px 26px rgba(0, 0, 0, .3);
}

.aft-page {
    background: var(--aft-bg); color: var(--aft-ink);
    font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
    font-size: 14.5px; line-height: 1.85; padding: 26px 0 56px; min-height: 60vh;
}
.aft-wrap { max-width: 1220px; margin: 0 auto; padding: 0 22px; }
.aft-page b, .aft-page strong { color: var(--aft-ink); font-weight: 700; border-bottom: 2px solid var(--aft-lemon); }
.aft-page h1, .aft-page h2, .aft-page h3 { font-family: var(--aft-serif); line-height: 1.4; }
.aft-page .detail-breadcrumb { background: transparent; margin-bottom: 20px; font-size: 12.5px; }

.aft-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 0; border: 2px solid var(--aft-ink); background: var(--aft-card); box-shadow: var(--aft-shadow); }
.aft-hero-copy { padding: 28px 30px 22px; }
.aft-kicker { display: inline-block; font: 600 11px var(--aft-serif); letter-spacing: .18em; color: var(--aft-ink2); border: 1px solid var(--aft-line); padding: 4px 10px; margin-bottom: 15px; }
.aft-hero h1 { font-size: clamp(28px, 3.2vw, 39px); font-weight: 700; margin: 0 0 11px; }
.aft-hero h1::after { content: ""; display: block; width: 62px; height: 4px; background: var(--aft-lemon); margin-top: 12px; }
.aft-sub { font-size: 14px; line-height: 1.95; color: var(--aft-ink2); margin: 0 0 20px; }
.aft-hero-form { border-top: 1px solid var(--aft-line2); padding-top: 15px; }
.aft-label { display: block; font-size: 12px; color: var(--aft-ink3); font-weight: 700; margin-bottom: 7px; }
.aft-input-row { display: flex; gap: 9px; }
.aft-input { flex: 1 1 auto; min-width: 0; height: 43px; padding: 0 12px; border: 1.5px solid var(--aft-line); background: var(--aft-card2); color: var(--aft-ink); font: 14px inherit; font-family: inherit; outline: none; }
.aft-input:focus { border-color: var(--aft-ink); box-shadow: 0 0 0 3px var(--aft-lemon-soft); }
.aft-form-note { min-height: 17px; margin: 6px 0 0; font-size: 12px; color: var(--aft-red); }
.aft-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 35px; padding: 7px 15px; border: 1.5px solid var(--aft-ink); background: var(--aft-card); color: var(--aft-ink); font: 600 12.5px inherit; font-family: inherit; cursor: pointer; white-space: nowrap; transition: transform .15s, background .15s; }
.aft-btn:hover { background: var(--aft-lemon-soft); transform: translate(-1px, -1px); }
.aft-btn--main { height: 43px; padding: 0 22px; background: var(--aft-ink); color: var(--aft-lemon-soft); font-size: 14px; }
:root[data-theme="dark"] .aft-btn--main { color: #1a1710; }
.aft-btn--ghost { border-color: var(--aft-line); color: var(--aft-ink2); background: transparent; }
.aft-btn--sm { min-height: 27px; padding: 3px 10px; font-size: 11.5px; }
.aft-hero-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 17px; border-top: 1px solid var(--aft-line2); }
.aft-fact { padding: 11px 12px 0; border-right: 1px solid var(--aft-line2); min-width: 0; }
.aft-fact:last-child { border-right: 0; }
.aft-fact b { display: block; font: 700 19px/1.4 var(--aft-serif); border: 0; word-break: break-all; }
.aft-fact span { font-size: 10.5px; color: var(--aft-ink3); }
.aft-fact--hot b { color: var(--aft-red); font-size: 15px; }

.aft-tree-box { background: var(--aft-card2); border-left: 2px solid var(--aft-ink); padding: 17px 16px 12px; display: flex; flex-direction: column; }
.aft-tree-head { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 2px solid var(--aft-ink); padding-bottom: 8px; }
.aft-tree-head b { font: 700 13px var(--aft-serif); }
.aft-tree-head span { font-size: 10.5px; color: var(--aft-ink3); }
.aft-tree { width: 100%; height: auto; flex: 1 1 auto; min-height: 245px; display: block; }
.aft-edge { stroke: var(--aft-line); stroke-width: 2; fill: none; }
.aft-edge.is-on { stroke: var(--aft-ink); stroke-width: 2.6; }
.aft-tnode { fill: var(--aft-card); stroke: var(--aft-line); stroke-width: 1.5; }
.aft-tnode.is-on { fill: var(--aft-lemon-soft); stroke: var(--aft-ink); stroke-width: 2; }
.aft-ttext { fill: var(--aft-ink3); font: 600 11px "PingFang SC", sans-serif; }
.aft-ttext.is-on { fill: var(--aft-ink); }
.aft-tno { fill: var(--aft-ink3); font: 700 10px Georgia, serif; }
.aft-tree-foot { font-size: 10.5px; color: var(--aft-ink3); text-align: center; border-top: 1px solid var(--aft-line); padding-top: 8px; }

.aft-quick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 16px 0 22px; padding: 11px 14px; border: 1px solid var(--aft-line); background: var(--aft-card); }
.aft-quick-label { font-size: 12px; color: var(--aft-ink3); font-weight: 700; }
.aft-chip { border: 1px solid var(--aft-line); background: var(--aft-card2); color: var(--aft-ink2); padding: 5px 12px; font: 600 12px inherit; font-family: inherit; cursor: pointer; }
.aft-chip:hover { border-color: var(--aft-ink); color: var(--aft-ink); }

.aft-body { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 20px; align-items: start; }
.aft-body > * { min-width: 0; }
.aft-panel, .aft-card, .aft-verdict { background: var(--aft-card); border: 1.5px solid var(--aft-line); box-shadow: var(--aft-shadow); }
.aft-panel { padding: 18px 19px; position: sticky; top: 16px; }
.aft-panel-head { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 2px solid var(--aft-ink); padding-bottom: 8px; margin-bottom: 10px; }
.aft-panel-head h2 { font-size: 16px; margin: 0; }
.aft-panel-head span { font: 11px var(--aft-serif); color: var(--aft-ink3); }
.aft-hint { font-size: 11.5px; line-height: 1.8; color: var(--aft-ink3); margin: 0 0 13px; }
.aft-questions { display: grid; gap: 16px; }
.aft-q-label { display: block; font: 700 13px var(--aft-serif); margin-bottom: 7px; }
.aft-q-label em { font-style: normal; font: 400 10.5px "PingFang SC", sans-serif; color: var(--aft-ink3); margin-left: 5px; }
.aft-q-options { display: grid; gap: 5px; }
.aft-opt { display: flex; align-items: flex-start; gap: 8px; border: 1px solid var(--aft-line); padding: 7px 9px; font-size: 12px; cursor: pointer; }
.aft-opt input { margin: 4px 0 0; accent-color: var(--aft-ink); }
.aft-opt.is-on { border-color: var(--aft-ink); background: var(--aft-lemon-soft); }
.aft-opt small { display: block; color: var(--aft-ink3); font-size: 10.5px; }

.aft-result { display: grid; gap: 15px; }
.aft-verdict { display: flex; align-items: center; gap: 16px; padding: 16px 19px; border-left: 5px solid var(--aft-line); }
.aft-verdict.is-yes { border-left-color: var(--aft-red); }
.aft-verdict.is-needcheck { border-left-color: var(--aft-lemon); }
.aft-verdict.is-no { border-left-color: var(--aft-green); }
.aft-stamp { width: 56px; height: 56px; flex: 0 0 auto; display: grid; place-items: center; border: 3px double var(--aft-ink); border-radius: 50%; font: 700 21px var(--aft-serif); transform: rotate(-10deg); }
.aft-verdict.is-yes .aft-stamp { border-color: var(--aft-red); color: var(--aft-red); }
.aft-verdict.is-no .aft-stamp { border-color: var(--aft-green); color: var(--aft-green); }
.aft-verdict-copy { min-width: 0; }
.aft-verdict-tag { display: inline-block; font-size: 11px; color: var(--aft-ink); background: var(--aft-lemon-soft); padding: 2px 9px; margin-bottom: 6px; }
.aft-verdict-copy h2 { font-size: 16.5px; margin: 0 0 4px; }
.aft-verdict-copy p { margin: 0; font-size: 12.5px; color: var(--aft-ink2); line-height: 1.85; }
.aft-card { padding: 16px 19px; }
.aft-card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; border-bottom: 1px solid var(--aft-line2); padding-bottom: 10px; margin-bottom: 12px; }
.aft-card-head h2 { font-size: 15.5px; margin: 0; }
.aft-mini { font-size: 11px; color: var(--aft-ink3); white-space: nowrap; }
.aft-path { display: grid; gap: 0; }
.aft-pstep { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--aft-line2); }
.aft-pstep:last-child { border-bottom: 0; }
.aft-pstep-no { width: 24px; height: 24px; display: grid; place-items: center; background: var(--aft-ink); color: var(--aft-lemon-soft); border-radius: 50%; font: 700 11px Georgia, serif; }
:root[data-theme="dark"] .aft-pstep-no { color: #1a1710; }
.aft-pstep b { font-size: 12.5px; }
.aft-pstep p { margin: 2px 0 0; font-size: 11.5px; color: var(--aft-ink2); line-height: 1.75; }
.aft-materials { display: grid; gap: 7px; }
.aft-mat { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 9px; border: 1px solid var(--aft-line); padding: 9px 11px; }
.aft-mat i { font-style: normal; color: var(--aft-lemon); font-weight: 700; }
.aft-mat b { font-size: 12.5px; }
.aft-mat p { margin: 2px 0 0; font-size: 11.5px; color: var(--aft-ink2); line-height: 1.75; }
.aft-empty { font-size: 12.5px; color: var(--aft-ink3); margin: 0; }
.aft-table-scroll { overflow-x: auto; }
.aft-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.aft-table th, .aft-table td { text-align: left; padding: 8px 9px; border-bottom: 1px solid var(--aft-line2); vertical-align: top; }
.aft-table th { font-size: 11px; color: var(--aft-ink3); white-space: nowrap; }
.aft-table td { color: var(--aft-ink2); line-height: 1.7; }
.aft-case-tag { font-size: 10px; padding: 1px 7px; background: var(--aft-lemon-soft); white-space: nowrap; }
.aft-case-tag.is-no { background: var(--aft-green-soft); color: var(--aft-green); }
.aft-del { border: 0; background: transparent; color: var(--aft-red); cursor: pointer; font-size: 12px; }
.aft-toolbar { display: flex; flex-wrap: wrap; gap: 9px; }

.aft-modal { position: fixed; inset: 0; z-index: 900; display: flex; align-items: center; justify-content: center; background: rgba(16, 18, 22, .62); padding: 20px; }
.aft-modal[hidden] { display: none !important; }
.aft-sheet { width: min(520px, 100%); background: var(--aft-card); border: 2px solid var(--aft-ink); padding: 23px 25px; box-shadow: var(--aft-shadow); }
.aft-sheet h3 { font-size: 18px; margin: 0 0 8px; }
.aft-sheet p { font-size: 12.5px; color: var(--aft-ink2); line-height: 1.85; margin: 0 0 14px; }
.aft-sheet-code { display: block; word-break: break-all; background: var(--aft-card2); border: 1px solid var(--aft-line); padding: 10px 11px; font: 11px/1.7 Consolas, monospace; color: var(--aft-ink); max-height: 110px; overflow: auto; }
.aft-sheet-actions { display: flex; gap: 9px; margin-top: 16px; }
.aft-toast { position: fixed; left: 50%; bottom: 30px; transform: translate(-50%, 12px); z-index: 950; background: var(--aft-ink); color: var(--aft-lemon-soft); padding: 9px 18px; font-size: 12.5px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.aft-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 980px) {
    .aft-hero, .aft-body { grid-template-columns: minmax(0, 1fr); }
    .aft-tree-box { border-left: 0; border-top: 2px solid var(--aft-ink); }
    .aft-panel { position: static; }
}
@media (max-width: 600px) {
    .aft-wrap { padding: 0 14px; }
    .aft-hero-copy, .aft-panel, .aft-card, .aft-verdict { padding: 15px 13px; }
    .aft-hero h1 { font-size: 25px; }
    .aft-sub { font-size: 13px; }
    .aft-input-row { flex-direction: column; }
    .aft-btn--main { width: 100%; }
    .aft-fact b { font-size: 14px; }
    .aft-fact--hot b { font-size: 12px; }
    .aft-table { min-width: 0; font-size: 10.5px; }
    .aft-table th, .aft-table td { padding: 6px 4px; }
}
@media print {
    .aft-page { background: #fff; }
    .aft-hero-form, .aft-quick, .aft-toolbar, .aft-modal, .aft-toast, .tskb { display: none !important; }
    .aft-body { grid-template-columns: 1fr; }
    .aft-panel, .aft-card, .aft-verdict, .aft-hero { box-shadow: none; break-inside: avoid; }
}
