/* UK GOVERNMENT AI UNIVERSE — department page overrides on top of the universities' universe page CSS (copied).
   Teal palette = the top site's hub-base tokens (doc 1.4); department colour is a thin accent only. */
:root{--header-bg:#1F2F4F;--page-bg:#eef1f2;--text:#14222a;--muted:#4c5a62;--border:#c9d3d6;--head-col:#1F2F4F;--link:#0b5c66;--hover:#e3eaec;--chip:#dde6e8;--chip-text:#14222a;--soft:#f2f5f6}
html.dark{--dk-deep:#0E1729;--dk-page:#0E1729;--dk-panel:#14203A;--dk-soft:#08333a;--dk-hover:#0c3d44;--dk-border:#24474d;--dk-chip:#0f4049;--dk-bar:#14203A;--dk-pill:#1F2F4F;
  --header-bg:#1F2F4F;--page-bg:#0E1729;--text:#e4eef0;--muted:#a6b8bd;--panel:#14203A;--stage-bg:#0E1729;--link:#7fd6e0;--glass:rgba(4,20,23,.86)}
html.dark .lab.div,html.dark .row.active,html.dark .filter-chip{background:#e4eef0;color:#0E1729}
.site-header{background-color:#1F2F4F}
/* black title lozenges */
.lozenge{background:#1F2F4F}
.gov-unit .box-head h2,.gov-unit .full-list h2{letter-spacing:.01em}
.gov-unit .box{border-top:4px solid var(--dept)}
html.dark .gov-unit .box{border-top-color:var(--dept-dk)}
/* sticky government top bar (doc 1.5): 26 pills, under the header lines */
.gov-bar{position:relative;z-index:2;display:flex;flex-wrap:wrap;gap:3px;padding:4px 1.5rem 8px;justify-content:flex-start}
.gov-bar .gb-opt{font-size:.64rem;font-weight:700;line-height:1;color:#fff;text-decoration:none;padding:.36em .7em;border-radius:999px;background:rgba(0,0,0,.72);border:1px solid rgba(255,255,255,.55);white-space:nowrap}
.gov-bar .gb-opt::before{content:"";display:inline-block;width:.6em;height:.6em;border-radius:50%;background:var(--c);margin-right:.35em;vertical-align:-.05em;box-shadow:0 0 0 1px rgba(255,255,255,.7)}
.gov-bar .gb-opt.gb-all::before{display:none}
.gov-bar .gb-opt:hover,.gov-bar .gb-opt:focus-visible{background:#fff;color:#1F2F4F}
.gov-bar .gb-opt.on{background:#fff;color:#1F2F4F;outline:2px solid var(--co,var(--c));outline-offset:1px}
/* right column: tabbed info box */
.gov-info{flex:1 1 auto;display:flex;flex-direction:column;min-height:180px}
.gi-tabs{display:flex;gap:4px;flex-wrap:wrap}
.gi-tab{font:inherit;font-size:.74rem;font-weight:700;border:1px solid var(--border);background:var(--panel);color:var(--text);border-radius:999px;padding:3px 9px;cursor:pointer}
.gi-tab.on{background:#1F2F4F;color:#fff;border-color:#1F2F4F}
html.dark .gi-tab.on{background:#e4eef0;color:#0E1729}
.gi-tab .n{opacity:.7;font-weight:600}
.gi-body{overflow:auto;flex:1 1 0;min-height:0}
.gi-pane{list-style:none;padding:6px 10px;display:flex;flex-direction:column;gap:7px}
.gi-pane li{display:flex;flex-direction:column;gap:1px;font-size:.78rem;border-bottom:1px solid var(--border);padding-bottom:6px}
.gi-pane li .d{font-weight:700;color:var(--muted);font-size:.72rem}
.gi-pane li .meta{color:var(--muted);font-size:.7rem}
.gi-pane li.past{opacity:.72}
.gi-pane li.tot{background:var(--chip);border-radius:8px;padding:6px 8px;border:0}
.gi-pane li.gap,.gap-msg{color:var(--muted);font-style:italic}
/* popup additions */
.conf{display:inline-block;font-size:.66rem;font-weight:700;border-radius:999px;padding:1px 7px;margin-left:4px;vertical-align:middle;background:#dfe9e3;color:#0d4a2a}
.conf.conf-single_source{background:#fff1cc;color:#5c4300}
html.dark .conf{background:#0f4a33;color:#d7f5e4}html.dark .conf.conf-single_source{background:#5c4300;color:#fff1cc}
.srcs q{display:block;font-style:italic;color:var(--muted);margin:2px 0 4px 8px;font-size:.92em}
.srcs q::before{content:"\201C"}.srcs q::after{content:"\201D"}
.pop-asof{color:var(--muted);font-size:.72rem;margin-top:6px}
.pop-corr{display:inline-block;margin-top:6px;font-weight:700}
.ext-links li{margin:2px 0}
/* lower sections */
.gov-extra{margin-top:10px}
.gx-pad{padding:8px 14px}
.gx-list{padding:6px 14px 10px 30px;font-size:.84rem;display:flex;flex-direction:column;gap:4px}
.gx-dl{display:flex;flex-wrap:wrap;gap:6px}
.kv{display:grid;grid-template-columns:200px 1fr;gap:10px;font-size:.84rem;padding:4px 0;border-bottom:1px solid var(--border)}
.kv b{text-transform:capitalize}
.idtag{font-family:ui-monospace,Menlo,monospace;font-size:.74rem;color:var(--muted)}
@media (max-width:860px){.kv{grid-template-columns:1fr;gap:2px}.gov-bar{padding:4px .6rem 6px}.gov-bar .gb-opt{font-size:.6rem}}

/* Gov pages: departments have many single-team directorates (up to ~20). The Oxford grid puts every unit in one row,
   which squeezes them to slivers; wrap them into readable columns instead. */
#c-canvas #c-divs{grid-template-columns:repeat(var(--gcols,5),240px)!important;justify-content:center!important;grid-template-rows:auto!important;row-gap:22px;column-gap:22px}
#c-canvas #c-divs>.unit{grid-row:auto!important;grid-column:auto!important;width:240px!important;min-width:240px!important;max-width:240px!important}
#c-canvas #c-divs>.unit .card,#c-canvas #c-divs>.unit>.hd{width:auto!important;max-width:100%!important}
#c-canvas #c-divs{width:max-content!important}
#c-canvas{width:max-content!important;min-width:0!important}
#c-canvas #c-root{white-space:normal!important;max-width:1250px!important;line-height:1.1}
/* pop-up and tooltip: label above value (the panel is narrow) */
#node-pop .kv,#tooltip .kv,.tooltip .kv{grid-template-columns:1fr;gap:1px}
#node-pop .kv b,#tooltip .kv b,.tooltip .kv b{text-transform:none;font-size:.72rem;color:var(--muted);letter-spacing:.02em}
/* edition 2.1: a record's own table from the research, shown in its panel */
.rec-tbl{overflow-x:auto;max-height:260px;margin:4px 0 6px}
.rec-tbl table{border-collapse:collapse;font-size:.7rem;min-width:100%}
.rec-tbl th,.rec-tbl td{border:1px solid rgba(127,127,127,.35);padding:2px 5px;text-align:left;vertical-align:top}
.gx-closed-h{font-size:.85rem;margin:10px 0 4px}
.gx-closed li{opacity:.85}

/* 28 Oct 2026 (Alex): kicker above every section switch. Absolutely placed so the header grid keeps its shape. */
#uni-switch.sec-switch{position:relative;overflow:visible}
#uni-switch.sec-switch::before{content:"THE UK AI UNIVERSE";position:absolute;left:50%;right:auto;transform:translateX(-50%);text-align:center;padding-left:.14em;margin:0;bottom:calc(100% + 3px);font-size:max(8px,.8em);font-weight:700;letter-spacing:.14em;line-height:1;color:#fff;white-space:nowrap;text-shadow:0 1px 2px rgba(0,0,0,.9),0 0 1px #1F2F4F;pointer-events:none}
@media (max-width:860px){#uni-switch.sec-switch{margin-top:15px}}

/* Alex 29 Oct 13:36: strand switch (ALL / UNIVERSITIES / BUSINESS / GOVERNMENT) bar and inactive buttons pure black, not dark grey, on every page; active pill and text colours unchanged; hover still visible */
#uni-switch.sec-switch,html.dark #uni-switch.sec-switch{background:rgb(0,0,0)!important}
#uni-switch.sec-switch .us-opt.us-all:not(.on),html.dark #uni-switch.sec-switch .us-opt.us-all:not(.on){background:rgb(0,0,0)!important}
#uni-switch.sec-switch .us-opt:not(.on):hover,#uni-switch.sec-switch .us-opt.us-all:not(.on):hover{background:#333!important}

/* Alex 29 Oct 13:47: department chips in two explicit rows (14 / 12); on phones the rows dissolve and the chips wrap freely */
.gov-bar{flex-direction:column;align-items:flex-start}
.gov-bar .gb-row{display:flex;flex-wrap:wrap;gap:3px}
@media (max-width:700px){.gov-bar{flex-direction:row}.gov-bar .gb-row{display:contents}}

/* Alex 29 Oct 14:34: on every page that keeps the department chips, the header photo ends just above them and the chips sit on a
   plain band (white in light mode, the page background in dark mode), restyled to read on white. The navy news ticker directly
   below (the "frieze") is unchanged. */
.site-header .gov-bar{background:#FFFFFF;padding-top:7px;padding-bottom:7px;box-shadow:none}
.site-header .gov-bar .gb-opt{background:#FFFFFF;color:#1F2F4F;border:1px solid #1F2F4F}
.site-header .gov-bar .gb-opt::before{box-shadow:0 0 0 1px rgba(31,47,79,.55)}
.site-header .gov-bar .gb-opt:hover,.site-header .gov-bar .gb-opt:focus-visible{background:#E8ECF4;color:#1F2F4F}
.site-header .gov-bar .gb-opt.on{background:#1F2F4F;color:#FFFFFF;border-color:#1F2F4F;outline:2px solid var(--co,var(--c));outline-offset:1px}
.site-header .gov-bar .gb-opt.on::before{box-shadow:0 0 0 1px rgba(255,255,255,.7)}
html.dark .site-header .gov-bar{background:#0E1729}
html.dark .site-header .gov-bar .gb-opt{background:rgba(255,255,255,.06);color:#FFFFFF;border-color:rgba(255,255,255,.55)}
html.dark .site-header .gov-bar .gb-opt::before{box-shadow:0 0 0 1px rgba(255,255,255,.7)}
html.dark .site-header .gov-bar .gb-opt:hover,html.dark .site-header .gov-bar .gb-opt:focus-visible{background:#FFFFFF;color:#1F2F4F}
html.dark .site-header .gov-bar .gb-opt.on{background:#FFFFFF;color:#1F2F4F;border-color:#FFFFFF}
html.dark .site-header .gov-bar .gb-opt.on::before{box-shadow:0 0 0 1px rgba(31,47,79,.55)}
.site-header>.theme-switch,.site-header #theme-toggle{z-index:6!important}

/* 29 Oct 2026 (Alex): the tab icon (Union Jack favicon, full colour) inline before THE in the kicker, cap height; decorative (CSS background, not announced). */
#uni-switch.sec-switch::before{padding-left:1.32em;background:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMiAzMiIgcm9sZT0iaW1nIiBhcmlhLWxhYmVsPSJVSyBBSSI+CiAgPHRpdGxlPlVLIEFJPC90aXRsZT4KICA8ZGVmcz48Y2xpcFBhdGggaWQ9ImMiPjxjaXJjbGUgY3g9IjE2IiBjeT0iMTYiIHI9IjE1Ii8+PC9jbGlwUGF0aD48L2RlZnM+CiAgPGcgY2xpcC1wYXRoPSJ1cmwoI2MpIj4KICAgIDxyZWN0IHdpZHRoPSIzMiIgaGVpZ2h0PSIzMiIgZmlsbD0iIzAxMjE2OSIvPgogICAgPHBhdGggZD0iTTAgMCBMMzIgMzIgTTMyIDAgTDAgMzIiIHN0cm9rZT0iI2ZmZiIgc3Ryb2tlLXdpZHRoPSI1LjUiLz4KICAgIDxwYXRoIGQ9Ik0wIDAgTDMyIDMyIE0zMiAwIEwwIDMyIiBzdHJva2U9IiNDODEwMkUiIHN0cm9rZS13aWR0aD0iMi4yIi8+CiAgICA8cGF0aCBkPSJNMTYgMCBWMzIgTTAgMTYgSDMyIiBzdHJva2U9IiNmZmYiIHN0cm9rZS13aWR0aD0iNyIvPgogICAgPHBhdGggZD0iTTE2IDAgVjMyIE0wIDE2IEgzMiIgc3Ryb2tlPSIjQzgxMDJFIiBzdHJva2Utd2lkdGg9IjQiLz4KICAgIDxyZWN0IHg9IjE1IiB5PSIwIiB3aWR0aD0iMTciIGhlaWdodD0iMzIiIGZpbGw9IiMwMTIxNjkiIG9wYWNpdHk9Ii41Ii8+CiAgICA8ZyBmb250LWZhbWlseT0idWktbW9ub3NwYWNlLE1lbmxvLG1vbm9zcGFjZSIgZm9udC1zaXplPSI1LjUiIGZvbnQtd2VpZ2h0PSI3MDAiIGZpbGw9IiNGNEY3RkIiPgogICAgICA8dGV4dCB4PSIxNi41IiB5PSI4Ij4xIDAgMTwvdGV4dD4KICAgICAgPHRleHQgeD0iMTYuNSIgeT0iMTUiPjAgMSAwPC90ZXh0PgogICAgICA8dGV4dCB4PSIxNi41IiB5PSIyMiI+MSAxIDA8L3RleHQ+CiAgICAgIDx0ZXh0IHg9IjE2LjUiIHk9IjI5Ij4wIDEgMTwvdGV4dD4KICAgIDwvZz4KICA8L2c+Cjwvc3ZnPgo=") no-repeat 0 50%/1em 1em}

/* 29 Oct 2026 (Alex): Union Jack tab icon inside the title lozenge at its left end, cap height, plus about one letter of extra right padding. Decorative (CSS background). */
.site-header .header-titles h1 .lozenge{padding-right:1.15em}
.site-header .header-titles h1 .lozenge::before{content:"";display:inline-block;width:.8em;height:.8em;margin-right:.34em;vertical-align:-.04em;background:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMiAzMiIgcm9sZT0iaW1nIiBhcmlhLWxhYmVsPSJVSyBBSSI+CiAgPHRpdGxlPlVLIEFJPC90aXRsZT4KICA8ZGVmcz48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ZnPgo=") no-repeat 50% 50%/contain}

/* header unify (Alex 29 Oct 17:33): not-ready pillars in the switch look disabled: 50% opacity, no link (same rule as build/pillar_assets/pillar-header.css) */
#uni-switch .us-opt.us-off,#uni-switch .us-opt.us-off:hover,#uni-switch .us-opt.us-off:focus{opacity:.5!important;cursor:default!important;pointer-events:none;text-decoration:none}

/* Alex 30 Oct 2026: on every department and member page the frozen header stops at the bottom of the white department strip.
   No photo or navy band shows below the strip (the template's 56px bottom padding is removed), the light/dark switch sits at the
   right-hand end of the strip, and the page body starts straight after it: a small white gap that scrolls, then the news ticker
   (also scrolling, not frozen). The home page header is unchanged. */
body.gov-unit .site-header{padding-bottom:0!important;background-origin:padding-box!important;box-shadow:0 1px 0 rgba(31,47,79,.18),0 4px 10px -6px rgba(0,0,0,.25)}
body.gov-unit .site-header::after{bottom:0;height:auto;top:0}
body.gov-unit .site-header>.gov-bar{position:relative;margin:0;padding-right:96px}
body.gov-unit .site-header>.theme-switch{position:absolute!important;right:24px!important;left:auto!important;top:auto!important;bottom:19px!important;margin:0!important}
html.dark body.gov-unit .site-header{box-shadow:0 1px 0 rgba(255,255,255,.12),0 4px 10px -6px rgba(0,0,0,.6)}
body.gov-unit>.news-bar#news-bar{margin-top:10px}
@media (max-width:700px){body.gov-unit .site-header>.gov-bar{padding-right:84px}body.gov-unit .site-header>.theme-switch{right:10px!important;bottom:8px!important}}
