.idea {
  --line: #c7bd9f;
  --gold: #816331;
  --inbox-ink: #2c403c;
  --inbox-muted: #475b54;
  --inbox-edge: #ccd6ce;
  --inbox-paper: #f8faf6;
  --inbox-field: #dce4dd;
  --accent-red: #a44d36;
  --berry: #f3e0d8;
  max-inline-size: 1430px;
  margin-inline: auto;
  padding: clamp(55px, 8.3vw, 118px) clamp(22px, 6vw, 88px) clamp(58px, 8vw, 116px);
}

.idea h2 {
  font: 400 clamp(2.5rem, 4.75vw, 4.7rem)/0.97 var(--serif);
  letter-spacing: -0.037em;
  text-wrap: balance;
}

.idea-opening {
  display: grid;
  grid-template-columns: 1.45fr 0.85fr;
  align-items: end;
  gap: 20px clamp(26px, 6vw, 110px);
  margin-block-end: clamp(27px, 4vw, 50px);
}

.idea .eyebrow { margin-block-end: 16px; color: var(--gold); } /* taste-skill-ignore: supplied eyebrow */
.idea-opening > p, .evolution-opening > p, .idea-close > p:last-child {
  max-inline-size: 38ch;
  font-size: clamp(1rem, 1.35vw, 1.18rem);
  line-height: 1.55;
  color: var(--muted-ink);
  text-wrap: pretty;
}

.idea-opening > p { padding-block-end: 4px; }
.comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(12px, 2vw, 29px);
}

.comparison-side { min-inline-size: 0; }
.comparison-side h3 {
  margin: 0 0 10px;
  font-size: 0.875rem;
  font-weight: 650;
  letter-spacing: 0.025em;
}

.comparison-window {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  aspect-ratio: 1.68;
  border-radius: 5px;
}

.comparison-side figcaption {
  padding-block-start: 10px;
  color: var(--muted-ink);
  font-size: clamp(0.88rem, 1.4vw, 1rem);
  line-height: 1.45;
}

.inbox {
  display: grid;
  place-items: center;
  background: var(--inbox-field);
  color: var(--inbox-ink);
  container-type: inline-size;
}

.thread-list {
  width: 73%;
  overflow: hidden;
  background: var(--inbox-paper);
  border: 1px solid #aebdb2; /* taste-skill-ignore: simulated inbox window */
  border-radius: 12px;
}

.inbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: clamp(7px, 2.5cqw, 15px) clamp(7px, 3cqw, 18px);
  font-size: clamp(13px, 3.5cqw, 20px);
}
.unread-total {
  padding: 3px 7px;
  flex: none;
  font-size: 0.8125rem;
  font-weight: 650;
  border-radius: 10px;
  background: var(--berry);
  color: #7f3525;
}

