:root { color-scheme: dark; --background: #0a0a0a; --surface: #141414; --surface-soft: #202020; --line: #383838; --text: #ffffff; --muted: #b6c5d9; --accent: #93c5fd; --button: #1d4ed8; --button-hover: #2563eb; --gold: #d6b56e; --paper: #ffffff; --ink: #171717; --focus: #f6c760; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--background); color: var(--text); font: 16px/1.6 Arial, Helvetica, sans-serif; }
a { color: var(--accent); }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; border-radius: 6px; }
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 10; transform: translateY(-160%); padding: 10px 16px; background: var(--text); color: var(--background); }
.skip-link:focus { transform: none; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(2rem, 4vw, 2.65rem); line-height: 1.15; letter-spacing: -.035em; margin-bottom: 16px; }
h2 { font-size: 2rem; letter-spacing: -.025em; margin: 20px 0 8px; }
h3 { font-size: 1rem; }
.eyebrow { color: var(--accent); font-size: .78rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; margin-bottom: 12px; }
.lead { color: var(--muted); font-size: 1.08rem; }
.muted { color: var(--muted); }
.small { font-size: .84rem; }
.login-shell { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 28px 20px; }
.login-card { width: min(100%, 450px); padding: 38px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.lab-logo { display: block; width: 80px; height: 80px; object-fit: contain; border-radius: 10px; flex-shrink: 0; }
.login-logo { width: 160px; height: 160px; margin: 0 0 24px; }
.primary-button { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 48px; border: 1px solid #5d90f0; border-radius: 10px; padding: 10px 16px; background: var(--button); color: white; font-weight: 600; margin: 28px 0 16px; }
.primary-button:hover:not(:disabled) { background: var(--button-hover); }
.login-footer { font-size: .75rem; color: var(--muted); margin: 24px 0 0; }
.workspace { max-width: 1240px; margin: 0 auto; padding: 0 36px; }
.workspace-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; font-weight: 700; letter-spacing: .05em; }
.brand span { color: var(--text); letter-spacing: -.015em; }
.quiet-button { background: transparent; border: 1px solid var(--line); border-radius: 9px; color: var(--text); min-height: 44px; padding: 8px 16px; }
.quiet-button:hover { background: var(--surface-soft); }
.page-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding: 44px 0 16px; }
.version, .status { border: 1px solid var(--line); background: var(--surface-soft); padding: 4px 10px; border-radius: 20px; font-size: .75rem; color: var(--muted); white-space: nowrap; }
.notice { background: #162a43; color: #d6e8ff; border: 1px solid #3c5c83; border-radius: 10px; padding: 16px 20px; margin-bottom: 24px; font-size: .9rem; }
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-bottom: 30px; }
.project-card { min-width: 0; background: var(--surface); padding: 26px; border: 1px solid var(--line); border-radius: 16px; }
.card-heading { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.card-heading .eyebrow { margin-bottom: 0; }
.fact-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; color: var(--muted); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 15px 0; margin: 24px 0; font-size: .84rem; }
.fact-row strong { color: var(--text); }
summary { cursor: pointer; font-weight: 600; min-height: 44px; padding: 8px 0; }
.tree { padding-left: 18px; }
.tree ul { padding-left: 22px; border-left: 1px solid var(--line); }
.tree li span { display: block; }
.evidence-box { border: 1px solid var(--line); border-radius: 10px; padding: 18px; background: var(--surface-soft); margin-top: 24px; }
.evidence-box p { font-size: .87rem; margin-bottom: 0; }
@media (max-width: 760px) { .project-grid { grid-template-columns: 1fr; } .workspace { padding: 0 20px; } .project-card { padding: 20px; } .page-heading { padding-top: 32px; } }
@media (max-width: 400px) { .login-card { padding: 26px; } .brand { gap: 8px; font-size: .9rem; } .brand .lab-logo { width: 60px; height: 60px; } .quiet-button { padding: 8px 10px; } }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto; } }

