/* Thinkori homepage redesign — builds on the existing Pop Quiz / Blackboard tokens. */

:root {
  --home-dark: #111114;
  --home-dark-ink: #f7f7f8;
  --home-dark-muted: #c8c8d0;
  --home-panel-tint: color-mix(in srgb, var(--surface) 88%, var(--surface-2));
}

[data-theme="blackboard"] {
  --home-dark: #08080a;
  --home-dark-ink: #f7f7f8;
  --home-dark-muted: #b9b9c3;
  --home-panel-tint: var(--surface);
}

.home-redesign .section {
  position: relative;
}

.home-redesign .section-kicker {
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-3);
}

/* Hero ------------------------------------------------------------------- */

.home-hero {
  padding-block: clamp(3rem, 7vw, 5.5rem);
}

.home-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(24rem, 1.05fr);
  gap: clamp(2rem, 6vw, 5.5rem);
  align-items: center;
}

.home-hero-copy {
  max-width: 38rem;
}

.home-hero h1 {
  font-size: clamp(2.8rem, 1.75rem + 4vw, 5rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
  margin-bottom: var(--space-5);
}

.home-hero h1 .mark {
  display: inline-block;
  background: var(--highlight);
  color: var(--on-highlight);
  padding: 0.04em 0.13em 0.08em;
  border: var(--border-w) solid var(--line);
  border-radius: 0.16em;
  box-shadow: 4px 4px 0 var(--line);
  rotate: -1deg;
}

.home-hero .hero-lede {
  max-width: 35rem;
  font-size: clamp(1.05rem, 0.98rem + 0.35vw, 1.25rem);
}

.home-hero .hero-note {
  font-weight: 600;
}

.home-progress-card {
  position: relative;
  background: var(--surface);
  border: var(--border-w) solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 10px 10px 0 var(--line);
  overflow: hidden;
  transform: rotate(0.45deg);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.home-progress-card:hover,
.home-progress-card:focus-within {
  transform: rotate(0deg) translateY(-4px);
  box-shadow: 13px 13px 0 var(--line);
}

.home-progress-card::after {
  content: "";
  position: absolute;
  width: 4.4rem;
  height: 1.45rem;
  right: 1.2rem;
  top: -0.35rem;
  background: color-mix(in srgb, var(--highlight) 72%, transparent);
  border: 1px solid color-mix(in srgb, var(--line) 45%, transparent);
  rotate: 5deg;
  pointer-events: none;
}

.home-progress-head {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  align-items: center;
  padding: var(--space-4) var(--space-5);
  border-bottom: var(--border-w) solid var(--line);
  background: var(--home-panel-tint);
}

.home-progress-head strong {
  font-family: var(--font-display);
  font-size: var(--fs-md);
}

.home-progress-head span {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--muted);
}

.home-progress-body {
  padding: var(--space-3) var(--space-5) var(--space-5);
}

.home-progress-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-3);
  align-items: center;
  padding-block: var(--space-3);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 18%, transparent);
}

.home-progress-row:last-of-type {
  border-bottom: 0;
}

.home-progress-topic {
  min-width: 0;
}

.home-progress-topic strong {
  display: block;
  font-family: var(--font-display);
  font-size: var(--fs-base);
  margin-bottom: 0.45rem;
}

.home-meter {
  height: 0.5rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}

.home-meter > span {
  display: block;
  width: 50%;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transform-origin: left;
  scale: 0 1;
  transition: scale 850ms cubic-bezier(.2,.75,.2,1);
}

.home-meter--42 > span { width: 42%; }
.home-meter--78 > span { width: 78%; }
.home-meter--88 > span { width: 88%; }

.reveal.in .home-meter > span,
.home-progress-card:focus-within .home-meter > span {
  scale: 1 1;
}

.home-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  font-weight: 700;
  white-space: nowrap;
}

.home-status--good {
  background: var(--good-bg);
  color: var(--good-ink);
}

.home-status--open {
  background: var(--surface-2);
  color: var(--muted);
}

.home-next {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  align-items: center;
  padding: var(--space-4);
  margin-top: var(--space-3);
  border: var(--border-w) solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface-2) 65%, var(--surface));
}

.home-next strong,
.home-next span {
  display: block;
}

.home-next strong {
  font-family: var(--font-display);
}

.home-next span {
  color: var(--muted);
  font-size: var(--fs-sm);
}

.home-next-icon {
  width: 2.5rem;
  height: 2.5rem;
  border: var(--border-w) solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--highlight);
  color: var(--on-highlight);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  box-shadow: 2px 2px 0 var(--line);
}

.home-pulse {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2);
  padding: 0 var(--space-5) var(--space-5);
}

.home-pulse button {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  padding: 0.45rem 0.65rem;
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  font-weight: 700;
  cursor: pointer;
  transition: transform 130ms ease, background 130ms ease, color 130ms ease;
}

.home-pulse button:hover {
  transform: translateY(-2px);
}

.home-pulse button[aria-pressed="true"] {
  color: var(--ink);
  background: var(--highlight);
  box-shadow: 2px 2px 0 var(--line);
}

/* Four promises ---------------------------------------------------------- */

.home-pillars {
  position: relative;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 96%, transparent), color-mix(in srgb, var(--surface-2) 76%, var(--surface)));
  border-block: var(--border-w) solid var(--line);
  overflow: hidden;
}

.home-pillars::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.1;
  background-image:
    linear-gradient(color-mix(in srgb, var(--line) 26%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--line) 26%, transparent) 1px, transparent 1px);
  background-size: 30px 30px;
}

