:root {
  --blue-900: #003776;
  --blue-800: #004494;
  --blue-700: #0e5eb8;
  --yellow: #ffd617;
  --ink: #1b1f28;
  --muted: #536070;
  --line: #d9e0e8;
  --soft: #f6f8fb;
  --white: #ffffff;
  --max: 1200px;
  --ref-max: 1568px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--white);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}

a {
  color: var(--blue-800);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

button,
input {
  font: inherit;
}

.container {
  width: calc(100% - 32px);
  max-width: var(--max);
  margin: 0 auto;
}

.sr-only,
.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.skip-link:focus {
  z-index: 30;
  width: auto;
  height: auto;
  clip: auto;
  padding: 10px 14px;
  background: var(--yellow);
  color: var(--ink);
}

.eu-bar {
  background: #f7f9fc;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}

.demo-ribbon {
  padding: 9px 16px;
  background: #ffd617;
  border-bottom: 1px solid #d4b000;
  color: #1f2933;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 700;
}

.eu-bar__inner,
.masthead,
.main-nav__inner,
.ticker__inner,
.section-heading,
.footer-grid {
  display: flex;
  align-items: center;
}

.eu-bar__inner {
  min-height: 48px;
  gap: 14px;
  font-size: 0.92rem;
}

.eu-mark {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 24px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: var(--blue-800);
  color: var(--yellow);
  font-weight: 700;
  font-size: 0.8rem;
}

.link-button {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: var(--blue-800);
  text-decoration: underline;
  cursor: pointer;
}

.language-panel {
  border-bottom: 1px solid var(--line);
  background: var(--soft);
}

.language-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 22px;
  padding-top: 18px;
  padding-bottom: 18px;
}

.masthead {
  justify-content: space-between;
  gap: 28px;
  min-height: 132px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--ink);
  text-decoration: none;
}

.brand__symbol {
  display: grid;
  place-items: center;
  width: 104px;
  height: 104px;
  background: var(--blue-800);
  color: var(--yellow);
  font-size: 3rem;
  font-weight: 700;
  flex: 0 0 104px;
}

.brand__symbol--image {
  background: transparent;
  color: inherit;
  width: 132px;
  flex-basis: 132px;
}

.brand__symbol img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand strong {
  display: block;
  max-width: 620px;
  font-size: clamp(1.55rem, 2.2vw, 2.15rem);
  line-height: 1.12;
}

.brand span:last-child {
  min-width: 0;
}

.brand small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.search {
  display: flex;
  width: min(430px, 100%);
  border: 2px solid #cfd8e3;
}

.search input {
  min-width: 0;
  flex: 1;
  border: 0;
  padding: 12px 14px;
}

.search button,
.button {
  border: 0;
  background: var(--blue-800);
  color: var(--white);
  cursor: pointer;
}

.search button {
  padding: 12px 18px;
}

.language-strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.language-strip__inner {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 52px;
  color: var(--muted);
}

.language-strip button {
  border: 0;
  background: transparent;
  color: var(--blue-800);
  text-decoration: underline;
  font-weight: 700;
  cursor: pointer;
}

.main-nav {
  display: none;
}

.ticker {
  background: #eef5ff;
  border-bottom: 1px solid var(--line);
}

.ticker__inner {
  gap: 18px;
  min-height: 66px;
}

.ticker strong {
  color: var(--blue-900);
  white-space: nowrap;
}

.ticker p {
  flex: 1;
  margin: 0;
}

.ticker__controls {
  display: flex;
  gap: 6px;
}

.ticker button {
  min-width: 38px;
  min-height: 34px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--blue-900);
  cursor: pointer;
}

.hero {
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.hero__content {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(400px, 0.8fr);
  align-items: start;
  gap: 52px;
  padding: 58px 0 54px;
}

.hero__copy {
  max-width: 690px;
  padding: 0;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--blue-800);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.88rem;
}

.hero h1 {
  margin: 0 0 24px;
  font-size: clamp(3.8rem, 7vw, 6.25rem);
  line-height: 0.96;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.hero p {
  max-width: 68ch;
  margin: 0 0 18px;
  font-size: 1.14rem;
  overflow-wrap: anywhere;
}

.notice {
  border-left: 6px solid var(--yellow);
  padding: 15px 18px;
  background: #fff8d7;
}

.hero__figure {
  margin: 0;
  border-bottom: 5px solid var(--yellow);
}

.hero__figure img {
  display: block;
  width: 100%;
  aspect-ratio: 1.12 / 1;
  object-fit: cover;
}

.hero__figure figcaption {
  padding: 8px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: right;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 22px;
  text-decoration: none;
  font-weight: 700;
}

.overview {
  padding: 44px 0 54px;
}

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

.overview article {
  min-height: 252px;
  padding: 0 0 24px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--white);
}

