/* Deltas for the competitive-culture flow (/doorstops/competition).

   The step system, cards, templates and callouts come from bathroom-flow.css,
   repainted for the zine by components/flow/flow-css.js; this file adds the
   pieces this page has that the others don't, in the same ink outlines: the
   track menu, the 3D referent simulation, the editable referent list and
   asks, the support kit, the open letter, the staffing readout, and the
   Doorstop Session ending.

   Everything inside a step is drawn with rules, not boxes: the step is
   already the card. A heavy ink rule opens a block, thin rules divide its
   rows, a 2px rule closes it. The exceptions are things the student clicks
   (the asks are cards, like .bf-choice), the simulation (a canvas needs a
   frame), and the letter (a document to copy, boxed like the templates). */

.cc .bf-title { max-width: 16ch; margin-left: auto; margin-right: auto; }
.cc-kicker {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #16130f;
  margin: 0 0 14px;
}
.cc .cc-hero-sub {
  max-width: 560px;
  margin: 0 auto 28px;
  font-size: 17px;
  line-height: 1.55;
  color: var(--bf-soft);
  text-align: center;
}

#bf-school-status:empty { display: none; }

/* Any class rule with a `display` beats the browser's own `[hidden]`, so an
   element hidden from script (a step, a pip, a track note, the compare bars)
   would stay on screen without this. */
.cc [hidden] { display: none !important; }

.cc .cc-checklist { list-style: disc; padding-left: 22px; margin: 6px 0 14px; }
.cc-checklist li { list-style: disc; font-size: 16px; line-height: 1.6; color: var(--bf-ink); margin-bottom: 6px; }

/* the grading fixes are folds; what they open onto sits flush, not indented */
.cc .bf-solution-body { padding-left: 0; }

/* ---------------------------------------------------- optional folds */

