/* DAM Policy Explorer: layout and visual system, on top of style.css (which holds the colour tokens).
   Every colour pair is checked for WCAG 2.2 AA contrast in light, dark and high contrast by the build's tests. */
:root { --brand: #0b55a3; --brand-2: #00695c; --brand-ink: #ffffff; --warm: #a14b00; --card: #ffffff; --shadow: 0 1px 2px rgba(0,0,0,.08), 0 4px 14px rgba(11,85,163,.08); --radius: 12px;
  --p-policy: #0b55a3; --p-gds: #00695c; --p-practice: #5a2f8a; --p-plan: #8a4a00; --p-open: #a3261a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]):not([data-theme="contrast"]) { --brand: #8cc4ff; --brand-2: #7fd8c8; --brand-ink: #0d1b2a; --warm: #f6bd6c; --card: #1d2125; --shadow: 0 1px 2px rgba(0,0,0,.5);
  --p-policy: #8cc4ff; --p-gds: #7fd8c8; --p-practice: #d0b3f5; --p-plan: #f6bd6c; --p-open: #ff9a8c; } }
:root[data-theme="dark"] { --brand: #8cc4ff; --brand-2: #7fd8c8; --brand-ink: #0d1b2a; --warm: #f6bd6c; --card: #1d2125; --shadow: 0 1px 2px rgba(0,0,0,.5);
  --p-policy: #8cc4ff; --p-gds: #7fd8c8; --p-practice: #d0b3f5; --p-plan: #f6bd6c; --p-open: #ff9a8c; }
:root[data-theme="contrast"] { --bg: #000; --text: #fff; --muted: #fff; --line: #fff; --soft: #000; --link: #ffff00; --link-visited: #ffff00; --accent: #ffff00; --focus: #00ffff; --focus-text: #000;
  --ok: #7cff7c; --warn: #ffff00; --bad: #ff8080; --ok-bg: #000; --warn-bg: #000; --bad-bg: #000;
  --brand: #ffff00; --brand-2: #ffff00; --brand-ink: #000; --warm: #ffff00; --card: #000; --shadow: none; --p-policy: #ffff00; --p-gds: #ffff00; --p-practice: #ffff00; --p-plan: #ffff00; --p-open: #ffff00; }
:root[data-theme="contrast"] .xcard a, :root[data-theme="contrast"] .panel, :root[data-theme="contrast"] .stats li, :root[data-theme="contrast"] .nextbest { border: 2px solid #fff; }
:root[data-text="large"] { font-size: 112.5%; } :root[data-text="xlarge"] { font-size: 131%; }
:root[data-spacing] body { letter-spacing: 0.12em; word-spacing: 0.16em; line-height: 1.8; } :root[data-spacing] p { margin-bottom: 2em; }
:root[data-underline] a { text-decoration: underline !important; }
:root[data-reduce-motion] *, :root[data-reduce-motion] *::before { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
@media (prefers-reduced-motion: reduce) { *, *::before { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
html { scroll-behavior: smooth; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ic { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.22em; flex: none; }
.ic.big { width: 2rem; height: 2rem; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.xwrap { max-width: 76rem; margin: 0 auto; padding: 0 1rem; }

/* header */
.xbanner { background: var(--brand); color: var(--brand-ink); }
.xbanner a { color: var(--brand-ink); }
.bar { display: flex; align-items: center; gap: 0.75rem; padding-top: 0.6rem; padding-bottom: 0.6rem; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; margin-right: auto; min-width: 0; }
.brand b { display: block; font-size: 1.2rem; line-height: 1.2; } .brand small { display: block; font-size: 0.9rem; opacity: 0.95; }
.brand img { background: #fff; border-radius: 8px; padding: 2px; }
.menu-btn, .settings-btn { display: inline-flex; align-items: center; gap: 0.4rem; background: transparent; color: var(--brand-ink); border: 2px solid currentColor; border-radius: 8px; padding: 0.35rem 0.7rem; font: inherit; font-size: 1rem; cursor: pointer; min-height: 44px; }
.menu-btn:hover, .settings-btn:hover { background: rgba(255,255,255,.15); }
.menu-btn[hidden], .settings-btn[hidden] { display: none; }
.xnav { background: var(--soft); border-bottom: 1px solid var(--line); color: var(--text); }
.xnav ul { list-style: none; margin: 0; padding: 0; }
.xnav .primary { display: flex; flex-wrap: wrap; gap: 0 0.25rem; }
.xnav .primary > li { margin: 0; }
.xnav a, .xnav summary { display: flex; align-items: center; gap: 0.4rem; padding: 0.7rem 0.65rem; color: var(--link); text-decoration: none; font-weight: 600; font-size: 1rem; border-bottom: 4px solid transparent; min-height: 44px; }
.xnav a:hover, .xnav summary:hover { border-bottom-color: var(--line); text-decoration: underline; }
.xnav a[aria-current="page"], .xnav summary.cur { border-bottom-color: var(--accent); color: var(--text); }
.xnav .more { position: relative; }
.xnav .more summary::before { display: none; }
.xnav .more ul { position: absolute; right: 0; z-index: 20; background: var(--card); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); min-width: 15rem; padding: 0.25rem 0; }
.xnav .more ul a { border: 0; }
.xnav.folded .primary { display: none; }
.xnav.folded.open .primary { display: block; padding-bottom: 0.5rem; }
.xnav.folded.open .more ul { position: static; box-shadow: none; border: 0; }
.phase { display: flex; gap: 0.6rem; align-items: baseline; flex-wrap: wrap; background: var(--bg); color: var(--text); padding-top: 0.6rem; padding-bottom: 0.6rem; font-size: 1rem; border-bottom: 1px solid var(--line); max-width: none; }
.phase a { color: var(--link); }
.stale { background: var(--warn-bg); color: var(--text); border-left: 6px solid var(--warn); margin: 0; padding: 0.6rem 1rem; }
.settings { background: var(--card); color: var(--text); border-bottom: 1px solid var(--line); padding: 0.5rem 0 1rem; }
.settings .small-h { margin-top: 0.5rem; }
.set-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; }
fieldset { border: 0; padding: 0; margin: 0 0 1rem; min-width: 0; }
legend { font-weight: 700; padding: 0; }
.settings label, .opt { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.35rem 0; cursor: pointer; }
input[type=radio], input[type=checkbox] { width: 1.4rem; height: 1.4rem; margin: 0.15rem 0 0; flex: none; accent-color: var(--brand); }
.small-h { font-size: 1.15rem; margin: 0 0 0.4rem; }

/* layout with the page contents drawer */
.layout { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: 2rem; align-items: start; }
.drawer-closed .layout { grid-template-columns: minmax(0, 1fr); }
.layout:not(:has(.contents)) { grid-template-columns: minmax(0, 1fr); }
.xmain { min-width: 0; padding-bottom: 3rem; outline: none; }
.xmain > h1 { margin-top: 1rem; }
.contents { position: sticky; top: 0.5rem; margin-top: 3.4rem; padding: 0.75rem 0.9rem; background: var(--soft); border-radius: var(--radius); border-left: 4px solid var(--accent); max-height: calc(100vh - 1rem); overflow: auto; }
.contents.closed { display: none; }
.contents-h { font-size: 1rem; margin: 0 0 0.5rem; }
.contents ol { list-style: none; margin: 0; padding: 0; } .contents li { margin: 0.15rem 0; font-size: 1rem; }
.contents a { display: block; padding: 0.25rem 0.4rem; border-radius: 6px; text-decoration: none; }
.contents a:hover { text-decoration: underline; }
.contents a[aria-current="location"] { background: var(--bg); font-weight: 700; box-shadow: inset 3px 0 0 var(--accent); }
.count { display: inline-block; min-width: 1.6em; padding: 0 0.4em; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); color: var(--text); font-size: 0.85rem; text-align: center; font-weight: 600; }
.new { display: inline-block; padding: 0 0.4em; border-radius: 4px; background: var(--warm); color: var(--bg); font-size: 0.8rem; font-weight: 700; }
.drawer-switch { position: absolute; margin-top: 1rem; display: inline-flex; align-items: center; gap: 0.5rem; background: none; border: 0; color: var(--link); font: inherit; font-size: 1rem; font-weight: 600; cursor: pointer; min-height: 44px; padding: 0; }
.drawer-switch .track { width: 2.6rem; height: 1.4rem; border-radius: 999px; background: var(--line); position: relative; flex: none; transition: background .2s; }
.drawer-switch .knob { position: absolute; top: 0.15rem; left: 0.15rem; width: 1.1rem; height: 1.1rem; border-radius: 50%; background: var(--bg); transition: transform .2s; }
.drawer-switch[aria-checked="true"] .track { background: var(--brand); }
.drawer-switch[aria-checked="true"] .knob { transform: translateX(1.2rem); }
@media (max-width: 52rem) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .contents { position: static; margin-top: 3.5rem; max-height: none; }
  .drawer-switch { position: static; }
}
.crumbs ol { list-style: none; margin: 0; padding: 0.75rem 0 0; display: flex; flex-wrap: wrap; font-size: 1rem; }
.crumbs li + li::before { content: "›"; margin: 0 0.5rem; color: var(--muted); }

/* home */
.home-hero { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 1.5rem; align-items: center; margin: 1rem 0 0.5rem; padding: 1.5rem; border-radius: 18px;
  background: linear-gradient(135deg, var(--soft), var(--bg)); border: 1px solid var(--line); }
.home-hero h1 { font-size: clamp(1.8rem, 1.2rem + 2.2vw, 2.7rem); margin: 0.25rem 0 0.75rem; }
.hero-art { width: 100%; height: auto; max-width: 26rem; justify-self: center; }
.kicker { font-weight: 700; color: var(--brand-2); margin: 0; display: flex; gap: 0.4rem; align-items: center; }
.cta { display: flex; flex-wrap: wrap; gap: 0.75rem; }
@media (max-width: 44rem) { .home-hero { grid-template-columns: minmax(0, 1fr); } .hero-art { max-width: 16rem; } }
.btn { display: inline-flex; align-items: center; gap: 0.5rem; background: var(--brand); color: var(--brand-ink) !important; border: 2px solid var(--brand); border-radius: 8px; padding: 0.6rem 1.1rem; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; min-height: 44px; box-shadow: 0 2px 0 rgba(0,0,0,.25); }
.btn:hover { filter: brightness(1.08); text-decoration: underline; }
.btn.secondary { background: var(--bg); color: var(--link) !important; }
.btn:focus-visible { outline: 3px solid var(--focus); box-shadow: 0 0 0 6px var(--text); }
.linkish { background: none; border: 0; padding: 0; color: var(--link); text-decoration: underline; font: inherit; cursor: pointer; }
.stats { list-style: none; padding: 0; margin: 1.25rem 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 0.75rem; }
.stats li { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); border-top: 5px solid var(--brand-2); padding: 0.9rem 1rem; margin: 0; max-width: none; }
.stats .num { display: block; font-size: 2.6rem; font-weight: 800; line-height: 1; color: var(--brand); font-variant-numeric: tabular-nums; }
.stats .lbl { display: block; margin-top: 0.3rem; font-size: 1rem; }
.duo { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 1rem; margin: 1rem 0; }
.panel { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 0.25rem 1.25rem 1rem; border: 1px solid var(--line); }
.panel h2 { margin-top: 1rem; font-size: 1.35rem; display: flex; gap: 0.5rem; align-items: center; }
.big-date { font-size: 1.2rem; }
.ring { width: 5.5rem; height: 5.5rem; flex: none; }
.ring-bg { fill: none; stroke: var(--soft); stroke-width: 9; } .ring-fg { fill: none; stroke: var(--brand-2); stroke-width: 9; stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; transition: stroke-dashoffset .6s; }
.ring text { fill: var(--text); font-size: 17px; font-weight: 700; }
.ring-wrap, .progress-bar { display: flex; gap: 1rem; align-items: center; }
.progress-bar { background: var(--soft); border-radius: var(--radius); padding: 0.75rem 1rem; margin: 1rem 0; position: sticky; top: 0; z-index: 5; border: 1px solid var(--line); }
.progress-bar .ring { width: 3.6rem; height: 3.6rem; } .progress-bar p { margin: 0; }
.xcards { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; }
.xcards li { margin: 0; max-width: none; }
.xcard a { display: grid; grid-template-columns: auto 1fr; gap: 0.25rem 0.75rem; height: 100%; padding: 1rem 1.1rem; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); text-decoration: none; color: var(--text); transition: transform .15s, box-shadow .15s; }
.xcard a:hover { transform: translateY(-2px); border-color: var(--brand); }
.xcard a:hover .ct { text-decoration: underline; }
.xcard .ic { grid-row: span 2; color: var(--brand-2); }
.xcard .ct { font-weight: 700; color: var(--link); font-size: 1.1rem; } .xcard .cd { font-size: 1rem; }
.xcard.primary a { border: 2px solid var(--brand); background: linear-gradient(180deg, var(--card), var(--soft)); }
.plain { counter-reset: n; list-style: none; padding: 0; } .plain li { counter-increment: n; position: relative; padding-left: 2.6rem; margin: 0.6rem 0; }
.plain li::before { content: counter(n); position: absolute; left: 0; top: 0; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: var(--brand-2); color: var(--bg); font-weight: 700; display: grid; place-items: center; font-size: 1rem; }
.changes { padding-left: 1.2rem; } .when { color: var(--muted); font-size: 1rem; }

/* journey map */
.journey ol { list-style: none; margin: 1rem 0 1.5rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr)); gap: 0.5rem; counter-reset: none; }
.journey li { margin: 0; max-width: none; position: relative; }
.journey a { display: flex; flex-direction: column; align-items: flex-start; gap: 0.2rem; padding: 0.7rem 0.8rem; border-radius: 10px; background: var(--soft); border: 1px solid var(--line); text-decoration: none; font-weight: 600; font-size: 1rem; height: 100%; }
.journey a:hover { text-decoration: underline; border-color: var(--brand); }
.journey .jn { font-size: 0.85rem; color: var(--muted); font-weight: 700; }
.journey .here a { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.journey .here .jn { color: var(--brand-ink); }

/* provenance badges: colour plus text, never colour alone */
.prov { display: inline-block; font-size: 0.8rem; font-weight: 700; padding: 0.05rem 0.5rem; border-radius: 999px; border: 2px solid currentColor; white-space: nowrap; vertical-align: 0.1em; background: var(--bg); }
.prov-policy { color: var(--p-policy); } .prov-gds { color: var(--p-gds); } .prov-practice { color: var(--p-practice); } .prov-plan { color: var(--p-plan); } .prov-open { color: var(--p-open); }
.legend { display: grid; grid-template-columns: max-content 1fr; gap: 0.4rem 0.75rem; align-items: baseline; background: var(--soft); padding: 0.9rem 1rem; border-radius: var(--radius); margin: 1rem 0; }
.source { font-size: 1rem; color: var(--muted); }
.pill { display: inline-block; padding: 0.1rem 0.6rem; border-radius: 999px; font-weight: 700; font-size: 0.9rem; border: 2px solid currentColor; }
.pill.yes, .pill.now { color: var(--ok); } .pill.maybe, .pill.next { color: var(--warn); } .pill.no, .pill.later { color: var(--muted); }

/* tables */
.tbl { border-collapse: collapse; width: 100%; margin: 1rem 0; font-size: 1rem; }
.tbl th, .tbl td { text-align: left; vertical-align: top; padding: 0.6rem 0.7rem; border-bottom: 1px solid var(--line); }
.tbl thead th { border-bottom: 3px solid var(--text); }
.tbl-scroll { overflow-x: auto; max-width: 100%; } .tbl-scroll:focus-visible { outline: 3px solid var(--focus); }

/* policy */
.reqs { list-style: none; padding: 0; display: grid; gap: 0.75rem; }
.req { display: flex; gap: 0.9rem; background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--brand); border-radius: var(--radius); padding: 0.75rem 1rem; margin: 0; max-width: none; }
.req h3 { margin: 0 0 0.25rem; } .req p { margin: 0.2rem 0; } .req > .ic { color: var(--brand); margin-top: 0.2rem; }
.tests { padding-left: 1.4rem; } .tests li { margin: 0.6rem 0; }
.principles { counter-reset: p; list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 0.75rem; }
.principles li { counter-increment: p; background: var(--card); border: 1px solid var(--line); border-top: 5px solid var(--brand-2); border-radius: var(--radius); padding: 0.75rem 1rem; margin: 0; max-width: none; }
.principles li::before { content: "Principle " counter(p); display: block; font-size: 0.85rem; font-weight: 700; color: var(--brand-2); }
.guide-list { padding-left: 1.2rem; }

/* asset test */
.asset-test .q { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.25rem 1rem 0.75rem; margin: 1rem 0; }
.asset-test legend h2 { font-size: 1.3rem; margin: 1rem 0 0.25rem; display: flex; gap: 0.6rem; align-items: center; }
.asset-test legend { float: left; width: 100%; } .asset-test legend + * { clear: both; }
.qn { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--brand); color: var(--brand-ink); font-size: 1rem; flex: none; }
.hint { color: var(--muted); display: block; margin: 0.2rem 0 0.5rem; font-size: 1rem; }
.field { margin: 1rem 0; } .field label { display: block; }
input[type=text], input[type=search] { font: inherit; width: 100%; max-width: 32rem; padding: 0.5rem; border: 2px solid var(--text); border-radius: 4px; background: var(--bg); color: var(--text); min-height: 44px; }
input[type=text]:focus, input[type=search]:focus { outline: 3px solid var(--focus); box-shadow: inset 0 0 0 2px var(--text); }
.result { outline: none; }
.verdict { border-radius: var(--radius); padding: 0.25rem 1.1rem 0.75rem; border-left: 8px solid var(--line); background: var(--soft); }
.verdict.v-in { border-color: var(--ok); background: var(--ok-bg); } .verdict.v-in-later { border-color: var(--brand-2); }
.verdict.v-out { border-color: var(--bad); background: var(--bad-bg); } .verdict.v-flag { border-color: var(--warn); background: var(--warn-bg); }
.tested-list { padding-left: 1.2rem; }

/* questions */
.filters { background: var(--soft); border-radius: var(--radius); padding: 0.9rem 1rem; margin: 1rem 0; }
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.75rem 0 0; } .chips legend { width: 100%; margin-bottom: 0.3rem; }
.chip { display: inline-flex; gap: 0.35rem; align-items: center; border: 2px solid var(--line); border-radius: 999px; padding: 0.25rem 0.75rem 0.25rem 0.5rem; background: var(--bg); cursor: pointer; font-size: 1rem; min-height: 44px; }
.chip input { width: 1.1rem; height: 1.1rem; margin: 0; }
.chip:has(input:checked) { border-color: var(--brand); background: var(--card); font-weight: 700; }
.chip:has(input:focus-visible) { outline: 3px solid var(--focus); }
.topic-jump ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; }
.topic-jump li { margin: 0; }
.topic-h { border-top: 2px solid var(--line); padding-top: 1rem; }
.qa details { border-bottom: 1px solid var(--line); margin: 0; }
.qa summary { padding: 0.7rem 0; }
.qa .qtext { flex: 1 1 auto; }
.asked { font-size: 0.85rem; color: var(--muted); font-weight: 600; white-space: nowrap; }
.chart { margin: 1rem 0; } .chart figcaption { font-weight: 700; margin-bottom: 0.5rem; }
.bars { list-style: none; padding: 0; margin: 0; }
.bars li { display: grid; grid-template-columns: 11rem 1fr 2.5rem; gap: 0.6rem; align-items: center; margin: 0.35rem 0; max-width: none; font-size: 1rem; }
.chartbar { background: var(--soft); border-radius: 6px; height: 1.2rem; overflow: hidden; border: 1px solid var(--line); }
.fill { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-2)); border-radius: 6px; animation: grow .8s ease-out; transform-origin: left; }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.w0 { width: 2%; } .w10 { width: 10%; } .w20 { width: 20%; } .w30 { width: 30%; } .w40 { width: 40%; } .w50 { width: 50%; } .w60 { width: 60%; } .w70 { width: 70%; } .w80 { width: 80%; } .w90 { width: 90%; } .w100 { width: 100%; }
.bv { font-weight: 700; font-variant-numeric: tabular-nums; }
@media (max-width: 36rem) { .bars li { grid-template-columns: 1fr 2.5rem; } .bars .bl { grid-column: 1 / -1; } }

