/* The result card: one card for each question (STORY-04.39; the owner's approved mock-up
   docs/mockups/2026-11-20-result-card/render/page.css, with the lead's rulings on the owner's pins). A tray with the
   question's head, the task and the answer as two raised panes (principles 5 and 7) and closed rows under the task.
   Every control is at least 44 by 44 px (the house rule); the icons inside stay small. */

.rc-card { position: relative; background: var(--paper-2); border: 1px solid var(--line-2); border-radius: 20px; min-width: 0; }
.rc-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: var(--s2) 10px var(--s2) var(--s4); min-height: 52px; }
.rc-heading { flex: 1 1 260px; min-width: 0; font-size: var(--fs-xl); line-height: 1.25; }
.rc-title { min-width: 0; font-weight: 700; }
.rc-no { margin-right: var(--s2); font: 700 var(--fs-s)/1.3 var(--text); letter-spacing: .02em; color: var(--ink-2); white-space: nowrap; vertical-align: 2px; }
/* The separator after "Task 1" stays in the heading's text and name, drawn at no size (the number is shown small). */
.rc-sep { font-size: 0; }
.rc-qn { display: grid; place-items: center; flex: none; min-width: 28px; height: 28px; padding: 0 6px; border: 1.5px solid var(--ink); border-radius: 8px; background: var(--surface); font: 800 var(--fs-s)/1 var(--text); }
.rc-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-left: auto; }
.rc-badges:empty, .rc-label-slot:empty { display: none; }
.rc-label-slot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.rc-card .assess-label .chip { padding: 0 12px; background: transparent; box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--ink-2); }
.rc-card .gate-row .pill { white-space: normal; }

/* Every card is one collapsible section (the owner's instruction of 2026-11-20): its head is one button that always
   shows the title, the skill and the one-line state, and folds the whole card. */
.rc-toggle { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; width: 100%; min-width: 0; min-height: 44px; padding: 0; border: 0; background: none; font: inherit; text-align: left; color: inherit; cursor: pointer; }
.rc-toggle:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 8px; }
.rc-line { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-left: auto; font: 400 var(--fs-s)/1.3 var(--text); color: var(--ink-2); }
.rc-state { font-weight: 700; }
.rc-chev { flex: none; width: 18px; height: 18px; color: var(--ink-2); transition: transform .15s; }
.rc-toggle[aria-expanded="true"] .rc-chev { transform: rotate(180deg); }
.rc-card.is-closed { background: var(--surface); }
.rc-card.is-closed .rc-badges { display: none; }
.rc-group { display: grid; gap: var(--s2); }

