:root {
  --layout-width: 1240px;
  --layout-gutter: clamp(18px, 3vw, 32px);
  --surface-deep: #0d171a;
  --surface-raised: #142126;
  --surface-soft: #1b2b30;
  --text-strong: #f7f0df;
  --text-soft: #c7d0cb;
  --accent-strong: #f0c96a;
  --outline-soft: rgba(213, 161, 60, .3);
}

body {
  color: var(--text-strong);
  background: #080d0f;
}

.site-header,
.gateway-topbar,
.local-topbar {
  min-height: 84px;
  padding-block: 12px;
  padding-inline: max(var(--layout-gutter), calc((100% - var(--layout-width)) / 2));
}

.site-header .brand-logo img,
.gateway-brand img,
.local-brand img {
  width: 60px;
  height: 60px;
  object-fit: contain;
}

.site-header .site-nav,
.gateway-nav,
.local-nav {
  gap: 8px;
}

.site-header .site-nav > a,
.site-header .edition-picker > summary,
.gateway-nav a,
.local-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 9px 14px;
  border: 1px solid var(--outline-soft);
  border-radius: 7px;
  background: rgba(247, 240, 223, .045);
  color: var(--text-strong);
  font-size: .95rem;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
  white-space: nowrap;
}

.site-header .site-nav > a:hover,
.site-header .site-nav > a:focus-visible,
.site-header .edition-picker > summary:hover,
.gateway-nav a:hover,
.local-nav a:hover {
  border-color: var(--accent-strong);
  background: rgba(213, 161, 60, .12);
  color: var(--accent-strong);
}

.site-header .edition-picker {
  flex: none;
}

.gateway-hero,
.local-hero {
  width: min(100%, 1440px);
  min-height: clamp(520px, 64vh, 700px);
  margin-inline: auto;
  padding: clamp(42px, 5vw, 70px) var(--layout-gutter);
  gap: clamp(28px, 4vw, 60px);
}

.gateway-hero h1,
.local-hero h1,
.services-directory-hero h1,
.service-detail-hero h1 {
  font-size: clamp(2.7rem, 4.4vw, 4.15rem);
  line-height: 1.02;
  letter-spacing: -.025em;
  text-wrap: balance;
}

.gateway-lede,
.local-lede,
.services-directory-hero > div > p:last-child,
.service-detail-lede {
  font-size: clamp(1.07rem, 1.5vw, 1.25rem);
  line-height: 1.55;
}

.local-edition-panel {
  min-height: 0;
  align-self: center;
  padding: clamp(26px, 3vw, 42px);
  border-color: var(--outline-soft);
  background: linear-gradient(145deg, rgba(213, 161, 60, .075), rgba(16, 26, 29, .92));
}

.local-edition-code {
  width: 64px;
  height: 64px;
  font-size: 1.35rem;
}

.local-edition-panel strong {
  font-size: clamp(1.45rem, 2.1vw, 1.85rem);
}

.gateway-resource-section {
  width: min(calc(100% - 2 * var(--layout-gutter)), var(--layout-width));
  margin-inline: auto;
}

.blog-article,
.related-articles {
  max-width: 1040px;
  border-color: var(--outline-soft);
  border-radius: 12px;
}

.blog-article-header h1 {
  font-size: clamp(2.15rem, 3.5vw, 3.55rem);
  line-height: 1.08;
}

.blog-article-body,
.article-summary {
  max-width: 760px;
}

body.resource-page:not(.international-gateway):not(.local-gateway) {
  --resource-ink: var(--text-strong);
  --resource-paper: #080d0f;
  --resource-gold: var(--accent-strong);
  --resource-line: var(--outline-soft);
  color: var(--text-soft);
  background:
    linear-gradient(90deg, rgba(213, 161, 60, .03) 1px, transparent 1px),
    linear-gradient(0deg, rgba(213, 161, 60, .025) 1px, transparent 1px),
    #080d0f;
  background-size: 84px 84px, 84px 84px, auto;
}

body.resource-page:not(.international-gateway):not(.local-gateway) .site-main h1,
body.resource-page:not(.international-gateway):not(.local-gateway) .site-main h2,
body.resource-page:not(.international-gateway):not(.local-gateway) .site-main h3 {
  color: var(--text-strong);
}

.resource-page .site-main {
  max-width: var(--layout-width);
  padding-inline: var(--layout-gutter);
}

.resource-breadcrumbs,
.resource-section-heading > p:not(.resource-kicker),
.resource-card-copy > p,
.resource-guide-content p,
.resource-guide-content li,
.resource-guide-summary p,
.resource-method p,
.resource-levels p,
.glossary-entry p {
  color: var(--text-soft);
}

.resource-breadcrumbs {
  flex-wrap: wrap;
  overflow-wrap: normal;
}