.overview article::before {
  content: "";
  display: block;
  width: 100%;
  height: 122px;
  margin-bottom: 22px;
  background:
    radial-gradient(circle at 28% 42%, rgba(255, 255, 255, 0.96) 0 12%, transparent 13%),
    linear-gradient(135deg, #eaf4ff 0%, #ffffff 50%, #ffd617 51%, #ffd617 100%);
}

.overview article:nth-child(2)::before {
  background: linear-gradient(135deg, #fff2a8 0%, #ffd617 42%, #f9fbff 43%);
}

.overview article:nth-child(3)::before {
  background: linear-gradient(135deg, #dceeff, #ffffff 52%, #0e5eb8 53%);
}

.overview article:nth-child(4)::before {
  background: repeating-linear-gradient(135deg, #ffffff 0 12px, #eef3fa 12px 24px);
}

.overview article:nth-child(5)::before {
  background: linear-gradient(135deg, #eef7ff, #86bde6 48%, #1e3651);
}

.overview article > * {
  margin-left: 22px;
  margin-right: 22px;
}

.overview h2,
.media h2 {
  margin: 0 0 12px;
  color: var(--blue-900);
  line-height: 1.2;
}

.overview p,
.media p {
  color: var(--muted);
}

.overview a,
.media h3 a {
  font-weight: 700;
}

.media {
  padding: 56px 0 72px;
  background: var(--soft);
}

.section-heading {
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}

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

.media-item {
  background: var(--white);
  border: 1px solid var(--line);
  min-height: 360px;
}

.media-thumb {
  height: 172px;
  border-bottom: 1px solid var(--line);
}

.media-thumb--blue {
  background: radial-gradient(circle at 30% 22%, #ffffff 0 8%, transparent 9%), linear-gradient(135deg, #dceeff, #0d63b7);
}

.media-thumb--yellow {
  background: linear-gradient(135deg, #fff8b8, #ffd617 45%, #f3f7ff);
}

.media-thumb--white {
  background: repeating-linear-gradient(135deg, #ffffff 0 12px, #e8edf4 12px 24px);
}

.media-thumb--glass {
  background: linear-gradient(135deg, #eef7ff, #86bde6 45%, #1e3651);
}

.media-item time,
.media-item h3,
.media-item p {
  display: block;
  margin-left: 18px;
  margin-right: 18px;
}

.media-item time {
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.9rem;
}

.media-item h3 {
  margin-top: 8px;
  line-height: 1.28;
  font-size: 1.03rem;
}

.media-item p {
  margin-bottom: 20px;
}

.static-pages {
  padding: 48px 0;
  background: var(--white);
}

.static-pages__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.static-pages article {
  border-top: 4px solid var(--yellow);
  padding-top: 18px;
}

.static-pages h2 {
  margin: 0 0 10px;
  color: var(--blue-900);
}

.static-pages p {
  color: var(--muted);
}

.site-footer {
  padding: 44px 0;
  background: var(--blue-900);
  color: var(--white);
}

.footer-grid {
  align-items: flex-start;
  gap: 34px;
}

.footer-grid > div:first-child {
  flex: 1.5;
}

.footer-grid > div {
  flex: 1;
}

.site-footer h2,
.site-footer h3,
.site-footer p {
  margin-top: 0;
}

.site-footer a {
  display: block;
  margin: 8px 0;
  color: var(--white);
}

@media (max-width: 900px) {
  .masthead,
  .footer-grid {
    align-items: stretch;
    flex-direction: column;
  }

  .hero__content {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .hero__figure {
    max-width: 640px;
  }

  .search {
    min-width: 0;
  }

  .overview__grid,
  .media-list,
  .static-pages__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

@media (max-width: 620px) {
  .container {
    width: calc(100% - 24px);
  }

  .language-grid,
  .overview__grid,
  .media-list,
  .static-pages__grid {
    grid-template-columns: 1fr;
  }

  .ticker__inner {
    align-items: flex-start;
    flex-direction: column;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .ticker p {
    width: 100%;
    overflow-wrap: anywhere;
  }

  .language-strip__inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .hero__content {
    padding: 36px 0;
  }

  .brand__symbol {
    width: 86px;
    height: 86px;
    flex: 0 0 86px;
    font-size: 2.4rem;
  }

  .brand__symbol--image {
    width: 108px;
    flex-basis: 108px;
  }

  .hero h1 {
    font-size: 3.35rem;
    line-height: 1.12;
  }

  .hero p {
    font-size: 1rem;
  }

  .notice {
    padding: 10px 12px;
  }

  .overview article {
    min-height: 0;
  }
}

/* Reference-style school project homepage */
.masthead {
  max-width: var(--ref-max);
  min-height: 202px;
  align-items: center;
}

.brand__symbol {
  width: 160px;
  height: 70px;
  flex-basis: 160px;
  border: 1px solid var(--blue-800);
  border-radius: 2px;
  background: #fff;
  color: var(--blue-800);
  font-size: 2.8rem;
}

.brand__symbol--image {
  width: 250px;
  height: 100px;
  flex-basis: 250px;
  background: #fff;
}

.brand strong {
  max-width: 360px;
  color: var(--blue-800);
  font-size: clamp(1.5rem, 2vw, 2rem);
  line-height: 0.95;
}

.brand small {
  color: var(--blue-800);
  font-size: 0.84rem;
}

.search {
  width: min(555px, 100%);
  border: 1px solid var(--blue-800);
}

.search input {
  padding: 16px 14px;
}

.search button {
  width: 58px;
  padding: 0;
  font-size: 0;
}

.search button::before {
  content: "⌕";
  font-size: 2rem;
}

.reference-nav {
  background: #003da5;
  color: #fff;
}

.reference-nav__inner {
  display: flex;
  max-width: var(--ref-max);
  min-height: 68px;
  overflow-x: auto;
}

.reference-nav a {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  padding: 0 14px;
  border-right: 1px solid rgba(255, 255, 255, 0.34);
  color: #fff;
  font-size: 1.12rem;
  text-decoration: none;
}

.reference-nav a.is-active {
  background: #fff;
  color: #003da5;
}

.ticker {
  padding: 30px 0;
  background: #f6f8fc;
  border-bottom: 0;
}

.ticker__inner {
  max-width: var(--ref-max);
  min-height: 74px;
  gap: 16px;
  border: 1px solid #c6d4ef;
  background: #f8fbff;
  padding: 0 14px;
}

.ticker strong {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  background: #003da5;
  color: #fff;
  font-family: Georgia, serif;
  font-size: 1.4rem;
}

.ticker p {
  color: #003da5;
  font-size: 1.03rem;
}

.hero {
  position: relative;
  min-height: 512px;
  overflow: hidden;
  isolation: isolate;
  background: #173f81;
  border-bottom: 0;
}

.hero__background {
  position: absolute;
  inset: 0;
  z-index: -3;
  background: url("assets/school-project-banner.webp") center / cover no-repeat;
}

.hero__wedge {
  display: none;
}

.hero::before {
  content: none;
}

.hero__content {
  display: flex;
  align-items: center;
  max-width: var(--ref-max);
  min-height: 512px;
  padding: 0;
}

.hero__copy {
  width: min(880px, 100%);
  max-width: none;
  margin-top: 154px;
  padding: 32px 30px;
  background: rgba(24, 38, 61, 0.86);
  color: #fff;
}

.eyebrow,
.notice {
  display: none;
}

.hero h1 {
  margin: 0 0 18px;
  color: #fff;
  font-size: 2.65rem;
  line-height: 1.16;
}

.hero p {
  max-width: none;
  margin: 0;
  color: #fff;
  font-size: 1.72rem;
  line-height: 1.22;
}

.intro-section {
  padding: 34px 0 46px;
  background: #fff;
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 540px;
  gap: 54px;
  max-width: var(--ref-max);
}

.intro-grid p {
  margin: 0 0 16px;
  font-size: 0.92rem;
}

.school-note {
  font-style: italic;
}

.intro-grid img {
  display: block;
  width: 100%;
  aspect-ratio: 1.72 / 1;
  object-fit: cover;
  border-radius: 6px;
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #003da5;
  font-weight: 700;
  text-decoration: none;
}

.read-more::after {
  content: "→";
}

.overview {
  padding: 36px 0 46px;
}

.overview__grid {
  grid-template-columns: 1.08fr 1.08fr 1fr;
  gap: 22px;
  max-width: var(--ref-max);
  border-top: 1px solid #c6d4ef;
  border-left: 0;
  padding-top: 42px;
}

.overview article {
  min-height: 0;
  border: 1px solid #d9e1ea;
  border-radius: 6px;
  background: var(--white);
  box-shadow: 0 3px 9px rgba(31, 53, 84, 0.08);
  overflow: hidden;
}

.overview article::before {
  height: 188px;
  margin-bottom: 18px;
}

.overview article:nth-child(2)::before {
  background: #ffd617;
}

.overview article:nth-child(n + 3) {
  min-height: 84px;
  padding: 16px 18px;
  background: #f5f7fc;
}

.overview article:nth-child(n + 3)::before {
  display: block;
  width: 28px;
  height: 3px;
  margin: 0 0 12px;
  background: var(--yellow);
}

.overview article:nth-child(n + 3) > * {
  margin-left: 0;
  margin-right: 0;
}

.media {
  padding: 34px 0 72px;
  background: #fff;
}

.section-heading {
  max-width: var(--ref-max);
  padding-top: 38px;
  border-top: 1px solid #c6d4ef;
}

.media-list {
  max-width: var(--ref-max);
  margin: 0 auto;
}

@media (max-width: 900px) {
  .intro-grid {
    grid-template-columns: 1fr;
  }

  .overview__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .brand__symbol {
    width: 104px;
    height: 58px;
    flex-basis: 104px;
    font-size: 2rem;
  }

  .brand__symbol--image {
    width: 124px;
    flex-basis: 124px;
  }

  .reference-nav__inner {
    width: 100%;
    padding-left: 12px;
    padding-right: 12px;
  }

  .hero,
  .hero__content {
    min-height: 430px;
  }

  .hero__copy {
    width: calc(100% - 24px);
    margin-top: 120px;
    padding: 20px;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .hero p {
    font-size: 1.08rem;
  }

  .overview__grid {
    grid-template-columns: 1fr;
  }
}
