/* src/components/jr/subject/subject.css — SJ2 Subject, the skill map and one unit.
   Measured off art-source/design-sj2-2026-09-12/screens/SJ2 Subject.dc.html. The subject's
   swatch arrives as --c-main / --c-ink / --c-tint / --c-border on .jr-sb, which is the only
   thing about this screen that changes between the seven subjects.

   THE ONE DELIBERATE COLOUR CHANGE: a missed option is painted as an option AT REST. Her frame
   paints it #fdeaea / #e39a9a / #b23b3b. CLAUDE.md: wrong answers cost nothing, no red. See
   src/components/jr/palette.js. */

.jr-sb { position: absolute; inset: 0; overflow: hidden; }

/* Her wash over the school-garden plate, so cream cards keep their edge on painted grass. */
.jr-sb-wash {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(250, 247, 240, .6) 0%, rgba(250, 247, 240, .4) 45%, rgba(250, 247, 240, .2) 100%);
}

/* ---------------------------------------------------------------- the bar */
.jr-sb-bar {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: var(--sj-chrome-h);
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 22px;
  box-sizing: border-box;
  background: var(--sj-card);
  border-bottom: 1px solid var(--sj-line);
}

.jr-sb-back {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--sj-stage);
  border: 1px solid var(--sj-line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sj-ink);
}

.jr-sb-guidechip {
  flex: none;
  padding: 7px 15px;
  border-radius: var(--sj-r-pill);
  background: var(--c-tint);
  border: 1px solid var(--c-border);
  color: var(--c-ink);
  font-family: var(--sj-font);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.jr-sb-bar-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }

.jr-sb-today {
  flex: none;
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: var(--sj-r-pill);
  background: var(--sj-stage);
  border: 1px solid var(--sj-line);
  font-family: var(--sj-font);
  font-weight: 600;
  font-size: 16px;
  color: var(--sj-ink);
  text-decoration: none;
}

/* 44px, under the 64px child floor. Her chrome target, named in the auditor's SJ2 table:
   Today and the profile chip are the ways OUT of this screen, not the work on it. */
.jr-sb-who {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 4px 18px 4px 5px;
  border-radius: var(--sj-r-pill);
  border: 1.5px solid var(--sj-line);
  background: var(--sj-stage);
}
.jr-sb-who-face {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: block;
  background-color: var(--sj-sand);
  background-size: cover;
  background-position: center;
}
.jr-sb-who-name { font-family: var(--sj-font); font-weight: 600; font-size: 17px; color: var(--sj-ink); }

.jr-sb-stars {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sj-font);
  font-weight: 600;
  font-size: 20px;
  color: var(--sj-ink);
}
.jr-sb-stars svg { color: var(--sj-sun); fill: var(--sj-sun); }

/* ---------------------------------------------------------------- the skill map */
.jr-sb-map {
  position: absolute;
  left: 0;
  right: 0;
  top: var(--sj-chrome-h);
  bottom: 0;
  box-sizing: border-box;
  padding: 26px 44px 30px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.jr-sb-head { flex: none; display: flex; align-items: flex-end; gap: 24px; }
.jr-sb-head-text { flex: 1 1 auto; min-width: 0; }

.jr-sb-title {
  margin: 0 0 6px -14px;
  display: inline-block;
  padding: 6px 14px;
  border-radius: 18px;
  background: transparent;
  font-family: var(--sj-font);
  font-weight: 700;
  font-size: 50px;
  line-height: 1.02;
  letter-spacing: -.015em;
  color: var(--sj-ink);
}
.jr-sb-subtitle { margin: 0; font-size: 20px; font-weight: 500; color: var(--sj-ink); }

.jr-sb-score {
  flex: none;
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--sj-card);
  border: 1px solid var(--sj-line);
  border-radius: 18px;
  padding: 12px 18px;
  box-shadow: 0 8px 20px rgba(35, 50, 44, .1);
}
.jr-sb-pips { display: flex; gap: 6px; }
.jr-sb-pip {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: block;
  background: #dbc9a8;
  border: 1.5px solid #d3c8b2;
  box-sizing: border-box;
}
.jr-sb-pip-cur { background: var(--c-main); border-color: var(--c-ink); }
.jr-sb-pip-done { background: var(--sj-green); border-color: var(--sj-green-ink); }
.jr-sb-score-line { font-family: var(--sj-font); font-weight: 600; font-size: 17px; color: var(--sj-ink); }

