:root {
  --ink: #0b1733;
  --muted: #5d6b82;
  --line: #d9e3ee;
  --soft: #f4f8fb;
  --panel: #ffffff;
  --blue: #1746a2;
  --cyan: #19c7c6;
  --teal-dark: #087b7a;
  --green: #37a67a;
  --focus: #103f91;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: #ffffff;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  padding: 14px clamp(18px, 4vw, 54px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 250px;
}

.brand-mark {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
}

.brand strong {
  display: block;
  font-size: 1.04rem;
  letter-spacing: 0;
}

.pilot-badge {
  display: inline-block;
  margin: 5px 0;
  padding: 3px 8px;
  border: 1px solid #b8dedd;
  border-radius: 5px;
  background: #eaf7f6;
  color: #086664;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.4;
}

.pilot-notice {
  padding: 18px clamp(18px, 4vw, 54px);
  background: #eaf7f6;
  border-bottom: 1px solid #b8dedd;
  color: #154c50;
  font-size: 0.9rem;
  line-height: 1.5;
}

.pilot-notice p { margin: 4px 0 0; max-width: 1000px; }
#advisors { scroll-margin-top: 140px; }
.advisors-cta { margin: 28px 0 0; }

.brand small {
  display: block;
  max-width: 310px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.25;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.92rem;
}

.main-nav > a,
.nav-group > a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 11px;
  border-radius: 6px;
}

.main-nav a:hover,
.language-switch button:hover {
  background: var(--soft);
}

.nav-group {
  position: relative;
}

.submenu {
  position: absolute;
  top: 42px;
  left: 0;
  width: 214px;
  display: none;
  padding: 8px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(11, 23, 51, 0.13);
}

.submenu a {
  display: block;
  padding: 10px;
  border-radius: 6px;
  color: var(--muted);
}

.nav-group:hover .submenu,
.nav-group:focus-within .submenu {
  display: block;
}

.language-switch {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  margin-left: 8px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
}

.language-switch button {
  min-width: 42px;
  height: 32px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.language-switch button.active {
  color: #ffffff;
  background: var(--blue);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--ink);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: clamp(32px, 7vw, 84px);
  align-items: center;
  min-height: calc(100vh - 78px);
  padding: clamp(52px, 8vw, 96px) clamp(20px, 6vw, 80px) 56px;
  background:
    linear-gradient(120deg, rgba(244, 248, 251, 0.92), rgba(255, 255, 255, 0.78)),
    repeating-linear-gradient(90deg, rgba(23, 70, 162, 0.06) 0 1px, transparent 1px 72px),
    repeating-linear-gradient(0deg, rgba(25, 199, 198, 0.055) 0 1px, transparent 1px 72px);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--blue);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 20px;
  font-size: clamp(2.3rem, 6vw, 5.5rem);
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(1.8rem, 3.4vw, 3.3rem);
  line-height: 1.05;
}

h3 {
  margin-bottom: 12px;
  font-size: 1.28rem;
}

.hero-copy > p:not(.eyebrow),
.section-heading p,
.expert-copy p,
.contact p {
  max-width: 690px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--blue);
  border-radius: 7px;
  font-weight: 750;
  cursor: pointer;
}

.button.primary {
  color: #ffffff;
  background: var(--blue);
}

.button.secondary {
  color: var(--blue);
  background: #ffffff;
}

.hero-panel {
  position: relative;
  min-height: 420px;
  padding: 28px;
  overflow: hidden;
  border: 1px solid rgba(23, 70, 162, 0.18);
  border-radius: 8px;
  background: #f8fbfd;
  box-shadow: 0 24px 70px rgba(11, 23, 51, 0.12);
}

.signal-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  height: 100%;
}

.signal-grid span {
  min-height: 82px;
  border-radius: 6px;
  background: linear-gradient(150deg, rgba(23, 70, 162, 0.16), rgba(25, 199, 198, 0.22));
}

