﻿.home .hero-visual {
      position: relative;
      max-width: 420px;
      width: 100%;
      margin-top: 1.25rem;
    }

    .home .hero-media {
      width: min(100%, 520px);
      margin-left: auto;
      margin-right: auto;
    }

    .home .hero-messages {
      margin-top: 1.3rem;
      display: grid;
      grid-template-columns: 1fr;
      align-items: center;
      position: relative;
      overflow: hidden;
      gap: 0;
      min-height: 60px;
      max-width: 720px;

    }

    .home .hero-message {
      grid-area: 1 / 1 / 2 / 2;
      justify-self: stretch;
      display: flex;
      align-items: center;
      justify-content: center;
      text-align: center;
      padding: 0.75rem 1rem;
      background: linear-gradient(135deg, #e0f2fe, #bfdbfe);
      border: 1px solid rgba(59, 130, 246, .35);
      color: #0b172a;
      border-radius: 1rem;
      box-shadow: none;
      transform: translateX(32px);
      opacity: 0;
      transition: transform .45s ease, opacity .45s ease;
      max-width: 100%;
      line-height: 1.75;
      font-size: 1.75rem;
      font-family: "Caveat", "Comic Sans MS", "Patrick Hand", cursive;
      min-height: 7.8rem;
    }

    .home .hero-message.is-active {
      opacity: 1;
      transform: translateX(0);
      box-shadow: 0 16px 40px rgba(59, 130, 246, .18);
    }

    .home .hero-message.is-next {
      transform: translateX(46px);
      opacity: 0;
    }

    .home .hero-message.is-exit {
      transform: translateX(-28px);
      opacity: 0;
    }

    .home .text-short {
      display: none;
    }

    .home .hero-stats {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: .65rem;
      margin: 1rem 0 0;
      padding: 0;
      max-width: 620px;
      text-align: center;
    }

    .home .hero-stat {
      margin: 0;
      padding: .75rem;
      border: 1px solid var(--bs-border-color);
      border-radius: .5rem;
      background: color-mix(in oklab, var(--bs-surface) 86%, transparent);
      box-shadow: var(--shadow-sm);
    }

    .home .hero-stat dt {
      margin: 0;
      color: var(--bs-heading);
      font-size: 1.35rem;
      line-height: 1;
      font-weight: 800;
    }

    .home .hero-stat dd {
      margin: .25rem 0 0;
      color: var(--bs-muted);
      font-size: .85rem;
      line-height: 1.25;
    }

    .home .hero-search {
      display: flex;
      gap: .5rem;
      align-items: center;
      width: min(100%, 620px);
      margin-top: 1rem;
      padding: .35rem;
      border: 1px solid var(--bs-border-color);
      border-radius: .5rem;
      background: var(--bs-surface);
      box-shadow: var(--shadow-sm);
    }

    .home .hero-search input[type="search"] {
      flex: 1 1 auto;
      min-width: 0;
      border: 0;
      background: transparent;
      color: var(--bs-body-color);
      padding: .55rem .65rem;
      font: inherit;
    }

    .home .hero-search input[type="search"]:focus {
      outline: none;
    }

    .home .hero-search:focus-within {
      border-color: var(--bs-primary);
      box-shadow: 0 0 0 3px rgba(14, 165, 233, .16), var(--shadow-sm);
    }

    .home .hero-quick-links {
      display: flex;
      flex-wrap: wrap;
      gap: .35rem .65rem;
      align-items: center;
      margin-top: .65rem;
      color: var(--bs-muted);
      font-size: .92rem;
    }

    .home .hero-quick-links a {
      color: var(--bs-secondary);
      font-weight: 700;
      text-decoration: none;
    }

    .home .hero-quick-links a:hover {
      text-decoration: underline;
    }

    .home .section-head {
      max-width: 780px;
      margin-bottom: 1.1rem;
    }

    .home .section-head--compact {
      max-width: 700px;
    }

    .home .section-kicker {
      margin: 0 0 .35rem;
      color: #0f766e;
      font-size: .78rem;
      font-weight: 800;
      letter-spacing: .06em;
      text-transform: uppercase;
    }

    .home .section-head h2 {
      margin: 0;
      color: var(--bs-heading);
      font-size: clamp(1.45rem, 2.2vw, 2rem);
      line-height: 1.15;
    }

    .home .section-head p:not(.section-kicker) {
      margin: .55rem 0 0;
      color: var(--bs-muted);
      max-width: 80ch;
    }

    .home .home-subjects,
    .home .learning-paths {
      padding: 2.3rem 0;
    }

    .home .subject-strip {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: .85rem;
    }

    .home .home-subject-card {
      display: grid;
      grid-template-columns: 64px minmax(0, 1fr);
      align-items: center;
      gap: .75rem;
      min-height: 86px;
      padding: .7rem;
      border: 1px solid var(--bs-border-color);
      border-radius: .5rem;
      background: var(--bs-surface);
      color: var(--bs-body-color);
      text-decoration: none;
      box-shadow: var(--shadow-sm);
      transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
    }

    .home .home-subject-card:hover {
      transform: translateY(-2px);
      border-color: color-mix(in oklab, var(--bs-primary) 55%, var(--bs-border-color));
      box-shadow: var(--shadow);
    }

    .home .home-subject-card:focus-visible {
      outline: 2px solid var(--bs-primary);
      outline-offset: 2px;
    }

    .home .home-subject-media {
      width: 64px;
      height: 64px;
      display: grid;
      place-items: center;
      border-radius: .5rem;
      background: color-mix(in oklab, #f8fafc 82%, var(--bs-primary));
      overflow: hidden;
    }

    .home .home-subject-media img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }

    .home .home-subject-copy {
      min-width: 0;
      display: grid;
      gap: .15rem;
    }

    .home .home-subject-title {
      color: var(--bs-heading);
      font-weight: 800;
      line-height: 1.2;
    }

    .home .home-subject-meta {
      color: var(--bs-muted);
      font-size: .9rem;
      line-height: 1.25;
    }

    .home .features {
      padding-top: 2rem;
    }

    .home .features-grid {
      grid-template-columns: repeat(1, minmax(0, 1fr));
    }

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

    .home .path-card {
      display: grid;
      gap: .45rem;
      align-content: start;
      min-height: 150px;
      padding: 1rem;
      border: 1px solid var(--bs-border-color);
      border-radius: .5rem;
      background:
        linear-gradient(135deg, color-mix(in oklab, var(--bs-surface) 94%, #ecfccb), var(--bs-surface));
      color: var(--bs-body-color);
      text-decoration: none;
      box-shadow: var(--shadow-sm);
      transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
    }

    .home .path-card:nth-child(2) {
      background:
        linear-gradient(135deg, color-mix(in oklab, var(--bs-surface) 92%, #ffedd5), var(--bs-surface));
    }

    .home .path-card:nth-child(3) {
      background:
        linear-gradient(135deg, color-mix(in oklab, var(--bs-surface) 92%, #dbeafe), var(--bs-surface));
    }

    .home .path-card:nth-child(4) {
      background:
        linear-gradient(135deg, color-mix(in oklab, var(--bs-surface) 92%, #fef9c3), var(--bs-surface));
    }

    .home .path-card:hover {
      transform: translateY(-2px);
      border-color: color-mix(in oklab, var(--bs-secondary) 45%, var(--bs-border-color));
      box-shadow: var(--shadow);
    }

    .home .path-card:focus-visible {
      outline: 2px solid var(--bs-primary);
      outline-offset: 2px;
    }

    .home .path-label {
      color: #92400e;
      font-size: .78rem;
      font-weight: 800;
      letter-spacing: .05em;
      text-transform: uppercase;
    }

    .home .path-card strong {
      color: var(--bs-heading);
      font-size: 1.05rem;
      line-height: 1.35;
    }

    .home .home-video {
      padding: clamp(2.5rem, 5vw, 4.5rem) 0;
      background:
        linear-gradient(180deg,
          color-mix(in oklab, var(--bs-surface) 94%, var(--bs-primary)),
          var(--bs-surface));
      border: 1px solid var(--bs-border-color);
      border-radius: .75rem;
    }

    .home .home-video-inner {
      display: grid;
      grid-template-columns: minmax(0, 1fr);
      gap: clamp(1.25rem, 3vw, 2rem);
      justify-items: center;
      padding-inline: clamp(1rem, 3vw, 2rem);
      text-align: center;
    }

    .home .home-video-frame {
      width: min(100%, 720px);
      aspect-ratio: 1 / 1;
      justify-self: center;
      overflow: hidden;
      border: 1px solid var(--bs-border-color);
      border-radius: .75rem;
      background: #000;
      box-shadow: var(--shadow);
    }

    .home .home-video-frame iframe {
      width: 100%;
      height: 100%;
      display: block;
      border: 0;
    }

    html[data-theme="dark"] .home .section-kicker,
    html[data-theme="dark"] .home .path-label {
      color: #5eead4;
    }

    html[data-theme="dark"] .home .home-subject-media {
      background: color-mix(in oklab, var(--bs-surface-2) 70%, var(--bs-primary));
    }

    @media (prefers-color-scheme: dark) {
      .home .section-kicker,
      .home .path-label {
        color: #5eead4;
      }

      .home .home-subject-media {
        background: color-mix(in oklab, var(--bs-surface-2) 70%, var(--bs-primary));
      }
    }

    @media (max-width: 500px) {
      .home .text-long {
        display: none;
      }

      .home .text-short {
        display: inline;
      }
    }

    @media (min-width: 720px) {
      .home .subject-strip {
        grid-template-columns: repeat(3, minmax(0, 1fr));
      }

      .home .features-grid,
      .home .path-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
    }

    @media (min-width: 1100px) {
      .home .subject-strip {
        grid-template-columns: repeat(4, minmax(0, 1fr));
      }

      .home .features-grid,
      .home .path-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
      }

      .home .home-video .section-head {
        margin-bottom: 0;
      }
    }

    .home .calc-shell {
      background: linear-gradient(160deg, #0f172a, #0b1220 70%);
      color: #e0f2fe;
      border-radius: 1.2rem;
      padding: 1.4rem;
      box-shadow: 0 16px 48px rgba(0, 0, 0, .32);
      border: 1px solid rgba(148, 163, 184, .3);
      position: relative;
      overflow: hidden;
      width: 100%;
    }

    .home .calc-shell::after {
      content: "";
      position: absolute;
      inset: -18% 8% auto;
      height: 60%;
      background: radial-gradient(120% 80% at 20% 20%, rgba(56, 189, 248, .18), transparent 55%);
      pointer-events: none;
    }

    .home .calc-top {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 1rem;
      color: #9ac6ff;
      font-weight: 700;
      letter-spacing: .05em;
      text-transform: uppercase;
    }

    .home .calc-screen {
      background: linear-gradient(135deg, #0b2540, #0f2f53);
      border: 1px solid rgba(148, 163, 184, .35);
      border-radius: .9rem;
      padding: 1rem 1.25rem;
      min-height: 84px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: .5rem;
      font-family: "Roboto Mono", monospace;
      color: #e2f3ff;
      box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .02);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .home .calc-screen .expr {
      font-size: 1rem;
      color: #9ecaff;
    }

    .home .calc-screen .result {
      font-size: 1.35rem;
      font-weight: 700;
      color: #38bdf8;
    }

    .home .calc-keys {
      margin-top: 1.1rem;
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: .5rem;
    }

    .home .calc-key {
      background: rgba(255, 255, 255, .06);
      border: 1px solid rgba(148, 163, 184, .25);
      border-radius: .75rem;
      padding: .75rem .25rem;
      color: #dbeafe;
      text-align: center;
      font-weight: 700;
      box-shadow: inset 0 -2px 6px rgba(0, 0, 0, .25);
      transition: transform .15s ease, box-shadow .15s ease;
      text-decoration: none;
    }

    .home .calc-key:hover {
      transform: translateY(-2px);
      box-shadow: 0 8px 20px rgba(14, 165, 233, .25);
    }

    .home .calc-key.accent {
      background: linear-gradient(135deg, #0ea5e9, #3b82f6);
      color: #042f49;
      box-shadow: 0 10px 20px rgba(14, 165, 233, .3);
    }

    .home .calc-key.geometry-key {
      padding: 0;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .home .calc-key.geometry-key .key-icon {
      width: auto;
      height: 50px;
    }

    .home .calc-key.subject-key {
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .home .calc-key.subject-key .key-icon {
      width: 26px;
      height: 26px;
      display: block;
    }

    .home .calc-key.subject-key .key-icon--solid {
      fill: currentColor;
    }

    .home .calc-key.subject-key .key-icon--solid-strong {
      stroke: currentColor;
      stroke-width: 1.2;
      paint-order: stroke fill;
    }

    .home .calc-key.subject-key .key-icon--solid-strong * {
      vector-effect: non-scaling-stroke;
    }

    .home .calc-key.subject-key .key-icon--stroke {
      fill: none;
      stroke: currentColor;
      stroke-width: 2.4;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    .home .calc-key.subject-key .key-icon--stroke * {
      vector-effect: non-scaling-stroke;
    }

    .home .calc-key.subject-key::after {
      content: attr(data-label);
      position: absolute;
      left: 50%;
      bottom: calc(100% + 0.45rem);
      transform: translate(-50%, 6px);
      background: rgba(15, 23, 42, .95);
      color: #e2f3ff;
      padding: .35rem .6rem;
      border-radius: .5rem;
      border: 1px solid rgba(148, 163, 184, .35);
      font-size: .75rem;
      line-height: 1.1;
      white-space: normal;
      text-align: center;
      max-width: 160px;
      opacity: 0;
      pointer-events: none;
      box-shadow: 0 10px 24px rgba(15, 23, 42, .35);
      transition: opacity .15s ease, transform .15s ease;
      z-index: 2;
    }

    .home .calc-key.subject-key::before {
      content: "";
      position: absolute;
      left: 50%;
      bottom: calc(100% + 0.2rem);
      transform: translate(-50%, 6px);
      border: 6px solid transparent;
      border-top-color: rgba(15, 23, 42, .95);
      opacity: 0;
      pointer-events: none;
      transition: opacity .15s ease, transform .15s ease;
      z-index: 1;
    }

    .home .calc-key.subject-key:hover::after,
    .home .calc-key.subject-key:focus-visible::after,
    .home .calc-key.subject-key:hover::before,
    .home .calc-key.subject-key:focus-visible::before {
      opacity: 1;
      transform: translate(-50%, 0);
    }

    .home .calc-key a {
      color: inherit;
      text-decoration: none;
      display: block;
    }

    .home .calc-floating {
      position: absolute;
      inset: auto -10% -12% auto;
      width: 40%;
      aspect-ratio: 1 / 1;
      background: radial-gradient(circle at 30% 30%, rgba(14, 165, 233, .2), transparent 55%), linear-gradient(145deg, rgba(56, 189, 248, .08), transparent);
      border-radius: 30%;
      filter: blur(10px);
      animation: floaty 7s ease-in-out infinite alternate;
      pointer-events: none;
    }

    #features-heading {
      padding: 0 10px;
    }

    @keyframes floaty {
      0% {
        transform: translateY(0) rotate(0deg);
        opacity: .75;
      }

      100% {
        transform: translateY(-12px) rotate(3deg);
        opacity: .95;
      }
    }

    @media (max-width: 640px) {
      .home .hero-visual {
        margin-top: 1.5rem;
      }

      .home .calc-shell {
        padding: 1.2rem;
      }

      .home .hero-media {
        display: flex;
        justify-content: center;
        overflow: hidden;
      }

      .home .hero-messages {
        max-width: 100%;
      }
    }

    @media (max-width: 480px) {
      .home .hero-visual {
        max-width: 340px;
        margin-left: auto;
        margin-right: auto;
        font-size: 1rem;
      }

      .home .calc-shell {
        padding: 1rem;
        border-radius: 1rem;
      }

      .home .calc-screen {
        padding: .85rem 1rem;
        min-height: 72px;
        gap: .35rem;
      }

      .home .calc-screen .expr {
        font-size: .9rem;
      }

      .home .calc-screen .result {
        font-size: 1.15rem;
      }

      .home .calc-keys {
        gap: .4rem;
      }

      .home .calc-key {
        padding: .65rem .25rem;
        font-size: .85rem;
      }

      .home .calc-key.subject-key .key-icon {
        width: 22px;
        height: 22px;
      }

      .home .calc-key.geometry-key .key-icon {
        height: 42px;
      }

      .home .calc-floating {
        width: 46%;
        inset: auto -6% -18% auto;
      }

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

      .home .hero-search {
        display: grid;
        grid-template-columns: 1fr;
      }

      .home .hero-search .btn {
        width: 100%;
        text-align: center;
      }

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

    @media (prefers-reduced-motion: reduce) {
      .home .hero-message {
        transition: none;
      }
    }