/* embed */
.cycle { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 0.6rem; }
.cycle li { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.8rem 0.9rem; margin: 0; max-width: none; display: flex; flex-direction: column; gap: 0.2rem; font-size: 1rem; }
.cycle .cn { width: 2rem; height: 2rem; border-radius: 50%; background: var(--brand-2); color: var(--bg); display: grid; place-items: center; font-weight: 700; }
.cycle b { font-size: 1.1rem; }
.tiles { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 0.75rem; }
.tiles li { display: flex; gap: 0.75rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.75rem 1rem; margin: 0; max-width: none; }
.tiles h3 { margin: 0 0 0.25rem; font-size: 1.1rem; } .tiles p { margin: 0; font-size: 1rem; } .tiles .ic { color: var(--brand-2); margin-top: 0.2rem; }
.phases { list-style: none; padding: 0; border-left: 4px solid var(--brand); margin-left: 0.6rem; }
.phases li { position: relative; padding: 0 0 0.75rem 1.4rem; margin: 0; }
.phases li::before { content: ""; position: absolute; left: -0.8rem; top: 0.35rem; width: 1rem; height: 1rem; border-radius: 50%; background: var(--bg); border: 4px solid var(--brand); }
.phases .ph { font-weight: 700; font-size: 1.1rem; } .phases p { margin: 0.2rem 0 0; }

