/* =============================================================================
   BLACK SIGNAL // Today — the deliberate-practice dashboard (Option D).
   Built from the app's own primitives: the themed band (one orange), the
   course-select card grid (grid-tile.css) for the lineup, the sweep primitive
   for every interactive element, and the .bsa panels/typography. This file adds
   only the header band, the Start button's sweep, the current-item bar, and the
   two collapsible reference items. No new colours, no new shapes.
   ========================================================================== */
@layer screens {

/* ── Entrance: the whole screen fades and rises in as one motion ───────────── */
.bsdp-screen.bs-cc {
  transform: translateY(10px);
  transition:
    opacity var(--dur-slow, 520ms) cubic-bezier(0.22, 1, 0.36, 1),
    transform var(--dur-slow, 520ms) cubic-bezier(0.22, 1, 0.36, 1);
}
.bsdp-screen.bs-cc.cc-is-booted { transform: none; }
.bsdp-lineup .linux-category-card { animation: none; opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .bsdp-screen.bs-cc { transition: none; transform: none; }
  .bsdp-disc-chev { transition: none; }
}

/* ── Header band: TODAY, inline stats, Start. The band's width is the measure
   every row aligns to. One orange, black ink — the app's hero treatment. ───── */
.bsdp-hd {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 16px 24px;
  background: var(--orange); color: var(--accent-on-accent);
  padding: 24px 28px 26px;
}
.bsdp-hd-eye { font-family: var(--sig-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.72; }
.bsdp-hd-eye .sig-sep { opacity: 0.6; }
.bsdp-hd-title { font-family: var(--font-display); font-weight: 900; font-size: clamp(38px, 5.5vw, 62px); line-height: 0.86; letter-spacing: 0.01em; text-transform: uppercase; margin: 6px 0 12px; }
.bsdp-hd-stats { display: flex; flex-wrap: wrap; gap: 20px; font-family: var(--sig-mono); font-size: 12px; letter-spacing: 0.05em; }
.bsdp-hd-stats span { opacity: 0.82; text-transform: uppercase; }
.bsdp-hd-stats b { font-size: 16px; opacity: 1; }
/* Goal outcome line, shown on completion: the black-on-accent readout of whether
   the session goal was met. */
.bsdp-hd-goal { margin-top: 12px; font-family: var(--sig-mono); font-size: 12px; letter-spacing: 0.04em; opacity: 0.9; }
/* Time-of-day note: why this session is heavier or lighter right now. */
.bsdp-hd-note { margin-top: 10px; font-family: var(--sig-mono); font-size: 11.5px; letter-spacing: 0.03em; opacity: 0.82; max-width: 58ch; }

/* Start: a solid button on the accent band, like the Analytics band key. At rest
   the inverted cell (accent-on-accent fill, accent label); on hover it flips to a
   solid accent fill with the inverted label. It is ONE solid fill per state, not a
   gradient over a dark base, so the clipped bevel stays crisp with no dark line
   where the fill meets the band. Colour crossfades for the hover response. */
.bsdp-start {
  align-self: center; justify-self: end;
  background: var(--accent-on-accent);
  color: var(--orange);
  border: 0;
  cursor: pointer;
  font-family: var(--font-display); font-weight: 800; font-size: 16px; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 15px 24px;
  clip-path: polygon(9px 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%, 0 9px);
  transition: background-color var(--dur) var(--ease-sharp), color var(--dur) var(--ease-sharp);
}
@media (hover: hover) and (pointer: fine) {
  .bsdp-start:hover { background: var(--orange); color: var(--accent-on-accent); }
}
.bsdp-start:active { background: var(--orange); color: var(--accent-on-accent); }
.bsdp-start:focus-visible { outline: 2px solid var(--accent-on-accent); outline-offset: -4px; }
@media (prefers-reduced-motion: reduce) { .bsdp-start { transition: none; } }

/* ── The lineup: the course-select cards, full width, FLUSH under the band so
   the header's bottom edge is the boxes' top edge, and a hovered box's fill
   connects straight to the band — exactly like Select Course. ─────────────── */
.bsdp-board { display: block; }
.bsdp-lineup.linux-category-grid {
  max-width: none; width: 100%;
  box-shadow: inset 1px 1px 0 0 var(--sig-rule);
  margin-top: 0;
}
.bsdp-lineup .bsdp-step { min-height: 150px; }
/* The "why this is in your session" line on an adaptive card: muted, small, sits
   under the tag. It flips with the sweep like the rest of the card on hover. */
.bsdp-lineup .bsdp-why {
  margin-top: 8px; font-family: var(--sig-mono); font-size: 11px; line-height: 1.4;
  color: var(--sig-ink-mute); max-width: 32ch;
}
/* Current step: a bold accent bar drawn INSIDE the box (inset shadow), so it
   marks where you are without changing the box's size or alignment. */
.bsdp-lineup .bsdp-now {
  box-shadow: inset 5px 0 0 0 var(--orange), 0 20px 40px -20px rgba(0, 0, 0, 0.7);
}
.bsdp-lineup .bsdp-now .course-card-num { color: var(--orange); }
.bsdp-lineup-empty {
  margin-top: 22px; border: 1px solid var(--sig-rule); padding: 22px;
  color: var(--sig-ink-dim); font-size: 14px; line-height: 1.5;
}

/* ── Relearn study view: teach the stuck item before re-testing ────────────── */
.bsdp-study-card {
  border: 1px solid var(--sig-rule); border-top: 0;
  padding: 26px 28px 28px;
}
.bsdp-study-q { font-family: var(--font-display); font-weight: 700; font-size: clamp(19px, 2.4vw, 24px); line-height: 1.3; color: var(--sig-ink); }
.bsdp-study-ans {
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
  margin: 18px 0 4px; padding: 14px 16px;
  box-shadow: inset 4px 0 0 0 var(--orange);
  background: color-mix(in srgb, var(--orange) 8%, transparent);
  font-size: 16px; color: var(--sig-ink);
}
.bsdp-study-tag { font-family: var(--sig-mono); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--orange); }
.bsdp-study-h { font-family: var(--sig-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--sig-ink-mute); margin: 22px 0 8px; }
.bsdp-study-exp { margin: 0; font-size: 15px; line-height: 1.6; color: var(--sig-ink); }
.bsdp-study-pits { list-style: none; margin: 0; padding: 0; }
.bsdp-study-pit { padding: 12px 0; border-bottom: 1px solid var(--sig-rule); }
.bsdp-study-pit:last-child { border-bottom: 0; }
.bsdp-study-opt { display: block; font-family: var(--font-display); font-weight: 700; font-size: 14px; color: var(--sig-ink); margin-bottom: 3px; }
.bsdp-study-why { display: block; font-size: 13.5px; line-height: 1.5; color: var(--sig-ink-dim); }
.bsdp-study-actions { display: flex; gap: 14px; align-items: center; margin-top: 24px; flex-wrap: wrap; }
.bsdp-study-back {
  background: transparent; border: 1px solid var(--sig-rule); color: var(--sig-ink);
  font-family: var(--font-display); font-weight: 700; font-size: 14px; letter-spacing: 0.04em;
  padding: 14px 20px; cursor: pointer;
  --sweep-fill: var(--sig-rule); --sweep-ink: var(--sig-ink);
}
@media (max-width: 599px) { .bsdp-study-actions { flex-direction: column; align-items: stretch; } }

/* ── The two collapsible reference items ───────────────────────────────────── */
.bsdp-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; margin-top: 28px; }
.bsdp-disc { border: 1px solid var(--sig-rule); }
.bsdp-disc-head {
  width: 100%; display: flex; align-items: center; gap: 14px;
  padding: 16px 20px; font-family: inherit; text-align: left;
}
.bsdp-disc-title { font-family: var(--font-display); font-weight: 700; font-size: 18px; letter-spacing: 0.02em; flex: 0 0 auto; }
.bsdp-disc-note { flex: 1 1 auto; font-family: var(--sig-mono); font-size: 11.5px; color: var(--sig-ink-mute); text-align: right; }
.bsdp-disc-chev {
  flex: 0 0 auto; width: 8px; height: 8px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg); margin: -3px 2px 0 0;
  transition: transform 180ms var(--ease-sharp);
}
.bsdp-disc-head[aria-expanded="true"] .bsdp-disc-chev { transform: rotate(-135deg); margin-top: 3px; }
.bsdp-disc-body { border-top: 1px solid var(--sig-rule); padding: 2px 20px 16px; }

