/* ─────────────────────────────────────────────────────
   Journey explainer (#journey). Uses the design tokens in styles.css.
   Motion is driven by journey.js. Nothing inside the phone uses CSS
   transitions, so the live section and the exported video are the same
   frame for frame; only the step list's hover/active styling eases.
   ───────────────────────────────────────────────────── */
.jy-stage{
  display:grid; grid-template-columns:minmax(300px, 420px) minmax(0, 460px);
  justify-content:center; align-items:center; gap:var(--space-16);
}

/* ── Phone ── */
.jy-phone{position:relative; padding-top:150px; justify-self:center; width:300px;}
.jy-thoughts{position:absolute; inset:0 -40px auto -40px; height:140px; pointer-events:none;}
.jy-thought{
  position:absolute; white-space:nowrap; font-size:.8125rem; color:var(--text-secondary);
  padding:.35rem .75rem; border-radius:var(--radius-full);
  background:var(--surface-2); border:1px solid var(--border-subtle); opacity:0;
}
.jy-thought-main{
  left:50%; top:50px; font-weight:600; color:var(--text-primary); font-size:.875rem;
  background:var(--surface-3); border-color:var(--border-medium);
}
.jy-thought-main.is-picked{border-color:var(--amber-border); box-shadow:0 0 22px var(--amber-subtle);}

