/* iPhone App Vibe Coding 工作坊｜講義 */
:root {
  --bg: #ffffff;
  --surface: #f6f8f7;
  --surface-2: #eef2f0;
  --ink: #12201a;
  --ink-2: #44524b;
  --ink-3: #7d8a84;
  --line: #e3e8e5;
  --line-2: #d3dbd7;
  --green: #176b53;
  --green-2: #0f5541;
  --green-soft: #e5f2ec;
  --green-tint: #f2f8f5;
  --coral: #d95d4b;
  --coral-soft: #fcebe7;
  --amber: #a8650f;
  --amber-soft: #fbf2e2;
  --blue: #2f5bb7;
  --blue-soft: #e9effb;
  --violet: #6a4fc4;
  --violet-soft: #f0ecfb;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow-1: 0 1px 2px rgba(18, 32, 26, .04), 0 4px 16px rgba(18, 32, 26, .04);
  --shadow-2: 0 2px 6px rgba(18, 32, 26, .05), 0 18px 48px rgba(18, 32, 26, .08);
  --font: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", "Heiti TC", system-ui, sans-serif;
  --font-latin: "Inter", "Noto Sans TC", "PingFang TC", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --top: 64px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--top) + 24px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  overflow-x: clip;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.75;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--green-2); }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 6px; }