/* a fold is a ruled row, like the grading fixes, and opens flush */
.cc-optional { margin: 22px 0 0; border-top: 2px solid #16130f; border-bottom: 2px solid #16130f; background: none; }
.cc-optional + .cc-optional { margin-top: 0; border-top-width: 1px; border-top-color: var(--bf-line); }
.cc-optional > summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--bf-ink);
}
.cc-optional > summary::-webkit-details-marker { display: none; }
.cc-optional > summary::before { content: "\25B8\00a0"; color: #16130f; }
.cc-optional[open] > summary::before { content: "\25BE\00a0"; }
.cc-optional > summary:hover { color: var(--bf-accent); }
.cc-optional-tag {
  display: inline-block;
  padding: 2px 8px;
  margin-right: 8px;
  border: 2px solid #16130f;
  border-radius: 0;
  background: #E4F6E9;
  color: #16130f;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.cc-optional-body { padding: 0 0 18px; }
.cc-optional-body p { font-size: 15px; line-height: 1.6; color: var(--bf-ink); margin: 0 0 10px; }
.cc-optional-body .bf-template { margin-bottom: 0; }

/* -------------------------------------------------------- the menu
   A multi-select: each picked track becomes its own numbered step, so the
   cards carry a checkbox in the corner. */

.cc-tracks .bf-choice { position: relative; }
.cc-tracks .bf-choice::after {
  content: '';
  position: absolute;
  top: 14px;
  right: 14px;
  width: 22px;
  height: 22px;
  border: 2px solid #16130f;
  border-radius: 0;
  background: #fff;
}
.cc-tracks .bf-choice[aria-pressed="true"]::after {
  background: #3ECFB0 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3 3 7-7' fill='none' stroke='%2316130f' stroke-width='2.6' stroke-linecap='square'/%3E%3C/svg%3E") center / 16px no-repeat;
}
.cc-tracks .bf-choice-title { padding-right: 30px; }
#bf-pick-go:disabled { opacity: 0.5; cursor: not-allowed; }

/* marks the tracks the step-2 answer says to start with (and, in the
   grading step, the fix to start with) */
.cc-start {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 7px;
  border: 2px solid #16130f;
  border-radius: 0;
  background: #FDF3D8;
  color: #16130f;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  line-height: 1.5;
  vertical-align: 2px;
  white-space: nowrap;
}

/* one line at the top of a track saying how it fits the step-2 answer */
.cc .bf-step-body > p.cc-note {
  padding: 12px 14px;
  border: 0;
  border-radius: 0;
  background: #E4F6E9;
  color: var(--bf-ink);
  font-size: 15.5px;
  line-height: 1.6;
}

/* ------------------------------------------------------ facts / kit */

.cc-kicker-sm {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #148d75;
  margin: 0 0 6px;
}
.cc-evidence { margin: 24px 0 18px; padding: 14px 0 0; border-top: 3px solid #16130f; }
.cc-evidence .bf-muted { margin: 0 0 10px; }

.cc .bf-step-body ul.cc-facts, .cc .bf-step-body ul.cc-kit { padding-left: 0; }
.cc-facts, .cc-kit { list-style: none; padding: 0; margin: 4px 0 14px; border-bottom: 2px solid #16130f; }
/* on its own (not under the evidence rule) a list opens with the heavy rule */
.cc-facts--tight, .cc-kit { border-top: 3px solid #16130f; }
.cc-facts li, .cc-kit li {
  list-style: none;
  margin: 0;
  padding: 12px 0;
  border-bottom: 1px solid var(--bf-line);
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--bf-ink);
}
.cc-facts li:last-child, .cc-kit li:last-child { border-bottom: 0; }
.cc-facts strong, .cc-kit strong { color: #16130f; }
.cc-facts a, .cc-src a, .cc-kit a { display: inline; color: var(--bf-accent); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.cc-src { display: block; margin-top: 4px; font-size: 13.5px; color: var(--bf-soft); }

.cc-who {
  display: inline-block;
  margin-left: 8px;
  padding: 0 7px;
  border: 2px solid #16130f;
  border-radius: 0;
  background: #E6ECFF;
  color: #16130f;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.6;
  vertical-align: 1px;
}

.cc .cc-steps { list-style: decimal; padding-left: 22px; margin: 8px 0 14px; }
.cc-steps li { list-style: decimal; font-size: 16px; line-height: 1.6; color: var(--bf-ink); margin-bottom: 8px; }
.cc-steps strong { color: #16130f; }

/* --------------------------------------------------- the simulation
   Drawn the same way as the fights page's crowd: cream paper, 3px ink rules,
   a hard-shadowed readout, mint as the one bright note, peach halftone,
   Caveat for the notes (competition-flow.js draws the canvas in the same
   palette). It runs the full width of the step card, bleeding past the
   body's side padding, so it reads as a band in the card, not a box in it. */

.cc .cc-sim {
  --z-ink: #16130f;
  --z-paper: #FBF6EC;
  --z-mint: #3ECFB0;
  --z-mint-text: #148d75;
  position: relative;
  margin: 22px -24px 26px;
  background: var(--z-paper);
  border-top: 3px solid var(--z-ink);
  border-bottom: 3px solid var(--z-ink);
  overflow: hidden;
  color: var(--z-ink);
}
/* halftone in one corner, hatching in the other, like the landing hero */
.cc .cc-sim::before, .cc .cc-sim::after { content: ''; position: absolute; pointer-events: none; z-index: 0; }
.cc .cc-sim::before {
  top: -12px; left: -12px; width: 96px; height: 60px; opacity: .55;
  background-image: radial-gradient(#F0BFA6 3px, transparent 3.1px);
  background-size: 16px 16px;
}
.cc .cc-sim::after {
  right: 0; top: 0; width: 110px; height: 70px; opacity: .6;
  background-image: repeating-linear-gradient(-45deg, rgba(187,212,245,.9) 0 3px, transparent 3px 11px);
}
.cc .cc-sim > * { position: relative; z-index: 1; }

.cc .cc-sim-head { padding: 22px 24px 4px; }
.cc .cc-sim-kicker {
  display: inline-block;
  padding: 3px 10px;
  background: var(--z-mint);
  border: 2px solid var(--z-ink);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--z-ink);
  transform: rotate(-2deg);
}
.cc .cc-sim-head h3 {
  font-family: var(--dl-font-display);
  font-size: clamp(20px, 3.4vw, 26px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin: 12px 0 8px;
  color: var(--z-ink);
}
.cc .cc-sim-head p { margin: 0; font-size: 15.5px; line-height: 1.6; color: #55504a; max-width: 620px; }

.cc .cc-sim-stage { position: relative; height: 420px; }
@media (max-width: 560px) { .cc .cc-sim-stage { height: 340px; } }
.cc #cc-canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: pan-y; }
.cc #cc-canvas.is-dragging { cursor: grabbing; }

.cc .cc-sim-readout {
  position: absolute;
  top: 14px;
  right: 18px;
  padding: 8px 14px 9px;
  background: #fff;
  border: 3px solid var(--z-ink);
  box-shadow: 5px 5px 0 var(--z-ink);
  text-align: right;
  pointer-events: none;
}
.cc .cc-sim-pct {
  display: block;
  font-size: 40px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--z-ink);
}
.cc .cc-sim-label { display: block; margin-top: 2px; font-size: 13px; font-weight: 600; color: #55504a; max-width: 17ch; margin-left: auto; line-height: 1.3; }
.cc .cc-sim-drag {
  display: block;
  position: absolute;
  left: 20px;
  bottom: 10px;
  font-family: var(--dl-caveat), cursive;
  font-weight: 700;
  font-size: 18px;
  color: #55504a;
  pointer-events: none;
}

.cc .cc-sim-controls { display: flex; flex-wrap: wrap; gap: 12px 14px; align-items: center; padding: 6px 24px 8px; }
.cc .cc-zbtn {
  padding: 11px 18px;
  border: 3px solid var(--z-ink);
  border-radius: 0;
  background: var(--z-paper);
  color: var(--z-ink);
  box-shadow: 4px 4px 0 var(--z-ink);
  font: 600 15px var(--dl-font-display);
  cursor: pointer;
  transition: transform .08s ease, box-shadow .08s ease;
}
.cc .cc-zbtn--mint { background: var(--z-mint); }
.cc .cc-zbtn:hover:not(:disabled) { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--z-ink); }
.cc .cc-zbtn:focus-visible { outline: 3px solid var(--z-mint-text); outline-offset: 3px; }
.cc .cc-zbtn:disabled { opacity: .45; cursor: default; }
.cc .cc-sim-reset {
  margin-left: auto;
  padding: 0;
  border: 0;
  background: none;
  color: var(--z-ink);
  font: 600 15px var(--dl-font-display);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  cursor: pointer;
}

.cc .cc-sim-compare { display: grid; gap: 8px; padding: 8px 24px 4px; }
.cc .cc-sim-bar { display: grid; grid-template-columns: 10em 1fr 3.5em; gap: 10px; align-items: center; font-size: 14px; font-weight: 600; color: var(--z-ink); }
.cc .cc-sim-bar-label, .cc .cc-sim-bar-track { display: block; }
.cc .cc-sim-bar-track { height: 14px; border: 2px solid var(--z-ink); background: #fff; }
.cc .cc-sim-bar-fill { display: block; height: 100%; width: 0; background: #F0BFA6; transition: width .6s ease; }
.cc .cc-sim-bar.is-ref .cc-sim-bar-fill { background: var(--z-mint); }
.cc .cc-sim-bar-num { display: block; text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 520px) { .cc .cc-sim-bar { grid-template-columns: 7.5em 1fr 3.2em; font-size: 13px; } }

.cc .cc-sim-foot { margin: 0; padding: 8px 24px 18px; font-size: 13.5px; line-height: 1.55; color: #55504a; }

@media (max-width: 620px) {
  .cc .cc-sim { margin-left: -18px; margin-right: -18px; }
  .cc .cc-sim-readout { top: 10px; right: 12px; padding: 5px 10px 6px; box-shadow: 4px 4px 0 var(--z-ink); }
  .cc .cc-sim-pct { font-size: 27px; }
  .cc .cc-sim-label { font-size: 11.5px; }
  .cc .cc-sim-head { padding: 20px 18px 4px; }
  .cc .cc-sim-controls, .cc .cc-sim-compare, .cc .cc-sim-foot { padding-left: 18px; padding-right: 18px; }
}

/* --------------------------------------------- referents: the list */

.cc-refs { display: grid; gap: 10px; margin: 4px 0 4px; }
.cc-ref {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
  align-items: center;
}
.cc-ref .bf-input { margin: 0; }
.cc .cc-ref-x {
  width: 44px;
  height: 44px;
  border: 3px solid #16130f;
  border-radius: 0;
  background: #fff;
  color: #16130f;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.cc .cc-ref-x:hover { background: #FDE7E0; }
.cc .cc-ref-x:focus-visible { outline: 3px solid #3ECFB0; outline-offset: 2px; }
@media (max-width: 520px) {
  .cc-ref { grid-template-columns: 1fr auto; }
  .cc-ref .cc-ref-role { grid-column: 1 / -1; }
  .cc .cc-ref-x { grid-column: 2; grid-row: 1; }
}

/* the ask: selectable cards, treated like .bf-choice */
.cc-asks { display: grid; gap: 14px; margin: 6px 0 24px; }
@media (min-width: 640px) { .cc-asks { grid-template-columns: 1fr 1fr; } }
.cc .cc-ask {
  text-align: left;
  padding: 14px 16px;
  border: 3px solid #16130f;
  border-radius: 0;
  background: #fff;
  box-shadow: 4px 4px 0 #16130f;
  cursor: pointer;
  font-family: inherit;
  color: #16130f;
  display: grid;
  align-content: start;
  gap: 4px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.cc .cc-ask:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 #16130f; }
.cc .cc-ask.is-active { background: #E4F6E9; box-shadow: 2px 2px 0 #16130f; transform: translate(2px, 2px); }
.cc .cc-ask:focus-visible { outline: 3px solid #3ECFB0; outline-offset: 3px; }
.cc-ask strong { display: block; font-family: var(--dl-font-display); font-size: 16.5px; font-weight: 700; line-height: 1.3; color: #16130f; }
.cc-ask span { display: block; font-size: 14px; line-height: 1.5; color: var(--bf-soft); }

/* one script per referent */
.cc-script-for {
  font-family: var(--dl-font-display);
  font-size: 16px;
  font-weight: 700;
  color: #16130f;
  margin: 18px 0 6px;
}
.cc-script-for:first-child { margin-top: 4px; }

/* ------------------------------------------------------- the letter
   A document to copy, so it's boxed like the email templates. */

.cc-letter {
  margin: 8px 0 22px;
  border: 3px solid #16130f;
  border-radius: 0;
  background: #fff;
  overflow: hidden;
}
.cc-letter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 3px solid #16130f;
  background: #E6ECFF;
}
.cc-letter-kicker {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #16130f;
}
.cc-letter-head .bf-btn { padding: 8px 14px; font-size: 14px; box-shadow: 3px 3px 0 #16130f; }
.cc-letter-body { padding: 20px 22px 8px; }
.cc-letter-body p { margin: 0 0 14px; font-size: 16px; line-height: 1.7; color: var(--bf-ink); }
.cc .cc-letter-body ol { margin: 0 0 14px; padding-left: 26px; }
.cc-letter-body li { font-size: 16px; line-height: 1.7; color: var(--bf-ink); margin-bottom: 6px; list-style: decimal; }
.cc-letter-body .bf-blank { font-family: inherit; }
.cc-letter-body .cc-letter-sig { font-style: italic; color: var(--bf-soft); }

/* ---------------------------------------------------- staff counts */

.cc-counts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  margin: 12px 0 6px;
}
.cc-counts .bf-field { margin: 0; }

/* the readout: one ruled row per role, the number tagged by how far it is
   from the recommendation (peach when over it, green when within) */
.cc-ratios { margin: 18px 0 6px; }
.cc .bf-step-body .cc-ratios ul {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
  border-top: 3px solid #16130f;
  border-bottom: 2px solid #16130f;
}
.cc-ratios li {
  list-style: none;
  margin: 0;
  padding: 12px 0;
  border-bottom: 1px solid var(--bf-line);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 14px;
  align-items: center;
}
.cc-ratios li:last-child { border-bottom: 0; }
.cc-ratio-role { font-family: var(--dl-font-display); font-size: 16px; font-weight: 700; color: #16130f; }
.cc-ratio-num {
  font-family: var(--dl-font-display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: #16130f;
  font-variant-numeric: tabular-nums;
  padding: 1px 9px;
  border: 2px solid #16130f;
  background: #FDE7E0;
}
.is-ok .cc-ratio-num { background: #E4F6E9; }
.cc-ratio-note { grid-column: 1 / -1; font-size: 14px; line-height: 1.5; color: var(--bf-soft); }

/* ------------------------------------------------ Doorstop Session ending
   The offer, opened by the heavy rule like any other block in a step. */

.cc-session { margin: 4px 0 18px; padding: 16px 0 22px; border-top: 3px solid #16130f; border-bottom: 2px solid #16130f; }
.cc-session h3 {
  font-family: var(--dl-font-display);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: #16130f;
  margin: 0 0 10px;
}
.cc-session p { margin: 0 0 12px; font-size: 16px; line-height: 1.65; color: var(--bf-ink); }
.cc .cc-session ul { list-style: disc; padding-left: 22px; margin: 0 0 16px; }
.cc-session li { list-style: disc; font-size: 16px; line-height: 1.6; color: var(--bf-ink); margin-bottom: 6px; }

/* under an email with no address: where to find it */
.cc-find { margin: 10px 0 0; font-size: 14px; color: var(--bf-soft); }
.cc-find a { display: inline; color: var(--bf-accent); text-decoration: underline; }

.cc .bf-share-foot { margin-top: 18px; }
.cc .bf-share-foot a { display: inline; }

/* inside a template it lines up with the mail body, under the buttons */
.cc .bf-template .cc-find { margin: -6px 0 0; padding: 0 18px 16px; font-size: 14px; line-height: 1.5; color: var(--bf-soft); }

