/* Shared palette for SSR, React workflows and the local sign-in page.
   Selection and informational surfaces use purple; status colours stay semantic. */
:root{
 font:16px/1.5 ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
 --ink:#281a36;
 --primary:#7925b0;
 --primary-hover:#64208f;
 --blue:var(--primary);
 --muted:#706477;
 --line:#e4dfea;
 --surface:#fff;
 --canvas:#f6f5f9;
 --surface-subtle:#faf8fc;
 --accent-soft:#f3edf8;
 --accent-line:#d9c5e8;
 --accent-text:#623080;
 --control-border:#86758f;
 --focus:var(--primary);
 --success:#19654c;
 color:var(--ink);
 background:var(--canvas);
 accent-color:var(--primary);
}
*{box-sizing:border-box}body{margin:0}a{color:var(--blue);text-underline-offset:3px}a:hover{text-decoration-thickness:2px}button,.button{font:inherit;cursor:pointer;background:var(--blue);color:white;border:1px solid var(--blue);border-radius:10px;padding:10px 16px;display:inline-flex;align-items:center;justify-content:center;gap:8px;vertical-align:middle;text-align:center;line-height:1.5;text-decoration:none;font-weight:600;font-size:.875rem;box-shadow:0 1px 2px #281a3614}button:hover,.button:hover{background:var(--primary-hover)}button:disabled{opacity:.55;cursor:default}.quiet{background:var(--surface);color:var(--ink);border-color:var(--line)}.quiet:hover{background:var(--accent-soft);color:var(--ink)}:focus-visible{outline:3px solid var(--focus);outline-offset:3px}h1,h2,h3,p{margin-top:0}h1{font-size:2rem;line-height:1.2;letter-spacing:-.045em;font-weight:700;margin-bottom:8px}h2{font-size:1.125rem;line-height:1.4;margin-bottom:12px;letter-spacing:-.02em}h3{font-size:1rem;margin-bottom:8px}p{color:var(--muted);margin-bottom:16px}svg{width:20px;height:20px;flex-shrink:0}.shell{display:flex;max-width:1280px;margin:0 auto;min-height:100vh}.sidebar{position:sticky;top:0;height:100vh;width:256px;flex-shrink:0;border-right:1px solid var(--line);padding:24px 16px;display:flex;flex-direction:column;background:#ffffffa8}.brand-block{padding:0 8px;margin-bottom:32px}.organisation-name{font-size:11px;letter-spacing:.2em;text-transform:uppercase;font-weight:700;margin:0 0 8px;overflow-wrap:anywhere}.brand{display:block;font-size:1.5rem;line-height:1.2;letter-spacing:-.055em;color:var(--blue);font-weight:750;text-decoration:none}.brand-description{font-size:12px;margin:6px 0 8px}.environment-chip{display:inline-block;border:1px solid var(--accent-line);background:var(--accent-soft);color:var(--accent-text);border-radius:20px;font-size:10px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;padding:2px 8px}.sidebar nav{display:grid;gap:4px}.sidebar nav a{display:flex;gap:12px;align-items:center;text-decoration:none;color:var(--muted);font-size:14px;font-weight:600;border-radius:12px;padding:12px}.sidebar nav a:hover{background:var(--accent-soft)}.sidebar nav a[aria-current=page]{background:var(--blue);color:#fff}.sidebar nav svg{width:17px;height:17px}.sidebar-bottom{margin-top:auto;font-size:11px;padding-top:24px}.sidebar-bottom>p{padding:0 4px;margin:12px 0 0;line-height:1.7}.account-card{padding:12px;border:1px solid var(--line);border-radius:12px;background:var(--canvas)}.account-name{display:flex;align-items:center;gap:8px}.account-name svg{width:32px;height:32px;color:var(--muted)}.account-name>div{min-width:0}.account-name strong{display:block;font-size:13px;overflow-wrap:anywhere}.account-name span{display:block;font-size:11px;color:var(--muted);overflow-wrap:anywhere}.account-card p{margin:8px 0;font-size:12px}.account-card a{font-size:12px;text-decoration:none;font-weight:600}.content{flex:1;min-width:0}.topbar{position:sticky;top:0;z-index:10;min-height:60px;background:#fffffff5;border-bottom:1px solid var(--line);padding:12px 40px;display:flex;align-items:center;justify-content:space-between;gap:16px}.today{font-size:12px;color:var(--muted)}.topbar-actions{display:flex;align-items:center;gap:16px}.topbar button{font-size:12px;padding:6px 10px}.context-link{display:grid;font-size:11px;gap:1px;text-decoration:none;max-width:170px}.context-link span{color:var(--muted)}main{padding:40px;max-width:1080px;margin:0 auto;min-width:0}footer{padding:20px 40px;font-size:11px;color:var(--muted)}.skip{position:fixed;top:-100px;left:16px;background:white;z-index:50;padding:12px}.skip:focus{top:10px}.page-heading{margin-bottom:28px}.page-heading>.eyebrow:empty{display:none}.page-heading>p{font-size:14px;margin-bottom:0}.heading-row{display:flex;justify-content:space-between;align-items:center;gap:16px}.eyebrow,.section-caption{font-size:12px;font-weight:650;text-transform:uppercase;letter-spacing:.04em;color:var(--muted)}.eyebrow{display:block;margin-bottom:8px}.muted,.cell-secondary{font-size:12px;color:var(--muted)}.cell-secondary{display:block;margin-top:5px}.surface,.card{background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:24px;box-shadow:0 1px 3px #281a3626;overflow-wrap:anywhere}.surface{margin:20px 0}.surface h2{margin-bottom:12px}.cards{display:grid;gap:12px;margin-bottom:28px}.card p{font-size:14px}.card a{font-size:13px}.badge{display:inline-block;font-size:11px;font-weight:600;border:1px solid var(--accent-line);border-radius:20px;background:var(--accent-soft);color:var(--accent-text);padding:2px 10px}.notice,.context-note{border:1px solid var(--line);background:var(--surface-subtle);border-radius:12px;padding:16px;margin:16px 0;font-size:14px;color:var(--muted)}.warning{background:#fff8ea;border-color:#eed39a;color:#78501c}.error{background:#fef0ef;border-color:#efb9b6;color:#9a3029}.success{background:var(--surface);border-color:var(--success);color:var(--success)}.empty{padding:20px;border:1px dashed var(--line);border-radius:10px;background:var(--surface-subtle);font-size:14px;margin:16px 0}.back{display:inline-block;font-size:14px;margin-bottom:24px;text-decoration:none;color:var(--muted)}.detail{max-width:900px}.context-banner{display:flex;align-items:baseline;flex-wrap:wrap;gap:12px;border:1px solid var(--line);border-radius:12px;padding:16px;background:var(--surface-subtle);margin:16px 0}.context-banner strong{font-size:1.1rem}.context-banner span{font-size:13px}.work-context{font-size:13px!important}.work-context a{font-size:inherit}.priority{display:inline-block;color:#cf2925;font-size:12px;font-weight:650;margin-bottom:8px}.workspace-grid{display:grid;grid-template-columns:1fr;gap:24px;margin-top:32px}.section-title{display:flex;align-items:center;gap:10px}.section-title h2{margin:0}.section-description{font-size:13px;margin:4px 0 12px}.count{font-size:11px;background:var(--accent-soft);padding:2px 8px;border-radius:20px}.workspace-grid .cards{margin:0}.work-row{position:relative;padding:20px 24px}.work-row h3{font-size:16px}.work-row>p:last-of-type{margin-bottom:8px}.work-row>a:last-child{font-weight:600}.work-row>a:last-child:not(.button){display:inline-block}.workspace-grid .work-row>a:last-child{border:1px solid var(--line);padding:6px 12px;border-radius:10px;text-decoration:none}.breadcrumbs{margin-bottom:20px;font-size:12px;color:var(--muted)}.breadcrumbs ol{display:flex;flex-wrap:wrap;list-style:none;margin:0;padding:0;gap:8px}.breadcrumbs li+li:before{content:'›';margin-right:8px}.breadcrumbs a{color:var(--muted);text-decoration:none}.search-bar{display:flex;gap:12px;align-items:end;margin:24px 0}.search-bar>.field:first-of-type{flex:1}.search-bar label{font-size:12px}.search-bar input,.search-bar select{min-height:40px}.search-bar button{min-height:40px}.field{display:grid;gap:6px}label{display:grid;gap:6px;font-weight:600;font-size:14px}input,textarea,select{font:inherit;width:100%;min-width:0;max-width:100%;padding:10px 12px;border:1px solid var(--line);border-radius:10px;color:var(--ink);background:white;box-shadow:0 1px 2px #281a3612}textarea{resize:vertical;min-height:90px}small{font-size:12px;font-weight:400;color:var(--muted)}.form{display:grid;gap:20px;max-width:740px}.form button{justify-self:start}.login{max-width:650px;margin:30px auto;padding:32px}dl{display:grid;grid-template-columns:minmax(130px,1fr) 2fr;gap:12px 24px;margin:20px 0}dt{font-size:13px;font-weight:600}dd{margin:0;font-size:14px;overflow-wrap:anywhere}.student-grid{list-style:none;padding:0;margin:24px 0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.student-card{background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:0 1px 3px #281a3626;padding:18px}.entity-primary{display:flex;justify-content:space-between;align-items:center;gap:16px;font-size:16px;font-weight:600;text-decoration:none}.entity-primary span,.case-card h2 span,.case-card h3 span{color:var(--muted);font-size:23px;line-height:1}.student-card p{font-size:14px;margin:4px 0}.list-view{grid-template-columns:1fr}.view-switch{display:flex;border:1px solid var(--line);border-radius:12px;overflow:hidden;flex-shrink:0}.view-switch a{padding:10px 12px;text-decoration:none;font-size:14px}.view-switch a[aria-current=page]{background:var(--blue);color:white}.case-card h2{margin:8px 0 4px;font-size:16px}.case-card h2 a,.case-card h3 a{display:flex;justify-content:space-between;text-decoration:none}.case-card p{font-size:13px;margin:6px 0 0}.case-card>.muted{margin-left:8px}.student-tabs{display:flex;flex-wrap:wrap;gap:4px;border-radius:12px;background:var(--accent-soft);padding:4px;width:fit-content;margin:24px 0}.student-tabs a{border:1px solid transparent;border-radius:10px;padding:8px 12px;font-size:14px;font-weight:600;text-decoration:none;color:var(--muted)}.student-tabs a[aria-current=page]{border-color:var(--line);background:white;box-shadow:0 1px 3px #281a3619;color:var(--ink)}.access-summary{margin:0 0 24px}.student-facts{display:grid;grid-template-columns:1fr 1fr;gap:24px}.student-facts p{font-size:14px;color:var(--ink);margin-bottom:0}.student-facts .eyebrow{margin-bottom:4px}.case-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px}.case-summary p{font-size:12px;margin:8px 0 0}.case-summary strong{display:block;font-size:14px}.process-nav{display:flex;flex-wrap:wrap;gap:8px;margin:24px 0 12px}.process-nav a{padding:8px 12px;background:white;border:1px solid var(--line);border-radius:10px;text-decoration:none;font-size:12px}.record{border-top:1px solid var(--line);padding:16px 0;overflow-wrap:anywhere}.record:first-of-type{border-top:0}.record p:last-child{margin-bottom:0}.record p{font-size:14px}.record-heading{display:flex;justify-content:space-between;gap:16px;align-items:baseline}.record-heading h3{margin-bottom:8px}details.record summary{cursor:pointer;font-weight:600;font-size:14px}details.record[open] summary{margin-bottom:16px}.document-list,.entity-list{list-style:none;margin:0;padding:0}.document-list li,.entity-list li{padding:12px 0}.next-step{background:var(--surface-subtle);border-radius:10px;padding:12px;font-size:14px}.timeline{list-style:none;padding:0;margin:20px 0}.timeline li{border-left:2px solid var(--line);padding:0 0 4px 16px;margin-bottom:16px;font-size:14px}.timeline p{font-size:12px;margin:4px 0}.template-card{display:flex;justify-content:space-between;align-items:center;gap:24px}.template-card>div{flex:1}.template-card p{font-size:14px;margin-bottom:0}.template-card .muted{font-size:12px;margin-top:8px}.template-card .button{flex-shrink:0}.table-scroll{max-width:100%;overflow:auto}table{width:100%;border-collapse:collapse;font-size:14px;text-align:left}th,td{padding:12px;border-bottom:1px solid var(--line)}th{font-size:12px;color:var(--muted)}.surface:target{scroll-margin-top:90px}
/* Pedagogical form sections are reused from the original React components. */
#workflow-root{max-width:1080px}#workflow-root .card{margin:20px 0}#workflow-root .form-fields{display:grid;gap:8px;margin:16px 0}#workflow-root label{display:block;margin:12px 0 6px;font-weight:600}#workflow-root textarea,#workflow-root input:not([type=checkbox]):not([type=radio]),#workflow-root select{width:100%;max-width:100%;font:inherit}#workflow-root textarea{min-height:90px}#workflow-root input[type=checkbox],#workflow-root input[type=radio]{width:auto;min-height:0;margin-right:8px}#workflow-root details{border-bottom:1px solid var(--line);padding:12px 0}#workflow-root summary{cursor:pointer;font-weight:600;font-size:13px}#workflow-root .workflow-fieldset{border:0;padding:0;margin:0;min-width:0}#workflow-root fieldset:disabled{opacity:.85}#workflow-root button{margin:4px 8px 4px 0}#workflow-root .workflow-columns{display:grid;grid-template-columns:1fr;gap:0}#workflow-root .workflow-actions{display:flex;gap:8px;flex-wrap:wrap;margin:16px 0}#workflow-root .flex{display:flex;gap:8px;align-items:center}#workflow-root .flex label{margin:0;font-weight:400}#workflow-root .grid{display:grid;gap:12px}#workflow-root .rounded-xl.border{border:1px solid var(--line);border-radius:12px;padding:16px}#workflow-root .mt-3{margin-top:12px}#workflow-root .text-xs{font-size:12px}#workflow-root .text-sm{font-size:14px}#workflow-root h1{font-size:2rem}#workflow-root h2{margin-bottom:12px}#workflow-root textarea:disabled{background:var(--surface-subtle);color:var(--muted)}#workflow-root[data-embedded=true]>.workflow-columns .card,#workflow-root[data-embedded=true]>.card{padding:0;border:0;box-shadow:none;background:transparent}#workflow-root[data-embedded=true] .work-row{background:white;border:1px solid var(--line);border-radius:12px;margin:12px 0;box-shadow:0 1px 3px #281a3626}#workflow-root[data-embedded=true]>.workflow-columns .card>p,#workflow-root[data-embedded=true]>.card>p{font-size:13px}
@media(min-width:1100px){.workspace-grid .work-row{padding-right:200px}.workspace-grid .work-row>a:last-child{position:absolute;right:24px;top:calc(50% - 18px)}}
@media(max-width:1000px){main{padding:32px 24px}.topbar{padding:12px 24px}.sidebar{width:224px}.case-summary{grid-template-columns:1fr 1fr}.case-summary>div:last-child{grid-column:1/-1}.today{max-width:180px}.template-card{align-items:start;flex-direction:column;gap:12px}}
@media(max-width:767px){.shell{display:block}.sidebar{position:static;width:auto;height:auto;padding:16px;border-right:0;border-bottom:1px solid var(--line)}.brand-block{margin:0}.brand{font-size:20px}.brand-description,.organisation-name,.environment-chip,.sidebar-bottom{display:none}.sidebar nav{display:flex;overflow-x:auto;gap:4px;margin-top:12px;padding-bottom:2px}.sidebar nav a{flex-shrink:0;padding:8px 10px;font-size:12px}.sidebar nav svg{display:none}.topbar{padding:10px 20px;min-height:55px}.today{font-size:11px;max-width:140px}.context-link{font-size:10px;max-width:120px}.topbar-actions{gap:8px}.topbar button{font-size:11px;padding:6px 8px}main{padding:28px 20px}footer{padding:20px}h1,#workflow-root h1{font-size:26px}.heading-row{align-items:start}.search-bar{flex-wrap:wrap}.search-bar>.field:first-of-type{flex:1 1 100%}.search-bar>.field{flex:1}.search-bar select{font-size:13px}.student-grid{grid-template-columns:1fr}.student-facts,.case-summary{grid-template-columns:1fr}.case-summary>div:last-child{grid-column:auto}.student-tabs{width:100%;gap:0}.student-tabs a{flex:1;text-align:center;padding:8px 6px;font-size:12px;white-space:normal}.surface,.card{padding:20px}.record-heading{display:block}.view-switch a{padding:8px;font-size:12px}.case-card>.muted{display:block;margin:6px 0}.process-nav a{flex:1 1 40%}.work-row{padding:20px}dl{grid-template-columns:1fr;gap:4px}dd{margin-bottom:12px}#workflow-root button{max-width:100%;white-space:normal}.surface:target{scroll-margin-top:75px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto}}
.workspace-grid .work-row>a:last-child{background:var(--blue);color:white;border-color:var(--blue)}
#workflow-root[data-embedded=true]:empty{display:none}
.save-bar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:24px 0;padding:16px;background:var(--surface-subtle);border:1px solid var(--line);border-radius:12px;font-size:14px}.decision-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.decision-steps button{margin:0!important}.action-editor{padding:20px;border:1px solid var(--line);border-radius:12px;margin:16px 0}.action-editor>h3{display:inline-block;margin-right:16px}.decision-steps{position:sticky;top:60px;background:var(--canvas);padding:8px 0;z-index:4}#workflow-root fieldset:disabled{opacity:1}#workflow-root fieldset:disabled :is(input,textarea,select){background:var(--surface-subtle);color:var(--muted)}@media(max-width:767px){.decision-grid{grid-template-columns:1fr;gap:0}.save-bar{flex-wrap:wrap}.decision-steps{position:static}.decision-steps button{font-size:12px;flex:1 1 40%}}
/* NewReport reference: compact fields, visible guidance and grouped conditional inputs. */
#workflow-root .report-page{max-width:820px;margin:0 auto}#workflow-root .report-page>.back{margin-bottom:18px}#workflow-root .report-intro{font-size:14px;line-height:1.55;margin-bottom:22px}#workflow-root .report-save-bar{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 18px;background:var(--surface-subtle);border:1px solid var(--line);border-radius:12px;margin:0 0 24px;font-size:14px;color:var(--muted)}#workflow-root .report-save-bar button{margin:0;padding:6px 10px;border:0;box-shadow:none;background:transparent;color:var(--ink)}#workflow-root .report-form-card{padding:26px;margin:0}#workflow-root .report-form-card h2{margin-bottom:4px}#workflow-root .report-description{font-size:13px;line-height:1.5;margin-bottom:22px}#workflow-root .report-field{display:grid;gap:7px;margin:0 0 20px}#workflow-root .report-field:last-child{margin-bottom:0}#workflow-root .report-page label,#workflow-root .report-page legend{margin:0;font-size:14px;font-weight:600;line-height:1.45}#workflow-root .report-page input:not([type=radio]):not([type=checkbox]),#workflow-root .report-page select{min-height:42px;padding:10px 12px;font-size:14px}#workflow-root .report-page textarea{height:80px;min-height:80px;padding:10px 12px;font-size:14px;line-height:1.5;resize:vertical}#workflow-root .report-page :is(input,textarea)::placeholder{color:var(--muted);opacity:1}#workflow-root .report-page small{font-size:12px;line-height:1.5}#workflow-root .report-search{display:flex;gap:8px;align-items:stretch}#workflow-root .report-search input{flex:1}#workflow-root .report-search button{flex-shrink:0;margin:0;font-size:13px}#workflow-root .report-selected{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:42px;padding:4px 8px 4px 12px;border:1px solid var(--line);border-radius:10px;font-size:14px;background:white}#workflow-root .report-selected button{margin:0;padding:5px 8px;font-size:12px;flex-shrink:0}#workflow-root .report-student-options{list-style:none;padding:4px;margin:0;border:1px solid var(--line);border-radius:10px;max-height:210px;overflow:auto;box-shadow:0 3px 12px #281a3614}#workflow-root .report-student-options button{display:block;text-align:left;width:100%;margin:0;border:0;border-radius:6px;box-shadow:none;background:white;color:var(--ink);font-weight:400;font-size:14px}#workflow-root .report-student-options button:hover{background:var(--accent-soft)}#workflow-root .report-urgent{padding:14px;border:1px solid var(--line);border-radius:12px;margin-bottom:20px}#workflow-root .report-check{display:flex;align-items:center;gap:10px;cursor:pointer}#workflow-root .report-page input:is([type=checkbox],[type=radio]){width:17px;height:17px;min-height:0;padding:0;margin:0;accent-color:var(--blue);flex:0 0 17px;box-shadow:none}#workflow-root .report-urgent .report-field{margin:14px 0 0}#workflow-root .report-sources{padding:0;border:0;margin:0;min-width:0}#workflow-root .report-sources legend{margin-bottom:8px}#workflow-root .report-source-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}#workflow-root .report-choice{display:flex;align-items:center;gap:8px;border:1px solid var(--line);border-radius:10px;padding:10px 12px;font-weight:400;font-size:13px;cursor:pointer}#workflow-root .report-choice:has(input:checked){border-color:var(--accent-line);background:var(--accent-soft)}#workflow-root .report-actions{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin-top:22px}#workflow-root .report-actions button{margin:0}#workflow-root .report-later{border-color:transparent;background:transparent;box-shadow:none}#workflow-root .report-recovery,#workflow-root .report-drafts{padding:12px 0;border:0;font-size:13px}#workflow-root .report-recovery{margin-top:16px}#workflow-root .report-confirm{padding:26px;border:1px solid var(--line);border-radius:14px;width:min(520px,calc(100vw - 32px));color:var(--ink);box-shadow:0 16px 60px #281a3640}#workflow-root .report-confirm::backdrop{background:#21102f80}#workflow-root .report-confirm .report-actions{justify-content:flex-end}#workflow-root .report-confirm p{font-size:14px;line-height:1.6}
@media(max-width:600px){#workflow-root .report-form-card{padding:20px}#workflow-root .report-source-options{grid-template-columns:1fr}#workflow-root .report-save-bar{padding:10px 12px;gap:8px;font-size:12px}#workflow-root .report-actions{gap:10px}#workflow-root .report-actions>button{flex:1 1 auto}#workflow-root .report-confirm{padding:20px}#workflow-root .report-page>.back{margin-bottom:12px}}
#workflow-root .report-page input:is([type=checkbox],[type=radio]){appearance:none;border:1.5px solid var(--control-border);border-radius:50%;background:#fff;cursor:pointer}#workflow-root .report-page input:is([type=checkbox],[type=radio]):checked{background:var(--blue);border-color:var(--blue);box-shadow:inset 0 0 0 3px white}
#workflow-root .report-page label.report-choice{font-weight:400;font-size:14px}
/* Scoped to the restored rector/investigation workspace; report form unchanged. */
.rector-case .card,.investigation-page .card{margin-top:1rem}
.rector-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem;margin:1rem 0}
.rector-fields h3{margin-top:0}.rector-planning{margin:1rem 0}.rector-planning summary{font-weight:600;cursor:pointer}
.preserve-lines{white-space:pre-wrap;overflow-wrap:anywhere}
.rector-case textarea,.investigation-page textarea{min-height:5rem}
.investigation-page textarea{resize:vertical}
@media(max-width:700px){.rector-fields{grid-template-columns:1fr}.rector-case nav{display:flex;flex-wrap:wrap;gap:.75rem}.rector-case input,.rector-case select{max-width:100%}}
/* Keep local section navigation below the real application header. */
#workflow-root [id^=investigation-],.rector-case section[id]{scroll-margin-top:85px}
#workflow-root .card>header{position:static;display:block;background:transparent;border:0;padding:0;min-height:0;z-index:auto}
.investigation-page .process-nav{position:static}
.investigation-page .card>header p{margin-bottom:12px}
@media(max-width:767px){.topbar{position:static}.sidebar nav{flex-wrap:wrap;overflow:visible}.sidebar nav a{flex:0 1 auto}.rector-case nav{align-items:start}.topbar-actions{min-width:0}.context-link{overflow-wrap:anywhere}#workflow-root [id^=investigation-],.rector-case section[id]{scroll-margin-top:16px}}
.registration-details{font-size:13px;margin:12px 0;color:var(--muted)}
.registration-details>summary{cursor:pointer}
/* ProgramDraft / SectionA–D: compact ordinary program, original action editor. */
#workflow-root .program-form .form-fields{margin:12px 0;gap:6px}
#workflow-root .program-form label{margin:0 0 4px;font-size:14px}
#workflow-root .program-form textarea{min-height:76px;resize:vertical;font-size:14px;line-height:1.5}
#workflow-root .program-form input,#workflow-root .program-form select{font-size:14px;min-height:42px}
#workflow-root .program-form .grid{gap:16px}
#workflow-root .program-form .rounded-xl.border{margin:16px 0;padding:20px}
#workflow-root .program-form .text-amber-800{color:#80541d;font-size:12px}
.program-checks{list-style:none;padding:0}.program-checks li{padding:8px 0;border-bottom:1px solid var(--line);font-size:14px}.program-checks button{font-size:12px;padding:5px 8px}
.program-summary h3{margin-top:20px}.program-summary summary{white-space:normal;overflow-wrap:anywhere}
@media(min-width:768px){#workflow-root .program-form .md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}#workflow-root .program-form .md\:col-span-2{grid-column:1/-1}}
#workflow-root:has(.decision-steps)>.notice{padding:12px 16px}
#workflow-root:has(.decision-steps)>.notice p{margin:6px 0}
#workflow-root:has(.decision-steps)>.save-bar{padding:10px 16px;margin:16px 0}
#workflow-root:has(.decision-steps)>.save-bar button{padding:6px 10px}
#workflow-root:has(.decision-steps)>.process-nav{margin-top:16px}
/* Keep short controls at their natural height beside multiline fields. */
#workflow-root .program-form .grid .grid{align-content:start;gap:8px}
.topbar{background:#fff}

@media(max-width:767px){#workflow-root .decision-heading{display:flex;flex-direction:column;align-items:flex-start;gap:8px}#workflow-root .decision-heading>div{min-width:0;width:100%}#workflow-root .decision-heading h1{font-size:clamp(22px,6vw,26px);line-height:1.2;margin-bottom:10px}#workflow-root .decision-heading p{margin:0}#workflow-root .decision-heading>.badge{flex:none;white-space:nowrap;align-self:flex-start;font-size:11px;padding:3px 10px}}

/* Investigation completion errors stay next to the field and keyboard focus. */
.investigation-page [aria-invalid="true"]{border-color:#a12828}
.investigation-page p.error{color:#922f2f;font-size:.875rem;margin:4px 0 12px}
/* Keep the school/context legible even at 320px; actions never squeeze it to letters. */
@media(max-width:600px){.topbar{position:relative;display:grid;grid-template-columns:minmax(0,1fr);gap:8px;padding:12px 20px}.topbar-actions{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:10px;width:100%;align-items:center}.topbar-actions .context-link{min-width:0;max-width:none;overflow-wrap:break-word;font-size:11px}.topbar-actions .context-link strong{line-height:1.35}.topbar-actions form{margin:0}.topbar-actions button,.topbar-actions .button{white-space:nowrap;padding:7px 9px;font-size:11px}.today{font-size:11px}}

/* Isolated test identity picker: every anchor owns a grid cell. */
.test-person-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,230px),1fr));gap:16px;margin:24px 0}.test-person{position:relative;display:flex;flex-direction:column;justify-content:center;gap:6px;min-width:0;min-height:100px;padding:20px 42px 20px 20px;border:1px solid var(--line);border-radius:12px;background:white;box-shadow:0 1px 3px #281a3626;text-decoration:none;overflow-wrap:anywhere}.test-person strong{font-size:16px}.test-person>span:not(.test-person-arrow){font-size:14px;color:var(--muted)}.test-person-arrow{position:absolute;right:18px;top:calc(50% - 12px)}.test-person:hover{border-color:var(--blue)}

/* Organisation establishment shares the existing cards, fields and spacing. */
.platform-detail{max-width:760px}.platform-detail h3{margin-top:24px}.platform-detail .form{margin:16px 0}.platform-detail details{margin-top:24px}.invitation-code{display:block;overflow-wrap:anywhere;white-space:normal;padding:12px;background:#fff;border:1px solid var(--line);border-radius:8px}

.platform-page>section{margin-bottom:28px}@media(max-width:600px){.topbar-actions .platform-context{overflow-wrap:anywhere}.platform-context>*{min-width:0;white-space:normal;overflow-wrap:anywhere}}

.registry-page>section{margin:24px 0}.registry-actions{display:flex;flex-wrap:wrap;gap:10px;margin:18px 0}.registry-actions button,.registry-actions .button{margin:0}.registry-filters{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1.5fr) auto;gap:14px;align-items:end}.registry-filters label{margin:0}.registry-check{display:flex;gap:10px;align-items:start}.registry-check input{width:18px;flex:0 0 18px}.registry-page .error{color:#922f2f}.registry-page article,.registry-page small{overflow-wrap:anywhere}.registry-import-rows{max-height:550px;overflow:auto;margin:18px 0}.registry-page .record h3{font-size:15px}.registry-page section+section{margin-top:24px}@media(max-width:600px){.registry-filters{grid-template-columns:1fr}.registry-actions>*{flex:1 1 auto}.registry-page .card{padding:20px}.registry-import-rows{max-height:450px}}

.staff-invitation-card{margin-top:20px}.staff-invitation-card form{margin-bottom:16px}

/* Shared notification centre and accessible native popover. */
.notification-bell{position:relative;align-self:center}.notification-bell summary{display:flex;align-items:center;gap:.5rem;position:relative;cursor:pointer;padding:.65rem .8rem;border-radius:12px;border:1px solid var(--line);background:#fff;list-style:none;color:var(--primary);font-weight:650;min-height:44px}.notification-bell summary::-webkit-details-marker{display:none}.notification-bell summary:focus-visible{outline:3px solid var(--focus);outline-offset:3px}.notification-count{position:absolute;right:-6px;top:-8px;min-width:24px;height:24px;border-radius:20px;background:#b82d32;color:white;display:grid;place-items:center;font-size:.75rem;border:2px solid white;padding:0 4px}.notification-count[hidden]{display:none}.notification-popover{position:absolute;right:0;top:calc(100% + 12px);width:min(450px,calc(100vw - 32px));background:white;border:1px solid var(--line);box-shadow:0 12px 40px #281a3626;border-radius:16px;z-index:100;overflow:hidden}.notification-popover>header{display:flex;justify-content:space-between;align-items:center;padding:20px 22px;border-bottom:1px solid var(--line);gap:12px}.notification-popover h2{margin:0;font-size:1.3rem}.notification-popover>header a{font-size:.85rem}.notification-popover>footer{padding:16px 22px;border-top:1px solid var(--line);margin:0;font-size:.9rem}.notification-popover #notification-preview{max-height:min(62vh,520px);overflow:auto;overscroll-behavior:contain}.notification-centre{background:white;border:1px solid var(--line);border-radius:16px;overflow:hidden;margin:24px 0}.notice-item{display:flex;gap:12px;padding:22px;border-bottom:1px solid var(--line);overflow-wrap:anywhere}.notice-item:last-child{border-bottom:0}.notice-item.is-unread{background:var(--accent-soft)}.notice-dot{flex:0 0 8px;height:8px;border-radius:50%;margin-top:8px;background:transparent}.is-unread>.notice-dot{background:var(--primary)}.notice-content{min-width:0;flex:1}.notice-meta{margin:0 0 6px;font-size:.78rem;letter-spacing:.02em;font-weight:650;color:var(--accent-text)}.notice-content h2,.notice-content h3{font-size:1.05rem;line-height:1.45;margin:0 0 6px}.notice-content time{font-size:.8rem;color:var(--muted)}.notice-content>p:not(.notice-meta){font-size:.86rem}.notice-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-top:12px}.notice-actions button{font-size:.84rem;min-height:36px;padding:6px 10px}.notice-actions .notice-open{background:transparent;box-shadow:none;border:0;color:var(--primary);text-align:left;padding-left:0}.notice-actions .notice-open:hover{color:var(--primary-hover);text-decoration:underline;text-underline-offset:3px}.notice-actions .notice-read{background:var(--surface)}.notice-mail{color:var(--muted)}.is-historical{color:var(--muted)}.notice-empty{padding:24px;color:var(--muted)}.notice-empty p{font-size:.9rem}.notice-page-actions{display:flex;gap:20px;align-items:center;flex-wrap:wrap}.notification-choice{display:flex!important;gap:14px;align-items:flex-start;padding:18px 0;border-bottom:1px solid var(--line);font-weight:400!important}.notification-choice input{width:20px!important;height:20px;min-height:20px!important;flex:0 0 20px;margin-top:3px;accent-color:var(--primary)}.notification-choice span span{display:block;color:var(--muted);font-size:.9rem;margin-top:4px}
@media(max-width:600px){.notification-bell{position:static}.notification-bell .bell-label{display:none}.notification-popover{position:fixed;top:12px;left:16px;right:16px;width:auto;max-height:calc(100dvh - 24px)}.notification-popover #notification-preview{max-height:calc(100dvh - 170px)}.notice-item{padding:18px 14px;gap:8px}.notice-actions{gap:8px}.notification-popover>header{padding:16px}.notification-popover>footer{padding:16px}}

/* Compact notification control and a shared action area for Min dag. */
.notification-bell summary{width:44px;height:44px;min-height:44px;padding:9px;justify-content:center;border-color:transparent;background:transparent}
.notification-bell summary:hover,.notification-bell[open] summary{background:var(--accent-soft);border-color:var(--line)}
#workflow-root .day-actions{margin:0 0 32px}
#workflow-root .day-create{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:24px;background:var(--accent-soft);border:1px solid var(--line);border-radius:16px}
#workflow-root .day-create h2{font-size:1.1rem;margin:0 0 6px}
#workflow-root .day-create p{margin:0;color:var(--muted);font-size:.9rem;max-width:32ch}
#workflow-root .day-create-buttons{display:flex;gap:12px;flex-wrap:wrap;align-items:center}
#workflow-root .day-create-buttons button{margin:0}
#workflow-root .day-navigation{display:flex;gap:24px;flex-wrap:wrap;padding:16px 4px 0}
#workflow-root .day-navigation a{display:flex;align-items:center;gap:16px;font-size:.9rem;font-weight:600;text-decoration:none;min-height:44px}
#workflow-root .day-navigation a:hover{text-decoration:underline}
@media(max-width:1100px){#workflow-root .day-create{align-items:flex-start;flex-direction:column;gap:16px}}
@media(max-width:600px){#workflow-root .day-create{padding:18px}#workflow-root .day-create-buttons{width:100%;flex-direction:column;align-items:stretch}#workflow-root .day-create-buttons .button,#workflow-root .day-create-buttons button{width:100%;text-align:center;white-space:normal}#workflow-root .day-navigation{gap:0;flex-direction:column}#workflow-root .day-navigation a{justify-content:space-between}}

/* Submitted reports: keep the pupil context with the title, and documents secondary. */
#workflow-root .report-heading{display:flex;align-items:center;justify-content:space-between;gap:24px;margin:8px 0 24px}
#workflow-root .report-heading h1{margin:0 0 10px;line-height:1.15}
#workflow-root .report-identity{margin:0;color:var(--muted);font-size:.95rem}
#workflow-root .report-identity strong{color:var(--ink);font-weight:600}
#workflow-root .report-document-link{display:inline-flex;align-items:center;gap:10px;flex-shrink:0;min-height:44px;padding:8px 0;color:var(--blue);font-size:.9rem;font-weight:600;text-decoration:none}
#workflow-root .report-document-link:hover{text-decoration:underline}
#workflow-root .report-document-link svg{flex-shrink:0}
#workflow-root .report-reading-card{padding:28px 32px;margin:0}
#workflow-root .report-reading-summary h2{margin:0 0 12px;font-size:1.2rem}
#workflow-root .report-delivery-status{display:inline-flex;align-items:center;gap:8px;background:var(--accent-soft);color:var(--accent-text);padding:7px 12px;border-radius:8px;font-size:.85rem;margin:0;line-height:1.5}
#workflow-root .report-delivery-status>span{width:6px;height:6px;border-radius:50%;background:currentColor;flex-shrink:0}
#workflow-root .report-submitted-date{font-size:.8rem;color:var(--muted);margin:10px 0 0}
#workflow-root .report-reading-note{font-size:.85rem;line-height:1.6;color:var(--muted);padding:16px 0 22px;border-bottom:1px solid var(--line);margin:0}
#workflow-root .report-reading-fields{margin:0}
#workflow-root .report-reading-fields>div{padding:22px 0;border-bottom:1px solid var(--line)}
#workflow-root .report-reading-fields dt{font-weight:650;font-size:.95rem;margin:0 0 10px}
#workflow-root .report-reading-fields dd{margin:0;white-space:pre-wrap;line-height:1.7;overflow-wrap:anywhere;font-size:.95rem;color:var(--muted)}
#workflow-root .report-receipt{margin-top:12px;border-bottom:0;font-size:.8rem;overflow-wrap:anywhere}
@media(max-width:850px){#workflow-root .report-heading{align-items:flex-start;flex-direction:column;gap:10px}}
@media(max-width:600px){#workflow-root .report-reading-card{padding:20px}#workflow-root .report-heading h1{font-size:1.8rem}#workflow-root .report-reading-fields>div{padding:18px 0}}
#workflow-root .report-reading-fields{display:block}
/* Shared workflow heading, context and secondary document actions. */
#workflow-root .work-heading-title{min-width:0;flex:1}
#workflow-root .work-heading .report-identity{line-height:1.6;overflow-wrap:anywhere}
#workflow-root .work-heading-status{margin-top:10px}
#workflow-root .work-heading-actions{display:flex;align-items:flex-end;flex-direction:column;gap:6px;max-width:100%}
#workflow-root .work-heading-actions a{max-width:100%;white-space:normal}
#workflow-root .work-heading .report-document-link{flex-shrink:1}
#workflow-root .work-secondary-link{display:inline-flex;align-items:center;gap:10px;min-height:44px;font-size:.85rem;text-decoration:none;font-weight:500}
#workflow-root .work-secondary-link:hover{text-decoration:underline}
#workflow-root .report-heading{align-items:flex-start}
#workflow-root .work-heading h1{overflow-wrap:anywhere}
#workflow-root .report-page>.quiet:first-child{border:0;box-shadow:none;background:transparent;padding-left:0;color:var(--muted);margin-bottom:18px}
@media(max-width:850px){#workflow-root .work-heading-actions{align-items:flex-start;width:100%}}

/* Server-governed session warning; keep unconfirmed form state in memory when locked. */
.session-warning{position:fixed;z-index:60;bottom:1rem;left:50%;transform:translateX(-50%);width:min(44rem,calc(100% - 2rem));display:flex;gap:1rem;align-items:center;padding:1rem;border:1px solid #76579c;border-radius:12px;background:#faf7ff;box-shadow:0 8px 30px #24143433;color:#302040}
.session-warning[hidden],.session-lock[hidden],.shell[hidden]{display:none}
.session-lock{position:fixed;inset:0;z-index:100;background:#f6f4fa;overflow:auto;display:grid;place-items:center;padding:1.5rem}
.session-lock>div{max-width:42rem;background:white;border:1px solid #ddd3e8;border-radius:16px;padding:2rem}
.session-lock p{line-height:1.6}.session-warning button{flex-shrink:0}
@media(max-width:600px){.session-warning{flex-direction:column;align-items:stretch}.session-lock>div{padding:1.25rem}.session-lock .button,.session-lock button{display:flex;width:100%;margin:1rem 0}}
.school-form-guidance { margin: 1.25rem 0; padding: 1rem 1.25rem; border: 1px solid var(--border, #ded7e5); border-radius: .75rem; }
.school-form-guidance summary { cursor: pointer; font-weight: 600; }
.school-form-guidance ul { padding-left: 1.5rem; }
.school-form-guidance li + li { margin-top: .75rem; }
.school-followup-form textarea { width: 100%; }
.school-form-read p { white-space: pre-wrap; overflow-wrap: anywhere; }

.pdf-download{display:inline-flex;flex-direction:column;align-items:flex-start;gap:.5rem;max-width:100%}
.pdf-download-error{display:block;max-width:42rem;color:var(--error,#a02424);font-size:.9rem;line-height:1.5}

.followup-document-actions{display:flex;flex-wrap:wrap;align-items:center;gap:16px 24px;margin-top:20px}
.pdf-download>button.pdf-button,.followup-document-actions>a.pdf-button{background:#eeedf2;color:var(--ink);border-color:#d4d1db}
.pdf-download>button.pdf-button:hover,.followup-document-actions>a.pdf-button:hover{background:#e4e1ea}

/* Compact invitation help stays out of the document flow. */
.invitation-heading{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.help-tooltip{position:relative;display:inline-flex;vertical-align:middle;font-size:14px;font-weight:400}.help-tooltip>.help-trigger{display:inline-flex;justify-content:center;align-items:center;width:24px;height:24px;min-height:0;padding:0;margin:0;border:1px solid var(--line);border-radius:50%;background:#fff;color:var(--primary);font:700 14px/1 sans-serif;cursor:help}.help-trigger:focus-visible{outline:3px solid var(--focus);outline-offset:3px}.help-bubble{position:absolute;z-index:30;top:100%;right:-12px;width:min(330px,calc(100vw - 64px));padding:14px 16px;border:1px solid var(--line);border-radius:10px;background:#fff;color:var(--ink,#281a36);box-shadow:0 8px 28px #281a3626;font-size:14px;line-height:1.5;font-weight:400;visibility:hidden;opacity:0;pointer-events:none}.help-tooltip:hover>.help-bubble,.help-tooltip:focus-within>.help-bubble{visibility:visible;opacity:1;pointer-events:auto}.help-tooltip[data-dismissed]>.help-bubble{visibility:hidden;opacity:0;pointer-events:none}.platform-account{max-width:850px}.platform-account>section{margin:24px 0}.account-login-details{margin-top:24px}.account-actions{display:flex;gap:12px;flex-wrap:wrap}#recipient-invitation-link{width:100%;margin-bottom:12px}.account-login-details dd{overflow-wrap:anywhere}