button { font: inherit; color: inherit; }
code, kbd { font-family: var(--mono); font-size: .86em; }
:not(pre) > code {
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: .08em .42em;
  border-radius: 6px;
  word-break: break-word;
}
kbd {
  display: inline-block;
  min-width: 1.8em;
  padding: .05em .45em;
  border: 1px solid var(--line-2);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: #fff;
  text-align: center;
  font-size: .8em;
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- top bar ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 40;
  height: var(--top);
  display: flex; align-items: center; gap: 16px;
  padding: 0 20px;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(1.6) blur(18px);
  -webkit-backdrop-filter: saturate(1.6) blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.topbar.scrolled { border-bottom-color: var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-width: 0; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 10px; flex: none;
  background: var(--green); color: #fff;
  display: grid; place-items: center;
}
.brand-mark svg { width: 18px; height: 18px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-text strong { font-size: 15px; font-weight: 700; white-space: nowrap; }
.brand-text span { font-family: var(--mono); font-size: 11px; color: var(--ink-3); letter-spacing: .06em; }
.topbar-now {
  flex: 1; min-width: 0; text-align: center;
  font-size: 14px; color: var(--ink-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  opacity: 0; transform: translateY(4px);
  transition: opacity .3s, transform .4s var(--ease-out);
}
.topbar-now.show { opacity: 1; transform: none; }
.topbar-now b { font-family: var(--mono); font-weight: 500; color: var(--green); margin-right: 8px; font-size: 13px; }
.top-actions { display: flex; gap: 8px; margin-left: auto; }
.icon-btn {
  text-decoration: none;
  white-space: nowrap;
  height: 40px; min-width: 40px; padding: 0 12px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line); border-radius: 12px; background: #fff;
  cursor: pointer; font-size: 14px; color: var(--ink-2);
  transition: background .2s, border-color .2s, color .2s, transform .15s;
}
.icon-btn:hover { background: var(--surface); border-color: var(--line-2); color: var(--ink); }
.icon-btn:active { transform: scale(.97); }
.icon-btn svg { width: 18px; height: 18px; flex: none; }
.icon-btn .hint { font-family: var(--mono); font-size: 11px; color: var(--ink-3); border: 1px solid var(--line); border-radius: 6px; padding: 0 5px; }
.progress {
  position: fixed; top: var(--top); left: 0; height: 2px; width: 100%;
  background: var(--green); transform-origin: 0 50%; transform: scaleX(0); z-index: 41;
}

/* ---------- layout ---------- */
.layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 56px;
  max-width: 1240px;
  margin: 0 auto;
  padding: calc(var(--top) + 8px) 32px 120px;
}
.sidebar {
  position: sticky; top: calc(var(--top) + 24px);
  align-self: start;
  max-height: calc(100vh - var(--top) - 48px);
  overflow: auto;
  padding: 24px 4px 24px 0;
  scrollbar-width: thin;
}
.main { min-width: 0; max-width: 760px; }

/* timeline nav */
.toc { position: relative; list-style: none; margin: 0; padding: 0 0 0 18px; }
.toc::before { content: ""; position: absolute; left: 4px; top: 10px; bottom: 10px; width: 1px; background: var(--line); }
.toc-indicator {
  position: absolute; left: 1px; width: 7px; height: 7px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 0 4px var(--green-soft);
  transition: transform .5s var(--ease-out);
}
.toc li { position: relative; }
.toc a {
  display: grid; grid-template-columns: 46px 1fr; gap: 8px; align-items: baseline;
  padding: 7px 10px; margin: 1px 0; border-radius: 10px;
  text-decoration: none; color: var(--ink-2); font-size: 14.5px; line-height: 1.45;
  transition: background .2s, color .2s;
}
.toc a:hover { background: var(--surface); color: var(--ink); }
.toc a.active { color: var(--ink); font-weight: 600; background: var(--green-tint); }
.toc .t { font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); letter-spacing: .02em; }
.toc a.active .t { color: var(--green); }
.toc .done-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--green); margin-left: 6px; vertical-align: middle; opacity: 0; transform: scale(.4); transition: .3s var(--ease-out); }
.toc a.done .done-dot { opacity: 1; transform: none; }
.toc-group { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; color: var(--ink-3); text-transform: uppercase; padding: 18px 10px 6px; }
.toc-group:first-child { padding-top: 0; }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; align-items: center; padding: 40px 0 56px; }
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: .14em; color: var(--green); text-transform: uppercase; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.eyebrow .sep { width: 18px; height: 1px; background: var(--line-2); }
.hero h1 {
  font-size: clamp(36px, 5.4vw, 60px); line-height: 1.12; letter-spacing: -.01em;
  font-weight: 900; margin: 18px 0 20px;
}
.hero h1 .hl { color: var(--green); }
.lede { font-size: 18.5px; color: var(--ink-2); line-height: 1.8; margin: 0 0 28px; max-width: 34em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  height: 48px; padding: 0 20px; border-radius: 14px;
  font-size: 15.5px; font-weight: 600; text-decoration: none; cursor: pointer;
  border: 1px solid var(--line-2); background: #fff; color: var(--ink);
  transition: transform .15s, background .2s, box-shadow .2s, border-color .2s;
}
.btn:hover { background: var(--surface); color: var(--ink); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--green); border-color: var(--green); color: #fff; box-shadow: 0 6px 18px rgba(23, 107, 83, .22); }
.btn.primary:hover { background: var(--green-2); color: #fff; }
.btn svg { width: 18px; height: 18px; }
.hero-phones { position: relative; height: 470px; }
.phone {
  position: absolute; width: 210px; aspect-ratio: 9 / 19.5;
  border-radius: 34px; padding: 7px; background: #0e1512;
  box-shadow: 0 1px 0 1px #2b3530 inset, var(--shadow-2), 0 40px 80px rgba(18, 32, 26, .16);
}
.phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 28px; background: #fff; }
.hero-phones .phone.back { right: 0; top: 0; transform: rotate(4deg); opacity: .96; }
.hero-phones .phone.front { left: 0; top: 36px; transform: rotate(-3deg); }
@media (prefers-reduced-motion: no-preference) {
  .hero-phones .phone.front { animation: float 7s var(--ease-in-out) infinite; }
  .hero-phones .phone.back { animation: float 7s var(--ease-in-out) -3.5s infinite; }
}
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }

/* route */
.route { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin: 8px 0 20px; counter-reset: r; }
.route a {
  position: relative; display: block; padding: 16px 14px 14px; border-radius: 14px;
  border: 1px solid var(--line); text-decoration: none; color: var(--ink);
  background: #fff; transition: border-color .2s, transform .3s var(--ease-out), box-shadow .3s;
}
.route a:hover { border-color: var(--green); transform: translateY(-2px); box-shadow: var(--shadow-1); color: var(--ink); }
.route .n { font-family: var(--mono); font-size: 11px; color: var(--ink-3); }
.route b { display: block; font-size: 16px; margin-top: 4px; line-height: 1.3; }
.route small { display: block; color: var(--ink-3); font-size: 12.5px; line-height: 1.4; margin-top: 4px; }