/* resources, glossary, about */
.res-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 0.75rem; }
.res { display: flex; gap: 0.75rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.75rem 1rem; margin: 0; max-width: none; }
.res h3 { margin: 0 0 0.25rem; font-size: 1.1rem; } .res p { margin: 0.2rem 0; font-size: 1rem; } .res .ic { color: var(--brand); }
.glossary .term-row { padding: 0.6rem 0; border-bottom: 1px solid var(--line); scroll-margin-top: 1rem; }
.glossary dt { font-weight: 700; } .glossary dd { margin: 0.2rem 0 0; }
.glossary .term-row:target { background: var(--soft); box-shadow: -0.6rem 0 0 var(--soft), inset 4px 0 0 var(--accent); }
a.term { text-decoration: underline dotted; text-decoration-thickness: 2px; text-underline-offset: 0.2em; color: inherit; }
a.term:hover { text-decoration-style: solid; color: var(--link); }
.tooltip { position: absolute; z-index: 50; background: var(--text); color: var(--bg); padding: 0.5rem 0.75rem; border-radius: 8px; font-size: 1rem; line-height: 1.4; box-shadow: var(--shadow); max-width: 20rem; }
.checks { list-style: none; padding: 0; } .checks li { padding-left: 1.8rem; position: relative; }
.checks li::before { position: absolute; left: 0; font-weight: 700; } .checks .pass::before { content: "✓"; color: var(--ok); } .checks .fail::before { content: "✗"; color: var(--bad); }
.roadmap { list-style: none; padding: 0; } .roadmap li { display: flex; gap: 0.75rem; align-items: baseline; }

