/* ==========================================================================
   Cozy Draft case study: components added for the "bets and judgment" rewrite.
   Built only from main.css tokens so it sits inside the Daylight Kitchen system.
   ========================================================================== */

/* Fill-in markers. Deliberately loud and off-palette: they must never ship. */
mark.confirm {
  background: #ffe433; color: var(--ink); padding: 1px 6px; border-radius: 4px;
  box-shadow: 0 0 0 2px #e0b400; font-family: var(--f-label); font-weight: 600;
  font-size: max(0.82em, 0.8rem); letter-spacing: 0; text-transform: none; line-height: 1.5;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.chapter h2 mark.confirm, .fact b mark.confirm { font-size: 0.9rem; vertical-align: middle; }

/* ---------- asset slots: placeholder frame until the real file exists ---------- */
.cz-asset { position: relative; margin: 0; }
.cz-asset__frame {
  display: grid; place-items: center; gap: 6px; aspect-ratio: var(--ar, 16 / 10); padding: 18px;
  border-radius: 14px; border: 2px dashed var(--line-2); background: rgba(255,255,255,.55);
  text-align: center; color: var(--ink-2); font-size: .9rem; line-height: 1.4;
}
.cz-asset__frame b { font-family: var(--f-mono); font-weight: 500; font-size: .8rem; color: var(--ink); }
.cz-asset__frame span { max-width: 38ch; }
.cz-asset img, .cz-asset video { display: block; width: 100%; border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.cz-asset figcaption { margin-top: 10px; font-size: .86rem; color: var(--muted); }
.cz-asset__pause {
  position: absolute; right: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px; background: rgba(37,35,59,.86); color: #fff; font-size: .82rem; font-weight: 600;
}

/* framed recordings: show the part of the screen that matters (and leave the recorder toolbar out) */
.cz-asset__crop { position: relative; aspect-ratio: var(--ar, 16 / 10); overflow: hidden; border-radius: 14px; background: #fdf6ea; box-shadow: inset 0 0 0 1px var(--line); }
.cz-asset__crop video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 0; box-shadow: none; background: transparent; }
.cz-asset__crop.is-cropped video {
  inset: auto; left: 0; top: 0; height: auto; max-width: none; object-fit: fill;
  width: calc(100% * 100 / var(--cw));
  transform: translate(calc(var(--cl) * -1%), calc(var(--ct) * -1%));
}
.cz-asset__full {
  position: absolute; left: 12px; bottom: 12px; padding: 8px 14px; border-radius: 999px;
  background: rgba(255,255,255,.92); color: var(--ink); font-size: .82rem; font-weight: 600; box-shadow: inset 0 0 0 1px var(--line-2);
}
.cz-asset__full:hover { background: var(--butter); }

/* full-size recording dialog */
.cz-dialog { width: min(1200px, 94vw); max-height: 92vh; padding: 0; border: 0; border-radius: 16px; background: #fdf6ea; box-shadow: var(--shadow-2); overflow: visible; }
.cz-dialog::backdrop { background: rgba(37,35,59,.82); }
.cz-dialog video { display: block; width: 100%; max-height: 92vh; border-radius: 16px; }
.cz-dialog__close { position: absolute; top: -52px; right: 0; padding: 10px 16px; border-radius: 999px; background: var(--bg-2); color: var(--ink); font-weight: 600; font-size: .9rem; }

/* pattern cards carry a screenshot slot above the copy */
.card .cz-asset { margin: -8px -8px 18px; }
.card .cz-asset__frame { background: rgba(255,255,255,.6); border-color: rgba(37,35,59,.28); }

/* ---------- kitchen fires ---------- */
.fires-head { display: grid; gap: 20px; margin-top: 56px; align-items: end; }
@media (min-width: 900px) { .fires-head { grid-template-columns: 1fr 240px; gap: 40px; } }
.fires-head h3 { font-family: var(--f-display); font-weight: 400; font-size: clamp(1.6rem, 2.4vw, 2.2rem); letter-spacing: -0.015em; margin-bottom: 10px; }
.fires-head p { color: var(--ink-2); max-width: 56ch; }
.callout { padding: 22px; border-radius: 18px; background: var(--peach); }
.callout b { display: block; font-family: var(--f-display); font-weight: 400; font-size: clamp(2.2rem, 3.4vw, 3rem); line-height: 1; letter-spacing: -0.02em; }
.callout span { display: block; margin-top: 10px; color: var(--ink-2); font-size: .94rem; }

.fires { width: 100%; margin-top: 24px; border-collapse: collapse; font-size: .95rem; }
.fires caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.fires th { text-align: left; font-family: var(--f-label); font-size: var(--fs-micro); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 0 14px 12px 0; border-bottom: 2px solid var(--ink); }
.fires td { vertical-align: top; padding: 18px 14px 18px 0; border-bottom: 1px dashed var(--line-2); color: var(--ink-2); line-height: 1.5; }
.fires td:first-child { color: var(--ink); font-weight: 600; }
.fires td:last-child { font-family: var(--f-display); color: var(--ink); font-size: 1.02rem; line-height: 1.3; }
.fires col.c1 { width: 24%; } .fires col.c2 { width: 22%; } .fires col.c3 { width: 28%; } .fires col.c4 { width: 26%; }
.fires__flag { display: inline-block; margin-top: 8px; }
@media (max-width: 899px) {
  .fires, .fires tbody, .fires tr, .fires td { display: block; width: 100%; }
  .fires thead, .fires colgroup { display: none; }
  .fires tr { margin-top: 14px; padding: 18px; border-radius: 18px; background: var(--bg-2); box-shadow: var(--shadow-1); }
  .fires td { padding: 0 0 12px; border: 0; }
  .fires td:last-child { padding-bottom: 0; }
  .fires td::before { content: attr(data-label); display: block; margin-bottom: 4px; font-family: var(--f-label); font-size: var(--fs-micro); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
}

/* ---------- the bets ---------- */
.bets { display: grid; gap: 22px; margin-top: 40px; }
.bet { padding: clamp(22px, 3vw, 36px); border-radius: var(--radius); background: var(--bg-2); box-shadow: var(--shadow-1); }
.bet--lost { background: #fff; }
.bet--open { background: var(--lilac); }
.bet__top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.bet__tag { display: inline-flex; align-items: center; padding: 5px 11px; border-radius: 999px; font-family: var(--f-label); font-weight: 600; font-size: var(--fs-micro); letter-spacing: .06em; text-transform: uppercase; }
.bet--lost .bet__tag { background: var(--rose); color: var(--ink); }
.bet--open .bet__tag { background: var(--ink); color: var(--bg); }
.bet h3 { font-family: var(--f-display); font-weight: 400; font-size: clamp(1.7rem, 2.6vw, 2.4rem); line-height: 1.08; letter-spacing: -0.015em; margin: 0; }
.bet__rows { display: grid; gap: 0; margin-top: 22px; border-top: 1px solid var(--line-2); }
.bet__row { display: grid; gap: 4px 28px; padding: 14px 0; border-bottom: 1px dashed var(--line-2); }
@media (min-width: 800px) { .bet__row { grid-template-columns: 150px 1fr; } }
.bet__row dt { font-family: var(--f-label); font-weight: 600; font-size: var(--fs-micro); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-top: 4px; }
.bet__row dd { margin: 0; color: var(--ink-2); line-height: 1.6; max-width: 62ch; }
.bet__row dd strong { color: var(--ink); font-weight: 600; }
.bet__row dd.bet__wide { max-width: none; }
.bet__more.bet__rows, .bet__more > .bet__rows { margin-top: 0; border-top: 0; }
.bet--open .bet__row dt, .bet--open .vs__opt small { color: var(--ink-2); }
.bet--open .bet__row, .bet--open .bet__rows { border-color: rgba(37,35,59,.22); }
.bet__toggle { display: none; margin-top: 16px; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line-2); font-weight: 600; font-size: .9rem; color: var(--ink); }
.bet__toggle svg { width: 14px; height: 14px; transition: transform .4s var(--ease-out); }
.bet__toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
@media (max-width: 799px) {
  .js .bet__toggle { display: inline-flex; }
  .js .bet__more:not(.is-open) { display: none; }
}
.bet__visual { margin-top: 24px; }
.bet__note { margin-top: 18px; color: var(--ink-2); max-width: 62ch; line-height: 1.6; }
.bet__caption { margin-top: 14px; font-size: .92rem; color: var(--ink-2); max-width: 64ch; line-height: 1.55; }

/* Bet 1: three identity attempts, left to right */
.steps3 { display: grid; gap: 12px; counter-reset: s; }
@media (min-width: 800px) { .steps3 { grid-template-columns: repeat(3, 1fr); gap: 34px; } }
.steps3 li { position: relative; padding: 18px; border-radius: 16px; background: var(--bg-3); counter-increment: s; }
.steps3 li::before { content: counter(s); display: grid; place-items: center; width: 28px; height: 28px; margin-bottom: 12px; border-radius: 50%; background: #fff; font-family: var(--f-label); font-weight: 600; font-size: .8rem; }
.steps3 li b { display: block; font-size: 1.02rem; color: var(--ink); }
.steps3 li span { display: inline-block; margin-top: 10px; padding: 3px 9px; border-radius: 999px; font-family: var(--f-label); font-size: var(--fs-micro); font-weight: 600; letter-spacing: .04em; background: #fff; color: var(--ink-2); }
.steps3 li.is-failed span { background: var(--rose); color: var(--ink); }
.steps3 li.is-chosen { background: var(--mint); box-shadow: inset 0 0 0 2px var(--ink); }
.steps3 li.is-chosen span { background: var(--ink); color: var(--bg); }
@media (min-width: 800px) {
  .steps3 li:not(:last-child)::after { content: ""; position: absolute; top: 32px; right: -26px; width: 18px; height: 2px; background: var(--ink-2); }
}
@media (max-width: 799px) {
  .steps3 li:not(:last-child)::after { content: ""; position: absolute; left: 32px; bottom: -12px; width: 2px; height: 12px; background: var(--ink-2); }
}

/* Bet 2: the real 20-step tournament order */
.order { display: grid; gap: 14px; }
@media (min-width: 900px) { .order { grid-template-columns: 6fr 6fr 4fr 4fr; gap: 10px; } }
.order__phase { padding: 12px; border-radius: 14px; background: var(--bg-3); }
.order__phase--ban2 { background: #fff; box-shadow: inset 0 0 0 2px var(--flame); }
.order__phase h4 { font-family: var(--f-label); font-weight: 600; font-size: var(--fs-micro); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 10px; }
.order__phase ol { display: grid; grid-template-columns: repeat(var(--n, 6), minmax(0, 1fr)); gap: 5px; }
.order__step { display: grid; gap: 2px; padding: 7px 4px; border-radius: 8px; text-align: center; font-size: .82rem; line-height: 1.3; color: var(--ink); }
.order__step small { font-family: var(--f-mono); font-size: var(--fs-micro); color: var(--ink-2); }
.order__step--ban { background: var(--rose); }
.order__step--pick { background: var(--mint); }
.order__step b { font-weight: 700; }
.order__step b.is-blue { color: var(--ai-2, #2b4590); }
.order__step b.is-red { color: #82301c; }
.order__callout { margin-top: 12px; display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; color: var(--ink); }
.order__callout::before { content: ""; flex-shrink: 0; width: 14px; height: 14px; margin-top: 3px; border-radius: 4px; box-shadow: inset 0 0 0 2px var(--flame); }
.order__key { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 10px; font-size: .84rem; color: var(--ink-2); }
.order__key span { display: inline-flex; align-items: center; gap: 6px; }
.order__key i { width: 12px; height: 12px; border-radius: 3px; }

/* Option compare: "Option 1 VS Option 2" */
.vs { display: grid; gap: 12px; align-items: stretch; }
@media (min-width: 800px) { .vs { grid-template-columns: 1fr auto 1fr; gap: 16px; } }
.vs__opt { padding: 18px; border-radius: 16px; background: rgba(255,255,255,.7); }
.vs__opt--chosen { background: #fff; box-shadow: inset 0 0 0 2px var(--ink); }
.vs__opt small { display: block; font-family: var(--f-label); font-weight: 600; font-size: var(--fs-micro); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.vs__opt p { color: var(--ink); line-height: 1.5; }
.vs__opt em { display: inline-block; margin-top: 10px; font-style: normal; padding: 3px 9px; border-radius: 999px; font-family: var(--f-label); font-size: var(--fs-micro); font-weight: 600; background: var(--bg-3); }
.vs__opt--chosen em { background: var(--ink); color: var(--bg); }
.vs__mid { align-self: center; justify-self: center; font-family: var(--f-display); font-size: 1.4rem; color: var(--ink-2); }

/* Bet 3: Draft Lab slot, recreated (same family as the lane-claiming demo) */
.dlab { margin-top: 24px; padding: clamp(18px, 2.4vw, 28px); border-radius: 18px; background: rgba(255,255,255,.55); }
.dlab__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; margin-bottom: 16px; }
.dlab__head b { font-family: var(--f-display); font-weight: 400; font-size: 1.4rem; }
.dlab__head span { color: var(--ink-2); font-size: .92rem; }
.dlab__board { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 16px; border-radius: 14px; background: var(--sky); }
@media (max-width: 599px) {
  .dlab__board { grid-template-columns: 1fr auto; gap: 10px; padding: 12px; }
  .dlab__board .dlab__label { grid-column: 1 / -1; justify-self: start; }
  .dlab__slot { gap: 6px; }
  .dlab__slot button { padding: 8px 10px; font-size: .86rem; }
  .dlab__slot button.is-first { padding: 10px 14px; font-size: .98rem; }
}
.dlab__slot { display: flex; flex-direction: row-reverse; justify-content: flex-start; align-items: center; gap: 8px; flex-wrap: nowrap; min-width: 0; }
.dlab__label { font-family: var(--f-mono); font-size: .8rem; font-weight: 500; color: var(--ink); padding: 4px 8px; border-radius: 6px; background: rgba(255,255,255,.7); }
.dlab__slot button { min-height: 44px; padding: 8px 14px; border-radius: 999px; background: #fff; color: var(--ink); font-weight: 600; font-size: .92rem; box-shadow: inset 0 0 0 1px var(--line-2); transition: transform .4s var(--ease-out), background-color .3s; }
.dlab__slot button:hover { background: var(--butter); transform: translateY(-2px); }
.dlab__slot button.is-first { min-height: 56px; padding: 12px 22px; font-size: 1.08rem; box-shadow: inset 0 0 0 2.5px var(--ink); }
.dlab__center { align-self: stretch; width: 2px; border-radius: 2px; background: repeating-linear-gradient(var(--ink-2) 0 6px, transparent 6px 10px); }
.dlab__legend { margin-top: 10px; font-size: .86rem; color: var(--ink-2); }
.dlab__status { margin-top: 10px; font-size: .92rem; color: var(--ink); min-height: 1.4em; }

/* ---------- service ---------- */
.subhead { font-family: var(--f-display); font-weight: 400; font-size: clamp(1.6rem, 2.4vw, 2.2rem); line-height: 1.1; letter-spacing: -0.015em; margin-top: 64px; }
.subhead + p { margin-top: 12px; color: var(--ink-2); max-width: 62ch; }
.signals { margin-top: 20px; display: grid; gap: 10px; counter-reset: sig; }
.signals li { display: grid; gap: 6px 20px; padding: 16px 18px; border-radius: 16px; background: var(--bg-2); box-shadow: var(--shadow-1); counter-increment: sig; }
@media (min-width: 800px) { .signals li { grid-template-columns: 1fr 1.15fr; align-items: start; gap: 6px 28px; } }
.signals li > span { color: var(--ink); font-weight: 600; line-height: 1.45; }
.signals__result { margin: 0; color: var(--ink-2); line-height: 1.55; }
.signals__result b { color: var(--ink); font-weight: 600; }

.held { display: grid; gap: 14px; margin-top: 24px; }
@media (min-width: 900px) { .held { grid-template-columns: 5fr 7fr; } }
.held__col { padding: 22px; border-radius: 18px; }
.held__col--yes { background: var(--mint); }
.held__col--no { background: var(--bg-2); box-shadow: var(--shadow-1); }
.held__col h4 { font-family: var(--f-display); font-weight: 400; font-size: 1.5rem; margin-bottom: 14px; }
.held__col ul { display: grid; gap: 12px; }
.held__col--yes li { display: grid; gap: 4px; padding-bottom: 14px; border-bottom: 1px dashed rgba(37,35,59,.2); color: var(--ink); }
.held__col--yes li:last-child { border: 0; padding-bottom: 0; }
.held__col--yes li b { font-weight: 600; }
.held__col--yes li p { margin: 0; color: var(--ink-2); font-size: .95rem; line-height: 1.55; }
.swap { padding-bottom: 14px; border-bottom: 1px dashed var(--line-2); }
.swap:last-child { border: 0; padding-bottom: 0; }
.swap__pair { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-weight: 600; color: var(--ink); }
.swap__pair s { color: var(--muted); text-decoration-color: var(--flame); text-decoration-thickness: 2px; font-weight: 500; }
.swap__pair i { font-style: normal; color: var(--flame); }
.swap p { margin-top: 6px; color: var(--ink-2); font-size: .95rem; line-height: 1.55; }
.card-pair { display: grid; gap: 14px; margin-top: 24px; }
@media (min-width: 800px) { .card-pair { grid-template-columns: 1fr 1fr; } }

/* ---------- next time ---------- */
.differently { margin-top: 56px; }
.differently ul { margin-top: 18px; display: grid; gap: 12px; max-width: 66ch; }
.differently li { position: relative; padding: 14px 16px 14px 44px; border-radius: 14px; background: var(--bg-2); color: var(--ink-2); line-height: 1.55; }
.differently li::before { content: ""; position: absolute; left: 18px; top: 22px; width: 12px; height: 2px; background: var(--flame); }
.differently li strong { color: var(--ink); font-weight: 600; }
.stove { margin-top: 20px; display: flex; gap: 10px; align-items: baseline; color: var(--ink-2); }
.stove b { font-family: var(--f-label); font-weight: 600; font-size: var(--fs-micro); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.cz-cta { margin-top: 44px; }

/* reduced motion: nothing here moves on its own; keep hover lifts still */
@media (prefers-reduced-motion: reduce) {
  .dlab__slot button:hover { transform: none; }
}