.signal-grid span:nth-child(3n) {
  background: linear-gradient(150deg, rgba(55, 166, 122, 0.22), rgba(25, 199, 198, 0.1));
}

.status-card {
  position: absolute;
  right: 28px;
  bottom: 28px;
  width: min(330px, calc(100% - 56px));
  padding: 22px;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 50px rgba(11, 23, 51, 0.16);
}

.status-card span {
  color: var(--green);
  font-weight: 800;
}

.status-card strong {
  display: block;
  margin: 6px 0 14px;
  font-size: 1.2rem;
}

.status-card ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.6;
}

.institutional-strip {
  padding: 42px clamp(20px, 6vw, 80px) 48px;
  border-bottom: 1px solid var(--line);
}

.institutional-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.institutional-heading h2 {
  max-width: 720px;
  margin-bottom: 0;
  font-size: 1.75rem;
}

.logo-wall {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.logo-wall figure {
  display: grid;
  grid-template-rows: 84px auto;
  align-items: center;
  margin: 0;
  padding: 18px;
  border-right: 1px solid var(--line);
}

.logo-wall figure:last-child {
  border-right: 0;
}

.logo-wall img {
  width: 100%;
  max-width: 150px;
  max-height: 62px;
  margin: auto;
  object-fit: contain;
}

.logo-wall figcaption {
  color: var(--muted);
  font-size: 0.72rem;
  text-align: center;
}

.band,
.experts {
  padding: 74px clamp(20px, 6vw, 80px);
}

.band.alt {
  background: var(--soft);
}

.band.compact {
  padding-top: 48px;
  padding-bottom: 48px;
}

.section-heading {
  max-width: 920px;
  margin-bottom: 34px;
}

.content-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.7fr);
  gap: 32px;
  align-items: end;
  margin: 56px 0 22px;
  padding-top: 34px;
  border-top: 1px solid var(--line);
}

.content-intro h3,
.academic-band h3 {
  margin-bottom: 0;
  font-size: 1.75rem;
  line-height: 1.15;
}

.content-intro > p,
.academic-band p:not(.eyebrow) {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.65;
}

.alert-list {
  border-top: 1px solid var(--ink);
}

.alert-item {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) minmax(180px, 0.42fr);
  gap: 24px;
  align-items: start;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.alert-meta {
  display: grid;
  gap: 12px;
  justify-items: start;
}

.alert-meta time,
.alert-action {
  color: var(--muted);
  font-size: 0.82rem;
}

.severity,
.grant-status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.severity.critical {
  color: #ffffff;
  background: #b42318;
}

.severity.high {
  color: #7a271a;
  background: #fee4e2;
}

.severity.medium {
  color: #7a4f01;
  background: #fef0c7;
}

.alert-item h3 {
  margin-bottom: 8px;
}

.alert-item p {
  margin-bottom: 12px;
  color: var(--muted);
  line-height: 1.55;
}

