/* =============================================================================
   snap — StateMedia Platform stylesheet
   -----------------------------------------------------------------------------
   One hand-written file, shared by apps/public-site and apps/admin-portal.
   No framework, no build step, no purge pass: the whole thing is a few tens of
   kilobytes and is cached with an immutable, versioned URL.

   Conventions
     * BEM-ish class names (block__element--modifier)
     * every colour, radius and space is a custom property, defined once
     * light and dark are both first-class, driven by prefers-color-scheme
     * font stacks include Sinhala and Tamil fallbacks BEFORE the generic
       family — Sri Lankan users overwhelmingly read si/ta, and a default
       system stack renders both as tofu on several platforms
   ========================================================================== */

/* ---------------------------------------------------------------------------
   1. Design tokens
   ------------------------------------------------------------------------ */

:root {
  /* Font stacks. Sinhala and Tamil faces are listed first so that they win for
     the characters they cover; Latin characters fall through to the system UI
     face, which keeps English text native-looking on every platform. */
  --font-sans:
    'Noto Sans Sinhala', 'Iskoola Pota', 'Noto Sans Tamil', 'Latha', 'Nirmala UI',
    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
    'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
  --font-serif:
    'Noto Serif Sinhala', 'Noto Serif Tamil', Georgia, 'Times New Roman', serif;
  --font-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;

  /* Type scale — fluid, capped, so a 1440px desktop is not a wall of huge text. */
  --text-xs: 0.78rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  --text-2xl: clamp(1.5rem, 1.25rem + 1.2vw, 2rem);
  --text-3xl: clamp(1.875rem, 1.4rem + 2vw, 2.75rem);

  --leading-tight: 1.25;
  --leading-normal: 1.6;
  /* Sinhala and Tamil have tall ascenders and deep descenders; body copy needs
     more leading than a Latin-only site to avoid clipped glyphs. */
  --leading-relaxed: 1.75;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-8: 3rem;
  --space-10: 4rem;

  --radius-sm: 3px;
  --radius: 6px;
  --radius-lg: 12px;
  --radius-pill: 999px;

  --container: 76rem;
  --measure: 68ch;

  --border-width: 1px;
  --focus-width: 3px;

  /* Brand palette — a restrained state-institution blue with a maroon accent
     drawn from the national flag. */
  /* The national flag: a maroon field bordered in gold, with saffron and green
     panels. Maroon carries the brand; gold is reserved for the rules and the
     emblem so it stays an accent rather than a wash. The flag's own gold
     (#ffb700) fails contrast as text on white, so text uses the darker step and
     the pure hue is kept for decoration only. */
  --brand-900: #45091c;
  --brand-800: #660f2a;
  --brand-700: #8d153a;  /* flag maroon */
  --brand-600: #a52749;
  --brand-500: #bc3d5e;
  --brand-100: #f7dde4;
  --brand-050: #fdf4f7;

  /* Flag hues, used exactly as the flag uses them. */
  --flag-maroon: #8d153a;
  --flag-gold: #ffb700;
  --flag-green: #00534e;
  --flag-saffron: #eb7400;

  /* Gold, darkened for legibility. --flag-gold above is the decorative hue. */
  --accent-700: #7a5600;
  --accent-500: #a37300;
  --accent-100: #fff2cf;

  --success-700: #00403c;
  --success-500: #00534e;  /* flag green */
  --success-100: #dcf4e4;

  --warning-700: #8a4400;
  --warning-500: #eb7400;  /* flag saffron */
  --warning-100: #fbeed2;

  --danger-700: #7f1d1d;
  --danger-500: #c0392b;
  --danger-100: #fbe0dd;

  --grey-900: #16191d;
  --grey-800: #24282e;
  --grey-700: #3a4049;
  --grey-600: #565e6b;
  --grey-500: #767f8c;
  --grey-400: #a3abb6;
  --grey-300: #cdd3da;
  --grey-200: #e3e7ec;
  --grey-100: #f1f3f6;
  --grey-050: #f8f9fb;
  --white: #ffffff;

  /* Semantic tokens — light theme. Only these are used below, so switching to
     dark is a matter of redefining nine variables. */
  --surface: var(--white);
  --surface-raised: var(--white);
  --surface-sunken: var(--grey-050);
  --surface-inverse: var(--brand-900);
  --text: var(--grey-900);
  --text-muted: var(--grey-600);
  --text-inverse: var(--white);
  --border: var(--grey-300);
  --border-strong: var(--grey-400);
  --link: var(--brand-700);
  --link-hover: var(--brand-900);
  --focus: #ffbf47;
  --shadow: 0 1px 2px rgb(11 37 69 / 8%), 0 4px 12px rgb(11 37 69 / 6%);
}