.home-pillar-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.home-pillar {
  min-width: 0;
  min-height: 11.25rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 7.25rem;
  gap: clamp(1rem, 2vw, 2rem);
  align-items: center;
  padding: clamp(2rem, 3.8vw, 3.2rem);
  border-right: 1px solid color-mix(in srgb, var(--line) 22%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 22%, transparent);
}

.home-pillar:nth-child(2n) {
  border-right: 0;
}

.home-pillar:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.home-pillar-copy {
  min-width: 0;
}

.home-pillar h3 {
  margin: 0 0 var(--space-2);
  font-size: clamp(1.55rem, 1.2rem + 0.7vw, 2rem);
}

.home-pillar p {
  max-width: 22rem;
  color: var(--muted);
  font-size: clamp(0.95rem, 0.88rem + 0.2vw, 1.08rem);
  line-height: 1.55;
}

.home-pillar-abstract {
  position: relative;
  width: 7rem;
  height: 6rem;
  justify-self: end;
  flex: none;
  transition: transform 220ms ease;
}

.home-pillar:hover .home-pillar-abstract {
  transform: translateX(3px);
}

/* Personal: learning adapts around one student. */
.home-abstract-personal {
  display: grid;
  place-items: center;
}

.home-orbit {
  position: absolute;
  border: 1px solid color-mix(in srgb, var(--line) 48%, transparent);
  border-radius: 50%;
}

.home-orbit--outer {
  width: 5rem;
  height: 5rem;
}

.home-orbit--inner {
  width: 3.05rem;
  height: 3.05rem;
  border-color: color-mix(in srgb, var(--accent) 50%, var(--line));
}

.home-orbit-core {
  width: 1.15rem;
  height: 1.15rem;
  border: var(--border-w) solid var(--line);
  border-radius: 50%;
  background: var(--highlight);
  box-shadow: 2px 2px 0 var(--line);
}

.home-orbit-dot {
  position: absolute;
  width: 0.5rem;
  height: 0.5rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--accent);
}

.home-orbit-dot--a {
  top: 0.6rem;
  right: 1.4rem;
}

.home-orbit-dot--b {
  bottom: 0.6rem;
  left: 1.4rem;
  background: var(--surface);
}

/* Social: people exchanging ideas around a shared conversation. */
.home-abstract-social {
  display: grid;
  place-items: center;
}

.home-social-svg {
  width: 6.4rem;
  height: auto;
  overflow: visible;
}

.home-social-person,
.home-social-body,
.home-social-bubble-svg,
.home-social-link-svg {
  vector-effect: non-scaling-stroke;
}

.home-social-link-svg {
  stroke: color-mix(in srgb, var(--line) 48%, transparent);
  stroke-width: 1.5;
  stroke-linecap: round;
}

.home-social-person {
  stroke: var(--line);
  stroke-width: 2.3;
}

.home-social-person--a {
  fill: var(--highlight);
}

.home-social-person--b {
  fill: color-mix(in srgb, var(--good-bg) 75%, var(--surface));
}

.home-social-body {
  stroke: var(--line);
  stroke-width: 2.3;
  stroke-linecap: round;
  fill: none;
}

.home-social-bubble-svg {
  fill: var(--surface);
  stroke: var(--line);
  stroke-width: 2.3;
}

.home-social-dot {
  fill: var(--accent);
}

/* Transparent: overlapping layers stay readable. */
.home-abstract-transparent {
  display: grid;
  place-items: center;
}

.home-glass {
  position: absolute;
  width: 4rem;
  height: 2.75rem;
  border: 1px solid var(--line);
  border-radius: 0.72rem;
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  backdrop-filter: blur(1px);
}

.home-glass--back {
  translate: -0.68rem -0.58rem;
  opacity: 0.45;
}

.home-glass--mid {
  translate: 0.08rem -0.04rem;
  background: color-mix(in srgb, var(--surface-2) 78%, transparent);
  opacity: 0.72;
}

.home-glass--front {
  translate: 0.68rem 0.58rem;
  border-width: var(--border-w);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: 2px 2px 0 color-mix(in srgb, var(--line) 72%, transparent);
}

.home-glass-mark {
  position: absolute;
  width: 1.85rem;
  height: 0.36rem;
  right: 0.92rem;
  bottom: 1.27rem;
  border-radius: 999px;
  background: var(--accent);
  box-shadow:
    -0.82rem -0.78rem 0 color-mix(in srgb, var(--accent) 55%, transparent),
    -1.45rem -1.55rem 0 color-mix(in srgb, var(--line) 22%, transparent);
}

/* Encouraging: a visible path toward a summit. */
.home-abstract-encouraging {
  display: grid;
  place-items: center;
}

.home-mountain-svg {
  width: 6.8rem;
  height: auto;
  overflow: visible;
}

.home-mountain-back-svg {
  fill: color-mix(in srgb, var(--surface-2) 85%, var(--surface));
  opacity: 0.72;
}

