/* Cross-page layout normalization for the static marketing site. */
body[data-marketing-group] .wrap,
body[data-marketing-group] .container,
body[data-marketing-group] .article,
body[data-marketing-group] .story-content {
  min-width: 0;
}

/* Older product/trust/use-case pages capped the nav at 1100px while their body used 1200px. */
body[data-marketing-group] header > nav.wrap {
  max-width: none;
}

/* Keep hero copy readable without making it look like a narrow mobile column on desktop. */
body[data-marketing-group] .page-hero p {
  max-width: min(760px, 100%);
}

/* About: the story was only 720px wide and had no mobile side gutters. */
body[data-marketing-group="trust"] .story-content {
  width: min(860px, calc(100% - 40px));
  max-width: 860px;
  margin-inline: auto;
}

body[data-marketing-group="trust"] .commit-grid {
  max-width: 900px;
}

/* Privacy: widen the legal copy while preserving a comfortable reading measure. */
body[data-marketing-group="trust"] > .container {
  width: min(960px, calc(100% - 40px));
  max-width: 960px;
  padding-inline: 0;
}

/* Legacy long-form guides used a noticeably narrower 980px shell than newer guides. */
body[data-marketing-group="guide"]:has(article.content) .wrap {
  width: min(1040px, calc(100% - 40px));
}

body[data-marketing-group="guide"]:has(article.content) .hero p {
  max-width: 840px;
}

/* Give documentation articles more room next to the sidebar without changing the docs hub. */
body[data-marketing-group="docs"] .docs-layout:not(.hub) {
  grid-template-columns: 240px minmax(0, 920px);
  gap: 40px;
}

/* Shared explanatory visuals injected by the marketing content enhancement step. */
.wkt-explainer-section,
.wkt-problem-section,
.wkt-inline-section,
.wkt-editorial-standards {
  padding: 64px 0;
}

.wkt-explainer-section,
.wkt-inline-section {
  background: linear-gradient(135deg, #f8fafc, #eff6ff);
  border-block: 1px solid #e2e8f0;
}

.wkt-problem-section {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
}

.wkt-explainer-head {
  text-align: center;
  max-width: 820px;
  margin: 0 auto 30px;
}

.wkt-explainer-head h2 {
  margin: 8px 0 10px;
  font-size: clamp(28px, 3.6vw, 42px);
  line-height: 1.15;
  letter-spacing: -.8px;
}

.wkt-explainer-head > p:last-child {
  color: #475569;
  margin: 0;
  font-size: 17px;
}

.wkt-flow {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto minmax(0,1fr) auto minmax(0,1fr);
  align-items: stretch;
  gap: 14px;
}

.wkt-flow-node,
.wkt-visual-card,
.wkt-problem-card,
.wkt-two-layer > div,
.wkt-decision-grid > div {
  min-width: 0;
  border: 1px solid #dbe3ee;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 24px #0f172a08;
}

.wkt-flow-node {
  padding: 24px 20px;
  text-align: center;
}

.wkt-flow-node b,
.wkt-visual-card b,
.wkt-problem-card b,
.wkt-two-layer b,
.wkt-decision-grid b {
  display: block;
  color: #0f172a;
  font-size: 17px;
  line-height: 1.3;
}

.wkt-flow-node small,
.wkt-visual-card span,
.wkt-problem-card small,
.wkt-two-layer small,
.wkt-decision-grid span {
  display: block;
  margin-top: 6px;
  color: #475569;
  font-size: 14px;
  line-height: 1.55;
}

.wkt-step {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
  border-radius: 10px;
  background: #2563eb;
  color: #fff;
  font-weight: 900;
}

.wkt-flow-arrow,
.wkt-plus,
.wkt-equals {
  display: grid;
  place-items: center;
  color: #2563eb;
  font-size: 27px;
  font-weight: 900;
}

.wkt-explainer-note,
.wkt-editorial-note {
  max-width: 860px;
  margin: 22px auto 0;
  padding: 14px 16px;
  border-left: 4px solid #2563eb;
  border-radius: 0 12px 12px 0;
  background: #fff;
  color: #475569;
  font-size: 14px;
}

.wkt-problem-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 16px;
}