/* return steps */
li.step .mark { margin: 0.5rem 0 0.25rem; font: inherit; font-size: 1rem; font-weight: 700; border: 2px solid var(--brand-2); color: var(--brand-2); background: var(--bg); border-radius: 8px; padding: 0.3rem 0.8rem; cursor: pointer; min-height: 44px; }
li.step .mark[aria-pressed="true"] { background: var(--brand-2); color: var(--bg); }
li.step.is-done > details > summary::after { content: "Done"; margin-left: 0.6rem; font-size: 0.8rem; border: 2px solid var(--ok); color: var(--ok); border-radius: 999px; padding: 0 0.45rem; }

/* next best action */
.nextbest { margin-top: 3rem; background: var(--soft); border-radius: var(--radius); padding: 0.25rem 1.25rem 1rem; border-top: 5px solid var(--brand-2); }
.nb-h { font-size: 1.35rem; display: flex; gap: 0.5rem; align-items: center; margin-top: 1rem; }
.rel-h { font-size: 1.05rem; margin-bottom: 0.25rem; }
.related { display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; list-style: none; padding: 0; margin: 0; }
.related li { margin: 0; }

/* footer */
.xfoot { background: var(--soft); border-top: 5px solid var(--brand); padding: 1.5rem 0 2rem; margin-top: 2rem; }
.xfoot .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1.5rem; }
.xfoot ul { padding-left: 1.1rem; font-size: 1rem; }
.xfoot .notes { border-top: 1px solid var(--line); margin-top: 1rem; padding-top: 0.5rem; } .xfoot .notes p { max-width: none; }
.colophon { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.colophon img { background: #fff; padding: 4px; border-radius: 4px; }

@media print { .xnav, .settings, .menu-btn, .settings-btn, .drawer-switch, .contents, .nextbest, .progress-bar, li.step .mark, .filters { display: none !important; } .layout { display: block; } a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.8em; } }

/* myths and facts */
.myths { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 0.75rem; }
.myths li { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.75rem 1rem; margin: 0; max-width: none; }
.myths p { margin: 0.25rem 0; } .myth { text-decoration: line-through; text-decoration-thickness: 1px; color: var(--muted); }
.tagm, .tagf { display: inline-block; font-size: 0.8rem; font-weight: 700; padding: 0 0.45rem; border-radius: 4px; margin-right: 0.3rem; text-decoration: none; }
.tagm { border: 2px solid var(--bad); color: var(--bad); } .tagf { background: var(--ok); color: var(--bg); }
.myth .tagm { display: inline-block; }
/* pathway: requirement -> capability -> playbook */
.pathway { list-style: none; padding: 0; display: grid; gap: 0.5rem; }
.pathway li { display: flex; flex-wrap: wrap; gap: 0.5rem 0.75rem; align-items: center; background: var(--soft); border-radius: 10px; padding: 0.6rem 0.9rem; margin: 0; max-width: none; }
.pw-req { font-weight: 700; flex: 1 1 16rem; } .pw-arrow { color: var(--muted); font-weight: 700; }
.pw-caps { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.cap-chip { display: inline-block; padding: 0.15rem 0.6rem; border-radius: 999px; background: var(--bg); border: 2px solid var(--brand-2); font-size: 0.9rem; font-weight: 600; text-decoration: none; }
.cap-chip:hover { text-decoration: underline; }
.pw-pb { font-weight: 700; }
.chips-row { display: flex; flex-wrap: wrap; gap: 0.4rem; }
/* capability tiles */
.caps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 0.75rem; }
.cap { background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--brand-2); border-radius: var(--radius); padding: 0.6rem 1rem; margin: 0; max-width: none; }
.cap h3 { margin: 0.2rem 0; font-size: 1.1rem; } .cap p { margin: 0.2rem 0; }
.cap-id { font-weight: 800; color: var(--brand); font-size: 0.9rem; letter-spacing: 0.03em; }
.lk { font-weight: 700; font-size: 0.8rem; padding: 0 0.45rem; border-radius: 4px; border: 2px solid currentColor; }
.lk-explicit { color: var(--ok); } .lk-implicit { color: var(--p-gds); } .lk-inferred { color: var(--p-practice); }
.lk-legend { display: grid; grid-template-columns: max-content 1fr; gap: 0.4rem 0.75rem; background: var(--soft); border-radius: var(--radius); padding: 0.75rem 1rem; }
.lk-legend dd { margin: 0; }
/* personas */
.persona-pick ul { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 0.5rem; }
.persona-pick li { margin: 0; }
.persona-pick a { display: flex; gap: 0.5rem; align-items: center; padding: 0.6rem 0.8rem; border-radius: 10px; background: var(--card); border: 1px solid var(--line); font-weight: 600; text-decoration: none; min-height: 44px; }
.persona-pick a:hover { text-decoration: underline; border-color: var(--brand); }
.persona { border-top: 4px solid var(--line); margin-top: 2.5rem; padding-top: 0.5rem; scroll-margin-top: 1rem; }
.persona.primary { border-top-color: var(--brand); }
.persona > h2 { display: flex; gap: 0.6rem; align-items: center; } .persona > h2 .ic { color: var(--brand-2); }
.lead-s { font-size: 1.15rem; }
.p-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 0 1.5rem; }
.stories li { font-style: italic; }
.success { background: var(--ok-bg); border-left: 6px solid var(--ok); padding: 0.6rem 0.9rem; border-radius: 6px; }
.lanes { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: 0.5rem; counter-reset: none; }
.lane { background: var(--soft); border-radius: 10px; padding: 0.5rem 0.75rem; margin: 0; max-width: none; border-top: 4px solid var(--brand-2); position: relative; }
.lane .stage { font-weight: 800; font-size: 0.95rem; } .lane ul { padding-left: 1.1rem; margin: 0.3rem 0 0; font-size: 1rem; }
.journey-map td ul { padding-left: 1rem; margin: 0; } .journey-map td { min-width: 9rem; }
/* design patterns */
.patterns { list-style: none; padding: 0; } .patterns li { display: grid; gap: 0.1rem; padding: 0.5rem 0; border-bottom: 1px solid var(--line); }