.resource-breadcrumbs a,
.resource-breadcrumbs [aria-hidden="true"] {
  flex: none;
  white-space: nowrap;
}

.resource-breadcrumbs [aria-current="page"] {
  min-width: 0;
}

body.resource-page:not(.international-gateway):not(.local-gateway) .site-main .resource-breadcrumbs a,
body.resource-page:not(.international-gateway):not(.local-gateway) .site-main .resource-sources a,
body.resource-page:not(.international-gateway):not(.local-gateway) .site-main .resource-guide-summary a,
body.resource-page:not(.international-gateway):not(.local-gateway) .site-main .glossary-entry a {
  color: var(--accent-strong);
}

.resource-hero,
.resource-guide-hero {
  min-height: 460px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  border: 1px solid var(--outline-soft);
  border-radius: 12px;
  background: var(--surface-deep);
  color: var(--text-strong);
  box-shadow: 0 22px 52px rgba(0, 0, 0, .25);
}

.resource-hero-copy,
.resource-guide-hero-copy {
  min-width: 0;
  padding: clamp(30px, 4vw, 54px);
}

.resource-hero h1,
.resource-guide-hero h1 {
  font-size: clamp(2.25rem, 3.7vw, 3.65rem);
  line-height: 1.04;
  letter-spacing: -.025em;
  overflow-wrap: normal;
}

.resource-lead {
  color: var(--text-soft);
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  line-height: 1.55;
}

.resource-hero-media,
.resource-guide-image {
  min-width: 0;
  background: var(--surface-deep);
}

.resource-section {
  margin-block: clamp(52px, 7vw, 84px);
}

.resource-guide-grid,
.resource-related-grid,
.glossary-grid {
  gap: 16px;
}

.resource-guide-card,
.resource-levels article,
.resource-method li,
.resource-guide-summary,
.resource-related-grid article,
.glossary-entry {
  border: 1px solid var(--outline-soft);
  border-radius: 10px;
  background: var(--surface-raised);
  box-shadow: none;
}

.resource-card-copy h3 a,
body.resource-page:not(.international-gateway):not(.local-gateway) .site-main .resource-card-copy h3 a,
body.resource-page:not(.international-gateway):not(.local-gateway) .site-main .resource-related-grid h3 a {
  color: var(--text-strong);
}

.resource-card-meta,
.resource-related-copy p,
.resource-guide-summary h3 {
  color: var(--accent-strong);
}

.resource-card-copy > p,
.resource-related-copy > p,
.resource-guide-summary p,
.resource-levels p {
  color: var(--text-soft);
}

.resource-dataset,
.resource-related,
.resource-glossary-link,
.glossary-hero {
  border: 1px solid var(--outline-soft);
  border-radius: 12px;
  background: var(--surface-deep);
  color: var(--text-soft);
}

.resource-guide-content > section {
  margin-bottom: clamp(38px, 5vw, 58px);
}

.resource-quick-check {
  border-left-color: var(--accent-strong);
  background: rgba(213, 161, 60, .09);
}

.resource-table-wrap {
  border-color: var(--outline-soft);
  background: var(--surface-raised);
}

.resource-table thead th {
  background: #263238;
  color: var(--text-strong);
}

.resource-table th,
.resource-table td {
  border-color: var(--outline-soft);
  color: var(--text-soft);
}

.resource-table tbody tr:hover {
  background: rgba(213, 161, 60, .08);
}

.resource-domain {
  background: rgba(213, 161, 60, .15);
  color: var(--accent-strong);
}

.resource-button {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
  color: #11181a;
}

body.resource-page:not(.international-gateway):not(.local-gateway) .site-main .resource-button {
  color: #11181a;
}

.resource-button:hover,
.resource-button:focus-visible {
  background: var(--text-strong);
  color: #11181a;
}

.resource-button-secondary {
  background: transparent;
  color: var(--accent-strong);
}

body.resource-page:not(.international-gateway):not(.local-gateway) .site-main .resource-button-secondary {
  color: var(--accent-strong);
}

.resource-guide-summary h2,
.resource-guide-summary h3,
.resource-method h3,
.resource-steps h3,
.resource-faq summary,
.glossary-entry h2,
.resource-glossary-link h2 {
  color: var(--text-strong);
}

.resource-deliverable {
  color: var(--accent-strong);
}

.resource-steps li > span {
  border-color: var(--accent-strong);
  color: var(--accent-strong);
}

.resource-related-media {
  background: var(--surface-deep);
}

.glossary-main {
  color: var(--text-soft);
}

.glossary-hero .resource-lead {
  color: var(--text-soft);
}

.glossary-entry a,
.resource-text-link {
  color: var(--accent-strong);
}