/* The learner model inside the item (single column; the item is already ~half
   the page). */
.bsdp-disc-body .bsdp-model { list-style: none; margin: 0; padding: 4px 0 0; }
.bsdp-mrow {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 16px;
  padding: 12px 0; border-bottom: 1px solid var(--sig-rule);
}
.bsdp-disc-body .bsdp-model .bsdp-mrow:last-child { border-bottom: 0; }
.bsdp-mrow-label { font-family: var(--font-display); font-weight: 700; font-size: 15px; letter-spacing: 0.02em; color: var(--sig-ink); }
.bsdp-mrow-val { grid-column: 2; grid-row: 1 / span 2; text-align: right; align-self: center; font-size: 13.5px; color: var(--sig-ink); max-width: 24ch; }
.bsdp-mrow-basis { grid-column: 1; font-family: var(--sig-mono); font-size: 11px; color: var(--sig-ink-mute); line-height: 1.4; }
.bsdp-disc-body .bsa-foot { margin: 8px 0 0; }

/* Reflect chips inside the item */
.bsdp-reflect-body { padding: 4px 0 2px; }
.bsdp-reflect-body .bsa-foot { padding-bottom: 12px; }
.bsdp-reflect-body .bs-chips { gap: 8px; }
.bsdp-reflect-body .bs-chip { height: auto; min-height: 30px; padding: 6px 12px; cursor: pointer; }

