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

:root {
  --primary: #73A98B;
  --primary-dark: #5F8F75;
  --header-green: #5F8F75;
  --header-green-dark: #4E7A63;
  --secondary: #F9EFE4;
  --accent: #E89768;
  --accent-dark: #D68052;
  --text: #333333;
  --white: #FFFFFF;
  --border: #E6DDD3;
  --focus: #333333;
  --shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
  --soft-panel: #fffaf4;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.7;
  color: var(--text);
  background-color: var(--secondary);
  font-size: 18px;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--primary-dark);
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--white);
  color: var(--text);
  padding: 0.75rem 1rem;
  border: 2px solid var(--focus);
  z-index: 1000;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

a:focus,
button:focus {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.container {
  width: min(94%, 1280px);
  margin: 0 auto;
}

section {
  padding: 4rem 0;
}

h1,
h2,
h3 {
  line-height: 1.15;
  margin-bottom: 1rem;
  color: var(--text);
}

h1 {
  font-size: clamp(2.2rem, 4vw, 4rem);
}

h2 {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
}

h3 {
  font-size: 1.25rem;
}

p {
  margin-bottom: 1rem;
}

ul,
ol {
  margin-left: 1.25rem;
  margin-bottom: 1rem;
}

.page-intro {
  max-width: 52rem;
  margin-bottom: 1rem;
  font-size: 1.05rem;
}

/* Generic site header for inner pages */
.site-header {
  background-color: var(--header-green);
  color: var(--white);
  padding: 0.95rem 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.site-title {
  text-decoration: none;
  color: var(--white);
  font-size: 1.4rem;
  font-weight: 700;
  white-space: nowrap;
}

.site-title:hover {
  color: var(--white);
}

.site-nav {
  flex: 1;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.2rem;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
}

.site-nav li {
  margin: 0;
}

.site-nav a {
  color: var(--white);
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  text-decoration: underline;
  color: var(--white);
}

/* Homepage header only */
.home-header {
  padding: 0.8rem 0;
}

.home-header .container {
  width: min(96%, 1680px);
}

.home-header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 72px;
}

.home-branding {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex: 0 0 auto;
  justify-content: flex-start;
  margin-left: 0;
}

.home-branding img {
  width: auto;
  flex-shrink: 0;
}

.home-branding img:nth-child(1) {
  max-height: 54px;
}

.home-branding img:nth-child(2) {
  max-height: 78px;
}

.home-branding img:nth-child(3) {
  max-height: 82px;
}

.home-logo {
  width: auto;
}

.home-site-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  text-decoration: none;
  color: var(--white);
  font-size: 1.32rem;
  font-weight: 700;
  white-space: nowrap;
  text-align: center;
  line-height: 1.2;
}

.home-site-title:hover {
  color: var(--white);
}

.home-nav {
  flex: 0 0 auto;
  margin-left: auto;
  width: auto;
  justify-self: end;
}

.home-nav ul {
  justify-content: flex-end;
  gap: 0.8rem;
  flex-wrap: nowrap;
}

.home-nav a {
  font-size: 0.97rem;
}

/* Hero */
.hero {
  background-color: var(--secondary);
  padding: 3rem 0 2.4rem 0;
}

.hero-layout {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 2rem;
  align-items: center;
}

.hero-text {
  max-width: 58rem;
}

.hero-text h1 {
  margin-bottom: 1rem;
}

.hero-support-text {
  font-size: 1.12rem;
  font-weight: 700;
  max-width: 48rem;
  margin-bottom: 0.7rem;
}

.hero-detail-text {
  font-size: 1.05rem;
  max-width: 46rem;
  margin-bottom: 0;
}

.hero-image {
  max-width: 600px;
  justify-self: end;
}

.hero-image img {
  width: 100%;
  border-radius: 18px;
  box-shadow: var(--shadow);
}

/* Inner page hero */
.page-hero {
  background: var(--soft-panel);
  border-bottom: 1px solid var(--border);
  padding: 3.25rem 0 2.75rem 0;
}

.page-hero h1 {
  margin-bottom: 0.8rem;
}

.page-hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.75rem;
  align-items: center;
}

.page-hero-visual {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1rem;
  box-shadow: var(--shadow);
}

.page-hero-visual img {
  border-radius: 12px;
  width: 100%;
}

.page-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}

/* Panels */
.urgent-panel,
.info-panel {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 1.5rem;
}

.urgent-panel {
  border-left: 8px solid var(--accent);
}

.info-band {
  background: var(--white);
}

.support-entry-section {
  padding-top: 2.4rem;
  padding-bottom: 2.6rem;
}

.support-entry-panel p {
  max-width: 52rem;
}

.support-entry-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem 1.5rem;
  margin-top: 1rem;
}

