/* src/components/jr/week/week.css — SJ2 Week, and the close of it.
   Measured off art-source/design-sj2-2026-09-12/screens/SJ2 Week.dc.html.
   Reading green, maths sky, spelling sunshine: the same three the store hands every other
   screen, so a stop keeps the colour it has everywhere else in the app. */

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

.jr-wk-wash {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(250, 247, 240, .62) 0%, rgba(250, 247, 240, .4) 45%, rgba(250, 247, 240, .2) 100%);
}

/* ---------------------------------------------------------------- the bar */
.jr-wk-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-wk-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-wk-chip {
  flex: none;
  padding: 7px 15px;
  border-radius: var(--sj-r-pill);
  background: var(--sj-teal-tint);
  border: 1px solid var(--sj-teal-line);
  color: var(--sj-teal-ink);
  font-family: var(--sj-font);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.jr-wk-bar-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.jr-wk-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 chrome, the way out of the screen. Named in the auditor's SJ2 table. */
.jr-wk-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-wk-who-face {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: block;
  background-color: var(--sj-sand);
  background-size: cover;
  background-position: center;
}
.jr-wk-who-name { font-family: var(--sj-font); font-weight: 600; font-size: 17px; color: var(--sj-ink); }
.jr-wk-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-wk-stars svg { color: var(--sj-sun); fill: var(--sj-sun); }

/* ---------------------------------------------------------------- the week */
.jr-wk-week {
  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-wk-head { flex: none; display: flex; align-items: flex-end; gap: 24px; }
.jr-wk-head-text { flex: 1 1 auto; min-width: 0; }
.jr-wk-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: 48px;
  line-height: 1.02;
  letter-spacing: -.015em;
  color: var(--sj-ink);
}
.jr-wk-subtitle {
  margin: 0;
  display: inline-block;
  padding: 4px 12px 4px 0;
  font-family: var(--sj-font-story);
  font-size: 21px;
  font-weight: 400;
  color: var(--sj-ink);
  max-width: 70ch;
  text-wrap: pretty;
}

.jr-wk-count {
  flex: none;
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--sj-card);
  border: 2px solid var(--sj-green-line);
  border-radius: 20px;
  padding: 12px 20px;
  box-shadow: 0 8px 20px rgba(35, 50, 44, .12);
}
.jr-wk-count-text { display: flex; flex-direction: column; }
.jr-wk-count-line {
  font-family: var(--sj-font);
  font-weight: 700;
  font-size: 30px;
  line-height: 1;
  color: var(--sj-green-ink);
}
.jr-wk-count-label { font-family: var(--sj-font); font-weight: 500; font-size: 15px; color: var(--sj-ink); }
.jr-wk-pips { display: flex; align-items: center; gap: 6px; }
.jr-wk-pip {
  width: 22px;
  height: 22px;
  border-radius: var(--sj-r-pill);
  box-sizing: border-box;
  display: block;
  background: var(--sj-card);
  border: 2px dashed #d8ccb0;
}
.jr-wk-pip-on { width: 30px; background: var(--sj-green); border: 2px solid var(--sj-green-ink); }

/* Capped and centred rather than stretched: five cards pulled to the full height of the band
   left two thirds of every card empty. */
.jr-wk-daysrail { flex: 1 1 auto; min-height: 0; display: flex; align-items: center; }
.jr-wk-days { flex: 1 1 auto; height: min(100%, 372px); display: flex; gap: 14px; align-items: stretch; }

.jr-wk-day {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  border-radius: 22px;
  overflow: hidden;
  background: var(--sj-card);
  border: 2px solid var(--sj-line);
  box-shadow: 0 8px 20px rgba(35, 50, 44, .08);
}
.jr-wk-day-doneday { border-color: var(--sj-green-line); }
.jr-wk-day-today { border-color: var(--sj-orange); box-shadow: 0 12px 30px rgba(242, 107, 29, .18); }
.jr-wk-day-rest { border-color: var(--sj-line-warm); }
.jr-wk-day-gone { border-style: dashed; }

/* The day's own colour band: the weekday, the state word and the tick. */
.jr-wk-day-head {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  background: #e6f0f8;
  border-bottom: 2px solid var(--sj-line);
}
.jr-wk-day-doneday .jr-wk-day-head { background: #d9f0e1; border-bottom-color: var(--sj-green-line); }
.jr-wk-day-today .jr-wk-day-head { background: #fde4cd; border-bottom-color: var(--sj-orange); }
.jr-wk-day-rest .jr-wk-day-head { background: #f1ece1; border-bottom-color: var(--sj-line-warm); }
.jr-wk-day-gone .jr-wk-day-head { background: var(--sj-page); border-bottom-style: dashed; }
.jr-wk-day-free .jr-wk-day-head { background: #fff4d6; }

.jr-wk-day-headtext { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.jr-wk-day-short {
  font-family: var(--sj-font);
  font-weight: 700;
  font-size: 23px;
  line-height: 1;
  color: var(--sj-ink);
}
.jr-wk-day-doneday .jr-wk-day-short { color: var(--sj-green-ink); }
.jr-wk-day-today .jr-wk-day-short { color: var(--sj-orange-deep); }
.jr-wk-day-state {
  font-family: var(--sj-font);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--sj-ink);
}
.jr-wk-day-doneday .jr-wk-day-state { color: var(--sj-green-ink); }
.jr-wk-day-today .jr-wk-day-state { color: var(--sj-orange-deep); }

.jr-wk-day-tick {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--sj-green);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sj-card);
}
.jr-wk-day-now {
  flex: none;
  font-family: var(--sj-font);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--sj-card);
  background: var(--sj-orange);
  border-radius: var(--sj-r-pill);
  padding: 6px 11px;
}

.jr-wk-day-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 13px 14px 15px;
}
.jr-wk-day-book {
  display: block;
  font-family: var(--sj-font-story);
  font-size: 17px;
  line-height: 1.35;
  color: var(--sj-ink);
  text-wrap: pretty;
}

