/* What each piece of an offer removes, and the steps either side of it.

   Three things share this sheet because they share one idea — an offer is judged
   on more than its price — and one set of tokens: the chip row that says which of
   three costs a composition addresses, the per-piece explanation under a bill,
   and the ladder of neighbouring products at the foot of a product page.

   Loaded wherever a composition card renders (product, family, catalogue, atlas,
   expertise and programme pages). Tokens only: nothing here names a colour. */

/* Tone per delivery primitive, so an explanation line wears the same colour as
   the letter in the bill above it. Declared here rather than borrowed from a page
   sheet: the expertise and programme pages load the ladder sheet, the catalogue
   loads the bundles sheet, and a line must not lose its colour on either. */
.config-lever[data-medium="framework"]{--tone:var(--t0-framework)}
.config-lever[data-medium="office_hours"]{--tone:var(--t0-office_hours)}
.config-lever[data-medium="cohort"]{--tone:var(--t0-cohort)}
.config-lever[data-medium="programme"]{--tone:var(--t0-programme)}
.config-lever[data-medium="capacity"]{--tone:var(--t0-capacity)}

/* Visually hidden, still announced. An unlit chip says "not addressed" to a
   screen reader and nothing at all to the eye, which only needs the dimming. */
.lever-sr{
  position:absolute;
  width:1px;height:1px;
  margin:-1px;padding:0;
  overflow:hidden;
  clip:rect(0 0 0 0);
  white-space:nowrap;
  border:0;
}

/* ---- The chip row ------------------------------------------------------- */
.lever-profile{display:grid;gap:6px;margin:2px 0 0}
.lever-profile-label{
  margin:0;
  color:var(--silver);
  font-size:.66rem;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.lever-chips{
  display:flex;
  flex-wrap:wrap;
  align-content:flex-start;
  align-items:flex-start;
  gap:6px;
  margin:0;padding:0;
  list-style:none;
}
.lever-chip{
  position:relative;
  padding:3px 9px;
  border-radius:999px;
  border:1px solid var(--line);
  font-size:.7rem;
  font-weight:650;
  line-height:1.4;
}
.lever-chip--on{
  color:var(--cyan);
  background:color-mix(in srgb,var(--cyan) 11%,transparent);
  border-color:color-mix(in srgb,var(--cyan) 38%,transparent);
}
.lever-chip--on::before{content:"✓ ";font-weight:800}
.lever-chip--off{
  color:var(--silver);
  opacity:.52;
  border-style:dashed;
  text-decoration:line-through;
  text-decoration-thickness:1px;
}

/* ---- The explanation under a bill --------------------------------------- */
.config-levers{display:grid;gap:10px;margin:10px 0 0}
.config-levers-detail{
  border:1px solid var(--line);
  border-radius:12px;
  background:color-mix(in srgb,var(--navy) 70%,transparent);
}
.config-levers-toggle{
  cursor:pointer;
  list-style:none;
  padding:9px 12px;
  color:var(--silver);
  font-size:.74rem;
  font-weight:700;
  letter-spacing:.04em;
}
.config-levers-toggle::-webkit-details-marker{display:none}
.config-levers-toggle::after{
  content:"";
  display:inline-block;
  width:6px;height:6px;
  margin-left:8px;
  border-right:1.5px solid currentColor;
  border-bottom:1.5px solid currentColor;
  transform:translateY(-2px) rotate(45deg);
  transition:transform .18s ease;
}
.config-levers-detail[open]>.config-levers-toggle::after{transform:translateY(1px) rotate(-135deg)}
.config-levers-toggle:hover{color:var(--cyan)}
.config-levers-toggle:focus-visible{outline:2px solid var(--cyan);outline-offset:2px;border-radius:10px}

.config-lever-list{display:grid;gap:12px;margin:0;padding:2px 12px 12px;list-style:none}
.config-lever{display:grid;grid-template-columns:auto minmax(0,1fr);gap:10px;align-items:start}
.config-lever-glyph{
  display:grid;place-items:center;
  width:19px;height:19px;
  border-radius:6px;
  background:color-mix(in srgb,var(--tone,var(--cyan)) 16%,transparent);
  border:1px solid color-mix(in srgb,var(--tone,var(--cyan)) 42%,transparent);
  color:var(--tone,var(--cyan));
  font-size:.68rem;
  font-weight:800;
  line-height:1;
}
.config-lever-body{display:grid;gap:5px;min-width:0}
.config-lever-name{margin:0;font-size:.8rem;font-weight:700;line-height:1.35;overflow-wrap:anywhere}
.config-lever-facts{display:grid;gap:2px;margin:0;font-size:.76rem;line-height:1.5}
.config-lever-facts dt{
  margin-top:4px;
  color:var(--silver);
  font-size:.64rem;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.config-lever-facts dd{margin:0;color:color-mix(in srgb,var(--paper) 84%,var(--silver));text-wrap:pretty}

/* ---- The ladder at the foot of a product page --------------------------- */
.offer-ladder-steps{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
  gap:14px;
  margin:0;padding:0;list-style:none;
}
.offer-step{
  display:grid;
  align-content:start;
  gap:8px;
  padding:16px;
  border:1px solid var(--line);
  border-radius:14px;
  background:color-mix(in srgb,var(--navy) 78%,transparent);
}
.offer-step-kind{
  justify-self:start;
  padding:2px 9px;
  border-radius:999px;
  border:1px solid var(--line);
  color:var(--silver);
  font-size:.66rem;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.offer-step--next .offer-step-kind{
  color:var(--cyan);
  border-color:color-mix(in srgb,var(--cyan) 38%,transparent);
}
.offer-step--continuity .offer-step-kind{
  color:var(--lavender);
  border-color:color-mix(in srgb,var(--lavender) 38%,transparent);
}
.offer-step-name{margin:0;font-family:var(--font-display);font-size:1.02rem;line-height:1.28;text-wrap:balance}
.offer-step-name a{color:var(--paper);text-decoration:none}
.offer-step-name a:hover,.offer-step-name a:focus-visible{color:var(--cyan)}
.offer-step-why{margin:0;color:var(--silver);font-size:.84rem;line-height:1.55;text-wrap:pretty}
.offer-step-price{margin:0;font-family:var(--font-display);font-size:1.12rem;font-variant-numeric:tabular-nums}
.offer-step-price:empty{display:none}

@media (prefers-reduced-motion:reduce){
  .config-levers-toggle::after{transition:none}
}
