/* Make cards (index.html's #cards dialog and its top-bar button; cards.js). Only on a server run with TUTOR_CARDS=1 (and
   TUTOR_REVIEW=1 under it): without them the page has none of this markup and this file isn't served. Colors come from
   tokens.css (Versal Ink or Versal Paper). The dialog's header, body and message reuse Practice's classes (app.css). */

.cards-open { gap: 8px; min-height: 44px; padding: 0 12px; font-size: 14px; white-space: nowrap; }
.cards-open svg { width: 16px; height: 16px; flex: none; }
/* The top bar pushes its right-hand group over with one auto margin: Review's, or this button's when Review isn't showing */
.review-open[hidden] ~ .cards-open:not([hidden]) { margin-left: auto; }
.review-open:not([hidden]) ~ .acct, .cards-open:not([hidden]) ~ .acct { margin-left: 0; }
/* Tight bar: the account chip gives way before this button wraps (Review's own rules, in review.css, cover it when Review
   shows too; on a phone the chip is only its avatar and the wordmark gives way instead, see there) */
@media (min-width: 641px) {
  .cards-open:not([hidden]) ~ .acct { min-width: 0; }
  .cards-open:not([hidden]) ~ .acct .chip { max-width: min(220px, 100%); }
}
/* The label goes on the same screens as Review's: a phone, a small tablet, and a small laptop with Review beside the chat
   and the chats column open */
@media (max-width: 600px) {
  .cards-open { padding: 0 10px; }
  .cards-open span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
@media (min-width: 1100px) and (max-width: 1279px) {
  html.side-open.review-shown .cards-open { padding: 0 10px; }
  html.side-open.review-shown .cards-open span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}

.card-dialog.cards { width: min(680px, calc(100vw - 32px)); padding: 0; scroll-padding-top: 120px; }
@media (max-width: 520px) { .card-dialog.cards { width: calc(100vw - 16px); } }
.pr-head #cd-back:not([hidden]) + .pr-titles { margin-left: -2px; }
.pr-head #cd-back { margin: 0 0 0 -12px; flex: none; }

/* What it says */
.cards .cd-lead { margin: 0 0 14px; color: var(--ws-muted); font-size: 14px; line-height: 1.5; }
.cards .cd-lead:focus, .cards .cd-wait:focus, .cards .cd-big:focus, .cards .cd-refused:focus { outline: none; }
.cards .cd-refused, .cards .cd-note { margin: 0 0 14px; padding: 12px 14px; border: 1px solid var(--ws-note-border);
  background: var(--ws-note-bg); font-size: 14px; line-height: 1.5; }
.cards .cd-wait { margin: 8px 0; font-size: 16px; font-weight: 600; }
.cards .cd-big { margin: 0 0 10px; font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.cards .cd-hint { margin: 6px 0 0; color: var(--ws-muted); font-size: 13px; line-height: 1.45; }
.cards .cd-fine { margin: 22px 0 0; color: var(--ws-muted); font-size: 13px; line-height: 1.45; }
.cards .cd-h { margin: 0 0 8px; color: var(--ws-muted); font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.cards .cd-h label { display: block; }
.cards .cd-link { margin: 18px 0 0; }

/* The ways in */
.cards .cd-section + .cd-section { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--ws-border); }
.cards .cd-notes { min-height: 150px; line-height: 1.5; }
.cards .cd-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 12px 0 0; }
.cards .cd-split { display: flex; align-items: center; gap: 12px; margin: 18px 0 2px; color: var(--ws-muted); font-size: 13px; font-weight: 600; }
.cards .cd-split::before, .cards .cd-split::after { content: ""; flex: 1; height: 1px; background: var(--ws-border); }
.cards .btn[aria-disabled="true"] { opacity: 0.55; cursor: default; }

/* The drafts: each card's front and back to change, and a way to take it out */
.cards .cd-cards { display: grid; gap: 12px; margin: 14px 0 0; padding: 0; list-style: none; }
.cards .cd-card { padding: 12px 14px 14px; border: 1px solid var(--ws-border-strong); border-top: 4px solid var(--ws-slab);
  background: var(--ws-surface-2); }  /* a flashcard's look */
.cards .cd-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.cards .cd-n { color: var(--ws-muted); font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.cards .cd-card-top .link { min-height: 28px; padding: 4px 8px; }
.cards .cd-side { display: block; margin: 8px 0 4px; font-size: 14px; font-weight: 600; }
.cards .cd-card textarea { font-size: 15px; line-height: 1.45; background: var(--ws-surface); }
.cards .cd-pick { margin: 18px 0 0; }
.cards .cd-select { width: 100%; min-height: 44px; padding: 0 12px; border: 1px solid var(--ws-input-border); border-radius: 2px;
  background: var(--ws-surface); color: var(--ws-text); font: inherit; }
.cards .cd-select:hover { border-color: var(--ws-input-border-hover); }
.cards .cd-select:focus-visible { border-color: var(--ws-focus); }

/* After a save */
.cards .cd-skipped { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.cards .cd-skipped li { font-size: 14px; line-height: 1.45; }
.cards .cd-q { font-weight: 600; overflow-wrap: anywhere; }
.cards .cd-why { color: var(--ws-muted); }
