/* cases.css - /cases/ and /cases/<slug>/ only (WORK-ORDER.md R5, WORK-ORDER-v2 rows 1-13 + R8).
   Loaded via each page's own head slot; every class is prefixed `case-` so nothing collides with
   the shared .hero/.faq/.side/.main/.toc used elsewhere. Reuses site.css tokens (--paper/--green/
   --amber/--ink/--mute/--serif/--sans/--r-card/--r-pill/--nav-h/--pad/--wrap) and utilities
   (.wrap/.btn/.btn-amber/.btn-outline/.h2/.row); no new fonts.
   Motion lives in two places only: CSS keyframes here (hero rail, price card) gated by
   html.cs-motion, and scroll reads in public/components/cases.js. prefers-reduced-motion = the
   final state, no animation (see the end of this file).
   Breakpoints: 640px = card rows / banner art · 768px = hero cut-out · 900px = side column.
   Paragraph rule (row 7): a <p> never carries its own padding or border (a card's padding sits on
   its wrapper), so lines = round(height / line-height) holds for every paragraph. */

/* K2 fix 1 (JS-off residue, adversary work order 2026-09-29, Fable NOTE from STATUS-archive
   2026-09-28): the tocbar's phone button, the 如果情況不同 tab-button row, and the FAQ category
   chips all need cases.js to do anything - clicking any of them with JS off does nothing, and
   every tab panel / FAQ answer is already visible in the static HTML (R8 F2), so hiding these
   three controls loses no content. `html.cs-js` is set by cases.js before first paint. */
html:not(.cs-js) .case-tocbar,
html:not(.cs-js) .case-tabs-list,
html:not(.cs-js) .case-faq-filter { display: none; }

/* ---------------------------------------------------------------- hero ------------------------ */
.case-hero {
  position: relative;
  background: var(--green); color: var(--paper);
  border-radius: 0 0 var(--r-sec) var(--r-sec);
  padding: calc(var(--nav-h) + 28px) 0 32px;
  overflow: clip;
}
.case-nav-mark { position: absolute; top: 0; left: 0; width: 1px; height: 1px; pointer-events: none; }
.case-hero-in { display: grid; gap: 18px; }
.case-hero-copy { display: grid; gap: 14px; min-width: 0; }
.case-crumb { font-size: 12.5px; color: rgba(242, 243, 238, .72); display: flex; flex-wrap: wrap; gap: 6px; }
.case-crumb a { text-decoration: none; }
.case-crumb a:hover { text-decoration: underline; }
.case-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.case-chip { font-size: 12px; border: 1px solid rgba(242, 243, 238, .35); border-radius: var(--r-pill); padding: 3px 12px; white-space: nowrap; }
.case-chip-lab { background: var(--amber); color: var(--ink); border-color: var(--amber); font-weight: 600; }
.case-h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(28px, 3.6vw, 48px); line-height: 1.3; letter-spacing: -.01em; color: var(--white); }
.case-h1 .ln { display: block; }
.case-sum { font-size: clamp(15px, 1.1vw, 17px); line-height: 1.75; color: rgba(242, 243, 238, .88); max-width: 60ch; margin: 0; }

/* Row 1 edit (owner 2026-09-29: "the image seems cut off ... change to line art"), J ruling
   2026-09-29 (F6/F7 clash): the hero photo cut-out is REPLACED by a whole line drawing (black
   line + one amber accent, transparent PNG-in-webp) shown on its own rounded paper card, matching
   the site's other paper-card treatment (var(--paper) fill + var(--r-card) radius, same tokens as
   .case-glance/.case-flow-box) since a black-line-on-transparent drawing cannot sit directly on
   the dark-green hero. Hidden on phone, SAME rule and SAME breakpoint as the cut-out it replaces
   (issue #111 row ① / this file's own prior comment: "Row 1: transparent cut-out, no frame; hidden
   on phone.") - the J ruling explicitly reverts the earlier phone-only `order` reorder this round
   tried instead, so F6/F7 stay exactly as they were and phone shows what the owner approved in
   round 1. */
.case-hero-fig { display: none; margin: 0; }

/* 結果一覽 */
.case-glance { position: relative; z-index: 1; background: rgba(255, 255, 255, .07); border: 1px solid rgba(242, 243, 238, .18); border-radius: var(--r-card); padding: 16px; display: grid; gap: 14px; }
.case-glance-lbl { font-size: 12px; letter-spacing: .14em; color: var(--amber); font-weight: 600; }
.case-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; margin: 0; }
.case-facts div { display: grid; gap: 2px; min-width: 0; }
.case-facts dt { font-size: 12px; color: rgba(242, 243, 238, .7); margin: 0; }
.case-facts dd { margin: 0; font-family: var(--serif); font-size: 18px; color: var(--white); }

