@import url("https://use.typekit.net/mlx1zgw.css");

:root {
  --red: #C8102E;
  --navy: #012169;
  --white: #FFFFFF;
  --off-white: #F4F2EE;
  --saltire: #005EB8;
  --welsh: #00703C;
  --gold: #C9A84C;
  --ink: #0A0A0A;
  --mid: #6B6560;
  --rule: #E0DCD5;
  --sidebar-width: 256px;
  --topbar-height: 52px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'neue-haas-grotesk-display', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 400;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

/* ── TYPOGRAPHY ── */
.label {
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.eyebrow {
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--red);
  font-variant-numeric: tabular-nums;
}

/* ── HOMEPAGE LAYOUT ── */
body.home {
  background: var(--off-white);
}

/* ── HERO ── */
.hero {
  position: relative;
  min-height: 90vh;
  background: var(--navy);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.hero__nav {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2rem 3rem;
}

.hero__wordmark {
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--white);
}

.hero__links {
  display: flex;
  gap: 2rem;
  list-style: none;
}
.hero__links a {
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white);
  transition: opacity 0.15s;
}
.hero__links a:hover { opacity: 0.6; }

.hero__svg {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 5;
  margin-top: auto;
  padding: 0 3rem 4rem;
  max-width: 800px;
}
.hero__content .eyebrow { margin-bottom: 1.25rem; }
.hero__content h1 {
  font-weight: 900;
  font-size: clamp(2.75rem, 6vw, 5.5rem);
  line-height: 1;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 1.5rem;
}
.hero__body {
  font-size: 0.95rem;
  line-height: 1.65;
  color: rgba(255,255,255,0.5);
  margin-bottom: 2rem;
  max-width: 540px;
}
.hero__buttons { display: flex; gap: 1rem; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.85rem 1.75rem;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  line-height: 1;
}
.btn--primary {
  background: var(--white);
  color: var(--navy);
  border-color: var(--white);
}
.btn--primary:hover { background: var(--off-white); border-color: var(--off-white); }
.btn--ghost {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}
.btn--ghost:hover { background: rgba(255,255,255,0.1); }
.btn--dark {
  background: var(--ink);
  color: var(--white);
  border-color: var(--ink);
}
.btn--dark:hover { background: #222; }
.btn--outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn--outline:hover { background: var(--off-white); }

/* ── FLAG STRIP ── */
.flag-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.flag-strip__item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  gap: 1.25rem;
  min-height: 200px;
  text-decoration: none;
  transition: filter 0.15s;
}
.flag-strip__item:hover { filter: brightness(0.92); }
.flag-strip__item--union { background: var(--navy); }
.flag-strip__item--george { background: #ECEAE4; }
.flag-strip__item--saltire { background: var(--saltire); }
.flag-strip__item--wales {
  background: linear-gradient(to bottom, #FFFFFF 50%, var(--welsh) 50%);
}
.flag-strip__flag {
  width: 120px;
  height: auto;
  box-shadow: 0 4px 24px rgba(0,0,0,0.12);
  flex-shrink: 0;
}
.flag-strip__name {
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white);
}
.flag-strip__item--george .flag-strip__name { color: var(--ink); }

/* ── CATEGORY BLOCKS ── */
.category-blocks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--off-white);
}
.category-block {
  padding: 4rem 3.5rem;
  border-right: 1px solid var(--rule);
}
.category-block:last-child { border-right: none; }
.category-block__title {
  font-weight: 900;
  font-size: 1.75rem;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 0.75rem;
}
.category-block__desc {
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--mid);
  margin-bottom: 2rem;
}
.category-block__list {
  list-style: none;
  margin-bottom: 2.5rem;
}
.category-block__list li {
  border-top: 1px solid var(--rule);
  padding: 0.75rem 0;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: background 0.15s;
}
.category-block__list li::before {
  content: '—';
  color: var(--mid);
  display: inline-block;
  transition: color 0.15s, transform 0.15s;
  flex-shrink: 0;
}
.category-block:hover .category-block__list li::before {
  color: var(--red);
  transform: translateX(4px);
}
.category-block__list li:last-child { border-bottom: 1px solid var(--rule); }
.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy);
  transition: gap 0.15s;
}
.arrow-link:hover { gap: 0.75rem; }
.arrow-link::after { content: '→'; }

/* ── INTERIOR PAGE LAYOUT ── */
body.interior {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--topbar-height);
  background: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
}
.topbar__wordmark {
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--white);
}
.topbar__links {
  display: flex;
  gap: 1.75rem;
  list-style: none;
}
.topbar__links a {
  font-weight: 600;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white);
  opacity: 0.7;
  transition: opacity 0.15s;
}
.topbar__links a:hover,
.topbar__links a.active { opacity: 1; }
.topbar__hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 4px;
  padding: 4px;
}
.topbar__hamburger span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--white);
  transition: transform 0.2s, opacity 0.2s;
}

