/* ============ Family-facing surfaces: shared tokens + components ============
   Used by Pages/Child/_ChildLayout.cshtml and Pages/Shared/_PortalLayout.cshtml.

   The design tokens are the "Indigo Pulse" palette, verbatim from site/assets/styles.css
   (see dev-planning/16-website-palette-reference.md), so the family sees one brand from
   the marketing site through login to the lesson, and a future palette swap stays a
   token-values-only edit here exactly as it is on the site.

   Beyond the tokens, the portal now carries the site's visual language itself: the
   grid-paper texture and aurora glow behind the page (.ss-bg), the wordmark header
   (.ss-topbar), serif page titles with the pine-to-gold accent (.ss-page-head,
   .ss-accent), the kicker pill (.ss-kicker), pill-radius buttons with the primary
   shadow, and resting card shadows. Statics only: the site's drifting/bobbing loops
   stay on the site; here a single entrance rise is the only movement, and it honors
   prefers-reduced-motion.

   App-only additions on top of the site's set:
   - --ok / --warn / --danger (+ soft fills): semantic status colors the marketing site
     never needed (saved/submitted, deadlines/expiring links, revoke/invalid link).
   - --r-card / --r-ctl: the site's 22px radius reads luxurious on wide marketing cards
     but eats corner space at phone density; 16px cards / 10px controls keep the softness.
   - --shadow-soft: the site's --shadow is sized for one hero card per viewport; a stack
     of portal cards each carrying it turns to mud, so cards rest on this quieter cut.

   Dark mode follows the OS via prefers-color-scheme, and additionally honors the
   html[data-bs-theme] attribute that the layouts' scaffold script already stamps, so the
   two mechanisms can never disagree. */

:root {
  --paper: #f7f8fc;
  --paper-2: #edeffa;
  /* Fill for small surfaces that sit ON a card (icon squares, neutral pills, hover states).
     It cannot be --paper-2: in dark that is #171a33 against a #181b36 card, so squares,
     pills and row-hover feedback all but disappear. Opaque in light, a translucent lift
     in dark, so it reads against the card in both. */
  --wash: #edeffa;
  --ink: #191b2e;
  --ink-soft: #4e5170;
  --pine: #4038a8;           /* indigo, primary brand */
  --pine-soft: #5a51c8;
  --gold: #14b8a6;           /* teal accent */
  --gold-soft: #5eead4;
  --gold-deep: #0f8577;
  --coral: #e5604f;          /* teacher handwriting ink accent */
  --sky: #3d87d8;            /* student ink accent */
  --card: #ffffff;
  --line: rgba(25, 27, 46, .12);
  --shadow: 0 20px 60px -20px rgba(64, 56, 168, .25);
  --shadow-soft: 0 14px 40px -24px rgba(64, 56, 168, .3);
  --deep: #2b2570;           /* dark band gradients (live-lesson hero) */
  --deep-2: #1c1850;
  --deep-3: #241f62;
  --on-deep: #eeeffa;        /* text on dark bands */
  --on-deep-soft: rgba(238, 239, 250, .78);
  --on-pine: #ffffff;        /* text on primary-color surfaces */
  --on-gold: #04302a;        /* text on teal-accent surfaces */
  /* The live-lesson band is dark in BOTH themes, so its accent is theme-independent and
     is deliberately not redefined in the dark blocks below: the dark theme's --gold-soft
     (#14a897) would drop to roughly 2.5:1 on the band. */
  --on-deep-accent: #5eead4;
  --on-deep-accent-pulse: rgba(94, 234, 212, .5);
  --ok: #2e9e5b;
  --ok-soft: rgba(46, 158, 91, .14);
  --warn: #c78a1e;
  --warn-soft: rgba(199, 138, 30, .14);
  --danger: #c43a2e;
  --danger-soft: rgba(196, 58, 46, .12);
  --r-card: 16px;
  --r-ctl: 10px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #101223;
    --paper-2: #171a33;
    --wash: rgba(234, 235, 245, .09);
    --ink: #eaebf5;
    --ink-soft: #a6a8c4;
    --pine: #9d97f2;
    --pine-soft: #b6b1f6;
    --gold: #2dd4bf;
    --gold-soft: #14a897;
    --gold-deep: #0f8577;
    --coral: #f08a7a;
    --sky: #6faee8;
    --card: #181b36;
    --line: rgba(234, 235, 245, .14);
    --shadow: 0 20px 60px -20px rgba(0, 0, 0, .6);
    --shadow-soft: 0 14px 40px -24px rgba(0, 0, 0, .55);
    --deep: #37308f;
    --deep-2: #241f62;
    --deep-3: #2d2778;
    --on-deep: #eeeffa;
    --on-deep-soft: rgba(238, 239, 250, .75);
    --on-pine: #10122a;
    --on-gold: #04302a;
    --ok: #4cc07d;
    --ok-soft: rgba(76, 192, 125, .16);
    --warn: #e0a63e;
    --warn-soft: rgba(224, 166, 62, .16);
    --danger: #ef7466;
    --danger-soft: rgba(239, 116, 102, .14);
  }
}

