/* Exit Code Zero v4 · consoles: the card shell and everything inside #card. Soda light: white to pale mint,
   Inter for words, Geist Mono for labels, pills, code and numbers. Dark panels only for code. */

#card.cz-card {
  --cz-mint: var(--mint, #12e29d);
  --cz-mint-hi: var(--mint-hi, #6bffc1);
  --cz-mint-pale: var(--mint-pale, #e9fbf2);
  --cz-ink: var(--ink, #0f0f0f);
  --cz-grey: var(--grey, #636363);
  --cz-grey2: var(--grey-2, #4a4a4a);
  --cz-line: #e2ebe7;
  --cz-green: var(--green-text, #0a7a52);
  --cz-red: var(--red, #e5484d);
  --cz-red-pale: var(--red-pale, #ffe9ea);
  --cz-red-text: var(--red-text, #c7262c);
  --cz-amber: var(--amber, #f0a400);
  --cz-amber-pale: var(--amber-pale, #fff1d6);
  --cz-amber-text: var(--amber-text, #8a5a00);
  --cz-violet: var(--violet, #6d4aff);
  --cz-lavender: var(--lavender, #f1edff);
  --cz-code-bg: var(--code-bg, #1b1d1c);
  --cz-code-ink: var(--code-ink, #e8efe9);
  --cz-sans: var(--sans, Inter), Inter, system-ui, -apple-system, sans-serif;
  --cz-mono: var(--mono, "Geist Mono"), "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  position: fixed;
  top: 72px;
  right: 30px;
  width: 480px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 96px);
  max-height: calc(100dvh - 96px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  box-sizing: border-box;
  border-radius: var(--r-card, 24px);
  background: linear-gradient(180deg, #ffffff 0%, #f6fdf9 55%, #e9fbf2 100%);
  border: 1px solid #dfeae5;
  box-shadow: 0 1px 2px rgba(15, 15, 15, .04), 0 18px 50px rgba(15, 61, 44, .14);
  color: var(--cz-ink);
  font: 400 14px/1.45 var(--cz-sans);
  -webkit-font-smoothing: antialiased;
  z-index: 20;
  text-align: left;
}
#card.cz-card *, #card.cz-card *::before, #card.cz-card *::after { box-sizing: border-box; }
#card.cz-card.cz-enter { animation: cz-slide-in .32s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes cz-slide-in { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }

#card .cz-strip { display: none; height: 6px; background: linear-gradient(90deg, #b7a6ff 0%, #8b6cff 45%, #6d4aff 100%); position: sticky; top: 0; z-index: 2; }
#card.cz-ai .cz-strip { display: block; }
#card .cz-inner { padding: 22px 24px 20px; transition: opacity .11s ease; }
#card .cz-inner.cz-fading { opacity: 0; }

#card .cz-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
#card .cz-chip { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border-radius: 999px; background: #fff; border: 1px solid var(--cz-line); font: 500 14px/1 var(--cz-sans); color: var(--cz-ink); }
#card .cz-chip .cz-ic { width: 16px; height: 16px; }
#card .cz-chip.find .cz-ic { color: var(--find, #c98a00); }
#card .cz-chip.understand .cz-ic { color: var(--understand, #6d4aff); }
#card .cz-chip.fix .cz-ic { color: var(--fix, #0fae73); }
#card .cz-tag { display: inline-flex; align-items: center; height: 26px; padding: 0 11px; border-radius: 999px; background: #d7f8e9; color: #0b7a53; border: 1px solid #bdf0d9; font: 500 13px/1 var(--cz-sans); white-space: nowrap; }
#card .cz-tagai { display: inline-flex; align-items: center; height: 26px; padding: 0 11px; border-radius: 999px; background: var(--cz-lavender); color: #5b3fd9; border: 1px solid #ddd3ff; font: 500 13px/1 var(--cz-sans); white-space: nowrap; }
#card .cz-foot { text-align: right; font: 400 12px/1 var(--cz-mono); color: #8a938f; margin-top: 12px; min-height: 0; }
#card .cz-foot:empty { display: none; }

#card .cz-ic { width: 16px; height: 16px; flex: 0 0 auto; display: inline-block; vertical-align: -3px; }
#card .mono { font-family: var(--cz-mono); }
#card .cz-src { font: 400 11px/1 var(--cz-mono); color: #8a938f; margin-left: 4px; white-space: nowrap; }
#card .cz-grey { color: var(--cz-grey); }
#card .cz-green { color: var(--cz-green); }
#card .cz-off { opacity: 0 !important; visibility: hidden; }
#card .cz-pop { animation: cz-pop .36s cubic-bezier(.2, .9, .3, 1.2) both; }
@keyframes cz-pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }

/* Buttons: Soda pills. Consoles never animate their own buttons; the coach ring is the only pulse. */
#card .btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 44px; padding: 0 20px; border-radius: 999px; font: 600 15px/1 var(--cz-sans); letter-spacing: -.01em; border: 1px solid transparent; white-space: nowrap; cursor: pointer; transition: background .15s ease, opacity .15s ease, transform .1s ease; -webkit-tap-highlight-color: transparent; }
#card .btn:active:not([disabled]) { transform: scale(.98); }
#card .btn:focus-visible { outline: 2px solid #0b7a53; outline-offset: 3px; }
#card .btn-mint { background: var(--cz-mint); color: #04281b; box-shadow: 0 6px 18px rgba(18, 226, 157, .35), inset 0 1px 0 rgba(255, 255, 255, .4); }
#card .btn-mint:hover:not([disabled]) { background: #22eaa8; }
#card .btn-white { background: #fff; color: var(--cz-ink); border-color: #dfe4e1; box-shadow: 0 1px 2px rgba(15, 15, 15, .05); }
#card .btn-reject { background: #fff; color: var(--cz-red-text); border-color: #f1d4d4; }
#card .btn[disabled] { background: #edf1ef; color: #9aa5a0; border-color: #e2e8e5; box-shadow: none; cursor: default; }
#card .btn.cz-full { width: 100%; height: 52px; font-size: 17px; }
#card .btn.cz-sm { height: 32px; padding: 0 13px; font-size: 13px; }
#card .cz-actions { display: flex; align-items: center; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
#card .cz-actions.cz-choices .btn { flex: 1 1 0; min-width: 0; padding: 0 12px; }
#card .cz-link { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; padding: 4px 0; font: 500 12.5px/1 var(--cz-sans); color: var(--cz-grey); cursor: pointer; }
#card .cz-link .cz-ic { width: 13px; height: 13px; }
#card .cz-link:hover { color: var(--cz-ink); }
#card .cz-note { margin: 10px 0 0; font: 400 12.5px/1.4 var(--cz-sans); color: #7b8580; }
#card .cz-note.cz-center { text-align: center; }
#card .cz-note.cz-tiny, #card .cz-tiny { font-size: 11.5px; }

/* Product face (onboard-4, finale-4) */
#card .cz-h2 { font: 600 30px/1.08 var(--cz-sans); letter-spacing: -1px; margin: 4px 0 0; text-wrap: balance; color: var(--cz-ink); }
#card .cz-quote { font: 400 16px/1.5 var(--cz-sans); color: var(--cz-grey); margin: 12px 0 0; letter-spacing: -.005em; }
#card .cz-title h3 { font: 600 26px/1.1 var(--cz-sans); letter-spacing: -.8px; margin: 0; }
#card .cz-title .cz-sub { margin: 6px 0 0; font-size: 12.5px; color: var(--cz-grey); }
#card .cz-sub2 { margin: 8px 0 0; font: 400 14px/1.45 var(--cz-sans); color: var(--cz-grey); }

/* Code panels: YAML and terminal */
#card .cz-fname { display: flex; align-items: center; gap: 8px; font: 500 13px/1 var(--cz-mono); color: #3d4643; margin: 2px 0 10px; }
#card .cz-code { border-radius: 14px; background: var(--cz-code-bg); border: 1px solid #262c2a; color: var(--cz-code-ink); font: 400 12.5px/1.62 var(--cz-mono); padding: 12px 0; overflow-x: auto; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04); margin: 0; }
#card .cz-ln { display: flex; align-items: center; white-space: pre; padding-right: 14px; position: relative; min-height: 20px; }
#card .cz-no { width: 34px; flex: 0 0 auto; text-align: right; padding-right: 12px; color: #55605b; }
#card .cz-ln.cz-hl { background: rgba(18, 226, 157, .06); }
#card .cz-ln.cz-add { background: rgba(18, 226, 157, .16); }
#card .cz-ln.cz-add::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--cz-mint); }
#card .cz-ln.cz-add .cz-no { color: var(--cz-mint-hi); }
#card .cz-ln.cz-del { background: rgba(229, 72, 77, .16); }
#card .cz-ln.cz-del::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--cz-red); }
#card .cz-ln.cz-del .cz-no, #card .cz-ln.cz-del .cz-pre { color: #ffb3b5; }
#card .cz-ln.cz-del .cz-pre * { color: inherit; }
#card .cz-ln.cz-typein .cz-pre { animation: cz-type .5s steps(18, end) both; display: inline-block; overflow: hidden; }
@keyframes cz-type { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
#card .cz-ghostln { background: rgba(18, 226, 157, .10); padding: 5px 14px 5px 0; }
#card .cz-ghostln::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--cz-mint); }
#card .btn.cz-chipadd { height: 28px; padding: 0 13px; font: 600 13px/1 var(--cz-mono); }
#card .cz-tapme { margin-left: 14px; font: 500 12px/1 var(--cz-mono); color: var(--cz-mint-hi); }
#card .cz-y-k { color: #7ee7c0; }
#card .cz-y-s { color: #f3d58a; }
#card .cz-y-n { color: #c7b6ff; }
#card .cz-y-d { color: #9aa5a0; }
#card .cz-underline { text-decoration: underline wavy var(--cz-amber); text-decoration-thickness: 1.5px; text-underline-offset: 4px; background: rgba(240, 164, 0, .14); border-radius: 3px; }

#card .cz-plain { margin-top: 14px; }
#card .cz-plain-h { font: 500 11px/1 var(--cz-mono); color: #8a938f; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 8px; }
#card .cz-plain-row { display: grid; grid-template-columns: 82px 1fr; gap: 10px; font: 400 13.5px/1.35 var(--cz-sans); color: #3d4643; margin: 4px 0; }
#card .cz-plain-row .mono { font-size: 11.5px; line-height: 18px; color: #8a938f; }
#card .cz-plain-row.cz-new span:last-child { color: var(--cz-green); font-weight: 600; }
#card .cz-plain-row.cz-new .mono { color: var(--cz-green); }

#card .cz-term { margin-top: 2px; }
#card .cz-termhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
#card .cz-termtitle { font-size: 13px; color: #3d4643; }
#card .cz-exitpill { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 999px; font: 600 13px/1 var(--cz-mono); transition: opacity .2s ease; }
#card .cz-exitpill .cz-ic { width: 13px; height: 13px; }
#card .cz-exitpill.bad { background: #ffd4d6; color: #a3171c; border: 1px solid #f8bcbc; }
#card .cz-exitpill.ok { background: #c8f7e2; color: #075c3d; border: 1px solid #9eecc9; }
#card .cz-tx { padding: 12px 14px; font-size: 12px; line-height: 1.6; }
#card .cz-tl { white-space: pre-wrap; word-break: break-word; transition: opacity .12s ease; }
#card .cz-tl.cz-cont { padding-left: 0; }
#card .cz-tl.t-dim { color: #8d9893; }
#card .cz-tl.t-pass { color: #b9f5d8; }
#card .cz-tl.t-fail { color: #ff9a9e; }
#card .cz-tl.t-bold { color: #fff; font-weight: 600; }
#card .cz-prompt { color: var(--cz-mint); }
#card .cz-term.cz-compact .cz-tx { font-size: 11px; line-height: 1.5; padding: 10px 12px; }

#card .cz-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
#card .cz-lg { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--cz-line); background: #fff; font-size: 11.5px; color: var(--cz-grey); white-space: nowrap; }
#card .cz-lg.on-bad { background: #ffe1e3; border-color: #f8bcbc; color: #a3171c; font-weight: 600; }
#card .cz-lg.on-ok { background: #d7f8e9; border-color: #bdf0d9; color: #075c3d; font-weight: 600; }
#card .cz-lgmore { display: contents; }
#card .cz-lgmore[hidden] { display: none !important; }

/* Lesson block */
#card .cz-lesson:empty { display: none; }
#card .cz-lesson-in { margin-top: 18px; animation: cz-pop .36s ease both; }
#card .cz-lessonbox { border: 1px solid var(--cz-line); background: #fff; border-radius: 16px; padding: 14px 16px 16px; }
#card .cz-lt { display: flex; align-items: center; gap: 7px; font: 500 11.5px/1 var(--cz-mono); letter-spacing: .05em; text-transform: uppercase; color: var(--cz-green); }
#card .cz-lt .cz-ic { width: 14px; height: 14px; }
#card .cz-lessonbox p { margin: 8px 0 0; font: 600 18px/1.3 var(--cz-sans); letter-spacing: -.3px; color: var(--cz-ink); }
#card .btn.cz-next { margin-top: 14px; }

/* Soda AI */
#card .cz-ailine { display: flex; align-items: flex-start; gap: 8px; margin-top: 14px; font: 400 12.5px/1.4 var(--cz-sans); color: #4c5551; }
#card .cz-ailine .cz-ic { color: var(--cz-violet); margin-top: 1px; }
#card .cz-ailine span:nth-child(2) { flex: 1; }
#card .cz-ask { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 8px 0 12px; border-radius: 14px; background: #fff; border: 1px solid #ddd3ff; box-shadow: 0 6px 18px -10px rgba(109, 74, 255, .5); margin-bottom: 16px; }
#card .cz-ask-ic { color: var(--cz-violet); display: inline-flex; }
#card .cz-ask-tx { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font: 400 13px/1 var(--cz-sans); color: var(--cz-ink); }
#card .cz-ask .cz-ph { color: #9aa5a0; }
#card .cz-ask-go { width: 28px; height: 28px; border-radius: 9px; background: var(--cz-lavender); color: var(--cz-violet); display: inline-flex; align-items: center; justify-content: center; }
#card .cz-ask.sent .cz-ask-go { background: var(--cz-violet); color: #fff; }
#card .cz-ask.sent .cz-ask-tx { white-space: normal; line-height: 1.35; font-size: 12.5px; color: #3d4643; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
#card .cz-ask.sent { height: auto; min-height: 44px; padding-top: 6px; padding-bottom: 6px; }
#card .cz-apbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; font-size: 12.5px; color: var(--cz-grey); }
#card .cz-appill { display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 12px 0 6px; border-radius: 999px; background: #111; color: #fff; font: 500 12.5px/1 var(--cz-sans); }
#card .cz-appill i { width: 15px; height: 15px; border-radius: 50%; background: linear-gradient(135deg, #b7a6ff, #6d4aff); }
#card .cz-dslist { margin-top: 12px; border: 1px solid var(--cz-line); border-radius: 14px; background: #fff; overflow: hidden; }
#card .cz-ds { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-top: 1px solid #edf2ef; min-height: 44px; transition: opacity .2s ease; }
#card .cz-ds:first-child { border-top: 0; }
#card .cz-ds.cz-flag { background: #fffaf0; box-shadow: inset 0 0 0 1.5px #f3dc9a; }
#card .cz-ds-l { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
#card .cz-ds-n { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#card .cz-ds-f { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--cz-amber-text); }
#card .cz-ds-f i { width: 6px; height: 6px; border-radius: 50%; background: var(--cz-amber); }
#card .cz-ds-r { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
#card .cz-st { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; white-space: nowrap; }
#card .cz-st i { width: 7px; height: 7px; border-radius: 50%; }
#card .cz-st .cz-ic { width: 13px; height: 13px; }
#card .cz-st.live { color: var(--cz-green); } #card .cz-st.live i { background: var(--cz-mint); }
#card .cz-st.prop { color: #6b55d9; } #card .cz-st.prop i { background: #a996ff; }
#card .cz-st.ok { color: var(--cz-green); }
#card .cz-st.warn { color: var(--cz-amber-text); }
#card .cz-st.rej { color: var(--cz-red-text); }
#card .cz-ds.cz-more { color: #8a938f; font-size: 12px; min-height: 36px; }
#card .cz-approvedby { display: flex; align-items: center; gap: 7px; margin-top: 14px; padding: 10px 12px; border-radius: 12px; background: #d7f8e9; color: #075c3d; font-size: 12.5px; }
#card .cz-profile { display: flex; align-items: center; gap: 8px; margin: 12px 0 10px; padding: 8px 12px; border-radius: 10px; background: var(--cz-amber-pale); color: var(--cz-amber-text); font-size: 12px; }

/* Panels and fields */
#card .cz-panel { margin-top: 4px; border: 1px solid var(--cz-line); border-radius: 14px; background: #fff; padding: 14px 16px; }
#card .cz-panel-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; font: 600 15px/1.2 var(--cz-sans); }
#card .cz-badge { font-size: 11.5px; padding: 4px 9px; border-radius: 999px; background: #d7f8e9; color: #0b7a53; white-space: nowrap; font-weight: 500; }
#card .cz-fields { display: grid; grid-template-columns: 112px 1fr; gap: 8px 12px; margin: 0; font-size: 13px; }
#card .cz-fields dt { font-size: 11.5px; color: #8a938f; line-height: 18px; }
#card .cz-fields dd { margin: 0; color: var(--cz-ink); line-height: 18px; overflow-wrap: anywhere; }
#card .cz-fields dd.mono { font-size: 12px; }
#card dl.cz-fields.cz-panel { margin-top: 12px; }
#card .cz-collapsed { margin-top: 10px; display: grid; gap: 8px; }
#card .cz-crow { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--cz-line); border-radius: 12px; background: rgba(255, 255, 255, .7); font-size: 13px; color: #3d4643; }
#card .cz-crow .cz-ic { color: #9aa5a0; width: 14px; height: 14px; }
#card .cz-crumb { font-size: 12.5px; color: #8a938f; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
#card .cz-crumb b { color: var(--cz-ink); font-weight: 500; }
#card .cz-tabs { display: flex; gap: 18px; margin-top: 10px; border-bottom: 1px solid var(--cz-line); font-size: 14px; color: var(--cz-grey); }
#card .cz-tabs span { padding: 6px 0 8px; }
#card .cz-tabs span.on { color: var(--cz-ink); font-weight: 500; box-shadow: inset 0 -2px 0 var(--cz-ink); }
#card .cz-onboard { display: flex; align-items: center; gap: 7px; margin-top: 12px; padding: 7px 10px; border-radius: 10px; background: #d7f8e9; color: #0b7a53; font-size: 11.5px; line-height: 1.35; }
#card .cz-row-on, #card .cz-row-ok { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding: 11px 14px; border-radius: 14px; border: 1px solid var(--cz-line); background: #fff; font-size: 13.5px; }
#card .cz-row-on > span:first-child, #card .cz-row-ok > span:first-child { display: inline-flex; align-items: center; gap: 8px; }
#card .cz-row-on.cz-slim { padding: 8px 12px; font-size: 12.5px; }
#card .cz-okdot { width: 8px; height: 8px; border-radius: 50%; background: var(--cz-mint); display: inline-block; }
#card .cz-onpill { padding: 4px 10px; border-radius: 999px; background: var(--cz-mint); color: #04281b; font-size: 12px; font-weight: 600; }
#card .cz-switch { width: 40px; height: 22px; border-radius: 999px; background: #cfd8d4; position: relative; flex: 0 0 auto; }
#card .cz-switch.on { background: var(--cz-mint); }
#card .cz-switch i { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
#card .cz-switch.on i { left: 21px; }

/* Round 2 monitor */
#card .cz-mon { margin-top: 12px; border: 1px solid var(--cz-line); border-radius: 16px; background: #fff; padding: 14px 16px; }
#card .cz-mon-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
#card .cz-mon-name { font: 600 15px/1.2 var(--cz-sans); }
#card .cz-mon-sub { font-size: 12.5px; color: var(--cz-grey); margin-top: 2px; }
#card .cz-anpill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; background: #fff0f0; border: 1px solid #f8bcbc; color: var(--cz-red-text); font-size: 12px; white-space: nowrap; }
#card .cz-anpill i { width: 7px; height: 7px; border-radius: 50%; background: var(--cz-red); }
#card .cz-mon-mid { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; margin-top: 8px; }
#card .cz-big { font: 600 44px/1 var(--cz-sans); letter-spacing: -1.5px; color: var(--cz-ink); }
#card .cz-big.bad { color: var(--cz-red); }
#card .cz-big span { font: 500 15px/1 var(--cz-mono); letter-spacing: 0; color: var(--cz-ink); margin-left: 6px; }
#card .cz-mon-exp { text-align: right; font-size: 12px; color: var(--cz-grey); line-height: 1.5; }
#card .cz-mon-exp b { color: var(--cz-green); font-weight: 500; }
#card .cz-band { width: 100%; height: auto; display: block; margin-top: 10px; overflow: visible; }
#card .cz-band .cz-grid line { stroke: #eef2f0; stroke-width: 1; }
#card .cz-band text { font: 400 var(--cz-band-fs, 9.5px) var(--cz-mono); fill: #9aa5a0; }
#card .cz-bandrect { fill: rgba(18, 226, 157, .28); stroke: rgba(18, 226, 157, .6); stroke-width: .8; }
#card .cz-meas { fill: none; stroke: #1b1d1c; stroke-width: 1.6; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
#card .cz-band.cz-draw .cz-meas { animation: cz-draw .9s ease-out both; }
@keyframes cz-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
#card .cz-drop { stroke: var(--cz-red); stroke-width: 1.2; stroke-dasharray: 2 3; }
#card .cz-halo { fill: rgba(229, 72, 77, .18); }
#card .cz-dot { fill: var(--cz-red); stroke: #fff; stroke-width: 1.5; }
#card .cz-band.cz-draw .cz-dot, #card .cz-band.cz-draw .cz-halo, #card .cz-band.cz-draw .cz-anlabel, #card .cz-band.cz-draw .cz-drop { animation: cz-fadein .3s ease .85s both; }
@keyframes cz-fadein { from { opacity: 0; } to { opacity: 1; } }
#card .cz-anlabel rect { fill: #fff0f0; stroke: #f8bcbc; }
#card .cz-anlabel text { fill: var(--cz-red-text); font-size: var(--cz-band-fs, 9.5px); }
#card .cz-legend2 { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 6px; font-size: 11px; color: var(--cz-grey); }
#card .cz-legend2 span { display: inline-flex; align-items: center; gap: 6px; }
#card .cz-legend2 i { display: inline-block; }
#card .lg-band { width: 14px; height: 9px; border-radius: 2px; background: rgba(18, 226, 157, .35); border: 1px solid rgba(18, 226, 157, .7); }
#card .lg-line { width: 14px; height: 2px; background: #1b1d1c; }
#card .lg-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cz-red); }
#card .cz-bandempty { margin-top: 12px; height: 92px; border-radius: 12px; border: 1.5px dashed #cfe3da; display: flex; align-items: center; justify-content: center; text-align: center; padding: 0 16px; font-size: 12px; color: #8a938f; }

/* Round 4 Slack */
#card .cz-slackwin { border-radius: 14px; border: 1px solid #e3e6e5; background: #fff; box-shadow: 0 12px 30px -16px rgba(15, 15, 15, .3); overflow: hidden; }
#card .cz-slack-top { display: flex; align-items: center; gap: 10px; padding: 9px 12px; background: #f6f7f7; border-bottom: 1px solid #eceeed; font-size: 12.5px; color: #3d4643; }
#card .cz-dots { display: inline-flex; gap: 5px; }
#card .cz-dots i { width: 9px; height: 9px; border-radius: 50%; background: #dfe3e1; }
#card .cz-slack-msg { display: flex; gap: 12px; padding: 14px; }
#card .cz-gatetile { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(180deg, #2ff0ad, #10c987); color: #fff; display: inline-flex; align-items: center; justify-content: center; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 6px 16px rgba(16, 160, 110, .28); }
#card .cz-gatetile .cz-ic { width: 20px; height: 20px; stroke-width: 3; }
#card .cz-gatetile.big { width: 64px; height: 64px; border-radius: 18px; }
#card .cz-gatetile.big .cz-ic { width: 32px; height: 32px; }
#card .cz-slack-body { min-width: 0; flex: 1; }
#card .cz-slack-who { display: flex; align-items: center; gap: 7px; font-size: 14px; }
#card .cz-app { font-size: 9.5px; padding: 2px 4px; border-radius: 3px; background: #eceeed; color: #616061; }
#card .cz-slack-title { font: 600 14px/1.3 var(--cz-sans); margin-top: 4px; color: var(--cz-red-text); }
#card .cz-slack-f { display: grid; grid-template-columns: 88px 1fr; gap: 4px 10px; margin: 8px 0 10px; font-size: 12.5px; }
#card .cz-slack-f dt { color: #616061; }
#card .cz-slack-f dd { margin: 0; font-size: 12px; overflow-wrap: anywhere; }
#card .cz-slack-btn { display: inline-flex; height: 28px; align-items: center; padding: 0 12px; border-radius: 6px; border: 1px solid #d9dcdb; font: 600 12.5px/1 var(--cz-sans); color: #1d1c1d; }

/* Round 5 records */
#card .cz-failban { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: var(--cz-red-pale); border: 1px solid #f8c6c8; }
#card .cz-xbox { width: 26px; height: 26px; border-radius: 8px; background: var(--cz-red); color: #fff; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
#card .cz-xbox .cz-ic { width: 14px; height: 14px; stroke-width: 3; }
#card .cz-failban > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
#card .cz-failban b { font-size: 13px; color: #8a1d1d; font-weight: 600; }
#card .cz-failban > div span { font-size: 11px; color: #b0494c; overflow-wrap: anywhere; }
#card .cz-failn { font: 600 22px/1 var(--cz-mono) !important; color: var(--cz-red-text) !important; }
#card .cz-tablewrap { margin-top: 12px; border: 1px solid var(--cz-line); border-radius: 14px; background: #fff; overflow: hidden; }
#card .cz-tr { display: grid; grid-template-columns: 1.3fr .7fr .75fr .45fr 1.5fr; gap: 6px; align-items: center; padding: 0 12px; height: 34px; font-size: 12px; border-top: 1px solid #f0f3f1; }
#card .cz-tr .r { text-align: right; }
#card .cz-th { height: 32px; border-top: 0; color: #8a938f; font-size: 11px; background: #fbfcfb; }
#card .cz-tr.cz-shade { background: #fffaf0; }
#card .cz-store { display: inline-block; padding: 2px 7px; border-radius: 6px; background: #fde68a; color: #7a4a05; font-weight: 600; font-style: italic; }
#card .cz-sec { color: #b46b00; font-weight: 700; }
#card .cz-plus { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 999px; background: #fde68a; color: #7a4a05; font-size: 10px; }
#card .cz-tfoot { padding: 9px 12px; font-size: 11.5px; color: var(--cz-grey); border-top: 1px solid #f0f3f1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#card .cz-hint { display: flex; align-items: center; gap: 9px; margin-top: 12px; padding: 11px 14px; border-radius: 14px; border: 1px dashed #f3d27a; background: #fffbef; font-size: 13.5px; color: #3d4643; }
#card .cz-hint .cz-ic { color: var(--cz-amber); }
#card .cz-groupbar { margin-top: 14px; padding: 14px 16px; border-radius: 16px; background: #fff; border: 1.5px solid #f3d27a; box-shadow: 0 10px 26px -18px rgba(122, 74, 5, .5); }
#card .cz-gb-top { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 13px; }
#card .cz-gb-top span { color: var(--cz-grey); }
#card .cz-gb-fill { margin-top: 10px; height: 12px; border-radius: 999px; background: #f3f0e6; overflow: hidden; }
#card .cz-gb-fill i { display: block; height: 100%; width: 100%; border-radius: 999px; background: linear-gradient(90deg, #f7c948, #f0a400); }
#card .cz-groupbar.cz-grow .cz-gb-fill i { animation: cz-fill .65s ease-out both; }
@keyframes cz-fill { from { width: 4%; } to { width: 100%; } }
#card .cz-gb-n { margin-top: 8px; font-size: 12px; color: var(--cz-amber-text); }
#card .cz-gb-rest { margin-top: 8px; padding: 8px 14px; font-size: 11.5px; color: #8a938f; }

/* Round 6 lineage */
#card .cz-lin { margin-top: 12px; padding: 14px; border-radius: 16px; background: #fff; border: 1px solid var(--cz-line); }
#card .cz-trunk { display: grid; gap: 8px; position: relative; }
#card .cz-node { display: flex; align-items: center; gap: 9px; padding: 8px 11px; border-radius: 11px; border: 1px solid #e6ecea; background: #fbfdfc; position: relative; }
#card .cz-node b { display: block; font-size: 12px; font-weight: 500; color: var(--cz-ink); overflow-wrap: anywhere; }
#card .cz-node span { display: block; font-size: 11.5px; color: var(--cz-grey); margin-top: 1px; }
#card .cz-node.person { background: #f6f4ff; border-color: #e6e0ff; }
#card .cz-q { width: 9px; height: 9px; border-radius: 50%; background: #cfd8d4; flex: 0 0 auto; }
#card .cz-q.red { background: var(--cz-red); box-shadow: 0 0 0 3px rgba(229, 72, 77, .18); }
#card .cz-q.amber { background: var(--cz-amber); box-shadow: 0 0 0 3px rgba(240, 164, 0, .2); }
#card .cz-trunk .cz-node:not(:last-child)::after, #card .cz-branch .cz-node:not(:last-child)::after { content: ""; position: absolute; left: 15px; bottom: -9px; width: 1.5px; height: 8px; background: #cfdcd6; }
#card .cz-branches { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; position: relative; }
#card .cz-branches::before { content: ""; position: absolute; left: 15px; right: calc(50% - 20px); top: -10px; height: 10px; border: 1.5px solid #cfdcd6; border-bottom: 0; border-radius: 8px 8px 0 0; }
#card .cz-branch { display: grid; gap: 8px; align-content: start; }
#card .cz-lin.hot .cz-trunk .cz-node:last-child, #card .cz-lin.hot .cz-branch .cz-node { border-color: #f8c6c8; background: #fff7f7; }
#card .cz-lin.hot .cz-branch .cz-node.person { border-color: #e6e0ff; background: #f6f4ff; }
#card .cz-lin.hot .cz-branch.b0 .cz-node:nth-child(2) { box-shadow: 0 0 0 2px rgba(229, 72, 77, .35); }
#card .cz-lin.hot .cz-branches::before, #card .cz-lin.hot .cz-node::after { background: #f19a9d; border-color: #f19a9d; }
#card .cz-lin.cz-flow .cz-branch .cz-node { animation: cz-pop .4s ease both; }
#card .cz-lin.cz-flow .cz-branch .cz-node:nth-child(2) { animation-delay: .15s; }
#card .cz-lin.cz-flow .cz-branch .cz-node:nth-child(3) { animation-delay: .3s; }
#card .cz-impactbox { margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: var(--cz-red-pale); border: 1px solid #f8c6c8; }
#card .cz-ib-h { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--cz-red-text); text-transform: uppercase; letter-spacing: .05em; }
#card .cz-impactbox p { margin: 6px 0 0; font-size: 13.5px; line-height: 1.45; color: #3d2526; }
#card .cz-notecard { margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: #fff; border: 1px solid var(--cz-line); }
#card .cz-notecard.sent { border-color: #bdf0d9; background: #f4fdf8; }
#card .cz-nc-h { display: flex; justify-content: space-between; align-items: center; font-size: 11.5px; color: #8a938f; }
#card .cz-sent { display: inline-flex; align-items: center; gap: 5px; color: var(--cz-green); font-weight: 600; }
#card .cz-notecard p { margin: 6px 0 0; font-size: 14px; line-height: 1.45; }
#card .cz-nc-att { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 4px 9px; border-radius: 8px; background: #f2f5f4; font-size: 11px; color: var(--cz-grey); }

/* Round 7 query */
#card .cz-qwrap { display: grid; grid-template-columns: 150px 1fr; gap: 12px; }
#card .cz-rail { border: 1px solid var(--cz-line); border-radius: 14px; background: #fff; padding: 10px 8px; font-size: 11px; align-self: start; }
#card .cz-rail-h { color: #8a938f; padding: 0 6px 6px; }
#card .cz-rail-t { display: flex; align-items: center; gap: 6px; padding: 5px 6px; border-radius: 7px; color: #3d4643; overflow: hidden; }
#card .cz-rail-t span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#card .cz-rail-t .cz-ic { width: 12px; height: 12px; color: #9aa5a0; }
#card .cz-rail-t.on { background: #d7f8e9; color: #075c3d; }
#card .cz-qmain { min-width: 0; }
#card .cz-sql { padding: 12px 14px; font-size: 12px; line-height: 1.6; white-space: pre-wrap; }
#card .cz-res .cz-tr { grid-template-columns: 1fr auto; }
#card .cz-sample { margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: #fff; border: 1px solid var(--cz-line); font-size: 11px; }
#card .cz-sample-h { color: #8a938f; margin-bottom: 6px; }
#card .cz-sample-r { display: flex; flex-wrap: wrap; gap: 4px 12px; color: #3d4643; }
#card .cz-sample-r i { font-style: normal; color: #8a938f; }

/* Round 8 */
#card .cz-motif { display: grid; grid-template-columns: auto minmax(16px, 1fr) auto minmax(16px, 1fr) auto; align-items: center; gap: 0; padding: 18px 14px; margin-bottom: 16px; border-radius: 18px; border: 1px solid #d9efe5; background: radial-gradient(circle at 50% 50%, rgba(18, 226, 157, .14), transparent 60%), #f7fdfa; background-image: radial-gradient(rgba(15, 61, 44, .08) 1px, transparent 1.2px); background-size: 14px 14px; }
#card .cz-m-col { display: grid; gap: 10px; }
#card .cz-m-lines { width: 100%; height: 92px; display: block; }
#card .cz-m-lines path { fill: none; stroke: #8fe3c0; stroke-width: 1.4; }
#card .cz-prec { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 7px; font: 500 11.5px/1 var(--cz-mono); white-space: nowrap; }
#card .cz-prec.bad { background: #ff8f93; color: #5c0b0e; }
#card .cz-prec.warn { background: #fdd77a; color: #5c3a00; }
#card .cz-prec.good { background: var(--cz-mint); color: #04281b; }
#card .cz-quotebox { display: flex; gap: 9px; align-items: flex-start; margin-top: 14px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--cz-line); background: #fff; font-size: 13.5px; line-height: 1.45; color: #3d4643; }
#card .cz-quotebox .cz-ic { color: var(--cz-green); margin-top: 2px; }
#card .cz-steward { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--cz-line); background: #fff; }
#card .cz-steward > div { flex: 1; min-width: 0; }
#card .cz-steward b { display: block; font-size: 14px; font-weight: 600; }
#card .cz-steward div span { font-size: 11px; color: var(--cz-grey); }
#card .cz-disc { width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font: 600 12.5px/1 var(--cz-sans); flex: 0 0 auto; }
#card .cz-disc.grey { background: #e6e9e8; color: var(--cz-ink); }
#card .cz-disc.sm { width: 24px; height: 24px; font-size: 10px; }
#card .cz-agentpill { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 999px; background: #d7f8e9; color: #0b7a53; border: 1px solid #bdf0d9; font-size: 11.5px; white-space: nowrap; }
#card .cz-agentpill .cz-ic { width: 13px; height: 13px; }
#card .cz-trace { display: flex; align-items: center; gap: 7px; margin-top: 10px; font-size: 12.5px; color: #3d4643; }
#card .cz-trace .cz-ic { color: #9aa5a0; }
#card .cz-qlist { display: grid; gap: 8px; margin-top: 10px; }
#card .cz-qrow { padding: 10px 12px; border-radius: 14px; border: 1px solid var(--cz-line); background: #fff; }
#card .cz-qrow.active { border: 1.5px solid #6fdcb1; box-shadow: 0 10px 26px -16px rgba(15, 140, 95, .55); }
#card .cz-qr-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
#card .cz-storepill { padding: 2px 7px; border-radius: 6px; background: #fde68a; color: #7a4a05; font-size: 11px; }
#card .cz-qr-rule { margin-left: auto; font-size: 10.5px; color: #8a938f; }
#card .cz-qr-mid { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
#card .cz-old { padding: 3px 8px; border-radius: 7px; background: var(--cz-red-pale); color: var(--cz-red-text); text-decoration: line-through; font-size: 12px; }
#card .cz-arrow .cz-ic { width: 13px; height: 13px; color: #9aa5a0; }
#card .cz-fix { padding: 3px 8px; border-radius: 7px; background: #d7f8e9; color: #075c3d; font-size: 12px; }
#card .cz-fix.changed { background: var(--cz-mint); color: #04281b; font-weight: 600; }
#card .cz-qr-agent { font-size: 11px; color: #8a938f; }
#card .cz-qr-act { margin-top: 10px; gap: 8px; }
#card .cz-qr-pills { display: flex; gap: 8px; margin-top: 10px; }
#card .cz-qr-pills .btn { min-width: 64px; font-family: var(--cz-mono); }
#card .cz-qr-out { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; padding: 4px 10px; border-radius: 999px; font-size: 11.5px; border: 1px solid #bdf0d9; color: #075c3d; background: #f2fcf7; }
#card .cz-qr-out.warn { border-color: #f3dc9a; color: var(--cz-amber-text); background: #fffaf0; }
#card .cz-qr-out.hand { border-color: #dfe4e1; color: #3d4643; background: #f7f9f8; }
#card .cz-qr-out .cz-ic { width: 12px; height: 12px; }
#card .cz-qmore { display: flex; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--cz-line); background: rgba(255, 255, 255, .7); font-size: 12px; }
#card .cz-bulkrow { justify-content: space-between; }
#card .cz-decided { font-size: 11.5px; color: #8a938f; margin-left: auto; }

/* Round 9 and finale */
#card .cz-reply { padding: 14px; border-radius: 16px; background: #fff; border: 1px solid var(--cz-line); }
#card .cz-reply-h { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--cz-grey); }
#card .cz-reply p { margin: 8px 0 0; font-size: 15px; line-height: 1.45; }
#card .cz-runner { margin-top: 12px; padding: 14px; border-radius: 16px; background: #fff; border: 1.5px solid #6fdcb1; }
#card .cz-runner-h { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--cz-green); }
#card .cz-runner-row { display: grid; gap: 4px; margin-top: 8px; }
#card .cz-runner-row b { font-size: 15px; font-weight: 600; }
#card .cz-runner-row .mono { font-size: 12.5px; color: var(--cz-ink); }
#card .cz-runner-row .cz-grey { font-size: 13px; }
#card .cz-runhead { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; padding: 9px 12px; border-radius: 12px; background: #d7f8e9; color: #075c3d; font-size: 12px; }
#card .cz-clock { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 999px; background: #fff; color: var(--cz-ink); white-space: nowrap; }
#card .cz-bigexit { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 16px; height: 64px; border-radius: 999px; font: 700 24px/1 var(--cz-mono); }
#card .cz-bigexit .cz-ic { width: 24px; height: 24px; stroke-width: 3; }
#card .cz-bigexit.ok { background: var(--cz-mint); color: #04281b; box-shadow: 0 10px 30px rgba(18, 226, 157, .45); }
#card .cz-bigexit.bad { background: var(--cz-red); color: #fff; }
#card .cz-err .cz-note { color: var(--cz-red-text); }

/* Narrow: a bottom sheet fitted to its content. The sheet and the bubble docked on its top edge share one height
   budget, --sheet-cap (styles.css: the screen height less the band the island needs for the board pack and the
   round's gate, at most 56% as spec 8.3 allows), so the sheet gives up the bubble's height (--dock, set by
   guide.js). Longer faces scroll inside the sheet under a sticky head; the live action row and Next round ride in
   sticky bars at the bottom edge, so the coached control never needs scrolling to. */
@media (max-width: 759.98px) {
  #card.cz-card {
    top: auto; left: 0; right: 0; bottom: 0; width: auto; max-width: none;
    max-height: 44vh; max-height: 44dvh;
    max-height: calc(var(--sheet-cap, 44dvh) - var(--dock, 0px));
    border-radius: 24px 24px 0 0; border-bottom: 0;
    box-shadow: 0 -10px 40px rgba(15, 61, 44, .14);
    scroll-padding: 58px 0 14px;
  }
  #card.cz-card.cz-docked { border-radius: 0; border-top: 0; box-shadow: none; }
  #card.cz-ai.cz-docked .cz-strip { height: 4px; }
  /* the head (chapter chip and product tag) stays at the top of the sheet; scrolled content runs under it */
  #card .cz-head { position: sticky; top: 0; z-index: 4; margin: -16px -16px 8px; padding: 12px 16px 8px; background: #fff; flex-wrap: nowrap; overflow: hidden; }
  #card.cz-ai .cz-head { top: 6px; }
  #card.cz-ai.cz-docked .cz-head { top: 4px; }
  /* the action row that holds the live coached control is a sticky bar at the sheet's bottom edge */
  #card .cz-face > .cz-actions:has([data-coach]:not([disabled])) {
    position: sticky; bottom: 0; z-index: 3; margin: 12px -16px 0; padding: 10px 16px calc(14px + env(safe-area-inset-bottom, 0px));
    background: #f2fbf6; border-top: 1px solid #dcebe4;
  }
  #card .cz-inner { padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
  #card.cz-card.cz-enter { animation-name: cz-sheet-in; }
  @keyframes cz-sheet-in { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
  #card .cz-inner { padding: 16px 16px 24px; }
  #card .cz-head { margin-bottom: 10px; }
  #card .cz-chip { height: 28px; font-size: 13px; }
  #card .cz-tag, #card .cz-tagai { height: 26px; font-size: 13px; }
  #card .cz-h2 { font-size: 24px; letter-spacing: -.6px; }
  #card .cz-quote { font-size: 14.5px; margin-top: 8px; }
  #card .cz-title h3 { font-size: 21px; }
  #card .cz-actions { margin-top: 12px; gap: 8px; }
  #card .btn.cz-full { height: 48px; font-size: 16px; }
  #card .btn { height: 44px; font-size: 14px; padding: 0 14px; }
  #card .btn.cz-sm { height: 34px; font-size: 13px; padding: 0 12px; }
  /* small controls keep their size and get a 44 px tall tap target around it */
  #card .btn.cz-sm, #card .btn.cz-chipadd, #card .cz-link { position: relative; }
  #card .btn.cz-sm::after, #card .btn.cz-chipadd::after, #card .cz-link::after { content: ""; position: absolute; left: 50%; top: 50%; width: calc(100% + 4px); min-width: 44px; height: 44px; transform: translate(-50%, -50%); }
  /* the link's hit area sits above the lesson box (a plain box) where the two meet on a short sheet */
  #card .cz-link { font-size: 13.5px; z-index: 1; }
  #card .cz-code { font-size: 12px; line-height: 1.5; padding: 8px 0; }
  #card .cz-tx { font-size: 12px; padding: 8px 10px; }
  /* the terminal head keeps "Exit code 0" on one line and shortens its title instead */
  #card .cz-exitpill { white-space: nowrap; flex: none; }
  /* small print at 12 px or more on a phone */
  #card .cz-src, #card .src { font-size: 12px; }
  #card .cz-app { font-size: 12px; padding: 1px 5px; }
  #card .cz-lg { font-size: 12px; height: 26px; }
  #card .cz-lt { font-size: 12px; }
  #card .cz-onboard { font-size: 12px; }
  #card .cz-termtitle { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  /* round 3's dataset rows: a name too long to share its line with the status takes the whole line, and the
     status (and the Open button) moves to a second line, right aligned, so the name reads whole */
  #card .cz-ds { flex-wrap: wrap; row-gap: 6px; }
  #card .cz-ds-l { flex: 1 1 auto; }
  #card .cz-ds-r { margin-left: auto; }
  #card .cz-no { width: 24px; padding-right: 8px; }
  #card .cz-plain, #card .cz-hide-n, #card .cz-motif { display: none !important; }
  #card .cz-tr { grid-template-columns: 1.4fr .7fr .8fr 1.2fr; font-size: 11px; padding: 0 10px; }
  #card .cz-qwrap { grid-template-columns: 1fr; }
  #card .cz-rail { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px; }
  #card .cz-rail-h { display: none; }
  #card .cz-rail-t:not(.on) { display: none; }
  #card .cz-branches { grid-template-columns: 1fr; }
  #card .cz-branches::before { display: none; }
  #card .cz-fields { grid-template-columns: 92px 1fr; font-size: 12.5px; }
  #card .cz-qr-rule { display: none; }
  #card .cz-big { font-size: 36px; }
  #card .cz-lessonbox p { font-size: 16px; }
  #card .cz-bigexit { height: 54px; font-size: 20px; }
  #card .cz-foot { margin-top: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  #card.cz-card.cz-enter, #card .cz-pop, #card .cz-lesson-in, #card .cz-lin.cz-flow .cz-node { animation: none !important; }
  #card .cz-band.cz-draw .cz-meas, #card .cz-band.cz-draw .cz-dot, #card .cz-band.cz-draw .cz-halo, #card .cz-band.cz-draw .cz-anlabel, #card .cz-band.cz-draw .cz-drop { animation: none !important; }
  #card .cz-inner { transition: none; }
}

/* Check lines: marker in its color, measurement in the panel ink. */
#card .cz-tl.t-pass .cz-mark { color: #6bffc1; }
#card .cz-tl.t-pass .cz-rest { color: var(--cz-code-ink); }
#card .cz-tl.t-fail .cz-mark { color: #ff8a8d; font-weight: 600; }

/* Compact pass (1440 card height): outcomes and waits sit inline on the fix row; lineage nodes on one line. */
#card .cz-qr-mid .cz-qr-out { margin: 0 0 0 auto; }
#card .cz-qr-wait { margin-left: auto; font-size: 11px; color: #9aa5a0; }
#card .cz-node { padding: 6px 10px; }
#card .cz-node > div { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 8px; min-width: 0; }
#card .cz-node span { margin-top: 0; }
#card .cz-trunk .cz-node:not(:last-child)::after, #card .cz-branch .cz-node:not(:last-child)::after { bottom: -9px; }
#card .cz-tx { font-size: 11.2px; }
@media (max-width: 759.98px) {
  #card .cz-queue .cz-row-on.cz-slim { display: none; }
  #card .cz-tx { font-size: 12px; }
}

/* Short narrow screens (a phone browser with its toolbars, an in-app viewer): the lesson face fits the sheet
   whole above Next round. The chapter chip and the product tag step out (the goal line carries the chapter), and
   the lesson box and the bars tighten. */
@media (max-width: 759.98px) and (max-height: 719.98px) {
  #card.cz-lessoned .cz-head { display: none; }
  #card .cz-lessonbox { padding: 11px 14px 12px; border-radius: 14px; }
  #card .cz-lessonbox p { font-size: 15px; line-height: 1.3; margin-top: 6px; }
  #card .cz-nextbar { padding-top: 10px; padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
  #card .btn.cz-full { height: 46px; }
  #card .cz-face > .cz-actions:has([data-coach]:not([disabled])) { padding-top: 9px; padding-bottom: calc(11px + env(safe-area-inset-bottom, 0px)); }
  #card .cz-h2 { font-size: 22px; }
}
/* an in-app viewer (under 600 px tall): rounds 7 and 8 keep two gates in the band, so their sheet is the
   shortest; the lesson box tightens once more so it stays whole above Next round */
@media (max-width: 759.98px) and (max-height: 599.98px) {
  #card .cz-lessonbox { padding: 8px 13px 8px; }
  #card .cz-lessonbox p { font-size: 14.5px; line-height: 1.28; margin-top: 4px; }
  /* the Next round bar gives up 10 px and the lesson sits 6 px under the "Other codes" link, so the link above
     it keeps its whole 44 px tap area inside the sheet (rounds 1 and 8 scroll it to the sheet's top edge) */
  #card .cz-nextbar { padding-top: 6px; padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px)); }
  #card .cz-nextbar .btn.cz-full { height: 44px; }
  #card.cz-compact.cz-lessoned .cz-lesson-in { margin-top: 6px; }
}

/* Phones: no text in the sheet under 12 px (the desktop card keeps its finer print). */
@media (max-width: 759.98px) {
  #card .cz-src, #card .cz-tiny, #card .cz-note.cz-tiny, #card .cz-plain-h, #card .cz-plain-row .mono,
  #card .cz-term.cz-compact .cz-tx, #card .cz-ds-f, #card .cz-st, #card .cz-badge, #card .cz-fields dt,
  #card .cz-legend2, #card .cz-failban > div span, #card .cz-th, #card .cz-tfoot, #card .cz-gb-rest,
  #card .cz-node span, #card .cz-ib-h, #card .cz-nc-h, #card .cz-nc-att, #card .cz-rail, #card .cz-sample,
  #card .cz-prec, #card .cz-steward div span, #card .cz-disc.sm, #card .cz-agentpill, #card .cz-storepill,
  #card .cz-qr-rule, #card .cz-qr-agent, #card .cz-qr-out, #card .cz-decided, #card .cz-reply-h,
  #card .cz-runner-h, #card .cz-tr, #card .cz-qr-wait, #card .cz-plus, #card .cz-tr * { font-size: 12px; }
  #card .cz-code, #card .cz-tx, #card .cz-term.cz-compact .cz-tx { font-size: 12px; }
}
