/* Card art (15 Nov 2026; Daniel: "where is our new designs of lab etc"). The card-art candidate's .ca-card component
   (docs/growth/platform-wow-2026-11-13/card-art/card-art.css, reviewed 9/9/9/9) carried into learn, scoped: every custom property
   is --ca-* or the trainer drawing palette (--tcd-*), every rule sits under .ca-, .lab-doors--art or .tcp-card--art, so nothing
   else on a page changes (tests/design-cards.node.js D5). The cards carry their own ink in both themes: the art is media, and the
   text contrast is measured from real pixels against the brightest pixel under it (Bright and Dark).
   Used by the Laboratory doors (js/card-art.js) and the Training Center cards (js/training-center.js card()).
   r2 (17 Nov 2026, design audit FIXES A1, A2, G-1 to G-8): the room colour comes from css/rooms.css through data-room; a room colour
   only lights the dot and the numbered list inside its own picture, never the button, the hover edge or the focus ring (violet);
   the door and trainer buttons are the secondary button (one primary per screen: "Start here" above the doors); the chart is the hero
   (wider panel, Standards and Bebop art 30% darker); the trainer drawing bleeds to the card edge on flat ink; Bright gets a violet
   shadow and a hairline instead of a grey halo. */
.ca-card {
  --ca-ink: #0d001a; --ca-ink-2: #160829; --ca-text: #ffffff; --ca-soft: #ebe6f7; --ca-link: #b9a6ff;
  --ca-display: 'Suwannaphum', Georgia, serif; --ca-body: 'Inter', system-ui, sans-serif;
  --ca-acc: var(--room-live);
  position: relative; isolation: isolate; overflow: hidden; container-type: inline-size;
  display: flex; flex-direction: column; justify-content: space-between; gap: 22px;
  min-height: 340px; padding: 24px 26px 24px; box-sizing: border-box;
  border-radius: 22px; border: 1px solid rgba(255, 255, 255, .10);
  background: var(--ca-ink-2); color: var(--ca-text); text-decoration: none;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 18px 50px rgba(0, 0, 0, .35);
  transition: transform .45s cubic-bezier(.16, 1, .3, 1), box-shadow .45s cubic-bezier(.16, 1, .3, 1), border-color .3s ease;
  font-family: var(--ca-body); text-align: left;
}
.ca-card[data-room="std"] { --ca-acc: var(--room-std); }
.ca-card[data-room="bop"] { --ca-acc: var(--room-bop); }
.ca-card[data-room="stu"] { --ca-acc: var(--room-stu); }
.ca-card[data-room="live"] { --ca-acc: var(--room-live); }
.ca-art { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 70% 40%;
  transform: scale(1.001); transition: transform .9s cubic-bezier(.16, 1, .3, 1), filter .5s ease; }
/* A1-3: the Standards and Bebop backgrounds are the improve round's repaint, 30% darker (docs/growth/library-ultimate-2026-11-17/
   INBOX-FROM-IMPROVE.md, sha-pinned by r2_patch.py), so the chart is the hero; no extra filter here */
/* the real frames: the Live Room (Daniel in the room) sits right of the text; the Studies transcription stays behind its list */
.ca-card[data-room="live"] .ca-art { object-position: 22% 30%; }
/* A1-5: the Live Room panel is a real still of a session screen */
.ca-motif .m-still { display: block; width: 100%; height: auto; border-radius: 8px; }
/* solid ink under the text block (bottom-left), clear over the art (top-right) */
.ca-scrim { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(to top, rgba(13, 0, 26, .92) 0%, rgba(13, 0, 26, .80) 30%, rgba(13, 0, 26, .25) 56%, rgba(13, 0, 26, 0) 72%),
    linear-gradient(to right, rgba(13, 0, 26, .45) 0%, rgba(13, 0, 26, 0) 55%); }
.ca-body { margin-top: auto; position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; max-width: 34rem; }
.ca-chip { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; letter-spacing: .02em; line-height: 1.3;
  color: var(--ca-text); padding: 5px 11px 5px 9px; border-radius: 999px;
  background: rgba(13, 0, 26, .72); border: 1px solid rgba(255, 255, 255, .16); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.ca-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--ca-acc); }
.ca-card .ca-title { margin: 4px 0 0; font: 700 clamp(30px, 3.2vw, 40px)/1.05 var(--ca-display); letter-spacing: -.01em; color: var(--ca-text);
  text-shadow: 0 2px 18px rgba(13, 0, 26, .6); }