/* ---------------------------------------------------------------- the tiles */
.jr-sb-tiles {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 16px;
  overflow: hidden;
}

/* 22px radius, not a pill: her SJ2 card family (named in the auditor). Every tile is well
   over the 64px child floor. */
.jr-sb-tile {
  appearance: none;
  cursor: pointer;
  text-align: left;
  min-width: 0;
  flex: 1 1 300px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 20px 18px;
  border-radius: 22px;
  background: var(--sj-card);
  border: 2px solid var(--sj-line);
  box-shadow: 0 6px 0 var(--sj-line);
  font-family: var(--sj-font);
  transition: transform 120ms cubic-bezier(.2, .75, .25, 1);
}
.jr-sb-tile:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--sj-line); }

/* The unit the class is on takes the whole row and the subject's own edge. */
.jr-sb-tile-cur {
  flex: 1 1 100%;
  border-color: var(--c-main);
  box-shadow: 0 6px 0 var(--c-border);
}
.jr-sb-tile-cur:active { box-shadow: 0 2px 0 var(--c-border); }

.jr-sb-tile-done { background: #f4faf6; border-color: #c3dda9; box-shadow: 0 6px 0 #c3dda9; }
.jr-sb-tile-done:active { box-shadow: 0 2px 0 #c3dda9; }

/* Reading carries eleven units and spelling five: tighten the small tiles when there are many
   so every dashboard still fits the 940px frame without scrolling. */
.jr-sb-tiles-many .jr-sb-tile { flex: 1 1 250px; gap: 6px; padding: 12px 16px 14px; }
.jr-sb-tiles-many .jr-sb-tile-cur { flex: 1 1 100%; gap: 10px; padding: 16px 20px 18px; }

.jr-sb-tile-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

.jr-sb-tile-pill {
  font-family: var(--sj-font);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: .13em;
  text-transform: uppercase;
  border-radius: var(--sj-r-pill);
  padding: 5px 11px;
  background: var(--sj-stage);
  border: 1px solid var(--sj-line-warm);
  color: var(--sj-ink);
}
.jr-sb-pill-done { background: var(--sj-green-tint); border-color: #c3dda9; color: var(--sj-green-ink); }
.jr-sb-pill-cur { background: var(--c-tint); border-color: var(--c-border); color: var(--c-ink); }
.jr-sb-pill-next { background: var(--sj-sun-tint); border-color: #f6d98a; color: var(--sj-sun-ink); }

.jr-sb-tile-tick {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--sj-green);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sj-card);
}

.jr-sb-tile-name {
  display: block;
  font-family: var(--sj-font);
  font-weight: 700;
  font-size: 22px;
  line-height: 1.12;
  color: var(--sj-ink);
  text-wrap: pretty;
}
.jr-sb-tile-cur .jr-sb-tile-name { font-size: 34px; }
.jr-sb-tiles-many .jr-sb-tile-name { font-size: 19px; }
.jr-sb-tiles-many .jr-sb-tile-cur .jr-sb-tile-name { font-size: 28px; }

/* Clamped, not free-flowing: card height is what makes a subject with eleven units overflow
   the frame. Three lines, two when there are many; the unit view carries the whole sentence. */
.jr-sb-tile-big {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: var(--sj-font-story);
  font-size: 17px;
  line-height: 1.38;
  color: var(--sj-ink);
  text-wrap: pretty;
  max-width: 34ch;
}
.jr-sb-tile-cur .jr-sb-tile-big { font-size: 21px; max-width: 70ch; }
.jr-sb-tiles-many .jr-sb-tile-big { font-size: 15.5px; -webkit-line-clamp: 2; }
.jr-sb-tiles-many .jr-sb-tile-cur .jr-sb-tile-big { font-size: 21px; -webkit-line-clamp: 3; max-width: 70ch; }

.jr-sb-tile-foot {
  margin-top: auto;
  padding-top: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sj-font);
  font-weight: 600;
  font-size: 16px;
  color: var(--c-ink);
}
.jr-sb-tile-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 14px;
  background: transparent;
  color: var(--c-ink);
}
/* Orange is only ever the action being asked for. */
.jr-sb-tile-cta-now {
  min-height: 56px;
  padding: 0 22px;
  background: var(--sj-orange);
  color: var(--sj-card);
  box-shadow: 0 4px 0 var(--sj-orange-deep);
}
.jr-sb-tile-meta { font-weight: 500; color: var(--sj-ink); }

