/* ═══════════════════════════════════════════════════════════════════════════
   ki_parent.css — the PARENT PORTAL on its blue (Session 58 layout, Session 59
   ground). Loaded after ki_app.css on every non-chalkboard page.

   SCOPE. Every rule is scoped to `body.ki.ki-t-portal` plus a theme class:
     P = body.ki.ki-t-portal.theme-parent   — the portal pages
     S = body.ki.ki-t-portal.theme-kid      — /session/<id>, which renders
                                              theme-kid but sets ki_tier='portal'
   `ki-t-portal` is set by base.html only for a signed-in parent with no child
   session, so nothing here can reach a public page or a practising child's page.
   Specificity is (0,3,1)+, the same as the Session 58 scope it replaces.

   THE TREATMENT (Session 59): the portal ground #0B2E4F, raised panels
   --ki-panel with --ki-rule hairlines and a light-blue top rule, insets
   --ki-stone. Numbers are white or --ki-ochre-ink. Bar tracks are white 14%;
   every fill is >= 3:1 against its track (measured: blue 4.4, red 4.1,
   ochre-ink 4.9, green 5.0 against the track over --ki-panel). Primary
   buttons are WHITE with Korva-blue ink; secondary is a white outline.
   There are no white panels anywhere in this sheet.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── 0. TOKENS — ki_app.css already flips the legacy scale onto the tier;
        only the two names it does not reach are set here ─────────────────── */
body.ki.ki-t-portal.theme-parent,
body.ki.ki-t-portal.theme-kid {
  --warm-400: var(--ki-rule-2);
  --surface-2: rgba(255, 255, 255, .08);
  --ks-blue: var(--ki-blue);
  --ks-blue-deep: #FFFFFF;
  --kp-track: rgba(255, 255, 255, .14);
}
body.ki.ki-t-portal.theme-parent::before,
body.ki.ki-t-portal.theme-kid::before { background: none !important; }

/* ── 1. PAGE TITLE BLOCK — eyebrow + serif title ─────────────────────────── */
body.ki.ki-t-portal.theme-parent .k-eyebrow:not(.ki-pagehead *):not(.ki-section--navy *),
body.ki.ki-t-portal.theme-parent .eyebrow:not(.ki-pagehead *):not(.ki-section--navy *),
body.ki.ki-t-portal.theme-parent .cm-eyebrow:not(.ki-pagehead *):not(.ki-section--navy *),
body.ki.ki-t-portal.theme-kid .eyebrow {
  font: 700 12.5px/1.3 var(--ki-sans); letter-spacing: .09em; text-transform: uppercase;
  color: var(--ki-blue); background: none; border: 0; padding: 0;
}
body.ki.ki-t-portal.theme-parent main h1:not(.ki-pagehead *):not(.ki-section--navy *),
body.ki.ki-t-portal.theme-parent .cm-h1,
body.ki.ki-t-portal.theme-kid main h1 {
  font-family: var(--ki-serif); font-weight: 700; color: var(--ki-head); letter-spacing: 0;
  font-size: clamp(28px, 3.2vw, 38px); line-height: 1.22;
}
body.ki.ki-t-portal.theme-parent main :is(h2, h3, h4):not(.ki-pagehead *):not(.ki-section--navy *),
body.ki.ki-t-portal.theme-kid main :is(h2, h3, h4) { font-family: var(--ki-serif); color: var(--ki-head); letter-spacing: 0; }
body.ki.ki-t-portal.theme-parent main p,
body.ki.ki-t-portal.theme-kid main p { color: var(--ki-ink-2); }
body.ki.ki-t-portal.theme-parent .k-hint,
body.ki.ki-t-portal.theme-parent .t-muted,
body.ki.ki-t-portal.theme-parent .t-faint,
body.ki.ki-t-portal.theme-parent .ks-note,
body.ki.ki-t-portal.theme-kid .t-muted,
body.ki.ki-t-portal.theme-kid .t-faint { color: var(--ki-ink-3); }
body.ki.ki-t-portal.theme-parent .t-strong,
body.ki.ki-t-portal.theme-kid .t-strong { color: var(--ki-head); }
body.ki.ki-t-portal.theme-parent main a:not([class]),
body.ki.ki-t-portal.theme-kid main a:not([class]),
body.ki.ki-t-portal.theme-parent main a.t-muted,
body.ki.ki-t-portal.theme-parent main a.t-sm,
body.ki.ki-t-portal.theme-kid main a.t-muted { color: var(--ki-blue); }