/* Row 2: the 5-stop rail. Final state is the default; html.cs-motion (cases.js, set before first
   paint unless reduced motion) plays the fill and the dots once on load. */
.case-rail { position: relative; padding-top: 20px; }
.case-rail-line, .case-rail-fill { position: absolute; left: 10%; right: 10%; top: 27px; height: 2px; border-radius: 2px; }
.case-rail-line { background: rgba(242, 243, 238, .25); }
.case-rail-fill { background: var(--amber); transform-origin: left center; transform: scaleX(1); }
.case-rail-stops { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: relative; }
.case-rail-stop { position: relative; display: grid; justify-items: center; gap: 6px; font-size: 11px; line-height: 1.25; text-align: center; }
.case-rail-dot { width: 16px; height: 16px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 4px rgba(233, 169, 58, .18); opacity: 1; }
.case-rail-lbl { white-space: nowrap; font-weight: 600; }
.case-rail-stop.is-skip .case-rail-dot { background: var(--green); border: 2px dashed rgba(242, 243, 238, .6); box-shadow: none; }
.case-rail-stop.is-skip .case-rail-lbl { color: rgba(242, 243, 238, .7); font-weight: 400; }
/* 約 50 日 / 6 星期 sit ON the line, centred between this stop and the next one. */
.case-rail-gap { position: absolute; top: -20px; left: 100%; transform: translateX(-50%); font-size: 11px; font-weight: 600; color: var(--amber); white-space: nowrap; }
.cs-motion .case-rail-fill { animation: case-rail-fill 1.8s .2s cubic-bezier(.16, 1, .3, 1) both; }
.cs-motion .case-rail-dot { animation: case-rail-pop .5s calc(.2s + var(--i, 0) * .4s) both; }
.cs-motion .case-rail-gap { animation: case-fade .5s calc(.6s + var(--i, 0) * .4s) both; }
@keyframes case-rail-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes case-rail-pop { 0% { transform: scale(.3); opacity: .2; } 70% { transform: scale(1.2); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
@keyframes case-fade { from { opacity: 0; } to { opacity: 1; } }

.case-hero-btns { margin: 0; }
.case-hero-btns .btn-outline { color: var(--paper); border-color: rgba(242, 243, 238, .5); }
.case-date { font-size: 12px; color: rgba(242, 243, 238, .65); margin: 0; }

@media (min-width: 768px) {
  .case-hero { padding: calc(var(--nav-h) + 40px) 0 44px; }
  .case-hero-in { grid-template-columns: minmax(0, 1fr) clamp(300px, 29vw, 420px); align-items: end; gap: 20px 40px; }
  .case-hero-copy { grid-column: 1; grid-row: 1; align-self: center; }
  /* Row 1 edit REPLACES old E1 (which stood a transparent cut-out flush on the 結果一覽 card, 0
     overlap by design). The line-drawing card is now a normal grid cell in its own right-hand
     column - no overlap with .case-glance is possible since they are separate grid areas/rows.
     Shown from this breakpoint up (matches the cut-out's own `display:flex` turn-on point). */
  .case-hero-fig {
    display: grid; place-items: center; grid-column: 2; grid-row: 1; align-self: center;
    width: 100%; max-width: clamp(300px, 29vw, 420px);
    background: var(--paper); border-radius: var(--r-card); padding: 14px; aspect-ratio: 4 / 3; overflow: hidden;
  }
  .case-hero-fig img { display: block; width: 100%; height: 100%; object-fit: contain; }
  .case-glance { grid-column: 1 / -1; padding: 24px 24px 20px; }
  .case-hero-btns, .case-date { grid-column: 1 / -1; }
  .case-facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .case-rail-stop { font-size: 12.5px; }
  .case-rail-gap { font-size: 12px; }
}

/* -------------------------------------------------------------- article + side ----------------- */
.case-art { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; padding-block: 28px 64px; }
.case-side { display: none; }
/* Owner edit E2: ONE vertical rhythm for the whole article body. --case-pgap = paragraph to
   paragraph (flow AND inside cards/tabs/stage cards/banners/FAQ answers); --case-bgap = around a
   list / card / table / figure / tabs in the flow; --case-bgap-in = a block inside a card (tip,
   stage drawing, next stage card). Heading-to-first-item gaps are separate and unchanged. The
   paragraph reset is :where()-wrapped (0 specificity) so it can never again beat the rhythm
   rules (it did: flow paragraphs measured a 0 px gap). */
.case-main { min-width: 0; max-width: 720px; overflow-wrap: anywhere; /* blog B42: an email address in a list pushed 320 px phones sideways (27 px) */ --case-bar: 56px; --case-pgap: 18px; --case-bgap: 28px; --case-bgap-in: 24px; }
:where(.case-main) p { margin: 0; }
.case-main > * { margin: 0; }
.case-main > * + * { margin-top: var(--case-bgap); }
.case-main > p + p { margin-top: var(--case-pgap); }
.case-main p { font-size: 16px; line-height: 1.85; }
.case-main > .h2 { font-size: clamp(26px, 2.4vw, 32px); line-height: 1.3; margin-top: 56px; scroll-margin-top: calc(var(--nav-h) + var(--case-bar) + 16px); }
.case-main > .h2 + * { margin-top: 16px; }
.case-h3 { font-family: var(--sans); font-weight: 700; font-size: 19px; line-height: 1.45; color: var(--green-2); margin: 0; }
.case-main > .case-h3 { margin-top: 34px; }
.case-main > .case-h3 + * { margin-top: 12px; }
.case-bridge { color: var(--mute); }
.case-main p.case-fine { font-size: 14px; line-height: 1.8; color: var(--mute); }

/* Row 3 (phone): one-line sticky bar under the fixed site header (site.js: the bar never hides;
   its height is --nav-h, 72px below 900). 56px tall (R8 F6); H2 scroll-margin clears nav + bar. */
.case-tocbar { position: sticky; top: var(--nav-h); z-index: 50; height: var(--case-bar); margin: 0 calc(-1 * var(--pad)); padding: 6px var(--pad); background: var(--paper); }
.case-main > .case-tocbar + * { margin-top: 12px; }
/* hidden at once (no transition) the moment the article's end would push it under the header */
.case-tocbar[data-gone] { visibility: hidden; }
.case-tocbar-btn { display: flex; align-items: center; gap: 10px; width: 100%; height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); color: var(--ink); font: inherit; text-align: left; white-space: nowrap; cursor: pointer; box-shadow: 0 4px 12px -4px rgba(16, 32, 27, .12); }
.case-tocbar-meta { flex: none; font-size: 12px; color: var(--mute); }
.case-tocbar-cur { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: 14px; font-weight: 700; color: var(--green-2); }
.case-tocbar-cur::before { content: attr(data-n) ". "; }
.case-tocbar-chev { flex: none; width: 8px; height: 8px; border-right: 2px solid var(--green-2); border-bottom: 2px solid var(--green-2); transform: translateY(-2px) rotate(45deg); transition: transform .2s ease; }
.case-tocbar[data-open] .case-tocbar-chev { transform: translateY(2px) rotate(-135deg); }
.case-tocbar-list { display: none; position: absolute; top: calc(100% - 2px); left: var(--pad); right: var(--pad); margin: 0; padding: 8px; list-style: none; background: var(--white); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 16px 32px -12px rgba(16, 32, 27, .25); counter-reset: tocb; }
.case-tocbar[data-open] .case-tocbar-list { display: grid; gap: 2px; }
.case-tocbar-list a { display: block; padding: 8px 10px; border-radius: 10px; font-size: 14px; text-decoration: none; color: var(--ink); counter-increment: tocb; }
.case-tocbar-list a::before { content: counter(tocb) ". "; color: var(--mute); }
.case-tocbar-list a[aria-current="true"] { background: #E3EDE6; color: var(--green); font-weight: 700; }
.case-tocbar-prog { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--line); }
.case-tocbar-prog > span, .case-prog > span { display: block; height: 100%; background: var(--amber); transform-origin: left center; transform: scaleX(var(--p, 0)); }

/* Row 4: 個案重點 */
.case-keybox { background: var(--white); border-radius: 28px; padding: 22px 18px; box-shadow: 0 1px 0 var(--line), 0 18px 40px -24px rgba(16, 32, 27, .25); }
.case-keybox .h2 { margin: 0; font-size: clamp(26px, 2.4vw, 32px); line-height: 1.3; scroll-margin-top: calc(var(--nav-h) + var(--case-bar) + 16px); }
.case-main p.case-kb-sub { color: var(--mute); font-size: 14px; margin: 4px 0 var(--case-bgap-in); }
.case-flow { display: grid; grid-template-columns: minmax(0, 1fr); gap: 26px; margin: 0 0 26px; }
.case-flow-box { position: relative; background: var(--paper); border-radius: 18px; padding: 14px 16px; }
.case-flow-box dt { font-size: 12px; font-weight: 700; letter-spacing: .08em; color: #7A5410; }
.case-flow-box dd { margin: 4px 0 0; font: 500 17px/1.55 var(--serif); color: var(--ink); }
/* the arrow sits in the gap before every box but the first (down on phone, right on desktop) */
.case-flow-box + .case-flow-box::before { content: ""; position: absolute; left: 50%; top: -19px; width: 10px; height: 10px; border-right: 2px solid var(--amber); border-bottom: 2px solid var(--amber); transform: translateX(-50%) rotate(45deg); }
.case-keybox > .case-h3 { margin-bottom: var(--case-bgap-in); }

/* R8 F8: the ONE card list (factor cards, 二選一 pair, 文件 list) */
:where(.case-cards, .case-worry) { margin: 0; }
.case-cards { list-style: none; padding: 0; display: grid; gap: 10px; counter-reset: card; }
.case-card { position: relative; background: var(--white); border: 1px solid var(--line); border-radius: 18px; padding: 13px 16px 13px 46px; font-size: 15px; line-height: 1.7; }
.case-card::before { content: ""; position: absolute; left: 16px; top: 18px; width: 18px; height: 20px; border: 2px solid var(--green-2); border-radius: 4px; background: linear-gradient(var(--green-2), var(--green-2)) 3px 5px / 8px 2px no-repeat, linear-gradient(var(--green-2), var(--green-2)) 3px 10px / 6px 2px no-repeat; }
.case-card[data-state="hit"] { border: 2px solid var(--green-2); }
.case-card[data-state="hit"]::before { width: 20px; height: 20px; border-radius: 50%; border: 0; background: var(--green-2); }
.case-card[data-state="hit"]::after { content: ""; position: absolute; left: 22px; top: 22px; width: 8px; height: 5px; border-left: 2px solid var(--white); border-bottom: 2px solid var(--white); transform: rotate(-45deg); }
.case-card[data-state="off"] { background: transparent; border-style: dashed; color: var(--mute); }
.case-card[data-state="off"]::before { opacity: .45; }
.case-cards.is-numbered .case-card { counter-increment: card; padding: 14px 16px; }
.case-cards.is-numbered .case-card::before { content: counter(card); position: static; display: grid; place-items: center; width: 30px; height: 30px; margin-bottom: 8px; border: 0; border-radius: 50%; background: var(--green); color: var(--paper); font: 700 14px/1 var(--sans); }
.case-cards-join { justify-self: center; font-size: 14px; font-weight: 700; color: var(--mute); }
.case-keybox .case-card { background: transparent; }

/* Row 7: worries as an icon list; one key sentence in large type (no padding on the <p>). */
.case-worry { list-style: none; padding: 0; display: grid; gap: 8px; }
.case-worry li { display: flex; gap: 12px; align-items: flex-start; background: var(--white); border-radius: 14px; padding: 10px 14px; font-size: 15.5px; line-height: 1.7; }
.case-worry li::before { content: "?"; flex: none; display: grid; place-items: center; width: 24px; height: 24px; margin-top: 2px; border-radius: 50%; background: var(--sand); color: var(--green); font: 700 13px/1 var(--sans); }
/* the key sentence: a bordered block (data-case-block="card"), so it gets the block gap, never
   a paragraph gap; padding sits on the wrapper, not on the <p>. */
.case-pull { border-block: 1px solid var(--line); padding-block: 16px; }
.case-main .case-pull p { font: 500 20px/1.65 var(--serif); color: var(--green); }

/* Row 8: one section drawing per H2 section */
.case-fig { display: grid; gap: 10px; justify-items: center; }
.case-main > .case-fig { margin-block: var(--case-bgap); }
.case-fig img { width: min(100%, 480px); height: auto; aspect-ratio: 4 / 3; object-fit: contain; }
.case-fig figcaption { font-size: 14px; color: var(--mute); text-align: center; }

/* Row 9: comparison table - this case's column raised, the other faded; phone rows = two cards */
.case-tablewrap { overflow-x: auto; }
.case-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 15px; }
.case-table th, .case-table td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.case-table thead th, .case-table thead td { border-bottom: 0; font-weight: 700; font-size: 16px; }
.case-table tbody th { width: 26%; color: var(--mute); font-weight: 500; font-size: 14px; }
.case-table td { color: var(--mute); }
.case-table .is-here { background: var(--white); color: var(--ink); border-left: 2px solid var(--green-2); border-right: 2px solid var(--green-2); }
.case-table thead .is-here { border-top: 2px solid var(--green-2); border-radius: 16px 16px 0 0; color: var(--green); }
.case-table tbody tr:last-child .is-here { border-bottom: 2px solid var(--green-2); border-radius: 0 0 16px 16px; }
.case-table td.is-here { font-weight: 600; }

/* Row 10: stage timeline */
.case-steps { position: relative; }
.case-steps-line, .case-steps-fill { position: absolute; left: 19px; top: 22px; bottom: 22px; width: 2px; border-radius: 2px; }
.case-steps-line { background: var(--line); }
.case-steps-fill { background: var(--amber); transform-origin: center top; transform: scaleY(0); will-change: transform; }
.case-steps-list { position: relative; list-style: none; margin: 0; padding: 0; display: grid; gap: var(--case-bgap-in); }
.case-stage { position: relative; padding-left: 52px; }
.case-stage-n { position: absolute; left: 0; top: 0; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: var(--white); border: 2px solid var(--line); color: var(--mute); font: 700 15px/1 var(--sans); transition: background .4s ease, border-color .4s ease, color .4s ease; }
.case-stage.is-lit .case-stage-n { background: var(--green); border-color: var(--green); color: var(--paper); }
.case-stage-card { background: var(--white); border-radius: 22px; padding: 16px 16px 18px; }
.case-stage-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.case-stage-time { font-size: 12px; font-weight: 700; background: #FBF1DC; color: #7A5410; border-radius: 20px; padding: 4px 10px; white-space: nowrap; }
.case-stage-in { display: grid; gap: var(--case-bgap-in); margin-top: 12px; }
.case-stage-art { display: block; height: 110px; }
.case-stage-art img { width: 100%; height: 100%; object-fit: contain; }
.case-stage-txt { min-width: 0; }
.case-stage-txt > p + p, .case-note-txt > p + p, .case-tabs-panel > p + p, .case-cta-copy > p + p, .case-faq details > p + p { margin-top: var(--case-pgap); }
.case-stage-txt > .case-stage-tip { margin-top: var(--case-bgap-in); }
.case-main .case-stage-txt p { font-size: 15px; line-height: 1.8; }
.case-stage-tip { background: #E3EDE6; border-radius: 12px; padding: 8px 12px; }
.case-main .case-stage-tip p { font-size: 14px; line-height: 1.75; color: var(--green); }

/* consultant note after the last stage */
.case-note { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 14px; align-items: center; background: var(--white); border-radius: 22px; padding: 14px 16px; }
.case-note-ph { position: relative; display: block; width: 56px; height: 56px; border-radius: 50%; overflow: hidden; background: var(--paper-2); }
.case-note-ph img { position: absolute; display: block; max-width: none; height: auto; }
.case-note-ph:not(.is-crop) img { inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.case-note-txt { min-width: 0; }
.case-main .case-note p { font-size: 15px; line-height: 1.75; }

/* Row 11: the two banners. A light sand + drawing; B dark green + the consultant's face. */
.case-main > .case-cta { margin-block: 44px; }
.case-main > .case-cta + * { margin-top: 44px; }
.case-cta { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "copy" "btns"; gap: 20px 18px; align-items: center; border-radius: 26px; padding: 22px 20px; }
.case-cta-copy { grid-area: copy; min-width: 0; }
.case-cta-btns { grid-area: btns; }
.case-cta-a { background: var(--sand); color: var(--ink); }
.case-cta-a .btn-outline { color: var(--green); border-color: rgba(15, 59, 46, .45); }
.case-cta-b { background: var(--green); color: var(--paper); grid-template-columns: minmax(0, 1fr) 84px; grid-template-areas: "copy photo" "btns btns"; }
.case-cta-b .btn-outline { color: var(--paper); border-color: rgba(242, 243, 238, .5); }
.case-main .case-cta-q { font: 500 20px/1.5 var(--serif); }
.case-main .case-cta-note { font-size: 14px; line-height: 1.7; opacity: .85; }
.case-cta-art { grid-area: art; display: none; }
.case-cta-art img { width: 100%; height: 100%; object-fit: contain; }
.case-cta-photo { grid-area: photo; display: block; align-self: end; height: 112px; }
.case-cta-photo img { width: 100%; height: 100%; object-fit: contain; object-position: bottom center; }

/* result box: the sentence stays one paragraph; its key figure is set large */
.case-result { background: var(--green); color: var(--paper); border-radius: 26px; padding: 20px 22px; }
.case-main .case-result p { color: rgba(242, 243, 238, .92); }
.case-result strong { font: 500 1.45em/1 var(--serif); color: var(--amber); }

/* tabs (如果情況不同): wrap, never scroll sideways (R8 F5) */
.case-tabs-list { display: flex; flex-wrap: wrap; gap: 8px; }
.case-tabs-list button, .case-faq-filter button { font: 500 14px/1.3 var(--sans); border: 1px solid var(--line); background: var(--white); color: var(--ink); border-radius: 22px; padding: 8px 15px; cursor: pointer; }
.case-tabs-list button[aria-selected="true"], .case-faq-filter button[aria-pressed="true"] { background: var(--green); color: var(--paper); border-color: var(--green); }
.case-tabs-panel { background: var(--white); border-radius: 22px; padding: 16px 18px; margin-top: 10px; }
.case-tabs-panel[hidden] { display: none; }
.case-main .case-tabs-panel p { font-size: 15px; line-height: 1.8; }
/* before cases.js has run, show only the first panel (static HTML has no `hidden`, R8 F2) */
.cs-js .case-tabs:not([data-ready]) .case-tabs-panel + .case-tabs-panel { display: none; }

.case-callout { background: #FBF1DC; border-radius: 22px; padding: 18px 20px; }
.case-callout ol { margin: var(--case-bgap-in) 0 0; padding-left: 1.3em; display: grid; gap: 6px; font-size: 15px; line-height: 1.7; }

/* Row 12: FAQ filter + items (2 columns desktop, 1 phone) */
.case-faq-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.case-faq-n { font-size: 12px; font-weight: 700; opacity: .75; }
.case-faq { display: grid; gap: 10px; align-items: start; }
.case-faq details { background: var(--white); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; }
.case-faq details[hidden] { display: none; }
.case-faq summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.case-faq summary::-webkit-details-marker { display: none; }
.case-faq summary .case-h3 { display: inline; font-size: 16px; color: var(--ink); }
.case-faq summary::after { content: "+"; flex: 0 0 auto; font-family: var(--serif); font-size: 20px; line-height: 1; color: var(--green-2); transition: transform .2s ease; }
.case-faq details[open] summary::after { transform: rotate(45deg); }
.case-main .case-faq details p { font-size: 15px; line-height: 1.75; color: rgba(16, 32, 27, .78); }
.case-faq details > summary + p { margin-top: 8px; }

/* 延伸閱讀 + disclaimer */
.case-main > .case-related { margin-top: 44px; }
.case-related { border-top: 1px solid var(--line); padding-top: 18px; display: grid; gap: 12px; }
.case-related-ttl { font-size: 12.5px; letter-spacing: .14em; color: var(--green-2); font-weight: 600; }
.case-related-grp { display: grid; gap: 6px; grid-template-columns: minmax(0, 1fr); }
.case-related-grp b { font-size: 13px; color: var(--mute); font-weight: 600; }
.case-related-grp div { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 15px; }
.case-related a { text-underline-offset: 4px; }
.case-main p.case-disc { font-size: 13px; color: var(--mute); line-height: 1.7; }
/* the divider above the disclaimer is drawn outside the <p> box (line counts stay exact) */
.case-main > .case-related + p.case-disc { position: relative; margin-top: 36px; }
.case-main > .case-related + p.case-disc::before { content: ""; position: absolute; left: 0; right: 0; top: -18px; border-top: 1px solid var(--line); }

/* phone-only table cards (row 9) */
@media (max-width: 639px) {
  .case-table, .case-table tbody { display: block; }
  .case-table thead { display: none; }
  .case-table tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .case-table tbody th { grid-column: 1 / -1; width: auto; padding: 0; border: 0; color: var(--ink); font-weight: 700; }
  .case-table td { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 14px; }
  .case-table td.is-here, .case-table tbody tr:last-child .is-here { border: 2px solid var(--green-2); border-radius: 12px; }
  .case-table td::before { content: attr(data-h); display: block; font-size: 11px; font-weight: 700; color: var(--mute); }
}

@media (min-width: 640px) {
  .case-cards.is-pair { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: stretch; }
  .case-cards.is-pair .case-cards-join { align-self: center; }
  .case-stage { padding-left: 64px; }
  .case-stage-n { width: 44px; height: 44px; font-size: 16px; }
  .case-steps-line, .case-steps-fill { left: 21px; }
  .case-stage-card { padding: 20px 22px; }
  .case-stage-in { grid-template-columns: 120px minmax(0, 1fr); gap: var(--case-bgap-in) 18px; }
  .case-stage-art { height: 120px; }
  .case-note { grid-template-columns: 72px minmax(0, 1fr); gap: 16px; padding: 18px 20px; }
  .case-note-ph { width: 72px; height: 72px; }
  .case-main .case-note p { font-size: 16px; }
  .case-cta { padding: 26px 28px; }
  .case-cta-a { grid-template-columns: minmax(0, 1fr) 170px; grid-template-areas: "copy art" "btns art"; }
  .case-cta-art { display: block; aspect-ratio: 1; }
  .case-cta-b { grid-template-columns: minmax(0, 1fr) 170px; grid-template-areas: "copy photo" "btns photo"; padding-bottom: 0; }
  .case-cta-b .case-cta-copy { padding-top: 0; }
  .case-cta-b .case-cta-btns { padding-bottom: 26px; }
  .case-cta-photo { height: 226px; margin-top: -26px; }
  .case-main .case-cta-q { font-size: 22px; }
}

@media (min-width: 900px) {
  /* Row 5: text column + side column sit together (gap 56 px), centred, no dead band. */
  .case-art { grid-template-columns: minmax(0, 720px) clamp(250px, 22vw, 300px); justify-content: center; gap: clamp(32px, 3.9vw, 56px); padding-block: 56px 72px; }
  .case-main { grid-column: 1; grid-row: 1; --case-bar: 0px; --case-pgap: 20px; --case-bgap: 32px; }
  .case-main > .case-tocbar { display: none; }
  .case-main > .case-tocbar + * { margin-top: 0; }
  .case-main p { font-size: 17px; }
  /* Row 3: sticky side column (align-self:start so the grid does not stretch the sticky box). */
  .case-side { display: grid; gap: 16px; grid-column: 2; grid-row: 1; position: sticky; top: calc(var(--nav-h) + 16px); align-self: start; }
  .case-keybox { padding: 30px; }
  .case-flow { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; }
  .case-flow-box + .case-flow-box::before { left: -21px; top: 50%; transform: translateY(-50%) rotate(-45deg); }
  .case-keybox .case-cards.is-numbered { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .case-cards:not(.is-numbered):not(.is-pair) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .case-cards:not(.is-numbered):not(.is-pair) .case-card[data-state="off"] { grid-column: 1 / -1; }
  .case-main .case-pull p { font-size: 22px; }
  .case-faq { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .case-related-grp { grid-template-columns: 110px minmax(0, 1fr); align-items: baseline; }
}

/* side column: 目錄 with read progress, then the price card (row 6) */
.case-toc { background: var(--white); border: 1px solid var(--line); border-radius: 20px; padding: 16px 18px; }
.case-toc-ttl { display: block; font-size: 13px; font-weight: 600; color: var(--mute); }
.case-prog { display: block; height: 3px; border-radius: 3px; background: var(--paper-2); margin: 10px 0 8px; overflow: hidden; }
.case-toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; counter-reset: toc; }
.case-toc a { display: block; padding: 6px 10px; border-radius: 10px; text-decoration: none; color: var(--mute); font-size: 14px; line-height: 1.5; counter-increment: toc; transition: background .25s ease, color .25s ease; }
.case-toc a::before { content: counter(toc) ". "; }
.case-toc a:hover { color: var(--ink); }
.case-toc a[aria-current="true"] { background: #E3EDE6; color: var(--green); font-weight: 700; }

.case-price { position: relative; isolation: isolate; display: grid; gap: 4px; border-radius: 22px; padding: 22px; color: var(--paper); background: var(--green); }
.case-price-edge { position: absolute; inset: 0; z-index: -1; border-radius: inherit; overflow: hidden; }
.case-price-edge::before { content: ""; position: absolute; left: 50%; top: 50%; width: 220%; aspect-ratio: 1; translate: -50% -50%; background: conic-gradient(from 0deg, transparent 0 68%, var(--amber) 84%, transparent 100%); }
.case-price-edge::after { content: ""; position: absolute; inset: 2px; border-radius: 20px; background: linear-gradient(160deg, #1B4A38, #0B2E24); }
.case-price-lbl { font-size: 13px; color: rgba(242, 243, 238, .75); }
.case-price-val { font: 500 34px/1.2 var(--serif); color: var(--paper); margin-bottom: 8px; }
.case-price-ticks { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 6px; font-size: 13.5px; line-height: 1.5; color: rgba(242, 243, 238, .82); }
.case-price-ticks li { position: relative; padding-left: 22px; }
.case-price-ticks li::before { content: ""; position: absolute; left: 3px; top: .4em; width: 10px; height: 5px; border-left: 2px solid var(--amber); border-bottom: 2px solid var(--amber); transform: rotate(-45deg); }
.case-price .btn { width: 100%; }
.case-price-more { display: block; margin-top: 8px; text-align: center; font-size: 13px; color: rgba(242, 243, 238, .78); text-underline-offset: 4px; }
.cs-motion .case-price-edge::before { animation: case-spin 8s linear infinite; }
.cs-motion .case-price-val { background: linear-gradient(100deg, var(--paper) 40%, #FFE3A8 50%, var(--paper) 60%); background-size: 250% 100%; background-position: 100% 0; -webkit-background-clip: text; background-clip: text; color: transparent; animation: case-shine 6s ease-in-out infinite; }
@keyframes case-spin { to { rotate: 1turn; } }
@keyframes case-shine { 0%, 60% { background-position: 100% 0; } 100% { background-position: -50% 0; } }

/* prefers-reduced-motion: every case animation is off and everything shows its final state
   (rail filled, dots lit, stage line filled by cases.js, no turning edge, no sweep, no pulse). */
@media (prefers-reduced-motion: reduce) {
  .case-rail-fill, .case-rail-dot, .case-rail-gap,
  [data-case-price] *, [data-case-price] *::before, [data-case-price] *::after,
  .case-stage-n, .case-toc a, .case-tocbar, .case-tocbar-chev { animation: none !important; transition: none !important; }
  .case-price-val { background: none !important; color: var(--paper) !important; }
}

/* -------------------------------------------------------------- /cases/ list page -------------- */
.case-list-hero { position: relative; background: var(--green); color: var(--paper); border-radius: 0 0 var(--r-sec) var(--r-sec); padding: calc(var(--nav-h) + 40px) 0 44px; }
/* Fix round 1 #2: the shared `.lead` utility is dark-on-light (--mute); on this dark green hero it
   measured ~1.23:1. --mute-d is the same utility's own dark-ground colour (site.css), used by every
   other `.dark`/hero section's lead paragraph. */
.case-list-hero .lead { max-width: 62ch; color: var(--mute-d); }
.case-list-hero .crumb-list { font-size: 12.5px; color: rgba(242, 243, 238, .72); display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.case-list-hero .crumb-list a { text-decoration: none; }
.case-list-hero .crumb-list a:hover { text-decoration: underline; }
.case-list { padding-block: 48px 64px; }
/* Filter chips (owner ask 2026-10-02): same .blog-tools/.chip-scroll/.chips/.seg-ind markup and
   CSS as the live 離婚資訊 blog filter (site.css) - site.css's own `.chips` defaults are built for
   a DARK ground (white button text, translucent-white track); this section is a light (.white)
   ground, so override the two colour properties the exact same way `.faq .chips`/`.faq .chips
   button` already do for the FAQ filter on its own light ground - no new colours, sizes or fonts,
   just the established light-ground pair. */
.case-list .chips { background: rgba(16, 32, 27, .06); }
.case-list .chips button { color: var(--ink); }
.case-list .empty { color: var(--mute); }
.case-list-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; margin-top: 32px; }
.case-list-note { margin-top: 28px; color: var(--mute); font-size: 14px; }
.case-list-card { display: grid; grid-template-columns: minmax(0, 1fr); background: var(--white); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; text-decoration: none; color: inherit; }
/* Thumb edit (owner 2026-09-29: "change those thumbnail blog images ... something related to the
   case ... theme colour"): entry.thumb is now a themed line drawing (cs-<slug>-thumb.webp,
   1600x1000, exactly the same 16:10 this figure already is) instead of a client photo - contain,
   never cover, so the whole drawing always shows (no crop possible); #F2F3EE is the fallback while
   loading / if the file 404s (same value as --paper, spelled out per the work order). */
.case-list-card figure { margin: 0; aspect-ratio: 16 / 10; background: #F2F3EE; overflow: hidden; }
.case-list-card figure img { width: 100%; height: 100%; object-fit: contain; }
.case-list-card-body { padding: 18px 20px 22px; display: grid; gap: 10px; }
.case-list-card .case-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.case-list-card .case-chip { color: var(--ink); border-color: var(--line); }
.case-list-card .case-chip-lab { color: var(--ink); }
.case-list-card h3 { font-family: var(--serif); font-weight: 500; font-size: 19px; line-height: 1.35; margin: 0; }
.case-list-card dl { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 10px; }
.case-list-card dt { font-size: 11px; color: var(--mute); margin: 0; }
.case-list-card dd { margin: 0; font-family: var(--serif); font-size: 14px; }
.case-list-card .case-list-more { font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }

@media (min-width: 640px) {
  .case-list-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .case-list-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .case-list-card { grid-template-columns: minmax(0, 1fr); }
}