.ca-card .ca-line { margin: 0; font-size: 16px; line-height: 1.45; color: var(--ca-soft); max-width: 30rem; }
/* A1-2: the promise line of the live cards, back word for word */
.ca-card .ca-after { margin: 0; font-size: 15px; line-height: 1.45; font-style: italic; color: rgba(255, 255, 255, .78); max-width: 30rem; }
/* G-4: the secondary button (transparent, hairline, pill, 48 px); the one primary on the page is "Start here" above the doors */
.ca-btn { margin-top: 10px; display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 20px 0 22px;
  border-radius: 999px; font: 700 16px/1.2 var(--ca-body); color: #fff; background: rgba(13, 0, 26, .35);
  border: 1px solid rgba(255, 255, 255, .28); transition: gap .3s ease, border-color .3s ease, background-color .3s ease; }
.ca-btn svg { transition: transform .3s cubic-bezier(.16, 1, .3, 1); }
/* the real music, drawn in code, top-right over the clear part of the art: A1-3, the hero of the card */
.ca-motif { position: relative; align-self: flex-end; order: -1; width: 340px; max-width: 100%; box-sizing: border-box; color: var(--ca-text);
  padding: 14px 16px; border-radius: 14px; background: rgba(13, 0, 26, .80); border: 1px solid rgba(255, 255, 255, .14);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.ca-motif small { display: block; font-size: 13px; font-weight: 500; color: #d9d2ec; margin-top: 8px; letter-spacing: .01em; }
.ca-card:hover { transform: translateY(-4px); border-color: rgba(185, 166, 255, .55);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .08) inset, 0 26px 70px rgba(0, 0, 0, .5), 0 0 60px rgba(96, 54, 232, .22); }
.ca-card:hover .ca-art { transform: scale(1.05); }
.ca-card:hover .ca-btn { gap: 14px; border-color: rgba(255, 255, 255, .55); background-color: rgba(96, 54, 232, .28); }
.ca-card:hover .ca-btn svg { transform: translateX(2px); }
.ca-card:focus-visible { outline: 3px solid #b9a6ff; outline-offset: 3px; border-color: var(--ca-link);   /* b-r1 P2-6: violet owns focus (9:1 on ink) */
  box-shadow: 0 0 0 7px rgba(185, 166, 255, .55), 0 26px 70px rgba(0, 0, 0, .5); }
[data-theme="light"] .ca-card:focus-visible { outline-color: #4a26c9; }
.ca-card:active { transform: scale(.985); transition-duration: .08s; }
/* motif parts */
.ca-motif .m-chart { display: grid; grid-template-columns: repeat(4, minmax(56px, auto)); border-left: 2px solid #fff; }
.ca-motif .m-chart > span { padding: 7px 10px 7px 9px; border-right: 2px solid #fff; font: 600 21px/1.1 var(--ca-body); white-space: nowrap; }
.ca-motif .m-chart .fl { font-family: 'Apple Symbols', 'Noto Music', 'Segoe UI Symbol', serif; font-size: 1.1em; font-weight: 400; margin-left: 1px; }
.ca-motif .m-chart sup { font-size: max(12px, .62em); font-weight: 600; vertical-align: .55em; margin-left: 1px; line-height: 0; }
.ca-motif .m-list { margin: 0; padding: 0; list-style: none; counter-reset: ca-s; display: grid; gap: 5px; }
.ca-motif .m-list li { counter-increment: ca-s; font-size: 15px; font-weight: 500; line-height: 1.3; display: flex; gap: 8px; }
.ca-motif .m-list li::before { content: counter(ca-s); flex: none; width: 18px; height: 18px; border-radius: 50%; font-size: 11px; font-weight: 700;
  display: grid; place-items: center; background: var(--ca-acc); color: #0d001a; transform: translateY(1px); }
.ca-motif .m-list.m-plain li::before { content: ''; width: 7px; height: 7px; margin: 6px 5px 0 4px; }
.ca-motif .m-live { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; letter-spacing: .02em; margin-bottom: 8px; }
.ca-motif .m-live::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--ca-acc); }
/* A1-6: the Studies list sits on its own scrim over the transcription */
.ca-card[data-room="stu"] .ca-motif { background: linear-gradient(180deg, rgba(13, 0, 26, .78), rgba(13, 0, 26, .9) 55%); }

/* The Laboratory: four doors, two by two (laboratory.css draws the old three-in-a-row doors; this replaces only its frame) */
.lab-doors.lab-doors--art { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; background: none; border: 0; border-radius: 0; overflow: visible; }
/* the strip under the doors stands on its own (the Workbench; "Start here" moved above the doors, the Live Room has its door) */
.lab-doors--art + .lab-strip { grid-template-columns: minmax(0, 1fr); margin-top: 18px; border-top: 1px solid var(--line); border-radius: var(--r2); }

/* The Training Center cards (direction A, unchanged inside): the reviewed drawing on a flat ink panel that bleeds to the card edge */
html[data-theme] .tcp-card--art.tcp-card, .tcp-card--art.tcp-card {
  /* the reviewed dark-theme drawing palette (css/studio.css .tcp-card), in both themes: the card is always ink */
  --tcd-ink: #f0eef6; --tcd-ink-2: #b8aed4; --tcd-ink-3: rgba(240, 238, 246, .2); --tcd-dot: #2a2344; --tcd-stage: #160829;
  --tcd-stage-edge: rgba(255, 255, 255, .14); --tcd-root: #7b55ff; --tcd-accent: #e0559f; --tcd-ko: #1c143a; --tcd-lpt: #b9a5ff;
  isolation: isolate; border-radius: 22px; border: 1px solid rgba(255, 255, 255, .10); background: #160829; color: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 18px 50px rgba(0, 0, 0, .28);
  transition: transform .45s cubic-bezier(.16, 1, .3, 1), box-shadow .45s cubic-bezier(.16, 1, .3, 1), border-color .3s ease; }
.tcp-card--art .tcp-art { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%;
  transition: transform .9s cubic-bezier(.16, 1, .3, 1); }
.tcp-card--art .tcp-scrim { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(to top, rgba(13, 0, 26, .95) 0%, rgba(13, 0, 26, .9) 34%, rgba(13, 0, 26, .3) 58%, rgba(13, 0, 26, 0) 78%); }
/* A2-1: the drawing panel bleeds to the card edge (the card's 22 px radius clips its top), no inner border, flat ink behind the
   lines (no glow). Padding 24 px a side (12 on phones) = the reviewed stage width: the drawing keeps its size (tc-cards.spec floor) */
.tcp-card--art .tcp-stage { margin: 0; padding: 22px 24px 14px; border: 0; border-radius: 0; background: #160829;
  border-bottom: 1px solid rgba(255, 255, 255, .08); }
/* A2-2: captions left-aligned, 14 px, like the body */
.tcp-card--art .tcp-cap { color: #d9d2ec; text-align: left; font-size: 16px; }   /* A2-2 left-aligned; 16 px, not the audit's 14: the reviewed Training Center reading floor (tests/tc-cards.spec.js: >= 16 on phones, >= 15 wider) wins */
.tcp-card--art .tcp-b { padding: 18px 22px 22px; gap: 8px; }
.tcp-card--art .tcp-t { font: 700 clamp(26px, 2.6vw, 32px)/1.1 'Suwannaphum', Georgia, serif; color: #fff; letter-spacing: -.01em; }
.tcp-card--art .tcp-d { color: #ebe6f7; }
.tcp-card--art .tcp-acc { color: #ebe6f7; display: flex; gap: 8px; align-items: baseline; }
/* G-3: the access dot is violet (gold means the Laboratory only) */
.tcp-card--art .tcp-acc::before { content: ''; flex: none; width: 7px; height: 7px; border-radius: 50%; background: #b9a6ff; transform: translateY(-1px); }
/* G-4: the trainer button is the secondary button: four cards on one screen, never four primaries side by side */
.tcp-card--art .tcp-go { border-radius: 999px; min-height: 48px; font-weight: 700; font-size: 16px; color: #fff; background: rgba(13, 0, 26, .35);
  border: 1px solid rgba(255, 255, 255, .28); box-shadow: none; }
html[data-theme] .tcp-card--art .tcp-go { color: #fff; background: rgba(13, 0, 26, .35); box-shadow: none; }
.tcp-card--art:hover .tcp-go { border-color: rgba(255, 255, 255, .55); background-color: rgba(96, 54, 232, .28); }
/* A2-3: the phrase notation reads at 390: stems, ledger and tab lines at least 1.5 px on screen */
.tcp-card--art .tcd-lick .ln, .tcp-card--art .tcd-lick .ln-s.st, .tcp-card--art .tcd-lick [stroke-width="1.2"] { stroke-width: 1.9; }
.tcp-card--art .tcd-lick .ln-f { stroke-width: 1.6; opacity: .5; }
/* Codex learn-design-r1 P2-2: white on the card ink in BOTH themes (>= 3:1); it must outrank the Studio ring
   html.wg-studio :is(... [tabindex]):focus-visible (0,3,1), which drew #5B2FE0 (2.3:1) in Bright */
html .tcp-card--art.tcp-card .tcp-go:focus-visible { outline-color: #b9a6ff; }   /* b-r1 P2-6: violet on the card ink in both themes (8.7:1) */
.tcp-card--art:hover { border-color: rgba(185, 166, 255, .55); box-shadow: 0 1px 0 rgba(255, 255, 255, .08) inset, 0 26px 70px rgba(0, 0, 0, .4); }
.tcp-card--art:hover .tcp-art { transform: scale(1.04); }
/* G-8: Bright keeps the dark media cards, with a violet shadow and a hairline instead of a grey halo */
[data-theme="light"] .ca-card, html[data-theme="light"] .tcp-card--art.tcp-card { border-color: #e6dcf5; box-shadow: 0 12px 32px rgba(52, 40, 92, .18); }
[data-theme="light"] .ca-card:hover, html[data-theme="light"] .tcp-card--art.tcp-card:hover { box-shadow: 0 18px 44px rgba(52, 40, 92, .26); }

@media (max-width: 760px) {
  .lab-doors.lab-doors--art { grid-template-columns: 1fr; gap: 14px; }
  .lab-doors--art + .lab-strip { grid-template-columns: 1fr; margin-top: 14px; }
  .ca-card { min-height: 0; gap: 22px; padding: 20px 18px 18px; border-radius: 18px; }
  .ca-card .ca-body { margin-top: 40px; }   /* design review P2-4: less empty art on phones */
  .ca-card .ca-btn { align-self: stretch; justify-content: center; }   /* P2-8: full width, like the trainer buttons */
  /* phones: the art is a banner across the top that fades into ink; the text sits below it on solid ink */
  .ca-card .ca-art, .tcp-card--art .tcp-art { height: 280px; bottom: auto; object-position: 78% 40%;
    -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent 100%); mask-image: linear-gradient(to bottom, #000 55%, transparent 100%); }
  .ca-card[data-room="live"] .ca-art { object-position: 18% 26%; }
  .ca-card[data-room="live"] .ca-motif { width: 52%; align-self: flex-end; }   /* F1: the still sits right, Daniel stays in view on the left */
  .ca-card .ca-scrim { background: linear-gradient(to top, rgba(13, 0, 26, .9) 0%, rgba(13, 0, 26, .7) 45%, rgba(13, 0, 26, 0) 70%); }
  /* A1-3: the chart panel spans the card (about 45% of the art band) */
  .ca-card .ca-motif { width: 100%; align-self: stretch; padding: 12px 14px; }
  .ca-card .ca-title { font-size: 32px; }
  .ca-card .ca-line { font-size: 15.5px; }
  .ca-motif .m-chart > span { font-size: 19px; padding: 6px 8px; }
  .tcp-card--art.tcp-card { border-radius: 18px; }
  .tcp-card--art .tcp-stage { margin: 0; padding: 16px 12px 10px; }
  .tcp-card--art .tcp-b { padding: 16px 18px 18px; }
}
@container (max-width: 330px) { .ca-card .ca-title { font-size: clamp(24px, 9.6cqi, 30px); } }
@container (max-width: 340px) {
  .ca-motif .m-chart { grid-template-columns: repeat(4, auto); }
  .ca-motif .m-chart > span { font-size: 15px; padding: 5px 6px; }
  .ca-card .ca-motif { padding: 9px 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .ca-card, .ca-art, .ca-btn, .ca-btn svg, .tcp-card--art, .tcp-card--art .tcp-art { transition: none; }
  .ca-card:hover, .ca-card:active, .tcp-card--art:hover { transform: none; }
  .ca-card:hover .ca-art, .tcp-card--art:hover .tcp-art { transform: none; }
}