/* truths */
.truths { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0 0 8px; }
.truth { padding: 18px; border-radius: var(--radius-sm); background: var(--surface); }
.truth b { display: block; font-size: 16px; line-height: 1.45; margin-bottom: 6px; }
.truth b .ne { color: var(--coral); font-weight: 900; padding: 0 2px; }
.truth p { margin: 0; font-size: 14px; color: var(--ink-2); line-height: 1.65; }

/* ---------- sections ---------- */
.section { padding: 64px 0 8px; border-top: 1px solid var(--line); margin-top: 48px; }
.section:first-of-type { border-top: 0; }
.sec-head { display: grid; grid-template-columns: auto 1fr; gap: 6px 20px; align-items: end; margin-bottom: 28px; }
.sec-num {
  grid-row: span 2;
  font-family: var(--font-latin); font-weight: 200; font-size: 76px; line-height: .9;
  color: var(--green); letter-spacing: -.04em; font-variant-numeric: tabular-nums;
}
.sec-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 10px; border-radius: 99px;
  font-family: var(--mono); font-size: 12px; letter-spacing: .02em;
  background: var(--surface); color: var(--ink-2); border: 1px solid var(--line);
}
.chip.green { background: var(--green-soft); color: var(--green); border-color: transparent; }
.chip.coral { background: var(--coral-soft); color: var(--coral); border-color: transparent; }
.chip svg { width: 13px; height: 13px; }
.sec-head h2 { margin: 0; font-size: clamp(28px, 3.6vw, 38px); line-height: 1.2; font-weight: 900; letter-spacing: -.005em; }
.goal { font-size: 18px; color: var(--ink-2); margin: 0 0 28px; padding-left: 16px; border-left: 3px solid var(--green); }
.main h3 { font-size: 21px; line-height: 1.4; margin: 40px 0 14px; font-weight: 800; }
.main h4 { font-size: 16.5px; margin: 24px 0 8px; font-weight: 700; }
.main p { margin: 0 0 16px; }
.main ul:not([class]), .main ol:not([class]) { padding-left: 1.4em; margin: 0 0 16px; }
.main li { margin: 4px 0; }
.muted { color: var(--ink-3); }
.small { font-size: 14.5px; }

/* steps */
.steps { list-style: none; padding: 0; margin: 0 0 24px; counter-reset: s; }
.steps > li {
  position: relative; counter-increment: s;
  padding: 0 0 22px 56px; margin: 0;
}
.steps > li::before {
  content: counter(s);
  position: absolute; left: 0; top: 0;
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-latin); font-weight: 600; font-size: 15px;
  background: #fff; color: var(--green); border: 1.5px solid var(--green);
}
.steps > li::after { content: ""; position: absolute; left: 17.5px; top: 42px; bottom: 6px; width: 1px; background: var(--line); }
.steps > li:last-child::after { display: none; }
.steps > li > b:first-child { display: block; font-size: 17.5px; margin-bottom: 4px; padding-top: 4px; }
.steps > li p { color: var(--ink-2); }
.steps > li p:last-child { margin-bottom: 0; }

/* callouts */
.callout {
  display: grid; grid-template-columns: 22px 1fr; gap: 12px;
  padding: 16px 18px; border-radius: var(--radius-sm); margin: 0 0 20px;
  background: var(--surface); font-size: 15.5px; line-height: 1.7;
}
.callout svg { width: 20px; height: 20px; margin-top: 3px; }
.callout > div > :last-child { margin-bottom: 0; }
.callout b { font-weight: 700; }
.callout.warn { background: var(--amber-soft); }
.callout.warn svg { color: var(--amber); }
.callout.stop { background: var(--coral-soft); }
.callout.stop svg { color: var(--coral); }
.callout.tip { background: var(--green-tint); }
.callout.tip svg { color: var(--green); }
.callout.info { background: var(--blue-soft); }
.callout.info svg { color: var(--blue); }
.callout ul { margin: 6px 0 0; padding-left: 1.2em; }

