/* 第 7 章頁面樣式。沿用 style.css 的色票與 header / footer，這裡的 class 一律以 c7- 開頭，避免與首頁撞名 */
:root{--c7-line:#dbe9e2;--c7-soft:#f1f8f4;--c7-focus:#1d6fd6}
html{overflow-x:hidden}
body{overflow-x:hidden}
nav a[aria-current="page"]{color:#d7613b}
:focus-visible{outline:3px solid var(--c7-focus);outline-offset:2px}
.c7-intro{padding-top:56px;padding-bottom:40px}
.c7-intro h1{font-size:clamp(30px,4vw,48px);letter-spacing:-.03em;line-height:1.3;margin:14px 0}
.c7-linkline{color:var(--muted);line-height:1.8}
.c7-textlink{color:#1f6b59;font-weight:700;text-decoration:underline;margin-left:6px}
.c7-toc{display:flex;flex-wrap:wrap;gap:10px;margin-top:22px}
.c7-toc a{display:flex;gap:8px;align-items:center;min-height:44px;padding:8px 14px;background:#fff;border:1px solid var(--c7-line);border-radius:12px;font-weight:600;font-size:14px;color:#2b5e50}
.c7-toc a b{color:#cb6645;font-size:12px}
.c7-toc a:hover{border-color:#91c7b0}
.c7-demo{padding:56px 0}
.c7-alt{background:#eef6f2}
.c7-head{margin-bottom:24px}
.c7-head h2{margin:8px 0}
.c7-simple{background:#fff;border-left:5px solid #2d836e;border-radius:10px;padding:14px 18px;line-height:1.8;color:#3b5a52;max-width:880px;margin:10px 0 0}
.c7-simple b{display:block;font-size:12px;letter-spacing:.14em;color:#cb6645;margin-bottom:2px}
.c7-muted{color:var(--muted);font-size:14px;line-height:1.7}
.c7-footnote{font-size:13px;color:#6b847a;line-height:1.7;margin:10px 0}
.c7-notes{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:28px;align-items:start}
.c7-obs{background:#fff;border:1px solid var(--c7-line);border-radius:14px;padding:18px 20px}
.c7-obs h3{margin:0 0 8px;font-size:16px}
.c7-obs p{margin:0;line-height:1.85;color:#4f6a62;font-size:14px}
.c7-notes .question{margin-top:0}
.c7-notes .question p{font-size:14px;line-height:1.8;color:#5b6a63}
.c7-panel{background:#fff;border:1px solid var(--c7-line);border-radius:14px;padding:18px 20px}
.c7-panel h3{margin:0 0 10px;font-size:17px}
.c7-panel h3 small{font-weight:400;color:#78918a;font-size:13px}
.c7-panel p,.c7-panel li{line-height:1.8;font-size:14px;color:#4f6a62}
.c7-callout{background:#fff8ee;border:1px solid #f1d9b8;border-radius:14px;padding:14px 18px;margin-bottom:18px}
.c7-callout b{color:#a55d42}
.c7-callout p{margin:6px 0;line-height:1.85;font-size:14px;color:#5b5348}
.c7-result{background:#fff;border:1px dashed #b7d6c8;border-radius:12px;padding:14px 16px;line-height:1.8;font-size:15px;margin:14px 0;min-height:48px;color:#244a40}
.c7-result strong{color:#cb5a33}
.c7-status{font-size:15px;min-height:26px;font-weight:600;color:#244a40}
.c7-controls{display:flex;flex-wrap:wrap;gap:14px 20px;align-items:end;margin-bottom:14px}
.c7-controls label,.c7-lbl{display:block;font-weight:700;font-size:14px;color:#2d4f46}
.c7-controls select,.c7-controls input[type=text],.c7-addform input,#abbrInput{display:block;margin-top:6px;min-height:44px;padding:8px 10px;border:1px solid #c7ddd3;border-radius:8px;background:#fff;color:var(--ink);min-width:190px;max-width:100%}
.c7-controls output{color:#6b847a;font-weight:400;margin-left:6px}
.c7-controls input[type=range]{display:block;width:220px;max-width:100%;margin-top:10px;accent-color:#2d836e}
.c7-check{display:flex!important;gap:8px;align-items:center;min-height:44px;font-weight:600!important}
.c7-check input{width:20px;height:20px;accent-color:#2d836e}
.c7-buttons{display:flex;flex-wrap:wrap;gap:10px;margin:12px 0}
.c7-btn{min-height:44px;padding:10px 18px;border:0;border-radius:10px;background:#1f6b59;color:#fff;font-weight:700;font-size:15px}
.c7-btn.alt{background:#e3f0ea;color:#285c4c}
.c7-btn:hover{filter:brightness(1.07)}
.c7-btn:disabled{opacity:.45;cursor:not-allowed}
.c7-twin{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:6px}
.c7-tablewrap{overflow-x:auto;-webkit-overflow-scrolling:touch}
.c7-table{width:100%;border-collapse:collapse;background:#fff;border:1px solid var(--c7-line);border-radius:12px;overflow:hidden;font-size:14px}
.c7-table caption{text-align:left;font-weight:700;padding:0 0 10px;color:#2d4f46}
.c7-table th,.c7-table td{border:1px solid #e3eee9;padding:10px 12px;text-align:center;line-height:1.5}
.c7-table thead th{background:#e6f3ec;color:#1d4a3f}
.c7-table tbody th{text-align:left;background:#f7fbf9;font-weight:600}
.c7-table small{font-weight:400;color:#78918a}
.c7-table td.lv-high{background:#ffe9dd;font-weight:700;color:#a7451f}
.c7-table td.lv-mid{background:#fff5d6;font-weight:700;color:#7a5a00}
.c7-table td.lv-low{background:#dcf4e8;font-weight:700;color:#1d6b4c}
.c7-small{font-size:13px}
.c7-emptyrow td{color:#82968e}

/* 7-02 */
.c7-sites-layout{display:grid;grid-template-columns:minmax(240px,320px) 1fr;gap:24px;align-items:start}
.c7-figure-box{background:#fff;border:1px solid var(--c7-line);border-radius:16px;padding:14px;text-align:center}
#sitesSvg{width:100%;max-width:290px;height:auto;display:block;margin:auto}
.c7-body{fill:#e8f3ee;stroke:#c3dbd0;stroke-width:2}
.c7-site{cursor:pointer;outline:none}
.c7-shape{fill:#bde9d8;stroke:#4d9a82;stroke-width:3;transition:fill .15s}
.c7-limb{stroke:#4d9a82;stroke-width:16;stroke-linecap:round;fill:none}
.c7-finger{stroke:#4d9a82;stroke-width:5;stroke-linecap:round;fill:none}
.c7-site:hover .c7-shape{fill:#9fdcc4}
.c7-site:focus-visible .c7-shape{stroke:var(--c7-focus);stroke-width:5}
.c7-site:focus-visible .c7-limb{stroke:var(--c7-focus)}
.c7-site.on .c7-shape{fill:#ffb98f;stroke:#d7613b}
.c7-site.on .c7-limb{stroke:#d7613b}
.c7-site.on .c7-finger{stroke:#d7613b}
.c7-rank{font-size:15px;font-weight:900;fill:#fff;paint-order:stroke;stroke:#cb6645;stroke-width:9;stroke-linejoin:round}
.c7-legend{font-size:13px;color:#6b847a;line-height:1.6;margin:8px 0 0;text-align:left}
.c7-badge{display:inline-grid;place-items:center;width:20px;height:20px;border-radius:50%;background:#cb6645;color:#fff;font-size:12px;font-weight:900}
.c7-infobox>div{background:#fff;border:1px solid var(--c7-line);border-radius:14px;padding:18px 20px;margin-bottom:14px}
#siteInfo h3{margin:0 0 6px;font-size:20px}
#siteInfo h4{margin:14px 0 4px;font-size:14px;color:#cb6645;letter-spacing:.06em}
#siteInfo ul{margin:0;padding-left:20px}
#siteInfo li,#siteInfo p{line-height:1.8;font-size:14px;color:#4f6a62}
.c7-pro li::marker{color:#2d836e}
.c7-con li::marker{color:#cb6645}
.c7-order h3{margin:0 0 8px;font-size:17px}
.c7-order ol{margin:0;padding-left:22px}
.c7-order li{line-height:1.8;font-size:14px;color:#4f6a62;margin-bottom:6px}

/* 7-05 */
.c7-row{align-items:end}
.c7-letters{display:grid;grid-template-columns:repeat(6,1fr);gap:5px;margin-bottom:10px}
.c7-letters div{display:grid;place-items:center;aspect-ratio:1/1;min-height:34px;border:2px solid #dfece6;border-radius:8px;background:#f8fbf9;font-weight:900;color:#284b40;font-size:16px}
.c7-letters div.hl{background:#ffd3b0;border-color:#e7784f;box-shadow:0 0 0 3px #fce1d4}
.c7-letters div.done{background:#d8f2e4;border-color:#35946f}
.c7-typed{font-size:15px;margin:6px 0 0}
.c7-typed b{font-size:20px;letter-spacing:.2em;color:#cb5a33;font-family:ui-monospace,Consolas,monospace}

/* 7-12 */
.c7-speed-layout{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.c7-pad{display:block;width:100%;min-height:150px;border:3px solid #9bbfb1;border-radius:18px;background:#e9f1ee;color:#4a645c;font-size:22px;font-weight:900;margin:10px 0;touch-action:manipulation}
.c7-pad.wait{background:#fbe7e1;border-color:#d97a5e;color:#8a3a22}
.c7-pad.go{background:#2f9a6b;border-color:#1b6b47;color:#fff}
.c7-pad.done{background:#e3f0ea}
.c7-rtlist{margin:6px 0 0;padding-left:22px;font-family:ui-monospace,Consolas,monospace;font-size:14px}
.c7-bignum{text-align:center;margin:10px 0}
.c7-bignum b{display:block;font-size:44px;line-height:1.1;color:#1f6b59}
.c7-bignum span{font-size:13px;color:#78918a}
.c7-formula{text-align:center;color:#78918a;font-size:13px;letter-spacing:.06em}

/* 7-15、16 */
.c7-tabs{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:0}
.c7-tab{min-height:44px;padding:10px 16px;border:1px solid var(--c7-line);border-bottom:0;border-radius:12px 12px 0 0;background:#e6f0eb;color:#3b5a52;font-weight:700}
.c7-tab[aria-selected=true]{background:#fff;color:#1d4a3f;box-shadow:0 -3px 0 #2d836e inset}
.c7-tabpanel{background:#fff;border:1px solid var(--c7-line);border-radius:0 14px 14px 14px;padding:18px 20px}
.c7-typebox{background:#f6faf8;border:1px solid var(--c7-line);border-radius:12px;padding:14px}
.c7-target{margin:0 0 8px;font-size:15px}
.c7-target b{color:#1f6b59;font-size:18px;word-break:break-word}
.c7-typedline{min-height:46px;margin:0 0 10px;padding:10px 12px;background:#fff;border:2px solid #cfe2d9;border-radius:10px;font-size:20px;font-family:ui-monospace,Consolas,monospace;word-break:break-all}
.c7-preds{display:flex;flex-wrap:wrap;gap:8px;min-height:48px;margin-bottom:10px;align-items:center}
.c7-pred{min-height:44px;padding:8px 14px;border:2px solid #e7784f;border-radius:10px;background:#fff0e5;color:#6a2f17;font-weight:700;font-size:15px}
.c7-pred b{color:#cb5a33;margin-right:6px}
.c7-kb{display:grid;grid-template-columns:repeat(9,1fr);gap:5px}
.c7-key{min-height:44px;border:1px solid #c7ddd3;border-radius:8px;background:#fff;font-weight:700;font-size:16px;color:#244a40;text-transform:uppercase}
.c7-key.wide{grid-column:span 3;text-transform:none;font-size:14px}
.c7-key:active{background:#e3f0ea}
.c7-compare{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:12px 0}
.c7-compare .c7-stat{background:#f6faf8;border:1px solid var(--c7-line);border-radius:12px;padding:12px;text-align:center}
.c7-stat b{display:block;font-size:26px;color:#1f6b59}
.c7-stat span{font-size:12px;color:#78918a;display:block;margin-top:2px}
.c7-compare-text{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:20px}
.c7-abbr-table{width:100%;border-collapse:collapse;font-size:14px}
.c7-abbr-table th,.c7-abbr-table td{border-bottom:1px solid #e3eee9;padding:8px 6px;text-align:left}
.c7-abbr-table td:first-child{font-family:ui-monospace,Consolas,monospace;font-weight:700;color:#cb5a33}
.c7-addform{display:flex;flex-wrap:wrap;gap:10px;align-items:end;margin-top:12px}
.c7-addform label{font-weight:700;font-size:13px}
.c7-addform input{min-width:0;width:150px}
#abbrInput{width:100%;font-size:17px;font-family:ui-monospace,Consolas,monospace}

/* 7-20 */
.c7-rr-layout{display:grid;grid-template-columns:minmax(260px,420px) 1fr;gap:22px;align-items:start}
.c7-rrboard{position:relative;display:grid;width:100%;max-width:420px;aspect-ratio:1/1;border:3px solid #6aa690;border-radius:12px;background:#fff;touch-action:none;user-select:none;overflow:hidden}
.c7-rrcell{border:1px solid #d9e8e0;display:grid;place-items:center;font-size:12px;color:#7a9389;position:relative}
.c7-rrcell.out{background:repeating-linear-gradient(45deg,#f1f1f1,#f1f1f1 6px,#e5e5e5 6px,#e5e5e5 12px)}
.c7-rrcell.target{background:#ffb98f;box-shadow:inset 0 0 0 4px #d7613b}
.c7-rrcell.target::after{content:"點這裡";font-weight:900;color:#7a2a10;font-size:13px}
.c7-rrcell.kb{outline:3px solid var(--c7-focus);outline-offset:-3px}
.c7-rrcell.good{background:#d8f2e4}
.c7-rrcell.bad{background:#fbd5cc}
.c7-rrcell.mix{background:#fff1c9}
.c7-rrdot{position:absolute;width:16px;height:16px;margin:-8px 0 0 -8px;border-radius:50%;border:3px solid #1d6fd6;background:#fff;pointer-events:none;z-index:2}
.c7-rrreach{position:absolute;border:3px dashed #1d6fd6;pointer-events:none;z-index:1;border-radius:4px}

/* 7-22 */
.c7-ladder-layout{display:grid;grid-template-columns:1fr 340px;gap:22px;align-items:start}
.c7-steps{list-style:none;margin:0 0 14px;padding:0;display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.c7-stepbtn{width:100%;min-height:64px;padding:8px 6px;border:2px solid #cfe2d9;border-radius:12px;background:#fff;color:#2d4f46;font-weight:700;font-size:13px;line-height:1.4}
.c7-stepbtn[aria-selected=true]{border-color:#2d836e;background:#e3f4ec}
.c7-stepbtn[aria-disabled=true]{background:#f0f2f1;color:#8b9a95;border-style:dashed;cursor:not-allowed}
.c7-stepbtn .ok{color:#1d8a58}
.c7-stage{background:#fff;border:1px solid var(--c7-line);border-radius:14px;padding:18px 20px}
.c7-stage h3{margin:0 0 6px}
.c7-stage p{line-height:1.8;font-size:14px;color:#4f6a62;margin:6px 0}
.c7-goal{background:#f1f8f4;border-radius:10px;padding:10px 12px;font-size:14px;font-weight:600;color:#1d4a3f}
.c7-switch{display:block;width:150px;height:150px;border-radius:50%;border:6px solid #1f6b59;background:#e84f2f;color:#fff;font-size:20px;font-weight:900;margin:14px auto;touch-action:manipulation}
.c7-switch:active{transform:scale(.96)}
.c7-toy{font-size:64px;text-align:center;min-height:84px}
.c7-toy.spin span{display:inline-block;animation:c7spin .6s linear 3}
@keyframes c7spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.c7-toy.spin span{animation:none;outline:4px solid #e7784f;border-radius:50%}}
.c7-lamp{width:120px;height:120px;border-radius:50%;margin:10px auto;display:grid;place-items:center;font-size:42px;background:#d5d9d7;border:4px solid #a8b0ad}
.c7-lamp.on{background:#ffe27a;border-color:#e0a800;box-shadow:0 0 30px #ffd34e}
.c7-lamptxt{text-align:center;font-weight:800;min-height:26px}
.c7-opts{display:flex;justify-content:center;gap:10px;flex-wrap:wrap;margin:14px 0}
.c7-opt{min-width:92px;min-height:104px;padding:8px;border:3px solid #dfece6;border-radius:14px;background:#f8fbf9;text-align:center;font-weight:800;font-size:14px;color:#284b40}
.c7-opt .em{display:block;font-size:40px}
.c7-opt.hl{background:#ffd3b0;border-color:#e7784f;box-shadow:0 0 0 4px #fce1d4}
.c7-side{display:grid;gap:12px}
.c7-side ol,.c7-side ul{margin:0;padding-left:20px}

/* 7-07 個案 */
.c7-cases{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:20px}
.c7-case{background:#fff;border:1px solid var(--c7-line);border-radius:14px;padding:16px 18px;margin:0;min-width:0}
.c7-case legend{font-weight:900;color:#1d4a3f;padding:0 6px}
.c7-case p{line-height:1.8;font-size:14px;color:#4f6a62;margin:4px 0 10px}
.c7-radios{display:flex;flex-wrap:wrap;gap:8px}
.c7-radios label{display:flex;align-items:center;gap:8px;min-height:44px;padding:6px 12px;border:2px solid #d4e5dc;border-radius:10px;font-weight:700;font-size:14px;cursor:pointer;background:#f8fbf9}
.c7-radios input{width:18px;height:18px;accent-color:#2d836e}
.c7-radios label:has(input:checked){border-color:#2d836e;background:#e3f4ec}
.c7-fb{margin-top:10px;font-size:14px;line-height:1.75;color:#3c5a51}
.c7-fb .lvl{display:inline-block;padding:2px 10px;border-radius:20px;font-weight:800;font-size:13px;margin-right:6px}
.c7-fb .lvl.good{background:#dcf4e8;color:#1d6b4c}
.c7-fb .lvl.ok{background:#fff5d6;color:#7a5a00}
.c7-fb .lvl.poor{background:#ffe9dd;color:#a7451f}
.c7-fb ul{margin:6px 0 0;padding-left:18px}

@media(max-width:1050px){.c7-ladder-layout{grid-template-columns:1fr}}
@media(max-width:860px){
 .c7-sites-layout,.c7-twin,.c7-speed-layout,.c7-rr-layout,.c7-notes,.c7-compare-text,.c7-cases{grid-template-columns:1fr}
 .c7-compare{grid-template-columns:1fr}
 .c7-steps{grid-template-columns:1fr 1fr}
}
@media(max-width:480px){
 .c7-demo{padding:40px 0}
 .c7-letters{gap:3px}
 .c7-letters div{font-size:13px;min-height:28px}
 .c7-kb{grid-template-columns:repeat(7,1fr)}
 .c7-key.wide{grid-column:span 2}
 .c7-tab{font-size:13px;padding:10px}
 .c7-tabpanel{padding:14px}
 .c7-controls select,.c7-controls input[type=text]{min-width:0;width:100%}
 .c7-controls label{width:100%}
 .c7-controls input[type=range]{width:100%}
}
[hidden]{display:none!important}

#abbrTable{overflow-wrap:anywhere}
.c7-abbr-table td{overflow-wrap:anywhere;word-break:break-word}
.c7-abbr-del{margin-left:6px;min-height:44px;padding:4px 10px}