.home-mountain-front-svg {
  fill: color-mix(in srgb, var(--highlight) 52%, var(--surface));
  stroke: var(--line);
  stroke-width: 1.8;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.home-mountain-route-svg {
  stroke: var(--accent);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-dasharray: 6 6;
  vector-effect: non-scaling-stroke;
}

.home-mountain-marker-svg {
  fill: var(--accent);
  stroke: var(--line);
  stroke-width: 1.8;
  vector-effect: non-scaling-stroke;
}

.home-mountain-flagpole-svg {
  stroke: var(--line);
  stroke-width: 2.4;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.home-mountain-flag-svg {
  fill: var(--highlight);
  stroke: var(--line);
  stroke-width: 1.8;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

@media (prefers-reduced-motion: no-preference) {
  .home-orbit-dot--a {
    animation: homeOrbitA 6s ease-in-out infinite;
  }

  .home-social-bubble-svg {
    animation: homeSocialLift 4.5s ease-in-out infinite;
    transform-origin: center;
  }

  .home-mountain-marker-svg {
    animation: homeClimbMarker 4s ease-in-out infinite;
  }

  @keyframes homeOrbitA {
    0%, 100% { translate: 0 0; }
    50% { translate: 0.18rem -0.16rem; }
  }

  @keyframes homeSocialLift {
    0%, 100% { translate: 0 0; }
    50% { translate: 0 -2px; }
  }

  @keyframes homeClimbMarker {
    0%, 100% { translate: 0 0; }
    50% { translate: 3px -2px; }
  }
}

/* Tutor interaction ------------------------------------------------------ */

.home-tutor {
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--surface) 94%, transparent), color-mix(in srgb, var(--surface-2) 82%, var(--surface)));
  border-bottom: var(--border-w) solid var(--line);
  overflow: hidden;
}

.home-tutor-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}

.home-tutor-copy h2 {
  font-size: clamp(2.15rem, 1.7rem + 2vw, 3.4rem);
  margin-bottom: var(--space-4);
}

.home-tutor-copy > p {
  color: var(--muted);
  font-size: var(--fs-md);
  max-width: 32rem;
}

.home-tutor-principles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
  margin-top: var(--space-5);
}

.home-tutor-principles span {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.7rem;
  background: var(--surface);
  box-shadow: 2px 2px 0 color-mix(in srgb, var(--line) 75%, transparent);
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  font-weight: 700;
}

.home-tutor-visual {
  position: relative;
  padding: 1.8rem 0.7rem 1rem 1.1rem;
}

.home-tutor-visual::before {
  content: "✦";
  position: absolute;
  z-index: 2;
  right: 0.1rem;
  top: -0.6rem;
  color: var(--highlight);
  -webkit-text-stroke: 1px var(--line);
  font-size: 2.6rem;
  rotate: 12deg;
}

.home-floating-note {
  position: absolute;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  border: var(--border-w) solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  background: var(--highlight);
  color: var(--on-highlight);
  box-shadow: 3px 3px 0 var(--line);
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  font-weight: 800;
  white-space: nowrap;
}

.home-floating-note--hint {
  top: 0;
  right: 2.8rem;
  rotate: 2deg;
}

.home-floating-note--work {
  left: -0.1rem;
  bottom: 0;
  background: var(--surface-2);
  color: var(--ink);
  rotate: -2deg;
}

.home-tutor-stage {
  position: relative;
  border: var(--border-w) solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 8px 8px 0 var(--line);
  overflow: hidden;
  transform: rotate(-0.35deg);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.home-tutor-stage:hover,
.home-tutor-stage:focus-within {
  transform: rotate(0deg) translateY(-3px);
  box-shadow: 11px 11px 0 var(--line);
}

.home-tutor-stage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: color-mix(in srgb, var(--surface-2) 72%, var(--surface));
  border-bottom: var(--border-w) solid var(--line);
}

.home-tutor-stage-head strong,
.home-tutor-stage-head span {
  display: block;
}

.home-tutor-stage-head strong {
  font-family: var(--font-display);
  font-size: var(--fs-base);
}

.home-tutor-stage-head span {
  color: var(--muted);
  font-size: var(--fs-xs);
}

.home-tutor-stage-head button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  padding: 0.3rem 0.65rem;
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  font-weight: 700;
  cursor: pointer;
}

.home-tutor-problem {
  margin: var(--space-4) var(--space-4) 0;
  padding: var(--space-3) var(--space-4);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--highlight) 18%, var(--surface));
}

.home-tutor-problem strong {
  display: block;
  margin-top: var(--space-2);
  font-family: var(--font-display);
  font-size: var(--fs-sm);
}

.home-graphic-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  padding: 0.2rem 0.55rem;
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  font-weight: 700;
}

.home-tutor-conversation {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-4);
}

.home-tutor-message {
  display: grid;
  grid-template-columns: 2.2rem minmax(0, 1fr);
  gap: var(--space-2);
  align-items: start;
  opacity: 1;
  transform: none;
  transition: opacity 300ms ease, transform 300ms ease;
}

.home-tutor-stage.is-animating .home-tutor-message {
  opacity: 0;
  transform: translateY(7px);
}

.home-tutor-stage.is-animating .home-tutor-message.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.home-tutor-avatar {
  width: 2.2rem;
  height: 2.2rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 800;
}

.home-tutor-avatar--agent,
.home-avatar--agent {
  background: var(--highlight);
  color: var(--on-highlight);
}

.home-tutor-bubble {
  max-width: 34rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: var(--space-3) var(--space-4);
}

.home-tutor-message--student .home-tutor-bubble {
  background: color-mix(in srgb, var(--surface-2) 72%, var(--surface));
}

.home-tutor-message--agent .home-tutor-bubble {
  border-left: 4px solid var(--accent);
}

.home-tutor-bubble strong {
  display: block;
  margin-bottom: 0.15rem;
  font-family: var(--font-display);
  font-size: var(--fs-xs);
}