@media (prefers-color-scheme: dark) {
  :root {
    --surface: #12161c;
    --surface-raised: #1a1f27;
    --surface-sunken: #0d1116;
    --surface-inverse: #05080d;
    --text: #e8ecf1;
    --text-muted: #a8b2bf;
    --text-inverse: #ffffff;
    --border: #333b46;
    --border-strong: #4a5462;
    --link: #7fb4ea;
    --link-hover: #a9cef5;
    --brand-100: #17334f;
    --brand-050: #16202c;
    --accent-100: #43191a;
    --success-100: #14301f;
    --warning-100: #3a2a09;
    --danger-100: #3d1a18;
    --shadow: 0 1px 2px rgb(0 0 0 / 40%), 0 4px 14px rgb(0 0 0 / 30%);
  }
}

/* ---------------------------------------------------------------------------
   2. Reset and base
   ------------------------------------------------------------------------ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  min-height: 100vh;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* Sinhala and Tamil need the extra leading; scoping it to the language avoids
   loosening English pages unnecessarily. */
:lang(si),
:lang(ta) {
  line-height: var(--leading-relaxed);
}

img,
picture,
svg,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3,
h4 {
  line-height: var(--leading-tight);
  text-wrap: balance;
}

h1 {
  font-size: var(--text-3xl);
}

h2 {
  font-size: var(--text-2xl);
}

h3 {
  font-size: var(--text-xl);
}

p,
li {
  text-wrap: pretty;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--link-hover);
}

:focus-visible {
  outline: var(--focus-width) solid var(--focus);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

hr {
  border: 0;
  border-top: var(--border-width) solid var(--border);
  margin-block: var(--space-6);
}

/* ---------------------------------------------------------------------------
   3. Layout
   ------------------------------------------------------------------------ */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

.site-main {
  display: block;
  padding-block: var(--space-6) var(--space-10);
  min-height: 60vh;
}

.site-main:focus {
  outline: none;
}

.prose {
  max-width: var(--measure);
}

.prose > * + * {
  margin-block-start: var(--space-4);
}

.stack > * + * {
  margin-block-start: var(--space-4);
}

.grid {
  display: grid;
  gap: var(--space-5);
}

@media (min-width: 40rem) {
  .grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 60rem) {
  .grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .layout-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(16rem, 1fr);
    gap: var(--space-8);
  }
}

/* ---------------------------------------------------------------------------
   4. Skip link
   ------------------------------------------------------------------------ */

.skip-link {
  position: absolute;
  inset-inline-start: var(--space-2);
  inset-block-start: -100%;
  z-index: 100;
  padding: var(--space-3) var(--space-4);
  background: var(--focus);
  color: var(--grey-900);
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 var(--radius) var(--radius);
}

.skip-link:focus {
  inset-block-start: 0;
}

/* ---------------------------------------------------------------------------
   5. Header and navigation
   ------------------------------------------------------------------------ */

.site-header {
  background: var(--surface-inverse);
  color: var(--text-inverse);
  border-block-end: 4px solid var(--accent-500);
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
  padding-block: var(--space-4);
}