/* The body: stacked on a phone (task, answer, rows), task and rows left and the answer right from 861 px. */
.rc-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 0 10px 10px; align-items: start; }
.rc-task { order: 1; }
.rc-ans { order: 2; display: flex; flex-direction: column; }
.rc-body > .rc-rows { order: 3; }
.rc-pane { position: relative; min-width: 0; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-m); box-shadow: 0 1px 0 var(--line-2), 0 8px 16px -10px var(--shade-30); overflow-wrap: anywhere; }
.rc-pane__top { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); min-height: 44px; padding: 2px 2px 0 var(--s4); }
.rc-eyebrow { font: 700 var(--fs-xs)/1.3 var(--text); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.rc-expand, .rc-fold, .rc-i { display: grid; place-items: center; flex: none; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 10px; background: transparent; color: var(--ink-2); cursor: pointer; }
.rc-expand .i, .rc-fold .i { width: 16px; height: 16px; }
.rc-expand[aria-pressed="true"] { background: var(--paper-2); color: var(--ink); }
.rc-fold { display: none; }
.rc-fold .i { transition: transform .15s; }
.rc-fold[aria-expanded="false"] .i { transform: rotate(-90deg); }
.rc-pane__top .rc-expand { margin-left: auto; }
.rc-task__text { padding: 0 var(--s4) 14px; font-size: var(--fs-m); line-height: 1.55; }
.rc-task__text .task-prompt, .rc-prompt { font-size: var(--fs-m); }
.rc-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.rc-views { flex: 1 1 auto; padding: 4px var(--s4) var(--s2); }
.rc-view > * + * { margin-top: var(--s3); }
.rc-views .letter { padding: 0; border: 0; background: none; font-size: var(--fs-base); line-height: 1.7; }
.rc-said { margin: var(--s2) 0 4px; font-size: var(--fs-m); }
.rc-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px var(--s3); min-height: 32px; margin-top: auto; padding: 4px var(--s2) 4px var(--s4); border-top: 1px solid var(--line); }
.rc-edge { font-size: var(--fs-xs); font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.rc-edge:empty { display: none; }
/* "Ask the examiner" at the answer box's bottom-right, inside the box (the owner's pin 5). */
.rc-ask { margin-left: auto; min-width: 0; max-width: 100%; }
.rc-ask .examiner-panel:empty { display: none; }
.rc-ask .examiner-offer, .rc-ask .panel { padding: 0; border: 0; background: none; box-shadow: none; }
.rc-ask .examiner-offer > * + * { margin-top: var(--s2); }
.rc-ask .gate-row, .rc-ask .actions { justify-content: flex-end; }
.rc-ask .btn { min-height: 44px; padding: 0 var(--s4); font-size: var(--fs-m); }
.rc-ask .gate-line, .rc-ask .hint { text-align: right; }
.rc-ask--part { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2); padding: var(--s2) var(--s3); background: var(--surface); border: 1px solid var(--line-2); border-radius: 12px; }
.rc-ask--part .examiner-panel { margin-left: auto; }

/* The tabs in the answer pane's head (the owner's pin 1) and the model switch: slim segmented controls. */
.rc-tabs, .rc-mswitch { display: inline-flex; gap: 2px; padding: 3px; background: var(--paper-2); border-radius: 12px; max-width: 100%; overflow-x: auto; }
.rc-tabs button, .rc-mswitch button { flex: 0 0 auto; min-height: 44px; padding: 0 12px; border-radius: 9px; }
.rc-models > * + * { margin-top: var(--s3); }
.rc-models .model__label { font-size: var(--fs-s); color: var(--ink-2); margin-bottom: 6px; }