html[data-bs-theme="dark"] {
  --paper: #101223;
  --paper-2: #171a33;
  --wash: rgba(234, 235, 245, .09);
  --ink: #eaebf5;
  --ink-soft: #a6a8c4;
  --pine: #9d97f2;
  --pine-soft: #b6b1f6;
  --gold: #2dd4bf;
  --gold-soft: #14a897;
  --gold-deep: #0f8577;
  --coral: #f08a7a;
  --sky: #6faee8;
  --card: #181b36;
  --line: rgba(234, 235, 245, .14);
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, .6);
  --shadow-soft: 0 14px 40px -24px rgba(0, 0, 0, .55);
  --deep: #37308f;
  --deep-2: #241f62;
  --deep-3: #2d2778;
  --on-deep: #eeeffa;
  --on-deep-soft: rgba(238, 239, 250, .75);
  --on-pine: #10122a;
  --on-gold: #04302a;
  --ok: #4cc07d;
  --ok-soft: rgba(76, 192, 125, .16);
  --warn: #e0a63e;
  --warn-soft: rgba(224, 166, 62, .16);
  --danger: #ef7466;
  --danger-soft: rgba(239, 116, 102, .14);
}

html[data-bs-theme="light"] {
  --paper: #f7f8fc;
  --paper-2: #edeffa;
  --wash: #edeffa;
  --ink: #191b2e;
  --ink-soft: #4e5170;
  --pine: #4038a8;
  --pine-soft: #5a51c8;
  --gold: #14b8a6;
  --gold-soft: #5eead4;
  --gold-deep: #0f8577;
  --coral: #e5604f;
  --sky: #3d87d8;
  --card: #ffffff;
  --line: rgba(25, 27, 46, .12);
  --shadow: 0 20px 60px -20px rgba(64, 56, 168, .25);
  --shadow-soft: 0 14px 40px -24px rgba(64, 56, 168, .3);
  --deep: #2b2570;
  --deep-2: #1c1850;
  --deep-3: #241f62;
  --on-deep: #eeeffa;
  --on-deep-soft: rgba(238, 239, 250, .78);
  --on-pine: #ffffff;
  --on-gold: #04302a;
  --ok: #2e9e5b;
  --ok-soft: rgba(46, 158, 91, .14);
  --warn: #c78a1e;
  --warn-soft: rgba(199, 138, 30, .14);
  --danger: #c43a2e;
  --danger-soft: rgba(196, 58, 46, .12);
}

/* ============ Base ============ */

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  margin: 0;
  padding: 1.4rem 1rem 2rem;
  padding-top: max(1.4rem, env(safe-area-inset-top));
  min-height: 100svh;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--pine); }

/* ============ Page background (site look) ============
   The marketing site's grid-paper texture and aurora glow, statically. The grid fades
   from the top the way the site's hero mask does; the glow is two radial gradients
   rather than the site's blurred animated blobs — same light, no filter and no
   animation loop, because this runs on the family's phones and iPads all lesson long. */

.ss-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.ss-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 44px 44px;
  opacity: .5;
  mask-image: radial-gradient(ellipse 130% 70% at 50% 0%, black 25%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 130% 70% at 50% 0%, black 25%, transparent 78%);
}
.ss-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 45% at 12% 4%, color-mix(in srgb, var(--pine) 14%, transparent), transparent 70%),
    radial-gradient(ellipse 50% 42% at 90% 96%, color-mix(in srgb, var(--gold) 12%, transparent), transparent 70%);
}

/* ============ Topbar ============
   The site nav reduced to what an app needs: the wordmark, in flow (not fixed — iOS
   owns scroll on these surfaces, and a one-screen app gains nothing from a blur bar). */

.ss-topbar {
  max-width: 640px;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
}

/* Brand wordmark: serif "Smart" in ink, "Suli" in the teal accent. */
.ss-brand { font-family: var(--serif); font-weight: 700; font-size: 1.15rem; letter-spacing: -.01em; color: var(--ink); text-decoration: none; }
.ss-brand em { font-style: normal; color: var(--gold-deep); }
html[data-bs-theme="dark"] .ss-brand em { color: var(--gold); }

.ss-topbar .ss-brand { display: inline-flex; align-items: center; gap: .55rem; font-size: 1.3rem; }
.ss-brand-mark { width: 28px; height: 28px; object-fit: contain; display: block; flex: none; }

/* ============ Page head ============
   Greeting-level serif title above the cards, the portal's cut of the site hero:
   kicker pill, serif h1, optional pine-to-gold accent span on the emotional word. */

.ss-page-head { max-width: 420px; margin: 0 auto 1.3rem; }
.ss-page-head--wide { max-width: 640px; }
.ss-page-head h1 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -.01em;
  font-size: clamp(1.7rem, 6vw, 2.2rem);
  line-height: 1.15;
  margin: .55rem 0 .2rem;
}
.ss-page-head .ss-lede { margin: 0; }

.ss-lede { color: var(--ink-soft); font-size: .95rem; }

.ss-accent {
  background: linear-gradient(100deg, var(--pine) 20%, var(--gold) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.ss-kicker {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin: 0;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--pine);
  background: color-mix(in srgb, var(--pine) 9%, transparent);
  border: 1px solid color-mix(in srgb, var(--pine) 24%, transparent);
  padding: .3rem .85rem;
  border-radius: 999px;
}
.ss-kicker-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  animation: ss-kicker-pulse 2s ease-in-out infinite;
}
@keyframes ss-kicker-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.55); opacity: .55; }
}

/* ============ Card ============ */

.ss-portal-card {
  max-width: 420px;
  margin: 0 auto 1.1rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 1.5rem 1.4rem;
  box-shadow: var(--shadow-soft);
}

/* The serif is reserved for greeting-level moments; card titles are one of them. */
.ss-portal-card h1 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.01em;
  font-size: 1.3rem;
  margin: 0 0 1rem;
}
.ss-portal-card h1:has(+ .ss-lede) { margin-bottom: .3rem; }
.ss-portal-card > .ss-lede { display: block; margin: 0 0 1.2rem; font-size: .92rem; }