.wkt-problem-card {
  padding: 22px;
  color: #0f172a;
  text-decoration: none;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.wkt-problem-card:hover {
  transform: translateY(-2px);
  border-color: #93c5fd;
  box-shadow: 0 14px 30px #0f172a10;
}

.wkt-problem-card > span {
  display: block;
  margin-bottom: 12px;
  font-size: 28px;
}

.wkt-review-strip {
  border-bottom: 1px solid #dbe3ee;
  background: #f8fafc;
}

.wkt-review-strip .wrap {
  display: grid;
  grid-template-columns: auto minmax(0,1fr);
  align-items: center;
  gap: 16px;
  padding-block: 14px;
}

.wkt-review-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #075985;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.wkt-review-strip p {
  margin: 0;
  color: #475569;
  font-size: 13px;
  line-height: 1.55;
}

.wkt-inline-explainer {
  margin: 26px 0;
  padding: 24px;
  border: 1px solid #dbe3ee;
  border-radius: 20px;
  background: linear-gradient(135deg, #fff, #f8fbff);
  box-shadow: 0 8px 24px #0f172a07;
}

.wkt-inline-explainer > h2,
.wkt-inline-explainer > h3 {
  margin: 0 0 18px !important;
  color: #0f172a;
}

.wkt-visual-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 14px;
}

.wkt-visual-grid.wkt-five {
  grid-template-columns: repeat(5, minmax(0,1fr));
}

.wkt-visual-card {
  padding: 18px;
}

.wkt-two-layer {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto minmax(0,1fr) auto minmax(0,1fr);
  gap: 12px;
  align-items: stretch;
}

.wkt-two-layer > div {
  padding: 20px;
}

.wkt-two-layer .wkt-result {
  border-color: #86efac;
  background: #f0fdf4;
}

.wkt-layer-label {
  display: block;
  margin-bottom: 8px;
  color: #2563eb;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
}

.wkt-decision-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 14px;
}

.wkt-decision-grid > div {
  padding: 20px;
}

.wkt-decision-grid .wkt-decision-start {
  grid-column: 1 / -1;
  text-align: center;
  border-color: #bfdbfe;
  background: #eff6ff;
}

.wkt-editorial-standards {
  background: linear-gradient(135deg, #f8fafc, #f0fdf4);
  border-top: 1px solid #e2e8f0;
}

.wkt-editorial-standards h2 {
  margin: 8px 0 12px;
  font-size: clamp(28px, 3.4vw, 38px);
  line-height: 1.2;
}

.wkt-editorial-lede {
  max-width: 880px;
  margin: 0 0 28px;
  color: #475569;
  font-size: 17px;
  line-height: 1.7;
}

@media (max-width: 1000px) {
  .wkt-problem-grid,
  .wkt-visual-grid.wkt-five {
    grid-template-columns: repeat(2, minmax(0,1fr));
  }
}

@media (max-width: 900px) {
  body[data-marketing-group="docs"] .docs-layout:not(.hub) {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .wkt-flow,
  .wkt-two-layer {
    grid-template-columns: 1fr;
  }

  .wkt-flow-arrow,
  .wkt-plus,
  .wkt-equals {
    transform: rotate(90deg);
    min-height: 24px;
  }
}

@media (max-width: 720px) {
  .wkt-problem-grid,
  .wkt-visual-grid,
  .wkt-visual-grid.wkt-five,
  .wkt-decision-grid {
    grid-template-columns: 1fr;
  }

  .wkt-decision-grid .wkt-decision-start {
    grid-column: auto;
  }

  .wkt-review-strip .wrap {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

@media (max-width: 640px) {
  body[data-marketing-group="trust"] .story-content,
  body[data-marketing-group="trust"] > .container,
  body[data-marketing-group="guide"]:has(article.content) .wrap {
    width: min(100% - 28px, 1040px);
  }

  body[data-marketing-group="trust"] > .container {
    padding-top: 28px;
    padding-bottom: 48px;
  }

  .wkt-explainer-section,
  .wkt-problem-section,
  .wkt-inline-section,
  .wkt-editorial-standards {
    padding: 46px 0;
  }

  .wkt-inline-explainer {
    padding: 20px;
  }
}
