/* src/components/jr/sites/sites.css — SJ2 Sites.
   Every number transcribed from
   art-source/design-sj2-2026-09-12/screens/SJ2 Sites.dc.html. The 76px bar is the lane's
   shared one (.jr-pbar*, in sheets.css).

   The one geometry that is not hers: her add row is a 60px text field with a 60px orange
   button beside it. There is no text field on this side (a hash is typeable, so `#sites` is
   reachable by a child, and the ban is a privacy rule). The row keeps her 60px height, her
   16px radius and her orange primary; the primary pastes instead of submitting. */

.jr-si-body {
  position: absolute;
  left: 0;
  right: 0;
  top: 76px;
  bottom: 0;
  padding: 20px 30px 24px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--sj-stage);
}

.jr-si-head { flex: none; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.jr-si-headtext { min-width: 0; }
.jr-si-h1 {
  margin: 0 0 4px;
  font-family: var(--sj-font);
  font-weight: 700;
  font-size: 38px;
  line-height: 1.04;
  letter-spacing: -.015em;
  color: var(--sj-ink);
}
.jr-si-sub { margin: 0; font-size: 19px; font-weight: 500; color: var(--sj-ink); max-width: 84ch; text-wrap: pretty; }

.jr-si-stats { flex: none; display: flex; gap: 10px; }
.jr-si-stat {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 11px 18px;
  border-radius: 16px;
  background: var(--sj-card);
  border: 1.5px solid var(--sj-line);
  min-width: 96px;
}
.jr-si-stat-value { font-family: var(--sj-font); font-weight: 700; font-size: 26px; line-height: 1; }
.jr-si-stat-teal { color: var(--sj-teal-ink); }
.jr-si-stat-orange { color: var(--sj-orange); }
.jr-si-stat-green { color: var(--sj-green-ink); }
.jr-si-stat-label { font-family: var(--sj-font); font-weight: 500; font-size: 14px; color: var(--sj-ink); white-space: nowrap; }

.jr-si-main { flex: 1 1 auto; min-height: 0; display: flex; gap: 18px; }
.jr-si-left { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 14px; }

/* ---------------------------------------------------------------- add a site */
.jr-si-add {
  flex: none;
  background: var(--sj-card);
  border: 2px solid var(--sj-teal-line);
  border-radius: 22px;
  box-shadow: 0 12px 30px rgba(35, 50, 44, .1);
  padding: 18px 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.jr-si-kicker {
  font-family: var(--sj-font);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--sj-teal-ink);
}
.jr-si-addrow { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.jr-si-paste {
  flex: none;
  appearance: none;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 60px;
  padding: 0 26px;
  border-radius: 16px;
  background: var(--sj-orange);
  color: var(--sj-card);
  font-family: var(--sj-font);
  font-weight: 700;
  font-size: 19px;
  box-shadow: 0 4px 0 var(--sj-orange-deep);
  white-space: nowrap;
}
.jr-si-paste:active { transform: translateY(4px); box-shadow: none; }

.jr-si-open {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: 60px;
  padding: 0 22px;
  border-radius: 16px;
  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: 18px;
  color: var(--sj-ink);
  white-space: nowrap;
  text-decoration: none;
}
.jr-si-open:active { transform: translateY(4px); box-shadow: none; }

.jr-si-note { font-size: 16.5px; font-weight: 600; line-height: 1.4; text-wrap: pretty; color: var(--sj-ink); }
.jr-si-note-good { color: var(--sj-green-ink); }
.jr-si-note-bad { color: #a8492a; }

/* ---------------------------------------------------------------- just sorted */
.jr-si-sorted { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.jr-si-sortedhead { flex: none; display: flex; align-items: baseline; gap: 12px; }
.jr-si-sortedtitle { font-family: var(--sj-font); font-weight: 700; font-size: 24px; color: var(--sj-ink); }
.jr-si-sortednote { font-size: 16.5px; font-weight: 500; color: var(--sj-ink); text-wrap: pretty; }

.jr-si-rows {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 4px;
}

/* Nothing waiting. Her row's own shape, dashed instead of solid, so the list reads as a list
   with nothing in it rather than as a hole between the heading and the board line. */
.jr-si-empty {
  flex: none;
  padding: 18px 18px 19px;
  border-radius: 20px;
  background: var(--sj-card);
  border: 2px dashed var(--sj-teal-line);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.jr-si-emptytitle { font-family: var(--sj-font); font-weight: 700; font-size: 19px; color: var(--sj-ink); }
.jr-si-emptynote { font-size: 16px; font-weight: 500; line-height: 1.45; color: var(--sj-ink-soft); text-wrap: pretty; }

.jr-si-row {
  flex: none;
  padding: 14px 18px 15px;
  border-radius: 20px;
  background: var(--sj-card);
  border: 2px solid var(--sj-teal-line);
  display: flex;
  align-items: center;
  gap: 16px;
}
/* Kept: the wrong grade, not a mistake. It stays in the list and is simply not offered. */
.jr-si-row-kept { background: var(--sj-stage); border-color: var(--sj-line); }

.jr-si-rowtext { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.jr-si-chips { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.jr-si-gap { flex: 1 1 auto; }

.jr-si-subject,
.jr-si-counts,
.jr-si-flag {
  font-family: var(--sj-font);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: .13em;
  text-transform: uppercase;
  border: 1px solid transparent;
  border-radius: var(--sj-r-pill);
  padding: 5px 11px;
  white-space: nowrap;
}
.jr-si-counts {
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: .11em;
  color: var(--sj-green-ink);
  background: #eaf7ef;
  border-color: var(--sj-green-line);
}
.jr-si-flag {
  letter-spacing: .11em;
  color: var(--sj-sun-ink);
  background: #fff8e6;
  border-color: var(--sj-sun-line);
}

.jr-si-rowtitle { font-family: var(--sj-font); font-weight: 600; font-size: 20px; line-height: 1.2; color: var(--sj-ink); text-wrap: pretty; }
.jr-si-worked { font-size: 16.5px; font-weight: 500; line-height: 1.4; color: var(--sj-ink); text-wrap: pretty; }
.jr-si-fromline { font-size: 15.5px; font-weight: 500; line-height: 1.4; color: var(--sj-ink); text-wrap: pretty; }

.jr-si-actions { flex: none; display: flex; align-items: center; gap: 9px; }
.jr-si-act {
  appearance: none;
  cursor: pointer;
  min-height: 52px;
  padding: 0 20px;
  border-radius: 15px;
  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: 17px;
  color: var(--sj-ink);
  white-space: nowrap;
}
.jr-si-act:active { transform: translateY(4px); box-shadow: none; }

.jr-si-boardline { flex: none; font-size: 16px; font-weight: 500; line-height: 1.4; color: var(--sj-ink); text-wrap: pretty; }
.jr-si-nothing { font-size: 18px; font-weight: 600; color: var(--sj-ink); }

/* ---------------------------------------------------------------- the rail */
.jr-si-rail { flex: 0 0 372px; display: flex; flex-direction: column; gap: 14px; min-height: 0; }

.jr-si-saved {
  flex: 1 1 auto;
  min-height: 0;
  background: var(--sj-card);
  border: 1px solid var(--sj-line);
  border-radius: 22px;
  box-shadow: 0 12px 30px rgba(35, 50, 44, .1);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}
.jr-si-savedtitle { flex: none; font-family: var(--sj-font); font-weight: 700; font-size: 22px; color: var(--sj-ink); }
.jr-si-savedlist {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding-right: 3px;
}

.jr-si-site {
  padding: 12px 15px 13px;
  border-radius: 16px;
  background: var(--sj-stage);
  border: 1.5px solid var(--sj-line);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.jr-si-site-blocked { background: #fff8e6; border-color: var(--sj-sun-line); }
/* A link this household pasted: the only kind the in-app browser may open. */
.jr-si-site-mine { background: var(--sj-teal-tint); border-color: var(--sj-teal-line); }

.jr-si-siterow { display: flex; align-items: baseline; gap: 9px; }
.jr-si-sitename { font-family: var(--sj-font); font-weight: 600; font-size: 18px; color: var(--sj-ink); text-wrap: pretty; }
.jr-si-sitecount { font-family: var(--sj-font); font-weight: 600; font-size: 13.5px; color: var(--sj-teal-ink); white-space: nowrap; }
.jr-si-sitecount-blocked { color: var(--sj-sun-ink); }
.jr-si-sitehost { font-size: 14.5px; font-weight: 600; color: var(--sj-ink); overflow: hidden; text-overflow: ellipsis; }
.jr-si-sitenote { font-size: 15px; font-weight: 500; line-height: 1.4; color: var(--sj-ink); text-wrap: pretty; }

.jr-si-sitefix,
.jr-si-siteopen {
  align-self: flex-start;
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 15px;
  border-radius: 13px;
  background: var(--sj-card);
  border: 1.5px solid var(--sj-sun-line);
  font-family: var(--sj-font);
  font-weight: 600;
  font-size: 15.5px;
  color: var(--sj-sun-ink);
  text-decoration: none;
  cursor: pointer;
}
.jr-si-siteopen { border-color: var(--sj-teal-line); color: var(--sj-teal-ink); }

.jr-si-how {
  flex: none;
  background: var(--sj-card);
  border: 2px solid var(--sj-teal-line);
  border-radius: 22px;
  box-shadow: 0 12px 30px rgba(35, 50, 44, .1);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.jr-si-howrow { display: flex; align-items: flex-start; gap: 11px; }
.jr-si-hown {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: var(--sj-teal-tint);
  border: 1px solid var(--sj-teal-line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sj-font);
  font-weight: 700;
  font-size: 14px;
  color: var(--sj-teal-ink);
}
.jr-si-howtext { flex: 1 1 auto; font-size: 16px; font-weight: 600; line-height: 1.4; color: var(--sj-ink); text-wrap: pretty; }

/* ---------------------------------------------------------------- phones (DECISIONS #164)
   SHE DREW NO PHONE FRAME FOR SITES. Minimum honest stacking: the body stops being an
   absolutely positioned band under a 76px bar and flows with the page, her 372px saved-sites
   rail goes under the list instead of beside it, and the add row's controls go full width.
   What Sites should actually look like in a hand waits on her frames. */
@media (max-width: 767px) {
  .jr-phone-natural .jr-si-body {
    position: static;
    flex: 1 1 auto;
    padding: 16px 14px calc(20px + env(safe-area-inset-bottom));
  }
  .jr-phone-natural .jr-si-head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .jr-phone-natural .jr-si-stats { flex-wrap: wrap; }
  .jr-phone-natural .jr-si-h1 { font-size: 32px; }
  .jr-phone-natural .jr-si-sub { font-size: 16px; }
  .jr-phone-natural .jr-si-main { display: block; }
  .jr-phone-natural .jr-si-left,
  .jr-phone-natural .jr-si-rail { flex: none; width: 100%; min-height: 0; }
  .jr-phone-natural .jr-si-rail { margin-top: 14px; }
  .jr-phone-natural .jr-si-rows,
  .jr-phone-natural .jr-si-savedlist { overflow: visible; }
  .jr-phone-natural .jr-si-addrow { align-items: stretch; }
  .jr-phone-natural .jr-si-addrow > * { width: 100%; max-width: 100%; box-sizing: border-box; justify-content: center; }
  .jr-phone-natural .jr-si-row { flex-direction: column; align-items: stretch; gap: 10px; }
  .jr-phone-natural .jr-si-actions { flex-wrap: wrap; }
  .jr-phone-natural .jr-si-actions > * { flex: 1 1 auto; justify-content: center; }
}
