/* Miro.Design — composition for this page only.
   ---------------------------------------------------------------------------
   The vocabulary lives in /work/_shared/miro.css, which every Miro case study
   loads: board, frame, obj, sticky, toolbar, seg, chip, row, and the
   before/after grammar. This file only arranges those primitives here.

   Loaded after the shared sheet, so it can reach into it. */

/* A frame spans the whole measure: the prose keeps to one column, but a board
   is the thing being shown. */
.study .body > .frame { max-width: none; }

/* --- Frame 0: the landing page ------------------------------------------ */

.nav { margin-bottom: 24px; }
.nav .mark { letter-spacing: -0.01em; }

.qgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.qgrid .obj { align-content: start; }

/* --- Frame 1: product language ------------------------------------------ */

.hues {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.rrow {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 88px 64px;
  gap: 10px;
  align-items: center;
  padding: 5px 0;
  font-size: 12px;
}

.rrow + .rrow { border-top: 1px solid var(--m-hairline); }

.rrow .sw { width: 24px; height: 18px; border-radius: 3px; }
.rrow .rn { color: var(--m-ink); }
.rrow .rv { color: var(--m-ink-2); }
.rrow .rc { color: var(--m-ink-3); justify-self: end; }

.sw-fill { background: var(--lemon); }
.sw-sub  { background: var(--lemon-sub); border: 1px solid var(--m-line); }
.sw-ink  { background: var(--lemon-ink); }
.sw-dark { background: #2B2609; }
.sw-bd   { background: #A08C1B; }
.sw-none { border: 1px dashed var(--m-line); }

.rrow.open .rn,
.rrow.open .rv { color: var(--m-ink-3); }

/* --- Frame 2: the run ---------------------------------------------------- */

/* The before side: a numbered list with nothing holding it up. */
.flat {
  margin: 10px 0 0;
  padding: 0 0 0 20px;
  counter-reset: f;
  list-style: none;
}

.flat li {
  counter-increment: f;
  position: relative;
  padding: 3px 0;
  font-size: 12px;
  color: var(--m-ink-3);
}

.flat li::before {
  content: counter(f);
  position: absolute;
  left: -20px;
  font-variant-numeric: tabular-nums;
}

.run { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; counter-reset: s; }

.run .step {
  counter-increment: s;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px 12px;
  background: var(--m-surface);
  border-left: 3px solid transparent;
  border-radius: var(--m-r-button);
  box-shadow: var(--m-lift-sm);
  font-size: 12px;
  color: var(--m-ink);
}

.run .step::before {
  content: counter(s, decimal-leading-zero);
  color: var(--m-ink-3);
  font-family: var(--m-mono);
  font-variant-numeric: tabular-nums;
}

/* The promotion points are the only two decisions in the run, so they are
   marked rather than numbered: they are not steps, they are choices. */
.run .promo {
  padding: 6px 0 6px 34px;
  font-size: 12px;
  font-style: italic;
  color: var(--m-ink-3);
}

.run .promo::before { content: "\2193\00A0\00A0"; font-style: normal; }

.run .vtag {
  font-size: 12px;
  color: var(--m-ink-3);
  font-variant-numeric: tabular-nums;
}

.run .v-sketch   { border-left-color: var(--lemon); }
.run .v-feature  { border-left-color: var(--cobalt); }
.run .v-handover { border-left-color: var(--lime); }

/* --- Frame 3: the volumes ------------------------------------------------ */

.vol { display: inline-flex; margin-bottom: 24px; border: 0; }
.vol legend { position: absolute; width: 1px; height: 1px; overflow: hidden; }
.vol input { position: absolute; width: 1px; height: 1px; opacity: 0; }

.vol label {
  padding: 5px 14px;
  border-radius: var(--m-r-round);
  font-size: 12px;
  color: var(--m-ink-3);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.vol input:checked + label { background: var(--m-ink); color: var(--m-surface); }
.vol input:focus-visible + label { outline: 2px solid var(--ink); outline-offset: 2px; }

.vgrid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

/* One volume showing at a time. The chips are block-level and fill the fixed
   92px severity column from the shared sheet, so swapping one for another
   cannot shift a row by a pixel. */
.study .body [data-vol] { display: none; }

.study .body:has(#vol-sketch:checked) [data-vol="sketch"],
.study .body:has(#vol-feature:checked) [data-vol="feature"],
.study .body:has(#vol-handover:checked) [data-vol="handover"] { display: block; }

.checks .row + .row { border-top: 1px solid var(--m-hairline); }

.talk .said {
  margin: 0;
  padding: 10px 12px;
  background: var(--m-subtle);
  border-radius: var(--m-r-button);
  font-size: 12px;
  line-height: 1.6;
  color: var(--m-ink-2);
  white-space: pre;
  overflow-x: auto;
}

.talk .obj-h.spaced { margin-top: 16px; }

.talk blockquote {
  margin: 0;
  padding: 10px 12px;
  background: var(--m-surface);
  border-left: 3px solid var(--m-line);
  border-radius: 0 var(--m-r-button) var(--m-r-button) 0;
  font-size: 12px;
  color: var(--m-ink);
  text-wrap: pretty;
}

.talk blockquote code { font-family: var(--m-mono); font-size: 12px; }

.study .body:has(#vol-sketch:checked) .talk blockquote { border-left-color: var(--lemon); }
.study .body:has(#vol-feature:checked) .talk blockquote { border-left-color: var(--cobalt); }
.study .body:has(#vol-handover:checked) .talk blockquote { border-left-color: var(--lime); }

/* --- Frame 4: the toolkit ------------------------------------------------ */

.kinds {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

/* Header then two equal cards. Both groups stretch to the same height, so
   all four definitions line up across the columns instead of laddering. */
.kgroup { display: grid; grid-template-rows: auto 1fr 1fr; gap: 8px; }

.study .body .kgroup-h {
  margin: 0 0 2px;
  padding-left: 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--m-ink-3);
}

/* The moment you reach for a thing is the clearest definition of it, so it
   gets its own surface rather than trailing the description as a sentence. */
.study .body .kind .when {
  margin-top: 10px;
  padding: 8px 10px;
  background: var(--m-subtle);
  border-radius: var(--m-r-button);
  font-size: 12px;
  color: var(--m-ink-2);
  text-wrap: pretty;
}

.gateline { padding: 12px 16px; }

/* --- Frame 5: the prototypes --------------------------------------------- */

.protos {
  display: grid;
  gap: 8px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.protos .obj { padding: 10px 12px; }

.protos [data-face="board"] {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.protos .who {
  width: 20px;
  height: 20px;
  border-radius: var(--m-r-round);
  background: var(--m-line);
}

/* Owners and app names are real people's work, so they are drawn rather than
   named. The bar is the redaction, not a placeholder. */
.protos .redact {
  height: 10px;
  border-radius: 3px;
  background: var(--m-subtle);
}

.protos .w2 { width: 68%; }
.protos .w3 { width: 84%; }
.protos .w4 { width: 52%; }

/* -------------------------------------------------------------------------- */

@media (max-width: 900px) {
  .ba { grid-template-columns: 1fr; }
  .vgrid { grid-template-columns: 1fr; }
  .rrow { grid-template-columns: 24px minmax(0, 1fr) 80px; }
  .rrow .rc { display: none; }
  .nav { flex-wrap: wrap; border-radius: var(--m-r-panel); }
  .run .step { grid-template-columns: 24px minmax(0, 1fr); }
  .run .vtag { display: none; }
}
