/*
 * Canonical responsive web presentation for the AWS IaC Field Guide.
 * The independent PDF keeps the original A4 composition.
 */

html:has(.aws-guide-shell) {
  --bg: #09090b;
  --surface: #111216;
  --tint: #0d1015;
  --ink: #f5f5f7;
  --muted: #9da0a8;
  --line: rgba(255, 255, 255, .11);
  color-scheme: dark;
  background: #09090b;
}

html:has(.aws-guide-shell) body,
html:has(.aws-guide-shell) .site-footer {
  color: #f5f5f7;
  background: #09090b;
}

html:has(.aws-guide-shell) .site-header.is-scrolled {
  background: rgba(9, 9, 11, .9);
}

html:has(.aws-guide-shell) .site-nav > a,
html:has(.aws-guide-shell) .nav-menu-trigger {
  color: #c1c3c8;
}

html:has(.aws-guide-shell) .site-nav > a:hover,
html:has(.aws-guide-shell) .nav-menu-trigger:hover {
  color: #fff;
}

html:has(.aws-guide-shell) .site-nav .nav-cta {
  color: #09090b;
  background: #f5f5f7;
}

.aws-guide-shell {
  --guide-bg: #09090b;
  --guide-surface: #111216;
  --guide-technical: #0d1015;
  --guide-raised: #17191f;
  --guide-text: #f5f5f7;
  --guide-muted: #9da0a8;
  --guide-line: rgba(255, 255, 255, .11);
  --guide-blue: #087bea;
  --guide-blue-light: #39a0ff;
  --guide-orange: #ff9c40;
  --guide-green: #36d399;
  --guide-red: #ef6675;
  min-width: 0;
  overflow: clip;
  color: var(--guide-text);
  background: var(--guide-bg);
  font-family: "Inter", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.64;
}

.aws-guide-shell,
.aws-guide-shell * {
  box-sizing: border-box;
}

.aws-guide-layout {
  display: grid;
  grid-template-columns: 205px minmax(0, 1fr);
  gap: clamp(38px, 4vw, 58px);
  align-items: start;
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
  padding: 96px 0 110px;
}

.aws-guide-rail {
  position: sticky;
  top: 110px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-self: start;
  min-width: 0;
  margin: 0;
  padding: 4px 0 4px 18px;
  border-left: 1px solid var(--guide-line);
}