/* Hero card (login, standalone messages): the site pillar's pine-to-gold top bar,
   always on — these cards are alone on their page, so the accent has room to speak. */
.ss-portal-card--hero { position: relative; overflow: hidden; }
.ss-portal-card--hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--pine), var(--gold));
}

/* ============ Buttons ============
   Base is the quiet ghost button (logout, secondary actions). Pages opt into the
   louder variants: --primary (main action), --accent (join/submit hero moments),
   --danger (revoke and other destructive actions, always with a confirm step).
   Pill radius and the primary's pine shadow come from the site's .btn. */

.ss-portal-btn {
  display: block;
  width: 100%;
  padding: 0.78rem 1.2rem;
  text-align: center;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  box-sizing: border-box;
  transition: transform .25s cubic-bezier(.3, 1.4, .5, 1), box-shadow .25s, background .25s;
}
.ss-portal-btn:hover { background: var(--wash); transform: translateY(-1px); }
.ss-portal-btn:active { transform: translateY(0); }

.ss-portal-btn--primary {
  background: var(--pine);
  border-color: var(--pine);
  color: var(--on-pine);
  box-shadow: 0 10px 24px -10px color-mix(in srgb, var(--pine) 55%, transparent);
}
.ss-portal-btn--primary:hover {
  background: var(--pine-soft);
  border-color: var(--pine-soft);
  box-shadow: 0 14px 30px -12px color-mix(in srgb, var(--pine) 60%, transparent);
}

/* --on-gold (deep green-black) rather than white: white on the teal gradient sits near
   1.9:1, which fails badly for button text; --on-gold is exactly the token for this. */
.ss-portal-btn--accent { background: linear-gradient(120deg, var(--gold), var(--gold-deep)); border-color: transparent; color: var(--on-gold); }
.ss-portal-btn--accent:hover { background: linear-gradient(120deg, var(--gold-soft), var(--gold)); }

.ss-portal-btn--danger { background: transparent; border-color: currentColor; color: var(--danger); }
.ss-portal-btn--danger:hover { background: var(--danger-soft); }

.ss-portal-btn:focus-visible,
.ss-portal-input:focus-visible,
.ss-portal-card select:focus-visible {
  outline: 2px solid var(--pine);
  outline-offset: 2px;
}

/* ============ Form fields ============ */

.ss-portal-card label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.ss-portal-card input[type="email"],
.ss-portal-card input[type="text"],
.ss-portal-card select,
.ss-portal-card textarea {
  display: block;
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: var(--r-ctl);
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  box-sizing: border-box;
  font-family: var(--sans);
  font-size: 1rem;
  margin-bottom: 0.5rem;
  transition: border-color .25s, box-shadow .25s;
}

/* The site contact form's focus treatment: pine border + soft pine ring. */
.ss-portal-card input[type="email"]:focus,
.ss-portal-card input[type="text"]:focus,
.ss-portal-card select:focus,
.ss-portal-card textarea:focus {
  outline: none;
  border-color: var(--pine);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--pine) 18%, transparent);
}

.ss-portal-hint { font-size: 0.8rem; color: var(--ink-soft); margin-top: 0.35rem; }

/* "vagy" separator between sign-in methods */
.ss-portal-divider {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--ink-soft);
  font-size: 0.8rem;
  margin: 1rem 0;
  text-align: center;
}
.ss-portal-divider::before,
.ss-portal-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* One-time links handed from parent to child (device linking) */
.ss-portal-linkbox {
  font-family: var(--mono);
  font-size: 0.75rem;
  word-break: break-all;
  background: var(--wash);
  border: 1px dashed var(--line);
  border-radius: var(--r-ctl);
  padding: 0.7rem 0.8rem;
  color: var(--pine);
  margin: 0.5rem 0;
}

/* ============ Status pills ============
   Status is always color + word, never color alone; soft fills so they whisper. */

.ss-pill {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.16rem 0.55rem;
  border-radius: 999px;
  vertical-align: middle;
}
.ss-pill--ok { background: var(--ok-soft); color: var(--ok); }
.ss-pill--warn { background: var(--warn-soft); color: var(--warn); }
.ss-pill--info { background: var(--wash); color: var(--pine); }
.ss-pill--muted { background: var(--wash); color: var(--ink-soft); }
.ss-pill--danger { background: var(--danger-soft); color: var(--danger); }

/* ============ Divided list item ============
   A plain record row with no navigation — a device entry, an audit-style line — just a
   divider and spacing. Distinct from .ss-row (a tappable link with an icon square) and from
   .ss-child (a per-student digest section with its own heading rules). */

.ss-list-item { border-top: 1px solid var(--line); padding: 0.75rem 0; }
.ss-list-item:first-of-type { border-top: 0; padding-top: 0; }
.ss-list-item p { margin: 0; }

/* ============ List rows ============
   Tappable rows inside a card: subject-initial square, title + meta, whole row is
   the target. Indigo initial for answer sheets, teal for practice artifacts. */

.ss-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 0;
  border-top: 1px solid var(--line);
}
.ss-row:first-of-type { border-top: 0; }

.ss-row-ic {
  /* Top-aligned rather than centred: a long title or a wrapped meta line makes the row two
     or three lines tall, and a vertically centred square drifts away from the title it labels. */
  align-self: flex-start;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  background: var(--wash);
  color: var(--pine);
}
.ss-row-ic--teal { color: var(--gold-deep); }
html[data-bs-theme="dark"] .ss-row-ic--teal { color: var(--gold); }

