:root {
    --bg: #000000;
    --bg-elev: #0c0c0e;
    --fg: #f5f2f6;
    --muted: #9a8fa3;
    --hair: rgba(91, 44, 111, 0.35);
    --purple: #5b2c6f;
    --purple-soft: rgba(91, 44, 111, 0.22);
    --orange: #f98012;
    --lilac: #e4d4f4;
    --peach: #ffd0b5;
    --mint: #c9efd8;
    --butter: #ffe7b0;
    --blush: #f8d0dc;
    --peri: #d5def8;
    --font: "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
    --display: "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
    --radius: 12px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--fg);
    font-family: var(--font);
    font-weight: 400;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

body {
    color-scheme: dark;
    background-color: var(--bg);
    background-image:
        radial-gradient(ellipse 70% 50% at 10% -10%, rgba(91, 44, 111, 0.45), transparent 55%),
        radial-gradient(ellipse 40% 35% at 100% 0%, rgba(249, 128, 18, 0.08), transparent 50%);
    background-attachment: fixed;
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
    text-underline-offset: 0.25em;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.25rem 4vw;
    position: sticky;
    top: 0;
    z-index: 5;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(16px);
}

.brand-lockup,
.rail-brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    text-decoration: none;
}

.brand-lockup:hover,
.rail-brand:hover {
    text-decoration: none;
}

.wordmark-nav,
.rail-brand span {
    font-family: var(--font);
    font-size: 1.15rem;
    font-weight: 500;
    letter-spacing: -0.02em;
}

.brand-mark {
    display: block;
    width: auto;
    height: 40px;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 1.75rem;
    font-size: 0.95rem;
}

.site-nav .nav-cta {
    color: #140a00;
    background: var(--orange);
    padding: 0.45rem 0.95rem;
    border-radius: 999px;
}

.site-nav .nav-cta:hover {
    text-decoration: none;
    background: #ffb15a;
}

.nav-toggle {
    display: none;
}

.rail-bar {
    display: contents;
}

.rail-here {
    display: none;
}

.flash-wrap {
    padding: 1.25rem 4vw 0;
}

.flash {
    margin: 0 0 0.75rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--hair);
    font-size: 0.95rem;
    line-height: 1.5;
}

.flash-error {
    border-bottom-color: var(--orange);
}

.hero-scale {
    position: relative;
    min-height: calc(100vh - 4.5rem);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 1.4rem 6vw 8vh;
    overflow: hidden;
}

.hero-scale h1 {
    margin: 6.5rem 0 0;
    max-width: 12em;
    font-size: clamp(2.6rem, 5vw, 4.2rem);
}

.constellation {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.hero-scale > :not(.constellation) {
    position: relative;
    z-index: 1;
}

.hero-brand {
    margin: 0 0 0.7rem;
    color: var(--muted);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-size: 0.78rem;
}

.hero-scale h1,
.chapter h2,
.close-band h2,
.faq h2,
.sheet-head h1,
.tree-head h1 {
    font-family: var(--display);
    font-weight: 500;
    letter-spacing: -0.03em;
    line-height: 1.08;
}

.hero-scale h1 {
    margin: 6.5rem 0 0;
    max-width: 12em;
    font-size: clamp(2.6rem, 5vw, 4.2rem);
}

.hero-lede,
.chapter-copy {
    max-width: 38rem;
    color: var(--muted);
    font-size: 1.15rem;
    line-height: 1.6;
}

.hero-lede {
    margin: 1.15rem 0 0;
}

.moodle-word {
    font-style: italic;
    text-decoration: underline;
    text-underline-offset: 0.14em;
}

.hero-lede + .hero-lede {
    margin-top: 0.85rem;
}

.cta,
button,
.form button,
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    align-self: flex-start;
    margin-top: 2.25rem;
    padding: 0.9rem 1.4rem;
    background: var(--orange);
    color: #140a00;
    border: 0;
    border-radius: 999px;
    font-family: inherit;
    font-size: 0.95rem;
    cursor: pointer;
    text-decoration: none;
}

.cta:hover,
button:hover,
.btn:hover {
    text-decoration: none;
    background: #ffb15a;
    color: #140a00;
}

.btn-quiet,
.form button.btn-quiet,
.card-refresh button,
.span-toggle button,
.preset-row button {
    margin-top: 0;
    background: transparent;
    color: var(--fg);
    border-radius: 999px;
    border: 0;
    padding: 0.35rem 0.2rem;
}

.btn-quiet:hover,
.card-refresh button:hover,
.span-toggle button:hover,
.preset-row button:hover {
    background: transparent;
    color: var(--orange);
}

