/* Reusable illustrative components for case studies: charts, affinity map, matrix, flow and phone mockups. */

.illus-note {
  margin: var(--space-2) 0 0;
  color: var(--color-text-muted);
  font-size: 0.8125rem;
}

/* Flow */
.flow {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin: var(--space-4) 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.flow li {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 56px;
  padding: var(--space-1) var(--space-2);
  background: var(--color-surface);
  border-radius: var(--radius-button);
  font-size: 0.9375rem;
  font-weight: 500;
}

.flow li:not(:last-child)::after {
  content: "\2192";
  margin-left: var(--space-2);
  color: var(--color-text-muted);
}

.flow li.is-gap {
  background: transparent;
  border: 2px solid var(--color-accent);
  color: var(--color-accent);
}

/* Bars */
.bars {
  display: grid;
  gap: var(--space-1);
  margin: var(--space-4) 0 0;
  padding: 0;
  list-style: none;
}

.bars li {
  display: grid;
  grid-template-columns: minmax(180px, 360px) 1fr;
  align-items: center;
  gap: var(--space-2);
}

.bars .bar {
  height: 28px;
  background: var(--color-surface);
  border-radius: 6px;
}

.bars .bar span {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: var(--w);
  min-width: 36px;
  height: 100%;
  padding-inline: var(--space-1);
  background: var(--color-accent);
  border-radius: 6px;
  color: var(--color-on-accent);
  font-size: 0.8125rem;
  font-weight: 700;
}

.bars .is-muted .bar span {
  background: var(--color-text-muted);
}

.bars .label {
  font-size: 0.9375rem;
}

/* Affinity map */
.affinity {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.aff-col h3 {
  min-height: 3.5em;
  margin: 0 0 var(--space-2);
  padding-bottom: var(--space-1);
  border-bottom: 2px solid var(--color-accent);
  font-size: 0.9375rem;
  line-height: 1.25;
}

.aff-col ul {
  display: grid;
  gap: var(--space-1);
  margin: 0;
  padding: 0;
  list-style: none;
}

.note {
  padding: var(--space-2);
  background: #f5f4ef;
  border-radius: 4px;
  color: #141414;
  font-size: 0.8125rem;
  line-height: 1.4;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
}

.aff-col li:nth-child(odd) .note {
  transform: rotate(-1deg);
}

.aff-col li:nth-child(even) .note {
  transform: rotate(0.8deg);
}

.note.is-key {
  background: var(--color-accent);
}

/* Idea chips */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin: 0;
  padding: 0;
  list-style: none;
}

.chips li {
  padding: 8px 14px;
  background: var(--color-surface);
  border-radius: 999px;
  font-size: 0.875rem;
}

.chips li.is-kept {
  background: var(--color-accent);
  color: var(--color-on-accent);
  font-weight: 600;
}

/* Matrix */
.matrix-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2);
}

.matrix {
  position: relative;
  aspect-ratio: 2.3 / 1;
  min-height: 380px;
  background:
    linear-gradient(var(--color-surface), var(--color-surface)) center / 1px 100% no-repeat,
    linear-gradient(var(--color-surface), var(--color-surface)) center / 100% 1px no-repeat;
  border: 1px solid var(--color-surface);
  border-radius: var(--radius-card);
}

.matrix .zone {
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 50%;
  background: rgba(217, 240, 96, 0.1);
  border-top-right-radius: var(--radius-card);
}

