/* ==========================================================================
   Digiphile Legislation – shared foundation
   Used unchanged by all three design directions and all twelve statutes.
   Layout/chrome lives in the per-direction stylesheet that loads after this.
   ========================================================================== */

/* ---------- 1. Self-hosted typefaces -------------------------------------
   No third-party font CDN: no visitor IP is disclosed to a US provider
   simply for loading a typeface. unicode-range means the latin-ext file is
   fetched only when a page actually needs it.
   ------------------------------------------------------------------------ */
@font-face{font-family:Inter;font-style:normal;font-weight:400;font-display:swap;src:url(../fonts/inter-latin-400-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:Inter;font-style:normal;font-weight:500;font-display:swap;src:url(../fonts/inter-latin-500-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:Inter;font-style:normal;font-weight:600;font-display:swap;src:url(../fonts/inter-latin-600-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:Inter;font-style:normal;font-weight:700;font-display:swap;src:url(../fonts/inter-latin-700-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:Inter;font-style:normal;font-weight:400;font-display:swap;src:url(../fonts/inter-latin-ext-400-normal.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:Inter;font-style:normal;font-weight:600;font-display:swap;src:url(../fonts/inter-latin-ext-600-normal.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:Inter;font-style:normal;font-weight:700;font-display:swap;src:url(../fonts/inter-latin-ext-700-normal.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}

/* ---------- 2. Brand ramps ------------------------------------------------
   Anchored on the three Digiphile brand values taken from the firm's logo
   and existing site chrome:
       navy  #1f2655   teal  #1ecabb   rose  #ed6787
   The brand teal and rose are 2.05:1 and 3.05:1 against white, so neither
   can legally carry small text in light mode. Each ramp therefore extends
   into darker, hue-matched steps that do meet WCAG 2.2 AA, and the bright
   brand values are reserved for surfaces, rules and – where they finally
   come into their own – dark mode, where they measure 9.1:1 and 6.1:1.
   ------------------------------------------------------------------------ */
:root{
  --navy-950:#0e1124; --navy-900:#141938; --navy-800:#1f2655; --navy-700:#293270;
  --navy-600:#343f8e; --navy-500:#414fb2; --navy-400:#6370c6; --navy-300:#8790d3;
  --navy-200:#bcc1e6; --navy-100:#e1e4f4; --navy-50:#f4f5fb;

  --teal-900:#0a433e; --teal-800:#0f645c; --teal-700:#14847b; --teal-600:#19a69a;
  --teal-500:#1ecabb; --teal-400:#4cdccf; --teal-300:#71eadf; --teal-200:#aff3ed;
  --teal-100:#dbfaf7; --teal-50:#f2fdfc;

  --rose-900:#640c21; --rose-800:#af153a; --rose-700:#cd1843; --rose-600:#e52150;
  --rose-500:#ed6787; --rose-400:#f08ba3; --rose-300:#f5adbe; --rose-200:#fbdbe2;
  --rose-100:#fdf1f4;

  --amber-800:#7a5410; --amber-700:#8a6508; --amber-100:#fdf6e3; --amber-50:#fffbf0;

  --ui:'Inter',system-ui,-apple-system,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;
  --mono:ui-monospace,SFMono-Regular,'SF Mono',Menlo,Consolas,monospace;

  --r-sm:4px; --r:7px; --r-lg:12px; --r-pill:999px;
  --step:1;                 /* reader type-size multiplier */
  --measure:66ch;           /* reading measure for the legislative text     */
  --header-h:56px;
  --tap:44px;               /* minimum interactive target                   */
}

/* ---------- 3. Semantic tokens: light ----------------------------------- */
:root{
  color-scheme:light;
  --bg:#f6f7fb;
  --surface:#ffffff;
  --surface-2:#fbfbfd;
  --surface-sunken:#f0f2f8;
  --chrome:var(--navy-800);
  --chrome-ink:#ffffff;
  --chrome-ink-dim:rgba(255,255,255,.72);
  --chrome-line:rgba(255,255,255,.16);
  --chrome-hover:rgba(255,255,255,.12);

  --ink:#151831;            /* legislative text          15.6:1            */
  --ink-2:#3b4162;          /* secondary                  9.4:1            */
  --ink-3:#5d6485;          /* meta / labels              5.6:1            */
  --line:#e3e6f0;
  --line-strong:#ccd1e2;

  --link:var(--navy-700);            /* 11.8:1                             */
  --link-hover:var(--teal-800);      /*  7.0:1                             */
  --accent:var(--teal-700);          /*  4.6:1 – smallest allowed for text */
  --accent-deep:var(--teal-800);
  --accent-bright:var(--teal-500);   /* surfaces + rules only in light     */
  --accent-wash:var(--teal-50);
  --accent-edge:var(--teal-200);

  --recital:var(--rose-800);         /*  7.0:1                             */
  --recital-wash:var(--rose-100);
  --recital-edge:var(--rose-200);

  --annex:var(--amber-800);          /*  6.4:1                             */
  --annex-wash:var(--amber-50);
  --annex-edge:#eadcb8;

  --mark-bg:#fff3a8; --mark-ink:#3d3000;
  --target:var(--teal-100);
  --shadow-1:0 1px 2px rgba(20,25,56,.06),0 1px 3px rgba(20,25,56,.05);
  --shadow-2:0 4px 14px rgba(20,25,56,.10),0 1px 3px rgba(20,25,56,.06);
  --shadow-3:0 18px 48px rgba(20,25,56,.18),0 4px 12px rgba(20,25,56,.10);
  --ring:var(--teal-700);
}

/* ---------- 4. Semantic tokens: dark ------------------------------------ */
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]){
    color-scheme:dark;
    --bg:#0c0f20; --surface:#141830; --surface-2:#191e3a; --surface-sunken:#0a0d1c;
    --chrome:#141830; --chrome-ink:#eceef7; --chrome-ink-dim:rgba(236,238,247,.68);
    --chrome-line:rgba(236,238,247,.14); --chrome-hover:rgba(236,238,247,.09);
    --ink:#e9ebf5; --ink-2:#b9bed8; --ink-3:#9299b8;
    --line:#252a4b; --line-strong:#333961;
    --link:#a9b2ee; --link-hover:var(--teal-400);
    --accent:var(--teal-500); --accent-deep:var(--teal-400);
    --accent-bright:var(--teal-500);
    --accent-wash:rgba(30,202,187,.10); --accent-edge:rgba(30,202,187,.34);
    --recital:var(--rose-500); --recital-wash:rgba(237,103,135,.11);
    --recital-edge:rgba(237,103,135,.32);
    --annex:#e0b969; --annex-wash:rgba(224,185,105,.10); --annex-edge:rgba(224,185,105,.30);
    --mark-bg:#5c4d00; --mark-ink:#ffe9a3;
    --target:rgba(30,202,187,.16);
    --shadow-1:0 1px 2px rgba(0,0,0,.4);
    --shadow-2:0 4px 14px rgba(0,0,0,.45);
    --shadow-3:0 18px 48px rgba(0,0,0,.6);
    --ring:var(--teal-400);
  }
}
:root[data-theme="dark"]{
  color-scheme:dark;
  --bg:#0c0f20; --surface:#141830; --surface-2:#191e3a; --surface-sunken:#0a0d1c;
  --chrome:#141830; --chrome-ink:#eceef7; --chrome-ink-dim:rgba(236,238,247,.68);
  --chrome-line:rgba(236,238,247,.14); --chrome-hover:rgba(236,238,247,.09);
  --ink:#e9ebf5; --ink-2:#b9bed8; --ink-3:#9299b8;
  --line:#252a4b; --line-strong:#333961;
  --link:#a9b2ee; --link-hover:var(--teal-400);
  --accent:var(--teal-500); --accent-deep:var(--teal-400);
  --accent-bright:var(--teal-500);
  --accent-wash:rgba(30,202,187,.10); --accent-edge:rgba(30,202,187,.34);
  --recital:var(--rose-500); --recital-wash:rgba(237,103,135,.11);
  --recital-edge:rgba(237,103,135,.32);
  --annex:#e0b969; --annex-wash:rgba(224,185,105,.10); --annex-edge:rgba(224,185,105,.30);
  --mark-bg:#5c4d00; --mark-ink:#ffe9a3;
  --target:rgba(30,202,187,.16);
  --shadow-1:0 1px 2px rgba(0,0,0,.4);
  --shadow-2:0 4px 14px rgba(0,0,0,.45);
  --shadow-3:0 18px 48px rgba(0,0,0,.6);
  --ring:var(--teal-400);
}

/* ---------- 5. Reset ----------------------------------------------------- */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{font-size:100%;-webkit-text-size-adjust:100%;scrollbar-color:var(--line-strong) transparent}
@media (prefers-reduced-motion:no-preference){html{scroll-behavior:smooth}}
body{
  font-family:var(--ui);
  background:var(--bg); color:var(--ink);
  line-height:1.55;
  -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;
  overflow-wrap:break-word;
}
img,svg{max-width:100%;display:block}
button,input,select{font:inherit;color:inherit}
button{background:none;border:0;cursor:pointer}
a{color:var(--link)}

/* Focus: always visible, never removed. WCAG 2.2 §2.4.11 */
:focus-visible{outline:2px solid var(--ring);outline-offset:2px;border-radius:var(--r-sm)}
.chrome :focus-visible,.site-bar :focus-visible{outline-color:var(--teal-400)}

::selection{background:var(--accent-edge);color:var(--ink)}
::-webkit-scrollbar{width:10px;height:10px}
::-webkit-scrollbar-thumb{background:var(--line-strong);border-radius:6px;border:3px solid transparent;background-clip:content-box}
::-webkit-scrollbar-track{background:transparent}

.skip-link{
  position:absolute;left:8px;top:-60px;z-index:999;
  background:var(--surface);color:var(--link);
  padding:.7rem 1.1rem;border-radius:var(--r);box-shadow:var(--shadow-2);
  font-size:.875rem;font-weight:600;text-decoration:none;
  transition:top .15s;
}
.skip-link:focus{top:8px}
.vh{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}

/* ==========================================================================
   6. THE LEGISLATIVE TEXT
   Every selector below matches markup generated by the existing build and is
   applied without altering a single character of it.
   ========================================================================== */
.provision-body{
  font-family:var(--serif);
  font-size:calc(1.0625rem * var(--step));
  line-height:1.72;
  color:var(--ink);
  text-align:left;                 /* justification off: no hyphenation
                                      dictionary is guaranteed cross-browser,
                                      and unhyphenated justified legal prose
                                      opens rivers at this measure          */
  font-variant-numeric:lining-nums proportional-nums;
  hanging-punctuation:first;
}
.provision-body p,.provision-body .article-para{margin:0 0 1.15em}
.article-para{
  font-size:inherit;line-height:inherit;color:inherit;
  scroll-margin-top:calc(var(--header-h) + 1.5rem);
}
.article-para:last-child{margin-bottom:0}
.article-para-id{
  font-family:var(--ui);
  font-weight:700;
  font-size:.82em;
  color:var(--accent-deep);
  font-variant-numeric:lining-nums tabular-nums;
  margin-right:.15em;
}

/* (a) (b) (c) – and (i) (ii) (iii) below them */
.points-list{list-style:none;padding:0;margin:.85em 0 .85em 1.15em}
.points-list li{display:flex;gap:.7em;margin-bottom:.7em;line-height:1.68}
.points-list li:last-child{margin-bottom:0}
.points-list li .point-id{
  flex:0 0 auto;min-width:2em;
  font-family:var(--ui);font-weight:600;font-size:.82em;
  color:var(--ink-3);
  font-variant-numeric:lining-nums tabular-nums;
  padding-top:.14em;
}
.point-body{flex:1 1 auto;min-width:0}
.point-body .point-text,.point-lead{display:block}
.point-body>.points-list{margin:.6em 0 .25em 1em}
.point-body .subpara{margin-top:.5em}
.points-list-roman{margin-left:1.6em}
.points-list-roman li .point-id{min-width:2.6em;color:var(--ink-3)}
.points-list-dash{margin-left:1.2em}
.points-list-dash li .point-id{min-width:1.2em;color:var(--ink-3)}
.subpara,.nested-para{margin:.6em 0 0;text-align:left}
.para-heading{font-family:var(--ui);font-weight:700;font-size:.95em;color:var(--ink);margin:1.2em 0 .4em}
.qsec-num{font-weight:700;margin-right:.4em;font-family:var(--ui);font-size:.9em}
.formula{font-family:var(--mono);font-size:.94em;background:var(--surface-sunken);padding:.1em .45em;border-radius:var(--r-sm)}
.invalid-provision{color:var(--ink-3)}
.del-marker{font-family:var(--ui);font-size:.82rem;color:var(--ink-3);font-style:italic;margin:.5em 0}
.corr-text{background:var(--accent-wash);padding:0 .25em;border-radius:var(--r-sm)}

/* Cross-references – the spine of these sites. Underline, never colour
   alone, so the link is identifiable without relying on hue (WCAG 1.4.1).

   Colour says where a reference goes:
     teal   another Article / Section / Regulation      (xref-article, or any
                                                         xref whose target is
                                                         an article page)
     amber  an Annex or Schedule                        (xref-annex, or target)
     rose   a Recital                                   (pills; body targets)
     navy   a paragraph of this provision, a Chapter, or an external source
   Every value is measured against the page ground, not white: teal-800,
   rose-800 and amber-800 are 6.1 to 6.4:1 on #f6f7fb. */
a.xref,a.xref-ext{
  color:var(--link);
  text-decoration:none;
  border-bottom:1px solid var(--line-strong);              /* fallback */
  border-bottom-color:color-mix(in srgb,var(--link) 42%,transparent);
  padding-bottom:.04em;
  transition:color .12s,border-color .12s,background-color .12s;
}
a.xref:hover,a.xref:focus-visible,a.xref-ext:hover,a.xref-ext:focus-visible{
  color:var(--link-hover);
  border-bottom-color:var(--link-hover);
  background:var(--accent-wash);
}
a.xref-ext{border-bottom-style:dotted}

/* teal: another provision */
a.xref.xref-article,a.xref[href*="/article-"]{
  color:var(--accent-deep);border-bottom-color:var(--accent-edge);
}
a.xref.xref-article{border-bottom-color:color-mix(in srgb,var(--accent-deep) 50%,transparent)}
a.xref.xref-article:hover,a.xref.xref-article:focus-visible,
a.xref[href*="/article-"]:hover,a.xref[href*="/article-"]:focus-visible{
  color:var(--accent-deep);border-bottom-color:var(--accent-deep);background:var(--accent-wash);
}

/* rose: a recital */
a.xref.xref-recital,a.xref[href*="/recital-"]{
  color:var(--recital);border-bottom-color:var(--recital-edge);
}
a.xref.xref-recital,a.xref[href*="/recital-"]{border-bottom-color:color-mix(in srgb,var(--recital) 45%,transparent)}
a.xref.xref-recital:hover,a.xref.xref-recital:focus-visible,
a.xref[href*="/recital-"]:hover,a.xref[href*="/recital-"]:focus-visible{
  background:var(--recital-wash);color:var(--recital);border-bottom-color:var(--recital);
}

/* amber: an annex or schedule */
a.xref.xref-annex,a.xref[href*="/annex-"]{
  color:var(--annex);border-bottom-color:var(--annex-edge);
}
a.xref.xref-annex,a.xref[href*="/annex-"]{border-bottom-color:color-mix(in srgb,var(--annex) 45%,transparent)}
a.xref.xref-annex:hover,a.xref.xref-annex:focus-visible,
a.xref[href*="/annex-"]:hover,a.xref[href*="/annex-"]:focus-visible{
  background:var(--annex-wash);color:var(--annex);border-bottom-color:var(--annex);
}
.footnotes-list a.xref-ext{color:inherit}

/* Footnote markers */
sup.fn-ref{font-size:.68em;line-height:0;vertical-align:super;margin-left:.08em}
sup.fn-ref a{
  color:var(--recital);font-weight:700;text-decoration:none;
  padding:0 .12em;border-radius:2px;
}
sup.fn-ref a:hover,sup.fn-ref a:focus-visible{background:var(--recital-wash);text-decoration:underline}

.footnotes{
  margin-top:2.25rem;padding-top:1.1rem;border-top:1px solid var(--line);
  font-family:var(--ui);font-size:.82rem;line-height:1.6;color:var(--ink-2);
}
.footnotes-heading{
  font-size:.68rem;font-weight:700;letter-spacing:.09em;text-transform:uppercase;
  color:var(--ink-3);margin-bottom:.6rem;
}
.footnotes-list{list-style:none;padding:0;margin:0}
.footnotes-list li{
  margin-bottom:.5em;padding-left:2.4em;text-indent:-2.4em;
  scroll-margin-top:calc(var(--header-h) + 1.5rem);
}
.footnotes-list li .fn-back{
  display:inline-block;width:2.4em;text-indent:0;
  color:var(--recital);font-weight:700;text-decoration:none;
}
.footnotes-list li .fn-back:hover{text-decoration:underline}
.footnotes-list li a{color:var(--link)}

/* Quoted amendments (UK Acts) */
.quoted-amendment{
  margin:.9em 0 .9em 1rem;padding:.2em 0 .2em 1.1em;
  border-left:3px solid var(--line-strong);
}
.quoted-amendment .article-para{margin-top:.5em}

/* Editorial + pending-amendment notes */
.editorial-note{
  font-family:var(--ui);
  margin-top:1.75rem;padding:1rem 1.15rem;
  border-left:3px solid var(--recital);
  background:var(--recital-wash);
  border-radius:0 var(--r) var(--r) 0;
  font-size:.86rem;line-height:1.62;color:var(--ink-2);
}
.editorial-note p{margin:0 0 .5em}
.editorial-note p:last-child{margin-bottom:0}
.editorial-note a{color:var(--recital)}
.editorial-label{
  font-size:.67rem;font-weight:700;letter-spacing:.09em;text-transform:uppercase;
  color:var(--recital);display:block;
}
.pending-note{border-left-color:var(--annex);background:var(--annex-wash)}
.pending-note .editorial-label,.pending-note a{color:var(--annex)}
.pending-intro{font-style:italic}
.pending-text{
  margin:.5em 0 .7em .8em;padding-left:.9em;
  border-left:2px solid var(--annex-edge);
  font-family:var(--serif);font-size:.95rem;
}
.pending-fn{font-size:.78rem;color:var(--ink-3)}

/* Tables */
.table-wrap{overflow-x:auto;margin:1em 0;border:1px solid var(--line);border-radius:var(--r);-webkit-overflow-scrolling:touch}
table.oj-table{border-collapse:collapse;font-family:var(--ui);font-size:.85rem;width:100%;min-width:32rem}
table.oj-table td,table.oj-table th{border-bottom:1px solid var(--line);padding:.6em .8em;text-align:left;vertical-align:top}
table.oj-table tr:last-child td{border-bottom:0}
table.oj-table th{background:var(--surface-sunken);font-weight:700;color:var(--ink-2);position:sticky;top:0}
table.oj-table p{margin:0 0 .35em}
table.oj-table p:last-child{margin-bottom:0}
.cell-list{list-style:none;padding:0;margin:0}
.cell-list li{display:flex;gap:.5em;margin-bottom:.35em}
.cell-list .point-id{flex-shrink:0;min-width:1.4em;font-weight:600}

/* Annex / Schedule internal headings */
.annex-heading{
  font-family:var(--ui);font-size:1.05rem;font-weight:700;
  color:var(--ink);margin:1.75em 0 .75em;
}
.annex-part-heading{
  font-family:var(--ui);font-size:.95rem;font-weight:700;color:var(--ink);
  margin:1.9em 0 .8em;padding-bottom:.4em;border-bottom:1px solid var(--line);
  scroll-margin-top:calc(var(--header-h) + 1.5rem);
}
.annex-part-heading:first-child{margin-top:0}

.provision-ref{display:block;font-family:var(--ui);font-size:.85rem;font-weight:400;color:var(--ink-3,#6b7280);margin-top:.35rem}
.provision-title .fn-ref{font-size:.6em;vertical-align:super;margin-right:.35em}
/* Preamble, closing formula, signatories */
.preamble{
  font-family:var(--serif);font-size:calc(1rem * var(--step));line-height:1.75;
  padding:1.35rem 1.5rem;background:var(--surface);
  border:1px solid var(--line);border-radius:var(--r);margin:1rem 0 1.5rem;
}
.preamble p{margin-bottom:.65em}
.preamble-title{font-weight:700;color:var(--ink);text-align:left}
.final-block{margin-top:2.5rem;padding-top:1.5rem;border-top:1px solid var(--line);font-family:var(--serif);line-height:1.75}
.final-text p{margin-bottom:.65em}
.signatories{display:flex;flex-wrap:wrap;gap:1.5rem 4rem;margin-top:1rem;font-family:var(--ui);font-size:.88rem;line-height:1.6}

/* :target – the landing highlight when a cross-reference lands mid-provision */
.article-para:target,.footnotes-list li:target,.annex-part-heading:target,[id]:target>.point-text{
  background:var(--target);
  box-shadow:0 0 0 .45rem var(--target);
  border-radius:3px;
}
@media (prefers-reduced-motion:no-preference){
  .article-para:target,.footnotes-list li:target{animation:land 2.2s ease-out}
  @keyframes land{0%,35%{background:var(--target);box-shadow:0 0 0 .45rem var(--target)}100%{background:transparent;box-shadow:0 0 0 .45rem transparent}}
}

/* ==========================================================================
   7. Shared components
   ========================================================================== */

/* -- related-provision pills (verbatim markup) --------------------------- */
.related-provisions{margin-top:2.25rem;padding-top:1.25rem;border-top:1px solid var(--line)}
.related-provisions-heading{
  font-family:var(--ui);font-size:.68rem;font-weight:700;letter-spacing:.09em;
  text-transform:uppercase;color:var(--ink-3);margin-bottom:.7rem;
}
.related-provisions-pills{display:flex;flex-wrap:wrap;gap:.4rem}
.xref-pill{
  font-family:var(--ui);font-size:.78rem;font-weight:600;
  padding:.3rem .65rem;border-radius:var(--r-pill);
  text-decoration:none;white-space:nowrap;
  border:1px solid var(--line-strong);background:var(--surface);color:var(--ink-2);
  transition:background .12s,color .12s,border-color .12s;
}
.xref-pill:hover,.xref-pill:focus-visible{border-color:var(--link);color:var(--link);background:var(--surface-2)}
.xref-pill-recital{color:var(--recital);border-color:var(--recital-edge);background:var(--recital-wash)}
.xref-pill-recital:hover,.xref-pill-recital:focus-visible{background:var(--recital);color:#fff;border-color:var(--recital)}
.xref-pill-article{color:var(--accent-deep);border-color:var(--accent-edge);background:var(--accent-wash)}
.xref-pill-article:hover,.xref-pill-article:focus-visible{background:var(--accent-deep);color:#fff;border-color:var(--accent-deep)}
.xref-pill-annex{color:var(--annex);border-color:var(--annex-edge);background:var(--annex-wash)}
.xref-pill-annex:hover,.xref-pill-annex:focus-visible{background:var(--annex);color:#fff;border-color:var(--annex)}
:root[data-theme="dark"] .xref-pill-recital:hover,:root[data-theme="dark"] .xref-pill-article:hover,:root[data-theme="dark"] .xref-pill-annex:hover{color:var(--navy-950)}

/* -- buttons -------------------------------------------------------------- */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:.45rem;
  min-height:36px;padding:.42rem .85rem;
  font-family:var(--ui);font-size:.8rem;font-weight:600;
  border:1px solid var(--line-strong);border-radius:var(--r);
  background:var(--surface);color:var(--ink-2);
  text-decoration:none;white-space:nowrap;
  transition:background .12s,border-color .12s,color .12s;
}
.btn:hover{background:var(--surface-2);border-color:var(--link);color:var(--link)}
.btn svg{flex:0 0 auto}
.btn.is-on{background:var(--accent-wash);border-color:var(--accent-edge);color:var(--accent-deep)}
.icon-btn{
  display:inline-flex;align-items:center;justify-content:center;
  width:36px;height:36px;border-radius:var(--r);
  color:var(--chrome-ink-dim);border:1px solid transparent;
}
.icon-btn:hover{background:var(--chrome-hover);color:var(--chrome-ink)}
.icon-btn[aria-pressed="true"]{background:var(--chrome-hover);color:var(--chrome-ink)}

/* -- provision toolbar ---------------------------------------------------- */
.tools{display:flex;flex-wrap:wrap;gap:.5rem;margin-top:2rem}
.tools .btn.copied{background:var(--accent-wash);border-color:var(--accent);color:var(--accent-deep)}

/* -- previous / next ------------------------------------------------------ */
.provision-nav{
  display:grid;grid-template-columns:1fr 1fr;gap:.75rem;
  margin-top:2.5rem;padding-top:1.5rem;border-top:1px solid var(--line);
}
.provision-nav a{
  display:flex;flex-direction:column;gap:.15rem;
  min-height:var(--tap);padding:.7rem .95rem;
  border:1px solid var(--line);border-radius:var(--r);
  background:var(--surface);text-decoration:none;
  transition:border-color .12s,background .12s;
}
.provision-nav a:hover{border-color:var(--link);background:var(--surface-2)}
.provision-nav a:nth-child(2){text-align:right}
.provision-nav a:only-child:last-of-type{grid-column:2}
.provision-nav .nav-label{
  font-family:var(--ui);font-size:.68rem;font-weight:700;letter-spacing:.07em;
  text-transform:uppercase;color:var(--ink-3);
}
.provision-nav .nav-text{
  font-family:var(--ui);font-size:.85rem;font-weight:600;color:var(--link);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}

/* -- breadcrumb ----------------------------------------------------------- */
.breadcrumb{
  display:flex;flex-wrap:wrap;align-items:center;gap:.35rem;
  font-family:var(--ui);font-size:.78rem;color:var(--ink-3);margin-bottom:1.25rem;
}
.breadcrumb a{color:var(--ink-2);text-decoration:none;border-bottom:1px solid transparent}
.breadcrumb a:hover{color:var(--link);border-bottom-color:var(--link)}
.breadcrumb .sep{color:var(--line-strong)}

/* -- cross-reference preview popover -------------------------------------
   Reads the target provision out of the page it already links to, so a
   lawyer can check a reference without losing their place. No extra
   payload; if the fetch fails the link still works exactly as before.     */
.xpop{
  position:absolute;z-index:400;width:min(30rem,calc(100vw - 2rem));
  background:var(--surface);border:1px solid var(--line-strong);
  border-radius:var(--r-lg);box-shadow:var(--shadow-3);
  padding:.9rem 1.05rem 1rem;
  font-family:var(--serif);font-size:.88rem;line-height:1.6;color:var(--ink-2);
  max-height:22rem;overflow:auto;overscroll-behavior:contain;
}
.xpop[hidden]{display:none}
.xpop-head{
  display:flex;align-items:baseline;justify-content:space-between;gap:.75rem;
  font-family:var(--ui);margin-bottom:.5rem;
  padding-bottom:.5rem;border-bottom:1px solid var(--line);
}
.xpop-num{font-size:.8rem;font-weight:700;letter-spacing:.03em;color:var(--accent-deep)}
.xpop-num.is-recital{color:var(--recital)}
.xpop-num.is-annex{color:var(--annex)}
.xpop-title{font-size:.8rem;font-weight:500;color:var(--ink-3);text-align:right;flex:1}
.xpop-body>*:first-child{margin-top:0}
.xpop-body .article-para{margin-bottom:.7em;font-size:.88rem}
.xpop-body .points-list{margin:.5em 0 .5em .8em}
.xpop-body a{pointer-events:none;color:inherit;border-bottom-color:var(--line-strong)}
.xpop-foot{margin-top:.6rem;padding-top:.55rem;border-top:1px solid var(--line);font-family:var(--ui);font-size:.75rem}
.xpop-foot a{color:var(--link);font-weight:600;text-decoration:none}
.xpop-foot a:hover{text-decoration:underline}
.xpop-loading{font-family:var(--ui);font-size:.8rem;color:var(--ink-3)}

/* -- brand link in the bar must take the chrome ink, not the link colour --- */
.bar-firm{color:var(--chrome-ink);text-decoration:none;flex-shrink:0}
.bar-firm .wordmark{
  font-family:var(--ui);font-size:.86rem;font-weight:700;
  letter-spacing:.14em;text-transform:uppercase;white-space:nowrap;
}
.bar-firm:hover{opacity:.82}

/* -- search --------------------------------------------------------------- */
.search-btn{display:none}
.search-field{
  width:100%;min-height:36px;
  display:flex;align-items:center;gap:.55rem;
  background:var(--chrome-hover);border:1px solid var(--chrome-line);
  border-radius:var(--r);padding:.35rem .5rem .35rem .7rem;
  color:var(--chrome-ink-dim);font-size:.85rem;text-align:left;
  transition:border-color .12s,background .12s;
}
.search-field:hover{border-color:var(--chrome-ink-dim);color:var(--chrome-ink)}
.search-field .s-icon{flex:0 0 auto;display:flex}
.search-field .s-placeholder{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.search-field kbd{
  flex:0 0 auto;
  font-family:var(--ui);font-size:.68rem;font-weight:600;
  color:var(--chrome-ink-dim);border:1px solid var(--chrome-line);
  border-radius:var(--r-sm);padding:.1rem .35rem;
}

dialog.modal{
  width:min(44rem,calc(100vw - 1.5rem));max-width:none;
  max-height:min(80vh,44rem);
  padding:0;border:1px solid var(--line-strong);border-radius:var(--r-lg);
  background:var(--surface);color:var(--ink);
  box-shadow:var(--shadow-3);overflow:hidden;
  margin:max(3vh,1rem) auto auto;
}
dialog.modal::backdrop{background:rgba(12,15,32,.55);backdrop-filter:blur(3px)}
.modal-head{display:flex;align-items:center;gap:.6rem;padding:.7rem .8rem;border-bottom:1px solid var(--line)}
.modal-head input{
  flex:1;min-height:40px;border:1px solid var(--line-strong);border-radius:var(--r);
  background:var(--surface-2);padding:.5rem .8rem;font-size:.95rem;color:var(--ink);
}
.modal-head input:focus{outline:2px solid var(--ring);outline-offset:1px;border-color:var(--ring)}
.modal-close{
  display:inline-flex;align-items:center;justify-content:center;
  width:40px;height:40px;border-radius:var(--r);color:var(--ink-3);
}
.modal-close:hover{background:var(--surface-sunken);color:var(--ink)}
.modal-body{overflow-y:auto;max-height:calc(min(80vh,44rem) - 60px);overscroll-behavior:contain}
.modal-hint{padding:1.5rem 1.25rem;font-size:.85rem;color:var(--ink-3);text-align:center}

.s-result{
  display:block;padding:.7rem 1rem;border-bottom:1px solid var(--line);
  text-decoration:none;color:inherit;
}
.s-result:hover,.s-result:focus-visible,.s-result[aria-selected="true"]{background:var(--surface-sunken);outline-offset:-2px}
.s-badge{
  display:block;font-size:.66rem;font-weight:700;letter-spacing:.05em;
  text-transform:uppercase;color:var(--accent-deep);margin-bottom:.2rem;
}
.s-badge.recital{color:var(--recital)}
.s-badge.annex{color:var(--annex)}
.s-title{display:block;font-size:.88rem;font-weight:600;color:var(--ink);margin-bottom:.25rem}
.s-snippet{display:block;font-family:var(--serif);font-size:.82rem;line-height:1.55;color:var(--ink-3)}
.s-snippet mark,mark{background:var(--mark-bg);color:var(--mark-ink);padding:0 .12em;border-radius:2px}

/* Below 760px the inline field has no room: it becomes an icon that opens
   the same dialog, which is also the larger touch target. */
@media (max-width:759px){
  .bar-search{display:none}
  .search-btn{display:inline-flex}
}

/* -- contents tree (shared by all three directions) ----------------------- */
.toc{font-family:var(--ui)}
.toc-group{border-bottom:1px solid var(--line)}
.toc-group:last-child{border-bottom:0}
.toc-btn{
  display:flex;align-items:flex-start;gap:.5rem;width:100%;
  min-height:var(--tap);padding:.6rem .9rem;text-align:left;
  font-size:.78rem;font-weight:700;letter-spacing:.02em;color:var(--ink-2);
}
.toc-btn:hover{background:var(--surface-sunken);color:var(--ink)}
.toc-btn .chev{flex:0 0 auto;margin-left:auto;color:var(--ink-3);transition:transform .18s}
.toc-btn[aria-expanded="true"] .chev{transform:rotate(90deg)}
.toc-btn .g-label{display:block;font-size:.65rem;font-weight:700;letter-spacing:.09em;text-transform:uppercase;color:var(--accent-deep)}
.toc-btn .g-title{display:block;font-weight:600;color:var(--ink-2);margin-top:.1rem;line-height:1.35}
.toc-panel{display:none;padding-bottom:.4rem}
.toc-panel.open{display:block}
.toc-sec{
  padding:.55rem .9rem .25rem 1.1rem;font-size:.68rem;font-weight:600;
  letter-spacing:.04em;color:var(--ink-3);
}
.toc-link{
  display:block;padding:.4rem .9rem .4rem 1.1rem;
  font-size:.8rem;line-height:1.4;color:var(--ink-2);text-decoration:none;
  border-left:3px solid transparent;
}
.toc-link .n{font-weight:700;color:var(--ink-3);margin-right:.35em;font-variant-numeric:tabular-nums}
.toc-link:hover{background:var(--surface-sunken);color:var(--ink)}
.toc-link[aria-current="page"]{
  background:var(--accent-wash);border-left-color:var(--accent-bright);
  color:var(--accent-deep);font-weight:600;
}
.toc-link[aria-current="page"] .n{color:var(--accent-deep)}
.toc-link.recital[aria-current="page"]{background:var(--recital-wash);border-left-color:var(--recital);color:var(--recital)}
.toc-filter{position:sticky;top:0;z-index:2;background:var(--surface);padding:.6rem .7rem;border-bottom:1px solid var(--line)}
.toc-filter input{
  width:100%;min-height:36px;padding:.4rem .7rem;font-size:.82rem;
  border:1px solid var(--line-strong);border-radius:var(--r);
  background:var(--surface-2);color:var(--ink);
}
.toc-tabs{display:flex;gap:.25rem;padding:.6rem .7rem .5rem;border-bottom:1px solid var(--line)}
.toc-tab{
  flex:1;min-height:34px;padding:.35rem .5rem;border-radius:var(--r);
  font-size:.76rem;font-weight:600;color:var(--ink-3);
}
.toc-tab:hover{background:var(--surface-sunken);color:var(--ink-2)}
.toc-tab[aria-selected="true"]{background:var(--accent-wash);color:var(--accent-deep)}
.toc-tab[aria-selected="true"][data-tab="recitals"]{background:var(--recital-wash);color:var(--recital)}
.toc-empty{padding:1.25rem .9rem;font-size:.82rem;color:var(--ink-3)}


/* -- "in this provision" jump list (used by all three directions) --------- */
.jump{display:flex;flex-direction:column;gap:.1rem}
.jump-link{
  display:flex;gap:.55rem;padding:.38rem .5rem;border-radius:var(--r-sm);
  font-family:var(--ui);font-size:.78rem;line-height:1.4;
  color:var(--ink-3);text-decoration:none;border-left:2px solid transparent;
}
.jump-link:hover{background:var(--surface-sunken);color:var(--ink-2)}
.jump-link[aria-current="true"]{color:var(--accent-deep);border-left-color:var(--accent-bright);background:var(--accent-wash)}
.jump-n{flex:0 0 1.7rem;font-weight:700;font-variant-numeric:tabular-nums}
.jump-t{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* -- footer --------------------------------------------------------------- */
.site-footer{
  border-top:1px solid var(--line);
  padding:1.75rem 1.5rem 2.25rem;
  font-family:var(--ui);text-align:center;
}
.footer-disclaimer{
  font-size:.78rem;line-height:1.65;color:var(--ink-3);
  max-width:60rem;margin:0 auto .6rem;
}
.footer-copyright{font-size:.75rem;color:var(--ink-3)}
.site-footer a{color:var(--link);text-decoration:underline;text-underline-offset:2px}
.site-footer a:hover{color:var(--link-hover)}

/* ==========================================================================
   8. Print – the text, nothing else
   ========================================================================== */
@media print{
  :root{--ink:#000;--ink-2:#222;--ink-3:#444;--line:#bbb;--surface:#fff;--bg:#fff}
  .site-bar,.rail,.toc,.tools,.provision-nav,.site-footer,.skip-link,
  .xpop,dialog.modal,.aside,.companion,.reading-progress,.jump{display:none!important}
  body{background:#fff;color:#000;font-size:11pt}
  .shell,.layout{display:block!important}
  .col,.main{max-width:none!important;padding:0!important;margin:0!important}
  .provision-body{font-size:11pt;line-height:1.5;color:#000}
  .provision-head{border-bottom:1pt solid #999;margin-bottom:1em}
  a{color:#000!important;border-bottom:0!important;text-decoration:none!important}
  a.xref::after{content:" [" attr(title) "]";font-size:8pt;color:#555}
  .points-list li{break-inside:avoid}
  .article-para{orphans:3;widows:3}
  .footnotes{font-size:8.5pt;border-top:1pt solid #999}
  .editorial-note{border:1pt solid #999;background:none;break-inside:avoid}
  @page{margin:18mm 16mm}
}

/* Forced-colours (Windows high contrast) */
@media (forced-colors:active){
  .xref-pill,.btn,.toc-link[aria-current="page"]{border:1px solid ButtonBorder}
  .toc-link[aria-current="page"]{forced-color-adjust:none;background:Highlight;color:HighlightText}
}

/* ==========================================================================
   9. Provision heading – one h1 carrying number + title, so the document
   outline reads "Article 6 – Lawfulness of processing" rather than a bare
   numeral. The two spans are styled by each direction.
   ========================================================================== */
.provision-h1{font-size:inherit;font-weight:inherit;margin:0;line-height:inherit}
.provision-num,.provision-title{display:block}

/* ==========================================================================
   10. Useful links / Other laws pages (content carried over verbatim)
   ========================================================================== */
.links-page{font-family:var(--ui)}
.links-page h1{font-size:clamp(1.6rem,1.2rem + 1.4vw,2.1rem);font-weight:700;letter-spacing:-.02em;color:var(--ink);margin-bottom:1rem;line-height:1.15}
.links-intro,.links-page>p{font-size:.95rem;line-height:1.7;color:var(--ink-2);margin-bottom:1.1rem;max-width:64ch}
.links-heading{
  font-size:.95rem;font-weight:700;color:var(--ink);
  margin:2rem 0 .8rem;padding-bottom:.4rem;border-bottom:1px solid var(--line);
}
.links-note{font-style:italic;color:var(--ink-3);margin:0 0 .75em;font-size:.88rem}
.links-list{list-style:none;padding:0;margin:0 0 .5rem}
.links-list li{
  padding:.5rem 0 .5rem .95rem;line-height:1.6;font-size:.92rem;color:var(--ink-2);
  border-left:2px solid var(--line);overflow-wrap:anywhere;
}
.links-list li:hover{border-left-color:var(--accent-bright)}
.links-list a{color:var(--link);text-decoration:none;border-bottom:1px solid var(--line-strong);font-weight:500}
.links-list a{border-bottom-color:color-mix(in srgb,var(--link) 35%,transparent)}
.links-list a:hover{color:var(--link-hover);border-bottom-color:var(--link-hover)}
.other-laws-list{list-style:none;padding:0;margin:0}
.other-laws-list li{padding:.85rem 0 .85rem .95rem;border-bottom:1px solid var(--line)}   /* same indent from the left rule as Useful links */
.other-laws-list li:last-child{border-bottom:0}
.other-law-head{display:flex;align-items:center;gap:.6rem;flex-wrap:wrap}
.other-law-head a{font-weight:700;font-size:1.02rem;color:var(--link);text-decoration:none;border-bottom:1px solid var(--line-strong)}
.other-law-head a{border-bottom-color:color-mix(in srgb,var(--link) 32%,transparent)}
.other-law-head a:hover{color:var(--link-hover);border-bottom-color:var(--link-hover)}
.other-law-short{
  font-size:.7rem;font-weight:700;letter-spacing:.05em;color:var(--accent-deep);
  background:var(--accent-wash);border:1px solid var(--accent-edge);
  padding:.12rem .45rem;border-radius:var(--r-sm);
}
.other-law-here{font-size:.72rem;color:var(--ink-3)}
.other-law-meta{display:flex;gap:1rem;flex-wrap:wrap;font-size:.85rem;color:var(--ink-3);margin-top:.3rem}
.other-law-updated{color:var(--ink-3)}

/* contents filter: an entry that matched only in its text says so */
.toc-link.by-text::after{
  content:'in text';margin-left:.45em;
  font-size:.64rem;font-weight:600;letter-spacing:.04em;text-transform:uppercase;
  color:var(--ink-3);vertical-align:.1em;
}

.footnotes-group{font-family:var(--ui);font-size:.68rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--ink-3,#6b7280);margin:1rem 0 .3rem}
.fn-back-static{color:var(--ink-3,#6b7280)}
