/*
 * Math Planet — the public website's look (home, about, contact).
 *
 * A dark, lively "math platform" look: a living graph of points and lines that
 * follows the pointer, drifting aurora light, math signs floating in the
 * distance, and cards that light up under the cursor.
 *
 * Dark is the default; visitors can switch to a light version (the choice is
 * kept in localStorage and applied as html[data-mp-theme]).
 *
 * Everything here is scoped to body.mp-themed, which the public layout sets.
 * The student sign-in pages draw the same header and footer without it, so
 * they keep the plain styles in site.css. The shared header and footer are
 * re-coloured through the --mp-* tokens they already use.
 */

/* Lets the frame's gradient border rotate smoothly. */
@property --hm-angle {
    syntax: '<angle>';
    inherits: false;
    initial-value: 0deg;
}

/* ── Theme tokens ───────────────────────────────────────────────────────── */
html[data-mp-theme="dark"] body.mp-themed {
    --hm-bg: #04050a;
    --hm-bg-soft: #080a13;
    --hm-surface: rgba(255, 255, 255, .045);
    --hm-surface-hover: rgba(255, 255, 255, .07);
    --hm-surface-solid: #0d101b;
    --hm-line: rgba(255, 255, 255, .10);
    --hm-line-strong: rgba(255, 255, 255, .20);
    --hm-ink: #f5f7ff;
    --hm-text: #b9c1d8;
    --hm-muted: #838dab;
    --hm-brand: #6d93ff;
    --hm-header: rgba(10, 12, 22, .66);
    --hm-grid: rgba(255, 255, 255, .05);
    --hm-glow-a: rgba(79, 110, 255, .42);
    --hm-glow-b: rgba(168, 85, 247, .32);
    --hm-glow-c: rgba(34, 211, 238, .22);
    --hm-net: 150, 175, 255;
    --hm-glyph-alpha: .34;
    --hm-shadow: 0 30px 60px -30px rgba(0, 0, 0, .9);
    color-scheme: dark;
}
html[data-mp-theme="light"] body.mp-themed {
    --hm-bg: #f4f6ff;
    --hm-bg-soft: #e9edff;
    --hm-surface: rgba(255, 255, 255, .8);
    --hm-surface-hover: #ffffff;
    --hm-surface-solid: #ffffff;
    --hm-line: rgba(30, 41, 99, .11);
    --hm-line-strong: rgba(30, 41, 99, .22);
    --hm-ink: #0a0f24;
    --hm-text: #47516d;
    --hm-muted: #6c7693;
    --hm-brand: #2f5bff;
    --hm-header: rgba(255, 255, 255, .78);
    --hm-grid: rgba(30, 41, 99, .07);
    --hm-glow-a: rgba(79, 110, 255, .26);
    --hm-glow-b: rgba(168, 85, 247, .2);
    --hm-glow-c: rgba(34, 211, 238, .2);
    --hm-net: 47, 91, 255;
    --hm-glyph-alpha: .3;
    --hm-shadow: 0 30px 60px -34px rgba(30, 41, 99, .45);
    /* Deeper accents, so coloured text stays readable on a light page. */
    --hm-blue: #2f5bff;
    --hm-violet: #7c3aed;
    --hm-cyan: #0891b2;
    --hm-pink: #db2777;
    --hm-amber: #c2710c;
    --hm-green: #16a34a;
    --hm-grad: linear-gradient(100deg, #2f5bff 0%, #7c3aed 35%, #0891b2 65%, #2f5bff 100%);
    color-scheme: light;
}

body.mp-themed {
    /* Accent colours (the light theme swaps in deeper ones above). */
    --hm-blue: #6d93ff;
    --hm-violet: #b197fc;
    --hm-cyan: #38d9f5;
    --hm-pink: #ff7eb6;
    --hm-amber: #ffc94d;
    --hm-green: #4ade80;
    --hm-grad: linear-gradient(100deg, #6d93ff 0%, #b197fc 35%, #38d9f5 65%, #6d93ff 100%);
    --hm-math: 'Cambria Math', 'STIX Two Math', 'Times New Roman', Georgia, serif;

    /* Re-colour the shared header, footer and buttons from site.css. */
    --mp-ink: var(--hm-ink);
    --mp-text: var(--hm-text);
    --mp-muted: var(--hm-muted);
    --mp-line: var(--hm-line);
    --mp-soft: var(--hm-bg-soft);
    --mp-bg: var(--hm-bg);
    --mp-brand: var(--hm-brand);
    --mp-brand-dark: var(--hm-brand);

    background: var(--hm-bg);
    color: var(--hm-text);
    overflow-x: hidden;
    transition: background .3s, color .3s;
}
body.mp-themed main, body.mp-themed .mp-footer { position: relative; z-index: 1; }
/* Decorations may poke past the page edge; never let that cause sideways scrolling. */
body.mp-themed main { overflow-x: clip; }

/* How far down the page the visitor is. */
.hm-progress { position: fixed; top: 0; left: 0; z-index: 60; width: 100%; height: 3px; background: var(--hm-grad); background-size: 200% auto; transform: scaleX(0); transform-origin: 0 50%; }

/* ── The sky: aurora light, graph paper, a living graph, distant math signs ─ */
.hm-sky { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.hm-glow { position: absolute; border-radius: 50%; filter: blur(95px); will-change: transform; }
.hm-glow-a { top: -20vh; left: -12vw; width: 60vw; height: 60vw; max-width: 780px; max-height: 780px; background: var(--hm-glow-a); animation: hm-drift-a 22s ease-in-out infinite alternate; }
.hm-glow-b { top: 4vh; right: -16vw; width: 54vw; height: 54vw; max-width: 720px; max-height: 720px; background: var(--hm-glow-b); animation: hm-drift-b 26s ease-in-out infinite alternate; }
.hm-glow-c { bottom: -26vh; left: 24vw; width: 50vw; height: 50vw; max-width: 660px; max-height: 660px; background: var(--hm-glow-c); animation: hm-drift-c 30s ease-in-out infinite alternate; }
@keyframes hm-drift-a { to { transform: translate3d(16vw, 12vh, 0) scale(1.15); } }
@keyframes hm-drift-b { to { transform: translate3d(-18vw, 16vh, 0) scale(.88); } }
@keyframes hm-drift-c { to { transform: translate3d(14vw, -14vh, 0) scale(1.2); } }
.hm-grid {
    position: absolute;
    inset: -44px 0 0;
    background-image:
        linear-gradient(var(--hm-grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--hm-grid) 1px, transparent 1px);
    background-size: 44px 44px;
    -webkit-mask-image: radial-gradient(110% 85% at 50% 0%, #000 20%, transparent 80%);
    mask-image: radial-gradient(110% 85% at 50% 0%, #000 20%, transparent 80%);
    animation: hm-grid-slide 9s linear infinite;
}
@keyframes hm-grid-slide { to { transform: translate3d(0, 44px, 0); } }
.hm-net { position: absolute; inset: 0; width: 100%; height: 100%; }

/* Math signs hanging in the distance, each bobbing at its own pace. */
.hm-glyph {
    position: absolute;
    left: var(--x);
    top: var(--y);
    color: var(--tone);
    font: italic 600 var(--s) / 1 var(--hm-math);
    opacity: var(--hm-glyph-alpha);
    text-shadow: 0 0 26px color-mix(in srgb, var(--tone) 70%, transparent);
    animation: hm-bob var(--d) ease-in-out var(--w) infinite alternate;
    will-change: transform;
}
.hm-glyph.is-far { filter: blur(2.5px); opacity: calc(var(--hm-glyph-alpha) * .7); }
@keyframes hm-bob {
    from { transform: translate3d(-14px, 18px, 0) rotate(-9deg); }
    to { transform: translate3d(16px, -22px, 0) rotate(11deg); }
}
.hm-tone-blue { --tone: var(--hm-blue); }
.hm-tone-violet { --tone: var(--hm-violet); }
.hm-tone-cyan { --tone: var(--hm-cyan); }
.hm-tone-pink { --tone: var(--hm-pink); }
.hm-tone-amber { --tone: var(--hm-amber); }
.hm-tone-green { --tone: var(--hm-green); }

/* ── Shared header and footer, re-coloured ──────────────────────────────── */
/* The header floats as a glass pill. */
body.mp-themed .mp-header { top: 12px; margin-top: 12px; border: 0; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
body.mp-themed .mp-header-in {
    max-width: 1160px;
    height: 82px;
    padding: 0 1rem 0 1.1rem;
    border: 1px solid var(--hm-line);
    border-radius: 20px;
    background: var(--hm-header);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    backdrop-filter: saturate(180%) blur(16px);
    box-shadow: var(--hm-shadow);
}
body.mp-themed .mp-brand-mark { background: linear-gradient(135deg, #4f6eff, #8b5cf6); box-shadow: 0 6px 18px -6px rgba(99, 102, 241, .8); }
body.mp-themed .mp-brand em { background: var(--hm-grad); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent; animation: hm-shine 7s linear infinite; }
body.mp-themed .mp-nav-link.is-active::after { height: 3px; background: var(--hm-grad); }

body.mp-themed .mp-btn { position: relative; overflow: hidden; border-radius: 12px; }
body.mp-themed .mp-btn-primary { border: 0; background: linear-gradient(100deg, #4f6eff, #8b5cf6); color: #fff; box-shadow: 0 10px 26px -10px rgba(99, 102, 241, .9); transition: transform .2s, box-shadow .2s, filter .2s; }
body.mp-themed .mp-btn-primary:hover { background: linear-gradient(100deg, #4f6eff, #8b5cf6); filter: brightness(1.1); transform: translateY(-2px); box-shadow: 0 18px 34px -12px rgba(99, 102, 241, 1); color: #fff; }
/* A streak of light crosses the main button now and then. */
body.mp-themed .mp-btn-primary::after { content: ''; position: absolute; top: 0; left: -80%; width: 50%; height: 100%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .5), transparent); transform: skewX(-20deg); animation: hm-streak 4.5s ease-in-out infinite; }
@keyframes hm-streak { 0%, 60% { left: -80%; } 100% { left: 140%; } }
body.mp-themed .mp-btn-outline { background: var(--hm-surface); border-color: var(--hm-line-strong); color: var(--hm-ink); transition: transform .2s, border-color .2s, background .2s; }
body.mp-themed .mp-btn-outline:hover { background: var(--hm-surface-hover); border-color: var(--hm-brand); color: var(--hm-ink); transform: translateY(-2px); }
body.mp-themed .mp-nav-toggle { background: var(--hm-surface); border-color: var(--hm-line-strong); color: var(--hm-ink); }
body.mp-themed .mp-lang { background: var(--hm-surface); border-color: var(--hm-line-strong); color: var(--hm-ink); }
body.mp-themed .mp-lang:hover { border-color: var(--hm-cyan); color: var(--hm-cyan); }
body.mp-themed .mp-footer { border-top-color: var(--hm-line); background: color-mix(in srgb, var(--hm-bg-soft) 86%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
body.mp-themed .mp-footer-social a { background: var(--hm-surface); color: var(--hm-ink); }
body.mp-themed .mp-footer-contact svg { background: var(--hm-surface); border-color: var(--hm-line-strong); }
body.mp-themed .mp-footer-credit a { color: var(--hm-ink); }
body.mp-themed .mp-install, body.mp-themed .mp-sheet-card { background: var(--hm-surface-solid); border-color: var(--hm-line); color: var(--hm-ink); }
@media (max-width: 780px) {
    body.mp-themed .mp-header { top: 8px; margin: 8px .75rem 0; }
    body.mp-themed .mp-header-in { height: 66px; border-radius: 16px; }
    body.mp-themed .mp-nav { top: calc(100% + 8px); border: 1px solid var(--hm-line); border-radius: 16px; background: var(--hm-surface-solid); }
    /* Theme switch, then the two buttons side by side. */
    body.mp-themed .mp-nav-actions { grid-template-columns: auto 1fr 1fr; }
}

/* The light / dark switch (lives in the shared header, shown on this page). */
body.mp-themed .mp-theme-toggle {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid var(--hm-line-strong);
    border-radius: 12px;
    background: var(--hm-surface);
    color: var(--hm-ink);
    cursor: pointer;
    transition: border-color .2s, transform .35s, background .2s;
}
body.mp-themed .mp-theme-toggle:hover { border-color: var(--hm-amber); transform: rotate(40deg); }
.mp-theme-toggle svg { width: 20px; height: 20px; }
html[data-mp-theme="dark"] .mp-theme-toggle .hm-moon,
html[data-mp-theme="light"] .mp-theme-toggle .hm-sun { display: none; }

/* ── Building blocks ────────────────────────────────────────────────────── */
.hm-wrap { max-width: 1160px; margin: 0 auto; padding: 0 1.25rem; }
/* Gradient text whose colours keep flowing. */
.hm-grad { background: var(--hm-grad); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent; animation: hm-shine 7s linear infinite; }
@keyframes hm-shine { to { background-position: -200% center; } }
.hm-section { padding: 5.5rem 0; }
.hm-head { max-width: 740px; margin: 0 auto 3rem; text-align: center; }
.hm-head-left { margin-left: 0; text-align: left; }
.hm-kicker {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: 1rem;
    padding: .32rem .95rem;
    border: 1px solid var(--hm-line-strong);
    border-radius: 999px;
    background: var(--hm-surface);
    color: var(--hm-ink);
    font-size: .88rem;
    font-weight: 600;
}
.hm-kicker b { color: var(--hm-cyan); font: italic 700 1.05rem / 1 var(--hm-math); }
.hm-head h2 { margin: 0 0 .8rem; color: var(--hm-ink); font-family: var(--mp-display); font-size: clamp(1.85rem, 3.9vw, 2.85rem); font-weight: 700; line-height: 1.3; letter-spacing: -.01em; }
.hm-head p { margin: 0; color: var(--hm-text); font-size: 1.1rem; }
.hm-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; margin-bottom: 2.25rem; }
.hm-head-row .hm-head { margin: 0; }

/* A glass card that lights up under the pointer. */
.hm-card {
    position: relative;
    border: 1px solid var(--hm-line);
    border-radius: 24px;
    background: var(--hm-surface);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    box-shadow: var(--hm-shadow);
    isolation: isolate;
}
.hm-card::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--tone, var(--hm-blue)) 26%, transparent), transparent 62%);
    opacity: 0;
    transition: opacity .35s;
    pointer-events: none;
}
.hm-card:hover::before { opacity: 1; }
.hm-ico { display: grid; place-items: center; flex: none; width: 54px; height: 54px; border-radius: 16px; background: color-mix(in srgb, var(--tone, var(--hm-blue)) 18%, transparent); color: var(--tone, var(--hm-blue)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tone, var(--hm-blue)) 35%, transparent); transition: transform .35s cubic-bezier(.34, 1.56, .64, 1); }
.hm-ico svg { width: 27px; height: 27px; }
.hm-card:hover .hm-ico { transform: translateY(-4px) rotate(-8deg) scale(1.08); }

/* ── Hero ───────────────────────────────────────────────────────────────── */
.hm-hero { position: relative; padding: 4.5rem 0 2rem; }
.hm-hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 3.5rem; align-items: center; }
/* The lines of the headline rise into place one after another. */
.hm-copy > * { animation: hm-rise-in .6s cubic-bezier(.2, .8, .2, 1) both; }
.hm-copy > :nth-child(2) { animation-delay: .06s; }
.hm-copy > :nth-child(3) { animation-delay: .12s; }
.hm-copy > :nth-child(4) { animation-delay: .18s; }
.hm-copy > :nth-child(5) { animation-delay: .24s; }
.hm-copy > :nth-child(6) { animation-delay: .3s; }
.hm-media { animation: hm-pop-in .8s cubic-bezier(.2, .8, .2, 1) both .1s; }
@keyframes hm-rise-in { from { opacity: 0; transform: translateY(26px); } }
@keyframes hm-pop-in { from { opacity: 0; transform: scale(.92) translateY(18px); } }

.hm-pill {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    margin-bottom: 1.4rem;
    padding: .36rem 1rem .36rem .5rem;
    border: 1px solid var(--hm-line-strong);
    border-radius: 999px;
    background: var(--hm-surface);
    color: var(--hm-ink);
    font-size: .92rem;
    font-weight: 600;
}
.hm-pill::before { content: ''; width: 8px; height: 8px; margin-left: .35rem; border-radius: 50%; background: var(--hm-green); box-shadow: 0 0 0 4px color-mix(in srgb, var(--hm-green) 25%, transparent); animation: hm-pulse 1.8s ease-in-out infinite; }
@keyframes hm-pulse { 50% { box-shadow: 0 0 0 9px transparent; } }
.hm-title { margin: 0 0 1.1rem; color: var(--hm-ink); font-family: var(--mp-display); font-size: clamp(2.3rem, 5.6vw, 4.2rem); font-weight: 700; line-height: 1.2; letter-spacing: -.02em; }
.hm-title .hm-grad { display: block; padding-bottom: .12em; }
.hm-tagline { margin: 0 0 .6rem; color: var(--hm-cyan); font-family: var(--mp-display); font-size: 1.32rem; font-weight: 600; }
.hm-lead { max-width: 34rem; margin: 0 0 2rem; color: var(--hm-text); font-size: 1.16rem; }
/* The chapter name after the hero's question: it slips out and the next one slips in. */
.hm-tagline { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .65rem; margin-bottom: 1rem; color: var(--hm-text); font-size: 1.22rem; }
.hm-topic { display: inline-flex; overflow: hidden; padding: .2rem .8rem; border: 1px solid color-mix(in srgb, var(--hm-cyan) 45%, transparent); border-radius: 999px; background: color-mix(in srgb, var(--hm-cyan) 12%, transparent); color: var(--hm-cyan); font-weight: 700; }
.hm-topic span { display: inline-block; transition: transform .32s cubic-bezier(.4, 0, .2, 1), opacity .32s; }
.hm-topic span.is-leaving { transform: translateY(-110%); opacity: 0; }
.hm-cta { display: flex; flex-wrap: wrap; gap: .85rem; }
body.mp-themed .hm-cta .mp-btn { padding: 1rem 1.8rem; border-radius: 15px; font-size: 1.08rem; }

/* The teacher stands in front of a disc ringed with turning light. The photo
   is cut to the disc's curve at the bottom while the head rises above it, and
   the whole portrait leans towards the pointer. */
.hm-media { position: relative; perspective: 1100px; }
.hm-portrait {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin-left: auto;
    aspect-ratio: 1 / 1.14;
    transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
    transition: transform .25s ease-out;
}
.hm-rings { position: absolute; left: 7%; bottom: 0; width: 86%; aspect-ratio: 1; }
.hm-halo { position: absolute; inset: -12%; border-radius: 50%; background: radial-gradient(closest-side, rgba(109, 147, 255, .55), transparent); filter: blur(34px); animation: hm-breathe 5s ease-in-out infinite alternate; }
@keyframes hm-breathe { to { transform: scale(1.12); opacity: .7; } }
.hm-disc { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from var(--hm-angle), #6d93ff, #b197fc, #38d9f5, #ff7eb6, #6d93ff); box-shadow: 0 40px 90px -40px rgba(99, 102, 241, 1); animation: hm-spin 7s linear infinite; }
.hm-disc::after { content: ''; position: absolute; inset: 5px; border-radius: 50%; background: radial-gradient(circle at 50% 22%, color-mix(in srgb, var(--hm-blue) 46%, var(--hm-surface-solid)), var(--hm-surface-solid) 72%); }
@keyframes hm-spin { to { --hm-angle: 360deg; } }
.hm-cutout { position: absolute; left: 7%; bottom: 0; z-index: 1; width: 86%; aspect-ratio: 1 / 1.3; border-radius: 0 0 50% 50% / 0 0 38.46% 38.46%; overflow: hidden; pointer-events: none; }
body.mp-themed .hm-cutout img { position: absolute; left: 50%; bottom: 0; width: auto; max-width: none; height: 97%; transform: translateX(-50%); filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .45)); }
.hm-teacher { position: absolute; left: 0; bottom: 9%; z-index: 3; display: grid; gap: .1rem; padding: .7rem 1.1rem; border: 1px solid var(--hm-line-strong); border-radius: 16px; background: color-mix(in srgb, var(--hm-surface-solid) 88%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: var(--hm-shadow); line-height: 1.35; animation: hm-float 6s ease-in-out infinite alternate; }
.hm-teacher strong { color: var(--hm-ink); font-family: var(--mp-display); font-size: 1.12rem; font-weight: 700; }
.hm-teacher span { color: var(--hm-muted); font-size: .86rem; }
.hm-teacher::before { content: ''; position: absolute; top: -5px; right: -5px; width: 14px; height: 14px; border: 3px solid var(--hm-surface-solid); border-radius: 50%; background: var(--hm-green); }

.hm-orbit { position: absolute; top: 50%; left: 50%; width: var(--o); height: var(--o); margin: calc(var(--o) / -2) 0 0 calc(var(--o) / -2); border: 1px dashed var(--hm-line-strong); border-radius: 50%; animation: hm-orbit var(--t) linear infinite; }
.hm-orbit-a { --o: 112%; --t: 36s; }
.hm-orbit-b { --o: 132%; --t: 54s; animation-direction: reverse; }
.hm-orbit i { position: absolute; display: grid; place-items: center; width: 44px; height: 44px; margin: -22px 0 0 -22px; border: 1px solid var(--hm-line-strong); border-radius: 13px; background: var(--hm-surface-solid); color: var(--tone); font: italic 700 1.3rem / 1 var(--hm-math); box-shadow: 0 0 22px color-mix(in srgb, var(--tone) 45%, transparent); animation: hm-orbit var(--t) linear infinite reverse; }
.hm-orbit-b i { animation-direction: normal; }
.hm-orbit i:nth-child(1) { top: 0; left: 50%; }
.hm-orbit i:nth-child(2) { top: 75%; left: 6.7%; }
.hm-orbit i:nth-child(3) { top: 75%; left: 93.3%; }
@keyframes hm-orbit { to { transform: rotate(360deg); } }

.hm-formula {
    position: absolute;
    z-index: 3;
    padding: .55rem 1rem;
    border: 1px solid var(--hm-line-strong);
    border-radius: 14px;
    background: color-mix(in srgb, var(--hm-surface-solid) 88%, transparent);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: var(--hm-shadow);
    font: italic 600 1.12rem / 1.3 var(--hm-math);
    white-space: nowrap;
    animation: hm-float 5s ease-in-out infinite alternate;
}
.hm-formula sup, .hm-formula sub { font-size: .7em; }
.hm-formula-a { top: 9%; left: -6%; color: var(--hm-amber); }
.hm-formula-b { right: -7%; top: 46%; animation-delay: -1.6s; color: var(--hm-cyan); }
.hm-formula-c { right: 4%; bottom: -3%; animation-delay: -3.2s; color: var(--hm-pink); }
@keyframes hm-float { from { transform: translateY(-9px) rotate(-2deg); } to { transform: translateY(9px) rotate(2deg); } }

.hm-points { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin: 1.8rem 0 0; padding: 0; list-style: none; color: var(--hm-text); font-size: .98rem; }
.hm-points li { display: inline-flex; align-items: center; gap: .45rem; }
.hm-points svg { width: 18px; height: 18px; color: var(--hm-green); }

/* Two waves that never stop travelling, like a live plot. */
.hm-wave { display: block; width: 100%; height: 96px; margin-top: 2.25rem; overflow: visible; }
.hm-wave path { fill: none; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.hm-wave-a { stroke: var(--hm-blue); stroke-width: 2.5; stroke-dasharray: 12 14; animation: hm-dash 1.6s linear infinite; }
.hm-wave-b { stroke: var(--hm-pink); stroke-width: 2; stroke-dasharray: 3 11; animation: hm-dash 2.2s linear infinite reverse; opacity: .8; }
.hm-wave-axis { stroke: var(--hm-line-strong); stroke-width: 1; }
@keyframes hm-dash { to { stroke-dashoffset: -52; } }

/* ── A ribbon of well-known formulas ────────────────────────────────────── */
.hm-ribbon { margin: .5rem 0 0; border-block: 1px solid var(--hm-line); background: var(--hm-surface); overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.hm-ribbon-track { display: flex; width: max-content; animation: hm-scroll 40s linear infinite; }
.hm-ribbon:hover .hm-ribbon-track { animation-play-state: paused; }
.hm-ribbon span { display: inline-flex; align-items: center; gap: 2.75rem; padding: 1.05rem 1.4rem; color: var(--hm-ink); font: italic 500 1.22rem / 1 var(--hm-math); white-space: nowrap; }
.hm-ribbon em { font-style: inherit; }
.hm-ribbon sup, .hm-ribbon sub { font-size: .68em; }
.hm-ribbon span::after { content: '✦'; color: var(--hm-violet); font-style: normal; font-size: .8rem; }
@keyframes hm-scroll { to { transform: translateX(-50%); } }

/* ── Numbers ────────────────────────────────────────────────────────────── */
.hm-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 3.25rem; }
.hm-stat { padding: 1.6rem 1.25rem; text-align: center; overflow: hidden; transition: transform .25s, border-color .25s; }
.hm-stat:hover { transform: translateY(-5px); border-color: color-mix(in srgb, var(--tone) 60%, transparent); }
.hm-stat::after { content: attr(data-symbol); position: absolute; right: -6px; bottom: -24px; z-index: -1; color: var(--tone); font: italic 700 6.5rem / 1 var(--hm-math); opacity: .14; transition: transform .4s, opacity .3s; }
.hm-stat:hover::after { transform: rotate(-12deg) scale(1.15); opacity: .26; }
.hm-stat-value { color: var(--tone); font-family: var(--mp-display); font-size: clamp(2.1rem, 4.2vw, 3.1rem); font-weight: 700; line-height: 1.15; text-shadow: 0 0 28px color-mix(in srgb, var(--tone) 45%, transparent); }
.hm-stat-label { color: var(--hm-text); font-size: 1rem; }

/* ── Subject and model-test cards ───────────────────────────────────────── */
.hm-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 1.25rem; }
.hm-tile { display: flex; flex-direction: column; padding: 1.7rem; overflow: hidden; color: inherit; text-decoration: none; transition: transform .25s cubic-bezier(.2, .8, .2, 1), border-color .25s; }
.hm-tile::after { content: attr(data-symbol); position: absolute; right: -4px; top: -28px; z-index: -1; color: var(--tone); font: italic 700 9rem / 1 var(--hm-math); opacity: .11; transition: opacity .3s, transform .5s cubic-bezier(.2, .8, .2, 1); }
.hm-tile:hover { transform: translateY(-8px); border-color: color-mix(in srgb, var(--tone) 65%, transparent); }
.hm-tile:hover::after { opacity: .26; transform: rotate(-14deg) scale(1.12); }
.hm-tile-line { position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, var(--tone), transparent); transform: scaleX(.35); transform-origin: 0 50%; transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.hm-tile:hover .hm-tile-line { transform: scaleX(1); }
.hm-tile-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.4rem; }
.hm-chip { padding: .22rem .85rem; border: 1px solid color-mix(in srgb, var(--tone) 45%, transparent); border-radius: 999px; background: color-mix(in srgb, var(--tone) 14%, transparent); color: var(--tone); font-size: .82rem; font-weight: 600; }
.hm-tile h3 { margin: 0 0 .3rem; color: var(--hm-ink); font-family: var(--mp-display); font-size: 1.36rem; font-weight: 700; line-height: 1.4; }
.hm-tile p { margin: 0 0 1.5rem; color: var(--hm-text); font-size: 1rem; }
.hm-go { display: inline-flex; align-items: center; gap: .4rem; margin-top: auto; color: var(--tone); font-weight: 600; }
.hm-go svg { width: 18px; height: 18px; transition: transform .25s; }
.hm-tile:hover .hm-go svg { transform: translateX(7px); }
.hm-empty { padding: 3rem 1rem; border: 1px dashed var(--hm-line-strong); border-radius: 22px; color: var(--hm-muted); text-align: center; }

/* ── Videos ─────────────────────────────────────────────────────────────── */
.hm-player { display: grid; grid-template-columns: 1.55fr 1fr; gap: 1.25rem; align-items: start; }
.hm-stage-card { padding: .8rem .8rem 1.2rem; }
.hm-stage { position: relative; aspect-ratio: 16 / 9; border-radius: 16px; background: #000; overflow: hidden; }
.hm-stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.hm-cover { position: absolute; inset: 0; display: block; }
.hm-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.hm-cover:hover img { transform: scale(1.05); }
.hm-play { position: absolute; top: 50%; left: 50%; display: grid; place-items: center; width: 78px; height: 78px; border-radius: 50%; background: linear-gradient(135deg, #4f6eff, #8b5cf6); color: #fff; transform: translate(-50%, -50%); box-shadow: 0 20px 40px -12px rgba(0, 0, 0, .7); transition: transform .25s; }
/* Rings ripple out from the play button. */
.hm-play::before, .hm-play::after { content: ''; position: absolute; inset: 0; border: 2px solid rgba(255, 255, 255, .55); border-radius: 50%; animation: hm-ripple 2.4s ease-out infinite; }
.hm-play::after { animation-delay: 1.2s; }
@keyframes hm-ripple { to { transform: scale(1.9); opacity: 0; } }
.hm-cover:hover .hm-play { transform: translate(-50%, -50%) scale(1.1); }
.hm-play svg { width: 30px; height: 30px; margin-left: 4px; }
.hm-player-title { margin: 1rem .4rem .15rem; color: var(--hm-ink); font-family: var(--mp-display); font-size: 1.22rem; font-weight: 700; line-height: 1.45; }
.hm-video-date { margin: 0 .4rem; color: var(--hm-muted); font-size: .92rem; }
.hm-playlist { display: grid; gap: .45rem; max-height: 520px; margin: 0; padding: .6rem; list-style: none; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--hm-line-strong) transparent; }
.hm-playlist-item { display: grid; grid-template-columns: 124px 1fr; gap: .8rem; align-items: center; padding: .5rem; border: 1px solid transparent; border-radius: 14px; color: inherit; text-decoration: none; transition: background .2s, border-color .2s, transform .2s; }
.hm-playlist-item:hover { background: var(--hm-surface-hover); transform: translateX(4px); }
.hm-playlist-item.is-active { border-color: color-mix(in srgb, var(--hm-brand) 60%, transparent); background: color-mix(in srgb, var(--hm-brand) 13%, transparent); }
.hm-playlist-thumb { aspect-ratio: 16 / 9; border-radius: 9px; background: #000; overflow: hidden; }
.hm-playlist-thumb img { width: 100%; height: 100%; object-fit: cover; }
.hm-playlist-title { display: -webkit-box; color: var(--hm-ink); font-size: .96rem; font-weight: 600; line-height: 1.45; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hm-playlist-date { display: block; margin-top: .15rem; color: var(--hm-muted); font-size: .82rem; }

/* ── Features ───────────────────────────────────────────────────────────── */
.hm-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.hm-feature { padding: 1.7rem; overflow: hidden; transition: transform .25s cubic-bezier(.2, .8, .2, 1), border-color .25s; }
.hm-feature:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--tone) 60%, transparent); }
.hm-feature .hm-ico { margin-bottom: 1.15rem; }
.hm-feature h3 { margin: 0 0 .4rem; color: var(--hm-ink); font-family: var(--mp-display); font-size: 1.22rem; font-weight: 700; }
.hm-feature p { margin: 0; color: var(--hm-text); font-size: 1rem; }
.hm-feature-no { position: absolute; top: 1.3rem; right: 1.5rem; color: var(--tone); font-family: var(--mp-display); font-size: 1.5rem; font-weight: 700; line-height: 1; opacity: .45; }

/* ── Inner pages (about, contact) ───────────────────────────────────────── */
.hm-page-hero { padding: 4.75rem 0 1.5rem; text-align: center; }
.hm-page-hero > .hm-wrap > * { animation: hm-rise-in .6s cubic-bezier(.2, .8, .2, 1) both; }
.hm-page-hero > .hm-wrap > :nth-child(2) { animation-delay: .08s; }
.hm-page-hero > .hm-wrap > :nth-child(3) { animation-delay: .16s; }
.hm-page-hero .hm-title { margin-bottom: 1rem; font-size: clamp(2.1rem, 5vw, 3.6rem); }
.hm-page-hero .hm-title .hm-grad { display: inline; padding: 0; }
.hm-page-hero p { max-width: 44rem; margin: 0 auto; color: var(--hm-text); font-size: 1.18rem; }
.hm-section-tight { padding: 2.75rem 0; }

.hm-about { display: grid; grid-template-columns: 1.35fr 1fr; gap: 1.25rem; align-items: start; }
.hm-about-main, .hm-about-side { display: grid; gap: 1.25rem; }
.hm-prose { padding: 2rem; }
.hm-prose:hover { border-color: color-mix(in srgb, var(--tone) 55%, transparent); }
.hm-prose h2 { display: flex; align-items: center; gap: .7rem; margin: 0 0 .8rem; color: var(--hm-ink); font-family: var(--mp-display); font-size: 1.5rem; font-weight: 700; line-height: 1.35; }
.hm-prose h2::before { content: ''; flex: none; width: .6rem; height: .6rem; border-radius: 50%; background: var(--tone); box-shadow: 0 0 14px var(--tone); }
.hm-prose p { margin: 0; color: var(--hm-text); font-size: 1.08rem; line-height: 1.85; }
.hm-checks { display: grid; gap: .85rem; margin: 0; padding: 0; list-style: none; }
.hm-checks li { display: flex; align-items: flex-start; gap: .7rem; color: var(--hm-ink); font-size: 1.04rem; }
.hm-checks svg { flex: none; width: 22px; height: 22px; margin-top: .2rem; color: var(--hm-green); }
/* The teacher: a round portrait inside a ring of colour. */
.hm-person { display: flex; align-items: center; gap: 1.15rem; padding: 1.3rem 1.5rem; }
.hm-person:hover { border-color: color-mix(in srgb, var(--tone) 55%, transparent); }
.hm-person-photo { flex: none; width: 96px; height: 96px; padding: 3px; border-radius: 50%; background: conic-gradient(from var(--hm-angle), #6d93ff, #b197fc, #38d9f5, #ff7eb6, #6d93ff); animation: hm-spin 7s linear infinite; }
body.mp-themed .hm-person-photo img { display: block; width: 100%; height: 100%; border-radius: 50%; background: var(--hm-surface-solid); object-fit: cover; object-position: 50% 4%; }
.hm-person > span:last-child { display: grid; min-width: 0; }
.hm-person small { color: var(--hm-muted); font-size: .84rem; font-weight: 600; }
.hm-person strong { color: var(--hm-ink); font-family: var(--mp-display); font-size: 1.4rem; font-weight: 700; line-height: 1.35; }
.hm-person strong + span { color: var(--hm-text); font-size: .96rem; }
.hm-step-no { display: grid; place-items: center; width: 54px; height: 54px; margin-bottom: 1.15rem; border-radius: 16px; background: color-mix(in srgb, var(--tone) 18%, transparent); color: var(--tone); font: 700 1.6rem / 1 var(--mp-display); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tone) 35%, transparent); }

.hm-contact { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem; }
.hm-contact-card { display: flex; flex-direction: column; align-items: flex-start; padding: 1.7rem; color: inherit; text-decoration: none; transition: transform .25s cubic-bezier(.2, .8, .2, 1), border-color .25s; }
.hm-contact-card:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--tone) 60%, transparent); }
.hm-contact-card .hm-ico { margin-bottom: 1.15rem; }
.hm-contact-label { color: var(--hm-muted); font-size: .92rem; font-weight: 600; }
.hm-contact-value { margin: .15rem 0 .2rem; color: var(--hm-ink); font-family: var(--mp-display); font-size: 1.4rem; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
.hm-contact-value.is-small { font-size: 1.12rem; }
.hm-contact-note { color: var(--hm-text); font-size: .95rem; }

/* ── Student login / register ─────────────────────────────────────────── */
/* Filament's own page wrappers stay see-through so the moving background shows. */
body.mp-auth-page .fi-simple-layout, body.mp-auth-page .fi-simple-main-ctn { background: transparent !important; }
body.mp-themed .mp-auth { position: relative; border: 1px solid var(--hm-line-strong); border-radius: 28px; background: var(--hm-surface); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); box-shadow: var(--hm-shadow); animation: hm-pop-in .7s cubic-bezier(.2, .8, .2, 1) both; }
/* The side panel: deep colour, graph paper and a large math sign. */
body.mp-themed .mp-auth-side { background: radial-gradient(120% 90% at 0% 0%, rgba(79, 110, 255, .55), transparent 60%), radial-gradient(90% 80% at 100% 100%, rgba(34, 211, 238, .35), transparent 60%), linear-gradient(150deg, #15193a, #2a1856 60%, #0d2b3e); }
body.mp-themed .mp-auth-side::after { content: '∫'; position: absolute; right: -.6rem; bottom: -2.8rem; color: #fff; font: italic 700 15rem / 1 var(--hm-math); opacity: .08; pointer-events: none; }
body.mp-themed .mp-auth-brand .mp-brand-mark { background: linear-gradient(135deg, #4f6eff, #8b5cf6); color: #fff; box-shadow: 0 6px 18px -6px rgba(99, 102, 241, .9); }
body.mp-themed .mp-auth-side h2 { background: linear-gradient(100deg, #fff 30%, #b9c8ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
body.mp-themed .mp-auth-side p, body.mp-themed .mp-auth-switch { color: rgba(226, 232, 255, .82); }
body.mp-themed .mp-auth-switch a { color: #7ee8fa; }
body.mp-themed .mp-auth-form { background: transparent; }
body.mp-themed .mp-auth-form h1 { color: var(--hm-ink); font-size: 1.85rem; }
body.mp-themed .mp-auth-lead, body.mp-themed .mp-auth-alt, body.mp-themed .mp-otp-actions { color: var(--hm-muted); }
body.mp-themed .mp-auth-alt button, body.mp-themed .mp-otp-actions button { color: var(--hm-cyan); }
/* The main button matches the rest of the site. */
body.mp-themed .mp-auth-form .fi-btn.fi-color-primary { border: 0; background: linear-gradient(100deg, #4f6eff, #8b5cf6); color: #fff; box-shadow: 0 10px 26px -10px rgba(99, 102, 241, .9); transition: filter .2s, transform .2s; }
body.mp-themed .mp-auth-form .fi-btn.fi-color-primary:hover { filter: brightness(1.1); transform: translateY(-1px); }
body.mp-themed .mp-otp-label { color: var(--hm-ink); }
body.mp-themed .mp-otp-input { border-color: var(--hm-line-strong); background: var(--hm-surface); color: var(--hm-ink); }
body.mp-themed .mp-otp-input:focus { border-color: var(--hm-brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--hm-brand) 25%, transparent); }
body.mp-themed .mp-otp-input::placeholder { color: var(--hm-muted); }

/* The closing band: one line of encouragement and the two ways in. */
.hm-band { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: 2.5rem 2.75rem; border-color: var(--hm-line-strong); background: linear-gradient(120deg, color-mix(in srgb, var(--hm-blue) 22%, transparent), color-mix(in srgb, var(--hm-violet) 17%, transparent) 55%, color-mix(in srgb, var(--hm-cyan) 14%, transparent)), var(--hm-surface); overflow: hidden; }
.hm-band h2 { margin: 0 0 .4rem; color: var(--hm-ink); font-family: var(--mp-display); font-size: clamp(1.6rem, 3.2vw, 2.3rem); font-weight: 700; line-height: 1.3; }
.hm-band p { margin: 0; color: var(--hm-text); font-size: 1.1rem; }
.hm-band-actions { display: flex; flex: none; flex-wrap: wrap; gap: .8rem; }
.hm-band-sign { position: absolute; right: 38%; top: -2.6rem; z-index: -1; color: var(--hm-violet); font: italic 700 12rem / 1 var(--hm-math); opacity: .1; }

/* Sections ease in as they scroll into view; grids bring their cards in one by one. */
.hm-reveal { opacity: 0; transform: translateY(30px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .8, .2, 1); }
.hm-reveal.is-in { opacity: 1; transform: none; }
.hm-stagger > * { opacity: 0; transform: translateY(34px) scale(.97); }
.hm-stagger.is-in > * { opacity: 1; transform: none; transition: opacity .7s ease, transform .7s cubic-bezier(.2, .8, .2, 1); }
.hm-stagger.is-in > :nth-child(2) { transition-delay: .09s; }
.hm-stagger.is-in > :nth-child(3) { transition-delay: .18s; }
.hm-stagger.is-in > :nth-child(4) { transition-delay: .27s; }
.hm-stagger.is-in > :nth-child(5) { transition-delay: .36s; }
.hm-stagger.is-in > :nth-child(6) { transition-delay: .45s; }
/* Once in place, the cards' own hover transitions take over again. */
.hm-stagger.is-done > * { transition: transform .25s cubic-bezier(.2, .8, .2, 1), border-color .25s; transition-delay: 0s; transform: none; }
.hm-stagger.is-done > .hm-tile:hover { transform: translateY(-8px); }
.hm-stagger.is-done > .hm-feature:hover { transform: translateY(-6px); }
.hm-stagger.is-done > .hm-stat:hover { transform: translateY(-5px); }
.hm-stagger.is-done > .hm-contact-card:hover { transform: translateY(-6px); }

/* ── Smaller screens ────────────────────────────────────────────────────── */
@media (max-width: 980px) {
    .hm-hero-grid { grid-template-columns: 1fr; gap: 3.5rem; }
    .hm-portrait { max-width: 440px; margin: 0 auto; }
    .hm-formula-a { left: 0; }
    .hm-formula-b { right: 0; }
    .hm-orbit-b { display: none; }
    .hm-player { grid-template-columns: 1fr; }
    .hm-playlist { max-height: 360px; }
    .hm-features { grid-template-columns: repeat(2, 1fr); }
    .hm-stats { grid-template-columns: repeat(2, 1fr); }
    .hm-about { grid-template-columns: 1fr; }
    .hm-band { flex-direction: column; align-items: flex-start; padding: 2rem 1.5rem; }
}
@media (max-width: 640px) {
    .hm-hero { padding-top: 2.75rem; }
    .hm-section { padding: 3.75rem 0; }
    .hm-features { grid-template-columns: 1fr; }
    .hm-head-row { flex-direction: column; align-items: flex-start; }
    .hm-formula { padding: .4rem .7rem; font-size: .92rem; }
    .hm-teacher { padding: .55rem .9rem; }
    .hm-points { margin-top: 1.4rem; }
    .hm-playlist-item { grid-template-columns: 104px 1fr; }
    body.mp-themed .hm-cta .mp-btn { flex: 1 1 100%; }
    .hm-band-actions { width: 100%; }
    body.mp-themed .hm-band-actions .mp-btn { flex: 1 1 100%; }
    .hm-page-hero { padding-top: 3rem; }
    .hm-section-tight { padding: 2rem 0; }
    /* Fewer, smaller signs in the background so text stays easy to read on a phone. */
    .hm-glyph:nth-of-type(2n) { display: none; }
    .hm-glyph { font-size: 2rem; }
}

/* ── Blog ─────────────────────────────────────────────────────────────── */
.hm-blog-filter { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; margin: 0 0 2.25rem; }
.hm-blog-filter a { padding: .45rem 1.05rem; border: 1px solid var(--hm-line-strong); border-radius: 999px; background: var(--hm-surface); color: var(--hm-text); font-size: .95rem; font-weight: 600; text-decoration: none; transition: border-color .2s, color .2s, background .2s; }
.hm-blog-filter a:hover { border-color: var(--hm-cyan); color: var(--hm-ink); }
.hm-blog-filter a.is-active { border-color: transparent; background: var(--hm-grad); background-size: 200% auto; color: #fff; }
.hm-posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.hm-post-card { display: flex; flex-direction: column; overflow: hidden; color: inherit; text-decoration: none; transition: transform .25s cubic-bezier(.2, .8, .2, 1), border-color .25s; }
.hm-post-card:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--tone) 60%, transparent); }
.hm-stagger.is-done > .hm-post-card:hover { transform: translateY(-6px); }
.hm-post-cover { position: relative; display: grid; place-items: center; aspect-ratio: 40 / 21; overflow: hidden; border-bottom: 1px solid var(--hm-line); background:
    radial-gradient(circle at 20% 15%, color-mix(in srgb, var(--tone) 45%, transparent), transparent 55%),
    radial-gradient(circle at 85% 90%, color-mix(in srgb, var(--hm-violet) 35%, transparent), transparent 55%),
    linear-gradient(var(--hm-grid) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(90deg, var(--hm-grid) 1px, transparent 1px) 0 0 / 22px 22px,
    var(--hm-bg-soft); }
.hm-post-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.hm-post-card:hover .hm-post-cover img { transform: scale(1.05); }
.hm-post-sign { color: var(--tone); font: italic 700 4.6rem / 1 var(--hm-math); text-shadow: 0 0 34px color-mix(in srgb, var(--tone) 70%, transparent); transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.hm-post-card:hover .hm-post-sign { transform: rotate(-10deg) scale(1.1); }
.hm-post-body { display: flex; flex: 1; flex-direction: column; align-items: flex-start; gap: .65rem; padding: 1.35rem 1.45rem 1.5rem; }
.hm-post-body h3 { margin: 0; color: var(--hm-ink); font-family: var(--mp-display); font-size: 1.24rem; font-weight: 700; line-height: 1.45; }
.hm-post-body p { margin: 0; color: var(--hm-text); font-size: .98rem; line-height: 1.7; }
.hm-post-meta { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: auto; padding-top: .4rem; color: var(--hm-muted); font-size: .88rem; }
.hm-pages { display: flex; justify-content: center; gap: .5rem; margin-top: 2.5rem; }
.hm-pages a { display: grid; place-items: center; min-width: 2.6rem; height: 2.6rem; border: 1px solid var(--hm-line-strong); border-radius: 12px; color: var(--hm-text); font-weight: 600; text-decoration: none; }
.hm-pages a.is-active, .hm-pages a:hover { border-color: transparent; background: var(--hm-grad); background-size: 200% auto; color: #fff; }

/* A single post */
.hm-post-hero { padding-bottom: 2rem; }
.hm-post-hero .hm-title { max-width: 900px; margin-left: auto; margin-right: auto; font-size: clamp(1.9rem, 4.4vw, 3.1rem); line-height: 1.3; }
.hm-crumbs { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-bottom: 1.2rem; color: var(--hm-muted); font-size: .92rem; }
.hm-crumbs a { color: var(--hm-text); text-decoration: none; }
.hm-crumbs a:hover { color: var(--hm-cyan); }
.hm-crumbs a:last-child { color: var(--hm-cyan); font-weight: 600; }
.hm-post-hero .hm-post-info { display: flex; flex-wrap: wrap; justify-content: center; gap: .55rem; color: var(--hm-muted); font-size: 1rem; }
.hm-post-info b { color: var(--hm-ink); font-weight: 600; }
.hm-post-wrap { max-width: 860px; padding-bottom: 1rem; }
.hm-post-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; align-items: start; gap: 2rem; padding-bottom: 1rem; }
.hm-post-main { min-width: 0; }
.hm-post-side { position: sticky; top: 96px; display: grid; gap: 1.25rem; max-height: calc(100vh - 112px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.hm-side-box { padding: 1.35rem 1.4rem; }
.hm-side-box h2 { margin: 0 0 .85rem; color: var(--hm-ink); font-family: var(--mp-display); font-size: 1.08rem; font-weight: 700; }
.hm-toc ol { margin: 0; padding: 0; list-style: none; counter-reset: toc; }
.hm-toc li { counter-increment: toc; }
.hm-toc a { display: flex; gap: .6rem; padding: .45rem .55rem; border-radius: 10px; color: var(--hm-text); font-size: .95rem; line-height: 1.5; text-decoration: none; transition: background .2s, color .2s; }
.hm-toc a::before { content: counter(toc); flex: none; min-width: 1.1rem; color: var(--hm-muted); font-weight: 700; }
.hm-toc a:hover, .hm-toc a.is-active { background: color-mix(in srgb, var(--hm-cyan) 12%, transparent); color: var(--hm-cyan); }
.hm-toc a.is-active::before { color: var(--hm-cyan); }
.hm-side-cta { position: relative; overflow: hidden; border-color: color-mix(in srgb, var(--hm-cyan) 35%, transparent); background: linear-gradient(150deg, color-mix(in srgb, var(--hm-cyan) 16%, transparent), color-mix(in srgb, var(--hm-blue) 10%, transparent) 60%, transparent), var(--hm-surface); }
.hm-side-cta p { margin: 0 0 1rem; color: var(--hm-text); font-size: .95rem; line-height: 1.7; }
.hm-side-cta .mp-btn { width: 100%; justify-content: center; }
.hm-side-cta-sign { position: absolute; top: -.6rem; right: .6rem; color: color-mix(in srgb, var(--hm-cyan) 22%, transparent); font-family: var(--hm-math, serif); font-size: 5rem; line-height: 1; pointer-events: none; }
.hm-side-topics, .hm-side-latest { margin: 0; padding: 0; list-style: none; }
.hm-side-topics a { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .55rem .6rem; border-radius: 10px; color: var(--hm-text); text-decoration: none; transition: background .2s, color .2s; }
.hm-side-topics a b { min-width: 1.8rem; padding: .1rem .5rem; border-radius: 999px; background: color-mix(in srgb, var(--hm-blue) 16%, transparent); color: var(--hm-ink); font-size: .85rem; text-align: center; }
.hm-side-topics a:hover, .hm-side-topics a.is-active { background: color-mix(in srgb, var(--hm-cyan) 12%, transparent); color: var(--hm-cyan); }
.hm-side-latest li + li { margin-top: .85rem; padding-top: .85rem; border-top: 1px solid var(--hm-line); }
.hm-side-latest a { display: grid; grid-template-columns: 80px minmax(0, 1fr); align-items: center; gap: .8rem; color: var(--hm-text); text-decoration: none; }
.hm-side-latest strong { display: -webkit-box; overflow: hidden; color: var(--hm-ink); font-size: .95rem; font-weight: 600; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; transition: color .2s; }
.hm-side-latest small { display: block; margin-top: .2rem; color: var(--hm-muted); font-size: .82rem; }
.hm-side-latest a:hover strong { color: var(--hm-cyan); }
.hm-side-thumb { display: grid; place-items: center; overflow: hidden; aspect-ratio: 40 / 21; border-radius: 10px; background: color-mix(in srgb, var(--hm-blue) 18%, transparent); color: var(--hm-cyan); font-size: 1.4rem; font-weight: 700; }
.hm-side-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hm-article h2 { scroll-margin-top: 100px; }
@media (max-width: 1080px) {
    .hm-post-layout { grid-template-columns: minmax(0, 1fr) 280px; gap: 1.5rem; }
}
@media (max-width: 900px) {
    .hm-post-layout { grid-template-columns: 1fr; }
    .hm-post-side { position: static; max-height: none; overflow: visible; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hm-post-side .hm-toc { display: none; }
}
@media (max-width: 600px) {
    .hm-post-side { grid-template-columns: 1fr; }
}
.hm-post-figure { margin: 0 0 1.75rem; overflow: hidden; border: 1px solid var(--hm-line); border-radius: 24px; }
.hm-post-figure img { display: block; width: 100%; height: auto; }
.hm-article { padding: clamp(1.4rem, 4vw, 2.75rem); color: var(--hm-text); font-size: 1.1rem; line-height: 1.95; overflow-wrap: break-word; }
.hm-article > :first-child { margin-top: 0; }
.hm-article > :last-child { margin-bottom: 0; }
.hm-article h2 { margin: 2.4rem 0 .9rem; padding-left: .9rem; border-left: 4px solid var(--hm-cyan); color: var(--hm-ink); font-family: var(--mp-display); font-size: clamp(1.4rem, 3vw, 1.75rem); font-weight: 700; line-height: 1.4; }
.hm-article h3 { margin: 1.8rem 0 .6rem; color: var(--hm-ink); font-family: var(--mp-display); font-size: 1.25rem; font-weight: 700; line-height: 1.45; }
.hm-article p { margin: 0 0 1.1rem; }
.hm-article ul, .hm-article ol { margin: 0 0 1.2rem; padding-left: 1.4rem; }
.hm-article li { margin: .35rem 0; }
.hm-article li::marker { color: var(--hm-cyan); }
.hm-article strong { color: var(--hm-ink); }
.hm-article a { color: var(--hm-cyan); text-underline-offset: 3px; }
.hm-article img { max-width: 100%; height: auto; border-radius: 14px; }
.hm-article blockquote, .hm-article .note { margin: 1.4rem 0; padding: 1rem 1.25rem; border: 1px solid color-mix(in srgb, var(--hm-amber) 40%, transparent); border-radius: 16px; background: color-mix(in srgb, var(--hm-amber) 10%, transparent); color: var(--hm-ink); }
.hm-article blockquote p:last-child, .hm-article .note p:last-child { margin-bottom: 0; }
.hm-article table { width: 100%; margin: 1.2rem 0 1.6rem; border-collapse: collapse; font-size: 1rem; display: block; overflow-x: auto; }
.hm-article th, .hm-article td { padding: .7rem .85rem; border: 1px solid var(--hm-line-strong); text-align: left; vertical-align: middle; }
.hm-article th { background: color-mix(in srgb, var(--hm-blue) 16%, transparent); color: var(--hm-ink); font-weight: 700; }
.hm-article mjx-container[display="true"] { margin: 1.1rem 0 !important; padding: .4rem 0; overflow-x: auto; overflow-y: hidden; }
.hm-article mjx-container { color: var(--hm-ink); }
.hm-practice { display: flex; align-items: center; gap: 1.5rem; margin-top: 1.75rem; padding: 1.6rem 1.8rem; overflow: hidden; border-color: color-mix(in srgb, var(--tone) 40%, transparent); background: linear-gradient(120deg, color-mix(in srgb, var(--tone) 16%, transparent), transparent 70%), var(--hm-surface); }
.hm-practice h2 { margin: 0 0 .3rem; color: var(--hm-ink); font-family: var(--mp-display); font-size: 1.35rem; font-weight: 700; }
.hm-practice p { margin: 0; color: var(--hm-text); }
.hm-practice > div { flex: 1; }
.hm-practice .mp-btn { flex: none; }
.hm-practice-sign { display: grid; flex: none; place-items: center; width: 3.2rem; height: 3.2rem; border-radius: 16px; background: color-mix(in srgb, var(--tone) 18%, transparent); color: var(--tone); font-size: 1.6rem; font-weight: 700; }
.hm-share { display: flex; align-items: center; gap: .6rem; margin-top: 1.5rem; color: var(--hm-muted); font-weight: 600; }
.hm-share a, .hm-share button { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border: 1px solid var(--hm-line-strong); border-radius: 50%; background: var(--hm-surface); color: var(--hm-text); cursor: pointer; transition: color .2s, border-color .2s, transform .2s; }
.hm-share a:hover, .hm-share button:hover, .hm-share button.is-done { border-color: var(--hm-cyan); color: var(--hm-cyan); transform: translateY(-2px); }
.hm-share svg { width: 18px; height: 18px; }
@media (max-width: 980px) {
    .hm-posts { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .hm-posts { grid-template-columns: 1fr; }
    .hm-practice { flex-direction: column; align-items: flex-start; }
    .hm-practice .mp-btn { width: 100%; }
    .hm-article { font-size: 1.04rem; }
}

/* ── Chapters, model tests, videos, FAQ, app, legal, reviews ────────────── */
.hm-paper-head { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; margin: 0 0 1.4rem; }
.hm-paper-head h2, .hm-paper-head h3 { margin: 0; color: var(--hm-ink); font-family: var(--mp-display); font-size: clamp(1.45rem, 3vw, 1.9rem); font-weight: 700; }
.hm-paper-head h3 { font-size: 1.35rem; }
.hm-chapter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.1rem; }
.hm-chapter-card { display: flex; flex-direction: column; padding: 1.45rem 1.45rem 1.3rem; overflow: hidden; color: inherit; text-decoration: none; transition: transform .25s cubic-bezier(.2, .8, .2, 1), border-color .25s; }
.hm-chapter-card::after { content: attr(data-symbol); position: absolute; right: -2px; top: -22px; z-index: -1; color: var(--tone); font: italic 700 7rem / 1 var(--hm-math); opacity: .1; transition: opacity .3s, transform .5s; }
.hm-chapter-card:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--tone) 60%, transparent); }
.hm-chapter-card:hover::after { opacity: .22; transform: rotate(-12deg) scale(1.1); }
.hm-chapter-card:hover .hm-tile-line { transform: scaleX(1); }
.hm-chapter-no { margin-bottom: .45rem; color: var(--tone); font-size: .88rem; font-weight: 700; letter-spacing: .02em; }
.hm-chapter-card h3 { margin: 0; color: var(--hm-ink); font-family: var(--mp-display); font-size: 1.22rem; font-weight: 700; line-height: 1.4; }
.hm-chapter-en { margin-top: .15rem; color: var(--hm-muted); font-size: .88rem; }
.hm-chapter-meta { display: flex; flex-wrap: wrap; gap: .4rem; margin: 1rem 0 1.2rem; }
.hm-chapter-meta span { padding: .15rem .6rem; border-radius: 999px; background: color-mix(in srgb, var(--tone) 12%, transparent); color: var(--hm-text); font-size: .82rem; font-weight: 600; }
.hm-chapter-meta .is-soon { background: none; border: 1px dashed var(--hm-line-strong); color: var(--hm-muted); }
.hm-chapter-card .hm-go { font-size: .95rem; }
.hm-chapter-card:hover .hm-go svg { transform: translateX(6px); }

.hm-mini-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: .9rem; margin-bottom: 1.5rem; }
.hm-mini-stats-3 { grid-template-columns: repeat(3, 1fr); max-width: 760px; margin: 0 auto 1.5rem; }
.hm-mini-stats-auto { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.hm-mini-stat { display: grid; gap: .1rem; padding: 1.1rem 1rem; overflow: hidden; text-align: center; }
.hm-mini-stat::after { content: attr(data-symbol); position: absolute; right: -4px; bottom: -18px; z-index: -1; color: var(--tone); font: italic 700 4.5rem / 1 var(--hm-math); opacity: .13; }
.hm-mini-stat strong { color: var(--tone); font-family: var(--mp-display); font-size: 1.9rem; font-weight: 700; line-height: 1.2; }
.hm-mini-stat span { color: var(--hm-text); font-size: .92rem; }
.hm-chapter-main { display: grid; gap: 1.5rem; align-content: start; }
.hm-chapter-main > .hm-mini-stats { margin-bottom: 0; }
.hm-block { padding: clamp(1.3rem, 3vw, 2rem); }
.hm-block h2, .hm-block-plain h2 { margin: 0 0 .35rem; color: var(--hm-ink); font-family: var(--mp-display); font-size: 1.4rem; font-weight: 700; line-height: 1.4; }
.hm-block-lead { margin: 0 0 1.1rem; color: var(--hm-text); }
.hm-block-row { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.hm-block-row h2 { margin: 0; color: var(--hm-ink); font-family: var(--mp-display); font-size: 1.4rem; font-weight: 700; }
.hm-block-row h2 small { display: block; color: var(--hm-muted); font-family: inherit; font-size: .85rem; font-weight: 600; }
.hm-block-row a { color: var(--hm-cyan); font-weight: 600; text-decoration: none; }
.hm-note { margin: 1rem 0 0; color: var(--hm-muted); font-size: .95rem; }
.hm-note a { color: var(--hm-cyan); font-weight: 600; }
.hm-note-center { margin: 0 auto 2.25rem; max-width: 46rem; text-align: center; }

.hm-test-list { display: grid; gap: .55rem; margin: 0; padding: 0; list-style: none; }
.hm-test-list li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .9rem; padding: .7rem .8rem; border: 1px solid var(--hm-line); border-radius: 14px; background: color-mix(in srgb, var(--hm-surface) 60%, transparent); transition: border-color .2s, background .2s; }
.hm-test-list li:hover { border-color: color-mix(in srgb, var(--hm-cyan) 45%, transparent); background: color-mix(in srgb, var(--hm-cyan) 6%, transparent); }
.hm-test-no { display: grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: 10px; background: color-mix(in srgb, var(--hm-blue) 16%, transparent); color: var(--hm-ink); font-weight: 700; font-size: .9rem; }
.hm-test-name strong { display: block; color: var(--hm-ink); font-weight: 600; line-height: 1.45; }
.hm-test-name small { color: var(--hm-muted); font-size: .85rem; }
.hm-test-list .mp-btn { padding: .45rem 1rem; font-size: .9rem; white-space: nowrap; }
.hm-test-groups { display: grid; gap: .8rem; margin-bottom: 2rem; }
.hm-test-group { padding: 0; }
.hm-test-group > summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.35rem; cursor: pointer; list-style: none; }
.hm-test-group > summary::-webkit-details-marker { display: none; }
.hm-test-group > summary small { display: block; color: var(--hm-cyan); font-size: .82rem; font-weight: 700; }
.hm-test-group > summary strong { color: var(--hm-ink); font-family: var(--mp-display); font-size: 1.12rem; }
.hm-test-group > summary::after { content: '+'; flex: none; display: grid; place-items: center; width: 2rem; height: 2rem; margin-left: .25rem; border-radius: 50%; border: 1px solid var(--hm-line-strong); color: var(--hm-text); font-size: 1.2rem; transition: transform .25s; }
.hm-test-group[open] > summary::after { transform: rotate(45deg); }
.hm-test-group > summary .hm-chip { margin-left: auto; white-space: nowrap; }
.hm-test-group .hm-test-list { padding: 0 1.1rem; }
.hm-test-chapter-link { display: inline-block; margin: .9rem 1.35rem 1.1rem; color: var(--hm-cyan); font-weight: 600; text-decoration: none; }
.hm-head-gap { margin-top: 3rem; }
.hm-tiles-compact { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.hm-tiles-compact .hm-tile { padding: 1.4rem; }
.hm-tiles-compact .hm-tile p { margin-bottom: 1rem; }

.hm-math mjx-container { color: var(--hm-ink); }
.hm-math mjx-container[display="true"] { overflow-x: auto; overflow-y: hidden; }
.hm-sample { padding: 1.15rem 0; border-top: 1px solid var(--hm-line); }
.hm-sample:first-of-type { border-top: 0; padding-top: .25rem; }
.hm-sample-q { display: flex; gap: .55rem; color: var(--hm-ink); font-size: 1.06rem; line-height: 1.8; }
.hm-sample-q p { margin: 0; }
.hm-sample-no { flex: none; color: var(--hm-cyan); font-weight: 700; }
.hm-sample-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem 1rem; margin: .8rem 0 .9rem; padding: 0 0 0 1.6rem; list-style: none; }
.hm-sample-options li { display: flex; align-items: center; gap: .6rem; color: var(--hm-text); }
.hm-opt-letter { display: inline-grid; flex: none; place-items: center; width: 1.75rem; height: 1.75rem; border: 1px solid var(--hm-line-strong); border-radius: 50%; color: var(--hm-ink); font-size: .85rem; font-weight: 700; }
.hm-opt-letter.is-correct { border-color: var(--hm-green); background: color-mix(in srgb, var(--hm-green) 18%, transparent); color: var(--hm-green); }
.hm-sample-answer { margin-left: 1.6rem; border: 1px solid color-mix(in srgb, var(--hm-green) 35%, transparent); border-radius: 14px; background: color-mix(in srgb, var(--hm-green) 6%, transparent); }
.hm-sample-answer summary { padding: .6rem 1rem; color: var(--hm-green); font-weight: 600; cursor: pointer; }
.hm-sample-answer > p, .hm-sample-explain { margin: 0; padding: 0 1rem .8rem; color: var(--hm-text); line-height: 1.8; }
.hm-sample-answer > p { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.hm-sample-explain b { display: block; color: var(--hm-ink); }
.hm-sample-explain p { margin: .3rem 0; }

.hm-material-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; margin: .4rem 0 1.25rem; padding: 0; list-style: none; }
.hm-material-list li { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .65rem .85rem; border: 1px solid var(--hm-line); border-radius: 12px; color: var(--hm-text); }
.hm-material-list b { color: var(--hm-ink); font-size: .88rem; white-space: nowrap; }

.hm-video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.1rem; }
.hm-chapter-main .hm-video-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.hm-video-card { padding: .65rem .65rem 1rem; }
.hm-video-thumb, .hm-video-card iframe { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 14px; background: #000; overflow: hidden; }
.hm-video-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.hm-video-thumb:hover img { transform: scale(1.05); }
.hm-video-thumb .hm-play { width: 58px; height: 58px; }
.hm-video-thumb .hm-play svg { width: 24px; height: 24px; }
.hm-video-thumb:hover .hm-play { transform: translate(-50%, -50%) scale(1.1); }
.hm-video-card h3 { margin: .8rem .3rem .1rem; color: var(--hm-ink); font-size: 1rem; font-weight: 600; line-height: 1.45; }
.hm-video-card small { margin: 0 .3rem; color: var(--hm-muted); font-size: .84rem; }
.hm-video-group { margin-bottom: 2.75rem; scroll-margin-top: 110px; }
.hm-video-foot { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 1rem 1.5rem; margin-top: 1rem; color: var(--hm-muted); text-align: center; }
.hm-video-foot p { margin: 0; }
.hm-blog-filter a b { margin-left: .3rem; color: var(--hm-cyan); font-size: .85rem; }

.hm-posts-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hm-chapter-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.hm-chapter-pager a { display: grid; gap: .2rem; padding: 1rem 1.25rem; color: inherit; text-decoration: none; transition: border-color .2s, transform .2s; }
.hm-chapter-pager a:hover { border-color: var(--hm-cyan); transform: translateY(-3px); }
.hm-chapter-pager a.is-next { text-align: right; }
.hm-chapter-pager small { color: var(--hm-cyan); font-weight: 600; }
.hm-chapter-pager strong { color: var(--hm-ink); font-family: var(--mp-display); }
.hm-side-login { display: block; margin-top: .75rem; color: var(--hm-text); font-size: .92rem; text-align: center; }
.hm-side-chapters a span { font-size: .93rem; line-height: 1.45; }
.hm-side-link { display: block; color: var(--hm-cyan); font-weight: 600; text-decoration: none; }

.hm-narrow { max-width: 860px; }
.hm-faq-group { margin-bottom: 2.25rem; }
.hm-faq-group > h2 { display: flex; align-items: center; gap: .65rem; margin: 0 0 1rem; color: var(--hm-ink); font-family: var(--mp-display); font-size: 1.4rem; font-weight: 700; }
.hm-faq-group > h2::before { content: ''; width: .6rem; height: .6rem; border-radius: 50%; background: var(--tone); box-shadow: 0 0 14px var(--tone); }
.hm-faq { margin-bottom: .7rem; border-radius: 18px; }
.hm-faq summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.05rem 1.3rem; color: var(--hm-ink); font-size: 1.06rem; font-weight: 600; cursor: pointer; list-style: none; }
.hm-faq summary::-webkit-details-marker { display: none; }
.hm-faq summary::after { content: '+'; flex: none; display: grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: color-mix(in srgb, var(--tone) 16%, transparent); color: var(--tone); font-size: 1.2rem; transition: transform .25s; }
.hm-faq[open] { border-color: color-mix(in srgb, var(--tone) 45%, transparent); }
.hm-faq[open] summary::after { transform: rotate(45deg); }
.hm-faq p { margin: 0; padding: 0 1.3rem 1.15rem; color: var(--hm-text); line-height: 1.85; }
.hm-faq-more { display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; padding: 1.5rem 1.75rem; }
.hm-faq-more h2 { margin: 0 0 .25rem; color: var(--hm-ink); font-family: var(--mp-display); font-size: 1.3rem; }
.hm-faq-more p { margin: 0; color: var(--hm-text); }
.hm-faq-more .mp-btn { flex: none; }

.hm-app-hero { text-align: left; }
.hm-app-hero-in { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); align-items: center; gap: 3rem; }
.hm-app-hero .hm-app-copy > p { margin-left: 0; }
.hm-app-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem 1.25rem; }
.hm-app-meta { margin-top: 1.5rem; color: var(--hm-muted); font-size: .95rem; }
.hm-phone { justify-self: center; width: min(250px, 70vw); aspect-ratio: 9 / 18.5; padding: 10px; border: 1px solid var(--hm-line-strong); border-radius: 38px; background: linear-gradient(160deg, #1b2240, #0b1022); box-shadow: 0 40px 80px -30px rgba(79, 110, 255, .55); transform: rotate(4deg); animation: hm-bob 7s ease-in-out infinite alternate; }
.hm-phone-screen { position: relative; display: flex; flex-direction: column; align-items: center; height: 100%; padding: 2.4rem 1.2rem 1.2rem; border-radius: 30px; background: radial-gradient(circle at 50% 0, rgba(103, 232, 249, .25), transparent 60%), #0e1430; color: #fff; text-align: center; overflow: hidden; }
.hm-phone-bar { position: absolute; top: 10px; left: 50%; width: 34%; height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .18); transform: translateX(-50%); }
.hm-phone-logo { width: 72px; height: 72px; margin-bottom: .6rem; }
.hm-phone-screen strong { font-family: var(--mp-display); font-size: 1.25rem; }
.hm-phone-screen > span { color: rgba(255, 255, 255, .7); font-size: .8rem; }
.hm-phone-rows { display: grid; gap: .55rem; width: 100%; margin-top: 1.4rem; }
.hm-phone-rows i { display: block; width: var(--w); height: 12px; border-radius: 6px; background: linear-gradient(90deg, rgba(79, 110, 255, .55), rgba(139, 92, 246, .35)); }
.hm-phone-score { display: flex; align-items: center; justify-content: center; gap: .5rem; margin-top: auto; padding: .7rem 1rem; border-radius: 16px; background: rgba(61, 220, 132, .15); color: #3ddc84; }
.hm-phone-score b { font-family: var(--mp-display); font-size: 1.4rem; }
.hm-features-4 { grid-template-columns: repeat(4, 1fr); }
.hm-app-steps { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.hm-app-side { display: grid; gap: 1.25rem; }
.hm-steps-list { display: grid; gap: .85rem; margin: 1rem 0 0; padding: 0; list-style: none; counter-reset: none; }
.hm-steps-list li { display: flex; align-items: flex-start; gap: .85rem; }
.hm-steps-list li > span { display: grid; flex: none; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--hm-grad); color: #fff; font-weight: 700; font-size: .9rem; }
.hm-steps-list p { margin: .2rem 0 0; color: var(--hm-text); line-height: 1.7; }

.hm-legal-layout { padding-top: .5rem; }
.hm-legal-date { color: var(--hm-muted); font-size: .95rem; }

.hm-reviews { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.25rem; }
.hm-review { display: flex; flex-direction: column; margin: 0; padding: 1.7rem 1.6rem 1.4rem; overflow: hidden; }
.hm-review-mark { position: absolute; top: -1.2rem; right: 1rem; z-index: -1; color: var(--tone); font: 700 7rem / 1 Georgia, serif; opacity: .2; }
.hm-review blockquote { margin: 0 0 1.4rem; color: var(--hm-ink); font-size: 1.04rem; line-height: 1.85; }
.hm-review figcaption { display: flex; align-items: center; gap: .85rem; margin-top: auto; }
.hm-review-photo { display: grid; flex: none; place-items: center; width: 3.2rem; height: 3.2rem; border-radius: 50%; background: color-mix(in srgb, var(--tone) 22%, transparent); color: var(--tone); font-family: var(--mp-display); font-size: 1.3rem; font-weight: 700; overflow: hidden; }
.hm-review-photo img { width: 100%; height: 100%; object-fit: cover; }
.hm-review figcaption > span:last-child { display: grid; line-height: 1.4; }
.hm-review strong { color: var(--hm-ink); }
.hm-review figcaption b { color: var(--tone); font-size: .9rem; }
.hm-review small { color: var(--hm-muted); font-size: .85rem; }
.mp-footer-legal a { color: inherit; }
.mp-footer-legal a:hover { color: var(--mp-brand); }

@media (max-width: 980px) {
    .hm-features-4 { grid-template-columns: repeat(2, 1fr); }
    .hm-app-hero-in, .hm-app-steps { grid-template-columns: 1fr; }
    .hm-app-hero { text-align: center; }
    .hm-app-hero .hm-app-copy > p { margin-left: auto; }
    .hm-app-actions { justify-content: center; }
    .hm-phone { display: none; }
}
@media (max-width: 640px) {
    .hm-mini-stats { grid-template-columns: repeat(2, 1fr); }
    .hm-mini-stats-3 { grid-template-columns: repeat(3, 1fr); }
    .hm-mini-stats-3 .hm-mini-stat strong { font-size: 1.5rem; }
    .hm-sample-options, .hm-material-list, .hm-posts-2, .hm-chapter-pager { grid-template-columns: 1fr; }
    .hm-sample-options, .hm-sample-answer { margin-left: 0; padding-left: 0; }
    .hm-test-list li { grid-template-columns: auto minmax(0, 1fr); }
    .hm-test-list .mp-btn { grid-column: 2; justify-self: start; }
    .hm-test-group > summary { padding: 1rem; }
    .hm-test-group .hm-test-list { padding: 0 .7rem; }
    .hm-features-4 { grid-template-columns: 1fr; }
    .hm-faq-more { flex-direction: column; align-items: flex-start; }
    .hm-chapter-pager a.is-next { text-align: left; }
}

/* Visitors who ask for less motion get a still page. */
@media (prefers-reduced-motion: reduce) {
    .hm-phone, .hm-glow, .hm-grid, .hm-glyph, .hm-disc, .hm-halo, .hm-orbit, .hm-orbit i, .hm-formula, .hm-teacher, .hm-ribbon-track, .hm-pill::before,
    .hm-wave path, .hm-grad, .hm-play::before, .hm-play::after,
    body.mp-themed .mp-brand em, body.mp-themed .mp-btn-primary::after,
    .hm-copy > *, .hm-media, .hm-page-hero > .hm-wrap > *, .hm-person-photo, body.mp-themed .mp-auth { animation: none; }
    .hm-reveal, .hm-stagger > * { opacity: 1; transform: none; transition: none; }
}