.matrix .zone-label {
  position: absolute;
  top: var(--space-1);
  right: var(--space-2);
  color: var(--color-accent);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.matrix .dot {
  position: absolute;
  left: var(--x);
  top: var(--y);
  display: flex;
  align-items: center;
  gap: 8px;
  transform: translate(-6px, -50%);
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
}

.matrix .dot::before {
  content: "";
  flex: none;
  width: 12px;
  height: 12px;
  background: var(--color-accent);
  border-radius: 50%;
}

.matrix .dot.is-parked::before {
  background: var(--color-text-muted);
}

.matrix .dot.is-parked {
  color: var(--color-text-muted);
}

.matrix .dot.is-left {
  flex-direction: row-reverse;
  transform: translate(calc(-100% + 6px), -50%);
}

.axis {
  display: flex;
  justify-content: space-between;
  color: var(--color-text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Concept options */
.verdict {
  display: inline-block;
  margin-bottom: var(--space-1);
  padding: 2px 10px;
  border: 1px solid var(--color-text-muted);
  border-radius: 999px;
  color: var(--color-text-muted);
  font-size: 0.75rem;
  font-weight: 600;
}

.verdict.is-go {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-on-accent);
}

/* Phone mockups */
.phones {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
  margin-top: var(--space-5);
}

.phone-fig {
  margin: 0;
}

.phone-fig figcaption {
  max-width: 270px;
  margin: var(--space-2) auto 0;
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

.phone-fig figcaption strong {
  display: block;
  margin-bottom: 4px;
  color: var(--color-text);
  font-size: 1rem;
}

.phone-mock {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 270px;
  height: 470px;
  margin-inline: auto;
  overflow: hidden;
  background: #fff;
  border: 7px solid #262626;
  border-radius: 40px;
  box-shadow: 0 0 0 1px #3a3a3a, 0 24px 40px rgba(0, 0, 0, 0.45);
  color: #141414;
  font-family: var(--font-sans);
  font-size: 11.5px;
  line-height: 1.35;
}

.phone-mock::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 7px;
  width: 90px;
  height: 4px;
  background: #141414;
  border-radius: 2px;
  transform: translateX(-50%);
}

.pm-status {
  display: flex;
  justify-content: space-between;
  padding: 9px 20px 0;
  font-size: 10px;
  font-weight: 600;
}

.pm-title {
  padding: 12px 16px 4px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.pm-sub {
  padding: 0 16px 6px;
  color: #6b6b66;
  font-size: 10.5px;
}

.pm-body {
  display: grid;
  flex: 1;
  align-content: start;
  gap: 8px;
  padding: 6px 14px 14px;
}

.pm-card {
  padding: 10px 12px;
  background: #f4f4f1;
  border-radius: 12px;
}

.pm-card.is-accent {
  background: #eef7c4;
}

.pm-card h4 {
  margin: 0 0 4px;
  font-size: 11.5px;
  font-weight: 700;
}

.pm-card p {
  margin: 0;
  color: #4a4a46;
  font-size: 10.5px;
}

.pm-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.pm-chip {
  padding: 3px 8px;
  background: #e6e6e0;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 600;
}

.pm-chip.on {
  background: #d9f060;
}

.pm-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.pm-stat {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.pm-stat small {
  display: block;
  color: #6b6b66;
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0;
}

.pm-btns {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.pm-btn {
  flex: 1;
  padding: 8px 6px;
  background: #141414;
  border-radius: 9px;
  color: #fff;
  font-size: 10.5px;
  font-weight: 600;
  text-align: center;
}

.pm-btn.accent {
  background: #d9f060;
  color: #141414;
}

.pm-btn.ghost {
  background: transparent;
  border: 1.5px solid #141414;
  color: #141414;
}

.pm-avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  background: #141414;
  border-radius: 50%;
  color: #d9f060;
  font-size: 12px;
  font-weight: 700;
}

.pm-profile {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pm-profile b {
  display: block;
  font-size: 11.5px;
}

.pm-profile span {
  color: #6b6b66;
  font-size: 10px;
}

.pm-opt {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 9px 10px;
  border: 1.5px solid #dcdcd6;
  border-radius: 12px;
}

.pm-opt.is-sel {
  background: #eef7c4;
  border-color: #141414;
}

.pm-radio {
  flex: none;
  width: 13px;
  height: 13px;
  margin-top: 1px;
  border: 1.5px solid #141414;
  border-radius: 50%;
}

.pm-opt.is-sel .pm-radio {
  background: radial-gradient(#141414 45%, transparent 50%);
}

.pm-opt b {
  display: block;
  font-size: 11px;
}

.pm-opt span {
  color: #4a4a46;
  font-size: 10px;
}

.pm-opt .pm-tag {
  margin-top: 3px;
  color: #d9f060;
  font-size: 9px;
}

.pm-steps {
  display: grid;
  gap: 0;
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
}

.pm-steps li {
  position: relative;
  padding: 0 0 12px 22px;
  font-size: 10.5px;
}

.pm-steps li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 12px;
  height: 12px;
  background: #141414;
  border-radius: 50%;
}

.pm-steps li::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 15px;
  bottom: -1px;
  width: 2px;
  background: #cfcfc8;
}

.pm-steps li:last-child::after {
  display: none;
}

.pm-steps li.is-now::before {
  background: #d9f060;
  box-shadow: 0 0 0 2px #141414;
}

.pm-steps li.is-next::before {
  background: #fff;
  border: 1.5px solid #9b9b94;
}

.pm-steps b {
  display: block;
}

.pm-steps span {
  color: #6b6b66;
  font-size: 9.5px;
}

.pm-tag {
  display: inline-block;
  padding: 2px 7px;
  background: #141414;
  border-radius: 999px;
  color: #d9f060;
  font-size: 9px;
  font-weight: 700;
}

@media (max-width: 1100px) {
  .phones {
    grid-template-columns: repeat(2, 1fr);
    row-gap: var(--space-5);
  }

  .affinity {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .phones {
    grid-template-columns: 1fr;
  }

  .affinity {
    grid-template-columns: 1fr;
  }

  .aff-col h3 {
    min-height: 0;
  }

  .bars li {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .matrix {
    aspect-ratio: auto;
    min-height: 420px;
  }

  .matrix .dot {
    font-size: 0.75rem;
  }

  .flow li:not(:last-child)::after {
    margin-left: var(--space-1);
  }
}