.site-brand {
  color: var(--text-inverse);
  font-weight: 700;
  font-size: var(--text-lg);
  text-decoration: none;
  line-height: var(--leading-tight);
}

.site-brand:hover {
  color: var(--text-inverse);
  text-decoration: underline;
}

.site-header__toggle {
  margin-inline-start: auto;
  padding: var(--space-2) var(--space-3);
  background: transparent;
  color: var(--text-inverse);
  border: var(--border-width) solid rgb(255 255 255 / 40%);
  border-radius: var(--radius);
  cursor: pointer;
}

.site-header__aside {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-inline-start: auto;
}

.site-account {
  font-size: var(--text-sm);
  color: rgb(255 255 255 / 85%);
}

.site-nav__list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-4);
  list-style: none;
  padding: 0;
}

.site-nav__link {
  display: inline-block;
  padding-block: var(--space-2);
  color: rgb(255 255 255 / 88%);
  text-decoration: none;
  border-block-end: 3px solid transparent;
}

.site-nav__link:hover,
.site-nav__link:focus-visible {
  color: var(--text-inverse);
  border-block-end-color: rgb(255 255 255 / 60%);
}

.site-nav__link.is-current {
  color: var(--text-inverse);
  font-weight: 600;
  border-block-end-color: var(--accent-500);
}

/* Small screens: the toggle button reveals the nav. Without JavaScript the
   [hidden] attribute is never set, so the menu is simply always visible. */
@media (max-width: 47.99rem) {
  .site-header__toggle {
    display: inline-block;
  }

  .site-nav {
    flex-basis: 100%;
  }

  .site-nav__list {
    flex-direction: column;
    gap: 0;
  }

  .site-nav__link {
    display: block;
    border-block-end: var(--border-width) solid rgb(255 255 255 / 15%);
  }
}

@media (min-width: 48rem) {
  .site-header__toggle {
    display: none;
  }

  .site-nav {
    order: 3;
    flex-basis: 100%;
  }
}

/* ---------------------------------------------------------------------------
   6. Language switcher
   ------------------------------------------------------------------------ */

.language-switcher__list {
  display: flex;
  gap: var(--space-1);
  list-style: none;
  padding: 0;
}

.language-switcher__link,
.language-switcher__current {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  text-decoration: none;
}

.language-switcher__link {
  color: rgb(255 255 255 / 85%);
  border: var(--border-width) solid rgb(255 255 255 / 30%);
}

.language-switcher__link:hover {
  color: var(--text-inverse);
  background: rgb(255 255 255 / 12%);
}

.language-switcher__current {
  background: var(--white);
  color: var(--brand-900);
  font-weight: 600;
}

/* ---------------------------------------------------------------------------
   7. Breadcrumbs
   ------------------------------------------------------------------------ */

.breadcrumbs {
  margin-block-end: var(--space-5);
  font-size: var(--text-sm);
}

.breadcrumbs__list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  list-style: none;
  padding: 0;
}

.breadcrumbs__item + .breadcrumbs__item::before {
  content: '/';
  margin-inline-end: var(--space-2);
  color: var(--text-muted);
}

.breadcrumbs__current {
  color: var(--text-muted);
}

/* ---------------------------------------------------------------------------
   8. Flash messages
   ------------------------------------------------------------------------ */

.flash {
  display: grid;
  gap: var(--space-3);
  margin-block-end: var(--space-5);
}

.flash__item {
  position: relative;
  padding: var(--space-4) var(--space-8) var(--space-4) var(--space-4);
  border: var(--border-width) solid var(--border);
  border-inline-start: 5px solid var(--grey-500);
  border-radius: var(--radius);
  background: var(--surface-sunken);
}

.flash__item--success {
  border-inline-start-color: var(--success-500);
  background: var(--success-100);
}

.flash__item--error {
  border-inline-start-color: var(--danger-500);
  background: var(--danger-100);
}

.flash__item--warning {
  border-inline-start-color: var(--warning-500);
  background: var(--warning-100);
}