.ss-row-main { flex: 1; min-width: 0; }
.ss-row-main b { font-size: 0.92rem; font-weight: 600; display: block; line-height: 1.3; }

/* The meta line carries pills, so it must not be a descendant-type selector like
   `.ss-row-main span` — that would out-specify .ss-pill--* and repaint every pill. */
.ss-row-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.15rem;
  font-size: 0.78rem;
  color: var(--ink-soft);
}

/* A row that is a submit button rather than a link (student-chosen practice: opening a block
   writes an attempt, so it must be a POST). Strips the button chrome so it reads identically to
   the link rows beside it, and stretches full width since each one lives in its own <form>. */
button.ss-row {
  width: 100%;
  background: none;
  border: 0;
  border-top: 1px solid var(--line);
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
form:first-of-type button.ss-row { border-top: 0; }

/* The trailing call to action on a practice row — "Kezdés" / "Folytatom" / "Megnézem". Carries the
   verb the chevron on a link row only implies, because these rows do different things. */
.ss-row-action {
  flex: none;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--pine);
  white-space: nowrap;
}

/* Timed-exam caution line under a row's meta. A block, not a pill, because it is a sentence the
   student has to actually read before starting — pills are scannable, this is not meant to be. */
.ss-row-warn {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--warn);
}

.ss-row-chev { color: var(--ink-soft); font-size: 1.1rem; line-height: 1; }

/* Whole row as the tap target. The inset keeps the hover wash from hugging the text
   while the border-top still spans the card's full content width. */
a.ss-row {
  color: inherit;
  text-decoration: none;
  margin-inline: -0.5rem;
  padding-inline: 0.5rem;
  border-radius: var(--r-ctl);
}
a.ss-row:hover { background: var(--wash); }
a.ss-row:focus-visible { outline: 2px solid var(--pine); outline-offset: -2px; }

/* Card section label (sans caps), distinct from the serif card title */
.ss-card-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 0.6rem;
}

/* Back navigation at a card's foot: the arrow spells out what the bare "Vissza"
   word used to imply. */
.ss-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--pine);
  text-decoration: none;
}
.ss-back:hover { text-decoration: underline; }

/* ============ Live lesson band ============
   The join affordance on the child home (Phase A4 slice 4) and the single loud surface in
   the whole family UI: everything else is quiet cards, so "the lesson has started" needs no
   exclamation color to carry. Same deep-band language as the marketing site's dark sections,
   including the corner glow the site's .engine band wears. */

.ss-live {
  max-width: 420px;
  margin: 0 auto 1.1rem;
  padding: 1.15rem 1.1rem 1.2rem;
  border-radius: var(--r-card);
  background: linear-gradient(135deg, var(--deep) 0%, var(--deep-2) 60%, var(--deep-3) 100%);
  color: var(--on-deep);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.ss-live::after {
  content: "";
  position: absolute;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  top: -110px;
  right: -70px;
  background: radial-gradient(circle, color-mix(in srgb, var(--on-deep-accent) 28%, transparent), transparent 65%);
  pointer-events: none;
}
.ss-live > * { position: relative; }

.ss-live-tag {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.5rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--on-deep-accent);
}

.ss-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--on-deep-accent);
  animation: ss-live-pulse 1.6s ease-in-out infinite;
}

@keyframes ss-live-pulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--on-deep-accent-pulse); }
  60% { box-shadow: 0 0 0 8px transparent; }
}

.ss-live h2 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.01em;
  font-size: 1.35rem;
  margin: 0 0 0.15rem;
  color: var(--on-deep);
}

.ss-live-sub { margin: 0 0 0.9rem; font-size: 0.87rem; color: var(--on-deep-soft); }

/* ============ Parent home digest (Phase A6) ============
   The parent home / lessons / billing pages carry per-child digest content that does not
   fit the 420px sign-in card. Originally these lived as hardcoded-color rules inline in
   _PortalLayout; moved here and tokenized when the layout became a thin family.css shell.
   Widths and spacing unchanged from the A6 originals. */

.ss-portal-card--wide { max-width: 640px; }

.ss-child {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
  margin-top: 1rem;
}
.ss-child:first-of-type {
  border-top: 0;
  padding-top: 0;
  margin-top: 0;
}
.ss-child h2 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.01em; font-size: 1.15rem; margin: 0 0 0.25rem; }
.ss-child h3 { font-size: 0.95rem; margin: 1rem 0 0.35rem; }

.ss-month { color: var(--ink-soft); font-size: 0.9rem; margin: 0 0 0.75rem; }
.ss-muted { color: var(--ink-soft); font-size: 0.9rem; }

.ss-lessons { list-style: none; padding: 0; margin: 0 0 1rem; }
.ss-lessons li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: baseline;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--line);
}
.ss-lesson-when { font-variant-numeric: tabular-nums; }
.ss-lesson-coverage { flex-basis: 100%; width: fit-content; font-size: .8rem; font-weight: 650; color: var(--ink-soft); }
.ss-lesson-coverage--covered, .ss-lesson-coverage--no-charge { color: var(--gold-deep); }
.ss-lesson-coverage--partial, .ss-lesson-coverage--outstanding { color: var(--pine); }
html[data-bs-theme="dark"] .ss-lesson-coverage--covered, html[data-bs-theme="dark"] .ss-lesson-coverage--no-charge { color: var(--gold); }
.ss-lesson-status { margin-left: auto; font-size: 0.85rem; color: var(--ink-soft); }