/* header search and Ask */
.hsearch { display: flex; align-items: stretch; flex: 1 1 14rem; max-width: 22rem; }
.hsearch input { min-height: 44px; border: 2px solid var(--brand-ink); border-right: 0; border-radius: 8px 0 0 8px; padding: 0.3rem 0.6rem; font: inherit; font-size: 1rem; background: var(--bg); color: var(--text); width: 100%; min-width: 0; }
.hsearch input:focus { outline: 3px solid var(--focus); }
.hs-btn { border: 2px solid var(--brand-ink); background: var(--bg); color: var(--link); border-radius: 0 8px 8px 0; padding: 0 0.7rem; cursor: pointer; min-width: 44px; }
.ask-row { display: flex; gap: 0.5rem; flex-wrap: wrap; } .ask-row input { flex: 1 1 18rem; max-width: none; }
.starters { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; padding-left: 1.1rem; }
.ask-results { padding-left: 1.4rem; } .ask-results li { padding: 0.4rem 0; border-bottom: 1px solid var(--line); max-width: none; }
.ask-results li.best { background: var(--soft); border-radius: 8px; padding: 0.4rem 0.8rem; border-left: 5px solid var(--brand-2); }
.ask-results h3 { margin: 0.1rem 0; font-size: 1.15rem; } .ask-results p { margin: 0.2rem 0; }
.copy { font-size: 1rem; margin-top: 0.5rem; }
@media (max-width: 40rem) { .hsearch { order: 3; max-width: none; flex-basis: 100%; } }