.flash__item--info {
  border-inline-start-color: var(--brand-500);
  background: var(--brand-100);
}

.flash__title {
  font-weight: 700;
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.flash__dismiss {
  position: absolute;
  inset-block-start: var(--space-2);
  inset-inline-end: var(--space-2);
  padding: var(--space-1) var(--space-2);
  background: transparent;
  border: 0;
  border-radius: var(--radius-sm);
  font-size: var(--text-lg);
  line-height: 1;
  cursor: pointer;
}

.flash__dismiss:hover {
  background: rgb(0 0 0 / 8%);
}

/* ---------------------------------------------------------------------------
   9. Error summary and form validation
   ------------------------------------------------------------------------ */

.error-summary {
  margin-block-end: var(--space-6);
  padding: var(--space-4) var(--space-5);
  border: 4px solid var(--danger-500);
  border-radius: var(--radius);
  background: var(--surface);
}

.error-summary__title {
  font-size: var(--text-xl);
  color: var(--danger-700);
}

.error-summary__intro {
  margin-block-start: var(--space-2);
  color: var(--text-muted);
}

.error-summary__list {
  margin-block-start: var(--space-3);
  padding-inline-start: var(--space-5);
}

.error-summary__item a {
  color: var(--danger-700);
  font-weight: 600;
}

/* ---------------------------------------------------------------------------
   10. Forms
   ------------------------------------------------------------------------ */

.form {
  max-width: 44rem;
}

.form__group {
  margin-block-end: var(--space-5);
}

.form__label {
  display: block;
  margin-block-end: var(--space-1);
  font-weight: 600;
}

.form__optional,
.form__hint {
  display: block;
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-weight: 400;
}

.form__hint {
  margin-block-end: var(--space-2);
}

.form__control {
  width: 100%;
  padding: var(--space-3);
  background: var(--surface);
  color: var(--text);
  border: 2px solid var(--border-strong);
  border-radius: var(--radius);
}

.form__control:focus-visible {
  border-color: var(--brand-600);
}

.form__control[aria-invalid='true'] {
  border-color: var(--danger-500);
}

.form__error {
  display: block;
  margin-block-start: var(--space-1);
  color: var(--danger-700);
  font-weight: 600;
  font-size: var(--text-sm);
}

.form__counter {
  display: block;
  margin-block-start: var(--space-1);
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.form__counter.is-over {
  color: var(--danger-700);
  font-weight: 600;
}

.form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-block-start: var(--space-6);
}

.form__preview {
  margin-block-start: var(--space-3);
  max-width: 14rem;
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius);
}

/* ---------------------------------------------------------------------------
   11. Buttons
   ------------------------------------------------------------------------ */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  min-height: 2.75rem;
  border: 2px solid transparent;
  border-radius: var(--radius);
  background: var(--brand-700);
  color: var(--white);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  background: var(--brand-800);
  color: var(--white);
}

.button--secondary {
  background: transparent;
  border-color: var(--brand-700);
  color: var(--link);
}

.button--secondary:hover {
  background: var(--brand-050);
  color: var(--link-hover);
}

.button--danger {
  background: var(--danger-500);
}

.button--danger:hover {
  background: var(--danger-700);
}

.button--quiet {
  background: transparent;
  color: var(--link);
  padding-inline: var(--space-2);
}

.button[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ---------------------------------------------------------------------------
   12. Status badges
   ------------------------------------------------------------------------ */

.status-badge {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-pill);
  border: var(--border-width) solid transparent;
  font-size: var(--text-sm);
  font-weight: 600;
  white-space: nowrap;
}

.status-badge--neutral {
  background: var(--grey-100);
  color: var(--grey-800);
  border-color: var(--grey-300);
}

.status-badge--info {
  background: var(--brand-100);
  color: var(--brand-900);
  border-color: var(--brand-500);
}

.status-badge--success {
  background: var(--success-100);
  color: var(--success-700);
  border-color: var(--success-500);
}