/* ── 2. PANELS — every card becomes a ruled blue panel ───────────────────── */
body.ki.ki-t-portal.theme-parent :is(.k-card, .card, .cm-card, .sub-panel, .dash-stat-card, .cm-thread, .cm-post, .cm-reply),
body.ki.ki-t-portal.theme-kid .card {
  background: var(--ki-panel); color: var(--ki-ink);
  border: 1px solid var(--ki-rule); border-top: 3px solid var(--ki-blue);
  border-radius: 0; box-shadow: none; transform: none;
}
body.ki.ki-t-portal.theme-parent .card-tinted { background: var(--ki-panel); }
body.ki.ki-t-portal.theme-parent :is(.card-lift, .k-card--interactive):hover { transform: none; box-shadow: none; border-color: var(--ki-blue); }

/* ── 3. BUTTONS — white primary with Korva-blue ink, white-outline secondary ─ */
body.ki.ki-t-portal.theme-parent :is(.k-btn--primary, .btn-primary, .cm-btn--primary),
body.ki.ki-t-portal.theme-kid :is(.k-btn--primary, .btn-primary) {
  /* !important: vibrant.css paints every primary with `var(--vb-fill) !important` */
  background: #FFFFFF !important; border: 2px solid #FFFFFF; color: var(--ki-brand) !important;
  border-radius: var(--ki-r); box-shadow: none; transform: none; font-weight: 700;
  min-height: 44px;
}
body.ki.ki-t-portal.theme-parent :is(.k-btn--primary, .btn-primary, .cm-btn--primary):hover,
body.ki.ki-t-portal.theme-kid :is(.k-btn--primary, .btn-primary):hover { background: #E3F1F7 !important; border-color: #E3F1F7; color: var(--ki-brand) !important; }
body.ki.ki-t-portal.theme-parent :is(.k-btn--secondary, .btn-soft, .btn-ghost, .btn-secondary, .k-btn--ghost, .cm-btn--ghost, .cm-btn--quiet),
body.ki.ki-t-portal.theme-kid :is(.k-btn--secondary, .btn-soft, .btn-ghost, .btn-secondary, .k-btn--ghost) {
  background: transparent; border: 1px solid rgba(255, 255, 255, .85); color: #FFFFFF;
  border-radius: var(--ki-r); box-shadow: none; transform: none; font-weight: 700;
}
body.ki.ki-t-portal.theme-parent :is(.k-btn--secondary, .btn-soft, .btn-ghost, .btn-secondary, .k-btn--ghost, .cm-btn--ghost, .cm-btn--quiet):hover,
body.ki.ki-t-portal.theme-kid :is(.k-btn--secondary, .btn-soft, .btn-ghost, .btn-secondary, .k-btn--ghost):hover { background: rgba(255, 255, 255, .10); border-color: #FFFFFF; color: #FFFFFF; }
body.ki.ki-t-portal.theme-parent :is(.k-btn, .btn, .cm-btn):focus-visible,
body.ki.ki-t-portal.theme-kid :is(.k-btn, .btn):focus-visible { outline: 3px solid var(--ki-ochre-ink); outline-offset: 2px; }

/* a disabled primary (subscribe's checkout until the consent box is ticked):
   an outline that plainly reads as not-yet, never a grey-blue slab */
body.ki.ki-t-portal.theme-parent :is(.k-btn--primary, .btn-primary):disabled {
  background: transparent !important; border-color: var(--ki-rule-2); color: var(--ki-ink-3) !important;
  opacity: 1; cursor: not-allowed;
}

/* ── 4. STATUS LABELS — square, bordered, transparent on the panel ──────── */
body.ki.ki-t-portal.theme-parent :is(.k-tag, .chip, .ks-chip, .cm-tag, .nick-waiting) {
  display: inline-flex; align-items: center; gap: 6px;
  border-radius: 0; border: 1px solid var(--ki-rule-2); background: transparent;
  color: var(--ki-ink-2); font: 700 12px/1.2 var(--ki-sans); letter-spacing: .05em;
  text-transform: uppercase; padding: 5px 8px; box-shadow: none;
}
body.ki.ki-t-portal.theme-parent :is(.k-tag--accent, .chip-lilac, .chip-blue, .cm-tag--pinned, .cm-tag--staff) {
  border-color: var(--ki-blue); color: var(--ki-blue); background: transparent;
}
body.ki.ki-t-portal.theme-parent :is(.chip-mint, .ks-chip--done, .cm-tag--answered),
body.ki.ki-t-portal.theme-parent .k-tag[style*="mint"] {
  border-color: var(--ki-green) !important; color: var(--ki-green) !important; background: transparent !important;
}
body.ki.ki-t-portal.theme-parent :is(.chip-coral, .chip-red) { border-color: var(--ki-red); color: var(--ki-red); background: transparent; }
body.ki.ki-t-portal.theme-parent :is(.chip-sun, .chip-amber, .chip-gold) { border-color: var(--ki-ochre-ink); color: var(--ki-ochre-ink); background: transparent; }
body.ki.ki-t-portal.theme-parent .k-ind--review {
  border-color: var(--ki-ochre-ink); color: var(--ki-ochre-ink); background: rgba(233, 196, 106, .10);
}
body.ki.ki-t-portal.theme-parent .nick-waiting { margin-left: 10px; vertical-align: middle; font-family: var(--ki-sans); }

/* ── 5. PROGRESS — square, thin, visible on blue ─────────────────────────── */
body.ki.ki-t-portal.theme-parent :is(.ks-meter, .dash-skill__bar, .progress-bar) {
  height: 8px; border-radius: 0; background: var(--kp-track); overflow: hidden; box-shadow: none;
}
body.ki.ki-t-portal.theme-parent .ks-meter--empty { background: var(--kp-track); }
body.ki.ki-t-portal.theme-parent :is(.ks-meter > span, .dash-skill__bar span, .progress-fill) {
  border-radius: 0; background: var(--ki-blue);
}
body.ki.ki-t-portal.theme-parent .ks-meter--purple > span { background: var(--ki-ochre-ink); }
/* the skill bars keep their meaning (how strong), re-tuned for the dark ground */
body.ki.ki-t-portal.theme-parent .dash-skill[data-level="1"] .dash-skill__bar span { background: var(--ki-red); }
body.ki.ki-t-portal.theme-parent .dash-skill[data-level="2"] .dash-skill__bar span { background: var(--ki-ochre-ink); }
body.ki.ki-t-portal.theme-parent .dash-skill[data-level="3"] .dash-skill__bar span { background: var(--ki-blue); }
body.ki.ki-t-portal.theme-parent .dash-skill[data-level="4"] .dash-skill__bar span,
body.ki.ki-t-portal.theme-parent .dash-skill[data-level="5"] .dash-skill__bar span { background: var(--ki-green); }
body.ki.ki-t-portal.theme-parent .dash-skill {
  grid-template-columns: minmax(0, 1fr) minmax(70px, 120px) 104px;
  border-bottom: 1px solid var(--ki-rule);
}
body.ki.ki-t-portal.theme-parent .dash-skill__label { color: var(--ki-ink); }
body.ki.ki-t-portal.theme-parent .dash-skill__value { text-align: right; font-variant-numeric: tabular-nums; color: #FFFFFF; font-weight: 700; white-space: nowrap; }
body.ki.ki-t-portal.theme-parent .dash-skill__value .k-hint { font-weight: 400; font-size: 13px; color: var(--ki-ink-3); }

/* Section performance: a ruled table of rows, not floating bars */
body.ki.ki-t-portal.theme-parent .ks-bars { gap: 0; border-top: 2px solid rgba(255, 255, 255, .55); }
body.ki.ki-t-portal.theme-parent .ks-bars > * { padding: 12px 0; border-bottom: 1px solid var(--ki-rule); }
body.ki.ki-t-portal.theme-parent .ks-bar__head { margin-bottom: 8px; }
body.ki.ki-t-portal.theme-parent .ks-bar__name { font: 700 15px/1.35 var(--ki-sans); color: var(--ki-head); }
body.ki.ki-t-portal.theme-parent .ks-bar__name :is(svg, i) { color: var(--ki-blue); }
body.ki.ki-t-portal.theme-parent .ks-bar__val { font: 600 14px/1.35 var(--ki-sans); color: var(--ki-ink-2); font-variant-numeric: tabular-nums; }

/* ── 6. DASHBOARD ─────────────────────────────────────────────────────────── */
body.ki.ki-t-portal.theme-parent .dash-head { border-bottom: 1px solid var(--ki-rule-2); padding-bottom: 18px; }
body.ki.ki-t-portal.theme-parent .dash-banner {
  border: 1px solid var(--ki-blue); border-left-width: 4px; border-radius: 0;
  background: var(--ki-blue-50); box-shadow: none; color: var(--ki-ink);
}
body.ki.ki-t-portal.theme-parent .dash-banner--warn { border-color: var(--ki-ochre-ink); background: rgba(233, 196, 106, .10); }
body.ki.ki-t-portal.theme-parent .dash-banner--stop { border-color: var(--ki-red); background: var(--ki-red-50); }
body.ki.ki-t-portal.theme-parent .dash-banner strong { color: var(--ki-head); }
body.ki.ki-t-portal.theme-parent .dash-banner p { color: var(--ki-ink-2); }

/* children list: ruled rows */
body.ki.ki-t-portal.theme-parent .dash-nav { border-top: 2px solid rgba(255, 255, 255, .55); padding-top: 10px; }
body.ki.ki-t-portal.theme-parent .dash-nav__row { border-bottom: 1px solid var(--ki-rule); padding: 8px 0; margin: 0; }
body.ki.ki-t-portal.theme-parent .dash-nav__item { border-radius: 0; background: transparent; color: var(--ki-ink); }
body.ki.ki-t-portal.theme-parent .dash-nav__item:hover { background: var(--ki-blue-50); }
body.ki.ki-t-portal.theme-parent .dash-nav__avatar {
  border-radius: 0; background: var(--ki-brand); color: #FFFFFF; font-family: var(--ki-serif); font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35);
}
body.ki.ki-t-portal.theme-parent .dash-nav__name { font-weight: 700; color: var(--ki-head); }
body.ki.ki-t-portal.theme-parent .dash-nav__chev { color: var(--ki-ink-3); }

body.ki.ki-t-portal.theme-parent .dash-child { border-top: 3px double rgba(255, 255, 255, .55); padding-top: 26px; }
body.ki.ki-t-portal.theme-parent .dash-child__head h2 { font-size: clamp(24px, 2.6vw, 32px); }
body.ki.ki-t-portal.theme-parent .ks-h3 { font: 700 17px/1.35 var(--ki-serif); color: var(--ki-head); }

/* this-week totals: a ruled fact strip, figures in the ochre accent */
body.ki.ki-t-portal.theme-parent .ks-week__totals { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 !important; border-top: 2px solid rgba(255, 255, 255, .55) !important; border-bottom: 1px solid var(--ki-rule); }
body.ki.ki-t-portal.theme-parent .ks-week__totals > * { padding: 12px 14px; border-left: 1px solid var(--ki-rule); }
body.ki.ki-t-portal.theme-parent .ks-week__totals > *:first-child { border-left: 0; padding-left: 0; }
body.ki.ki-t-portal.theme-parent .ks-week__stat-v { font: 700 24px/1.1 var(--ki-serif); color: var(--ki-ochre-ink); }
body.ki.ki-t-portal.theme-parent .ks-week__stat-v span { color: var(--ki-ink-2); }
body.ki.ki-t-portal.theme-parent .ks-week__stat-l { font: 600 12px/1.3 var(--ki-sans); letter-spacing: .06em; text-transform: uppercase; color: var(--ki-ink-3); margin-top: 4px; }
body.ki.ki-t-portal.theme-parent .ks-empty {
  border: 1px solid var(--ki-rule); border-left: 4px solid var(--ki-rule-2); border-radius: 0;
  background: var(--ki-stone); color: var(--ki-ink-2);
}
/* the seven-day strip */
body.ki.ki-t-portal.theme-parent .ks-week__col { background: var(--kp-track); border-radius: 0; }
body.ki.ki-t-portal.theme-parent .ks-week__col > span { background: var(--ki-blue); border-radius: 0; }
body.ki.ki-t-portal.theme-parent .ks-week__day--today .ks-week__col > span { background: var(--ki-ochre-ink); }
body.ki.ki-t-portal.theme-parent .ks-week__day--today .ks-week__col { box-shadow: inset 0 0 0 1px var(--ki-ochre-ink); }
body.ki.ki-t-portal.theme-parent .ks-week__day--future .ks-week__col { opacity: .5; }
body.ki.ki-t-portal.theme-parent .ks-week__lab { color: var(--ki-ink-2); }
body.ki.ki-t-portal.theme-parent .ks-week__day--today .ks-week__lab { color: var(--ki-ochre-ink); }
body.ki.ki-t-portal.theme-parent .ks-week__day--future .ks-week__lab { opacity: 1; color: var(--ki-ink-3); }

/* nickname offer: an info notice, square, stays visible */
body.ki.ki-t-portal.theme-parent .nick-offer {
  border: 1px solid var(--ki-blue); border-left-width: 4px; border-radius: 0; background: var(--ki-blue-50); color: var(--ki-ink);
}
body.ki.ki-t-portal.theme-parent .nick-offer__h { font-family: var(--ki-serif); color: var(--ki-head); font-size: 16px; }
body.ki.ki-t-portal.theme-parent .nick-offer__p { color: var(--ki-ink-2); }
body.ki.ki-t-portal.theme-parent .nick-offer__go {
  background: #FFFFFF; border: 2px solid #FFFFFF; color: var(--ki-brand); border-radius: var(--ki-r); min-height: 44px; box-shadow: none;
}
body.ki.ki-t-portal.theme-parent .nick-offer__go:hover { background: #E3F1F7; border-color: #E3F1F7; color: var(--ki-brand); }
body.ki.ki-t-portal.theme-parent .nick-offer__quiet,
body.ki.ki-t-portal.theme-parent .nick-set__btn {
  border-radius: var(--ki-r); border: 1px solid rgba(255, 255, 255, .85); background: transparent; color: #FFFFFF; min-height: 44px; box-shadow: none;
}
body.ki.ki-t-portal.theme-parent :is(.nick-offer__quiet, .nick-set__btn):hover { background: rgba(255, 255, 255, .10); color: #FFFFFF; }

/* ── 7. CHILD ACTIVITY ────────────────────────────────────────────────────── */
/* the Test-Ready score: an inset well with an ochre rule, distinct from panels */
body.ki.ki-t-portal.theme-parent .trs-card {
  background: var(--ki-stone); color: #FFFFFF; border-radius: 0; border: 1px solid var(--ki-rule);
  border-top: 4px solid var(--ki-ochre-ink); box-shadow: none;
}
body.ki.ki-t-portal.theme-parent .trs-card::before { display: none; }
body.ki.ki-t-portal.theme-parent .trs-eyebrow { color: var(--ki-ochre-ink); letter-spacing: .09em; }
body.ki.ki-t-portal.theme-parent .trs-score { font-family: var(--ki-serif); letter-spacing: 0; color: #FFFFFF; }
body.ki.ki-t-portal.theme-parent .trs-score .denom { color: var(--ki-ink-2); }
body.ki.ki-t-portal.theme-parent .trs-cell { border-radius: 0; background: var(--ki-panel); border: 1px solid var(--ki-rule); }
body.ki.ki-t-portal.theme-parent .trs-cell-label { color: var(--ki-ink-2); }
body.ki.ki-t-portal.theme-parent .trs-cell-value { font-family: var(--ki-serif); color: var(--ki-ochre-ink); }
body.ki.ki-t-portal.theme-parent .trs-card p { color: var(--ki-ink-2); }
body.ki.ki-t-portal.theme-parent .k-stat__value { font-family: var(--ki-serif); color: var(--ki-ochre-ink); letter-spacing: 0; }
body.ki.ki-t-portal.theme-parent .k-stat__value span { color: var(--ki-ink-2); }
body.ki.ki-t-portal.theme-parent .k-stat__label { color: var(--ki-ink-3); }
body.ki.ki-t-portal.theme-parent .kx-skillgroup__head {
  font: 700 12.5px/1.3 var(--ki-sans); letter-spacing: .08em; text-transform: uppercase;
  color: var(--ki-head); border-bottom: 2px solid rgba(255, 255, 255, .55); padding-bottom: 6px; margin-top: 18px;
}
body.ki.ki-t-portal.theme-parent .kx-skillgroup__note { color: var(--ki-ink-3); text-transform: none; letter-spacing: 0; font-weight: 400; }
body.ki.ki-t-portal.theme-parent .kx-compare { border-top: 2px solid rgba(255, 255, 255, .55); }
body.ki.ki-t-portal.theme-parent .kx-compare th { color: var(--ki-ink-3); }
body.ki.ki-t-portal.theme-parent .kx-compare td { color: var(--ki-ink); }
body.ki.ki-t-portal.theme-parent :is(.kx-compare th, .kx-compare td) { border-bottom: 1px solid var(--ki-rule); }
body.ki.ki-t-portal.theme-parent :is(.kx-static, .kd-act a.kx-act, .kx-act) { border-radius: 0; box-shadow: none; transform: none; }
/* recent sessions: ruled rows on the panel */
body.ki.ki-t-portal.theme-parent :is(.kx-act, .kd-act a.kx-act) { color: var(--ki-ink); border-bottom: 1px solid var(--ki-rule); }
body.ki.ki-t-portal.theme-parent :is(.kx-act, .kd-act a.kx-act):hover { background: var(--ki-blue-50); }
/* 4.5:1 for a small number set on the ground through the bar fills */
body.ki.ki-t-portal.theme-parent .progress-fill { background: var(--ki-blue); }

/* ── 8. SETTINGS ──────────────────────────────────────────────────────────── */
body.ki.ki-t-portal.theme-parent .kd-settings .card > h3 { font-size: 20px; padding-bottom: 12px; border-bottom: 1px solid var(--ki-rule); }
body.ki.ki-t-portal.theme-parent .kip-children { gap: 0; border-top: 2px solid rgba(255, 255, 255, .55); }
body.ki.ki-t-portal.theme-parent .kip-childrow {
  padding: 16px 0; gap: 12px 20px; flex-wrap: wrap; align-items: flex-end;
  border-bottom: 1px solid var(--ki-rule); background: none; border-radius: 0;
}
body.ki.ki-t-portal.theme-parent .kip-childrow .t-strong { font: 700 17px/1.35 var(--ki-serif); color: var(--ki-head); }
body.ki.ki-t-portal.theme-parent .kip-ctl { display: flex; flex-direction: column; gap: 4px; }
body.ki.ki-t-portal.theme-parent .kip-ctl label { font: 600 13.5px/1.3 var(--ki-sans); color: var(--ki-ink-2); }
body.ki.ki-t-portal.theme-parent :is(.kip-select, main select) {
  min-height: 44px; padding: 8px 10px; font: 400 15px/1.3 var(--ki-sans); color: #FFFFFF;
  background-color: var(--ki-input-bg); border: 1px solid var(--ki-field); border-radius: var(--ki-r); max-width: 100%;
}
body.ki.ki-t-portal.theme-parent main select option { background: var(--ki-navy); color: #FFFFFF; }
body.ki.ki-t-portal.theme-parent :is(.kip-select, main select):focus { outline: 2px solid var(--ki-blue); border-color: var(--ki-blue); }
body.ki.ki-t-portal.theme-parent .kip-del { color: var(--ki-red) !important; border-color: var(--ki-red) !important; background: transparent !important; min-height: 44px; }
body.ki.ki-t-portal.theme-parent .kip-del:hover, body.ki.ki-t-portal.theme-parent .kip-del:focus-visible { background: var(--ki-red-50) !important; color: #FFD3C9 !important; }  /* S61: the red ink on its hover fill was 4.09 */
body.ki.ki-t-portal.theme-parent .kip-lock { color: var(--ki-green); }
body.ki.ki-t-portal.theme-parent .kd-settings label { color: var(--ki-ink); }
body.ki.ki-t-portal.theme-parent .kd-settings :is(input[type="checkbox"], input[type="radio"]) { accent-color: var(--ki-blue); }

/* ── 9. FORMS — add child, PIN, community, settings ──────────────────────── */
body.ki.ki-t-portal.theme-parent .field-label { font: 600 15px/1.4 var(--ki-sans); color: var(--ki-head); }
body.ki.ki-t-portal.theme-parent .field-hint { color: var(--ki-ink-3); }
body.ki.ki-t-portal.theme-parent :is(.input, .cm-input, .cm-textarea, .k-del__input,
  main input[type="text"], main input[type="email"], main input[type="password"], main input[type="number"], main input[type="tel"], main textarea) {
  border: 1px solid var(--ki-field); border-radius: var(--ki-r); background: var(--ki-input-bg); color: #FFFFFF; box-shadow: none;
}
body.ki.ki-t-portal.theme-parent :is(.input, .cm-input, .cm-textarea, .k-del__input, main input, main textarea)::placeholder { color: #A9B4C1; }
body.ki.ki-t-portal.theme-parent :is(.input, .cm-input, .cm-textarea, .k-del__input,
  main input[type="text"], main input[type="email"], main input[type="password"], main input[type="number"], main input[type="tel"], main textarea):focus {
  outline: 2px solid var(--ki-blue); outline-offset: 0; border-color: var(--ki-blue); background: rgba(0, 0, 0, .32);
}
body.ki.ki-t-portal.theme-parent .cm-label { font: 600 14px/1.3 var(--ki-sans); color: var(--ki-head); letter-spacing: 0; text-transform: none; }
body.ki.ki-t-portal.theme-parent :is(.alert, .alert-error) {
  border-radius: 0; border: 1px solid var(--ki-red); border-left-width: 4px; background: var(--ki-red-50); color: #FFE3DC;
}
body.ki.ki-t-portal.theme-parent :is(.alert-success, .alert-ok) { border-color: var(--ki-green); background: var(--ki-green-50); color: #E2F7E8; }
body.ki.ki-t-portal.theme-parent :is(.alert-info) { border-color: var(--ki-blue); background: var(--ki-blue-50); color: #E3F1F7; }
body.ki.ki-t-portal.theme-parent .nick-note { border-radius: 0; border: 1px solid var(--ki-rule); border-left: 4px solid var(--ki-blue); background: var(--ki-blue-50); color: var(--ki-ink); }

/* ── 10. CHILD PICKER (/practice) ────────────────────────────────────────── */
body.ki.ki-t-portal.theme-parent .kd-picker .card { border-top-width: 3px; }
body.ki.ki-t-portal.theme-parent .kd-picker .card:hover { background: #154470; border-color: var(--ki-blue); }

/* ── 11. SUBSCRIBE ───────────────────────────────────────────────────────── */
body.ki.ki-t-portal.theme-parent .k-band--cream { background: var(--ki-ivory); }
body.ki.ki-t-portal.theme-parent :is(.sub-consent, .sub-consent__scroll) {
  border-radius: 0; background: var(--ki-stone); border: 1px solid var(--ki-rule-2); color: var(--ki-ink);
}
body.ki.ki-t-portal.theme-parent .sub-consent :is(p, li, span, label) { color: var(--ki-ink-2); }
body.ki.ki-t-portal.theme-parent .lp-price__amount { font-family: var(--ki-serif); color: var(--ki-ochre-ink); }

/* ── 12. DELETE ACCOUNT ──────────────────────────────────────────────────── */
body.ki.ki-t-portal.theme-parent .k-del {
  background: var(--ki-panel); border: 1px solid var(--ki-rule); border-top: 3px solid var(--ki-red);
  padding: 28px clamp(18px, 3vw, 36px); margin: 28px auto 40px; width: auto; max-width: 780px; color: var(--ki-ink);
}
body.ki.ki-t-portal.theme-parent .k-del > * { max-width: none; margin-left: 0; margin-right: 0; }
body.ki.ki-t-portal.theme-parent .k-del__title { margin: 10px 0 16px; }
body.ki.ki-t-portal.theme-parent .k-del__list { border-top: 1px solid var(--ki-rule); padding: 8px 0 8px 22px; margin: 8px 0 16px; color: var(--ki-ink-2); }
body.ki.ki-t-portal.theme-parent :is(.k-del__warn, .k-del__error) {
  border-radius: 0; border: 1px solid var(--ki-red); border-left-width: 4px; background: var(--ki-red-50); color: #FFE3DC;
}
body.ki.ki-t-portal.theme-parent main .k-del__warn :is(a, a:not([class]), strong) { color: #FFFFFF; }
body.ki.ki-t-portal.theme-parent .k-del__label { font: 600 15px/1.4 var(--ki-sans); color: var(--ki-head); }
body.ki.ki-t-portal.theme-parent .k-del__input { min-height: 46px; }
/* the destructive action: the light red as a fill, dark ink on it (9.9:1) */
body.ki.ki-t-portal.theme-parent .k-del__go {
  background: var(--ki-red); border: 2px solid var(--ki-red); color: #3A0F07; border-radius: var(--ki-r); box-shadow: none;
}
body.ki.ki-t-portal.theme-parent .k-del__go:hover { background: #F8BCAE; border-color: #FFFFFF; color: #3A0F07; }
body.ki.ki-t-portal.theme-parent .del-done__table { border-top: 2px solid rgba(255, 255, 255, .55); }
body.ki.ki-t-portal.theme-parent :is(.del-done__table td, .del-done__table th) { border-bottom: 1px solid var(--ki-rule); color: var(--ki-ink); }

/* ── 13. COMMUNITY ───────────────────────────────────────────────────────── */
body.ki.ki-t-portal.theme-parent .cm-identity {
  border-radius: 0; border: 1px solid var(--ki-rule); border-left: 4px solid var(--ki-ochre-ink);
  background: var(--ki-stone); color: var(--ki-ink-2);
}
body.ki.ki-t-portal.theme-parent .cm-identity strong { color: var(--ki-head); }
body.ki.ki-t-portal.theme-parent .cm-empty { border-radius: 0; background: var(--ki-panel); border: 1px solid var(--ki-rule); color: var(--ki-ink-2); }
body.ki.ki-t-portal.theme-parent .cm-feed { border-top: 2px solid rgba(255, 255, 255, .55); }
body.ki.ki-t-portal.theme-parent .cm-btn { border-radius: var(--ki-r); box-shadow: none; }
body.ki.ki-t-portal.theme-parent .cm-alert { border-radius: 0; border-left-width: 4px; }
body.ki.ki-t-portal.theme-parent .cm-lede { color: var(--ki-ink-2); }

/* ── 14. VIEW SESSION (/session/<id>: theme-kid, portal tier) ────────────── */
body.ki.ki-t-portal.theme-kid .option {
  border-radius: 0; box-shadow: none; background: var(--ki-stone); border: 1px solid var(--ki-rule-2); color: var(--ki-ink);
}
body.ki.ki-t-portal.theme-kid .option-letter {
  border-radius: 0; background: transparent; border: 1px solid var(--ki-rule-2); color: var(--ki-head);
}
body.ki.ki-t-portal.theme-kid .option.correct { border-color: var(--ki-green); background: var(--ki-green-50); color: #E2F7E8; }
body.ki.ki-t-portal.theme-kid .option.correct .option-letter { background: var(--ki-green); border-color: var(--ki-green); color: #0B2E4F; }
body.ki.ki-t-portal.theme-kid .option.incorrect { border-color: var(--ki-red); background: var(--ki-red-50); color: #FFE3DC; }
body.ki.ki-t-portal.theme-kid .option.incorrect .option-letter { background: var(--ki-red); border-color: var(--ki-red); color: #0B2E4F; }
body.ki.ki-t-portal.theme-kid .option.disabled { opacity: 1; }

/* abstract option tiles stay WHITE PLATES (the figures are drawn for white);
   everything inside is dark ink, and the right/wrong edge is the light
   green/red so it reads against the blue panel, not just against the plate */
body.ki.ki-t-portal.theme-kid .parent-abstract-option { border-radius: 0; border: 2px solid var(--ki-rule-2); background: #FFFFFF; }
body.ki.ki-t-portal.theme-kid .parent-abstract-option.correct { border-color: var(--ki-green); box-shadow: 0 0 0 2px var(--ki-green); background: #EEF6F0; }
body.ki.ki-t-portal.theme-kid .parent-abstract-option.incorrect { border-color: var(--ki-red); box-shadow: 0 0 0 2px var(--ki-red); background: #FDF2EE; }
body.ki.ki-t-portal.theme-kid .parent-abstract-letter { color: #4A4540; }
body.ki.ki-t-portal.theme-kid .parent-abstract-option.correct .parent-abstract-letter { color: #2E5E3B; }
body.ki.ki-t-portal.theme-kid .parent-abstract-option.incorrect .parent-abstract-letter { color: #8A3420; }

/* ── 15. PHONE ───────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  /* skill rows: name and figure on one line, the bar full width beneath, so a
     skill name is never cut to "Numbe…" */
  body.ki.ki-t-portal.theme-parent .dash-skill {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "l v" "b b";
    gap: 6px 12px;
  }
  body.ki.ki-t-portal.theme-parent .dash-skill__label { grid-area: l; white-space: normal; }
  body.ki.ki-t-portal.theme-parent .dash-skill__value { grid-area: v; }
  body.ki.ki-t-portal.theme-parent .dash-skill__bar { grid-area: b; }
}
@media (max-width: 600px) {
  body.ki.ki-t-portal.theme-parent .k-del { margin-left: 16px; margin-right: 16px; width: auto; max-width: none; }
}

/* ── 16. SHELL FIX (portal only) — ki_app.css's desktop-rail rule
   `body.ki:has(> .knav…) .knav-brand .brand-mark` paints the logo square
   --ki-blue (#8CCBE6), which on blue tiers is the LIGHT accent: white "K" on it
   is 1.78:1. The logo is a Korva-blue fill (ki_app.css:179 says so); that rule
   outranks it at (0,6,2), hence !important here. Reported for the shared sheet. */
body.ki.ki-t-portal :is(.knav-brand, .nav-brand) .brand-mark { background: var(--ki-brand) !important; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35); }
