:root {
  --brand: #3f7778;
  --brand-dark: #315d5e;
  --brand-light: #eaf2f2;
  --text: #3d3d3d;
  --muted: #737373;
  --border: #e7e7e7;
  --page: #ffffff;
  --menu-bg: #ffffff;
  --max: 1120px;
  --header-height: 92px;
}

* { box-sizing: border-box; }
html {
  scroll-padding-top: calc(var(--header-height) + 8px);
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--page);
  line-height: 1.65;
  font-size: 16px;
}

a { color: var(--brand); }
a:hover { color: var(--brand-dark); }

/* The wrapper stays sticky; a sticky header inside a one-row wrapper would not. */
#site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: var(--header-height);
}
.site-header {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 1px 0 rgba(0,0,0,.08);
}
.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 28px;
  min-height: 92px;
  position: relative;
  display: flex;
  align-items: center;
  gap: 34px;
}
.brand {
  color: #fff;
  text-decoration: none;
  font-size: 24px;
  font-weight: 500;
  letter-spacing: .2px;
  white-space: nowrap;
  line-height: 1;
}
.brand:hover { color: #fff; }

/* The Resources button is the only navigation control on every screen size. */
.menu-label:focus-visible {
  outline: 2px solid white;
  outline-offset: 3px;
}
.main-nav { margin-left: auto; }
.main-nav > ul {
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0;
  gap: 2px;
  align-items: center;
}
.main-nav a,
.menu-label {
  color: #fff;
  text-decoration: none;
  padding: 30px 12px;
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  white-space: nowrap;
}
.main-nav a:hover,
.menu-label:hover { background: rgba(255,255,255,.08); }

.dropdown { position: static; }
.menu-label {
  border: 0;
  background: transparent;
  font-family: inherit;
  cursor: pointer;
}
.menu-label::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid rgba(255,255,255,.85);
  margin-left: 8px;
  margin-top: 3px;
}
.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 28px;
  min-width: 255px;
  background: var(--menu-bg);
  border: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  padding: 7px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s;
}
.dropdown.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown-menu a {
  color: var(--text);
  text-transform: none;
  letter-spacing: 0;
  font-size: 14px;
  padding: 10px 16px;
  display: block;
}
.dropdown-menu a:hover {
  background: var(--brand-light);
  color: var(--brand-dark);
}

.site-main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 74px 28px 90px;
}
.content {
  max-width: 900px;
  margin: 0 auto;
}
.content.narrow { max-width: 780px; }

h1, h2, h3, h4 {
  color: #2f2f2f;
  font-weight: 400;
  line-height: 1.25;
  margin: 0 0 22px;
}
h1 { font-size: 36px; }
h2 { font-size: 28px; margin-top: 52px; }
h3 { font-size: 23px; margin-top: 38px; }
h4 { font-size: 19px; margin-top: 30px; }

p { margin: 0 0 22px; }
ul, ol { margin: 0 0 24px 24px; }
li { margin-bottom: 8px; }

.eyebrow {
  color: var(--brand);
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.top-link {
  font-size: 13px;
  display: inline-block;
  margin-bottom: 28px;
}
.callout {
  background: #f6f9f9;
  border-left: 3px solid var(--brand);
  padding: 18px 20px;
  margin: 30px 0;
}

.platform-logo {
  display: block;
  width: min(280px, 72vw);
  max-height: 170px;
  object-fit: contain;
  margin: 0 auto 42px;
  background: var(--brand-dark);
  padding: 14px;
}
.section-rule { border: 0; border-top: 1px solid var(--border); margin: 52px 0 0; }
.figure { margin: 30px 0 44px; text-align: center; }
/* Prevent embedded tutorial videos from widening the mobile viewport. */
iframe { max-width: 100%; }
.figure img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--border);
  box-shadow: 0 3px 16px rgba(0,0,0,.06);
  background: #fafafa;
}
.figure.compact img { max-height: 520px; width: auto; }
.figure figcaption { color: var(--muted); font-size: 13px; margin-top: 9px; }
.image-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
  margin: 28px 0 42px;
}
.image-grid figure { margin: 0; text-align: center; }
.image-grid img {
  max-width: 100%;
  max-height: 500px;
  height: auto;
  border: 1px solid var(--border);
  box-shadow: 0 3px 15px rgba(0,0,0,.05);
}

.toc {
  list-style: none;
  margin: 0 0 40px;
  padding: 0;
}
.toc li { margin: 0; }
.toc a {
  display: block;
  padding: 6px 0;
  text-decoration: none;
}

.site-footer {
  border-top: 1px solid var(--border);
  color: #777;
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px;
  font-size: 13px;
  text-align: center;
}
.site-footer a { text-decoration: none; }

.back-to-top {
  display: inline-block;
  margin: 8px 0 36px;
  font-size: 13px;
}

@media (max-width: 1020px) {
  .header-inner { gap: 18px; }
  .main-nav a, .menu-label { padding-left: 8px; padding-right: 8px; font-size: 11px; }
}

@media (max-width: 860px) {
  :root { --header-height: 74px; }
  .header-inner { min-height: 74px; gap: 12px; }
  .brand { font-size: clamp(17px, 5.5vw, 24px); }
  .menu-label { padding: 12px 8px; }
  .dropdown-menu {
    right: 18px;
    width: min(280px, calc(100vw - 36px));
    min-width: 0;
    max-height: calc(100vh - var(--header-height) - 12px);
    max-height: calc(100dvh - var(--header-height) - 12px);
    overflow-y: auto;
  }
  .site-main { padding-top: 54px; }
}

@media (max-width: 680px) {
  .header-inner, .site-main, .site-footer { padding-left: 18px; padding-right: 18px; }
  h1 { font-size: 31px; }
  h2 { font-size: 25px; }
  .image-grid { grid-template-columns: 1fr; }
}