.scale-strip {
    padding: 6rem 6vw 7rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.scale-note,
.chapter-kicker,
.page-kicker {
    margin: 0;
    color: var(--orange);
    font-size: 0.78rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.scale-figures {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.6rem 2rem;
    margin-top: 2rem;
}

.scale-figures p {
    margin: 0;
}

.scale-figures strong {
    display: block;
    font-family: var(--display);
    font-size: clamp(1.45rem, 2.2vw, 1.85rem);
    font-weight: 500;
    letter-spacing: -0.03em;
    line-height: 1.05;
}

.scale-figures span {
    display: block;
    margin-top: 0.8rem;
    color: var(--muted);
    max-width: 16ch;
    line-height: 1.45;
}

.chapter {
    padding: 8rem 6vw;
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.chapter h2,
.close-band h2,
.faq h2 {
    margin: 0.6rem 0 0;
    font-size: clamp(2.1rem, 3.6vw, 3.15rem);
    max-width: 14ch;
}

.chapter-copy {
    margin: 1.5rem 0 0;
}

.chapter-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: end;
}

.faq {
    padding: 6rem 6vw 4rem;
}

.faq details {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.25rem 0;
    max-width: 46rem;
}

.faq summary {
    cursor: pointer;
    font-size: 1.15rem;
}

.faq details p {
    color: var(--muted);
    line-height: 1.6;
    max-width: 42rem;
}

.close-band {
    padding: 8rem 6vw 6rem;
}

.moodle-strip {
    padding: 2rem 6vw 4rem;
}

.moodle-line {
    margin: 0;
    color: var(--orange);
}

.moodle-legal {
    margin: 0.6rem 0 0;
    color: var(--muted);
    font-size: 0.85rem;
}

.app-frame {
    display: grid;
    grid-template-columns: 220px 1fr;
    min-height: 100vh;
}

.rail {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 1.4rem 1.1rem 1.2rem;
    display: flex;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.55);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.rail-nav {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    margin-top: 2rem;
    overflow: auto;
}

.rail-nav a {
    padding: 0.4rem 0.55rem;
    border-radius: 8px;
    color: var(--muted);
    font-size: 0.92rem;
}

.rail-nav a:hover {
    text-decoration: none;
    color: var(--fg);
}

.rail-nav a.is-here {
    color: var(--fg);
    background: rgba(228, 212, 244, 0.08);
}

.rail-nav a.rail-own {
    margin-top: 0.65rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 0.7rem;
}

.rail-nav a.rail-soon {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.rail-nav a.rail-soon::before {
    content: "";
    width: 0.72rem;
    height: 0.72rem;
    border-radius: 50%;
    border: 1.5px solid var(--orange);
    box-shadow: 0 0 0 3px rgba(249, 128, 18, 0.16);
    flex: 0 0 auto;
}

.soon-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
    margin-top: 1.1rem;
    max-width: 46rem;
}

.soon-btn {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    padding: 0.9rem 1rem;
    text-decoration: none;
    color: var(--fg);
    background: linear-gradient(180deg, #141416, #070708);
    border: 1px solid rgba(249, 128, 18, 0.45);
    border-radius: 16px;
}

.soon-btn:hover {
    text-decoration: none;
    border-color: var(--orange);
}

.soon-orb {
    width: 0.85rem;
    height: 0.85rem;
    margin-top: 0.28rem;
    border-radius: 50%;
    border: 1.5px solid var(--orange);
    box-shadow: 0 0 0 4px rgba(249, 128, 18, 0.14);
    flex: 0 0 auto;
}

.soon-btn strong {
    display: block;
    font-weight: 500;
}

.soon-btn small {
    display: block;
    margin-top: 0.2rem;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.4;
}

.own-tabs {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin: 0.8rem 0 1.2rem;
}

.own-tab {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: 0.35rem;
}

.own-tab form {
    margin: 0;
}

.own-tab a.is-on {
    color: var(--fg);
}

.rail-foot {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    color: var(--muted);
    font-size: 0.78rem;
    padding-top: 1rem;
}

.rail-foot span,
.rail-foot a {
    overflow: hidden;
    text-overflow: ellipsis;
}

.rail-profile {
    color: var(--orange);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.72rem;
    padding-bottom: 0.55rem;
    margin-bottom: 0.35rem;
    border-bottom: 1px solid rgba(249, 128, 18, 0.55);
}

.app-frame {
    position: relative;
}

.org-mark {
    position: absolute;
    top: 0.7rem;
    right: 1.15rem;
    z-index: 4;
    height: 7.5rem;
    width: auto;
    max-width: 16rem;
    object-fit: contain;
    background: none;
    mix-blend-mode: normal;
}

.org-preview {
    display: block;
    height: 7.5rem;
    width: auto;
    max-width: 16rem;
    object-fit: contain;
    background: none;
    margin: 0.4rem 0 0.8rem;
}

body > .app-frame,
body > main {
    flex: 1 0 auto;
}

.app-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.sheet,
.auth-page {
    padding: 3.5rem 4vw 5rem;
    max-width: 72rem;
}

.auth-page {
    max-width: 36rem;
}

.sheet-head h1,
.tree-head h1,
.auth-head h1 {
    margin: 0.4rem 0 0;
    font-size: clamp(2.6rem, 5vw, 4.4rem);
}

.page-lede,
.sheet-meta,
.dash-meta {
    margin: 1rem 0 0;
    color: var(--muted);
    line-height: 1.55;
    max-width: 40rem;
}

.sheet-meta,
.dash-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
    align-items: center;
}

.tree-stage {
    min-height: 100vh;
    padding: 2.2rem 3vw 3rem;
    display: flex;
    flex-direction: column;
}

.tree-head {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    align-items: flex-end;
}

.tree-tools {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.8rem;
}

.span-toggle {
    display: flex;
    gap: 1rem;
}

.span-toggle button.is-on {
    color: var(--orange);
}

.tree-canvas {
    position: relative;
    flex: 1;
    min-height: 62vh;
    margin-top: 0.5rem;
}

.tree-svg,
.ribbon-svg {
    width: 100%;
    height: auto;
    display: block;
    overflow: visible;
}

.limb {
    fill: none;
    stroke: var(--lilac);
    stroke-width: 1.6;
    stroke-linecap: round;
    opacity: 0.9;
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
}

.limb.tone-lilac { stroke: var(--lilac); }
.limb.tone-peach { stroke: var(--peach); }
.limb.tone-mint { stroke: var(--mint); }
.limb.tone-butter { stroke: var(--butter); }
.limb.tone-blush { stroke: var(--blush); }
.limb.tone-peri { stroke: var(--peri); }

.tree-svg {
    width: 100%;
    height: auto;
    min-height: 0;
    display: block;
}

.tree-canvas {
    min-height: 0;
    overflow: visible;
}

.tree-world .tree-svg {
    width: auto;
    height: auto;
    max-width: none;
}

.kind-site .pill-label {
    font-size: 15px;
    font-weight: 600;
}

.tree-intro {
    margin: 0.9rem 0 0;
    max-width: 48rem;
    color: var(--muted);
    font-size: 0.98rem;
    line-height: 1.55;
}

.tree-viewport {
    position: relative;
    height: calc(100vh - 15.5rem);
    min-height: 68vh;
    overflow: hidden;
    cursor: grab;
    border-radius: 18px;
    background: radial-gradient(circle at 50% 48%, rgba(91, 44, 111, 0.22), transparent 46%);
}

.tree-viewport.is-drag {
    cursor: grabbing;
}

.tree-world {
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: 0 0;
}

.tree-zoom {
    position: absolute;
    top: 0.7rem;
    right: 0.7rem;
    z-index: 2;
    display: flex;
    gap: 0.35rem;
}

.tree-zoom button {
    width: 2.1rem;
    height: 2.1rem;
    margin: 0;
    padding: 0;
    border-radius: 999px;
    background: #161018;
    color: var(--fg);
    border: 1px solid rgba(255, 255, 255, 0.14);
    font-size: 1rem;
}

.tree-zoom button:hover {
    background: #2a2030;
    color: var(--fg);
}

.tree-zoom button[data-zoom="console"],
.tree-zoom button[data-zoom="fit"] {
    width: auto;
    min-width: 2.1rem;
    padding: 0 0.75rem;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

.tree-hint {
    position: absolute;
    left: 0.8rem;
    bottom: 0.55rem;
    margin: 0;
    color: var(--muted);
    font-size: 0.75rem;
    pointer-events: none;
}

.tree-pill {
    text-decoration: none;
}

.pill-label {
    text-anchor: middle;
    font-size: 11px;
    font-family: var(--font);
    fill: #1a1020;
}

.kind-course .pill-label {
    font-size: 10px;
}

.tone-lilac .pill-shape { fill: var(--lilac); }
.tone-peach .pill-shape { fill: var(--peach); }
.tone-mint .pill-shape { fill: var(--mint); }
.tone-butter .pill-shape { fill: var(--butter); }
.tone-blush .pill-shape { fill: var(--blush); }
.tone-peri .pill-shape { fill: var(--peri); }
.kind-site .pill-shape { fill: #f5f2f6; }

.pill-alert { fill: var(--orange); }

.site-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.8rem;
    margin-top: 1.35rem;
}

.site-stat {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 6.6rem;
    padding: 1rem 1.15rem 0.95rem;
    overflow: hidden;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background:
        linear-gradient(165deg, rgba(91, 44, 111, 0.28), transparent 42%),
        linear-gradient(180deg, #16141a 0%, #070708 100%);
    color: var(--fg);
    text-decoration: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.site-stat::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--purple);
}

.site-stat:nth-child(2n)::before {
    background: var(--orange);
}

.site-stat::after {
    content: "";
    position: absolute;
    right: -20%;
    top: -40%;
    width: 55%;
    height: 80%;
    background: radial-gradient(circle, rgba(249, 128, 18, 0.16), transparent 68%);
    pointer-events: none;
}

.site-stat:nth-child(2n)::after {
    background: radial-gradient(circle, rgba(91, 44, 111, 0.45), transparent 68%);
}

.site-stat:hover {
    text-decoration: none;
    color: var(--fg);
    transform: translateY(-3px);
    border-color: rgba(249, 128, 18, 0.7);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 16px 40px rgba(0, 0, 0, 0.35);
}

.site-stat strong {
    position: relative;
    display: block;
    margin-top: 0.45rem;
    font-size: clamp(2.1rem, 3vw, 2.75rem);
    font-weight: 500;
    letter-spacing: -0.045em;
    line-height: 0.95;
    color: #fff;
}

.site-stat span {
    position: relative;
    display: block;
    margin: 0;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
}

@media (prefers-reduced-motion: no-preference) {
    .tree-pill {
        opacity: 0;
        animation: pop 0.45s ease forwards;
    }
}

@keyframes pop {
    to { opacity: 1; }
}

.tree-caption {
    min-height: 1.6rem;
    margin: 0.4rem 0 0;
    color: var(--lilac);
    font-size: 1rem;
}

.ribbon-wrap {
    margin-top: 0.5rem;
}

.tree-seed {
    min-height: 58vh;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 1rem;
}

.seed-orb {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #fff6ea, var(--peach) 40%, var(--lilac) 72%, transparent 74%);
    box-shadow: 0 0 80px rgba(228, 212, 244, 0.35);
}

.tree-seed p {
    margin: 0;
    font-family: var(--display);
    font-size: clamp(2rem, 4vw, 3.2rem);
    max-width: 16ch;
    line-height: 1;
}

.limb {
    fill: none;
    stroke: var(--lilac);
    stroke-width: 1.4;
    stroke-linecap: round;
    opacity: 0.85;
}

.twig {
    fill: none;
    stroke: var(--peri);
    stroke-width: 1.1;
    stroke-linecap: round;
    opacity: 0.7;
}

.halo {
    fill: var(--lilac);
    opacity: 0.08;
}

.heart {
    fill: #140c18;
    stroke: var(--lilac);
    stroke-width: 1.5;
}

.bud {
    stroke: transparent;
    cursor: pointer;
}

.bud-lilac { fill: var(--lilac); }
.bud-peach { fill: var(--peach); }
.bud-butter { fill: var(--butter); }
.bud-mint { fill: var(--mint); }
.bud.is-alert { fill: var(--orange); }

.node-label {
    fill: var(--fg);
    font-size: 12px;
    font-family: var(--font);
}

.heart-label {
    fill: var(--fg);
    font-family: var(--display);
    font-size: 18px;
    text-anchor: middle;
}

.heart-sub {
    fill: var(--muted);
    font-size: 11px;
    text-anchor: middle;
    font-family: var(--font);
}

.ribbon-label {
    fill: var(--muted);
    font-size: 11px;
    font-family: var(--font);
    text-anchor: middle;
}

@media (prefers-reduced-motion: no-preference) {
    .limb,
    .twig {
        stroke-dasharray: 1;
        stroke-dashoffset: 1;
        animation: draw 0.8s ease forwards;
    }

    .bud.is-alert {
        transform-box: fill-box;
        transform-origin: center;
        animation: bloom 1.4s ease 1.05s 1;
    }

    .seed-orb {
        animation: bloom 2.8s ease infinite;
    }
}

@keyframes draw {
    to { stroke-dashoffset: 0; }
}

@keyframes bloom {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.45; }
}

.stat-row {
    display: flex;
    flex-wrap: wrap;
    gap: 2.5rem;
    margin: 2rem 0 0;
}

.stat-row strong {
    display: block;
    font-family: var(--display);
    font-size: 3rem;
    font-weight: 400;
    letter-spacing: -0.04em;
    line-height: 1;
}

.stat-row span {
    color: var(--muted);
    font-size: 0.85rem;
}

.table-wrap {
    margin-top: 2rem;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table.data {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

table.data tbody {
    counter-reset: ps-row;
}

table.data .row-num {
    width: 2.4rem;
    color: var(--muted);
    text-align: right;
    padding-right: 0.75rem;
    font-variant-numeric: tabular-nums;
}

table.data tbody td.row-num::before {
    counter-increment: ps-row;
    content: counter(ps-row);
}

table.data th {
    text-align: left;
    font-weight: 400;
    color: var(--muted);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.7rem 0.8rem 0.7rem 0;
}

table.data td {
    padding: 0.95rem 0.8rem 0.95rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    vertical-align: top;
}

.pill {
    display: inline-block;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    background: rgba(228, 212, 244, 0.12);
    color: var(--lilac);
    font-size: 0.8rem;
}

.pill-alert {
    background: rgba(249, 128, 18, 0.15);
    color: var(--orange);
}

.composer {
    margin-top: 0.6rem;
}

.composer summary {
    cursor: pointer;
    color: var(--peach);
}

.form label,
.check label {
    display: block;
    margin: 1.1rem 0 0.35rem;
    color: var(--muted);
    font-size: 0.85rem;
}

.form input:not([type="checkbox"]):not([type="radio"]),
.form textarea,
.form select {
    width: 100%;
    background: transparent;
    color: var(--fg);
    border: 0;
    border-bottom: 1px solid var(--hair);
    border-radius: 0;
    padding: 0.55rem 0;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
}

.form textarea {
    min-height: 6rem;
    border: 1px solid var(--hair);
    border-radius: var(--radius);
    padding: 0.75rem;
    margin-top: 0.4rem;
}

.form input:focus,
.form textarea:focus,
.form select:focus {
    border-color: var(--purple);
}

.field-hint,
.form-foot {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.form-foot a {
    color: var(--orange);
}

.checks {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1rem;
    margin-top: 0.8rem;
}

.checks label {
    display: flex;
    gap: 0.45rem;
    align-items: center;
    margin: 0;
    color: var(--fg);
}

.tick-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(11rem, 1fr));
    gap: 0.7rem 1.4rem;
    margin: 1.1rem 0 1.3rem;
}

.tick-grid label {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin: 0;
    color: var(--fg);
    font-size: 0.95rem;
}

.form input[type="checkbox"],
.welcome .form input[type="checkbox"],
.tick-grid input[type="checkbox"] {
    width: 1rem;
    min-width: 1rem;
    height: 1rem;
    flex: none;
    margin: 0;
    padding: 0;
    accent-color: var(--orange);
}

.panel {
    margin-top: 2.5rem;
    padding: 1.5rem 0 0;
}

.panel h2 {
    font-family: var(--display);
    font-weight: 400;
    font-size: 2rem;
    margin: 0;
}

.bars {
    display: grid;
    gap: 0.85rem;
    margin-top: 1.5rem;
}

.bar-row {
    display: grid;
    grid-template-columns: 7rem 1fr;
    gap: 1rem;
    align-items: center;
}

.bar-track {
    display: flex;
    height: 14px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.04);
}

.bar-track i {
    display: block;
    height: 100%;
}

.bar-taken { background: var(--mint); }
.bar-absence { background: var(--blush); }
.bar-missing { background: var(--butter); }

.tile-list {
    list-style: none;
    margin: 1rem 0 0;
    padding: 0;
}

.tile-list li {
    padding: 0.8rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.member-card {
    padding: 1.25rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.member-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.9rem;
}

.member-line form {
    margin: 0;
}

.member-line button {
    margin: 0;
    padding: 0.15rem 0.15rem;
    color: var(--orange);
    font-size: 0.92rem;
}

.preset-row {
    display: flex;
    gap: 1.25rem;
    margin-top: 0.5rem;
}

.empty {
    color: var(--muted);
    font-family: var(--display);
    font-size: 2rem;
    line-height: 1.1;
    max-width: 18ch;
}

@media (max-width: 900px) {
    .tick-grid {
        grid-template-columns: 1fr 1fr;
    }

    .scale-figures,
    .chapter-split,
    .site-stats {
        grid-template-columns: 1fr 1fr;
    }

    .hero-scale,
    .chapter,
    .scale-strip,
    .faq,
    .close-band,
    .moodle-strip {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

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

    .tree-tools {
        align-items: flex-start;
    }
}

.site-legal {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.35rem 0;
    width: 100%;
    margin-top: auto;
    padding: 1.15rem 1.5rem 1.45rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.4;
    letter-spacing: 0.01em;
}

.site-legal::before {
    content: "";
    position: absolute;
    left: 50%;
    top: -1px;
    width: 6.5rem;
    height: 1px;
    transform: translateX(-50%);
    background: var(--orange);
    box-shadow: 0 0 14px rgba(249, 128, 18, 0.75);
}

.site-legal a {
    color: var(--muted);
}

.site-legal a + a::before {
    content: "";
    display: inline-block;
    width: 0.28rem;
    height: 0.28rem;
    margin: 0 0.85rem 0.12rem;
    border-radius: 50%;
    background: rgba(249, 128, 18, 0.85);
    vertical-align: middle;
}

.site-legal a:hover {
    color: var(--fg);
    text-decoration: none;
}

.cookie-bar[hidden] {
    display: none !important;
}

.cookie-bar {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 40;
    max-width: 22rem;
    display: flex;
    gap: 0.8rem;
    align-items: center;
    padding: 0.75rem 0.9rem;
    background: #0c0c0e;
    border: 1px solid var(--hair);
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.cookie-bar p {
    margin: 0;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.4;
}

.cookie-bar a {
    color: var(--lilac);
}

.cookie-bar button {
    flex: none;
    background: var(--orange);
    color: #140a00;
    border: 0;
    border-radius: 999px;
    padding: 0.4rem 0.8rem;
    font: inherit;
    cursor: pointer;
}

.legal-page {
    padding: 2.2rem 8vw 4rem;
    max-width: none;
    text-align: center;
}

.legal-page h1 {
    margin: 0.3rem 0 0;
    font-size: clamp(2.4rem, 5vw, 4rem);
    letter-spacing: -0.03em;
}

.legal-doc {
    max-width: 68rem;
    margin-left: auto;
    margin-right: auto;
}

.legal-doc ul {
    display: inline-block;
    text-align: left;
    margin-left: auto;
    margin-right: auto;
}

.legal-doc h2 {
    margin: 2rem 0 0.4rem;
    font-size: 1.25rem;
    font-weight: 500;
}

.legal-doc p,
.legal-doc li {
    color: var(--muted);
    line-height: 1.6;
}

.price-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 2rem;
    text-align: left;
}

.price-box {
    background: linear-gradient(180deg, #141416, #070708);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 1.4rem 1.3rem 1.5rem;
    min-height: 22rem;
}

.price-box-focus {
    border-color: var(--purple);
    box-shadow: inset 3px 0 0 var(--orange);
}

.price-band {
    margin: 0;
    color: var(--lilac);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.75rem;
}

.price-figure {
    margin: 0.6rem 0;
    font-size: clamp(2.8rem, 4vw, 3.6rem);
    letter-spacing: -0.04em;
}

.price-box p,
.price-box li {
    color: var(--muted);
    line-height: 1.5;
}

.auth-page .signup-form .glow-field {
    position: relative;
    margin-top: 0.95rem;
}

.secret-field {
    position: relative;
}

.auth-page .form .secret-field > input:not([type="checkbox"]):not([type="radio"]) {
    padding-right: 2.7rem;
}

.form button.secret-eye,
.auth-page .signup-form button.secret-eye {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    z-index: 3;
    transform: translateY(-50%);
    width: 1.65rem;
    height: 1.65rem;
    margin: 0;
    padding: 0;
    background: transparent;
    color: rgba(245, 242, 246, 0.7);
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.form button.secret-eye:hover,
.form button.secret-eye:focus,
.auth-page .signup-form button.secret-eye:hover,
.auth-page .signup-form button.secret-eye:focus {
    background: transparent;
    color: #fff;
}

.secret-eye svg {
    width: 1.15rem;
    height: 1.15rem;
    display: block;
}

.secret-eye .eye-off {
    display: none;
}

.secret-eye.is-on .eye-on {
    display: none;
}

.secret-eye.is-on .eye-off {
    display: block;
}


.auth-page .signup-form .glow-field input:not([type="checkbox"]):not([type="radio"]) {
    width: 100%;
    margin: 0;
    padding: 1.35rem 2.8rem 0.55rem 1.15rem;
    color: #f5f2f6;
    font-size: 1.05rem;
    background:
        linear-gradient(#09090b, #09090b) padding-box,
        linear-gradient(115deg, rgba(91, 44, 111, 0.95), rgba(249, 128, 18, 0.9)) border-box;
    border: 1px solid transparent;
    border-radius: 18px;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.35);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.auth-page .signup-form .glow-field input:focus {
    outline: none;
    border-color: transparent;
    transform: translateY(-1px);
    box-shadow: 0 0 0 4px rgba(249, 128, 18, 0.16), 0 18px 42px rgba(91, 44, 111, 0.38);
}

.auth-page .signup-form .glow-field label {
    position: absolute;
    left: 1.15rem;
    top: 1rem;
    margin: 0;
    color: rgba(245, 242, 246, 0.62);
    font-size: 1rem;
    pointer-events: none;
    transition: top 0.16s ease, font-size 0.16s ease, color 0.16s ease, letter-spacing 0.16s ease;
}

.auth-page .signup-form .glow-field input:focus + label,
.auth-page .signup-form .glow-field input:not(:placeholder-shown) + label {
    top: 0.38rem;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--orange);
}

.auth-page .signup-form button:not(.secret-eye) {
    margin-top: 1.35rem;
    width: 100%;
    border-radius: 18px;
    padding: 0.85rem 1.1rem;
}

.auth-page .form input {
    width: 100%;
    background: #0c0c0e;
    color: var(--fg);
    border: 1px solid rgba(91, 44, 111, 0.65);
    border-radius: 999px;
    padding: 0.7rem 1rem;
    font-size: 1rem;
}

.auth-page .form input:focus {
    border-color: var(--orange);
    outline: none;
    box-shadow: 0 0 0 3px rgba(249, 128, 18, 0.18);
}

.term {
    margin: 1.4rem 0 0;
    max-width: 100%;
    min-height: 16rem;
    padding: 1.2rem 1.3rem;
    background: #070708;
    color: #f5f2f6;
    border: 1px solid rgba(91, 44, 111, 0.45);
    border-radius: 16px;
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.95rem;
    line-height: 1.55;
    white-space: pre;
    overflow: auto;
}

.term-line {
    display: block;
}

.term-cursor {
    display: inline-block;
    color: var(--orange);
    animation: blink 1s steps(1) infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem 1rem;
    align-items: end;
    margin: 1.4rem 0;
}

.filter-bar label {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    color: var(--muted);
    font-size: 0.78rem;
}

.span-box {
    display: inline-flex;
    align-items: stretch;
    margin-bottom: 0.05rem;
    border: 1px solid var(--orange);
    border-radius: 12px;
    overflow: hidden;
}

.span-box a {
    padding: 0.48rem 0.95rem;
    color: var(--fg);
    text-decoration: none;
    font-size: 0.92rem;
}

.span-box a + a {
    border-left: 1px solid rgba(249, 128, 18, 0.45);
}

.span-box a.is-on {
    background: var(--orange);
    color: #140a00;
}

.filter-bar select,
.filter-bar input,
.connect-form input,
.welcome .form input:not([type="checkbox"]) {
    background: #0c0c0e;
    color: var(--fg);
    border: 1px solid rgba(91, 44, 111, 0.65);
    border-radius: 999px;
    padding: 0.45rem 0.8rem;
    font: inherit;
    min-width: 10rem;
}

.course-boxes,
.tab-row,
.attend-board,
.tab-board,
.progress-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
}

.course-box,
.attend-card,
.progress-card {
    display: block;
    background: #0c0c0e;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 0.8rem 0.95rem;
    text-decoration: none;
}

.course-box strong,
.attend-card h2,
.progress-card h3,
.tutor-row h3 {
    display: block;
    font-weight: 500;
}

.course-box span,
.attend-card .field-hint {
    color: var(--muted);
    font-size: 0.85rem;
}

.course-box.is-on,
.attend-card {
    border-color: rgba(91, 44, 111, 0.8);
}

.attend-card {
    flex: 1 1 16rem;
}

.progress-card {
    flex: 1 1 100%;
}

.tutor-row {
    margin: 0 0 1.2rem;
}

.sq-row {
    display: flex;
    gap: 0.7rem;
    align-items: center;
    margin: 0.35rem 0;
}

.sq-row > span {
    width: 7.2rem;
    color: var(--muted);
    font-size: 0.78rem;
}

.sq-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.28rem;
}

.sq {
    width: 0.85rem;
    height: 0.85rem;
    border-radius: 3px;
    display: inline-block;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.sq-done {
    background: #1f8a4c;
    border-color: #1f8a4c;
}

.sq-miss {
    background: #c0392b;
    border-color: #c0392b;
}

.sq-strong {
    background: #f5f2f6;
    border-color: #f5f2f6;
}

.sq-mid {
    background: rgba(228, 212, 244, 0.55);
    border-color: transparent;
}

.sq-alert {
    background: var(--orange);
    border-color: var(--orange);
}

.sq-key {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 0.9rem;
    align-items: center;
    color: var(--muted);
    font-size: 0.82rem;
}

.sq-key .sq {
    margin-right: 0.25rem;
}

ol.name-list.numbered {
    list-style: decimal;
    columns: 1;
    padding-left: 1.8rem;
    color: var(--muted);
}

ol.name-list.numbered a {
    color: var(--fg);
}

.tutor-pick select {
    min-width: min(100%, 22rem);
}

.tutor-card {
    width: 100%;
    margin-top: 0.4rem;
    padding: 1.15rem 1.2rem 1.3rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    background: linear-gradient(180deg, #141416, #070708);
}

.tutor-card h2 {
    margin: 0;
    font-size: 1.7rem;
    font-weight: 500;
    letter-spacing: -0.03em;
}

.tutor-card .table-wrap {
    margin-top: 1rem;
}

table.data.mark-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
}

.mark-table .num {
    width: 6.2rem;
    text-align: right;
}

.mark-table td {
    overflow-wrap: anywhere;
}

.mark-table .register-message,
.mark-table .register-message summary,
.cmp-message,
.cmp-message summary {
    overflow-wrap: normal;
    word-break: normal;
}

.mark-detail td {
    padding-top: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.mark-line {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
    max-width: 100%;
    padding: 0.15rem 0 0.55rem;
}

.mark-people {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1rem;
    width: 100%;
    min-width: 0;
}

.mark-people li {
    font-size: 0.88rem;
}

.mark-people time {
    display: inline-block;
    margin-left: 0.35rem;
    color: var(--muted);
}

.mark-phone {
    display: none;
}

.mark-card {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.mark-card h3 {
    margin: 0.15rem 0 0.35rem;
    font-size: 1.05rem;
    font-weight: 500;
}

.mark-kicker {
    margin: 0;
    color: var(--muted);
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.mark-counts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 0.9rem;
    margin: 0 0 0.45rem;
    align-items: center;
}

.create-prompt textarea {
    width: 100%;
    max-width: 40rem;
}

.name-list {
    list-style: none;
    padding: 0;
    margin: 0;
    columns: 3;
}

.count-empty {
    display: inline-block;
    min-width: 1.35rem;
    padding: 0.05rem 0.35rem;
    text-align: center;
    background: #c0392b;
    color: #fff;
    border-radius: 4px;
    font-size: 0.82rem;
    line-height: 1.3;
}

.progress-list {
    flex-direction: column;
    flex-wrap: nowrap;
}

.progress-card {
    width: 100%;
    min-width: 0;
}

.work-block {
    margin: 0.85rem 0 0.2rem;
    min-width: 0;
}

.work-block h4 {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
}

.work-list {
    list-style: none;
    padding: 0.35rem 0 0.5rem;
    margin: 0;
    display: flex;
    flex-wrap: nowrap;
    gap: 0.85rem;
    overflow-x: auto;
}

.work-list li {
    display: flex;
    flex: 0 0 auto;
    gap: 0.45rem;
    align-items: center;
    font-size: 0.88rem;
    line-height: 1.3;
    white-space: nowrap;
}

.progress-card {
    background: #fbf8fc;
    color: #161018;
    border: 1px solid rgba(91, 44, 111, 0.16);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28);
    padding: 1.05rem 1.15rem 0.85rem;
}

.progress-card h3 {
    margin: 0;
    color: #161018;
    font-size: 1.2rem;
    letter-spacing: -0.03em;
}

.progress-card .field-hint {
    color: #5c5366;
}

.progress-card .work-block h4 {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    color: #5b2c6f;
}

.progress-card .work-list {
    align-items: center;
    background: #fff;
    border: 1px solid rgba(22, 16, 24, 0.08);
    border-radius: 10px;
    padding: 0.55rem 0.7rem;
}

.progress-card .work-list li span {
    color: #161018;
}

.progress-card .sq {
    border-color: rgba(22, 16, 24, 0.28);
}

.register-message {
    margin-top: 0.45rem;
    max-width: 100%;
}

.mark-line .register-message {
    margin-top: 0;
}

.register-message summary {
    display: inline-block;
    cursor: pointer;
    color: var(--orange);
    border: 1px solid var(--orange);
    border-radius: 999px;
    padding: 0.28rem 0.75rem;
    font-size: 0.82rem;
    white-space: nowrap;
}

.register-message form {
    max-width: 100%;
}

.register-message textarea {
    display: block;
    width: min(36rem, 100%);
    max-width: 100%;
    box-sizing: border-box;
    margin: 0.45rem 0;
    min-height: 4.2rem;
}

.cmp-message .register-message textarea {
    width: min(26rem, 78vw);
    min-height: 8.5rem;
}

.cmp-high {
    color: #1f8a4c;
    font-weight: 600;
}

.cmp-low {
    color: #c0392b;
    font-weight: 600;
}

.cmp-odd {
    color: #fff;
    background: #c0392b;
    font-weight: 600;
    border-radius: 4px;
}

.about-page .page-lede {
    margin-left: auto;
    margin-right: auto;
}

.about-people {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 3.5rem;
    margin: 2.2rem auto 0;
    text-align: center;
}

.about-person {
    width: 15rem;
    max-width: 100%;
    background: none;
    border: 0;
    padding: 0;
}

.about-person img {
    width: 4.5rem;
    height: 4.5rem;
    object-fit: cover;
    object-position: center 18%;
    border-radius: 50%;
    display: block;
    margin: 0 auto;
}

.about-person h2 {
    margin: 0.75rem 0 0.3rem;
    font-size: 1.05rem;
    font-weight: 500;
    letter-spacing: -0.02em;
}

.about-role {
    margin: 0 auto;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.45;
}

.about-role a,
.about-more a {
    color: var(--lilac);
}

.about-link {
    display: inline-block;
    margin-top: 0.45rem;
    color: var(--orange);
    font-size: 0.9rem;
}

.about-more {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.4rem 1.4rem;
    margin: 1.6rem auto 0;
    color: var(--muted);
}

.suite-line {
    display: flex;
    justify-content: center;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.35rem 0;
    max-width: 46rem;
    margin: 1.8rem auto 0;
    text-align: center;
    font-size: 0.95rem;
    line-height: 1.7;
}

.suite-line span {
    margin-right: 0.55rem;
    color: var(--fg);
    font-weight: 500;
}

.suite-line a {
    color: var(--lilac);
}

.suite-line a + a::before {
    content: "|";
    margin: 0 0.55rem;
    color: var(--orange);
}

.suite-line a:first-of-type + a::before {
    content: "/";
}

.stats-spans {
    margin-top: 0.4rem;
}

.stats-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.7rem 1rem;
    margin: 0.9rem 0 0;
}

.stats-bot {
    color: var(--muted);
    text-decoration: none;
    border-bottom: 1px solid transparent;
}

.stats-bot.is-on {
    color: var(--orange);
    border-bottom-color: var(--orange);
}

.stats-week h2 {
    color: var(--lilac);
}

.stats-table tr.is-person td:first-child {
    box-shadow: inset 3px 0 0 #1f8a4c;
}

.stats-table tr.is-bot td:first-child {
    box-shadow: inset 3px 0 0 #c0392b;
}

.stats-table tr.is-bot {
    color: var(--muted);
}

.stats-table code {
    color: var(--orange);
}

.sent-modal {
    border: 0;
    border-radius: 16px;
    padding: 1.1rem 1.25rem 1rem;
    background: #f7f4f8;
    color: #161018;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

.sent-modal::backdrop {
    background: rgba(0, 0, 0, 0.35);
}

.sent-modal p {
    margin: 0 0 0.8rem;
    font-size: 1.05rem;
}

.sent-modal button {
    margin: 0;
    background: transparent;
    color: #5b2c6f;
    border: 0;
    padding: 0.2rem 0;
}

.activity-console {
    margin: 1.2rem 0 0;
    padding: 1rem 1.1rem;
    max-width: 100%;
    overflow: auto;
    background: #070708;
    color: #d7f5c8;
    border: 1px solid rgba(249, 128, 18, 0.35);
    border-radius: 12px;
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.86rem;
    line-height: 1.55;
    white-space: pre;
}

.nudge {
    margin: 0 0 1.1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nudge form {
    display: grid;
    gap: 0.55rem;
    max-width: 36rem;
    margin-top: 0.45rem;
}

.pill-ok {
    background: #1f8a4c;
    color: #fff;
}

.register-desk,
.register-phone,
.panel,
.sheet {
    min-width: 0;
    max-width: 100%;
}

table.data.register-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
}

.register-table th,
.register-table td {
    white-space: normal;
    overflow-wrap: anywhere;
}

.register-table th:last-child,
.register-table td:last-child {
    width: 8.4rem;
    white-space: nowrap;
    overflow-wrap: normal;
    position: sticky;
    right: 0;
    background: #070708;
    z-index: 1;
}

.register-phone {
    display: none;
}

.name-list a:hover {
    color: var(--orange);
}

.welcome-points,
.steps {
    color: var(--muted);
    line-height: 1.55;
    max-width: 40rem;
}

#your-tabs {
    scroll-margin-top: 5rem;
}

#tab-error {
    margin: 0 0 0.8rem;
}

#tab-error[hidden] {
    display: none !important;
}

.start-panel {
    margin-top: 2.2rem;
    max-width: 46rem;
    padding: 1.35rem 1.45rem 1.2rem;
    border: 1px solid rgba(249, 128, 18, 0.9);
    border-radius: 28px;
    background:
        radial-gradient(90% 70% at 0% 0%, rgba(249, 128, 18, 0.1), transparent 42%),
        linear-gradient(180deg, rgba(20, 16, 22, 0.96), rgba(7, 7, 8, 0.98));
    box-shadow:
        0 0 0 1px rgba(249, 128, 18, 0.18),
        0 0 32px rgba(249, 128, 18, 0.28),
        0 18px 40px rgba(0, 0, 0, 0.35);
}

.can-do-title {
    margin: 0 0 0.35rem;
    font-size: 1.45rem;
    font-weight: 500;
    letter-spacing: -0.03em;
}

.can-do {
    list-style: none;
    margin: 0;
    padding: 0;
    max-width: 38rem;
}

.can-do li {
    position: relative;
    margin: 0;
    padding: 0.72rem 0 0.72rem 1.15rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--fg);
    line-height: 1.45;
}

.can-do li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 1.05rem;
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    border: 1.5px solid var(--orange);
    box-shadow: 0 0 8px rgba(249, 128, 18, 0.65);
    background: transparent;
}

.start-panel .page-lede {
    margin-top: 1rem;
}

.start-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.85rem;
    margin-top: 0.85rem;
}

