.aws-study-page {
  background:
    linear-gradient(180deg, rgba(8, 16, 22, 0.97), rgba(8, 11, 18, 0.98)),
    radial-gradient(circle at 12% 0%, rgba(45, 212, 191, 0.16), transparent 28rem);
}

.study-main {
  padding-bottom: 64px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 20px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.breadcrumbs a,
.text-link {
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
}

.breadcrumbs a:hover,
.text-link:hover {
  text-decoration: underline;
}

.study-hero {
  padding: 72px 0 36px;
}

.study-hero.compact {
  padding: 34px 0 20px;
}

.study-hero h1 {
  max-width: 14ch;
  font-size: clamp(2.4rem, 6vw, 5.2rem);
}

.study-hero.compact h1 {
  max-width: 18ch;
  font-size: clamp(2rem, 4.5vw, 4.1rem);
}

.study-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.study-article {
  min-width: 0;
}

.study-toc {
  position: sticky;
  top: 126px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(8, 16, 22, 0.76);
  padding: 16px;
  max-height: calc(100vh - 150px);
  overflow: auto;
}

.study-toc strong {
  display: block;
  margin-bottom: 10px;
  color: var(--text);
}

.study-toc nav {
  display: grid;
  gap: 8px;
}

.study-toc a {
  color: var(--muted);
  text-decoration: none;
  line-height: 1.35;
}

.study-toc a:hover,
.study-toc a:focus-visible {
  color: var(--accent);
}

.study-toc .toc-h3 {
  padding-left: 12px;
  font-size: 0.9rem;
}

.mobile-toc {
  display: none;
}

.study-section,
.objective-block {
  border-top: 1px solid var(--line);
  padding: 34px 0;
}

.study-section h2,
.objective-block h3 {
  max-width: 26ch;
}

.study-section p,
.objective-block p,
.study-section li,
.objective-block li,
.study-section td,
.study-section th {
  color: var(--muted);
}

.section-label-row,
.card-topline {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin: 28px 0 18px;
}

.status-pill,
.maturity-pill,
.statusPill {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border: 1px solid rgba(45, 212, 191, 0.42);
  border-radius: 999px;
  padding: 4px 10px;
  color: var(--accent);
  font-weight: 900;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.cert-grid,
.domain-card-grid,
.service-index-grid,
.pattern-grid,
.source-grid,
.diagram-grid,
.loop-grid {
  display: grid;
  gap: 16px;
}

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

.domain-card-grid,
.service-index-grid,
.pattern-grid,
.source-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

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

.cert-card,
.domain-card,
.service-tile,
.pattern-grid article,
.source-card,
.loop-grid article,
.callout,
.code-example,
.diagram-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(13, 22, 32, 0.78);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
}

.cert-card,
.domain-card,
.service-tile,
.pattern-grid article,
.source-card,
.loop-grid article {
  padding: 18px;
}

.cert-card h3,
.domain-card h3,
.service-tile h2 {
  margin-bottom: 8px;
}

.cert-card a,
.domain-card a,
.service-tile a,
.source-card a {
  text-decoration: none;
}

.cert-card a:hover,
.domain-card a:hover,
.service-tile a:hover,
.source-card a:hover {
  color: var(--accent);
}

.compact-stats,
.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.compact-stats div,
.detail-grid div {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.compact-stats dt,
.detail-grid dt {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  font-weight: 900;
}

.compact-stats dd,
.detail-grid dd {
  margin: 4px 0 0;
  color: var(--text);
}

.card-actions,
.pill-cloud,
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.pill-link {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  border: 1px solid rgba(45, 212, 191, 0.32);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--text);
  text-decoration: none;
  background: rgba(45, 212, 191, 0.08);
  font-weight: 800;
}

.pill-link:hover,
.pill-link:focus-visible {
  border-color: var(--accent);
  background: rgba(45, 212, 191, 0.14);
}

.study-search-panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(8, 16, 22, 0.78);
  padding: 22px;
  margin-bottom: 28px;
}

.search-controls {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(180px, 0.8fr) minmax(160px, 0.6fr);
  gap: 12px;
}

.search-controls label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 800;
}

.search-controls input,
.search-controls select {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(3, 7, 12, 0.84);
  color: var(--text);
  padding: 8px 12px;
  font: inherit;
}

.search-results {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.search-result {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 12px;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.04);
}

.search-result span {
  color: var(--accent);
  font-size: 0.78rem;
  text-transform: uppercase;
  font-weight: 900;
}

