/* Case editor page: one editor screen stays in view and changes with the step beside it. */
.editor-page h2 { font-size:clamp(30px,3.1vw,43px); }
.ed-sticky { position:relative; display:grid; grid-template-columns:minmax(0,5fr) minmax(0,7fr); gap:var(--layout-gap); padding-top:clamp(70px,8vw,110px); padding-bottom:40px; }
.ed-copy h2 { margin:0 0 22px; }
.ed-copy>p { max-width:60ch; color:var(--body); font-size:var(--text-size); line-height:1.7; }
.ed-sticky-copy>article { min-height:78vh; display:flex; flex-direction:column; justify-content:center; opacity:.35; transition:opacity .35s ease; scroll-margin-top:80px; }
.ed-sticky-copy>article.is-current { opacity:1; }
.ed-sticky-copy>.ed-intro-step { min-height:calc(100vh - 120px); justify-content:flex-start; padding-top:48px; }
.ed-statement { max-width:40ch; margin:0; font-size:clamp(22px,1.9vw,30px); font-weight:400; line-height:1.45; letter-spacing:-.012em; color:var(--ink); }
.ed-statement em { hyphens:manual; font-style:normal; color:var(--green); text-decoration:underline; text-decoration-thickness:1px; text-underline-offset:6px; }
.ed-scroll { display:inline-flex; align-self:flex-start; gap:8px; margin-top:40px; color:var(--green); font-size:14px; font-weight:500; }
.ed-sticky-visual { position:sticky; top:clamp(90px,14vh,140px); align-self:start; margin:0; padding-top:48px; }
.ed-stage-dots { display:flex; gap:6px; list-style:none; padding:0; margin:14px 0 0; font-size:12px; color:var(--body); }
.ed-stage-dots li { flex:1; padding-top:8px; border-top:3px solid var(--line); transition:border-color .3s ease,color .3s ease; }
[data-stage-view="1"]~.ed-stage-dots li:nth-child(1),[data-stage-view="2"]~.ed-stage-dots li:nth-child(-n+2),[data-stage-view="3"]~.ed-stage-dots li { border-color:var(--green); color:var(--green); }
/* Editor details the home page screens do not show. */
.ed-fold { margin-top:8px; font-size:11px; color:var(--body); }
.ed-fold b { font-weight:400; }
.ed-fold dl { margin:6px 0 0; padding:8px; border-radius:5px; background:#f6f3ea; }
.ed-fold dl>div { display:grid; grid-template-columns:74px 1fr; gap:8px; }
.ed-fold dl>div+div { margin-top:4px; }
.ed-fold dt { font-weight:600; }
.ed-fold dd { margin:0; }
.case-tools span span { padding:0; border:0; }
.outcome-table i.is-zero { border-style:dashed; }
.ed-empty td { color:#8b9296; font-style:italic; }
.ed-mark i { display:inline-block; margin-left:4px; padding:0 5px; border-radius:8px; background:#e9ebe4; color:var(--body); font-style:normal; font-size:9.5px; vertical-align:1px; }
/* Stages: 1 shows the suggestion, 2 the accepted rows, 3 adds the artifact. */
.ed-sticky-visual .st-done,.ed-sticky-visual .st-row,.ed-sticky-visual .st-artifact { display:none; }
.ed-sticky-visual :is([data-stage-view="2"],[data-stage-view="3"]) :is(.st-pending,.st-pending-row,.ed-fold dl) { display:none; }
.ed-sticky-visual :is([data-stage-view="2"],[data-stage-view="3"]) .st-done { display:inline-flex; }
.ed-sticky-visual :is([data-stage-view="2"],[data-stage-view="3"]) .st-row { display:table-row; animation:ed-in .5s ease both; }
.ed-sticky-visual :is([data-stage-view="2"],[data-stage-view="3"]) .case-annotation { border-style:solid; }
.ed-sticky-visual [data-stage-view="3"] .st-row { animation:none; background:none; }
.ed-sticky-visual [data-stage-view="3"] .st-artifact { display:block; animation:ed-in .5s ease both; }
/* Leaving Review, the Accept button is pressed before the rows arrive. */
.ed-sticky-visual .is-accepting .accept-annotation.st-pending { animation:ed-press .7s ease both; }
.ed-sticky-visual [data-stage-view="2"] .annotation-accepted.st-done { animation:ed-accepted 1.6s ease both; }
.ed-sticky-visual [data-stage-view="2"] .case-annotation { animation:ed-card-ok 1.6s ease both; }
.ed-sticky-visual [data-stage-view="2"] .st-row { animation-delay:.25s; }
.ed-sticky-visual [data-stage-view="2"] .st-row:nth-child(3) { animation-delay:.45s; }
.ed-sticky-visual [data-stage-view="2"] .st-row:nth-child(4) { animation-delay:.65s; }
@keyframes ed-in { from { opacity:0; transform:translateY(6px); } }
@keyframes ed-press {
  0% { transform:scale(1); }
  30% { transform:scale(.9); background:var(--green); border-color:var(--green); color:#fff; box-shadow:0 0 0 0 #506246aa; }
  100% { transform:scale(1); background:var(--green); border-color:var(--green); color:#fff; box-shadow:0 0 0 14px #50624600; }
}
@keyframes ed-accepted { 0% { background:var(--green); color:#fff; border-color:var(--green); } 100% { background:transparent; color:#8b9296; border-color:var(--line); } }
@keyframes ed-card-ok { 0% { box-shadow:0 0 0 3px var(--green); background:var(--soft-green); } 100% { box-shadow:0 0 0 0 #50624600; background:#fdfbf5; } }
@media(prefers-reduced-motion:reduce) { .ed-sticky-visual *,.ed-sticky-copy>article { animation:none !important; transition:none !important; } }
/* Chain of thought */
.ed-chains { position:relative; padding-block:80px; }
.ed-chains::before { content:""; position:absolute; left:50%; top:0; width:100vw; transform:translateX(-50%); border-top:1px solid var(--line); pointer-events:none; }
.ed-chains h2 { margin:16px 0 18px; }
.ed-lead { max-width:62ch; font-size:var(--text-size); line-height:1.75; color:var(--body); }
.ed-chain { display:grid; grid-template-columns:1fr auto 1fr auto 1fr auto 1fr; align-items:center; gap:10px; list-style:none; padding:0; margin:40px 0 0; }
.ed-chain>li:not(.ed-arrow) { height:100%; padding:16px; border:1px solid var(--line); border-radius:var(--radius); background:#fff; font-size:13px; }
.ed-chain small { display:block; margin-bottom:6px; color:var(--body); font-size:11px; letter-spacing:.04em; }
.ed-chain em { color:var(--green); font-style:normal; font-size:12px; }
.ed-arrow { max-width:90px; font-size:11px; color:var(--green); text-align:center; }
.ed-arrow::after { content:"→"; display:block; font-size:20px; }
@media(max-width:1100px) { .ed-chain { grid-template-columns:1fr; }.ed-arrow { max-width:none; }.ed-arrow::after { content:"↓"; } }
/* Narrow screens: statement first; then a compact editor stays on top and shows only the current step's part. */
@media(max-width:900px) {
  .ed-sticky { grid-template-columns:1fr; gap:0; padding-top:96px; }
  .ed-sticky-copy { display:contents; }
  .ed-sticky-copy>.ed-intro-step { order:-2; min-height:auto; padding:0 0 32px; opacity:1; }
  .ed-sticky-copy>article { min-height:75vh; justify-content:flex-start; padding-top:24px; }
  .ed-sticky-visual { order:-1; position:sticky; top:66px; z-index:1; padding:12px 0; background:var(--paper); }
  .ed-sticky-visual .case-mock { grid-template-columns:1fr; }
  .ed-sticky-visual :is(.case-panel-title,.case-sheet>.case-section:first-child) { display:none; }
  .ed-sticky-visual [data-stage-view="1"] .case-sheet,
  .ed-sticky-visual [data-stage-view="3"] :is(.case-annotations,.case-sheet>.case-section:nth-child(2)) { display:none; }
  .ed-sticky-visual .case-annotations { order:0; }
  /* Accepted, the card folds to its title, like an accepted card in the app. */
  .ed-sticky-visual [data-stage-view="2"] :is(.case-annotation>p,.suggested-statement b,.suggested-statement p) { display:none; }
  .ed-sticky-visual [data-stage-view="2"] .suggested-statement { flex-direction:row; justify-content:space-between; align-items:center; padding:0; background:none; }
  .ed-stage-dots { margin-top:8px; }
}