.home-tutor-bubble p {
  font-size: var(--fs-sm);
}

.home-tutor-bubble--success {
  background: color-mix(in srgb, var(--good-bg) 50%, var(--surface));
}

.home-tutor-stage-foot {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  padding: 0 var(--space-4) var(--space-4);
}

.home-tutor-stage-foot span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  padding: 0.3rem 0.65rem;
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  font-weight: 700;
}

/* Community -------------------------------------------------------------- */

.home-community {
  background: var(--surface);
}

.home-community-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}

.home-community-copy h2,
.home-parent-copy h2 {
  font-size: clamp(2.15rem, 1.7rem + 2vw, 3.4rem);
  margin-bottom: var(--space-4);
}

.home-community-copy > p,
.home-parent-copy > p {
  color: var(--muted);
  font-size: var(--fs-md);
  max-width: 32rem;
}

.home-community-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-5);
}

.home-community-chips span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  background: var(--surface-2);
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  font-weight: 700;
}

.home-group-window {
  border: var(--border-w) solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: translate 180ms ease, box-shadow 180ms ease;
}

.home-group-window:hover {
  translate: -3px -3px;
  box-shadow: var(--shadow-card-hover);
}

.home-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-bottom: var(--border-w) solid var(--line);
  background: color-mix(in srgb, var(--surface-2) 70%, var(--surface));
  font-family: var(--font-display);
  font-weight: 700;
}

.home-group-head button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  padding: 0.3rem 0.65rem;
  font-family: inherit;
  font-size: var(--fs-xs);
  cursor: pointer;
}

.home-conversation {
  padding: var(--space-5);
  display: grid;
  gap: var(--space-4);
}

.home-message {
  display: grid;
  grid-template-columns: 2.4rem minmax(0, 1fr);
  gap: var(--space-3);
  align-items: start;
  opacity: 1;
  transform: none;
  transition: opacity 320ms ease, transform 320ms ease;
}

.home-group-window.is-animating .home-message {
  opacity: 0;
  transform: translateY(8px);
}

.home-group-window.is-animating .home-message.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.home-avatar {
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--accent);
}

.home-message-bubble {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
  background: var(--surface);
}

.home-message--tutor .home-message-bubble {
  background: color-mix(in srgb, var(--highlight) 18%, var(--surface));
  border-left: 4px solid var(--accent);
}

.home-message-bubble strong {
  display: block;
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  margin-bottom: 0.15rem;
}

.home-message-bubble p {
  font-size: var(--fs-sm);
  color: var(--ink);
}

/* Product-faithful study-group feed ------------------------------------- */

.home-group-feed {
  animation: none;
}

.home-group-feed .home-group-head > div {
  min-width: 0;
}

.home-group-feed .home-group-head strong,
.home-group-feed .home-group-head span {
  display: block;
}

.home-group-feed .home-group-head strong {
  font-family: var(--font-display);
  font-size: var(--fs-sm);
}

.home-group-feed .home-group-head span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 500;
}

.home-feed-composer {
  margin: var(--space-4);
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 2px 2px 0 color-mix(in srgb, var(--line) 45%, transparent);
}

.home-feed-modes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: var(--space-2);
}

.home-feed-modes span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.32rem 0.65rem;
  background: var(--surface-2);
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
}

.home-feed-modes span.is-active {
  background: var(--accent);
  color: var(--accent-ink);
}

.home-feed-compose-box,
.home-feed-reply-composer {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 2.6rem;
  border: 1px solid color-mix(in srgb, var(--line) 35%, transparent);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--surface-2) 55%, var(--surface));
  color: var(--muted);
  padding: 0.5rem 0.55rem 0.5rem 0.8rem;
  font-size: var(--fs-xs);
}

.home-feed-compose-box > span:first-child,
.home-reply-placeholder {
  min-width: 0;
  flex: 1;
}

.home-feed-send {
  width: 1.8rem;
  height: 1.8rem;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-display);
  font-weight: 800;
}

.home-needs-help {
  margin: 0 var(--space-4) var(--space-4);
  padding: 0.65rem 0.75rem;
  border: 1px solid color-mix(in srgb, var(--accent) 42%, var(--line));
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 6%, var(--surface));
}

.home-needs-help-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: 0.35rem;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.home-needs-help-head span:last-child {
  color: var(--muted);
  text-transform: none;
  letter-spacing: normal;
  font-weight: 700;
}

.home-needs-help-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: var(--space-2);
  align-items: center;
  padding: 0.35rem 0.45rem;
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 0.7rem;
}

.home-needs-help-row strong {
  font-family: var(--font-display);
}

.home-needs-help-row span {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-needs-help-row small {
  color: var(--muted);
}

.home-feed-post {
  margin: 0 var(--space-4) var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 2px 2px 0 color-mix(in srgb, var(--line) 38%, transparent);
  overflow: hidden;
}

.home-feed-post-head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4) 0;
}

.home-feed-author {
  min-width: 0;
}

.home-feed-author strong,
.home-feed-author small {
  display: block;
}

.home-feed-author strong {
  font-family: var(--font-display);
  font-size: var(--fs-xs);
}

.home-feed-author small {
  color: var(--muted);
  font-size: 0.65rem;
}

.home-feed-kind,
.home-feed-solved,
.home-feed-accepted,
.home-tutor-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  border-radius: 999px;
  padding: 0.18rem 0.45rem;
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 800;
}

.home-feed-kind {
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
  color: var(--accent);
}