.alert-action {
  padding-left: 16px;
  border-left: 3px solid var(--cyan);
  line-height: 1.5;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tags span {
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  font-size: 0.7rem;
  text-transform: uppercase;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

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

.resource-card {
  min-height: 230px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.resource-card[hidden] {
  display: none;
}

.scope-filter-item[hidden] {
  display: none;
}

.scope {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--blue);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.resource-card p {
  color: var(--muted);
  line-height: 1.65;
}

.services-section {
  scroll-margin-top: 96px;
  margin-top: 64px;
  padding-top: 52px;
  border-top: 1px solid var(--line);
}

.services-intro {
  margin-bottom: 28px;
}

.service-plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.service-plan {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.service-plan.featured {
  border: 2px solid var(--blue);
}

.service-badge {
  position: absolute;
  top: 0;
  right: 20px;
  padding: 6px 10px;
  color: #ffffff;
  background: var(--blue);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.service-plan-head > span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.service-plan-head h4 {
  margin: 12px 0 8px;
  font-size: 1.35rem;
}

.service-plan-head p {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 0;
  color: var(--muted);
}

.service-plan-head strong {
  color: var(--ink);
  font-size: 1.8rem;
}

.service-plan ul {
  display: grid;
  gap: 11px;
  margin: 24px 0;
  padding: 0;
  list-style: none;
}

.service-plan li {
  position: relative;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.45;
}

.service-plan li::before {
  content: "";
  position: absolute;
  top: 0.5em;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
}

.service-sla {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.service-sla span { color: var(--muted); font-size: 0.78rem; font-weight: 800; }
.services-note { margin: 14px 0 0; color: var(--muted); font-size: 0.82rem; }
.one-off-heading { display: flex; justify-content: space-between; gap: 24px; align-items: end; margin: 52px 0 20px; }
.one-off-heading h3, .one-off-heading p { margin: 0; }
.one-off-heading p { max-width: 560px; color: var(--muted); }
.one-off-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.one-off-grid article { min-height: 190px; padding: 22px; background: var(--soft); border-right: 1px solid var(--line); }
.one-off-grid article:last-child { border-right: 0; }
.one-off-grid span { color: var(--blue); font-weight: 800; }
.one-off-grid h4 { margin: 18px 0 10px; font-size: 1.05rem; }
.one-off-grid p { margin: 0; color: var(--muted); line-height: 1.5; }

.ai-services { scroll-margin-top: 96px; margin-top: 64px; padding-top: 52px; border-top: 1px solid var(--line); }
.ai-service-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #ffffff; }
.ai-service-grid article { position: relative; min-height: 270px; padding: 28px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ai-service-grid article:nth-child(2n) { border-right: 0; }
.ai-service-grid article:nth-last-child(-n + 2) { border-bottom: 0; }
.ai-service-number { position: absolute; top: 24px; right: 26px; color: #cbd5e1; font-size: 1.5rem; font-weight: 800; }
.ai-service-stage { margin: 0 0 26px; color: var(--teal-dark); font-size: 0.75rem; font-weight: 800; text-transform: uppercase; }
.ai-service-grid h4 { max-width: 80%; margin: 0 0 12px; font-size: 1.25rem; }
.ai-service-grid h4 + p { color: var(--muted); line-height: 1.6; }
.ai-service-grid strong { display: block; margin-top: 22px; color: var(--blue); font-size: 0.88rem; }
.ai-governance { display: grid; grid-template-columns: minmax(260px, .75fr) minmax(0, 1.25fr); gap: 40px; align-items: center; margin-top: 18px; padding: 30px; border-left: 4px solid var(--teal); background: #eaf8f7; }
.ai-governance h3, .ai-governance p { margin-top: 0; }
.ai-governance > p { margin-bottom: 0; color: var(--muted); line-height: 1.65; }
.ai-legal { scroll-margin-top: 96px; margin-top: 56px; padding-top: 48px; border-top: 1px solid var(--line); }
.ai-legal-heading { max-width: 760px; }
.ai-legal-heading > p:last-child { color: var(--muted); font-size: 1.05rem; line-height: 1.65; }
.legal-checks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 28px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.legal-checks article { min-height: 230px; padding: 24px; border-right: 1px solid var(--line); background: #fff; }
.legal-checks article:last-child { border-right: 0; }
.legal-checks span { color: var(--teal-dark); font-weight: 800; }
.legal-checks h4 { margin: 28px 0 10px; }
.legal-checks p { margin: 0; color: var(--muted); line-height: 1.55; }
.legal-timeline { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin-top: 20px; background: var(--line); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.legal-timeline div { display: grid; gap: 8px; padding: 18px; background: var(--soft); }
.legal-timeline strong { color: var(--blue); }
.legal-timeline span { color: var(--muted); font-size: .86rem; line-height: 1.4; }
.legal-sources { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; margin-top: 18px; font-size: .82rem; }
.legal-sources p { flex: 1 1 100%; margin: 0; color: var(--muted); }
.legal-sources a { color: var(--blue); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.about { scroll-margin-top: 78px; }
.about-intro { display: grid; grid-template-columns: minmax(280px, .8fr) minmax(0, 1.2fr); gap: clamp(36px, 7vw, 100px); }
.about-intro h2 { margin-bottom: 0; }
.about-intro > div:last-child { color: var(--muted); font-size: 1.02rem; line-height: 1.7; }
.institutional-support { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 42px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.institutional-support div { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 120px; padding: 24px; background: var(--soft); }
.institutional-support div:first-child { border-right: 1px solid var(--line); }
.institutional-support img { width: 180px; max-height: 66px; object-fit: contain; mix-blend-mode: multiply; }
.institutional-support span { color: var(--muted); font-size: .78rem; font-weight: 700; text-transform: uppercase; }
.director-message { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 42px; align-items: start; margin-top: 48px; padding: 42px; color: #fff; background: var(--ink); border-radius: 8px; }
.director-photo { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center top; border-radius: 6px; }
.director-copy .eyebrow { color: var(--cyan); }
.director-copy h3 { margin: 8px 0 4px; font-size: 1.75rem; }
.director-role { margin: 0 0 24px; color: var(--cyan); font-weight: 700; }
.director-copy > p:not(.eyebrow) { max-width: 820px; color: rgba(255,255,255,.72); line-height: 1.65; }
.director-quote { max-width: 850px; margin-top: 28px; padding: 26px; border-left: 3px solid var(--cyan); background: rgba(255,255,255,.07); }
.director-quote blockquote { margin: 0 0 16px; font-size: clamp(1.1rem, 1.7vw, 1.45rem); font-weight: 650; line-height: 1.45; }
.director-quote span { color: rgba(255,255,255,.65); font-size: .8rem; font-weight: 700; text-transform: uppercase; }
.director-copy a { display: inline-block; margin-top: 10px; color: var(--cyan); font-weight: 800; }
.director-focus-title { margin: 0 0 12px; font-weight: 700; }
#direccio-ia { scroll-margin-top: 110px; }
#direccio-ia .director-photo { height: auto; }
.director-focus { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 28px; margin: 0; padding-left: 20px; line-height: 1.6; }
@media (max-width: 600px) { .director-focus { grid-template-columns: 1fr; } }

.grants-intro {
  margin-top: 64px;
}

.grant-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.grant-item {
  min-height: 260px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.grant-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
}

.grant-status.review {
  color: #7a4f01;
  background: #fef0c7;
}

.grant-status.expected {
  color: #344054;
  background: #e4e7ec;
}

.grant-status.open {
  color: #05603a;
  background: #d1fadf;
}

.grant-item > p:first-of-type {
  color: var(--blue);
  font-weight: 700;
}

.grant-item > strong {
  display: block;
  margin: 20px 0 10px;
  font-size: 1.35rem;
}

.grant-item p:last-child {
  color: var(--muted);
  line-height: 1.55;
}

.academic-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 36px;
  align-items: center;
  margin-top: 42px;
  padding: 34px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.academic-band img {
  width: 100%;
  max-height: 82px;
  object-fit: contain;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filters button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
}

.filters button.active {
  color: #ffffff;
  background: var(--ink);
  border-color: var(--ink);
}

.experts {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(360px, 1.15fr);
  gap: clamp(28px, 5vw, 70px);
  align-items: start;
}

.expert-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 50px rgba(11, 23, 51, 0.08);
}

.expert-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.expert-form .consent {
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 0.65rem;
  font-size: 0.9rem;
  line-height: 1.45;
}

.expert-form .consent input {
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.15rem;
}

.form-status {
  min-height: 1.4rem;
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.9rem;
}

.action-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 28px;
  margin-top: 28px;
  border: 1px solid var(--line);
  background: #fff;
}
.action-form .form-copy, .action-form .full { grid-column: 1 / -1; }
.action-form label { display: grid; gap: 7px; font-weight: 700; }
.action-form input, .action-form textarea { width: 100%; border: 1px solid #b9c8d2; padding: 12px 14px; font: inherit; color: var(--ink); background: #fff; }
.action-form textarea { resize: vertical; }
.action-form .consent { display: flex; align-items: flex-start; font-weight: 400; }
.action-form .consent input { width: auto; margin-top: 4px; }
.honeypot { position: absolute !important; left: -10000px !important; }

.expert-form input,
.expert-form select,
.expert-form textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  font: inherit;
}

.expert-form textarea {
  resize: vertical;
}

.full {
  grid-column: 1 / -1;
}

.contact {
  background: #0b1733;
  color: #ffffff;
}

.contact p,
.contact .eyebrow {
  color: rgba(255, 255, 255, 0.76);
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 28px clamp(20px, 6vw, 80px);
  color: var(--muted);
  border-top: 1px solid var(--line);
}

@media (max-width: 980px) {
  .site-header {
    align-items: flex-start;
  }

  .nav-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    top: 78px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px 20px 20px;
    background: #ffffff;
    border-bottom: 1px solid var(--line);
  }

  .main-nav.open {
    display: flex;
  }

  .nav-group > a,
  .main-nav > a {
    width: 100%;
  }

  .submenu {
    position: static;
    display: block;
    width: 100%;
    box-shadow: none;
    border-radius: 7px;
  }

  .language-switch {
    margin-left: 0;
    width: 120px;
  }

  .hero,
  .experts {
    grid-template-columns: 1fr;
  }

  .resource-grid,
  .resource-grid.three,
  .service-plans,
  .one-off-grid,
  .ai-service-grid,
  .legal-checks,
  .legal-timeline,
  .logo-wall {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .logo-wall figure:nth-child(2n) {
    border-right: 0;
  }

  .logo-wall figure:last-child {
    grid-column: 1 / -1;
  }

  .alert-item {
    grid-template-columns: 120px minmax(0, 1fr);
  }

  .alert-action {
    grid-column: 2;
  }
}

@media (max-width: 640px) {
  .action-form { grid-template-columns: 1fr; padding: 20px; }
  .brand {
    min-width: 0;
  }

  .brand small {
    display: none;
  }

  .hero {
    min-height: auto;
    padding-top: 46px;
  }

  h1 {
    font-size: 2.55rem;
  }

  .hero-panel {
    min-height: 330px;
    padding: 18px;
  }

  .signal-grid {
    gap: 8px;
  }

  .signal-grid span {
    min-height: 62px;
  }

  .status-card {
    right: 18px;
    bottom: 18px;
    width: calc(100% - 36px);
  }

  .resource-grid,
  .resource-grid.three,
  .service-plans,
  .one-off-grid,
  .ai-service-grid,
  .ai-governance,
  .legal-checks,
  .legal-timeline,
  .about-intro,
  .institutional-support,
  .director-message,
  .expert-form,
  .grant-grid,
  .content-intro,
  .academic-band {
    grid-template-columns: 1fr;
  }

  .one-off-heading { display: block; }
  .one-off-heading p { margin-top: 8px; }
  .one-off-grid article { min-height: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .one-off-grid article:last-child { border-bottom: 0; }
  .ai-service-grid article { min-height: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .ai-service-grid article:nth-last-child(2) { border-bottom: 1px solid var(--line); }
  .legal-checks article { min-height: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .legal-checks article:last-child { border-bottom: 0; }
  .institutional-support div:first-child { border-right: 0; border-bottom: 1px solid var(--line); }
  .institutional-support div { align-items: flex-start; flex-direction: column; }
  .director-message { padding: 28px; }
  .director-photo { width: min(100%, 280px); }

  .institutional-heading {
    display: block;
  }

  .logo-wall figure {
    min-width: 0;
  }

  .alert-item {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .alert-meta {
    grid-template-columns: auto auto;
    align-items: center;
    justify-content: start;
  }

  .alert-action {
    grid-column: 1;
  }

  .academic-band img {
    max-width: 220px;
  }

  .experts,
  .band {
    padding-top: 54px;
    padding-bottom: 54px;
  }

  footer {
    flex-direction: column;
  }
}