.aws-guide-rail > span {
  color: var(--guide-orange);
  font-size: 10px;
  font-weight: 760;
  line-height: 1.45;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.aws-guide-rail ol {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.aws-guide-rail li {
  min-width: 0;
  margin: 0;
}

.aws-guide-rail ol a {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 7px;
  align-items: start;
  padding: 3px 0;
  color: var(--guide-muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: color .18s ease;
}

.aws-guide-rail ol a span {
  color: #727784;
  font: 750 9px ui-monospace, "SFMono-Regular", Consolas, monospace;
}

.aws-guide-rail ol a:hover,
.aws-guide-rail ol a:focus-visible,
.aws-guide-rail ol a[aria-current="location"] {
  color: var(--guide-text);
}

.aws-guide-rail ol a[aria-current="location"] span {
  color: var(--guide-orange);
}

.guide-hero-actions a,
.guide-copy-button {
  border-radius: 10px;
}

.aws-guide-page {
  min-width: 0;
}

.guide-topic.guide-cover {
  position: relative;
  display: grid;
  grid-template-areas:
    "hero map"
    "meta meta"
    "actions actions";
  grid-template-columns: minmax(0, 1.15fr) minmax(270px, .7fr);
  grid-template-rows: repeat(3, max-content);
  gap: 0 clamp(38px, 5vw, 72px);
  align-content: start;
  min-height: 0;
  padding: clamp(42px, 5vw, 60px);
  overflow: hidden;
  background:
    radial-gradient(circle at 94% 10%, rgba(255, 156, 64, .17), transparent 32%),
    radial-gradient(circle at 6% 100%, rgba(8, 123, 234, .17), transparent 35%),
    var(--guide-technical);
  border: 1px solid var(--guide-line);
  border-radius: 30px;
}

.guide-cover .hero {
  grid-area: hero;
  position: relative;
  display: block;
  align-self: center;
  height: max-content;
  min-height: 0;
  max-width: 690px;
  margin-top: 0;
  padding: 0;
  overflow: visible;
  background: transparent;
}

.guide-cover .eyebrow,
.guide-topic > .eyebrow {
  margin: 0 0 13px;
  color: var(--guide-orange);
  font-size: 11px;
  font-weight: 760;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.guide-cover h1 {
  margin: 0 0 22px;
  color: var(--guide-text);
  font-size: clamp(50px, 5vw, 68px);
  font-weight: 780;
  line-height: .94;
  letter-spacing: -.058em;
}

.guide-cover .python {
  color: var(--guide-orange);
  white-space: nowrap;
}

.guide-cover .subtitle {
  max-width: 680px;
  margin: 0;
  color: #c5c8cf;
  font-size: clamp(17px, 1.7vw, 21px);
  line-height: 1.46;
}

.guide-cover-map {
  grid-area: map;
  align-self: start;
  height: max-content;
  margin-top: 0;
  padding: 18px 21px;
  background: rgba(255, 255, 255, .035);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 18px;
}

.guide-cover-map > p:first-child {
  margin: 0 0 13px;
  color: var(--guide-orange);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.guide-topic .guide-cover-map ol {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.guide-topic .guide-cover-map li {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 42px;
  margin: 0;
}

.guide-cover-map li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 31px;
  bottom: -11px;
  left: 16px;
  width: 1px;
  background: linear-gradient(var(--guide-blue), rgba(8, 123, 234, .15));
}

.guide-cover-map li > span {
  position: relative;
  z-index: 1;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #9fcfff;
  background: #142234;
  border: 1px solid rgba(57, 160, 255, .35);
  border-radius: 50%;
  font: 750 9px ui-monospace, "SFMono-Regular", Consolas, monospace;
}

.guide-cover-map li div {
  display: grid;
  gap: 1px;
}

.guide-cover-map li strong {
  color: var(--guide-text);
  font-size: 13px;
}

.guide-cover-map li small {
  color: var(--guide-muted);
  font-size: 10px;
}

.guide-topic .guide-cover-map-note {
  margin: 13px 0 0;
  padding-top: 12px;
  color: #c6c9d0;
  border-top: 1px solid var(--guide-line);
  font-size: 11px;
}

.guide-cover .meta {
  grid-area: meta;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  width: 100%;
  margin-top: 36px;
}

.guide-cover .meta div {
  display: grid;
  gap: 5px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, .18);
}

.guide-cover .meta b {
  color: var(--guide-orange);
  font-size: 10px;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.guide-cover .meta span {
  color: #d2d4d9;
  font-size: 12px;
}

.guide-hero-actions {
  grid-area: actions;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.guide-cover::before {
  display: none;
}

.guide-hero-actions a {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 17px;
  color: var(--guide-text);
  background: rgba(255, 255, 255, .07);
  border: 1px solid var(--guide-line);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.guide-hero-actions a:last-child {
  color: #17100a;
  background: var(--guide-orange);
  border-color: var(--guide-orange);
}

.guide-module {
  min-width: 0;
  padding-top: 76px;
  scroll-margin-top: 96px;
}

.guide-module-heading {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 5px 34px;
  align-items: end;
  padding: 24px 0 26px;
  border-top: 3px solid var(--guide-orange);
  border-bottom: 1px solid var(--guide-line);
}

.guide-module-heading > span {
  grid-row: 1 / 3;
  align-self: start;
  color: var(--guide-orange);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.guide-module-heading > strong {
  color: var(--guide-text);
  font-size: clamp(28px, 3.5vw, 42px);
  font-weight: 750;
  line-height: 1.05;
  letter-spacing: -.045em;
}

.guide-module-heading > p {
  max-width: 760px;
  margin: 0;
  color: var(--guide-muted);
  font-size: 14px;
}

.guide-topic {
  position: relative;
  min-width: 0;
  padding: 58px 0 64px;
  border-bottom: 1px solid var(--guide-line);
  scroll-margin-top: 96px;
}

.guide-topic::before {
  content: attr(data-topic);
  position: absolute;
  top: 61px;
  right: 0;
  color: rgba(255, 255, 255, .2);
  font: 760 11px ui-monospace, "SFMono-Regular", Consolas, monospace;
}

.guide-topic .page-head {
  display: flex;
  gap: 9px;
  margin: 0 0 12px;
  color: var(--guide-orange);
  font-size: 10px;
  font-weight: 740;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.guide-topic .page-head .mark,
.guide-topic .page-foot {
  display: none;
}

.guide-topic h2 {
  max-width: 810px;
  margin: 0 0 22px;
  color: var(--guide-text);
  font-size: clamp(32px, 4.1vw, 48px);
  font-weight: 740;
  line-height: 1.08;
  letter-spacing: -.045em;
}

.guide-topic-refactoring h2 {
  max-width: 720px;
  font-size: clamp(30px, 3.7vw, 43px);
}

.guide-topic h3 {
  margin: 0 0 10px;
  color: var(--guide-text);
  font-size: clamp(19px, 2vw, 24px);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -.025em;
}

.guide-topic h4 {
  margin: 0 0 8px;
  color: var(--guide-text);
  font-size: 15px;
}

.guide-topic p,
.guide-topic li,
.guide-topic td {
  color: var(--guide-muted);
}

.guide-topic p {
  margin: 0 0 17px;
}

.guide-topic .lead {
  max-width: 780px;
  margin-bottom: 34px;
  color: #c4c7ce;
  font-size: clamp(18px, 2vw, 21px);
  line-height: 1.5;
}

.guide-topic .small {
  font-size: 14px;
  line-height: 1.58;
}

.guide-topic .micro {
  font-size: 12px;
}

.guide-topic strong {
  color: var(--guide-text);
}

.guide-topic a {
  color: var(--guide-blue-light);
}

.guide-topic ul,
.guide-topic ol {
  margin: 0 0 22px;
  padding-left: 22px;
}

.guide-topic li {
  margin-bottom: 7px;
}

.grid-2,
.grid-3,
.grid-4,
.toc,
.flow {
  display: grid;
  min-width: 0;
  gap: 20px;
}

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

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

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

.span-2 {
  grid-column: span 2;
}

.stack > * + * {
  margin-top: 20px;
}

.card {
  min-width: 0;
  padding: 21px 0 7px;
  border-top: 1px solid var(--guide-line);
}

.card.dark {
  padding: 24px;
  background: var(--guide-surface);
  border: 1px solid var(--guide-line);
  border-radius: 18px;
}

.card.orange {
  border-top: 3px solid var(--guide-orange);
}

.card.bluebar {
  border-top: 3px solid var(--guide-blue);
}

.card.greenbar {
  border-top: 3px solid var(--guide-green);
}

.card.redbar {
  border-top: 3px solid var(--guide-red);
}

.callout {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 13px;
  margin: 27px 0;
  padding: 7px 0 7px 18px;
  border-left: 3px solid var(--guide-orange);
}

.callout.info {
  border-left-color: var(--guide-blue);
}

.callout.ok {
  border-left-color: var(--guide-green);
}

.callout.danger {
  border-left-color: var(--guide-red);
}

.callout .badge {
  color: var(--guide-text);
  font: 760 13px ui-monospace, "SFMono-Regular", Consolas, monospace;
}

.pill {
  display: inline-block;
  padding: 0 0 3px;
  color: var(--guide-blue-light);
  border-bottom: 2px solid currentColor;
  font-size: 10px;
  font-weight: 730;
}

.pill.orange,
.accent {
  color: var(--guide-orange);
}

.pill.green,
.green {
  color: var(--guide-green);
}

.pill.gray,
.muted {
  color: var(--guide-muted);
}

.pill.red,
.red {
  color: var(--guide-red);
}

.blue {
  color: var(--guide-blue-light);
}

.flow {
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)) !important;
  gap: 10px !important;
  margin: 27px 0 !important;
}

.flow .step {
  position: relative;
  min-width: 0;
  min-height: 112px;
  padding: 16px 12px 12px 0;
  border-top: 2px solid rgba(255, 255, 255, .18);
}

.flow .no {
  color: var(--guide-orange);
  font: 750 9px ui-monospace, "SFMono-Regular", Consolas, monospace;
}

.flow h3 {
  margin-top: 10px !important;
  font-size: 15px;
}

.flow p {
  margin: 0;
  font-size: 11px;
  line-height: 1.4;
}

.guide-topic-pipeline > .flow {
  grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
}

.guide-topic-pipeline > .flow .step {
  min-height: 104px;
}

.toc {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 34px;
  margin: 30px 0;
}

.toc-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 8px;
  padding: 11px 0;
  border-bottom: 1px solid var(--guide-line);
}

.toc-row .chapter {
  color: var(--guide-orange);
  font: 750 10px ui-monospace, "SFMono-Regular", Consolas, monospace;
}

.toc-row strong {
  font-size: 13px;
}

.toc-row .page {
  display: none;
}

.chapter-band {
  display: flex;
  gap: 13px;
  align-items: center;
  margin-bottom: 24px;
}

.chapter-band .index {
  display: grid;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  place-items: center;
  color: #231405;
  background: var(--guide-orange);
  border-radius: 6px;
  font: 760 10px ui-monospace, "SFMono-Regular", Consolas, monospace;
}

.chapter-band .line,
.rule {
  height: 1px;
  background: var(--guide-line);
}

.chapter-band .line {
  flex: 1;
}

.rule {
  margin: 30px 0;
}

.quote {
  margin: 28px 0;
  padding: 7px 0 7px 20px;
  color: #c9ccd3;
  border-left: 3px solid var(--guide-orange);
  font-size: 18px;
}

.checklist {
  padding-left: 0 !important;
  list-style: none;
}

.checklist li {
  position: relative;
  padding-left: 26px;
}

.checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--guide-green);
  font-weight: 800;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 15px 0 25px;
}

.legend span {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  color: var(--guide-muted);
  font-size: 11px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.terminal,
.guide-code pre {
  color: #e8e9ec;
  background: #090b0f;
  border: 1px solid #292d35;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
}

.guide-terminal-code .terminal {
  width: 100%;
  height: 100%;
  margin: 0;
  border: 0;
  border-top: 1px solid #292d35;
  border-radius: 0 0 9px 9px;
}

.terminal {
  min-width: 0;
  padding: 23px;
  overflow-x: auto;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.58;
}

.terminal .prompt,
.terminal .cmd {
  color: var(--guide-blue-light);
}

.terminal .comment,
.guide-code .c {
  color: #89919f;
}

.guide-code {
  position: relative;
  min-width: 0;
  margin: 0 0 25px;
  padding-top: 42px;
  background: #20232a;
  border: 1px solid #292d35;
  border-radius: 10px;
}

.guide-code .code-title {
  position: absolute;
  top: 0;
  right: 112px;
  left: 0;
  display: flex;
  gap: 12px;
  align-items: center;
  height: 42px;
  margin: 0;
  padding: 12px 14px;
  overflow: hidden;
  color: #d1d4da;
  font-size: 11px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.guide-code .code-title span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.guide-code .code-title span:first-child {
  flex: 1 1 auto;
}

.guide-code .code-title span:last-child {
  flex: 0 1 auto;
  color: #9da3ae;
  text-align: right;
}

.guide-code pre {
  width: 100%;
  max-width: 100%;
  margin: 0 !important;
  padding: 20px 22px;
  overflow-x: auto;
  border: 0;
  border-top: 1px solid #292d35;
  border-radius: 0 0 9px 9px;
  font-size: 12px;
  line-height: 1.58;
  tab-size: 2;
  white-space: pre;
  overflow-wrap: normal;
  scrollbar-width: thin;
  scrollbar-color: #414752 #0d1015;
}

.guide-code pre code {
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  font: inherit;
}

.guide-copy-button {
  position: absolute;
  z-index: 2;
  top: 6px;
  right: 6px;
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  color: #dfe7f2;
  background: #11151b;
  border: 1px solid rgba(255, 255, 255, .13);
  font: 700 10px "Inter", ui-sans-serif, sans-serif;
  cursor: pointer;
}

.guide-copy-button[data-state="copied"] {
  color: #0a1813;
  background: var(--guide-green);
  border-color: var(--guide-green);
}

.guide-copy-button[data-state="error"] {
  color: #fff;
  background: #8b2d3b;
  border-color: var(--guide-red);
}

.guide-topic code:not(pre code) {
  padding: 2px 5px;
  color: #dfe9f6;
  background: #1c2028;
  border-radius: 4px;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: .9em;
}

.guide-code .k {
  color: #77b8ff;
}

.guide-code .s {
  color: #9be5bd;
}

.guide-code .n {
  color: #ffc184;
}

.table-scroll {
  width: 100%;
  min-width: 0;
  margin: 0 0 28px;
  overflow-x: auto;
  border-top: 1px solid var(--guide-line);
  scrollbar-width: thin;
  scrollbar-color: #414752 #0d1015;
}

.table-scroll table {
  width: 100%;
  min-width: 680px;
  margin: 0;
  color: var(--guide-muted);
  border-collapse: collapse;
  font-size: 12px;
  line-height: 1.45;
}

.table-scroll th {
  padding: 12px 10px;
  color: #c6c9d0;
  border-bottom: 1px solid rgba(255, 255, 255, .22);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: .05em;
  text-align: left;
  text-transform: uppercase;
}

.table-scroll td {
  padding: 12px 10px;
  vertical-align: top;
  border-bottom: 1px solid var(--guide-line);
}

.guide-topic-refactoring .table-scroll table {
  min-width: 0;
  table-layout: fixed;
}

.guide-topic-refactoring .table-scroll th:first-child,
.guide-topic-refactoring .table-scroll td:first-child {
  width: 24%;
}

.source-list {
  margin: 0;
  padding: 0 !important;
  list-style: none;
}

.source-list li {
  padding: 0 0 14px;
  border-bottom: 1px solid var(--guide-line);
}

.source-list a {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
  font-size: 11px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.source-list a::after {
  content: " ↗";
}

.guide-colophon {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 46px;
  padding-top: 25px;
  border-top: 1px solid var(--guide-line);
}

.guide-colophon p {
  max-width: 690px;
  color: var(--guide-muted);
  font-size: 11px;
}

.guide-colophon p {
  margin: 0;
}

/* Neutralize the old print-only spacing that remains around preserved source content. */
.aws-guide-page [style*="margin-top"] {
  margin-top: 24px !important;
}

.aws-guide-page [style*="margin-bottom"] {
  margin-bottom: 0 !important;
}

.aws-guide-page [style*="font-size"] {
  font-size: inherit !important;
}

.aws-guide-page [style*="position:absolute"] {
  position: static !important;
}

@media (max-width: 1060px) {
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .guide-topic-pipeline > .flow {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 850px) {
  html:has(.aws-guide-shell) .site-nav {
    background: rgba(17, 18, 22, .98);
  }

  .aws-guide-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    width: auto;
    margin-inline: 15px;
    padding: 78px 0 88px;
  }

  .aws-guide-rail {
    z-index: 35;
    top: 64px;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 7px;
    margin-inline: -1px;
    padding: 8px;
    background: rgba(13, 16, 21, .94);
    border: 1px solid var(--guide-line);
    border-radius: 16px;
    backdrop-filter: blur(18px);
  }

  .aws-guide-rail > span {
    padding: 1px 7px;
    white-space: nowrap;
  }

  .aws-guide-rail ol {
    flex-direction: row;
    gap: 5px;
    padding-bottom: 3px;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, .2) transparent;
  }

  .aws-guide-rail li {
    flex: 0 0 auto;
  }

  .aws-guide-rail ol a {
    width: max-content;
    max-width: 210px;
    min-height: 36px;
    align-items: center;
    padding: 7px 9px;
    background: rgba(255, 255, 255, .025);
    border: 1px solid transparent;
    border-radius: 9px;
    font-size: 11px;
    line-height: 1.25;
  }

  .aws-guide-rail ol a:hover,
  .aws-guide-rail ol a:focus-visible,
  .aws-guide-rail ol a[aria-current="location"] {
    background: rgba(255, 255, 255, .07);
    border-color: rgba(255, 255, 255, .08);
  }

  .guide-topic.guide-cover {
    min-height: 0;
  }

  .guide-module {
    padding-top: 62px;
    scroll-margin-top: 65px;
  }

  .guide-module-heading {
    grid-template-columns: 145px minmax(0, 1fr);
  }

  .guide-topic {
    padding: 50px 0 56px;
    scroll-margin-top: 65px;
  }

  .guide-topic::before {
    top: 52px;
  }

  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .guide-topic-pipeline > .flow {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .guide-topic-pipeline > .flow .step {
    min-height: 92px;
  }
}

@media (max-width: 700px) {
  .guide-topic.guide-cover {
    grid-template-areas:
      "hero"
      "map"
      "meta"
      "actions";
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: repeat(4, max-content);
    padding: 34px 24px;
    border-radius: 22px;
  }

  .guide-cover .hero {
    margin-top: 0;
  }

  .guide-cover-map {
    margin-top: 28px;
  }

  .guide-cover h1 {
    font-size: clamp(46px, 14vw, 62px);
  }

  .guide-cover .meta,
  .grid-2,
  .grid-3,
  .grid-4,
  .toc {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .span-2 {
    grid-column: auto;
  }

  .guide-module-heading {
    grid-template-columns: minmax(0, 1fr);
    gap: 7px;
  }

  .guide-module-heading > span {
    grid-row: auto;
  }

  .guide-topic h2,
  .guide-topic-refactoring h2 {
    max-width: calc(100% - 28px);
    font-size: clamp(29px, 9.4vw, 38px);
    overflow-wrap: anywhere;
  }

  .table-scroll {
    overflow: visible;
    border: 0;
  }

  .table-scroll table,
  .table-scroll thead,
  .table-scroll tbody,
  .table-scroll tr,
  .table-scroll th,
  .table-scroll td {
    display: block;
    width: 100% !important;
    min-width: 0;
  }

  .table-scroll thead {
    position: absolute;
    width: 1px !important;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .table-scroll tbody {
    display: grid;
    gap: 10px;
  }

  .table-scroll tr {
    padding: 7px 15px;
    background: var(--guide-surface);
    border: 1px solid var(--guide-line);
    border-radius: 12px;
  }

  .table-scroll td {
    padding: 10px 0;
    border-bottom: 1px solid var(--guide-line);
    overflow-wrap: anywhere;
  }

  .table-scroll td:last-child {
    border-bottom: 0;
  }

  .table-scroll td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    color: var(--guide-orange);
    font-size: 9px;
    font-weight: 760;
    letter-spacing: .07em;
    text-transform: uppercase;
  }

}

@media (max-width: 430px) {
  .aws-guide-shell {
    font-size: 15px;
  }

  .aws-guide-rail ol a {
    max-width: 148px;
    padding-inline: 7px;
    font-size: 10px;
  }

  .guide-topic.guide-cover {
    padding-inline: 20px;
  }

  .guide-cover .meta {
    gap: 11px;
  }

  .guide-hero-actions {
    display: grid;
  }

  .guide-topic-pipeline > .flow {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  }

  .guide-code pre,
  .terminal {
    padding: 17px 15px;
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .aws-guide-shell *,
  .aws-guide-shell *::before,
  .aws-guide-shell *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
