/* ─────────────────────────────────────────────
   Programme Explorer — page styles
   Fonts, colour tokens, header, footer and contact dialog come from
   /assets/css/main.css. Everything here is scoped to the explorer and
   built on the same tokens, so light and dark mode follow the site.
   Focus: readability of large tables on wide screens. Below 900px the
   interactive tables are replaced by a simplified mobile overview of the
   twelve capabilities and the SE contribution to each (see .pe-small-view),
   with an opt-in to the full explorer.
   ───────────────────────────────────────────── */

/* Wider page frame for this tool only: header, tables and footer stay aligned */
body.pe-page { --max: 1600px; }
/* Across disciplines uses the full screen width on very wide monitors */
body.pe-page.pe-wide { --max: 2400px; }

.pe {
  /* Information roles, derived from site tokens so dark mode works automatically */
  --pe-head:      color-mix(in oklab, var(--ink) 4%, var(--bg));
  --pe-cap:       color-mix(in oklab, var(--accent) 7%, var(--paper));
  --pe-contrib:   var(--paper);
  --pe-products:  color-mix(in oklab, var(--warm) 9%, var(--paper));
  --pe-people:    color-mix(in oklab, oklch(0.55 0.07 240) 10%, var(--paper));
  --pe-people-ln: color-mix(in oklab, oklch(0.55 0.07 240) 55%, var(--paper));
  --pe-ai:        color-mix(in oklab, var(--accent) 9%, var(--paper));
  --pe-ai-ln:     color-mix(in oklab, var(--accent) 55%, var(--paper));
  --pe-row-line:  var(--line);
  --pe-group-line: var(--line-strong);
  --pe-sticky-top: 72px;          /* height of the sticky .site-header */
  --pe-table-font: 15.5px;
  padding-bottom: clamp(56px, 7vw, 96px);
}
@media (min-width: 1500px) { .pe { --pe-table-font: 16px; } }

.pe a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.pe button { background: none; border: 0; padding: 0; margin: 0; color: inherit; font: inherit; cursor: pointer; }
.pe input[type="checkbox"], .pe input[type="radio"] { accent-color: var(--accent); width: 16px; height: 16px; margin: 0; }
.pe fieldset { min-width: 0; border: 0; padding: 0; margin: 0; }
.pe h1, .pe h2, .pe h3, .pe p { margin-top: 0; }
.pe :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.pe [hidden] { display: none !important; }
.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; }
.pe-noscript { padding: 48px 0; color: var(--ink-soft); }

/* ── Intro ── */
.simple-explorer { padding: clamp(24px, 3vw, 44px) 0 0; }
/* The page names itself (the header breadcrumb stops at Beyond the Obvious) */
#simple-title {
  margin: 0 0 10px;
  font-family: var(--display); font-weight: 500; font-size: clamp(34px, 2.8vw, 44px); line-height: 1.08;
  letter-spacing: -0.012em; color: var(--ink);
}
.simple-lead {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(21px, 1.7vw, 26px); line-height: 1.3; letter-spacing: -0.006em;
  color: var(--ink); max-width: 62ch; margin: 0 0 clamp(18px, 2vw, 26px); text-wrap: balance;
}

/* ── View navigation: tabs + AI view link ── */
.view-navigation {
  display: flex; align-items: flex-end; gap: 8px 36px; flex-wrap: wrap;
  border-bottom: 1px solid var(--line); margin: 0 0 4px;
}
.primary-tabs { display: flex; gap: 32px; flex-wrap: wrap; }
.primary-tabs button {
  padding: 12px 0 13px; font-size: 16px; font-weight: 500; color: var(--ink-soft);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color .2s ease, border-color .2s ease;
}
.primary-tabs button:hover { color: var(--ink); }
.primary-tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); font-weight: 600; }
.pe .ai-view-link {
  padding: 12px 0 13px; font-size: 16px; font-weight: 500; color: var(--ink-soft);
  border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color .2s ease, border-color .2s ease;
}
.pe .ai-view-link:hover { color: var(--ink); }
.pe .ai-view-link[aria-pressed="true"] { color: var(--ink); font-weight: 600; border-bottom-color: var(--accent); }