.page-wrapper {
  display: flex;
  flex: 1;
  padding-top: var(--topbar-height);
}

/* ── SIDEBAR ── */
.sidebar {
  position: fixed;
  top: var(--topbar-height);
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: var(--white);
  border-right: 1px solid var(--rule);
  overflow-y: auto;
  z-index: 50;
  padding: 2rem 0;
}
.sidebar__section { margin-bottom: 2rem; }
.sidebar__heading {
  font-weight: 700;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mid);
  padding: 0 1.5rem;
  margin-bottom: 0.5rem;
}
.sidebar__nav { list-style: none; }
.sidebar__nav a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 1.5rem;
  font-weight: 500;
  font-size: 0.8rem;
  color: var(--ink);
  transition: background 0.12s, color 0.12s;
  border-left: 3px solid transparent;
}
.sidebar__nav a:hover {
  background: var(--off-white);
}
.sidebar__nav a.active {
  border-left-color: var(--navy);
  font-weight: 700;
  background: var(--off-white);
}
.sidebar__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.sidebar__about {
  padding: 0 1.5rem;
  margin-top: 1rem;
}
.sidebar__about a {
  display: block;
  font-weight: 700;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mid);
  padding: 0.55rem 0;
  transition: color 0.12s;
}
.sidebar__about a:hover { color: var(--ink); }
.sidebar__about a.active { color: var(--navy); }

/* ── MAIN CONTENT ── */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-width: 0;
}

/* ── PAGE HEADER ── */
.page-header {
  padding: 3.5rem 3.5rem 2.5rem;
  border-bottom: 1px solid var(--rule);
}
.page-header__eyebrow { margin-bottom: 0.75rem; }
.page-header__title {
  font-weight: 900;
  font-size: clamp(2rem, 4vw, 3.25rem);
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--ink);
  line-height: 1.05;
  margin-bottom: 0.75rem;
}
.page-header__subtitle {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--mid);
  max-width: 560px;
}

/* ── FLAG PAGE ── */
.flag-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: calc(100vh - var(--topbar-height));
}
.flag-layout__visual {
  position: sticky;
  top: var(--topbar-height);
  height: calc(100vh - var(--topbar-height));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
}
.flag-layout__visual svg {
  box-shadow: 0 4px 24px rgba(0,0,0,0.12);
  max-width: 100%;
  max-height: 60vh;
  width: auto;
  height: auto;
}
.flag-layout__details {
  padding: 3.5rem;
  border-left: 1px solid var(--rule);
}
.flag-counter {
  font-weight: 700;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 1rem;
}
.flag-name {
  font-weight: 900;
  font-size: 2.5rem;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--ink);
  line-height: 1.05;
  margin-bottom: 0.4rem;
}
.flag-aka {
  font-size: 0.85rem;
  color: var(--mid);
  margin-bottom: 1.75rem;
}
.flag-desc {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--ink);
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--rule);
}

/* ── SPEC TABLE ── */
.spec-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2rem;
}
.spec-table th, .spec-table td {
  text-align: left;
  padding: 0.6rem 0;
  font-size: 0.8rem;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
.spec-table th {
  font-weight: 700;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mid);
  width: 35%;
}
.spec-table td { color: var(--ink); font-weight: 500; }
.spec-swatch {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.spec-swatch__dot {
  width: 10px; height: 10px;
  border-radius: 2px;
  border: 1px solid rgba(0,0,0,0.1);
  flex-shrink: 0;
}
.mono {
  font-variant-numeric: tabular-nums;
  font-size: 0.8em;
  background: var(--off-white);
  padding: 0.15em 0.4em;
  border-radius: 2px;
  font-weight: 600;
}
.flag-actions { display: flex; gap: 0.75rem; margin-bottom: 2rem; flex-wrap: wrap; }
.flag-source {
  font-size: 0.75rem;
  color: var(--mid);
  line-height: 1.6;
  margin-bottom: 0.5rem;
}
.flag-note {
  font-size: 0.78rem;
  color: var(--mid);
  line-height: 1.6;
  padding: 1rem 1.25rem;
  background: var(--off-white);
  border-left: 3px solid var(--rule);
  margin-bottom: 1.5rem;
}

/* ── COLOURS PAGE ── */
.page-inner { padding: 3.5rem; }
.page-note {
  font-size: 0.82rem;
  line-height: 1.65;
  color: var(--mid);
  padding: 1.25rem 1.5rem;
  background: var(--off-white);
  border-left: 3px solid var(--red);
  margin-bottom: 3rem;
  max-width: 680px;
}
.colour-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.colour-card {
  display: flex;
  flex-direction: column;
}
.colour-card__swatch {
  height: 200px;
  cursor: pointer;
  position: relative;
  transition: filter 0.15s;
  border: 1px solid var(--rule);
}
.colour-card__swatch:hover { filter: brightness(0.95); }
.colour-card__swatch-inner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 0.15s;
}
.colour-card__swatch:hover .colour-card__swatch-inner { opacity: 1; }
.colour-card__name {
  font-weight: 900;
  font-size: 1rem;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 1rem 0 0.6rem;
}
.colour-specs { list-style: none; }
.colour-specs li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.35rem 0;
  border-top: 1px solid var(--rule);
  font-size: 0.75rem;
}
.colour-specs li:last-child { border-bottom: 1px solid var(--rule); }
.colour-specs .spec-label {
  font-weight: 700;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mid);
}
.colour-specs .spec-value { font-weight: 500; font-variant-numeric: tabular-nums; }

