:root {
  --bg: #1b1814;
  --panel: #252019;
  --line: rgba(255, 244, 232, 0.14);
  --ink: #fffaf2;
  --muted: #bdb3a8;
  --green: #f1874b;
  --green-dark: #b74b20;
  --paper: #f5efe6;
  --paper-ink: #201b16;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body { margin: 0; min-width: 320px; color: var(--ink); background: radial-gradient(800px 520px at 82% 0, rgba(241, 135, 75, 0.15), transparent 70%), var(--bg); font-family: var(--sans); font-size: 17px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
button, a { color: inherit; font: inherit; -webkit-tap-highlight-color: transparent; }
a { text-decoration: none; }
h1, h2, h3, p, li, small, strong, button, a { word-break: auto-phrase; line-break: strict; text-wrap: pretty; }
h1, h2 { text-wrap: balance; }

.site-header, main, footer { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.site-header { min-height: 76px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; border-bottom: 1px solid var(--line); }
.back-link { width: fit-content; display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; font-weight: 750; }
.back-link:hover { color: var(--green); }
.brand { display: flex; align-items: center; gap: 10px; font-size: 13px; letter-spacing: 0.13em; }
.brand-mark { width: 32px; height: 32px; display: grid; place-items: center; color: var(--green); border: 1px solid rgba(241,135,75,0.5); border-radius: 50%; letter-spacing: 0; font-weight: 900; }
.demo-label { justify-self: end; padding: 7px 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 99px; font-size: 12px; font-weight: 750; }

.story-section { min-height: calc(100svh - 76px); display: grid; align-content: center; padding-block: 64px 76px; }
.story-heading { max-width: 900px; margin-inline: auto; text-align: center; }
.eyebrow, .card-label { margin: 0 0 12px; color: var(--green); font-size: 12px; line-height: 1.4; font-weight: 850; letter-spacing: 0.12em; text-transform: uppercase; }
.story-heading h1 { margin: 0; font-size: clamp(38px, 5.6vw, 66px); line-height: 1.13; letter-spacing: -0.045em; }
.lead { margin: 17px 0 0; color: var(--muted); font-size: clamp(17px, 1.8vw, 21px); }

.story-stage { margin-top: 48px; padding: 24px; overflow: hidden; border: 1px solid var(--line); border-radius: 28px; background: rgba(17,33,31,0.9); box-shadow: 0 28px 80px rgba(0,0,0,0.24); }
.now-playing { min-height: 56px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 0 7px 18px; }
.now-playing strong { font-size: clamp(18px, 2.3vw, 26px); line-height: 1.3; }
.live-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 6px rgba(241,135,75,0.12); }
.story-count { color: var(--muted); font-size: 13px; font-weight: 800; }
.flow-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.flow-step { position: relative; min-height: 208px; display: flex; flex-direction: column; align-items: flex-start; padding: 20px; color: var(--muted); text-align: left; border: 1px solid var(--line); border-radius: 19px; background: rgba(255,255,255,0.025); cursor: pointer; transition: transform 240ms ease, color 240ms ease, border-color 240ms ease, background 240ms ease; }
.flow-step:not(:last-child)::after { content: "→"; position: absolute; z-index: 2; right: -20px; top: 50%; width: 28px; height: 28px; display: grid; place-items: center; color: #718178; background: var(--panel); border-radius: 50%; font-size: 15px; transform: translateY(-50%); }
.flow-step.is-active { color: var(--ink); border-color: rgba(241,135,75,0.62); background: linear-gradient(145deg, rgba(241,135,75,0.16), rgba(241,135,75,0.04)); transform: translateY(-5px); }
.flow-step.is-done { color: #e1d9d0; border-color: rgba(241,135,75,0.26); }
.step-number { font-size: 11px; font-weight: 900; letter-spacing: 0.1em; }
.step-icon { width: 48px; height: 48px; display: grid; place-items: center; margin-block: 24px 19px; color: var(--green); border: 1px solid rgba(241,135,75,0.28); border-radius: 14px; background: rgba(241,135,75,0.08); font-size: 21px; font-weight: 900; }
.flow-step strong { color: inherit; font-size: 20px; }
.flow-step small { display: block; margin-top: 5px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.flow-step.is-active small { color: #ced8d0; }

.stage-footer { display: flex; align-items: center; gap: 20px; margin-top: 18px; }
.story-progress { flex: 1; height: 7px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,0.09); }
.story-progress span { display: block; width: 25%; height: 100%; border-radius: inherit; background: var(--green); transition: width 520ms ease; }
.replay-button { min-height: 42px; display: inline-flex; align-items: center; gap: 8px; padding: 0 15px; color: var(--muted); border: 1px solid var(--line); border-radius: 99px; background: transparent; cursor: pointer; font-size: 13px; font-weight: 800; }
.replay-button:hover { color: var(--ink); border-color: rgba(241,135,75,0.4); }
.final-result { max-height: 0; display: flex; justify-content: space-between; align-items: center; gap: 24px; overflow: hidden; opacity: 0; transform: translateY(12px); transition: max-height 420ms ease, opacity 320ms ease, transform 320ms ease, margin 320ms ease, padding 320ms ease; }
.final-result.is-visible { max-height: 130px; margin-top: 18px; padding: 18px 20px; opacity: 1; transform: none; border: 1px solid rgba(241,135,75,0.3); border-radius: 16px; background: rgba(241,135,75,0.1); }
.final-result span, .final-result strong { display: block; }
.final-result div > span { color: var(--green); font-size: 11px; font-weight: 900; letter-spacing: 0.1em; }
.final-result strong { margin-top: 2px; font-size: 17px; }
.final-result a, .approval-row > a { flex: 0 0 auto; min-height: 46px; display: inline-flex; align-items: center; gap: 18px; padding: 0 19px; color: #26170f; background: var(--green); border-radius: 99px; font-size: 14px; font-weight: 850; }
.result-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; }
.result-pills span { padding: 7px 10px; color: #ffd4bd; border: 1px solid rgba(241,135,75,0.28); border-radius: 99px; font-size: 12px; font-weight: 800; }

.meaning-section, .detail-section, .boundary-section { padding-block: 100px; border-top: 1px solid var(--line); }
.meaning-section > h2, .boundary-section h2 { max-width: 820px; margin: 0; font-size: clamp(30px, 4.2vw, 50px); line-height: 1.2; letter-spacing: -0.035em; }
.meaning-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 42px; }
.meaning-grid article { min-height: 190px; display: flex; flex-direction: column; justify-content: flex-end; padding: 24px; border: 1px solid var(--line); border-radius: 20px; background: rgba(255,255,255,0.025); }
.meaning-grid article > span { width: 40px; height: 40px; display: grid; place-items: center; margin-bottom: auto; color: var(--green); border-radius: 12px; background: rgba(241,135,75,0.09); font-weight: 900; }
.meaning-grid strong { font-size: 19px; }
.meaning-grid p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }

.detail-section details { overflow: hidden; color: var(--paper-ink); background: var(--paper); border-radius: 26px; }
.detail-section summary { min-height: 112px; display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 25px 30px; cursor: pointer; list-style: none; }
.detail-section summary::-webkit-details-marker { display: none; }
.detail-section summary small, .detail-section summary strong { display: block; }
.detail-section summary small { color: #69736c; font-size: 13px; }
.detail-section summary strong { margin-top: 3px; font-size: clamp(22px, 2.7vw, 30px); }
.summary-icon { flex: 0 0 auto; width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid #cfc9be; border-radius: 50%; font-size: 23px; transition: transform 180ms ease; }
details[open] .summary-icon { transform: rotate(45deg); }
.detail-content { padding: 8px 30px 30px; border-top: 1px solid #d8d0c3; }
.detail-intro { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: end; padding-block: 30px; }
.detail-intro .eyebrow { color: var(--green-dark); }
.detail-intro h2 { margin: 0; font-size: 32px; }
.detail-intro > p { margin: 0; color: #667069; }
.source-list { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px; border: 1px solid #d8d0c3; border-radius: 15px; }
.source-list span { padding: 8px 11px; color: #56625a; background: white; border-radius: 99px; font-size: 13px; font-weight: 750; }
.before-after { display: grid; grid-template-columns: 1fr auto 1fr; gap: 20px; align-items: center; margin-top: 22px; }
.before-card, .after-card { min-height: 315px; padding: 24px; border: 1px solid #d8d0c3; border-radius: 18px; background: white; }
.card-label { color: #657068; font-size: 11px; }
.before-card h3, .after-card h3 { margin: 0; font-size: 23px; }
.before-card blockquote { margin: 22px 0 0; padding: 17px 18px; color: #665f58; background: #f2ece3; border-left: 3px solid var(--green); border-radius: 0 11px 11px 0; font-size: 14px; }
.attachment-row { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 15px; }
.attachment-row span { padding: 8px 10px; color: #685f57; background: #f5f1eb; border: 1px solid #ded4c8; border-radius: 9px; font-size: 12px; font-weight: 750; }
.transform-arrow { color: var(--green-dark); font-size: 28px; font-weight: 900; }
.report-row { display: grid; gap: 3px; margin-top: 12px; padding: 13px 15px; background: #f3efe7; border-radius: 11px; }
.report-row strong { font-size: 14px; }
.report-row span { color: #68716b; font-size: 13px; }
.report-row.is-complete { background: #e6efe6; }
.report-row.is-attention { background: #f6e9db; }
.approval-row { margin-top: 22px; padding: 20px; display: flex; justify-content: space-between; align-items: center; gap: 24px; color: var(--ink); background: var(--bg); border-radius: 17px; }
.approval-row > div { display: flex; align-items: center; gap: 13px; }
.approval-row p { max-width: 610px; margin: 0; color: #bdc7bf; font-size: 14px; }
.approval-row p strong { color: white; }
.human-badge { flex: 0 0 auto; width: 39px; height: 39px; display: grid; place-items: center; color: var(--bg); background: var(--green); border-radius: 50%; font-weight: 900; }
.reply-card { margin-top: 18px; padding: 24px; border: 1px solid #d8d0c3; border-radius: 18px; background: white; }
.reply-card h3 { margin: 0; font-size: 22px; }
.reply-card > p:not(.card-label) { max-width: 820px; margin: 13px 0 0; color: #69615a; }
.reply-card > span { display: inline-flex; margin-top: 18px; padding: 7px 10px; color: var(--green-dark); background: #f8dfd0; border-radius: 99px; font-size: 12px; font-weight: 800; }
.boundary-section { display: grid; grid-template-columns: 1fr 1fr; gap: 54px; align-items: center; }
.boundary-section ul { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.boundary-section li { padding: 10px 14px; color: #d9dfda; border: 1px solid var(--line); border-radius: 99px; font-size: 14px; font-weight: 750; }
footer { min-height: 90px; display: flex; justify-content: space-between; align-items: center; gap: 20px; color: var(--muted); border-top: 1px solid var(--line); font-size: 12px; font-weight: 700; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 900px) {
  .flow-grid { grid-template-columns: repeat(2, 1fr); }
  .flow-step:not(:last-child)::after { display: none; }
  .meaning-grid { grid-template-columns: 1fr; }
  .meaning-grid article { min-height: 150px; }
  .before-after { grid-template-columns: 1fr; }
  .transform-arrow { transform: rotate(90deg); justify-self: center; }
  .boundary-section { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .site-header, main, footer { width: min(100% - 24px, 1180px); }
  .site-header { grid-template-columns: 1fr auto; min-height: 68px; }
  .brand { display: none; }
  .story-section { min-height: calc(100svh - 68px); padding-block: 46px 56px; }
  .story-heading h1 { font-size: clamp(34px, 10.5vw, 49px); }
  .story-stage { margin-top: 34px; padding: 16px; border-radius: 21px; }
  .now-playing { grid-template-columns: auto 1fr; padding-inline: 3px; }
  .story-count { grid-column: 2; }
  .flow-grid { grid-template-columns: repeat(2, 1fr); gap: 9px; }
  .flow-step { min-height: 132px; display: flex; align-items: flex-start; gap: 0; padding: 14px; }
  .step-number { display: none; }
  .step-icon { width: 38px; height: 38px; margin: 0 0 12px; border-radius: 11px; font-size: 17px; }
  .flow-step strong { font-size: 17px; }
  .flow-step small { margin-top: 2px; font-size: 12px; }
  .stage-footer { align-items: stretch; flex-direction: column; gap: 13px; }
  .replay-button { justify-content: center; }
  .final-result { align-items: stretch; flex-direction: column; }
  .final-result.is-visible { max-height: 250px; }
  .final-result a { justify-content: center; }
  .meaning-section, .detail-section, .boundary-section { padding-block: 74px; }
  .detail-section summary { padding: 22px 20px; }
  .detail-content { padding: 4px 18px 20px; }
  .detail-intro { grid-template-columns: 1fr; gap: 10px; }
  .metrics { grid-template-columns: 1fr; }
  .approval-row { align-items: stretch; flex-direction: column; }
  .approval-row > a { justify-content: center; }
  footer { align-items: flex-start; flex-direction: column; justify-content: center; gap: 2px; }
}

@media (max-width: 390px) {
  .demo-label { display: none; }
  .site-header { grid-template-columns: 1fr; }
  .story-heading h1 { font-size: 34px; }
  .now-playing strong { font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
