/* DerDenker 1.1.12 — shared visual language for the six permanent foundation pages. */
.dd-foundation-page {
  padding: 38px 0 58px;
}

.dd-foundation-reading {
  width: min(840px, calc(100% - 48px));
  margin-inline: auto;
}

.dd-foundation-header {
  margin: 0 0 18px;
}

.dd-foundation-kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 13px;
  color: var(--muted);
  font: 700 11px/1.35 var(--sans);
  letter-spacing: .26em;
  text-transform: uppercase;
}

.dd-foundation-kicker::before {
  content: "";
  width: 26px;
  border-top: 1px solid #8b98a1;
}

.dd-foundation-kicker span { white-space: nowrap; }

.dd-foundation-header h1 {
  max-width: 760px;
  margin: 0;
  color: var(--ink);
  font: 700 clamp(38px, 4.3vw, 56px)/1.04 var(--serif);
  letter-spacing: -.032em;
  overflow-wrap: break-word;
}

.dd-foundation-content.content {
  color: #253744;
  font: 400 17px/1.62 var(--sans);
}

.dd-foundation-content.content > :first-child { margin-top: 0; }

.dd-foundation-content.content p {
  margin: 0 0 16px;
  font: inherit;
}

/* The two opening paragraphs form the quiet foundation-page lead. */
.dd-foundation-content.content > p:nth-of-type(-n+2) {
  max-width: 800px;
  color: #34495a;
  font: 400 18.5px/1.55 var(--serif);
}

.dd-foundation-content.content h2 {
  margin: 38px 0 15px;
  color: var(--ink);
  font: 700 31px/1.16 var(--serif);
  letter-spacing: -.018em;
}

.dd-foundation-content.content h2:first-of-type {
  margin-top: 34px;
  padding-top: 31px;
  border-top: 1px solid var(--line);
}

.dd-foundation-content.content h3 {
  margin: 28px 0 10px;
  color: var(--ink);
  font: 700 20px/1.25 var(--serif);
}

.dd-foundation-content.content a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: .18em;
}

/* Insight list: h2 -> explanatory paragraph -> list. */
.dd-foundation-content.content h2 + p + ul {
  display: grid;
  gap: 12px;
  margin: 22px 0 27px;
  padding: 0;
  list-style: none;
  counter-reset: dd-foundation-insight;
}

.dd-foundation-content.content h2 + p + ul > li {
  position: relative;
  min-height: 62px;
  margin: 0;
  padding: 7px 0 7px 82px;
  list-style: none;
  line-height: 1.5;
  counter-increment: dd-foundation-insight;
}

.dd-foundation-content.content h2 + p + ul > li::before {
  content: "0" counter(dd-foundation-insight);
  position: absolute;
  left: 0;
  top: 2px;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #eef1f2;
  color: #31526a;
  font: 700 13px/1 var(--sans);
  letter-spacing: .04em;
}

.dd-foundation-content.content h2 + p + ul > li > strong:first-child {
  display: block;
  margin-bottom: 2px;
  color: var(--ink);
  font: 700 18px/1.35 var(--serif);
}

/* Memory gets the icon language from the approved mock-up. */
.dd-foundation-page--memory .dd-foundation-content.content h2 + p + ul > li::before {
  content: "";
  background-color: #eef1f2;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 28px 28px;
}
.dd-foundation-page--memory .dd-foundation-content.content h2 + p + ul > li:nth-child(1)::before {
  background-image: url('../icons/foundation-up.svg');
}
.dd-foundation-page--memory .dd-foundation-content.content h2 + p + ul > li:nth-child(2)::before {
  background-image: url('../icons/foundation-down.svg');
}
.dd-foundation-page--memory .dd-foundation-content.content h2 + p + ul > li:nth-child(3)::before {
  background-image: url('../icons/foundation-warning.svg');
}

/* Action list: a list immediately after an H2 becomes compact tool cards. */
.dd-foundation-content.content h2 + ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 20px 0 30px;
  padding: 0;
  list-style: none;
  counter-reset: dd-foundation-action;
}

.dd-foundation-content.content h2 + ul > li {
  position: relative;
  min-width: 0;
  min-height: 172px;
  margin: 0;
  padding: 27px 26px 25px 92px;
  border: 1px solid #eceae5;
  border-radius: 5px;
  background: #f5f6f5;
  list-style: none;
  counter-increment: dd-foundation-action;
  font-size: 15.5px;
  line-height: 1.52;
}

.dd-foundation-content.content h2 + ul > li::before {
  content: "0" counter(dd-foundation-action);
  position: absolute;
  left: 25px;
  top: 25px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #dfe5e8;
  color: #214965;
  font: 700 16px/1 var(--sans);
}

.dd-foundation-content.content h2 + ul > li > strong:first-child {
  display: block;
  margin: 3px 0 15px;
  color: #214965;
  font: 750 11px/1.35 var(--sans);
  letter-spacing: .20em;
  text-transform: uppercase;
}

/* Reuse the established DerDenker keyline as the closing thought. */
.dd-foundation-content.content .dd-keyline {
  margin: 26px 0 0;
  padding: 8px 0 8px 22px;
  border-left: 3px solid #2a648b;
  color: var(--ink);
  font: 500 21px/1.45 var(--serif);
  letter-spacing: -.012em;
}

.dd-foundation-content.content .dd-keyline strong {
  font-weight: 700;
}

.dd-foundation-content.content > :last-child {
  margin-bottom: 0;
}

@media (max-width: 700px) {
  .dd-foundation-page { padding: 28px 0 42px; }
  .dd-foundation-reading { width: calc(100% - 36px); }
  .dd-foundation-kicker { margin-bottom: 11px; font-size: 10.5px; }
  .dd-foundation-kicker::before { width: 22px; }
  .dd-foundation-header h1 { font-size: 36px; line-height: 1.08; }
  .dd-foundation-content.content { font-size: 16px; line-height: 1.58; }
  .dd-foundation-content.content > p:nth-of-type(-n+2) { font-size: 17.5px; line-height: 1.52; }
  .dd-foundation-content.content h2 { margin-top: 31px; font-size: 26px; }
  .dd-foundation-content.content h2:first-of-type { margin-top: 28px; padding-top: 26px; }
  .dd-foundation-content.content h2 + p + ul { gap: 10px; margin-top: 18px; }
  .dd-foundation-content.content h2 + p + ul > li { min-height: 52px; padding: 5px 0 5px 66px; }
  .dd-foundation-content.content h2 + p + ul > li::before { width: 46px; height: 46px; }
  .dd-foundation-page--memory .dd-foundation-content.content h2 + p + ul > li::before { background-size: 24px 24px; }
  .dd-foundation-content.content h2 + p + ul > li > strong:first-child { font-size: 17px; }
  .dd-foundation-content.content h2 + ul { grid-template-columns: 1fr; gap: 12px; margin-top: 17px; }
  .dd-foundation-content.content h2 + ul > li { min-height: 0; padding: 22px 20px 21px 76px; font-size: 15px; }
  .dd-foundation-content.content h2 + ul > li::before { left: 18px; top: 20px; width: 40px; height: 40px; font-size: 14px; }
  .dd-foundation-content.content h2 + ul > li > strong:first-child { margin-top: 1px; margin-bottom: 10px; }
  .dd-foundation-content.content .dd-keyline { margin-top: 24px; padding: 6px 0 6px 16px; font-size: 19px; }
}