.home-feed-solved,
.home-feed-accepted,
.home-tutor-chip {
  background: var(--accent);
  color: var(--accent-ink);
}

.home-feed-chevron {
  margin-left: auto;
  color: var(--muted);
  font-size: var(--fs-sm);
}

.home-feed-question {
  padding: var(--space-3) var(--space-4);
  font-size: var(--fs-sm);
  line-height: 1.5;
}

.home-feed-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0 var(--space-4) var(--space-3);
  color: var(--muted);
  font-size: 0.68rem;
}

.home-feed-actions span {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.home-feed-actions span:last-child {
  margin-left: auto;
}

.home-feed-replies {
  display: grid;
  gap: 0.55rem;
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid color-mix(in srgb, var(--line) 18%, transparent);
}

.home-feed-reply {
  display: grid;
  grid-template-columns: 1.8rem minmax(0, 1fr);
  gap: 0.45rem;
  align-items: start;
  opacity: 1;
  transform: none;
  transition: opacity 280ms ease, transform 280ms ease;
}

.home-group-feed.is-animating .home-feed-reply {
  opacity: 0;
  transform: translateY(6px);
}

.home-group-feed.is-animating .home-feed-reply.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.home-avatar--small {
  width: 1.8rem;
  height: 1.8rem;
  font-size: 0.65rem;
}

.home-feed-reply-card {
  min-width: 0;
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 0.55rem 0.7rem;
  transition: border-color 160ms ease, background-color 160ms ease;
}

.home-feed-reply--tutor .home-feed-reply-card {
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-2) 60%, var(--surface));
}

.home-feed-reply-card.is-accepted {
  border: 1px solid color-mix(in srgb, var(--accent) 50%, var(--line));
  background: color-mix(in srgb, var(--accent) 5%, var(--surface));
}

.home-feed-reply-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.15rem;
}

.home-feed-reply-meta strong {
  font-family: var(--font-display);
  font-size: 0.7rem;
}

.home-feed-reply-card p {
  color: var(--ink);
  font-size: 0.72rem;
  line-height: 1.45;
}

.home-feed-reply-actions {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.62rem;
}

.home-feed-reply-actions span {
  border-radius: 999px;
  padding: 0.14rem 0.4rem;
  background: var(--surface);
}

.home-feed-reply-composer {
  margin: 0 var(--space-4) var(--space-4);
  border-top: 1px solid color-mix(in srgb, var(--line) 20%, transparent);
}

.home-ask-tutor {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.22rem 0.5rem;
  background: var(--surface);
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 800;
}

.home-group-outcome {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  padding: 0 var(--space-5) var(--space-5);
}

.home-group-outcome span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  padding: 0.3rem 0.65rem;
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  font-weight: 700;
}

/* Notebook --------------------------------------------------------------- */

.home-notebook-section {
  padding-block: var(--space-7);
  background: color-mix(in srgb, var(--surface-2) 62%, var(--surface));
  border-block: var(--border-w) solid var(--line);
}

.home-notebook {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: var(--border-w) solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 8px 8px 0 var(--line);
  overflow: hidden;
}

.home-notebook::before {
  content: "";
  position: absolute;
  z-index: 3;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: var(--line);
  transform: translateX(-1px);
}

.home-notebook::after {
  content: "";
  position: absolute;
  z-index: 4;
  top: 1rem;
  bottom: 1rem;
  left: 50%;
  width: 1rem;
  transform: translateX(-50%);
  background:
    radial-gradient(circle, var(--line) 0 2px, transparent 2.5px)
    center top / 1rem 1.7rem repeat-y;
  pointer-events: none;
}

.home-notebook-page {
  min-height: 23rem;
  padding: clamp(1.5rem, 4vw, 3rem);
  background-color: var(--surface);
  background-image:
    linear-gradient(color-mix(in srgb, var(--pop-2) 13%, transparent) 1px, transparent 1px);
  background-size: 100% 1.8rem;
}

.home-notebook-page:first-child {
  padding-right: clamp(2rem, 5vw, 4rem);
}

.home-notebook-page:last-child {
  padding-left: clamp(2rem, 5vw, 4rem);
}

.home-notebook-label {
  display: inline-block;
  background: var(--highlight);
  color: var(--on-highlight);
  border: 1px solid var(--line);
  padding: 0.25rem 0.65rem;
  font-family: var(--font-display);
  font-weight: 800;
  rotate: -1deg;
  margin-bottom: var(--space-5);
}

.home-equation {
  font-family: var(--font-mono);
  font-size: clamp(1.05rem, 0.95rem + 0.5vw, 1.35rem);
  line-height: 2;
}

.home-equation .home-answer {
  display: inline-block;
  background: color-mix(in srgb, var(--highlight) 75%, transparent);
  border-radius: 0.25rem;
  padding-inline: 0.25rem;
}

.home-annotation {
  margin-top: var(--space-5);
  max-width: 24rem;
  border: 2px dashed var(--accent);
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
  color: var(--muted);
  background: color-mix(in srgb, var(--surface) 88%, var(--surface-2));
  rotate: 0.6deg;
}

.home-notebook-question {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 700;
  margin-bottom: var(--space-4);
}

.home-notebook-answer {
  border: var(--border-w) solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-4);
  background: var(--surface-2);
  margin-bottom: var(--space-4);
}

.home-notebook-answer strong {
  font-family: var(--font-display);
}