.start-panel .guide-open {
    margin-top: 0;
}

.start-here {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--orange);
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.start-here::before {
    content: "\2190";
    font-size: 1.15rem;
    text-shadow: 0 0 10px rgba(249, 128, 18, 0.8);
}

.guide-open {
    margin-top: 1.1rem;
}

dialog.guide-modal {
    width: min(58rem, calc(100vw - 2rem));
    height: min(36rem, calc(100vh - 2rem));
    max-width: none;
    max-height: none;
    margin: auto;
    padding: 0;
    border: 1px solid rgba(91, 44, 111, 0.55);
    border-radius: 20px;
    background: #0c0c0e;
    color: var(--fg);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.55);
}

dialog.guide-modal[open] {
    display: grid;
    grid-template-columns: 13.5rem 1fr;
    animation: guide-in 0.32s ease;
}

dialog.guide-modal::backdrop {
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(8px);
}

@keyframes guide-in {
    from { opacity: 0; transform: translateY(14px) scale(0.985); }
    to { opacity: 1; transform: none; }
}

.guide-side {
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 1.15rem 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.45);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.guide-nav {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    margin-top: 0.8rem;
}

.guide-nav button,
.guide-close {
    margin: 0;
    background: transparent;
    color: var(--muted);
    border: 0;
    border-radius: 10px;
    box-shadow: none;
}

