.nat-hero {
  background: var(--night);
  color: var(--paper);
  padding-block: 76px 88px;
}

.nat-hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  gap: 90px;
}

.nat-hero h1 {
  margin-block: 18px 22px;
}

.nat-hero .eyebrow {
  color: #bec0e8;
}

.nat-deck {
  max-width: 580px;
  font-size: 18px;
}

.nat-hero-detail {
  color: #b1b5cf;
  font-size: 15px;
  margin-top: 18px;
}

.nat-hero .button {
  margin-top: 28px;
}

.nat-start {
  background: #202337;
  border: 1px solid #414662;
  border-radius: 8px;
  padding: 28px;
}

.nat-start h2 {
  font-size: 20px;
  letter-spacing: -.5px;
  margin-bottom: 12px;
}

.nat-start > a {
  display: grid;
  grid-template-columns: 22px 1fr 16px;
  align-items: baseline;
  gap: 12px;
  padding-block: 22px;
  text-decoration: none;
  border-bottom: 1px solid #414662;
}

.nat-start > a:last-child {
  border-bottom: 0;
  padding-bottom: 4px;
}

.nat-start > a:hover strong {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.nat-start > a > span {
  color: var(--accent-bright);
  font-size: 12px;
}

.nat-start > a > .icon {
  width: 16px;
  height: 16px;
  align-self: center;
  color: var(--accent-bright);
}

.nat-start strong {
  font-size: 14px;
  line-height: 1.6;
}

.nat-start small {
  display: block;
  color: #b1b5cf;
  font-size: 12px;
  line-height: 1.6;
  margin-top: 6px;
}

.nat-hero a:focus-visible,
.nat-diagram:focus-visible,
.config-block pre:focus-visible {
  outline-color: var(--accent-bright);
}

.nat-body {
  background: var(--paper);
}

.nat-layout {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 70px;
  align-items: start;
}

.nat-toc {
  position: sticky;
  top: 96px; /* below the sticky site header */
  display: grid;
  gap: 18px;
  padding-block: 64px;
}

.nat-toc .eyebrow {
  color: var(--muted);
  margin-bottom: 6px;
}

.nat-toc a {
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.nat-toc a:hover {
  text-decoration: underline;
}

.nat-content {
  min-width: 0;
  max-width: 900px;
}

.nat-section {
  padding-block: 64px;
  border-bottom: 1px solid var(--line);
}

.nat-section:last-child {
  border-bottom: 0;
}

.nat-section > .eyebrow {
  color: #565987;
  margin-bottom: 16px;
}

.nat-section h2 {
  font-size: clamp(30px, 3vw, 40px);
  letter-spacing: -1.5px;
  margin-bottom: 24px;
}

.nat-section p,
.nat-section li {
  font-size: 15px;
  line-height: 1.85;
}

.nat-section > p + p {
  margin-top: 16px;
}

.nat-section strong {
  font-weight: 750;
}

.nat-section code {
  font-family: ui-monospace, monospace;
  font-size: .9em;
  overflow-wrap: anywhere;
}

.nat-diagram {
  margin-block: 28px;
  border: 1px solid #414662;
  border-radius: 8px;
  padding: 26px;
  background: var(--night);
  color: var(--paper);
}

.diagram-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  color: #bec0e8;
  margin-bottom: 28px;
}

.diagram-heading .eyebrow {
  font-size: 10px;
  letter-spacing: 1px;
}

.diagram-tag {
  flex-shrink: 0;
  font-size: 10px;
  border: 1px solid #414662;
  border-radius: 4px;
  padding: 4px 7px;
}

.packet-flow {
  display: grid;
  grid-template-columns: 1fr 28px 1fr 28px 1fr;
  align-items: center;
}

.packet-node {
  display: grid;
  gap: 10px;
  text-align: center;
  align-content: center;
  min-height: 154px;
  border: 1px solid #626889;
  border-radius: 6px;
  background: #202337;
  padding: 16px 8px;
}

.packet-node strong {
  font-size: 16px;
}

.packet-node > span:last-child {
  font-size: 12px;
  line-height: 1.7;
}

.node-kicker {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .8px;
  color: #bec0e8;
}

.node-accent {
  background: var(--accent-bright);
  color: var(--night);
  border-color: var(--accent-bright);
}

.node-accent .node-kicker {
  color: #292b54;
}

.packet-arrow {
  text-align: center;
  color: var(--accent-bright);
  font-size: 22px;
}

.nat-diagram figcaption {
  color: #bec0d7;
  font-size: 12px;
  line-height: 1.8;
  margin-top: 22px;
}

.nat-instructions,
.nat-checklist {
  padding-left: 24px;
  margin-block: 24px;
}

.nat-instructions li,
.nat-checklist li {
  padding-left: 7px;
  margin-bottom: 16px;
}

.nat-instructions li::marker {
  color: #565987;
  font-weight: 750;
}

.config-block {
  background: #202337;
  color: #f0f2fb;
  border: 1px solid #414662;
  border-radius: 6px;
  overflow: hidden;
  margin-block: 24px 14px;
}

.config-heading {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 22px;
  border-bottom: 1px solid #414662;
  font-size: 12px;
}

.config-heading > span {
  color: #bec0d7;
}

.config-block pre {
  margin: 0;
  padding: 24px;
  overflow-x: auto;
  line-height: 1.75;
  font-size: 14px;
}

.config-block code {
  font-size: inherit;
  overflow-wrap: normal;
}

.nat-section .nat-caption {
  color: #555b75;
  font-size: 13px;
}

.nat-callout {
  border-left: 3px solid #6669ba;
  background: #e5e8fa;
  padding: 22px 24px;
  margin-block: 28px;
}

.nat-callout h3 {
  margin-bottom: 8px;
}

.nat-detail {
  border-block: 1px solid #c0c5de;
  margin-top: 24px;
}

.nat-detail + .nat-detail {
  border-top: 0;
  margin-top: 0;
}

.nat-detail summary {
  cursor: pointer;
  padding-block: 20px;
  font-size: 15px;
  font-weight: 750;
  line-height: 1.7;
}

.nat-detail summary:focus-visible,
.nat-table-scroll:focus-visible,
.config-block pre:focus-visible {
  outline: 3px solid #575ad1;
  outline-offset: -3px;
}

.nat-detail > div {
  padding-bottom: 24px;
}

.nat-detail p + p {
  margin-top: 12px;
}

.assisted-flow {
  list-style: none;
  padding: 0;
  margin: 0;
}

.assisted-flow li {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 20px;
  padding-bottom: 28px;
  position: relative;
}

.assisted-flow li:not(:last-child)::before {
  content: "";
  position: absolute;
  top: 38px;
  bottom: 5px;
  left: 17px;
  border-left: 1px dashed #777bad;
}

.assisted-flow li:last-child {
  padding-bottom: 0;
}

.flow-number {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid #777bad;
  border-radius: 50%;
  color: #d5d6ff;
  font-size: 13px;
}

.assisted-flow strong {
  font-size: 15px;
}

.assisted-flow p {
  font-size: 13px;
  color: #bec0d7;
  margin-top: 6px;
}

.nat-subheading {
  margin-top: 30px;
}

.nat-types {
  margin-block: 28px;
  border-top: 1px solid #c0c5de;
}

.nat-types article {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 22px;
  padding-block: 24px;
  border-bottom: 1px solid #c0c5de;
}

.type-number {
  font-size: 11px;
  font-weight: 750;
  color: #4e528b;
  background: #e1e4f7;
  padding: 9px;
  border-radius: 4px;
  align-self: start;
  text-align: center;
}

.nat-types h3 {
  margin-bottom: 8px;
}

.nat-table-scroll {
  overflow-x: auto;
  margin-block: 24px 16px;
  border: 1px solid #c0c5de;
  border-radius: 6px;
}

.nat-matrix {
  border-collapse: collapse;
  width: 100%;
  min-width: 690px;
  text-align: left;
  font-size: 12px;
  line-height: 1.5;
}

.nat-matrix caption {
  text-align: left;
  padding: 16px;
  font-weight: 750;
  background: #e5e8fa;
}

.nat-matrix th,
.nat-matrix td {
  padding: 16px 12px;
  border-bottom: 1px solid #d0d4e9;
}

.nat-matrix thead th {
  background: #e5e8fa;
  vertical-align: bottom;
}

.nat-matrix tbody th {
  min-width: 155px;
}

.nat-matrix tbody tr:last-child > * {
  border-bottom: 0;
}

.result {
  font-size: 11px;
  font-weight: 750;
  display: inline-block;
  border-radius: 4px;
  padding: 5px 7px;
  white-space: nowrap;
}

.result-good {
  background: #dde9e5;
  color: #285447;
}

.result-conditional {
  background: #ece4d6;
  color: #685028;
}

.result-limited {
  background: #efdfe4;
  color: #78364c;
}

.nat-footnotes {
  margin-block: 22px 28px;
}

.nat-footnotes p {
  font-size: 13px;
  margin-top: 12px;
}

.mapping-row {
  display: grid;
  grid-template-columns: 145px 1fr;
  gap: 18px;
  padding-block: 17px;
  border-bottom: 1px solid #414662;
  font-size: 13px;
  line-height: 1.7;
}

.mapping-label {
  color: #bec0d7;
}

.mapping-row b {
  color: #c4c6ff;
  font-family: ui-monospace, monospace;
}

.mapping-blocked {
  display: flex;
  align-items: center;
  gap: 16px;
  color: #f3b7ca;
  font-size: 13px;
  line-height: 1.7;
  margin-top: 20px;
}

.mapping-blocked > span {
  font-size: 26px;
}

.nat-sources {
  border-top: 1px solid #c0c5de;
  margin-top: 38px;
  padding-top: 26px;
}

.nat-sources p {
  margin-top: 12px;
  color: #555b75;
  font-size: 13px;
}

@media (max-width: 1080px) {
  .nat-hero-grid {
    gap: 40px;
  }

  .nat-layout {
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 35px;
  }

  .nat-diagram {
    padding: 22px;
  }
}

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

  .nat-toc {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-block: 30px;
    border-bottom: 1px solid #c0c5de;
  }

  .nat-toc .eyebrow {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .nat-hero {
    padding-block: 42px 48px;
  }

  .nat-hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
  }

  .nat-deck {
    font-size: 17px;
  }

  .nat-start {
    padding: 24px;
  }

  .nat-section {
    padding-block: 44px;
  }
}

@media (max-width: 540px) {
  .nat-toc {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .packet-flow {
    grid-template-columns: minmax(0, 1fr);
  }

  .packet-node {
    min-height: 118px;
  }

  .packet-arrow {
    transform: rotate(90deg);
    padding: 4px;
  }

  .diagram-tag {
    display: none;
  }

  .nat-callout {
    padding: 20px;
  }

  .config-block pre {
    padding: 18px;
    font-size: 12px;
  }

  .nat-types article {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 14px;
  }

  .type-number {
    padding: 7px 4px;
  }

  .mapping-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }
}