.home-notebook-toggle {
  border: var(--border-w) solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--highlight);
  color: var(--on-highlight);
  padding: 0.55rem 0.9rem;
  font-family: var(--font-display);
  font-weight: 700;
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--line);
}

.home-notebook-detail {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  margin-top: 0;
  transition: max-height 260ms ease, opacity 220ms ease, margin-top 220ms ease;
}

.home-notebook.is-explained .home-notebook-detail {
  max-height: 8rem;
  opacity: 1;
  margin-top: var(--space-4);
}

.home-notebook-detail p {
  border-left: 4px solid var(--accent);
  padding-left: var(--space-3);
  color: var(--muted);
}

/* Dark product band ------------------------------------------------------ */

.home-feature-band {
  position: relative;
  background:
    radial-gradient(circle at 82% 18%, rgba(255,255,255,0.06), transparent 22rem),
    linear-gradient(180deg, #111114, #09090b);
  color: var(--home-dark-ink);
  border-block: var(--border-w) solid var(--line);
  padding-block: clamp(4.5rem, 8vw, 7rem);
  overflow: hidden;
}

.home-feature-band::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.13;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(255,255,255,0.34) 1px, transparent 1.2px);
  background-size: 22px 22px;
  mask-image: linear-gradient(90deg, transparent, #000 18%, #000 92%, transparent);
}

.home-system-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(16rem, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(3rem, 7vw, 6rem);
  align-items: center;
}

.home-system-lead {
  max-width: 31rem;
}

.home-system-lead .section-kicker {
  color: var(--highlight);
}

.home-system-lead h2 {
  color: var(--home-dark-ink);
  font-size: clamp(2.5rem, 1.8rem + 3vw, 4.2rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
  margin-bottom: var(--space-4);
}

.home-system-lead h3 {
  color: var(--home-dark-ink);
  font-size: clamp(1.15rem, 1rem + 0.6vw, 1.45rem);
  margin-bottom: var(--space-3);
}

.home-system-lead > p {
  color: var(--home-dark-muted);
  font-size: var(--fs-md);
  line-height: 1.65;
}

.home-system-note {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: var(--space-5);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  padding: 0.55rem 0.85rem;
  background: rgba(255,255,255,0.05);
  color: var(--home-dark-ink);
  font-family: var(--font-display);
  font-size: var(--fs-xs);
}

.home-system-note > span {
  color: var(--highlight);
  font-size: 1rem;
}

.home-system-board {
  position: relative;
  min-width: 0;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 1.5rem;
  padding: clamp(1.2rem, 2.5vw, 2rem);
  background:
    linear-gradient(rgba(255,255,255,0.018), rgba(255,255,255,0.018)),
    rgba(0,0,0,0.18);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.03),
    0 24px 80px rgba(0,0,0,0.28);
}

.home-system-board::after {
  content: "";
  position: absolute;
  right: 1rem;
  top: 1rem;
  width: 3.5rem;
  height: 1px;
  background: var(--highlight);
  box-shadow: 0 5px 0 rgba(255,255,255,0.25), 0 10px 0 rgba(255,255,255,0.12);
  rotate: -7deg;
}

.home-system-board-label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: var(--space-4);
  color: var(--home-dark-muted);
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-system-live-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--highlight);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--highlight) 18%, transparent);
}

.home-system-input {
  width: max-content;
  max-width: 100%;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0 auto var(--space-4);
  border: 1px dashed rgba(255,255,255,0.28);
  border-radius: 999px;
  padding: 0.45rem 0.7rem 0.45rem 0.9rem;
  color: var(--home-dark-muted);
  font-size: var(--fs-xs);
}

.home-system-input span:last-child {
  color: var(--highlight);
  font-family: var(--font-display);
  font-weight: 900;
}

.home-system-map {
  display: grid;
  grid-template-columns: minmax(0,1fr) 2.25rem minmax(0,1fr);
  grid-template-areas:
    "tutor ca practice"
    "cb cb cb"
    "progress cc groups";
  gap: 0.85rem 0.55rem;
  align-items: stretch;
}

.home-system-node {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: 2.6rem minmax(0,1fr);
  gap: var(--space-3);
  align-items: start;
  padding: var(--space-4);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 1rem;
  background: rgba(255,255,255,0.045);
  color: var(--home-dark-ink);
  outline: none;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    opacity 180ms ease,
    box-shadow 180ms ease;
}

.home-system-node:hover,
.home-system-node:focus-visible,
.home-system-node.is-active {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--highlight) 68%, white);
  background: rgba(255,255,255,0.075);
  box-shadow: 0 14px 34px rgba(0,0,0,0.24);
}

.home-system-board.is-animated .home-system-node {
  opacity: 0;
  transform: translateY(8px);
}

.home-system-board.is-animated .home-system-node.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.home-system-board.is-animated .home-system-node.is-visible:hover,
.home-system-board.is-animated .home-system-node.is-visible:focus-visible,
.home-system-board.is-animated .home-system-node.is-visible.is-active {
  transform: translateY(-3px);
}

.home-system-map.has-active .home-system-node.is-visible:not(.is-active) {
  opacity: 0.5;
}

.home-system-node--tutor { grid-area: tutor; }
.home-system-node--practice { grid-area: practice; }
.home-system-node--progress { grid-area: progress; }
.home-system-node--groups { grid-area: groups; }

.home-system-step {
  position: absolute;
  right: 0.75rem;
  top: 0.65rem;
  color: rgba(255,255,255,0.24);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 800;
}

