@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: 8rem 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__list li:hover::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,
.flag-layout__visual img {
  box-shadow: 0 4px 24px rgba(0,0,0,0.12);
  max-width: 100%;
  max-height: 60vh;
  width: auto;
  height: auto;
  display: block;
}
.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: flex; gap: .75rem; flex-wrap: wrap; }
  .topbar__links a { font-size: .6rem; letter-spacing: .05em; }
  .topbar__hamburger { display: none; }

  .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 { min-height: 72vh; }
  .hero__content { margin-top: 4rem; padding: 0 1.5rem 2rem; }

  .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; }
}

/* ── RECORD SECTIONS (Great Britain detail page and future foundation pages) ── */
.record-section {
  padding: 3rem 3.5rem;
  border-top: 1px solid var(--rule);
}
.record-section__heading {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 1.5rem;
}
.record-body {
  max-width: 640px;
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--ink);
}
.record-body p + p { margin-top: 1rem; }

/* Asset name block */
.asset-name-block {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 1.75rem;
}
.asset-name-block__formal {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.asset-name-block__common {
  font-size: 0.875rem;
  color: var(--mid);
}
.asset-name-block__note {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--mid);
  line-height: 1.6;
  max-width: 520px;
}

/* Usage grid */
.usage-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  max-width: 680px;
}
.usage-grid__item {
  background: var(--off-white);
  padding: 1rem 1.25rem;
}
.usage-grid__item-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 0.4rem;
}
.usage-grid__item-value {
  font-size: 0.875rem;
  color: var(--ink);
  line-height: 1.5;
}

/* Mistake list */
.mistake-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 640px;
}
.mistake-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  background: var(--white);
  border: 1px solid var(--rule);
}
.mistake-item__tag {
  flex-shrink: 0;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mid);
  background: var(--off-white);
  border: 1px solid var(--rule);
  padding: 0.25rem 0.5rem;
  white-space: nowrap;
  margin-top: 0.05rem;
}
.mistake-item__text {
  font-size: 0.875rem;
  color: var(--ink);
  line-height: 1.55;
}

/* Provenance table */
.provenance-table {
  width: 100%;
  max-width: 560px;
  border-collapse: collapse;
}
.provenance-row { border-bottom: 1px solid var(--rule); }
.provenance-row:last-child { border-bottom: none; }
.provenance-row__key {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mid);
  padding: 0.75rem 1.5rem 0.75rem 0;
  vertical-align: top;
  white-space: nowrap;
  width: 160px;
}
.provenance-row__val {
  font-size: 0.875rem;
  color: var(--ink);
  padding: 0.75rem 0;
  line-height: 1.5;
}
.provenance-row__val a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.todo-tag {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: #FFF3CD;
  border: 1px solid #E6C84A;
  color: #7A5C00;
  padding: 0.15rem 0.4rem;
  vertical-align: middle;
  margin-left: 0.4rem;
}

/* Download formats */
.download-formats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-start;
}
.download-format {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 120px;
}
.download-format__label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mid);
}
.download-format__unavailable {
  font-size: 0.75rem;
  color: var(--mid);
  padding: 0.65rem 1rem;
  border: 1px solid var(--rule);
  background: var(--off-white);
  white-space: nowrap;
}

/* Detail panel inner sections (within flag-layout__details) */
.detail-panel-section {
  padding: 2rem 3.5rem;
  border-top: 1px solid var(--rule);
}
.detail-panel-section:first-child { border-top: none; padding-top: 3rem; }

/* Spec table enhancements */
.spec-table th { width: 160px; }

/* Responsive adjustments for record sections */
@media (max-width: 768px) {
  .record-section { padding: 2rem 1.5rem; }
  .detail-panel-section { padding: 1.5rem; }
  .usage-grid { grid-template-columns: 1fr; }
  .provenance-row__key { width: 120px; }
}