/* ---------------------------------------------------------------- nothing here yet */
.jr-sb-empty {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  gap: 28px;
  align-items: center;
  background: var(--sj-card);
  border: 2px dashed var(--sj-line-warm);
  border-radius: 26px;
  padding: 34px 40px;
  box-sizing: border-box;
}
.jr-sb-empty-text { flex: 1 1 auto; min-width: 0; }
.jr-sb-empty-title {
  margin: 0 0 10px;
  font-family: var(--sj-font);
  font-weight: 700;
  font-size: 38px;
  line-height: 1.08;
  color: var(--sj-ink);
  text-wrap: pretty;
}
.jr-sb-empty-body {
  margin: 0 0 22px;
  font-family: var(--sj-font-story);
  font-size: 23px;
  line-height: 1.45;
  color: var(--sj-ink);
  max-width: 52ch;
  text-wrap: pretty;
}
.jr-sb-empty-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 66px;
  padding: 0 30px;
  border-radius: 20px;
  background: var(--sj-orange);
  color: var(--sj-card);
  font-family: var(--sj-font);
  font-weight: 700;
  font-size: 21px;
  box-shadow: 0 5px 0 var(--sj-orange-deep);
  text-decoration: none;
}
.jr-sb-empty-cta:active { transform: translateY(5px); box-shadow: none; }

/* ---------------------------------------------------------------- one unit */
.jr-sb-unit {
  position: absolute;
  left: 0;
  right: 0;
  top: var(--sj-chrome-h);
  bottom: 0;
  box-sizing: border-box;
  padding: 28px 48px 32px;
  display: flex;
  gap: 28px;
}
.jr-sb-unit-left { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.jr-sb-unit-right { flex: 0 0 340px; display: flex; flex-direction: column; gap: 14px; }

.jr-sb-unit-card {
  flex: none;
  background: var(--sj-card);
  border: 1px solid var(--sj-line);
  border-radius: 26px;
  box-shadow: 0 16px 40px rgba(35, 50, 44, .16);
  padding: 26px 32px;
}
.jr-sb-unit-crumbs { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.jr-sb-crumb {
  appearance: none;
  cursor: pointer;
  min-height: 44px;
  padding: 0 16px 0 10px;
  border-radius: var(--sj-r-pill);
  background: var(--sj-stage);
  border: 1px solid var(--sj-line);
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--sj-font);
  font-weight: 600;
  font-size: 15px;
  color: var(--sj-ink);
}
.jr-sb-unit-name {
  margin: 0 0 12px;
  font-family: var(--sj-font);
  font-weight: 700;
  font-size: 44px;
  line-height: 1.04;
  letter-spacing: -.015em;
  color: var(--sj-ink);
  text-wrap: pretty;
}
.jr-sb-unit-big {
  margin: 0 0 10px;
  font-family: var(--sj-font-story);
  font-size: 25px;
  line-height: 1.45;
  color: var(--sj-ink);
  max-width: 50ch;
  text-wrap: pretty;
}
.jr-sb-unit-why {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
  color: var(--sj-ink);
  max-width: 60ch;
  text-wrap: pretty;
}

.jr-sb-lesson {
  flex: none;
  box-sizing: border-box;
  min-height: 84px;
  padding: 0 26px;
  border-radius: 22px;
  background: var(--sj-orange);
  box-shadow: 0 5px 0 var(--sj-orange-deep), 0 12px 24px rgba(181, 69, 10, .2);
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--sj-card);
  text-decoration: none;
}
.jr-sb-lesson:active { transform: translateY(5px); box-shadow: 0 0 0 var(--sj-orange-deep); }
.jr-sb-lesson-play {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 253, 248, .24);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sj-card);
}
.jr-sb-lesson-text { flex: 1 1 auto; min-width: 0; }
.jr-sb-lesson-cta {
  display: block;
  font-family: var(--sj-font);
  font-weight: 600;
  font-size: 26px;
  line-height: 1.1;
}
.jr-sb-lesson-meta { display: block; margin-top: 2px; font-size: 17px; font-weight: 600; }