.home-system-icon {
  width: 2.55rem;
  height: 2.55rem;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,0.26);
  border-radius: 0.75rem;
  background: rgba(255,255,255,0.05);
  color: var(--highlight);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 900;
}

.home-system-node h3 {
  margin-bottom: 0.25rem;
  color: var(--home-dark-ink);
  font-size: var(--fs-base);
}

.home-system-node p {
  padding-right: 0.6rem;
  color: var(--home-dark-muted);
  font-size: 0.72rem;
  line-height: 1.45;
}

.home-system-mini {
  grid-column: 1 / -1;
  min-height: 2.4rem;
  margin-top: 0.15rem;
  border-top: 1px solid rgba(255,255,255,0.11);
  padding-top: 0.65rem;
  color: var(--home-dark-muted);
  font-size: 0.62rem;
}

.home-system-mini--chat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.home-system-mini--chat span {
  max-width: 58%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-system-mini b {
  color: var(--highlight);
  font-family: var(--font-display);
  font-size: 0.58rem;
  font-weight: 800;
}

.home-system-mini--practice {
  display: grid;
  grid-template-columns: repeat(3, 1fr) auto;
  gap: 0.3rem;
  align-items: center;
}

.home-system-mini--practice span {
  height: 0.5rem;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  background: var(--highlight);
}

.home-system-mini--practice span:nth-child(3) {
  background: transparent;
}

.home-system-mini--progress {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.home-system-mini--progress > span {
  flex: 1;
  height: 0.55rem;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  overflow: hidden;
}

.home-system-mini--progress i {
  display: block;
  width: 74%;
  height: 100%;
  background: var(--highlight);
}

.home-system-mini--group {
  display: flex;
  align-items: center;
}

.home-system-mini--group span {
  width: 1.55rem;
  height: 1.55rem;
  display: grid;
  place-items: center;
  margin-right: -0.25rem;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  background: #202027;
  color: var(--home-dark-ink);
  font-family: var(--font-display);
  font-size: 0.55rem;
  font-weight: 800;
}

.home-system-mini--group span:nth-child(2) {
  background: var(--highlight);
  color: var(--on-highlight);
}

.home-system-mini--group span:nth-child(3) {
  background: var(--accent);
  color: var(--accent-ink);
}

.home-system-mini--group b {
  margin-left: auto;
}

.home-system-connector {
  display: grid;
  place-items: center;
  color: var(--highlight);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 900;
  opacity: 0.75;
}

.home-system-connector::before {
  content: "";
  position: absolute;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--highlight) 70%, white), transparent);
}

.home-system-connector--a { grid-area: ca; }
.home-system-connector--b { grid-area: cb; min-height: 1.7rem; }
.home-system-connector--c { grid-area: cc; }

.home-system-connector--a::before,
.home-system-connector--c::before {
  width: 2rem;
  height: 1px;
}

.home-system-connector--b::before {
  width: 1px;
  height: 1.6rem;
  background: linear-gradient(transparent, color-mix(in srgb, var(--highlight) 70%, white), transparent);
}

.home-system-connector span {
  position: relative;
  z-index: 1;
  padding: 0.15rem;
  background: var(--home-dark);
}

.home-system-feedback {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: var(--space-4);
  color: rgba(255,255,255,0.4);
  font-family: var(--font-mono);
  font-size: 0.62rem;
}

.home-system-feedback-line {
  position: relative;
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--highlight), rgba(255,255,255,0.08));
  overflow: hidden;
}

.home-system-feedback-line::after {
  content: "";
  position: absolute;
  inset: -1px auto -1px -15%;
  width: 18%;
  background: white;
  filter: blur(2px);
  opacity: 0.8;
  animation: homeSystemPulse 3.6s linear infinite;
}

.home-system-feedback-copy {
  white-space: nowrap;
}

@keyframes homeSystemPulse {
  to { left: 110%; }
}

@media (prefers-reduced-motion: reduce) {
  .home-system-feedback-line::after {
    animation: none;
    display: none;
  }
}

/* Parents ---------------------------------------------------------------- */

.home-parent-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}

.home-parent-trust {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-5);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 0.75rem;
  background: var(--surface-2);
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: 700;
}

.home-parent-dashboard {
  border: var(--border-w) solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  rotate: 0.4deg;
}

.home-parent-dashboard-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-bottom: var(--border-w) solid var(--line);
  background: color-mix(in srgb, var(--surface-2) 68%, var(--surface));
}

.home-parent-dashboard-head strong {
  font-family: var(--font-display);
}

.home-parent-dashboard-body {
  padding: var(--space-5);
}

.home-parent-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.home-parent-stat {
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.home-parent-stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: var(--fs-lg);
}

.home-parent-stat span {
  color: var(--muted);
  font-size: var(--fs-xs);
}

.home-parent-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-3);
  padding-block: var(--space-3);
  border-top: 1px solid color-mix(in srgb, var(--line) 18%, transparent);
}

.home-parent-row strong {
  font-family: var(--font-display);
}

.home-private-note {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  gap: var(--space-3);
  align-items: start;
  margin-top: var(--space-4);
  padding: var(--space-4);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--good-bg) 45%, var(--surface));
}

.home-private-note svg {
  width: 1.6rem;
  height: 1.6rem;
  color: var(--good-ink);
}

.home-private-note strong {
  display: block;
  font-family: var(--font-display);
}

/* Existing lower-page surfaces: keep behavior, tighten visual rhythm. ----- */

.home-redesign #pricing,
.home-redesign #faq,
.home-redesign #contact {
  background: color-mix(in srgb, var(--surface) 88%, transparent);
}