/* checklist */
.checklist { list-style: none; padding: 6px; margin: 0 0 24px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.checklist-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px 6px; font-weight: 700; font-size: 15px; }
.checklist-title .count { font-family: var(--mono); font-size: 12px; color: var(--ink-3); font-weight: 400; }
.checklist label {
  display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start;
  padding: 10px 12px; border-radius: 12px; cursor: pointer; font-size: 15.5px; line-height: 1.6;
  transition: background .2s;
}
.checklist label:hover { background: var(--surface); }
.checklist input { position: absolute; opacity: 0; pointer-events: none; }
.box {
  width: 22px; height: 22px; margin-top: 2px; border-radius: 7px;
  border: 1.5px solid var(--line-2); background: #fff; display: grid; place-items: center;
  transition: background .25s var(--ease-out), border-color .25s;
}
.box svg { width: 14px; height: 14px; color: #fff; stroke-dasharray: 20; stroke-dashoffset: 20; transition: stroke-dashoffset .35s var(--ease-out) .05s; }
.checklist input:checked + .box { background: var(--green); border-color: var(--green); }
.checklist input:checked + .box svg { stroke-dashoffset: 0; }
.checklist input:checked ~ span { color: var(--ink-3); }
.checklist input:focus-visible + .box { outline: 2px solid var(--green); outline-offset: 2px; }
.checklist small { display: block; color: var(--ink-3); font-size: 13.5px; }

/* prompt card */
.prompt {
  position: relative; margin: 0 0 24px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; box-shadow: var(--shadow-1);
  overflow: hidden;
  transition: box-shadow .3s, border-color .3s;
}
.prompt:hover { box-shadow: var(--shadow-2); border-color: var(--line-2); }
.prompt-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 14px 12px 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(#fff, #fbfcfb);
}
.prompt-id {
  font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: .04em;
  color: var(--green); background: var(--green-soft); border-radius: 7px; padding: 2px 7px; flex: none;
}
.prompt-title { font-weight: 700; font-size: 15.5px; line-height: 1.35; min-width: 0; flex: 1; }
.prompt-title small { display: block; font-weight: 400; font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.tool { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.tool i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); display: inline-block; }
.tool[data-tool="codex"] i { background: var(--ink); }
.tool[data-tool="aistudio"] i { background: var(--blue); }
.tool[data-tool="stitch"] i { background: var(--violet); }
.tool[data-tool="chat"] i { background: var(--green); }
.copy-btn {
  position: relative; flex: none;
  height: 38px; padding: 0 14px 0 12px; border-radius: 11px;
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--line-2); background: #fff; cursor: pointer;
  font-size: 14px; font-weight: 600; color: var(--ink);
  transition: background .25s var(--ease-out), color .25s, border-color .25s, transform .15s;
}
.copy-btn:hover { background: var(--surface); }
.copy-btn:active { transform: scale(.96); }
.copy-btn .ico { position: relative; width: 17px; height: 17px; }
.copy-btn .ico svg { position: absolute; inset: 0; width: 17px; height: 17px; transition: opacity .2s, transform .35s var(--ease-out); }
.copy-btn .ico .ok { opacity: 0; transform: scale(.5) rotate(-20deg); }
.copy-btn.copied { background: var(--green); border-color: var(--green); color: #fff; }
.copy-btn.copied .ico .cp { opacity: 0; transform: scale(.5); }
.copy-btn.copied .ico .ok { opacity: 1; transform: none; }
.prompt-body { position: relative; }
.prompt-clip {
  max-height: 168px; overflow: hidden;
  transition: max-height .55s var(--ease-out);
}
.prompt.expanded .prompt-clip { max-height: var(--full, 4000px); }
.prompt-md {
  padding: 16px 20px 20px;
  font-size: 15px; line-height: 1.75; color: var(--ink-2);
}
.prompt-md > :first-child { margin-top: 0; }
.prompt-md > :last-child { margin-bottom: 0; }
.prompt-md h1, .prompt-md h2, .prompt-md h3 { font-size: 15px; color: var(--ink); margin: 14px 0 4px; font-weight: 700; }
.prompt-md h1 { font-size: 16px; }
.prompt-md p { margin: 0 0 10px; }
.prompt-md ul, .prompt-md ol { margin: 0 0 10px; padding-left: 1.3em; }
.prompt-md li { margin: 2px 0; }
.prompt-md li > ul, .prompt-md li > ol { margin: 2px 0 0; }
.prompt-md strong { color: var(--ink); }
.prompt-md hr { border: 0; border-top: 1px dashed var(--line-2); margin: 14px 0; }
.prompt-md pre {
  margin: 8px 0 12px; padding: 12px 14px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--line);
  font-size: 13px; line-height: 1.6; overflow-x: auto; white-space: pre;
}
.prompt-md pre code { background: none; border: 0; padding: 0; font-size: 1em; }
.prompt-md code { font-size: .85em; }
.ph { background: #fff4d6; color: #7a4d00; border-radius: 5px; padding: 0 3px; box-shadow: inset 0 -1px 0 #f0d58f; }
.prompt-fade {
  position: absolute; left: 0; right: 0; bottom: 0; height: 84px; pointer-events: none;
  background: linear-gradient(rgba(255, 255, 255, 0), #fff 78%);
  transition: opacity .4s;
}
.prompt.expanded .prompt-fade, .prompt.short .prompt-fade { opacity: 0; }
.prompt-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 14px 12px 20px; margin-top: -4px; position: relative;
}
.prompt-foot .meta { font-size: 12.5px; color: var(--ink-3); }
.prompt-foot .meta .ph-note { color: #7a4d00; }
.expand-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px;
  border: 0; border-radius: 10px; background: var(--surface); cursor: pointer;
  font-size: 13.5px; font-weight: 600; color: var(--ink-2);
  transition: background .2s, color .2s;
}
.expand-btn:hover { background: var(--surface-2); color: var(--ink); }
.expand-btn svg { width: 15px; height: 15px; transition: transform .45s var(--ease-out); }
.prompt.expanded .expand-btn svg { transform: rotate(180deg); }
.prompt.short .expand-btn { display: none; }

/* figures */
.figure-row { display: flex; gap: 20px; flex-wrap: wrap; margin: 8px 0 28px; }
.figure { margin: 0; }
.figure .shot {
  width: 190px; border-radius: 26px; border: 6px solid #0e1512; overflow: hidden; background: #fff;
  box-shadow: var(--shadow-2);
}
.figure .shot.flat { border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-1); }
.figure figcaption { font-size: 13px; color: var(--ink-3); margin-top: 10px; max-width: 190px; line-height: 1.5; }