.guide-nav button {
    justify-content: flex-start;
    width: 100%;
    padding: 0.72rem 0.75rem;
    text-align: left;
    font-size: 0.95rem;
}

.guide-nav button:hover,
.guide-close:hover {
    background: transparent;
    color: var(--fg);
}

.guide-nav button.is-on {
    color: var(--fg);
    background: rgba(228, 212, 244, 0.08);
    box-shadow: inset 3px 0 0 var(--orange);
}

.guide-main {
    position: relative;
    min-width: 0;
    min-height: 0;
    overflow: auto;
    padding: 1.15rem 1.4rem 1.5rem;
}

.guide-close {
    position: sticky;
    top: 0;
    float: right;
    z-index: 1;
    padding: 0.35rem 0.2rem;
    color: var(--muted);
}

.guide-main h2 {
    margin: 0.15rem 0 0.4rem;
    padding-right: 4rem;
    font-size: 1.7rem;
    font-weight: 500;
    letter-spacing: -0.03em;
}

.guide-main code {
    color: var(--lilac);
    font-size: 0.88em;
}

.step-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1rem;
}

.token-saved {
    margin: 1.1rem 0 0;
}

.token-saved span {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--muted);
    font-size: 0.85rem;
}

.token-saved strong {
    display: block;
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--hair);
    letter-spacing: 0.18em;
    font-weight: 500;
}