.status-badge--warning {
  background: var(--warning-100);
  color: var(--warning-700);
  border-color: var(--warning-500);
}

.status-badge--danger {
  background: var(--danger-100);
  color: var(--danger-700);
  border-color: var(--danger-500);
}

/* ---------------------------------------------------------------------------
   13. Cards, lists and tables
   ------------------------------------------------------------------------ */

.card {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-5);
  background: var(--surface-raised);
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.card__meta {
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.card__title {
  font-size: var(--text-lg);
}

.card__title a {
  text-decoration: none;
}

.card__title a:hover {
  text-decoration: underline;
}

.table-wrapper {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: var(--space-3);
  text-align: start;
  border-block-end: var(--border-width) solid var(--border);
  vertical-align: top;
}

.table th {
  background: var(--surface-sunken);
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.table tbody tr:hover {
  background: var(--surface-sunken);
}

/* ---------------------------------------------------------------------------
   14. Empty state
   ------------------------------------------------------------------------ */

.empty-state {
  padding: var(--space-8) var(--space-5);
  text-align: center;
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-sunken);
}

.empty-state__title {
  font-size: var(--text-lg);
  font-weight: 700;
}

.empty-state__body {
  margin-block-start: var(--space-2);
  color: var(--text-muted);
}

/* ---------------------------------------------------------------------------
   15. Pagination
   ------------------------------------------------------------------------ */

.pagination {
  margin-block-start: var(--space-6);
}

.pagination__summary {
  color: var(--text-muted);
  font-size: var(--text-sm);
  margin-block-end: var(--space-3);
}

.pagination__list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  list-style: none;
  padding: 0;
}

.pagination__link {
  display: inline-block;
  min-width: 2.5rem;
  padding: var(--space-2) var(--space-3);
  text-align: center;
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
}

.pagination__link:hover {
  background: var(--surface-sunken);
}

.pagination__link.is-current {
  background: var(--brand-700);
  border-color: var(--brand-700);
  color: var(--white);
  font-weight: 700;
}

.pagination__link.is-disabled {
  color: var(--text-muted);
  border-style: dashed;
}

/* ---------------------------------------------------------------------------
   16. Article and press-card presentation
   ------------------------------------------------------------------------ */

.article__header {
  margin-block-end: var(--space-6);
}

.article__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-block-start: var(--space-3);
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.article__summary {
  margin-block-start: var(--space-4);
  font-size: var(--text-lg);
  color: var(--text-muted);
}

.article__body {
  max-width: var(--measure);
  font-size: var(--text-lg);
}

.article__body > * + * {
  margin-block-start: var(--space-4);
}

.article__notice {
  padding: var(--space-4);
  border-inline-start: 5px solid var(--warning-500);
  background: var(--warning-100);
  border-radius: var(--radius);
}

.press-card {
  display: grid;
  gap: var(--space-5);
  padding: var(--space-5);
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-raised);
}

@media (min-width: 40rem) {
  .press-card {
    grid-template-columns: 12rem minmax(0, 1fr);
  }
}

.press-card__photo {
  width: 100%;
  border-radius: var(--radius);
  border: var(--border-width) solid var(--border);
}

.press-card__verdict {
  font-size: var(--text-xl);
  font-weight: 700;
}

.press-card__verdict--valid {
  color: var(--success-700);
}

.press-card__verdict--invalid {
  color: var(--danger-700);
}

