:root {
  color-scheme: light;
  --paper: #f2f3ef;
  --panel: #fafaf7;
  --ink: #17211f;
  --muted: #697672;
  --rule: #d6dad4;
  --rule-strong: #aeb7af;
  --pine: #0f5f51;
  --pine-soft: #e2eee9;
  --bronze: #8a5a2b;
  --bronze-soft: #f1e8dc;
  --serif: 'Iowan Old Style', 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, 'SF Mono', 'Cascadia Mono', Menlo, Consolas, monospace;
  --edge: clamp(20px, 5vw, 58px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.shell {
  width: min(1120px, 100%);
  margin-inline: auto;
  padding-inline: var(--edge);
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: 10px;
  left: 10px;
  padding: 8px 12px;
  background: var(--ink);
  color: white;
  transform: translateY(-150%);
}

.skip-link:focus { transform: translateY(0); }

.site-header {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--rule-strong);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  text-decoration: none;
}

.brand img { width: 38px; height: 38px; display: block; }

.brand span,
.header-link,
.eyebrow,
.gateway-kicker,
.gateway-number,
.gateway-cta,
.section-label,
.button,
.site-footer {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .7rem;
}

.brand span { color: var(--muted); }

.header-link {
  color: var(--muted);
  text-underline-offset: 4px;
}

.gateway-main { padding-block: clamp(48px, 8vw, 92px) clamp(42px, 7vw, 80px); }

.gateway-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, .65fr);
  gap: clamp(28px, 6vw, 90px);
  align-items: end;
  margin-bottom: clamp(38px, 7vw, 74px);
}

.eyebrow {
  color: var(--tone, var(--pine));
  margin: 0 0 14px;
}

.gateway-intro .eyebrow { grid-column: 1 / -1; margin-bottom: -12px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; }

.gateway-intro h1,
.activity-hero h1 {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 4.7rem);
  line-height: .99;
  letter-spacing: -.035em;
  text-wrap: balance;
}

.gateway-intro > p:last-child,
.activity-lede {
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.13rem);
  max-width: 52ch;
}

.gateway-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--rule-strong);
  background: var(--rule-strong);
  gap: 1px;
}

.gateway-card {
  --tone: var(--pine);
  min-height: 430px;
  padding: clamp(25px, 4vw, 44px);
  background: var(--panel);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  position: relative;
  overflow: hidden;
  transition: background 160ms ease, color 160ms ease;
}

.gateway-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--tone);
  transform: scaleX(.18);
  transform-origin: left;
  transition: transform 220ms ease;
}

.gateway-card--data { --tone: var(--bronze); }
.gateway-card:hover,
.gateway-card:focus-visible { background: color-mix(in srgb, var(--tone) 8%, var(--panel)); outline: none; }
.gateway-card:hover::before,
.gateway-card:focus-visible::before { transform: scaleX(1); }
.gateway-card:focus-visible { box-shadow: inset 0 0 0 3px var(--tone); }

.gateway-number { color: var(--tone); }
.gateway-kicker { color: var(--tone); margin: 0 0 9px; }
.gateway-card h2 { font-size: clamp(1.9rem, 3.5vw, 3rem); line-height: 1.05; margin: 0 0 18px; }
.gateway-card p:not(.gateway-kicker) { color: var(--muted); margin: 0; max-width: 44ch; }
.gateway-cta { color: var(--tone); display: flex; justify-content: space-between; gap: 18px; border-top: 1px solid var(--rule); padding-top: 17px; }

.activity { --tone: var(--pine); --tone-soft: var(--pine-soft); }
.activity--data { --tone: var(--bronze); --tone-soft: var(--bronze-soft); }

.activity-header { min-height: 102px; }

.activity-hero { padding-block: clamp(64px, 11vw, 124px); }
.activity-hero h1 { max-width: 14ch; }
.activity-lede { margin-top: 28px; max-width: 62ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 18px;
  border: 1px solid var(--tone);
  color: var(--tone);
  text-decoration: none;
}

.button--primary { color: white; background: var(--tone); }
.button:hover,
.button:focus-visible { outline: 2px solid var(--tone); outline-offset: 3px; }

.activity-section { padding-block: clamp(48px, 8vw, 88px); border-top: 1px solid var(--rule-strong); }
.section-label { color: var(--tone); margin: 0 0 16px; }
.section-heading { font-size: clamp(1.8rem, 4vw, 3rem); line-height: 1.08; letter-spacing: -.025em; max-width: 19ch; margin: 0 0 36px; }

.service-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--rule); background: var(--rule); gap: 1px; }
.service-card { background: var(--panel); padding: clamp(24px, 3vw, 34px); min-height: 250px; }
.service-card span { font-family: var(--mono); color: var(--tone); font-size: .7rem; }
.service-card h3 { font-size: 1.35rem; line-height: 1.2; margin: 38px 0 13px; }
.service-card p { color: var(--muted); margin: 0; font-size: .93rem; }