/* ── FOUNDATION CARDS (homepage — replaces flag strip) ── */
.foundation-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--off-white);
  border-bottom: 1px solid var(--rule);
}
.foundation-card {
  display: block;
  padding: 2.5rem 2rem;
  border-right: 1px solid var(--rule);
  border-top: 4px solid transparent;
  text-decoration: none;
  transition: background 0.15s;
}
.foundation-card:last-child { border-right: none; }
.foundation-card:hover { background: var(--white); }
.foundation-card--uk      { border-top-color: var(--navy); }
.foundation-card--england { border-top-color: var(--red); }
.foundation-card--scotland { border-top-color: var(--saltire); }
.foundation-card--wales   { border-top-color: var(--welsh); }
.foundation-card__scope {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 0.6rem;
}
.foundation-card__name {
  font-weight: 900;
  font-size: 1.125rem;
  text-transform: uppercase;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin-bottom: 0.35rem;
}
.foundation-card__arrow {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--mid);
  margin-top: 1.25rem;
  display: block;
  transition: color 0.12s;
}
.foundation-card:hover .foundation-card__arrow { color: var(--ink); }

/* ── SUPPORT REFS (Foundations hub — secondary links) ── */
.support-refs {
  padding: 2.5rem 3.5rem 3rem;
  border-top: 1px solid var(--rule);
}
.support-refs__heading {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 1.25rem;
}
.support-ref-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.support-ref-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.6rem 1.25rem;
  border: 1px solid var(--rule);
  background: var(--white);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--mid);
  text-decoration: none;
  transition: background 0.12s, color 0.12s;
  letter-spacing: 0.02em;
}
.support-ref-item:hover { background: var(--off-white); color: var(--ink); }
.support-ref-item::after { content: '→'; font-weight: 400; }

/* ── REFERENCE CARDS (UK page — coat of arms, GREAT etc) ── */
.ref-cards {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 600px;
}
.ref-card {
  padding: 1.25rem;
  border: 1px solid var(--rule);
  background: var(--white);
  border-left-width: 3px;
}
.ref-card--primary   { border-left-color: var(--navy); }
.ref-card--reference { border-left-color: var(--rule); }
.ref-card__label {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 0.4rem;
}
.ref-card__name {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.4rem;
}
.ref-card__desc {
  font-size: 0.8125rem;
  color: var(--mid);
  line-height: 1.55;
}
.ref-card__link {
  display: inline-block;
  margin-top: 0.6rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
  letter-spacing: 0.02em;
}

/* Downloads / references split */
.dl-ref-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  max-width: 700px;
}
.dl-ref-split__heading {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 1.25rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--rule);
}
.ref-link-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.ref-link-list li a {
  font-size: 0.875rem;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.ref-link-list li a:hover { color: var(--mid); }
.ref-link-list li span {
  display: block;
  font-size: 0.75rem;
  color: var(--mid);
  margin-top: 0.1rem;
}

/* Responsive */
@media (max-width: 768px) {
  .foundation-cards { grid-template-columns: repeat(2, 1fr); }
  .support-refs { padding: 2rem 1.5rem; }
  .dl-ref-split { grid-template-columns: 1fr; gap: 2rem; }
}
@media (max-width: 480px) {
  .foundation-cards { grid-template-columns: 1fr; }
}

/* ── INTRO PANEL (country/state foundation pages) ── */
.intro-panel {
  padding: 4rem 3.5rem 3.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.intro-panel--uk       { background: var(--navy); }
.intro-panel--england  { background: var(--red); }
.intro-panel--scotland { background: var(--saltire); }
.intro-panel--wales    { background: var(--welsh); }
.intro-panel__eyebrow {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-bottom: 1rem;
}
.intro-panel__title {
  font-weight: 900;
  font-size: clamp(2.75rem, 5vw, 4.5rem);
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--white);
  line-height: 1;
  margin-bottom: 1.25rem;
}
.intro-panel__body {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.72);
  max-width: 640px;
}
.intro-panel__body + .intro-panel__body { margin-top: 0.75rem; }

/* ── SECTION LABEL (thin divider before primary asset split) ── */
.section-label {
  padding: 1rem 3.5rem;
  background: var(--off-white);
  border-bottom: 1px solid var(--rule);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mid);
}

/* ── FLAG-LAYOUT ASSET VARIANT (off-white section) ── */
.flag-layout--asset {
  background: var(--off-white);
  border-bottom: 1px solid var(--rule);
}
.flag-layout--asset .flag-layout__details {
  background: var(--off-white);
}