.search-result p {
  margin: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  display: table;
  background: rgba(8, 16, 22, 0.72);
}

caption {
  caption-side: top;
  padding: 0 0 10px;
  text-align: left;
  color: var(--text);
  font-weight: 900;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--text);
  background: rgba(45, 212, 191, 0.08);
}

.callout {
  padding: 16px;
  margin: 16px 0;
  border-left: 4px solid var(--accent);
}

.callout strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  text-transform: uppercase;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
}

.callout-tip {
  border-left-color: var(--accent);
}

.callout-cost,
.callout-important {
  border-left-color: var(--accent-2);
}

.checklist {
  display: grid;
  gap: 10px;
}

.check-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
}

.check-row input {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: var(--accent);
}

.code-example {
  margin: 16px 0;
  overflow: hidden;
}

.code-example figcaption {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--accent);
  font-weight: 900;
}

pre {
  margin: 0;
  padding: 16px;
  overflow-x: auto;
  background: #03070c;
  color: #d8f7ee;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.92rem;
}

.diagram-card {
  margin: 0;
  padding: 14px;
}

.aws-diagram {
  width: 100%;
  height: auto;
}

.aws-diagram .diagram-flow rect {
  stroke: rgba(45, 212, 191, 0.34);
  fill: #123044;
}

.aws-diagram line {
  stroke: rgba(245, 158, 11, 0.72);
  stroke-width: 3;
}

.aws-diagram text {
  fill: #f5f8fb;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-weight: 800;
  font-size: 17px;
}

.aws-diagram .diagram-title {
  fill: #2dd4bf;
  font-size: 20px;
  text-transform: uppercase;
}

.diagram-card figcaption,
.trademark-note,
.muted {
  color: var(--muted);
}

.prev-next {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding: 24px 0;
}

.prev-next a {
  color: var(--accent);
  font-weight: 900;
  text-decoration: none;
}

.study-footer {
  border-top: 1px solid var(--line);
  background: rgba(5, 10, 15, 0.84);
  padding: 28px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(240px, 0.8fr);
  gap: 24px;
}

.study-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.study-footer a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 800;
}

.study-footer a:hover {
  color: var(--accent);
}

@media (max-width: 960px) {
  .study-layout {
    grid-template-columns: 1fr;
  }

  .study-toc {
    display: none;
  }

  .mobile-toc {
    display: block;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(8, 16, 22, 0.82);
    margin: 0 0 18px;
    padding: 12px 14px;
  }

  .mobile-toc summary {
    cursor: pointer;
    color: var(--text);
    font-weight: 900;
  }

  .mobile-toc nav {
    display: grid;
    gap: 8px;
    margin-top: 12px;
  }

  .mobile-toc a {
    color: var(--muted);
    text-decoration: none;
  }

  .cert-grid,
  .domain-card-grid,
  .service-index-grid,
  .pattern-grid,
  .source-grid,
  .loop-grid,
  .footer-grid,
  .search-controls,
  .compact-stats,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .study-footer nav {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .study-hero {
    padding-top: 42px;
  }

  .study-hero h1,
  .study-hero.compact h1 {
    max-width: 100%;
    font-size: clamp(1.8rem, 9vw, 2.65rem);
    overflow-wrap: break-word;
  }

  .study-hero .lede,
  .study-article p,
  .study-article li {
    max-width: 100%;
    overflow-wrap: break-word;
  }

  th,
  td {
    padding: 10px;
    font-size: 0.92rem;
  }

  .section-label-row,
  .card-topline,
  .prev-next {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

@media print {
  body {
    background: #fff !important;
    color: #000 !important;
  }

  .site-header,
  .study-toc,
  .breadcrumbs,
  .hero-actions,
  .study-footer,
  .network-strip,
  [data-search-results],
  .study-search-panel {
    display: none !important;
  }

  .site-shell,
  .study-layout {
    width: 100%;
    max-width: none;
    display: block;
  }

  .study-section,
  .objective-block {
    break-inside: avoid;
    border-top: 1px solid #888;
  }

  table,
  th,
  td {
    border: 1px solid #888;
    color: #000 !important;
  }

  .cert-card,
  .domain-card,
  .service-tile,
  .pattern-grid article,
  .source-card,
  .callout,
  .diagram-card,
  .code-example {
    box-shadow: none;
    background: #fff !important;
    color: #000 !important;
  }

  pre {
    white-space: pre-wrap;
    background: #f4f4f4 !important;
    color: #000 !important;
  }
}