/* ---------------------------------------------------------------- the practice set */
.jr-sb-practice {
  flex: 1 1 auto;
  min-height: 0;
  background: var(--sj-card);
  border: 1px solid var(--sj-line);
  border-radius: 26px;
  box-shadow: 0 16px 40px rgba(35, 50, 44, .16);
  padding: 24px 32px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.jr-sb-practice-head { display: flex; align-items: center; gap: 14px; }
.jr-sb-practice-label {
  font-family: var(--sj-font);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--sj-ink);
}
.jr-sb-qpips { margin-left: auto; display: flex; gap: 6px; }
.jr-sb-qpip {
  width: 12px;
  height: 12px;
  border-radius: var(--sj-r-pill);
  display: block;
  box-sizing: border-box;
  background: #dbc9a8;
  border: 1.5px solid #d3c8b2;
}
.jr-sb-qpip-now { width: 28px; background: var(--c-main); border-color: var(--c-ink); }
.jr-sb-qpip-past { background: var(--sj-green); border-color: var(--sj-green-ink); }

.jr-sb-q {
  margin: 0;
  font-family: var(--sj-font-story);
  font-size: 30px;
  line-height: 1.35;
  color: var(--sj-ink);
  text-wrap: pretty;
}

.jr-sb-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

/* AT REST, and a missed option is drawn exactly like this one. */
.jr-sb-opt {
  appearance: none;
  cursor: pointer;
  text-align: left;
  min-height: 72px;
  padding: 0 20px;
  border-radius: 18px;
  background: var(--sj-card);
  border: 2.5px solid var(--sj-line);
  box-shadow: 0 5px 0 var(--sj-line);
  display: flex;
  align-items: center;
  gap: 14px;
  transition: transform 120ms cubic-bezier(.2, .75, .25, 1);
}
.jr-sb-opt:active { transform: translateY(5px); box-shadow: none; }
.jr-sb-opt-on { background: var(--c-tint); border-color: var(--c-main); box-shadow: 0 5px 0 var(--c-border); }
.jr-sb-opt-right { background: var(--sj-green-tint); border-color: var(--sj-green); box-shadow: 0 5px 0 #c3dda9; }
.jr-sb-opt-rest { background: var(--sj-card); border-color: var(--sj-line); box-shadow: 0 5px 0 var(--sj-line); }

.jr-sb-opt-badge {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--sj-line);
  color: var(--sj-ink);
  font-family: var(--sj-font);
  font-weight: 700;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.jr-sb-opt-on .jr-sb-opt-badge { background: var(--c-main); color: var(--sj-card); }
.jr-sb-opt-right .jr-sb-opt-badge { background: var(--sj-green); color: var(--sj-card); }
.jr-sb-opt-rest .jr-sb-opt-badge { background: var(--sj-line); color: var(--sj-ink); }

.jr-sb-opt-text { font-family: var(--sj-font-story); font-size: 23px; line-height: 1.25; color: var(--sj-ink); }

.jr-sb-acts { margin-top: auto; display: flex; align-items: center; gap: 16px; min-height: 64px; }
.jr-sb-feedback {
  margin: 0;
  flex: 1 1 auto;
  font-size: 19px;
  line-height: 1.4;
  font-weight: 600;
  color: var(--sj-ink);
  text-wrap: pretty;
}
.jr-sb-check {
  flex: none;
  appearance: none;
  border: none;
  cursor: pointer;
  min-height: 64px;
  padding: 0 28px;
  border-radius: 18px;
  background: var(--sj-orange);
  color: var(--sj-card);
  font-family: var(--sj-font);
  font-weight: 700;
  font-size: 21px;
  box-shadow: 0 5px 0 var(--sj-orange-deep);
}
.jr-sb-check:active { transform: translateY(5px); box-shadow: none; }
.jr-sb-retry {
  flex: none;
  appearance: none;
  cursor: pointer;
  min-height: 64px;
  padding: 0 24px;
  border-radius: 18px;
  background: var(--sj-card);
  border: 1.5px solid var(--sj-line);
  box-shadow: 0 4px 0 var(--sj-line);
  font-family: var(--sj-font);
  font-weight: 600;
  font-size: 20px;
  color: var(--sj-ink);
}
.jr-sb-retry:active { transform: translateY(4px); box-shadow: none; }

/* ---------------------------------------------------------------- how it went */
.jr-sb-result { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.jr-sb-result-title {
  margin: 0;
  font-family: var(--sj-font);
  font-weight: 700;
  font-size: 40px;
  line-height: 1.05;
  color: var(--sj-ink);
}
.jr-sb-result-note {
  margin: 0;
  font-family: var(--sj-font-story);
  font-size: 23px;
  line-height: 1.4;
  color: var(--sj-ink);
  max-width: 48ch;
  text-wrap: pretty;
}
.jr-sb-result-acts { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.jr-sb-go-primary {
  appearance: none;
  border: none;
  cursor: pointer;
  min-height: 66px;
  padding: 0 28px;
  border-radius: 18px;
  background: var(--sj-orange);
  color: var(--sj-card);
  font-family: var(--sj-font);
  font-weight: 700;
  font-size: 22px;
  box-shadow: 0 5px 0 var(--sj-orange-deep);
}
.jr-sb-go-primary:active { transform: translateY(5px); box-shadow: none; }
.jr-sb-go-quiet {
  appearance: none;
  cursor: pointer;
  min-height: 66px;
  padding: 0 24px;
  border-radius: 18px;
  background: var(--sj-card);
  border: 1.5px solid var(--sj-line);
  box-shadow: 0 4px 0 var(--sj-line);
  font-family: var(--sj-font);
  font-weight: 600;
  font-size: 20px;
  color: var(--sj-ink);
}
.jr-sb-go-quiet:active { transform: translateY(4px); box-shadow: none; }

/* ---------------------------------------------------------------- the guide */
.jr-sb-bubble {
  position: relative;
  background: var(--sj-card);
  border: 1px solid var(--c-border);
  border-radius: 20px;
  box-shadow: 0 12px 30px rgba(35, 50, 44, .14);
  padding: 18px 20px;
}
.jr-sb-bubble-who {
  margin: 0 0 4px;
  font-family: var(--sj-font);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--c-ink);
}
.jr-sb-bubble-line {
  margin: 0;
  font-size: 19px;
  line-height: 1.4;
  font-weight: 600;
  color: var(--sj-ink);
  text-wrap: pretty;
}
.jr-sb-bubble-tail {
  position: absolute;
  left: 44px;
  bottom: -9px;
  width: 18px;
  height: 18px;
  background: var(--sj-card);
  border-right: 1px solid var(--c-border);
  border-bottom: 1px solid var(--c-border);
  transform: rotate(45deg);
}

.jr-sb-unit-figure { flex: 1 1 auto; display: flex; align-items: flex-end; justify-content: center; }

.jr-sb-themeart {
  width: 260px;
  height: 260px;
  display: block;
  background-color: var(--sj-sand);
  background-size: cover;
  background-position: center;
}
/* The guide's own portrait, where her frame drew a dashed capsule (DECISIONS #80). */
.jr-sb-guideart {
  width: 176px;
  height: 236px;
  display: block;
  background-size: contain;
  background-position: center bottom;
  background-repeat: no-repeat;
}
/* Kept for a guide with no picture at all: her drawn stand-in, captioned. */
.jr-sb-guideslot {
  width: 176px;
  height: 236px;
  border-radius: 88px 88px 22px 22px;
  border: 2px dashed;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 14px;
  box-sizing: border-box;
}
.jr-sb-guideslot-cap {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  line-height: 1.4;
  text-align: center;
}