.jr-wk-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 9px 11px;
  border-radius: 14px;
  background: #f4f9f6;
  border: 1px solid var(--sj-green-line);
}
.jr-wk-note-moved { background: var(--sj-orange-tint, #fff0df); border-color: #f4b28f; }
.jr-wk-note-gone { background: var(--sj-stage); border: 1px dashed var(--sj-line-warm); }
.jr-wk-note-dot {
  flex: none;
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--sj-green);
  display: block;
}
.jr-wk-note-moved .jr-wk-note-dot { background: var(--sj-orange); }
.jr-wk-note-gone .jr-wk-note-dot { background: #b9b0a0; }
.jr-wk-note-text {
  flex: 1 1 auto;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--sj-ink);
  text-wrap: pretty;
}

.jr-wk-stops { flex: 1 1 auto; margin-top: 2px; display: flex; flex-direction: column; gap: 8px; }
.jr-wk-stop {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  max-height: 64px;
  padding: 0 12px;
  border-radius: 14px;
  box-sizing: border-box;
  border: 1.5px dashed;
}
/* A day nothing was asked of (DECISIONS #130). Her own quiet stage tone, no box and no chip:
   the column keeps its height because the stops row it replaces is the only thing missing. */
.jr-wk-stop-none {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  font-size: 15px;
  font-weight: 500;
  color: var(--sj-ink-soft);
}

.jr-wk-stop-reading { background: #eef8f1; border-color: var(--sj-green-line); }
.jr-wk-stop-maths { background: #eaf3fb; border-color: #c7e3f3; }
.jr-wk-stop-spelling { background: #fdf4dd; border-color: #f0dcac; }
/* Green means done, and nothing else does. */
.jr-wk-stop-done { background: #eaf7ef; border: 1.5px solid var(--sj-green); }
.jr-wk-stop-box {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: var(--sj-card);
  border: 2px dashed;
  border-color: inherit;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sj-card);
}
.jr-wk-stop-done .jr-wk-stop-box { background: var(--sj-green); border: 2px solid var(--sj-green); }
.jr-wk-stop-label { flex: 1 1 auto; min-width: 0; font-family: var(--sj-font); font-weight: 600; font-size: 16px; }
.jr-wk-stop-reading .jr-wk-stop-label { color: var(--sj-green-ink); }
.jr-wk-stop-maths .jr-wk-stop-label { color: var(--sj-sky-ink); }
.jr-wk-stop-spelling .jr-wk-stop-label { color: #8a5a06; }
.jr-wk-stop-done .jr-wk-stop-label { color: var(--sj-green-ink); }

.jr-wk-day-cta {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  border-radius: 16px;
  background: var(--sj-orange);
  color: var(--sj-card);
  font-family: var(--sj-font);
  font-weight: 700;
  font-size: 18px;
  box-shadow: 0 4px 0 var(--sj-orange-deep);
  text-decoration: none;
}
.jr-wk-day-cta:active { transform: translateY(4px); box-shadow: none; }

/* ---------------------------------------------------------------- Lexi's foot */
.jr-wk-foot {
  flex: none;
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--sj-card);
  border: 1px solid var(--sj-line);
  border-radius: 22px;
  box-shadow: 0 10px 26px rgba(35, 50, 44, .1);
  padding: 16px 22px;
}
.jr-wk-foot-face {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background-color: var(--sj-green-tint);
  border: 1px solid var(--sj-green-line);
  background-size: contain;
  background-position: center bottom;
  background-repeat: no-repeat;
  display: block;
}
.jr-wk-foot-line {
  margin: 0;
  flex: 1 1 auto;
  font-family: var(--sj-font-story);
  font-size: 20px;
  line-height: 1.4;
  color: var(--sj-ink);
  text-wrap: pretty;
}
.jr-wk-close {
  flex: none;
  appearance: none;
  border: none;
  cursor: pointer;
  min-height: 60px;
  padding: 0 26px;
  border-radius: 18px;
  background: var(--sj-orange);
  color: var(--sj-card);
  font-family: var(--sj-font);
  font-weight: 600;
  font-size: 20px;
  box-shadow: 0 5px 0 var(--sj-orange-deep);
}
.jr-wk-close-quiet {
  background: var(--sj-card);
  border: 1.5px solid var(--sj-line);
  color: var(--sj-ink);
  box-shadow: 0 3px 0 var(--sj-line-warm);
}
.jr-wk-close:active { transform: translateY(5px); box-shadow: none; }

/* ---------------------------------------------------------------- the close */
.jr-wk-closed {
  position: absolute;
  left: 0;
  right: 0;
  top: var(--sj-chrome-h);
  bottom: 0;
  box-sizing: border-box;
  padding: 40px 56px;
  display: flex;
  gap: 34px;
  align-items: center;
}
.jr-wk-close-card {
  flex: 1 1 auto;
  min-width: 0;
  box-sizing: border-box;
  background: var(--sj-card);
  border: 1px solid var(--sj-line);
  border-radius: 30px;
  box-shadow: 0 20px 46px rgba(35, 50, 44, .2);
  padding: 36px 42px;
}
.jr-wk-close-badge {
  display: inline-flex;
  align-items: center;
  margin-bottom: 16px;
  padding: 9px 20px;
  border-radius: var(--sj-r-pill);
  background: var(--sj-green);
  color: var(--sj-card);
  font-family: var(--sj-font);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.jr-wk-close-title {
  margin: 0 0 12px;
  font-family: var(--sj-font);
  font-weight: 700;
  font-size: 52px;
  line-height: 1.04;
  letter-spacing: -.015em;
  color: var(--sj-ink);
  text-wrap: pretty;
}
.jr-wk-close-blurb {
  margin: 0 0 24px;
  font-family: var(--sj-font-story);
  font-size: 25px;
  line-height: 1.45;
  color: var(--sj-ink);
  max-width: 46ch;
  text-wrap: pretty;
}
.jr-wk-stats { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 26px; }
.jr-wk-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 150px;
  border-radius: 18px;
  padding: 14px 18px;
  border: 1px solid;
}
.jr-wk-stat-green { background: #eaf7ef; border-color: var(--sj-green-line); }
.jr-wk-stat-sky { background: var(--sj-teal-tint); border-color: #c7e3f3; }
.jr-wk-stat-sun { background: var(--sj-sun-tint); border-color: #f6d98a; }
.jr-wk-stat-value { font-family: var(--sj-font); font-weight: 700; font-size: 32px; line-height: 1; }
.jr-wk-stat-green .jr-wk-stat-value { color: var(--sj-green-ink); }
.jr-wk-stat-sky .jr-wk-stat-value { color: var(--sj-sky-ink); }
.jr-wk-stat-sun .jr-wk-stat-value { color: var(--sj-sun-ink); }
.jr-wk-stat-label { font-size: 16px; font-weight: 500; color: var(--sj-ink); }

.jr-wk-books {
  background: var(--sj-stage);
  border: 1px solid var(--sj-line);
  border-radius: 20px;
  padding: 16px 20px;
  margin-bottom: 26px;
}
.jr-wk-books-label {
  margin: 0 0 8px;
  font-family: var(--sj-font);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--sj-ink);
}
.jr-wk-books-list {
  margin: 0;
  font-family: var(--sj-font-story);
  font-size: 22px;
  line-height: 1.4;
  color: var(--sj-ink);
  text-wrap: pretty;
}

.jr-wk-close-acts { display: flex; gap: 14px; flex-wrap: wrap; }
.jr-wk-close-primary {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 74px;
  padding: 0 32px;
  border-radius: 22px;
  background: var(--sj-orange);
  color: var(--sj-card);
  font-family: var(--sj-font);
  font-weight: 700;
  font-size: 24px;
  box-shadow: 0 5px 0 var(--sj-orange-deep);
  text-decoration: none;
}
.jr-wk-close-primary:active { transform: translateY(5px); box-shadow: none; }
.jr-wk-close-quietbtn {
  appearance: none;
  cursor: pointer;
  min-height: 74px;
  padding: 0 26px;
  border-radius: 22px;
  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-wk-close-quietbtn:active { transform: translateY(4px); box-shadow: none; }

.jr-wk-close-aside { flex: 0 0 340px; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.jr-wk-bubble {
  position: relative;
  align-self: stretch;
  background: var(--sj-card);
  border: 1px solid var(--sj-green-line);
  border-radius: 20px;
  box-shadow: 0 12px 30px rgba(35, 50, 44, .14);
  padding: 18px 20px;
}
.jr-wk-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(--sj-green-ink);
}
.jr-wk-bubble-line { margin: 0; font-size: 19px; line-height: 1.4; font-weight: 600; color: var(--sj-ink); text-wrap: pretty; }
.jr-wk-bubble-tail {
  position: absolute;
  left: 44px;
  bottom: -9px;
  width: 18px;
  height: 18px;
  background: var(--sj-card);
  border-right: 1px solid var(--sj-green-line);
  border-bottom: 1px solid var(--sj-green-line);
  transform: rotate(45deg);
}
.jr-wk-close-face {
  width: 230px;
  height: 230px;
  display: block;
  background-size: contain;
  background-position: center bottom;
  background-repeat: no-repeat;
  filter: drop-shadow(0 12px 18px rgba(35, 50, 44, .16));
}