/* ── Mobile ─────────────────────────────────────────────────────────────── */
@media (max-width: 760px) {
  .bsdp-foot { grid-template-columns: 1fr; }
}
@media (max-width: 599px) {
  .bsdp-hd { grid-template-columns: 1fr; }
  .bsdp-start { justify-self: stretch; text-align: center; }
  .bsdp-mrow { grid-template-columns: 1fr; }
  .bsdp-mrow-val { grid-column: 1; grid-row: auto; text-align: left; max-width: none; margin-top: 2px; }
}

}

/* ── Focus courses: header chip + first-run picker ──────────────────────────
   The chip echoes bsdp-hd-goal (mono, quiet); the picker reuses the lineup
   cards, with selected cards carrying the same bsdp-now accent as the queue. */
.bsdp-hd-focus { margin-top: 12px; font-family: var(--sig-mono); font-size: 12px; letter-spacing: 0.04em; opacity: 0.9; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.bsdp-hd-focus b { font-weight: 600; opacity: 0.95; }
.bsdp-focus-edit { font-family: var(--sig-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; padding: 3px 8px; border: 1px solid color-mix(in oklab, currentColor 28%, transparent); border-radius: 2px; background: transparent; color: inherit; cursor: pointer; opacity: 0.8; }
.bsdp-focus-edit:hover { opacity: 1; border-color: var(--orange); color: var(--orange); }
.bsdp-focus-edit:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

.bsdp-pick-wrap { margin-top: 6px; }
.bsdp-pick-group + .bsdp-pick-group { margin-top: 22px; }
.bsdp-pick-grouplbl { font-family: var(--sig-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.6; margin: 0 0 10px 2px; }
.bsdp-pick[role="checkbox"] { cursor: pointer; }
.bsdp-pick-cancel { margin-top: 18px; }
.bsdp-pick-cancel button { font-family: var(--sig-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; padding: 8px 14px; border: 1px solid color-mix(in oklab, currentColor 24%, transparent); border-radius: 2px; background: transparent; color: inherit; cursor: pointer; opacity: 0.78; }
.bsdp-pick-cancel button:hover { opacity: 1; border-color: var(--orange); color: var(--orange); }
