/* Why Whybook. It uses the tokens and components of styles.css, and adds the
   thesis at the head of the page, the facts behind the understanding gap, and
   each of its four gaps beside what Whybook does about it. */

.why-thesis {
  margin-top: clamp(28px, 4vw, 40px);
  padding: clamp(22px, 3.5vw, 40px);
  border-radius: var(--r-3);
  background: var(--bg-stage);
}

.why-thesis .thesis-row {
  margin-top: 0;
}

/* What AI does now, beside what it costs. */
.facts-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.facts-group {
  padding: 20px 22px 22px;
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  background: var(--surface);
}

.facts-group.is-cost {
  border-color: var(--accent-edge);
  background: var(--accent-wash);
}

.facts-title {
  margin-bottom: 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.is-cost .facts-title {
  color: var(--accent-ink);
}

.fact-cards {
  list-style: none;
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
}

.fact-cards li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 15.5px;
  color: var(--ink-2);
}

.fact-cards p {
  padding-top: 5px;
}

.fact-ic {
  flex: none;
  width: 34px;
  height: 34px;
  padding: 6px;
  border-radius: 8px;
  background: var(--blue-wash);
  color: var(--blue);
}

.is-cost .fact-ic {
  background: var(--surface);
  color: var(--accent-ink);
}

/* Each gap above what Whybook does about it, the four side by side, their
   answers level at the foot of the row. */
.gap-title {
  margin-top: clamp(40px, 6vw, 56px);
  font-size: 1.275rem;
}

.gap-pairs {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 16px 0 0;
  padding: 0;
}

.gap-pair {
  display: grid;
  grid-template-rows: 1fr auto;
}

.gap-problem {
  padding: 18px 18px 22px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: var(--r-3) var(--r-3) 0 0;
  background: var(--surface);
}

.gap-problem h3 {
  margin-top: 12px;
  font-size: 1.1rem;
}

.gap-problem p {
  margin-top: 8px;
  font-size: 14.5px;
  color: var(--ink-2);
}

.pair-ic {
  width: 36px;
  height: 36px;
  padding: 7px;
  border-radius: 9px;
  background: var(--accent-wash);
  color: var(--accent-ink);
}

.gap-answer {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 16px 18px 18px;
  border: 1px solid var(--blue-edge);
  border-radius: 0 0 var(--r-3) var(--r-3);
  background: var(--blue-wash);
  font-size: 14.5px;
  color: var(--ink-2);
  text-decoration: none;
}

/* A notch in the answer's top edge, under the gap that it answers. */
.gap-answer::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 28px;
  width: 14px;
  height: 14px;
  border-top: 1px solid var(--blue-edge);
  border-left: 1px solid var(--blue-edge);
  background: var(--blue-wash);
  transform: rotate(45deg);
}

.gap-answer:hover {
  border-color: var(--blue-fill);
}

.gap-answer .pair-ic {
  background: var(--surface);
  color: var(--blue);
}

.gap-answer-kicker {
  margin-top: 8px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
}

.gap-answer b {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  text-wrap: balance;
}

/* A space that does not break: the arrow stays with the last word. */
.gap-answer b::after {
  content: '\00a0\2192';
  color: var(--blue);
}

/* The risk of offered questions, as a note with its icon in the margin. */
.why-note {
  position: relative;
  padding: 18px 20px 18px 68px;
  border-radius: var(--r-3);
  background: var(--warn-wash);
}

.note-ic {
  position: absolute;
  left: 20px;
  top: 18px;
  width: 34px;
  height: 34px;
  padding: 6px;
  border-radius: 8px;
  background: var(--surface);
  color: var(--warn-ink);
}

/* A card of Designed to last: the project that stopped, in the quieter
   text, then what Whybook does, marked in blue. */
#lasting .case {
  font-size: 14px;
  color: var(--ink-3);
}

#lasting .ours {
  margin-top: 10px;
  padding-left: 12px;
  border-left: 2px solid var(--blue-edge);
  color: var(--ink);
}

/* The note of Whybook's creator, at the head of Why now: its introduction,
   in the creator's own words. */
.now-note {
  margin: 0 0 clamp(24px, 3.5vw, 36px);
  padding-left: clamp(16px, 2.5vw, 24px);
  border-left: 3px solid var(--accent-fill);
}

.now-note blockquote {
  margin: 0;
  font-family: var(--font-content);
  font-size: clamp(1.2rem, 1.05rem + 0.6vw, 1.45rem);
  line-height: 1.45;
  color: var(--ink);
  text-wrap: pretty;
}

.now-note figcaption {
  margin-top: 10px;
  font-size: 14px;
  color: var(--ink-3);
}

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

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

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