/* tables */
.table-wrap { overflow-x: auto; margin: 0 0 24px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
table { border-collapse: collapse; width: 100%; font-size: 14.5px; line-height: 1.6; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 700; background: var(--surface); font-size: 13.5px; color: var(--ink-2); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.t { font-family: var(--mono); font-size: 12.5px; color: var(--ink-3); white-space: nowrap; }
tr.brk td { background: var(--green-tint); color: var(--ink-3); }

/* schedule list */
.schedule { list-style: none; padding: 0; margin: 0 0 24px; }
.schedule li { display: grid; grid-template-columns: 96px 1fr auto; gap: 12px; align-items: baseline; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.schedule li:last-child { border-bottom: 0; }
.schedule .t { font-family: var(--mono); font-size: 13px; color: var(--ink-3); }
.schedule b { font-weight: 700; }
.schedule small { color: var(--ink-3); display: block; font-size: 13.5px; }
.schedule .d { font-family: var(--mono); font-size: 12px; color: var(--ink-3); }
.schedule li.brk { color: var(--ink-3); }
.schedule li.brk b { font-weight: 500; }
.bar { height: 6px; border-radius: 3px; background: var(--surface-2); margin: 6px 0 0; overflow: hidden; }

/* accordion */
.acc { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 0 0 24px; background: #fff; }
.acc details { border-bottom: 1px solid var(--line); }
.acc details:last-child { border-bottom: 0; }
.acc summary {
  list-style: none; cursor: pointer; padding: 16px 52px 16px 20px; position: relative;
  font-weight: 700; font-size: 16px; line-height: 1.5;
  transition: background .2s;
}
.acc summary::-webkit-details-marker { display: none; }
.acc summary:hover { background: var(--surface); }
.acc summary::after {
  content: ""; position: absolute; right: 22px; top: 50%; width: 9px; height: 9px;
  border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3);
  transform: translateY(-70%) rotate(45deg); transition: transform .35s var(--ease-out);
}
.acc details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.acc summary small { display: block; font-weight: 400; color: var(--ink-3); font-size: 13.5px; }
.acc .acc-body { padding: 0 20px 18px; font-size: 15.5px; color: var(--ink-2); }
.acc .acc-body > :last-child { margin-bottom: 0; }

/* glossary */
.glossary { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 0 0 24px; }
.term { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
.term b { display: block; font-size: 15.5px; }
.term span { font-size: 14px; color: var(--ink-2); line-height: 1.6; display: block; margin-top: 2px; }

/* ladder */
.ladder { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: 0 0 24px; position: relative; }
.ladder > div { padding: 16px 14px 14px; border: 1px solid var(--line); margin-left: -1px; background: #fff; }
.ladder > div:first-child { border-radius: 14px 0 0 14px; margin-left: 0; background: var(--green-tint); border-color: var(--green-soft); }
.ladder > div:last-child { border-radius: 0 14px 14px 0; }
.ladder .k { font-family: var(--mono); font-size: 11px; color: var(--ink-3); }
.ladder b { display: block; font-size: 15.5px; margin: 2px 0 4px; }
.ladder p { font-size: 13.5px; color: var(--ink-2); line-height: 1.55; margin: 0; }
.here { display: inline-block; font-size: 11.5px; font-weight: 700; color: #fff; background: var(--green); border-radius: 99px; padding: 1px 8px; margin-top: 6px; }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 60;
  transform: translate(-50%, 24px); opacity: 0;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px; border-radius: 14px;
  background: var(--ink); color: #fff; font-size: 14.5px; box-shadow: 0 16px 40px rgba(0, 0, 0, .2);
  transition: opacity .3s, transform .5s var(--ease-out);
  pointer-events: none; max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast svg { width: 18px; height: 18px; color: #7fd6b2; flex: none; }

/* search */
.search {
  position: fixed; inset: 0; z-index: 70; display: none;
  background: rgba(18, 32, 26, .28); backdrop-filter: blur(4px);
  padding: 12vh 16px 16px;
}
.search.open { display: block; animation: fadeIn .2s ease-out; }
.search-panel {
  max-width: 620px; margin: 0 auto; background: #fff; border-radius: 20px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .25); overflow: hidden;
  animation: pop .35s var(--ease-out);
}
.search-input { display: flex; align-items: center; gap: 12px; padding: 0 18px; border-bottom: 1px solid var(--line); }
.search-input svg { width: 20px; height: 20px; color: var(--ink-3); flex: none; }
.search-input input { flex: 1; height: 60px; border: 0; outline: 0; font: inherit; font-size: 17px; background: transparent; min-width: 0; }
.search-results { max-height: 56vh; overflow: auto; padding: 8px; list-style: none; margin: 0; }
.search-results a { display: block; padding: 10px 12px; border-radius: 12px; text-decoration: none; color: var(--ink); }
.search-results a.sel, .search-results a:hover { background: var(--green-tint); }
.search-results small { display: block; color: var(--ink-3); font-size: 13px; line-height: 1.5; margin-top: 2px; }
.search-results .k { font-family: var(--mono); font-size: 11px; color: var(--green); margin-right: 6px; }
.search-empty { padding: 24px; text-align: center; color: var(--ink-3); font-size: 14.5px; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }

/* mobile sheet */
.sheet { position: fixed; inset: 0; z-index: 65; display: none; }
.sheet.open { display: block; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(18, 32, 26, .32); animation: fadeIn .25s ease-out; }
.sheet-panel {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 82vh; overflow: auto;
  background: #fff; border-radius: 22px 22px 0 0; padding: 10px 16px 28px;
  animation: sheetUp .45s var(--ease-out);
}
.sheet-grip { width: 40px; height: 4px; border-radius: 2px; background: var(--line-2); margin: 4px auto 12px; }
@keyframes sheetUp { from { transform: translateY(100%); } }

/* reveal */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal:not(.in) { opacity: 0; transform: translateY(10px); }
  .js .reveal { transition: opacity .55s var(--ease-out), transform .7s var(--ease-out); }
  .js .reveal.in { opacity: 1; transform: none; }
}

/* footer */
.foot { margin-top: 72px; padding-top: 28px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--ink-3); }

/* ---------- responsive ---------- */
.menu-btn { display: none; }
@media (max-width: 1080px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 0; padding: calc(var(--top) + 8px) 24px 96px; }
  .sidebar { display: none; }
  .main { width: 100%; max-width: 760px; margin: 0 auto; }
  .menu-btn { display: inline-flex; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  :root { --top: 58px; }
  .topbar { padding: 0 12px; gap: 8px; }
  .brand-text strong { font-size: 14px; }
  .brand-text > span, .hide-sm { display: none; }
  .topbar-now { display: none; }
  .icon-btn .lbl, .icon-btn .hint { display: none; }
  .icon-btn { padding: 0; width: 42px; }
  .menu-btn.icon-btn { width: auto; padding: 0 12px; }
  .menu-btn .lbl { display: inline; }
  .layout { padding: calc(var(--top) + 4px) 16px 88px; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 28px 0 32px; }
  .hero-phones { height: 330px; order: -1; max-width: 330px; width: 100%; margin: 0 auto; }
  .phone { width: 150px; border-radius: 26px; padding: 5px; }
  .phone img { border-radius: 21px; }
  .hero-phones .phone.front { left: 8%; top: 24px; }
  .hero-phones .phone.back { right: 8%; }
  .lede { font-size: 17px; }
  .route { grid-template-columns: 1fr 1fr; }
  .route a:last-child { grid-column: span 2; }
  .truths { grid-template-columns: 1fr; }
  .section { padding-top: 44px; margin-top: 32px; }
  .sec-num { font-size: 56px; }
  .sec-head { gap: 4px 14px; }
  .goal { font-size: 16.5px; }
  .steps > li { padding-left: 48px; }
  .prompt-head { flex-wrap: wrap; padding: 12px 12px 10px 14px; gap: 8px 10px; }
  .prompt-title { flex-basis: calc(100% - 120px); order: 1; }
  .prompt-id { order: 0; }
  .copy-btn { order: 2; margin-left: auto; }
  .tool { order: 3; flex-basis: 100%; }
  .prompt-md { padding: 14px 16px 18px; font-size: 14.5px; }
  .prompt-foot { padding: 0 12px 12px 16px; }
  .glossary { grid-template-columns: 1fr; }
  .ladder { grid-template-columns: 1fr; }
  .ladder > div { margin-left: 0; margin-top: -1px; }
  .ladder > div:first-child { border-radius: 14px 14px 0 0; }
  .ladder > div:last-child { border-radius: 0 0 14px 14px; }
  .schedule li { grid-template-columns: 78px 1fr; }
  .schedule .d { display: none; }
  .figure .shot { width: 150px; }
  .figure figcaption { max-width: 150px; }
  .figure-row { gap: 14px; }
  table { font-size: 14px; }
}

@media print {
  .topbar, .sidebar, .progress, .toast, .search, .sheet, .expand-btn, .copy-btn, .prompt-fade { display: none !important; }
  .layout { display: block; padding: 0; }
  .prompt-clip { max-height: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .section { break-before: page; }
}
.sheet .toc-indicator { display: none; }
