html, body {
        margin: 0;
        height: 100%;
        overflow: hidden;
        background: var(--theme-app-bg, #0d1020);
      }
      :root {
        --topbar-h: 52px;
        --preview-bottom-h: min(700px, 42vh);
        --preview-right-w: min(900px, 42vw);
        --console-bottom-h: min(320px, 28vh);
        --console-right-w: min(520px, 30vw);
        --activity-rail-w: 48px;
        --activity-panel-w: 260px;
        --activity-total-w: var(--activity-rail-w);
        --theme-app-bg: #0d1020;
        --theme-editor-bg: #171b31;
        --theme-editor-glow: rgba(108, 140, 255, 0.10);
        --theme-picker-bg: #171b31;
        --theme-picker-input-bg: #0f1327;
        --theme-picker-selected-bg: #26305f;
        --theme-picker-hover-bg: #202846;
        --theme-picker-border: #323a68;
        --theme-text: #eef2ff;
        --theme-muted: #aab3d7;
        --theme-accent: #6c8cff;
        --theme-accent-text: #070b1d;
        --theme-shadow: rgba(0, 0, 0, 0.52);
        --font-mono: "SFMono-Regular", "Cascadia Code", "Consolas", "Liberation Mono", monospace;
        color-scheme: dark;
      }
      :root[data-theme-tone="light"] {
        --theme-app-bg: #eef1ff;
        --theme-editor-bg: #f6f7ff;
        --theme-editor-glow: rgba(68, 91, 214, 0.11);
        --theme-picker-bg: #ffffff;
        --theme-picker-input-bg: #f1f3ff;
        --theme-picker-selected-bg: #dfe5ff;
        --theme-picker-hover-bg: #eef1ff;
        --theme-picker-border: #c8d0f5;
        --theme-text: #20233a;
        --theme-muted: #687092;
        --theme-accent: #445bd6;
        --theme-accent-text: #ffffff;
        --theme-shadow: rgba(30, 38, 46, 0.22);
        color-scheme: light;
      }
      :root[data-theme-tone="dark"] {
        color-scheme: dark;
      }
      @media (prefers-color-scheme: light) {
        :root:not([data-theme-tone]) {
          --theme-app-bg: #eef1ff;
          --theme-editor-bg: #f6f7ff;
          --theme-editor-glow: rgba(68, 91, 214, 0.11);
          --theme-picker-bg: #ffffff;
          --theme-picker-input-bg: #f1f3ff;
          --theme-picker-selected-bg: #dfe5ff;
          --theme-picker-hover-bg: #eef1ff;
          --theme-picker-border: #c8d0f5;
          --theme-text: #20233a;
          --theme-muted: #687092;
          --theme-accent: #445bd6;
          --theme-accent-text: #ffffff;
          --theme-shadow: rgba(30, 38, 46, 0.22);
          color-scheme: light;
        }
      }
      html[data-booting="true"],
      html[data-booting="true"] body {
        background: #eef1ff;
        color-scheme: light;
      }
      html[data-booting="true"] body > :not(#boot-skeleton):not(#legacy-root):not(script) {
        visibility: hidden;
      }
      html[data-booting="true"] #legacy-root > :not(#boot-skeleton):not(script) {
        visibility: hidden;
      }
      #boot-skeleton {
        display: none;
      }
      html[data-booting="true"] #boot-skeleton {
        position: fixed;
        inset: 0;
        z-index: 10000;
        display: block;
        overflow: hidden;
        background: #eef1ff;
        color: #20233a;
        font-family: var(--font-mono);
      }
      .boot-screen {
        width: 100%;
        height: 100%;
        display: none;
      }
      html[data-route-screen="home"] .boot-home {
        display: grid;
        grid-template-rows: 64px 1fr;
      }
      html[data-route-screen="editor"] .boot-editor {
        display: grid;
        grid-template-rows: 52px 1fr;
      }
      .boot-bar {
        display: grid;
        align-items: center;
        gap: 18px;
        padding: 0 24px;
        box-sizing: border-box;
        background: #ffffff;
        border-bottom: 1px solid #c8d0f5;
      }
      .boot-home .boot-bar {
        grid-template-columns: 178px minmax(260px, 1fr) 96px;
      }
      .boot-editor .boot-bar {
        grid-template-columns: 178px minmax(220px, 1fr) 360px;
      }
      .boot-nav,
      .boot-actions {
        display: flex;
        align-items: center;
        gap: 10px;
      }
      .boot-nav {
        justify-content: center;
      }
      .boot-actions {
        justify-content: flex-end;
      }
      .boot-main {
        min-height: 0;
      }
      .boot-home-main {
        display: grid;
        grid-template-columns: minmax(0, 1.05fr) minmax(330px, 0.95fr);
        gap: 44px;
        align-items: center;
        padding: 48px 6vw;
        box-sizing: border-box;
        background: #f7f7f4;
      }
      .boot-home-copy,
      .boot-home-media {
        min-width: 0;
        display: grid;
        gap: 18px;
      }
      .boot-home-cards {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 14px;
        margin-top: 18px;
      }
      .boot-home-card {
        height: 112px;
        border: 1px solid #d9dde2;
        border-radius: 8px;
        background: #ffffff;
      }
      .boot-home-panel {
        height: min(410px, 58vh);
        border: 1px solid #d9dde2;
        border-radius: 10px;
        background: #ffffff;
        box-shadow: 0 18px 44px rgba(30, 38, 46, 0.12);
      }
      .boot-editor-main {
        display: grid;
        grid-template-columns: 48px 260px minmax(360px, 1fr) minmax(320px, 42vw);
        min-height: 0;
        background: #eef1ff;
      }
      .boot-rail,
      .boot-side,
      .boot-code,
      .boot-preview {
        min-height: 0;
        border-right: 1px solid #c8d0f5;
        background: #ffffff;
      }
      .boot-rail {
        display: grid;
        align-content: start;
        justify-items: center;
        gap: 18px;
        padding-top: 12px;
      }
      .boot-side {
        display: grid;
        grid-template-rows: 38px 1fr;
        background: #f1f3ff;
      }
      .boot-side-head {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 0 14px;
        border-bottom: 1px solid #c8d0f5;
      }
      .boot-tree {
        display: grid;
        align-content: start;
        gap: 10px;
        padding: 14px;
      }
      .boot-code {
        display: grid;
        grid-template-columns: 52px 1fr;
        background: #f6f7ff;
      }
      .boot-lines {
        display: grid;
        align-content: start;
        gap: 12px;
        padding: 18px 20px;
      }
      .boot-gutter {
        display: grid;
        align-content: start;
        gap: 12px;
        padding-top: 18px;
        border-right: 1px solid #d6dcf6;
      }
      .boot-gutter .boot-shape {
        justify-self: end;
        margin-right: 13px;
      }
      .boot-preview {
        display: grid;
        grid-template-rows: 34px 1fr;
        border-right: 0;
        border-left: 1px solid #c8d0f5;
      }
      .boot-preview-head {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 0 12px;
        border-bottom: 1px solid #c8d0f5;
        background: #ffffff;
      }
      .boot-canvas {
        margin: 18px;
        border: 1px solid #b6bfdc;
        border-radius: 4px;
        background: #f7f8ff;
      }
      .boot-shape {
        display: block;
        height: 12px;
        border-radius: 999px;
        background:
          linear-gradient(90deg, rgba(198, 207, 240, 0.55), rgba(255, 255, 255, 0.95), rgba(198, 207, 240, 0.55)),
          #dfe5ff;
        background-size: 220% 100%;
        animation: boot-shimmer 1.25s linear infinite;
      }
      .boot-logo { width: 154px; height: 34px; border-radius: 6px; }
      .boot-pill { width: 96px; height: 32px; border-radius: 6px; }
      .boot-title { width: min(350px, 100%); height: 34px; justify-self: center; border-radius: 8px; }
      .boot-icon { width: 28px; height: 28px; border-radius: 6px; }
      .boot-dot { width: 28px; height: 28px; border-radius: 8px; }
      .boot-line-xs { width: 34px; }
      .boot-line-sm { width: 72px; }
      .boot-line-md { width: 44%; }
      .boot-line-lg { width: 72%; }
      .boot-line-xl { width: 92%; height: 18px; border-radius: 5px; }
      .boot-line-hero { width: 88%; height: 52px; border-radius: 8px; }
      .boot-line-hero-short { width: 62%; height: 52px; border-radius: 8px; }
      .boot-indent-1 { margin-left: 24px; }
      .boot-indent-2 { margin-left: 46px; }
      @keyframes boot-shimmer {
        from { background-position: 140% 0; }
        to { background-position: -80% 0; }
      }
      @media (max-width: 900px) {
        .boot-home-main {
          grid-template-columns: 1fr;
          align-content: start;
        }
        .boot-home-media {
          display: none;
        }
        .boot-editor-main {
          grid-template-columns: 48px minmax(0, 1fr);
        }
        .boot-side,
        .boot-preview {
          display: none;
        }
      }
      body.activity-panel-open {
        --activity-total-w: calc(var(--activity-rail-w) + var(--activity-panel-w));
      }
      #app {
        width: calc(100vw - var(--activity-total-w));
        height: calc(100vh - var(--topbar-h));
        margin-left: var(--activity-total-w);
        margin-top: var(--topbar-h);
        display: grid;
        grid-template-areas:
          "editor"
          "split"
          "preview";
        grid-template-rows: minmax(180px, 1fr) 6px var(--preview-bottom-h);
        grid-template-columns: 1fr;
      }
      body.screen-home #app,
      body.screen-home #toolbar,
      body.screen-home #activity-bar,
      body.screen-home #activity-side-panel {
        display: none !important;
      }
      body.screen-home {
        overflow: auto;
      }
      body.screen-editor #home-screen {
        display: none;
      }
      #site-topbar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 35;
        height: var(--topbar-h);
        display: grid;
        grid-template-columns: auto auto minmax(0, 1fr) auto;
        align-items: center;
        gap: 14px;
        padding: 0 16px;
        box-sizing: border-box;
        background: var(--theme-picker-bg, #171b31);
        border-bottom: 1px solid var(--theme-picker-border, #323a68);
        color: var(--theme-text, #eef2ff);
        font-family: var(--font-mono);
      }
      #site-brand {
        min-width: 0;
        display: inline-flex;
        align-items: center;
        gap: 10px;
        color: var(--theme-text, #eef2ff);
        background: transparent;
        border: 0;
        padding: 0;
        font-family: inherit;
        font-size: 12px;
        font-weight: 700;
        white-space: nowrap;
        cursor: pointer;
      }
      .brand-logo {
        display: block;
        width: auto;
        object-fit: contain;
      }
      .brand-asset-auto,
      .brand-asset-fixed-dark,
      .brand-asset {
        display: inline-flex;
        align-items: center;
        min-width: 0;
      }
      .brand-asset-light {
        display: none;
      }
      :root {
        --brand-logo-gradient: linear-gradient(112deg, #7c2d12 0%, #f97316 52%, #fca311 100%);
        --brand-mark-gradient: linear-gradient(135deg, #9a3412 0%, #fb923c 56%, #ffd166 100%);
      }
      body[data-brand-variant="parent"] {
        --brand-logo-gradient: linear-gradient(112deg, #82346d 0%, #c6537d 52%, #ff9f82 100%);
        --brand-mark-gradient: linear-gradient(135deg, #733167 0%, #c6537d 56%, #ffc2a8 100%);
      }
      body[data-brand-variant="studio"] {
        --brand-logo-gradient: linear-gradient(112deg, #126877 0%, #1f999f 54%, #86dfd2 100%);
        --brand-mark-gradient: linear-gradient(135deg, #0f5f72 0%, #21a0a4 58%, #b6f0e5 100%);
      }
      body[data-brand-variant="plans"] {
        --brand-logo-gradient: linear-gradient(112deg, #7c2d12 0%, #f97316 52%, #fca311 100%);
        --brand-mark-gradient: linear-gradient(135deg, #9a3412 0%, #fb923c 56%, #ffd166 100%);
      }
      body[data-brand-variant="legal"] {
        --brand-logo-gradient: linear-gradient(112deg, #315277 0%, #647fb6 55%, #b0c1e9 100%);
        --brand-mark-gradient: linear-gradient(135deg, #2d4c70 0%, #647fb6 58%, #d4def4 100%);
      }
      @supports ((-webkit-mask: url("/brand/qoax-logo.svg")) or (mask: url("/brand/qoax-logo.svg"))) {
        .brand-asset-auto[data-brand-slot] {
          --brand-slot-width: 98px;
          --brand-slot-height: 32px;
          flex: 0 0 auto;
          width: var(--brand-slot-width);
          height: var(--brand-slot-height);
        }
        .brand-asset-auto[data-brand-slot]::before {
          content: "";
          display: block;
          width: 100%;
          height: 100%;
          background: var(--brand-logo-gradient);
          -webkit-mask: url("/brand/qoax-logo.svg") center / contain no-repeat;
          mask: url("/brand/qoax-logo.svg") center / contain no-repeat;
        }
        .brand-asset-auto[data-brand-slot="mark"] {
          --brand-slot-width: 30px;
          --brand-slot-height: 30px;
        }
        .brand-asset-auto[data-brand-slot="mark"]::before {
          background: var(--brand-mark-gradient);
          -webkit-mask-image: url("/brand/qoax-mark.svg");
          mask-image: url("/brand/qoax-mark.svg");
        }
        .brand-asset-auto[data-brand-slot] > picture {
          display: none !important;
        }
        #auth-brand .brand-asset-auto[data-brand-slot="logo"] {
          --brand-slot-width: 104px;
          --brand-slot-height: 34px;
        }
        #welcome-video-media .brand-asset-auto[data-brand-slot="logo"] {
          --brand-slot-width: 132px;
          --brand-slot-height: 44px;
        }
      }
      :root[data-theme-tone="dark"] .brand-asset-auto .brand-asset-dark {
        display: none;
      }
      :root[data-theme-tone="dark"] .brand-asset-auto .brand-asset-light {
        display: inline-flex;
      }
      :root[data-theme-tone="light"] .brand-asset-auto .brand-asset-dark {
        display: inline-flex;
      }
      :root[data-theme-tone="light"] .brand-asset-auto .brand-asset-light {
        display: none;
      }
      #site-brand picture:not(.brand-asset),
      #home-brand-lockup picture:not(.brand-asset),
      #portal-brand-row picture:not(.brand-asset),
      #auth-brand picture:not(.brand-asset),
      #module-picker-brand picture:not(.brand-asset),
      #welcome-video-media picture:not(.brand-asset) {
        display: inline-flex;
        align-items: center;
        min-width: 0;
      }
      .site-brand-logo {
        height: 28px;
        max-width: 96px;
      }
      .brand-mark {
        width: 30px;
        height: 30px;
        display: block;
      }
      .brand-product {
        min-width: 0;
        padding-left: 10px;
        color: var(--theme-muted, #aab3d7);
        border-left: 1px solid var(--theme-picker-border, #323a68);
        font-size: 11px;
        letter-spacing: 0.04em;
        text-transform: uppercase;
        overflow: hidden;
        text-overflow: ellipsis;
      }
      body.portal-school .brand-product,
      body.portal-parent .brand-product {
        color: var(--theme-muted, #aab3d7);
      }
      #site-nav {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        min-width: 0;
      }
      .top-action {
        height: 32px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 7px;
        color: var(--theme-text, #eef2ff);
        background: transparent;
        border: 1px solid transparent;
        border-radius: 6px;
        padding: 0 10px;
        font-family: inherit;
        font-size: 12px;
        font-weight: 700;
        text-decoration: none;
        cursor: pointer;
      }
      .top-action:hover,
      .top-action.top-action-primary {
        color: var(--theme-accent-text, #070b1d);
        background: var(--theme-accent, #6c8cff);
        border-color: var(--theme-accent, #6c8cff);
      }
      #project-title-wrap {
        min-width: 0;
        display: none;
        align-items: center;
        justify-content: center;
        gap: 7px;
      }
      body.screen-editor #project-title-wrap {
        display: flex;
      }
      body.screen-home #project-title-wrap,
      body.screen-home #share-btn {
        display: none;
      }
      body.screen-home #site-nav {
        justify-content: flex-start;
      }
      body.screen-editor #site-topbar {
        grid-template-columns: minmax(92px, max-content) minmax(0, 1fr) max-content;
      }
      body.screen-editor #site-nav {
        display: none;
      }
      body.screen-editor #mobile-nav-toggle {
        display: none !important;
      }
      body.screen-editor .brand-product {
        display: none;
      }
      body.screen-editor #project-title-wrap {
        grid-column: 2;
        align-items: center;
        min-width: 0;
        justify-self: stretch;
      }
      body.screen-editor #site-account {
        grid-column: 3;
        max-width: min(520px, 42vw);
      }
      body.screen-editor #share-btn {
        flex: 0 0 auto;
        color: var(--theme-text, #eef2ff);
        background: var(--theme-picker-bg, #202846);
        border-color: var(--theme-picker-border, #323a68);
      }
      body.screen-editor #share-btn:hover {
        color: var(--theme-accent, #6c8cff);
        border-color: var(--theme-accent, #6c8cff);
      }
      #project-title {
        width: min(360px, 100%);
        min-width: 0;
        height: 32px;
        box-sizing: border-box;
        color: var(--theme-text, #eef2ff);
        background: var(--theme-picker-input-bg, #0f1327);
        border: 1px solid var(--theme-picker-border, #323a68);
        border-radius: 7px;
        padding: 0 12px;
        font-family: inherit;
        font-size: 12px;
        font-weight: 700;
        text-align: center;
        outline: none;
      }
      #project-title:focus {
        border-color: var(--theme-accent, #6c8cff);
      }
      #save-status {
        position: relative;
        flex: 0 0 auto;
        width: 18px;
        height: 18px;
        display: inline-grid;
        place-items: center;
        overflow: visible;
      }
      #save-status::before {
        content: "";
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: var(--theme-muted, #687092);
        box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-muted, #687092) 16%, transparent);
      }
      #save-status[data-state="saved"]::before {
        content: "✓";
        width: 16px;
        height: 16px;
        border-radius: 50%;
        display: grid;
        place-items: center;
        color: var(--theme-accent-text, #ffffff);
        background: var(--theme-accent, #445bd6);
        box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-accent, #445bd6) 18%, transparent);
        font-size: 11px;
        font-weight: 800;
        line-height: 1;
      }
      #save-status[data-state="saving"]::before,
      #save-status[data-state="opening"]::before {
        background: #6c8cff;
        box-shadow: 0 0 0 3px rgba(108, 140, 255, 0.18);
        animation: save-pulse 0.8s ease-in-out infinite alternate;
      }
      #save-status[data-state="dirty"]::before {
        background: #a995ff;
        box-shadow: 0 0 0 3px rgba(169, 149, 255, 0.18);
      }
      #save-status[data-state="local"]::before,
      #save-status[data-state="new"]::before,
      #save-status[data-state="failed"]::before {
        background: #d9a641;
        box-shadow: 0 0 0 3px rgba(217, 166, 65, 0.18);
      }
      @keyframes save-pulse {
        from { transform: scale(0.82); opacity: 0.62; }
        to { transform: scale(1.08); opacity: 1; }
      }
      #site-account {
        position: relative;
        display: inline-flex;
        align-items: center;
        justify-content: flex-end;
        gap: 8px;
        min-width: 0;
        white-space: nowrap;
      }
      #home-screen {
        min-height: 100vh;
        box-sizing: border-box;
        padding: calc(var(--topbar-h) + 42px) 28px 54px;
        color: var(--theme-text, #eef2ff);
        background:
          radial-gradient(circle at 78% 30%, rgba(108, 140, 255, 0.16), transparent 28%),
          radial-gradient(circle at 16% 12%, rgba(242, 201, 109, 0.14), transparent 30%),
          var(--theme-app-bg, #0d1020);
        font-family: var(--font-mono);
      }
      #home-inner {
        width: min(1160px, calc(100vw - 56px));
        margin: 0 auto;
        display: grid;
        gap: 28px;
      }
      #home-hero {
        min-height: 420px;
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(300px, 440px);
        align-items: center;
        gap: 38px;
      }
      #home-copy {
        display: grid;
        gap: 20px;
      }
      #home-brand-lockup {
        display: flex;
        align-items: center;
        gap: 12px;
      }
      #home-brand-lockup .brand-logo {
        height: 52px;
        max-width: 158px;
      }
      #home-brand-lockup .brand-product {
        font-size: 15px;
      }
      #home-kicker {
        color: var(--theme-accent, #6c8cff);
        font-size: 12px;
        font-weight: 700;
        letter-spacing: 0.08em;
        text-transform: uppercase;
      }
      #home-title {
        margin: 0;
        max-width: 760px;
        color: var(--theme-text, #eef2ff);
        font-size: clamp(34px, 5vw, 62px);
        line-height: 1.08;
        letter-spacing: 0;
      }
      #home-subtitle {
        max-width: 650px;
        color: var(--theme-muted, #aab3d7);
        font-size: 16px;
        line-height: 1.65;
      }
      #home-starts {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 12px;
      }
      #audience-links {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 12px;
        color: var(--theme-muted, #aab3d7);
        font-size: 12px;
      }
      #audience-links a {
        color: var(--theme-accent, #6c8cff);
        text-decoration: none;
        border-bottom: 1px solid color-mix(in srgb, var(--theme-accent, #6c8cff) 55%, transparent);
      }
      #audience-links a:hover {
        color: var(--theme-text, #eef2ff);
      }
      .home-start-card {
        min-height: 112px;
        display: grid;
        align-content: center;
        gap: 8px;
        padding: 16px;
        color: var(--theme-text, #eef2ff);
        background: var(--theme-picker-bg, #171b31);
        border: 1px solid var(--theme-picker-border, #323a68);
        border-radius: 8px;
        font-family: inherit;
        text-align: left;
        cursor: pointer;
        box-shadow: 0 12px 34px var(--theme-shadow, rgba(0, 0, 0, 0.26));
      }
      .home-start-card:hover {
        border-color: var(--theme-accent, #6c8cff);
      }
      .home-start-card strong {
        font-size: 15px;
        color: var(--theme-accent, #6c8cff);
      }
      .home-start-card span {
        color: var(--theme-muted, #aab3d7);
        font-size: 11.5px;
        line-height: 1.45;
      }
      #home-preview {
        min-height: 310px;
        display: grid;
        place-items: center;
        background: var(--theme-picker-bg, #171b31);
        border: 1px solid var(--theme-picker-border, #323a68);
        border-radius: 10px;
        box-shadow: 0 20px 60px var(--theme-shadow, rgba(0, 0, 0, 0.34));
      }
      #intro-card {
        width: min(330px, 90%);
        aspect-ratio: 16 / 10;
        display: grid;
        place-items: center;
        background:
          linear-gradient(135deg, rgba(108, 140, 255, 0.32), rgba(242, 201, 109, 0.18)),
          var(--theme-editor-bg, #171b31);
        border: 1px solid var(--theme-picker-border, #323a68);
        border-radius: 9px;
      }
      #intro-card button {
        width: 76px;
        height: 76px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: var(--theme-accent-text, #070b1d);
        background: var(--theme-accent, #6c8cff);
        border: 0;
        border-radius: 50%;
        cursor: pointer;
      }
      #portal-card {
        display: none;
        width: min(820px, 100%);
        margin: 20px auto 0;
        grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
        gap: 26px;
        align-items: center;
        padding: 30px;
        box-sizing: border-box;
        color: #424242;
        background: #f8f8f8;
        border-radius: 8px;
        box-shadow: 0 18px 48px rgba(20, 92, 130, 0.18);
      }
      body.portal-parent #portal-card,
      body.portal-school #portal-card {
        display: grid;
      }
      body.portal-parent #home-hero,
      body.portal-school #home-hero {
        grid-template-columns: 1fr;
        min-height: auto;
      }
      body.portal-parent #home-starts,
      body.portal-school #home-starts,
      body.portal-parent #home-preview,
      body.portal-school #home-preview {
        display: none;
      }
      #portal-card h2 {
        margin: 0 0 10px;
        font-size: 32px;
        letter-spacing: 0;
      }
      #portal-brand-row {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-bottom: 14px;
      }
      #portal-brand-row .brand-logo {
        height: 34px;
        max-width: 112px;
      }
      #portal-brand-row .brand-product {
        color: #68717b;
        border-left-color: #d6dce8;
        font-size: 13px;
      }
      #portal-card p {
        margin: 0;
        color: #68717b;
        line-height: 1.55;
      }
      .portal-actions {
        display: grid;
        gap: 10px;
      }
      .portal-login-primary,
      .google-login-btn {
        height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 12px;
        border-radius: 5px;
        border: 1px solid var(--landing-accent, #4d63d8);
        font-family: inherit;
        font-size: 13px;
        font-weight: 700;
        cursor: pointer;
      }
      .portal-login-primary {
        color: #ffffff;
        background: var(--landing-accent, #4d63d8);
      }
      .google-login-btn {
        color: #ffffff;
        background: #4285f4;
        padding: 0 16px 0 10px;
        box-shadow: 0 10px 24px rgba(66, 133, 244, 0.22);
      }
      .google-login-btn::before {
        content: "G";
        width: 26px;
        height: 26px;
        flex: 0 0 26px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: #4285f4;
        background: #ffffff;
        border-radius: 50%;
        font-family: Arial, Helvetica, sans-serif;
        font-size: 15px;
        font-weight: 800;
        line-height: 1;
      }
      .google-login-btn:hover {
        background: #3367d6;
        border-color: #3367d6;
        box-shadow: 0 12px 28px rgba(66, 133, 244, 0.3);
      }
      .auth-google {
        min-width: 230px;
      }
      #welcome-video-overlay {
        position: fixed;
        inset: 0;
        z-index: 55;
        display: none;
        align-items: center;
        justify-content: center;
        padding: 22px;
        background: rgba(5, 8, 7, 0.72);
        font-family: var(--font-mono);
      }
      #welcome-video-overlay.video-visible {
        display: flex;
      }
      #welcome-video-card {
        width: min(620px, 92vw);
        overflow: hidden;
        color: var(--theme-text, #eef2ff);
        background: var(--theme-picker-bg, #171b31);
        border: 1px solid var(--theme-picker-border, #323a68);
        border-radius: 10px;
        box-shadow: 0 24px 70px var(--theme-shadow, rgba(0, 0, 0, 0.52));
      }
      #welcome-video-media {
        position: relative;
        aspect-ratio: 16 / 9;
        display: grid;
        place-items: center;
        background:
          linear-gradient(135deg, rgba(108, 140, 255, 0.30), rgba(169, 149, 255, 0.20)),
          var(--theme-editor-bg, #171b31);
      }
      .welcome-video-logo {
        position: absolute;
        top: 22px;
        left: 22px;
        height: 42px;
        width: auto;
        max-width: 142px;
      }
      #welcome-video-media button {
        width: 72px;
        height: 72px;
        color: var(--theme-accent-text, #070b1d);
        background: var(--theme-accent, #6c8cff);
        border: 0;
        border-radius: 50%;
        font-size: 24px;
        cursor: pointer;
      }
      #welcome-video-body {
        display: grid;
        gap: 12px;
        padding: 16px;
      }
      #welcome-video-body h2 {
        margin: 0;
        font-size: 18px;
      }
      #welcome-video-body p {
        margin: 0;
        color: var(--theme-muted, #aab3d7);
        font-size: 12px;
        line-height: 1.55;
      }
      #welcome-video-close {
        justify-self: end;
      }
      #editor {
        grid-area: editor;
        width: 100%;
        height: 100%;
        min-height: 0;
        background-color: var(--theme-editor-bg, #171b31);
        background-image:
          radial-gradient(circle at 12% 0%, var(--theme-editor-glow, rgba(108, 140, 255, 0.10)), transparent 45%);
      }
      #qblocks-editor {
        grid-area: editor;
        min-height: 0;
        display: none;
        grid-template-columns: minmax(190px, 260px) minmax(0, 1fr);
        gap: 0;
        background:
          radial-gradient(circle at 12% 0%, rgba(255, 122, 200, 0.10), transparent 42%),
          var(--theme-editor-bg, #171b31);
        color: var(--theme-text, #eef2ff);
        font-family: var(--font-mono);
        overflow: hidden;
      }
      body.qoax-blocks-editor-active #editor {
        display: none;
      }
      body.qoax-blocks-editor-active #qblocks-editor {
        display: grid;
      }
      body.qoax-blocks-editor-active #activity-search-btn,
      body.qoax-blocks-editor-active #activity-console-btn {
        display: none;
      }
      body.preview-mode-tab.qoax-blocks-editor-active #qblocks-editor,
      body.console-mode-tab.qoax-blocks-editor-active #qblocks-editor {
        display: none;
      }
      #qblocks-palette-shell {
        min-width: 0;
        display: grid;
        grid-template-rows: auto 1fr;
        gap: 12px;
        padding: 18px 14px 20px;
        border-right: 1px solid var(--theme-picker-border, #323a68);
        background:
          linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.00)),
          rgba(15, 19, 39, 0.82);
        overflow: hidden;
      }
      #qblocks-palette-shell h2,
      #qblocks-workspace-shell h2 {
        margin: 0;
        color: var(--theme-text, #eef2ff);
        font-size: 13px;
        letter-spacing: 0.08em;
        text-transform: uppercase;
      }
      #qblocks-workspace-shell h2 {
        color: #202845;
      }
      #qblocks-palette {
        min-height: 0;
        display: flex;
        flex-direction: column;
        gap: 14px;
        overflow: auto;
      }
      .qblocks-palette-group {
        display: grid;
        gap: 8px;
        scroll-margin-top: 12px;
        border-radius: 16px;
        transition: background 0.18s ease, box-shadow 0.18s ease;
      }
      .qblocks-palette-group-active {
        background: color-mix(in srgb, var(--theme-accent, #6c8cff) 10%, transparent);
        box-shadow: 0 0 0 8px color-mix(in srgb, var(--theme-accent, #6c8cff) 10%, transparent);
      }
      .qblocks-palette-group h3 {
        margin: 0;
        color: var(--theme-muted, #aab3d7);
        font-size: 10px;
        letter-spacing: 0.08em;
        text-transform: uppercase;
      }
      .qblocks-palette-block,
      .qblocks-workspace-block {
        min-height: 44px;
        position: relative;
        box-sizing: border-box;
        padding: 11px 14px 12px 20px;
        color: #fff;
        background: #4f7cff;
        border: 0;
        border-radius: 18px 12px 12px 18px;
        box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.18);
        font-family: inherit;
        font-size: 11px;
        font-weight: 800;
        text-align: left;
      }
      .qblocks-palette-block {
        min-width: 0;
        cursor: pointer;
        transition: transform 0.12s ease, filter 0.15s ease;
      }
      .qblocks-palette-block::before,
      .qblocks-palette-block::after {
        content: "";
        position: absolute;
        left: 38px;
        width: 32px;
        height: 10px;
        background: inherit;
        pointer-events: none;
      }
      .qblocks-palette-block::before {
        top: -1px;
        border-radius: 0 0 9px 9px;
        box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.12);
      }
      .qblocks-palette-block::after {
        bottom: -8px;
        border-radius: 0 0 9px 9px;
        box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.18);
      }
      .qblocks-palette-block:hover,
      .qblocks-palette-block:focus-visible {
        transform: translateX(2px);
        filter: brightness(1.08);
      }
      .qblocks-palette-block[data-category="looks"],
      .qblocks-workspace-block[data-category="looks"] {
        background: #9b6cff;
      }
      .qblocks-palette-block[data-category="events"],
      .qblocks-workspace-block[data-category="events"] {
        background: #f0a831;
        color: #17132f;
      }
      .qblocks-palette-block[data-category="control"],
      .qblocks-workspace-block[data-category="control"] {
        background: #ff8c2f;
        color: #17132f;
      }
      .qblocks-palette-block[data-category="sensing"],
      .qblocks-workspace-block[data-category="sensing"] {
        background: #2dd4bf;
        color: #061111;
      }
      .qblocks-palette-block[data-category="variables"],
      .qblocks-workspace-block[data-category="variables"] {
        background: #f59e0b;
        color: #17132f;
      }
      #qblocks-workspace-shell {
        min-width: 0;
        min-height: 0;
        display: grid;
        grid-template-rows: auto 1fr auto;
        gap: 12px;
        padding: 18px 18px 14px;
        background:
          linear-gradient(135deg, rgba(108, 140, 255, 0.12), rgba(255, 255, 255, 0.00) 40%),
          #f7f8ff;
        overflow: hidden;
      }
      #qblocks-workspace-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
      }
      #qblocks-workspace-actions {
        min-width: 0;
        display: inline-flex;
        align-items: center;
        justify-content: flex-end;
        gap: 10px;
      }
      #qblocks-status {
        color: #68718f;
        font-size: 11px;
      }
      #qblocks-zoom-controls {
        display: inline-flex;
        align-items: center;
        overflow: hidden;
        border: 1px solid #cad4ff;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.82);
        box-shadow: 0 8px 18px rgba(38, 49, 99, 0.10);
      }
      #qblocks-zoom-controls button {
        min-width: 38px;
        min-height: 38px;
        color: #202845;
        background: transparent;
        border: 0;
        border-right: 1px solid #d6ddff;
        font-family: inherit;
        font-size: 15px;
        font-weight: 900;
        cursor: pointer;
      }
      #qblocks-zoom-controls button:last-child {
        border-right: 0;
      }
      #qblocks-zoom-controls button:disabled {
        cursor: not-allowed;
        opacity: 0.42;
      }
      #qblocks-zoom-label {
        min-width: 56px;
        color: #657095;
        font-size: 11px;
        font-weight: 900;
        text-align: center;
      }
      #qblocks-workspace {
        --qblocks-workspace-zoom: 1;
        min-height: 0;
        position: relative;
        overflow: auto;
        border: 1px solid #cad4ff;
        border-radius: 20px;
        background:
          linear-gradient(rgba(88, 112, 190, 0.07) 1px, transparent 1px),
          linear-gradient(90deg, rgba(88, 112, 190, 0.07) 1px, transparent 1px),
          radial-gradient(circle at 20% 8%, rgba(108, 140, 255, 0.12), transparent 34%),
          #ffffff;
        background-size: 28px 28px, 28px 28px, auto, auto;
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
      }
      .qblocks-canvas-stage {
        width: max-content;
        min-width: calc(1200px * var(--qblocks-workspace-zoom));
        min-height: calc(900px * var(--qblocks-workspace-zoom));
      }
      .qblocks-canvas-content {
        position: relative;
        width: 1200px;
        min-height: 900px;
        box-sizing: border-box;
        transform: scale(var(--qblocks-workspace-zoom));
        transform-origin: top left;
      }
      .qblocks-script {
        position: absolute;
        width: min(420px, calc(100vw - 120px));
        min-width: 300px;
        touch-action: none;
        transition: filter 0.12s ease;
      }
      .qblocks-script-dragging {
        filter: drop-shadow(0 16px 24px rgba(38, 49, 99, 0.18));
        z-index: 20;
      }
      .qblocks-hat {
        min-height: 48px;
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 0 18px;
        color: #fff;
        border-radius: 24px 24px 10px 10px;
        box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.18), 0 10px 20px rgba(38, 49, 99, 0.12);
        font-size: 13px;
        font-weight: 900;
        letter-spacing: 0.02em;
        cursor: grab;
        user-select: none;
      }
      .qblocks-hat:active {
        cursor: grabbing;
      }
      .qblocks-hat-green {
        background: linear-gradient(180deg, #32d160, #21a84d);
      }
      .qblocks-hat-event {
        color: #17132f;
        background: linear-gradient(180deg, #ffd46a, #f0a831);
      }
      .qblocks-hat-icon {
        width: 24px;
        height: 24px;
        flex: 0 0 auto;
        fill: currentColor;
        stroke: currentColor;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
      }
      .qblocks-hat-icon circle {
        fill: none;
      }
      .qblocks-workspace-block {
        width: 100%;
        display: block;
        margin: -1px 0 0;
        border-radius: 18px 12px 12px 18px;
        cursor: grab;
        box-shadow:
          inset 0 -3px 0 rgba(0, 0, 0, 0.18),
          0 8px 14px rgba(38, 49, 99, 0.10);
      }
      .qblocks-workspace-block:active {
        cursor: grabbing;
      }
      .qblocks-workspace-block::before,
      .qblocks-workspace-block::after {
        content: "";
        position: absolute;
        left: 44px;
        width: 36px;
        height: 12px;
        background: inherit;
        pointer-events: none;
      }
      .qblocks-workspace-block::before {
        top: -1px;
        border-radius: 0 0 10px 10px;
        box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.12);
      }
      .qblocks-workspace-block::after {
        bottom: -10px;
        border-radius: 0 0 10px 10px;
        box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.18);
      }
      .qblocks-stack {
        display: grid;
        gap: 0;
        padding: 0 0 8px;
      }
      .qblocks-snap-slot {
        min-height: 2px;
        margin: -1px 0;
        border-radius: 999px;
        transition: min-height 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
      }
      .qblocks-snap-slot-active {
        min-height: 30px;
        margin: 4px 0;
        background: rgba(242, 201, 109, 0.28);
        box-shadow: inset 0 0 0 2px #f2c96d;
      }
      .qblocks-block-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
      }
      .qblocks-block-controls {
        display: inline-flex;
        gap: 4px;
        opacity: 0.72;
        transition: opacity 0.12s ease;
      }
      .qblocks-workspace-block:hover .qblocks-block-controls,
      .qblocks-workspace-block:focus-within .qblocks-block-controls {
        opacity: 1;
      }
      .qblocks-block-controls button {
        width: 30px;
        height: 30px;
        color: inherit;
        background: rgba(255, 255, 255, 0.16);
        border: 1px solid rgba(255, 255, 255, 0.20);
        border-radius: 10px;
        font-family: inherit;
        font-weight: 900;
        cursor: pointer;
      }
      .qblocks-block-inputs {
        display: flex;
        flex-wrap: wrap;
        gap: 7px;
        margin-top: 9px;
      }
      .qblocks-block-input {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        color: inherit;
        font-size: 10px;
      }
      .qblocks-block-field {
        width: 82px;
        min-height: 28px;
        box-sizing: border-box;
        color: #17132f;
        background: rgba(255, 255, 255, 0.94);
        border: 1px solid rgba(255, 255, 255, 0.35);
        border-radius: 999px;
        padding: 0 8px;
        font-family: inherit;
        font-size: 10px;
        font-weight: 900;
        outline: none;
      }
      .qblocks-block-field-number,
      .qblocks-block-field-text,
      .qblocks-block-field-variable,
      .qblocks-block-field-select {
        border-radius: 999px;
      }
      .qblocks-block-field-color {
        width: 56px;
        height: 36px;
        padding: 2px;
        border-radius: 999px;
      }
      .qblocks-block-field:focus-visible,
      .qblocks-block-controls button:focus-visible,
      #qblocks-sync-btn:focus-visible,
      #qblocks-zoom-controls button:focus-visible {
        outline: 2px solid #f2c96d;
        outline-offset: 2px;
      }
      .qblocks-block-custom-code {
        display: block;
        margin-top: 8px;
        color: rgba(255, 255, 255, 0.82);
        font-size: 10px;
        white-space: pre-wrap;
      }
      .qblocks-empty {
        margin: 4px 0 10px;
        padding: 14px 16px;
        color: #68718f;
        border: 1px dashed #cad4ff;
        border-radius: 14px;
        background: rgba(255, 255, 255, 0.68);
        font-size: 11px;
        line-height: 1.45;
      }
      .qblocks-forever-hint {
        margin-top: 8px;
        padding: 14px 16px;
        color: #78531b;
        border: 1px dashed #f0a831;
        border-radius: 16px;
        background: rgba(255, 212, 106, 0.20);
        font-size: 11px;
        font-weight: 900;
        cursor: pointer;
      }
      .qblocks-c-block {
        padding-bottom: 16px;
      }
      .qblocks-c-mouth {
        margin: 12px 0 0 28px;
        padding: 6px 0 2px 18px;
        border-left: 12px solid rgba(23, 19, 47, 0.18);
        border-radius: 0 0 0 18px;
      }
      .qblocks-c-mouth .qblocks-stack {
        gap: 0;
      }
      #qblocks-code-panel {
        border: 1px solid var(--theme-picker-border, #323a68);
        border-radius: 12px;
        background: rgba(7, 11, 21, 0.72);
        overflow: hidden;
      }
      #qblocks-code-panel summary {
        min-height: 38px;
        display: flex;
        align-items: center;
        padding: 0 12px;
        color: var(--theme-muted, #aab3d7);
        cursor: pointer;
        font-size: 11px;
        font-weight: 800;
      }
      #qblocks-code-tools {
        display: flex;
        justify-content: flex-end;
        padding: 0 10px 10px;
      }
      #qblocks-sync-btn {
        height: 28px;
        padding: 0 10px;
        color: #17132f;
        background: #f2c96d;
        border: 0;
        border-radius: 8px;
        font-family: inherit;
        font-size: 10px;
        font-weight: 900;
        cursor: pointer;
      }
      #qblocks-source-input {
        width: 100%;
        height: 190px;
        box-sizing: border-box;
        display: block;
        resize: vertical;
        padding: 12px;
        color: #dbe3ff;
        background: #070b15;
        border: 0;
        border-top: 1px solid var(--theme-picker-border, #323a68);
        font-family: var(--font-mono);
        font-size: 12px;
        line-height: 1.55;
        outline: none;
      }
      @media (max-width: 760px) {
        #qblocks-editor {
          grid-template-columns: 1fr;
          grid-template-rows: auto minmax(0, 1fr);
        }
        #qblocks-palette-shell {
          border-right: 0;
          border-bottom: 1px solid var(--theme-picker-border, #323a68);
        }
        #qblocks-palette {
          flex-direction: row;
          overflow-x: auto;
        }
        .qblocks-palette-group {
          display: flex;
          align-items: center;
          gap: 8px;
        }
        .qblocks-palette-group h3 {
          min-width: max-content;
        }
        .qblocks-palette-block {
          flex: 0 0 auto;
          min-width: 150px;
        }
        #qblocks-workspace-head {
          align-items: flex-start;
          flex-direction: column;
        }
        #qblocks-workspace-actions {
          width: 100%;
          justify-content: space-between;
        }
        .qblocks-canvas-stage {
          min-width: calc(980px * var(--qblocks-workspace-zoom));
          min-height: calc(860px * var(--qblocks-workspace-zoom));
        }
        .qblocks-canvas-content {
          width: 980px;
          min-height: 860px;
        }
        .qblocks-script {
          width: 340px;
          min-width: 300px;
        }
      }
      #preview-split {
        grid-area: split;
        display: block;
        background: #202846;
        cursor: row-resize;
        transition: background 0.12s ease;
      }
      #preview-split:hover,
      #preview-split.preview-dragging { background: #6c8cff; }
      #preview-shell {
        grid-area: preview;
        container-type: inline-size;
        min-height: 0;
        display: grid;
        grid-template-rows: 30px 1fr;
        background: #0d1020;
        border-top: 1px solid #323a68;
      }
      #preview-bar {
        position: relative;
        display: flex;
        align-items: center;
        gap: 8px;
        min-width: 0;
        overflow: visible;
        padding: 0 12px;
        font-family: var(--font-mono);
        font-size: 11px;
        color: #aab3d7;
        background: #0f1327;
        border-bottom: 1px solid #202846;
      }
      body.preview-mode-hidden #preview-bar {
        cursor: row-resize;
        border-bottom: 0;
      }
      #preview-bar.preview-header-dragging {
        cursor: row-resize;
      }
      #preview-title {
        flex: 0 1 auto;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        color: #eef2ff;
        font-weight: 700;
      }
      #preview-status {
        flex: 1 1 52px;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      #preview-status.preview-error { color: #f0a0a0; }
      #preview-input-status {
        display: flex;
        flex: 0 0 auto;
        align-items: center;
        gap: 12px;
        min-width: 0;
        margin-right: 4px;
        color: #c5cce6;
        font: inherit;
        white-space: nowrap;
      }
      #preview-input-status[hidden] { display: none; }
      .preview-input-part { display: inline-flex; align-items: center; gap: 5px; min-width: 0; }
      .preview-input-part svg { flex: none; width: 13px; height: 13px; }
      .preview-input-prefix { color: #aab3d7; }
      .preview-compact-label { display: none; }
      [data-arcade-label], [data-arcade-short] {
        flex: none;
        overflow: hidden;
        text-overflow: ellipsis;
      }
      [data-arcade-label] { inline-size: 12ch; }
      #preview-input-status[data-arcade="active"] .preview-arcade { color: #a7dfce; }
      #preview-input-status[data-arcade="warning"] .preview-arcade { color: #f1d298; }
      body[data-input-focus="code"] #editor { outline: 1px solid #8899e8; outline-offset: -1px; }
      body[data-input-focus="game"] #preview-frame { outline: 1px solid #8899e8; outline-offset: -1px; }
      #preview-build-btn {
        flex: 0 0 auto;
        height: 24px;
        display: none;
        align-items: center;
        justify-content: center;
        padding: 0 10px;
        color: #ffffff;
        background: #465fd7;
        border: 1px solid #6478e3;
        border-radius: 6px;
        font-family: var(--font-mono);
        font-size: 10px;
        font-weight: 700;
        cursor: pointer;
        transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
      }
      body.preview-kind-terminal #preview-build-btn {
        display: inline-flex;
      }
      body.preview-kind-terminal #preview-bar {
        gap: 6px;
        padding-inline: 8px;
      }
      body.preview-kind-terminal #preview-title {
        flex: 0 1 auto;
        max-width: min(18ch, 42%);
      }
      body.preview-kind-terminal #preview-status {
        flex: 1 1 auto;
      }
      #preview-build-btn:hover {
        background: #536eed;
        border-color: #8090f0;
      }
      #preview-build-btn:active {
        transform: translateY(1px);
      }
      #preview-build-btn:disabled {
        opacity: 0.55;
        pointer-events: none;
      }
      #preview-refresh-btn {
        flex: 0 0 auto;
        width: 26px;
        height: 24px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: #eef2ff;
        background: #202846;
        border: 1px solid #323a68;
        border-radius: 6px;
        cursor: pointer;
        transition: border-color 0.15s ease, color 0.15s ease, transform 0.12s ease;
      }
      #preview-refresh-btn:hover {
        color: #2dd4bf;
        border-color: rgba(45, 212, 191, 0.58);
      }
      #preview-refresh-btn:active {
        transform: translateY(1px);
      }
      #preview-refresh-btn:disabled {
        opacity: 0.42;
        pointer-events: none;
      }
      #preview-zoom-controls {
        flex: 0 0 auto;
        height: 24px;
        display: inline-flex;
        align-items: center;
        overflow: hidden;
        border: 1px solid #323a68;
        border-radius: 6px;
        background: #202846;
      }
      .preview-zoom-btn {
        width: 26px;
        height: 22px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: #eef2ff;
        background: transparent;
        border: 0;
        padding: 0;
        font-family: var(--font-mono);
        font-size: 15px;
        font-weight: 700;
        line-height: 1;
        cursor: pointer;
      }
      .preview-zoom-btn:hover {
        color: #6c8cff;
        background: #171b31;
      }
      .preview-zoom-btn:disabled {
        opacity: 0.42;
        pointer-events: none;
      }
      #preview-zoom-label {
        min-width: 44px;
        height: 22px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: #aab3d7;
        border-inline: 1px solid #323a68;
        font-size: 10px;
        font-weight: 700;
        user-select: none;
      }
      #preview-menu-btn {
        flex: 0 0 auto;
        width: 26px;
        height: 24px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: #eef2ff;
        background: #202846;
        border: 1px solid #323a68;
        border-radius: 6px;
        cursor: pointer;
        transition: border-color 0.15s ease, color 0.15s ease;
      }
      #preview-menu-btn:hover,
      #preview-menu-btn.preview-menu-open {
        color: #6c8cff;
        border-color: #2f5148;
      }
      #preview-menu {
        position: absolute;
        top: 28px;
        right: 8px;
        z-index: 30;
        display: none;
        min-width: 150px;
        padding: 6px;
        background: #171b31;
        border: 1px solid #323a68;
        border-radius: 8px;
        box-shadow: 0 16px 38px rgba(0, 0, 0, 0.4);
      }
      body.preview-mode-hidden #preview-menu {
        top: auto;
        bottom: calc(100% + 6px);
        box-shadow: 0 -16px 38px rgba(0, 0, 0, 0.4);
      }
      #preview-menu.preview-menu-open { display: grid; gap: 4px; }
      .preview-menu-item {
        height: 30px;
        display: grid;
        grid-template-columns: 18px 1fr;
        align-items: center;
        gap: 8px;
        padding: 0 8px;
        color: #eef2ff;
        background: transparent;
        border: 1px solid transparent;
        border-radius: 6px;
        font-family: var(--font-mono);
        font-size: 11px;
        text-align: left;
        cursor: pointer;
      }
      .preview-menu-item:hover,
      .preview-menu-item.preview-choice-on {
        color: #6c8cff;
        background: #202846;
        border-color: #323a68;
      }
      .preview-menu-item svg {
        justify-self: center;
        display: block;
      }
      .preview-menu-item:disabled,
      #preview-menu-btn:disabled {
        opacity: 0.45;
        pointer-events: none;
      }
      @container (max-width: 520px) {
        #preview-bar {
          gap: 6px;
          padding: 0 7px;
        }
        #preview-status {
          display: none;
        }
        #preview-input-status { gap: 8px; margin-right: auto; font-size: 11px; }
        #preview-input-status .preview-input-part svg { display: none; }
        #preview-input-status .preview-input-part { gap: 4px; }
        #preview-input-status .preview-full-label { display: none; }
        #preview-input-status .preview-compact-label { display: inline; }
        #preview-input-status [data-arcade-short] { inline-size: 8ch; }
        #preview-zoom-label {
          min-width: 36px;
        }
        .preview-zoom-btn {
          width: 24px;
        }
      }
      @container (max-width: 360px) {
        #preview-bar { gap: 4px; }
        #preview-input-status { flex: 0 0 auto; }
        #preview-input-status .preview-input-part { flex: none; }
        #preview-title {
          display: none;
        }
        #preview-zoom-label { min-width: 28px; }
        .preview-zoom-btn { width: 22px; }
        body.preview-kind-terminal #preview-title {
          display: none;
        }
      }
      @container (max-width: 320px) {
        #preview-input-status { display: none; }
      }
      #preview-frame {
        width: 100%;
        height: 100%;
        min-height: 0;
        display: block;
        border: 0;
        background: #0d1020;
      }
      #preview-terminal {
        width: 100%;
        height: 100%;
        min-height: 0;
        display: none;
        margin: 0;
        padding: 14px 16px;
        overflow: auto;
        color: #dbe3ff;
        background: #080b16;
        border: 0;
        border-top: 1px solid #202846;
        font-family: var(--font-mono);
        font-size: 12px;
        line-height: 1.55;
        white-space: pre-wrap;
      }
      .preview-terminal-system {
        color: #8f98bd;
      }
      .preview-terminal-stderr {
        color: #ff9aa8;
      }
      .preview-terminal-stdin {
        color: #f2c96d;
      }
      .preview-terminal-input-wrap {
        display: inline-flex;
        min-width: min(34ch, 100%);
        vertical-align: baseline;
      }
      .preview-terminal-input {
        width: 34ch;
        min-width: 16ch;
        max-width: 100%;
        margin: 0;
        padding: 0;
        color: #f2c96d;
        background: transparent;
        border: 0;
        outline: none;
        font: inherit;
        line-height: inherit;
        caret-color: #f2c96d;
      }
      .preview-terminal-input::placeholder {
        color: #7d86ad;
      }
      body.preview-kind-terminal #preview-frame,
      body.preview-kind-terminal #preview-zoom-controls,
      body.preview-kind-terminal #preview-refresh-btn {
        display: none;
      }
      body.preview-kind-terminal #preview-terminal {
        display: block;
      }
      body.preview-kind-terminal #preview-shell {
        grid-template-rows: 30px 1fr;
      }
      body.preview-inactive #app {
        grid-template-areas: "editor";
        grid-template-rows: 1fr;
        grid-template-columns: 1fr;
      }
      body.preview-inactive #preview-shell,
      body.preview-inactive #preview-split {
        display: none;
      }
      body.preview-mode-hidden #app {
        grid-template-areas:
          "editor"
          "preview";
        grid-template-rows: minmax(180px, 1fr) 30px;
        grid-template-columns: 1fr;
      }
      body.preview-mode-hidden #preview-shell {
        display: grid;
        grid-template-rows: 30px 0;
      }
      body.preview-mode-hidden #preview-split,
      body.preview-mode-hidden #preview-frame,
      body.preview-mode-hidden #preview-terminal {
        display: none;
      }
      body.preview-mode-right #app {
        grid-template-areas: "editor split preview";
        grid-template-columns: minmax(280px, 1fr) 6px var(--preview-right-w);
        grid-template-rows: 1fr;
      }
      body.preview-mode-right #preview-shell {
        border-top: 0;
        border-left: 1px solid #323a68;
      }
      body.preview-mode-right #preview-split {
        cursor: col-resize;
      }
      body.preview-mode-tab #app {
        grid-template-areas: "preview";
        grid-template-rows: 1fr;
        grid-template-columns: 1fr;
      }
      body.preview-mode-tab #editor,
      body.preview-mode-tab #preview-split {
        display: none;
      }
      body.preview-mode-tab #preview-shell {
        border-top: 0;
      }
      #console-split {
        grid-area: consoleSplit;
        display: none;
        background: #202846;
        cursor: row-resize;
        transition: background 0.12s ease;
      }
      #console-split:hover,
      #console-split.console-dragging { background: #2dd4bf; }
      #console-shell {
        grid-area: console;
        min-height: 0;
        display: none;
        grid-template-rows: 30px 1fr;
        background: #070b15;
        border-top: 1px solid #26305f;
        color: #dbe3ff;
      }
      #console-bar {
        position: relative;
        display: flex;
        align-items: center;
        gap: 8px;
        min-width: 0;
        padding: 0 10px;
        font-family: var(--font-mono);
        font-size: 11px;
        color: #aab3d7;
        background: #0b1120;
        border-bottom: 1px solid #1f2a44;
      }
      #console-title {
        flex: 0 0 auto;
        color: #eef2ff;
        font-weight: 800;
      }
      #console-count {
        flex: 1 1 auto;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        color: #8f98bd;
      }
      #console-clear-inline-btn {
        flex: 0 0 auto;
        height: 24px;
        padding: 0 10px;
        border: 1px solid #26305f;
        border-radius: 7px;
        background: #11182d;
        color: #dbe3ff;
        font-family: var(--font-mono);
        font-size: 11px;
        font-weight: 800;
        cursor: pointer;
      }
      #console-clear-inline-btn:hover {
        border-color: rgba(45, 212, 191, 0.58);
        color: #2dd4bf;
      }
      #console-menu-btn {
        flex: 0 0 auto;
        width: 26px;
        height: 24px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        color: #eef2ff;
        background: #101a2d;
        border: 1px solid #26305f;
        border-radius: 6px;
        cursor: pointer;
        transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
      }
      #console-menu-btn:hover,
      #console-menu-btn.console-menu-open {
        color: #2dd4bf;
        border-color: #2f766a;
        background: #0f1f2e;
      }
      #console-menu {
        position: absolute;
        top: 28px;
        right: 8px;
        z-index: 30;
        display: none;
        min-width: 150px;
        padding: 6px;
        background: #0f172a;
        border: 1px solid #26305f;
        border-radius: 8px;
        box-shadow: 0 16px 38px rgba(0, 0, 0, 0.44);
      }
      #console-menu.console-menu-open {
        display: grid;
        gap: 4px;
      }
      .console-menu-item {
        height: 30px;
        display: grid;
        grid-template-columns: 18px 1fr;
        align-items: center;
        gap: 8px;
        padding: 0 8px;
        color: #dbe3ff;
        background: transparent;
        border: 1px solid transparent;
        border-radius: 6px;
        font-family: var(--font-mono);
        font-size: 11px;
        text-align: left;
        cursor: pointer;
      }
      .console-menu-item:hover,
      .console-menu-item.console-choice-on {
        color: #2dd4bf;
        background: #101a2d;
        border-color: #26305f;
      }
      .console-menu-item svg {
        justify-self: center;
        display: block;
      }
      #console-output {
        min-height: 0;
        overflow: auto;
        padding: 10px 12px 14px;
        font-family: var(--font-mono);
        font-size: 12px;
        line-height: 1.45;
        white-space: pre-wrap;
        overflow-wrap: anywhere;
      }
      .console-empty {
        color: #6f789c;
        font-style: italic;
      }
      .console-row {
        display: grid;
        grid-template-columns: 64px 48px minmax(0, 1fr) auto;
        gap: 8px;
        padding: 2px 0;
        border-bottom: 1px solid rgba(38, 48, 95, 0.32);
      }
      .console-row-time {
        color: #647092;
      }
      .console-row-level {
        font-weight: 800;
        text-transform: uppercase;
      }
      .console-row-message {
        color: #dbe3ff;
      }
      .console-row-repeat {
        align-self: start;
        border: 1px solid rgba(143, 183, 255, 0.28);
        border-radius: 999px;
        color: #a8b8ef;
        font-size: 11px;
        font-weight: 800;
        line-height: 1;
        padding: 3px 6px;
        white-space: nowrap;
      }
      .console-row-similar .console-row-repeat {
        border-color: rgba(242, 201, 109, 0.32);
        color: #f2c96d;
      }
      .console-level-log .console-row-level,
      .console-level-info .console-row-level,
      .console-level-debug .console-row-level { color: #8fb7ff; }
      .console-level-warn .console-row-level,
      .console-level-warn .console-row-message { color: #f2c96d; }
      .console-level-error .console-row-level,
      .console-level-error .console-row-message { color: #ff9aa8; }
      body.console-mode-bottom #console-shell,
      body.console-mode-right #console-shell,
      body.console-mode-tab #console-shell,
      body.console-mode-bottom #console-split,
      body.console-mode-right #console-split {
        display: grid;
      }
      body.console-mode-right #console-split {
        cursor: col-resize;
      }
      body.console-mode-right #console-shell {
        border-top: 0;
        border-left: 1px solid #26305f;
      }
      body.console-mode-bottom.preview-mode-bottom #app {
        grid-template-areas:
          "editor"
          "split"
          "preview"
          "consoleSplit"
          "console";
        grid-template-rows: minmax(150px, 1fr) 6px minmax(120px, var(--preview-bottom-h)) 6px var(--console-bottom-h);
        grid-template-columns: 1fr;
      }
      body.console-mode-bottom.preview-mode-hidden #app {
        grid-template-areas:
          "editor"
          "preview"
          "consoleSplit"
          "console";
        grid-template-rows: minmax(150px, 1fr) 30px 6px var(--console-bottom-h);
        grid-template-columns: 1fr;
      }
      body.console-mode-bottom.preview-mode-right #app {
        grid-template-areas:
          "editor split preview"
          "consoleSplit consoleSplit consoleSplit"
          "console console console";
        grid-template-columns: minmax(280px, 1fr) 6px var(--preview-right-w);
        grid-template-rows: minmax(170px, 1fr) 6px var(--console-bottom-h);
      }
      body.console-mode-bottom.preview-mode-right #console-shell,
      body.console-mode-bottom.preview-mode-hidden #console-shell,
      body.console-mode-bottom.preview-mode-bottom #console-shell {
        border-top: 1px solid #26305f;
      }
      body.console-mode-bottom.preview-mode-tab #app {
        grid-template-areas:
          "preview"
          "consoleSplit"
          "console";
        grid-template-rows: minmax(170px, 1fr) 6px var(--console-bottom-h);
        grid-template-columns: 1fr;
      }
      body.console-mode-right.preview-mode-bottom #app {
        grid-template-areas:
          "editor consoleSplit console"
          "split consoleSplit console"
          "preview consoleSplit console";
        grid-template-columns: minmax(280px, 1fr) 6px var(--console-right-w);
        grid-template-rows: minmax(180px, 1fr) 6px var(--preview-bottom-h);
      }
      body.console-mode-right.preview-mode-hidden #app {
        grid-template-areas:
          "editor consoleSplit console"
          "preview consoleSplit console";
        grid-template-columns: minmax(280px, 1fr) 6px var(--console-right-w);
        grid-template-rows: minmax(180px, 1fr) 30px;
      }
      body.console-mode-right.preview-mode-right #app {
        grid-template-areas: "editor split preview consoleSplit console";
        grid-template-columns: minmax(280px, 1fr) 6px minmax(260px, var(--preview-right-w)) 6px var(--console-right-w);
        grid-template-rows: 1fr;
      }
      body.console-mode-right.preview-mode-tab #app {
        grid-template-areas: "preview consoleSplit console";
        grid-template-columns: minmax(280px, 1fr) 6px var(--console-right-w);
        grid-template-rows: 1fr;
      }
      body.console-mode-tab #app {
        grid-template-areas: "console";
        grid-template-rows: 1fr;
        grid-template-columns: 1fr;
      }
      body.console-mode-tab #editor,
      body.console-mode-tab #preview-shell,
      body.console-mode-tab #preview-split,
      body.console-mode-tab #console-split {
        display: none;
      }
      body.console-mode-tab #console-shell {
        border-top: 0;
      }
      body.console-mode-bottom #console-bottom-btn,
      body.console-mode-right #console-right-btn,
      body.console-mode-tab #console-tab-btn {
        color: #2dd4bf;
        border-color: #2f766a;
        background: #0f1f2e;
      }
      @media (max-width: 860px) {
        body.console-mode-right.preview-mode-bottom #app,
        body.console-mode-right.preview-mode-hidden #app,
        body.console-mode-right.preview-mode-right #app,
        body.console-mode-right.preview-mode-tab #app {
          grid-template-areas:
            "editor"
            "split"
            "preview"
            "consoleSplit"
            "console";
          grid-template-columns: 1fr;
          grid-template-rows: minmax(150px, 1fr) 6px minmax(120px, var(--preview-bottom-h)) 6px var(--console-bottom-h);
        }
        body.console-mode-right.preview-mode-hidden #app {
          grid-template-areas:
            "editor"
            "preview"
            "consoleSplit"
            "console";
          grid-template-rows: minmax(150px, 1fr) 30px 6px var(--console-bottom-h);
        }
        body.console-mode-right.preview-mode-tab #app {
          grid-template-areas:
            "preview"
            "consoleSplit"
            "console";
          grid-template-rows: minmax(170px, 1fr) 6px var(--console-bottom-h);
        }
        body.console-mode-right #console-split {
          cursor: row-resize;
        }
        body.console-mode-right #console-shell {
          border-left: 0;
          border-top: 1px solid #26305f;
        }
      }
      #activity-bar {
        position: fixed;
        top: var(--topbar-h);
        left: 0;
        bottom: 0;
        z-index: 16;
        width: var(--activity-rail-w);
        display: flex;
        flex-direction: column;
        align-items: center;
        padding-top: 10px;
        background: var(--theme-picker-bg, #202529);
        border-right: 1px solid var(--theme-picker-border, #111619);
      }
      .activity-btn {
        position: relative;
        width: var(--activity-rail-w);
        height: 54px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: var(--theme-muted, #8f9aa3);
        background: transparent;
        border: 0;
        padding: 0;
        cursor: pointer;
      }
      .activity-btn:hover,
      .activity-btn.activity-btn-on {
        color: var(--theme-text, #dce3e8);
      }
      .activity-btn:disabled {
        opacity: 0.36;
        cursor: default;
      }
      .activity-btn.activity-btn-on::before {
        content: "";
        position: absolute;
        left: 0;
        top: 8px;
        bottom: 8px;
        width: 2px;
        background: var(--theme-accent, #6c8cff);
      }
      .activity-btn.activity-console-has-errors {
        color: #ff9aa8;
      }
      .activity-btn.activity-console-has-errors::after {
        content: "";
        position: absolute;
        right: 14px;
        top: 13px;
        width: 7px;
        height: 7px;
        border-radius: 999px;
        background: #ff5d72;
        box-shadow: 0 0 0 2px var(--theme-picker-bg, #202529);
      }
      .activity-btn svg {
        display: block;
      }
      .activity-spacer {
        flex: 1 1 auto;
      }
      #activity-settings-btn {
        margin-bottom: 10px;
      }
      #activity-side-panel {
        position: fixed;
        top: var(--topbar-h);
        bottom: 0;
        left: var(--activity-rail-w);
        z-index: 15;
        width: var(--activity-panel-w);
        display: none;
        flex-direction: column;
        background: var(--theme-picker-input-bg, #171c20);
        border-right: 1px solid var(--theme-picker-border, #2a3238);
        color: var(--theme-text, #dce3e8);
        font-family: var(--font-mono);
        overflow: hidden;
      }
      body.activity-panel-open #activity-side-panel {
        display: flex;
      }
      #activity-edge-resizer {
        position: fixed;
        top: var(--topbar-h);
        bottom: 0;
        left: calc(var(--activity-rail-w) - 3px);
        z-index: 17;
        width: 8px;
        display: block;
        cursor: col-resize;
        background: transparent;
        transition: background 0.12s ease;
      }
      body.activity-panel-open #activity-edge-resizer,
      body.screen-home #activity-edge-resizer,
      body.screen-classroom #activity-edge-resizer {
        display: none;
      }
      #activity-panel-resizer {
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        z-index: 3;
        width: 6px;
        cursor: col-resize;
        background: transparent;
        transition: background 0.12s ease;
      }
      #activity-panel-resizer:hover,
      #activity-edge-resizer:hover,
      #activity-edge-resizer.activity-dragging,
      #activity-panel-resizer.activity-dragging {
        background: var(--theme-accent, #6c8cff);
      }
      #activity-panel-head {
        height: 38px;
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 0 10px 0 14px;
        flex: none;
      }
      #activity-title {
        flex: 1 1 auto;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 11px;
        letter-spacing: 0.04em;
        text-transform: uppercase;
      }
      .activity-head-btn {
        width: 26px;
        height: 26px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: var(--theme-muted, #9aa7b1);
        background: transparent;
        border: 1px solid transparent;
        border-radius: 5px;
        cursor: pointer;
      }
      .activity-head-btn:hover {
        color: var(--theme-text, #dce3e8);
        background: var(--theme-picker-hover-bg, #232a30);
        border-color: var(--theme-picker-border, #303941);
      }
      #activity-upload-input {
        display: none;
      }
      .activity-view {
        display: none;
        flex: 1 1 auto;
        min-height: 0;
        overflow: auto;
      }
      .activity-view.activity-view-on {
        display: block;
      }
      .activity-section-title {
        width: 100%;
        height: 28px;
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 0 12px;
        color: var(--theme-muted, #aab4bd);
        background: transparent;
        border: 0;
        font-family: inherit;
        font-size: 10.5px;
        font-weight: 700;
        letter-spacing: 0.03em;
        text-transform: uppercase;
      }
      .activity-section-bar {
        width: 100%;
        height: 28px;
        display: flex;
        align-items: center;
        min-width: 0;
      }
      .activity-section-bar .activity-section-title {
        flex: 1 1 auto;
        min-width: 0;
      }
      .activity-section-actions {
        flex: 0 0 auto;
        display: inline-flex;
        align-items: center;
        gap: 1px;
        padding-right: 8px;
      }
      .activity-tree-action {
        width: 23px;
        height: 23px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: var(--theme-muted, #9aa7b1);
        background: transparent;
        border: 1px solid transparent;
        border-radius: 4px;
        padding: 0;
        cursor: pointer;
      }
      .activity-tree-action:hover {
        color: var(--theme-text, #dce3e8);
        background: var(--theme-picker-hover-bg, #232a30);
        border-color: var(--theme-picker-border, #303941);
      }
      .activity-tree-action svg {
        display: block;
      }
      body.qoax-blocks-editor-active #activity-new-file-btn,
      body.qoax-blocks-editor-active #activity-new-folder-btn,
      body.qoax-blocks-editor-active #activity-upload-btn,
      body.qoax-blocks-editor-active #activity-collapse-all-btn {
        display: none;
      }
      .file-list,
      #search-results {
        display: grid;
        gap: 1px;
      }
      .file-list {
        min-height: 120px;
        padding-bottom: 12px;
      }
      .file-list[hidden] {
        display: none;
      }
      #activity-explorer-view.activity-view-drop-root {
        background:
          linear-gradient(
            180deg,
            color-mix(in srgb, var(--theme-accent, #6c8cff) 10%, transparent),
            transparent 210px
          );
        box-shadow: inset 2px 0 0 var(--theme-accent, #6c8cff);
      }
      .file-row,
      .search-row {
        min-height: 28px;
        display: grid;
        grid-template-columns: 18px 1fr auto;
        align-items: center;
        gap: 7px;
        width: 100%;
        box-sizing: border-box;
        padding: 0 10px 0 14px;
        color: var(--theme-text, #dce3e8);
        background: transparent;
        border: 0;
        font-family: inherit;
        font-size: 11.5px;
        text-align: left;
        cursor: pointer;
      }
      .file-row {
        padding-left: calc(14px + var(--tree-depth, 0) * 14px);
      }
      .qblocks-category-list {
        gap: 8px;
        padding: 8px 10px 16px;
      }
      .qblocks-category-row {
        min-height: 44px;
        grid-template-columns: 14px minmax(0, 1fr) auto;
        padding: 0 12px;
        border: 1px solid color-mix(in srgb, var(--theme-picker-border, #303941) 78%, transparent);
        border-radius: 12px;
        background:
          linear-gradient(135deg, color-mix(in srgb, var(--category-color, var(--theme-accent, #6c8cff)) 18%, transparent), transparent 72%),
          color-mix(in srgb, var(--theme-picker-bg, #101519) 84%, transparent);
        box-shadow: inset 0 1px 0 color-mix(in srgb, #ffffff 8%, transparent);
      }
      .qblocks-category-row:hover,
      .qblocks-category-row:focus-visible {
        background:
          linear-gradient(135deg, color-mix(in srgb, var(--category-color, var(--theme-accent, #6c8cff)) 30%, transparent), transparent 72%),
          var(--theme-picker-selected-bg, #222a30);
      }
      .qblocks-category-row[data-category="motion"] {
        --category-color: #4f7cff;
      }
      .qblocks-category-row[data-category="looks"] {
        --category-color: #9b6cff;
      }
      .qblocks-category-row[data-category="events"] {
        --category-color: #f0a831;
      }
      .qblocks-category-row[data-category="control"] {
        --category-color: #ff8c2f;
      }
      .qblocks-category-row[data-category="sensing"] {
        --category-color: #2dd4bf;
      }
      .qblocks-category-row[data-category="variables"] {
        --category-color: #f59e0b;
      }
      .qblocks-category-dot {
        width: 10px;
        height: 10px;
        border-radius: 999px;
        background: var(--category-color, var(--theme-accent, #6c8cff));
        box-shadow: 0 0 0 3px color-mix(in srgb, var(--category-color, var(--theme-accent, #6c8cff)) 18%, transparent);
      }
      .file-row[draggable="true"] {
        cursor: grab;
      }
      .file-row[draggable="true"]:active {
        cursor: grabbing;
      }
      .file-row:disabled {
        cursor: default;
        opacity: 0.72;
      }
      body.activity-panel-image-gallery #project-files-list {
        grid-template-columns: repeat(auto-fill, minmax(116px, 1fr));
        align-items: start;
        gap: 8px;
        padding: 8px 10px 16px;
      }
      body.activity-panel-image-gallery .file-row:not(.file-row-image-card),
      body.activity-panel-image-gallery .file-row-create {
        grid-column: 1 / -1;
      }
      .file-row-image-card {
        min-height: 142px;
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: 88px auto auto;
        align-content: start;
        justify-items: stretch;
        gap: 6px;
        padding: 8px;
        border: 1px solid color-mix(in srgb, var(--theme-picker-border, #303941) 86%, transparent);
        border-radius: 8px;
        background: color-mix(in srgb, var(--theme-picker-bg, #101519) 72%, transparent);
        box-shadow: inset 0 1px 0 color-mix(in srgb, #ffffff 8%, transparent);
      }
      .file-row-image-card:hover,
      .file-row-image-card.file-row-selected {
        background: color-mix(in srgb, var(--theme-picker-selected-bg, #222a30) 78%, var(--theme-accent, #6c8cff) 10%);
        border-color: color-mix(in srgb, var(--theme-accent, #6c8cff) 42%, var(--theme-picker-border, #303941));
      }
      .file-row-thumb-wrap {
        min-width: 0;
        height: 88px;
        display: grid;
        place-items: center;
        overflow: hidden;
        border-radius: 6px;
        border: 1px solid color-mix(in srgb, var(--theme-picker-border, #303941) 82%, transparent);
        background:
          linear-gradient(45deg, color-mix(in srgb, var(--theme-muted, #aab3d7) 9%, transparent) 25%, transparent 25%),
          linear-gradient(-45deg, color-mix(in srgb, var(--theme-muted, #aab3d7) 9%, transparent) 25%, transparent 25%),
          linear-gradient(45deg, transparent 75%, color-mix(in srgb, var(--theme-muted, #aab3d7) 9%, transparent) 75%),
          linear-gradient(-45deg, transparent 75%, color-mix(in srgb, var(--theme-muted, #aab3d7) 9%, transparent) 75%);
        background-position: 0 0, 0 6px, 6px -6px, -6px 0;
        background-size: 12px 12px;
      }
      .file-row-thumb {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
        image-rendering: auto;
      }
      .file-row-thumb-missing::after {
        content: "IMG";
        color: var(--theme-muted, #9aa7b1);
        font-size: 11px;
      }
      .file-row-image-card .file-row-name {
        width: 100%;
        text-align: center;
        font-size: 10.5px;
      }
      .file-row-image-card .file-row-meta {
        justify-self: center;
        font-size: 9.5px;
      }
      .file-row-folder {
        font-weight: 700;
      }
      .file-list-drop-root {
        background:
          linear-gradient(
            90deg,
            color-mix(in srgb, var(--theme-accent, #6c8cff) 20%, transparent),
            transparent 42%
          );
        box-shadow: inset 2px 0 0 var(--theme-accent, #6c8cff);
      }
      .file-row-dragging {
        opacity: 0.48;
      }
      .file-row-drop-target {
        color: var(--theme-text, #dce3e8);
        background: color-mix(in srgb, var(--theme-accent, #6c8cff) 20%, var(--theme-picker-selected-bg, #222a30));
        box-shadow: inset 2px 0 0 var(--theme-accent, #6c8cff);
      }
      .file-row-selected {
        background: color-mix(in srgb, var(--theme-picker-selected-bg, #222a30) 78%, var(--theme-accent, #6c8cff) 22%);
      }
      .file-row:hover,
      .file-row.file-row-active:not(.file-row-drop-target),
      .search-row:hover {
        background: var(--theme-picker-selected-bg, #222a30);
      }
      .file-row.file-row-drop-target,
      .file-row.file-row-drop-target:hover {
        color: var(--theme-text, #dce3e8);
        background: color-mix(in srgb, var(--theme-accent, #6c8cff) 24%, var(--theme-picker-selected-bg, #222a30));
        box-shadow: inset 2px 0 0 var(--theme-accent, #6c8cff);
      }
      .file-row-create {
        grid-template-columns: 18px minmax(0, 1fr);
        padding-right: 10px;
      }
      .file-row-create input {
        width: 100%;
        min-width: 0;
        height: 22px;
        box-sizing: border-box;
        color: var(--theme-text, #dce3e8);
        background: var(--theme-picker-bg, #101519);
        border: 1px solid var(--theme-accent, #6c8cff);
        border-radius: 3px;
        padding: 0 6px;
        font: inherit;
        font-size: 11.5px;
        outline: none;
      }
      .file-row-create.file-row-create-invalid input {
        border-color: #d9a641;
      }
      .file-row-name,
      .search-row-text {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      .file-row-meta,
      .search-row-line {
        color: var(--theme-muted, #9aa7b1);
        font-size: 10px;
      }
      .file-row-dirty {
        color: var(--theme-accent, #6c8cff);
      }
      .asset-action-menu {
        position: fixed;
        z-index: 95;
        min-width: 142px;
        display: grid;
        gap: 4px;
        padding: 5px;
        color: var(--theme-text, #eef2ff);
        background: var(--theme-picker-bg, #171b31);
        border: 1px solid var(--theme-picker-border, #323a68);
        border-radius: 8px;
        box-shadow: 0 14px 46px var(--theme-shadow, rgba(0, 0, 0, 0.52));
      }
      .asset-action-menu[hidden] {
        display: none;
      }
      .asset-action-menu button {
        height: 30px;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        color: inherit;
        background: transparent;
        border: 0;
        border-radius: 6px;
        padding: 0 10px;
        font: 700 11px var(--font-mono);
        cursor: pointer;
      }
      .asset-action-menu button:hover,
      .asset-action-menu button:focus-visible {
        background: var(--theme-picker-hover-bg, #202846);
        outline: none;
      }
      .asset-preview-overlay {
        position: fixed;
        inset: 0;
        z-index: 90;
        display: none;
        align-items: center;
        justify-content: center;
        padding: 28px;
        box-sizing: border-box;
        background: rgba(7, 10, 22, 0.62);
      }
      .asset-preview-overlay.asset-preview-visible {
        display: flex;
      }
      .asset-preview-card {
        width: min(760px, calc(100vw - 56px));
        max-height: min(720px, calc(100vh - 56px));
        display: grid;
        grid-template-rows: 38px minmax(0, 1fr);
        overflow: hidden;
        color: var(--theme-text, #eef2ff);
        background: var(--theme-picker-bg, #171b31);
        border: 1px solid var(--theme-picker-border, #323a68);
        border-radius: 8px;
        box-shadow: 0 18px 64px var(--theme-shadow, rgba(0, 0, 0, 0.52));
      }
      .asset-preview-card header {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 30px;
        align-items: center;
        gap: 8px;
        padding: 0 8px 0 12px;
        border-bottom: 1px solid var(--theme-picker-border, #323a68);
      }
      .asset-preview-title {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 12px;
      }
      .asset-preview-close {
        width: 26px;
        height: 26px;
        color: var(--theme-muted, #aab3d7);
        background: transparent;
        border: 1px solid transparent;
        border-radius: 5px;
        font-family: inherit;
        cursor: pointer;
      }
      .asset-preview-close:hover {
        color: var(--theme-text, #eef2ff);
        background: var(--theme-picker-hover-bg, #202846);
        border-color: var(--theme-picker-border, #323a68);
      }
      .asset-preview-stage {
        min-height: 0;
        display: grid;
        place-items: center;
        padding: 14px;
        background:
          linear-gradient(45deg, color-mix(in srgb, var(--theme-muted, #aab3d7) 10%, transparent) 25%, transparent 25%),
          linear-gradient(-45deg, color-mix(in srgb, var(--theme-muted, #aab3d7) 10%, transparent) 25%, transparent 25%),
          linear-gradient(45deg, transparent 75%, color-mix(in srgb, var(--theme-muted, #aab3d7) 10%, transparent) 75%),
          linear-gradient(-45deg, transparent 75%, color-mix(in srgb, var(--theme-muted, #aab3d7) 10%, transparent) 75%);
        background-position: 0 0, 0 8px, 8px -8px, -8px 0;
        background-size: 16px 16px;
      }
      .asset-preview-stage img {
        display: block;
        max-width: 100%;
        max-height: calc(min(720px, 100vh - 56px) - 68px);
        object-fit: contain;
        image-rendering: auto;
      }
      .asset-preview-error {
        margin: 0;
        color: #d9a641;
        font-size: 12px;
      }
      #search-box-wrap {
        padding: 8px 10px 10px;
      }
      #search-input {
        width: 100%;
        height: 30px;
        box-sizing: border-box;
        color: var(--theme-text, #dce3e8);
        background: var(--theme-picker-bg, #101519);
        border: 1px solid var(--theme-picker-border, #303941);
        border-radius: 4px;
        padding: 0 9px;
        font-family: inherit;
        font-size: 12px;
        outline: none;
      }
      #search-input:focus {
        border-color: var(--theme-accent, #6c8cff);
      }
      .activity-empty {
        padding: 10px 14px;
        color: var(--theme-muted, #9aa7b1);
        font-size: 11px;
        line-height: 1.45;
      }
      #module-picker-overlay {
        position: fixed;
        inset: 0;
        z-index: 56;
        display: none;
        place-items: center;
        padding: 24px;
        background: rgba(5, 8, 7, 0.72);
        backdrop-filter: blur(4px);
        font-family: var(--font-mono);
      }
      #module-picker-overlay.module-picker-visible {
        display: grid;
      }
      #module-picker-card {
        width: min(1080px, calc(100vw - 48px));
        color: var(--theme-text, #eef2ff);
        background: var(--theme-picker-bg, #171b31);
        border: 1px solid var(--theme-picker-border, #323a68);
        border-radius: 10px;
        box-shadow: 0 24px 70px var(--theme-shadow, rgba(0, 0, 0, 0.52));
        overflow: hidden;
      }
      #module-picker-head {
        height: 54px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 0 18px;
        border-bottom: 1px solid var(--theme-picker-border, #323a68);
      }
      #module-picker-head h2 {
        margin: 0;
        font-size: 18px;
        letter-spacing: 0;
      }
      #module-picker-brand {
        min-width: 0;
        display: inline-flex;
        align-items: center;
        gap: 10px;
      }
      #module-picker-brand .brand-mark {
        width: 28px;
        height: 28px;
      }
      #module-picker-close {
        width: 30px;
        height: 30px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: var(--theme-text, #eef2ff);
        background: transparent;
        border: 1px solid transparent;
        border-radius: 6px;
        cursor: pointer;
      }
      #module-picker-close:hover {
        color: var(--theme-accent, #6c8cff);
        background: var(--theme-picker-hover, #202846);
        border-color: var(--theme-picker-border, #323a68);
      }
      #module-picker-grid {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 14px;
        padding: 18px;
      }
      .module-section-heading {
        grid-column: 1 / -1;
        display: flex;
        align-items: center;
        gap: 12px;
        margin: 4px 0 -2px;
        color: #aab3d7;
        font-size: 12px;
        font-weight: 800;
        letter-spacing: 0.12em;
        text-transform: lowercase;
      }
      .module-section-heading::before,
      .module-section-heading::after {
        content: "";
        height: 1px;
        flex: 1 1 auto;
        background: linear-gradient(90deg, transparent, color-mix(in srgb, #aab3d7 34%, transparent), transparent);
      }
      .module-card {
        min-width: 0;
        display: grid;
        gap: 10px;
        padding: 12px;
        color: var(--theme-text, #eef2ff);
        background: var(--theme-editor-bg, #0f1327);
        border: 1px solid var(--theme-picker-border, #323a68);
        border-radius: 8px;
        font-family: inherit;
        text-align: left;
        cursor: pointer;
      }
      .module-card:hover,
      .module-card:focus-visible {
        border-color: var(--module-accent, var(--theme-accent, #6c8cff));
        outline: none;
      }
      .module-card strong {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        color: var(--module-accent, var(--theme-accent, #6c8cff));
        font-size: 15px;
      }
      .module-card > span:not(.module-card-art) {
        color: var(--theme-muted, #aab3d7);
        font-size: 11px;
      }
      .module-card-art {
        position: relative;
        aspect-ratio: 16 / 10;
        overflow: hidden;
        border: 1px solid color-mix(in srgb, var(--module-accent, #6c8cff) 45%, transparent);
        border-radius: 7px;
        background:
          radial-gradient(circle at 22% 22%, color-mix(in srgb, var(--module-accent, #6c8cff) 55%, transparent), transparent 24%),
          linear-gradient(140deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0)),
          #081211;
      }
      .module-card-art::before,
      .module-card-art::after {
        content: "";
        position: absolute;
        display: block;
      }
      .module-art-game::before {
        width: 34%;
        aspect-ratio: 1;
        left: 12%;
        bottom: 18%;
        border-radius: 6px;
        background: var(--module-accent, #6c8cff);
        box-shadow: 76px -22px 0 -10px #f2c96d, 128px 18px 0 -16px #ff7ac8;
      }
      .module-art-game::after {
        inset: auto 12% 16% auto;
        width: 28%;
        height: 10%;
        border-radius: 999px;
        background: #eef2ff;
      }
      .module-art-tournament::before {
        inset: 20% 12%;
        border: 2px solid var(--module-accent, #7aa7ff);
        border-left: 0;
        border-radius: 0 8px 8px 0;
        box-shadow: -42px -28px 0 -24px #eef2ff, -42px 28px 0 -24px #eef2ff;
      }
      .module-art-tournament::after {
        width: 34%;
        height: 26%;
        right: 10%;
        top: 37%;
        border-radius: 6px;
        background: #f2c96d;
      }
      .module-art-fun::before {
        width: 44%;
        aspect-ratio: 1;
        left: 28%;
        top: 18%;
        border-radius: 50%;
        background: var(--module-accent, #ff7ac8);
        box-shadow: -48px 32px 0 -18px #6c8cff, 58px 38px 0 -22px #f2c96d;
      }
      .module-art-fun::after {
        width: 60%;
        height: 9%;
        left: 20%;
        bottom: 18%;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.52);
      }
      .module-art-qubestack::before {
        width: 34%;
        height: 34%;
        left: 35%;
        top: 22%;
        border-radius: 8px;
        background: var(--module-accent, #e8a23a);
        transform: skewY(-18deg) rotate(24deg);
        box-shadow: -38px 30px 0 -10px #2dd4bf, 42px 34px 0 -14px #7aa7ff;
      }
      .module-art-qubestack::after {
        inset: 18% 12%;
        border-left: 2px solid rgba(255, 255, 255, 0.44);
        border-bottom: 2px solid rgba(255, 255, 255, 0.26);
        transform: skewX(-18deg);
      }
      .module-art-qblocks::before {
        width: 42%;
        height: 30%;
        left: 28%;
        top: 24%;
        border-radius: 12px;
        background: var(--module-accent, #ff7ac8);
        box-shadow: -36px 28px 0 -16px #7aa7ff, 42px 34px 0 -18px #f2c96d;
      }
      .module-art-qblocks::after {
        width: 62%;
        height: 12%;
        left: 19%;
        bottom: 20%;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.58);
        box-shadow: 0 -22px 0 -8px rgba(255, 255, 255, 0.32);
      }
      .module-art-robots::before {
        width: 38%;
        height: 34%;
        left: 31%;
        top: 26%;
        border-radius: 8px;
        background: var(--module-accent, #f2c96d);
        box-shadow: -40px 42px 0 -28px #6c8cff, 40px 42px 0 -28px #7aa7ff;
      }
      .module-art-robots::after {
        width: 8%;
        height: 8%;
        left: 42%;
        top: 37%;
        border-radius: 50%;
        background: #081211;
        box-shadow: 24px 0 0 #081211, -12px -28px 0 -2px #eef2ff, 36px -28px 0 -2px #eef2ff;
      }
      @media (max-width: 900px) {
        #module-picker-grid {
          grid-template-columns: repeat(2, minmax(0, 1fr));
        }
      }
      @media (max-width: 560px) {
        #module-picker-grid {
          grid-template-columns: 1fr;
        }
      }
      #toolbar {
        flex: 0 1 auto;
        min-width: 0;
        display: inline-flex;
        align-items: center;
        justify-content: flex-end;
        flex-wrap: nowrap;
        gap: 8px;
        max-width: min(260px, 24vw);
        font-family: var(--font-mono);
        font-size: 12px;
        color: #aab3d7;
      }
      #auth-btn {
        height: 32px;
        max-width: 150px;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 0 10px;
        color: #eef2ff;
        background: #202846;
        border: 1px solid #323a68;
        border-radius: 6px;
        font-family: var(--font-mono);
        font-size: 11px;
        cursor: pointer;
        transition: border-color 0.15s ease, color 0.15s ease;
      }
      #auth-btn:hover,
      #auth-btn.auth-on {
        color: #6c8cff;
        border-color: #2f5148;
      }
      #auth-btn.auth-on::before {
        content: "";
        flex: 0 0 auto;
        width: 22px;
        height: 22px;
        border-radius: 5px;
        background:
          linear-gradient(145deg, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0.1)),
          var(--theme-accent, #6c8cff);
        box-shadow: inset 0 -5px 8px rgba(0, 0, 0, 0.18);
      }
      #auth-btn.auth-login-open {
        color: #ffffff;
        background: #7e57d6;
        border-color: #a88af0;
      }
      #auth-btn span {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      #grain {
        position: fixed;
        inset: 0;
        z-index: 10;
        pointer-events: none;
        opacity: 0.6;
        mix-blend-mode: soft-light;
        background-image:
          url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='linear' slope='0.9'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
      }

      /* Icon buttons in the toolbar. */
      #tree-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 28px;
        height: 26px;
        color: #eef2ff;
        background: #202846;
        border: 1px solid #323a68;
        border-radius: 6px;
        cursor: pointer;
        transition: border-color 0.15s ease, color 0.15s ease;
      }
      #tree-btn:hover,
      #tree-btn.tree-btn-on,
      #tree-btn[aria-pressed="true"] {
        color: #6c8cff;
        border-color: #2f5148;
      }
      #tree-btn svg {
        display: block;
      }
      /* ---- Syntax-tree modal ---- */
      #treeview-overlay {
        position: fixed;
        inset: 0;
        z-index: 20;
        display: none;
        align-items: center;
        justify-content: center;
        background: rgba(8, 18, 17, 0.55);
        backdrop-filter: blur(2px);
        font-family: var(--font-mono);
      }
      #treeview-overlay.tv-visible { display: flex; }

      #treeview {
        position: relative; /* containing block for the split divider */
        width: min(880px, 92vw);
        height: min(680px, 86vh);
        display: flex;
        flex-direction: column;
        background: #171b31;
        border: 1px solid #323a68;
        border-radius: 12px;
        box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
        overflow: hidden;
        color: #eef2ff;
      }

      #treeview-head {
        display: flex;
        align-items: center;
        flex-wrap: nowrap;
        gap: 8px;
        padding: 10px 12px;
        border-bottom: 1px solid #323a68;
        background: #202846;
        font-size: 12px;
        overflow: hidden;
      }
      /* Title + meta yield space first so the buttons never wrap or clip. */
      #treeview-title {
        color: #6c8cff;
        font-weight: 700;
        letter-spacing: 0.04em;
        white-space: nowrap;
        flex: 0 1 auto;
      }
      #treeview-meta {
        color: #aab3d7;
        font-size: 11px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        flex: 0 1 auto;
      }
      #treeview-spacer { flex: 1 1 0; min-width: 0; }

      .tv-btn {
        box-sizing: border-box;
        height: 28px;
        flex: 0 0 auto;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
        white-space: nowrap;
        font-family: inherit;
        font-size: 11px;
        line-height: 1;
        color: #eef2ff;
        background: #171b31;
        border: 1px solid #323a68;
        border-radius: 6px;
        padding: 0 9px;
        cursor: pointer;
        transition: border-color 0.15s ease, color 0.15s ease;
      }
      .tv-btn:hover { color: #6c8cff; border-color: #2f5148; }
      .tv-close { color: #aab3d7; padding: 0 8px; }

      /* ---- Docked (split) mode: tree pinned to the right, editor keeps the left ----
         --tv-tree-w is the tree panel's width; the editor takes the rest. Both default to a
         50/50 split and are updated together as the split divider is dragged. */
      :root { --tv-tree-w: 50vw; }
      #treeview-overlay.tv-docked {
        display: block;
        inset: auto;
        background: none;
        backdrop-filter: none;
        pointer-events: none; /* let the left-hand editor stay interactive */
      }
      #treeview-overlay.tv-docked #treeview {
        pointer-events: auto;
        position: fixed;
        top: 0;
        right: 0;
        width: var(--tv-tree-w);
        height: 100vh;
        border-radius: 0;
        border-top: none;
        border-right: none;
        border-bottom: none;
        box-shadow: -18px 0 50px rgba(0, 0, 0, 0.45);
      }
      /* When docked + visible, the editor gives up the tree's share (higher specificity wins). */
      body.tv-body-docked #app { width: calc(100vw - var(--activity-total-w) - var(--tv-tree-w)); }
      .tv-dock.tv-dock-on { color: #6c8cff; border-color: #2f5148; }

      /* Split divider on the tree panel's left edge - only interactive while docked. */
      #treeview-split {
        display: none;
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 6px;
        margin-left: -3px;
        z-index: 6;
        cursor: col-resize;
        background: transparent;
        transition: background 0.12s ease;
      }
      #treeview-overlay.tv-docked #treeview-split { display: block; }
      #treeview-split:hover,
      #treeview-split.tv-dragging { background: #6c8cff; }

      #treeview-body { flex: 1; display: flex; min-height: 0; }

      #treeview-tree {
        flex: 1;
        overflow: auto;
        padding: 8px 4px;
        font-size: 12.5px;
        line-height: 1.55;
        outline: none;
      }
      /* Detail panel dragged shut: hide it + its divider; the outline takes the full width. */
      #treeview.tv-detail-hidden #treeview-resizer,
      #treeview.tv-detail-hidden #treeview-detail { display: none; }

      /* Draggable divider between the node view and the detail panel. */
      #treeview-resizer {
        flex: 0 0 5px;
        cursor: col-resize;
        background: #323a68;
        transition: background 0.12s ease;
      }
      #treeview-resizer:hover,
      #treeview-resizer.tv-dragging { background: #6c8cff; }

      #treeview-detail {
        width: 260px;
        flex: none;
        overflow: auto;
        padding: 12px;
        background: #0d1a19;
        font-size: 11.5px;
      }

      .tv-row {
        display: flex;
        align-items: baseline;
        gap: 6px;
        padding: 1px 8px 1px 0;
        border-radius: 5px;
        cursor: pointer;
        white-space: nowrap;
      }
      .tv-row:hover { background: #20284666; }
      .tv-toggle {
        display: inline-block;
        width: 12px;
        color: #567069;
        cursor: pointer;
        user-select: none;
        flex: none;
      }
      .tv-field { color: #86c9e0; }
      .tv-type.tv-named { color: #7fd6b6; }
      .tv-type.tv-anon { color: #82a49a; }
      .tv-pos { color: #567069; font-size: 10.5px; }
      .tv-snip { color: #c3a6e0; font-size: 11px; opacity: 0.85; }

      .tv-empty, .tv-hint { color: #567069; padding: 12px; font-style: italic; }

      .tv-drow { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; }
      .tv-dk { color: #aab3d7; }
      .tv-dv { color: #eef2ff; text-align: right; word-break: break-all; }
      .tv-dtext {
        margin-top: 10px;
        padding-top: 10px;
        border-top: 1px solid #323a68;
        color: #c3a6e0;
        white-space: pre-wrap;
        word-break: break-all;
      }

      /* Editor highlight painted while hovering a tree node. */
      .tv-node-hit { background: rgba(108, 140, 255, 0.14); }
      .tv-node-hit-inline { text-decoration: underline; text-decoration-color: rgba(108, 140, 255, 0.5); }

      /* Error-Lens-style inline diagnostic text, injected at the end of a broken line. The leading
         spaces come from the injected content; this only colours it. */
      .diag-inline {
        color: #f0a0a0 !important;
        font-style: italic;
        opacity: 0.85;
      }
      /* Faint red wash across a line that carries a diagnostic, so it reads at a glance. */
      .diag-line { background: rgba(248, 113, 113, 0.07); }

      /* ---- Theme quick-pick ---- */
      #theme-picker-backdrop {
        position: fixed;
        inset: 0;
        z-index: 60;
        display: none;
        pointer-events: none;
        font-family: var(--font-mono);
      }
      #theme-picker-backdrop.theme-picker-visible {
        display: block;
        pointer-events: auto;
      }
      #theme-picker {
        position: fixed;
        top: 8px;
        left: 50%;
        width: min(620px, calc(100vw - 36px));
        max-height: min(520px, calc(100vh - 28px));
        display: flex;
        flex-direction: column;
        color: var(--theme-text, #eef2ff);
        background: var(--theme-picker-bg, #171b31);
        border: 1px solid var(--theme-picker-border, #323a68);
        box-shadow: 0 20px 56px var(--theme-shadow, rgba(0, 0, 0, 0.52));
        opacity: 0;
        transform: translate(-50%, -18px);
        transition: transform 0.12s ease, opacity 0.12s ease;
        overflow: hidden;
      }
      #theme-picker-backdrop.theme-picker-visible #theme-picker {
        opacity: 1;
        transform: translate(-50%, 0);
      }
      #theme-picker-head {
        display: grid;
        grid-template-columns: 1fr auto;
        align-items: center;
        gap: 10px;
        padding: 8px;
        border-bottom: 1px solid var(--theme-picker-border, #323a68);
      }
      #theme-picker-input {
        width: 100%;
        height: 32px;
        box-sizing: border-box;
        color: var(--theme-text, #eef2ff);
        background: var(--theme-picker-input-bg, #0f1327);
        border: 1px solid var(--theme-accent, #6c8cff);
        border-radius: 2px;
        padding: 0 9px;
        font-family: inherit;
        font-size: 13px;
        outline: none;
      }
      #theme-picker-scope {
        color: var(--theme-muted, #aab3d7);
        font-size: 11px;
        white-space: nowrap;
      }
      #theme-picker-list {
        min-height: 0;
        overflow: auto;
        padding: 4px 0;
      }
      .theme-picker-item {
        width: 100%;
        min-height: 44px;
        display: grid;
        grid-template-columns: 24px minmax(0, 1fr) auto;
        align-items: center;
        gap: 8px;
        padding: 4px 12px;
        color: var(--theme-text, #eef2ff);
        background: transparent;
        border: 0;
        font-family: inherit;
        text-align: left;
        cursor: pointer;
      }
      .theme-picker-item:hover {
        background: var(--theme-picker-hover-bg, #202846);
      }
      .theme-picker-item.theme-picker-item-active {
        background: var(--theme-picker-selected-bg, #26305f);
      }
      .theme-picker-mark {
        color: var(--theme-accent, #6c8cff);
        font-size: 13px;
        text-align: center;
      }
      .theme-picker-text {
        min-width: 0;
        display: grid;
        gap: 2px;
      }
      .theme-picker-label {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 12.5px;
      }
      .theme-picker-detail {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        color: var(--theme-muted, #aab3d7);
        font-size: 10.5px;
      }
      .theme-picker-swatch {
        display: inline-flex;
        width: 42px;
        height: 16px;
        overflow: hidden;
        border: 1px solid var(--theme-picker-border, #323a68);
        border-radius: 3px;
      }
      .theme-picker-swatch span {
        flex: 1 1 0;
      }
      .theme-picker-empty {
        padding: 18px;
        color: var(--theme-muted, #aab3d7);
        font-size: 12px;
      }

      /* ---- Auth shell ---- */
      #auth-overlay {
        position: fixed;
        inset: 0;
        z-index: 40;
        display: none;
        align-items: center;
        justify-content: center;
        padding: 20px;
        background: rgba(5, 8, 7, 0.72);
        backdrop-filter: blur(3px);
        font-family: var(--font-mono);
      }
      #auth-overlay.auth-visible { display: flex; }
      body.portal-parent #auth-overlay,
      body.portal-school #auth-overlay {
        background: color-mix(in srgb, var(--landing-accent, #4d63d8) 82%, #ffffff);
        backdrop-filter: none;
      }
      #auth-modal {
        width: min(640px, 94vw);
        max-height: min(680px, 92vh);
        display: grid;
        grid-template-columns: 1fr;
        background: #171b31;
        border: 1px solid #323a68;
        border-radius: 12px;
        box-shadow: 0 26px 76px rgba(0, 0, 0, 0.52);
        overflow: hidden;
        color: #eef2ff;
      }
      body.portal-parent #auth-modal,
      body.portal-school #auth-modal {
        width: min(820px, 92vw);
        max-height: min(760px, 92vh);
        grid-template-columns: 1fr;
        color: #424242;
        background: #f8f8f8;
        border: 0;
        border-radius: 8px;
      }
      #auth-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        padding: 16px 48px 12px 18px;
        background: #0f1327;
        border-bottom: 1px solid #323a68;
      }
      body.portal-parent #auth-header,
      body.portal-school #auth-header {
        background: #ffffff;
        border-bottom: 1px solid #d8d8d8;
      }
      #auth-brand {
        display: inline-flex;
        align-items: end;
        gap: 9px;
        min-width: 0;
        color: var(--theme-text, #eef2ff);
      }
      #auth-brand .brand-logo {
        width: 110px;
        max-width: 100%;
        height: auto;
      }
      #auth-brand-label {
        color: var(--theme-text, #eef2ff);
        font-size: 12px;
        font-weight: 700;
      }
      #auth-body {
        min-height: 0;
        overflow: auto;
        padding: 18px 22px 22px;
      }
      .auth-panel { display: none; }
      .auth-panel.auth-panel-on { display: block; }
      #student-group-overlay {
        position: fixed;
        inset: 0;
        z-index: 52;
        display: none;
        align-items: center;
        justify-content: center;
        padding: 18px;
        background: rgba(7, 11, 29, 0.46);
        backdrop-filter: blur(10px);
        font-family: var(--font-mono);
      }
      #student-group-overlay.group-visible { display: flex; }
      #student-group-modal {
        width: min(440px, 100%);
        box-sizing: border-box;
        color: var(--theme-text, #eef2ff);
        background: var(--theme-panel, #171b31);
        border: 1px solid var(--theme-picker-border, #323a68);
        border-radius: 10px;
        box-shadow: 0 22px 60px rgba(0, 0, 0, 0.28);
        padding: 22px;
      }
      #student-group-modal h2 {
        margin: 0 0 8px;
        font-size: 20px;
        line-height: 1.2;
      }
      #student-group-modal p {
        margin: 0 0 16px;
        color: var(--theme-muted, #aab3d7);
        font-size: 12px;
        line-height: 1.5;
      }
      #student-group-actions {
        display: flex;
        justify-content: flex-end;
        margin-top: 16px;
      }
      #student-group-save {
        height: 36px;
        color: var(--theme-accent-text, #070b1d);
        background: var(--theme-accent, #6c8cff);
        border: 1px solid var(--theme-accent, #6c8cff);
        border-radius: 7px;
        padding: 0 14px;
        font-family: inherit;
        font-size: 12px;
        font-weight: 800;
        cursor: pointer;
      }
      #student-group-status {
        min-height: 16px;
        margin-top: 10px;
        color: var(--theme-muted, #aab3d7);
        font-size: 11px;
      }
      #service-link-overlay {
        position: fixed;
        inset: 0;
        z-index: 52;
        display: none;
        align-items: center;
        justify-content: center;
        padding: 18px;
        background: rgba(7, 11, 29, 0.46);
        backdrop-filter: blur(10px);
        font-family: var(--font-mono);
      }
      #service-link-overlay.service-link-visible { display: flex; }
      #service-link-modal {
        width: min(440px, 100%);
        box-sizing: border-box;
        color: var(--theme-text, #eef2ff);
        background: var(--theme-panel, #171b31);
        border: 1px solid var(--theme-picker-border, #323a68);
        border-radius: 10px;
        box-shadow: 0 22px 60px rgba(0, 0, 0, 0.28);
        padding: 22px;
      }
      #service-link-modal h2 {
        margin: 0 0 8px;
        font-size: 20px;
        line-height: 1.2;
      }
      #service-link-modal p {
        margin: 0 0 16px;
        color: var(--theme-muted, #aab3d7);
        font-size: 12px;
        line-height: 1.5;
      }
      #service-link-student, #service-link-password {
        width: 100%;
        box-sizing: border-box;
        margin-bottom: 10px;
      }
      #service-link-actions {
        display: flex;
        justify-content: flex-end;
        margin-top: 16px;
      }
      #service-link-save {
        height: 36px;
        color: var(--theme-accent-text, #070b1d);
        background: var(--theme-accent, #6c8cff);
        border: 1px solid var(--theme-accent, #6c8cff);
        border-radius: 7px;
        padding: 0 14px;
        font-family: inherit;
        font-size: 12px;
        font-weight: 800;
        cursor: pointer;
      }
      #service-link-status {
        min-height: 16px;
        margin-top: 10px;
        color: var(--theme-muted, #aab3d7);
        font-size: 11px;
      }
      .auth-title {
        margin: 0 0 14px;
        color: #eef2ff;
        font-size: 17px;
        line-height: 1.25;
      }
      body.portal-parent .auth-title,
      body.portal-school .auth-title {
        color: #424242;
        font-size: 30px;
        font-weight: 400;
      }
      .auth-mode-switch {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        margin: 0 0 14px;
      }
      .auth-mode-option {
        height: 30px;
        color: var(--theme-muted, #aab3d7);
        background: transparent;
        border: 1px solid var(--theme-picker-border, #323a68);
        border-radius: 7px;
        padding: 0 10px;
        font-family: inherit;
        font-size: 11px;
        font-weight: 700;
        cursor: pointer;
      }
      .auth-mode-option:hover,
      .auth-mode-option.auth-mode-on {
        color: var(--theme-accent, #6c8cff);
        background: var(--theme-picker-selected-bg, #202846);
      }
      .student-mode-only[hidden] {
        display: none;
      }
      .student-google-panel {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        align-items: end;
        gap: 10px;
        margin-bottom: 12px;
      }
      .auth-google-wide {
        min-width: 150px;
        width: 100%;
      }
      .auth-divider {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        align-items: center;
        gap: 10px;
        margin: 0 0 14px;
        color: var(--theme-muted, #aab3d7);
        font-size: 11px;
        font-weight: 800;
        text-transform: uppercase;
      }
      .auth-divider::before,
      .auth-divider::after {
        content: "";
        height: 1px;
        background: var(--theme-picker-border, #323a68);
      }
      .auth-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
      }
      .auth-field {
        display: grid;
        gap: 5px;
        color: #aab3d7;
        font-size: 11px;
      }
      body.portal-parent .auth-field,
      body.portal-school .auth-field,
      body.portal-parent .auth-remember,
      body.portal-school .auth-remember {
        color: #424242;
        font-size: 16px;
        font-weight: 700;
      }
      .auth-field input,
      .auth-field select {
        width: 100%;
        box-sizing: border-box;
        height: 34px;
        color: #eef2ff;
        background: #0f1327;
        border: 1px solid #323a68;
        border-radius: 7px;
        padding: 0 10px;
        font-family: inherit;
        font-size: 12px;
        outline: none;
      }
      body.portal-parent .auth-field input,
      body.portal-school .auth-field input,
      body.portal-parent .auth-field select,
      body.portal-school .auth-field select {
        height: 42px;
        color: #424242;
        background: #ffffff;
        border-color: #d6d6d6;
        font-size: 15px;
      }
      .auth-field input:focus,
      .auth-field select:focus {
        border-color: #6c8cff;
      }
      .auth-field-wide { grid-column: 1 / -1; }
      .password-field-wrap {
        position: relative;
        display: block;
        width: 100%;
      }
      .password-field-wrap input[data-has-visibility-toggle] {
        width: 100%;
        padding-right: 38px;
      }
      .password-toggle-btn {
        position: absolute;
        top: 50%;
        right: 5px;
        transform: translateY(-50%);
        width: 28px;
        height: 28px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        color: inherit;
        background: transparent;
        border: 0;
        opacity: 0.58;
        cursor: pointer;
      }
      .password-toggle-btn:hover,
      .password-toggle-btn:focus-visible { opacity: 1; }
      .password-toggle-btn svg {
        width: 17px;
        height: 17px;
        pointer-events: none;
      }
      .auth-remember {
        position: relative;
        min-height: 24px;
        display: inline-flex;
        align-items: center;
        gap: 8px;
        box-sizing: border-box;
        padding: 0;
        color: var(--theme-muted, #aab3d7);
        background: transparent;
        border: 0;
        font-size: 11px;
        cursor: pointer;
      }
      .auth-remember:hover {
        color: var(--theme-text, #eef2ff);
      }
      .auth-remember input {
        position: absolute;
        left: 0;
        width: 20px;
        height: 20px;
        margin: 0;
        opacity: 0;
        cursor: pointer;
      }
      .auth-remember-control {
        position: relative;
        width: 20px;
        height: 20px;
        box-sizing: border-box;
        border: 1px solid var(--theme-picker-border, #323a68);
        border-radius: 6px;
        background: var(--theme-picker-bg, #171b31);
        pointer-events: none;
        transition: border-color 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
      }
      .auth-remember-control::after {
        content: "";
        position: absolute;
        left: 5px;
        top: 4px;
        width: 8px;
        height: 5px;
        border-left: 2px solid currentColor;
        border-bottom: 2px solid currentColor;
        opacity: 0;
        transform: rotate(-45deg) scale(0.55);
        transition: opacity 0.1s ease, transform 0.1s ease;
      }
      .auth-remember input:focus-visible + .auth-remember-control {
        outline: 2px solid var(--theme-accent, #6c8cff);
        outline-offset: 2px;
      }
      .auth-remember input:checked + .auth-remember-control {
        color: var(--theme-accent-text, #070b1d);
        background: var(--theme-accent, #6c8cff);
        border-color: var(--theme-accent, #6c8cff);
      }
      .auth-remember input:checked + .auth-remember-control::after {
        opacity: 1;
        transform: rotate(-45deg) scale(1);
      }
      .auth-remember-title {
        color: var(--theme-text, #eef2ff);
        font-size: 11.5px;
        font-weight: 700;
        pointer-events: none;
      }
      body.portal-parent .auth-remember-title,
      body.portal-school .auth-remember-title {
        font-size: 12px;
      }
      .auth-actions {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 8px;
        margin-top: 16px;
      }
      .auth-action {
        height: 34px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: #070b1d;
        background: #6c8cff;
        border: 1px solid #6c8cff;
        border-radius: 7px;
        padding: 0 12px;
        font-family: inherit;
        font-size: 12px;
        font-weight: 700;
        cursor: pointer;
      }
      body.portal-parent .auth-action,
      body.portal-school .auth-action {
        min-width: 210px;
        height: 46px;
        color: #ffffff;
        background: var(--landing-accent, #4d63d8);
        border-color: var(--landing-accent, #4d63d8);
        font-size: 15px;
      }
      .auth-action-secondary {
        color: #eef2ff;
        background: #202846;
        border-color: #323a68;
      }
      body.portal-parent .auth-action-secondary,
      body.portal-school .auth-action-secondary {
        color: var(--landing-accent, #4d63d8);
        background: #ffffff;
        border-color: #d6d6d6;
      }
      .auth-status {
        min-height: 18px;
        margin-top: 12px;
        color: #f2c96d;
        font-size: 11px;
      }
      #editor-login-panel {
        position: fixed;
        top: var(--topbar-h);
        right: 0;
        z-index: 39;
        width: min(350px, calc(100vw - 18px));
        display: none;
        gap: 18px;
        padding: 28px 24px 24px;
        box-sizing: border-box;
        color: #ffffff;
        background: #8557d8;
        border: 1px solid rgba(79, 44, 153, 0.42);
        border-top: 0;
        border-radius: 0 0 10px 10px;
        box-shadow: 0 15px 34px rgba(41, 24, 89, 0.32);
        font-family: var(--font-mono);
      }
      #editor-login-panel.login-visible {
        display: grid;
      }
      .editor-login-field {
        display: grid;
        gap: 8px;
        color: #ffffff;
        font-size: 13px;
        font-weight: 700;
      }
      .editor-login-field input,
      .editor-login-field select {
        height: 40px;
        width: 100%;
        box-sizing: border-box;
        color: #171028;
        background: #ffffff;
        border: 1px solid rgba(71, 41, 143, 0.28);
        border-radius: 6px;
        padding: 0 12px;
        font: inherit;
        font-size: 13px;
        outline: none;
      }
      .editor-login-field input:focus,
      .editor-login-field select:focus {
        border-color: #ffffff;
        box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.24);
      }
      #editor-login-actions {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 12px;
      }
      #editor-login-submit,
      #editor-register-submit,
      #editor-google-submit {
        height: 42px;
        padding: 0 18px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        color: #7e57d6;
        background: #ffffff;
        border: 0;
        border-radius: 8px;
        font: inherit;
        font-size: 13px;
        font-weight: 700;
        cursor: pointer;
      }
      #editor-register-submit {
        color: #ffffff;
        background: rgba(255, 255, 255, 0.14);
        border: 1px solid rgba(255, 255, 255, 0.28);
      }
      #editor-google-submit {
        min-width: 120px;
        color: #202124;
        background: #ffffff;
        border: 1px solid rgba(71, 41, 143, 0.24);
        box-shadow: 0 10px 24px rgba(18, 24, 54, 0.16);
      }
      #editor-google-submit::before {
        content: "G";
        width: 20px;
        height: 20px;
        display: inline-grid;
        place-items: center;
        color: #4285f4;
        background: #ffffff;
        border: 1px solid rgba(66, 133, 244, 0.2);
        border-radius: 50%;
        font-weight: 800;
        line-height: 1;
      }
      #editor-google-submit:hover {
        border-color: rgba(66, 133, 244, 0.56);
        box-shadow: 0 12px 28px rgba(66, 133, 244, 0.2);
      }
      #editor-login-help {
        min-width: 0;
        color: #ffffff;
        background: transparent;
        border: 0;
        padding: 0;
        font: inherit;
        font-size: 12px;
        font-weight: 700;
        cursor: pointer;
        text-align: right;
      }
      #editor-login-status {
        min-height: 16px;
        color: #fff2b8;
        font-size: 11px;
      }
      #account-panel {
        position: fixed;
        top: calc(var(--topbar-h) + 8px);
        right: 16px;
        z-index: 39;
        width: min(360px, calc(100vw - 32px));
        max-height: calc(100dvh - var(--topbar-h) - 24px);
        display: none;
        font-family: var(--font-mono);
        color: #eef2ff;
        background: #171b31;
        border: 1px solid #323a68;
        border-radius: 10px;
        box-shadow: 0 18px 52px rgba(0, 0, 0, 0.46);
        overflow: hidden;
      }
      #account-panel.account-visible { display: block; }
      #account-panel.account-parent .account-row,
      #account-panel.account-parent #account-groups {
        display: none;
      }
      #account-panel.account-parent #account-body {
        gap: 0;
      }
      #account-panel.account-parent #account-actions {
        grid-template-columns: 1fr;
      }
      #account-head {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 10px 12px;
        background: #0f1327;
        border-bottom: 1px solid #323a68;
      }
      #account-name {
        flex: 1 1 auto;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        color: #6c8cff;
        font-size: 12px;
        font-weight: 700;
      }
      .account-mini {
        height: 26px;
        color: #eef2ff;
        background: #202846;
        border: 1px solid #323a68;
        border-radius: 6px;
        padding: 0 8px;
        font-family: inherit;
        font-size: 11px;
        cursor: pointer;
      }
      #account-body {
        display: grid;
        gap: 10px;
        max-height: calc(100vh - 76px);
        overflow: auto;
        padding: 12px;
        font-size: 11px;
      }
      .account-row {
        display: flex;
        justify-content: space-between;
        gap: 10px;
      }
      .account-key { color: #aab3d7; }
      .account-value { color: #eef2ff; text-align: right; }
      #account-groups {
        display: grid;
        gap: 6px;
      }
      .account-group {
        display: grid;
        gap: 4px;
        padding: 8px;
        background: #0f1327;
        border: 1px solid #323a68;
        border-radius: 7px;
      }
      .account-group-name { color: #f2c96d; }
      .account-group-meta { color: #aab3d7; }
      #admin-tools[hidden] {
        display: none;
      }
      #admin-tools {
        display: grid;
        gap: 10px;
        padding-top: 10px;
        border-top: 1px solid var(--theme-picker-border, #323a68);
      }
      .admin-section {
        display: grid;
        gap: 7px;
        /* When a section sits next to a taller sibling in a side-by-side grid
           (e.g. a list next to a longer form) and gets stretched to match its
           height, any leftover space should collect at the bottom, never get
           distributed above/between the content. */
        align-content: start;
      }
      .admin-section-feature {
        grid-column: 1 / -1;
        padding: 10px;
        background: color-mix(in srgb, var(--theme-accent, #6c8cff) 8%, transparent);
        border: 1px solid color-mix(in srgb, var(--theme-accent, #6c8cff) 35%, var(--theme-picker-border, #323a68));
        border-radius: 8px;
      }
      /* .admin-section's own `display: grid` has the same specificity as the
         browser's built-in [hidden] rule and comes later in the cascade, so it
         silently wins and keeps a hidden section visible. Force hidden to
         actually mean hidden everywhere in the admin workspace. */
      #admin-tools [hidden] { display: none !important; }
      .admin-section-title {
        color: var(--theme-accent, #6c8cff);
        font-size: 10.5px;
        font-weight: 800;
        letter-spacing: 0.05em;
        text-transform: uppercase;
      }
      .admin-help-text {
        margin: 0;
        color: var(--theme-muted, #aab3d7);
        font-size: 10px;
        line-height: 1.45;
      }
      .admin-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
      }
      .admin-field {
        display: grid;
        gap: 4px;
        color: var(--theme-muted, #aab3d7);
        font-size: 10px;
      }
      .admin-field-wide {
        grid-column: 1 / -1;
      }
      .admin-field input,
      .admin-field select,
      .admin-field textarea {
        min-width: 0;
        box-sizing: border-box;
        color: var(--theme-text, #eef2ff);
        background: var(--theme-picker-input-bg, #0f1327);
        border: 1px solid var(--theme-picker-border, #323a68);
        border-radius: 5px;
        padding: 0 8px;
        font: inherit;
        font-size: 11px;
        outline: none;
      }
      .admin-field input,
      .admin-field select {
        height: 28px;
      }
      .admin-field textarea {
        min-height: 58px;
        resize: vertical;
        padding: 8px;
        line-height: 1.45;
      }
      .admin-field select {
        appearance: none;
      }
      .admin-field input:focus,
      .admin-field select:focus,
      .admin-field textarea:focus {
        border-color: var(--theme-accent, #6c8cff);
      }
      .admin-check {
        min-height: 28px;
        display: inline-flex;
        align-items: center;
        gap: 7px;
        color: var(--theme-muted, #aab3d7);
        font-size: 10px;
      }
      .admin-action {
        height: 28px;
        justify-self: start;
        color: var(--theme-accent-text, #070b1d);
        background: var(--theme-accent, #6c8cff);
        border: 1px solid var(--theme-accent, #6c8cff);
        border-radius: 5px;
        padding: 0 9px;
        font: inherit;
        font-size: 10.5px;
        font-weight: 800;
        cursor: pointer;
      }
      .admin-action-row {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
      }
      .admin-lesson-bottom-actions { justify-content: space-between; align-items: center; }
      .admin-lesson-bottom-edit-actions { display: flex; gap: 8px; }
      .admin-action-secondary {
        color: var(--theme-text, #eef2ff);
        background: transparent;
      }
      .admin-import-panel {
        display: grid;
        gap: 8px;
        padding: 9px;
        background: var(--theme-picker-input-bg, #0f1327);
        border: 1px solid var(--theme-picker-border, #323a68);
        border-radius: 7px;
      }
      .admin-import-file {
        display: grid;
        gap: 4px;
        color: var(--theme-muted, #aab3d7);
        font-size: 10px;
      }
      .admin-import-file input {
        min-width: 0;
        color: var(--theme-text, #eef2ff);
        font: inherit;
        font-size: 10px;
      }
      .admin-import-summary {
        color: var(--theme-text, #eef2ff);
        font-size: 10.5px;
        line-height: 1.5;
      }
      .admin-import-list {
        max-height: 300px;
        display: grid;
        gap: 7px;
        overflow: auto;
      }
      .admin-import-draft {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        align-items: start;
        gap: 8px;
        padding: 8px;
        border: 1px solid var(--theme-picker-border, #323a68);
        border-radius: 6px;
      }
      .admin-import-draft[data-status="ready"] { border-left: 3px solid #2dd4bf; }
      .admin-import-draft[data-status="review"] { border-left: 3px solid #f2c96d; }
      .admin-import-draft[data-status="blocked"] { border-left: 3px solid #ff6b7a; }
      .admin-import-draft[data-status="sent"] { border-left: 3px solid #6c8cff; opacity: 0.72; }
      .admin-import-copy {
        min-width: 0;
        display: grid;
        gap: 3px;
      }
      .admin-import-name { color: var(--theme-text, #eef2ff); font-weight: 800; }
      .admin-import-meta,
      .admin-import-comment,
      .admin-import-reason {
        color: var(--theme-muted, #aab3d7);
        font-size: 9.5px;
        line-height: 1.45;
        overflow-wrap: anywhere;
      }
      .admin-import-comment { color: #d9def6; }
      .admin-import-reason { color: #f2c96d; }
      .admin-import-edit {
        height: 24px;
        color: var(--theme-text, #eef2ff);
        background: transparent;
        border: 1px solid var(--theme-picker-border, #323a68);
        border-radius: 4px;
        padding: 0 7px;
        font: inherit;
        font-size: 9px;
        cursor: pointer;
      }
      .admin-import-actions {
        display: grid;
        gap: 5px;
      }
      .admin-import-send-one {
        height: 24px;
        color: #07111f;
        background: #2dd4bf;
        border: 1px solid #2dd4bf;
        border-radius: 4px;
        padding: 0 7px;
        font: inherit;
        font-size: 9px;
        font-weight: 800;
        cursor: pointer;
      }
      .admin-email-html-preview {
        width: 100%;
        min-height: 420px;
        box-sizing: border-box;
        background: #f5f1ea;
        border: 1px solid var(--theme-picker-border, #323a68);
        border-radius: 7px;
      }
      .admin-email-prompt {
        min-width: 0;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 7px;
        color: var(--theme-text, #eef2ff);
        background: color-mix(in srgb, var(--theme-accent, #6c8cff) 14%, var(--theme-picker-input-bg, #0f1327));
        border: 1px solid color-mix(in srgb, var(--theme-accent, #6c8cff) 42%, var(--theme-picker-border, #323a68));
        border-radius: 6px;
        padding: 7px;
        font-size: 10px;
      }
      .admin-email-prompt[hidden] {
        display: none;
      }
      #admin-access-email-text {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      .admin-email-send {
        height: 24px;
        color: var(--theme-accent-text, #070b1d);
        background: var(--theme-accent, #6c8cff);
        border: 1px solid var(--theme-accent, #6c8cff);
        border-radius: 5px;
        padding: 0 8px;
        font: inherit;
        font-size: 10px;
        font-weight: 800;
        cursor: pointer;
      }
      .admin-mini-list {
        min-height: 18px;
        display: grid;
        gap: 3px;
        align-content: start;
        color: var(--theme-muted, #aab3d7);
        font-size: 10px;
      }
      .admin-audit-controls {
        align-items: end;
      }
      .admin-audit-controls .admin-field {
        min-width: min(220px, 100%);
      }
      .admin-audit-list {
        min-height: 44px;
        display: grid;
        gap: 7px;
        color: var(--theme-muted, #aab3d7);
        font-size: 10px;
      }
      .admin-audit-list[data-loading="true"] {
        opacity: 0.55;
      }
      .admin-audit-row {
        min-width: 0;
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        align-items: center;
        gap: 10px;
        padding: 9px 10px;
        color: var(--theme-text, #eef2ff);
        background: var(--theme-picker-input-bg, #0f1327);
        border: 1px solid var(--theme-picker-border, #323a68);
        border-radius: 7px;
      }
      .admin-audit-channel,
      .admin-audit-status {
        border-radius: 999px;
        padding: 3px 7px;
        font-size: 9px;
        line-height: 1.2;
        white-space: nowrap;
      }
      .admin-audit-channel {
        color: var(--theme-accent-text, #070b1d);
        background: var(--theme-accent, #6c8cff);
        font-weight: 800;
        text-transform: uppercase;
      }
      .admin-audit-channel[data-channel="email"] {
        background: #f0a831;
      }
      .admin-audit-copy {
        min-width: 0;
        display: grid;
        gap: 2px;
      }
      .admin-audit-copy strong,
      .admin-audit-copy small {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      .admin-audit-copy small {
        color: var(--theme-muted, #aab3d7);
        font-weight: 400;
      }
      .admin-audit-status {
        color: var(--theme-muted, #aab3d7);
        background: color-mix(in srgb, var(--theme-picker-border, #323a68) 62%, transparent);
      }
		.admin-template-panel {
			display: grid;
			gap: 9px;
			padding: 11px;
			background: color-mix(in srgb, var(--theme-accent, #6c8cff) 8%, var(--theme-picker-input-bg, #0f1327));
			border: 1px solid color-mix(in srgb, var(--theme-accent, #6c8cff) 28%, var(--theme-picker-border, #323a68));
			border-radius: 7px;
		}
		.admin-template-panel code {
			color: var(--theme-text, #eef2ff);
		}
      .admin-mcp-settings code {
        color: var(--theme-text, #eef2ff);
      }
      .admin-platform-row {
        display: flex;
        flex-wrap: wrap;
        gap: 7px;
      }
      .admin-platform-row span {
        padding: 4px 8px;
        color: var(--theme-accent-text, #070b1d);
        background: var(--theme-accent, #6c8cff);
        border-radius: 999px;
        font-size: 9px;
        font-weight: 800;
      }
      .admin-mcp-status,
      .admin-mcp-device-list {
        color: var(--theme-muted, #aab3d7);
        font-size: 10px;
        line-height: 1.45;
      }
      .admin-mcp-device-list {
        display: grid;
        gap: 7px;
      }
      .admin-mcp-device {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 10px;
        padding: 9px;
        background: var(--theme-picker-input-bg, #0f1327);
        border: 1px solid var(--theme-picker-border, #323a68);
        border-radius: 7px;
      }
      .admin-mcp-device > div {
        min-width: 0;
        display: grid;
        gap: 3px;
      }
      .admin-mcp-device strong,
      .admin-mcp-device small {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      .admin-mcp-device button {
        min-height: 30px;
        color: #ffffff;
        background: #8b1e2d;
        border: 1px solid #b14252;
        border-radius: 5px;
        padding: 0 9px;
        font: 800 10px var(--font-sans);
        cursor: pointer;
      }
      .admin-mini-row,
      .admin-payment-row {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      .admin-family-row {
        min-width: 0;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 6px;
        padding: 5px 0;
        border-bottom: 1px solid color-mix(in srgb, var(--theme-picker-border, #323a68) 65%, transparent);
      }
      .admin-family-row span {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      .admin-family-row button {
        height: 22px;
        color: var(--theme-muted, #aab3d7);
        background: transparent;
        border: 1px solid var(--theme-picker-border, #323a68);
        border-radius: 4px;
        padding: 0 6px;
        font: inherit;
        font-size: 9px;
        cursor: pointer;
      }
      .admin-family-row button:hover,
      .admin-family-row button:focus-visible {
        color: var(--theme-text, #eef2ff);
        border-color: var(--theme-accent, #6c8cff);
      }
      .admin-parent-overview {
        display: grid;
        gap: 7px;
      }
      .admin-parent-overview-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto auto;
        gap: 4px 12px;
        padding: 9px 10px;
        color: var(--theme-text, #eef2ff);
        background: var(--theme-picker-input-bg, #0f1327);
        border: 1px solid var(--theme-picker-border, #323a68);
        border-radius: 7px;
      }
      .admin-parent-overview-row strong,
      .admin-parent-overview-row span {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      .admin-parent-overview-row small {
        grid-column: 1 / 3;
        color: var(--theme-muted, #aab3d7);
      }
      .admin-parent-overview-row .admin-parent-progress {
        grid-column: 1 / 3;
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 6px 9px;
        min-width: 0;
      }
      .admin-parent-overview-row .admin-parent-stage {
        flex: 0 0 auto;
        overflow: visible;
        padding: 3px 7px;
        color: #17213f;
        background: #fff0b8;
        border: 1px solid #d7ad29;
        border-radius: 999px;
        font-size: 9px;
        font-weight: 900;
        line-height: 1.25;
        white-space: nowrap;
      }
      .admin-parent-overview-row .admin-parent-stage-paid {
        color: #073c28;
        background: #c7f4dc;
        border-color: #2a9a68;
      }
      .admin-parent-overview-row .admin-parent-stage-payment_failed,
      .admin-parent-overview-row .admin-parent-stage-email_pending {
        color: #6d1520;
        background: #ffe1e4;
        border-color: #cc5968;
      }
      .admin-parent-overview-row .admin-parent-steps {
        flex: 1 1 280px;
        min-width: 0;
        overflow: visible;
        color: var(--theme-muted, #aab3d7);
        font-size: 9px;
        line-height: 1.45;
        white-space: normal;
      }
      .admin-parent-overview-row .admin-parent-delete {
        grid-column: 3;
        grid-row: 1 / 4;
        align-self: center;
        min-height: 28px;
        color: #ff9b9b;
        background: rgba(176, 42, 42, 0.12);
        border: 1px solid rgba(255, 116, 116, 0.42);
        border-radius: 5px;
        padding: 0 9px;
        font: inherit;
        font-size: 10px;
        font-weight: 800;
        cursor: pointer;
      }
      .admin-parent-overview-row .admin-parent-delete:hover,
      .admin-parent-overview-row .admin-parent-delete:focus-visible {
        color: #ffffff;
        background: rgba(176, 42, 42, 0.34);
        border-color: #ff7474;
      }
      .admin-parent-overview-row .admin-parent-delete:disabled {
        cursor: wait;
        opacity: 0.55;
      }
      .admin-payment-row {
        min-height: 54px;
        display: grid;
        grid-template-columns: minmax(170px, 1.3fr) minmax(92px, .5fr) minmax(120px, .6fr) minmax(150px, .8fr);
        align-items: center;
        gap: 10px;
        color: var(--theme-text, #eef2ff);
        background: var(--theme-picker-input-bg, #0f1327);
        border: 1px solid transparent;
        border-radius: 6px;
        padding: 8px 10px;
        font: inherit;
        font-size: 11px;
        text-align: left;
        cursor: pointer;
      }
      .admin-payment-row:hover {
        border-color: var(--theme-accent, #6c8cff);
      }
      .admin-payment-identity {
        min-width: 0;
        display: grid;
        gap: 3px;
      }
      .admin-payment-identity strong,
      .admin-payment-identity small,
      .admin-payment-row > small {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      .admin-payment-identity small,
      .admin-payment-row > small {
        color: var(--theme-muted, #aab3d7);
      }
      .admin-payment-amount,
      .admin-payment-state {
        width: fit-content;
        padding: 4px 7px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.08);
        font-weight: 850;
        white-space: nowrap;
      }
      .admin-payment-state[data-status="paid"] {
        color: #073c28;
        background: #c7f4dc;
      }
      .admin-payment-state[data-status="failed"] {
        color: #6d1520;
        background: #ffe1e4;
      }
      #admin-status {
        min-height: 14px;
        margin-top: 8px;
        padding: 7px 9px;
        color: var(--theme-accent, #6c8cff);
        background: color-mix(in srgb, var(--theme-accent, #6c8cff) 9%, transparent);
        border-radius: 6px;
        font-size: 10px;
      }
      #admin-status:empty {
        margin: 0;
        padding: 0;
        background: transparent;
      }
      #admin-status[data-state="success"] {
        color: #62d7a0;
        background: rgba(48, 180, 118, 0.12);
      }
      #auth-overlay {
        background: color-mix(in srgb, var(--theme-app-bg, #0d1020) 74%, transparent);
      }
      body.portal-parent #auth-overlay,
      body.portal-school #auth-overlay {
        background: color-mix(in srgb, var(--theme-app-bg, #0d1020) 78%, transparent);
      }
      #auth-modal,
      body.portal-parent #auth-modal,
      body.portal-school #auth-modal {
        color: var(--theme-text, #eef2ff);
        background: var(--theme-picker-bg, #171b31);
        border: 1px solid var(--theme-picker-border, #323a68);
        box-shadow: 0 26px 76px var(--theme-shadow, rgba(0, 0, 0, 0.52));
      }
      #auth-header,
      body.portal-parent #auth-header,
      body.portal-school #auth-header,
      #account-head {
        background: var(--theme-picker-input-bg, #0f1327);
        border-color: var(--theme-picker-border, #323a68);
      }
      #auth-brand {
        overflow: hidden;
      }
      #auth-brand,
      #account-name,
      .account-group-name {
        color: var(--theme-accent, #6c8cff);
      }
      .auth-title,
      body.portal-parent .auth-title,
      body.portal-school .auth-title,
      .auth-action-secondary,
      .account-mini,
      #account-panel,
      .account-value {
        color: var(--theme-text, #eef2ff);
      }
      .auth-field,
      .auth-remember,
      body.portal-parent .auth-field,
      body.portal-school .auth-field,
      body.portal-parent .auth-remember,
      body.portal-school .auth-remember,
      .account-key,
      .account-group-meta {
        color: var(--theme-muted, #aab3d7);
      }
      .auth-field input,
      .auth-field select,
      body.portal-parent .auth-field input,
      body.portal-school .auth-field input,
      body.portal-parent .auth-field select,
      body.portal-school .auth-field select {
        color: var(--theme-text, #eef2ff);
        background: var(--theme-picker-input-bg, #0f1327);
        border-color: var(--theme-picker-border, #323a68);
      }
      .auth-field input:focus,
      .auth-field select:focus {
        border-color: var(--theme-accent, #6c8cff);
      }
      .auth-action,
      body.portal-parent .auth-action,
      body.portal-school .auth-action {
        color: var(--theme-accent-text, #070b1d);
        background: var(--theme-accent, #6c8cff);
        border-color: var(--theme-accent, #6c8cff);
      }
      .auth-action-secondary,
      body.portal-parent .auth-action-secondary,
      body.portal-school .auth-action-secondary,
      .account-mini {
        color: var(--theme-text, #eef2ff);
        background: var(--theme-picker-hover-bg, #202846);
        border-color: var(--theme-picker-border, #323a68);
      }
      .auth-status,
      #editor-login-status {
        color: var(--theme-accent, #f2c96d);
      }
      #editor-login-panel,
      #account-panel,
      .account-group {
        color: var(--theme-text, #eef2ff);
        background: var(--theme-picker-bg, #171b31);
        border-color: var(--theme-picker-border, #323a68);
        box-shadow: 0 18px 52px var(--theme-shadow, rgba(0, 0, 0, 0.46));
      }
      .editor-login-field,
      #editor-login-help {
        color: var(--theme-text, #ffffff);
      }
      .editor-login-field input,
      .editor-login-field select {
        color: var(--theme-text, #eef2ff);
        background: var(--theme-picker-input-bg, #0f1327);
        border-color: var(--theme-picker-border, #323a68);
      }
      .editor-login-field input:focus,
      .editor-login-field select:focus {
        border-color: var(--theme-accent, #6c8cff);
        box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-accent, #6c8cff) 24%, transparent);
      }
      #editor-login-submit {
        color: var(--theme-accent-text, #070b1d);
        background: var(--theme-accent, #6c8cff);
      }
      #editor-register-submit {
        color: var(--theme-text, #eef2ff);
        background: var(--theme-picker-hover, #202846);
        border-color: var(--theme-picker-border, #323a68);
      }
      #editor-google-submit {
        color: #202124;
        background: #ffffff;
        border-color: rgba(108, 140, 255, 0.34);
      }
      #editor-google-submit:hover {
        border-color: rgba(66, 133, 244, 0.68);
      }
      #toolbar {
        color: var(--theme-muted, #aab3d7);
      }
      #auth-btn,
      #tree-btn {
        color: var(--theme-text, #eef2ff);
        background: var(--theme-picker-bg, #202846);
        border-color: var(--theme-picker-border, #323a68);
      }
      #auth-btn:hover,
      #auth-btn.auth-on,
      #tree-btn:hover,
      #tree-btn.tree-btn-on,
      #tree-btn[aria-pressed="true"] {
        color: var(--theme-accent, #6c8cff);
        border-color: var(--theme-accent, #6c8cff);
      }
      #auth-btn.auth-login-open {
        color: var(--theme-accent-text, #070b1d);
        background: var(--theme-accent, #6c8cff);
        border-color: var(--theme-accent, #6c8cff);
      }
      @media (max-width: 700px) {
        #site-topbar {
          grid-template-columns: minmax(0, auto) auto minmax(0, 1fr) auto;
          gap: 8px;
          padding: 0 10px;
        }
        .site-brand-logo {
          height: 23px;
          max-width: 72px;
        }
        #site-brand {
          gap: 6px;
          font-size: 10.5px;
        }
        #site-nav {
          gap: 4px;
        }
        .top-action {
          padding: 0 7px;
          font-size: 11px;
        }
        #toolbar {
          max-width: 132px;
        }
        #auth-modal { grid-template-columns: 1fr; }
        #auth-header {
          align-items: flex-start;
          flex-direction: column;
          padding: 14px 44px 10px 16px;
        }
        #auth-brand { width: 100%; }
        .student-google-panel { grid-template-columns: 1fr; }
        .auth-grid { grid-template-columns: 1fr; }
        #account-panel {
          right: max(12px, env(safe-area-inset-right));
          left: max(12px, env(safe-area-inset-left));
          width: auto;
        }
      }
      #mobile-nav-toggle {
        display: none;
      }
      .skip-link {
        position: fixed;
        top: 8px;
        left: 8px;
        z-index: 10001;
        transform: translateY(-160%);
        padding: 10px 14px;
        color: #ffffff;
        background: #243bb7;
        border-radius: 6px;
        font: 700 13px var(--font-mono);
      }
      .skip-link:focus { transform: translateY(0); }
      #admin-overlay {
        position: fixed;
        inset: 0;
        z-index: 45;
        display: none;
        align-items: center;
        justify-content: center;
        padding: 20px;
        background: color-mix(in srgb, var(--theme-app-bg, #0d1020) 78%, transparent);
        backdrop-filter: blur(3px);
      }
      #admin-overlay.admin-visible { display: flex; }
      #admin-dialog {
        width: min(920px, 96vw);
        max-height: min(820px, 92vh);
        display: grid;
        grid-template-rows: auto minmax(0, 1fr);
        color: var(--theme-text, #eef2ff);
        background: var(--theme-picker-bg, #171b31);
        border: 1px solid var(--theme-picker-border, #323a68);
        border-radius: 10px;
        box-shadow: 0 26px 76px var(--theme-shadow, rgba(0, 0, 0, 0.52));
        overflow: hidden;
        font-family: var(--font-mono);
      }
      #admin-dialog-head {
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        padding: 0 14px 0 18px;
        background: var(--theme-picker-input-bg, #0f1327);
        border-bottom: 1px solid var(--theme-picker-border, #323a68);
      }
      #admin-dialog-body {
        min-height: 0;
        overflow: auto;
        padding: 18px;
      }
      #admin-dialog-body #admin-tools {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: 0;
        border: 0;
      }
      #account-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
      #account-logout-btn { color: #ffd2d2; border-color: #9a3f4c; }
      body.portal-parent #account-logout-btn,
      body.portal-school #account-logout-btn {
        color: #8b1e2d;
        background: #fff7f7;
        border-color: #b83b4d;
        font-weight: 800;
      }
      body.portal-parent #account-logout-btn:hover,
      body.portal-parent #account-logout-btn:focus-visible,
      body.portal-school #account-logout-btn:hover,
      body.portal-school #account-logout-btn:focus-visible {
        color: #ffffff;
        background: #9a3f4c;
        border-color: #9a3f4c;
        outline: 2px solid color-mix(in srgb, #9a3f4c 42%, transparent);
        outline-offset: 2px;
      }
      @media (max-width: 800px) {
        #site-topbar {
          grid-template-columns: minmax(0, 1fr) auto auto;
          gap: 8px;
        }
        #mobile-nav-toggle {
          grid-column: 3;
          display: inline-flex;
          min-width: 44px;
          min-height: 44px;
          align-items: center;
          justify-content: center;
          color: var(--theme-text, #eef2ff);
          background: transparent;
          border: 1px solid var(--theme-picker-border, #323a68);
          border-radius: 6px;
          font: 700 20px var(--font-mono);
        }
        #site-nav {
          position: fixed;
          top: var(--topbar-h);
          left: 8px;
          right: 8px;
          z-index: 38;
          display: none;
          max-height: calc(100vh - var(--topbar-h) - 16px);
          overflow: auto;
          padding: 10px;
          flex-direction: column;
          align-items: stretch;
          color: var(--theme-text, #eef2ff);
          background: var(--theme-picker-bg, #171b31);
          border: 1px solid var(--theme-picker-border, #323a68);
          border-radius: 8px;
          box-shadow: 0 16px 44px var(--theme-shadow, rgba(0, 0, 0, 0.46));
        }
        #site-nav.mobile-nav-open { display: flex; }
        #site-nav .top-action { min-height: 44px; justify-content: flex-start; text-align: left; }
        .mobile-nav-utilities {
          min-height: 44px;
          display: flex;
          align-items: center;
          justify-content: space-between;
          gap: 12px;
          padding: 6px 6px 12px;
          border-bottom: 1px solid var(--theme-picker-border, #323a68);
        }
        .brand-product { display: none; }
        #project-title-wrap { min-width: 0; }
        #site-account {
          grid-column: 2;
          grid-row: 1;
        }
        #share-btn, #site-account > #locale-switcher { display: none; }
        body.screen-editor #site-topbar {
          grid-template-columns: minmax(72px, auto) minmax(0, 1fr) auto;
          gap: 8px;
        }
        body.screen-editor #mobile-nav-toggle {
          display: none !important;
        }
        body.screen-editor #project-title-wrap {
          grid-column: 2;
          grid-row: 1;
          justify-self: stretch;
        }
        body.screen-editor #project-title {
          width: 100%;
        }
        body.screen-editor #site-account {
          grid-column: 3;
          grid-row: 1;
          max-width: none;
        }
        #admin-dialog-body #admin-tools { grid-template-columns: 1fr; }
      }
      @media (max-width: 560px) {
        body.screen-editor #site-brand {
          display: none;
        }
        body.screen-editor #site-topbar {
          grid-template-columns: minmax(0, 1fr) auto;
        }
        body.screen-editor #project-title-wrap {
          grid-column: 1;
        }
        body.screen-editor #site-account {
          grid-column: 2;
        }
      }
      body.page-admin {
        overflow: hidden;
      }
      body.page-admin #site-topbar {
        visibility: hidden;
      }
      #admin-overlay {
        inset: 0;
        z-index: 100;
        padding: 0;
        align-items: stretch;
        justify-content: stretch;
        background: #f6f4ef;
        backdrop-filter: none;
      }
      #admin-overlay.admin-visible {
        display: block;
      }
      #admin-dialog {
        width: 100%;
        max-height: none;
        min-height: 100dvh;
        height: 100dvh;
        grid-template-columns: 264px minmax(0, 1fr);
        grid-template-rows: minmax(0, 1fr);
        color: #15213f;
        background: #f6f4ef;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        overflow: hidden;
      }
      #admin-sidebar {
        min-width: 0;
        min-height: 0;
        display: flex;
        flex-direction: column;
        gap: 28px;
        padding: 28px 20px 20px;
        color: #ffffff;
        background: #15213f;
        border-right: 4px solid #ff9f0a;
      }
      .admin-brand {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 0 8px;
      }
      .admin-brand-mark {
        width: 42px;
        height: 42px;
        display: grid;
        place-items: center;
        color: #15213f;
        background: #ff9f0a;
        border-radius: 12px 4px 12px 4px;
        font: 900 24px/1 var(--font-sans);
      }
      .admin-brand > span:last-child {
        display: grid;
      }
      .admin-brand strong {
        color: #ffffff;
        font: 900 19px/1 var(--font-sans);
        letter-spacing: 0.08em;
      }
      .admin-brand small {
        margin-top: 4px;
        color: #ffbd52;
        font: 800 10px/1 var(--font-mono);
        letter-spacing: 0.2em;
      }
      #admin-navigation {
        display: grid;
        gap: 6px;
        min-height: 0;
        overflow: auto;
        padding-right: 3px;
        overscroll-behavior: contain;
      }
      #admin-navigation button {
        min-height: 46px;
        display: grid;
        grid-template-columns: 28px minmax(0, 1fr);
        align-items: center;
        gap: 10px;
        padding: 0 14px;
        color: #c9d0e2;
        background: transparent;
        border: 1px solid transparent;
        border-radius: 7px;
        font: 750 14px var(--font-sans);
        text-align: left;
        cursor: pointer;
        transition: color 160ms ease, background 160ms ease, border-color 160ms ease;
      }
      #admin-navigation button span {
        color: #7e8aa7;
        font: 700 10px var(--font-mono);
      }
      #admin-navigation button:hover {
        color: #ffffff;
        background: rgba(255, 255, 255, 0.06);
      }
      #admin-navigation button[aria-current="page"] {
        color: #15213f;
        background: #ff9f0a;
        border-color: #ffb53d;
        box-shadow: 0 4px 0 #000000;
      }
      #admin-navigation button[aria-current="page"] span {
        color: #15213f;
      }
      .admin-sidebar-exit {
        min-height: 44px;
        margin-top: auto;
        color: #ffffff;
        background: transparent;
        border: 1px solid #66718e;
        border-radius: 7px;
        font: 800 13px var(--font-sans);
        cursor: pointer;
      }
      .admin-sidebar-exit:hover { border-color: #ff9f0a; }
      #admin-workspace {
        min-width: 0;
        min-height: 0;
        display: grid;
        grid-template-rows: auto auto minmax(0, 1fr);
        overflow: hidden;
      }
      #admin-dialog-head {
        min-height: 0;
        align-items: center;
        padding: 24px clamp(24px, 4vw, 56px) 20px;
        color: #15213f;
        background: #ffffff;
        border-bottom: 1px solid #d8d9dc;
      }
      #admin-dialog-head > div { min-width: 0; }
      #admin-page-kicker {
        display: block;
        margin-bottom: 5px;
        color: #b26000;
        font: 800 10px var(--font-mono);
        letter-spacing: 0.16em;
        text-transform: uppercase;
      }
      #admin-dialog-title {
        margin: 0;
        color: #15213f;
        font: 900 clamp(26px, 3vw, 38px)/1.08 var(--font-sans);
        letter-spacing: -0.035em;
      }
      #admin-page-description {
        max-width: 740px;
        margin: 8px 0 0;
        color: #5d667b;
        font: 500 14px/1.5 var(--font-sans);
      }
      #admin-refresh,
      .admin-nav-toggle {
        min-height: 44px;
        padding: 0 16px;
        color: #15213f;
        background: #ffffff;
        border: 1px solid #b9bdc7;
        border-radius: 6px;
        font: 800 12px var(--font-sans);
        cursor: pointer;
      }
      #admin-refresh:disabled,
      #admin-tools button:disabled {
        opacity: 0.48;
        cursor: wait;
      }
      #admin-refresh.admin-icon-button {
        width: 44px;
        min-width: 44px;
        padding: 0;
        display: grid;
        place-items: center;
      }
      #admin-refresh svg {
        width: 20px;
        height: 20px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.9;
        stroke-linecap: round;
        stroke-linejoin: round;
      }
      .admin-nav-toggle { display: none; }
      #admin-status {
        min-height: 0;
        padding: 0 clamp(24px, 4vw, 56px);
        color: #3f4960;
        background: #ffffff;
        font: 700 12px/1.4 var(--font-sans);
      }
      #admin-status:not(:empty) {
        padding-top: 9px;
        padding-bottom: 9px;
        border-bottom: 1px solid #e2e3e6;
      }
      #admin-toast-region {
        position: fixed;
        left: 20px;
        bottom: 20px;
        z-index: 10020;
        width: min(390px, calc(100vw - 32px));
        display: grid;
        gap: 10px;
        pointer-events: none;
      }
      .admin-toast {
        min-height: 70px;
        display: grid;
        grid-template-columns: 34px minmax(0, 1fr) 32px;
        align-items: start;
        gap: 10px;
        padding: 14px 12px 14px 14px;
        color: #15213f;
        background: #ffffff;
        border: 1px solid #cfd2d9;
        border-left: 5px solid #62708e;
        border-radius: 8px;
        box-shadow: 0 16px 44px rgba(21, 33, 63, 0.22);
        font-family: var(--font-sans);
        pointer-events: auto;
        animation: admin-toast-in 160ms ease-out;
      }
      .admin-toast[data-state="success"] { border-left-color: #16834d; }
      .admin-toast[data-state="warning"] { border-left-color: #d97706; }
      .admin-toast[data-state="danger"] { border-left-color: #b42335; }
      .admin-toast[data-state="loading"] { border-left-color: #ff9f0a; }
      .admin-toast-icon {
        width: 32px;
        height: 32px;
        display: grid;
        place-items: center;
        color: #4d5a77;
        background: #eef0f4;
        border-radius: 50%;
      }
      .admin-toast[data-state="success"] .admin-toast-icon { color: #166534; background: #dcfce7; }
      .admin-toast[data-state="warning"] .admin-toast-icon { color: #854d0e; background: #fef3c7; }
      .admin-toast[data-state="danger"] .admin-toast-icon { color: #991b1b; background: #fee2e2; }
      .admin-toast[data-state="loading"] .admin-toast-icon { color: #9a5700; background: #fff0c7; }
      .admin-toast-icon svg {
        width: 18px;
        height: 18px;
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
      }
      .admin-toast[data-state="loading"] .admin-toast-icon svg { animation: admin-toast-spin 900ms linear infinite; }
      .admin-toast-copy { min-width: 0; display: grid; gap: 3px; padding-top: 1px; }
      .admin-toast-copy strong { font: 850 13px/1.25 var(--font-sans); }
      .admin-toast-copy > span { color: #596277; font: 600 12px/1.45 var(--font-sans); overflow-wrap: anywhere; }
      .admin-toast-close {
        width: 32px;
        height: 32px;
        padding: 0;
        color: #687084;
        background: transparent;
        border: 0;
        border-radius: 5px;
        font: 500 24px/1 var(--font-sans);
        cursor: pointer;
      }
      .admin-toast-close:hover,
      .admin-toast-close:focus-visible { color: #15213f; background: #eef0f4; }
      @keyframes admin-toast-in { from { opacity: 0; transform: translateY(8px); } }
      @keyframes admin-toast-spin { to { transform: rotate(360deg); } }
      #admin-dialog-body {
        min-height: 0;
        overflow: auto;
        padding: 28px clamp(24px, 4vw, 56px) 56px;
        scroll-padding-top: 24px;
      }
      #admin-dialog-body #admin-tools {
        display: block;
        padding: 0;
        border: 0;
      }
      #admin-tools > .admin-page {
        display: grid;
        gap: 16px;
        max-width: 1440px;
        margin: 0 auto;
      }
      #admin-tools > .admin-page[hidden] { display: none !important; }
      #admin-tools .admin-section {
        gap: 14px;
        padding: 22px;
        color: #15213f;
        background: #ffffff;
        border: 1px solid #d6d7da;
        border-radius: 8px;
        box-shadow: 6px 6px 0 rgba(21, 33, 63, 0.06);
      }
      #admin-tools .admin-section-feature {
        background: #ffffff;
        border-color: #d6d7da;
      }
      #admin-tools .admin-section-title {
        color: #15213f;
        font: 850 13px var(--font-sans);
        letter-spacing: 0;
        text-transform: none;
      }
      #admin-tools .admin-help-text {
        color: #687084;
        font: 500 13px/1.55 var(--font-sans);
      }
      .admin-metric-grid {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 12px;
      }
      .admin-metric {
        min-width: 0;
        min-height: 98px;
        display: grid;
        align-content: space-between;
        gap: 5px;
        padding: 14px 16px;
        color: #15213f;
        background: #ffffff;
        border: 1px solid #d6d7da;
        border-radius: 7px;
        text-align: left;
        cursor: pointer;
        box-shadow: 4px 4px 0 rgba(21, 33, 63, 0.06);
      }
      .admin-metric:hover { border-color: #ff9f0a; }
      .admin-metric span { font: 750 12px var(--font-sans); }
      .admin-metric strong { font: 900 30px/1 var(--font-sans); }
      .admin-metric small { color: #71798b; font: 600 11px var(--font-sans); }
      .admin-metric-accent { background: #fff4dc; border-color: #f0bd5e; }
      .admin-dashboard-grid {
        display: grid;
        grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
        gap: 18px;
      }
      .admin-dashboard-grid > .admin-section-feature { grid-column: auto; }
      #admin-tools .admin-dashboard-widget {
        min-height: 0;
        padding: 16px;
        box-shadow: none;
      }
      .admin-dashboard-widget .admin-empty-state { padding: 18px 8px; }
      .admin-section-heading {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 16px;
      }
      .admin-text-action {
        min-height: 40px;
        color: #8b4c00;
        background: transparent;
        border: 0;
        font: 800 12px var(--font-sans);
        cursor: pointer;
      }
      .admin-pipeline,
      .admin-attention-list,
      .admin-child-list {
        display: grid;
        gap: 9px;
      }
      .admin-pipeline-row {
        width: 100%;
        display: grid;
        grid-template-columns: minmax(150px, 1fr) minmax(100px, 2fr) 42px;
        align-items: center;
        gap: 12px;
        padding: 7px 0;
        color: #15213f;
        background: transparent;
        border: 0;
        font: 700 12px var(--font-sans);
        text-align: left;
        cursor: pointer;
      }
      .admin-pipeline-row:hover { color: #8b4c00; }
      .admin-pipeline-label {
        min-width: 0;
        display: inline-flex;
        align-items: center;
        gap: 7px;
      }
      .admin-pipeline-label svg {
        width: 17px;
        height: 17px;
        flex: 0 0 17px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.8;
        stroke-linecap: round;
        stroke-linejoin: round;
      }
      .admin-pipeline-track {
        height: 8px;
        overflow: hidden;
        background: #edecef;
        border-radius: 999px;
      }
      .admin-pipeline-fill { height: 100%; background: #ff9f0a; border-radius: inherit; }
      .admin-pipeline-row strong { text-align: right; }
      .admin-attention-row {
        min-height: 48px;
        display: grid;
        grid-template-columns: 10px minmax(0, 1fr) auto;
        align-items: center;
        gap: 10px;
        padding: 8px 0;
        border-bottom: 1px solid #ececef;
        font: 650 12px var(--font-sans);
      }
      .admin-attention-dot { width: 8px; height: 8px; background: #d97706; border-radius: 50%; }
      .admin-attention-row button {
        min-height: 36px;
        color: #15213f;
        background: #fff;
        border: 1px solid #c8cad0;
        border-radius: 5px;
        font: 750 11px var(--font-sans);
        cursor: pointer;
      }
      .admin-quick-grid {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 12px;
      }
      .admin-quick-grid button {
        min-height: 76px;
        display: grid;
        gap: 5px;
        padding: 14px 16px;
        color: #ffffff;
        background: #15213f;
        border: 0;
        border-radius: 7px;
        text-align: left;
        cursor: pointer;
      }
      .admin-quick-grid strong { font: 850 14px var(--font-sans); }
      .admin-quick-grid span { color: #c8cede; font: 500 12px/1.5 var(--font-sans); }
      .admin-template-panel {
        display: grid;
        gap: 14px;
        padding: 16px;
        background: #fff8e9;
        border-color: #e6bd70;
        box-shadow: none;
      }
      .admin-mail-dashboard {
        display: grid;
        grid-template-columns: minmax(260px, 1fr) minmax(260px, 1fr) minmax(320px, 1.2fr);
        gap: 12px;
      }
      .admin-mail-card {
        min-height: 132px;
        display: grid;
        align-content: start;
        gap: 10px;
        padding: 16px;
        color: #15213f;
        background: #faf9f6;
        border: 1px solid #d6d7da;
        border-radius: 8px;
      }
      .admin-mail-card-body {
        min-width: 0;
        color: #596277;
        font: 650 12px/1.5 var(--font-sans);
      }
      .admin-mail-card-body strong {
        display: block;
        margin-bottom: 3px;
        color: #15213f;
        font: 850 13px/1.35 var(--font-sans);
      }
      .admin-link-list {
        display: grid;
        gap: 7px;
        max-height: 132px;
        overflow: auto;
      }
      .admin-link-list a {
        color: #214ac7;
        overflow-wrap: anywhere;
      }
      .admin-template-downloads {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
      }
      .admin-template-kicker {
        display: block;
        margin-bottom: 6px;
        color: #9a5700;
        font: 800 10px var(--font-mono);
        letter-spacing: 0.14em;
        text-transform: uppercase;
      }
      .admin-template-summary {
        display: grid;
        gap: 4px;
        color: #15213f;
        font-family: var(--font-sans);
      }
      .admin-template-summary strong { font-size: 17px; }
      .admin-template-summary span { color: #424b60; font-size: 13px; }
      .admin-template-summary small { color: #737a89; font-size: 11px; }
      .admin-email-tabs {
        display: flex;
        gap: 4px;
        padding: 4px;
        background: #e8e6e0;
        border-radius: 8px;
      }
      .admin-email-tabs button {
        min-height: 44px;
        flex: 1 1 0;
        color: #596277;
        background: transparent;
        border: 0;
        border-radius: 6px;
        font: 800 13px var(--font-sans);
        cursor: pointer;
      }
      .admin-email-tabs button[aria-selected="true"] {
        color: #15213f;
        background: #ffffff;
        box-shadow: 0 1px 4px rgba(21, 33, 63, 0.12);
      }
      .admin-email-panel {
        display: grid;
        gap: 14px;
      }
      .admin-email-panel[hidden] { display: none !important; }
      .admin-import-panel {
        padding: 16px;
        color: #15213f;
        background: #faf9f6;
        border-color: #d6d7da;
      }
      .admin-filterbar {
        display: grid;
        grid-template-columns: minmax(220px, 1.4fr) minmax(170px, 0.8fr) minmax(170px, 0.8fr) auto;
        align-items: end;
        gap: 12px;
        padding: 16px;
        background: #ffffff;
        border: 1px solid #d6d7da;
        border-radius: 8px;
      }
      .admin-filterbar-compact {
        grid-template-columns: minmax(260px, 1fr) auto auto;
      }
      .admin-filterbar-children {
        grid-template-columns: minmax(180px, 1.2fr) minmax(150px, .8fr) minmax(130px, .7fr) minmax(160px, .9fr) auto auto;
      }
      .admin-filter-count {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        color: #687084;
        font: 800 12px var(--font-sans);
      }
      #admin-tools .admin-field { color: #4e586f; font: 700 12px var(--font-sans); }
      #admin-tools .admin-field input,
      #admin-tools .admin-field select,
      #admin-tools .admin-field textarea {
        min-height: 44px;
        color: #15213f;
        background: #ffffff;
        border: 1px solid #bfc3cc;
        border-radius: 5px;
        font: 500 14px var(--font-sans);
      }
      #admin-tools .admin-field textarea { min-height: 90px; }
      #admin-tools .admin-action,
      #admin-tools .admin-email-send {
        min-height: 44px;
        padding: 0 18px;
        color: #15213f;
        background: #ff9f0a;
        border: 1px solid #cf7e00;
        border-radius: 6px;
        font: 850 12px var(--font-sans);
        cursor: pointer;
      }
      #admin-tools .admin-action-secondary {
        background: #ffffff;
        border-color: #bfc3cc;
      }
      #admin-tools .admin-mcp-settings code {
        color: #15213f;
      }
      #admin-tools .admin-mcp-settings .admin-section-heading {
        align-items: start;
      }
      #admin-plugin-download {
        min-width: 190px;
        white-space: nowrap;
      }
      #admin-tools .admin-platform-row span {
        color: #15213f;
        background: #ffcf7a;
        font: 800 10px var(--font-sans);
      }
      #admin-tools .admin-mcp-status,
      #admin-tools .admin-mcp-device-list {
        color: #687084;
        font: 600 12px/1.5 var(--font-sans);
      }
      #admin-tools .admin-mcp-device {
        padding: 12px;
        color: #15213f;
        background: #f8f8f6;
        border-color: #d6d7da;
      }
      #admin-tools .admin-mcp-device small {
        color: #687084;
      }
      #admin-tools .admin-mcp-device button {
        min-height: 36px;
        font-size: 11px;
      }
      .admin-parent-overview { display: grid; gap: 10px; }
      .admin-parent-overview-row {
        display: grid;
        grid-template-columns: minmax(170px, 1fr) minmax(180px, 1.2fr) minmax(150px, 0.9fr) minmax(240px, 1.6fr) auto;
        align-items: center;
        gap: 12px;
        padding: 14px;
        color: #15213f;
        background: #faf9f6;
        border: 1px solid #dedfe2;
        border-radius: 6px;
        font-family: var(--font-sans);
      }
      .admin-parent-identity { min-width: 0; display: grid; gap: 4px; }
      .admin-parent-identity strong { overflow-wrap: anywhere; }
      .admin-parent-identity small { color: #71798b; overflow-wrap: anywhere; }
      .admin-parent-children { color: #4f5a70; font: 650 12px/1.4 var(--font-sans); }
      .admin-parent-progress { display: grid; gap: 5px; }
      .admin-parent-stage {
        width: fit-content;
        display: inline-flex;
        align-items: center;
        gap: 5px;
        padding: 5px 8px;
        color: #15213f;
        background: #e8ebf3;
        border-radius: 999px;
        font: 800 10px var(--font-sans);
      }
      .admin-parent-stage-paid { color: #14532d; background: #dcfce7; }
      .admin-parent-stage-payment_failed,
      .admin-parent-stage-email_pending { color: #8b1e2d; background: #ffe4e6; }
      .admin-parent-stage-awaiting_payment { color: #854d0e; background: #fef3c7; }
      .admin-parent-stage svg,
      .admin-parent-step-icon svg {
        width: 14px;
        height: 14px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.9;
        stroke-linecap: round;
        stroke-linejoin: round;
      }
      .admin-parent-steps {
        display: flex;
        align-items: center;
        gap: 4px;
      }
      .admin-parent-step-icon {
        width: 24px;
        height: 24px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: #9ca3af;
        background: #f1f2f4;
        border: 1px solid #d9dce2;
        border-radius: 50%;
      }
      .admin-parent-step-icon[data-state="done"] { color: #166534; background: #dcfce7; border-color: #86d4a5; }
      .admin-parent-step-icon[data-state="current"] { color: #854d0e; background: #fef3c7; border-color: #efc56e; }
      .admin-parent-step-icon[data-state="error"] { color: #991b1b; background: #fee2e2; border-color: #e7a0a7; }
      .admin-discount-badge {
        width: fit-content;
        padding: 4px 7px;
        color: #6d3c00;
        background: #fff0c7;
        border: 1px solid #efc56e;
        border-radius: 999px;
        font: 850 10px/1 var(--font-sans);
      }
      .admin-discount-badge[data-status="none"] { color: #697184; background: #f0f1f3; border-color: #d7d9df; }
      .admin-discount-badge[data-status="applied"] { color: #35564a; background: #e6f4ee; border-color: #b7dacd; }
      .admin-parent-delete {
        min-height: 38px;
        color: #8b1e2d;
        background: #ffffff;
        border: 1px solid #c77883;
        border-radius: 5px;
        font: 800 11px var(--font-sans);
        cursor: pointer;
      }
      .admin-child-row {
        display: grid;
        grid-template-columns: minmax(160px, 1fr) minmax(85px, 0.45fr) minmax(150px, 0.85fr) minmax(160px, 0.95fr) auto;
        align-items: center;
        gap: 14px;
        padding: 14px;
        background: #faf9f6;
        border: 1px solid #dedfe2;
        border-radius: 6px;
        font: 650 13px var(--font-sans);
      }
      .admin-child-row small { color: #71798b; }
      .admin-child-school { color: #4e586f; font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
      .admin-child-school.admin-child-school-none { color: #a7adba; font-weight: 500; font-style: italic; }
      .admin-organization-list {
        display: grid;
        gap: 10px;
      }
      .admin-organization-row {
        display: grid;
        grid-template-columns: minmax(240px, 1.4fr) minmax(220px, 1.1fr) minmax(140px, 0.65fr) minmax(96px, 0.35fr) auto;
        align-items: end;
        gap: 12px;
        padding: 14px;
        color: #15213f;
        background: #faf9f6;
        border: 1px solid #dedfe2;
        border-radius: 6px;
        font-family: var(--font-sans);
      }
      .admin-organization-contact {
        min-width: 0;
        display: grid;
        gap: 4px;
      }
      .admin-organization-contact strong,
      .admin-organization-contact small {
        overflow: hidden;
        text-overflow: ellipsis;
      }
      .admin-organization-contact small {
        color: #71798b;
        overflow-wrap: anywhere;
      }
      #admin-tools .admin-organization-control {
        min-width: 0;
        display: grid;
        gap: 5px;
      }
      #admin-tools .admin-organization-control input,
      #admin-tools .admin-organization-control select {
        width: 100%;
      }
      .admin-row-actions {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 6px;
      }
      #admin-tools .admin-icon-action {
        width: 40px;
        min-width: 40px;
        height: 40px;
        min-height: 40px;
        display: inline-grid;
        place-items: center;
        padding: 0;
        color: #15213f;
        background: #ffffff;
        border: 1px solid #c5c8d0;
        border-radius: 6px;
        cursor: pointer;
      }
      #admin-tools .admin-icon-action:hover { border-color: #ff9f0a; background: #fff7e8; }
      #admin-tools .admin-icon-action:disabled { opacity: .42; cursor: not-allowed; }
      #admin-tools .admin-icon-danger { color: #8b1e2d; border-color: #d6a0a8; }
      #admin-tools .admin-icon-danger:hover { color: #701724; border-color: #b94d5c; background: #fff1f2; }
      #admin-tools .admin-icon-action svg {
        width: 19px;
        height: 19px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.9;
        stroke-linecap: round;
        stroke-linejoin: round;
      }
      .admin-account-row,
      .admin-schedule-row {
        display: grid;
        grid-template-columns: minmax(190px, 1.25fr) minmax(100px, .55fr) minmax(160px, .8fr) auto;
        align-items: center;
        gap: 12px;
        padding: 12px 14px;
        background: #faf9f6;
        border: 1px solid #dedfe2;
        border-radius: 6px;
        font: 650 12px var(--font-sans);
      }
      .admin-account-identity { min-width: 0; display: grid; gap: 3px; }
      .admin-account-identity small { color: #71798b; overflow: hidden; text-overflow: ellipsis; }
      .admin-account-role { width: fit-content; padding: 5px 8px; border-radius: 999px; background: #e8ebf3; font: 800 10px var(--font-sans); }

      /* Teachers page: top action row, searchbox with typeahead, expandable cards */
      .admin-teacher-actions { margin-bottom: 12px; }
      .admin-teacher-filterbar { grid-template-columns: minmax(260px, 1fr) auto auto; }
      .admin-teacher-searchbox { position: relative; display: grid; gap: 6px; }
      .admin-teacher-searchbox > label { color: #4e586f; font: 700 12px var(--font-sans); }
      .admin-suggestions {
        position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px);
        margin: 0; padding: 4px; list-style: none; max-height: 240px; overflow-y: auto;
        background: #ffffff; border: 1px solid #bfc3cc; border-radius: 6px;
        box-shadow: 0 12px 28px rgba(24, 39, 30, .14);
      }
      .admin-suggestions li {
        padding: 7px 9px; border-radius: 4px; cursor: pointer;
        font: 600 13px var(--font-sans); color: #15213f;
      }
      .admin-suggestions li small { display: block; font-weight: 500; font-size: 11px; color: #71798b; }
      .admin-suggestions li[aria-selected="true"], .admin-suggestions li:hover { background: #fff1dc; }

      .admin-teacher-list { display: grid; gap: 10px; min-height: 18px; align-content: start; }
      .admin-teacher-list:empty::after { content: "Няма добавени преподаватели."; color: var(--theme-muted, #aab3d7); font-size: 12px; }
      .admin-teacher-card { background: #faf9f6; border: 1px solid #dedfe2; border-radius: 8px; overflow: hidden; }
      .admin-teacher-head {
        display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px;
        padding: 14px 16px; cursor: pointer; background: none; border: 0; width: 100%; text-align: left;
      }
      .admin-teacher-head:hover { background: #f4f2ec; }
      .admin-teacher-identity { min-width: 0; display: grid; gap: 3px; }
      .admin-teacher-identity strong { font: 800 15px var(--font-sans); color: #15213f; }
      .admin-teacher-identity span { font: 500 13px var(--font-sans); color: #5b6478; overflow: hidden; text-overflow: ellipsis; }
      .admin-teacher-head-meta { display: flex; align-items: center; gap: 10px; }
      .admin-teacher-groupcount { font: 700 11px var(--font-sans); color: #687084; white-space: nowrap; }
      .admin-teacher-chevron { width: 16px; height: 16px; fill: none; stroke: #687084; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s ease; }
      .admin-teacher-card[data-open="true"] .admin-teacher-chevron { transform: rotate(90deg); }
      .admin-teacher-detail { padding: 2px 16px 16px; display: grid; gap: 10px; }
      .admin-teacher-detail-title { font: 800 11px var(--font-sans); text-transform: uppercase; letter-spacing: .04em; color: #687084; }
      .admin-teacher-nogroups { font: 500 12px var(--font-sans); color: #8a91a2; }
      .admin-teacher-group { border: 1px solid #e2e3e6; border-radius: 6px; background: #ffffff; overflow: hidden; }
      .admin-teacher-group-head {
        display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center;
        padding: 9px 12px; cursor: pointer; background: none; border: 0; width: 100%; text-align: left;
        font: 700 12px var(--font-sans); color: #15213f;
      }
      .admin-teacher-group-head:hover { background: #fff7e8; }
      .admin-teacher-group-count { font-weight: 600; color: #71798b; white-space: nowrap; }
      .admin-teacher-students { margin: 0; padding: 2px 12px 10px; display: grid; gap: 2px; list-style: none; }
      .admin-teacher-students li { font: 550 12px var(--font-sans); color: #3c4457; padding: 3px 0; }
      .admin-teacher-students li.admin-empty { color: #97a0b3; font-style: italic; }

      /* Teacher class picker inside the "Нов акаунт" form */
      .admin-field-label { color: #4e586f; font: 700 12px var(--font-sans); }
      .admin-checkbox-list { display: grid; gap: 6px; }
      .admin-checkbox-list label {
        display: flex; align-items: center; gap: 8px; padding: 8px 10px;
        background: #ffffff; border: 1px solid #bfc3cc; border-radius: 5px;
        font: 500 13px var(--font-sans); color: #15213f; cursor: pointer;
      }
      .admin-checkbox-list label:hover { border-color: #ff9f0a; }
      .admin-checkbox-list input { flex-shrink: 0; width: 15px; height: 15px; accent-color: #ff9f0a; }
      .admin-checkbox-list .admin-empty { color: #97a0b3; font: italic 500 12px var(--font-sans); }

      /* Групи editor */
      .admin-group-students-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
      .admin-group-students-toolbar input[type="search"] { flex: 1 1 200px; min-height: 40px; padding: 0 10px; border: 1px solid #bfc3cc; border-radius: 5px; font: 500 13px var(--font-sans); }
      .admin-group-students-toolbar select { min-height: 40px; padding: 0 8px; border: 1px solid #bfc3cc; border-radius: 5px; font: 500 13px var(--font-sans); }
      .admin-group-toolbar-check { display: flex; align-items: center; gap: 6px; font: 600 12px var(--font-sans); color: #4e586f; white-space: nowrap; }
      .admin-status-line { margin-top: 8px; color: #687084; font: 600 12px var(--font-sans); }
      /* График screen */
      .admin-schedule-weekdays { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
      .admin-schedule-weekdays label {
        display: flex; align-items: center; gap: 6px; padding: 8px 12px;
        background: #ffffff; border: 1px solid #bfc3cc; border-radius: 999px;
        font: 600 12px var(--font-sans); color: #15213f; cursor: pointer;
      }
      .admin-schedule-weekdays label:has(input:checked) { background: #fff1dc; border-color: #ff9f0a; }
      .admin-schedule-weekdays input { accent-color: #ff9f0a; }
      .admin-calendar-nav { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 4px 0 10px; }
      .admin-calendar-month { min-width: 160px; text-align: center; font: 800 14px var(--font-sans); color: #15213f; text-transform: capitalize; }
      .admin-calendar-weekdays {
        display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px;
        margin-bottom: 4px; color: #97a0b3; font: 700 10px var(--font-sans); text-transform: uppercase;
        letter-spacing: .03em; text-align: center;
      }
      .admin-calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
      .admin-calendar-day {
        display: grid; align-content: start; justify-items: center; gap: 3px;
        min-height: 52px; padding: 6px 2px; border: 1px solid #e2e3e6; border-radius: 6px;
        background: #ffffff; color: #15213f; font: 600 12px var(--font-sans); cursor: pointer;
      }
      .admin-calendar-day:hover { border-color: #ff9f0a; }
      .admin-calendar-day[data-outside="true"] { color: #c3c6cf; background: #faf9f6; }
      .admin-calendar-day[data-today="true"] { border-color: #15213f; }
      .admin-calendar-day[data-selected="true"] { background: #fff1dc; border-color: #ff9f0a; }
      .admin-calendar-day-count {
        min-width: 16px; padding: 0 4px; border-radius: 999px; background: #15213f; color: #ffffff;
        font: 800 10px var(--font-sans); line-height: 16px; text-align: center;
      }
      .admin-calendar-day[data-outside="true"] .admin-calendar-day-count { background: #c3c6cf; }
      .admin-calendar-detail { margin-top: 14px; display: grid; gap: 6px; }
      .admin-calendar-detail .admin-empty { color: #97a0b3; font: italic 500 12px var(--font-sans); }
      .admin-calendar-detail-title { font: 800 12px var(--font-sans); color: #15213f; margin-bottom: 2px; }
      .admin-calendar-session {
        display: grid; grid-template-columns: minmax(120px, 0.8fr) minmax(140px, 1.2fr) minmax(160px, 1fr);
        align-items: center; gap: 10px; padding: 9px 12px;
        background: #faf9f6; border: 1px solid #dedfe2; border-radius: 6px;
        font: 600 12px var(--font-sans); color: #15213f;
      }
      .admin-calendar-session-time { display: grid; gap: 1px; }
      .admin-calendar-session-time small { color: #71798b; font-weight: 500; }
      .admin-calendar-session select { min-height: 32px; padding: 0 6px; border: 1px solid #bfc3cc; border-radius: 5px; font: 500 12px var(--font-sans); }
      .admin-calendar-session.admin-calendar-session-substitute { border-color: #ff9f0a; background: #fff7e8; }
      @media (max-width: 560px) {
        .admin-calendar-weekdays span:nth-child(n) { font-size: 9px; }
        .admin-calendar-day { min-height: 40px; font-size: 11px; }
      }

      /* Уроци screen: two full-screen-feeling views (pick a lesson, or
         edit/create one) toggled via [hidden], not tabs sharing one long
         page - each is its own vertical stack of sections, same one-column
         pattern every other admin page already uses. */
      .admin-lesson-view { display: grid; gap: 16px; }
      .admin-lesson-checkbox-row { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 8px; }
      .admin-lesson-checkbox-field {
        display: inline-flex; align-items: center; gap: 6px; margin: 0;
        font: 600 12.5px var(--font-sans); color: #15213f; cursor: pointer;
      }
      .admin-lesson-checkbox-field input[type="checkbox"] {
        width: 15px; height: 15px; flex-shrink: 0; margin: 0; accent-color: #ff9f0a; cursor: pointer;
      }
      .admin-lesson-group {
        margin-top: 10px; border: 1px solid #dedfe2; border-radius: 8px; background: #faf9f6; overflow: hidden;
      }
      .admin-lesson-group summary {
        display: flex; align-items: center; justify-content: space-between; gap: 8px;
        padding: 10px 14px; cursor: pointer; list-style: none;
        font: 700 12.5px var(--font-sans); color: #15213f; user-select: none;
      }
      .admin-lesson-group summary::-webkit-details-marker { display: none; }
      .admin-lesson-group summary::after { content: "Покажи"; color: #71798b; font: 700 11px var(--font-sans); }
      .admin-lesson-group[open] summary::after { content: "Скрий"; }
      .admin-lesson-group summary:hover { color: #a15c00; }
      .admin-lesson-group-body { padding: 2px 14px 14px; background: #ffffff; border-top: 1px solid #eceef1; }
      .admin-lesson-bullets { display: grid; gap: 6px; margin: 6px 0; }
      .admin-lesson-bullet-row { display: flex; align-items: center; gap: 6px; }
      .admin-lesson-bullet-input {
        flex: 1; min-width: 0; min-height: 34px; padding: 0 10px; border: 1px solid #bfc3cc; border-radius: 5px;
        font: 500 13px var(--font-sans); color: #15213f; background: #ffffff;
      }
      .admin-lesson-bullet-row button {
        flex-shrink: 0; width: 28px; height: 28px; border-radius: 5px; border: 1px solid #bfc3cc; background: #ffffff;
        color: #15213f; font: 700 13px/1 var(--font-sans); cursor: pointer;
      }
      .admin-lesson-bullet-row button:hover { border-color: #ff9f0a; background: #fff7e8; }
      .admin-lesson-session-row {
        display: grid; gap: 8px; padding: 10px; margin-bottom: 8px;
        background: #faf9f6; border: 1px solid #dedfe2; border-radius: 8px;
      }
      .admin-lesson-session-head { display: flex; align-items: center; gap: 8px; }
      .admin-lesson-session-head input[type="text"], .admin-lesson-session-title {
        flex: 1; min-width: 0; min-height: 36px; padding: 0 10px; border: 1px solid #bfc3cc; border-radius: 5px;
        font: 700 13px var(--font-sans); color: #15213f; background: #ffffff;
      }
      .admin-lesson-session-duration { width: 110px; min-height: 36px; padding: 0 10px; border: 1px solid #bfc3cc; border-radius: 5px; font: 500 13px var(--font-sans); }
      .admin-lesson-session-remove {
        flex-shrink: 0; width: 32px; height: 32px; border-radius: 5px; border: 1px solid #bfc3cc; background: #ffffff;
        color: #15213f; font: 700 13px/1 var(--font-sans); cursor: pointer;
      }
      .admin-lesson-session-remove:hover { border-color: #ff9f0a; background: #fff7e8; }
      .admin-lesson-example-row, .admin-lesson-subtask-row {
        display: grid; gap: 6px; padding: 10px; margin-bottom: 8px;
        background: #faf9f6; border: 1px solid #dedfe2; border-radius: 8px;
      }
      .admin-lesson-subtask-row { grid-template-columns: 90px 1fr 32px; align-items: center; gap: 8px; }
      .admin-lesson-example-row textarea, .admin-lesson-subtask-row input {
        min-height: 36px; padding: 8px 10px; border: 1px solid #bfc3cc; border-radius: 5px;
        font: 500 13px/1.4 var(--font-sans); color: #15213f; background: #ffffff; resize: vertical;
      }
      .admin-lesson-example-row .admin-lesson-session-remove, .admin-lesson-subtask-row .admin-lesson-session-remove { justify-self: end; }
      #admin-lesson-problem-subtasks-sum[data-state="success"], #admin-lesson-hw-problem-subtasks-sum[data-state="success"] { color: #1a7f37; }
      #admin-lesson-problem-subtasks-sum[data-state="warning"], #admin-lesson-hw-problem-subtasks-sum[data-state="warning"] { color: #b45309; }
      .admin-lesson-code-input {
        width: 100%; min-height: 220px; margin-top: 8px; padding: 10px 12px; border: 1px solid #bfc3cc; border-radius: 6px;
        font: 500 12px/1.5 var(--font-mono, monospace); color: #15213f; background: #ffffff; resize: vertical;
      }
      #admin-lesson-exit-ticket, #admin-lesson-source-note {
        width: 100%; min-height: 60px; margin-top: 6px; padding: 8px 10px; border: 1px solid #bfc3cc; border-radius: 5px;
        font: 500 13px/1.5 var(--font-sans); color: #15213f; background: #ffffff; resize: vertical;
      }
      #admin-lesson-markdown-input {
        width: 100%; min-height: 200px; margin-top: 6px; padding: 10px 12px; border: 1px solid #bfc3cc; border-radius: 6px;
        font: 500 12px/1.5 var(--font-mono, monospace); color: #15213f; background: #ffffff; resize: vertical;
      }
      /* Not sticky: it now sits above the form in normal document flow
         (see order: -1 above), and sticky positioning there would float it
         over the form as the page scrolls, covering it instead of just
         sitting above it. */
      .admin-lesson-side-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
      .admin-lesson-side-tab {
        flex: 1; min-height: 34px; padding: 0 10px; border-radius: 6px; border: 1px solid #bfc3cc;
        background: #ffffff; color: #4e586f; font: 700 12px var(--font-sans); cursor: pointer;
      }
      .admin-lesson-side-tab[aria-pressed="true"] { background: #15213f; border-color: #15213f; color: #ffffff; }
      .admin-lesson-preview {
        margin-top: 8px; padding: 16px; border: 1px solid #dedfe2; border-radius: 8px; background: #ffffff;
        color: #15213f; max-height: 70vh; overflow-y: auto;
      }
      .admin-lesson-render-header { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
      .admin-lesson-render-header h3 { margin: 0; font: 800 18px var(--font-sans); color: #15213f; }
      .admin-lesson-render-badge {
        flex-shrink: 0; padding: 2px 9px; border-radius: 999px; background: #fff1dc; color: #a15c00;
        font: 700 11px var(--font-sans);
      }
      .admin-lesson-render-summary { margin: 6px 0 0; color: #4e586f; font: 500 13px/1.5 var(--font-sans); }
      .admin-lesson-render-meta {
        display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 8px;
        margin: 12px 0; padding: 10px; background: #faf9f6; border: 1px solid #eceef1; border-radius: 7px;
      }
      .admin-lesson-render-meta div { display: grid; gap: 2px; }
      .admin-lesson-render-meta span { color: #97a0b3; font: 700 10px var(--font-sans); text-transform: uppercase; letter-spacing: .03em; }
      .admin-lesson-render-meta strong { font: 700 13px var(--font-sans); color: #15213f; }
      .admin-lesson-render-section-title {
        margin: 18px 0 8px; padding-bottom: 6px; border-bottom: 2px solid #15213f;
        font: 800 13px var(--font-sans); color: #15213f; text-transform: uppercase; letter-spacing: .02em;
      }
      .admin-lesson-render-callouts { display: grid; gap: 8px; }
      .admin-lesson-render-callout {
        padding: 10px 12px; background: #faf9f6; border: 1px solid #eceef1; border-radius: 7px;
      }
      .admin-lesson-render-callout strong { display: block; font: 700 12px var(--font-sans); color: #15213f; margin-bottom: 2px; }
      .admin-lesson-render-callout p { margin: 0; font: 500 13px/1.5 var(--font-sans); color: #4e586f; }
      .admin-lesson-render-grid, .admin-lesson-render-grid-three {
        display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 8px;
      }
      .admin-lesson-render-grid-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
      .admin-lesson-render-list h5 { margin: 0 0 4px; font: 700 12px var(--font-sans); color: #15213f; }
      .admin-lesson-render-list ul { margin: 0; padding-left: 18px; font: 500 12.5px/1.5 var(--font-sans); color: #4e586f; }
      .admin-lesson-render-list .admin-empty { color: #97a0b3; font: italic 500 12px var(--font-sans); }
      .admin-lesson-render-sessions { display: grid; gap: 8px; margin-top: 8px; }
      .admin-lesson-render-session-card {
        padding: 10px 12px; background: #faf9f6; border: 1px solid #eceef1; border-radius: 7px;
      }
      .admin-lesson-render-session-card h5 { margin: 0 0 4px; font: 700 12px var(--font-sans); color: #15213f; }
      .admin-lesson-render-session-card ol { margin: 0; padding-left: 18px; font: 500 12.5px/1.5 var(--font-sans); color: #4e586f; }
      .admin-lesson-render-code {
        margin-top: 8px; padding: 10px 12px; border: 1px solid #dedfe2; border-radius: 7px; background: #15213f;
        color: #e8ecff; font: 500 11.5px/1.5 var(--font-mono, monospace); white-space: pre-wrap; word-break: break-word;
        max-height: 260px; overflow-y: auto;
      }
      .admin-lesson-render-code-meta { margin-top: 4px; color: #97a0b3; font: 500 11px var(--font-sans); }
      .admin-lesson-render-exit {
        margin-top: 12px; padding: 10px 12px; background: #fff1dc; border: 1px solid #f0bd5e; border-radius: 7px;
      }
      .admin-lesson-render-exit strong { display: block; font: 800 11px var(--font-sans); color: #a15c00; margin-bottom: 2px; }
      .admin-lesson-render-exit p { margin: 0; font: 500 13px/1.5 var(--font-sans); color: #15213f; }
      .admin-lesson-render-source { margin-top: 12px; font: 500 12px/1.5 var(--font-sans); color: #71798b; }
      .admin-lesson-render-source summary { cursor: pointer; font-weight: 700; color: #15213f; }
      .admin-lesson-render-source ul { margin: 6px 0 0; padding-left: 18px; }
      .admin-lesson-render-problem { margin-top: 14px; padding: 12px; border: 1px solid #dedfe2; border-radius: 8px; background: #faf9f6; }
      .admin-lesson-render-problem-statement { font: 500 13px/1.6 var(--font-sans); color: #15213f; }
      .admin-lesson-render-example {
        margin-top: 10px; padding: 10px; border: 1px solid #dedfe2; border-radius: 6px; background: #ffffff;
      }
      .admin-lesson-render-example h5 { margin: 0 0 6px; font: 800 12px var(--font-sans); color: #15213f; }
      .admin-lesson-render-example strong { display: block; font: 700 11px var(--font-sans); color: #71798b; margin-top: 6px; }
      .admin-lesson-render-example pre {
        margin: 2px 0 0; padding: 6px 8px; background: #faf9f6; border-radius: 4px; font: 500 12px/1.4 var(--font-mono, monospace);
        white-space: pre-wrap; word-break: break-word;
      }
      .admin-lesson-render-example p { margin: 6px 0 0; font: 500 12px/1.5 var(--font-sans); color: #4e586f; }
      .admin-lesson-tree {
        margin-top: 8px; padding: 12px; border: 1px solid #dedfe2; border-radius: 8px; background: #faf9f6;
        font: 500 12px/1.7 var(--font-mono, monospace); color: #15213f; white-space: pre; overflow-x: auto;
      }
      .admin-lesson-tree .admin-lesson-tree-file { color: #71798b; }
      .admin-lesson-plan-courses { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
      .admin-lesson-plan-course-card {
        flex: 1 1 130px; min-width: 110px; padding: 10px 12px; border: 1px solid #dedfe2; border-radius: 8px;
        background: #faf9f6; color: #15213f; text-align: left; cursor: pointer;
      }
      .admin-lesson-plan-course-card strong { display: block; font: 800 13px var(--font-sans); }
      .admin-lesson-plan-course-card small { display: block; margin-top: 2px; font: 600 11px var(--font-sans); color: #71798b; }
      .admin-lesson-plan-course-card[aria-pressed="true"] { background: #15213f; border-color: #15213f; }
      .admin-lesson-plan-course-card[aria-pressed="true"] strong,
      .admin-lesson-plan-course-card[aria-pressed="true"] small { color: #ffffff; }
      .admin-lesson-plan-curricula-wrap { margin-top: 10px; }
      .admin-lesson-plan-curricula-caption {
        display: block; margin-bottom: 6px; font: 700 11px var(--font-sans); text-transform: uppercase;
        letter-spacing: .04em; color: #97a0b3;
      }
      .admin-lesson-plan-curricula.admin-lesson-plan-courses {
        flex-wrap: nowrap; overflow-x: auto; gap: 6px; margin-top: 0; padding-bottom: 4px;
        border-left: 2px solid #dedfe2; padding-left: 10px;
      }
      .admin-lesson-plan-curriculum-card {
        flex: 0 0 auto; min-width: 0; width: 132px; padding: 7px 9px; border: 1px solid #e4e5e8; border-radius: 6px;
        background: #ffffff; color: #15213f; text-align: left; cursor: pointer;
      }
      .admin-lesson-plan-curriculum-card strong {
        display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
        font: 700 11px/1.3 var(--font-sans);
      }
      .admin-lesson-plan-curriculum-card small { display: block; margin-top: 2px; font: 600 10px var(--font-sans); color: #97a0b3; }
      .admin-lesson-plan-curriculum-card[aria-pressed="true"] { background: #2a3b66; border-color: #2a3b66; }
      .admin-lesson-plan-curriculum-card[aria-pressed="true"] strong,
      .admin-lesson-plan-curriculum-card[aria-pressed="true"] small { color: #ffffff; }
      .admin-lesson-plan-list { display: grid; gap: 8px; margin-top: 10px; }
      .admin-lesson-plan-row {
        display: flex; align-items: center; gap: 10px; padding: 10px 12px; width: 100%;
        border: 1px solid #dedfe2; border-radius: 8px; background: #faf9f6; cursor: pointer; text-align: left;
        font: inherit;
      }
      .admin-lesson-plan-row:hover { border-color: #bfc3cc; }
      .admin-lesson-plan-row[aria-pressed="true"] { border-color: #15213f; background: #eef1fb; }
      .admin-lesson-plan-row-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
      .admin-lesson-plan-row-title { font: 700 13px var(--font-sans); color: #15213f; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
      .admin-lesson-plan-row-meta { font: 500 11px var(--font-sans); color: #71798b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
      .admin-lesson-plan-row-badge {
        flex-shrink: 0; padding: 2px 9px; border-radius: 999px; font: 700 10px var(--font-sans);
        background: #eceef1; color: #71798b;
      }
      .admin-lesson-plan-row[data-editable="true"] .admin-lesson-plan-row-badge { background: #e4f6ea; color: #1c7a3f; }
      .admin-lesson-plan-row-actions { flex-shrink: 0; display: flex; gap: 6px; }
      @media (max-width: 900px) {
        .admin-lesson-video-grid { grid-template-columns: 1fr; }
      }
      .admin-group-summary-grid { display: grid; gap: 6px; margin-bottom: 10px; }
      .admin-group-summary-row { display: flex; gap: 8px; font: 550 12px var(--font-sans); color: #15213f; }
      .admin-group-summary-label { min-width: 100px; color: #687084; font-weight: 700; }
      .admin-group-picker-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
      .admin-group-picker-title { margin-bottom: 6px; color: #4e586f; font: 700 11px var(--font-sans); text-transform: uppercase; letter-spacing: .03em; }
      .admin-group-student-list { max-height: 320px; overflow-y: auto; padding-right: 4px; display: grid; gap: 4px; align-content: start; }
      .admin-group-student-list .admin-empty { color: #97a0b3; font: italic 500 12px var(--font-sans); padding: 6px 2px; }
      .admin-group-student-row {
        display: flex; align-items: center; justify-content: space-between; gap: 8px;
        padding: 7px 9px; background: #ffffff; border: 1px solid #e2e3e6; border-radius: 5px;
        font: 550 12px var(--font-sans); color: #15213f;
      }
      .admin-group-student-text { min-width: 0; display: grid; gap: 1px; }
      .admin-group-student-name { display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
      .admin-group-student-badge {
        flex-shrink: 0; padding: 1px 7px; border-radius: 999px; background: #eaf3ff; color: #1f5fae;
        font: 700 10px var(--font-sans); text-transform: uppercase; letter-spacing: .02em;
      }
      .admin-group-student-interests {
        overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
        color: #97a0b3; font: 500 10.5px var(--font-sans);
      }
      .admin-group-student-row button {
        flex-shrink: 0; width: 24px; height: 24px; border-radius: 4px; border: 1px solid #bfc3cc;
        background: #faf9f6; color: #15213f; font: 700 14px/1 var(--font-sans); cursor: pointer;
      }
      .admin-group-student-row button:hover { border-color: #ff9f0a; background: #fff7e8; }
      @media (max-width: 760px) { .admin-group-picker-columns { grid-template-columns: 1fr; } }
      .admin-payment-row {
        display: grid;
        grid-template-columns: minmax(190px, 1.3fr) minmax(95px, .5fr) minmax(130px, .6fr) minmax(160px, .8fr);
        align-items: center;
        gap: 12px;
        padding: 12px 14px;
        color: #15213f;
        background: #faf9f6;
        border: 1px solid #dedfe2;
        border-radius: 6px;
        font: 650 12px var(--font-sans);
        text-align: left;
        cursor: pointer;
      }
      .admin-payment-row:hover { border-color: #ff9f0a; background: #fff7e8; }
      .admin-payment-identity { min-width: 0; display: grid; gap: 3px; }
      .admin-payment-identity strong,
      .admin-payment-identity small,
      .admin-payment-row > small {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      .admin-payment-identity small,
      .admin-payment-row > small { color: #71798b; }
      .admin-payment-amount,
      .admin-payment-state {
        width: fit-content;
        padding: 5px 8px;
        border-radius: 999px;
        background: #e8ebf3;
        font: 850 10px/1 var(--font-sans);
        white-space: nowrap;
      }
      .admin-payment-state[data-status="paid"] { color: #14532d; background: #dcfce7; }
      .admin-payment-state[data-status="failed"] { color: #8b1e2d; background: #ffe4e6; }
      .admin-inline-editor {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: minmax(180px, 1fr) minmax(120px, .45fr) minmax(180px, 1fr) auto;
        align-items: end;
        gap: 10px;
        padding-top: 12px;
        border-top: 1px solid #dddfe4;
      }
      .admin-schedule-panel { display: grid; gap: 12px; padding: 16px; background: #faf9f6; border: 1px solid #d6d7da; border-radius: 8px; }
      .admin-schedule-row { grid-template-columns: minmax(180px, 1fr) minmax(180px, .9fr) minmax(90px, .5fr) auto; }
	  .admin-email-message-detail {
		grid-column: 1 / -1;
		overflow: auto;
		margin: 0;
		padding: 14px;
		background: #fff;
		border: 1px solid #dedfe2;
		border-radius: 6px;
		font: 12px/1.55 var(--font-sans);
	  }
      .admin-email-message-detail pre {
        max-height: 220px;
        overflow: auto;
        margin: 10px 0 0;
        padding: 10px;
        white-space: pre-wrap;
        color: #15213f;
        background: #f7f8fb;
        border: 1px solid #e1e3e8;
        border-radius: 6px;
        font: 11px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
      }
      .admin-email-recipient-list,
      .admin-email-link-list {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        margin-top: 8px;
      }
      .admin-email-tracked-link {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        max-width: 100%;
      }
      .admin-email-recipient-list span,
      .admin-email-link-list a,
      .admin-email-tracked-link span {
        max-width: 100%;
        padding: 4px 7px;
        overflow-wrap: anywhere;
        color: #15213f;
        background: #eef0f4;
        border: 1px solid #d8dbe2;
        border-radius: 999px;
        font: 750 10px/1.25 var(--font-sans);
      }
      .admin-email-link-list a { color: #214ac7; }
      .admin-email-tracked-link span {
        color: #6d3c00;
        background: #fff4d6;
        border-color: #eec875;
        white-space: nowrap;
      }
      .admin-empty-state { padding: 28px; color: #71798b; text-align: center; font: 600 13px var(--font-sans); }
      #admin-tools button:focus-visible,
      #admin-dialog button:focus-visible,
      #admin-tools input:focus-visible,
      #admin-tools select:focus-visible,
      #admin-tools textarea:focus-visible {
        outline: 3px solid rgba(255, 159, 10, 0.38);
        outline-offset: 2px;
      }
      @media (max-width: 1180px) {
        .admin-metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
        .admin-parent-overview-row { grid-template-columns: minmax(170px, 1fr) minmax(170px, 1fr) minmax(140px, 0.8fr); }
        .admin-parent-progress { grid-column: 1 / 3; }
        .admin-mail-dashboard { grid-template-columns: 1fr; }
      }
      @media (max-width: 900px) {
        #admin-dialog { grid-template-columns: minmax(0, 1fr); }
        #admin-sidebar {
          position: fixed;
          inset: 0 auto 0 0;
          z-index: 3;
          width: min(320px, 86vw);
          transform: translateX(-105%);
          transition: transform 180ms ease;
          box-shadow: 20px 0 50px rgba(0, 0, 0, 0.28);
        }
        #admin-dialog.admin-sidebar-open #admin-sidebar { transform: translateX(0); }
        .admin-nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
        #admin-dialog-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; }
        .admin-dashboard-grid { grid-template-columns: 1fr; }
        .admin-filterbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
        .admin-filterbar-compact { grid-template-columns: minmax(0, 1fr) auto; }
        .admin-filterbar-compact .admin-filter-search { grid-column: 1 / -1; }
        .admin-filter-count { justify-content: flex-start; }
      }
      @media (max-width: 650px) {
        #admin-dialog-head { grid-template-columns: auto minmax(0, 1fr) auto; padding: 16px; }
        #admin-refresh { grid-column: 3; width: 44px; }
        #admin-page-description { font-size: 13px; }
        #admin-status { padding-left: 16px; padding-right: 16px; }
        #admin-dialog-body { padding: 18px 16px 40px; }
        #admin-toast-region { left: 12px; bottom: 12px; width: calc(100vw - 24px); }
        .admin-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
        .admin-metric { min-height: 98px; padding: 14px; }
        .admin-metric strong { font-size: 30px; }
        .admin-quick-grid,
        .admin-filterbar,
        .admin-filterbar-compact,
        #admin-tools .admin-grid { grid-template-columns: 1fr; }
        .admin-template-downloads { grid-template-columns: 1fr; }
        .admin-filter-search { grid-column: auto; }
        .admin-parent-overview-row,
        .admin-child-row,
        .admin-organization-row,
        .admin-payment-row,
        .admin-account-row,
        .admin-schedule-row,
        .admin-inline-editor { grid-template-columns: 1fr; }
        .admin-row-actions { justify-content: flex-start; }
        #admin-tools .admin-icon-action { width: 44px; min-width: 44px; height: 44px; min-height: 44px; }
        .admin-parent-progress { grid-column: auto; }
        .admin-pipeline-row { grid-template-columns: minmax(110px, 1fr) minmax(80px, 1.4fr) 34px; }
      }
      /* Parent cards keep contact details readable at every workspace width. */
      #admin-parent-overview .admin-parent-overview-row {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
        grid-template-areas: "identity children discount" "progress progress actions";
        align-items: start;
        gap: 18px 24px;
        padding: 20px;
      }
      #admin-parent-overview .admin-parent-identity { grid-area: identity; gap: 10px; }
      #admin-parent-overview .admin-parent-identity > strong { font-size: 17px; }
      #admin-parent-overview .admin-parent-children { grid-area: children; display: grid; gap: 10px; font-size: 14px; }
      #admin-parent-overview .admin-discount-badge { grid-area: discount; justify-self: end; }
      #admin-parent-overview .admin-parent-progress { grid-area: progress; align-self: center; }
      #admin-parent-overview .admin-row-actions { grid-area: actions; align-self: center; }
      #admin-parent-overview .admin-inline-editor { grid-column: 1 / -1; }
      #admin-parent-overview strong,
      #admin-parent-overview span,
      #admin-parent-overview a { white-space: normal; overflow: visible; overflow-wrap: anywhere; }
      #admin-parent-overview .admin-parent-contact { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 8px; align-items: baseline; font-size: 14px; }
      #admin-parent-overview .admin-parent-detail-label { color: #596377; font-size: 12px; font-weight: 600; }
      #admin-parent-overview .admin-parent-contact a { color: #234b80; text-decoration: underline; text-underline-offset: 3px; }
      #admin-parent-overview .admin-parent-contact a:focus-visible { outline: 3px solid #ed9d38; outline-offset: 3px; border-radius: 2px; }
      #admin-parent-overview .admin-parent-missing { color: #687084; }
      #admin-parent-overview .admin-parent-child-detail { display: grid; gap: 3px; }
      #admin-parent-overview .admin-parent-child-detail > span { color: #596377; font-weight: 400; }
      @media (max-width: 900px) {
        #admin-parent-overview .admin-parent-overview-row {
          grid-template-columns: minmax(0, 1fr) auto;
          grid-template-areas: "identity discount" "children children" "progress progress" "actions actions";
          padding: 16px;
          gap: 16px;
        }
        #admin-parent-overview .admin-row-actions { justify-content: flex-start; }
        #admin-parent-overview .admin-parent-contact,
        #admin-parent-overview .admin-parent-children { font-size: 16px; }
        #admin-parent-overview .admin-parent-contact a { min-height: 44px; display: flex; align-items: center; }
      }
      @media (prefers-reduced-motion: reduce) {
        *, *::before, *::after {
          scroll-behavior: auto !important;
          animation-duration: 0.01ms !important;
          animation-iteration-count: 1 !important;
          transition-duration: 0.01ms !important;
        }
      }
      #classroom-screen.classroom-public .classroom-grid {
        grid-template-columns: minmax(0, 1fr);
      }
      .classroom-teacher-agenda {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 12px 20px;
        padding: 14px 18px;
        color: #eef2ff;
        background: #171b31;
        border: 1px solid #323a68;
        border-radius: 10px;
      }
      .classroom-agenda-bar-left,
      .classroom-agenda-bar-right {
        display: flex;
        align-items: center;
        gap: 10px;
      }
      #classroom-agenda-date {
        font: 850 19px/1 var(--font-mono);
        white-space: nowrap;
      }
      .classroom-agenda-week {
        display: flex;
        gap: 2px;
      }
      .classroom-agenda-day {
        width: 42px;
        min-height: 50px;
        display: grid;
        place-items: center;
        gap: 3px;
        color: #9aa4d6;
        background: transparent;
        border: 0;
        border-radius: 999px;
      }
      .classroom-agenda-day small {
        font: 800 9px var(--font-mono);
      }
      .classroom-agenda-day strong {
        font: 850 16px var(--font-mono);
      }
      .classroom-agenda-day[data-active="true"] {
        color: #ffffff;
        background: #2a3160;
      }
      #classroom-screen .classroom-student-panel[hidden],
      #classroom-screen .classroom-active-student[hidden] {
        display: none !important;
      }

/* BEGIN academy-admin-design-20261105 */
/* Academy admin presentation. Every selector is scoped to the authenticated admin shell. */
body.page-admin #admin-dialog {
  --admin-ink:#14213d; --admin-muted:#5a6274; --admin-line:#e1e5eb;
  --admin-bg:#f5f7fa; --admin-yellow:#fca311;
  grid-template-columns:248px minmax(0,1fr); color:var(--admin-ink); background:var(--admin-bg);
  font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}
body.page-admin #admin-sidebar { padding:24px 16px 16px; gap:24px; background:#14213d; border-right:0; }
body.page-admin #admin-dialog .admin-brand { padding:0 10px; gap:12px; }
body.page-admin #admin-dialog .admin-brand-mark { width:38px; height:38px; border-radius:10px; color:#14213d; background:#fca311; font-weight:750; }
body.page-admin #admin-dialog .admin-brand strong { font-size:22px; font-weight:700; letter-spacing:-.04em; }
body.page-admin #admin-dialog .admin-brand small { color:#bac4d9; font-size:11px;line-height:1.3;font-weight:500; letter-spacing:.09em; }
body.page-admin #admin-navigation { gap:3px; padding-right:4px; }
body.page-admin #admin-navigation .admin-nav-section { margin:17px 12px 6px; color:#aebbd1; font-size:10px; font-weight:650; letter-spacing:.12em; text-transform:uppercase; }
body.page-admin #admin-navigation .admin-nav-section:first-child { margin-top:0; }
body.page-admin #admin-navigation button { min-height:42px; padding:10px 12px; grid-template-columns:20px minmax(0,1fr); gap:10px; border:0; border-radius:7px; color:#d4dced; font-size:13px; font-weight:500; line-height:1.35; }
body.page-admin #admin-navigation button svg { width:18px; height:18px; color:inherit; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
body.page-admin #admin-navigation button:hover { background:#ffffff0d; color:#fff; }
body.page-admin #admin-navigation button[aria-current="page"] { background:#263652; color:#fff; box-shadow:inset 3px 0 #fca311; }
body.page-admin #admin-dialog .admin-sidebar-exit { border-color:#45536d; font-size:12px; font-weight:500; }
body.page-admin #admin-dialog-head { padding:22px 32px; border-bottom:1px solid var(--admin-line); background:#fff; }
body.page-admin #admin-page-kicker { color:#68748a; font-size:12px;line-height:1.4;font-weight:500; letter-spacing:0; text-transform:none; margin-bottom:7px; }
body.page-admin #admin-dialog-title { font-size:28px; line-height:1.2; font-weight:700; letter-spacing:-.035em; color:var(--admin-ink); }
body.page-admin #admin-dialog-body { padding:24px 32px 48px; background:var(--admin-bg); }
body.page-admin #admin-status { padding-left:32px; padding-right:32px; font-weight:500; }
body.page-admin #admin-tools > .admin-page { max-width:1440px; gap:20px; }
body.page-admin #admin-tools .admin-section { padding:22px; border-color:var(--admin-line); border-radius:10px; box-shadow:none; }
body.page-admin #admin-tools .admin-section-title { font-size:16px; font-weight:650; line-height:1.4; color:var(--admin-ink); }
body.page-admin #admin-tools .admin-help-text { color:var(--admin-muted); font-size:13px; font-weight:400; line-height:1.6; }
body.page-admin #admin-tools .admin-field { color:var(--admin-muted); font-size:12px; font-weight:550; gap:7px; }
body.page-admin #admin-tools .admin-field :is(input,select,textarea) { min-width:0; border-color:#cbd2dc; border-radius:6px; background:#fff; color:var(--admin-ink); font-size:14px; font-weight:400; }
body.page-admin #admin-tools .admin-field :is(input,select,textarea):focus { outline:2px solid #14213d; outline-offset:2px; }
body.page-admin #admin-tools :is(input[type="checkbox"],input[type="radio"]) { accent-color:#14213d; }
body.page-admin #admin-tools .admin-action { background:#14213d; color:#fff; border-color:#14213d; border-radius:6px; box-shadow:none; font-size:13px; font-weight:550; }
body.page-admin #admin-tools .admin-action:hover { background:#263652; }
body.page-admin #admin-tools .admin-action-secondary { color:#14213d; background:#fff; border-color:#cbd2dc; }
body.page-admin #admin-tools .admin-action-secondary:hover { background:#f0f3f7; }
body.page-admin #admin-dialog :is(.admin-text-action,.admin-pipeline-row):hover { color:#14213d; }
body.page-admin #admin-dialog .admin-text-action { color:#14213d; font-size:12px; font-weight:550; }
body.page-admin #admin-dialog .admin-metric { min-height:104px; padding:16px 18px; border-color:var(--admin-line); border-radius:9px; box-shadow:none; }
body.page-admin #admin-dialog .admin-metric strong { font-size:28px; font-weight:700; letter-spacing:-.03em; }
body.page-admin #admin-dialog .admin-metric span { font-size:12px; font-weight:550; color:var(--admin-muted); }
body.page-admin #admin-dialog .admin-metric small { font-size:12px; font-weight:400; color:#68748a; }
body.page-admin #admin-dialog .admin-metric-accent { background:#fff6df; border-color:#efdaa2; }
body.page-admin #admin-dialog .admin-filterbar { border-color:var(--admin-line); border-radius:9px; padding:18px; gap:14px; }
body.page-admin #admin-dialog .admin-filter-count { font-weight:500; font-size:12px; white-space:nowrap; }
body.page-admin #admin-dialog .admin-filterbar { grid-template-columns:repeat(auto-fit,minmax(min(100%,180px),1fr)); }
body.page-admin #admin-dialog .admin-quick-grid button { box-shadow:none; border-color:var(--admin-line); border-radius:8px; font-weight:550; }
body.page-admin #admin-dialog .admin-parent-overview-row { border-color:var(--admin-line); border-radius:8px; padding:18px; gap:16px; }
body.page-admin #admin-parent-overview .admin-parent-identity > strong { font-size:15px; font-weight:650; }
body.page-admin #admin-parent-overview .admin-parent-contact { font-size:13px; grid-template-columns:54px minmax(0,1fr); }
body.page-admin #admin-parent-overview .admin-parent-children { font-size:13px; }
body.page-admin #admin-parent-overview .admin-parent-detail-label { color:#68748a; font-size:11px; font-weight:500; }
body.page-admin #admin-dialog :is(.admin-parent-stage,.admin-payment-state,.admin-discount-badge) { font-size:11px; font-weight:550; line-height:1.5; }
body.page-admin #admin-dialog .admin-payment-row { border-color:var(--admin-line); border-radius:7px; padding:14px 16px; }
body.page-admin #admin-dialog .admin-payment-amount { font-variant-numeric:tabular-nums; }
body.page-admin #admin-dialog :is(.admin-inline-editor,.admin-import-panel) { border-color:var(--admin-line); background:#f8fafc; border-radius:8px; box-shadow:none; }
body.page-admin #admin-dialog .admin-empty-state { color:var(--admin-muted); font-size:14px; line-height:1.6; padding:32px 18px; }
body.page-admin #admin-dialog :is(button,a,input,select,textarea):focus-visible { outline:2px solid #14213d; outline-offset:3px; }
body.page-admin #admin-sidebar :is(button,a):focus-visible { outline-color:#fca311; }
@media(min-width:901px) and (max-width:1180px) {
  body.page-admin #admin-dialog { grid-template-columns:224px minmax(0,1fr); }
  body.page-admin #admin-dialog-head { padding:20px 24px; }
  body.page-admin #admin-dialog-body { padding:24px; }
  body.page-admin #admin-dialog .admin-dashboard-grid { grid-template-columns:minmax(0,1fr); }
  body.page-admin #admin-dialog .admin-metric-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media(max-width:900px) {
  body.page-admin #admin-dialog { grid-template-columns:minmax(0,1fr); }
  body.page-admin #admin-sidebar { width:248px; padding:24px 16px 16px; }
  body.page-admin #admin-dialog-head { padding:18px 20px; gap:12px; }
  body.page-admin #admin-dialog-body { padding:20px; }
  body.page-admin #admin-status { padding-left:20px; padding-right:20px; }
  body.page-admin #admin-dialog .admin-dashboard-grid { grid-template-columns:minmax(0,1fr); }
  body.page-admin #admin-dialog :is(.admin-metric-grid,.admin-quick-grid) { grid-template-columns:repeat(2,minmax(0,1fr)); }
  body.page-admin #admin-navigation button { min-height:44px; }
}
@media(max-width:600px) {
  body.page-admin #admin-dialog-head { padding:16px; }
  body.page-admin #admin-dialog-title { font-size:23px; overflow-wrap:anywhere; }
  body.page-admin #admin-dialog-body { padding:16px 16px 40px; }
  body.page-admin #admin-tools .admin-section { padding:18px; }
  body.page-admin #admin-dialog :is(.admin-filterbar,.admin-grid) { grid-template-columns:minmax(0,1fr); }
  body.page-admin #admin-dialog .admin-filter-count { justify-content:flex-start; min-height:24px; }
  body.page-admin #admin-parent-overview .admin-parent-contact { font-size:14px; }
  body.page-admin #admin-dialog .admin-metric { min-height:96px; padding:14px; }
  body.page-admin #admin-dialog .admin-quick-grid { grid-template-columns:minmax(0,1fr); }
}

/* END academy-admin-design-20261105 */
/* Public landing pages. The editor keeps its own theme and layout styles. */

body.screen-home {
  --landing-bg: #f7f7f5;
  --landing-paper: #ffffff;
  --landing-ink: #14213d;
  --landing-muted: #5a6274;
  --landing-line: #e5e5e5;
  --landing-line-strong: #c7c7c7;
  --landing-accent: #14213d;
  --landing-accent-soft: #e5e5e5;
  --landing-dark: #000000;
  --landing-pop: #fca311;
  --landing-pop-soft: #fff3c4;
  --path-algorithms: #14213d;
  --path-games: #000000;
  --path-foundation: #fca311;
  --landing-radius-sm: 12px;
  --landing-radius-md: 18px;
  --landing-radius-lg: 26px;
  --landing-radius-pill: 999px;
  --landing-display-font: "SF Pro Rounded", "Segoe UI Rounded", ui-rounded, "Helvetica Neue", Helvetica, Arial, sans-serif;
  overflow-x: hidden;
  color: var(--landing-ink);
  background: var(--landing-bg);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-synthesis: none;
}

body.portal-parent.screen-home {
  --landing-bg: #f8f6f1;
}

body.portal-school.screen-home {
  --landing-bg: #f5f6f8;
}

body.page-plans.screen-home {
  --landing-bg: #f7f7f5;
}

body.page-enrollment.screen-home {
  --landing-bg: #f7f7f5;
}

body.page-legal.screen-home {
  --landing-bg: #f7f7f5;
}

body.page-faq.screen-home {
  --landing-bg: #f7f7f5;
}

body.page-news.screen-home {
  --landing-bg: #f7f7f5;
}

body.screen-home #site-topbar {
  --topbar-h: 64px;
  height: var(--topbar-h);
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  padding: 0 12px;
  color: var(--landing-ink);
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--landing-line);
  backdrop-filter: blur(12px);
  font-family: inherit;
}

body.screen-home #site-brand {
  width: fit-content;
  gap: 8px;
  color: var(--landing-ink);
}

body.screen-home .site-brand-logo {
  height: 26px;
  max-width: 92px;
}

body.screen-home #site-brand-label {
  margin-left: 8px;
  padding: 4px 10px;
  color: var(--landing-ink);
  background: var(--landing-pop-soft);
  border: 0;
  border-radius: var(--landing-radius-pill);
  font: 800 10px/1 var(--font-mono);
  letter-spacing: 0.08em;
}

body.screen-home #site-nav,
body.screen-home #project-title-wrap,
body.screen-home #share-btn,
body.screen-home #toolbar {
  display: none;
}

body.screen-home #site-account {
  grid-column: 2;
  grid-row: 1;
  gap: 8px;
}

/* The dark editor topbar has no room for the light language pill and the
   classroom/home screens already carry the switch. */
body.screen-editor #locale-switcher {
  display: none;
}

#locale-switcher {
  height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 1px;
  padding: 3px;
  background: var(--landing-accent-soft, #f1f2f2);
  border: 0;
  border-radius: var(--landing-radius-pill);
}

.mobile-nav-utilities {
  display: none;
}

.mobile-locale-switcher {
  height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 1px;
  padding: 3px;
  background: #eef0f1;
  border: 1px solid var(--landing-line);
  border-radius: 5px;
}

.locale-option {
  width: 31px;
  height: 28px;
  display: grid;
  place-items: center;
  padding: 0;
  color: var(--landing-accent);
  background: transparent;
  border: 0;
  border-radius: var(--landing-radius-pill);
  font: 800 10px/1 var(--font-mono);
  cursor: pointer;
}

.locale-option:hover,
.locale-option[aria-pressed="true"] {
  color: #ffffff;
  background: var(--landing-accent);
  box-shadow: none;
}

body.screen-home #auth-btn {
  width: auto;
  min-width: 72px;
  height: 44px;
  padding: 0 18px;
  color: #ffffff;
  background: var(--landing-accent);
  border: 1px solid var(--landing-accent);
  border-radius: var(--landing-radius-pill);
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 4px 0 0 var(--landing-dark);
  transition: transform 120ms ease, box-shadow 120ms ease;
}

body.screen-home #auth-btn:hover,
body.screen-home #auth-btn:focus-visible {
  color: #ffffff;
  background: var(--landing-accent);
  border-color: var(--landing-accent);
  transform: translateY(-2px);
  box-shadow: 0 6px 0 0 var(--landing-dark);
}

body.screen-classroom {
  --landing-bg: #f7f8ff;
  --landing-paper: #ffffff;
  --landing-ink: #20233a;
  --landing-muted: #687092;
  --landing-line: #d9ddf2;
  --landing-line-strong: #b5bee9;
  --landing-accent: #4d63d8;
  --landing-accent-soft: #e8edff;
  --landing-dark: #182251;
  overflow: auto;
  color: var(--landing-ink);
  background: var(--landing-bg);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

body.screen-classroom #site-topbar {
  --topbar-h: 64px;
  height: var(--topbar-h);
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px;
  padding: 0 24px;
  color: var(--landing-ink);
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--landing-line);
  backdrop-filter: blur(12px);
  font-family: inherit;
}

body.screen-classroom #site-brand {
  color: var(--landing-ink);
}

body.screen-classroom #site-brand-label {
  color: var(--landing-muted);
  border-color: var(--landing-line);
  font: 700 10px/1 var(--font-mono);
  letter-spacing: 0.1em;
}

body.screen-classroom #site-nav {
  display: inline-flex;
  justify-self: center;
  gap: 4px;
}

body.screen-classroom #site-nav .top-action {
  height: 34px;
  padding: 0 11px;
  color: var(--landing-muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 3px;
  font-size: 11px;
}

body.screen-classroom #site-nav .top-action:hover,
body.screen-classroom.classroom-view-curriculum #top-create-btn,
body.screen-classroom.classroom-view-groups #top-classroom-btn,
body.screen-classroom.classroom-view-docs #top-tutorials-btn {
  color: var(--landing-ink);
  background: var(--landing-accent-soft);
  border-color: transparent;
}

body.screen-classroom #auth-btn {
  width: auto;
  min-width: 66px;
  height: 34px;
  padding: 0 12px;
  color: #ffffff;
  background: var(--landing-dark);
  border: 1px solid var(--landing-dark);
  border-radius: 4px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
}

/* A student opening an assigned lesson gets the lesson on its own page, but the
   top header must stay identical to their studio / main page (screen-home) —
   not the compact classroom header. These re-state the screen-home header with
   literal values so the classroom body palette below is left untouched. */
body.screen-classroom.classroom-student-lesson #site-topbar {
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  padding: 0 12px;
}

body.screen-classroom.classroom-student-lesson #site-brand {
  width: fit-content;
  gap: 8px;
}

body.screen-classroom.classroom-student-lesson .site-brand-logo {
  height: 26px;
  max-width: 92px;
}

body.screen-classroom.classroom-student-lesson #site-brand-label {
  margin-left: 8px;
  padding: 4px 10px;
  color: #14213d;
  background: #fff3c4;
  border: 0;
  border-radius: 999px;
  font: 800 10px/1 var(--font-mono);
  letter-spacing: 0.08em;
}

body.screen-classroom.classroom-student-lesson #site-nav {
  display: none;
}

body.screen-classroom.classroom-student-lesson #site-account {
  grid-column: 2;
  grid-row: 1;
  gap: 8px;
}

body.screen-classroom.classroom-student-lesson #locale-switcher {
  background: #e5e5e5;
  border-radius: 999px;
}

body.screen-classroom.classroom-student-lesson .locale-option:hover,
body.screen-classroom.classroom-student-lesson .locale-option[aria-pressed="true"] {
  color: #ffffff;
  background: #14213d;
}

body.screen-classroom.classroom-student-lesson #auth-btn {
  min-width: 72px;
  height: 44px;
  padding: 0 18px;
  color: #ffffff;
  background: #14213d;
  border: 1px solid #14213d;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 4px 0 0 #000000;
}

body.screen-classroom.classroom-student-lesson #auth-btn:hover,
body.screen-classroom.classroom-student-lesson #auth-btn:focus-visible {
  background: #14213d;
  border-color: #14213d;
  transform: translateY(-2px);
  box-shadow: 0 6px 0 0 #000000;
}

body.screen-classroom #app,
body.screen-classroom #home-screen,
body.screen-classroom #toolbar,
body.screen-classroom #activity-bar,
body.screen-classroom #activity-side-panel,
body.screen-classroom #project-title-wrap,
body.screen-classroom #share-btn {
  display: none !important;
}

#classroom-screen[hidden] {
  display: none !important;
}

body.screen-classroom #classroom-screen {
  min-height: 100vh;
  box-sizing: border-box;
  display: block;
  padding: 104px 26px 32px;
  color: var(--landing-ink);
  background:
    linear-gradient(180deg, rgba(77, 99, 216, 0.08), transparent 270px),
    var(--landing-bg);
}

.classroom-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 18px;
}

.classroom-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--landing-line);
}

.classroom-header h1,
.classroom-projects-head h2 {
  margin: 0;
  font-family: var(--font-mono);
  line-height: 1.05;
}

.classroom-header h1 {
  font-size: clamp(28px, 4vw, 48px);
}

.classroom-active-student {
  min-width: 220px;
  display: grid;
  gap: 4px;
  padding: 11px 13px;
  background: #ffffff;
  border: 1px solid var(--landing-line);
  border-radius: 6px;
}

.classroom-active-student[hidden] {
  display: none;
}

.classroom-active-student span,
.classroom-label,
.classroom-project-count,
#classroom-project-count {
  color: var(--landing-muted);
  font: 700 11px/1 var(--font-mono);
  text-transform: uppercase;
}

.classroom-active-student strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font: 800 18px/1.2 var(--font-mono);
}

.classroom-grid {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.classroom-panel {
  min-width: 0;
  background: var(--landing-paper);
  border: 1px solid var(--landing-line);
  border-radius: 8px;
}

.classroom-student-panel {
  display: grid;
  gap: 22px;
  padding: 18px;
}

.classroom-student-panel[hidden] {
  display: none;
}

.classroom-form {
  display: grid;
  gap: 8px;
}

.classroom-form label {
  color: var(--landing-muted);
  font: 700 12px/1 var(--font-mono);
}

.classroom-person-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

#classroom-student-name {
  min-width: 0;
  height: 40px;
  box-sizing: border-box;
  color: var(--landing-ink);
  background: #ffffff;
  border: 1px solid var(--landing-line-strong);
  border-radius: 6px;
  padding: 0 12px;
  font: 700 15px/1 var(--font-mono);
  outline: none;
}

#classroom-student-name:focus {
  border-color: var(--landing-accent);
  box-shadow: 0 0 0 3px rgba(77, 99, 216, 0.14);
}

.classroom-module-area {
  display: grid;
  gap: 10px;
}

.classroom-teacher-controls {
  display: grid;
  gap: 10px;
}

.classroom-roster-tools {
  display: grid;
  gap: 14px;
}

.classroom-roster-tools[hidden] {
  display: none;
}

/* Exactly the same two colors as the main page's agenda: #171b31 for the
   whole sidebar square (below), #202846 for every card sitting on it. */
.classroom-group-picker {
  display: grid;
  gap: 8px;
  padding: 16px;
  color: #eef2ff;
  background: #202846;
  border: 1px solid #323a68;
  border-radius: 10px;
}

.classroom-group-picker .classroom-label {
  color: #9aa4d6;
}

body.classroom-view-groups .classroom-student-panel {
  background: #171b31;
  border-color: #171b31;
}

/* The main page's top bar, styled after Google Meet's calendar rail: the
   selected day's date and controls on the left, the Monday-anchored week
   strip with its paging chevrons on the right. It keeps the classroom's
   dark-blue account-panel palette. A horizontal flex row that wraps to two
   lines on narrow widths; its own height never depends on the day list
   below (that lives in the white panel), so paging or selecting a day never
   resizes it. */
.classroom-teacher-agenda {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  padding: 14px 18px;
  color: #eef2ff;
  background: #171b31;
  border: 1px solid #323a68;
  border-radius: 10px;
}

.classroom-agenda-bar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

#classroom-agenda-date {
  font: 850 19px/1 var(--font-mono);
  color: #eef2ff;
  white-space: nowrap;
}

.classroom-agenda-today {
  flex: 0 0 auto;
  height: 30px;
  padding: 0 15px;
  color: #eef2ff;
  background: transparent;
  border: 1px solid #323a68;
  border-radius: 999px;
  font: 800 12px/1 var(--font-mono);
  cursor: pointer;
}

.classroom-agenda-today:hover,
.classroom-agenda-today:focus-visible {
  border-color: #6c8cff;
}

.classroom-agenda-bar-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.classroom-agenda-week-nav {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #9aa4d6;
  background: transparent;
  border: 0;
  border-radius: 999px;
  font: 700 20px/1 var(--font-mono);
  cursor: pointer;
}

.classroom-agenda-week-nav:hover,
.classroom-agenda-week-nav:focus-visible {
  color: #eef2ff;
  background: rgba(255, 255, 255, 0.08);
}

.classroom-agenda-week {
  display: flex;
  gap: 2px;
}

.classroom-agenda-day {
  width: 42px;
  min-height: 50px;
  display: grid;
  place-items: center;
  gap: 3px;
  color: #9aa4d6;
  background: transparent;
  border: 0;
  border-radius: 999px;
  font: inherit;
  cursor: pointer;
}

.classroom-agenda-day:hover {
  color: #ffffff;
}

.classroom-agenda-day small {
  font: 800 9px/1 var(--font-mono);
}

.classroom-agenda-day strong {
  font: 850 16px/1 var(--font-mono);
}

.classroom-agenda-day[data-today="true"] {
  box-shadow: inset 0 -3px 0 #ff9f0a;
}

.classroom-agenda-day[data-active="true"] {
  color: #ffffff;
  background: #2a3160;
  box-shadow: inset 0 0 0 1.5px #6c8cff;
}

.classroom-agenda-day[data-today="true"][data-active="true"] {
  box-shadow: inset 0 0 0 1.5px #6c8cff, inset 0 -3px 0 #ff9f0a;
}

.classroom-teacher-controls[hidden],
.classroom-module-area[hidden],
.classroom-form[hidden],
.classroom-teacher-agenda[hidden],
.classroom-session-attendance[hidden] {
  display: none;
}

.classroom-filter-input,
.classroom-group-select {
  width: 100%;
  height: 42px;
  box-sizing: border-box;
  padding: 0 11px;
  color: #eef2ff;
  background: #171b31;
  border: 1px solid #323a68;
  border-radius: 6px;
  font: 700 13px/1 var(--font-mono);
}

.classroom-filter-input::placeholder {
  color: #9aa4d6;
  opacity: 0.85;
}

.classroom-filter-input:focus,
.classroom-group-select:focus {
  outline: none;
  border-color: #6c8cff;
  box-shadow: 0 0 0 3px rgba(108, 140, 255, 0.22);
}

.classroom-roster-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

.classroom-roster-head .classroom-label {
  color: #9aa4d6;
}

.classroom-roster-head > span:last-child,
.classroom-student-project-count {
  min-width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #eef2ff;
  border: 1px solid #323a68;
  border-radius: 999px;
  font: 800 11px/1 var(--font-mono);
}

/* Sits directly on the dark outer panel — needs the lighter card color to
   stay visible. */
.classroom-roster-head > span:last-child {
  background: #202846;
}

/* Sits inside the "All students" row, which is already that lighter card
   color — drop back to the darker shade instead so it still stands out. */
.classroom-student-project-count {
  background: #171b31;
}

.classroom-activity-panel {
  margin: 0 0 1.25rem;
  padding: 1rem;
  border: 1px solid var(--landing-line);
  border-radius: 1rem;
  background: color-mix(in srgb, var(--landing-paper) 94%, var(--landing-accent) 6%);
}

.classroom-activity-panel[hidden] {
  display: none;
}

.classroom-activity-panel > header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.classroom-activity-panel h3,
.classroom-activity-panel h4 {
  margin: 0;
}

.classroom-activity-panel > header > span {
  color: var(--landing-muted);
  font-size: 0.82rem;
}

.classroom-activity-list {
  display: grid;
  gap: 0.45rem;
  max-height: 18rem;
  overflow: auto;
}

.classroom-activity-list h4 {
  padding-top: 0.55rem;
  color: var(--landing-muted);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.classroom-activity-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0.7rem;
  border-radius: 0.65rem;
  background: var(--landing-paper);
  font-size: 0.86rem;
}

.classroom-activity-row time {
  flex: 0 0 auto;
  color: var(--landing-muted);
  font-variant-numeric: tabular-nums;
}

.classroom-student-list {
  display: grid;
  gap: 6px;
}

/* One card, one click target — the whole row selects the student. "Mark
   present" is a real button nested inside it, one shade lighter still, so
   it reads as "a button in a button" without actually nesting <button>s
   (row is a div with role="button"). */
.classroom-student-row,
.classroom-student-row.classroom-group-row {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  color: #eef2ff;
  background: #202846;
  border: 1px solid #323a68;
  border-radius: 10px;
  text-align: left;
  cursor: pointer;
}

.classroom-student-row:hover,
.classroom-student-row-active {
  border-color: #6c8cff;
}

.classroom-group-row strong {
  color: #eef2ff;
}

.classroom-student-row > span:first-child {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.classroom-student-row strong,
.classroom-student-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.classroom-student-row strong {
  font: 800 13px/1.25 var(--font-mono);
}

.classroom-presence {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #9aa4d6;
  font: 800 9px/1 var(--font-mono);
  vertical-align: middle;
}

.classroom-presence::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #6b76a8;
}

.classroom-presence-online {
  color: #4ade80;
}

.classroom-presence-online::before {
  background: #22c55e;
  box-shadow: 0 0 0 3px rgb(34 197 94 / 18%);
}

.classroom-student-row small {
  color: #9aa4d6;
  font: 700 10px/1.3 var(--font-mono);
}

.classroom-student-password-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.classroom-student-password-change {
  height: 22px;
  color: #9aa4d6;
  background: transparent;
  border: 1px solid #323a68;
  border-radius: 999px;
  padding: 0 8px;
  font: 700 10px/1 var(--font-mono);
  cursor: pointer;
}

.classroom-student-password-change:hover {
  color: #eef2ff;
  border-color: #6c8cff;
}

.classroom-student-password-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  width: 100%;
  margin-top: 8px;
}

.classroom-student-password-form input {
  height: 26px;
  min-width: 140px;
  color: #eef2ff;
  background: #171b31;
  border: 1px solid #323a68;
  border-radius: 6px;
  padding: 0 8px;
  font: 700 11px/1 var(--font-mono);
}

.classroom-student-password-form button {
  height: 26px;
  color: #070b1d;
  background: #6c8cff;
  border: 1px solid #6c8cff;
  border-radius: 6px;
  padding: 0 10px;
  font: 800 10px/1 var(--font-mono);
  cursor: pointer;
}

.classroom-student-password-status {
  color: #9aa4d6;
  font: 700 10px/1.3 var(--font-mono);
}

/* A student project the class member has edited since the teacher last
   opened it: ringed in amber so it stands out in the otherwise-uniform
   project list. box-shadow, not border, so the row keeps its size. */
.classroom-project-card-changed {
  background: #fffbeb;
  box-shadow: inset 0 0 0 2px #eab308;
}

.classroom-project-card-changed:hover {
  background: #fef9e3;
}

.classroom-module-grid {
  display: grid;
  gap: 10px;
}

.classroom-module-section-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 0;
  color: var(--landing-muted);
  font: 800 11px/1.3 var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: lowercase;
}

.classroom-module-section-heading::before,
.classroom-module-section-heading::after {
  content: "";
  height: 1px;
  flex: 1 1 auto;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--landing-muted) 32%, transparent), transparent);
}

.classroom-module-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  color: var(--landing-ink);
  background: #ffffff;
  border: 1px solid var(--landing-line);
  border-radius: 8px;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.classroom-module-card[aria-selected="true"] {
  border-color: var(--module-accent, var(--landing-accent));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--module-accent, var(--landing-accent)) 18%, transparent);
}

.classroom-module-card strong,
.classroom-project-card strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font: 800 17px/1.2 var(--font-mono);
}

.classroom-module-card small,
.classroom-project-card small {
  color: var(--landing-muted);
  font: 700 12px/1.35 var(--font-mono);
}

.classroom-module-card .module-card-art {
  width: 84px;
}

.classroom-create-btn {
  width: 100%;
}

.classroom-projects-panel {
  overflow: hidden;
}

.classroom-projects-head {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 18px;
  border-bottom: 1px solid var(--landing-line);
}

.classroom-projects-head[hidden],
.classroom-projects-list[hidden] {
  display: none;
}

.classroom-view-tabs {
  display: inline-flex;
  gap: 6px;
  padding: 12px 18px 0;
}

.classroom-view-tabs[hidden] {
  display: none;
}

.classroom-view-tab {
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--landing-muted);
  background: #ffffff;
  border: 1px solid var(--landing-line);
  border-radius: 5px;
  padding: 0 12px;
  font: 800 11px/1 var(--font-mono);
  cursor: pointer;
}

.classroom-view-tab[aria-pressed="true"] {
  color: #ffffff;
  background: var(--landing-accent);
  border-color: var(--landing-accent);
}

.classroom-home-panel,
.classroom-curriculum-panel,
.classroom-docs-panel,
.classroom-sources-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-bottom: 1px solid var(--landing-line);
}

#classroom-screen.classroom-reader .classroom-grid {
  grid-template-columns: minmax(0, 1fr);
}

#classroom-screen.classroom-reader .classroom-projects-panel {
  width: min(980px, 100%);
  justify-self: center;
}

.classroom-curriculum-overview,
.classroom-module-detail {
  display: grid;
  gap: 14px;
}

/* The subject picker: big, evenly aligned rectangles, two per row, wrapping
   to further rows past two. #classroom-curriculum-panel now supplies the
   dark-blue backdrop itself, so this grid doesn't need its own panel
   styling on top of it. */
.classroom-curriculum-blocks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.classroom-curriculum-blocks[hidden] {
  display: none;
}

.classroom-curriculum-block {
  position: relative;
  min-height: 148px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  padding: 26px 24px 22px;
  color: var(--landing-ink);
  background: #ffffff;
  border: 1px solid var(--landing-line);
  border-radius: 14px;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(9, 12, 26, 0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.classroom-curriculum-block::before {
  width: fit-content;
  padding: 3px 10px;
  border-radius: 999px;
  font: 800 11px/1.6 var(--font-mono);
  letter-spacing: 0.04em;
}

.classroom-curriculum-block strong {
  font: 850 20px/1.3 var(--font-mono);
}

.classroom-curriculum-block small {
  color: var(--landing-muted);
  font: 650 12px/1 var(--font-mono);
}

.classroom-curriculum-block:hover,
.classroom-curriculum-block:focus-visible {
  border-color: var(--landing-accent);
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(9, 12, 26, 0.24);
}

.classroom-curriculum-block-active {
  border-color: var(--landing-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--landing-accent) 14%, transparent);
}

/* JavaScript subjects in a lighter blue, C++ subjects in a darker blue. */
.classroom-curriculum-block[data-pathway="javascript"] {
  background: linear-gradient(165deg, #f2f7ff 0%, #dfeaff 100%);
  border-color: #bcd3fb;
}

.classroom-curriculum-block[data-pathway="javascript"] strong {
  color: #1e2f5c;
}

.classroom-curriculum-block[data-pathway="javascript"] small {
  color: #4a5b8a;
}

.classroom-curriculum-block[data-pathway="javascript"]::before {
  content: "JavaScript";
  color: #1e2f5c;
  background: #ffffff;
}

.classroom-curriculum-block[data-pathway="javascript"]:hover,
.classroom-curriculum-block[data-pathway="javascript"].classroom-curriculum-block-active {
  border-color: #1e2f5c;
}

.classroom-curriculum-block[data-pathway="cpp"] {
  color: #ffffff;
  background: linear-gradient(165deg, #24356b 0%, #171f42 100%);
  border-color: #1e2f5c;
}

.classroom-curriculum-block[data-pathway="cpp"] strong {
  color: #ffffff;
}

.classroom-curriculum-block[data-pathway="cpp"] small {
  color: #a9b8e0;
}

.classroom-curriculum-block[data-pathway="cpp"]::before {
  content: "C++";
  color: #dfe6ff;
  background: rgba(255, 255, 255, 0.14);
}

.classroom-curriculum-block[data-pathway="cpp"]:hover,
.classroom-curriculum-block[data-pathway="cpp"].classroom-curriculum-block-active {
  border-color: #ffffff;
}

.classroom-curriculum-back-to-subjects {
  width: fit-content;
  padding: 3px 0;
  color: var(--landing-accent);
  background: transparent;
  border: 0;
  font: 800 12px/1.2 var(--font-mono);
  cursor: pointer;
}

.classroom-curriculum-back-to-subjects:hover,
.classroom-curriculum-back-to-subjects:focus-visible {
  text-decoration: underline;
}

.classroom-curriculum-back-to-subjects[hidden] {
  display: none;
}

/* The whole curriculum tab now sits on the same dark-blue palette as the
   home agenda and the Групи roster, instead of a plain white panel. Scoped
   to #classroom-curriculum-panel (and, via :has(), the white .classroom-panel
   card that wraps it) so the Admin docs/sources panels — which share
   several of these same base classes and the same outer card — keep their
   normal light styling; :has() also covers the lesson opened "in place"
   from the home agenda, where this same section renders without the
   curriculum tab's own body class. The one exception is the lesson guide
   body (#classroom-module-detail-guide): its markdown, headings and lists
   are built for a light background and aren't individually recolored
   here, so it keeps its own white "paper" card instead of sitting
   directly on the dark shell. */
#classroom-projects-panel:has(#classroom-curriculum-panel:not([hidden])) {
  background: #171b31;
  border-color: #323a68;
}

#classroom-curriculum-panel {
  padding: 20px;
  color: #eef2ff;
  background: transparent;
  border: 0;
  border-bottom: 0;
}

#classroom-curriculum-panel .section-label,
#classroom-curriculum-overview > header > span {
  color: #9aa4d6;
}

#classroom-curriculum-panel h3 {
  color: #eef2ff;
}

#classroom-curriculum-panel .classroom-curriculum-summary {
  color: #9aa4d6;
}

#classroom-curriculum-panel .classroom-curriculum-card {
  background: #202846;
  border-color: #323a68;
}

#classroom-curriculum-panel .classroom-curriculum-card:hover {
  border-color: var(--module-accent, #6c8cff);
}

#classroom-curriculum-panel .classroom-curriculum-copy strong {
  color: #eef2ff;
}

#classroom-curriculum-panel .classroom-curriculum-copy small {
  color: #9aa4d6;
}

#classroom-curriculum-panel .classroom-module-back,
#classroom-curriculum-panel .classroom-curriculum-back-to-subjects {
  color: #9aa4d6;
}

#classroom-curriculum-panel .classroom-module-back:hover,
#classroom-curriculum-panel .classroom-module-back:focus-visible,
#classroom-curriculum-panel .classroom-curriculum-back-to-subjects:hover,
#classroom-curriculum-panel .classroom-curriculum-back-to-subjects:focus-visible {
  color: #eef2ff;
}

#classroom-curriculum-panel .classroom-module-detail-head {
  border-color: #323a68;
}

#classroom-curriculum-panel .classroom-module-detail-summary {
  color: #9aa4d6;
}

#classroom-curriculum-panel .classroom-module-detail-facts {
  border-color: #323a68;
}

#classroom-curriculum-panel .classroom-module-detail-facts > div {
  border-color: #323a68;
}

#classroom-curriculum-panel .classroom-module-detail-facts dt {
  color: #9aa4d6;
}

#classroom-curriculum-panel .classroom-module-detail-facts dd {
  color: #eef2ff;
}

#classroom-curriculum-panel .classroom-module-detail-section h4 {
  color: #eef2ff;
}

#classroom-curriculum-panel .classroom-module-detail-section > p {
  color: #9aa4d6;
}

#classroom-curriculum-panel .classroom-lesson-navigation button {
  color: #9aa4d6;
  background: #202846;
  border-color: #323a68;
}

#classroom-curriculum-panel .classroom-lesson-navigation button:hover:not(:disabled),
#classroom-curriculum-panel .classroom-lesson-navigation button:focus-visible:not(:disabled) {
  color: #ffffff;
  background: #6c8cff;
  border-color: #6c8cff;
}

#classroom-curriculum-panel .classroom-lesson-navigation button:disabled {
  color: #565f8f;
}

#classroom-curriculum-panel .classroom-lesson-row {
  border-color: #323a68;
}

#classroom-curriculum-panel .classroom-lesson-copy strong {
  color: #eef2ff;
}

#classroom-curriculum-panel .classroom-lesson-copy small,
#classroom-curriculum-panel .classroom-lesson-copy p {
  color: #9aa4d6;
}

#classroom-curriculum-panel .classroom-source-row {
  border-color: #323a68;
}

#classroom-curriculum-panel .classroom-source-row strong {
  color: #eef2ff;
}

#classroom-curriculum-panel .classroom-source-row small {
  color: #9aa4d6;
}

#classroom-curriculum-panel #classroom-module-detail-guide {
  padding: 18px;
  background: #ffffff;
  border: 1px solid var(--landing-line);
  border-radius: 12px;
}

/* The curriculum tab is a standalone subject-browsing flow for teachers —
   no roster/agenda sidebar here (that stays on the main page and Groups).
   .classroom-reader marks the student reader layout, which keeps its own
   single-student-panel column and must stay untouched by this. */
body.classroom-view-curriculum #classroom-screen:not(.classroom-reader) .classroom-student-panel {
  display: none;
}

body.classroom-view-curriculum #classroom-screen:not(.classroom-reader) .classroom-grid {
  grid-template-columns: minmax(0, 1fr);
}

.classroom-home-panel[hidden],
.classroom-curriculum-panel[hidden],
.classroom-curriculum-overview[hidden],
.classroom-module-detail[hidden],
.classroom-docs-panel[hidden],
.classroom-sources-panel[hidden],
.classroom-feedback-panel[hidden] {
  display: none;
}

.classroom-curriculum-overview > header,
.classroom-docs-panel > header,
.classroom-sources-panel > header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.classroom-curriculum-panel h3,
.classroom-docs-panel h3,
.classroom-sources-panel h3,
.classroom-feedback-panel h3 {
  margin: 0;
  font-family: var(--font-mono);
  line-height: 1.15;
}

.classroom-curriculum-overview > header > span,
.classroom-docs-panel > header > span,
.classroom-sources-panel > header > span {
  color: var(--landing-muted);
  font: 800 11px/1 var(--font-mono);
  text-transform: uppercase;
}

.classroom-curriculum-list,
.classroom-docs-list,
.classroom-sources-list {
  display: grid;
  gap: 10px;
}

.classroom-curriculum-summary {
  margin: 0;
  color: var(--landing-muted);
  font-size: 13px;
  line-height: 1.55;
}

.classroom-curriculum-card,
.classroom-doc-card {
  min-width: 0;
  display: grid;
  gap: 9px;
  padding: 14px;
  color: inherit;
  background: #ffffff;
  border: 1px solid var(--landing-line);
  border-radius: 8px;
  font: inherit;
  text-align: left;
}

.classroom-curriculum-card {
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: start;
  cursor: pointer;
}

.classroom-curriculum-card:hover {
  border-color: var(--module-accent, var(--landing-accent));
}

.classroom-curriculum-card-active {
  border-color: var(--module-accent, var(--landing-accent));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--module-accent, var(--landing-accent)) 16%, transparent);
}

.classroom-home-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.classroom-home-head h2 {
  margin: 0;
  font-family: var(--font-mono);
  line-height: 1.15;
}

.classroom-home-see-all-btn {
  flex: 0 0 auto;
  height: 32px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--landing-accent);
  background: #ffffff;
  border: 1px solid var(--landing-line);
  border-radius: 5px;
  font: 800 11px/1 var(--font-mono);
  cursor: pointer;
}

.classroom-home-see-all-btn:hover,
.classroom-home-see-all-btn:focus-visible {
  border-color: var(--landing-accent);
}

.classroom-home-copy {
  margin: 0;
  color: var(--landing-muted);
  font-size: 14px;
  line-height: 1.55;
}

/* The day's classes, grouped like Google Meet's day view: a small uppercase
   section label ("Сега" / "Минали" / …) over a stack of soft-grey rounded
   cards, each opening that class's lesson. */
.classroom-home-today-list {
  display: grid;
  gap: 16px;
}

.classroom-home-section {
  display: grid;
  gap: 12px;
}

.classroom-home-class-block {
  display: grid;
  gap: 8px;
}

.classroom-home-section-title {
  margin: 0;
  color: var(--landing-muted);
  font: 800 11px/1 var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.classroom-home-today-card {
  min-width: 0;
  min-height: 72px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  color: inherit;
  background: var(--landing-bg);
  border: 1px solid transparent;
  border-radius: 16px;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.classroom-home-today-card:hover,
.classroom-home-today-card:focus-visible {
  background: #ffffff;
  border-color: var(--landing-accent);
}

.classroom-home-today-card[data-state="live"] {
  border-color: #0b6b99;
  box-shadow: inset 4px 0 0 #0b6b99;
}

/* Same yellow the admin calendar uses for a substitute-marked session, so a
   teacher who is subbing sees the same color mean the same thing in both
   places. */
.classroom-home-today-card-substitute {
  background: #fff7e8;
  border-color: #ff9f0a;
  box-shadow: inset 4px 0 0 #ff9f0a;
}

.classroom-home-today-card-substitute .classroom-home-today-state {
  color: #a15c00;
  background: #ffe9c2;
  border-color: #ff9f0a;
}

.classroom-home-today-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.classroom-home-today-time {
  color: var(--landing-muted);
  font: 700 12px/1.3 var(--font-mono);
}

.classroom-home-today-card strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font: 800 17px/1.3 var(--font-mono);
}

.classroom-home-today-meta {
  color: var(--landing-muted);
  font: 650 12px/1.4 var(--font-sans);
}

.classroom-home-today-state {
  flex: 0 0 auto;
  padding: 4px 9px;
  color: var(--landing-muted);
  background: #ffffff;
  border: 1px solid var(--landing-line);
  border-radius: 999px;
  font: 800 10px/1 var(--font-mono);
  text-transform: uppercase;
}

/* Under each of today's classes: who from that group is currently marked
   present. A student counts as present the moment they sign in; the teacher
   can strike anyone off with the row's button, and only present students
   are listed. */
.classroom-home-present {
  display: grid;
  gap: 4px;
  margin: 0 4px;
  padding: 14px 16px;
  background: #ffffff;
  border: 1px solid var(--landing-line);
  border-radius: 12px;
}

.classroom-home-present-heading {
  margin: 0 0 6px;
  color: var(--landing-muted);
  font: 800 10px/1 var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.classroom-home-present-empty {
  margin: 0;
  padding: 3px 0;
  color: var(--landing-muted);
  font: 650 13px/1.4 var(--font-sans);
}

/* Generous vertical rhythm on purpose: the "Mark absent" buttons stack, and
   a tired teacher must not be able to fat-finger the wrong student. Each row
   is tall and the gap between rows is wide. */
.classroom-home-present-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 44px;
  padding: 6px 0;
}

.classroom-home-present-row + .classroom-home-present-row {
  border-top: 1px solid var(--landing-line);
}

.classroom-home-present-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font: 700 14px/1.3 var(--font-mono);
}

.classroom-home-present-unmark {
  flex: 0 0 auto;
  height: 32px;
  padding: 0 14px;
  color: var(--landing-muted);
  background: var(--landing-bg);
  border: 1px solid var(--landing-line);
  border-radius: 999px;
  font: 800 10px/1 var(--font-mono);
  text-transform: uppercase;
  cursor: pointer;
}

.classroom-home-present-unmark:hover,
.classroom-home-present-unmark:focus-visible {
  color: #b42318;
  background: #fdf1ef;
  border-color: #f0a9a0;
}

/* Past class: read-only confirmation, no button to misclick. */
.classroom-home-present-was {
  flex: 0 0 auto;
  color: var(--landing-muted);
  font: 700 11px/1 var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* The main page keeps the site's normal shell width (matching every other
   screen) but drops the leftover student-panel card chrome around the
   sidebar, so the dark agenda box reads as a real sidebar rather than a
   card nested inside a card. Its own height is fixed (see
   .classroom-teacher-agenda below) and never depends on its sibling's
   height, so switching days or opening a lesson never resizes it. */
/* The main page's own agenda already shows what's selected — the "current
   selection" header box never applies there. On the curriculum tab it's
   handled in JS instead (classroomScreen.ts), tied to the chosen subject
   block rather than this CSS switch. */
body.classroom-view-home .classroom-active-student {
  display: none;
}

/* One full-width column on the main page: the dark Meet-style day bar
   stacks straight on top of the white day-list panel, instead of sharing
   the two-column roster layout the other teacher tabs use. */
body.classroom-view-home #classroom-screen:not(.classroom-reader) .classroom-grid {
  grid-template-columns: minmax(0, 1fr);
}

body.classroom-view-home .classroom-student-panel {
  background: transparent;
  border: 0;
  padding: 0;
}

body.classroom-view-home .classroom-home-panel {
  padding: 24px;
  gap: 18px;
}

/* The standalone class-session page (/class/<group>/lesson): the attendance
   square on the left balances the lesson on the right, the same way the
   Groups tab balances its roster against projects. */
body.classroom-view-session .classroom-active-student {
  display: none;
}

body.classroom-view-session #classroom-screen:not(.classroom-reader) .classroom-grid {
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
}

body.classroom-view-session .classroom-student-panel {
  background: transparent;
  border: 0;
  padding: 0;
}

.classroom-session-attendance {
  display: grid;
  gap: 4px;
  padding: 16px 18px;
  background: var(--landing-paper);
  border: 1px solid var(--landing-line);
  border-radius: 8px;
}

.classroom-session-attendance-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.classroom-session-attendance-head .classroom-label {
  color: var(--landing-muted);
  font: 800 10px/1 var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

#classroom-session-present-count {
  color: var(--landing-muted);
  font: 800 11px/1 var(--font-mono);
}

.classroom-session-attendance-list {
  display: grid;
}

/* Each row a fixed height so the "Mark absent" button appearing on the online
   rows never shifts the list; online = present in a darker blue with a live
   dot, offline = pale blue with nothing to strike. */
.classroom-session-att-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 46px;
  padding: 6px 10px;
  border-radius: 8px;
  font: 700 14px/1.3 var(--font-mono);
}

.classroom-session-att-row + .classroom-session-att-row {
  margin-top: 4px;
}

.classroom-session-att-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.classroom-session-att-state {
  flex: 0 0 auto;
  margin-left: auto;
  color: var(--landing-muted);
  font: 800 10px/1 var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.classroom-session-att-row[data-online="true"] {
  background: color-mix(in srgb, var(--landing-accent) 14%, transparent);
  color: var(--landing-accent);
}

.classroom-session-att-row[data-online="true"] .classroom-session-att-name::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgb(34 197 94 / 18%);
  vertical-align: middle;
}

.classroom-session-att-row[data-online="true"] .classroom-session-att-state {
  color: color-mix(in srgb, var(--landing-accent) 70%, transparent);
}

.classroom-session-att-row[data-online="false"] {
  background: color-mix(in srgb, var(--landing-accent) 5%, transparent);
  color: color-mix(in srgb, var(--landing-accent) 55%, transparent);
}

/* ⋮ menu on an online student's row: Play game / View live / Mark absent. */
.classroom-session-att-menu-wrap {
  position: relative;
  flex: 0 0 auto;
  display: inline-flex;
}

.classroom-session-att-dots {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--landing-accent);
  background: transparent;
  border: 1px solid color-mix(in srgb, var(--landing-accent) 28%, transparent);
  border-radius: 6px;
  font: 800 15px/1 var(--font-mono);
  cursor: pointer;
}

.classroom-session-att-dots:hover,
.classroom-session-att-dots:focus-visible {
  background: color-mix(in srgb, var(--landing-accent) 12%, transparent);
}

.classroom-session-att-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 20;
  display: grid;
  min-width: 180px;
  padding: 4px;
  background: var(--landing-paper);
  border: 1px solid var(--landing-line);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgb(20 33 61 / 18%);
}

.classroom-session-att-menu-item {
  padding: 9px 10px;
  color: var(--landing-ink);
  background: transparent;
  border: 0;
  border-radius: 6px;
  text-align: left;
  font: 700 12px/1.2 var(--font-mono);
  cursor: pointer;
}

.classroom-session-att-menu-item:hover,
.classroom-session-att-menu-item:focus-visible {
  background: var(--landing-accent-soft);
}

/* Centred confirmation dialog (replaces window.confirm for "Mark absent"). */
.classroom-confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgb(20 33 61 / 45%);
  backdrop-filter: blur(6px);
}

.classroom-confirm-card {
  width: min(420px, 100%);
  box-sizing: border-box;
  padding: 22px;
  color: var(--landing-ink);
  background: var(--landing-paper);
  border: 1px solid var(--landing-line);
  border-radius: 12px;
  box-shadow: 0 24px 60px rgb(20 33 61 / 28%);
}

.classroom-confirm-title {
  margin: 0 0 8px;
  font: 800 15px/1.3 var(--font-mono);
  letter-spacing: 0.02em;
}

.classroom-confirm-message {
  margin: 0 0 18px;
  color: var(--landing-muted);
  font: 400 13px/1.5 var(--font-mono);
}

.classroom-confirm-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.classroom-confirm-btn {
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
  color: var(--landing-ink);
  background: #ffffff;
  border: 1px solid var(--landing-line-strong);
  border-radius: 5px;
  font: 800 12px/1 var(--font-mono);
  cursor: pointer;
}

.classroom-confirm-cancel:hover,
.classroom-confirm-cancel:focus-visible {
  color: #ffffff;
  background: #182251;
  border-color: #182251;
  outline: none;
}

.classroom-confirm-ok {
  color: #ffffff;
  background: #182251;
  border-color: #182251;
}

.classroom-confirm-ok:hover,
.classroom-confirm-ok:focus-visible {
  filter: brightness(1.2);
  outline: none;
}

/* The parent-share dialog: dark blue for cancel, minty green (the "online" dot
   colour) for the send/save action. */
.classroom-parent-share-card .classroom-confirm-cancel {
  color: #ffffff;
  background: #182251;
  border-color: #182251;
}

.classroom-parent-share-card .classroom-confirm-ok {
  color: #0f3d24;
  background: #22c55e;
  border-color: #22c55e;
}

.classroom-parent-share-card .classroom-confirm-ok:hover,
.classroom-parent-share-card .classroom-confirm-ok:focus-visible {
  filter: brightness(1.06);
}

.classroom-confirm-ok.classroom-confirm-danger:hover,
.classroom-confirm-ok.classroom-confirm-danger:focus-visible {
  filter: brightness(1.18);
}

.classroom-curriculum-index {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: var(--module-accent, var(--landing-accent));
  border-radius: 6px;
  font: 900 12px/1 var(--font-mono);
}

.classroom-curriculum-copy,
.classroom-doc-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.classroom-curriculum-copy strong,
.classroom-doc-card strong {
  color: var(--landing-ink);
  font: 900 15px/1.2 var(--font-mono);
}

.classroom-curriculum-copy small,
.classroom-doc-card small,
.classroom-doc-card p,
.classroom-feedback-panel p {
  color: var(--landing-muted);
  font-size: 12px;
  line-height: 1.45;
}

.classroom-curriculum-pill {
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--module-accent, var(--landing-accent));
  background: color-mix(in srgb, var(--module-accent, var(--landing-accent)) 12%, #ffffff);
  border: 1px solid color-mix(in srgb, var(--module-accent, var(--landing-accent)) 30%, var(--landing-line));
  border-radius: 999px;
  padding: 0 10px;
  font: 900 10px/1 var(--font-mono);
  text-transform: uppercase;
}

.classroom-module-detail:focus {
  outline: none;
}

.classroom-module-back {
  width: fit-content;
  padding: 3px 0;
  color: var(--landing-accent);
  background: transparent;
  border: 0;
  font: 800 12px/1.2 var(--font-mono);
  cursor: pointer;
}

.classroom-module-back:hover,
.classroom-module-back:focus-visible {
  text-decoration: underline;
}

.classroom-module-detail-head {
  min-width: 0;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--landing-line);
}

.classroom-module-detail-summary {
  margin: 0;
  color: var(--landing-muted);
  font-size: 13px;
  line-height: 1.55;
}

.classroom-module-detail-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  border-block: 1px solid var(--landing-line);
}

.classroom-module-detail-facts > div {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 12px;
  border-right: 1px solid var(--landing-line);
}

.classroom-module-detail-facts > div:last-child {
  border-right: 0;
}

.classroom-module-detail-facts dt {
  color: var(--landing-muted);
  font: 800 10px/1.2 var(--font-mono);
  text-transform: uppercase;
}

.classroom-module-detail-facts dd {
  min-width: 0;
  margin: 0;
  color: var(--landing-ink);
  font: 800 12px/1.35 var(--font-mono);
  overflow-wrap: anywhere;
}

.classroom-module-detail-section {
  display: grid;
  gap: 10px;
}

.classroom-module-detail-section[hidden] {
  display: none;
}

.classroom-module-detail-section h4 {
  margin: 0;
  color: var(--landing-ink);
  font: 900 13px/1.2 var(--font-mono);
}

.classroom-module-detail-section > p {
  margin: 0;
  color: var(--landing-muted);
  font-size: 12px;
  line-height: 1.5;
}

.classroom-lesson-navigation {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: stretch;
  gap: 8px;
  padding-block: 2px;
}

.classroom-lesson-navigation button,
.classroom-code-head button {
  min-height: 38px;
  color: var(--landing-accent);
  background: #ffffff;
  border: 1px solid var(--landing-line-strong);
  border-radius: 6px;
  padding: 8px 12px;
  font: 800 11px/1.35 var(--font-mono);
  cursor: pointer;
}

.classroom-lesson-navigation button:last-child {
  text-align: right;
}

.classroom-lesson-navigation button:hover:not(:disabled),
.classroom-lesson-navigation button:focus-visible:not(:disabled),
.classroom-code-head button:hover,
.classroom-code-head button:focus-visible {
  color: #ffffff;
  background: var(--landing-accent);
  border-color: var(--landing-accent);
  outline: none;
}

.classroom-lesson-navigation button:disabled {
  color: var(--landing-muted);
  cursor: default;
  opacity: 0.55;
}

.classroom-lesson-navigation button[hidden] {
  display: none;
}

.classroom-lesson-assign-wrap {
  position: relative;
  display: flex;
}

.classroom-lesson-assign-wrap[hidden] {
  display: none;
}

.classroom-lesson-assign-popover {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  width: min(280px, 78vw);
  max-height: 320px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid var(--landing-line-strong);
  border-radius: 10px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
}

.classroom-lesson-assign-popover[hidden] {
  display: none;
}

.classroom-lesson-assign-title {
  margin: 0;
  font: 800 11px/1.35 var(--font-mono);
  color: var(--landing-ink);
}

.classroom-lesson-assign-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.classroom-lesson-assign-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 4px;
  font: 600 12px/1.3 var(--font-sans, inherit);
  color: var(--landing-ink);
  cursor: pointer;
}

.classroom-lesson-assign-row input {
  margin: 0;
}

.classroom-lesson-assign-all {
  border-bottom: 1px solid var(--landing-line);
  padding-bottom: 8px;
  font-weight: 800;
}

.classroom-lesson-assign-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 4px;
}

.classroom-lesson-navigation .classroom-lesson-assign-actions button {
  min-height: 32px;
  padding: 6px 14px;
  font: 800 11px/1.2 var(--font-mono);
  text-align: center;
}

.classroom-lesson-studio {
  display: grid;
  grid-template-columns: minmax(220px, 1.35fr) minmax(260px, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: color-mix(in srgb, var(--module-accent, var(--landing-accent)) 9%, #ffffff);
  border: 1px solid color-mix(in srgb, var(--module-accent, var(--landing-accent)) 36%, var(--landing-line));
  border-left: 4px solid var(--module-accent, var(--landing-accent));
  border-radius: 8px;
}

.classroom-lesson-studio[hidden] {
  display: none;
}

.classroom-lesson-studio-copy {
  display: grid;
  gap: 5px;
}

.classroom-lesson-studio-copy h4,
.classroom-lesson-studio-copy p {
  margin: 0;
}

.classroom-lesson-studio-copy h4 {
  color: var(--landing-ink);
  font: 900 14px/1.25 var(--font-mono);
}

.classroom-lesson-studio-copy > p:last-child {
  color: var(--landing-muted);
  font-size: 12px;
  line-height: 1.5;
}

.classroom-lesson-studio-contract {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  overflow: hidden;
  background: var(--landing-line);
  border: 1px solid var(--landing-line);
  border-radius: 6px;
}

.classroom-lesson-studio-contract > div {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 9px;
  background: #ffffff;
}

.classroom-lesson-studio-contract dt {
  color: var(--landing-muted);
  font: 800 9px/1.2 var(--font-mono);
  text-transform: uppercase;
}

.classroom-lesson-studio-contract dd {
  min-width: 0;
  margin: 0;
  color: var(--landing-ink);
  font: 800 10px/1.35 var(--font-mono);
  overflow-wrap: anywhere;
}

.classroom-lesson-studio > button {
  min-width: 190px;
  min-height: 44px;
}

.classroom-teacher-guide,
.classroom-guide-block {
  display: grid;
  gap: 14px;
}

.classroom-arrival-video {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  border: 1px solid #f0cf67;
  border-left: 5px solid #ef4444;
  border-radius: 8px;
  background: linear-gradient(135deg, #fffaf0, #fff4d6);
}

.classroom-arrival-video > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.classroom-arrival-video strong,
.classroom-arrival-video small {
  color: #8a5a10;
  font: 800 10px/1.35 var(--font-mono);
  text-transform: uppercase;
}

.classroom-arrival-video h5,
.classroom-arrival-video p {
  margin: 0;
}

.classroom-arrival-video h5 {
  color: var(--landing-ink);
  font: 900 15px/1.35 var(--font-mono);
}

.classroom-arrival-video p {
  color: var(--landing-muted);
  font-size: 12px;
  line-height: 1.5;
}

.classroom-arrival-video a {
  flex: 0 0 auto;
  padding: 11px 14px;
  color: #ffffff;
  background: #dc2626;
  border-radius: 5px;
  font: 900 11px/1.2 var(--font-mono);
  text-decoration: none;
}

.classroom-arrival-video a:hover,
.classroom-arrival-video a:focus-visible {
  background: #b91c1c;
  outline: 3px solid rgba(220, 38, 38, 0.2);
}

.classroom-arrival-video-reference {
  border-color: #9ac6f8;
  border-left-color: #2563eb;
  background: linear-gradient(135deg, #f5f9ff, #eaf3ff);
}

.classroom-arrival-video-reference strong,
.classroom-arrival-video-reference small {
  color: #2454a6;
}

.classroom-arrival-video-reference a {
  background: #2563eb;
}

.classroom-arrival-video-reference a:hover,
.classroom-arrival-video-reference a:focus-visible {
  background: #1d4ed8;
  outline-color: rgba(37, 99, 235, 0.2);
}

.classroom-markdown {
  min-width: 0;
  display: grid;
  gap: 12px;
  color: var(--landing-ink);
}

.classroom-markdown h1,
.classroom-markdown h2,
.classroom-markdown h3,
.classroom-markdown h4 {
  scroll-margin-top: 90px;
  margin: 0;
  color: var(--landing-ink);
  font-family: var(--font-mono);
  line-height: 1.25;
}

.classroom-markdown h1 {
  margin-top: 8px;
  font-size: clamp(24px, 4vw, 36px);
}

.classroom-markdown h2 {
  margin-top: 24px;
  padding: 12px 0 8px;
  border-bottom: 2px solid color-mix(in srgb, var(--module-accent, var(--landing-accent)) 32%, var(--landing-line));
  font-size: clamp(18px, 3vw, 23px);
}

.classroom-markdown h3 {
  margin-top: 15px;
  color: color-mix(in srgb, var(--module-accent, var(--landing-accent)) 82%, #172033);
  font-size: 15px;
}

.classroom-markdown h4 {
  margin-top: 10px;
  font-size: 13px;
}

.classroom-markdown p,
.classroom-markdown li,
.classroom-markdown blockquote {
  margin: 0;
  font-size: 14px;
  line-height: 1.68;
}

.classroom-markdown ul,
.classroom-markdown ol {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 24px;
}

.classroom-markdown blockquote {
  padding: 14px 16px;
  color: #283654;
  background: color-mix(in srgb, var(--module-accent, var(--landing-accent)) 8%, #ffffff);
  border-left: 5px solid var(--module-accent, var(--landing-accent));
  border-radius: 0 7px 7px 0;
}

.classroom-markdown pre {
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding: 14px 16px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  color: #e7edff;
  background: #151924;
  border: 1px solid #303950;
  border-radius: 7px;
  font: 12px/1.65 var(--font-mono);
  tab-size: 2;
  -webkit-overflow-scrolling: touch;
}

.classroom-markdown :not(pre) > code {
  padding: 2px 5px;
  color: #263a8c;
  background: #eef2ff;
  border: 1px solid #dce3ff;
  border-radius: 4px;
  font: 700 0.92em/1.4 var(--font-mono);
}

.classroom-markdown a {
  color: var(--landing-accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
}

.classroom-markdown hr {
  width: 100%;
  margin: 10px 0;
  border: 0;
  border-top: 1px solid var(--landing-line);
}

.classroom-guide-intro {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
}

.classroom-problem {
  padding: 18px;
  border: 1px solid color-mix(in srgb, var(--module-accent, var(--landing-accent)) 28%, #d9dee8);
  border-left: 5px solid var(--module-accent, var(--landing-accent));
  border-radius: 8px;
  background: #fff;
}

.classroom-problem-statement {
  margin: 0;
  color: var(--landing-ink);
  font-size: 14px;
  line-height: 1.65;
  white-space: pre-line;
}

.classroom-problem-examples {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.classroom-problem-examples article {
  min-width: 0;
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid #dfe4ed;
  border-radius: 6px;
  background: #f7f9fc;
}

.classroom-problem-examples h5,
.classroom-problem-examples strong {
  margin: 0;
  color: var(--landing-ink);
  font: 900 11px/1.3 var(--font-mono);
  text-transform: uppercase;
}

.classroom-problem-examples pre {
  min-width: 0;
  margin: 0;
  padding: 9px;
  overflow: auto;
  border-radius: 4px;
  background: #101828;
  color: #f8fafc;
  font: 12px/1.5 var(--font-mono);
}

.classroom-problem-examples p {
  margin: 0;
  color: var(--landing-muted);
  font-size: 12px;
  line-height: 1.5;
}

.classroom-teacher-solution {
  padding: 12px 14px;
  border-left: 4px solid #7c3aed;
  background: #faf7ff;
}

.classroom-guide-intro article {
  display: grid;
  align-content: start;
  gap: 7px;
  padding: 13px;
  background: color-mix(in srgb, var(--module-accent, var(--landing-accent)) 7%, #ffffff);
  border-top: 3px solid var(--module-accent, var(--landing-accent));
  border-radius: 5px;
}

.classroom-guide-intro strong,
.classroom-exit-ticket strong {
  color: var(--landing-ink);
  font: 900 11px/1.3 var(--font-mono);
  text-transform: uppercase;
}

.classroom-guide-intro p,
.classroom-guide-list li,
.classroom-session-card li,
.classroom-debug-block li,
.classroom-source-note p,
.classroom-exit-ticket p,
.classroom-code-head p {
  margin: 0;
  color: var(--landing-muted);
  font-size: 12px;
  line-height: 1.55;
}

.classroom-guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.classroom-guide-grid-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.classroom-guide-list,
.classroom-session-card,
.classroom-debug-block {
  display: grid;
  align-content: start;
  gap: 9px;
  padding: 14px;
  background: #ffffff;
  border: 1px solid var(--landing-line);
  border-radius: 7px;
}

.classroom-teacher-guide h5 {
  margin: 0;
  color: var(--landing-ink);
  font: 900 13px/1.3 var(--font-mono);
}

.classroom-guide-list ul,
.classroom-session-card ol,
.classroom-debug-block ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 19px;
}

.classroom-session-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.classroom-code-example {
  min-width: 0;
  padding: 14px;
  color: #dce6ff;
  background: #151924;
  border-radius: 8px;
}

.classroom-code-head {
  display: flex;
  flex-wrap: wrap;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.classroom-code-head h5 {
  color: #ffffff;
}

.classroom-code-head p {
  max-width: 680px;
  margin-top: 5px;
  color: #aebad5;
}

.classroom-code-head > div:first-child {
  flex: 1 1 420px;
}

.classroom-code-head button {
  flex: 0 0 auto;
  color: #dce6ff;
  background: #20283a;
  border-color: #39445e;
}

.classroom-code-lines {
  min-width: 0;
  max-width: 100%;
  margin: 0;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  border: 1px solid #303950;
  border-radius: 6px;
  padding: 7px 0;
  font: 700 12px/1.65 var(--font-mono);
  tab-size: 2;
  -webkit-overflow-scrolling: touch;
}

.classroom-code-line {
  min-width: max-content;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  color: #dce6ff;
  padding-right: 16px;
}

.classroom-code-line:first-child,
.classroom-code-line:nth-child(2) {
  color: #8fd6a7;
}

.classroom-code-line-selected {
  color: #ffffff;
  background: rgba(91, 124, 250, 0.28);
  box-shadow: inset 3px 0 0 #85a0ff;
}

.classroom-code-line-number {
  min-width: 44px;
  color: #75819d;
  background: transparent;
  border: 0;
  border-right: 1px solid #303950;
  padding: 0 10px 0 6px;
  font: inherit;
  text-align: right;
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
}

.classroom-code-line-number:hover,
.classroom-code-line-number:focus-visible,
.classroom-code-line-selected .classroom-code-line-number {
  color: #ffffff;
  outline: none;
}

.classroom-code-line > span {
  padding-left: 12px;
  white-space: pre;
}

.classroom-exit-ticket {
  display: grid;
  gap: 7px;
  padding: 14px;
  background: #fff8d8;
  border: 1px solid #ead48b;
  border-left: 5px solid #e0b83f;
  border-radius: 6px;
}

.classroom-source-note {
  color: var(--landing-muted);
  border-top: 1px solid var(--landing-line);
  padding-top: 10px;
  font-size: 12px;
}

.classroom-source-note summary {
  color: var(--landing-accent);
  font: 800 11px/1.4 var(--font-mono);
  cursor: pointer;
}

.classroom-source-note p {
  margin-top: 8px;
}

.classroom-module-detail-lessons,
.classroom-module-detail-sources {
  display: grid;
}

.classroom-lesson-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--landing-line);
}

.classroom-lesson-row:first-child {
  border-top: 1px solid var(--landing-line);
}

.classroom-lesson-index {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--module-accent, var(--landing-accent));
  background: color-mix(in srgb, var(--module-accent, var(--landing-accent)) 10%, #ffffff);
  border: 1px solid color-mix(in srgb, var(--module-accent, var(--landing-accent)) 30%, var(--landing-line));
  border-radius: 5px;
  font: 900 11px/1 var(--font-mono);
}

.classroom-lesson-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.classroom-lesson-copy strong {
  color: var(--landing-ink);
  font: 900 14px/1.25 var(--font-mono);
}

.classroom-lesson-copy small,
.classroom-lesson-copy p {
  margin: 0;
  color: var(--landing-muted);
  font-size: 11px;
  line-height: 1.45;
}

.classroom-feedback-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
  background: color-mix(in srgb, #fff8d8 72%, var(--landing-accent-soft));
  border: 1px solid color-mix(in srgb, #f2c96d 58%, var(--landing-line));
  border-radius: 8px;
}

#classroom-feedback-draft {
  width: 100%;
  min-height: 112px;
  box-sizing: border-box;
  resize: vertical;
  color: var(--landing-ink);
  background: #ffffff;
  border: 1px solid var(--landing-line-strong);
  border-radius: 7px;
  padding: 10px 12px;
  font: 700 12px/1.45 var(--font-mono);
  outline: none;
}

#classroom-feedback-draft:focus {
  border-color: var(--landing-accent);
  box-shadow: 0 0 0 3px rgba(77, 99, 216, 0.14);
}

.classroom-doc-email {
  display: grid;
  gap: 6px;
  padding: 10px;
  background: var(--landing-accent-soft);
  border: 1px solid color-mix(in srgb, var(--landing-accent) 24%, var(--landing-line));
  border-radius: 7px;
}

.classroom-doc-email span {
  color: var(--landing-accent);
  font: 900 10px/1.2 var(--font-mono);
  text-transform: uppercase;
}

.classroom-source-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--landing-line);
}

.classroom-source-row:last-child {
  border-bottom: 0;
}

.classroom-source-row > span {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.classroom-source-row strong {
  font: 800 13px/1.3 var(--font-mono);
}

.classroom-source-row small {
  color: var(--landing-muted);
  font-size: 11px;
  line-height: 1.45;
}

.classroom-source-row a {
  color: var(--landing-accent);
  font: 800 11px/1 var(--font-mono);
  text-decoration: none;
}

.classroom-source-row a:hover,
.classroom-source-row a:focus-visible {
  text-decoration: underline;
}

.classroom-projects-list {
  display: grid;
  gap: 1px;
  background: var(--landing-line);
}

.classroom-project-card {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: #ffffff;
}

.classroom-project-card:hover {
  background: #f8faff;
}

.classroom-project-meta {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.classroom-project-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.classroom-project-actions button {
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--landing-ink);
  background: #ffffff;
  border: 1px solid var(--landing-line-strong);
  border-radius: 5px;
  padding: 0 11px;
  font: 800 12px/1 var(--font-mono);
  cursor: pointer;
}

.classroom-project-actions button:hover,
.classroom-project-actions button:focus-visible {
  color: #ffffff;
  background: var(--landing-accent);
  border-color: var(--landing-accent);
  outline: none;
}

/* "Mark ready for parent" control on a project card: dark blue until
   published, minty green once shared with the parent. */
.classroom-parent-share-btn {
  grid-column: 1 / -1;
  justify-self: start;
  margin-top: 10px;
  min-height: 32px;
  padding: 0 13px;
  color: #ffffff;
  background: #182251;
  border: 1px solid #182251;
  border-radius: 5px;
  font: 800 12px/1 var(--font-mono);
  cursor: pointer;
}

.classroom-parent-share-btn:hover,
.classroom-parent-share-btn:focus-visible {
  filter: brightness(1.25);
  outline: none;
}

.classroom-parent-share-btn-sent {
  color: #0f3d24;
  background: #22c55e;
  border-color: #22c55e;
}

.classroom-parent-share-btn-sent:hover,
.classroom-parent-share-btn-sent:focus-visible {
  filter: brightness(1.06);
}

.classroom-parent-share-card {
  width: min(460px, 100%);
  max-width: 100%;
  max-height: calc(100dvh - 40px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
}

/* The dialog never scrolls sideways. The only scroll allowed is vertical,
   inside a text box, and only once the note outgrows it. */
.classroom-parent-share-body {
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.classroom-parent-share-field {
  min-width: 0;
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  color: var(--landing-ink);
  font: 800 11px/1.3 var(--font-mono);
  letter-spacing: 0.02em;
}

.classroom-parent-share-field textarea {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 92px;
  resize: none;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 9px 10px;
  color: var(--landing-ink);
  background: var(--landing-paper);
  border: 1px solid var(--landing-line-strong);
  border-radius: 5px;
  font: 400 12px/1.5 var(--font-mono);
}

.classroom-parent-share-template {
  min-width: 0;
  display: flex;
  gap: 8px;
  align-items: flex-start;
  overflow-wrap: anywhere;
  color: var(--landing-muted);
  font: 600 11px/1.4 var(--font-mono);
  cursor: pointer;
}

.classroom-parent-share-template input {
  margin: 2px 0 0;
  flex: 0 0 auto;
}

.classroom-parent-share-hint {
  margin: 0 0 12px;
  color: var(--landing-accent);
  font: 600 11px/1.4 var(--font-mono);
}

.classroom-parent-share-unsend {
  color: #b91c1c;
  border-color: color-mix(in srgb, #b91c1c 45%, transparent);
}

.classroom-parent-share-unsend:hover,
.classroom-parent-share-unsend:focus-visible {
  color: #ffffff;
  background: #b91c1c;
  border-color: #b91c1c;
  filter: none;
}

.classroom-empty {
  padding: 28px 18px;
  color: var(--landing-muted);
  background: #ffffff;
  font: 700 14px/1.45 var(--font-mono);
}

/* The roster sits on the dark blue sidebar — its empty states need to match
   instead of showing up as a stray white box. */
#classroom-student-list .classroom-empty {
  color: #9aa4d6;
  background: #202846;
  border: 1px solid #323a68;
  border-radius: 8px;
}

.classroom-status {
  min-height: 18px;
  margin: 0;
  color: var(--landing-muted);
  font: 700 12px/1.4 var(--font-mono);
}

@media (max-width: 880px) {
  body.screen-classroom #site-topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    padding-inline: 16px;
  }

  body.screen-classroom #site-nav {
    display: none;
  }

  body.screen-classroom #classroom-screen {
    padding-inline: 16px;
  }

  .classroom-header,
  .classroom-grid,
  .classroom-project-card,
  .classroom-curriculum-blocks {
    grid-template-columns: 1fr;
  }

  .classroom-header {
    align-items: start;
  }

  .classroom-active-student {
    width: 100%;
    box-sizing: border-box;
  }

  .classroom-project-actions {
    justify-content: stretch;
  }

  .classroom-project-actions button {
    flex: 1 1 0;
  }

  .classroom-module-detail-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .classroom-module-detail-facts > div:nth-child(2) {
    border-right: 0;
  }

  .classroom-module-detail-facts > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--landing-line);
  }

  .classroom-guide-intro,
  .classroom-guide-grid-three {
    grid-template-columns: 1fr;
  }

  .classroom-lesson-studio {
    grid-template-columns: 1fr;
  }

  .classroom-lesson-studio > button {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .classroom-curriculum-card,
  .classroom-module-detail-head,
  .classroom-lesson-row {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .classroom-curriculum-card > .classroom-curriculum-pill,
  .classroom-module-detail-head > .classroom-curriculum-pill,
  .classroom-lesson-row > .classroom-curriculum-pill {
    grid-column: 2;
    width: fit-content;
  }

  .classroom-lesson-navigation,
  .classroom-guide-grid,
  .classroom-session-grid {
    grid-template-columns: 1fr;
  }

  .classroom-lesson-navigation button,
  .classroom-lesson-navigation button:last-child {
    width: 100%;
    text-align: left;
  }

  .classroom-code-head {
    display: grid;
  }

  .classroom-arrival-video {
    align-items: stretch;
    flex-direction: column;
  }

  .classroom-arrival-video a {
    width: 100%;
    box-sizing: border-box;
    text-align: center;
  }

  .classroom-markdown p,
  .classroom-markdown li,
  .classroom-markdown blockquote {
    font-size: 13px;
  }

  .classroom-markdown pre {
    margin-inline: -8px;
    padding: 12px 10px;
    border-radius: 4px;
    font-size: 11px;
  }

  .classroom-code-head button {
    width: 100%;
  }

  .classroom-lesson-studio-contract {
    grid-template-columns: 1fr;
  }

  .classroom-code-example {
    margin-inline: -8px;
    padding: 12px 8px;
    border-radius: 4px;
  }

  .classroom-code-lines {
    font-size: 11px;
  }
}

body.screen-home #home-screen {
  min-height: 100vh;
  box-sizing: border-box;
  padding: 96px 18px 28px;
  color: var(--landing-ink);
  background: var(--landing-bg);
  font-family: inherit;
}

.audience-home {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: none;
  gap: 88px;
}

body.screen-home:not(.portal-login-required):not(.portal-parent):not(.portal-school):not(.page-plans):not(.page-enrollment):not(.page-legal):not(.page-faq):not(.page-news):not(.page-payments) .audience-home[data-landing-page="student"],
body.portal-student:not(.page-plans):not(.page-enrollment):not(.page-legal):not(.page-faq):not(.page-news):not(.page-payments) .audience-home[data-landing-page="student"],
body.portal-parent:not(.page-plans):not(.page-enrollment):not(.page-legal):not(.page-faq):not(.page-news):not(.page-payments) .audience-home[data-landing-page="parent"],
body.portal-school:not(.page-plans):not(.page-enrollment):not(.page-legal):not(.page-faq):not(.page-news):not(.page-payments) .audience-home[data-landing-page="teacher"] {
  display: grid;
}

body.portal-login-required #site-topbar,
body.portal-login-required .audience-home {
  display: none !important;
}

body.portal-login-required #home-screen {
  min-height: 100vh;
  padding: 0;
  background: color-mix(in srgb, var(--landing-accent, #4d63d8) 82%, #ffffff);
}

body.page-plans .audience-home {
  display: none;
}

body.page-plans .audience-home[data-landing-page="plans"] {
  display: grid;
}

body.page-enrollment .audience-home {
  display: none;
}

body.student-home-authenticated.portal-student.screen-home .audience-home[data-landing-page="student"] {
  gap: 38px;
}

body.student-home-authenticated.portal-student.screen-home .audience-home[data-landing-page="student"] > :not(#student-dashboard) {
  display: none;
}

.student-dashboard[hidden] {
  display: none;
}

.student-dashboard {
  display: grid;
  gap: 20px;
  padding: 24px;
  background: var(--landing-paper);
  border: 1px solid var(--landing-line-strong);
  box-shadow: 8px 8px 0 #efece3;
}

.student-dashboard-header {
  display: grid;
  align-items: end;
  gap: 20px;
}

.student-dashboard-header > div:first-child {
  display: grid;
  gap: 10px;
}

.student-dashboard h2,
.student-dashboard h3,
.student-dashboard p {
  margin: 0;
}

.student-dashboard h2 {
  color: var(--landing-ink);
  font-size: clamp(30px, 7vw, 48px);
  line-height: 1;
  letter-spacing: -0.04em;
}

.student-dashboard-copy,
#student-dashboard-copy {
  max-width: 620px;
  color: var(--landing-muted);
  font-size: 14px;
  line-height: 1.6;
}

.student-dashboard-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.student-dashboard-actions .landing-button {
  min-width: 132px;
}

.student-dashboard-grid {
  display: grid;
  gap: 16px;
}

/* "Join lesson" call-to-action shown under the student's name only while their
   group's class is in session. */
.student-join-lesson {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
  padding: 16px 18px;
  background: var(--landing-accent-soft);
  border: 1px solid color-mix(in srgb, var(--landing-accent) 32%, var(--landing-line));
  border-radius: 8px;
}

.student-join-lesson[hidden] {
  display: none;
}

.student-join-lesson-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.student-join-lesson-copy span {
  color: var(--landing-accent);
  font: 800 9px/1.3 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.student-join-lesson-copy strong {
  color: var(--landing-ink);
  font-size: 17px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.student-dashboard-projects {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.student-dashboard-lessons {
  display: grid;
  gap: 12px;
  min-width: 0;
  margin-top: 24px;
}

.student-dashboard-lessons[hidden] {
  display: none;
}

.student-dashboard-projects-head {
  min-height: 48px;
  display: grid;
  align-items: center;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--landing-line);
}

.student-dashboard-projects-head h3 {
  color: var(--landing-ink);
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.student-dashboard-projects-head p {
  max-width: 360px;
  color: var(--landing-muted);
  font: 700 10px/1.45 var(--font-mono);
}

.student-project-list {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.student-project-row {
  min-height: 72px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 13px 14px;
  color: var(--landing-ink);
  background: #ffffff;
  border: 1px solid var(--landing-line);
  border-radius: 4px;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.student-project-row:hover,
.student-project-row:focus-visible {
  border-color: var(--landing-accent);
  box-shadow: 0 0 0 3px var(--landing-accent-soft);
  transform: translateY(-1px);
}

.student-project-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.student-project-copy strong,
.student-project-copy span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.student-project-copy strong {
  font-size: 14px;
  line-height: 1.25;
}

.student-project-copy span,
.student-project-row small {
  color: var(--landing-muted);
  font: 700 10px/1.4 var(--font-mono);
}

.student-project-row small {
  padding: 6px 8px;
  color: var(--landing-accent);
  background: var(--landing-accent-soft);
  border-radius: 3px;
}

.student-dashboard-empty {
  padding: 22px 16px;
  color: var(--landing-muted);
  background: #ffffff;
  border: 1px solid var(--landing-line);
  font: 700 12px/1.5 var(--font-mono);
}

.landing-hero {
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 48px;
  padding: 20px 0 52px;
  border-bottom: 1px solid var(--landing-line-strong);
}

.hero-copy {
  display: grid;
  gap: 22px;
  align-content: center;
}

.section-label {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin: 0;
  padding: 6px 14px;
  color: var(--landing-ink);
  background: var(--landing-pop-soft);
  border-radius: var(--landing-radius-pill);
  font: 800 11px/1.4 var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.landing-hero h1,
.editorial-heading h2,
.closing-cta h2 {
  margin: 0;
  color: var(--landing-ink);
  font-family: var(--landing-display-font);
  font-weight: 800;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.landing-hero h1 {
  max-width: 760px;
  font-size: clamp(45px, 12vw, 76px);
  line-height: 1.01;
}

.student-motto {
  display: grid;
  gap: 3px;
}

.student-motto span {
  display: block;
}

.student-motto span:nth-child(2) {
  color: var(--landing-pop);
}

.hero-summary {
  max-width: 650px;
  margin: 0;
  color: var(--landing-muted);
  font-size: clamp(16px, 4vw, 19px);
  line-height: 1.58;
}

.hero-actions,
.closing-actions {
  display: flex;
  align-items: stretch;
  flex-direction: column;
  gap: 9px;
}

.landing-button {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 26px;
  border: 2px solid transparent;
  border-radius: var(--landing-radius-pill);
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 130ms ease, box-shadow 130ms ease, background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

.landing-button-primary {
  color: var(--landing-dark);
  background: var(--landing-pop);
  border-color: var(--landing-pop);
  box-shadow: 0 5px 0 0 var(--landing-dark);
}

.landing-button-primary:hover {
  background: var(--landing-pop);
  border-color: var(--landing-pop);
  transform: translateY(-2px);
  box-shadow: 0 7px 0 0 var(--landing-dark);
}

.landing-button:disabled {
  color: #8b928e;
  background: #e8e9e5;
  border-color: #e8e9e5;
  box-shadow: none;
  cursor: not-allowed;
}

.landing-button-secondary {
  color: var(--landing-ink);
  background: transparent;
  border-color: var(--landing-line-strong);
}

.landing-button-secondary:hover {
  color: var(--landing-accent);
  background: var(--landing-accent-soft);
  border-color: var(--landing-accent-soft);
  transform: translateY(-2px);
}

.landing-button-inverse {
  color: var(--landing-dark);
  background: #ffffff;
  border-color: #ffffff;
}

.landing-button-inverse:hover {
  color: var(--landing-dark);
  background: var(--landing-pop);
  border-color: var(--landing-pop);
  transform: translateY(-2px);
}

.audience-link {
  margin: 0;
  color: var(--landing-muted);
  font-size: 12px;
  line-height: 1.5;
}

.audience-link a {
  color: var(--landing-ink);
  font-weight: 700;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.inline-link-button,
.back-academy-button {
  padding: 0;
  color: var(--landing-ink);
  background: transparent;
  border: 0;
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  cursor: pointer;
}

.project-proof,
.parent-overview,
.teacher-workspace {
  min-width: 0;
  overflow: hidden;
  border-radius: var(--landing-radius-lg);
}

.project-proof {
  color: #f6f8fb;
  background: var(--landing-dark);
  border: 1px solid var(--landing-dark);
  box-shadow: 0 16px 40px rgba(16, 26, 61, 0.22);
}

.proof-header,
.parent-overview > header,
.teacher-workspace > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.proof-header > div,
.parent-overview > header,
.teacher-workspace > header {
  display: grid;
  gap: 6px;
}

.proof-header span,
.parent-overview header span,
.teacher-workspace header span {
  color: #aeb9c9;
  font: 700 9px/1.3 var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.proof-header strong,
.parent-overview header strong,
.teacher-workspace header strong {
  font-size: 21px;
  line-height: 1.2;
}

.proof-status {
  flex: 0 0 auto;
  padding: 6px 10px;
  color: #f6f8fb !important;
  background: rgba(255, 255, 255, 0.16);
  border: 0;
  border-radius: var(--landing-radius-pill);
  font-weight: 800 !important;
}

.project-code {
  min-height: 210px;
  margin: 0;
  display: flex;
  align-items: center;
  overflow: auto;
  padding: 26px 20px;
  box-sizing: border-box;
  color: #e7ebf1;
  background: #0e1c2e;
  font: 500 13px/1.8 var(--font-mono);
  white-space: pre;
}

.project-code span {
  color: #72a6f4;
}

.project-code b {
  color: #86d8b4;
  font-weight: 500;
}

.proof-meta {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.proof-meta > div {
  min-height: 72px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 14px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  border-right: 1px solid rgba(255, 255, 255, 0.14);
}

.proof-meta > div:nth-child(even) {
  border-right: 0;
}

.proof-meta dt {
  color: #8f9caf;
  font: 700 9px/1 var(--font-mono);
}

.proof-meta dd {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
}

.motto-ledger {
  display: grid;
  gap: 14px;
}

.motto-ledger article {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 14px;
  padding: 28px 24px;
  background: var(--landing-paper);
  border-radius: var(--landing-radius-lg);
  box-shadow: 0 2px 0 0 var(--landing-line-strong);
}

.motto-ledger article:nth-child(1) {
  background: var(--landing-pop-soft, var(--landing-accent-soft));
}

.motto-ledger article:nth-child(2) {
  background: color-mix(in srgb, var(--landing-accent) 12%, var(--landing-paper));
}

.motto-ledger article > span,
.evidence-columns article > span,
.workflow-list li > span,
.tool-register article > span,
.outcome-list article > span {
  color: var(--landing-accent);
  font: 800 11px/1.2 var(--font-mono);
}

.motto-ledger h2 {
  max-width: 630px;
  margin: 0 0 8px;
  font-family: var(--landing-display-font);
  font-size: clamp(25px, 6vw, 38px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.motto-ledger p,
.evidence-columns p,
.method-list p,
.outcome-list p,
.workflow-list p,
.tool-register p {
  margin: 0;
  color: var(--landing-muted);
  font-size: 13px;
  line-height: 1.55;
}

.landing-section {
  display: grid;
  gap: 34px;
  scroll-margin-top: 84px;
}

.editorial-heading {
  display: grid;
  gap: 15px;
}

.editorial-heading h2,
.closing-cta h2 {
  max-width: 820px;
  font-size: clamp(36px, 9vw, 58px);
  line-height: 1.05;
}

.editorial-heading > p:not(.section-label),
.closing-cta p:not(.section-label) {
  max-width: 690px;
  margin: 0;
  color: var(--landing-muted);
  font-size: 15px;
  line-height: 1.62;
}

.path-choice h3,
.evidence-columns h3,
.method-list h3,
.outcome-list h3,
.workflow-list h3,
.tool-register h3 {
  margin: 0;
  color: var(--landing-ink);
  font-size: 19px;
  line-height: 1.18;
  letter-spacing: -0.02em;
}

.student-paths {
  padding: 34px 20px;
  background: #ffffff;
  border: 0;
  border-radius: var(--landing-radius-lg);
  box-shadow: 0 2px 0 0 var(--landing-line-strong);
}

.path-choice h3 {
  margin-bottom: 9px;
}

.path-choice p,
.path-section-footer p {
  margin: 0;
  font-size: 14px;
  line-height: 1.58;
}

.path-choice-grid {
  display: grid;
  gap: 12px;
}

.path-choice {
  min-width: 0;
  min-height: 250px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 26px 22px;
  color: #ffffff;
  border-radius: var(--landing-radius-lg);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.path-choice:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 28px rgba(16, 26, 61, 0.22);
}

.path-choice-algorithms {
  background: var(--path-algorithms);
}

.path-choice-games {
  background: var(--path-games);
}

.path-choice-foundation {
  background: var(--path-foundation);
  color: var(--landing-dark);
}

.path-choice-math {
  background: #ffffff;
  color: var(--landing-dark);
  border: 2px solid var(--landing-ink);
}

.path-choice-modeling {
  color: var(--landing-dark);
  background: #fff3c4;
  border: 2px solid #f5c451;
}

.path-choice-main {
  min-height: 285px;
  box-shadow: 12px 12px 0 rgba(249, 115, 22, 0.16);
}

.path-choice .path-choice-label {
  width: fit-content;
  margin-bottom: 26px;
  padding: 5px 10px;
  color: currentColor;
  border: 0;
  border-radius: var(--landing-radius-pill);
  background: rgba(255, 255, 255, 0.22);
  font: 800 10px/1 var(--font-mono);
}

.path-choice h3 {
  min-width: 0;
  color: #ffffff;
  font-family: var(--landing-display-font);
  font-size: clamp(19px, 4vw, 27px);
  line-height: 1.15;
  font-weight: 800;
  overflow-wrap: break-word;
}

.path-choice p {
  color: rgba(255, 255, 255, 0.82);
}

.path-choice small,
.roadmap-stage small,
.roadmap-branch small {
  margin-top: 18px;
  font: 800 9px/1.5 var(--font-mono);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.path-choice > small {
  margin-top: auto;
  padding-top: 18px;
}

.path-choice-foundation .path-choice-label {
  background: rgba(0, 0, 0, 0.12);
}

.path-choice-foundation h3 {
  color: var(--landing-dark);
}

.path-choice-foundation p {
  color: rgba(20, 33, 61, 0.72);
}

.path-choice-math .path-choice-label {
  color: #ffffff;
  background: var(--landing-ink);
}

.path-choice-math h3 {
  color: var(--landing-dark);
}

.path-choice-math p {
  color: var(--landing-muted);
}

.path-choice-modeling .path-choice-label {
  color: var(--landing-dark);
  background: rgba(0, 0, 0, 0.1);
}

.path-choice-modeling h3 {
  color: var(--landing-dark);
}

.path-choice-modeling p {
  color: rgba(20, 33, 61, 0.72);
}

.partner-proof-strip {
  display: grid;
  gap: 10px;
  margin-top: 6px;
}

.partner-proof-strip article {
  display: grid;
  gap: 8px;
  padding: 18px;
  color: var(--landing-ink);
  background: #fffaf0;
  border: 1px solid #f5c451;
}

.partner-proof-strip > article > span {
  color: var(--landing-accent);
  font: 900 10px/1.2 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.partner-proof-strip strong {
  color: var(--landing-dark);
  font-size: clamp(24px, 5vw, 36px);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.partner-proof-strip p {
  margin: 0;
  color: var(--landing-muted);
  font-size: 13px;
  line-height: 1.55;
}

.partner-logo-link {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  min-height: 52px;
}

.partner-logo {
  display: block;
  width: auto;
  max-width: min(100%, 260px);
  height: auto;
  object-fit: contain;
}

.partner-logo-devhubone {
  max-height: 48px;
}

.partner-logo-zle {
  max-width: min(100%, 300px);
  max-height: 76px;
}

.partner-proof-strip-roadmap {
  margin-top: 14px;
}

.path-section-footer {
  display: grid;
  gap: 22px;
  align-items: center;
  padding-top: 4px;
}

.path-section-footer strong {
  display: block;
  margin-bottom: 6px;
  font-size: 16px;
}

.path-section-footer p {
  max-width: 680px;
  color: var(--landing-muted);
}

.method-section,
.parent-curriculum,
.teacher-tools {
  padding: 32px 24px;
  background: var(--landing-paper);
  border: 0;
  border-radius: var(--landing-radius-lg);
  box-shadow: 0 2px 0 0 var(--landing-line-strong);
}

.method-list,
.workflow-list {
  margin: 0;
  padding: 0;
  display: grid;
  list-style: none;
}

.method-list li {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  padding: 20px 0;
  border-top: 1px solid var(--landing-line);
}

.method-list li > span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: var(--landing-accent);
  border-radius: var(--landing-radius-pill);
  font: 800 11px/1 var(--font-mono);
}

.method-list h3 {
  margin-bottom: 6px;
}

.closing-cta {
  display: grid;
  gap: 28px;
  padding: 40px 28px;
  color: #ffffff;
  background: var(--landing-dark);
  border-radius: var(--landing-radius-lg);
}

.closing-cta h2 {
  color: #ffffff;
}

.closing-cta .section-label {
  margin-bottom: 14px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
}

.closing-cta p:not(.section-label) {
  margin-top: 12px;
  color: #c7ced8;
}

.text-button {
  min-height: 44px;
  padding: 0;
  color: #ffffff;
  background: transparent;
  border: 0;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

.landing-footer {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 0 0 4px;
  color: #7b8491;
  font: 700 9px/1.5 var(--font-mono);
  letter-spacing: 0.07em;
  text-align: center;
  text-transform: uppercase;
}

.landing-footer nav,
.legal-help nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
}

.enrollment-legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 8px 0 0;
  font-size: 12px;
}

.enrollment-identity {
  margin-top: 8px;
  text-align: left;
}

.landing-footer-identity {
  display: block;
  max-width: 72ch;
  color: #7b8491;
  font: 600 9px/1.7 var(--font-mono);
  letter-spacing: 0.05em;
  text-transform: none;
  text-wrap: balance;
}

.landing-footer a,
.legal-help a {
  color: var(--landing-ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.landing-footer-identity a {
  color: inherit;
  white-space: nowrap;
}

.landing-footer a:hover,
.landing-footer a:focus-visible,
.legal-help a:hover,
.legal-help a:focus-visible {
  color: var(--landing-accent);
}

/* Family FAQ */

body.page-faq .audience-home {
  display: none;
}

body.page-faq .audience-home[data-landing-page="faq"] {
  width: min(1040px, 100%);
  display: grid;
  gap: 42px;
}

/* Academy news */

body.page-news .audience-home {
  display: none;
}

body.page-news .audience-home[data-landing-page="news"] {
  width: min(1040px, 100%);
  display: grid;
  gap: 42px;
}

/* Parent payments */

body.page-payments .audience-home {
  display: none;
}

body.page-payments .audience-home[data-landing-page="payments"] {
  width: min(1040px, 100%);
  display: grid;
  gap: 34px;
}

.payments-hero {
  display: grid;
  gap: 10px;
  padding: 22px 0 28px;
  border-bottom: 2px solid var(--landing-line);
}

.payments-hero h1 {
  margin: 0;
  color: var(--landing-ink);
  font-size: clamp(30px, 4.4vw, 42px);
  line-height: 1.05;
}

.payments-hero p {
  margin: 0;
  max-width: 640px;
  color: var(--landing-muted);
  font-size: 14px;
  line-height: 1.55;
}

.payments-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.payments-card {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 22px;
  background: var(--landing-paper);
  border: 1px solid var(--landing-line-strong);
}

.payments-card h2 {
  margin: 0;
  color: var(--landing-ink);
  font-size: 26px;
  line-height: 1.15;
}

.payments-card dl {
  display: grid;
  gap: 8px;
  margin: 4px 0 0;
}

.payments-card dl div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--landing-line);
}

.payments-card dt {
  color: var(--landing-muted);
  font-size: 12px;
}

.payments-card dd {
  margin: 0;
  color: var(--landing-ink);
  font-weight: 800;
  text-align: right;
}

.payments-due-card {
  background: color-mix(in srgb, var(--landing-accent-soft) 36%, var(--landing-paper));
  border-color: var(--landing-accent);
}

.payments-due-note {
  margin: 0;
  color: var(--landing-muted);
  font-size: 12px;
  line-height: 1.5;
}

.payments-due-note[hidden] {
  display: none;
}

#payments-pay-btn[hidden] {
  display: none;
}

.payments-method {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding: 20px 22px;
  border: 1px solid var(--landing-hairline, rgba(0, 0, 0, 0.12));
  border-radius: 14px;
}

.payments-method ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
  color: var(--landing-ink);
  font-size: 13px;
  line-height: 1.6;
}

.payments-method-schemes {
  display: flex;
  gap: 10px;
  margin: 0;
}

.payments-method-schemes span {
  padding: 4px 10px;
  border: 1px solid var(--landing-hairline, rgba(0, 0, 0, 0.12));
  border-radius: 6px;
  font: 700 10px/1 var(--font-mono);
  letter-spacing: 0.08em;
}

.payments-method-links {
  display: flex;
  gap: 16px;
  margin: 0;
  font-size: 13px;
}

.payments-history {
  display: grid;
  gap: 14px;
}

.payments-history h2 {
  margin: 0;
  color: var(--landing-ink);
  font-size: 20px;
}

.payments-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--landing-line-strong);
}

.payments-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 13px;
}

.payments-table th,
.payments-table td {
  padding: 11px 14px;
  text-align: left;
  white-space: nowrap;
}

.payments-table thead th {
  color: var(--landing-muted);
  background: var(--landing-paper);
  border-bottom: 1px solid var(--landing-line-strong);
  font: 800 10px/1.3 var(--font-mono);
  text-transform: uppercase;
}

.payments-table tbody tr {
  border-bottom: 1px solid var(--landing-line);
}

.payments-table tbody tr:last-child {
  border-bottom: 0;
}

.payments-table tbody td {
  color: var(--landing-ink);
}

.payments-status {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font: 800 10px/1.4 var(--font-mono);
  text-transform: uppercase;
}

.payments-status-paid {
  color: #1f6d3f;
  background: #dcf3e3;
}

.payments-status-pending {
  color: #6d4a00;
  background: #fff0b5;
}

.payments-status-failed,
.payments-status-provider_registration_failed {
  color: #8a2634;
  background: #fbdadf;
}

.payments-status-due,
.payments-status-awaiting_customer,
.payments-status-provider_registration_pending {
  color: #6d4a00;
  background: #fff0b5;
}

.payments-status-refunded {
  color: var(--landing-muted);
  background: var(--landing-line);
}

.payments-due-list {
  display: grid;
  gap: 10px;
  margin-top: 6px;
}

.payments-due-list[hidden] {
  display: none;
}

.payments-due-item {
  display: grid;
  gap: 4px;
  padding: 10px 0;
  border-top: 1px solid var(--landing-line);
}

.payments-due-item p {
  margin: 0;
  color: var(--landing-muted);
}

.payments-due-item button {
  justify-self: start;
  margin-top: 4px;
}

.payments-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding-top: 4px;
}

.payments-pagination span {
  color: var(--landing-muted);
  font: 700 12px/1.3 var(--font-mono);
}

.payments-pagination button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

@media (max-width: 760px) {
  .payments-summary-grid {
    grid-template-columns: 1fr;
  }
}

.news-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(280px, 0.65fr);
  gap: 42px;
  align-items: end;
  padding: 22px 0 42px;
  border-bottom: 2px solid var(--landing-line);
}

.news-hero h1 {
  margin: 0;
  max-width: 780px;
  color: var(--landing-ink);
  font: 900 clamp(44px, 7vw, 88px)/0.95 var(--landing-display-font);
  letter-spacing: -0.055em;
}

.news-hero p:last-child {
  margin: 0;
  color: var(--landing-muted);
  font-size: clamp(18px, 2.2vw, 24px);
  line-height: 1.45;
}

.news-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.news-card {
  min-height: 260px;
  display: grid;
  align-content: start;
  gap: 24px;
  padding: 28px;
  background: var(--landing-paper);
  border: 1px solid var(--landing-line-strong);
  box-shadow: 10px 10px 0 rgba(20, 33, 61, 0.08);
}

.news-card span {
  color: var(--landing-pop);
  font: 900 12px/1 var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.news-card h2 {
  margin: 0;
  color: var(--landing-ink);
  font: 900 clamp(24px, 3vw, 34px)/1 var(--landing-display-font);
  letter-spacing: -0.04em;
}

.news-card p {
  margin: 0;
  color: var(--landing-muted);
  font-size: 17px;
  line-height: 1.45;
}

.news-closing {
  margin-top: 10px;
}

.faq-hero {
  display: grid;
  gap: 30px;
  padding: 22px 0 42px;
  border-bottom: 1px solid var(--landing-line-strong);
}

.faq-hero > div:first-child,
.faq-hero-summary {
  display: grid;
  align-content: end;
  gap: 16px;
}

.faq-hero h1 {
  max-width: 800px;
  margin: 0;
  color: var(--landing-ink);
  font-size: clamp(42px, 11vw, 76px);
  font-weight: 650;
  line-height: 0.98;
  letter-spacing: -0.05em;
  text-wrap: balance;
}

.faq-hero-summary p {
  max-width: 630px;
  margin: 0;
  color: var(--landing-muted);
  font-size: 16px;
  line-height: 1.65;
}

.faq-hero-summary span {
  color: var(--landing-accent);
  font: 800 9px/1.4 var(--font-mono);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.faq-category-nav {
  display: grid;
  gap: 18px;
  padding: 24px 20px;
  background: #ffffff;
  border: 1px solid var(--landing-line-strong);
  box-shadow: 7px 7px 0 #eeece4;
}

.faq-category-nav > strong {
  color: var(--landing-muted);
  font: 800 9px/1.4 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.faq-category-nav > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.faq-category-nav a {
  min-height: 62px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  color: var(--landing-ink);
  background: #f5f4ef;
  border: 1px solid transparent;
  text-decoration: none;
}

.faq-category-nav a:hover,
.faq-category-nav a:focus-visible {
  color: var(--landing-accent);
  background: var(--landing-accent-soft);
  border-color: var(--landing-accent);
}

.faq-category-nav a span {
  color: var(--landing-accent);
  font: 800 9px/1 var(--font-mono);
}

.faq-category-nav a strong {
  font-size: 12px;
  line-height: 1.35;
}

.faq-sections {
  display: grid;
  gap: 64px;
}

.faq-category {
  display: grid;
  gap: 24px;
  scroll-margin-top: 90px;
}

.faq-category > header {
  display: grid;
  gap: 12px;
}

.faq-category > header > div {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
}

.faq-category > header span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: var(--landing-accent);
  font: 800 9px/1 var(--font-mono);
}

.faq-category h2 {
  margin: 0;
  color: var(--landing-ink);
  font-size: clamp(27px, 7vw, 40px);
  line-height: 1;
  letter-spacing: -0.035em;
}

.faq-category > header p {
  max-width: 540px;
  margin: 0;
  color: var(--landing-muted);
  font-size: 13px;
  line-height: 1.55;
}

.faq-list {
  border-top: 1px solid var(--landing-line-strong);
}

.faq-list details {
  scroll-margin-top: 90px;
  border-bottom: 1px solid var(--landing-line);
}

.faq-list summary {
  position: relative;
  padding: 20px 42px 20px 0;
  color: var(--landing-ink);
  font-size: 15px;
  font-weight: 750;
  line-height: 1.42;
  list-style: none;
  cursor: pointer;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  content: "+";
  position: absolute;
  top: 18px;
  right: 1px;
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: var(--landing-dark);
  font: 500 18px/1 var(--font-mono);
}

.faq-list details[open] summary::after {
  content: "×";
  background: var(--landing-accent);
}

.faq-list details p {
  max-width: 780px;
  margin: -3px 0 22px;
  padding: 0 34px 0 18px;
  color: var(--landing-muted);
  border-left: 3px solid var(--landing-accent);
  font-size: 13px;
  line-height: 1.72;
}

.faq-contact {
  display: grid;
  gap: 30px;
  padding: 34px 24px;
  color: #ffffff;
  background: var(--landing-dark);
}

.faq-contact > div:first-child {
  display: grid;
  gap: 12px;
}

.faq-contact .section-label {
  color: #a8c8f7;
}

.faq-contact h2,
.faq-contact p {
  margin: 0;
}

.faq-contact h2 {
  color: #ffffff;
  font-size: clamp(30px, 8vw, 46px);
  line-height: 1;
  letter-spacing: -0.04em;
}

.faq-contact p:not(.section-label) {
  max-width: 580px;
  color: #c7ced8;
  font-size: 13px;
  line-height: 1.6;
}

.faq-contact-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
}

/* Legal center */

body.page-legal .audience-home {
  display: none;
}

body.page-legal .audience-home[data-landing-page="legal"] {
  width: min(1000px, 100%);
  display: grid;
  gap: 38px;
}

.legal-tabs {
  position: sticky;
  z-index: 2;
  top: 64px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  background: rgba(251, 250, 246, 0.96);
  border: 1px solid var(--landing-line);
  backdrop-filter: blur(10px);
}

.legal-tabs a {
  min-height: 46px;
  display: grid;
  place-items: center;
  padding: 0 8px;
  color: var(--landing-muted);
  border-right: 1px solid var(--landing-line);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
}

.legal-tabs a:last-child {
  border-right: 0;
}

.legal-tabs a:hover,
.legal-tabs a:focus-visible,
.legal-tabs a[aria-current="page"] {
  color: #ffffff;
  background: var(--landing-dark);
}

.legal-hero {
  display: grid;
  gap: 26px;
  padding: 22px 0 38px;
  border-bottom: 1px solid var(--landing-line-strong);
}

.legal-hero > div {
  display: grid;
  gap: 15px;
}

.legal-hero h1 {
  max-width: 850px;
  margin: 0;
  color: var(--landing-ink);
  font-size: clamp(42px, 11vw, 72px);
  font-weight: 650;
  line-height: 0.98;
  letter-spacing: -0.05em;
  text-wrap: balance;
}

.legal-updated,
.legal-intro {
  margin: 0;
}

.legal-updated {
  color: var(--landing-accent);
  font: 700 10px/1.4 var(--font-mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.legal-intro {
  max-width: 720px;
  color: var(--landing-muted);
  font-size: 17px;
  line-height: 1.65;
}

.legal-summary {
  display: grid;
  gap: 24px;
  padding: 26px 22px;
  background: #ffffff;
  border: 1px solid var(--landing-line-strong);
  box-shadow: 7px 7px 0 #efece3;
}

.legal-summary > div {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.legal-summary > div > span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: var(--landing-accent);
  font: 800 9px/1 var(--font-mono);
}

.legal-summary h2,
.legal-identity h2,
.legal-section h2 {
  margin: 0;
  color: var(--landing-ink);
  letter-spacing: -0.025em;
}

.legal-summary h2,
.legal-identity h2 {
  font-size: clamp(25px, 6vw, 34px);
  line-height: 1.05;
}

.legal-summary ul,
.legal-section ul {
  margin: 0;
  padding: 0;
  display: grid;
  list-style: none;
}

.legal-summary li,
.legal-section li {
  position: relative;
  padding: 13px 0 13px 24px;
  color: var(--landing-muted);
  border-top: 1px solid var(--landing-line);
  font-size: 14px;
  line-height: 1.6;
}

.legal-summary li::before,
.legal-section li::before {
  content: "";
  position: absolute;
  top: 21px;
  left: 2px;
  width: 7px;
  height: 7px;
  background: var(--landing-accent);
}

.legal-identity {
  display: grid;
  gap: 22px;
  padding: 26px 22px;
  background: #f2efe7;
  border-left: 5px solid var(--landing-dark);
}

.legal-identity header {
  display: grid;
  gap: 10px;
}

.legal-identity dl {
  margin: 0;
  display: grid;
}

.legal-identity dl div {
  display: grid;
  gap: 5px;
  padding: 14px 0;
  border-top: 1px solid #d4d0c4;
}

.legal-identity dt {
  color: var(--landing-muted);
  font: 800 9px/1.4 var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.legal-identity dd {
  margin: 0;
  color: var(--landing-ink);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
}

.legal-identity > p {
  margin: 0;
  padding: 14px;
  color: var(--landing-ink);
  background: #fff3c4;
  border: 1px solid #f5c451;
  font-size: 12px;
  line-height: 1.55;
}

.legal-sections {
  display: grid;
  border-top: 1px solid var(--landing-line-strong);
}

.legal-section {
  display: grid;
  gap: 16px;
  padding: 30px 0;
  border-bottom: 1px solid var(--landing-line);
}

.legal-section h2 {
  font-size: 23px;
  line-height: 1.15;
}

.legal-section p {
  max-width: 820px;
  margin: 0;
  color: var(--landing-muted);
  font-size: 14px;
  line-height: 1.72;
}

.legal-help {
  display: grid;
  gap: 10px;
  justify-items: start;
  padding: 24px 22px;
  color: #ffffff;
  background: var(--landing-dark);
}

.legal-help strong {
  font-size: 18px;
}

.legal-help > span {
  color: #c7ced8;
  font: 700 9px/1.5 var(--font-mono);
  letter-spacing: 0.06em;
}

.legal-help nav {
  justify-content: flex-start;
  margin-top: 10px;
}

.legal-help a {
  color: #ffffff;
  font-size: 11px;
}

/* Parent page */

.parent-overview {
  color: var(--landing-ink);
  background: var(--landing-paper);
  border: 1px solid var(--landing-line-strong);
}

.parent-overview > header {
  color: #ffffff;
  background: var(--landing-dark);
}

.overview-row {
  min-height: 67px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  border-bottom: 1px solid var(--landing-line);
}

.overview-row > span {
  color: var(--landing-accent);
  font: 700 9px/1 var(--font-mono);
}

.overview-row strong {
  font-size: 13px;
}

.overview-row small {
  color: var(--landing-muted);
  font: 700 9px/1 var(--font-mono);
}

.parent-overview > footer,
.teacher-workspace > footer {
  padding: 16px 18px;
  color: var(--landing-muted);
  font: 700 9px/1.4 var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.evidence-columns {
  display: grid;
  border-top: 1px solid var(--landing-line-strong);
}

.evidence-columns article {
  display: grid;
  gap: 14px;
  padding: 25px 0;
  border-bottom: 1px solid var(--landing-line);
}

.outcome-list {
  display: grid;
  border-top: 1px solid var(--landing-line-strong);
}

.outcome-list article {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  padding: 21px 0;
  border-bottom: 1px solid var(--landing-line);
}

.outcome-list h3 {
  margin-bottom: 5px;
}

.parent-quote {
  margin: 0;
  padding: 42px 0;
  border-top: 1px solid var(--landing-line-strong);
  border-bottom: 1px solid var(--landing-line-strong);
}

.parent-quote p {
  max-width: 850px;
  margin: 0 0 18px;
  color: var(--landing-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 8vw, 56px);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.035em;
}

.parent-quote cite {
  color: var(--landing-accent);
  font: normal 700 10px/1.4 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Teacher page */

.teacher-workspace {
  color: #f7f7f8;
  background: var(--landing-dark);
  border: 1px solid var(--landing-dark);
}

.workspace-nav {
  display: flex;
  gap: 18px;
  padding: 14px 18px;
  color: #adb3be;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  font: 700 9px/1 var(--font-mono);
  letter-spacing: 0.08em;
}

.workspace-nav span:first-child {
  color: #ffffff;
}

.workspace-table > div {
  min-height: 62px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.workspace-table span,
.workspace-table small {
  color: #aeb4be;
  font: 700 9px/1 var(--font-mono);
}

.workspace-table strong {
  font-size: 12px;
}

.teacher-workspace > footer {
  color: #b8bec8;
}

.workflow-list {
  border-top: 1px solid var(--landing-line-strong);
}

.workflow-list li {
  display: grid;
  gap: 13px;
  padding: 25px 0;
  border-bottom: 1px solid var(--landing-line);
}

.tool-register {
  display: grid;
  border-top: 1px solid var(--landing-line-strong);
}

.tool-register article {
  display: grid;
  gap: 10px;
  padding: 21px 0;
  border-bottom: 1px solid var(--landing-line);
}

/* Programme finder and learning path */

.plan-hero {
  display: grid;
  gap: 42px;
  align-items: start;
}

.plan-hero-copy {
  display: grid;
  gap: 20px;
}

.plan-hero h1 {
  max-width: 760px;
  margin: 0;
  color: var(--landing-ink);
  font-size: clamp(45px, 12vw, 74px);
  font-weight: 650;
  line-height: 0.98;
  letter-spacing: -0.05em;
  text-wrap: balance;
}

.plan-steps {
  display: grid;
  gap: 9px;
  margin-top: 8px;
  padding-top: 20px;
  border-top: 1px solid var(--landing-line);
}

.plan-steps span {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  color: #89908d;
  font: 700 10px/1.4 var(--font-mono);
}

.plan-steps .plan-step-current {
  color: var(--landing-accent);
}

.plan-steps b {
  color: var(--landing-muted);
  font: 700 11px/1.4 "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.plan-steps .plan-step-current b {
  color: var(--landing-ink);
}

.plan-finder {
  display: grid;
  gap: 26px;
  padding: 26px 20px;
  background: #ffffff;
  border: 1px solid var(--landing-line-strong);
  box-shadow: 8px 8px 0 #efece3;
}

.plan-finder fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.plan-finder legend {
  width: 100%;
  margin-bottom: 13px;
  color: var(--landing-ink);
  font-size: 15px;
  font-weight: 750;
}

.age-options,
.interest-options {
  display: grid;
  gap: 8px;
}

.age-options {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.age-options button,
.interest-options button {
  min-width: 0;
  min-height: 49px;
  padding: 12px;
  color: var(--landing-ink);
  background: #fbfaf6;
  border: 1px solid var(--landing-line);
  border-radius: 2px;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.age-options button {
  font-size: 12px;
  font-weight: 750;
  text-align: center;
}

.age-options button:hover,
.interest-options button:hover {
  border-color: var(--landing-ink);
}

.age-options button[aria-pressed="true"],
.interest-options button[aria-pressed="true"] {
  color: #ffffff;
  background: var(--landing-dark);
  border-color: var(--landing-dark);
  box-shadow: inset 4px 0 0 var(--landing-accent);
}

.interest-options button {
  display: grid;
  gap: 4px;
  padding: 15px;
}

.age-options button[hidden],
.interest-options button[hidden] {
  display: none !important;
}

.interest-options strong {
  font-size: 14px;
}

.interest-options span {
  color: var(--landing-muted);
  font-size: 11px;
  line-height: 1.4;
}

.interest-options button[aria-pressed="true"] span {
  color: #ccd5d1;
}

.plan-submit {
  width: 100%;
}

.plan-privacy {
  margin: -16px 0 0;
  color: var(--landing-muted);
  font-size: 10px;
  text-align: center;
}

.plan-result {
  display: grid;
  gap: 16px;
  padding: 30px 22px;
  background: #fff3c4;
  border-left: 6px solid var(--path-foundation);
  scroll-margin-top: 90px;
}

.plan-result[hidden] {
  display: none;
}

.plan-result h2 {
  max-width: 800px;
  margin: 0;
  color: var(--landing-ink);
  font-size: clamp(30px, 8vw, 48px);
  line-height: 1.03;
  letter-spacing: -0.04em;
}

.plan-result > p:not(.section-label) {
  max-width: 760px;
  margin: 0;
  color: #5f5844;
  font-size: 15px;
  line-height: 1.6;
}

.plan-result ul {
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  list-style: none;
}

.plan-result li {
  padding: 7px 9px;
  color: #4a422d;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(92, 78, 41, 0.22);
  font: 750 10px/1.2 var(--font-mono);
}

.plan-result-actions {
  display: grid;
  gap: 10px;
  align-items: center;
  margin-top: 4px;
}

.plan-result-actions span {
  color: #625943;
  font-size: 11px;
}

.pricing-section {
  display: grid;
  gap: 28px;
  scroll-margin-top: 90px;
}

.pricing-section[hidden] {
  display: none;
}

.pricing-heading {
  display: grid;
  gap: 18px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--landing-line-strong);
}

.pricing-heading > div {
  display: grid;
  gap: 12px;
}

.pricing-heading h2 {
  max-width: 820px;
  margin: 0;
  color: var(--landing-ink);
  font-size: clamp(34px, 8vw, 58px);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.pricing-heading > p {
  max-width: 640px;
  margin: 0;
  color: var(--landing-muted);
  font-size: 15px;
  line-height: 1.65;
}

.pricing-value-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  background: var(--landing-dark);
  border: 1px solid var(--landing-dark);
}

.pricing-value-strip div {
  min-height: 112px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 20px 16px;
  color: #ffffff;
  border-right: 1px solid rgba(255, 255, 255, 0.16);
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.pricing-value-strip div:nth-child(2n) {
  border-right: 0;
}

.pricing-value-strip div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.pricing-value-strip strong {
  font-size: 24px;
  line-height: 1;
  letter-spacing: -0.025em;
}

.pricing-value-strip span {
  max-width: 160px;
  color: #cbd6d1;
  font-size: 11px;
  line-height: 1.4;
}

.discount-visual {
  display: grid;
  gap: 24px;
  padding: 24px 20px;
  background: #ffffff;
  border: 1px solid var(--landing-line);
}

.discount-visual header {
  display: grid;
  gap: 7px;
}

.discount-visual h3,
.discount-visual p {
  margin: 0;
}

.discount-visual h3 {
  max-width: 620px;
  font-size: 18px;
  line-height: 1.25;
}

.discount-visual p {
  color: var(--landing-muted);
  font-size: 11px;
  line-height: 1.5;
}

.discount-ladder {
  display: grid;
  gap: 12px;
}

.discount-row {
  --discount-fill: 0%;
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) 34px;
  gap: 10px;
  align-items: center;
  color: var(--landing-muted);
  font: 700 9px/1 var(--font-mono);
  text-transform: uppercase;
}

.discount-row > div {
  height: 9px;
  overflow: hidden;
  background: #e8e9e4;
}

.discount-row i {
  width: var(--discount-fill);
  height: 100%;
  display: block;
  background: var(--landing-accent);
}

.discount-row strong {
  color: var(--landing-ink);
  text-align: right;
}

.guarantee-banner {
  display: grid;
  gap: 20px;
  align-items: center;
  padding: 22px 20px;
  background: #fff3c4;
  border: 1px solid #f5c451;
  border-left: 5px solid var(--path-foundation);
}

.guarantee-mark {
  width: 98px;
  height: 98px;
  display: grid;
  place-content: center;
  gap: 3px;
  color: #ffffff;
  background: var(--landing-dark);
  text-align: center;
}

.guarantee-mark strong {
  font-size: 27px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.guarantee-mark span {
  max-width: 76px;
  font: 800 8px/1.25 var(--font-mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.guarantee-banner > div:nth-child(2) {
  display: grid;
  gap: 8px;
}

.guarantee-banner h3,
.guarantee-banner p {
  margin: 0;
}

.guarantee-banner h3 {
  color: var(--landing-ink);
  font-size: 22px;
  line-height: 1.1;
}

.guarantee-banner > div:nth-child(2) > p:last-child {
  max-width: 660px;
  color: var(--landing-ink);
  font-size: 12px;
  line-height: 1.55;
}

.guarantee-link {
  width: fit-content;
  color: var(--landing-ink);
  border-bottom: 1px solid currentColor;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.4;
  text-decoration: none;
}

.guarantee-link:hover,
.guarantee-link:focus-visible {
  color: var(--landing-accent);
}

.price-card-grid {
  display: grid;
  gap: 12px;
}

.price-card {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-rows: auto auto 1fr auto auto;
  gap: 20px;
  padding: 24px 20px 20px;
  background: #ffffff;
  border: 1px solid var(--landing-line-strong);
}

.price-card-selected {
  outline: 3px solid var(--path-foundation);
  outline-offset: 2px;
}

.price-card-featured {
  border: 2px solid var(--landing-dark);
  box-shadow: 7px 7px 0 #e7e2d4;
}

.price-card-badge {
  position: absolute;
  top: 0;
  right: 0;
  padding: 8px 10px;
  color: #ffffff;
  background: var(--landing-dark);
  font: 800 9px/1 var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.price-card header {
  display: grid;
  gap: 6px;
}

.price-card-featured header {
  padding-right: 76px;
}

.price-card header span,
.price-two-month > div span {
  color: var(--landing-accent);
  font: 800 9px/1.35 var(--font-mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.price-card h3,
.price-two-month strong,
.pricing-inclusions h3 {
  margin: 0;
  color: var(--landing-ink);
}

.price-card h3 {
  font-size: 22px;
}

.price-main {
  display: grid;
  gap: 4px;
  padding: 18px 0;
  border-top: 1px solid var(--landing-line);
  border-bottom: 1px solid var(--landing-line);
}

.price-main strong {
  color: var(--landing-ink);
  font-size: clamp(38px, 11vw, 48px);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.price-main span {
  color: var(--landing-muted);
  font-size: 11px;
}

.price-card dl {
  margin: 0;
  display: grid;
  align-content: start;
}

.price-card dl div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--landing-line);
}

.price-card dt,
.price-card dd {
  margin: 0;
  font-size: 11px;
  line-height: 1.35;
}

.price-card dt {
  color: var(--landing-muted);
}

.price-card dd {
  color: var(--landing-ink);
  font-weight: 750;
  text-align: right;
}

.price-subunit {
  color: var(--landing-muted);
  font-weight: 600;
}

.price-saving {
  margin: 0;
  color: var(--path-algorithms);
  font-size: 12px;
  font-weight: 700;
}

.price-saving-standard {
  color: var(--landing-muted);
}

.price-card .landing-button {
  width: 100%;
}

.price-two-month {
  display: grid;
  gap: 16px;
  align-items: center;
  padding: 20px;
  background: #fff3c4;
  border-left: 4px solid var(--path-foundation);
}

.price-two-month > div {
  display: grid;
  gap: 5px;
}

.price-two-month > div strong {
  font-size: 21px;
}

.price-two-month p {
  margin: 0;
  color: var(--landing-muted);
  font-size: 12px;
  line-height: 1.5;
}

.price-two-month p strong {
  color: var(--landing-ink);
  font-size: inherit;
}

.pricing-inclusions {
  display: grid;
  gap: 22px;
  padding: 26px 20px;
  background: #fff3c4;
  border-top: 1px solid #f5c451;
  border-bottom: 1px solid #f5c451;
}

.pricing-inclusions > div {
  display: grid;
  gap: 10px;
}

.pricing-inclusions h3 {
  max-width: 430px;
  font-size: 23px;
  line-height: 1.1;
}

.pricing-inclusions ul {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
  list-style: none;
}

.pricing-inclusions li {
  position: relative;
  padding: 10px 0 10px 24px;
  color: var(--landing-ink);
  border-bottom: 1px solid rgba(20, 33, 61, 0.14);
  font-size: 12px;
  line-height: 1.45;
}

.pricing-inclusions li:last-child {
  border-bottom: 0;
}

.pricing-inclusions li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--path-algorithms);
  font-weight: 900;
}

.pricing-note {
  max-width: 850px;
  margin: -8px 0 0;
  color: var(--landing-muted);
  font-size: 10px;
  line-height: 1.55;
}

.equipment-note {
  display: grid;
  gap: 8px;
  padding: 20px;
  color: var(--landing-ink);
  background: #fffaf0;
  border: 1px solid #f5c451;
  border-left: 6px solid var(--landing-accent);
}

.equipment-note span {
  color: var(--landing-accent);
  font: 900 10px/1.2 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.equipment-note strong {
  color: var(--landing-ink);
  font-size: clamp(20px, 4vw, 28px);
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.equipment-note p {
  max-width: 780px;
  margin: 0;
  color: var(--landing-muted);
  font-size: 13px;
  line-height: 1.55;
}

.pricing-faq {
  display: grid;
  gap: 28px;
  padding: 30px 20px;
  background: #ffffff;
  border-top: 1px solid var(--landing-line-strong);
  border-bottom: 1px solid var(--landing-line-strong);
  scroll-margin-top: 90px;
}

.pricing-faq > header {
  display: grid;
  align-content: start;
  gap: 12px;
}

.pricing-faq h2,
.pricing-faq header > p:last-child {
  margin: 0;
}

.pricing-faq h2 {
  max-width: 470px;
  color: var(--landing-ink);
  font-size: clamp(28px, 7vw, 42px);
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.pricing-faq header > p:last-child {
  max-width: 420px;
  color: var(--landing-muted);
  font-size: 12px;
  line-height: 1.55;
}

.pricing-faq-list {
  border-top: 1px solid var(--landing-line-strong);
}

.pricing-faq details {
  border-bottom: 1px solid var(--landing-line);
}

.pricing-faq summary {
  position: relative;
  padding: 18px 40px 18px 0;
  color: var(--landing-ink);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.35;
  list-style: none;
  cursor: pointer;
}

.pricing-faq summary::-webkit-details-marker {
  display: none;
}

.pricing-faq summary::after {
  content: "+";
  position: absolute;
  top: 16px;
  right: 2px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: var(--landing-dark);
  font: 500 17px/1 var(--font-mono);
}

.pricing-faq details[open] summary::after {
  content: "×";
  background: var(--landing-accent);
}

.pricing-faq details p {
  max-width: 690px;
  margin: -3px 0 19px;
  padding-right: 32px;
  color: var(--landing-muted);
  font-size: 12px;
  line-height: 1.65;
}

.pricing-faq-more {
  width: fit-content;
  color: var(--landing-ink);
  font-size: 12px;
  font-weight: 800;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.pricing-faq-more:hover,
.pricing-faq-more:focus-visible {
  color: var(--landing-accent);
}

.enrollment-overlay {
  display: grid;
  width: min(1120px, 100%);
  margin: 0 auto;
}

.enrollment-overlay[hidden] {
  display: none;
}

.enrollment-dialog {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  padding: clamp(24px, 4vw, 38px);
  background: #ffffff;
  border: 1px solid var(--landing-line-strong);
  box-shadow: 16px 16px 0 rgba(249, 201, 90, 0.22);
}

.enrollment-close {
  position: absolute;
  top: 18px;
  right: 18px;
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--landing-line-strong);
  border-radius: 0;
  background: #ffffff;
  color: var(--landing-ink);
  font: 900 12px/1 var(--font-mono);
  text-transform: uppercase;
  cursor: pointer;
}

.enrollment-dialog h2 {
  max-width: 620px;
  margin: 8px 64px 10px 0;
  color: var(--landing-ink);
  font-size: clamp(30px, 6vw, 54px);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.enrollment-intro {
  max-width: 720px;
  margin: 0 0 22px;
  color: var(--landing-muted);
  font-size: 14px;
  line-height: 1.6;
}

.enrollment-personalized {
  margin: 0 0 22px;
  padding: 18px 20px;
  border: 1px solid rgba(244, 122, 31, 0.42);
  border-left: 5px solid #f47a1f;
  border-radius: 12px;
  background: #fff8f0;
  color: #25283d;
}

.enrollment-personalized[hidden] {
  display: none;
}

.enrollment-personalized strong,
.enrollment-personalized p {
  display: block;
  margin: 0;
}

.enrollment-personalized p {
  margin-top: 7px;
  line-height: 1.55;
}

.enrollment-personalized label {
  display: grid;
  gap: 6px;
  margin-top: 14px;
  font-weight: 700;
}

.enrollment-personalized select {
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid rgba(37, 40, 61, 0.3);
  border-radius: 8px;
  background: #fff;
  color: #25283d;
  font: inherit;
}

.enrollment-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.enrollment-progress {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.enrollment-progress.enrollment-progress-sibling {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.enrollment-progress li[hidden] {
  display: none;
}

.enrollment-progress li {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--landing-line);
  background: #ffffff;
  color: var(--landing-muted);
  font: 850 10px/1.2 var(--font-mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.enrollment-progress li span {
  width: 26px;
  height: 26px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  background: #eef1ff;
  color: var(--landing-accent);
}

.enrollment-progress li strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.enrollment-progress li[aria-current="step"] {
  border-color: var(--landing-accent);
  background: #eef1ff;
  color: var(--landing-ink);
}

.enrollment-progress li[aria-current="step"] span {
  background: var(--landing-accent);
  color: #ffffff;
}

.enrollment-step {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.enrollment-step[hidden] {
  display: none;
}

.enrollment-step > fieldset {
  grid-column: 1 / -1;
}

.enrollment-parent-auth-choice {
  grid-column: 1 / -1;
  display: grid;
  justify-items: stretch;
  gap: 20px;
  padding: 12px 0 24px;
}

.enrollment-google-account {
  width: 100%;
  min-height: 66px;
  margin: 8px 0 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #ffffff;
  background: #4285f4;
  border-color: #4285f4;
}

.enrollment-google-account > span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  background: #ffffff;
  color: #4285f4;
  font: 900 17px/1 system-ui, sans-serif;
}

.enrollment-parent-auth-choice > p {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 4px;
  color: var(--landing-muted);
  font: 850 11px/1 var(--font-mono);
  text-transform: uppercase;
}

.enrollment-parent-auth-choice > p::before,
.enrollment-parent-auth-choice > p::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--landing-line-strong);
}

.enrollment-parent-auth-choice > strong {
  color: var(--landing-ink);
  font-size: 16px;
}

.enrollment-child-choice {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(220px, 0.7fr);
  align-items: end;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--landing-line-strong);
  background: #fff;
}

.enrollment-child-choice[hidden] {
  display: none;
}

#enrollment-child-fields[hidden] {
  display: none;
}

.enrollment-child-choice label {
  display: grid;
  gap: 8px;
  color: var(--landing-ink);
  font-weight: 800;
}

.enrollment-child-choice select {
  width: 100%;
}

.enrollment-child-choice > p {
  align-self: center;
  margin: 0;
  color: var(--landing-muted);
  font: 900 12px/1 var(--font-mono);
  text-transform: uppercase;
}

.enrollment-child-choice .landing-button {
  min-height: 52px;
}

body.page-enrollment #auth-btn {
  display: none;
}

.enrollment-summary-card,
.enrollment-form fieldset,
.enrollment-consent {
  border: 1px solid var(--landing-line-strong);
  background: #f8f9ff;
}

.enrollment-summary-card {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  padding: 18px;
}

.enrollment-summary-card > span,
.enrollment-form legend {
  color: var(--landing-accent);
  font: 900 11px/1.2 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#enrollment-review-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

#enrollment-review-summary div {
  display: grid;
  gap: 4px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid var(--landing-line);
}

#enrollment-review-summary span {
  color: var(--landing-muted);
  font-size: 11px;
}

#enrollment-review-summary strong {
  color: var(--landing-ink);
  font-size: 13px;
  line-height: 1.35;
}

.enrollment-form fieldset {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 18px;
}

.enrollment-additional-programmes > p,
.enrollment-additional-programmes > small {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--landing-muted, #667085);
  line-height: 1.5;
}

.enrollment-additional-options {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.enrollment-form label {
  display: grid;
  gap: 7px;
  color: var(--landing-ink);
  font-size: 12px;
  font-weight: 800;
}

.enrollment-form label:first-of-type,
.enrollment-full-row,
.enrollment-consent {
  grid-column: 1 / -1;
}

.enrollment-form .enrollment-additional-options > label {
  display: flex;
  grid-column: auto;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 10px 14px;
  box-sizing: border-box;
  border: 1px solid var(--landing-line-strong);
  border-radius: 9px;
  background: #ffffff;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.enrollment-form .enrollment-additional-options > label:hover {
  border-color: var(--landing-accent);
  background: #f8f9ff;
}

.enrollment-form .enrollment-additional-options > label:has(input:checked) {
  border-color: var(--landing-accent);
  background: #eef1ff;
  box-shadow: inset 0 0 0 2px rgba(108, 140, 255, 0.18);
}

.enrollment-form .enrollment-additional-options > label:focus-within {
  outline: 3px solid rgba(108, 140, 255, 0.25);
  outline-offset: 2px;
}

.enrollment-form .enrollment-additional-options > label span {
  display: grid;
  gap: 3px;
  line-height: 1.3;
}

.enrollment-form .enrollment-additional-options > label strong {
  font-size: 13px;
  line-height: 1.25;
}

.enrollment-form .enrollment-additional-options > label small {
  color: var(--landing-muted, #667085);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
}

.enrollment-form .enrollment-additional-options > label input {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  min-height: 20px;
  margin: 0;
  padding: 0;
  accent-color: var(--landing-accent);
}

.enrollment-form input,
.enrollment-form select,
.enrollment-form textarea {
  width: 100%;
  min-height: 44px;
  padding: 11px 12px;
  border: 1px solid var(--landing-line-strong);
  border-radius: 0;
  background: #ffffff;
  color: var(--landing-ink);
  font: 700 14px/1.25 var(--font-mono);
  box-sizing: border-box;
}

.enrollment-period-field > select {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.enrollment-period-field {
  display: grid;
  gap: 7px;
  color: var(--landing-ink);
  font-size: 12px;
  font-weight: 800;
}

.enrollment-period-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.enrollment-period-option {
  display: grid;
  gap: 5px;
  min-height: 112px;
  padding: 15px;
  border: 1px solid var(--landing-line-strong);
  background: #ffffff;
  color: var(--landing-ink);
  text-align: left;
  cursor: pointer;
}

.enrollment-period-option:hover,
.enrollment-period-option:focus-visible {
  border-color: var(--landing-accent);
  outline: 3px solid rgba(108, 140, 255, 0.2);
  outline-offset: 2px;
}

.enrollment-period-option[aria-pressed="true"] {
  border-color: var(--landing-accent);
  background: #eef1ff;
  box-shadow: inset 0 0 0 2px rgba(108, 140, 255, 0.18);
}

.enrollment-period-option strong {
  font-size: 24px;
  line-height: 1;
}

.enrollment-period-option span,
.enrollment-period-option small {
  color: var(--landing-muted);
  font: 750 11px/1.35 var(--font-mono);
}

.enrollment-period-option .enrollment-period-payment-notice {
  margin-top: 5px;
  color: #9a5a00;
  font-weight: 900;
}

.enrollment-form textarea {
  min-height: 96px;
  resize: vertical;
}

.enrollment-password-panel {
  grid-column: 1 / -1;
}

.enrollment-password-help {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--landing-muted);
  font-size: 13px;
  line-height: 1.55;
}

.enrollment-form input:focus,
.enrollment-form select:focus,
.enrollment-form textarea:focus,
.enrollment-close:focus-visible {
  outline: 3px solid rgba(108, 140, 255, 0.25);
  outline-offset: 2px;
  border-color: var(--landing-accent);
}

.enrollment-consent {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  padding: 16px 18px;
  color: var(--landing-muted);
  font-size: 12px;
  line-height: 1.55;
}

.enrollment-consent input {
  width: 18px;
  min-height: 18px;
  margin: 1px 0 0;
}

.enrollment-status {
  grid-column: 1 / -1;
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--landing-line-strong);
  color: var(--landing-ink);
  background: #eef1ff;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.5;
}

.enrollment-status[data-status="success"] {
  border-color: rgba(24, 127, 95, 0.32);
  background: #edfff8;
  color: #116d54;
}

.enrollment-status[data-status="error"] {
  border-color: rgba(181, 73, 112, 0.36);
  background: #fff0f5;
  color: #9f315d;
}

.enrollment-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.enrollment-actions .landing-button {
  min-width: min(190px, 100%);
}

.enrollment-submit {
  width: auto;
}

.enrollment-actions [hidden] {
  display: none !important;
}

.learning-roadmap {
  display: grid;
  gap: 40px;
  scroll-margin-top: 90px;
}

.roadmap-graph {
  position: relative;
  display: grid;
  gap: 14px;
  padding-left: 18px;
}

.roadmap-age-grid {
  display: grid;
  gap: 12px;
}

.roadmap-graph::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 3px;
  width: 2px;
  background: var(--landing-line-strong);
}

.roadmap-stage,
.roadmap-branch,
.ai-throughline {
  position: relative;
}

.roadmap-stage::before,
.roadmap-split::before,
.ai-throughline::before {
  content: "";
  position: absolute;
  top: 30px;
  left: -21px;
  width: 9px;
  height: 9px;
  background: var(--landing-bg);
  border: 3px solid var(--landing-dark);
  border-radius: 50%;
}

.roadmap-stage {
  display: grid;
  gap: 12px;
  padding: 23px 20px;
  background: #ffffff;
  border: 1px solid var(--landing-line);
}

.roadmap-age-grid .roadmap-stage {
  border-left: 6px solid var(--landing-accent);
}

.roadmap-age-grid .roadmap-stage:nth-child(2) {
  border-left-color: #f5c451;
}

.roadmap-age-grid .roadmap-stage:nth-child(3),
.roadmap-age-grid .roadmap-stage:nth-child(4) {
  border-left-color: var(--path-games);
}

.roadmap-age {
  color: var(--landing-accent);
  font: 800 10px/1.3 var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.roadmap-stage h3,
.roadmap-branch h3,
.ai-throughline h3 {
  margin: 0 0 8px;
  font-size: clamp(22px, 5vw, 30px);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.roadmap-stage p,
.roadmap-branch p,
.ai-throughline p {
  margin: 0;
  font-size: 13px;
  line-height: 1.58;
}

.roadmap-stage p {
  color: var(--landing-muted);
}

.roadmap-stage small {
  display: block;
  color: var(--landing-accent);
}

.roadmap-split {
  position: relative;
  display: grid;
  gap: 10px;
}

.roadmap-addons {
  display: grid;
  gap: 14px;
  margin-top: 12px;
  padding: 18px;
  background: #fffaf0;
  border: 1px solid #f5c451;
}

.roadmap-addons > header {
  display: grid;
  gap: 6px;
}

.roadmap-addons h3 {
  margin: 0;
  color: var(--landing-ink);
  font-size: clamp(22px, 4vw, 30px);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.roadmap-addons > header p {
  max-width: 760px;
  margin: 0;
  color: var(--landing-muted);
  font-size: 13px;
  line-height: 1.58;
}

.roadmap-branch {
  min-height: 210px;
  padding: 24px 20px;
  color: #ffffff;
}

.roadmap-branch > span {
  display: block;
  margin-bottom: 28px;
  font: 800 10px/1 var(--font-mono);
}

.roadmap-branch h3 {
  color: #ffffff;
}

.roadmap-branch p {
  color: rgba(255, 255, 255, 0.82);
}

.roadmap-branch small {
  display: block;
  color: rgba(255, 255, 255, 0.74);
}

.roadmap-algorithms {
  background: var(--path-algorithms);
}

.roadmap-games {
  background: var(--path-games);
}

.roadmap-math {
  color: var(--landing-ink);
  background: #ffffff;
  border: 2px solid var(--landing-ink);
}

.roadmap-math h3 {
  color: var(--landing-ink);
}

.roadmap-math p {
  color: var(--landing-muted);
}

.roadmap-math small {
  color: var(--path-algorithms);
}

.roadmap-modeling {
  color: var(--landing-ink);
  background: #fff3c4;
  border: 1px solid #f5c451;
}

.roadmap-modeling h3 {
  color: var(--landing-ink);
}

.roadmap-modeling p {
  color: var(--landing-muted);
}

.roadmap-modeling small {
  color: #9a5b00;
}

.roadmap-algorithms-depth {
  color: var(--landing-ink);
  background: #e7f2ee;
  border: 1px solid #a9c9bf;
  border-left: 5px solid var(--path-algorithms);
}

.roadmap-games-depth {
  color: var(--landing-ink);
  background: #fcebe5;
  border: 1px solid #e5b2a4;
  border-left: 5px solid var(--path-games);
}

.roadmap-algorithms-depth h3,
.roadmap-games-depth h3 {
  color: var(--landing-ink);
}

.roadmap-algorithms-depth p,
.roadmap-games-depth p {
  color: var(--landing-muted);
}

.roadmap-algorithms-depth small {
  color: var(--path-algorithms);
}

.roadmap-games-depth small {
  color: var(--path-games);
}

.roadmap-final {
  background: #fff3c4;
  border-color: #f5c451;
}

.ai-throughline {
  padding: 25px 20px;
  color: #ffffff;
  background: var(--landing-dark);
}

.ai-throughline > span {
  display: block;
  margin-bottom: 14px;
  color: var(--landing-pop);
  font: 800 10px/1.3 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ai-throughline h3 {
  color: #ffffff;
}

.ai-throughline p {
  color: #cbd4d0;
}

.back-academy-button {
  width: fit-content;
  justify-self: center;
  font-size: 12px;
}

#auth-close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--theme-text, #20233a);
  background: var(--theme-picker-hover-bg, #eef1ff);
  border: 1px solid var(--theme-picker-border, #c8d0f5);
  border-radius: 4px;
  font: 500 20px/1 system-ui, sans-serif;
  cursor: pointer;
}

.payments-enrollment-options { margin-bottom: 24px; }
.payments-enrollment-options > p { color: var(--theme-muted); }
.payments-enrollment-form { display: grid; gap: 18px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--theme-border); }
.family-plan-form{display:grid;gap:22px;padding:28px 0}.family-plan-form h2{margin:0;font-size:30px}.family-plan-group{color:var(--theme-text-muted,#53617d)}.family-plan-grid{border:0;padding:0;margin:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.family-plan-grid legend{font-size:20px;font-weight:700;margin-bottom:16px}.family-plan-option{position:relative;display:flex;flex-direction:column;gap:22px;min-width:0;padding:22px;border:2px solid #e0e5ef;border-radius:18px;background:#fff;color:#172344;cursor:pointer}.family-plan-option:has(input:checked){border-color:#172344;background:#fff8d6}.family-plan-option:focus-within{outline:3px solid #536ade;outline-offset:3px}.family-plan-option input{accent-color:#172344;width:20px;height:20px;margin:0}.family-plan-option strong{font-size:17px}.family-plan-price{font-size:30px;font-weight:800}.family-plan-form>.landing-button{justify-self:start;min-height:52px;border-radius:14px;background:#172344;color:#fff;box-shadow:none}.family-plan-form>[role=status][hidden]{display:none}@media(max-width:760px){.family-plan-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.family-plan-option{padding:18px;gap:14px}}@media(max-width:360px){.family-plan-option{padding:12px}.family-plan-price{font-size:25px}}
.payments-enrollment-form h3, .payments-enrollment-form p { margin: 0; }
.payments-enrollment-form label { display: grid; gap: 8px; font-weight: 600; }
.payments-enrollment-form select { width: 100%; min-width: 0; min-height: 48px; padding: 10px 12px; font: inherit; font-size: 16px; color: var(--theme-text); background: var(--theme-panel); border: 1px solid var(--theme-border); border-radius: 8px; }

body.portal-login-required #auth-close-btn {
  display: none;
}

#auth-modal {
  position: relative;
}

@media (min-width: 560px) {
  body.screen-home #home-screen {
    padding-inline: 26px;
  }

  .hero-actions,
  .closing-actions {
    flex-direction: row;
    align-items: center;
  }

  .hero-actions .landing-button {
    min-width: 176px;
  }

  .student-paths {
    padding: 42px 34px;
  }

  .path-choice-grid,
  .roadmap-age-grid,
  .roadmap-split,
  .interest-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .path-choice-grid-game-dev .path-choice-main,
  .partner-proof-strip {
    grid-column: 1 / -1;
  }

  .partner-proof-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .closing-cta {
    padding: 44px;
  }

  .plan-finder {
    padding: 32px;
  }

  .plan-result {
    padding: 38px 34px;
  }

  .discount-visual,
  .equipment-note,
  .pricing-inclusions,
  .pricing-faq {
    padding: 30px;
  }

  .faq-category-nav {
    padding: 28px;
  }

  .faq-category-nav > div {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .faq-contact {
    padding: 42px 36px;
  }

  .faq-contact-actions {
    flex-direction: row;
    align-items: center;
  }
}

@media (max-width: 759px) {
  .enrollment-overlay {
    width: 100%;
  }

  .enrollment-dialog {
    padding: 22px 18px 18px;
    box-shadow: 8px 8px 0 rgba(249, 201, 90, 0.18);
  }

  .enrollment-close {
    position: static;
    display: block;
    width: fit-content;
    margin: 0 0 18px auto;
  }

  .enrollment-dialog h2 {
    margin-right: 0;
  }

  .enrollment-form,
  .enrollment-progress,
  .enrollment-step,
  .enrollment-child-choice,
  .enrollment-additional-options,
  .enrollment-period-options,
  .enrollment-form fieldset,
  #enrollment-review-summary {
    grid-template-columns: 1fr;
  }

  .enrollment-actions {
    flex-direction: column-reverse;
  }

  .enrollment-actions .landing-button,
  .enrollment-submit {
    width: 100%;
  }

  .enrollment-form fieldset {
    padding: 16px;
  }

  body.screen-home #site-topbar {
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 8px;
    padding-inline: max(12px, env(safe-area-inset-left)) max(12px, env(safe-area-inset-right));
  }

  body.screen-home #site-brand {
    min-width: 0;
  }

  body.screen-home #site-brand-label,
  body.screen-home #site-account > #locale-switcher {
    display: none;
  }

  body.screen-home #auth-btn {
    min-width: 76px;
    height: 44px;
    padding-inline: 14px;
    font-size: 12px;
  }

  body.screen-home #mobile-nav-toggle {
    grid-column: 3;
    grid-row: 1;
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--landing-accent);
    background: var(--landing-accent-soft);
    border: 0;
    border-radius: var(--landing-radius-pill);
  }

  body.screen-home #site-nav {
    position: fixed;
    top: calc(var(--topbar-h) + max(8px, env(safe-area-inset-top)));
    left: max(12px, env(safe-area-inset-left));
    right: max(12px, env(safe-area-inset-right));
    z-index: 38;
    display: none;
    max-height: calc(100dvh - var(--topbar-h) - 24px);
    overflow: auto;
    padding: 10px;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    color: var(--landing-ink);
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid var(--landing-line-strong);
    border-radius: 12px;
    box-shadow: 0 18px 48px rgba(20, 32, 51, 0.18);
  }

  body.screen-home #site-nav.mobile-nav-open {
    display: flex;
  }

  body.screen-home #site-nav .top-action {
    min-height: 44px;
    justify-content: flex-start;
    padding-inline: 12px;
    color: var(--landing-ink);
    background: transparent;
    border-color: transparent;
    text-align: left;
  }

  body.screen-home #site-nav .top-action:hover {
    color: var(--landing-ink);
    background: var(--landing-accent-soft);
  }

  body.screen-home #site-nav .top-action.top-action-primary {
    color: var(--landing-dark);
    background: var(--landing-pop);
  }

  .mobile-nav-utilities {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 6px 12px;
    color: var(--landing-muted);
    border-bottom: 1px solid var(--landing-line);
    font: 700 11px/1 var(--font-mono);
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  body.screen-home #home-screen {
    padding-top: 86px;
  }

  .landing-hero {
    min-height: auto;
    padding-top: 10px;
  }

  .news-hero,
  .news-list {
    grid-template-columns: 1fr;
  }

  .news-hero {
    gap: 22px;
  }

  .news-card {
    min-height: auto;
    padding: 22px;
  }
}

@media (min-width: 760px) {
  .enrollment-form fieldset.enrollment-additional-programmes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.screen-home #site-topbar {
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding-inline: 24px;
  }

  body.screen-home #site-nav {
    display: inline-flex;
    grid-column: 2;
    justify-self: center;
    gap: 4px;
  }

  /* Override the narrow-layout placement above (grid-column: 2, meant to sit
     next to the brand when the nav is hidden) now that the nav itself claims
     the centered column at this width — otherwise the two collide and the
     nav gets pushed into the account's column instead of staying centered. */
  body.screen-home #site-account {
    grid-column: 3;
  }

  body.screen-home #site-nav .top-action {
    height: 36px;
    padding: 0 14px;
    color: var(--landing-muted);
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--landing-radius-pill);
    font-size: 12px;
    font-weight: 800;
  }

  body.screen-home #site-nav .top-action:hover {
    color: var(--landing-ink);
    background: var(--landing-accent-soft);
    border-color: transparent;
  }

  body.screen-home #site-nav .top-action.top-action-primary {
    color: var(--landing-dark);
    background: var(--landing-pop);
    border-color: var(--landing-pop);
  }

  body.screen-home #site-nav .top-action.top-action-primary:hover {
    color: #ffffff;
    background: var(--landing-dark);
    border-color: var(--landing-dark);
  }

  body.screen-home #home-screen {
    padding-top: 104px;
  }

  .audience-home {
    gap: 112px;
  }

  .student-dashboard-header {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .student-dashboard-actions {
    flex-direction: row;
  }

  .student-dashboard-projects-head {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .student-dashboard-projects-head p {
    text-align: right;
  }

  .motto-ledger {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }

  .motto-ledger article {
    padding: 36px 32px;
  }

  .method-section,
  .parent-curriculum,
  .teacher-tools {
    grid-template-columns: minmax(0, 0.95fr) minmax(350px, 1.05fr);
    gap: 60px;
    padding: 48px;
  }

  .evidence-columns,
  .workflow-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .evidence-columns article,
  .workflow-list li {
    padding: 28px 24px;
    border-right: 1px solid var(--landing-line);
  }

  .evidence-columns article:last-child,
  .workflow-list li:last-child {
    border-right: 0;
  }

  .outcome-list,
  .tool-register {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .outcome-list article:nth-child(odd),
  .tool-register article:nth-child(odd) {
    padding-right: 26px;
    border-right: 1px solid var(--landing-line);
  }

  .outcome-list article:nth-child(even),
  .tool-register article:nth-child(even) {
    padding-left: 26px;
  }

  .closing-cta {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 50px;
  }

  .path-section-footer,
  .plan-result-actions {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .pricing-value-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .pricing-value-strip div,
  .pricing-value-strip div:nth-child(2n),
  .pricing-value-strip div:nth-last-child(-n + 2) {
    border-right: 1px solid rgba(255, 255, 255, 0.16);
    border-bottom: 0;
  }

  .pricing-value-strip div:last-child {
    border-right: 0;
  }

  .price-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .price-two-month {
    grid-template-columns: minmax(180px, 0.65fr) minmax(240px, 1fr) auto;
  }

  .pricing-inclusions {
    grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
    gap: 46px;
    align-items: start;
  }

  .guarantee-banner {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 26px;
    padding: 24px 26px;
  }

  .pricing-faq {
    grid-template-columns: minmax(240px, 0.75fr) minmax(0, 1.25fr);
    gap: 56px;
  }

  .roadmap-stage {
    grid-template-columns: 140px minmax(0, 1fr);
    gap: 24px;
    padding: 28px;
  }

  .roadmap-branch,
  .ai-throughline {
    padding: 30px 28px;
  }

  body.page-legal .audience-home[data-landing-page="legal"] {
    gap: 54px;
  }

  .legal-hero {
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
    gap: 54px;
    align-items: end;
    padding-top: 40px;
  }

  .legal-summary {
    grid-template-columns: minmax(230px, 0.7fr) minmax(0, 1.3fr);
    gap: 42px;
    padding: 36px;
  }

  .legal-identity {
    padding: 34px;
  }

  .legal-identity dl {
    grid-template-columns: minmax(180px, 0.75fr) 110px minmax(0, 1.25fr);
  }

  .legal-identity dl div {
    align-content: start;
    padding: 16px 20px;
    border-top: 1px solid #d4d0c4;
    border-right: 1px solid #d4d0c4;
  }

  .legal-identity dl div:first-child {
    padding-left: 0;
  }

  .legal-identity dl div:last-child {
    padding-right: 0;
    border-right: 0;
  }

  .legal-section {
    grid-template-columns: minmax(230px, 0.7fr) minmax(0, 1.3fr);
    column-gap: 54px;
    padding: 38px 0;
  }

  .legal-section h2 {
    grid-row: 1 / span 20;
  }

  .legal-help {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    padding: 28px 30px;
  }

  body.page-faq .audience-home[data-landing-page="faq"] {
    gap: 58px;
  }

  .faq-hero {
    grid-template-columns: minmax(0, 1.18fr) minmax(280px, 0.82fr);
    gap: 54px;
    padding-top: 40px;
  }

  .faq-category {
    grid-template-columns: minmax(220px, 0.65fr) minmax(0, 1.35fr);
    gap: 50px;
  }

  .faq-category > header {
    align-content: start;
  }

  .faq-contact {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 50px;
  }

  .legal-help > span {
    grid-column: 1;
  }

  .legal-help nav {
    grid-column: 2;
    grid-row: 1 / span 2;
    margin-top: 0;
  }
}

@media (min-width: 980px) {
  .landing-hero {
    grid-template-columns: minmax(0, 1.12fr) minmax(390px, 0.88fr);
    gap: clamp(56px, 7vw, 94px);
  }

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

  .path-choice-grid-game-dev {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .path-choice-grid-game-dev .path-choice {
    grid-column: span 2;
  }

  .path-choice-grid-game-dev .path-choice-main {
    grid-column: span 4;
  }

  .roadmap-addons .roadmap-split {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .plan-hero {
    grid-template-columns: minmax(0, 0.78fr) minmax(470px, 1.22fr);
    gap: clamp(58px, 7vw, 96px);
  }

  .plan-hero-copy {
    position: sticky;
    top: 104px;
  }

  .pricing-heading {
    grid-template-columns: minmax(0, 1.25fr) minmax(310px, 0.75fr);
    gap: 60px;
    align-items: end;
  }

  .discount-visual {
    grid-template-columns: minmax(280px, 0.75fr) minmax(0, 1.25fr);
    gap: 54px;
    align-items: center;
  }

  .price-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .landing-hero h1 {
    font-size: clamp(58px, 6.1vw, 76px);
  }

  .project-proof,
  .parent-overview,
  .teacher-workspace {
    align-self: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .landing-button {
    transition: none;
  }
}

body.parent-home-authenticated.portal-parent.screen-home .audience-home[data-landing-page="parent"] {
  gap: 28px;
}

.top-action[hidden] {
  display: none;
}

body.parent-home-authenticated.portal-parent.screen-home .audience-home[data-landing-page="parent"] > :not(#parent-dashboard) {
  display: none;
}

.parent-dashboard[hidden],
#parent-source-overlay[aria-hidden="true"],
#parent-preview-overlay[aria-hidden="true"] {
  display: none;
}

.parent-dashboard {
  display: grid;
  gap: 24px;
  padding: 34px 0 56px;
  border-top: 4px solid var(--landing-accent);
}

.parent-family-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.parent-family-actions article {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px 18px;
  padding: 20px;
  background: var(--landing-paper);
  border: 1px solid var(--landing-line-strong);
}

.parent-family-actions article > :not(button) {
  grid-column: 1;
}

.parent-family-actions article > button {
  grid-column: 2;
  grid-row: 1 / span 3;
}

.parent-family-actions h2,
.parent-referral-panel h2 {
  color: var(--landing-ink);
  font-size: 22px;
  line-height: 1.1;
}

.parent-family-actions p,
.parent-referral-panel p {
  color: var(--landing-muted);
  font-size: 13px;
  line-height: 1.5;
}

.parent-family-action-badge {
  width: fit-content;
  padding: 5px 8px;
  color: #6d4a00;
  background: #fff0b5;
  border-radius: 999px;
  font: 800 9px/1.2 var(--font-mono);
  text-transform: uppercase;
}

.parent-referral-panel {
  display: grid;
  gap: 18px;
  padding: 22px;
  background: color-mix(in srgb, var(--landing-accent-soft) 36%, var(--landing-paper));
  border: 1px solid var(--landing-accent);
}

.parent-referral-panel[hidden] {
  display: none;
}

.parent-referral-panel > header,
.parent-referral-submit-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
}

.parent-referral-panel > header > div {
  display: grid;
  gap: 7px;
}

.parent-referral-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.parent-referral-fields label {
  display: grid;
  gap: 6px;
  color: var(--landing-ink);
  font-size: 12px;
  font-weight: 800;
}

.parent-referral-fields input {
  min-width: 0;
  min-height: 48px;
  padding: 10px 12px;
  color: var(--landing-ink);
  background: var(--landing-paper);
  border: 1px solid var(--landing-line-strong);
  border-radius: 0;
  font: inherit;
}

.parent-referral-submit-row {
  align-items: center;
}

#parent-referral-status {
  min-height: 20px;
  color: var(--landing-accent);
  font-weight: 800;
}

.parent-dashboard h1,
.parent-dashboard h2,
.parent-dashboard h3,
.parent-dashboard p {
  margin: 0;
  letter-spacing: 0;
}

.parent-dashboard-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 28px;
  min-width: 0;
}

.parent-dashboard-layout.parent-dashboard-single-child {
  grid-template-columns: minmax(0, 1fr);
}

.parent-dashboard-layout.parent-dashboard-single-child .parent-child-switcher {
  display: none;
}

.parent-child-switcher {
  min-width: 0;
  padding-right: 20px;
  border-right: 1px solid var(--landing-line-strong);
}

.parent-child-switcher-head {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--landing-muted);
  font: 800 10px/1.3 var(--font-mono);
  text-transform: uppercase;
}

.parent-child-switcher-head strong {
  min-width: 26px;
  height: 26px;
  display: inline-grid;
  place-items: center;
  color: var(--landing-accent);
  background: var(--landing-accent-soft);
  border-radius: 4px;
}

#parent-child-list {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.parent-child-option {
  width: 100%;
  min-height: 58px;
  display: grid;
  gap: 5px;
  padding: 10px 12px;
  color: var(--landing-ink);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 5px;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.parent-child-option strong,
.parent-child-option span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.parent-child-option strong {
  font-size: 13px;
}

.parent-child-option span {
  color: var(--landing-muted);
  font: 700 9px/1.4 var(--font-mono);
}

.parent-child-option:hover,
.parent-child-option:focus-visible,
.parent-child-option-active {
  background: var(--landing-accent-soft);
  border-color: color-mix(in srgb, var(--landing-accent) 38%, var(--landing-line));
}

.parent-child-work {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 16px;
}

.parent-child-heading {
  min-height: 62px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  align-items: center;
  gap: 12px;
}

.parent-child-heading .parent-child-groups { grid-column: 1 / -1; justify-content: flex-start; }
.parent-refresh {
  grid-column: 2; grid-row: 1; width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #46546c; background: transparent; border: 1px solid transparent;
  border-radius: 10px; cursor: pointer;
}
.parent-refresh:hover { color: #14213d; background: #edf1f8; }
.parent-refresh:disabled { opacity: .5; cursor: wait; }

.parent-child-heading > div:first-child {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.parent-child-heading h1 {
  margin: 0;
  color: var(--landing-ink);
  font-size: 26px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.parent-child-groups {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.parent-programme-option {
  padding: 6px 8px;
  color: var(--landing-accent);
  background: var(--landing-accent-soft);
  border: 1px solid color-mix(in srgb, var(--landing-accent) 30%, var(--landing-line));
  border-radius: 4px;
  font: 800 9px/1.2 var(--font-mono);
  text-align: left;
  cursor: pointer;
}

.parent-programme-option:hover,
.parent-programme-option:focus-visible,
.parent-programme-option[aria-selected="true"] {
  color: var(--landing-paper);
  background: var(--landing-accent);
  border-color: var(--landing-accent);
}

.parent-dashboard-status {
  min-height: 18px;
  color: var(--landing-muted);
  font: 700 10px/1.5 var(--font-mono);
}

.parent-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.parent-info-panel {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 14px;
  background: var(--landing-paper);
  border: 1px solid var(--landing-line);
  border-radius: 6px;
}

.parent-info-panel > h3,
.parent-info-panel > h4 {
  margin: 0;
  color: var(--landing-ink);
}

.parent-info-panel > h3 {
  font: 800 15px/1.25 var(--font-sans);
}

.parent-info-subtitle {
  padding-top: 6px;
  border-top: 1px solid var(--landing-line);
  font: 800 10px/1.3 var(--font-mono);
  text-transform: uppercase;
}

.parent-info-item {
  display: grid;
  gap: 4px;
  padding: 9px 0;
  border-top: 1px solid var(--landing-line);
}

.parent-info-item p,
.parent-info-item small {
  margin: 0;
  color: var(--landing-muted);
}

.parent-payment-button {
  justify-self: start;
  margin-top: 4px;
}

@media (max-width: 760px) {
  .parent-info-grid {
    grid-template-columns: 1fr;
  }
}

.parent-project-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  min-width: 0;
}

.parent-projects-title {
  margin: 4px 0 0;
  color: var(--landing-ink);
  font: 800 15px/1.25 var(--font-sans);
}

.parent-projects-title[hidden] {
  display: none;
}

/* Compact "ready game" card — title, file date, language pill, and the
   actions. Opening code or the game always leads with the teacher's write-ups. */
.parent-project-card {
  min-width: 0;
  display: grid;
  gap: 12px;
  padding: 15px 18px;
  background: #ffffff;
  border: 1px solid var(--landing-line);
  border-radius: 8px;
}

.parent-project-card > header {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.parent-project-card-meta {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.parent-project-card-meta h3 {
  min-width: 0;
  overflow: hidden;
  color: var(--landing-accent);
  font-size: 15px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.parent-project-card-meta small {
  color: var(--landing-muted);
  font: 700 11px/1.4 var(--font-mono);
}

.parent-project-card-pill {
  flex: none;
  padding: 4px 10px;
  color: var(--landing-muted);
  background: var(--landing-accent-soft);
  border-radius: 6px;
  font: 800 10px/1.2 var(--font-mono);
  letter-spacing: 0.04em;
}

.parent-project-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.parent-project-card-action {
  height: 34px;
  padding: 0 15px;
  color: var(--landing-ink);
  background: #ffffff;
  border: 1px solid var(--landing-line-strong);
  border-radius: 5px;
  font: 800 11px/1 var(--font-mono);
  cursor: pointer;
}

.parent-project-card-action:hover,
.parent-project-card-action:focus-visible {
  color: #ffffff;
  background: var(--landing-accent);
  border-color: var(--landing-accent);
  outline: none;
}

.parent-project-card-action-play {
  color: #0f3d24;
  background: #22c55e;
  border-color: #22c55e;
}

.parent-project-card-action-play:hover,
.parent-project-card-action-play:focus-visible {
  color: #0f3d24;
  background: #22c55e;
  border-color: #22c55e;
  filter: brightness(1.06);
}

#parent-source-close {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  color: var(--landing-ink);
  background: transparent;
  border: 1px solid var(--landing-line);
  border-radius: 5px;
  font: 800 14px/1 var(--font-mono);
  cursor: pointer;
}

#parent-source-close:hover,
#parent-source-close:focus-visible {
  color: var(--landing-accent);
  border-color: var(--landing-accent);
}

.parent-project-card > footer time {
  white-space: nowrap;
}

.parent-dashboard-message {
  min-height: 82px;
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  padding: 18px;
  color: var(--landing-muted);
  background: var(--landing-paper);
  border: 1px dashed var(--landing-line-strong);
  border-radius: 5px;
  font: 700 11px/1.5 var(--font-mono);
  text-align: center;
}

#parent-preview-overlay {
  position: fixed;
  inset: 0;
  z-index: 81;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(14, 18, 35, 0.74);
}

/* Framed in the same dark-blue palette as the rest of the classroom UI —
   a visible blue border around the whole modal, and a dark taskbar-style
   header (instead of a plain white bar) carrying the project name and the
   one and only way to close this: the × button on the right.
   Width is capped by BOTH the viewport's width and its height (the third
   min() term backs out the width that keeps a 4:3 stage plus the 53px
   header within the available height) — using vw/vh rather than a plain
   800px cap means the dialog always fits the visible viewport at whatever
   browser zoom level the teacher is already using, instead of forcing
   them to zoom the page in or out just to see the whole modal. */
#parent-preview-dialog {
  width: min(800px, calc(100vw - 48px), calc((100vh - 48px - 53px) * 4 / 3));
  max-height: calc(100vh - 48px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  color: var(--landing-ink);
  background: var(--landing-paper);
  border: 3px solid #6c8cff;
  border-radius: 10px;
  box-shadow: 0 24px 70px rgba(16, 20, 39, 0.45);
}

#parent-preview-dialog > header {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 12px 10px 18px;
  color: #eef2ff;
  background: #171b31;
  border-bottom: 1px solid #323a68;
}

#parent-preview-dialog > header > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

#parent-preview-dialog > header span {
  color: #9aa4d6;
  font: 800 9px/1.2 var(--font-mono);
  text-transform: uppercase;
}

#parent-preview-title {
  margin: 0;
  overflow: hidden;
  color: #eef2ff;
  font-size: 16px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#parent-preview-close {
  width: 32px;
  height: 32px;
  flex: none;
  color: #9aa4d6;
  background: transparent;
  border: 1px solid #323a68;
  border-radius: 6px;
  font: 800 16px/1 var(--font-mono);
  cursor: pointer;
}

#parent-preview-close:hover,
#parent-preview-close:focus-visible {
  color: #ffffff;
  background: #e5484d;
  border-color: #e5484d;
}

#parent-preview-stage {
  min-height: 0;
  aspect-ratio: 800 / 600;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #050807;
}

#parent-preview-frame {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  background: #050807;
}

#parent-source-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(14, 18, 35, 0.68);
}

#parent-source-dialog {
  width: min(800px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  color: var(--landing-ink);
  background: var(--landing-paper);
  border: 1px solid var(--landing-line-strong);
  border-radius: 7px;
  box-shadow: 0 24px 70px rgba(16, 20, 39, 0.34);
}

#parent-source-dialog > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--landing-line-strong);
}

#parent-source-dialog > header > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

#parent-source-language {
  color: var(--landing-accent);
  font: 800 9px/1.2 var(--font-mono);
  text-transform: uppercase;
}

#parent-source-title {
  margin: 0;
  overflow: hidden;
  font-size: 19px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#parent-source-dialog pre {
  min-height: 0;
  margin: 0;
  overflow: auto;
  padding: 20px;
  color: #e8edff;
  background: #0d1224;
  font: 500 13px/1.65 var(--font-mono);
  tab-size: 2;
}

/* Click-through the parent sees before a shared project opens. */
.parent-share-intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(14, 18, 35, 0.68);
}

.parent-share-intro-card {
  position: relative;
  width: min(460px, 100%);
  box-sizing: border-box;
  padding: 26px 24px 22px;
  color: var(--landing-ink);
  background: var(--landing-paper);
  border: 1px solid var(--landing-line-strong);
  border-radius: 14px;
  box-shadow: 0 26px 70px rgba(16, 20, 39, 0.34);
}

.parent-share-intro-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--landing-muted);
  background: transparent;
  border: 0;
  border-radius: 8px;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.parent-share-intro-close:hover,
.parent-share-intro-close:focus-visible {
  color: var(--landing-ink);
  background: var(--landing-accent-soft);
  outline: none;
}

.parent-share-intro-kicker {
  display: block;
  margin-bottom: 8px;
  color: var(--landing-accent);
  font: 800 10px/1.2 var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.parent-share-intro-title {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.25;
}

.parent-share-intro-body {
  margin: 0 0 20px;
  color: var(--landing-ink);
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.parent-share-intro-next {
  min-height: 40px;
  padding: 0 18px;
  color: #ffffff;
  background: var(--landing-accent);
  border: 1px solid var(--landing-accent);
  border-radius: var(--landing-radius-pill, 999px);
  font: 800 12px/1 var(--font-mono);
  cursor: pointer;
}

.parent-share-intro-next:hover,
.parent-share-intro-next:focus-visible {
  filter: brightness(1.08);
  outline: none;
}

@media (max-width: 820px) {
  .parent-family-actions {
    grid-template-columns: 1fr;
  }

  .parent-dashboard-layout {
    grid-template-columns: 1fr;
  }

  .parent-child-switcher {
    padding-right: 0;
    padding-bottom: 16px;
    border-right: 0;
    border-bottom: 1px solid var(--landing-line-strong);
  }

  #parent-child-list {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
}

@media (max-width: 620px) {
  .parent-dashboard {
    padding-top: 22px;
  }

  .parent-family-actions article {
    grid-template-columns: 1fr;
  }

  .parent-family-actions article > button {
    width: 100%;
    grid-column: 1;
    grid-row: auto;
  }

  .parent-referral-fields {
    grid-template-columns: 1fr;
  }

  .parent-referral-panel > header,
  .parent-referral-submit-row {
    align-items: stretch;
    flex-direction: column;
  }

  .parent-referral-submit-row .landing-button {
    width: 100%;
  }

  .parent-child-groups {
    justify-content: flex-start;
  }

  .parent-project-card > header {
    flex-direction: column;
    align-items: flex-start;
  }

  #parent-source-overlay {
    padding: 10px;
  }

  #parent-preview-overlay {
    padding: 10px;
  }

  #parent-preview-dialog {
    width: min(800px, calc(100vw - 20px), calc((100vh - 20px - 53px) * 4 / 3));
    max-height: calc(100vh - 20px);
  }

  #parent-source-dialog {
    max-height: calc(100vh - 20px);
  }
}

/* Stay hidden before policy loading and when payment rollout is disabled. */
body:not(.payments-enabled) #top-payments-btn,
body:not(.payments-enabled) #parent-payment-list,
body:not(.payments-enabled) #payments-page,
body:not(.payments-enabled) [data-admin-view="billing"],
body:not(.payments-enabled) [data-admin-link="billing"],
body:not(.payments-enabled) [data-admin-page="billing"] {
  display: none !important;
}

.admin-refund-detail { margin: 0.25rem 0 0.75rem; font-size: 0.875rem; line-height: 1.5; overflow-wrap: anywhere; }

body.payments-sandbox #admin-dialog-body::before, body.payments-sandbox #parent-dashboard::before, body.payments-sandbox #payments-page::before {
 content: "SANDBOX Тестови плащания без реални пари"; display: block; padding: 12px 16px; background: #fff2bd; color: #372b00; border: 1px solid #9c7813; font: 600 14px/1.5 system-ui; margin-bottom: 16px;
}

/* Official weekend cohort timetable. */
.academy-weekend-schedule {
  margin: 2rem 0;
  padding: clamp(1.25rem, 3vw, 2.5rem);
  border: 1px solid currentColor;
  border-radius: 1rem;
}
.academy-weekend-schedule > p { max-width: 70ch; }
.academy-schedule-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}
.academy-schedule-grid h3 { margin: 0 0 .5rem; font-size: 1rem; }
.academy-schedule-time { margin: 0; font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; }
@media (max-width: 640px) {
  .academy-schedule-grid { grid-template-columns: 1fr; }
}
#admin-navigation .academy-trial-nav{display:flex;align-items:center;gap:10px;min-height:44px;margin:3px 0;padding:11px 15px;border-radius:10px;text-decoration:none;color:inherit;font:600 13px/1.4 system-ui,sans-serif;background:#ffffff08}#admin-navigation .academy-trial-nav:hover{background:#ffffff14}.academy-trial-entry{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:12px 18px;border-radius:12px;background:#ffd65b;color:#14213d!important;text-decoration:none;font:700 14px/1.4 system-ui,sans-serif;gap:10px}.classroom-header{flex-wrap:wrap}#admin-access-email-send{font-size:0}#admin-access-email-send:after{content:'Подготви в CRM';font-size:14px}
/* Shared Academy language for existing teacher and parent functions. */
.classroom-title-silent { position:absolute!important; width:1px!important; height:1px!important; margin:-1px!important; padding:0!important; overflow:hidden!important; clip-path:inset(50%); white-space:nowrap; border:0!important; }
body.classroom-view-home .classroom-header { justify-content:flex-end; border:0; padding-bottom:0; }
body.classroom-view-home #classroom-home-copy { display:none; }
body.screen-classroom .classroom-teacher-agenda {
  display:flex; flex-wrap:wrap; justify-content:space-between; gap:18px; padding:20px;
  border:1px solid #e2e7ee; border-radius:20px; background:#fff; color:#14213d;
  box-shadow:0 4px 18px #14213d04;
}
body.screen-classroom .classroom-agenda-bar-left { gap:8px; }
body.screen-classroom .classroom-agenda-bar-left select {
  min-height:44px; width:auto; padding:8px 32px 8px 12px; background-color:#f6f8fb;
  color:#14213d; border:1px solid transparent; border-radius:12px; font-size:18px; font-weight:700; text-transform:capitalize;
}
body.screen-classroom .classroom-agenda-bar-right { gap:8px; flex-wrap:wrap; }
body.screen-classroom .classroom-agenda-view { display:flex; padding:4px; gap:2px; border-radius:12px; background:#f1f4f8; }
body.screen-classroom .classroom-agenda-view button {
  min-height:36px; padding:6px 12px; border:0; border-radius:9px; color:#526078; background:transparent; font:600 13px/1.4 var(--font-sans); cursor:pointer;
}
body.screen-classroom .classroom-agenda-view button[aria-pressed="true"] { color:#14213d; background:#fff; box-shadow:0 1px 4px #14213d12; }
body.screen-classroom .classroom-agenda-today, body.screen-classroom .classroom-agenda-week-nav {
  height:44px; min-width:44px; border:1px solid #e2e7ee; border-radius:12px; color:#14213d; background:#fff; font:650 13px/1 var(--font-sans);
}
body.screen-classroom .classroom-agenda-week-nav:hover, body.screen-classroom .classroom-agenda-today:hover { background:#fff6d8; border-color:#f0cf65; }
body.screen-classroom .classroom-agenda-week { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:8px; width:100%; }
body.screen-classroom .classroom-agenda-day {
  position:relative; width:100%; min-width:0; min-height:86px; padding:10px 4px 7px; gap:6px; border:1px solid transparent; border-radius:14px;
  background:#f6f8fb; color:#14213d; box-shadow:none; transition:background .15s,border-color .15s;
}
body.screen-classroom .classroom-agenda-day small { font:650 11px/1.2 var(--font-sans); color:#5b667b; }
body.screen-classroom .classroom-agenda-day strong { font:750 25px/1.1 var(--font-sans); }
body.screen-classroom .classroom-agenda-day[data-outside="true"] { color:#68758b; background:#fafbfd; }
body.screen-classroom .classroom-agenda-day:hover { background:#edf1f8; border-color:#cdd5e1; }
body.screen-classroom .classroom-agenda-day[data-today="true"] { border-color:#e7bd48; box-shadow:none; }
body.screen-classroom .classroom-agenda-day[data-active="true"] { background:#ffe28b; color:#14213d; border-color:#edc85b; box-shadow:none; }
body.screen-classroom .classroom-agenda-day[data-active="true"] small { color:#14213d; }
.classroom-agenda-dot { width:5px; height:5px; border-radius:50%; background:transparent; }
[data-has-lessons="true"] .classroom-agenda-dot { background:#14213d; }
body.screen-classroom .classroom-agenda-week[data-view="month"] .classroom-agenda-day { min-height:62px; gap:3px; padding:8px 4px 6px; }
body.screen-classroom .classroom-agenda-week[data-view="month"] .classroom-agenda-day strong { font-size:20px; }
body.screen-classroom .classroom-agenda-week[data-view="month"] .classroom-agenda-day:nth-child(n+8) small { display:none; }
@media(max-width:600px) {
  body.screen-classroom .classroom-teacher-agenda { padding:12px; gap:12px; border-radius:16px; }
  body.screen-classroom .classroom-agenda-bar-right { width:100%; justify-content:space-between; gap:4px; }
  body.screen-classroom .classroom-agenda-view button { padding-inline:8px; }
  body.screen-classroom .classroom-agenda-week { gap:4px; }
  body.screen-classroom .classroom-agenda-day { min-height:70px; border-radius:10px; }
  body.screen-classroom .classroom-agenda-day strong { font-size:20px; }
  body.screen-classroom .classroom-agenda-day small { font-size:9px; }
  body.screen-classroom .classroom-agenda-week[data-view="month"] .classroom-agenda-day { min-height:48px; }
}
/* Product badges use the same quiet wordmark treatment on every surface. */
body.screen-home #site-brand-label,
body.screen-classroom #site-brand-label {
  margin-left: 12px; padding: 0 0 0 12px; border: 0;
  border-left: 1px solid #dce3ed; border-radius: 0; background: none;
  color: #5b667b; font: 700 11px/1 Inter, system-ui, sans-serif;
  letter-spacing: .12em; text-transform: uppercase;
}
body.portal-school .audience-home[data-landing-page="school"] { display: none !important; }
.classroom-trial-card { text-decoration: none; color: inherit; gap: 20px; }
.classroom-trial-card strong { font-size: 19px; }
.classroom-trial-card .classroom-home-today-state { flex-shrink: 0; }

body .landing-footer {
  display: grid; justify-items: stretch; gap: 22px;
  padding: 32px 0 20px; margin-top: 32px; border-top: 1px solid #dce3ed;
  color: #526078; font: 400 13px/1.6 Inter, system-ui, sans-serif;
  letter-spacing: 0; text-align: left; text-transform: none;
}
.landing-footer-main, .landing-footer-bottom {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.landing-footer-brand { display: inline-flex; align-items: start; }
.landing-footer-brand img { width: 100px; height: 33px; display: block; }
.landing-footer-brand sup { font-size: 11px; vertical-align: top; margin-left: 3px; letter-spacing: 0; }
body .landing-footer nav { justify-content: flex-start; gap: 8px 22px; }
body .landing-footer nav a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; font-weight: 500; }
body .landing-footer nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.landing-footer-bottom { padding-top: 20px; border-top: 1px solid #e7ebf1; align-items: start; }
.landing-footer-company { max-width: 540px; }
.landing-footer-company summary { cursor: pointer; min-height: 32px; }
body .landing-footer-identity { font: 400 13px/1.7 Inter, system-ui, sans-serif; color: #526078; letter-spacing: 0; text-wrap: pretty; }
@media (max-width: 600px) {
  .landing-footer-main, .landing-footer-bottom { flex-direction: column; align-items: flex-start; gap: 12px; }
  body .landing-footer { padding-top: 24px; }
  .classroom-trial-card { flex-wrap: wrap; }
}
body.screen-classroom,body.portal-parent{--font-mono:Inter,system-ui,sans-serif;--font-sans:Inter,system-ui,sans-serif;--landing-ink:#14213d;--landing-muted:#5b667b;--landing-bg:#f6f8fb;--landing-paper:#fff;--landing-line:#e2e7ee;--landing-accent:#14213d;--landing-accent-soft:#edf1f8;font-family:Inter,system-ui,sans-serif}
body.screen-classroom #classroom-screen{background:#f6f8fb;color:#14213d}
body.screen-classroom .classroom-header h1{font-size:clamp(28px,3vw,40px);letter-spacing:-1px;line-height:1.2}
body.screen-classroom .classroom-panel{border-radius:18px;background:#fff;border-color:#e2e7ee;box-shadow:none;color:#14213d}
body.screen-classroom :is(.classroom-curriculum-panel,.classroom-curriculum-overview,.classroom-curriculum-subjects,.classroom-curriculum-detail){background:#fff;color:#14213d;border-radius:16px;box-shadow:none}
body.screen-classroom :is(.classroom-curriculum-subject-card,.classroom-module-card,.classroom-student-card,.classroom-group-card){border:1px solid #e2e7ee;border-radius:14px;box-shadow:none;background:#fff;color:#14213d}
body.screen-classroom :is(input,select,textarea){border-radius:10px;border-color:#cdd5e1;font-family:inherit}
body.screen-classroom .landing-button,body.portal-parent .landing-button{border-radius:10px;box-shadow:none;font-family:inherit;text-transform:none;letter-spacing:0;min-height:44px}
body.screen-classroom .landing-button-primary,body.portal-parent .landing-button-primary{background:#14213d;color:#fff;border-color:#14213d}
body.screen-classroom .section-label,body.portal-parent .section-label{font-size:11px;letter-spacing:1.5px;color:#5b667b}
body.portal-parent .parent-dashboard{background:#f6f8fb;color:#14213d}
body.portal-parent :is(.parent-info-panel,.parent-family-actions>article,.parent-project-card,.parent-referral-panel){border-radius:18px;border:1px solid #e2e7ee;background:#fff;box-shadow:none}
body.portal-parent .parent-child-option{border-radius:12px;min-height:64px}
body.portal-parent :is(.parent-dashboard-status,.parent-child-option span,.parent-info-item small){font-size:13px;line-height:1.5;font-weight:400}
body.portal-parent .parent-child-heading h1{font-size:26px;font-weight:750;letter-spacing:-.5px}
body.portal-parent :is(input,select,textarea){border-radius:10px;border-color:#cdd5e1;font-family:inherit}
body.screen-classroom :focus-visible,body.portal-parent :focus-visible{outline:3px solid #7559dd;outline-offset:3px}
body.screen-classroom .classroom-curriculum-block{border:1px solid #dce3ed;border-radius:16px;background:#f6f8fb;color:#14213d;box-shadow:none;padding:24px;font-family:Inter,system-ui,sans-serif}
body.screen-classroom .classroom-curriculum-block:before{display:none}
body.screen-classroom .classroom-curriculum-block strong{color:#14213d;font-size:20px}
body.screen-classroom .classroom-curriculum-block small{color:#5b667b;font-size:13px}
body.screen-classroom .classroom-curriculum-block-active{border-color:#c4a440;background:#fff5d5}
body.portal-parent #parent-dashboard{border-top:0;padding-top:12px}
body.portal-parent .parent-family-actions{margin-bottom:24px}
body.portal-parent .parent-family-actions article{padding:22px}
body.portal-parent .parent-family-actions h2{font-size:22px}
body.portal-parent .parent-family-action-badge{font:650 12px/1.4 Inter,system-ui,sans-serif;text-transform:none;letter-spacing:0}

/* Parent payments: balance, action, history. Legal details stay available on demand. */
body.page-payments #home-screen { background: #f6f8fb; }
body.page-payments #grain { display: none; }
body.page-payments #auth-btn.auth-on {
  width: 44px; min-width: 44px; padding: 0; justify-content: center;
  border: 1px solid #e0e5ed; border-radius: 50%; background: #fff;
  box-shadow: none; transform: none;
}
body.page-payments #auth-btn.auth-on #auth-btn-label {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%);
}
/* Lucide user-round geometry, ISC license; shared package is already installed. */
body.page-payments #auth-btn.auth-on::before {
  width: 24px; height: 24px; box-shadow: none; border-radius: 0;
  background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2314213d' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='5'/%3E%3Cpath d='M20 21a8 8 0 0 0-16 0'/%3E%3C/svg%3E");
}
body.page-payments #payments-page {
  width: min(1040px, 100%);
  gap: 24px;
  color: #14213d;
  font-family: Inter, system-ui, sans-serif;
}
#payments-page [hidden] { display: none !important; }
#payments-page .payments-hero { padding: 10px 0 0; border: 0; }
#payments-page .payments-hero h1 { font-size: clamp(28px, 3vw, 36px); line-height: 1.2; letter-spacing: -1px; }
#payments-page .payments-summary-grid { grid-template-columns: 1fr; gap: 20px; align-items: stretch; }
#payments-page .payments-summary-grid:not(:has(> :not([hidden]))) { display:none; }
#payments-page .family-plan-form { padding:0; gap:18px; }
#payments-page .family-plan-form + .family-plan-form { margin-top:32px; padding-top:28px; border-top:1px solid #e0e5ed; }
#payments-page .family-plan-form h2 { font-size:24px; letter-spacing:-.4px; }
#payments-page .family-plan-group { margin-top:-10px; font-size:15px; }
#payments-page .family-plan-offer { padding:14px 18px; background:#fff6ce; border-radius:12px; color:#172344; font-size:16px; font-weight:600; }
#payments-page .family-plan-grid legend { font-size:18px; }
#payments-page .family-plan-option { gap:12px; }
#payments-page .family-plan-original { color:#58647b; font-size:16px; text-decoration-thickness:1.5px; }
#payments-page .family-plan-price { font-size:30px; font-variant-numeric:tabular-nums; }
#payments-page .family-plan-renewal { margin:0; max-width:650px; color:#46546c; font-size:15px; line-height:1.5; }
#payments-page .family-plan-form > .landing-button { display:inline-flex; align-items:center; justify-content:center; font:600 16px/1.4 Inter,system-ui,sans-serif; }
@media(max-width:600px){#payments-page .family-plan-form>.landing-button{width:100%;justify-self:stretch}#payments-page .family-plan-price{font-size:26px}#payments-page .family-plan-offer{font-size:15px}}
@media(max-width:359px){#payments-page .family-plan-option{padding:12px 10px}#payments-page .family-plan-price{font-size:20px}#payments-page .family-plan-grid{gap:10px}}
#payments-page .payments-card {
  padding: 24px;
  gap: 12px;
  border: 1px solid #e0e5ed;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 3px 12px #14213d04;
}
#payments-page .section-label {
  margin: 0; padding: 0; border: 0; background: none;
  color: #46546c; font: 600 15px/1.4 Inter, system-ui, sans-serif;
  text-transform: none; letter-spacing: 0; border-radius: 0;
}
#payments-page .payments-card > h2 { font-size: 36px; font-weight: 700; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
#payments-page .payments-due-card.has-balance { background: #fff9e7; border-color: #ebd89a; }
#payments-page .payments-due-card .landing-button { justify-self: start; margin-top: 4px; padding: 12px 24px; font-size: 15px; }
#payments-page :is(.payments-due-note, .payments-due-context) { margin: 0; color: #46546c; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
#payments-page .payments-card dl { margin: 0; gap: 0; }
#payments-page .payments-card dl div { padding: 12px 0 0; border: 0; }
#payments-page .payments-card dt { font-size: 14px; }
#payments-page .payments-card dd { font-size: 14px; font-weight: 600; }
#payments-page .payments-enrollment-options { margin: 0; }
#payments-page .payments-history { gap: 16px; }
#payments-page .payments-history h2 { font-size: 20px; letter-spacing: -.3px; }
#payments-page .payments-table-wrap { border: 1px solid #e0e5ed; border-radius: 16px; background: white; }
#payments-page .payments-table thead th { font: 600 12px/1.4 Inter, system-ui, sans-serif; text-transform: none; background: #f8fafc; }
#payments-page .payments-table td { font-size: 14px; padding: 16px 14px; }
#payments-page .payments-table td:first-child { max-width: 160px; overflow-wrap: anywhere; white-space: normal; font-size: 12px; }
#payments-page .payments-status { font: 600 12px/1.4 Inter, system-ui, sans-serif; text-transform: none; white-space: normal; }
#payments-page .payments-table-empty { min-width: 0; }
#payments-page .payments-table-empty thead { display: none; }
#payments-page .payments-table-empty td:first-child { padding: 36px 24px; text-align: center; font-size: 15px; color: #46546c; }
#payments-page .payments-method { display: block; margin: 0; padding: 0; border: 1px solid #e0e5ed; border-radius: 14px; background: white; }
#payments-page .payments-method summary { padding: 18px 22px; cursor: pointer; font-size: 15px; font-weight: 600; }
#payments-page .payments-method-content { display: grid; gap: 16px; padding: 0 22px 22px; }
#payments-page .payments-method ul { font-size: 14px; }
#payments-page .landing-footer { margin-top: 8px; padding-top: 24px; gap: 16px; }
@media (max-width: 760px) {
  #payments-page .payments-summary-grid { grid-template-columns: 1fr; gap: 12px; }
  body.page-payments #payments-page { gap: 20px; }
  #payments-page .payments-card { padding: 20px; border-radius: 16px; }
  #payments-page .payments-card > h2 { font-size: 32px; }
  #payments-page .payments-due-card .landing-button { width: 100%; }
  #payments-page .payments-table { min-width: 0; }
  #payments-page .payments-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  #payments-page .payments-table tbody { display: block; }
  #payments-page .payments-table tr { display: grid; padding: 16px; gap: 10px; }
  #payments-page .payments-table td, #payments-page .payments-table td:first-child {
    display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 12px;
    max-width: none; padding: 0; white-space: normal; overflow-wrap: anywhere; font-size: 14px;
  }
  #payments-page .payments-table td::before { content: attr(data-label); color: #59667b; }
  #payments-page .payments-table-empty td:first-child { display: block; padding: 12px 4px; }
  #payments-page .payments-table-empty td::before { display: none; }
  #payments-page .payments-status { justify-self: start; }
}
/* The family home leads with the child's work and payment choices. */
body.portal-parent #parent-dashboard {
  display: flex; flex-direction: column; width: min(1120px, 100%); margin-inline: auto;
  padding-block: 32px; gap: 24px; background: transparent;
}
body.portal-parent #parent-dashboard[hidden] { display: none; }
.parent-dashboard-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
.parent-child-switcher { padding: 0; border: 0; }
.parent-child-switcher-head { display: none; }
#parent-child-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
body.portal-parent .parent-child-option { width: auto; min-width: 150px; min-height: 52px; padding: 10px 16px; }
.parent-child-option strong { font-size: 15px; }
body.portal-parent .parent-child-option strong { white-space: normal; overflow-wrap: anywhere; }
.parent-child-option-active { background: #fff3c5; border-color: #e7ce7d; }
.parent-child-option span:empty { display: none; }
.parent-child-work { gap: 24px; }
.parent-child-heading { min-height: 0; gap: 16px; }
body.portal-parent .parent-child-heading h1 { font-size: clamp(26px, 3vw, 32px); line-height: 1.2; letter-spacing: -.8px; }
.parent-child-heading > div:first-child { gap: 8px; }
.parent-child-heading .parent-child-groups { margin: 0; gap: 8px; }
.parent-child-groups .parent-programme-option,
.parent-child-groups .parent-programme-option:hover {
  min-height: 0; padding: 0; border: 0; border-radius: 0; background: transparent;
  color: #526078; font: 400 14px/1.5 var(--font-sans); cursor: default;
}
.parent-refresh { background: #fff; border-color: #e0e5ed; border-radius: 50%; }
.parent-home-primary { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, 1fr); gap: 20px; align-items: start; }
.parent-home-project,
body.portal-parent #parent-payment-list {
  min-width: 0; padding: 28px; border: 1px solid #e0e5ed; border-radius: 20px;
  background: #fff; box-shadow: 0 4px 20px #14213d03;
}
.parent-home-project .parent-projects-title,
#parent-payment-list > h2 { margin: 0 0 24px; color: #14213d; font: 600 16px/1.4 var(--font-sans); letter-spacing: 0; }
.parent-home-project .parent-project-grid { display: block; }
body.portal-parent .parent-home-project .parent-project-card { margin: 0; padding: 0; border: 0; border-radius: 0; background: none; gap: 26px; }
.parent-home-project .parent-project-card > header { flex-direction: row; justify-content: flex-start; align-items: center; gap: 20px; }
.parent-project-symbol { display: grid; place-items: center; flex: 0 0 72px; height: 72px; border-radius: 20px; background: #ffdf75; color: #14213d; }
.parent-project-symbol svg { width: 36px; height: 36px; }
.parent-home-project .parent-project-card-meta { gap: 8px; }
.parent-home-project .parent-project-card-meta h3 { margin: 0; color: #14213d; font: 650 22px/1.35 var(--font-sans); letter-spacing: -.4px; white-space: normal; overflow-wrap: anywhere; }
.parent-home-project .parent-project-card-meta small { font: 400 14px/1.5 var(--font-sans); color: #526078; }
.parent-home-project .parent-project-card-pill { padding: 0; background: transparent; color: #526078; font: 500 14px/1.3 var(--font-sans); letter-spacing: 0; }
.parent-home-project .parent-project-card-actions { gap: 10px; }
.parent-home-project .parent-project-card-action {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 46px; height: auto; padding: 12px 18px; border: 1px solid #d8dfeb; border-radius: 12px;
  background: #fff; color: #14213d; font: 600 15px/1.4 var(--font-sans); text-decoration: none;
}
.parent-home-project .parent-project-card-action:hover { background: #edf1f8; color: #14213d; border-color: #b5c0d0; }
.parent-home-project .parent-project-card-action-play { background: #14213d; border-color: #14213d; color: #fff; }
.parent-home-project .parent-project-card-action-play:hover { background: #263954; border-color: #263954; color: #fff; filter: none; }
.parent-home-project .parent-project-card-action:focus-visible { outline: 3px solid #7559dd; outline-offset: 3px; }
.parent-project-card-action svg, .parent-payments-link svg, .parent-payment-button svg { width: 18px; height: 18px; flex-shrink: 0; }
body.portal-parent #parent-payment-list { display: grid; gap: 16px; }
#parent-payment-list > h2 { margin: 0; }
#parent-payment-list .parent-info-item { padding: 0; border: 0; display: grid; gap: 8px; }
#parent-payment-list .parent-info-item + .parent-info-item { padding-top: 16px; border-top: 1px solid #e0e5ed; }
#parent-payment-list .parent-info-item p { margin: 0; font: 400 14px/1.5 var(--font-sans); color: #526078; overflow-wrap: anywhere; }
#parent-payment-list .parent-payment-amount { font: 650 36px/1.15 var(--font-sans); letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.parent-payment-state { font-size: 14px; font-weight: 500; color: #526078; }
.parent-payment-state[data-status="pending"] { justify-self: start; padding: 5px 10px; border-radius: 8px; background: #edf1f8; color: #14213d; font-weight: 600; }
.parent-payment-empty { margin: 8px 0 0; font: 500 18px/1.45 var(--font-sans); color: #14213d; }
body.portal-parent #parent-payment-list.parent-payments-due { background: #fff9e7; border-color: #ecdba4; }
body.portal-parent #parent-payment-list.parent-payments-error, .parent-home-project.parent-project-error { border-color: #d8a8a3; }
.parent-payments-error .parent-payment-empty, .parent-home-primary .parent-project-error .parent-dashboard-message { color: #8b3430; }
.parent-payments-link {
  display: inline-flex; align-items: center; justify-content: flex-start; gap: 10px; justify-self: start;
  min-height: 44px; padding: 8px 0; background: none; border: 0; color: #14213d;
  font: 600 14px/1.4 var(--font-sans); text-decoration: underline; text-underline-offset: 4px; cursor: pointer;
}
#parent-payment-list .parent-info-subtitle { margin: 8px 0 0; font: 600 14px/1.4 var(--font-sans); text-transform: none; }
#parent-payment-list .parent-payment-history-item { grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; }
#parent-payment-list .parent-payment-history-item strong { font-size: 14px; }
#parent-payment-list .parent-payment-button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 46px; height: auto; margin-top: 8px; padding: 12px 18px; border-radius: 12px; font: 600 15px/1.4 var(--font-sans); text-decoration: none; }
.parent-home-primary .parent-dashboard-message { min-height: 0; padding: 16px 0; border: 0; background: none; place-items: start; color: #526078; text-align: left; font: 400 16px/1.5 var(--font-sans); }
.parent-dashboard-status:empty, body.portal-parent .parent-info-panel[hidden] { display: none !important; }
#parent-feedback-list:not([hidden]) { margin-top: 0; }
body.portal-parent .parent-family-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; }
.parent-family-actions > .landing-button { background: transparent; border-color: transparent; padding: 10px 14px; min-height: 44px; color: #526078; font: 500 14px/1.4 var(--font-sans); }
.parent-family-actions > .landing-button:hover { background: #edf1f8; color: #14213d; }
@media (max-width: 980px) {
  .parent-home-primary { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  body.portal-parent #parent-dashboard { padding-block: 20px; gap: 16px; }
  .parent-home-primary { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .parent-child-work { gap: 20px; }
  .parent-home-project, body.portal-parent #parent-payment-list { padding: 22px; border-radius: 18px; }
  .parent-home-project .parent-project-card-meta h3 { font-size: 20px; }
  .parent-project-symbol { flex-basis: 56px; height: 56px; border-radius: 16px; }
  .parent-project-symbol svg { width: 30px; height: 30px; }
  .parent-home-project .parent-project-card > header { gap: 16px; }
  .parent-home-project .parent-project-card-action { flex: 1 1 auto; }
  #parent-payment-list .parent-payment-button { width: 100%; }
  #parent-payment-list .parent-payment-history-item { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  #parent-child-list { gap: 6px; }
  body.portal-parent .parent-child-option { min-width: 0; flex: 1 1 130px; }
}
@media (max-width: 359px) {
  body.portal-parent .parent-child-option { flex-basis: 100%; }
  .parent-home-project, body.portal-parent #parent-payment-list { padding: 18px; }
  .parent-home-project .parent-project-card > header { align-items: flex-start; gap: 12px; }
  .parent-project-symbol { flex-basis: 44px; height: 44px; border-radius: 12px; }
}

#payments-page .family-plan-form > .landing-button:disabled { background:#e7ebf2; border-color:#e7ebf2; color:#526078; cursor:default; box-shadow:none; }
#payments-page .family-plan-status { margin:0; font-size:15px; line-height:1.5; color:#46546c; }
#payments-page .family-plan-status.is-error { color:#9a332a; }

.game-room-back{display:inline-flex;align-items:center;white-space:nowrap;padding:8px 12px;min-height:44px;border:1px solid var(--theme-border,#d9deea);border-radius:8px;background:var(--theme-picker-bg,#fff);color:var(--theme-text,#18223f);cursor:pointer;font-family:inherit;font-size:14px;font-weight:600}

body.screen-editor #site-topbar.game-room-toolbar{grid-template-columns:auto minmax(0,1fr) auto}body.screen-editor .game-room-toolbar #site-brand{display:none}body.screen-editor .game-room-toolbar #project-title-wrap{grid-column:2;grid-row:1}body.screen-editor .game-room-toolbar #site-account{grid-column:3;grid-row:1}.game-room-toolbar .game-room-back{grid-column:1;grid-row:1}
@media(max-width:560px){.game-room-back{font-size:12px;padding:6px 8px}}
/* Curriculum reading surface. Other classroom and editor workspaces keep their styles. */
.classroom-view-curriculum .curriculum-delivery-switch { display:flex; flex-wrap:wrap; gap:10px; padding:16px 0; margin-bottom:16px; }
.classroom-view-curriculum .curriculum-delivery-switch button { min-height:44px; border:1px solid #bdd3ce; border-radius:10px; padding:12px 18px; background:white; color:#245e55; font:inherit; cursor:pointer; }
.classroom-view-curriculum .curriculum-delivery-switch button[aria-pressed=true] { background:#19685b; border-color:#19685b; color:white; }
.classroom-view-curriculum .curriculum-delivery-switch button:focus-visible { outline:3px solid #377e70; outline-offset:3px; }
body.classroom-view-curriculum {
  --reader-ink: #182b36;
  --reader-muted: #536570;
  --reader-line: #dce5e7;
  --reader-accent: #096b60;
  --reader-soft: #eaf5f1;
  --reader-paper: #ffffff;
  --reader-font: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f6f8f8;
  color: var(--reader-ink);
}
body.screen-classroom.classroom-view-curriculum #classroom-screen {
  padding: calc(var(--topbar-h, 70px) + 26px) 32px 48px;
  background: #f6f8f8;
  font-family: var(--reader-font);
}
body.classroom-view-curriculum .classroom-shell { max-width: 1120px; width: 100%; margin: auto; min-width: 0; gap: 22px; }
body.classroom-view-curriculum .classroom-header { display: flex; gap: 12px; align-items: center; padding: 0 0 20px; border-bottom: 1px solid var(--reader-line); }
body.classroom-view-curriculum .classroom-header > div { min-width: 0; }
body.classroom-view-curriculum .section-label { padding: 0; margin: 0; background: transparent; border: 0; }
body.classroom-view-curriculum .classroom-header .section-label { font: 600 12px/1.5 var(--reader-font); color: var(--reader-muted); text-transform: none; letter-spacing: .04em; }
body.classroom-view-curriculum .classroom-header h2 { margin: 3px 0 0; font: 750 22px/1.25 var(--reader-font); letter-spacing: -.5px; color: var(--reader-ink); }
body.classroom-view-curriculum .classroom-active-student { display: none; }
body.classroom-view-curriculum .classroom-grid { min-width: 0; display: block; }
body.classroom-view-curriculum #classroom-projects-panel:has(#classroom-curriculum-panel) { background: var(--reader-paper); border: 1px solid var(--reader-line); border-radius: 16px; box-shadow: 0 2px 4px #182b3603; min-width: 0; overflow: visible; }
body.classroom-view-curriculum #classroom-curriculum-panel { color: var(--reader-ink); padding: 30px; min-width: 0; }
body.classroom-view-curriculum #classroom-curriculum-panel :is(h3,h4,h5,strong) { color: var(--reader-ink); font-family: var(--reader-font); }
body.classroom-view-curriculum #classroom-curriculum-panel :is(p,li,small,dd) { font-family: var(--reader-font); }
body.classroom-view-curriculum #classroom-curriculum-panel .section-label { color: var(--reader-accent); font: 650 12px/1.5 var(--reader-font); letter-spacing: .07em; }
body.classroom-view-curriculum #classroom-curriculum-title { font: 750 32px/1.2 var(--reader-font); letter-spacing: -.9px; max-width: 26ch; margin-top: 8px; }
body.classroom-view-curriculum #classroom-curriculum-overview > header { gap: 16px; align-items: center; }
body.classroom-view-curriculum #classroom-curriculum-count { white-space: nowrap; font: 650 12px/1.3 var(--reader-font); color: var(--reader-accent); padding: 9px 12px; background: var(--reader-soft); border-radius: 8px; }
body.classroom-view-curriculum #classroom-curriculum-summary { color: var(--reader-muted); max-width: 76ch; font-size: 15px; line-height: 1.65; margin: 16px 0 24px; }
body.classroom-view-curriculum .curriculum-tools { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; padding: 20px 0; border-top: 1px solid var(--reader-line); }
body.classroom-view-curriculum .curriculum-tools > div { display: grid; gap: 7px; flex: 1; max-width: 360px; min-width: 180px; }
body.classroom-view-curriculum .curriculum-tools label { font-size: 13px; font-weight: 650; }
body.classroom-view-curriculum .curriculum-tools input { width: 100%; min-width: 0; height: 44px; padding: 0 13px; box-sizing: border-box; border: 1px solid #a3b6bc; border-radius: 8px; background: #fff; color: var(--reader-ink); font: 400 15px var(--reader-font); }
body.classroom-view-curriculum .curriculum-tools input::placeholder { color: #647780; }
body.classroom-view-curriculum .curriculum-tools > span { margin-left: auto; padding: 12px 0; font-size: 13px; color: var(--reader-muted); }
body.classroom-view-curriculum .curriculum-tools button { min-height: 44px; border: 0; border-radius: 8px; background: var(--reader-soft); color: var(--reader-accent); padding: 8px 12px; font: 650 13px var(--reader-font); cursor: pointer; }
body.classroom-view-curriculum #classroom-curriculum-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
body.classroom-view-curriculum #classroom-curriculum-panel .classroom-curriculum-card { display: grid; grid-template-columns: 36px minmax(0,1fr); align-items: start; gap: 12px; min-width: 0; padding: 19px 16px; background: #fff; border: 1px solid var(--reader-line); border-radius: 10px; text-align: left; box-shadow: none; cursor: pointer; transition: border-color .15s,background .15s; }
body.classroom-view-curriculum #classroom-curriculum-panel .classroom-curriculum-card:hover { background: #f5faf8; border-color: var(--reader-accent); }
body.classroom-view-curriculum #classroom-curriculum-panel .classroom-curriculum-card[hidden] { display: none; }
body.classroom-view-curriculum #classroom-curriculum-panel .classroom-curriculum-index { width: 34px; height: 34px; background: var(--reader-soft); color: var(--reader-accent); border-radius: 8px; font: 650 14px/1 var(--reader-font); }
body.classroom-view-curriculum #classroom-curriculum-panel .classroom-curriculum-copy { gap: 7px; }
body.classroom-view-curriculum #classroom-curriculum-panel .classroom-curriculum-copy strong { font: 650 16px/1.35 var(--reader-font); letter-spacing: -.15px; }
body.classroom-view-curriculum #classroom-curriculum-panel .classroom-curriculum-copy small { color: var(--reader-muted); font-size: 13px; line-height: 1.5; }
body.classroom-view-curriculum .classroom-curriculum-card > .classroom-curriculum-pill { display: none; }
body.classroom-view-curriculum .curriculum-search-empty { padding: 28px 20px; background: #f6f8f8; border: 1px dashed #a3b6bc; border-radius: 10px; color: var(--reader-muted); line-height: 1.6; }
body.classroom-view-curriculum #classroom-curriculum-panel :is(.classroom-module-back,.classroom-curriculum-back-to-subjects) { display: inline-flex; align-items: center; min-height: 44px; color: var(--reader-accent); font: 650 14px/1.4 var(--reader-font); margin-bottom: 12px; }
body.classroom-view-curriculum #classroom-curriculum-panel [hidden] { display: none !important; }
body.classroom-view-curriculum .classroom-module-detail-head { padding: 8px 0 18px; border-color: var(--reader-line); grid-template-columns: 42px minmax(0,1fr) auto; align-items: center; }
body.classroom-view-curriculum #classroom-curriculum-panel .classroom-module-detail-head { grid-template-columns: minmax(0,1fr); }
body.classroom-view-curriculum #classroom-curriculum-panel .classroom-module-detail-head > :is(.classroom-curriculum-index,.classroom-curriculum-pill) { display: none; }
body.classroom-view-curriculum #classroom-module-detail-title { font: 750 32px/1.2 var(--reader-font); letter-spacing: -.8px; margin-top: 5px; }
body.classroom-view-curriculum #classroom-module-detail-kind { font: 650 12px/1.3 var(--reader-font); border: 0; color: var(--reader-accent); background: var(--reader-soft); height: auto; padding: 9px 12px; text-transform: none; }
body.classroom-view-curriculum #classroom-module-detail-summary { color: var(--reader-muted); font-size: 16px; line-height: 1.65; max-width: 74ch; margin: 18px 0; }
body.classroom-view-curriculum .classroom-module-detail-facts { background: #f6f8f8; border: 1px solid var(--reader-line); border-radius: 9px; overflow: hidden; margin: 0; }
body.classroom-view-curriculum .classroom-module-detail-facts > div { padding: 12px 16px; border-color: var(--reader-line); min-width: 0; }
body.classroom-view-curriculum .classroom-module-detail-facts > div { align-content: start; gap: 3px; }
body.classroom-view-curriculum #classroom-curriculum-panel .classroom-module-detail-facts dt { color: var(--reader-muted); font: 550 11px/1.4 var(--reader-font); letter-spacing: .04em; }
body.classroom-view-curriculum #classroom-curriculum-panel .classroom-module-detail-facts dd { color: var(--reader-ink); font: 600 14px/1.5 var(--reader-font); margin: 4px 0 0; }
body.classroom-view-curriculum .classroom-lesson-navigation { gap: 12px; margin: 18px 0 28px; }
body.classroom-view-curriculum .classroom-lesson-navigation:has(#classroom-lesson-assign-wrap[hidden]) { grid-template-columns: repeat(2,minmax(0,1fr)); }
body.classroom-view-curriculum #classroom-curriculum-panel :is(.classroom-module-detail-head,.classroom-module-detail-facts,.classroom-module-detail-facts > div) { border-color: var(--reader-line); }
body.classroom-view-curriculum #classroom-curriculum-panel .classroom-module-back { gap: 6px; }
body.classroom-view-curriculum #classroom-curriculum-panel .classroom-lesson-navigation button { min-height: 44px; color: var(--reader-accent); background: #fff; border: 1px solid var(--reader-line); font: 600 13px/1.5 var(--reader-font); padding: 11px 14px; border-radius: 8px; }
body.classroom-view-curriculum #classroom-curriculum-panel .classroom-lesson-navigation button { text-align: left; }
body.classroom-view-curriculum #classroom-curriculum-panel .classroom-lesson-navigation button:hover:not(:disabled) { background: var(--reader-soft); border-color: var(--reader-accent); color: var(--reader-accent); }
body.classroom-view-curriculum #classroom-curriculum-panel .classroom-lesson-navigation button:disabled { background: #f6f8f8; color: #65757b; border-style: dashed; opacity: 1; cursor: default; }
body.classroom-view-curriculum .classroom-module-detail-section h4 { font: 700 18px/1.4 var(--reader-font); margin: 0 0 14px; }
body.classroom-view-curriculum #classroom-module-detail-guide { padding: 0 !important; border: 0 !important; background: transparent !important; gap: 24px; }
body.classroom-view-curriculum .curriculum-contents { padding: 12px 16px; border: 1px solid var(--reader-line); border-radius: 9px; background: #f6f8f8; }
body.classroom-view-curriculum .curriculum-contents summary { cursor: pointer; font-size: 14px; font-weight: 650; min-height: 24px; color: var(--reader-accent); }
body.classroom-view-curriculum .curriculum-contents nav { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 4px 16px; max-height: 320px; overflow: auto; margin-top: 12px; }
body.classroom-view-curriculum .curriculum-contents a { color: var(--reader-accent); font-size: 14px; line-height: 1.5; padding: 9px 0; text-underline-offset: 3px; }
body.classroom-view-curriculum [id^="lesson-section-"] { scroll-margin-top: 24px; }
body.classroom-view-curriculum .classroom-guide-intro { gap: 12px; grid-template-columns: repeat(3,minmax(0,1fr)); }
body.classroom-view-curriculum .classroom-guide-intro:has(>article:last-child:nth-child(2)) { grid-template-columns: repeat(2,minmax(0,1fr)); }
body.classroom-view-curriculum .curriculum-return-contents { display: inline-flex; align-items: center; min-height: 36px; color: var(--reader-accent); font: 600 13px/1.5 var(--reader-font); text-underline-offset: 3px; }
body.classroom-view-curriculum .classroom-code-example > .curriculum-return-contents { color: #b4e5d5; }
body.classroom-view-curriculum .classroom-guide-intro article { padding: 16px; background: #f0f7f5; border: 1px solid #d8eae3; border-top: 3px solid #3d9483; border-radius: 9px; min-width: 0; }
body.classroom-view-curriculum .classroom-guide-intro strong { font-size: 12px; line-height: 1.5; font-weight: 650; letter-spacing: .03em; }
body.classroom-view-curriculum .classroom-guide-intro p { font-size: 14px; line-height: 1.6; margin: 8px 0 0; color: #3d555c; }
body.classroom-view-curriculum .classroom-markdown { max-width: 76ch; margin: 0 auto; width: 100%; min-width: 0; font: 400 16px/1.8 var(--reader-font); color: var(--reader-ink); }
body.classroom-view-curriculum .classroom-markdown :is(p,li) { font-size: 16px; line-height: 1.8; }
body.classroom-view-curriculum .classroom-markdown h2 { font: 700 23px/1.35 var(--reader-font); margin: 36px 0 14px; padding-top: 22px; border-top: 1px solid var(--reader-line); letter-spacing: -.35px; }
body.classroom-view-curriculum .classroom-markdown h3 { font: 650 17px/1.5 var(--reader-font); margin: 22px 0 8px; }
body.classroom-view-curriculum .classroom-markdown :is(pre,code) { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
body.classroom-view-curriculum .classroom-markdown pre { font-size: 13px; line-height: 1.7; max-width: 100%; box-sizing: border-box; overflow: auto; }
body.classroom-view-curriculum .classroom-guide-grid { gap: 16px; }
body.classroom-view-curriculum :is(.classroom-guide-list,.classroom-session-card,.classroom-debug-block) { background: #f6f8f8; border: 1px solid var(--reader-line); border-radius: 9px; padding: 18px; min-width: 0; }
body.classroom-view-curriculum .classroom-teacher-guide h5 { font: 650 16px/1.45 var(--reader-font); }
body.classroom-view-curriculum :is(.classroom-guide-list li,.classroom-session-card li,.classroom-debug-block li) { font-size: 14px; line-height: 1.75; color: #3d555c; margin-bottom: 8px; }
body.classroom-view-curriculum .classroom-code-head { gap: 14px; align-items: center; }
body.classroom-view-curriculum #classroom-curriculum-panel .classroom-code-head h5 { color: #e8f3f4; }
body.classroom-view-curriculum .classroom-code-head p { color: #ccd8e8; font-size: 14px; line-height: 1.65; }
body.classroom-view-curriculum .classroom-code-head button { font: 600 13px/1.5 var(--reader-font); min-height: 44px; padding: 10px 14px; max-width: 100%; white-space: normal; }
body.classroom-view-curriculum .classroom-code-head button[aria-pressed=true] { border-color: #b4e5d5; color: #b4e5d5; }
body.classroom-view-curriculum .curriculum-code-status { color: #ccd8e8; font-size: 13px; overflow-wrap: anywhere; }
body.classroom-view-curriculum .curriculum-code-status:empty { display: none; }
body.classroom-view-curriculum .curriculum-code-wrap .classroom-code-line { min-width: 0; }
body.classroom-view-curriculum .curriculum-code-wrap .classroom-code-line > span { white-space: pre-wrap; overflow-wrap: anywhere; }
body.classroom-view-curriculum .classroom-code-line-number { color: #aabbd2; align-self: start; min-height: 24px; }
body.classroom-view-curriculum .classroom-code-lines:focus-visible { outline: 3px solid #b4e5d5; outline-offset: 3px; }
body.classroom-view-curriculum .classroom-code-lines { max-width: 100%; overflow: auto; border-radius: 10px; }
body.classroom-view-curriculum #classroom-module-detail-sources-section { padding-top: 24px; border-top: 1px solid var(--reader-line); }
body.classroom-view-curriculum #classroom-curriculum-panel .classroom-source-row { border-color: var(--reader-line); }
body.classroom-view-curriculum #classroom-curriculum-panel .classroom-source-row small { color: var(--reader-muted); font: 400 12px/1.6 var(--reader-font); }
body.classroom-view-curriculum .classroom-status { font: 400 12px/1.5 var(--reader-font); color: var(--reader-muted); }
body.classroom-view-curriculum :is(button,input,summary,a):focus-visible { outline: 3px solid #087f70; outline-offset: 3px; }
@media(max-width: 760px) {
  body.screen-classroom.classroom-view-curriculum #classroom-screen { padding: calc(var(--topbar-h, 70px) + 18px) 16px 32px; }
  body.classroom-view-curriculum .classroom-shell { gap: 16px; }
  body.classroom-view-curriculum #classroom-curriculum-panel { padding: 20px; }
  body.classroom-view-curriculum #classroom-curriculum-list { grid-template-columns: 1fr; }
  body.classroom-view-curriculum #classroom-curriculum-title { font-size: 27px; }
  body.classroom-view-curriculum .classroom-guide-intro,
  body.classroom-view-curriculum .classroom-guide-intro:has(>article:last-child:nth-child(2)) { grid-template-columns: 1fr; }
  body.classroom-view-curriculum .classroom-guide-grid { grid-template-columns: 1fr; }
}
@media(max-width: 480px) {
  body.screen-classroom.classroom-view-curriculum #classroom-screen { padding: calc(var(--topbar-h, 70px) + 16px) 12px 28px; }
  body.classroom-view-curriculum #classroom-curriculum-panel { padding: 17px; }
  body.classroom-view-curriculum .classroom-header { padding-bottom: 10px; }
  body.classroom-view-curriculum .classroom-header h2 { font-size: 19px; }
  body.classroom-view-curriculum .classroom-curriculum-overview,
  body.classroom-view-curriculum .classroom-module-detail { gap: 10px; }
  body.classroom-view-curriculum #classroom-curriculum-summary { margin: 0; font-size: 14px; line-height: 1.6; }
  body.classroom-view-curriculum .curriculum-tools { padding: 12px 0 0; }
  body.classroom-view-curriculum #classroom-curriculum-panel .classroom-module-back { margin: 0; }
  body.classroom-view-curriculum #classroom-module-detail-summary { margin: 0 0 4px; font-size: 15px; }
  body.classroom-view-curriculum .classroom-lesson-navigation { margin: 6px 0 10px; }
  body.classroom-view-curriculum .classroom-module-detail-section h4 { margin-bottom: 4px; }
  body.classroom-view-curriculum #classroom-curriculum-overview > header { display: block; }
  body.classroom-view-curriculum #classroom-curriculum-count { display: inline-block; margin-top: 14px; }
  body.classroom-view-curriculum .curriculum-tools { gap: 8px; }
  body.classroom-view-curriculum .curriculum-tools > div { max-width: none; flex-basis: 100%; }
  body.classroom-view-curriculum .curriculum-tools > span { margin: 0 auto 0 0; }
  body.classroom-view-curriculum #classroom-curriculum-panel .classroom-curriculum-card { padding: 16px 12px; grid-template-columns: 30px minmax(0,1fr); gap: 10px; }
  body.classroom-view-curriculum #classroom-curriculum-panel .classroom-curriculum-index { width: 28px; height: 30px; }
  body.classroom-view-curriculum .classroom-module-detail-head { grid-template-columns: 32px minmax(0,1fr); gap: 10px; }
  body.classroom-view-curriculum #classroom-module-detail-title { font-size: 26px; }
  body.classroom-view-curriculum #classroom-module-detail-kind { display: none; }
  body.classroom-view-curriculum .classroom-module-detail-facts > div { padding: 11px; }
  body.classroom-view-curriculum .classroom-lesson-navigation,
  body.classroom-view-curriculum .classroom-lesson-navigation:has(#classroom-lesson-assign-wrap[hidden]) { grid-template-columns: 1fr; gap: 8px; }
  body.classroom-view-curriculum .curriculum-contents nav { grid-template-columns: 1fr; }
  body.classroom-view-curriculum .classroom-markdown h2 { font-size: 21px; }
  body.classroom-view-curriculum .classroom-markdown :is(p,li) { font-size: 15px; }
}
@media(prefers-reduced-motion: reduce) {
  body.classroom-view-curriculum * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* Course selection shares the compact reading surface. */
body.screen-classroom.classroom-view-curriculum .classroom-header h1 { font: 750 24px/1.25 var(--reader-font); letter-spacing: -.5px; margin: 0; }
body.screen-classroom.classroom-view-curriculum .classroom-curriculum-blocks { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; margin:0 0 24px; }
body.screen-classroom.classroom-view-curriculum .classroom-curriculum-blocks[hidden] { display:none; }
body.screen-classroom.classroom-view-curriculum .classroom-curriculum-block { min-height:110px; padding:22px; border:1px solid var(--reader-line); border-radius:12px; background:#fff; color:var(--reader-ink); box-shadow:none; text-align:left; }
body.screen-classroom.classroom-view-curriculum .classroom-curriculum-block:hover { border-color:var(--reader-accent); background:var(--reader-soft); }
body.screen-classroom.classroom-view-curriculum .classroom-curriculum-block strong { font:700 18px/1.4 var(--reader-font); }
body.screen-classroom.classroom-view-curriculum .classroom-curriculum-block small { font:400 14px/1.5 var(--reader-font); margin-top:8px; color:var(--reader-muted); }
body.classroom-view-curriculum .classroom-markdown blockquote { margin:18px 0; padding:18px 22px; border:1px solid #b5dace; border-left:4px solid var(--reader-accent); border-radius:8px; background:var(--reader-soft); color:#174d43; }
body.classroom-view-curriculum .classroom-markdown blockquote p { margin:0; }
body.classroom-view-curriculum .curriculum-tools[hidden] { display:none; }
body.classroom-view-curriculum .classroom-curriculum-index { min-width:28px; }
body.classroom-view-curriculum .classroom-curriculum-card:has(.classroom-curriculum-index:first-child) { overflow-wrap:anywhere; }
@media(max-width:760px) { body.screen-classroom.classroom-view-curriculum .classroom-curriculum-blocks { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:480px) { body.screen-classroom.classroom-view-curriculum .classroom-curriculum-blocks { grid-template-columns:1fr; } body.screen-classroom.classroom-view-curriculum .classroom-header h1 { font-size:21px; } }

body.classroom-view-curriculum #classroom-curriculum-count:empty { display:none; }

body.classroom-view-curriculum .academy-trial-entry { background:var(--reader-soft); color:var(--reader-accent); padding:12px 18px; border:1px solid var(--reader-line); box-shadow:none; font:600 14px/1.4 var(--reader-font); }

/* Final review refinements: coherent video metadata and quick teacher navigation. */
body.classroom-view-curriculum .classroom-arrival-video { background:var(--reader-soft); border:1px solid var(--reader-line); border-left:3px solid var(--reader-accent); box-shadow:none; }
body.classroom-view-curriculum .classroom-arrival-video a { background:var(--reader-accent); color:#fff; }
body.classroom-view-curriculum .classroom-arrival-video small { color:var(--reader-muted); text-transform:none; letter-spacing:normal; }
body.classroom-view-curriculum .classroom-arrival-video-arrival { background:#f7f2ff; border-color:#ded0ef; border-left:5px solid #8055ad; }
body.classroom-view-curriculum .classroom-arrival-video-arrival a { background:#74429d; }
body.classroom-view-curriculum .classroom-arrival-video-reference { background:#eff5ff; border-color:#cbdcf5; border-left:5px solid #3569b0; }
body.classroom-view-curriculum .classroom-arrival-video-reference a { background:#285c9e; }
body.classroom-view-curriculum .curriculum-video-label { display:flex; align-items:center; gap:10px; }
body.classroom-view-curriculum .classroom-arrival-video-arrival .curriculum-video-label { color:#67388b; }
body.classroom-view-curriculum .classroom-arrival-video-reference .curriculum-video-label { color:#244f88; }
body.classroom-view-curriculum .curriculum-video-icon { display:inline-grid; place-items:center; width:30px; height:30px; border:1px solid currentColor; border-radius:8px; font-size:18px; flex-shrink:0; }
body.classroom-view-curriculum .classroom-arrival-video a { white-space:normal; text-align:center; flex-shrink:0; max-width:250px; }
body.classroom-view-curriculum .curriculum-learning-note { margin:16px 0; padding:16px 20px; border:1px solid #b5dace; border-left:4px solid #167665; border-radius:8px; background:#eff8f5; color:#174d43; }
body.classroom-view-curriculum .curriculum-learning-note-label { display:block; margin-bottom:6px; font-size:12px; font-weight:750; letter-spacing:.04em; text-transform:uppercase; }
body.classroom-view-curriculum .curriculum-learning-note p { margin:0; }
body.classroom-view-curriculum .curriculum-learning-note-review { background:#f5f6f8; border-color:#d7dce3; border-left-color:#7a8798; color:#445267; }
body.classroom-view-curriculum .curriculum-learning-note-command { background:#eff5ff; border-color:#cbdcf5; border-left-color:#3569b0; color:#244f88; }
body.classroom-view-curriculum .curriculum-learning-note-observe { background:#fff8e9; border-color:#ead7aa; border-left-color:#b47a13; color:#74500f; }
body.classroom-view-curriculum .curriculum-video-timing { display:block; margin:6px 0; font-size:14px; }
body.classroom-view-curriculum .classroom-markdown { margin-left:0; margin-right:0; }
body.classroom-view-curriculum .classroom-markdown h2 { border-bottom-color:var(--reader-line); }
body.classroom-view-curriculum .classroom-curriculum-back-to-subjects { display:inline-flex; gap:6px; }
body.classroom-view-curriculum .classroom-curriculum-back-to-subjects[hidden] { display:none; }
body.classroom-view-curriculum .curriculum-quick-contents { display:none; }
@media(max-width:640px) {
  body.classroom-view-curriculum .curriculum-quick-contents { display:inline-flex; align-items:center; min-height:44px; margin-top:12px; padding:8px 12px; border:1px solid var(--reader-line); border-radius:8px; background:var(--reader-soft); color:var(--reader-accent); font:600 14px/1.4 var(--reader-font); }
  body.classroom-view-curriculum .classroom-arrival-video { display:flex; flex-direction:column; align-items:stretch; gap:12px; }
  body.classroom-view-curriculum .classroom-arrival-video a { align-self:flex-start; }
}

body.classroom-view-curriculum .classroom-markdown img[src$="js-first-letter.svg"] { width:100%; max-width:480px; }