.ss-notice {
  background: var(--wash);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--r-ctl) var(--r-ctl) 0;
  padding: 0.6rem 0.75rem;
  font-size: 0.9rem;
  margin: 0 0 1rem;
}

/* ============ Entrance ============
   The site's staged .stagger rise, cut to one gentle pass over the page's top few
   blocks. Inside the no-preference query rather than cancelled after the fact, so
   reduced-motion users never get the keyframes at all. */

@media (prefers-reduced-motion: no-preference) {
  .ss-main > * { animation: ss-rise .55s cubic-bezier(.2, .8, .2, 1) both; }
  .ss-main > *:nth-child(2) { animation-delay: .07s; }
  .ss-main > *:nth-child(3) { animation-delay: .14s; }
  .ss-main > *:nth-child(n+4) { animation-delay: .21s; }
}
@keyframes ss-rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .ss-live-dot, .ss-kicker-dot { animation: none; }
  .ss-portal-btn, .ss-portal-btn:hover { transform: none; transition: none; }
}

/* ============ Portal hub dashboard ============
   The family hub in the admin home's dashboard anatomy — glass cards on a 12-column
   grid with per-card spans, a 4px gradient bar on top of each card, a circled arrow
   chip, three-figure stat rows with hairline dividers, and a hero welcome band with
   the brand watermark. The admin home hardcodes its light palette; this port speaks
   only tokens, so both themes come free and the two surfaces stay one product. */

.ss-hub { max-width: 1160px; margin: 0 auto; }

.ss-hub-glass {
  position: relative;
  overflow: hidden;
  background: color-mix(in srgb, var(--card) 74%, transparent);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
}

/* ── Hero row: welcome band + brand card ── */

.ss-hub-hero-row {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}
.ss-hub-welcome {
  grid-column: span 8;
  min-height: 210px;
  display: flex;
  align-items: center;
  padding: clamp(1.6rem, 4vw, 2.6rem);
  isolation: isolate;
}
.ss-hub-welcome::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 8% 14%, color-mix(in srgb, var(--gold) 16%, transparent), transparent 34%),
    radial-gradient(circle at 92% 84%, color-mix(in srgb, var(--pine) 16%, transparent), transparent 38%);
}
.ss-hub-watermark {
  position: absolute;
  right: clamp(-3rem, -2vw, -1rem);
  bottom: clamp(-3rem, -4vw, -1.5rem);
  width: min(34%, 200px);
  opacity: .08;
  transform: rotate(-7deg);
  pointer-events: none;
  user-select: none;
}
.ss-hub-kicker {
  display: block;
  color: var(--pine);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.ss-hub-welcome h1 {
  margin: .55rem 0 .55rem;
  font-family: var(--serif);
  font-size: clamp(1.9rem, 4.4vw, 3rem);
  font-weight: 600;
  letter-spacing: -.03em;
  line-height: 1.02;
}
.ss-hub-welcome p { max-width: 44ch; margin: 0; color: var(--ink-soft); font-size: .98rem; }

.ss-hub-brand {
  grid-column: span 4;
  min-height: 210px;
  display: grid;
  place-items: center;
  padding: 1.3rem;
}
.ss-hub-brand-frame {
  width: min(64%, 170px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  /* Deliberately white in both themes: the wordmark is dark ink, and the admin home's
     brand card stays a white plate in dark mode too. */
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
}
.ss-hub-brand-frame img { width: 62%; height: 82%; object-fit: contain; }

/* ── Card grid ── */

.ss-hub-child { margin: 0 0 1.4rem; }
.ss-hub-child > h2 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -.01em;
  font-size: 1.35rem;
  margin: .3rem 0 .8rem;
}

.ss-hub-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1rem;
}

.ss-hub-card {
  min-height: 208px;
  display: flex;
  flex-direction: column;
  padding: clamp(1.15rem, 2.4vw, 1.6rem);
  color: inherit;
  text-decoration: none;
}
.ss-hub-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--hub-bar, linear-gradient(90deg, var(--pine), var(--gold)));
}
a.ss-hub-card {
  transition:
    transform .2s cubic-bezier(.16, 1, .3, 1),
    box-shadow .2s cubic-bezier(.16, 1, .3, 1),
    border-color .2s cubic-bezier(.16, 1, .3, 1);
}
a.ss-hub-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: color-mix(in srgb, var(--pine) 35%, var(--line));
  color: inherit;
}
a.ss-hub-card:focus-visible { outline: 3px solid color-mix(in srgb, var(--pine) 34%, transparent); outline-offset: 3px; }

