/* Case note design (Article.design = "dark"): the look of Rashid's PDF case notes. Inter for headings and
   labels, Lora for the text, an accent-ruled At a glance box. Loaded only on those article pages, after site.css
   and public.css, whose colours it uses: the navy palette by default, or ivory when the visitor picks light mode.
   The :root rules below only add the note's own fonts and tones.
   Fonts are self-hosted (static/fonts, SIL Open Font Licence) so no visitor data goes to a font service. */

@font-face { font-family: "Inter"; src: url("../fonts/inter-latin-wght-normal.260c81a4759b.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-latin-wght-italic.0a81fe197e0d.woff2") format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Lora"; src: url("../fonts/lora-latin-wght-normal.9577af3ccda5.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Lora"; src: url("../fonts/lora-latin-wght-italic.1640b0b69ef0.woff2") format("woff2"); font-weight: 400 700; font-style: italic; font-display: swap; }

:root {
  --standfirst: var(--slate);
  /* Quotations from the judgment: a warmer tone of the ink. */
  --quote: color-mix(in srgb, var(--bronze) 70%, var(--ink));
  --pin: var(--muted);
  --key: var(--heading);
  --note-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --note-serif: "Lora", Georgia, "Times New Roman", serif;
}
:root[data-public-theme="dark"] { --quote: #f0dcc4; --pin: #8aa0a8; --key: #ffffff; }

.case-note-dark { max-width: 760px; }
.case-note-dark .crumbs a { color: var(--muted); }

/* Heading block: eyebrow, title, standfirst, then the heavy rule */
.note-head { margin: 8px 0 30px; padding-bottom: 26px; border-bottom: 2px solid var(--heading); }
.note-eyebrow {
  margin: 0 0 14px; color: var(--accent);
  font: 600 .78rem/1.5 var(--note-sans); letter-spacing: .12em; text-transform: uppercase;
}
.note-head h1 {
  margin: 0 0 18px; color: var(--heading);
  font: 700 clamp(1.75rem, 4.4vw, 2.15rem)/1.18 var(--note-sans); letter-spacing: -.015em; text-wrap: balance;
}
.note-standfirst { margin: 0; color: var(--standfirst); font: italic 400 1.2rem/1.6 var(--note-serif); text-wrap: pretty; }
.note-byline { margin: 18px 0 0; color: var(--muted); font: 400 .8rem/1.5 var(--note-sans); letter-spacing: .01em; }

/* At a glance */
.note-glance {
  margin: 0 0 34px; padding: 20px 24px 16px 22px;
  background: var(--sage); border-left: 4px solid var(--accent);
}
.note-glance h2 {
  margin: 0 0 10px; color: var(--accent);
  font: 600 .75rem/1.4 var(--note-sans); letter-spacing: .14em; text-transform: uppercase;
}
.note-glance ul { margin: 0; padding-left: 1.15em; font: 400 1rem/1.65 var(--note-serif); color: var(--ink); }
.note-glance li { margin: 0 0 .5em; }

/* The judgment, in small type under At a glance */
.note-glance + .note-case { margin-top: -20px; }
.note-case { margin: 0 0 34px; padding: 0 0 0 26px; font: 400 .8rem/1.55 var(--note-sans); color: var(--ink); }
.note-case dl { display: grid; grid-template-columns: max-content 1fr; gap: 2px 14px; margin: 0 0 6px; }
.note-case dt { color: var(--muted); }
.note-case dd { margin: 0; }
.note-case-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin: 0; }
.note-case a:not(.pdf-link) {
  color: var(--accent); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px;
  text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--accent) 55%, transparent);
}
.note-case a:not(.pdf-link):hover { text-decoration-color: var(--accent); }

.note-case-licence { margin: 8px 0 0; color: var(--muted); font-size: .72rem; }
.note-case .note-case-licence a { color: var(--muted); font-weight: 400; }

/* Download PDF: the judgment's PDF on the National Archives (templates/insights/pdf_link.html) */
.pdf-link {
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px 5px 8px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface);
  color: var(--ink); font: 600 .8rem/1.2 var(--note-sans); text-decoration: none; white-space: nowrap;
}
.pdf-link:hover { border-color: var(--accent); color: var(--accent); }
.pdf-icon { flex: none; overflow: visible; }
.pdf-page { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; }
.pdf-tag { fill: var(--accent); }
.pdf-text { fill: var(--accent-ink); font: 800 5.4px/1 var(--note-sans); letter-spacing: .02em; }