/* D-06: visually hidden text is absolutely positioned; scroll containers must be positioned so it cannot escape and widen the page */
.tbl-scroll { position: relative; }
/* D-07: rows of mixed items must wrap at 320 px */
.qa summary, .roadmap li { flex-wrap: wrap; }
/* D-08: the brand must stay on the blue banner when the header wraps on narrow screens */
.brand { flex: 1 1 12rem; min-width: 0; color: var(--brand-ink); background: var(--brand); }
.brand > span { min-width: 0; overflow-wrap: anywhere; }
/* D-09: the header search must keep a usable size (WCAG 2.5.8 target size) beside a growing brand */
.hsearch { flex: 0 1 20rem; } .hsearch input { min-width: 9rem; } .brand { flex: 1 1 auto; }
/* D-10: ".bar" was used for both the header row and the chart track; the chart's fixed height collapsed the header. Chart now uses .chartbar. */

/* D-12: on narrow screens the drawer sits directly under its switch */
@media (max-width: 52rem) { .contents { margin-top: 0.25rem; } .drawer-switch { margin-top: 0.75rem; } }

/* journey stays on one row where it fits, otherwise wraps in even rows */
.journey ol { grid-template-columns: repeat(auto-fit, minmax(min(100%, 6.8rem), 1fr)); }