.method {
  display: grid;
  grid-template-columns: minmax(230px, .8fr) 2fr;
  gap: clamp(36px, 8vw, 100px);
  align-items: start;
}

.method ol { list-style: none; margin: 0; padding: 0; counter-reset: steps; }
.method li { counter-increment: steps; display: grid; grid-template-columns: 40px 1fr; gap: 16px; padding: 0 0 25px; margin-bottom: 25px; border-bottom: 1px solid var(--rule); }
.method li::before { content: '0' counter(steps); font-family: var(--mono); font-size: .72rem; color: var(--tone); padding-top: 4px; }
.method h3 { margin: 0 0 5px; font-size: 1.18rem; }
.method p { margin: 0; color: var(--muted); font-size: .92rem; }

.cross-link { background: var(--tone-soft); }
.cross-link-inner { display: flex; justify-content: space-between; align-items: center; gap: 32px; }
.cross-link h2 { margin: 0; font-size: clamp(1.5rem, 3vw, 2.3rem); }
.cross-link a { color: var(--tone); text-underline-offset: 5px; }

.site-footer {
  min-height: 110px;
  padding-block: 28px;
  border-top: 1px solid var(--rule-strong);
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.site-footer a { text-underline-offset: 4px; }

.apps-intro { padding-block: clamp(56px, 9vw, 100px); }
.apps-intro h1 { margin: 0; font-size: clamp(2.6rem, 7vw, 5.2rem); line-height: .95; letter-spacing: -.04em; }
.apps-intro > p:last-child { max-width: 66ch; margin: 27px 0 0; color: var(--muted); font-size: clamp(1rem, 1.5vw, 1.12rem); }
.apps-section { padding-block: clamp(46px, 7vw, 78px); border-top: 1px solid var(--rule-strong); }
.apps-section-head { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 30px; }
.apps-section-head .section-label { margin-bottom: 8px; }
.apps-section-head h2 { margin: 0; font-size: clamp(1.8rem, 4vw, 3rem); line-height: 1; }
.apps-count,
.app-kind,
.status,
.app-open {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: .66rem;
}
.apps-count { color: var(--muted); }
.apps-count--link { color: var(--tone); text-underline-offset: 5px; }
.apps-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--rule); background: var(--rule); gap: 1px; }
.app-card { min-height: 270px; padding: clamp(23px, 3vw, 33px); background: var(--panel); color: inherit; text-decoration: none; display: flex; flex-direction: column; transition: background 160ms ease; }
.app-card:hover,
.app-card:focus-visible { background: var(--bronze-soft); outline: none; }
.app-card:focus-visible { box-shadow: inset 0 0 0 3px var(--tone); }
.app-card--planned { background: color-mix(in srgb, var(--bronze) 7%, var(--panel)); border-top: 3px solid var(--bronze); }
.app-card-top { display: flex; justify-content: space-between; align-items: start; gap: 18px; }
.app-kind { color: var(--tone); margin: 0; }
.status { padding: 4px 8px; border: 1px solid currentColor; white-space: nowrap; }
.status--online { color: var(--pine); }
.status--planned { color: var(--bronze); background: var(--bronze-soft); }
.app-card h3 { margin: auto 0 10px; font-size: clamp(1.35rem, 2.5vw, 1.75rem); line-height: 1.1; }
.app-card p { color: var(--muted); margin: 0 0 27px; max-width: 42ch; }
.app-open { color: var(--tone); border-top: 1px solid var(--rule); padding-top: 13px; }
.tool-groups { display: grid; grid-template-columns: 1.25fr .8fr .8fr; border: 1px solid var(--rule); background: var(--rule); gap: 1px; }
.tool-group { background: var(--panel); padding: clamp(23px, 3vw, 31px); }
.tool-group h3 { font-size: 1.28rem; line-height: 1.2; margin: 25px 0 24px; }
.tool-group ul { list-style: none; margin: 0; padding: 0; }
.tool-group li { border-top: 1px solid var(--rule); }
.tool-group a { display: flex; justify-content: space-between; gap: 18px; padding-block: 13px; color: var(--muted); text-decoration: none; font-size: .88rem; }
.tool-group a:hover,
.tool-group a:focus-visible { color: var(--tone); outline: none; }

@media (max-width: 760px) {
  .gateway-intro,
  .gateway-grid,
  .service-grid,
  .method,
  .apps-grid,
  .tool-groups { grid-template-columns: 1fr; }
  .gateway-intro .eyebrow { grid-column: auto; margin-bottom: -8px; }
  .gateway-card { min-height: 355px; }
  .cross-link-inner { align-items: flex-start; flex-direction: column; }
  .apps-section-head { align-items: flex-start; flex-direction: column; gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
