/* How it works (/walkthrough): six scenes, one story. A sticky rail on the left keeps the reader's
   place and fills as they move; each scene rises in once (js/walkthrough.js). Everything is plain
   text and visible without scripts: the rail is a list of anchors and the scenes only fade in
   once the script has marked the page ready. Loaded after site.css and evidence.css on this page. */

.wk { padding-block: 8px 40px; }
.wk-note { margin: 0 0 36px; }
.wk-layout { display: grid; grid-template-columns: 264px minmax(0, 1fr); gap: 64px; align-items: start; }

/* ---------------- the rail ---------------- */
.wk-rail { position: sticky; top: 88px; display: grid; grid-template-columns: 4px minmax(0, 1fr); gap: 0 18px; }
.wk-rail-track { position: relative; width: 4px; border-radius: 2px; background: #f1e3d6; }
.wk-rail-fill { position: absolute; left: 0; top: 0; width: 100%; height: 0; border-radius: 2px; background: linear-gradient(180deg, #e27f48, #994619); transition: height 520ms var(--spring); }
.wk-rail-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.wk-rail-list a { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 1px 10px; padding: 10px 12px; border-radius: 12px; color: #50545a; transition: background 160ms ease, color 160ms ease; }
.wk-rail-list a:hover { background: #fff5ec; color: #111827; }
.wk-rail-list a[aria-current="step"] { background: #fff5ec; color: #111827; }
.wk-rail-n { grid-row: span 2; padding-top: 3px; font-size: 12px; font-weight: 700; color: #934019; }
.wk-rail-t { font-size: 15px; font-weight: 650; letter-spacing: -.01em; }
.wk-rail-s { font-size: 12.5px; line-height: 1.4; }

/* ---------------- the scenes ---------------- */
.wk-scenes { display: grid; gap: 36px; }
.wk-scene { padding: 36px clamp(22px, 4vw, 48px) 40px; border: 1px solid #edcfb6; border-radius: 22px; background: radial-gradient(ellipse at 18% 0%, #fff6ee, transparent 60%), #fff; scroll-margin-top: 96px; }
.wk.is-ready .wk-scene { opacity: 0; transform: translateY(28px); transition: opacity 700ms var(--spring), transform 700ms var(--spring); }
.wk.is-ready .wk-scene.is-in { opacity: 1; transform: none; }
.wk-scene h2 { margin: 10px 0 14px; font-size: clamp(28px, 3vw, 42px); }
.wk-lede { max-width: 640px; }
.wk-card { margin-top: 26px; border-radius: 18px; }
.wk .ev-fine { margin-top: 16px; }

/* the conversations: June (or Kept) on the left in ivory, the person on the right in charcoal */
.wk-chat { display: grid; gap: 12px; padding: 22px; background: #fbf7f2; border: 1px solid #efdfd0; }
.wk-msg { max-width: 82%; padding: 14px 18px; border-radius: 18px; }
.wk-msg p { margin: 0; font-size: 16px; line-height: 1.55; color: #111827; }
.wk-msg--june { justify-self: start; background: #fff; border: 1px solid #edcfb6; border-top-left-radius: 6px; }
.wk-msg--partner { justify-self: end; background: #111827; border-top-right-radius: 6px; }
.wk-msg--partner p { color: #f8fafc; }
.wk-who { display: block; margin-bottom: 4px; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #934019; }
.wk-msg--partner .wk-who { color: #f5b887; }
.wk-cite { display: inline-block; margin-top: 10px; padding: 4px 10px; border-radius: 999px; background: #fff5ec; border: 1px solid #edcfb6; font-size: 12.5px; font-weight: 650; color: #934019; text-decoration: none; }
.wk-cite:hover { background: #ffe9d8; }
.wk-chat-foot { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: #50545a; }
.wk-dot { width: 8px; height: 8px; border-radius: 50%; background: #1f7a4d; box-shadow: 0 0 0 4px #dff2e5; }

/* the knowledge item and the draft: white cards with the product's fields */
.wk-item, .wk-draft { padding: 26px 28px; background: #fff; border: 1px solid #e5e0dc; }
.wk-item-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.wk-item-state { padding: 6px 10px; border-radius: 999px; background: #dff2e5; color: #1f5a34; font-size: 12px; font-weight: 700; }
.wk-item h3, .wk-draft h3 { margin: 16px 0 14px; font-size: 22px; }
.wk-item-grid { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px 16px; margin: 0; font-size: 15px; line-height: 1.6; }
.wk-item-grid dt { font-weight: 700; color: #111827; }
.wk-item-grid dd { margin: 0; color: #4b5563; }
.wk-item-review { margin: 18px 0 8px; padding-top: 14px; border-top: 1px solid #ece7e1; font-size: 13.5px; color: #50545a; }
.wk-draft ol { margin: 0; padding-left: 22px; font-size: 15.5px; line-height: 1.85; }
.wk-draft-gap { margin: 14px 0; font-size: 15px; color: #111827; }

/* the source: the words themselves, on charcoal */
.wk-source { margin: 26px 0 0; padding: 28px 30px; background: #111827; color: #f8fafc; }
.wk-source figcaption { font-size: 12px; letter-spacing: .04em; color: #d1d5db; }
.wk-source blockquote { margin: 18px 0 0; font-size: clamp(19px, 2vw, 23px); line-height: 1.55; color: #fff; }

/* the honest unknown */
.wk-unknown { padding: 24px 26px; background: #fff8f2; border: 1px solid #f0d9c6; border-left: 4px solid #994619; }
.evidence-page .wk-unknown-line { margin: 12px 0 0; font-size: 19px; color: #111827; }
.evidence-page .wk-unknown-next { margin: 10px 0 0; font-size: 15px; color: #50545a; }

/* ---------------- narrow screens: the rail becomes a strip of chips under the bar ---------------- */
@media (max-width: 1000px) {
  .wk-layout { grid-template-columns: 1fr; gap: 20px; }
  .wk-rail { top: 60px; z-index: 5; grid-template-columns: 1fr; gap: 0; margin: 0 -24px; padding: 10px 24px; background: rgba(255, 255, 255, 0.92); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
  .wk-rail-track { display: none; }
  .wk-rail-list { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .wk-rail-list::-webkit-scrollbar { display: none; }
  .wk-rail-list a { grid-template-columns: auto auto; gap: 0 6px; padding: 8px 12px; border: 1px solid #e5e0dc; border-radius: 999px; background: #fff; white-space: nowrap; }
  .wk-rail-n { grid-row: auto; padding-top: 0; }
  .wk-rail-s { display: none; }
  .wk-rail-list a[aria-current="step"] { background: #111827; border-color: #111827; color: #fff; }
  .wk-rail-list a[aria-current="step"] .wk-rail-n { color: #f5b887; }
  .wk-scene { padding: 26px 20px 30px; scroll-margin-top: 120px; }
  .wk-msg { max-width: 94%; }
  .wk-item-grid { grid-template-columns: 1fr; gap: 4px 0; }
  .wk-item-grid dd { margin-bottom: 8px; }
}
@media (max-width: 420px) {
  .wk-rail { margin: 0 -18px; padding: 10px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .wk.is-ready .wk-scene { opacity: 1; transform: none; transition: none; }
  .wk-rail-fill { transition: none; }
}