/* The closed rows: one line each, a count at the end (choice 4). */
.rc-rows { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; align-content: start; }
.rc-rows > .rc-facts-slot { display: contents; }
.rc-rows .more, .rc-sub { background: var(--surface); border: 1px solid var(--line-2); border-radius: 12px; min-width: 0; }
.rc-rows .more > summary, .rc-sub > summary { min-height: 44px; padding: 0 12px; gap: var(--s2); }
.rc-rows .more__title { font-size: var(--fs-m); }
.rc-rows .more__body, .rc-sub .more__body { padding: 4px 14px 14px; font-size: var(--fs-m); }
.rc-sub { margin-top: var(--s2); background: var(--paper); border-color: var(--line); }
.rc-feedback-body > * + * { margin-top: var(--s3); }
.rc-feedback-body .assess-next { padding: var(--s3) var(--s4); }
.rc-facts { display: grid; gap: var(--s2); }
.rc-facts li { display: grid; gap: 2px; }
.rc-facts b { font-weight: 700; font-variant-numeric: tabular-nums; }
.rc-partrows { margin-top: var(--s2); }
.rc-partrows__h { display: flex; align-items: center; gap: 4px; padding: 0 4px 4px; font: 700 var(--fs-xs)/1.3 var(--text); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.rc-partrows .tip-wrap { text-transform: none; letter-spacing: 0; font-weight: 400; }
.rc-i { color: var(--teal); border-radius: 50%; }
.rc-i .i { width: 18px; height: 18px; }

/* A word the speech recogniser was unsure about (the owner's pin 4): underlined; a tap says so. */
/* The note opens in the line, after the word, so it never covers the text or runs off a phone's edge. */
.unclear { display: inline; padding: 0; border: 0; background: none; font: inherit; color: inherit; text-decoration: underline wavy var(--sun-deep) 1.5px; text-underline-offset: 4px; cursor: pointer; }
.unclear__tip.tip { position: static; display: inline; width: auto; margin: 0 4px; padding: 2px 8px; border-radius: 6px; font-size: var(--fs-s); box-shadow: none; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.unclear__tip.tip[hidden] { display: none; }

/* The web: the task and the rows on the left, the answer on the right, in one card (choice 1). */
@media (min-width: 861px) {
  .rc-body { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-rows: auto 1fr; }
  .rc-task { grid-column: 1; grid-row: 1; order: 0; }
  .rc-body > .rc-rows { grid-column: 1; grid-row: 2; order: 0; }
  .rc-ans { grid-column: 2; grid-row: 1 / span 2; order: 0; align-self: stretch; }
  /* A widened pane takes the card's width (the owner's pin 3); the other follows under it. */
  .rc-card.is-wide-task .rc-body, .rc-card.is-wide-ans .rc-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }
  .rc-card.is-wide-task .rc-body > *, .rc-card.is-wide-ans .rc-body > * { grid-column: 1; grid-row: auto; }
  .rc-card.is-wide-task .rc-task { order: 1; } .rc-card.is-wide-task .rc-ans { order: 2; } .rc-card.is-wide-task .rc-body > .rc-rows { order: 3; }
  .rc-card.is-wide-ans .rc-ans { order: 1; } .rc-card.is-wide-ans .rc-task { order: 2; } .rc-card.is-wide-ans .rc-body > .rc-rows { order: 3; }
  /* "What next" under the card, in three columns (choice 10). */
  .review-productive .what-next .items { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 var(--s4); }
  .review-productive .what-next .items li .item { border-top: 0; }
}

/* The phone: stacked; the tabs the pane's width directly above the answer (pin 1); the task folds (choice 9). */
@media (max-width: 860px) {
  .rc-head { padding: var(--s2) var(--s2) var(--s2) var(--s3); }
  .rc-body { padding: 0 var(--s2) var(--s2); }
  .rc-pane__top { padding-left: var(--s3); }
  .rc-ans > .rc-pane__top { padding: var(--s2) var(--s2) 0; }
  .rc-ans .rc-tabs { display: flex; width: 100%; }
  .rc-ans .rc-tabs button { flex: 1 1 0; padding: 0 6px; }
  .rc-views { padding: 4px var(--s3) var(--s2); }
  .rc-task__text { padding: 0 var(--s3) var(--s3); }
  .rc-foot { padding-inline: var(--s3) var(--s2); }
  .rc-expand { display: none; }
  .rc-task .rc-fold { display: grid; }
  .rc-line { margin-left: 0; }
}
/* The offer's row: the button last, so it stands at the bottom-right corner, the count to its left. */
.rc-ask .gate-row { flex-direction: row-reverse; justify-content: flex-start; }
/* A part is one block on the page: the strip shows one part at a time, so no rule or gap above it; the card's own head
   and body sit together (the page's older .review-task spacing is not used here). */
.review-productive > .review-part--card + .review-part--card { margin-top: 0; padding-top: 0; border-top: 0; }
.review-part--card > * + * { margin-top: var(--s2); }
.rc-card.review-task > * + * { margin-top: 0; }
.rc-rows .more > summary .more__title { margin-right: auto; }
.rc-ask.rc-ask--part { margin-left: 0; }
.rc-rows:empty { display: none; }
@media (min-width: 861px) {
  .rc-card--answer-only .rc-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }
  .rc-card--answer-only .rc-body > * { grid-column: 1; grid-row: auto; }
}
/* A long unbroken word the examiner quotes (a web address) breaks rather than widen the page (the review's Later 3). */
.rc-card, .rc-partrows { overflow-wrap: anywhere; }
.rc-rows > *, .rc-body > * { min-width: 0; }
/* The stand-in's sample (no examiner offered) opens across the answer box, under the answer. */
.rc-ask:has(.examiner-sample) { flex: 1 1 100%; margin-left: 0; }
.rc-ask .examiner-sample { padding: var(--s3) 0 var(--s2); text-align: left; }