.contact-page .site-main {
  max-width: var(--layout-width);
  padding-inline: var(--layout-gutter);
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  align-items: start;
  gap: clamp(28px, 5vw, 72px);
  margin: clamp(40px, 6vw, 80px) auto clamp(70px, 9vw, 110px);
}

.contact-intro {
  padding-top: clamp(10px, 2vw, 30px);
}

.contact-intro h1 {
  max-width: 640px;
  color: var(--text-strong);
  font-size: clamp(2.6rem, 4.5vw, 4.5rem);
  line-height: 1.02;
  letter-spacing: -.025em;
  text-wrap: balance;
}

.contact-intro > p:not(.local-kicker) {
  max-width: 520px;
  color: var(--text-soft);
  font-size: 1.1rem;
  line-height: 1.6;
}

.contact-intro .contact-direct {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--outline-soft);
  font-size: .98rem;
}

.contact-direct a,
.contact-consent a {
  color: var(--accent-strong);
  overflow-wrap: anywhere;
}

.contact-form-panel {
  padding: clamp(22px, 3vw, 38px);
  border: 1px solid var(--outline-soft);
  border-radius: 12px;
  background: var(--surface-raised);
}

.contact-required-note,
.contact-field-note {
  color: var(--text-soft);
  font-size: .88rem;
}

.contact-required-note {
  margin: 0 0 24px;
}

.contact-form,
.contact-form > div:not(.contact-trap) {
  display: grid;
  gap: 10px;
}

.contact-form {
  gap: 22px;
}

.contact-form-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px !important;
}

.contact-form label {
  color: var(--text-strong);
  font-weight: 700;
}

.contact-form input:not([type="checkbox"]),
.contact-form textarea {
  width: 100%;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid rgba(199, 208, 203, .36);
  border-radius: 7px;
  background: #0b1519;
  color: var(--text-strong);
  font: inherit;
}

.contact-form textarea {
  resize: vertical;
  line-height: 1.5;
}

.contact-form input:focus-visible,
.contact-form textarea:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 2px;
}

.contact-form [aria-invalid="true"] {
  border-color: #e47972 !important;
}

.contact-form .contact-field-note {
  margin: 0;
}

.contact-captcha input {
  max-width: 120px;
}

.contact-form .contact-consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--text-soft);
  font-size: .9rem;
  font-weight: 400;
  line-height: 1.5;
}

.contact-consent input {
  width: 18px;
  height: 18px;
  flex: none;
  margin-top: 2px;
  accent-color: var(--accent-strong);
}

.contact-form button {
  justify-self: start;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.contact-trap {
  position: absolute;
  inset-inline-start: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-feedback {
  margin: 0 0 20px;
  padding: 14px 16px;
  border-radius: 7px;
  line-height: 1.5;
}

.contact-feedback.is-success {
  border: 1px solid #62aa83;
  background: rgba(67, 143, 103, .16);
  color: #c6f0d6;
}

.contact-feedback.is-error {
  border: 1px solid #d88177;
  background: rgba(180, 70, 60, .14);
  color: #ffd6d1;
}

@media (max-width: 900px) {
  .contact-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .contact-intro {
    padding-top: 0;
  }

  .site-header,
  .gateway-topbar,
  .local-topbar {
    padding-inline: var(--layout-gutter);
  }

  .gateway-hero,
  .local-hero,
  .resource-hero,
  .resource-guide-hero {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
  }

  .resource-hero-media,
  .resource-guide-image {
    min-height: 330px;
  }
}

@media (max-width: 640px) {
  .contact-layout {
    margin-block: 32px 64px;
  }

  .contact-intro h1 {
    font-size: clamp(2.2rem, 10vw, 3rem);
  }

  .contact-form-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .contact-form button {
    width: 100%;
  }

  .site-header .site-nav > a,
  .site-header .edition-picker > summary,
  .gateway-nav a,
  .local-nav a {
    min-height: 38px;
    padding: 7px 8px;
    font-size: .8rem;
  }

  .site-header .site-nav,
  .gateway-nav,
  .local-nav {
    gap: 6px;
  }

  .gateway-hero,
  .local-hero {
    padding-block: 34px 48px;
  }

  .gateway-hero h1,
  .local-hero h1,
  .services-directory-hero h1,
  .service-detail-hero h1 {
    font-size: clamp(2.35rem, 10vw, 3.2rem);
  }

  .resource-hero h1,
  .resource-guide-hero h1 {
    font-size: clamp(2rem, 9vw, 3rem);
  }

  .resource-hero-copy,
  .resource-guide-hero-copy {
    padding: 28px 22px;
  }

  .resource-hero-media,
  .resource-guide-image {
    min-height: 250px;
  }

  .resource-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .resource-stats dt {
    font-size: 1.45rem;
  }

  .resource-stats dd {
    font-size: .72rem;
  }

  .resource-guide-card,
  .glossary-entry {
    border-radius: 9px;
  }
}