/* Compact colour swatches row (in asset panel) */
.asset-colours {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-top: 1.25rem;
}
.asset-colour {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.asset-colour__swatch {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid rgba(0,0,0,0.08);
}
.asset-colour__label {
  font-size: 0.75rem;
  color: var(--mid);
}
.asset-colour__hex {
  font-size: 0.75rem;
  font-family: 'Courier New', monospace;
  color: var(--ink);
  cursor: pointer;
}

@media (max-width: 768px) {
  .intro-panel { padding: 2.5rem 1.5rem 2rem; }
  .section-label { padding: 0.85rem 1.5rem; }
}


.foundation-cards--quick{grid-template-columns:repeat(5,1fr);border:1px solid var(--rule);background:var(--white)}
.foundation-cards--quick .foundation-card{padding:1.5rem 1.25rem;min-height:190px}
.foundation-card--ni{border-top-color:#768692}
.foundation-card__desc{font-size:.78rem;line-height:1.45;color:var(--mid);margin-top:.4rem}
.provides-grid{display:grid;grid-template-columns:1fr 1fr;gap:1rem}
.provides-card{border:1px solid var(--rule);background:var(--white);padding:1.1rem}
.provides-card h3{font-size:.95rem;margin-bottom:.5rem;text-transform:none;letter-spacing:0;font-weight:700}
.provides-card p{font-size:.82rem;line-height:1.5;color:var(--mid)}
.asset-swatch-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem}
.asset-swatch-card{border:1px solid var(--rule);background:#fff;padding:1rem}
.asset-swatch{height:52px;border:1px solid var(--rule);margin-bottom:.75rem}
@media (max-width:900px){.foundation-cards--quick{grid-template-columns:1fr 1fr}.provides-grid{grid-template-columns:1fr 1fr}.asset-swatch-grid{grid-template-columns:1fr}}
@media (max-width:640px){.foundation-cards--quick{grid-template-columns:1fr}}


.home-section{background:var(--off-white);padding:2.5rem 0;border-top:1px solid var(--rule)}
.home-section__inner{max-width:1280px;margin:0 auto;padding:0 3rem}
.home-section__inner--narrow{max-width:1060px}
.home-section__title{font-weight:800;font-size:1.4rem;letter-spacing:-0.01em;text-transform:none;color:var(--ink);margin-bottom:1rem}
.foundation-cards--quick{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:.8rem;border:none;background:transparent}
.foundation-cards--quick .foundation-card{border:1px solid var(--rule);border-top-width:4px;background:var(--white)}
.foundation-cards--quick .foundation-card__name{text-transform:none;font-size:1rem}
.hero__content h1{max-width:680px;text-transform:uppercase;line-height:1.02}
@media (max-width:1100px){.foundation-cards--quick{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (max-width:800px){.home-section__inner{padding:0 1.5rem}.foundation-cards--quick{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:560px){.foundation-cards--quick{grid-template-columns:1fr}}

.home-section__inner--full{max-width:none;padding:0}
.home-section--quick .foundation-cards--quick{gap:0;border-top:1px solid var(--rule);border-bottom:1px solid var(--rule)}
.home-section--quick .foundation-cards--quick .foundation-card{border-left:0;border-top-width:4px;border-right:1px solid var(--rule);min-height:170px}
.home-section--quick .foundation-cards--quick .foundation-card:last-child{border-right:0}
@media (max-width:800px){.home-section--quick .home-section__title{padding:0 1.5rem}.home-section__inner--full{padding:0}.home-section--quick .foundation-cards--quick{gap:.75rem;border:0}.home-section--quick .foundation-cards--quick .foundation-card{border:1px solid var(--rule);border-top-width:4px}}

.compact-checklist{display:grid;grid-template-columns:1fr 1fr;gap:.75rem;margin-top:.5rem}
.compact-checklist li{background:#fff;border:1px solid var(--rule);padding:.65rem .75rem;font-size:.8rem;letter-spacing:0;text-transform:none}
@media (max-width:760px){.compact-checklist{grid-template-columns:1fr}}


.foundation-cards--quick{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:0;background:var(--off-white);border-top:1px solid var(--rule);border-bottom:1px solid var(--rule)}
.foundation-cards--quick .foundation-card{border-right:1px solid var(--rule);border-left:0;border-top:0;border-bottom:4px solid transparent;background:var(--off-white);min-height:168px;padding:1.4rem 1.2rem}
.foundation-cards--quick .foundation-card:last-child{border-right:0}
.foundation-card--uk{border-bottom-color:var(--navy)}
.foundation-card--england{border-bottom-color:var(--red)}
.foundation-card--scotland{border-bottom-color:var(--saltire)}
.foundation-card--wales{border-bottom-color:var(--welsh)}
.foundation-card--ni{border-bottom-color:#768692}
.foundation-cards--quick .foundation-card:hover{background:var(--white)}
.foundation-cards--quick .foundation-card__name{text-transform:uppercase;font-size:1rem;line-height:1.1}
.hero__content h1{max-width:900px;text-transform:uppercase;line-height:1.0}
@media (max-width:1024px){.hero__content h1{max-width:760px}}
@media (max-width:800px){.foundation-cards--quick{grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem;border:0}.foundation-cards--quick .foundation-card{border:1px solid var(--rule);border-bottom-width:4px;background:var(--white)}}
@media (max-width:560px){.foundation-cards--quick{grid-template-columns:1fr}}


/* Surgical correction pass: homepage strip, nav visibility, language table rhythm */
.hero__content h1 { max-width: 920px; text-transform: uppercase; line-height: 1.02; }
.foundation-cards--quick {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  width: 100%;
  max-width: none;
  background: var(--off-white);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.foundation-cards--quick .foundation-card {
  background: var(--off-white);
  border-right: 1px solid var(--rule);
  border-bottom: 4px solid transparent;
  border-top: 0;
  border-left: 0;
  min-height: 168px;
  padding: 1.35rem 1.15rem;
}
.foundation-cards--quick .foundation-card:last-child { border-right: 0; }
.foundation-cards--quick .foundation-card:hover { background: var(--white); }
.foundation-cards--quick .foundation-card__name { text-transform: uppercase; }
.foundation-card--uk { border-bottom-color: var(--navy); }
.foundation-card--england { border-bottom-color: var(--red); }
.foundation-card--scotland { border-bottom-color: var(--saltire); }
.foundation-card--wales { border-bottom-color: var(--welsh); }
.foundation-card--ni { border-bottom-color: #768692; }
.home-section__title { text-transform: uppercase; }
.provides-card h3 { font-size: 2rem; color: var(--mid); }
@media (max-width: 1024px) { .hero__content h1 { max-width: 760px; } }
@media (max-width: 900px) {
  .foundation-cards--quick { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; border: 0; background: transparent; padding: 0 1.5rem; }
  .foundation-cards--quick .foundation-card { border: 1px solid var(--rule); border-bottom-width: 4px; background: var(--white); }
}
@media (max-width: 560px) { .foundation-cards--quick { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .hero__links { display: flex; flex-wrap: wrap; gap: .85rem; }
}
@media (max-width: 760px) {
  .hero { min-height: 78vh; }
  .hero__content { padding-top: 4.5rem; padding-bottom: 2.25rem; }
}


/* Final correction pass: homepage hero/nav, foundation strip spacing, editorial provides row, language table width, typography specimen rows */
.hero { min-height: 64vh; }
.hero__nav { padding: 1.2rem 1.5rem; }
.hero__content { margin-top: 2.2rem; padding: 0 1.5rem 2.2rem; }
.hero__content h1 { max-width: 980px; line-height: 1.03; text-transform: uppercase; }
.hero__hamburger { display:none; background:transparent; border:0; width:30px; height:24px; padding:0; }
.hero__hamburger span { display:block; height:2px; background:rgba(255,255,255,0.95); margin:5px 0; }
.foundation-cards--quick .foundation-card { padding: 1.05rem 1rem; min-height: 150px; }
.foundation-cards--quick .foundation-card__arrow { margin-top: .75rem; }
.home-section--provides .provides-card { border: 0; border-right: 1px solid var(--rule); background: transparent; padding: 0 1.1rem 0 0; }
.home-section--provides .provides-card:nth-child(2), .home-section--provides .provides-card:nth-child(4) { border-right: 0; padding-left: 1.1rem; }
.home-section--provides .provides-grid { gap: 1.5rem 0; }
.home-section--provides .provides-card h3 { font-size: 2rem; color: #4e4a46; }
.about-content > .about-section:first-child .spelling-table-wrap { padding: 0; width: 100%; overflow-x: auto; }
.about-content > .about-section:first-child .spelling-table { min-width: 900px; width: 100%; }
.specimen-row { display: grid; grid-template-columns: 1.15fr 1fr; border:1px solid var(--rule); margin-top: 1rem; }
.specimen-row__sample { padding: 1.6rem; background: #fff; }
.specimen-row__notes { padding: 1.6rem; border-left:1px solid var(--rule); background: #f8f7f4; }
.specimen-kicker { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--mid); margin-bottom: .8rem; }
.specimen-display { font-size: clamp(2.2rem, 5vw, 4rem); line-height: 1.02; font-weight: 700; }
.specimen-body { font-size: 1rem; line-height: 1.65; max-width: 36ch; }
.specimen-label { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; margin-bottom:.5rem; }
.specimen-meta { font-size: .76rem; letter-spacing: .04em; color: var(--mid); }
@media (max-width: 900px){
  .hero { min-height: 54vh; }
  .hero__links { display:none; position:absolute; right:1rem; top:3.3rem; background:rgba(1,33,105,.96); border:1px solid rgba(255,255,255,.25); padding:.6rem .9rem; }
  .hero__links.open { display:block; }
  .hero__links li { margin:.4rem 0; }
  .hero__hamburger { display:block; }
  .hero__nav { display:flex; align-items:center; justify-content:space-between; }
  .foundation-cards--quick { gap:0; padding:0; border-top:1px solid var(--rule); border-bottom:1px solid var(--rule); background:var(--off-white);}
  .foundation-cards--quick .foundation-card { background:var(--off-white); border:0; border-bottom:4px solid transparent; border-top:0; border-left:0; border-right:0; border-bottom-width:4px; }
  .home-section--provides .provides-grid { grid-template-columns: 1fr 1fr; }
  .home-section--provides .provides-card { border-right: 1px solid var(--rule); padding-right: .9rem; }
  .home-section--provides .provides-card:nth-child(even) { border-right: 0; padding-left: .9rem; }
  .specimen-row { grid-template-columns: 1fr; }
  .specimen-row__notes { border-left:0; border-top:1px solid var(--rule); }
}
@media (max-width: 560px){
  .hero { min-height: 48vh; }
  .hero__content { margin-top: 1.3rem; padding-bottom: 1.6rem; }
  .hero__content h1 { max-width: 100%; }
  .foundation-cards--quick { grid-template-columns: 1fr; }
  .foundation-cards--quick .foundation-card { border-top:1px solid var(--rule); }
  .home-section--provides .provides-grid { grid-template-columns: 1fr; }
  .home-section--provides .provides-card, .home-section--provides .provides-card:nth-child(even) { border-right:0; border-top:1px solid var(--rule); padding:.9rem 0 0 0; }
}

body.home .foundation-cards .foundation-card {
  padding: 2.5rem 2rem;
}

/* Corrective pass: homepage "What this site provides" information panels */
body.home .home-section--provides .provides-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

body.home .home-section--provides .provides-card,
body.home .home-section--provides .provides-card:nth-child(even) {
  background: var(--white);
  border: 1px solid var(--rule);
  padding: 2rem;
}

body.home .home-section--provides .provides-card__label {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--mid);
  margin-bottom: 0.7rem;
}

body.home .home-section--provides .provides-card h3 {
  font-size: 1.9rem;
  line-height: 1.1;
  color: var(--navy);
  margin-bottom: 0.9rem;
}

body.home .home-section--provides .provides-card p {
  color: var(--mid);
}

@media (max-width: 1024px) {
  body.home .home-section--provides .provides-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  body.home .home-section--provides .provides-grid {
    grid-template-columns: 1fr;
  }
}

/* Corrective pass: explicit homepage foundation strip bottom border colours */
.foundation-cards--quick .foundation-card--uk {
  border-bottom-color: #012169;
}

.foundation-cards--quick .foundation-card--england {
  border-bottom-color: #C8102E;
}

.foundation-cards--quick .foundation-card--scotland {
  border-bottom-color: #0065BD;
}

.foundation-cards--quick .foundation-card--wales {
  border-bottom-color: #00843D;
}

.foundation-cards--quick .foundation-card--ni {
  border-bottom-color: #4A4A4A;
}

/* Corrective pass: widen Language and Typography content area to full main column */
body.language-page .page-header__subtitle,
body.typography-page .page-header__subtitle {
  max-width: none;
}

body.language-page .about-content,
body.typography-page .about-content {
  max-width: none;
}

body.language-page .about-section,
body.typography-page .about-section {
  max-width: none;
}

body.language-page .spelling-table-wrap,
body.language-page .spelling-table,
body.typography-page .specimen-row {
  width: 100%;
  max-width: none;
}

body.language-page .spelling-table-wrap {
  overflow-x: auto;
}

/* Corrective pass: sentence case for lower Typography page list content */
body.typography-page .about-content .category-block__list li {
  text-transform: none;
}

/* Corrective pass: strengthen Typography type specimen visual blocks */
body.typography-page .specimen-row__sample--display {
  background: #012169;
  color: #fff;
}

body.typography-page .specimen-row__sample--display .specimen-kicker {
  color: rgba(255, 255, 255, 0.78);
}

body.typography-page .specimen-row__sample--body {
  background: var(--off-white);
}

body.typography-page .specimen-row__sample--labels {
  background: #111111;
  color: #ffffff;
}

body.typography-page .specimen-row__sample--labels .specimen-kicker {
  color: rgba(255, 255, 255, 0.74);
}

body.typography-page .specimen-row__sample--labels .specimen-label {
  color: #ffffff;
}

body.typography-page .specimen-row__sample--labels .specimen-meta {
  color: #C8102E;
}

body.typography-page .specimen-notes__role {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 0.35rem;
}

body.typography-page .specimen-notes__family {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.85rem;
  color: var(--ink);
}

/* Corrective pass: homepage hero proportion, spacing, and vertical balance */
body.home .hero {
  min-height: clamp(480px, 68vh, 700px);
}

body.home .hero__content {
  margin-top: auto;
  padding: clamp(5.5rem, 11vh, 7.5rem) 3rem clamp(2rem, 6vh, 3.25rem);
  max-width: 980px;
}

body.home .hero__content h1 {
  max-width: 980px;
  line-height: 1.03;
}

@media (max-width: 1024px) {
  body.home .hero {
    min-height: clamp(430px, 62vh, 620px);
  }

  body.home .hero__content {
    padding: clamp(5rem, 10vh, 6.25rem) 2.25rem clamp(1.8rem, 5.5vh, 2.6rem);
  }

  body.home .hero__content h1 {
    max-width: 820px;
  }
}

@media (max-width: 768px) {
  body.home .hero {
    min-height: clamp(380px, 56vh, 520px);
  }

  body.home .hero__content {
    padding: clamp(4.4rem, 9vh, 5.2rem) 1.5rem 1.6rem;
  }
}

@media (max-width: 560px) {
  body.home .hero {
    min-height: clamp(330px, 50vh, 430px);
  }

  body.home .hero__content {
    margin-top: auto;
    padding: clamp(3.8rem, 8vh, 4.6rem) 1.5rem 1.35rem;
  }

  body.home .hero__content h1 {
    max-width: 100%;
  }
}

/* Corrective pass: flag asset action buttons and NI contextual asset cards */
.flag-card__actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 0.9rem;
}

.flag-card__actions .btn {
  min-width: 140px;
  justify-content: center;
}

.ni-context-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ni-context-preview {
  width: 100%;
  max-width: 320px;
  border: 1px solid #E0DCD5;
  margin-bottom: 1rem;
}

.download-link-icon {
  margin-left: 0.35rem;
}

@media (max-width: 980px) {
  .ni-context-grid {
    grid-template-columns: 1fr;
  }
}


/* Corrective pass: assets colours supporting notes and related links */
.asset-colour-note {
  display: inline;
  font-size: 0.78rem;
  color: var(--mid);
  line-height: 1.5;
}

.asset-colour-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--navy);
}

.asset-colour-link:hover,
.asset-colour-link:focus-visible {
  color: var(--ink);
}