.ss-hub-card--work    { grid-column: span 6; --hub-bar: linear-gradient(90deg, var(--coral), var(--sky)); }
.ss-hub-card--results { grid-column: span 6; --hub-bar: linear-gradient(90deg, var(--gold-deep), var(--gold)); }
.ss-hub-card--next    { grid-column: span 4; --hub-bar: linear-gradient(90deg, var(--pine), var(--pine-soft)); }
.ss-hub-card--roadmap { grid-column: span 5; --hub-bar: linear-gradient(90deg, var(--sky), var(--gold)); }
.ss-map-card { gap: 1rem; background: radial-gradient(ellipse at top right, color-mix(in srgb, var(--pine) 9%, transparent), transparent 65%), var(--card); }
.ss-map-card__copy h3 { margin: .55rem 0 .4rem; font-size: clamp(1.35rem, 2vw, 1.65rem); letter-spacing: -.035em; }
.ss-map-card__copy p { margin: 0; max-width: 34ch; color: var(--ink-soft); font-size: .88rem; }
.ss-map-card__tree { width: 100%; height: 72px; margin: .15rem 0; overflow: visible; }
.ss-map-card__tree > path:first-child { fill: none; stroke: color-mix(in srgb, var(--pine) 40%, var(--line)); stroke-width: 2; }
.ss-map-card__node { fill: var(--paper); stroke: var(--line); stroke-width: 1.5; }
.ss-map-card__node--covered { fill: color-mix(in srgb, #16a995 17%, var(--card)); stroke: #16a995; }
.ss-map-card__node--current { fill: color-mix(in srgb, #7661d3 17%, var(--card)); stroke: #7661d3; }
.ss-map-card__check { fill: none; stroke: #16a995; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.ss-map-card__pin { fill: #7661d3; }
.ss-map-card__legend { display: flex; flex-wrap: wrap; gap: .55rem 1rem; font-size: .7rem; color: var(--ink-soft); }
.ss-map-card__legend > span { display: inline-flex; align-items: center; gap: .35rem; }
.ss-map-card__dot { width: 7px; height: 7px; border-radius: 50%; background: #9294a8; }
.ss-map-card__dot--covered { background: #16a995; }.ss-map-card__dot--current { background: #7661d3; }
.ss-map-card__footer { display: flex; justify-content: space-between; flex-wrap: wrap; align-items: center; gap: .5rem; padding-top: .9rem; border-top: 1px solid var(--line); margin-top: auto; font-size: .75rem; color: var(--ink-soft); }
.ss-map-card__footer strong { display: inline-flex; gap: .7rem; align-items: center; color: var(--pine); font-size: .85rem; }
.ss-hub-card--guides  { grid-column: span 3; --hub-bar: linear-gradient(90deg, var(--gold), var(--pine)); }
.ss-hub-card--digest  { grid-column: span 7; --hub-bar: linear-gradient(90deg, var(--pine), var(--gold)); }
.ss-hub-card--digest-wide { grid-column: span 12; }
.ss-hub-card--profile { grid-column: span 5; --hub-bar: linear-gradient(90deg, var(--pine-soft), var(--coral)); }

/* The evaluation/roadmap document, the family's own copy of what was written about the student.
   Full width and first in the grid: it is the one card on this page that is about the student
   rather than about the schedule, and a self student had no route to it at all before. min-height
   off so a one-line banner does not stand as tall as a stat card. */
.ss-hub-card--report { grid-column: span 12; min-height: 0; --hub-bar: linear-gradient(90deg, var(--coral), var(--gold)); }
.ss-hub-card--account { grid-column: span 6; min-height: 150px; --hub-bar: linear-gradient(90deg, var(--ink-soft), var(--line)); }

/* Child-home list cards: the task list keeps its full linked rows, so it gets the wide
   column; the two file shelves split a row. min-height off — these grow with their rows. */
.ss-hub-card--tasks { grid-column: span 8; min-height: 0; --hub-bar: linear-gradient(90deg, var(--pine), var(--gold)); }
.ss-hub-card--files { grid-column: span 6; min-height: 0; --hub-bar: linear-gradient(90deg, var(--gold-deep), var(--sky)); }
.ss-hub-card .ss-row { margin-top: .55rem; }

/* Family → teacher direction: the upload card, and its full-width child-home banner form. */
.ss-hub-card--uploads { grid-column: span 6; --hub-bar: linear-gradient(90deg, var(--sky), var(--pine)); }
.ss-hub-card--uploads-wide { grid-column: span 12; min-height: 0; --hub-bar: linear-gradient(90deg, var(--sky), var(--pine)); }

/* The one paid add-on card. The gold-to-coral bar and the gold pill mark it as an extra;
   the pill's ink is --on-gold, which both themes keep readable on the teal-gold fill. */
.ss-hub-card--extra { grid-column: span 6; --hub-bar: linear-gradient(90deg, var(--gold), var(--coral)); }
.ss-hub-pill-extra {
  display: inline-block;
  align-self: flex-start;
  padding: .18rem .6rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--on-gold);
  background: var(--gold);
}

.ss-hub-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
.ss-hub-card-eyebrow {
  display: block;
  color: var(--pine);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .12em;
  line-height: 1.3;
  text-transform: uppercase;
}
.ss-hub-card-heading h3 {
  margin: .3rem 0 0;
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.2;
}
.ss-hub-card-arrow {
  width: 2.1rem;
  height: 2.1rem;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--pine);
  background: color-mix(in srgb, var(--pine) 11%, transparent);
  border-radius: 50%;
  font-size: 1rem;
  transition: transform .2s cubic-bezier(.16, 1, .3, 1);
}
a.ss-hub-card:hover .ss-hub-card-arrow { transform: translate(2px, -2px); }

.ss-hub-stat-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: auto 0;
  padding: 1rem 0;
}
.ss-hub-stat {
  position: relative;
  min-width: 0;
  padding: 0 .8rem;
  text-align: center;
}
.ss-hub-stat:first-child { padding-left: 0; }
.ss-hub-stat:last-child { padding-right: 0; }
.ss-hub-stat:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 10%;
  right: 0;
  width: 1px;
  height: 80%;
  background: var(--line);
}
.ss-hub-stat strong {
  display: block;
  overflow: hidden;
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3vw, 2.3rem);
  font-weight: 600;
  letter-spacing: -.03em;
  line-height: 1;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.ss-hub-stat span {
  display: block;
  margin-top: .45rem;
  color: var(--ink-soft);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.ss-hub-card-body { margin: .8rem 0 0; font-size: .9rem; color: var(--ink-soft); }
.ss-hub-card-body b { color: var(--ink); font-weight: 600; }
.ss-hub-card-list {
  list-style: none;
  margin: .6rem 0 0;
  padding: 0;
  display: grid;
  gap: .3rem;
  font-size: .88rem;
}
.ss-hub-card-list b { font-weight: 600; }

/* The next-lesson card centers its one fact, like the admin's next-lesson card. */
.ss-hub-next {
  margin: auto 0;
  padding: .8rem 0;
  text-align: center;
}
.ss-hub-next time {
  display: block;
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.15;
}
.ss-hub-next p { margin: .35rem 0 0; color: var(--ink-soft); font-size: .9rem; }
.ss-hub-next-empty {
  margin: auto 0;
  text-align: center;
  color: var(--ink-soft);
}
.ss-hub-next-empty span { display: block; font-size: 1.5rem; margin-bottom: .3rem; }
.ss-hub-next-empty h4 { margin: 0; font-family: var(--serif); font-size: 1.15rem; color: var(--ink); }
.ss-hub-next-empty p { margin: .25rem 0 0; font-size: .85rem; }

/* Nav cards (roadmap, profile): an icon orb beside the pitch. */
.ss-hub-nav-content {
  display: flex;
  align-items: center;
  gap: .9rem;
  margin: auto 0;
  padding: .8rem 0;
}
.ss-hub-nav-icon {
  width: 3rem;
  height: 3rem;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  color: var(--pine);
  background: color-mix(in srgb, var(--pine) 11%, transparent);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.ss-hub-nav-content h3 { margin: 0 0 .2rem; font-size: 1.12rem; font-weight: 700; letter-spacing: -.02em; }
.ss-hub-nav-content p { margin: 0; color: var(--ink-soft); font-size: .88rem; }

/* Count cards (study guides): one big figure, like the admin's hand-in card. */
.ss-hub-count {
  margin: auto 0 0;
  padding: .8rem 0 0;
}
.ss-hub-count strong {
  display: block;
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 600;
  letter-spacing: -.03em;
  line-height: 1;
}
.ss-hub-count span { display: block; margin-top: .35rem; color: var(--ink-soft); font-size: .88rem; }

.ss-hub-card-foot {
  margin-top: auto;
  padding-top: .8rem;
  font-size: .85rem;
  font-weight: 600;
  color: var(--pine);
}

.ss-hub-account-grid { margin-top: .2rem; }

.ss-hub-logout { max-width: 320px; margin: 1.6rem auto 0; }

/* ── Responsive: two columns, then one ── */

@media (max-width: 900px) {
  .ss-hub-welcome { grid-column: span 12; }
  .ss-hub-brand { display: none; }
  .ss-hub-card--work, .ss-hub-card--results,
  .ss-hub-card--next, .ss-hub-card--roadmap, .ss-hub-card--guides,
  .ss-hub-card--digest, .ss-hub-card--profile,
  .ss-hub-card--tasks, .ss-hub-card--files,
  .ss-hub-card--uploads, .ss-hub-card--extra { grid-column: span 6; }
  .ss-hub-card--tasks { grid-column: span 12; }
}
@media (max-width: 620px) {
  .ss-hub-card--work, .ss-hub-card--results,
  .ss-hub-card--next, .ss-hub-card--roadmap, .ss-hub-card--guides,
  .ss-hub-card--digest, .ss-hub-card--profile, .ss-hub-card--account,
  .ss-hub-card--tasks, .ss-hub-card--files,
  .ss-hub-card--uploads, .ss-hub-card--extra { grid-column: span 12; }
  .ss-hub-card { min-height: 0; }
}

@media (prefers-reduced-motion: reduce) {
  a.ss-hub-card, a.ss-hub-card:hover { transform: none; transition: none; }
  .ss-hub-card-arrow, a.ss-hub-card:hover .ss-hub-card-arrow { transform: none; transition: none; }
}

/* Lesson pricing and the shared family prepayment account. */
.ss-account-summary {
  margin: 1.5rem 0;
  padding: clamp(1rem, 3vw, 1.5rem);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--wash);
}
.ss-account-summary h2 { margin-top: 0; }
.ss-lesson-balance__figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 1rem; }
.ss-lesson-balance__figures p { margin: 0; min-width: 0; }
.ss-lesson-balance__figures strong { display: block; font-size: clamp(1.5rem, 4vw, 2rem); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ss-lesson-balance__figures span { color: var(--ink-soft); }
.ss-account-summary dl {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .65rem 1rem;
}
.ss-account-summary dt { color: var(--ink-soft); }
.ss-account-summary dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.ss-account-summary summary { cursor: pointer; padding: .5rem 0; }
.ss-account-month { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem; margin: 1.25rem 0; }
.ss-account-month input, .ss-account-month button {
  font: inherit; padding: .65rem .85rem; border-radius: var(--r-ctl);
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
}
.ss-account-month button { background: var(--pine); color: var(--on-pine); cursor: pointer; }
@media (max-width: 420px) {
  .ss-account-summary dl { grid-template-columns: 1fr; gap: .25rem; }
  .ss-account-summary dd { text-align: left; margin-bottom: .7rem; }
}

/* Every currently available lesson surface gets its own named join tile. */
.ss-live-resources { margin: 1rem 0 1.5rem; }
.ss-live-resources-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.ss-live-resources-heading h3 { margin: 0; }
.ss-live-resources-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 1rem; }
.ss-live-resource { display: flex; flex-direction: column; gap: .85rem; padding: 1.4rem; border: 2px solid #67e8d4; border-radius: 1.2rem; background: linear-gradient(135deg, #24265b, #123c4b); color: #fff; text-decoration: none; box-shadow: 0 0 22px #34d39955; }
.ss-live-resource strong { font-size: 1.2rem; overflow-wrap: anywhere; }
.ss-live-resource:hover { color: #fff; box-shadow: 0 0 28px #34d39988; }
.ss-live-resource:focus-visible { outline: 3px solid #fbbf24; outline-offset: 4px; }
.ss-live-resource .ss-live-tag { color: #b5ffed; margin: 0; }
.ss-live-resources-heading h3 { white-space: nowrap; }
.ss-live-resources-heading .ss-portal-btn { width: auto; flex: 0 0 auto; }

/* Homework leads the portal home; use the same semantic palette in both themes. */
.ss-home-intro { margin-bottom: 1.4rem; }
.ss-home-intro h1 { margin: .4rem 0 0; font-family: var(--serif); font-size: clamp(1.8rem, 4vw, 2.5rem); line-height: 1.15; }
.ss-hub-card.ss-homework { grid-column: 1 / -1; min-height: 0; padding: clamp(1.4rem, 3vw, 2.2rem); --hub-bar: var(--pine); background: linear-gradient(120deg, color-mix(in srgb, var(--pine) 7%, var(--card)), var(--card)); }
.ss-homework-heading h2 { margin: .4rem 0; font-family: var(--serif); font-size: clamp(1.6rem, 3vw, 2rem); line-height: 1.15; }
.ss-homework-heading p { margin: 0; color: var(--ink-soft); }
.ss-homework-body { display: grid; grid-template-columns: minmax(140px, 1fr) minmax(0, 3fr); gap: 2rem; margin: 1.5rem 0; }
.ss-homework-count { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: .5rem; }
.ss-homework-count strong { font-size: clamp(3rem, 6vw, 4.5rem); line-height: 1; letter-spacing: -.05em; color: var(--pine); }
.ss-homework-count span { color: var(--ink-soft); font-size: .9rem; }
.ss-homework-queue { min-width: 0; }
.ss-homework-queue ul { list-style: none; margin: 0; padding: 0; }
.ss-homework-queue li { display: flex; gap: .85rem; padding: .85rem 0; border-bottom: 1px solid var(--line); }
.ss-homework-queue li:last-child { border-bottom: 0; }
.ss-homework-queue b { overflow-wrap: anywhere; }
.ss-homework-check { display: grid; place-items: center; flex: 0 0 2rem; height: 2rem; border-radius: .65rem; background: color-mix(in srgb, var(--pine) 12%, transparent); color: var(--pine); }
.ss-homework-due { display: block; margin-top: .3rem; color: var(--ink-soft); font-size: .85rem; }
.ss-homework-empty { margin: 0; padding: 1rem 0; }
.ss-homework-empty span { display: block; margin-top: .4rem; color: var(--ink-soft); }
.ss-homework-activity { display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; margin-bottom: 1.2rem; padding-top: 1rem; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: .85rem; }
.ss-homework-activity b { color: var(--ink); }
.ss-homework-action { display: inline-flex; align-self: flex-start; align-items: center; justify-content: center; min-height: 44px; padding: .7rem 1.1rem; border-radius: var(--r-ctl); color: var(--on-pine); background: var(--pine); font-weight: 700; text-decoration: none; }
a.ss-homework-action:hover { color: var(--on-pine); filter: brightness(1.08); }
a.ss-homework-action:focus-visible { outline: 3px solid var(--pine); outline-offset: 4px; }
.ss-home-live { grid-column: 1 / -1; }
.ss-home-live:has(> [hidden]), .ss-live-resources[hidden] { display: none; }
@media (max-width: 620px) {
  .ss-homework-body { grid-template-columns: 1fr; gap: 1rem; }
  .ss-homework-count { flex-direction: row; align-items: center; gap: 1rem; }
  .ss-homework-action { align-self: stretch; text-align: center; }
}

/* One home card connects the latest published score with reports and learning progress. */
.ss-hub-card--feedback { grid-column: span 8; --hub-bar: linear-gradient(90deg, var(--coral), var(--pine)); }
.ss-feedback-score { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 1rem 0 .5rem; max-width: 440px; }
.ss-feedback-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; margin-top: auto; padding-top: 1.2rem; }
.ss-feedback-link { display: flex; flex-direction: column; justify-content: center; min-height: 44px; gap: .35rem; padding: .9rem 1rem; border: 1px solid var(--line); border-radius: var(--r-ctl); color: var(--ink); text-decoration: none; background: color-mix(in srgb, var(--pine) 5%, var(--card)); }
.ss-feedback-link strong { color: var(--pine); overflow-wrap: anywhere; }
.ss-feedback-link > span { color: var(--ink-soft); font-size: .85rem; }
.ss-feedback-link:hover { border-color: var(--pine); color: var(--ink); }
.ss-feedback-link:focus-visible { outline: 3px solid var(--pine); outline-offset: 3px; }
@media (max-width: 900px) { .ss-hub-card--feedback { grid-column: 1 / -1; } }
@media (max-width: 620px) { .ss-feedback-links { grid-template-columns: 1fr; } }