/* ── Discipline selection (shown below the navigation when a view uses it) ── */
.discipline-picker-row { display: flex; align-items: center; gap: 4px 10px; flex-wrap: wrap; font-size: 15px; margin: 0; }
.picker-label { font-size: 14px; color: var(--ink-soft); }
.picker-current { font-weight: 600; color: var(--ink); }
.discipline-picker { position: relative; }
.discipline-picker > summary {
  cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 12px 6px 14px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--paper);
  font-size: 14.5px; transition: border-color .15s ease;
}
.discipline-picker > summary:hover { border-color: var(--ink-soft); }
.discipline-picker > summary::after {
  content: ""; width: 7px; height: 7px; margin-top: -4px;
  border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg); transition: transform .2s ease;
}
.discipline-picker[open] > summary::after { transform: rotate(-135deg); margin-top: 3px; }
.discipline-picker > summary::-webkit-details-marker { display: none; }
.discipline-picker[open] > summary { border-color: var(--ink-soft); }
.discipline-picker-panel {
  position: absolute; z-index: 30; top: calc(100% + 8px); left: 0; width: max-content; min-width: 300px; max-width: min(440px, 86vw);
  padding: 12px; background: var(--paper); border: 1px solid var(--line-strong); border-radius: 8px;
  box-shadow: 0 16px 40px -18px color-mix(in oklab, var(--ink) 40%, transparent);
}
.picker-presets { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 0 10px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.pe .picker-preset { font-size: 13px; padding: 4px 11px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--ink); transition: background .15s ease, color .15s ease; }
.pe .picker-preset:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.discipline-picker-list { max-height: min(580px, 70vh); overflow-y: auto; }
.picker-group + .picker-group { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); }
.pe .picker-group-title { margin: 4px 8px 2px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.pe .picker-preset-clear { margin-left: 10px; }
.discipline-picker-list legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.discipline-picker-list label { display: flex; align-items: center; gap: 10px; padding: 7px 8px; font-size: 14.5px; border-radius: 4px; cursor: pointer; color: var(--ink); }
.discipline-picker-list label:hover { background: var(--bg-elev); }

/* ── AI view: "How could AI shift the work?" ──
   Category colours derive from site tokens; every category is also named in text, never colour alone. */
.pe {
  --shift-assist:    var(--accent);
  --shift-automate:  oklch(0.50 0.09 245);
  --shift-transform: oklch(0.56 0.11 62);
  --shift-human:     var(--ink-soft);
}
@media (prefers-color-scheme: dark) {
  .pe { --shift-automate: oklch(0.74 0.08 240); --shift-transform: oklch(0.78 0.10 75); }
}
.shift-chip {
  display: inline-block; font-family: var(--mono); font-size: 10.5px; font-weight: 400; letter-spacing: .08em; text-transform: uppercase;
  line-height: 1.3; padding: 2px 8px; border-radius: 999px; border: 1px solid; white-space: nowrap; text-decoration: none;
}
.shift-chip.shift-assist    { color: var(--shift-assist);    border-color: color-mix(in oklab, var(--shift-assist) 45%, transparent); }
.shift-chip.shift-automate  { color: var(--shift-automate);  border-color: color-mix(in oklab, var(--shift-automate) 45%, transparent); }
.shift-chip.shift-transform { color: var(--shift-transform); border-color: color-mix(in oklab, var(--shift-transform) 45%, transparent); }
.shift-chip.shift-human     { color: var(--shift-human);     border-color: color-mix(in oklab, var(--shift-human) 45%, transparent); }
.shift-chip.shift-open      { color: var(--muted); border-style: dashed; border-color: var(--line-strong); }

.shift-legend { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px 28px; }
.shift-legend li { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; font-size: 14.5px; line-height: 1.5; color: var(--ink-soft); }
.shift-legend-tagline { font-weight: 600; color: var(--ink); margin-top: 2px; }
.shift-legend-text { margin-top: -4px; }
.ai-legend { margin: 0; }
.shift-legend-compact { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pe .shift-about-link { margin-left: auto; font-size: 14px; color: var(--ink-soft); text-decoration: underline; text-underline-offset: 3px; }
.pe .shift-about-link:hover { color: var(--ink); }
.pe .shift-note { margin: 10px 0 0; font-size: 14px; color: var(--muted); max-width: 90ch; }
.view-intro { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 18px; margin: 12px 0 0; }
.pe .view-caption { margin: 0; font-size: 15px; line-height: 1.55; color: var(--ink-soft); max-width: 92ch; }
.pe .howto-toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--accent); white-space: nowrap; }
.pe .howto-toggle::before { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); transition: transform .2s ease; }
.pe .howto-toggle[aria-expanded="true"]::before { transform: rotate(45deg); }
.pe .howto-toggle:hover { text-decoration: underline; text-underline-offset: 3px; }
.view-intro:not(.is-ai) .howto-toggle { display: none; }
.shift-howto { background: var(--bg-elev); border-radius: 8px; padding: 14px 20px 18px; margin-top: 12px; }
.pe .shift-invite { margin: 18px 0 0; font-size: 14.5px; color: var(--ink-soft); }
.shift-also .shift-field-name { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.shift-summary { margin: 18px 0 0 !important; font-size: 14.5px !important; color: var(--ink-soft); }
.shift-summary-name { font-weight: 600; color: var(--ink); }
.pe .shift-share {
  display: inline-flex; margin-top: 14px; padding: 8px 16px; border: 1px solid var(--line-strong); border-radius: 999px;
  font-size: 14px; color: var(--ink); transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.pe .shift-share:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* grid cells */
.pe .shift-table .shift-toggle { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.shift-table thead tr.shift-band > * { position: static; background: transparent; border-bottom: 0; padding-top: 0; padding-bottom: 8px; }
.shift-table thead th.shift-band-open { color: var(--muted); border-top: 1px dashed var(--line-strong); padding-top: 8px; text-align: left; }
.shift-table td.shift-cell.shift-assist    { background: color-mix(in oklab, var(--shift-assist) 7%, var(--paper)); }
.shift-table td.shift-cell.shift-automate  { background: color-mix(in oklab, var(--shift-automate) 8%, var(--paper)); }
.shift-table td.shift-cell.shift-transform { background: color-mix(in oklab, var(--shift-transform) 9%, var(--paper)); }
.shift-table td.shift-cell.shift-human     { background: color-mix(in oklab, var(--shift-human) 6%, var(--paper)); }
.pe .shift-table td.shift-cell-open .cell-toggle { color: var(--muted) !important; font-weight: 500; }
.shift-table thead th.shift-col-open { color: var(--muted); }
.shift-table td.is-open { box-shadow: inset 0 0 0 2px color-mix(in oklab, var(--ink) 35%, transparent); }
.shift-table tr.pe-detail-row > td { background: color-mix(in oklab, var(--muted) 10%, var(--bg)); }
.shift-table .pe-detail-label { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.pe .shift-field { margin: 18px 0 0; line-height: 1.6; color: var(--ink-soft); max-width: 72ch; }
.shift-field-name { display: block; font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.shift-need .shift-field-name { color: var(--shift-transform); }
.shift-help-label { margin-top: 16px !important; }
.pe .pe-detail-products .shift-field { font-size: .94em; margin-top: 10px; }
.shift-question { margin: 12px 0 0; font-family: var(--display); font-style: italic; font-size: 1.25em; line-height: 1.4; color: var(--ink); max-width: 60ch; }

/* Detail panel: Today -> With AI comparison */
.shift-body { display: flex; flex-direction: column; gap: 14px; }
.pe .shift-statement { margin: 0; max-width: 80ch; }
.shift-compare { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 14px; max-width: 1240px; }
.pe .shift-compare > * { margin: 0; padding: 6px 22px; }
.shift-compare > .shift-today { background: var(--paper); }
.shift-compare.shift-assist    > .shift-ai { background: color-mix(in oklab, var(--shift-assist) 13%, var(--paper)); }
.shift-compare.shift-automate  > .shift-ai { background: color-mix(in oklab, var(--shift-automate) 10%, var(--paper)); }
.shift-compare.shift-transform > .shift-ai { background: color-mix(in oklab, var(--shift-transform) 11%, var(--paper)); }
.shift-compare.shift-human     > .shift-ai { background: color-mix(in oklab, var(--shift-human) 7%, var(--paper)); }
.shift-compare.shift-open      > .shift-ai { background: transparent; border-left: 1px dashed var(--line-strong); }
/* a coloured rule on top of each column: neutral for Today, category colour for With AI */
.shift-compare > .shift-col-head.shift-today { box-shadow: inset 0 3px 0 var(--line-strong); }
.shift-compare.shift-assist    > .shift-col-head.shift-ai { box-shadow: inset 0 3px 0 var(--shift-assist); }
.shift-compare.shift-automate  > .shift-col-head.shift-ai { box-shadow: inset 0 3px 0 var(--shift-automate); }
.shift-compare.shift-transform > .shift-col-head.shift-ai { box-shadow: inset 0 3px 0 var(--shift-transform); }
.shift-compare.shift-human     > .shift-col-head.shift-ai { box-shadow: inset 0 3px 0 var(--shift-human); }
.pe .shift-compare > .shift-col-head { padding-top: 14px; padding-bottom: 2px; border-radius: 6px 6px 0 0; }
.pe .shift-compare > .shift-block { padding-top: 8px; padding-bottom: 14px; border-radius: 0 0 6px 6px; }
.pe .shift-col-label { margin: 0; font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.shift-compare.shift-assist    .shift-ai .shift-col-label { color: var(--shift-assist); }
.shift-compare.shift-automate  .shift-ai .shift-col-label { color: var(--shift-automate); }
.shift-compare.shift-transform .shift-ai .shift-col-label { color: var(--shift-transform); }
.pe .shift-col-title { margin: 6px 0 0; font-weight: 600; font-size: 1.04em; line-height: 1.4; color: var(--ink); }
.pe .shift-point { line-height: 1.6; color: var(--ink-soft); padding-top: 4px; padding-bottom: 4px; }
.pe .shift-mini-label { margin: 0 0 4px; display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.pe .shift-stack p { margin: 0; }
.pe .shift-stack p + p { margin-top: 8px; }
.pe .shift-artefacts { margin: 0; color: var(--ink-soft); font-size: .94em; line-height: 1.6; }
.pe .shift-changes { margin: 0; font-weight: 600; font-size: 1.14em; color: var(--ink); line-height: 1.4; letter-spacing: -0.005em; }
/* "What changes?" is the takeaway: label in the category colour, separated from the description above */
.pe .shift-compare > .shift-block.shift-ai { border-top: 1px solid color-mix(in oklab, var(--ink) 12%, transparent); padding-top: 12px; }
.pe .shift-compare > .shift-block.shift-today { padding-top: 12px; }
.shift-compare.shift-assist    .shift-changes-label { color: var(--shift-assist); }
.shift-compare.shift-automate  .shift-changes-label { color: var(--shift-automate); }
.shift-compare.shift-transform .shift-changes-label { color: var(--shift-transform); }
.pe .shift-also { margin-top: 14px; padding-top: 12px; border-top: 1px dashed color-mix(in oklab, var(--ink) 18%, transparent); }
.pe .shift-also-text { margin: 0; color: var(--ink-soft); font-size: .94em; line-height: 1.6; }
.shift-foot { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 14px; max-width: 1240px; }
.pe .shift-foot > div { padding: 0 22px; }
.pe .shift-foot-text { margin: 6px 0 0; color: var(--ink-soft); line-height: 1.6; }
.pe .shift-question { margin: 0; }

/* ── AI view intro ── */
.ai-view-intro { max-width: 110ch; margin: 24px 0 0; }
.ai-view-intro > p { max-width: 72ch; }
.ai-view-intro h2 { font-family: var(--display); font-weight: 500; font-size: clamp(24px, 2vw, 28px); line-height: 1.15; color: var(--ink); margin: 0 0 6px; }
.ai-view-intro p { font-size: 15.5px; line-height: 1.65; color: var(--ink-soft); margin: 0 0 8px; }

/* ── Table toolbar: explanation toggle + focus ── */
.table-tools {
  display: flex; align-items: center; gap: 10px 28px; flex-wrap: wrap;
  margin: 14px 0 26px; font-size: 14px; color: var(--ink-soft);
}
.explanation-control label { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.table-focus { margin-left: auto !important; font-size: 14px; color: var(--ink-soft) !important; }
.table-focus:hover { color: var(--ink) !important; text-decoration: underline; text-underline-offset: 3px; }

/* ── Tables: shared ── */
.aligned-overview { overflow-x: auto; }
/* One continuous green rule: it runs along all capabilities and carries on into
   the closing message below, which links the contributions back to the programme. */
.stack-rows.aligned-overview { border-left: 2px solid var(--accent-soft); padding-left: clamp(14px, 1.4vw, 22px); }
@media (min-width: 900px) {
  /* No scroll container on wide screens, so the table header can stick below the site header.
     Only a very wide multi-column compact table keeps horizontal scrolling. */
  .aligned-overview:not(:has(.multiple-columns)) { overflow: visible; }
}
/* Inside a horizontal scroll container a sticky header would be offset, so keep it static there */
.aligned-overview:has(.multiple-columns) thead th { position: static; }
.pe table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  font-size: var(--pe-table-font); line-height: 1.55; color: var(--ink);
}
.pe th, .pe td { text-align: left; vertical-align: top; padding: 14px 18px; border-bottom: 1px solid var(--pe-row-line); overflow-wrap: break-word; }
.pe thead th {
  position: sticky; top: var(--pe-sticky-top); z-index: 4;
  background: var(--pe-head); color: var(--muted);
  font-family: var(--mono); font-size: 11px; font-weight: 400; letter-spacing: .1em; text-transform: uppercase; line-height: 1.4;
  padding-top: 13px; padding-bottom: 13px; border-bottom: 1px solid var(--line-strong);
}
.pe tbody tr { transition: background-color .15s ease; }

.capability-label { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 6px; align-items: baseline; margin: 0; }
.capability-index { font-family: var(--mono); font-size: 12px; font-weight: 400; color: var(--muted); font-variant-numeric: tabular-nums; }
.capability-title { font-size: 1.04em; font-weight: 600; line-height: 1.4; color: var(--ink); }
.pe tbody th { font-weight: 400; }

/* descriptions that sit under a capability title */
.capability-cell > p, .compact-overview tbody th > .compact-description, .ai-se-table .ai-capability-description {
  margin: 8px 0 0 36px; font-size: .94em; line-height: 1.6; color: var(--ink-soft); font-weight: 400; max-width: 52ch;
}

/* ── Programme overview ── */
.programme-overview { min-width: 720px; }
.programme-overview tbody th { width: 38%; padding-right: 32px; }
.programme-overview td { color: var(--ink-soft); max-width: 70ch; }

/* ── Compact overview ── */
.compact-overview { line-height: 1.4 !important; min-width: 720px; }
.compact-overview tbody th { width: 40%; min-width: 300px; }
.compact-overview.multiple-columns tbody th { width: auto; min-width: 230px; }
/* Up to four disciplines: capability column ~1/3, discipline columns share the rest evenly */
.compact-overview.few-columns { table-layout: fixed; }
.compact-overview.few-columns thead th:first-child { width: 34%; }
.compact-overview th, .compact-overview td { min-width: 150px; }
/* Across disciplines with many columns: tighter cells so up to 12 disciplines fit on a wide screen */
.compact-overview.multiple-columns td, .compact-overview.multiple-columns thead th:not(:first-child) { min-width: 0; padding-left: 12px; padding-right: 12px; }
.compact-overview.multiple-columns .contribution-keyword { font-size: .95em; }

/* ── Across disciplines: clickable keyword cells + detail panel below the row ── */
.pe .cell-toggle {
  display: inline; text-align: left; font-weight: 600; color: var(--accent) !important; line-height: 1.4;
  text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 4px; text-decoration-thickness: 1px;
  transition: text-decoration-color .15s ease;
}
.cell-toggle-text::after { content: " ›"; opacity: 0; transition: opacity .15s ease; }
.cell-toggle:hover, .cell-toggle:focus-visible { text-decoration-color: currentColor; }
.cell-toggle:hover .cell-toggle-text::after, .cell-toggle:focus-visible .cell-toggle-text::after { opacity: 1; }
.compact-overview td.is-open { background: color-mix(in oklab, var(--accent) 9%, var(--paper)); }
.compact-overview td.is-open .cell-toggle { text-decoration-color: currentColor; }
.compact-overview tr.pe-detail-row > td { padding: 0 !important; border-left: 0 !important; background: color-mix(in oklab, var(--accent) 9%, var(--paper)); }
.pe-detail { padding: 18px 24px 22px; outline: none; }
.pe-detail-top { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.pe-detail-label { margin: 0; font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.pe-detail-close { font-size: 13.5px !important; color: var(--ink-soft) !important; white-space: nowrap; }
.pe-detail-close:hover { color: var(--ink) !important; text-decoration: underline; text-underline-offset: 3px; }
.pe-detail-grid { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr); gap: 12px 48px; }
.pe-detail .contribution-statement { margin: 0; font-size: 1.06em; }
.pe-detail-desc { margin: 6px 0 0; color: var(--ink-soft); line-height: 1.6; max-width: 72ch; }
.pe-detail-products-label { margin: 2px 0 6px; font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.pe-detail-products ul { list-style: none; margin: 0; padding: 0; color: var(--ink-soft); font-size: .94em; line-height: 1.6; }
.pe-detail-products li { position: relative; padding-left: 16px; }
.pe-detail-products li::before { content: ""; position: absolute; left: 0; top: .8em; width: 8px; height: 1px; background: var(--accent-soft); }
@media (max-width: 1100px) { .pe-detail-grid { grid-template-columns: 1fr; } }
.compact-overview.multiple-columns thead th { font-size: 10.5px; letter-spacing: .08em; }
.compact-overview thead th:not(:first-child) { color: var(--ink); }
.compact-overview.multiple-columns thead th:not(:first-child),
.compact-overview.multiple-columns tbody td { border-left: 1px solid var(--pe-row-line); }
.compact-overview .discipline-heading-name { display: block; }
.contribution-keyword { font-weight: 600; color: var(--accent); }
.compact-overview td .compact-description { margin: 8px 0 0; font-size: .94em; line-height: 1.6; color: var(--ink-soft); }
/* Row orientation on hover — deliberately not a background fill, which would read as clickable:
   clearly darker rules above and below the row, and the number in accent. */
.pe { --pe-hover-rule: color-mix(in oklab, var(--ink) 55%, var(--bg)); }
.programme-overview tbody tr > *, .compact-overview tbody tr > * { transition: box-shadow .15s ease; }
.programme-overview tbody tr:hover > *, .compact-overview tbody tr:not(.pe-detail-row):hover > * {
  box-shadow: inset 0 1px 0 var(--pe-hover-rule), inset 0 -1px 0 var(--pe-hover-rule);
}
.programme-overview tbody tr:hover .capability-index, .compact-overview tbody tr:hover .capability-index { color: var(--accent); }

/* ── Discipline contributions ── */
.discipline-table { table-layout: fixed; min-width: 860px; }
.discipline-table thead th:nth-child(1) { width: 29%; }
.discipline-table thead th:nth-child(2) { width: 42%; color: var(--ink); }
.discipline-table thead th:nth-child(3) { width: 29%; }
.discipline-table th.capability-cell { background: var(--pe-cap); padding-right: 22px; }
.discipline-table td.discipline-cell { background: var(--pe-contrib); padding-left: 24px; padding-right: 28px; }
.discipline-table td.products-cell { background: var(--pe-products); color: var(--ink-soft); font-size: .92em; line-height: 1.6; }
.discipline-table thead th.products-cell { background: color-mix(in oklab, var(--warm) 12%, var(--pe-head)); }
.discipline-table tbody + tbody tr:first-child > * { border-top: 1px solid var(--pe-group-line); }
.discipline-table .discipline-cell h3 {
  font-family: var(--mono); font-size: 11px; font-weight: 400; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 6px;
}
.contribution-statement { display: block; font-weight: 600; font-size: 1.04em; line-height: 1.45; color: var(--ink); }
.discipline-table td.discipline-cell > p { margin: 6px 0 0; color: var(--ink-soft); max-width: 62ch; }
.discipline-table ul { margin: 0; padding: 0; list-style: none; }
.discipline-table li { position: relative; padding-left: 16px; margin: 0 0 3px; }
.discipline-table li::before { content: ""; position: absolute; left: 0; top: .8em; width: 8px; height: 1px; background: var(--accent-soft); }
.discipline-table.multiple-selected .discipline-subrow + .discipline-subrow > td { border-top: 1px dashed var(--pe-row-line); }
/* Several disciplines selected: alternate a slightly deeper shade per sub-row
   (restarts with every capability, so the first discipline is always the lighter one) */
.discipline-table.multiple-selected .discipline-subrow:nth-child(even) > td.discipline-cell { background: color-mix(in oklab, var(--ink) 3.5%, var(--paper)); }
.discipline-table.multiple-selected .discipline-subrow:nth-child(even) > td.products-cell { background: color-mix(in oklab, var(--warm) 13%, var(--paper)); }

/* ── Closing message + About ── */
.programme-message {
  font-family: var(--display); font-style: italic; font-weight: 500;
  font-size: clamp(21px, 1.8vw, 25px); line-height: 1.4; color: var(--ink-soft);
  max-width: 52ch; margin: 0; padding: clamp(32px, 3.5vw, 48px) 0 0 clamp(14px, 1.4vw, 22px); border-left: 2px solid var(--accent-soft);
  text-wrap: pretty;
}
.about-exploration { margin: clamp(32px, 4vw, 48px) 0 0; max-width: 72ch; border-top: 1px solid var(--line); }
.about-exploration > summary {
  cursor: pointer; list-style: none; padding: 18px 0; font-size: 16px; font-weight: 600; color: var(--ink);
  display: flex; align-items: center; gap: 10px;
}
.about-exploration > summary::-webkit-details-marker { display: none; }
.about-exploration > summary::before {
  content: ""; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg); transition: transform .2s ease;
}
.about-exploration[open] > summary::before { transform: rotate(45deg); }
.about-exploration h3 { font-family: var(--display); font-weight: 500; font-size: 22px; line-height: 1.25; color: var(--ink); margin: 22px 0 8px; }
.about-exploration h3:first-of-type { margin-top: 4px; }
.about-exploration p { font-size: 16px; line-height: 1.7; color: var(--ink-soft); margin: 0 0 12px; text-wrap: pretty; }
.about-exploration[open] { padding-bottom: 8px; }

/* ── Focus table mode: hide everything but the table and its tools ── */
body.table-focused { --max: none; }
.table-focused .site-header,
.table-focused footer.site,
.table-focused .bto-band,
.table-focused .simple-explorer > :not(.table-tools):not(.stack-rows):not(.ai-view-intro):not(.ai-legend) { display: none !important; }
.table-focused .ai-legend .shift-note, .table-focused .ai-legend .shift-howto, .table-focused .shift-about-link { display: none !important; }
.table-focused .ai-legend { margin: 0 0 12px; }
.table-focused .pe { --pe-sticky-top: 50px; padding-bottom: 32px; }
.table-focused .simple-explorer { padding-top: 0; }
.table-focused .ai-view-intro { margin-top: 18px; }
.table-focused .ai-view-intro > :not(h2) { display: none; }
.table-focused .table-tools {
  position: sticky; top: 0; z-index: 6; margin: 0; height: 50px; background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.table-focused .table-focus { color: var(--ink) !important; font-weight: 600; }

/* ── Small screens: simplified mobile overview ──
   Show the whole first, explain the parts on demand: twelve numbered rows
   (programme capability → short SE statement), one expandable at a time. */
.pe-small-view { display: none; }
@media (max-width: 899.98px) {
  .pe-small-view { display: block; }
  body:not(.pe-force-full-view) .view-navigation,
  body:not(.pe-force-full-view) .discipline-picker-row,
  body:not(.pe-force-full-view) .ai-view-intro,
  body:not(.pe-force-full-view) .ai-legend,
  body:not(.pe-force-full-view) .view-intro,
  body:not(.pe-force-full-view) .table-tools,
  body:not(.pe-force-full-view) .stack-rows,
  body:not(.pe-force-full-view) .simple-lead { display: none !important; }
  body.pe-force-full-view .pe-small-intro,
  body.pe-force-full-view .pe-small-note-text,
  body.pe-force-full-view .pe-se-key,
  body.pe-force-full-view .pe-se-list { display: none; }
  body.pe-force-full-view .pe-small-note { margin: 0 0 20px; }
  #simple-title { font-size: clamp(30px, 7vw, 38px); }
  body:not(.pe-force-full-view) #simple-title { margin: 0; }
  /* Closing statement: a quiet editorial line after the list, not a box */
  body:not(.pe-force-full-view) .programme-message {
    margin-top: 40px; padding: 0; border-left: 0; font-size: 20px; line-height: 1.45; max-width: 34ch;
  }
  body:not(.pe-force-full-view) .programme-message::before {
    content: ""; display: block; width: 32px; height: 1px; background: var(--accent-soft); margin: 0 0 18px;
  }
  /* in the forced full view, tables scroll horizontally, so the sticky header cannot work */
  .pe thead th { position: static; }
  .table-focus { display: none; }
  .ai-view-link { margin-left: 0; }
  .primary-tabs { gap: 20px; }
  .primary-tabs button { font-size: 15px; }
}

/* Intro */
.pe .pe-small-question {
  font-family: var(--display); font-style: italic; font-weight: 500;
  font-size: 21px; line-height: 1.3; color: var(--ink); margin: 10px 0 0; text-wrap: balance;
}
.pe .pe-small-lead { margin: 12px 0 0; font-size: 16px; line-height: 1.55; color: var(--ink-soft); max-width: 46ch; }
/* Secondary note: informative, not a warning */
.pe-small-note { margin: 14px 0 0; font-size: 13.5px; line-height: 1.55; color: var(--muted); max-width: 52ch; }
.pe .pe-small-note-text { margin: 0; }
.pe .pe-force-full {
  display: inline-flex; align-items: baseline; gap: 6px; margin-top: 4px; padding: 8px 0;
  font-size: 14px; font-weight: 500; color: var(--accent);
}
.pe .pe-force-full:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Reading key above the list */
.pe .pe-se-key {
  margin: 30px 0 0; padding: 0 0 10px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line-strong);
}
.pe-se-key-se { color: var(--accent); }
.pe-se-key-arrow { color: var(--muted); }

/* The list */
.pe-se-list { list-style: none; margin: 0; padding: 0; }
.pe-se-item { border-bottom: 1px solid var(--line); }
.pe .pe-se-heading { margin: 0; font: inherit; }
.pe .pe-se-toggle {
  display: grid; grid-template-columns: 30px minmax(0, 1fr) 18px; column-gap: 6px; align-items: baseline;
  width: 100%; min-height: 48px; padding: 15px 0 16px; text-align: left;
}
.pe-se-num { grid-column: 1; grid-row: 1; font-family: var(--mono); font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pe-se-title { grid-column: 2; grid-row: 1; font-size: 17px; font-weight: 600; line-height: 1.35; color: var(--ink); }
.pe-se-statement {
  grid-column: 2; grid-row: 2; margin-top: 4px; font-size: 15px; line-height: 1.5;
  color: color-mix(in oklab, var(--accent) 58%, var(--ink-soft));
}
.pe-se-chevron { grid-column: 3; grid-row: 1; justify-self: end; align-self: center; width: 8px; height: 8px; margin-right: 3px;
  border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: translateY(-2px) rotate(45deg); transition: transform .2s ease;
}
.pe-se-toggle[aria-expanded="true"] .pe-se-chevron { transform: translateY(2px) rotate(-135deg); }
.pe-se-toggle:hover .pe-se-num, .pe-se-toggle[aria-expanded="true"] .pe-se-num { color: var(--accent); }

/* Expanded row: a pale band to the screen edges, details indented under the title */
.pe-se-item.is-open {
  background: var(--bg-elev);
  box-shadow: 0 0 0 var(--gutter) var(--bg-elev); clip-path: inset(0 calc(-1 * var(--gutter)));
}
.pe-se-panel { padding: 0 0 22px 36px; }
.pe-se-part + .pe-se-part { margin-top: 16px; }
.pe .pe-se-part-label {
  margin: 0 0 4px; font-family: var(--mono); font-size: 10.5px; font-weight: 400; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted);
}
.pe .pe-se-text { margin: 0; font-size: 15.5px; line-height: 1.6; color: var(--ink-soft); }
.pe-se-products { list-style: none; margin: 0; padding: 0; font-size: 15px; line-height: 1.55; color: var(--ink-soft); }
.pe-se-products li { position: relative; padding-left: 16px; margin: 0 0 3px; }
.pe-se-products li::before { content: ""; position: absolute; left: 0; top: .8em; width: 8px; height: 1px; background: var(--accent-soft); }
@media (max-width: 380px) {
  .pe .pe-se-toggle { grid-template-columns: 26px minmax(0, 1fr) 16px; column-gap: 4px; }
  .pe-se-title { font-size: 16.5px; }
  .pe-se-panel { padding-left: 30px; }
}

/* ── Print: the current table, without site chrome ── */
@media print {
  .site-header, footer.site, .bto-band, .view-navigation, .discipline-picker-row, .table-tools, .pe-small-view, .about-exploration { display: none !important; }
  body.pe-page { --max: none; }
  .pe thead th { position: static; }
  .aligned-overview { overflow: visible !important; }
  .pe table { min-width: 0 !important; font-size: 10.5px; }
  .pe th, .pe td { padding: 6px 8px; }
  .pe tbody, .pe tr { break-inside: avoid; }
}