.thread {
  --delay: 0.28s;
  --initial-bg: #dddfd0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(5px, 2cqw, 12px);
  padding: clamp(5px, 1.65cqw, 12px) clamp(7px, 3cqw, 18px);
  border-block-start: 1px solid var(--inbox-edge);
  font-size: clamp(13px, 2.7cqw, 15px);
  line-height: 1.27;
}
.thread--theo { --delay: 0.98s; --initial-bg: #e5ddd0; }
.thread--plans { --delay: 1.76s; --initial-bg: #d8e5df; }
.thread-initials {
  display: grid;
  place-items: center;
  inline-size: clamp(23px, 7cqw, 42px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--initial-bg);
  font-weight: 650;
}

.new-message, .earlier-message, .thread-state {
  display: block;
  font-size: 0.8125rem;
  color: var(--inbox-muted);
}
.earlier-message { display: none; }
.thread-state { text-align: end; }
.thread-state span {
  display: block;
  margin: 4px 1px 0 auto;
  inline-size: 7px;
  block-size: 7px;
  border-radius: 50%;
  background: var(--accent-red);
}

.notice {
  visibility: hidden;
  position: absolute;
  right: 8%;
  bottom: 8%;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #c89e8d; /* taste-skill-ignore: simulated notification */
  border-radius: 9px;
  padding: clamp(6px, 1.6cqw, 11px);
  background: #fbede6;
  color: #634138;
  font-size: 0.8125rem;
  line-height: 1.32;
}

.notice-icon {
  border-radius: 50%;
  flex: none;
  width: 8px;
  height: 8px;
  background: var(--accent-red);
}

.journey { background: #cfce9f; }
.journey-landscape {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 54%;
}
.messenger {
  position: absolute;
  bottom: 11%;
  left: 47%;
  width: 25%;
  aspect-ratio: 1;
  transform: translateX(-50%);
}
.messenger-still, .messenger-frames {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.messenger-frames {
  opacity: 0;
  background-repeat: no-repeat;
}
.messenger-walk {
  background-image: url("assets/messenger-walk.webp");
  background-size: 1600% 100%;
}
.messenger-snack {
  background-image: url("assets/messenger-snack.webp");
  background-size: 2000% 100%;
}
.messenger-letter {
  position: absolute;
  width: 36%;
  left: 60%;
  bottom: 33%;
  transform: rotate(-14deg);
}

@media (prefers-reduced-motion: no-preference) {
  .comparison[data-motion] .thread--plans,
  .comparison[data-motion] .unread-total,
  .comparison[data-motion] .new-message,
  .comparison[data-motion] .thread-state { visibility: hidden; }
  .comparison[data-motion] .new-message,
  .comparison[data-motion] .earlier-message { grid-area: 2 / 1; display: block; }
  .comparison[data-motion] .thread > div { display: grid; }
  .comparison[data-motion] .messenger { left: 14%; }

  .comparison[data-motion="playing"] .thread--plans { animation: msg-show 0.2s 1.76s both; }
  .comparison[data-motion="playing"] .unread-total { animation: msg-show 0.22s 1.88s both; }
  .comparison[data-motion="playing"] .new-message,
  .comparison[data-motion="playing"] .thread-state { animation: msg-show 0.2s var(--delay) both; }
  .comparison[data-motion="playing"] .earlier-message { animation: msg-hide 0.12s var(--delay) both; }
  .comparison[data-motion="playing"] .notice { animation: notice-in-out 1.8s 1.55s both; }
  .comparison[data-motion="playing"] .messenger { animation: cross-pond 7.5s linear both; }
  .comparison[data-motion="playing"] .messenger-still { visibility: hidden; }
  .comparison[data-motion="playing"] .messenger-walk {
    animation: walk-frames 0.94s steps(15, end) 8 both, walk-visibility 7.5s step-end both;
  }
  .comparison[data-motion="playing"] .messenger-snack {
    animation: snack-frames 2.05s 2.65s steps(19, end) 1 both, snack-visibility 7.5s step-end both;
  }
  .comparison[data-motion="playing"] .messenger-letter { animation: letter-gesture 7.5s linear both; }
}
@keyframes msg-show { from { visibility: hidden; opacity: 0; } to { visibility: visible; opacity: 1; } }
@keyframes msg-hide { from { opacity: 1; } to { opacity: 0; } }
@keyframes notice-in-out {
  0%, 100% { visibility: hidden; opacity: 0; transform: translateY(6px); }
  14%, 69% { visibility: visible; opacity: 1; transform: translateY(0); }
}
@keyframes cross-pond {
  0% { transform: translateX(-50%); }
  35.3%, 63% { transform: translateX(82%); }
  100% { transform: translateX(226%); }
}
@keyframes walk-frames { to { background-position: 100% 0; } }
@keyframes snack-frames { to { background-position: 100% 0; } }
@keyframes walk-visibility { 0%, 63% { opacity: 1; } 35.3% { opacity: 0; } }
@keyframes snack-visibility { 0%, 63% { opacity: 0; } 35.3% { opacity: 1; } }
@keyframes letter-gesture {
  0%, 100% { transform: rotate(-14deg); }
  31%, 66% { transform: rotate(-14deg); }
  37%, 61% { transform: translate(-8%, 48%) rotate(7deg); }
}

.idea-evolution {
  margin-block-start: clamp(52px, 7.6vw, 105px);
  padding-block-start: clamp(38px, 5.5vw, 72px);
  border-block-start: 1px solid var(--line);
}

.evolution-opening {
  display: grid;
  grid-template-columns: 1.45fr 0.85fr;
  align-items: end;
  gap: 15px clamp(26px, 6vw, 110px);
  margin-block-end: clamp(24px, 3.2vw, 43px);
}
.evolution-opening h2 { font-size: clamp(2.35rem, 4.08vw, 3.95rem); }

.illustrated-stories {
  display: grid;
  grid-template-columns: 1.1fr 1fr 0.9fr;
  align-items: start;
  gap: clamp(13px, 2vw, 28px);
}
.illustrated-stories figure:first-child { padding-block-start: 0; }
.illustrated-stories figure:nth-child(2) { padding-block-start: 19px; }
.illustrated-stories figure:nth-child(3) { padding-block-start: 38px; }

.illustrated-stories img {
  width: 100%;
  height: auto;
  aspect-ratio: 1.4;
  object-fit: cover;
  border-radius: 3px;
}
.illustrated-stories figcaption {
  padding-block-start: 7px;
  font: 400 clamp(1.35rem, 2.35vw, 2.08rem)/1.05 var(--serif);
  letter-spacing: -0.024em;
  text-wrap: balance;
}

.idea-close {
  display: grid;
  grid-template-columns: 1.45fr 0.85fr;
  gap: 14px clamp(26px, 6vw, 110px);
  align-items: center;
  margin-block-start: clamp(39px, 5.6vw, 76px);
  padding-block-start: clamp(22px, 3.2vw, 38px);
  border-block-start: 1px solid var(--line);
}
.closing-line { font: 400 clamp(2.4rem, 4.15vw, 4.05rem)/1 var(--serif); letter-spacing: -0.035em; }
.closing-line strong { font-weight: 400; }

@media (max-width: 820px) {
  .desktop-break { display: none; }
  .idea-opening, .evolution-opening, .idea-close { grid-template-columns: minmax(0,1fr); }
  .idea h2 { text-wrap: pretty; }
  .idea-opening > p, .evolution-opening > p, .idea-close > p:last-child { max-inline-size: 52ch; }
}
@media (max-width: 560px) {
  .comparison { grid-template-columns: minmax(0,1fr); gap: 23px; }
  .comparison-window { aspect-ratio: 1.64; }
  .illustrated-stories { grid-template-columns: 1fr 1fr; gap: 20px 12px; }
  .illustrated-stories figure:first-child { grid-column: 1 / -1; }
  .illustrated-stories figure:first-child img { aspect-ratio: 1.68; }
  .illustrated-stories figure:nth-child(n) { padding-block-start: 0; }
}

@media (max-width: 360px) {
  .inbox { inline-size: 100%; min-block-size: 200px; }
  .thread-list { width: 82%; }
}
