:root{--forest:#173e35;--ink:#213c35;--muted:#687a74;--paper:#f4f6f1;--line:#dce4dc;--amber:#b36d25}body{background:var(--paper)}button,input,select,textarea{font:inherit}button,a,input,select,textarea{outline-offset:4px}.p-shell{display:grid;grid-template-columns:238px minmax(0,1fr);min-height:100vh}.p-side{position:sticky;top:0;height:100vh;background:var(--forest);color:#fff;padding:30px 20px;display:flex;flex-direction:column;gap:20px}.p-side .brand{margin-bottom:16px}.p-side nav{display:grid;gap:7px}.p-side nav a{color:#d9e4dc;text-decoration:none;padding:12px 13px;border-radius:7px;font-size:14px}.p-side nav a:hover,.p-side nav a[aria-current]{background:#2b5147;color:#fff}.p-side small{color:#c0d1c7}.p-side .account{margin-top:auto;border-top:1px solid #527065;padding-top:20px}.p-side .account p{font-size:13px;line-height:1.7}.p-side .account button{width:100%;background:transparent;color:white;border:1px solid #688578;padding:10px;border-radius:6px}.p-workspace{min-width:0}.p-top{padding:18px 38px;border-bottom:1px solid var(--line);background:#fcfdf9;display:flex;justify-content:space-between;gap:12px;font-size:12px;color:var(--muted)}.p-main{padding:32px 38px;max-width:1540px;margin:auto}.p-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:25px}.p-heading h1{font-size:34px;letter-spacing:-1px;font-weight:600;line-height:1.2;margin:5px 0 10px}.p-heading p{color:var(--muted);max-width:740px;line-height:1.6}.p-heading .eyebrow{font-size:10px;letter-spacing:1.8px;color:#536f60}.p-pill{background:#e8eee2;color:#456149;border:1px solid #d4dfcc;padding:5px 9px;border-radius:20px;font-size:11px;white-space:nowrap}.p-pill.pending{background:#fff3df;border-color:#eddbbb;color:#80551d}.p-period{background:#e8eee4;border:1px solid #d8e2d1;border-radius:8px;padding:15px 20px;font-size:13px;line-height:1.7;margin-bottom:22px;display:flex;justify-content:space-between;gap:15px;flex-wrap:wrap}.p-filters{display:flex;gap:13px;align-items:end;flex-wrap:wrap;margin-bottom:24px}.p-filters label,.p-field{display:grid;gap:6px;font-size:12px;color:#465b51}.p-filters input,.p-filters select,.p-field input,.p-field select,.p-field textarea{border:1px solid #cbd7cb;border-radius:5px;background:white;padding:10px 12px;color:#233c32;min-width:0}.p-filters input{max-width:140px}.p-field textarea{min-height:100px;resize:vertical}.p-tabs{display:flex;gap:22px;border-bottom:1px solid var(--line);margin-bottom:22px;overflow:auto}.p-tabs button{border:0;background:none;padding:12px 0;white-space:nowrap;color:var(--muted)}.p-tabs button[aria-selected=true]{border-bottom:3px solid var(--forest);color:var(--forest);font-weight:600}.p-highlights{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-bottom:25px}.p-highlight{background:#fff;padding:22px;border:1px solid var(--line);border-radius:9px;box-shadow:0 3px 8px #173e3504}.p-highlight h2{font-size:12px;color:var(--muted);font-weight:500;margin:0 0 16px}.p-highlight strong{display:block;font-size:35px;line-height:1.1;font-weight:600;letter-spacing:-1px;color:var(--ink)}.p-highlight small{display:block;font-size:12px;color:var(--muted);margin-top:13px;line-height:1.5}.p-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:19px}.p-card,.p-panel{border:1px solid var(--line);background:#fff;border-radius:9px;padding:23px;min-width:0}.p-panel{margin-bottom:20px}.p-card-head{display:flex;gap:12px;justify-content:space-between;align-items:start;margin-bottom:17px}.p-card h2,.p-panel h2{font-size:17px;line-height:1.5;margin:2px 0 10px;font-weight:600}.p-card .story-id{font-size:10px;letter-spacing:1px;color:#7b8e80}.p-metrics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 12px;margin:20px 0}.p-metric .value{font-size:27px;color:var(--ink);letter-spacing:-.6px;display:block}.p-metric label{font-size:11px;color:var(--muted);line-height:1.6;display:block;margin-top:5px}.p-metric .basis{display:block;font-size:10px;color:#6c7b73;margin-top:4px}.p-prompt{background:#eef3e9;border-left:3px solid #6c8c63;padding:12px 15px;font-size:12px;line-height:1.7;margin:10px 0}.p-pending{background:#fff9ef;color:#78572c;font-size:12px;line-height:1.65;padding:11px 14px;border-radius:5px;margin:9px 0}.p-card details{border-top:1px solid var(--line);margin-top:17px;padding-top:15px;font-size:12px;line-height:1.7}.p-card summary{cursor:pointer;font-weight:600}.p-bars{display:grid;gap:11px;margin:18px 0}.p-bar-label{display:flex;justify-content:space-between;font-size:11px;gap:12px}.p-bar-track{height:5px;background:#edf0e9;margin-top:5px;border-radius:3px;overflow:hidden}.p-bar-track span{display:block;background:#678968;height:100%}.p-table{overflow:auto;max-height:520px}.p-table table{width:100%;border-collapse:collapse;font-size:12px}.p-table th{background:#f3f6ef;position:sticky;top:0;text-align:left;padding:12px;color:#596d5e;font-weight:500;white-space:nowrap}.p-table td{border-bottom:1px solid #e8ede5;padding:13px 12px;line-height:1.6;max-width:340px;overflow-wrap:anywhere;vertical-align:top}.p-table td a,.p-link{color:#2a6650;text-underline-offset:3px}.p-table button{font-size:11px;padding:6px 10px}.p-toolbar{display:flex;justify-content:space-between;align-items:end;gap:15px;flex-wrap:wrap;margin-bottom:20px}.p-toolbar .p-field{min-width:230px}.p-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.p-note{font-size:12px;color:var(--muted);line-height:1.75}.p-empty{text-align:center;padding:45px 15px;color:var(--muted)}.p-search{width:100%;margin:0 0 20px;padding:12px;border:1px solid #cbd7cb;border-radius:6px}.p-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.p-field.wide{grid-column:1/-1}.p-form-grid fieldset{grid-column:1/-1;border:1px solid var(--line);padding:18px;border-radius:6px}.p-form-grid legend{font-weight:600;padding:0 8px}.p-question{display:grid;grid-template-columns:minmax(0,1fr) 190px;gap:20px;padding:14px 0;border-bottom:1px solid var(--line);font-size:13px;line-height:1.7}.p-question select{border:1px solid #cbd7cb;border-radius:5px;padding:8px;background:white;min-width:0}.p-question .item-index{color:#7a887c;font-size:11px;margin-right:6px}#record-dialog{border:0;border-radius:12px;width:min(1000px,94vw);max-height:90vh;padding:0;color:var(--ink);box-shadow:0 20px 100px #0c221f66}#record-dialog::backdrop{background:#16362f70}#record-dialog .dialog-head{padding:25px 28px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:start;position:sticky;top:0;background:white;z-index:2}#record-dialog h2{margin:0;font-size:23px}#record-dialog .dialog-body{padding:25px 28px}#record-dialog .dialog-footer{display:flex;justify-content:space-between;gap:10px;border-top:1px solid var(--line);padding:18px 28px;position:sticky;bottom:0;background:white}.p-error{color:#9b302d;background:#fff2ef;border:1px solid #ebccc5;padding:12px 16px;border-radius:6px;font-size:13px;line-height:1.7;margin:13px 0}.p-history{margin-top:25px;font-size:12px;line-height:1.7}.p-theme{border-top:1px solid var(--line);padding:12px 0}.p-theme strong{font-size:13px}.p-theme p{line-height:1.8;font-size:13px}.p-timeline{border-left:2px solid #d5dfce;margin-left:8px;padding-left:23px}.p-timeline article{margin-bottom:20px;font-size:13px;line-height:1.7}.p-timeline .p-note{margin:5px 0}.p-statline{font-size:13px;color:#5c7160;display:flex;gap:18px;flex-wrap:wrap}.p-footer{display:flex;justify-content:space-between;font-size:10px;color:#81907e;margin-top:35px;border-top:1px solid var(--line);padding-top:18px}.p-notices{border:1px solid #edcc9f;background:#fff7e8;padding:15px 20px;border-radius:6px;margin-bottom:20px;font-size:12px;line-height:1.8}.p-checkbox{display:flex;align-items:center;gap:8px;font-size:12px}.p-skeleton{padding:60px;text-align:center;color:var(--muted)}@media(min-width:1550px){.p-main{padding-top:40px}.p-grid{gap:24px}.p-card{padding:27px}}@media(max-width:1050px){.p-shell{grid-template-columns:195px minmax(0,1fr)}.p-side{padding:24px 13px}.p-main{padding:26px 24px}.p-grid{grid-template-columns:1fr}.p-top{padding:18px 24px}.p-highlight{padding:16px}.p-highlight strong{font-size:28px}}@media(max-width:700px){.p-shell{display:block}.p-side{position:relative;height:auto;padding:16px 18px;gap:10px}.p-side .brand{margin:0}.p-side nav{display:flex;overflow:auto;gap:5px}.p-side nav a{white-space:nowrap;padding:9px;font-size:12px}.p-side .account{display:none}.p-top{padding:12px 18px}.p-main{padding:22px 17px}.p-heading h1{font-size:28px}.p-heading{display:block}.p-heading .p-actions{margin-top:12px}.p-highlights{grid-template-columns:1fr}.p-highlight{display:grid;grid-template-columns:1fr auto;gap:5px 20px}.p-highlight h2{margin:0}.p-highlight strong{grid-column:2;grid-row:1/3;align-self:center}.p-highlight small{margin:0}.p-form-grid{grid-template-columns:1fr}.p-field.wide{grid-column:auto}.p-question{grid-template-columns:1fr;gap:9px}.p-filters{display:grid;grid-template-columns:1fr 1fr}.p-filters label{min-width:0}.p-filters input{max-width:100%;width:100%;box-sizing:border-box}.p-card,.p-panel{padding:19px}.p-toolbar .p-field{min-width:0;width:100%}.p-period{font-size:11px}.p-footer{display:block;line-height:1.8}.p-metrics{gap:15px}.p-card-head .p-pill{font-size:9px}#record-dialog .dialog-head,#record-dialog .dialog-body{padding:20px}#record-dialog .dialog-footer{padding:15px 20px}.p-actions .button{font-size:11px}.p-top span:last-child{display:none}}

.p-side .account p{color:#dce9df}.p-side .account strong{color:#fff}.p-bars meter{display:block;width:100%;height:9px;margin-top:5px}
.p-late{color:#9b302d;font-weight:600;white-space:nowrap}
.p-toast{position:fixed;right:24px;bottom:24px;z-index:1000;max-width:min(420px,calc(100vw - 32px));padding:12px 16px;border-radius:8px;background:#173e35;color:#fff;font-size:13px;line-height:1.4;box-shadow:0 6px 24px rgba(0,0,0,.18)}.p-toast[hidden]{display:none}
.p-nav-group{margin:12px 13px 0;color:#9fb8ab;font-size:10px;font-weight:700;letter-spacing:.08em;text-transform:uppercase}.p-nav-group:first-child{margin-top:0}
@media(max-width:700px){.p-nav-group{display:none}}
.p-side nav{display:flex;flex-direction:column;gap:4px}.p-side nav .p-nav-gap{height:14px}.p-side nav a.p-out{font-size:12px;color:#b9cbbf;padding:8px 13px}
.p-badge{display:inline-block;min-width:20px;margin-left:8px;padding:1px 7px;border-radius:10px;background:#c0392b;color:#fff;font-size:11px;font-weight:700;text-align:center;line-height:18px}
.p-more summary{cursor:pointer;color:#d9e4dc;padding:12px 13px;border-radius:7px;font-size:14px;list-style:none}.p-more summary::-webkit-details-marker{display:none}.p-more summary::after{content:" ▾"}.p-more[open] summary::after{content:" ▴"}.p-more summary:hover{background:#2b5147}.p-more a{display:block;padding-left:26px!important}
.p-heading h1{margin-top:0}
.p-alert{background:#fdecea;border:1px solid #e6a59e;border-left:6px solid #c0392b;border-radius:9px;padding:18px 22px;margin-bottom:22px}.p-alert h2{color:#8e1f15;font-size:17px;margin:0 0 8px;display:flex;align-items:center;gap:10px}.p-dot{width:12px;height:12px;border-radius:50%;background:#c0392b;flex:none}.p-alert ul{list-style:none;margin:0 0 10px;padding:0}.p-alert li{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:10px 0;border-top:1px solid #f1c7c1;font-size:13px;line-height:1.6}.p-alert li span{color:#5e3530}
.p-section{margin-bottom:22px}.p-section-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px;flex-wrap:wrap}.p-section-head h2{margin:0;font-size:17px}
.p-boxes{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:14px}
.p-box{background:#fff;border:1px solid var(--line);border-radius:9px;padding:18px}.p-box h3{font-size:12px;font-weight:500;color:var(--muted);margin:0 0 10px;line-height:1.4}.p-box strong{display:block;font-size:32px;font-weight:600;letter-spacing:-1px;color:var(--ink);line-height:1.1}.p-box small{display:block;font-size:11px;color:var(--muted);margin-top:8px;line-height:1.5}
.p-box-warn{border-color:#eddbbb;background:#fffaf0}.p-box-alert{border-color:#e6a59e;background:#fdecea}.p-box-alert strong{color:#a32a1d}
.p-box[draggable=true]{cursor:grab;outline:2px dashed #b9cbbf;outline-offset:-6px}.p-box.dragging{opacity:.4}.p-box-tools{display:flex;gap:6px;margin-top:12px;flex-wrap:wrap}.p-box-tools .button{font-size:11px;padding:5px 9px}.p-box-add{margin-top:14px;align-items:end}
.p-stages{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px}.p-stage{display:block;text-decoration:none;color:var(--ink);background:#f3f6ef;border:1px solid var(--line);border-radius:9px;padding:16px;text-align:center}.p-stage span{display:block;font-size:12px;color:var(--muted)}.p-stage strong{display:block;font-size:30px;font-weight:600;margin-top:6px}a.p-stage:hover{background:#e6eee1}
.p-table th[scope=row]{position:static;background:none;font-weight:500;color:var(--ink);white-space:normal}.p-total th,.p-total td{font-weight:700;background:#f3f6ef!important}
.p-facts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:0}.p-facts div{background:#f6f8f3;border-radius:7px;padding:12px}.p-facts dt{font-size:11px;color:var(--muted)}.p-facts dd{margin:4px 0 0;font-size:22px;font-weight:600}.p-facts-small{grid-template-columns:1fr}.p-facts-small dd{font-size:14px}
.p-load{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.p-load meter{width:120px}
.p-list{list-style:none;padding:0;margin:0}.p-list li{border-top:1px solid var(--line);padding:10px 0;font-size:13px;line-height:1.6;display:flex;justify-content:space-between;gap:10px;align-items:center}
.p-profile{display:grid;grid-template-columns:260px minmax(0,1fr);gap:20px;align-items:start}.p-profile-side{display:grid;gap:10px;position:sticky;top:20px}.p-profile-side>.button{width:100%;text-align:center;box-sizing:border-box}.p-profile-side hr{border:0;border-top:1px solid var(--line);margin:6px 0;width:100%}.p-worker{display:grid;gap:8px;border-top:1px solid var(--line);padding-top:12px}
.p-report{border-top:1px solid var(--line);padding:16px 0}.p-report:first-of-type{border-top:0}.p-report header{display:flex;gap:12px;flex-wrap:wrap;align-items:baseline;font-size:14px}.p-report header span{color:var(--muted);font-size:12px}.p-report p{font-size:14px;line-height:1.75;margin:8px 0}.p-report-summary{font-weight:600}
.p-records-list{background:#fff;border:1px solid var(--line);border-radius:9px;padding:6px 23px}
.p-stage-history{padding-left:18px;font-size:13px;line-height:2.1}.p-stage-history .button{font-size:11px;padding:4px 9px;margin-left:6px}
.p-subnav{display:flex;gap:8px;margin-bottom:20px;flex-wrap:wrap}.p-subnav a{padding:8px 14px;border-radius:20px;border:1px solid var(--line);text-decoration:none;color:var(--muted);font-size:13px;background:#fff}.p-subnav a[aria-current]{background:var(--forest);color:#fff;border-color:var(--forest)}
.p-unread td{background:#fff5f4}.p-plain{font-size:13px;line-height:1.8;padding-left:18px}.p-guide{font-size:13px;line-height:1.7;margin:8px 0}.p-guide summary{cursor:pointer;font-weight:600}.p-guide .p-guide{margin-left:16px}
.p-pick{width:100%;box-sizing:border-box}.p-filters .p-pick,#people-search{min-width:240px}
@media(max-width:1050px){.p-stages{grid-template-columns:repeat(3,minmax(0,1fr))}.p-profile{grid-template-columns:1fr}.p-profile-side{position:static}.p-facts{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){.p-side nav{flex-direction:row}.p-side nav .p-nav-gap{display:none}.p-more summary{white-space:nowrap;padding:9px;font-size:12px}.p-boxes{grid-template-columns:repeat(2,minmax(0,1fr))}.p-alert li{flex-direction:column;align-items:flex-start}}
@media print{.p-side,.p-noprint,.p-heading .p-actions,.p-filters,.p-box-tools,#customise,.client-demo-banner,.p-toast{display:none!important}.p-shell{display:block}.p-main{padding:0;max-width:none}.p-panel,.p-box,.p-report{break-inside:avoid}}
#record-dialog [hidden],.p-main [hidden]{display:none!important}
.p-savebar{position:sticky;bottom:0;z-index:3;display:flex;justify-content:space-between;align-items:center;gap:12px;background:#fcfdf9;border:1px solid var(--line);border-radius:9px;padding:14px 18px;box-shadow:0 -4px 14px #173e3512;margin-top:10px}.p-filters>p.p-field strong{font-size:14px;color:var(--ink)}
.p-embed{min-height:120px}.p-embed iframe{width:100%;height:1520px;border:0;display:block;border-radius:6px}@media(max-width:700px){.p-embed iframe{height:2600px}}
#word-rows td:first-child{min-width:220px}#word-rows .p-pick{min-width:200px}#word-rows td{vertical-align:top}#word-rows .p-table{max-height:none}
.p-choices{display:grid;gap:12px}.p-choice{display:flex;gap:12px;align-items:flex-start;border:1px solid var(--line);border-radius:9px;padding:14px 16px;cursor:pointer;background:#fff}.p-choice.selected{border-color:#2a6650;background:#f3f7f1}.p-choice input{margin-top:4px}.p-provider{margin:-4px 0 6px 0;padding:14px 16px;border:1px dashed var(--line);border-radius:9px}
.p-summary-overview{font-size:15px;line-height:1.7}.p-summary-list{padding-left:18px;font-size:14px;line-height:1.7;margin:4px 0 12px}.p-summary-list li{margin:4px 0}#case-summary h3{font-size:14px;margin:14px 0 2px;color:var(--forest)}
.p-cites{display:inline-flex;flex-wrap:wrap;gap:4px;margin-left:4px}.p-cite{border:1px solid var(--line);background:#f3f6ef;border-radius:12px;padding:1px 8px;font-size:11px;color:#2a6650;cursor:pointer}.p-cite:hover{background:#e6eee1}
/* The menu scrolls on its own when it is taller than the window (for example with Manage open), and sits below the demo banner when there is one. On a phone, the account row stays visible so Sign out can always be reached. */
.p-side{top:var(--demo-offset,0px);height:calc(100vh - var(--demo-offset,0px));height:calc(100dvh - var(--demo-offset,0px));overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#527065 transparent}
@media(max-width:700px){.p-side{top:auto;height:auto;overflow:visible}.p-side .account{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0;border-top:1px solid #527065;padding-top:10px}.p-side .account p{margin:0;font-size:12px;line-height:1.5}.p-side .account button{width:auto;padding:7px 14px;font-size:12px}}
/* Programme rules: full-width boxes so the default shown in each can be read, and a programme's buttons side by side. */
#rules-form .p-field input{width:100%;box-sizing:border-box}.p-row-actions{flex-wrap:nowrap}
/* A programme's rules: boxes wide enough to read the value each falls back to. */
#programme-form .p-form-grid input{width:100%;max-width:340px;box-sizing:border-box}

/* Session preparation needs room for full goal descriptions. */
#story-T3-09{grid-column:1/-1}
#story-T3-09 .p-table table{min-width:1420px}
#story-T3-09 [data-detail-field="goals"]{width:32%;min-width:430px;max-width:none;white-space:normal;overflow-wrap:break-word;line-height:1.75}
#story-T3-09 [data-detail-field="summary"]{min-width:220px}
#story-T3-09 [data-detail-field="name"]{min-width:125px}