.home-redesign .plan,
.home-redesign .faq-item,
.home-redesign .contact-form {
  transition: translate 160ms ease, box-shadow 160ms ease;
}

.home-redesign .plan:hover,
.home-redesign .faq-item:hover,
.home-redesign .contact-form:hover {
  translate: -2px -2px;
  box-shadow: var(--shadow-card-hover);
}

.home-redesign .plan--featured {
  outline: 3px solid color-mix(in srgb, var(--highlight) 78%, transparent);
  outline-offset: 4px;
}

.home-redesign .faq-item[open] {
  background: color-mix(in srgb, var(--surface) 88%, var(--surface-2));
}

.home-redesign .contact-aside h2 {
  font-size: var(--fs-xl);
}

.home-redesign .cta-band {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--highlight) 92%, white), var(--highlight));
}

/* Motion ---------------------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
  .home-progress-card {
    animation: homeFloat 6s ease-in-out infinite;
  }

  .home-group-window {
    animation: homeFloat 7.5s ease-in-out infinite reverse;
  }

  @keyframes homeFloat {
    0%, 100% { translate: 0 0; }
    50% { translate: 0 -6px; }
  }
}

/* Responsive ------------------------------------------------------------- */

@media (max-width: 66rem) {
  .home-hero-grid,
  .home-tutor-grid,
  .home-community-grid,
  .home-parent-grid {
    grid-template-columns: 1fr;
  }

  .home-hero-copy {
    max-width: 44rem;
  }

  .home-progress-card,
  .home-tutor-visual,
  .home-group-window,
  .home-parent-dashboard {
    max-width: 42rem;
  }

  .home-pillar-grid {
    grid-template-columns: 1fr;
  }

  .home-pillar,
  .home-pillar:nth-child(2n) {
    border-right: 0;
    border-bottom: 1px solid color-mix(in srgb, var(--line) 22%, transparent);
  }

  .home-pillar:last-child {
    border-bottom: 0;
  }

  .home-system-layout {
    grid-template-columns: 1fr;
  }

  .home-system-lead {
    max-width: 42rem;
  }
}

@media (max-width: 54rem) {
  .home-hero {
    padding-block: var(--space-7);
  }

  .home-hero h1 {
    font-size: clamp(2.55rem, 11vw, 4rem);
  }

  .home-notebook {
    grid-template-columns: 1fr;
  }

  .home-notebook::before,
  .home-notebook::after {
    display: none;
  }

  .home-notebook-page:first-child,
  .home-notebook-page:last-child {
    padding: var(--space-6);
  }

  .home-notebook-page:first-child {
    border-bottom: var(--border-w) solid var(--line);
  }

  .home-system-map {
    grid-template-columns: 1fr;
    grid-template-areas:
      "tutor"
      "ca"
      "practice"
      "cb"
      "groups"
      "cc"
      "progress";
    gap: 0.55rem;
  }

  .home-system-connector {
    min-height: 1.4rem;
    rotate: 90deg;
  }

  .home-system-connector--b {
    rotate: 0deg;
  }

  .home-system-feedback-copy {
    white-space: normal;
    text-align: right;
  }
}

@media (max-width: 38rem) {
  .home-hero .hero-ctas {
    display: grid;
    grid-template-columns: 1fr;
  }

  .home-hero .hero-ctas .btn {
    width: 100%;
  }

  .home-pillar {
    grid-template-columns: minmax(0, 1fr) 5.25rem;
    gap: var(--space-3);
    min-height: 9.5rem;
    padding: var(--space-5) var(--space-4);
  }

  .home-pillar-abstract {
    width: 5.1rem;
    height: 4.9rem;
  }

  .home-orbit--outer {
    width: 4.35rem;
    height: 4.35rem;
  }

  .home-orbit--inner {
    width: 2.65rem;
    height: 2.65rem;
  }

  .home-social-svg {
    width: 4.9rem;
  }

  .home-mountain-svg {
    width: 5.1rem;
  }

  .home-glass {
    width: 3.45rem;
    height: 2.35rem;
  }

  .home-pillar h3 {
    font-size: 1.4rem;
  }

  .home-pillar p {
    font-size: 0.9rem;
  }

  .home-progress-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .home-progress-row {
    grid-template-columns: 1fr;
  }

  .home-status {
    width: max-content;
  }

  .home-pulse {
    grid-template-columns: 1fr;
  }

  .home-community-chips {
    display: grid;
  }

  .home-feed-modes {
    gap: 0.25rem;
  }

  .home-feed-modes span {
    font-size: 0.62rem;
    padding-inline: 0.5rem;
  }

  .home-feed-post,
  .home-feed-composer,
  .home-needs-help {
    margin-inline: var(--space-3);
  }

  .home-feed-post-head {
    flex-wrap: wrap;
  }

  .home-feed-chevron {
    display: none;
  }

  .home-tutor-principles {
    grid-template-columns: 1fr;
  }

  .home-tutor-visual {
    padding: 0;
  }

  .home-floating-note {
    display: none;
  }

  .home-tutor-stage {
    transform: none;
  }

  .home-conversation {
    padding: var(--space-4);
  }

  .home-message {
    grid-template-columns: 2rem minmax(0, 1fr);
    gap: var(--space-2);
  }

  .home-avatar {
    width: 2rem;
    height: 2rem;
    font-size: var(--fs-xs);
  }

  .home-parent-stats {
    grid-template-columns: 1fr;
  }
}