/* ── TYPOGRAPHY PAGE ── */
.type-entries { padding: 0; }
.type-entry {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--rule);
}
.type-entry__specimen {
  padding: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 260px;
}
.type-entry__details {
  padding: 3.5rem;
  border-left: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.type-entry__role {
  font-weight: 700;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.5rem;
}
.type-entry__name {
  font-weight: 900;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.type-entry__desc {
  font-size: 0.85rem;
  line-height: 1.65;
  color: var(--mid);
  margin-bottom: 1.5rem;
}
.type-meta { list-style: none; }
.type-meta li {
  display: flex;
  justify-content: space-between;
  padding: 0.4rem 0;
  border-top: 1px solid var(--rule);
  font-size: 0.78rem;
}
.type-meta li:last-child { border-bottom: 1px solid var(--rule); }
.type-meta .meta-label {
  font-weight: 700;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mid);
}

/* ── VOICE PAGE ── */
.voice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin-bottom: 4rem;
}
.voice-col {
  padding: 3rem 3.5rem;
  border-right: 1px solid var(--rule);
}
.voice-col:last-child { border-right: none; }
.voice-col__title {
  font-weight: 900;
  font-size: 1rem;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}
.voice-col--is .voice-col__title { color: var(--navy); }
.voice-col--not .voice-col__title { color: var(--red); }
.voice-list { list-style: none; }
.voice-list li {
  padding: 0.9rem 0;
  border-top: 1px solid var(--rule);
  font-size: 0.85rem;
  line-height: 1.55;
  display: flex;
  gap: 0.75rem;
}
.voice-list li::before {
  content: '—';
  color: var(--mid);
  flex-shrink: 0;
}
.voice-list li:last-child { border-bottom: 1px solid var(--rule); }

.spelling-table-wrap { padding: 0 3.5rem 4rem; }
.spelling-table-title {
  font-weight: 900;
  font-size: 1rem;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}
.spelling-table {
  width: 100%;
  border-collapse: collapse;
  max-width: 680px;
}
.spelling-table th, .spelling-table td {
  text-align: left;
  padding: 0.65rem 1rem;
  font-size: 0.82rem;
  border-bottom: 1px solid var(--rule);
}
.spelling-table th:first-child,
.spelling-table td:first-child { padding-left: 0; }
.spelling-table thead th {
  font-weight: 700;
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--mid);
  padding-bottom: 0.75rem;
}
.spelling-table .british { font-weight: 700; color: var(--navy); }
.spelling-table .not-british { color: var(--mid); text-decoration: line-through; }