.secondary-link {
  font-weight: 700;
  text-decoration: underline;
  color: var(--primary-dark);
}

.secondary-link:hover {
  color: var(--accent);
}

/* Quick access */
.quick-access-section {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

/* Cards */
.card-grid {
  display: grid;
  gap: 1.5rem;
}

.card {
  background-color: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.card.highlight {
  border-top: 6px solid var(--primary);
}

.card h2,
.card h3 {
  margin-bottom: 0.8rem;
}

.card p:last-child,
.card ul:last-child,
.card ol:last-child {
  margin-bottom: 0;
}

.card-meta {
  display: grid;
  gap: 0.4rem;
  margin-top: 1rem;
  font-size: 0.98rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.tag {
  background: var(--secondary);
  color: var(--text);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  font-size: 0.92rem;
}

/* Diagram section */
.feature-section {
  background-color: var(--white);
  padding-top: 2.7rem;
  padding-bottom: 2.8rem;
}

.feature-section .container {
  display: block;
}

.diagram-caption {
  max-width: 42rem;
  margin-bottom: 0.9rem;
  font-size: 1rem;
}

.diagram-figure {
  max-width: 680px;
  margin: 0.75rem 0 0;
}

.diagram-image {
  width: 100%;
  border-radius: 16px;
  box-shadow: var(--shadow);
}

/* Buttons */
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.1rem;
}

.button {
  display: inline-block;
  background-color: var(--accent);
  color: var(--white);
  text-decoration: none;
  padding: 0.9rem 1.3rem;
  border-radius: 8px;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.button:hover {
  background-color: var(--accent-dark);
  color: var(--white);
}

.button-secondary {
  background-color: var(--primary);
}

.button-secondary:hover {
  background-color: var(--primary-dark);
}

.button-text {
  font-weight: 700;
  text-decoration: underline;
}

/* Contact strip */
.contact-strip {
  background-color: var(--primary);
  color: var(--white);
  padding: 2.8rem 0;
}

.contact-strip h2,
.contact-strip p {
  color: var(--white);
}

.contact-strip a {
  color: var(--white);
}

/* Footer */
.site-footer {
  background-color: var(--text);
  color: var(--white);
  padding: 1.2rem 0 1.3rem 0;
}

.site-footer .container {
  text-align: center;
}

.site-footer p {
  margin-bottom: 0.45rem;
}

.site-footer p:last-child {
  margin-bottom: 0;
}

.site-footer a {
  color: var(--white);
}

.site-footer a:hover {
  color: var(--secondary);
}

.small-text {
  font-size: 0.95rem;
}

@media (min-width: 900px) {
  .hero-text h1 {
    white-space: nowrap;
  }

  .card-grid.two-col {
    grid-template-columns: repeat(2, 1fr);
  }

  .card-grid.three-col {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Homepage header switches to two rows earlier to stop overlap */
@media (max-width: 1450px) {
  .home-header-inner {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "logos title"
      "nav nav";
    row-gap: 0.75rem;
    min-height: auto;
  }

  .home-branding {
    grid-area: logos;
  }

  .home-site-title {
    grid-area: title;
    position: static;
    transform: none;
    justify-self: center;
    align-self: center;
  }

  .home-nav {
    grid-area: nav;
    justify-self: stretch;
    width: 100%;
    margin-left: 0;
  }

  .home-nav ul {
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.9rem 1.1rem;
  }
}

@media (max-width: 1260px) {
  .hero-layout {
    grid-template-columns: 1fr;
  }

  .hero-image {
    justify-self: center;
    max-width: 680px;
  }

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

@media (max-width: 760px) {
  .header-inner {
    flex-direction: column;
    align-items: center;
  }

  .site-nav {
    width: 100%;
  }

  .site-nav ul {
    justify-content: center;
  }

  .home-header-inner {
    grid-template-columns: 1fr;
    grid-template-areas:
      "logos"
      "title"
      "nav";
  }

  .home-branding {
    justify-self: center;
  }

  .home-site-title {
    white-space: normal;
    text-align: center;
  }

  .home-branding img:nth-child(1) {
    max-height: 30px;
  }

  .home-branding img:nth-child(2) {
    max-height: 44px;
  }

  .home-branding img:nth-child(3) {
    max-height: 46px;
  }

  .hero-text h1 {
    white-space: normal;
  }
}

@media (max-width: 520px) {
  body {
    font-size: 16px;
  }

  .site-title,
  .home-site-title {
    font-size: 1.05rem;
  }

  .site-nav ul {
    gap: 0.8rem 1rem;
  }

  .site-nav a,
  .home-nav a {
    font-size: 0.9rem;
  }

  .button-row,
  .page-hero-actions,
  .support-entry-links {
    flex-direction: column;
  }

  .diagram-figure {
    max-width: 100%;
  }
}