/* Workflow page components: AI Freedom Dial, stacked tiers and phase cards. Shares tokens.css, styles.css and case-study.css. */

/* AI Freedom Dial. Meaning is carried by the labels; the gauge is decorative. */
.dial {
  display: block;
  width: 100%;
  height: auto;
}

.dial-seg {
  fill: none;
  stroke: var(--color-text-muted);
  stroke-opacity: 0.3;
  stroke-width: 16;
}

.dial-seg.is-on {
  stroke: var(--color-accent);
  stroke-opacity: 1;
}

.dial-seg.is-soft {
  stroke: var(--color-accent);
  stroke-opacity: 0.55;
}

.dial-needle {
  stroke: var(--color-text);
  stroke-linecap: round;
  stroke-width: 4;
}

.dial-hub {
  fill: var(--color-text);
}

.dial-stage {
  display: grid;
  grid-template-columns: minmax(220px, 320px) 1fr;
  align-items: center;
  gap: var(--space-5);
  margin-top: var(--space-5);
}

.dial-stops {
  display: grid;
  gap: var(--space-1);
  margin: 0;
  padding: 0;
  list-style: none;
}

.dial-stops li {
  display: grid;
  grid-template-columns: 40px 1fr;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2);
  background: var(--color-surface);
  border-radius: var(--radius-button);
  font-weight: 500;
}

.dial-stops .n {
  color: var(--color-accent);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
}

.dial-level {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: 0 0 var(--space-4);
}

.dial-level .dial {
  flex: none;
  width: 120px;
}

.dial-level .label {
  display: block;
  color: var(--color-text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dial-level strong {
  display: block;
  margin-top: 4px;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.25;
}

/* Stacked tiers: the ascent (narrowing upward) and the refinement funnel (narrowing downward) */
.tiers {
  display: grid;
  gap: var(--space-1);
  max-width: 44rem;
  margin: var(--space-4) auto 0;
  padding: 0;
  list-style: none;
}

.tiers li {
  width: var(--w, 100%);
  margin-inline: auto;
  padding: var(--space-2) var(--space-3);
  background: var(--color-surface);
  border-radius: var(--radius-button);
  text-align: center;
}

.tiers .tier-label {
  display: block;
  font-weight: 600;
}

.tiers .tier-sub {
  display: block;
  margin-top: 4px;
  color: var(--color-text-muted);
  font-size: 0.9375rem;
}

.tiers li.is-apex {
  background: var(--color-accent);
  color: var(--color-on-accent);
}

.tiers li.is-apex .tier-sub {
  color: var(--color-on-accent);
}

/* Phase cards */
.phase-card {
  height: 100%;
  padding: var(--space-3);
  background: var(--color-surface);
  border-radius: var(--radius-card);
}

.phase-card .phase-tag {
  display: block;
  margin-bottom: var(--space-1);
  color: var(--color-accent);
  font-size: 0.875rem;
  font-weight: 600;
}

.phase-card h3 {
  margin: 0 0 var(--space-3);
}

.phase-rows {
  display: grid;
  gap: var(--space-2);
  margin: 0;
}

.phase-rows dt {
  color: var(--color-text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.phase-rows dd {
  margin: 4px 0 0;
}

.phase-rows .is-checkpoint {
  padding-left: var(--space-2);
  border-left: 3px solid var(--color-accent);
}

.phase-rows .is-checkpoint dt {
  color: var(--color-accent);
}

.lens-q {
  margin-top: var(--space-2);
  font-style: italic;
}

/* Core design principles */
.principles {
  display: grid;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: principle;
}

.principles li {
  display: grid;
  grid-template-columns: 56px 1fr;
  align-items: baseline;
  gap: var(--space-2);
  padding-block: var(--space-3);
  border-top: 1px solid var(--color-surface);
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.35;
}

.principles li::before {
  content: counter(principle, decimal-leading-zero);
  counter-increment: principle;
  color: var(--color-accent);
  font-size: 0.875rem;
  font-weight: 600;
}

.pull {
  max-width: 32ch;
  margin: 0;
  font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2.5rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

/* Landing-page card thumbnail for the workflow */
.ai-thumb {
  display: grid;
  place-items: center;
  margin: calc(var(--space-3) * -1) calc(var(--space-3) * -1) 0;
  padding: var(--space-4);
  background: var(--color-background);
  border: 1px solid var(--color-surface);
  border-radius: var(--radius-card) var(--radius-card) 0 0;
}

.ai-thumb .dial {
  max-width: 200px;
}

.ai-list {
  margin-top: var(--space-5);
}

/* Drop-off engagement curve thumbnail (parent drop-off case study) */
.dropoff {
  display: block;
  width: 100%;
  max-width: 230px;
  height: auto;
}

.dropoff .df-grid {
  stroke: var(--color-text-muted);
  stroke-opacity: 0.18;
  stroke-width: 1;
}

.dropoff .df-base {
  stroke: var(--color-text-muted);
  stroke-opacity: 0.4;
  stroke-width: 2;
}

.dropoff .df-area {
  fill: var(--color-accent);
  opacity: 0.14;
}

.dropoff .df-line {
  fill: none;
  stroke: var(--color-accent);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dropoff .df-dot {
  fill: var(--color-accent);
}

.dropoff .df-dot.is-off {
  fill: var(--color-background);
  stroke: var(--color-text-muted);
  stroke-width: 2.5;
  stroke-dasharray: 3 3;
}

@media (max-width: 960px) {
  .dial-stage {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }

  .dial-stage .dial {
    max-width: 280px;
  }
}

@media (max-width: 600px) {
  .tiers li {
    width: 100%;
  }

  .principles li {
    grid-template-columns: 40px 1fr;
    font-size: 1.125rem;
  }
}