/* track */
.tr-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 0 1rem; }
input[type=date] { font: inherit; padding: 0.4rem; border: 2px solid var(--text); border-radius: 4px; background: var(--bg); color: var(--text); min-height: 44px; }
.trk-stages { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 0.5rem; }
.trk-stages li { margin: 0; max-width: none; }
.st-opt { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 0.2rem 0.5rem; align-items: center; height: 100%; background: var(--card); border: 2px solid var(--line); border-radius: 10px; padding: 0.6rem; cursor: pointer; }
.st-opt .small { grid-column: 1 / -1; }
.st-n { display: inline-grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--soft); font-weight: 700; font-size: 0.9rem; }
.trk-stages li.done .st-opt { border-color: var(--ok); } .trk-stages li.done .st-n { background: var(--ok); color: var(--bg); }
.trk-stages li.now .st-opt { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand); } .trk-stages li.now .st-n { background: var(--brand); color: var(--brand-ink); }
.st-opt:has(input:focus-visible) { outline: 3px solid var(--focus); }

/* guide */
.quickstart { counter-reset: q; list-style: none; padding: 0; display: grid; gap: 0.5rem; }
.quickstart li { counter-increment: q; display: grid; grid-template-columns: 2.4rem 1fr; gap: 0 0.6rem; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 0.6rem 0.9rem; margin: 0; max-width: none; }
.quickstart li::before { content: counter(q); grid-row: span 2; width: 2rem; height: 2rem; border-radius: 50%; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-weight: 700; }
.quickstart span { font-size: 1rem; }

/* tours */
.tour-dim { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 60; }
.tour-ring { position: absolute; z-index: 61; border: 4px solid var(--focus); border-radius: 12px; box-shadow: 0 0 0 4px var(--text); pointer-events: none; transition: all .3s; }
.tour { position: fixed; z-index: 62; left: 50%; bottom: 1.25rem; transform: translateX(-50%); width: min(30rem, calc(100vw - 2rem)); background: var(--card); color: var(--text); border-radius: var(--radius); box-shadow: 0 8px 30px rgba(0,0,0,.35); padding: 0.25rem 1.25rem 1rem; border-top: 6px solid var(--brand); }
.tour h2 { margin: 0.25rem 0 0.5rem; font-size: 1.3rem; outline: none; } .tour-n { margin: 0.5rem 0 0; font-size: 0.9rem; color: var(--muted); font-weight: 700; }
.tour-btns { display: flex; flex-wrap: wrap; gap: 0.5rem 0.75rem; align-items: center; }
.tour-start { margin: 0 0 1rem; font-size: 1rem; }
.tour-offer { background: var(--soft); border: 2px solid var(--brand); border-radius: var(--radius); padding: 0.25rem 1rem; margin: 1rem 0 0; }
.tour-offer p { margin: 0.5rem 0; }
.prov:focus-visible, .lk:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.tutorials { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 0.75rem; }
.tutorials li { display: flex; gap: 0.75rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.75rem 1rem; margin: 0; max-width: none; }
.tutorials h3 { margin: 0 0 0.25rem; font-size: 1.1rem; } .tutorials p { margin: 0.25rem 0; font-size: 1rem; } .tutorials .ic { color: var(--brand-2); margin-top: 0.2rem; }

.kit { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 0.75rem; }
.kit-card { background: var(--card); border: 1px solid var(--line); border-top: 5px solid var(--brand-2); border-radius: var(--radius); padding: 0.25rem 1rem 0.75rem; }
.kit-card h3 { display: flex; gap: 0.5rem; align-items: center; font-size: 1.1rem; } .kit-card li { font-size: 1rem; }
.checklist { list-style: none; padding: 0; } .checklist li { position: relative; padding-left: 1.8rem; }
.checklist li::before { content: ""; position: absolute; left: 0; top: 0.3em; width: 1.05rem; height: 1.05rem; border: 2px solid var(--brand-2); border-radius: 3px; }

/* D-19: the home banner had reused the base page's ".hero" class, inheriting white text on a pale background; it is now .home-hero, and the base .hero keeps its own colours */
.home-hero, .home-hero h1 { color: var(--text); }
.home-hero .lead { color: var(--text); }
/* D-20: the tour control is a button, so the base ".hero a" colour did not reach it on the dark band */
.hero .tour-start, .hero .tour-start:visited { color: var(--band-text); }
.hero .tour-start:hover { text-decoration-thickness: 3px; }

