@font-face{font-family:"Kalam";src:url("assets/fonts/Kalam-Regular.ttf") format("truetype");font-style:normal;font-weight:400;font-display:swap}
:root{--ink:#202827;--muted:#68716b;--green:#43684d;--green-dark:#263c2f;--orange:#d76b3d;--paper:#faf8f2;--line:#d9d6cd;--bg:#e9e6dd;--shadow:0 16px 35px rgba(43,42,36,.09)}
*{box-sizing:border-box}html{font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;background:var(--bg);color:var(--ink)}body{margin:0}button{font:inherit}button:focus-visible,a:focus-visible{outline:3px solid #d44e20;outline-offset:3px}.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}.skip-link{position:absolute;top:-4rem;left:1rem;z-index:9;background:#fff;padding:.8rem}.skip-link:focus{top:1rem}.shell{display:grid;grid-template-columns:82px 1fr;min-height:100vh}.rail{background:#292f2e;color:#c6d4c0;display:flex;flex-direction:column;align-items:center;gap:1.5rem;padding:1.2rem .4rem}.brand{font-size:2.2rem;color:#9bb47a;line-height:1}.rail-mark{font-weight:800;line-height:1.3;text-align:center;opacity:.58;letter-spacing:.16em}.rail-reset{margin-top:auto;color:#e2e8df;background:transparent;border:1px solid #68746b;border-radius:10px;min-width:54px;min-height:54px;cursor:pointer;font-size:1.7rem}.rail-reset:hover{background:#3b4940}.rail-reset-label{display:none}.app{min-width:0}.topbar{min-height:112px;background:rgba(250,249,246,.94);display:flex;justify-content:space-between;gap:1.5rem;align-items:center;padding:1.2rem clamp(1rem,3vw,3rem);border-bottom:1px solid #dedbd3}.topbar h1{margin:.1rem 0 0;font-size:clamp(1.9rem,3.4vw,2.8rem);line-height:1.08;letter-spacing:-.04em}.eyebrow{text-transform:uppercase;letter-spacing:.14em;color:#72806f;font-size:.69rem;font-weight:800;margin:0}.top-meta{display:flex;align-items:center;gap:1rem;color:var(--muted);font-size:.75rem;text-align:right}.chapter-tag{padding:.5rem .7rem;border:1px solid #cfd5cb;border-radius:99px;color:var(--green-dark);font-weight:700;background:#edf2e9}.main-grid{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(340px,.85fr);gap:clamp(1rem,2vw,2rem);padding:clamp(1rem,2vw,2rem) clamp(1rem,3vw,3rem) 0;align-items:stretch}.scene-wrap{min-width:0;display:flex;flex-direction:column}.scene-frame{position:relative;overflow:hidden;border:10px solid #fbfaf6;box-shadow:var(--shadow);background:#c6c4ae;min-height:500px;flex:1}.scene-frame:before{content:"";position:absolute;inset:0;box-shadow:inset 0 0 0 1px #b8b3a9;z-index:1;pointer-events:none}.scene-frame img{display:block;width:100%;height:100%;min-height:500px;object-fit:cover;object-position:center;image-rendering:auto}.scene-caption{position:absolute;bottom:1rem;left:1rem;max-width:calc(100% - 2rem);background:rgba(250,248,239,.94);padding:.65rem .8rem;font-size:.75rem;font-weight:800;box-shadow:0 4px 12px #21251d3d}.caption-pin{color:var(--orange);padding-right:.4rem}.scene-note{padding:1rem 1.2rem;background:#e0e4d8;border-left:4px solid var(--green);font-size:.83rem;line-height:1.45;color:#44534a}.work-panel{background:var(--paper);border:1px solid #dfdcd3;border-radius:16px;box-shadow:var(--shadow);padding:clamp(1.1rem,2vw,2rem);display:flex;flex-direction:column;min-width:0}.panel-header{display:flex;align-items:center;gap:.6rem;font-weight:850;font-size:1rem;margin-bottom:1.7rem}.status-dot{width:13px;height:13px;border-radius:50%;background:var(--orange)}.record-id{margin-left:auto;color:#849084;font-size:.65rem;font-weight:800;text-align:right}.work-panel h2{font-size:clamp(1.5rem,2.5vw,2.25rem);line-height:1.08;letter-spacing:-.04em;margin:.4rem 0 .8rem}.description{font-size:.91rem;line-height:1.58;color:#4f5953;margin:0 0 1.2rem}.artifact{margin-bottom:1.2rem}.artifact-paper{background:#f0eee5;border:1px solid #d9d5c8;border-left:5px solid var(--green);padding:1rem 1.1rem;box-shadow:5px 5px 0 #d7d7cd;display:flex;flex-direction:column;gap:.5rem;min-height:145px}.artifact-paper.memo{border-left-color:#6480a0;background:#e9ebea}.artifact-paper.handoff{border-left-color:#d07a4b;background:#eeebe2}.artifact-paper strong{font-size:1.14rem}.artifact-paper small{color:#62716b;font-weight:700}.artifact-paper p{font-size:.77rem;line-height:1.5;margin:0;color:#55615a}.paper-kicker,.slip-label{font-size:.61rem;letter-spacing:.14em;color:#58715b;font-weight:900}.paper-progress{display:inline-block;align-self:flex-start;background:#fff;padding:.25rem .45rem;font-size:.7rem;font-weight:800}.paper-lines{display:flex;gap:.4rem;flex-direction:column}.paper-lines i{display:block;width:80%;height:6px;background:#bdc8b9}.paper-lines i:nth-child(2){width:60%}.paper-lines i:nth-child(3){width:70%;background:#d3ad8f}.review-slip{background:#f6e6dd;border:1px solid #dcb5a4;border-left:5px solid var(--orange);padding:1rem;display:flex;flex-direction:column;gap:.6rem}.review-slip strong{font-size:1.1rem}.review-slip span:last-child{font-size:.78rem;color:#594c46;line-height:1.4}.form-comparison{display:grid;grid-template-columns:1fr 1fr;gap:.7rem}.form-comparison span{background:#fff;padding:.7rem;font-weight:800;font-size:.79rem}.form-comparison small{font-weight:500}.choices{display:grid;gap:.7rem;margin-top:auto}.choice{position:relative;text-align:left;width:100%;cursor:pointer;background:#fff;border:1px solid #cfd4cb;border-radius:9px;padding:.82rem 2.6rem .82rem .9rem;color:var(--ink);display:flex;flex-direction:column;gap:.22rem;transition:transform .15s,box-shadow .15s,border-color .15s}.choice:hover{transform:translateY(-2px);border-color:#728e73;box-shadow:0 5px 14px #263c2f1a}.choice.primary{background:#e9f0e6;border-color:#b1c4ad}.choice-title{font-weight:850;font-size:.84rem}.choice-detail{font-size:.71rem;line-height:1.35;color:#657067}.choice-arrow{position:absolute;right:.9rem;top:calc(50% - .55rem);font-size:1.2rem;color:var(--green)}.support-note{font-size:.75rem;color:var(--green-dark);font-weight:750}.action-note{border-top:1px solid #deddd5;margin-top:1rem;padding-top:.85rem;color:#52644f;min-height:2rem;font-size:.76rem;line-height:1.4}.action-note:empty{display:none}.lower-grid{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(340px,.85fr);gap:clamp(1rem,2vw,2rem);padding:clamp(1rem,2vw,2rem) clamp(1rem,3vw,3rem) 0}.card{background:rgba(250,249,245,.88);border:1px solid #dfddd5;border-radius:14px;box-shadow:0 8px 20px #29291d0c;padding:1.2rem 1.4rem}.metrics{display:grid;grid-template-columns:1fr 1fr;gap:1.3rem}.metrics .metric:first-child{padding-right:1.3rem;border-right:1px solid var(--line)}.metric-heading,.record-top{display:flex;justify-content:space-between;align-items:baseline;gap:.8rem}.metric h3,.record h3{margin:0;font-size:1rem;letter-spacing:-.02em}.metric strong{font-size:1rem;color:var(--green-dark)}.metric p{font-size:.7rem;color:var(--muted);line-height:1.4;min-height:2rem}.meter{height:9px;background:#d7d8d1;border-radius:20px;overflow:hidden}.fill{height:100%;transition:width .2s}.progress-fill{background:var(--orange)}.capacity-fill{background:var(--green)}.record-count{font-size:.65rem;color:var(--muted);font-weight:800}.record ul{list-style:none;padding:0;margin:.8rem 0 0;display:grid;gap:.38rem;max-height:144px;overflow:auto}.record li{font-size:.71rem;line-height:1.3;display:flex;gap:.45rem}.record-check{color:var(--green);font-weight:900}.empty-record{color:var(--muted)}.prototype-note{font-size:.67rem;color:#7a807b;padding:1rem clamp(1rem,3vw,3rem) 2rem;margin:0}.end-note{font-size:.82rem;color:var(--green-dark);background:#e6eee4;padding:1rem;border-radius:8px}
.standing-status{font-size:.7rem;font-weight:750;color:var(--green-dark);padding:.45rem .6rem;background:#e8eee5;display:inline-block;margin:.55rem 0 0}.record ul{max-height:225px}
@media(max-width:1050px){.main-grid,.lower-grid{grid-template-columns:1fr}.scene-frame,.scene-frame img{min-height:360px;max-height:480px}.work-panel{min-height:0}.lower-grid{padding-top:1rem}}
@media(max-width:620px){.shell{grid-template-columns:1fr}.rail{position:static;flex-direction:row;justify-content:space-between;padding:.45rem 1rem;gap:1rem}.rail-mark{display:none}.rail-reset{margin:0;min-height:40px;min-width:40px;font-size:1.2rem}.rail-reset-label{display:inline;font-size:.65rem;margin-left:.3rem}.topbar{min-height:80px;padding:1rem;align-items:flex-start}.topbar h1{font-size:1.7rem}.top-meta{display:block;font-size:.64rem}.chapter-tag{display:inline-block;margin-top:.4rem}.slice-label{display:none}.main-grid{padding:1rem 1rem 0}.scene-frame,.scene-frame img{min-height:255px;max-height:330px}.scene-frame{border-width:6px}.scene-caption{font-size:.63rem}.scene-note{font-size:.73rem}.work-panel{padding:1rem}.panel-header{margin-bottom:1rem}.record-id{font-size:.55rem}.lower-grid{padding:1rem 1rem 0}.metrics{gap:.8rem}.card{padding:1rem}.prototype-note{padding:1rem}}
@media(max-width:380px){.metrics{grid-template-columns:1fr}.metrics .metric:first-child{border-right:0;border-bottom:1px solid var(--line);padding:0 0 .8rem}.topbar h1{font-size:1.45rem}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;animation-duration:.01ms!important;transition-duration:.01ms!important}.choice:hover{transform:none}}

/* Keep the chapter art the same size as the work panel changes. */
.main-grid{align-items:start}
.scene-frame{height:500px;min-height:0;max-height:none;flex:none}
.scene-frame img{height:100%;min-height:0;max-height:none}

.rail-actions{margin-top:0;display:flex;flex-direction:column;align-items:center;gap:.55rem;width:100%}
.rail-button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.1rem;min-width:64px;min-height:54px;padding:.35rem;color:#e2e8df;background:transparent;border:1px solid #68746b;border-radius:10px;cursor:pointer;font-size:.74rem;font-weight:750;line-height:1.1}
.rail-button span:first-child{font-size:1.45rem;line-height:1}
.rail-button:hover:not(:disabled){background:#3b4940}
.rail-button:disabled{opacity:.42;cursor:not-allowed}

.scene-note{font-size:.9rem}
.description{font-size:1rem}
.artifact-paper p{font-size:.88rem}
.paper-kicker,.slip-label{font-size:.68rem}
.choice-title{font-size:.98rem}
.choice-detail{font-size:.84rem}
.support-note,.action-note{font-size:.88rem}
.metric p,.record li,.standing-status{font-size:.8rem}
.record-count{font-size:.75rem}
.end-note{font-size:.9rem}
.prototype-note{font-size:.78rem}
#restart-dialog{width:min(92vw,390px);border:1px solid #cfd4cb;border-radius:14px;background:var(--paper);color:var(--ink);padding:1.4rem;box-shadow:var(--shadow)}
#restart-dialog::backdrop{background:rgba(24,32,28,.55)}
#restart-dialog h2{font-size:1.3rem;margin:0 0 .6rem}
#restart-dialog p{font-size:.95rem;line-height:1.5;margin:0 0 1.2rem}
.dialog-actions{display:flex;justify-content:flex-end;gap:.6rem;flex-wrap:wrap}
.dialog-actions button{min-height:44px;padding:.6rem .9rem;border:1px solid #aebdaf;border-radius:8px;background:#fff;color:var(--ink);cursor:pointer;font-weight:750}
#restart-confirm{background:#e9f0e6;border-color:#79977b}
#story-dialog{width:min(92vw,490px);max-height:min(88vh,680px);overflow:auto;border:1px solid #b9c6b5;border-top:8px solid #5e8265;border-radius:16px;background:var(--paper);color:var(--ink);padding:1.6rem;box-shadow:0 22px 60px rgba(16,26,20,.3)}
#story-dialog::backdrop{background:rgba(24,32,28,.64)}
#story-dialog[data-tone="setback"]{border-top-color:#bd6c49}
#story-dialog[data-tone="review"]{border-top-color:#73869c}
.story-mark{display:grid;place-items:center;width:44px;height:44px;margin-bottom:1rem;border-radius:50%;background:#e4eee2;color:#335c3b;font-size:1.4rem;font-weight:900}
.story-image{display:block;width:100%;height:auto;max-height:190px;object-fit:cover;margin:.8rem 0 1rem;border-radius:10px}
.story-image[hidden]{display:none}
#story-dialog[data-illustrated="true"]{padding:1.2rem}
#story-dialog[data-illustrated="true"] .story-mark{display:none}
#story-dialog[data-tone="setback"] .story-mark{background:#f6e7dd;color:#9f4e2f}
#story-dialog[data-tone="review"] .story-mark{background:#e7edf2;color:#4d667d}
#story-dialog h2{font-size:clamp(1.5rem,4vw,2rem);line-height:1.15;margin:.4rem 0 .8rem;letter-spacing:-.03em}
#story-body{font-size:1rem;line-height:1.55;margin:0 0 1rem}
#story-next{font-size:.91rem;line-height:1.45;font-weight:750;color:var(--green-dark);padding:.8rem 1rem;background:#e9eee5;border-radius:8px;margin:0 0 1.2rem}
#story-dialog[data-tone="setback"] #story-next{background:#f5e9e2;color:#754636}
#story-dialog[data-tone="review"] #story-next{background:#e9edf0;color:#465b6d}
#story-continue{display:block;width:100%;min-height:48px;padding:.7rem 1rem;border:1px solid #769579;border-radius:8px;background:#dfeade;color:var(--green-dark);font-weight:850;cursor:pointer}
#story-continue:hover{background:#d3e3d1}
.work-progress{display:block;width:100%;height:12px;accent-color:var(--green);margin:.45rem 0 .1rem}
.review-slip .slip-label{color:#415744}
.project-tools{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.5rem;grid-column:1/-1}
@media(max-width:620px){.project-tools{grid-template-columns:1fr}}
@media(min-width:900px){
  .choices:has(.project-tools){grid-template-columns:repeat(2,minmax(0,1fr))}
  .choices:has(.project-tools button:nth-of-type(2)){grid-template-columns:minmax(0,2fr) repeat(2,minmax(0,1fr))}
  .choices .project-tools{display:contents}
  #desk-workspace .choices:has(.project-tools)>button,#desk-workspace .choices .project-tools .choice{grid-column:auto}
}
.choices.near-top{margin-top:0;margin-bottom:1.2rem}

@media(max-width:1050px){.scene-frame{height:clamp(360px,42vw,480px);min-height:0;max-height:none}.scene-frame img{height:100%;min-height:0;max-height:none}}
@media(max-width:620px){.rail-actions{margin-top:0;flex-direction:row;justify-content:flex-end;gap:.4rem;width:auto}.rail-button{min-width:58px;min-height:44px;font-size:.68rem}.rail-button span:first-child{font-size:1.1rem}.scene-frame{height:270px;min-height:0;max-height:none}.scene-frame img{height:100%;min-height:0;max-height:none}.scene-note{font-size:.82rem}}

/* The action area is the one place where the player can advance the story. */
.action-zone{margin-top:auto;padding:1rem;border:2px solid #89ab8c;border-radius:12px;background:#e7f0e4;box-shadow:0 5px 16px rgba(34,72,42,.1)}
.action-zone.near-top{margin-top:0;margin-bottom:1.2rem}
.action-zone-head{display:flex;align-items:flex-start;gap:.75rem;margin-bottom:.8rem}
.ready-dot{width:12px;height:12px;margin:.32rem .1rem 0;border-radius:50%;background:#21723c;box-shadow:0 0 0 4px #c4e0c7;flex:none}
.action-zone-head h3{font-size:1rem;line-height:1.2;margin:0;color:#1e5030}
.action-zone-head p{font-size:.78rem;line-height:1.35;margin:.16rem 0 0;color:#48634d}
.action-zone .choices{margin-top:0}
.choice,.choice.primary{min-height:66px;background:#244b32;border:2px solid #244b32;color:#fff;box-shadow:0 3px 0 #122e1d;transform:none;transition:background .15s,border-color .15s,box-shadow .15s}
.choice-detail{color:#e1eee2}
.choice-arrow{display:grid;place-items:center;width:2rem;height:2rem;right:.65rem;top:calc(50% - 1rem);border-radius:50%;background:#edf5ea;color:#245132;font-weight:900}
.choice:hover,.choice.primary:hover{background:#193e29;border-color:#e89b66;box-shadow:0 3px 0 #122e1d,0 0 0 2px #e89b66;transform:none}
.choice:active,.choice.primary:active{background:#12321f}
.action-zone.is-complete{border-color:#c8cec7;background:#f0f1ec;box-shadow:none}
.action-zone.is-complete .ready-dot{background:#859188;box-shadow:0 0 0 4px #dce2dc}
.action-zone.is-complete .action-zone-head h3{color:#46534a}
.action-zone.is-complete .end-note{margin:0}
#work-panel[data-stage="c2_review"] .description{margin-bottom:.5rem}
.artifact-paper.extra{border-left-color:#b96842;background:#f1e9e2}
.artifact-paper.session{border-left-color:#61789b;background:#e8edf1}
.rail-button:not(:disabled){background:#e7efe8;color:#1e3b29;border-color:#a5c3aa}
.rail-button:hover:not(:disabled){background:#fff;border-color:#e89b66}
.rail-button:disabled{background:transparent;color:#a8b2aa;border-color:#68746b;opacity:.52}
#story-continue{background:#244b32;border-color:#244b32;color:#fff}
#story-continue:hover{background:#193e29;border-color:#193e29}
#restart-confirm{background:#244b32;border-color:#244b32;color:#fff}
@media(max-width:620px){.action-zone{padding:.8rem}.choice,.choice.primary{min-height:64px}}

/* Keep supporting text readable and preserve keyboard position after a story popup. */
.eyebrow{color:#5c6959}
.prototype-note{color:#5d685f}
#work-title:focus-visible{outline:3px solid #d44e20;outline-offset:4px;border-radius:3px}
.choices{grid-template-columns:minmax(0,1fr)}
.choice{min-width:0;overflow-wrap:anywhere}
.form-comparison{grid-template-columns:repeat(2,minmax(0,1fr))}
@media(max-width:620px){
  .rail,.topbar{flex-wrap:wrap}
  .rail{padding:8px 16px}
  .topbar{padding:16px}
  .main-grid,.lower-grid{padding:16px 16px 0}
  .work-panel,.card{padding:16px}
  .action-zone{padding:12px}
  .top-meta{display:flex;flex-wrap:wrap;text-align:left;width:100%;gap:.6rem}
  .chapter-tag{margin-top:0}
  .choice,.choice.primary{padding:12px}
  .choice-arrow{display:none}
  .form-comparison{grid-template-columns:minmax(0,1fr)}
  #story-dialog{padding:20px}
}

/* A dashboard for a full browser window: the record sits beside current work. */
.upgrade-badge{display:flex;flex-wrap:wrap;align-items:center;gap:.75rem;padding:.6rem .75rem;border:2px solid #b96842;border-radius:8px;background:#fff0df;color:#603c25}
.upgrade-value{font-size:1.8rem;line-height:1;flex:none}
.upgrade-badge div{display:flex;flex:1 1 160px;min-width:0;flex-direction:column;gap:.15rem}
.upgrade-badge div>strong{font-size:.95rem}
.upgrade-badge span{font-size:.84rem;line-height:1.35}
.work-meter{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem}
.work-meter .work-progress{flex:1 1 100px;width:auto;min-width:0;margin:0}
.work-meter .paper-progress{align-self:auto}
@media(min-width:900px){
  .shell{grid-template-columns:72px minmax(0,1fr)}
  .topbar{min-height:72px;padding:.625rem 1.25rem}
  .topbar h1{font-size:1.75rem}
  #main{display:grid;grid-template-columns:minmax(240px,.7fr) minmax(0,1.6fr);grid-template-areas:"scene work" "metrics work" "record work" "footer footer";grid-template-rows:auto auto minmax(0,1fr) auto;gap:12px;padding:12px 16px 8px;height:calc(100dvh - 72px);align-items:start}
  #main.has-update{grid-template-areas:"update update" "scene work" "metrics work" "record work" "footer footer";grid-template-rows:auto auto auto minmax(0,1fr) auto;gap:10px}
  #main>.action-note{grid-area:update;margin:0;padding:.45rem .7rem;border:1px solid #cbd6c7;border-radius:8px;background:#e9eee5;min-height:0}
  .main-grid,.lower-grid{display:contents}
  .scene-wrap{grid-area:scene}
  .scene-frame{height:clamp(140px,20dvh,210px);border-width:6px}
  .scene-caption{bottom:.6rem;left:.6rem;padding:.4rem .6rem;font-size:.75rem}
  /* These hints repeat the current task and opening instructions. */
  .scene-note{display:none}
  .work-panel{grid-area:work;min-height:0;padding:14px;gap:0}
  .panel-header{margin-bottom:.55rem}
  #step-label{display:none}
  #work-panel[data-stage="c2_choose"] .description{display:none}
  .work-panel h2{font-size:1.8rem;margin:.35rem 0 .55rem}
  .description{line-height:1.4;margin-bottom:.5rem}
  .artifact{margin-bottom:.75rem}
  .artifact-paper{min-height:0;padding:.65rem .8rem;gap:.35rem;box-shadow:3px 3px 0 #d7d7cd}
  .artifact-paper p{line-height:1.4}
  .review-slip{padding:.7rem;gap:.4rem}
  .form-comparison{gap:.5rem}
  .form-comparison span{padding:.5rem;font-size:.88rem}
  .action-zone{padding:.75rem;margin-top:0}
  .action-zone.near-top{margin-bottom:.75rem}
  .action-zone-head{margin-bottom:.5rem}
  .action-zone-head p{display:none}
  .choices{gap:.5rem;grid-template-columns:repeat(2,minmax(0,1fr))}
  .upgrade-badge,.support-note,.end-note{grid-column:1/-1}
  .choice:only-child{grid-column:1/-1}
  .choices button:first-of-type:last-of-type{grid-column:1/-1}
  #desk-workspace[data-stage="c2_plan"] .choices:has(button:nth-of-type(3)){grid-template-columns:repeat(3,minmax(0,1fr))}
  .choice,.choice.primary{min-height:60px;padding:.55rem 2.8rem .55rem .7rem}
  .support-note{margin:.35rem 0}
  .action-note{margin-top:.65rem;padding-top:.55rem;line-height:1.35}
  .metrics{grid-area:metrics;padding:.75rem .85rem;gap:.8rem}
  .metrics .metric:first-child{padding-right:.8rem}
  .metric p{display:none}
  .metric .meter{margin-top:.5rem}
  .record{grid-area:record;padding:.75rem .85rem;align-self:stretch}
  .record ul{max-height:none;overflow:auto;margin:.5rem 0 0;gap:.3rem;min-height:0}
  .standing-status{margin-top:.35rem;padding:.3rem .45rem}
  .prototype-note{grid-area:footer;padding:0;font-size:.75rem}
}

/* Student desk: real text and controls, with decorative stationery around them. */
.desk-workspace{display:flex;flex-direction:column;gap:12px;min-width:0}
.work-panel{position:relative;border:7px solid #414b49;border-top-width:22px;border-bottom-width:12px;border-radius:15px;background:#f5f8f4;box-shadow:0 3px 0 #252e2b,0 8px 18px #29291d18}
.work-panel:before{content:"";position:absolute;top:-15px;left:calc(50% - 3px);width:6px;height:6px;border-radius:50%;background:#8fa49c;box-shadow:0 0 0 2px #293330}
.work-panel .artifact{margin-bottom:0}
.work-panel .artifact-paper{box-shadow:none;background:#fff;border:1px solid #cdd9cd;border-left:4px solid #688570}
.work-panel .artifact-paper.extra{border-left-color:#b96842}
.work-panel .artifact-paper.session{border-left-color:#61789b}
.work-panel .panel-header{font-size:.8rem;color:#3d5948}
.work-panel .status-dot{width:8px;height:8px;background:#43684d;border-radius:2px}
.action-zone{margin:0;padding:14px 14px 20px;border:1px solid #9ea7a0;border-bottom:7px solid #8c9790;border-radius:10px 10px 17px 17px;background:#d8ded7;box-shadow:0 3px 0 #66726a,0 7px 15px #29291d18}
.action-zone.near-top{margin:0}
.action-zone-head h3{color:#263c2f}
.action-zone .choice{border-radius:7px;border-top:2px solid #63876b;border-bottom:3px solid #142c1b;box-shadow:0 4px 0 #7a877b}
.action-zone .choice:active{box-shadow:0 1px 0 #7a877b;transform:translateY(2px)}
.action-zone.is-complete{background:#d8ded7;border-color:#9ea7a0;box-shadow:0 3px 0 #66726a}
.action-zone .end-note{background:#eef3eb;color:#263c2f}
.record{position:relative;min-height:0;display:flex;flex-direction:column;background:#fff1ac;border:1px solid #cebb74;border-top:13px solid #85734e;border-radius:3px 3px 7px 3px;box-shadow:2px 3px 0 #dcc886,4px 6px 0 #e6d7a7,0 8px 18px #29291d18}
.record-top,.standing-status{flex-shrink:0}
.record-count{color:#64562e}
.standing-status{background:#f9e697;color:#3c492f}
.record ul{background:repeating-linear-gradient(to bottom,transparent 0,transparent 25px,#dccd913b 25px,#dccd913b 26px);scrollbar-color:#8c7942 #f8e9a4;scrollbar-gutter:stable;padding:2px 5px 3px 0}
.record li{padding:3px 0;font-family:"Kalam","Segoe Print","Bradley Hand",cursive;font-weight:400;font-size:1rem;line-height:1.35;color:#263c55;overflow-wrap:anywhere}
.record-check{border:1px solid #52617a;border-radius:2px 3px 1px 4px;width:16px;height:16px;line-height:14px;text-align:center;flex-shrink:0;margin-top:2px;color:#263c55;font-family:"Segoe UI",sans-serif;font-size:.85rem;transform:rotate(-5deg)}
.record li:nth-child(even) .record-check{border-radius:3px 1px 4px 2px;transform:rotate(4deg)}
.record .empty-record{color:#64562e}
.record li.record-milestone{display:block;margin:.65rem 0 .3rem;padding:.6rem .65rem;background:#edf0d8;border-top:2px solid #687449;border-bottom:1px solid #b5bf90;border-radius:2px;font-family:inherit;color:#263c2f;line-height:1.4}
.record li.record-milestone:first-child{margin-top:0}
.record-milestone-label{display:block;margin-bottom:.18rem;font-size:.63rem;font-weight:800;letter-spacing:.09em;text-transform:uppercase;color:#4a592e}
.record-milestone-label span{margin-right:.2rem}
.record-milestone strong{display:block;font-size:.94rem;font-weight:800}
.record-milestone-detail{display:block;margin-top:.18rem;font-size:.76rem;color:#40513c}
#career-record:focus-visible{outline:3px solid #a44521;outline-offset:3px}
#main[data-chapter="1"] .work-panel{background:#fffdf5;border-color:#b6a781;border-top-width:14px;border-bottom-width:7px;border-radius:4px;box-shadow:3px 3px 0 #d7c69f}
#main[data-chapter="1"] .work-panel:before{display:none}
#main[data-chapter="1"] .action-zone{background:#ece7d7;border-color:#bbb097;border-bottom-color:#a69a7f}
@media(min-width:900px){
  .desk-workspace{grid-area:work;align-self:stretch;min-height:0}
  .desk-workspace .work-panel{flex:1;padding:12px 14px}
  .desk-workspace .action-zone{flex:none;padding:12px 14px 17px}
  .record ul{flex:1}
  .action-zone.near-top .choices{padding-bottom:68px}
  /* Completion choices occupy a new row, away from repeated work presses. */
  .action-zone.near-top .choice{min-height:54px}
}
@media(max-width:899px){
  /* Keep the result in view. app.js guards rapid repeated pointer clicks when
     a new decision replaces work, without reserving an empty action row. */
  html:has(.action-zone.near-top){overflow-anchor:none}
  .desk-workspace .work-panel{padding:16px}
  .desk-workspace .action-note{margin:0}
  .action-zone.near-top .choices{padding-top:0}
  .record ul{max-height:260px}
}
@media(min-width:900px) and (max-width:1050px){
  /* The heading and work card already identify these stages on small desktops. */
  .panel-header{display:none}
  #work-panel[data-stage="c2_contribute"] .description{display:none}
}

/* A compact pixel keyboard connects the screen to a roomier action deck. */
.laptop-keyboard{display:flex;flex-direction:column;align-self:stretch;width:100%;gap:5px;flex:none;padding:6px 12px 8px;background:#aeb9ae;border:3px solid #5b6a5d;border-bottom:5px solid #69796b;box-shadow:3px 3px 0 #33463b;border-radius:0;user-select:none;pointer-events:none}
.key-row{display:flex;justify-content:center;gap:6px;min-width:0}
.pixel-key{flex:1;min-width:0;height:26px;border:2px solid #233a2e;border-top-color:#6b8470;border-bottom:3px solid #172c21;background:#35473f;box-shadow:2px 2px 0 #6f8371}
.pixel-key.space-key{flex:4}
.record ul{align-content:start}
.desk-workspace .action-zone{display:flex;flex-direction:column;justify-content:center}
.desk-workspace .action-zone .choices{margin:0;flex-shrink:0}
.desk-workspace .action-zone-head{flex-shrink:0}
.desk-workspace .action-zone-head p{display:block}
.action-zone.is-work{cursor:pointer}
.action-zone.is-work:hover{border-color:#587b5e;background:#d0ddcd}
.action-zone.is-work .choice{min-height:78px}
@media(min-width:900px){
  .desk-workspace{gap:8px}
  .desk-workspace .work-panel{flex:1 0 auto;padding:10px 14px}
  .desk-workspace .action-zone{flex:none;min-height:min-content;padding:12px 14px 16px}
  .desk-workspace .action-zone-head{margin-bottom:8px}
  .desk-workspace .action-zone .choice{min-height:64px;padding-top:8px;padding-bottom:8px}
  .desk-workspace .action-zone.near-top{justify-content:flex-start}
  .desk-workspace .action-zone.near-top .choices{padding:0 0 68px}
  .desk-workspace .action-zone.near-top .choice{min-height:54px}
}
@media(min-width:900px) and (max-width:1100px){
  .laptop-keyboard{padding:1px 8px;gap:4px;border-width:2px;border-bottom-width:3px}
  .pixel-key{height:16px}
  .desk-workspace .action-zone{padding:8px 12px 10px}
  .desk-workspace .action-zone .choice{min-height:60px;padding-top:7px;padding-bottom:7px}
  .desk-workspace .action-zone-head{margin-bottom:6px}
  .desk-workspace .action-zone-head p{font-size:.72rem}
}
@media(max-width:899px){
  .desk-workspace .action-zone{min-height:0;padding:16px 14px 20px}
  .laptop-keyboard{padding:8px;gap:4px}
  .key-row{gap:4px}
  .pixel-key{height:18px}
}
@media(prefers-reduced-motion:reduce){
  .action-zone .choice:active{transform:none}
}

/* Developing documents use real text inside the accepted context screen. */
.draft-lines{margin:0;display:grid;gap:.45rem;min-width:0}
.draft-lines>div{border-left:2px solid #c8d2c4;padding-left:.6rem;min-width:0}
.draft-lines dt{font-size:.75rem;font-weight:800;color:#3d5948;line-height:1.3}
.draft-lines dd{margin:.12rem 0 0;font-size:.88rem;line-height:1.4;color:#45534b;overflow-wrap:anywhere}
.artifact-paper .student-voice{border-top:1px solid #dce2d7;padding-top:.45rem;font-style:italic;color:#435946}
@media(min-width:900px) and (max-height:800px){
  .draft-lines{gap:.3rem}
  .desk-workspace:has(.project-tools) .draft-lines>div:not(:last-child){display:none}
  .draft-lines dt,.draft-lines dd{display:inline}
  .draft-lines dt:after{content:": "}
  .draft-lines dd{margin:0}
  .draft-lines dd{font-size:.84rem;line-height:1.35}
  .artifact-paper .student-voice{padding-top:.3rem}
}
@media(min-width:900px) and (max-height:800px){
  .laptop-keyboard{padding:1px 8px;gap:4px;border-width:2px;border-bottom-width:3px}
  .pixel-key{height:16px}
  .desk-workspace .action-zone{padding:8px 14px 10px;min-height:min-content}
  .desk-workspace .action-zone .choice{min-height:60px;padding-top:7px;padding-bottom:7px}
  .desk-workspace .action-zone-head{margin-bottom:6px}
  .desk-workspace .action-zone-head p{font-size:.72rem}
  .desk-workspace .action-zone:not(.is-work) .action-zone-head p{display:none}
  #work-panel[data-stage="c2_contribute"] .description{display:none}
  .desk-workspace .action-zone.near-top .choices{padding-bottom:44px}
}
@media(min-width:900px) and (max-width:1100px){
  #main{grid-template-columns:minmax(200px,.55fr) minmax(0,1.6fr)}
  .desk-workspace .work-panel{padding:8px 10px}
  .desk-workspace .work-panel h2{font-size:1.6rem}
  .desk-workspace .action-zone{padding:8px 10px 10px}
  .desk-workspace .upgrade-badge{padding:.35rem .5rem;gap:.5rem}
  .desk-workspace .action-zone .choice{padding:7px 2.5rem 7px 8px;min-height:60px}
  .desk-workspace .action-zone .choice-detail{font-size:.8rem}
  .project-tools .choice-arrow{display:none}
  #desk-workspace .project-tools .choice{padding-right:8px}
  .metric-heading{gap:.3rem;flex-wrap:wrap}
  .metric h3,.metric strong{font-size:.9rem}
}
@media(min-width:900px) and (max-width:1100px) and (max-height:800px){
  /* Keep the current draft fragment in view on the compact accepted desk. */
  #work-panel:is([data-stage="c1_prep"],[data-stage="c2_work"],[data-stage="c2_contribute"]) .draft-lines>div:not(:last-child){display:none}
  .desk-workspace .work-panel{padding-top:6px;padding-bottom:6px}
  .desk-workspace .work-panel .description{margin-bottom:.4rem}
}

/* Quality belongs to the current artifact; compact placement keeps the desk intact. */
.quality-panel{grid-column:1/-1;border-top:1px solid #c2c9be;padding-top:.5rem;min-width:0}
.quality-panel[hidden]{display:none}
.quality-panel h3{margin:0;font-size:.9rem}
.quality-panel strong{font-size:.82rem;color:#263c2f}
.quality-panel progress{display:block;width:100%;height:10px;accent-color:#43684d;margin:.3rem 0}
.quality-panel[data-band="uneven"] progress{accent-color:#936329}
.quality-panel[data-band="rushed"] progress{accent-color:#a04e32}
.quality-panel p{margin:.2rem 0 0;font-size:.76rem;line-height:1.3;color:#3e5042}
@media(min-width:900px){.metrics:has(.quality-panel:not([hidden])){row-gap:.5rem}.quality-panel{padding-top:.4rem}}
/* A single continuation uses the full action row; bottom space separates work. */
@media(min-width:900px){
  .desk-workspace .action-zone.near-top:has(.choices>button:only-child) .action-zone-head{display:none}
  .desk-workspace .action-zone.near-top .choices:has(>button:only-child){padding-bottom:92px}
  .desk-workspace .action-zone.near-top .choices>button:only-child{grid-column:1/-1}
}
@media(min-width:900px) and (max-height:800px){
  .desk-workspace .action-zone.near-top .action-zone-head{display:none}
  .desk-workspace .action-zone.near-top .choices:has(>button:only-child){padding-bottom:56px}
  #desk-workspace[data-stage="c2_review"] .action-zone.near-top .choices{padding-bottom:68px}
}
#quality-detail-short{display:none}
@media(min-width:900px) and (max-width:1100px){#quality-detail-full{display:none}#quality-detail-short{display:block}.quality-panel p{font-size:.72rem}.quality-panel strong{font-size:.78rem}}
.standing-short{display:none}
@media(min-width:900px) and (max-width:1100px){.standing-full{display:none}.standing-short{display:inline}}
/* Keep cost previews and the current draft fragment in view on shorter desktops. */
@media(min-width:900px) and (max-height:800px){
  .desk-workspace{gap:6px}
  .desk-workspace .action-zone .choice{padding-top:3px;padding-bottom:3px}
  .desk-workspace .action-zone-head p{display:none}
  .desk-workspace .upgrade-badge{padding:.35rem .5rem;gap:.5rem}
  #work-panel[data-stage="c2_contribute"] .draft-lines>div:not(:last-child){display:none}
}
/* System colors preserve visible meters when Windows replaces the palette. */
/* Research terms remain readable without pushing decisions off a compact desk. */
@media(min-width:900px){
  #main:is([data-chapter="3"],[data-chapter="4"],[data-chapter="5"]) .desk-workspace .work-panel{flex:1 1 auto;min-height:120px;overflow:auto;overscroll-behavior:contain}
  #desk-workspace[data-stage="c3_focus"] .choices>button:last-child{grid-column:1/-1}
  #main:is([data-chapter="3"],[data-chapter="4"],[data-chapter="5"]) .action-note{max-height:4.5rem;overflow:auto}
}
@media(min-width:1200px){
  #desk-workspace[data-stage="c3_focus"] .choices{grid-template-columns:repeat(3,minmax(0,1fr))}
  #desk-workspace[data-stage="c3_focus"] .choices>button:last-child{grid-column:auto}
}
.artifact-paper.research .draft-lines>div{border-left-color:#7a8b68}
.career-paper details,.career-ending details{margin-top:.8rem;font-size:.84rem;line-height:1.5}
.career-active h2,.career-active .paper-kicker,.career-active .draft-lines dt{overflow-wrap:anywhere}
.career-paper summary,.career-ending summary{cursor:pointer;font-weight:750;padding:.35rem 0;color:#304e3a}
.artifact-paper summary:focus-visible{outline:3px solid #a44521;outline-offset:2px}
.direction-guide{margin-top:.8rem;padding:.8rem;border-left:4px solid var(--green);background:#edf2e9;font-size:.82rem;line-height:1.5}
.direction-guide p{margin:.4rem 0 0}
.build-version{display:inline-block;margin-left:.5rem;font-weight:750;white-space:nowrap}
.career-paper .task-cost,.career-paper .finish-feedback{border-top:1px solid #bbc7b6;padding-top:.65rem;color:#344c3c;line-height:1.5}
.career-ending .ending-proof{font-size:1.02rem;line-height:1.65;color:#283c2e;border-left:3px solid #9d6a37;padding:.6rem .85rem;background:#f0eadc}
.ending-record{padding-left:1.3rem}.ending-record li{padding:.25rem 0;overflow-wrap:anywhere}
.ending-chapters{margin-top:.7rem}
.career-ending .ending-chapter{border-top:1px solid #bbc7b6;margin-top:0}
.career-ending .ending-chapter>summary{padding:.65rem .25rem}
.ending-chapter .entry-count{font-weight:400}
.career-ending summary:focus-visible{outline:3px solid #a44521;outline-offset:2px}
.work-rhythm{border-left:3px solid #7a8b68;padding:.6rem .85rem;margin:.8rem 0;background:#edf0e6;line-height:1.5}
.work-rhythm p{margin:.4rem 0 0}
@media(max-width:899px){
  #main.career-active .metrics{grid-template-columns:repeat(auto-fit,minmax(min(100%,11rem),1fr))}
  #main.career-active .metric{min-width:0}
  #main.career-active .metric-heading{flex-wrap:wrap}
  #main.career-active .metrics .metric:first-child{padding-right:0;border-right:0}
}
@media(min-width:900px){
  #main.career-active .desk-workspace .work-panel{flex:1 1 auto;min-height:130px;overflow:auto;overscroll-behavior:contain}
  #main.career-active .action-note{max-height:4.5rem;overflow:auto}
  #main.career-active .action-zone{max-height:42vh;overflow:auto;overscroll-behavior:contain;flex-shrink:0}
  #main.career-active .action-zone .choices{grid-template-columns:repeat(2,minmax(0,1fr));padding-bottom:16px}
  #main.career-active .action-zone .choices>button:only-of-type{grid-column:1/-1}
  #main.career-active .action-zone.near-top .choices:has(>button:only-child){padding-bottom:48px}
  #main.career-active .action-zone .upgrade-badge{grid-column:1/-1}
  #main.career-active .draft-lines dt,#main.career-active .draft-lines dd{display:block}
  #main.career-active .draft-lines dt:after{content:''}
}
@media(forced-colors:active){
  .meter{background:Canvas;border:1px solid CanvasText}
  .fill{background:Highlight;forced-color-adjust:none}
  .scene-caption{background:Canvas;color:CanvasText}
}