#token-entry[hidden],
#save-token[hidden],
#test-token[hidden],
#edit-token[hidden],
.token-saved[hidden],
.deck-wait[hidden],
.step-actions[hidden] {
    display: none !important;
}

.deck-wait {
    margin-top: 1.15rem;
    padding: 0.85rem 0.2rem 0.2rem;
}

.deck-sky {
    position: relative;
    height: 4.6rem;
    margin-bottom: 0.35rem;
}

.deck-lines {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.deck-lines path {
    fill: none;
    stroke: rgba(249, 128, 18, 0.55);
    stroke-width: 1;
    stroke-linecap: round;
    stroke-dasharray: 8 7;
    animation: deck-draw 2.4s linear infinite;
}

.deck-star {
    position: absolute;
    width: 7px;
    height: 7px;
    margin: -3px 0 0 -3px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(249, 128, 18, 0.18), 0 0 14px rgba(249, 128, 18, 0.85);
    animation: deck-pulse 1.8s ease-in-out infinite;
}

.deck-star:nth-child(3) { animation-delay: 0.2s; }
.deck-star:nth-child(4) { animation-delay: 0.45s; }
.deck-star:nth-child(5) { animation-delay: 0.7s; }
.deck-star:nth-child(6) { animation-delay: 0.95s; }
.deck-star:nth-child(7) { animation-delay: 1.2s; }

.deck-wait-copy {
    margin: 0;
    color: var(--fg);
    font-size: 0.98rem;
    letter-spacing: 0.01em;
}

.deck-dashes {
    display: inline-flex;
    gap: 0.28rem;
    margin-left: 0.45rem;
    vertical-align: middle;
}

.deck-dashes i {
    display: block;
    width: 0.72rem;
    height: 2px;
    border-radius: 2px;
    background: var(--orange);
    opacity: 0.2;
    animation: deck-dash 1.25s ease-in-out infinite;
}

.deck-dashes i:nth-child(2) { animation-delay: 0.15s; }
.deck-dashes i:nth-child(3) { animation-delay: 0.3s; }
.deck-dashes i:nth-child(4) { animation-delay: 0.45s; }
.deck-dashes i:nth-child(5) { animation-delay: 0.6s; }

@keyframes deck-draw {
    to { stroke-dashoffset: -30; }
}

@keyframes deck-pulse {
    0%, 100% { transform: scale(0.75); opacity: 0.45; }
    50% { transform: scale(1.25); opacity: 1; }
}

@keyframes deck-dash {
    0%, 100% { opacity: 0.18; transform: scaleX(0.6); }
    40% { opacity: 1; transform: scaleX(1); }
}

.token-help {
    position: relative;
    display: inline;
    color: var(--fg);
    border-bottom: 1px dashed rgba(249, 128, 18, 0.75);
    cursor: help;
    outline: none;
}

.form label .token-help {
    color: var(--fg);
}

.token-help:hover,
.token-help:focus {
    z-index: 6;
}

.token-card {
    display: none;
    position: absolute;
    z-index: 7;
    left: 0;
    top: calc(100% + 0.45rem);
    width: min(28rem, calc(100vw - 4rem));
    max-height: min(22rem, 60vh);
    overflow: auto;
    padding: 0.85rem 1rem 1rem;
    text-align: left;
    font-weight: 400;
    font-size: 0.84rem;
    line-height: 1.45;
    letter-spacing: 0;
    text-transform: none;
    color: var(--fg);
    background: #141218;
    border: 1px solid var(--orange);
    border-radius: 16px;
    box-shadow: 0 22px 54px rgba(0, 0, 0, 0.55);
}

.token-help:hover .token-card,
.token-help:focus .token-card,
.token-help:focus-within .token-card {
    display: block;
}

.token-card strong {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 500;
}

.token-card ol {
    margin: 0;
    padding-left: 1.15rem;
}

.token-card li {
    margin: 0.4rem 0;
}

.token-card code {
    color: var(--lilac);
    font-size: 0.78rem;
}

.tree-console {
    margin: 0;
    max-width: 100%;
    padding: 1rem 1.2rem 4rem;
    min-height: 68vh;
    overflow: auto;
    color: #f5f2f6;
    background: #070708;
    border: 1px solid rgba(91, 44, 111, 0.4);
    border-radius: 16px;
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.82rem;
    line-height: 1.45;
    white-space: pre;
}

.life-card .stat-row {
    margin: 0.8rem 0 1rem;
}

.course-sort th button {
    background: none;
    border: 0;
    color: inherit;
    font: inherit;
    cursor: pointer;
    padding: 0;
}

@media (max-width: 900px) {
    html {
        -webkit-text-size-adjust: 100%;
    }

    body {
        overflow-x: clip;
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }

    .nav-toggle {
        display: inline-flex;
        margin: 0;
        min-height: 2.75rem;
        padding: 0.4rem 0.95rem;
        background: transparent;
        color: var(--fg);
        border: 1px solid rgba(255, 255, 255, 0.16);
        border-radius: 999px;
        font-size: 0.92rem;
    }

    .nav-toggle:hover {
        background: transparent;
        color: var(--orange);
    }

    .site-header {
        flex-wrap: wrap;
        gap: 0.6rem;
        padding: 0.7rem 1rem;
        padding-top: calc(0.7rem + env(safe-area-inset-top));
    }

    .site-nav {
        display: none;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 0;
        padding-bottom: 0.4rem;
    }

    .site-nav.is-open {
        display: flex;
    }

    .site-nav a {
        padding: 0.85rem 0.15rem;
        border-top: 1px solid rgba(255, 255, 255, 0.06);
    }

    .site-nav .nav-cta {
        margin-top: 0.7rem;
        text-align: center;
        min-height: 2.75rem;
    }

    .app-frame {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }

    .rail {
        position: sticky;
        top: 0;
        z-index: 30;
        height: auto;
        padding: 0.55rem 0.8rem 0.45rem;
        padding-top: calc(0.55rem + env(safe-area-inset-top));
        border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        background: rgba(0, 0, 0, 0.92);
        backdrop-filter: blur(16px);
    }

    .rail-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.6rem;
    }

    .rail-here {
        display: block;
        flex: 1;
        min-width: 0;
        color: var(--orange);
        font-size: 0.82rem;
        text-align: right;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .rail-nav {
        display: none;
        flex-direction: column;
        flex-wrap: nowrap;
        gap: 0.1rem;
        margin-top: 0.45rem;
        max-height: min(68vh, 26rem);
    }

    .rail-nav.is-open {
        display: flex;
    }

    .rail-nav a {
        padding: 0.72rem 0.6rem;
        font-size: 1rem;
    }

    .rail-nav a.rail-own {
        margin-top: 0.35rem;
    }

    .rail-foot {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 0.8rem;
        padding-top: 0.45rem;
    }

    .rail-foot a {
        min-height: 2.75rem;
        display: inline-flex;
        align-items: center;
    }

    .hero-scale {
        min-height: 0;
        padding-top: 1.2rem;
        padding-bottom: 2.5rem;
    }

    .hero-scale h1 {
        margin-top: 0.8rem;
        font-size: clamp(2.15rem, 11vw, 3.1rem);
    }

    .hero-lede,
    .chapter-copy {
        font-size: 1.02rem;
    }

    .chapter {
        min-height: 0;
        padding-top: 2.6rem;
        padding-bottom: 2.6rem;
    }

    .chapter-split {
        grid-template-columns: 1fr;
        gap: 2.2rem;
    }

    .scale-strip,
    .faq,
    .close-band {
        padding-top: 2.6rem;
        padding-bottom: 2.6rem;
    }

    .scale-figures {
        grid-template-columns: 1fr 1fr;
        gap: 1.2rem;
    }

    .sheet,
    .auth-page,
    .legal-page {
        padding: 1.35rem 1rem 2.6rem;
    }

    .sheet-head h1,
    .tree-head h1,
    .auth-head h1,
    .legal-page h1 {
        font-size: clamp(2rem, 10vw, 2.8rem);
    }

    .tree-stage {
        min-height: 0;
        padding: 1rem 0.85rem 1.5rem;
    }

    .tree-viewport {
        height: 68vh;
        min-height: 22rem;
    }

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-bar label,
    .filter-bar select,
    .filter-bar input,
    .filter-bar button {
        width: 100%;
        min-width: 0;
    }

    .filter-bar button {
        margin-top: 0.15rem;
        min-height: 2.75rem;
    }

    .span-box {
        width: 100%;
    }

    .span-box a {
        flex: 1;
        text-align: center;
    }

    .tutor-card {
        padding: 1rem 0.85rem 1.1rem;
    }

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

    .register-desk,
    .mark-desk {
        display: none;
    }

    .register-phone {
        display: block;
    }

    .mark-phone {
        display: block;
    }

    .mark-line {
        flex-direction: column;
    }

    .register-message textarea,
    .cmp-message .register-message textarea {
        width: 100%;
        max-width: 100%;
    }

    .cmp-message {
        min-width: 6.5rem;
    }

    .tutor-pick select {
        width: 100%;
    }

    .form input:not([type="checkbox"]):not([type="radio"]),
    .form textarea,
    .form select,
    .filter-bar select,
    .filter-bar input {
        font-size: 16px;
    }

    .tick-grid {
        grid-template-columns: 1fr;
    }

    .tick-grid label {
        min-height: 2.75rem;
    }

    .price-grid,
    .name-list {
        grid-template-columns: 1fr;
        columns: 1;
    }

    .about-people {
        gap: 1.6rem;
    }

    .about-person {
        width: 11.5rem;
    }

    .price-box {
        min-height: 0;
    }

    .stat-row {
        gap: 1.2rem 1.6rem;
    }

    .stat-row strong {
        font-size: 2.2rem;
    }

    .term,
    .tree-console {
        font-size: 0.78rem;
    }

    .cookie-bar {
        left: 0.7rem;
        right: 0.7rem;
        bottom: calc(0.7rem + env(safe-area-inset-bottom));
        max-width: none;
    }

    .site-legal {
        padding-bottom: calc(1.6rem + env(safe-area-inset-bottom));
    }

    .own-tab button,
    .member-card button,
    .step-actions button {
        min-height: 2.75rem;
    }

    dialog.guide-modal {
        width: calc(100vw - 1rem);
        height: calc(100vh - 1rem);
        height: calc(100dvh - 1rem);
        border-radius: 16px;
    }

    dialog.guide-modal[open] {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }

    .guide-side {
        border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        padding-bottom: 0.6rem;
    }

    .guide-nav {
        flex-direction: row;
        overflow-x: auto;
        margin-top: 0.45rem;
    }

    .guide-nav button {
        width: auto;
        white-space: nowrap;
    }

    .guide-nav button.is-on {
        box-shadow: inset 0 -2px 0 var(--orange);
    }
}

@media (prefers-reduced-motion: reduce) {
    dialog.guide-modal[open] {
        animation: none;
    }
}