/* D-22: the Track stage cards reused the base ".stages" class and were drawn twice, with a second number and overflowing titles */
.st-opt { grid-template-columns: auto 1fr; align-content: start; }
.st-opt b { grid-column: 1 / -1; min-width: 0; overflow-wrap: normal; font-size: 1.1rem; }   /* titles get their own row: breaking them mid-word was worse */
.st-opt .st-n { justify-self: start; }
/* D-23: the home role cards reused the base ".card" class and were drawn twice (an outer card around the explorer's own) */
/* D-24: the explorer's tooltip sits below its word, but inherited the base tooltip's arrow on its bottom edge, pointing away */
#term-tip::after { content: none; display: none; }
#term-tip::before { content: ""; position: absolute; left: 1rem; top: -6px; border: 6px solid transparent; border-top: 0; border-bottom-color: var(--text); }
#term-tip.above::before { top: auto; bottom: -6px; border-bottom: 0; border-top: 6px solid var(--text); border-left-color: transparent; border-right-color: transparent; }
/* D-25: the guide's quick start reused the base ".quick" class, whose links have their own border and bar, so each step was boxed twice */
/* D-26: roadmap entries were flex rows, so long text and glossary words broke onto separate lines from their status pill */
.roadmap li { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); gap: 0.75rem; align-items: baseline; margin: 0 0 0.6rem; }
.roadmap li .pill { justify-self: start; }
/* D-27: glossary definitions ran the full width of the screen */
.glossary { max-width: 48rem; }
.st-opt .small { font-weight: 400; }
/* D-28: on phones each answer's triangle sat alone on a line above its question (wrapping flex row) */
.qa summary { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 0.6rem; align-items: start; flex-wrap: nowrap; }
.qa summary::before { margin-top: 0.45em; }
.qa summary .qwrap { min-width: 0; }
td .pill { border-radius: 0.75rem; white-space: normal; text-align: center; }   /* long pills in tables wrap cleanly */
/* worked examples */
.ex-tiles { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 0.5rem; }
.ex-tiles li { margin: 0; max-width: none; }
.ex-tiles a { display: flex; gap: 0.6rem; align-items: center; padding: 0.6rem 0.8rem; background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--brand-2); border-radius: var(--radius); font-weight: 700; text-decoration: none; }
.ex-tiles a:hover { text-decoration: underline; }
.ex-tiles .ex-n { font-size: 1.4rem; min-width: 2ch; color: var(--brand-2); }
.ex-q { width: 100%; max-width: 32rem; }
.ex-list .ex { border-bottom: 1px solid var(--line); }
.ex-list .ex summary { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 0.6rem; align-items: start; padding: 0.7rem 0; }
.ex-list .ex summary::before { margin-top: 0.45em; }
.ex-id { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.85rem; color: var(--muted); }
.verdict-pill { display: inline-block; font-size: 0.85rem; font-weight: 700; padding: 0 0.5rem; border-radius: 999px; border: 2px solid var(--line); color: var(--text); }
.verdict-pill.v-in { border-color: var(--ok); } .verdict-pill.v-out { border-color: var(--bad, #b3261e); } .verdict-pill.v-flag { border-color: var(--warn); } .verdict-pill.v-fill { border-color: var(--brand); }
.ex-out { background: var(--soft); border-left: 4px solid var(--brand-2); padding: 0.5rem 0.75rem; border-radius: 6px; }
.ex-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.extag { font-size: 0.85rem; border: 1px solid var(--line); border-radius: 999px; padding: 0 0.5rem; text-decoration: none; }
.extag:hover { text-decoration: underline; }

/* 1.5.0: what is fixed and what is up to you; where answers come from */
.pill.own { color: var(--brand); }
.req.own { border-left-color: var(--accent); }
.req .fx { display: grid; grid-template-columns: max-content 1fr; gap: 0.25rem 0.75rem; margin: 0.4rem 0; }
.req .fx dt { font-weight: 700; } .req .fx dd { margin: 0; }
@media (max-width: 30em) { .req .fx { grid-template-columns: 1fr; } .req .fx dd { margin-bottom: 0.4rem; } }
.authority { padding-left: 1.5rem; } .authority li { margin: 0.4rem 0; }
/* 1.7.0 data quality action plans */
.dq-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 0 0.9rem; align-items: end; border: 1px solid var(--line); border-radius: var(--radius); padding: 0.6rem 0.8rem; margin: 0.5rem 0; background: var(--card); }
.dq-row .field { margin: 0.25rem 0; } .dq-row p { margin: 0.25rem 0; }
.dq-row input, .dq-row select { width: 100%; }
.btn.small { padding: 0.25rem 0.7rem; font-size: 0.9em; }
.dq-checks { padding-left: 1.4rem; } .dq-checks li { margin: 0.55rem 0; }
.dq-checks .dq-fix { display: block; color: var(--text); margin-top: 0.15rem; } .dq-checks .src { font-size: 0.9em; color: var(--muted); }
.dq-missing .dq-fix::before { content: "What to do: "; font-weight: 700; } .dq-partly .dq-fix::before { content: "What to do: "; font-weight: 700; }
.warn-box { background: var(--warn-bg); border-left: 5px solid var(--warn); padding: 0.6rem 0.9rem; border-radius: var(--radius); }
.checks-list li { margin: 0.35rem 0; }
fieldset.q h4 { margin: 0.9rem 0 0.2rem; }
@media print { .dq-build, .dq-equiv, #check, #equivalent, #catalogue, #more, .xbanner, .contents, .xfoot { display: none !important; } #dq-result { display: block !important; } }
.dqv-map code { white-space: normal; word-break: normal; overflow-wrap: normal; }   /* wrap at spaces, never inside dcat:Dataset */
@media (max-width: 40em) {
  .dqv-map thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .dqv-map tr { display: block; border-top: 1px solid var(--line); padding: 0.5rem 0; }
  .dqv-map th, .dqv-map td { display: block; border: 0; padding: 0.15rem 0; }
  .dqv-map td:nth-of-type(1)::before { content: "In the GOV.UK template: "; font-weight: 700; }
  .dqv-map td:nth-of-type(2)::before { content: "Term: "; font-weight: 700; }
}

/* X1 (3 Dec 2026): the Hub bar added when the Explorer is installed in the Data Asset Management Hub */
.dmh-hubbar{font:600 .9rem/1.4 system-ui,sans-serif;padding:.45rem 1rem;background:#0b0c0c;color:#fff}.dmh-hubbar a{color:#fff;text-decoration:underline;text-underline-offset:2px}.dmh-hubbar a:focus{outline:3px solid #ffdd00;outline-offset:2px}.dmh-hubbar span{opacity:.85}
