/* SPDX-License-Identifier: Apache-2.0 */
/* The AI noticed the sugar pill (spec 691): index cards of paper stock on the desk. One at a time when
   the island mounts, with a pile peeking out beneath; every card stacked without it. Tokens only
   (spec 025 AC-3); the one motion, the turn of a card, sits inside the reduced-motion guard (spec 025
   AC-7). The card is a .panel, so its ink, links, code and pre take the paper rules of tokens.css. */
.noticed-page .deck { max-width: var(--w-text); margin: var(--s-4) 0; }
/* Issue 716: a tall card mid-turn reaches past a phone's edge; the page clips it rather than scrolling sideways (spec 025 AC-12). */
.page-grid { overflow-x: clip; }
.deck .note { position: relative; margin: 0 0 var(--s-3); padding: var(--s-3) var(--s-3) var(--s-2); border-radius: var(--radius); }
.deck .note p { max-width: none; }
.deck.is-deck .note { margin: var(--s-2) 0; transform: rotate(var(--card-tilt)); box-shadow: var(--sheet-shadow), 7px 9px 0 -1px var(--paper), 13px 17px 0 -2px var(--grey-band); }
.deck.is-deck .note[hidden] { display: none; }
.note:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 4px; }

/* the card's own type: an eyebrow, a title in the heading face, labelled parts with a perforation */
.note .note-eyebrow { margin: 0 0 var(--s-1); font-size: var(--t-eyebrow); }
.note .note-title { font-size: var(--t-h3); line-height: var(--lh-h2); margin: 0 0 var(--s-2); }
.note .note-skill, .note .note-task-name { font-family: var(--mono); font-size: var(--t-mono); }
.note-part { margin: 0 0 var(--s-2); padding-top: var(--s-2); border-top: 2px dotted var(--rule); }
.note-label { margin: 0 0 var(--s-1); font-size: var(--t-fine); font-weight: 500; color: var(--ink-muted); font-variant-caps: all-small-caps; letter-spacing: 0.04em; }
/* the fake's first sentence, in the heading face, italic, in the ochre the fake takes elsewhere */
.note-fake { margin: 0 0 var(--s-1); font-family: var(--display); font-style: italic; font-size: var(--t-verdict); line-height: 1.3; color: var(--mixed); }
.note-fake-note { margin: 0; font-size: var(--t-fine); color: var(--ink-muted); }
.note-prompt { margin: 0; }
.note-preamble { color: var(--ink-muted); }
/* the answer, typed as the model wrote it */
.note pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: var(--t-mono-sm); line-height: 1.55; max-width: none; }
.note-more { margin: var(--s-1) 0 0; }
.note-more summary { cursor: pointer; font-weight: 500; min-height: var(--touch); display: flex; align-items: center; }
.note-more[open] summary { margin-bottom: var(--s-1); }
/* once the fold is open the whole answer stands alone, so the opening is not read twice */
.note-answer:has(details[open]) .note-opening { display: none; }
.note-whole-note { margin: var(--s-1) 0 0; font-size: var(--t-fine); color: var(--ink-muted); }
.note-foot { margin-top: var(--s-2); padding-top: var(--s-2); border-top: 2px dotted var(--rule); }
.note-links { margin: 0 0 var(--s-1); }
.note-caveat { margin: 0; font-size: var(--t-fine); color: var(--ink-muted); }

/* the controls, on the desk, in the shell's tokens; a disabled one keeps a text colour that clears
   4.5:1 on its face (spec 025 AC-4, as spec 638 A-638-3) rather than the browser's grey */
.deck-nav { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-1) var(--s-2); margin: var(--s-2) 0; }
.deck-nav button { min-height: var(--touch); padding: .5rem 1rem; font: inherit; cursor: pointer; color: var(--shell-text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius); }
.deck-nav button:disabled { color: var(--shell-muted); cursor: default; }
.deck-count { margin: 0; color: var(--shell-text); font-variant-numeric: tabular-nums; }
.deck-hint { margin: 0 0 var(--s-2); font-size: var(--t-fine); color: var(--shell-muted); }

@media (prefers-reduced-motion: no-preference) {
  .deck.is-deck .note { transition: transform 220ms ease-out, opacity 220ms ease-out; }
  .deck.is-deck .note.is-turning { transform: rotate(calc(var(--card-tilt) - 2deg)) translateX(18px); opacity: 0.4; }
}