.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; }
.project-breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 18px; margin-top: 24px; color: var(--muted); font-size: .9rem; }
.project-breadcrumb a, .project-back { display: inline-flex; align-items: center; min-height: 44px; }
.project-page-heading { padding-top: 20px; }
.project-back { margin-bottom: 12px; }
.programme-grid { margin-bottom: 24px; }
.audit-strip { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); padding: 22px; margin-bottom: 24px; }
.audit-strip div span, .audit-strip div strong { display: block; }
.audit-strip div span { color: var(--muted); font-size: .78rem; margin-bottom: 6px; }
.audit-strip div strong { font-size: .94rem; }
.audit-strip p { grid-column: 1 / -1; margin: 0; }
.objective-summary { display: grid; grid-template-columns: 1fr 1.3fr; gap: 30px; padding: 26px; border: 1px solid #3c5c83; border-radius: 16px; background: #12263e; margin-bottom: 24px; }
.objective-summary h2 { font-size: 1.45rem; margin: 0 0 14px; }
.coverage-value { font-size: clamp(2.2rem, 5vw, 3.5rem); line-height: 1.15; font-weight: 700; letter-spacing: -.04em; color: #bfdbfe; margin-bottom: 12px; }
.coverage-detail dl { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; margin: 0 0 16px; }
.coverage-detail dt { color: var(--muted); font-size: .83rem; }
.coverage-detail dd { margin: 0; font-size: 1.2rem; font-weight: 600; }
.objective-tree, .objective-tree ul { list-style: none; padding-left: 0; }
.tree-node > details > summary { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; padding: 14px 10px; border-top: 1px solid var(--line); }
.tree-node > details > summary::before { content: '+'; color: var(--accent); width: 14px; flex-shrink: 0; }
.tree-node > details[open] > summary::before { content: '−'; }
.tree-node .node-id { min-width: 70px; color: var(--text); font-weight: 700; }
.node-status { color: var(--muted); font-size: .83rem; flex: 1; min-width: 140px; }
.node-progress { color: var(--accent); font-size: .88rem; font-weight: 600; }
.node-body { padding: 0 10px 16px 38px; font-size: .9rem; }
.node-body ul { border-left: 1px solid var(--line); padding-left: 15px; margin: 16px 0 0; }
.node-body p { margin-bottom: 8px; }
.dependency-list { display: flex; gap: 8px; flex-wrap: wrap; font-size: .8rem; color: var(--muted); }
.dependency-list a { padding: 1px 6px; border: 1px solid var(--line); border-radius: 5px; text-decoration: none; }
.tree-gap > details > summary { border-top-style: dashed; }
.missing-records { border-top: 1px dashed #5f80a9; margin-top: 22px; padding-top: 14px; }
#objective-tree, .demonstration, .next-obligation { margin-bottom: 24px; scroll-margin-top: 20px; }
.demonstration h2 { max-width: 28ch; font-size: clamp(1.65rem, 3vw, 2.1rem); }
.demonstration figure { margin: 24px 0 16px; }
.proof-stage { border: 1px solid var(--line); border-radius: 12px; background: #0b1524; overflow: hidden; }
.proof-stage img { display: block; max-width: 860px; width: 100%; height: auto; margin: 0 auto; }
figcaption { margin-top: 14px; font-size: .9rem; color: #d6e8ff; }
figcaption span { display: block; color: var(--muted); font-size: .8rem; margin-top: 7px; }
.evidence-links { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 20px; border-top: 1px solid var(--line); margin-top: 18px; padding-top: 18px; }
.evidence-links a { font-size: .85rem; min-height: 44px; display: inline-flex; align-items: center; }
.footer-note { padding-bottom: 28px; }
@media (max-width: 760px) { .audit-strip { grid-template-columns: 1fr; } .objective-summary { grid-template-columns: 1fr; gap: 18px; padding: 20px; } .node-body { padding-left: 20px; } .tree-node > details > summary { gap: 8px; padding-inline: 0; } .node-status { min-width: 120px; } }
.freshness-notice { margin-bottom: 1.5rem; border-color: var(--accent); }
.freshness-notice strong { color: var(--accent); }
.freshness-notice p { margin-bottom: 0; }

/* Status colours always accompany text; source-qualified scientific labels are retained. */
.work-status { --state-colour: #c5cedb; --state-surface: #253142; display: inline-flex; align-items: center; gap: 8px; color: var(--state-colour); background: var(--state-surface); border: 1px solid currentColor; border-radius: 999px; padding: 4px 10px; font-size: .76rem; font-weight: 600; line-height: 1.45; max-width: 100%; }
.state-completed { --state-colour: #86efac; --state-surface: #0e3128; }
.state-in_progress { --state-colour: #fcd34d; --state-surface: #372b16; }
.state-planned { --state-colour: #93c5fd; --state-surface: #172f50; }
.state-blocked { --state-colour: #fca5a5; --state-surface: #3e1c25; }
.state-needs_verification { --state-colour: #c5cedb; --state-surface: #253142; }
.state-dot { display: inline-block; width: 9px; height: 9px; flex: 0 0 9px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 12%, transparent); }
.state-planned .state-dot { background: transparent; border: 2px solid currentColor; box-shadow: none; }
.state-needs_verification .state-dot { background: transparent; border: 1px dashed currentColor; box-shadow: none; }
.state-legend { display: flex; flex-wrap: wrap; gap: 9px; margin: 8px 0 26px; }
.state-legend .work-status { background: transparent; border-color: transparent; padding-inline: 0 12px; }
.project-selector { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.project-choice { display: flex; flex-direction: column; text-decoration: none; color: var(--text); padding: 24px; border-top: 3px solid var(--line); min-height: 300px; }
.project-choice:hover, .project-choice.is-selected { border-color: var(--accent); background: #16263b; }
.project-choice.is-selected { box-shadow: 0 0 0 1px var(--accent); }
.project-choice .card-heading { align-items: flex-start; gap: 12px; }
.project-choice .eyebrow { font-size: .68rem; }
.project-choice h2 { font-size: 1.65rem; margin-top: 22px; }
.project-choice > p { font-size: .88rem; color: var(--muted); margin-bottom: 22px; }
.card-metric { margin-top: auto; border-top: 1px solid var(--line); padding-top: 16px; }
.card-metric > strong, .card-metric > span { display: block; }
.card-metric > strong { font-size: 1.15rem; }
.card-metric strong span { font-size: .82rem; font-weight: 400; }
.card-metric > span { color: var(--muted); font-size: .74rem; line-height: 1.55; margin-top: 6px; }
.card-link { color: var(--accent); display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding-top: 14px; margin-top: 18px; font-size: .84rem; font-weight: 600; }
.progress-panel, .future-plan, #development-tree, .source-register { margin-bottom: 24px; }
.progress-panel h2, .future-plan h2, #development-tree h2 { font-size: 1.45rem; margin: 0 0 14px; }
.section-heading, .detail-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.section-heading .eyebrow { margin-bottom: 6px; }
.table-scroll { max-width: 100%; overflow-x: auto; border-radius: 8px; }
.table-scroll:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.progress-table { width: 100%; border-collapse: collapse; text-align: left; font-size: .84rem; }
.progress-table caption { text-align: left; color: var(--muted); font-size: .78rem; padding: 10px 0; }
.progress-table th, .progress-table td { border-bottom: 1px solid var(--line); padding: 14px 12px; vertical-align: top; }
.progress-table thead th { font-size: .72rem; text-transform: uppercase; letter-spacing: .065em; color: var(--muted); font-weight: 500; }
.progress-table tbody th { min-width: 90px; max-width: 430px; font-weight: 500; }
.progress-table th:first-child, .progress-table td:first-child { padding-left: 0; }
.progress-table th:last-child, .progress-table td:last-child { padding-right: 0; }
.progress-table td { color: var(--muted); }
.progress-table a { text-decoration-thickness: 1px; text-underline-offset: 4px; }
.overview-note { margin: 18px 0 0; }
.project-empty { padding: 36px 20px 42px; text-align: center; border: 1px dashed var(--line); border-radius: 16px; margin-bottom: 28px; }
.project-empty p { font-size: 1rem; margin: 12px 0 4px; }
.empty-symbol { color: var(--accent); font-size: 1.6rem; }
.selected-project { scroll-margin-top: 24px; border-top: 1px solid var(--line); padding-top: 30px; }
.detail-heading { margin-bottom: 24px; }
.detail-heading h2 { margin: 0; font-size: 2rem; }
.detail-heading .eyebrow { margin-bottom: 6px; }
.quiet-link { display: inline-flex; min-height: 44px; align-items: center; padding: 8px 14px; border: 1px solid var(--line); border-radius: 8px; font-size: .85rem; text-decoration: none; }
.quiet-link:hover { background: var(--surface-soft); }
.state-counts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin: 22px 0 18px; }
.state-counts > div { background: var(--surface-soft); border: 1px solid var(--line); border-radius: 10px; padding: 16px; }
.state-counts strong { display: block; font-size: 1.9rem; margin-bottom: 8px; line-height: 1.2; }
.state-counts .work-status { padding: 0; border: 0; background: transparent; font-size: .72rem; }
.roadmap-horizon { border-top: 1px solid var(--line); padding: 4px 0; }
.roadmap-horizon > summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-block: 14px; }
.roadmap-horizon > summary::before { content: '+'; color: var(--accent); }
.roadmap-horizon[open] > summary::before { content: '−'; }
.roadmap-horizon > summary > span:first-of-type { margin-right: auto; }
.horizon-count, .horizon-label { color: var(--muted); font-size: .75rem; font-weight: 400; }
.horizon-label { white-space: nowrap; }
.task-title { flex: 1; min-width: min(220px, 100%); }
.work-node > details > summary { align-items: center; }
.work-node .node-body { padding-top: 4px; }
.task-sources { margin-top: 12px; }
.task-sources summary { font-size: .8rem; color: var(--accent); }
.task-sources ul, .source-register ul { padding-left: 20px; overflow-wrap: anywhere; }
.state-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 22px; }
.state-filters > a { display: inline-flex; min-height: 44px; align-items: center; padding: 6px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: .78rem; text-decoration: none; }
.state-filters .work-status { padding: 0; border: 0; background: transparent; }
.state-filters > a:hover, .state-filters > a[aria-current] { background: var(--surface-soft); border-color: var(--accent); }
.roadmap-list { list-style: none; padding-left: 0; }
.roadmap-list > li { padding: 20px 0; border-top: 1px solid var(--line); }
.roadmap-list > li > div { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 12px; }
.roadmap-list h3 { margin: 0; font-size: 1rem; }
.roadmap-list p { font-size: .9rem; }
#development-tree, [id^="task-"], [id^="node-"] { scroll-margin-top: 20px; }
@media (max-width: 1000px) { .project-selector { grid-template-columns: 1fr; } .project-choice { min-height: auto; } .project-choice > p { max-width: 70ch; } .state-counts { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) { .state-counts { grid-template-columns: repeat(2, minmax(0, 1fr)); } .progress-table { min-width: 510px; } .node-body { padding-left: 12px; } .node-body ul { padding-left: 10px; } .work-node > details > summary { align-items: flex-start; } .task-title { flex-basis: 100%; } .detail-heading h2 { font-size: 1.65rem; } .state-legend { gap: 4px 9px; } }


/* Same four-colour brand as the public website and ProjectHub. */
.eyebrow { color: var(--gold); }
.workspace-header { margin-top: 20px; padding: 16px 20px; border: 1px solid var(--gold); border-bottom-width: 3px; border-radius: 14px; background: var(--paper); color: var(--ink); }
.workspace-header .brand span { color: var(--ink); }
.workspace-header .lab-logo { background: #0a0a0a; padding: 6px; }
.workspace-header .quiet-button { color: var(--ink); border-color: #a6abb4; }
.workspace-header .quiet-button:hover { background: #eaf1fc; }
/* These rules outrank either CSS import order in the client and server builds. */
header.workspace-header { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 14px; background: var(--paper); color: var(--ink); }
header.workspace-header nav { display: flex; flex-wrap: wrap; grid-column: 1 / -1; grid-row: 2; gap: 8px 12px; margin: 0; }
header.workspace-header form { grid-column: 2; grid-row: 1; }
header.workspace-header nav a { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 12px; color: var(--ink); background: transparent; border: 1px solid #a6abb4; border-radius: 9px; text-decoration: none; white-space: nowrap; }
header.workspace-header nav a:hover { color: var(--ink); background: #eaf1fc; }
header.workspace-header nav a[aria-current="page"] { color: #ffffff; background: #193f64; border-color: #193f64; }
header.workspace-header .brand span, header.workspace-header .quiet-button { color: var(--ink); }
.login-card { background: var(--paper); --text: #171717; --muted: #4b5563; color: var(--text); border-color: var(--gold); border-top-width: 4px; }
.login-card .eyebrow { color: #78581d; }
.login-logo { background: #0a0a0a; padding: 12px; }
.login-card a:not(.primary-button) { color: #1d4ed8; }
.project-card { border-top: 3px solid var(--gold); }
.project-choice:hover { border-color: var(--gold); }
.project-choice.is-selected { border-color: var(--accent); }
.coverage-value { color: var(--gold); }
@media (max-width: 400px) { .workspace-header { padding: 12px; } }

.consulting-logo { display: block; width: min(360px, 100%); height: auto; aspect-ratio: 3 / 2; object-fit: contain; border-radius: 10px; margin-bottom: 20px; }
.consulting-card-logo { width: 100%; max-width: 360px; align-self: center; margin-top: 18px; margin-bottom: 0; }
.consulting-source p { margin: 14px 0 0; }
.consulting-board { display: grid; grid-template-columns: repeat(5, minmax(260px, 1fr)); gap: 16px; overflow-x: auto; align-items: start; padding: 8px 0 18px; margin-bottom: 14px; }
.consulting-board:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.consulting-column { min-width: 0; padding: 16px; border: 1px solid var(--line); border-top: 3px solid var(--state-colour); border-radius: 12px; background: var(--surface); }
.consulting-column > h3 { margin-bottom: 14px; }
.consulting-card { padding: 18px; margin-top: 18px; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 10px; overflow-wrap: anywhere; }
.consulting-card h4 { font-size: 1.15rem; line-height: 1.4; margin: 0 0 12px; }
.consulting-card .eyebrow { font-size: .65rem; margin-bottom: 8px; }
.consulting-scope { font-size: .87rem; margin: 16px 0; }
.consulting-card dl { font-size: .8rem; margin: 0; }
.consulting-card dt { color: var(--muted); margin-top: 10px; }
.consulting-card dd { margin: 2px 0 0; }
.consulting-issue { border-left: 3px solid #fcd34d; padding-left: 10px; margin: 18px 0; font-size: .78rem; }
.consulting-provenance { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 16px; font-size: .7rem; color: var(--muted); }
.consulting-provenance ul { padding-left: 16px; margin-bottom: 0; }
.consulting-provenance li { margin-top: 10px; }
.consulting-provenance span { display: block; }
.consulting-empty { padding: 18px 0; border-top: 1px dashed var(--line); }
.consulting-limits { margin: 20px 0 28px; }
@media (max-width: 700px) { .consulting-board { grid-template-columns: 1fr; overflow-x: visible; } .consulting-logo { max-width: 300px; } }

/* Historical programme directory; preserve current shared palette. */
.programme-directory { margin-bottom: 32px; }
.programme-directory > .project-card { margin-top: 24px; scroll-margin-top: 20px; }
.programme-directory .section-heading h2 { margin-top: 0; }
.programme-directory > nav { margin-bottom: 20px; }
.programme-node { border-top: 1px solid var(--line); scroll-margin-top: 20px; }
.programme-node > summary { display: flex; flex-direction: column; gap: 4px; padding: 14px 0; }
.programme-node > .node-body { padding: 6px 0 20px; }
.programme-node:target, .mapping-table tr:target { outline: 2px solid var(--accent); outline-offset: 4px; }
.scope-visual { margin: 20px 0; overflow-x: auto; }
.scope-visual:focus-visible { outline: 3px solid var(--focus); }
.scope-visual svg { display: block; width: 100%; min-width: 580px; max-width: 760px; height: auto; }
.programme-directory .evidence-box p { margin-bottom: 12px; }
.mapping-table { overflow-x: auto; }
.mapping-table table { border-collapse: collapse; width: 100%; min-width: 540px; font-size: .88rem; }
.mapping-table caption { text-align: left; margin-bottom: 16px; color: var(--muted); }
.mapping-table th, .mapping-table td { padding: 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.mapping-table td span { display: block; margin-top: 6px; }
.mapping-table td a { display: inline-block; padding: 4px 6px; }

.independent-card-actions{display:flex;flex-wrap:wrap;gap:.75rem;margin-top:1.25rem}.independent-card-actions a{padding:.65rem .9rem;border:1px solid var(--border,#64748b);border-radius:.5rem}.research-tracker{display:grid;gap:1rem}.research-tracker article{margin:1.25rem 0}.research-tracker h3{font-size:1rem}

.page-meta{display:flex;flex-direction:column;align-items:flex-end;gap:.6rem}.update-age{display:block;font-size:.875rem;line-height:1.5;overflow-wrap:anywhere}.project-choice>.update-age{margin-top:1rem}.page-meta .update-age{max-width:24ch;text-align:right}@media(max-width:600px){.page-heading{flex-wrap:wrap}.page-meta{align-items:flex-start}.page-meta .update-age{text-align:left;max-width:none}}

.task-search { margin-top: 16px; }
.task-search label { display: block; font-weight: 600; margin-bottom: 8px; }
.task-search-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.task-search input[type="search"] { flex: 1 1 240px; width: 100%; min-width: 0; min-height: 44px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; background: var(--surface-soft); color: var(--text); }
.task-search input:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

/* Document Studio: private authoring and provenance workspace. */
.studio-home-card,.studio-banner{background:#10243b;border:1px solid #294963;border-radius:18px;padding:28px;display:flex;justify-content:space-between;align-items:center;gap:24px;margin:24px 0;color:#fff}.studio-home-card p{max-width:680px;color:#d5e2ed}.studio-home-card h2{margin:8px 0}.studio-home-tags{display:flex;gap:8px;flex-wrap:wrap}.studio-home-tags span{font-size:12px;padding:5px 9px;border:1px solid #365571;border-radius:20px;color:#bfd5ed}.document-studio{max-width:1320px;margin:0 auto}.studio-banner h1{margin:8px 0;font-size:clamp(30px,4vw,48px)}.studio-banner p{color:#c3d3e3;margin-bottom:0}.studio-connection{border:1px solid #d6b56e;color:#ead199;border-radius:20px;padding:9px 13px;font-size:13px;white-space:nowrap}.studio-connection.is-ready{color:#a4dfbf;border-color:#396e54}.studio-metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin:20px 0}.studio-metrics>div{background:#101419;border:1px solid #27323f;border-radius:12px;padding:18px}.studio-metrics strong{font-size:27px;display:block;color:#fff}.studio-metrics span{font-size:12px;color:#aabbcd}.studio-panel{border:1px solid #2a3746;border-radius:16px;background:#11171f;padding:25px;margin:20px 0;color:#eef4fb}.studio-panel h2{font-size:23px;margin:8px 0 18px}.studio-panel p{line-height:1.6}.studio-editor-grid{display:grid;grid-template-columns:1.1fr 1fr;gap:22px}.studio-editor-grid .studio-panel{margin:0}.document-studio label{display:flex;flex-direction:column;gap:8px;font-size:13px;margin:16px 0;color:#cad8e6}.document-studio input:not([type=radio]),.document-studio textarea,.document-studio select{width:100%;padding:12px;border:1px solid #35495d;border-radius:8px;background:#0b1119;color:#f0f5fa;font:inherit;box-sizing:border-box}.document-studio textarea{resize:vertical;line-height:1.6}.document-studio :focus-visible{outline:2px solid #78b7ff;outline-offset:3px}.studio-upload{border:1px dashed #526c85;padding:20px;border-radius:10px;background:#101f2d}.studio-upload span{font-size:12px;color:#aebfd0}.document-studio fieldset{border:0;margin:0;padding:0}.document-studio .studio-mode{display:flex;flex-direction:row;align-items:flex-start;border:1px solid #364452;padding:17px;border-radius:10px;cursor:pointer;gap:13px}.studio-mode.selected{border-color:#78b7ff;background:#152a3e}.studio-mode input{margin:4px 0}.studio-mode strong{display:block;color:#fff;font-size:16px}.studio-mode small{display:block;line-height:1.5;margin-top:7px}.studio-policy{border-left:2px solid #d6b56e;margin:22px 0;padding:0 16px;color:#cad8e6;font-size:13px}.document-studio button,.studio-download{border:1px solid #467aad;background:#22598e;color:white;border-radius:8px;padding:11px 16px;font-size:13px;font-weight:600;cursor:pointer;text-decoration:none;display:inline-block}.document-studio button:disabled{opacity:.45;cursor:not-allowed}.document-studio .quiet-button{background:transparent;border-color:#344b60}.studio-primary{width:100%}.studio-connect{display:flex;gap:18px;align-items:flex-end}.studio-connect label{flex:1}.studio-connect button{margin-bottom:16px}.studio-filters{display:flex;gap:16px;align-items:flex-end}.studio-filters label:first-child{flex:1}.studio-filters button{margin-bottom:16px}.studio-section-heading,.studio-job-heading{display:flex;justify-content:space-between;gap:20px;align-items:center}.studio-job{padding:22px 0;border-top:1px solid #2b3a49}.studio-job h3{font-size:18px;margin:7px 0}.studio-job-actions{display:flex;flex-wrap:wrap;gap:12px;align-items:center;margin:18px 0}.studio-state{font-size:12px;padding:7px 10px;border-radius:16px;background:#253648;color:#d5e3ef}.state-completed{background:#163b2b;color:#b1e4c2}.state-failed,.state-validation_failed{background:#482820;color:#f2bcb1}.state-awaiting_approval{background:#423721;color:#efdcaa}.studio-job progress{width:100%;height:5px;accent-color:#78b7ff}.studio-identifiers{display:grid;grid-template-columns:170px 1fr;gap:10px;font-size:12px;margin-top:18px}.studio-identifiers dt{color:#aebfd0}.studio-identifiers dd{margin:0;font-family:monospace;overflow-wrap:anywhere;line-height:1.5}.studio-job summary{cursor:pointer;color:#9dc9f7;font-size:13px}.studio-alert,.studio-notice{padding:15px 18px;border-radius:9px;line-height:1.5;margin:18px 0;background:#3b211e;border:1px solid #75483e;color:#f7d1c7}.studio-notice{background:#142d24;border-color:#345d4b;color:#c3e8d5}.studio-error-text{color:#f4b7a8}.studio-empty{padding:30px 0;color:#aebfd0;text-align:center}@media(max-width:850px){.studio-editor-grid{grid-template-columns:1fr}.studio-banner,.studio-home-card,.studio-section-heading,.studio-job-heading{align-items:flex-start;flex-direction:column}.studio-metrics{grid-template-columns:repeat(2,1fr)}.studio-connect,.studio-filters{align-items:stretch;flex-direction:column;gap:0}.studio-identifiers{grid-template-columns:1fr;gap:5px}.studio-identifiers dd{margin-bottom:12px}.studio-panel{padding:18px}}

.studio-document-list{margin-top:28px;scroll-margin-top:24px}.studio-document-list>h3{display:flex;gap:12px;align-items:center;font-size:21px}.studio-job h4{font-size:18px;margin:7px 0}.document-studio .studio-panel,.studio-job-heading>div{min-width:0}.document-studio p,.studio-job h4,.studio-download{overflow-wrap:anywhere}.studio-document-list .studio-empty{padding:16px 0;text-align:left}

.agent-map-entry,.agent-owner-summary{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:22px 26px;border:1px solid #36506d;border-radius:14px;background:#10243b;color:#edf4fc;margin:20px 0}.agent-map-entry p{margin:7px 0 0;color:#c4d4e6}.agent-map-entry>a{white-space:nowrap}.agent-owner-summary{display:block}.agent-owner-summary>strong{font-size:20px;color:#e1c58d}.agent-period-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:14px;margin:24px 0 16px}.agent-period-grid>div{display:grid;gap:8px;background:#101a29;border:1px solid #314661;border-radius:12px;padding:18px;color:#c6d5e7}.agent-period-grid strong{font-size:27px;color:#8bc0ff}.agent-period-grid span{font-size:21px;color:#fff}.agent-period-grid small{font-size:13px}.agent-capacity{font-size:16px;line-height:1.8}.agent-flow{background:#0e1622;border:1px solid #30425a;border-radius:14px;padding:20px 24px;margin:18px 0;min-width:0;color:#dde8f6}.agent-flow>summary{cursor:pointer;font-size:20px;font-weight:600;color:#f4f8fd;padding:5px 0}.agent-flow>p{font-size:15px;line-height:1.6}.agent-flow>p.small{font-size:13px}.agent-diagram-scroll{overflow-x:auto;max-width:100%;border-radius:10px;background:#0b111b}.agent-diagram-scroll svg{display:block;width:100%;min-width:900px;height:auto}.agent-diagram-scroll a:focus-visible rect{stroke:#ffe2a2;stroke-width:3}.agent-table{min-width:930px}.agent-table th:first-child{width:35%;font-weight:400}.agent-table th strong{font-weight:650;font-size:16px}.agent-table th p,.agent-table td p{font-size:14px;line-height:1.5;margin:9px 0}.agent-table td{min-width:135px;vertical-align:top}.agent-table td:nth-child(2){width:26%;font-size:14px;line-height:1.6}.agent-table td>span.small{display:block;margin-top:8px}.agent-table details{font-size:13px;font-weight:400;color:#b8cce4}.agent-table pre{white-space:pre-wrap;font-size:12px;overflow-wrap:anywhere}.agent-period{display:inline-block;color:#a4ccff;background:#1c3655;border:1px solid #406289;padding:4px 9px;border-radius:6px;font-weight:700}.agent-enabled{font-size:12px;color:#b6dcc6}.agent-enabled.is-paused{color:#d4c19f}.agent-table tr:target{background:#1c314a}.agent-table tr{scroll-margin-top:20px}@media(max-width:700px){.agent-map-entry{align-items:flex-start;flex-direction:column;gap:14px;padding:20px}.agent-flow{padding:16px}.agent-owner-summary{padding:20px}.agent-table-scroll{max-width:100%}}

/* Named agent portraits are presentation only; schedule state remains textual. */
.agent-identities { margin: 26px 0 32px; }
.agent-identities h2 { font-size: 1.45rem; margin: 0 0 8px; }
.agent-identity-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.agent-identity-card { display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 0; padding: 16px 12px; background: #101e2e; border: 1px solid #33465e; border-radius: 13px; color: #dce7f4; text-align: center; text-decoration: none; }
.agent-identity-card:hover { border-color: #d6b56e; background: #16293e; }
.agent-identity-card strong { font-size: 15px; letter-spacing: .025em; }
.agent-identity-card>span { font-size: 12px; line-height: 1.45; }
.agent-identity-card small { margin-top: auto; padding-top: 6px; }
.agent-mascot { display: block; width: 84px; height: 84px; flex-shrink: 0; overflow: hidden; }
.agent-identity-heading { display: flex; gap: 13px; align-items: center; }
.agent-identity-heading .agent-mascot { width: 54px; height: 54px; }
.agent-identity-heading>div { min-width: 0; }
.agent-identity-heading span { display: block; font-size: 12px; color: #b5c6dd; margin-top: 3px; }
.agent-diagram-scroll svg svg { min-width: 0; width: 48px; height: 48px; }
#paused-agent-schedules { scroll-margin-top: 20px; }
@media (max-width: 1000px) { .agent-identity-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) { .agent-identity-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .agent-identity-card { padding: 14px 8px; } }

/* Private editorial desk */
.editorial-desk{max-width:1440px;margin:auto}.editorial-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1rem;margin:1.6rem 0}.editorial-metrics>div{background:#112034;border:1px solid #29415e;border-radius:14px;padding:1.2rem}.editorial-metrics strong{display:block;font-size:1.6rem;color:#ddc087}.editorial-metrics span{display:block;font-size:.8rem;margin-top:.3rem;color:#bacadd}.editorial-flow{display:flex;gap:.65rem;flex-wrap:wrap;margin:1.4rem 0}.editorial-flow span{border:1px solid #344c67;padding:.55rem .8rem;border-radius:7px;font-size:.85rem}.editorial-tabs{display:flex;gap:.5rem;flex-wrap:wrap;margin:1.6rem 0}.editorial-tabs button,.editorial-button{border:1px solid #425b77;background:#18283c;color:#edf4ff;border-radius:8px;padding:.7rem 1rem;font:inherit;cursor:pointer}.editorial-tabs button[aria-pressed=true],.editorial-button.primary{background:#294a71;border-color:#9fc7f5}.editorial-button:disabled{opacity:.5;cursor:wait}.editorial-layout{display:grid;grid-template-columns:280px minmax(0,1fr);gap:1.25rem;align-items:start}.editorial-queue{display:grid;gap:.75rem}.editorial-queue button{display:grid;text-align:left;gap:.65rem;background:#101d2c;border:1px solid #29405c;color:#e3edf9;padding:1rem;border-radius:12px;cursor:pointer;min-width:0;font:inherit}.editorial-queue button.selected{border-color:#d5b879;background:#162a41}.editorial-queue small,.editorial-queue button>span:not(.editorial-state){color:#a9bcd2;font-size:.75rem}.editorial-state{font-size:.72rem;text-transform:uppercase;letter-spacing:.06em;color:#9fc7f5}.editorial-state.state-human_review{color:#e7c681}.editorial-state.state-ready{color:#a3ddbf}.editorial-item{min-width:0;overflow-wrap:anywhere;padding:1.5rem}.editorial-item h2{margin:.7rem 0}.editorial-item section{margin:1.5rem 0}.editorial-item details{border-top:1px solid #283f59;padding:1rem 0}.editorial-item summary{cursor:pointer;font-weight:600}.editorial-ticket{display:grid;gap:.5rem;background:#0c1725;padding:.8rem;border-radius:8px}.editorial-ticket code,.editorial-hash{overflow-wrap:anywhere;font-size:.75rem}.editorial-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem}.editorial-facts dt{font-size:.75rem;color:#aebed0}.editorial-facts dd{margin:.35rem 0;font-size:.88rem}.editorial-downloads{display:flex;gap:.8rem;flex-wrap:wrap}.editorial-downloads a{padding:.65rem .8rem;border:1px solid #426285;border-radius:8px}.editorial-review-forms{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1.25rem;border-top:1px solid #314862;padding:1rem 0}.editorial-review-forms form{display:flex;flex-direction:column;gap:.6rem;min-width:0}.editorial-review-forms label{font-size:.85rem}.editorial-review-forms select,.editorial-review-forms textarea{box-sizing:border-box;width:100%;min-width:0;background:#0d1928;color:#e8f0fb;border:1px solid #405772;border-radius:7px;padding:.7rem;font:inherit}.editorial-review-forms textarea{resize:vertical}.editorial-prose{white-space:pre-wrap}.editorial-rewrites{list-style:none;padding:0}.editorial-rewrites li{display:grid;gap:.5rem;border:1px solid #324c69;padding:1rem;border-radius:8px;margin:.8rem 0}.editorial-rewrites code{font-size:.73rem;overflow-wrap:anywhere}.editorial-ready,.editorial-success{padding:1rem;background:#112e2a;border:1px solid #406957;border-radius:10px}.editorial-ready p{color:#b9d3c8}.editorial-item article{padding:.6rem 0}.editorial-tabs button:focus-visible,.editorial-button:focus-visible,.editorial-queue button:focus-visible{outline:2px solid #e0c383;outline-offset:3px}@media(max-width:1000px){.editorial-review-forms{grid-template-columns:1fr}.editorial-layout{grid-template-columns:230px minmax(0,1fr)}}@media(max-width:700px){.editorial-layout{grid-template-columns:1fr}.editorial-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.editorial-item{padding:1rem}.editorial-facts{grid-template-columns:1fr}.editorial-desk .page-heading{align-items:flex-start;gap:1rem}.editorial-queue{max-height:350px;overflow:auto}}

/* Compact project entry and progressive detail disclosure. */
.project-selector { grid-template-columns: repeat(2,minmax(0,1fr)); }
.project-choice { min-height: 220px; }
.workspace-tools { display: flex; flex-wrap: wrap; gap: 12px 24px; margin: 0 0 28px; font-size: .87rem; }
.workspace-tools a { color: var(--muted); }
.compact-record { border-top: 1px solid var(--line); padding: 16px 0; margin: 18px 0; }
.compact-record>summary { color: var(--muted); cursor: pointer; font-size: .85rem; }
.compact-record[open]>summary { margin-bottom: 20px; }
@media(max-width:700px) { .project-selector { grid-template-columns: 1fr; } }

.editorial-review-forms>div{display:grid;gap:.8rem;min-width:0}.editorial-review-forms label{display:grid;gap:.4rem}.editorial-review-forms input:not([type=checkbox]){box-sizing:border-box;width:100%;background:#0d1928;color:#e8f0fb;border:1px solid #405772;border-radius:7px;padding:.7rem;font:inherit}.editorial-review-forms fieldset{border:1px solid #405772;border-radius:7px;display:grid;gap:.5rem;padding:.8rem}.editorial-review-forms fieldset label{display:flex;align-items:center;gap:.6rem}.editorial-review-forms input:focus-visible{outline:2px solid #e0c383;outline-offset:3px}

.state-paused { color: #626d7c; background: #edf0f4; border-color: #c9d1db; }
.state-paused .state-dot { background: #8390a1; }
.mechanical-programme { display: grid; gap: 20px; }
.mechanical-programme li { margin: 12px 0; }

.math-block { display:block; max-width:100%; overflow-x:auto; padding:.5rem 0; }
.math-inline .katex { font-size:1.05em; }
.math-error { color:#ffb3b3; }