/* ── INSTITUTIONS ── */
.institutions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  padding: 3.5rem;
}
.institution-card {
  border: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.institution-card:hover {
  border-color: var(--navy);
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}
.institution-card__bar { height: 4px; width: 100%; }
.institution-card__body { padding: 1.75rem; flex: 1; }
.institution-card__name {
  font-weight: 900;
  font-size: 1rem;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}
.institution-card__type {
  font-weight: 700;
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 1rem;
}
.institution-card__desc {
  font-size: 0.82rem;
  line-height: 1.65;
  color: var(--mid);
  margin-bottom: 1.25rem;
}
.colour-chips { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.colour-chip {
  width: 20px; height: 20px;
  border-radius: 3px;
  border: 1px solid rgba(0,0,0,0.1);
}
.institution-card__link {
  font-weight: 700;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: gap 0.15s;
}
.institution-card__link:hover { gap: 0.65rem; }
.institution-card__link::after { content: '→'; }

/* ── INSTITUTION DETAIL ── */
.institution-header {
  padding: 3.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--rule);
}
.institution-header__bar { height: 6px; width: 100%; margin-bottom: 2rem; }
.institution-header__type {
  font-weight: 700;
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 0.5rem;
}
.institution-header__name {
  font-weight: 900;
  font-size: clamp(1.75rem, 4vw, 3rem);
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--ink);
  line-height: 1.05;
  margin-bottom: 0.5rem;
}
.institution-header__est {
  font-size: 0.8rem;
  color: var(--mid);
}
.institution-body { padding: 3.5rem; }
.institution-desc {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--ink);
  max-width: 640px;
  margin-bottom: 3rem;
}
.institution-section { margin-bottom: 3rem; }
.institution-section__title {
  font-weight: 700;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--rule);
}
.colour-stack { display: flex; flex-direction: column; gap: 0; max-width: 480px; }
.colour-stack-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--rule);
}
.colour-stack-item__swatch {
  width: 40px; height: 40px;
  border-radius: 4px;
  border: 1px solid rgba(0,0,0,0.08);
  flex-shrink: 0;
}
.colour-stack-item__name {
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  margin-bottom: 0.2rem;
}
.colour-stack-item__specs {
  font-size: 0.72rem;
  color: var(--mid);
}
.disclaimer {
  font-size: 0.78rem;
  line-height: 1.65;
  color: var(--mid);
  padding: 1.25rem 1.5rem;
  background: var(--off-white);
  border-left: 3px solid var(--rule);
  max-width: 640px;
}
.official-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy);
  margin-top: 1.5rem;
  transition: gap 0.15s;
}
.official-link:hover { gap: 0.75rem; }
.official-link::after { content: '↗'; }

/* ── ABOUT PAGE ── */
.about-content {
  padding: 3.5rem;
  max-width: calc(680px + 7rem);
}
.about-section {
  max-width: 680px;
  margin-bottom: 3.5rem;
  padding-bottom: 3.5rem;
  border-bottom: 1px solid var(--rule);
}
.about-section:last-child { border-bottom: none; }
.about-section__title {
  font-weight: 900;
  font-size: 1rem;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 1.25rem;
}
.about-section__text {
  font-size: 0.92rem;
  line-height: 1.8;
  color: var(--ink);
}

/* ── FOOTER ── */
.site-footer {
  background: var(--ink);
  padding: 1.5rem 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.site-footer p,
.site-footer a {
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  color: rgba(255,255,255,0.35);
}
.site-footer a:hover { color: rgba(255,255,255,0.6); }

/* ── TOAST ── */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}
.toast {
  background: var(--ink);
  color: var(--white);
  padding: 0.75rem 1.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateY(0); }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .colour-grid { grid-template-columns: repeat(2, 1fr); }
  .institutions-grid { grid-template-columns: repeat(2, 1fr); }
  .flag-layout { grid-template-columns: 1fr; }
  .flag-layout__visual {
    position: static;
    height: 50vw;
    max-height: 400px;
  }
}

@media (max-width: 768px) {
  .topbar__links { display: none; }
  .topbar__hamburger { display: flex; }

  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s;
    z-index: 200;
  }
  .sidebar.open { transform: translateX(0); }

  .main-content { margin-left: 0; }

  .hero__nav { padding: 1.5rem; }
  .hero__links { display: none; }
  .hero__content { padding: 0 1.5rem 3rem; }

  .flag-strip { grid-template-columns: repeat(2, 1fr); }

  .category-blocks { grid-template-columns: 1fr; }
  .category-block { border-right: none; border-bottom: 1px solid var(--rule); }

  .voice-grid { grid-template-columns: 1fr; }
  .voice-col { border-right: none; border-bottom: 1px solid var(--rule); }

  .type-entry { grid-template-columns: 1fr; }
  .type-entry__details { border-left: none; border-top: 1px solid var(--rule); }

  .colour-grid { grid-template-columns: 1fr; }
  .institutions-grid { grid-template-columns: 1fr; padding: 1.5rem; }

  .page-header,
  .flag-layout__details,
  .page-inner,
  .institution-body,
  .institution-header,
  .about-content { padding: 2rem 1.5rem; }

  .spelling-table-wrap { padding: 0 1.5rem 3rem; }
  .voice-col { padding: 2rem 1.5rem; }
  .type-entry__specimen,
  .type-entry__details { padding: 2rem 1.5rem; }

  .site-footer { flex-direction: column; padding: 1.5rem; }
}

@media (max-width: 480px) {
  .flag-strip { grid-template-columns: 1fr; }
}
