/* ============================================================
   Bright Sky — My children (a parent's page, 006 DEC-34).
   Loaded after bright.css. Colour rules: blue = action/state,
   green = correct answers only (none here), red = wrong answers only,
   saffron = attention (a child not in the pack). Score dots as on
   Results: blue 80%+, light blue 40–79%, saffron below 40%.
   ============================================================ */
main.kids { max-width: 1040px; padding-bottom: 3rem; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.info-btn { display: inline-grid; place-items: center; width: 1.5rem; height: 1.5rem; margin-left: .4rem; padding: 0; flex: none;
  border-radius: 50%; border: 1.5px solid var(--outline); background: var(--surface); color: var(--act-ink); cursor: pointer;
  font: 800 .9rem/1 var(--display); vertical-align: .1rem; }
.info-btn[aria-expanded="true"] { background: var(--act); border-color: var(--act); color: #fff; }
.info-btn:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.k-tip { flex: 1 1 100%; margin: .45rem 0 0; padding: .55rem .75rem; border-radius: 10px; background: var(--act-wash); color: var(--ink-soft); font-size: .88rem; line-height: 1.45; font-weight: 400; }
.q-link { border: 0; background: none; padding: .2rem 0; font: inherit; font-weight: 700; color: var(--act-ink); cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }

/* header: the title and ONE button */
.k-head { display: flex; align-items: center; justify-content: space-between; gap: .8rem 1rem; flex-wrap: wrap; margin: 1.5rem 0 1.1rem; }
.k-head h1 { font-weight: 800; font-size: clamp(2rem, 4vw, 2.6rem); color: var(--ink); margin: 0; }
.k-add { font-family: var(--display); font-size: 1.05rem; padding: .62rem 1.2rem; }

/* a child's card */
.k-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.kid { display: flex; flex-direction: column; gap: .75rem; padding: 1.05rem 1.15rem 1.1rem; box-shadow: var(--shadow); }
.k-top { display: flex; align-items: center; gap: .65rem; }
.k-av { width: 2.7rem; height: 2.7rem; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: var(--act-wash); color: var(--act-ink); font: 800 1.3rem/1 var(--display); }
.k-n { flex: 1 1 auto; min-width: 0; }
.k-n h2 { margin: 0; font-size: 1.4rem; font-weight: 800; color: var(--ink); line-height: 1.1; }
.k-sub { display: block; font-size: .88rem; color: var(--pencil); }
.g-ic { display: inline-grid; place-items: center; flex: none; width: 2.3rem; height: 2.3rem; padding: 0; border: 0; border-radius: 50%;
  background: transparent; color: var(--act-ink); cursor: pointer; }
.g-ic:hover, .g-ic[aria-expanded="true"] { background: var(--act-wash); }
.g-ic svg { width: 1.15rem; height: 1.15rem; }
.g-ic:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.g-more { position: relative; }
.g-menu { position: absolute; right: 0; top: calc(100% + .2rem); z-index: 30; min-width: 15rem; padding: .3rem;
  background: var(--surface); border: 1px solid var(--rule); border-radius: 14px; box-shadow: var(--shadow-lift, var(--shadow)); }
.g-menu button { display: block; width: 100%; min-height: 44px; padding: .55rem .75rem; border: 0; border-radius: 10px; background: none;
  text-align: left; font: inherit; font-weight: 600; color: var(--act-ink); cursor: pointer; }
.g-menu button small { display: block; font-weight: 400; font-size: .8rem; color: var(--pencil); }
.g-menu button:hover { background: var(--act-wash); }
.g-menu button.danger { color: var(--kite-ink); }
.g-menu button.danger:hover { background: var(--kite-wash); }

.k-plan { margin: 0; font-size: .9rem; color: var(--ink-soft); }
.k-plan a { color: var(--act-ink); font-weight: 700; }
.k-pack { padding: .6rem .75rem; border-radius: 12px; background: var(--paper-2); }
.k-pack-l { display: flex; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }
.k-pack-l b { color: var(--ink); }
.k-bar { height: 7px; margin-top: .45rem; border-radius: 99px; background: var(--act-wash); overflow: hidden; }
.k-bar i { display: block; height: 100%; border-radius: 99px; background: var(--act); }
.k-warn { padding: .5rem .75rem; border-radius: 12px; background: var(--kite-wash); color: var(--kite-ink); font-weight: 600; }
.k-warn a { color: var(--kite-ink); }
.k-free { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem; padding: .5rem .75rem; border-radius: 12px; background: var(--act-wash); }
.k-free svg { width: 1.1rem; height: 1.1rem; color: var(--act-ink); }
.k-free b { color: var(--act-ink); }
.k-free { flex-wrap: nowrap; }
.k-free span { flex: 1 1 auto; }
.k-free .info-btn { margin-left: .2rem; }

.k-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .45rem; }
.k-list li { display: flex; align-items: center; gap: .6rem; font-size: .92rem; }
.k-k { flex: none; width: 3.4rem; font-size: .72rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--pencil); }
.k-todo .k-k { color: var(--act-ink); }
.k-t { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.k-t b { color: var(--ink); font-weight: 600; }
.k-t span { font-size: .82rem; color: var(--pencil); }
.k-more { padding-left: 4rem; font-size: .84rem; color: var(--pencil); }
.k-score { display: inline-flex; align-items: center; gap: .35rem; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.dot { width: .7rem; height: .7rem; border-radius: 50%; display: inline-block; }
.dot.hi { background: var(--act); }
.dot.mid { background: #9CC4F2; }
.dot.lo { background: var(--kite); }
:root[data-theme="dark"] .dot.mid { background: #6E9FDC; }

.k-acts { display: flex; gap: .5rem; margin-top: auto; padding-top: .2rem; }
.k-acts .btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; padding: .6rem 1rem; }
.k-acts .btn:first-child { flex: 1 1 auto; }
.k-acts svg { width: 1.1rem; height: 1.1rem; }

/* empty */
.k-empty { max-width: 560px; padding: 1.6rem 1.5rem 1.4rem; text-align: center; margin: 0 auto 1rem; box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; gap: .5rem; }
.k-empty-ic { width: 3.4rem; height: 3.4rem; border-radius: 16px; display: grid; place-items: center; background: var(--act-wash); color: var(--act-ink); }
.k-empty-ic svg { width: 1.8rem; height: 1.8rem; }
.k-empty h2 { margin: .2rem 0 0; font-size: 1.5rem; font-weight: 800; color: var(--ink); }
.k-empty p { margin: 0; color: var(--ink-soft); }
.k-empty .k-add { margin-top: .4rem; }
.k-free-note { display: flex; align-items: center; gap: .45rem; margin-top: .6rem !important; padding: .5rem .8rem; border-radius: 12px; background: var(--act-wash); color: var(--act-ink) !important; font-size: .9rem; font-weight: 600; text-align: left; }
.k-free-note svg { width: 1.1rem; height: 1.1rem; flex: none; }

/* "Teaching a group?" — one quiet line, the explanation behind the (i) */
.k-tutor { display: flex; align-items: center; flex-wrap: wrap; gap: .2rem .5rem; margin: 1.4rem 0 0; padding: .7rem .9rem; border-radius: 14px;
  border: 1.5px dashed var(--outline-soft); color: var(--ink-soft); font-size: .93rem; }
.k-tutor .info-btn { margin-left: .1rem; }

/* sheets: a box on a laptop, a sheet from the bottom on a phone */
.sh-scrim { position: fixed; inset: 0; z-index: 95; background: var(--scrim); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 1rem; }
.sh { width: min(460px, 100%); background: var(--surface); border-radius: 22px; padding: 1.2rem 1.3rem 1.2rem; box-shadow: var(--shadow-lift); }
.sh-head { display: flex; align-items: flex-start; gap: .8rem; margin-bottom: .6rem; }
.sh-head h3 { flex: 1; margin: .2rem 0 0; font-size: 1.4rem; font-weight: 800; color: var(--ink); }
.sh-x { width: 2.4rem; height: 2.4rem; flex: none; display: grid; place-items: center; border-radius: 50%; border: 1.5px solid var(--outline-soft); background: var(--surface); color: var(--ink-soft); cursor: pointer; }
.sh-x svg { width: 1rem; height: 1rem; }
.sh-body p { margin: 0 0 .6rem; color: var(--ink); }
.sh-body .sh-soft { color: var(--ink-soft); font-size: .92rem; }
.sh-acts { display: flex; justify-content: flex-end; gap: .6rem; margin-top: 1rem; }
.sh.warn .sh-head h3 { color: var(--ink); }
.k-danger { background: var(--kite-ink); box-shadow: none; }
.k-danger:hover { background: #5E3D0A; }
/* at night --kite-ink is a pale saffron: dark words on it, not white */
:root[data-theme="dark"] .k-danger { color: #3A2606; }
:root[data-theme="dark"] .k-danger:hover { background: var(--kite); color: #3A2606; }
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] .k-danger { color: #3A2606; }
  :root[data-theme="auto"] .k-danger:hover { background: var(--kite); color: #3A2606; }
}
body.sh-open { overflow: hidden; }
.k-f { display: flex; align-items: center; font-weight: 700; font-size: .92rem; color: var(--ink); margin: .2rem 0 .35rem; }
.k-in { width: 100%; padding: .65rem .8rem; border: 1.5px solid var(--rule); font: 400 1rem "IBM Plex Sans", system-ui, sans-serif; color: var(--ink); }
.k-clss { display: grid; grid-template-columns: repeat(8, 1fr); gap: .35rem; }
.k-cls { min-height: 44px; border-radius: 12px; border: 1.5px solid var(--outline-soft); background: var(--paper-2); color: var(--ink); font: 700 1.05rem var(--display); cursor: pointer; }
.k-cls:hover { border-color: var(--act); }
.k-cls[aria-checked="true"] { background: var(--act); border-color: var(--act); color: #fff; }
.k-err { display: block; font-size: .86rem; font-weight: 600; color: var(--kite-ink); margin-top: .25rem; }
.k-err:empty { display: none; }
.k-guard { display: flex; gap: .6rem; align-items: flex-start; margin-top: .9rem; font-weight: 600; color: var(--ink); cursor: pointer; }
.k-guard input { width: 1.25rem; height: 1.25rem; margin: .1rem 0 0; accent-color: var(--act); flex: none; }
.k-guard small { display: block; font-weight: 400; font-size: .84rem; color: var(--pencil); }
.k-guard a { color: var(--act-ink); }
.k-steps { margin: 0 0 .6rem; padding-left: 1.2rem; color: var(--ink-soft); font-size: .93rem; }
.k-steps li { margin: .2rem 0; }

@media (max-width: 700px) {
  .k-head { margin: .9rem 0 .9rem; }
  .k-head h1 { font-size: 2rem; }
  .k-head .k-add { flex: 1 1 100%; padding: .7rem 1rem; }
  .k-grid { grid-template-columns: 1fr; gap: .8rem; }
  .kid { padding: .95rem 1rem 1rem; border-radius: 16px; }
  .k-empty { padding: 1.3rem 1.1rem 1.2rem; }
  .k-empty .k-add { align-self: stretch; }
  .sh-scrim { place-items: end stretch; padding: 0; }
  .sh { width: 100%; border-radius: 22px 22px 0 0; padding: 1.1rem 1.1rem 1.2rem; }
  .sh-acts .btn { flex: 1; justify-content: center; text-align: center; }
  .k-clss { grid-template-columns: repeat(4, 1fr); }
  .k-long { display: none; }
  .k-tutor { flex-wrap: nowrap; }
}

/* a parent in the teacher view (Classes): where the children are, and the way back */
.pv-strip { display: flex; align-items: center; gap: .8rem 1rem; flex-wrap: wrap; margin: .2rem 0 1.1rem; padding: .8rem 1rem; border-radius: 16px;
  background: var(--surface); box-shadow: var(--shadow); border-left: 4px solid var(--act); }
.pv-strip p { flex: 1 1 18rem; margin: 0; color: var(--ink-soft); font-size: .93rem; }
.pv-strip p b { color: var(--ink); }
.pv-ic { width: 2.4rem; height: 2.4rem; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--act-wash); color: var(--act-ink); }
.pv-ic svg { width: 1.3rem; height: 1.3rem; }
@media (max-width: 700px) { .pv-strip { gap: .7rem; } .pv-strip p { flex: 1 1 10rem; } .pv-strip .btn { flex: 1 1 100%; justify-content: center; } }

/* Add a child to the pack (js/pack_add.js): the sum, then the total */
.pk-sum { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin: .8rem 0 .4rem;
  padding: .7rem .9rem; border-radius: 14px; background: var(--paper-2); color: var(--ink-soft); font-size: .92rem; }
.pk-sum b { font: 800 1.35rem/1 var(--display); color: var(--ink); }