.jy-device{
  position:relative; width:300px; height:560px; border-radius:42px; padding:12px;
  background:linear-gradient(160deg, #26262f, #121218);
  border:1px solid var(--border-medium); box-shadow:var(--shadow-elevated), 0 0 60px var(--purple-glow);
}
.jy-notch{position:absolute; top:22px; left:50%; width:84px; height:22px; margin-left:-42px; border-radius:var(--radius-full); background:#000; z-index:3;}
.jy-screen{position:relative; width:100%; height:100%; border-radius:32px; overflow:hidden; background:var(--surface-1);}
.jy-layer{position:absolute; inset:0; padding:56px 16px 16px; opacity:0;}
.jy-title{font-size:1.375rem; font-weight:700; margin-bottom:var(--space-4);}
.jy-label{font-size:.625rem; font-weight:600; letter-spacing:.08em; text-transform:uppercase; color:var(--text-tertiary); margin:var(--space-4) 0 var(--space-2);}

/* Capture */
.jy-bar{
  display:flex; align-items:center; gap:var(--space-2); min-height:52px; padding:.5rem .5rem .5rem .875rem;
  border-radius:var(--radius-lg); background:var(--surface-2); border:1px solid var(--purple-border);
}
.jy-input{flex:1; font-size:.875rem; line-height:1.35; color:var(--text-primary);}
.jy-caret{display:inline-block; width:2px; height:1em; margin-left:1px; vertical-align:-2px; background:var(--purple-400);}
.jy-send{
  flex:none; display:grid; place-items:center; width:32px; height:32px; border-radius:50%;
  background:var(--surface-4); color:var(--text-tertiary);
}
.jy-send.is-ready{background:var(--purple-500); color:#fff;}
.jy-hint{margin-top:var(--space-3); font-size:.75rem; color:var(--text-tertiary);}

/* Sorted */
.jy-sort-card{padding:var(--space-4); border-radius:var(--radius-lg); background:var(--surface-2); border:1px solid var(--border-subtle);}
.jy-card-title{font-size:.9375rem; font-weight:600; line-height:1.35;}
.jy-area-row, .jy-lens{display:flex; flex-wrap:wrap; gap:6px;}
.jy-chip{
  font-size:.6875rem; font-weight:500; padding:.3rem .65rem; border-radius:var(--radius-full);
  border:1px solid var(--border-medium); background:var(--surface-3); color:var(--text-secondary);
}
.jy-lens{gap:4px; flex-wrap:nowrap;}
.jy-lens .jy-chip{padding:.3rem .5rem;}
.jy-chip.is-on{border-color:var(--purple-400); background:rgba(168,85,247,.16); color:var(--purple-200); font-weight:600;}
.jy-project-name{display:flex; align-items:center; gap:var(--space-2); font-size:.875rem; font-weight:600; color:var(--teal-400);}
.jy-file{
  margin-top:var(--space-4); display:flex; align-items:center; justify-content:center; gap:6px; height:36px;
  border-radius:var(--radius-md); background:var(--purple-500); color:#fff; font-size:.8125rem; font-weight:600; opacity:0;
}
.jy-file.is-filed{background:var(--success); color:#04130a;}
.jy-donewhen{
  margin-top:var(--space-2); font-size:.75rem; color:var(--amber-400); padding:.4rem .6rem;
  border-radius:var(--radius-sm); background:var(--amber-subtle); border:1px solid var(--amber-border); display:inline-block;
}

/* Today */
.jy-today .jy-title{margin-bottom:var(--space-3);}
.jy-hidden{font-size:.625rem; white-space:nowrap; color:var(--text-tertiary); margin-top:var(--space-2); opacity:0;}
.jy-hidden b{color:var(--purple-300); font-weight:600;}
.jy-rows{margin-top:var(--space-3); display:flex; flex-direction:column;}
.jy-row{
  display:flex; align-items:center; gap:var(--space-3); padding:.7rem .25rem; overflow:hidden;
  border-bottom:1px solid var(--border-subtle); opacity:0; max-height:64px;
}
.jy-row-new{border-radius:var(--radius-sm);}
.jy-row-new.is-fresh{background:var(--purple-subtle);}
.jy-check{
  flex:none; display:grid; place-items:center; width:18px; height:18px; border-radius:50%;
  border:1.5px solid var(--text-tertiary); color:transparent;
}
.jy-check.is-done{background:var(--success); border-color:var(--success); color:#04130a;}
.jy-row-title{flex:1; min-width:0; font-size:.8125rem; line-height:1.3;}
.jy-row.is-struck .jy-row-title{color:var(--text-tertiary); text-decoration:line-through;}
.jy-tag{
  flex:none; font-size:.625rem; font-weight:600; color:var(--text-tertiary); padding:.15rem .45rem;
  border-radius:var(--radius-full); background:var(--surface-3);
}
.jy-lensed .jy-tag{opacity:0;}

.jy-toast{
  position:absolute; left:16px; right:16px; bottom:18px; padding:var(--space-4);
  border-radius:var(--radius-lg); background:var(--surface-3); border:1px solid var(--teal-border); opacity:0;
}
.jy-toast-head{display:flex; justify-content:space-between; font-size:.8125rem; font-weight:600;}
.jy-toast-count{color:var(--success); font-weight:500; font-size:.75rem;}
.jy-bar-track{height:4px; margin:var(--space-3) 0; border-radius:2px; background:var(--surface-4); overflow:hidden;}
.jy-bar-fill{height:100%; background:linear-gradient(90deg, var(--teal-500), var(--teal-400)); transform-origin:left; transform:scaleX(.34);}
.jy-next{font-size:.75rem; color:var(--text-secondary); opacity:0;}
.jy-next b{color:var(--text-primary); font-weight:600;}

.jy-tap{
  position:absolute; width:34px; height:34px; border-radius:50%; opacity:0; pointer-events:none; z-index:4;
  background:rgba(255,255,255,.22); border:2px solid rgba(255,255,255,.55);
}

/* ── Steps ── */
.jy-steps{list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:var(--space-2);}
.jy-step{
  width:100%; display:flex; gap:var(--space-4); text-align:left; cursor:pointer;
  padding:var(--space-4); border-radius:var(--radius-lg); background:transparent;
  border:1px solid transparent; transition:all var(--duration-normal) var(--ease-out);
}
.jy-step:hover{background:var(--surface-1);}
.jy-step.is-active{background:var(--surface-2); border-color:var(--purple-border);}
.jy-step-num{font-size:.8125rem; font-weight:700; color:var(--text-tertiary); padding-top:2px; transition:color var(--duration-normal);}
.jy-step.is-active .jy-step-num{color:var(--purple-400);}
.jy-step-body{display:flex; flex-direction:column; gap:2px;}
.jy-step-title{font-size:1.0625rem; font-weight:600; color:var(--text-secondary); transition:color var(--duration-normal);}
.jy-step.is-active .jy-step-title{color:var(--text-primary);}
.jy-step-text{font-size:.875rem; color:var(--text-tertiary); line-height:1.5;}

.jy-toggle{
  margin-top:var(--space-4); display:inline-flex; align-items:center; gap:var(--space-2);
  min-height:44px; padding:0 var(--space-4); border-radius:var(--radius-full); cursor:pointer;
  background:transparent; border:1px solid var(--border-medium); color:var(--text-secondary); font-size:.8125rem;
}
.jy-toggle:hover{border-color:var(--border-strong); color:var(--text-primary);}
.jy-icon-play{display:none;}
.is-paused .jy-icon-play{display:block;}
.is-paused .jy-icon-pause{display:none;}

/* Video export (scripts/render-journey.mjs): every frame exact, no controls. */
.jy-capture, .jy-capture *{transition:none !important;}
.jy-capture .jy-toggle{visibility:hidden;}

/* ── Small screens: phone first, only the active step's words below it ── */
@media (max-width:860px){
  .jy-stage{grid-template-columns:1fr; gap:var(--space-8);}
  .jy-thoughts{inset:0 -12px auto -12px;}
  .jy-thought{font-size:.75rem;}
  .jy-thought-main{font-size:.8125rem;}
  .jy-side{max-width:420px; width:100%; justify-self:center; text-align:center;}
  .jy-steps{gap:0;}
  .jy-steps li{display:none;}
  .jy-steps li:has(.is-active){display:block;}
  .jy-step, .jy-step:hover, .jy-step.is-active{justify-content:center; text-align:center; background:none; border-color:transparent; cursor:default;}
  .jy-step-num{display:none;}
}
@media (max-width:860px) and (prefers-reduced-motion: reduce){
  .jy-steps{gap:var(--space-1);}
  .jy-steps li{display:block;}
  .jy-step{cursor:pointer;}
  .jy-step.is-active{background:var(--surface-2); border-color:var(--purple-border);}
}
@media (max-width:360px){
  .jy-phone{transform:scale(.9); transform-origin:top center; margin-bottom:-56px;}
}