/* The article */
.note-body { color: var(--ink); font: 400 1.0625rem/1.75 var(--note-serif); }
.note-body p { margin: 0 0 1.05em; }
.note-body h2 {
  margin: 1.9em 0 .5em; color: var(--heading);
  font: 600 1.25rem/1.3 var(--note-sans); letter-spacing: -.01em;
}
.note-body h3 { margin: 1.4em 0 .45em; color: var(--heading); font: 700 1rem/1.45 var(--note-serif); }
.note-body ul, .note-body ol { margin: 0 0 1.1em; padding-left: 1.45em; }
.note-body li { margin: 0 0 .5em; }
.note-body li > ul { margin: .5em 0 0; list-style: circle; }
.note-body em { font-style: italic; }
/* Key holdings (the article's **bold**) carry a thin accent underline, so a skim-reader can follow them alone;
   quotations from the judgment are a warmer tone and pinpoints step back. List labels stay plain bold. */
.note-body strong {
  color: var(--key); font-weight: 600; text-decoration: underline; text-decoration-color: var(--accent);
  text-decoration-thickness: 2px; text-underline-offset: 4px; text-decoration-skip-ink: auto;
}
.note-body strong.label { color: var(--heading); font-weight: 700; text-decoration: none; }
.note-body .quote { color: var(--quote); }
.note-body .pin { color: var(--pin); }
.note-body a {
  color: inherit; text-decoration: underline; text-decoration-color: var(--accent);
  text-decoration-thickness: 1px; text-underline-offset: 3px;
}
.note-body a:hover { color: var(--accent); }
/* The disclaimer: a hairline, then small italic Inter */
.note-body hr { margin: 2.2em 0 .9em; border: 0; border-top: 1px solid var(--line); }
.note-body hr + p { color: var(--muted); font: italic 400 .8rem/1.5 var(--note-sans); }

/* More insights, in the same type */
.case-note-dark .more-insights { border-top-color: var(--line); }
.case-note-dark .more-insights h2 { color: var(--heading); font: 600 1.2rem/1.3 var(--note-sans); }
.case-note-dark .insight-card h3 { color: var(--heading); font: 600 1.08rem/1.35 var(--note-sans); letter-spacing: -.01em; }
.case-note-dark .insight-card p { font-family: var(--note-serif); }

/* Contents (built by public.js from the article's sections): a quiet list that jumps to each heading. */
.note-contents { margin: 0 0 34px; border-block: 1px solid var(--line); font: 400 .9rem/1.5 var(--note-sans); }
.note-contents summary {
  display: flex; align-items: center; gap: 10px; min-height: 48px;
  color: var(--heading); font-weight: 600; cursor: pointer; list-style: none;
}
.note-contents summary::-webkit-details-marker { display: none; }
.note-contents summary span { color: var(--muted); font-weight: 400; }
.note-contents summary::after { content: "+"; margin-left: auto; color: var(--accent); font-size: 1.3rem; line-height: 1; transition: transform .2s; }
.note-contents[open] summary::after { transform: rotate(45deg); }
.note-contents ol { margin: 0 0 16px; padding-left: 1.6em; color: var(--muted); }
.note-contents li { margin: 0; padding: 4px 0; }
.note-contents a { color: var(--ink); text-decoration: none; }
.note-contents a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* Reading progress: a thin accent line along the top of the window, drawn by the scroll itself
   (browsers without scroll-driven animations simply don't show it). */
.reading-progress { display: none; }
@supports (animation-timeline: scroll()) {
  .reading-progress {
    display: block; position: fixed; inset: 0 0 auto; z-index: 40; height: 3px; pointer-events: none;
    background: var(--accent); transform: scaleX(0); transform-origin: 0 50%;
    animation: note-progress linear both; animation-timeline: scroll(root block);
  }
}
@keyframes note-progress { to { transform: scaleX(1); } }
@media print { .reading-progress, .note-contents { display: none; } }

/* Justified text, as in a printed note; hyphenation (lang en-GB) keeps the word spacing even. */
.note-standfirst, .note-glance li, .note-body p, .note-body li {
  text-align: justify; hyphens: auto; -webkit-hyphens: auto;
}
.note-body hr + p { text-align: left; hyphens: manual; }

@media (max-width: 600px) {
  .note-standfirst { font-size: 1.1rem; }
  .note-glance { padding: 16px 16px 12px 16px; }
  .note-case { padding-left: 20px; }
  .note-body { font-size: 1rem; }
}