.press-card__privacy {
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.definition-list {
  display: grid;
  gap: var(--space-1) var(--space-4);
}

@media (min-width: 30rem) {
  .definition-list {
    grid-template-columns: max-content minmax(0, 1fr);
  }
}

.definition-list dt {
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.definition-list dd {
  margin: 0;
  font-weight: 600;
}

/* ---------------------------------------------------------------------------
   17. Footer
   ------------------------------------------------------------------------ */

.site-footer {
  margin-block-start: var(--space-10);
  padding-block: var(--space-6);
  background: var(--surface-inverse);
  color: rgb(255 255 255 / 82%);
  font-size: var(--text-sm);
}

.site-footer a {
  color: rgb(255 255 255 / 92%);
}

.site-footer__list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  list-style: none;
  padding: 0;
  margin-block-end: var(--space-4);
}

.site-footer__reference {
  margin-block-start: var(--space-2);
  color: rgb(255 255 255 / 55%);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
}

/* ---------------------------------------------------------------------------
   18. Utilities
   ------------------------------------------------------------------------ */

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.text-muted {
  color: var(--text-muted);
}

.text-small {
  font-size: var(--text-sm);
}

.cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
}

.tag {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  background: var(--surface-sunken);
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  text-decoration: none;
}

/* Elements only meaningful with JavaScript are hidden until it upgrades them. */
[hidden] {
  display: none !important;
}

/* ---------------------------------------------------------------------------
   19. Print — a press card verification result is printed at counters
   ------------------------------------------------------------------------ */

@media print {
  .site-header,
  .site-footer,
  .language-switcher,
  .pagination,
  .flash,
  .skip-link,
  .form__actions {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
  }

  a::after {
    content: ' (' attr(href) ')';
    font-size: 9pt;
    word-break: break-all;
  }

  .press-card,
  .card {
    border: 1px solid #000;
    box-shadow: none;
  }
}

/* ---------------------------------------------------------------------------
   20. Forced colours (Windows high contrast)
   ------------------------------------------------------------------------ */

@media (forced-colors: active) {
  .status-badge,
  .button,
  .pagination__link {
    border: 1px solid currentColor;
  }
}

/* ---------------------------------------------------------------------------
   Masthead: emblem, flag rule, language selector
   --------------------------------------------------------------------------- */

.site-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: inherit;
}

.site-brand__logo {
  /* Fixed box so the header cannot reflow while the emblem loads. */
  flex: 0 0 auto;
  /* The emblem is portrait (846x1200 at source), so the box follows its aspect
     ratio rather than forcing it square. */
  width: 34px;
  height: 48px;
  object-fit: contain;
}

@media (max-width: 40rem) {
  .site-brand__logo { width: 26px; height: 36px; }
}

/* The flag's gold border and its saffron/green panels, as a hairline under the
   masthead. Decorative only — aria-hidden equivalent, since it carries no
   information a reader needs. */
.site-header {
  border-bottom: 3px solid var(--flag-gold);
}

.site-header::after {
  content: '';
  display: block;
  height: 3px;
  background: linear-gradient(
    to right,
    var(--flag-saffron) 0 50%,
    var(--flag-green) 50% 100%
  );
}

/* ---- Language selector ---------------------------------------------------- */

.language-switcher {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* The label is read by assistive technology and shown on wide screens; the
   select itself is self-evident beside the flag rule. */
.language-switcher__label {
  font-size: var(--text-sm);
  color: var(--grey-600);
  white-space: nowrap;
}

@media (max-width: 52rem) {
  .language-switcher__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

.language-switcher__select {
  font: inherit;
  font-size: var(--text-sm);
  padding: var(--space-1) var(--space-2);
  border: var(--border-width) solid var(--grey-400);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--grey-900);
  /* 44px minimum touch target. */
  min-height: 2.75rem;
}

.language-switcher__select:focus-visible {
  outline: var(--focus-width) solid var(--flag-maroon);
  outline-offset: 2px;
}

.language-switcher__go {
  font: inherit;
  font-size: var(--text-sm);
  min-height: 2.75rem;
  padding: var(--space-1) var(--space-3);
  border: var(--border-width) solid var(--brand-700);
  border-radius: var(--radius-sm);
  background: var(--brand-700);
  color: #fff;
  cursor: pointer;
}

/* Hidden once progressive.js wires change-to-submit. Without JavaScript the
   attribute is never set and the button stays visible, so the selector still
   works. */
.language-switcher[data-enhanced='true'] .language-switcher__go {
  display: none;
}
