:root {
    --smt-cream: #f8f4ea;
    --smt-paper: rgba(255, 253, 248, 0.86);
    --smt-ink: #182126;
    --smt-muted: #5f6f7a;
    --smt-line: rgba(48, 84, 112, 0.14);
    --smt-blue: #2b7fff;
    --smt-blue-soft: rgba(43, 127, 255, 0.14);
    --smt-red: #ea5252;
    --smt-green: #219a71;
    --smt-amber: #dc8e1d;
    --smt-shadow: 0 24px 60px rgba(24, 33, 38, 0.12);
    --smt-radius-xl: 32px;
    --smt-radius-lg: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

section[id],
div[id] {
    scroll-margin-top: 7rem;
}

body {
    margin: 0;
    color: var(--smt-ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.35), rgba(248, 244, 234, 0.9)),
        url("../images/notebook-bg.jpg") center/cover fixed;
}

a {
    text-decoration: none;
}

.container {
    width: min(1120px, calc(100% - 2rem));
    margin: 0 auto;
}

.row {
    display: grid;
}

.d-flex {
    display: flex;
}

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

.flex-wrap {
    flex-wrap: wrap;
}

.align-items-center {
    align-items: center;
}

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

.justify-content-between {
    justify-content: space-between;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 1rem;
}

.g-0 {
    gap: 0;
}

.g-4 {
    gap: 1.5rem;
}

.fw-bold {
    font-weight: 700;
}

.fs-5 {
    font-size: 1.25rem;
}

.h1,
.h4,
.h5 {
    margin: 0;
    line-height: 1.15;
}

.h1 {
    font-size: clamp(2rem, 4vw, 3rem);
}

.h4 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.h5 {
    font-size: 1.1rem;
}

.text-secondary {
    color: var(--smt-muted);
}

.text-white {
    color: #fff;
}

.mb-0 {
    margin-bottom: 0;
}

.mb-3 {
    margin-bottom: 1rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.mt-1 {
    margin-top: 0.25rem;
}

.mt-3 {
    margin-top: 1rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

.mx-2 {
    margin-left: 0.5rem;
    margin-right: 0.5rem;
}

.p-4 {
    padding: 1.5rem;
}

.pt-0 {
    padding-top: 0;
}

.pt-4 {
    padding-top: 1.5rem;
}

.h-100 {
    height: 100%;
}

.obfuscated-contact a {
    color: inherit;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.15em;
}

.page-shell {
    position: relative;
    overflow: hidden;
}

.page-shell::before,
.page-shell::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    filter: blur(10px);
    z-index: 0;
}

.page-shell::before {
    top: -200px;
    right: -120px;
    width: 340px;
    height: 340px;
    background: radial-gradient(circle, rgba(74, 160, 255, 0.09), transparent 68%);
}

.page-shell::after {
    left: -90px;
    top: 420px;
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, rgba(74, 160, 255, 0.05), transparent 68%);
}

.site-header,
.hero,
.section,
.site-footer {
    position: relative;
    z-index: 1;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    padding: 1rem 0;
    background: rgba(248, 240, 223, 0.72);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(24, 33, 38, 0.06);
}

.header-stack {
    display: grid;
    gap: 0.9rem;
}

.header-main {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
}

.header-nav-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.brand-mark {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    object-fit: cover;
    box-shadow: 0 10px 28px rgba(24, 33, 38, 0.16);
}

.brand-kicker {
    display: inline-block;
    margin-bottom: 0.35rem;
    color: var(--smt-blue);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.brand-link {
    color: inherit;
}

.brand-link:hover .brand-mark {
    transform: translateY(-1px);
}

.nav-pill {
    padding: 0.8rem 1.15rem;
    border: 1px solid rgba(24, 33, 38, 0.08);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    color: var(--smt-ink);
    font-weight: 600;
    backdrop-filter: blur(12px);
    transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.nav-pill:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 12px 24px rgba(24, 33, 38, 0.08);
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    flex: 1 1 auto;
}

.site-nav-tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 0 0 auto;
}

.lang-switcher {
    display: flex;
    align-items: center;
}

.lang-select {
    appearance: none;
    -webkit-appearance: none;
    min-width: 178px;
    padding: 0.68rem 2.4rem 0.68rem 0.95rem;
    border-radius: 999px;
    border: 1px solid rgba(24, 33, 38, 0.08);
    background:
        linear-gradient(45deg, transparent 50%, var(--smt-muted) 50%),
        linear-gradient(135deg, var(--smt-muted) 50%, transparent 50%),
        rgba(255, 255, 255, 0.9);
    background-position:
        calc(100% - 18px) calc(50% - 2px),
        calc(100% - 12px) calc(50% - 2px),
        0 0;
    background-size: 6px 6px, 6px 6px, 100% 100%;
    background-repeat: no-repeat;
    color: var(--smt-ink);
    font-size: 0.92rem;
    font-weight: 700;
    box-shadow: 0 12px 24px rgba(24, 33, 38, 0.06);
    cursor: pointer;
    white-space: nowrap;
}

.hero {
    padding: 2rem 0 4rem;
}

.glass-card {
    background: var(--smt-paper);
    border: 1px solid rgba(70, 90, 105, 0.12);
    border-radius: var(--smt-radius-xl);
    box-shadow: var(--smt-shadow);
    backdrop-filter: blur(16px);
}

.hero-copy {
    padding: 2.5rem;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.45rem 0.8rem;
    margin-bottom: 1.25rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(24, 33, 38, 0.07);
    color: var(--smt-muted);
    font-size: 0.88rem;
    font-weight: 600;
}

.hero h1 {
    font-family: "Avenir Next", "Segoe UI", sans-serif;
    font-size: clamp(2.6rem, 6vw, 5rem);
    line-height: 0.96;
    letter-spacing: -0.05em;
    margin-bottom: 1rem;
}

.hero p.lead {
    max-width: 54ch;
    color: var(--smt-muted);
    font-size: 1.08rem;
}

.hero-points {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin: 1.5rem 0 1.75rem;
    padding: 0;
    list-style: none;
}

.hero-points li {
    padding: 0.9rem 1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(43, 127, 255, 0.08);
    font-weight: 600;
}

.cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    margin-bottom: 1rem;
}

.btn-smt-primary,
.btn-smt-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.95rem 1.4rem;
    border-radius: 999px;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-smt-primary {
    background: linear-gradient(135deg, #1a73ff, #55a7ff);
    color: #fff;
    box-shadow: 0 18px 35px rgba(43, 127, 255, 0.28);
}

.btn-smt-secondary {
    background: rgba(255, 255, 255, 0.7);
    color: var(--smt-ink);
    border: 1px solid rgba(24, 33, 38, 0.08);
}

.btn-smt-primary:hover,
.btn-smt-secondary:hover {
    transform: translateY(-2px);
}

.availability-note {
    color: var(--smt-muted);
    font-size: 0.95rem;
}

.hero-preview {
    position: relative;
    padding: 2rem;
}

.phone-frame {
    position: relative;
    max-width: 360px;
    margin: 0 auto;
    padding: 1rem;
    border-radius: 36px;
    background: linear-gradient(180deg, #22323d, #0e151b);
    box-shadow: 0 30px 60px rgba(13, 21, 27, 0.25);
}

.phone-frame::before {
    content: "";
    position: absolute;
    top: 10px;
    left: 50%;
    width: 34%;
    height: 24px;
    transform: translateX(-50%);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.phone-screen {
    min-height: 640px;
    padding: 0.7rem;
    border-radius: 28px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(249, 246, 238, 0.94)),
        url("../images/notebook-bg.jpg") center/cover;
}

.app-shot {
    width: 100%;
    height: 100%;
    min-height: 624px;
    object-fit: cover;
    object-position: top center;
    border-radius: 22px;
    display: block;
}

.hero-preview-note {
    margin-top: 1rem;
    text-align: center;
    color: var(--smt-muted);
    font-size: 0.92rem;
}

.section {
    padding: 1.5rem 0 4rem;
}

.section-heading {
    max-width: 700px;
    margin-bottom: 2rem;
}

.section-heading h2 {
    font-family: "Avenir Next", "Segoe UI", sans-serif;
    font-size: clamp(2rem, 4vw, 3.4rem);
    letter-spacing: -0.04em;
    margin-bottom: 0.8rem;
}

.section-heading p {
    color: var(--smt-muted);
    font-size: 1.05rem;
}

.feature-card,
.workflow-card,
.audience-card,
.cta-panel,
.screenshot-card {
    height: 100%;
    padding: 1.5rem;
    border-radius: var(--smt-radius-lg);
    background: var(--smt-paper);
    border: 1px solid rgba(70, 90, 105, 0.12);
    box-shadow: 0 18px 38px rgba(24, 33, 38, 0.08);
}

.feature-card img {
    width: 58px;
    height: 58px;
    padding: 0.55rem;
    margin-bottom: 1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
    object-fit: contain;
}

.accent-blue { border-top: 5px solid var(--smt-blue); }
.accent-red { border-top: 5px solid var(--smt-red); }
.accent-green { border-top: 5px solid var(--smt-green); }
.accent-amber { border-top: 5px solid var(--smt-amber); }

.workflow-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    margin-bottom: 1rem;
    border-radius: 20px;
    background: rgba(43, 127, 255, 0.12);
    color: var(--smt-blue);
    font-family: "Avenir Next", "Segoe UI", sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
}

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

.audience-card {
    display: flex;
    align-items: center;
    min-height: 110px;
    font-weight: 700;
}

.screenshot-frame {
    padding: 0.55rem;
    border-radius: 28px;
    background: linear-gradient(180deg, #22323d, #0e151b);
    box-shadow: 0 22px 44px rgba(13, 21, 27, 0.18);
}

.screenshot-frame img {
    width: 100%;
    aspect-ratio: 1290 / 2796;
    object-fit: cover;
    object-position: top center;
    border-radius: 22px;
    display: block;
}

.cta-panel {
    padding: 2rem;
    background:
        linear-gradient(135deg, rgba(26, 115, 255, 0.92), rgba(33, 154, 113, 0.84)),
        url("../images/notebook-bg.jpg") center/cover;
    color: #fff;
}

.cta-panel p {
    max-width: 58ch;
    color: rgba(255, 255, 255, 0.84);
}

.site-footer {
    padding: 0 0 2rem;
}

.footer-card {
    padding: 1.25rem 1.5rem;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid rgba(24, 33, 38, 0.08);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem 1rem;
}

.legal-note {
    padding: 1rem 1.1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(24, 33, 38, 0.08);
}

.page-shell-home {
    background:
        radial-gradient(circle at top left, rgba(255, 171, 110, 0.14), transparent 24%),
        radial-gradient(circle at 85% 20%, rgba(43, 127, 255, 0.16), transparent 20%),
        linear-gradient(180deg, #f8f0df 0%, #f4efe8 35%, #fbf8f1 100%);
}

.home-header {
    padding-top: 0.9rem;
}

.hero-home {
    padding-top: 1rem;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 2rem;
    align-items: center;
}

.hero-copy-home {
    padding: 1rem 0;
}

.eyebrow-home {
    background: rgba(255, 255, 255, 0.82);
}

.home-stat-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
    margin: 1.6rem 0;
}

.home-stat {
    padding: 1rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(24, 33, 38, 0.08);
    box-shadow: 0 18px 32px rgba(24, 33, 38, 0.06);
}

.home-stat strong {
    display: block;
    font-size: 1.4rem;
    margin-bottom: 0.2rem;
}

.home-stat span,
.hero-mini-copy span {
    color: var(--smt-muted);
    font-size: 0.92rem;
}

.hero-mini-copy {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem 1.3rem;
}

.hero-mini-copy span {
    position: relative;
    padding-left: 1rem;
}

.hero-mini-copy span::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.45rem;
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: var(--smt-blue);
}

.hero-visual {
    position: relative;
    min-height: 680px;
}

.hero-shot {
    position: absolute;
    overflow: hidden;
    border-radius: 34px;
    background: #172028;
    padding: 0.8rem;
    box-shadow: 0 28px 60px rgba(20, 30, 37, 0.18);
}

.hero-shot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    border-radius: 26px;
    display: block;
}

.hero-shot-main {
    inset: 60px 70px 10px 0;
    transform: rotate(-7deg);
}

.hero-shot-small {
    width: 180px;
    height: 360px;
}

.hero-shot-top {
    top: 0;
    right: 18px;
    transform: rotate(8deg);
}

.hero-shot-bottom {
    bottom: 10px;
    right: 0;
    transform: rotate(11deg);
}

.floating-badge {
    position: absolute;
    padding: 0.65rem 1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    font-weight: 700;
    box-shadow: 0 14px 28px rgba(24, 33, 38, 0.10);
}

.floating-badge-blue {
    top: 18px;
    left: 18px;
    color: var(--smt-blue);
}

.floating-badge-red {
    top: 210px;
    right: 180px;
    color: var(--smt-red);
}

.floating-badge-green {
    bottom: -4px;
    left: 80px;
    color: var(--smt-green);
}

.section-tight {
    padding-top: 0;
}

.section-heading-compact {
    max-width: 560px;
    margin-bottom: 1.4rem;
}

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

.mode-panel {
    padding: 1.35rem;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(24, 33, 38, 0.08);
    box-shadow: 0 18px 38px rgba(24, 33, 38, 0.08);
}

.mode-panel img {
    width: 58px;
    height: 58px;
    padding: 0.6rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.85);
    margin-bottom: 0.9rem;
}

.mode-panel h3 {
    font-size: 1.2rem;
    margin: 0 0 0.45rem;
}

.mode-panel p {
    margin: 0;
    color: var(--smt-muted);
}

.gallery-band {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.2rem;
}

.gallery-card {
    padding: 0.85rem;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(24, 33, 38, 0.08);
    box-shadow: 0 20px 44px rgba(24, 33, 38, 0.08);
}

.gallery-card:nth-child(odd) {
    transform: translateY(-10px);
}

.gallery-frame {
    padding: 0.55rem;
    border-radius: 24px;
    background: linear-gradient(180deg, #22323d, #0e151b);
}

.gallery-frame img {
    width: 100%;
    aspect-ratio: 1290 / 2796;
    object-fit: cover;
    object-position: top center;
    border-radius: 18px;
    display: block;
}

.gallery-copy {
    display: grid;
    gap: 0.35rem;
    padding: 0.9rem 0.35rem 0.25rem;
}

.gallery-copy span {
    color: var(--smt-muted);
    font-size: 0.95rem;
}

.library-banner {
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    gap: 1.4rem;
    padding: 2rem;
    border-radius: 36px;
    background:
        linear-gradient(135deg, rgba(14, 29, 40, 0.96), rgba(29, 62, 83, 0.94)),
        url("../images/notebook-bg.jpg") center/cover;
    color: #fff;
    box-shadow: 0 26px 56px rgba(16, 28, 36, 0.18);
}

.library-banner h2 {
    font-family: "Avenir Next", "Segoe UI", sans-serif;
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 0.98;
    margin: 0 0 0.9rem;
}

.library-banner p {
    color: rgba(255, 255, 255, 0.78);
    margin-bottom: 1.4rem;
}

.library-preview-list {
    display: grid;
    gap: 1rem;
}

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

.home-ranking-panel {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    min-width: 0;
    padding: 1rem;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(10px);
}

.home-ranking-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.home-ranking-head strong {
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.88rem;
}

.home-ranking-list {
    display: grid;
    gap: 0.55rem;
}

.home-ranking-item {
    display: grid;
    gap: 0.25rem;
    padding: 0.8rem 0.9rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #ffffff;
    transition: transform 0.18s ease, background 0.18s ease;
}

.home-ranking-item:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.14);
}

.home-ranking-item span,
.home-ranking-item small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-ranking-item span {
    font-weight: 800;
}

.home-ranking-item small {
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.82rem;
}

.library-preview-card {
    padding: 1.2rem;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(10px);
}

.library-preview-card h3 {
    margin: 0.55rem 0 0.45rem;
    font-size: 1.2rem;
}

.library-preview-card p {
    margin: 0 0 0.8rem;
    color: rgba(255, 255, 255, 0.72);
}

.library-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: inherit;
    font-size: 0.82rem;
    font-weight: 700;
}

.library-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 1rem;
    color: rgba(255, 255, 255, 0.76);
    font-size: 0.9rem;
}

.repo-hero {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.repo-title {
    font-family: "Avenir Next", "Segoe UI", sans-serif;
    font-size: clamp(2.4rem, 5vw, 4.5rem);
    line-height: 0.96;
    margin: 0;
}

.repo-subtitle {
    max-width: 52ch;
    margin-top: 0.9rem;
    color: var(--smt-muted);
    font-size: 1.04rem;
}

.repo-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
}

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

.repo-card {
    padding: 1.4rem;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(24, 33, 38, 0.08);
    box-shadow: 0 18px 40px rgba(24, 33, 38, 0.08);
}

.repo-card-top,
.repo-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.repo-format {
    color: var(--smt-muted);
    font-size: 0.84rem;
    font-weight: 700;
}

.repo-card h2 {
    margin: 0.9rem 0 0.55rem;
    font-size: 1.45rem;
}

.repo-card p {
    margin: 0 0 1rem;
    color: var(--smt-muted);
}

.repo-download {
    margin-top: 1rem;
}

.repo-note {
    margin-top: 1.4rem;
    padding: 1rem 1.2rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(24, 33, 38, 0.08);
}

.policy-stack {
    display: grid;
    gap: 1.1rem;
}

.policy-section {
    padding: 1.2rem 1.3rem;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(24, 33, 38, 0.08);
    box-shadow: 0 14px 28px rgba(24, 33, 38, 0.05);
}

.policy-section p:last-child,
.repo-card p:last-child {
    margin-bottom: 0;
}

.policy-section a,
.repo-card a,
.legal-note a,
.footer-links a {
    color: inherit;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.15em;
}

@media (max-width: 991.98px) {
    .flex-lg-row,
    .flex-md-row {
        flex-direction: column;
    }

    .align-items-lg-center {
        align-items: flex-start;
    }

    .hero-copy,
    .hero-preview {
        padding: 1.5rem;
    }

    .phone-screen {
        min-height: auto;
    }

    .hero-grid,
    .library-banner {
        grid-template-columns: 1fr;
    }

    .hero-visual {
        min-height: auto;
        display: grid;
        grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
        gap: 1rem;
        align-items: stretch;
    }

    .modes-grid,
    .gallery-band,
    .home-rankings,
    .repo-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .repo-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .hero-shot {
        position: relative;
        inset: auto;
        width: 100%;
        height: auto;
        transform: none;
    }

    .hero-shot-main {
        grid-row: span 2;
        aspect-ratio: 0.68;
    }

    .hero-shot-top,
    .hero-shot-bottom {
        aspect-ratio: 0.56;
    }

    .floating-badge-red {
        top: auto;
        bottom: 1rem;
        right: 1rem;
    }

    .floating-badge-blue {
        top: 1rem;
        left: 1rem;
    }

    .floating-badge-green {
        bottom: 1rem;
        left: 1rem;
    }
}

@media (max-width: 767.98px) {
    .hero-points,
    .audience-list {
        grid-template-columns: 1fr;
    }

    .hero {
        padding-top: 0.5rem;
    }

    .hero-copy {
        padding: 1.4rem;
    }

    .hero-preview {
        padding: 1.25rem;
    }

    .phone-frame {
        max-width: 100%;
    }

    .app-shot {
        min-height: auto;
    }

    .hero-grid,
    .home-stat-row,
    .modes-grid,
    .gallery-band,
    .home-rankings,
    .repo-grid {
        grid-template-columns: 1fr;
    }

    .hero-visual {
        grid-template-columns: 1fr;
        gap: 0.9rem;
    }

    .hero-shot-main,
    .hero-shot-top,
    .hero-shot-bottom {
        aspect-ratio: auto;
    }

    .hero-shot-main img,
    .hero-shot-top img,
    .hero-shot-bottom img {
        aspect-ratio: 0.56;
    }

    .floating-badge {
        display: none;
    }

    .site-nav {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
    }

    .nav-pill {
        padding: 0.72rem 0.95rem;
    }

    .nav-pill {
        justify-content: center;
    }

    .header-nav-row,
    .site-nav-tools,
    .lang-switcher {
        width: 100%;
    }

    .lang-select {
        width: 100%;
    }

    .site-nav-tools {
        justify-content: stretch;
    }

    .site-header {
        padding: 0.75rem 0;
    }
}

@media (min-width: 768px) {
    .flex-md-row {
        flex-direction: row;
    }

    .row.g-4 {
        grid-template-columns: repeat(12, minmax(0, 1fr));
    }

    .col-md-4 {
        grid-column: span 4;
    }

    .col-md-6,
    .col-sm-6 {
        grid-column: span 6;
    }

    .p-lg-5 {
        padding: 3rem;
    }
}

@media (min-width: 992px) {
    .flex-lg-row {
        flex-direction: row;
    }

    .align-items-lg-center {
        align-items: center;
    }

    .row.g-0.align-items-center,
    .row.g-4.align-items-start,
    .row.g-4.align-items-stretch {
        grid-template-columns: repeat(12, minmax(0, 1fr));
    }

    .col-lg-5 {
        grid-column: span 5;
    }

    .col-lg-7 {
        grid-column: span 7;
    }
}

@media (min-width: 1200px) {
    .col-xl-3 {
        grid-column: span 3;
    }
}


.repo-filter-card,
.submit-form,
.submit-status {
    background: rgba(255, 253, 248, 0.9);
    border: 1px solid rgba(48, 84, 112, 0.12);
    border-radius: 24px;
    box-shadow: var(--smt-shadow);
}

.repo-filter-card {
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
}

.repo-filter-head {
    display: grid;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.repo-filter-head span {
    color: var(--smt-muted);
}

.repo-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.repo-chip {
    padding: 0.65rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(48, 84, 112, 0.14);
    color: var(--smt-ink);
    background: rgba(255,255,255,0.7);
}

.repo-chip.is-active {
    color: #fff;
    background: var(--smt-blue);
    border-color: var(--smt-blue);
}

.submit-form {
    padding: 1.5rem;
}

.submit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.submit-grid label {
    display: grid;
    gap: 0.45rem;
    font-weight: 600;
}

.submit-grid label span {
    color: var(--smt-ink);
}

.submit-grid label.full {
    grid-column: 1 / -1;
}

.submit-grid input,
.submit-grid select,
.submit-grid textarea {
    width: 100%;
    padding: 0.9rem 1rem;
    border-radius: 16px;
    border: 1px solid rgba(48, 84, 112, 0.16);
    background: rgba(255,255,255,0.92);
    font: inherit;
    color: var(--smt-ink);
}

.submit-status {
    padding: 1rem 1.2rem;
    margin-bottom: 1rem;
}

.submit-status.success {
    border-color: rgba(33, 154, 113, 0.24);
}

.submit-status.error {
    border-color: rgba(234, 82, 82, 0.24);
}


.tree-groups {
    display: grid;
    gap: 1.25rem;
}

.tree-course,
.tree-subject {
    background: rgba(255, 253, 248, 0.9);
    border: 1px solid rgba(48, 84, 112, 0.12);
    border-radius: 24px;
    box-shadow: var(--smt-shadow);
}

.tree-course {
    padding: 1.25rem;
}

.tree-course-head h2,
.tree-subject h3 {
    margin: 0;
}

.tree-subjects {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.tree-subject {
    padding: 1rem 1rem 1.1rem;
}

.tree-topic-list {
    display: grid;
    gap: 0.85rem;
    margin-top: 0.85rem;
}

.tree-topic-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    border-radius: 18px;
    border: 1px solid rgba(48, 84, 112, 0.1);
    background: rgba(255,255,255,0.75);
}

.tree-topic-item p {
    margin: 0.35rem 0 0;
    color: var(--smt-muted);
}

.moderation-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.moderation-actions form {
    margin: 0;
}


.tree-country,
.tree-stage,
.tree-course,
.tree-subject {
    background: rgba(255, 253, 248, 0.9);
    border: 1px solid rgba(48, 84, 112, 0.12);
    border-radius: 24px;
    box-shadow: var(--smt-shadow);
}

.tree-country {
    padding: 1.25rem;
}

.tree-country-head h2,
.tree-stage h3,
.tree-course h4,
.tree-subject h5 {
    margin: 0;
}

.tree-stage-list,
.tree-courses,
.tree-subjects {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.tree-stage,
.tree-course,
.tree-subject {
    padding: 1rem;
}

.filter-blocks {
    display: grid;
    gap: 1rem;
    min-width: 0;
}

.filter-group {
    display: grid;
    gap: 0.5rem;
    min-width: 0;
}

.filter-blocks select {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 0.65rem 0.8rem;
    border: 1px solid rgba(48, 84, 112, 0.16);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--smt-ink);
}

.filter-label {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--smt-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.tree-topic-groups {
    display: grid;
    gap: 0.85rem;
    margin-top: 0.9rem;
}

.tree-topic-group {
    display: grid;
    gap: 0.75rem;
}

.tree-topic-group-head {
    font-weight: 700;
    color: var(--smt-ink);
}

.metadata-block {
    line-height: 1.5;
}

.is-hidden {
    display: none;
}

.audit-list {
    margin: 0.75rem 0 0;
    padding-left: 1.25rem;
}

.audit-list.compact {
    margin-top: 0.5rem;
}

.question-preview-list {
    display: grid;
    gap: 0.75rem;
    margin-top: 1rem;
}

.question-preview-item {
    padding: 0.9rem 1rem;
    border-radius: 18px;
    border: 1px solid rgba(48, 84, 112, 0.12);
    background: rgba(255,255,255,0.72);
}

.question-preview-answers {
    margin: 0.65rem 0 0;
    padding-left: 1.25rem;
    color: var(--smt-muted);
}

.question-preview-answers li.is-correct {
    color: var(--smt-green);
    font-weight: 700;
}


.catalog-layout {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
}

.catalog-sidebar {
    position: sticky;
    top: 6.5rem;
    min-width: 0;
    overflow: hidden;
}

.catalog-main {
    display: grid;
    gap: 1rem;
}

.catalog-summary-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.catalog-summary-card {
    padding: 1rem 1.1rem;
    border-radius: 22px;
    background: rgba(255, 253, 248, 0.9);
    border: 1px solid rgba(48, 84, 112, 0.12);
    box-shadow: var(--smt-shadow);
}

.catalog-summary-card strong {
    display: block;
    margin-top: 0.15rem;
    font-size: 1.05rem;
}

.catalog-summary-card p {
    margin: 0.45rem 0 0;
    color: var(--smt-muted);
}

.catalog-summary-label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--smt-blue);
}

.catalog-tree-shell {
    display: grid;
    gap: 0.95rem;
}

.catalog-branch {
    background: rgba(255, 253, 248, 0.9);
    border: 1px solid rgba(48, 84, 112, 0.12);
    border-radius: 24px;
    box-shadow: var(--smt-shadow);
}

.catalog-branch summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.15rem;
    cursor: pointer;
    list-style: none;
}

.catalog-branch summary::-webkit-details-marker {
    display: none;
}

.catalog-branch-title {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    font-weight: 700;
}

.catalog-branch-country > summary .catalog-branch-title::before,
.catalog-branch-stage > summary .catalog-branch-title::before,
.catalog-branch-course > summary .catalog-branch-title::before,
.catalog-branch-subject > summary .catalog-branch-title::before,
.catalog-branch-topic > summary .catalog-branch-title::before {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.8rem;
    height: 1.8rem;
    border-radius: 999px;
    background: var(--smt-blue-soft);
    color: var(--smt-blue);
    font-size: 0.9rem;
}

.catalog-branch-country > summary .catalog-branch-title::before { content: "🌍"; }
.catalog-branch-stage > summary .catalog-branch-title::before { content: "📚"; }
.catalog-branch-course > summary .catalog-branch-title::before { content: "📁"; }
.catalog-branch-subject > summary .catalog-branch-title::before { content: "🗂"; }
.catalog-branch-topic > summary .catalog-branch-title::before { content: "📝"; }

.catalog-branch-count {
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: rgba(24, 33, 38, 0.06);
    color: var(--smt-muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.catalog-branch-children {
    display: grid;
    gap: 0.85rem;
    padding: 0 1rem 1rem 1.4rem;
    border-top: 1px solid rgba(48, 84, 112, 0.08);
}

.catalog-branch-country > .catalog-branch-children {
    padding-left: 1rem;
}

.catalog-branch-stage > .catalog-branch-children {
    border-left: 2px solid rgba(43, 127, 255, 0.12);
}

.catalog-branch-course > .catalog-branch-children,
.catalog-branch-subject > .catalog-branch-children,
.catalog-branch-topic > .catalog-branch-children {
    border-left: 2px dashed rgba(43, 127, 255, 0.1);
}

.catalog-topic-cards {
    display: grid;
    gap: 0.8rem;
}

.catalog-topic-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    align-items: center;
    padding: 0.95rem 1rem;
    border-radius: 18px;
    border: 1px solid rgba(48, 84, 112, 0.1);
    background: rgba(255,255,255,0.75);
}

.catalog-topic-card-copy h6 {
    margin: 0;
    font-size: 1rem;
}

.catalog-topic-card-copy p {
    margin: 0.35rem 0 0;
    color: var(--smt-muted);
}

@media (max-width: 980px) {
    .catalog-layout {
        grid-template-columns: 1fr;
    }

    .catalog-sidebar {
        position: static;
    }

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

@media (max-width: 720px) {
    .catalog-topic-card {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .catalog-branch summary {
        padding: 0.95rem 1rem;
    }
}


:root {
    --smt-cream: #fbfdff;
    --smt-paper: rgba(255, 255, 255, 0.92);
    --smt-ink: #111827;
    --smt-muted: #7a8392;
    --smt-line: rgba(110, 180, 255, 0.34);
    --smt-blue: #4aa0ff;
    --smt-blue-soft: rgba(74, 160, 255, 0.12);
    --smt-shadow: 0 18px 46px rgba(70, 105, 145, 0.10);
}

body {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(249, 252, 255, 0.98)),
        linear-gradient(135deg, rgba(74, 160, 255, 0.035), rgba(255, 255, 255, 0) 28%),
        linear-gradient(225deg, rgba(74, 160, 255, 0.025), rgba(255, 255, 255, 0) 24%),
        url("../images/notebook-bg.jpg") center/cover fixed;
}

.site-header {
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--smt-line);
}

.brand-mark {
    border: 1px solid var(--smt-line);
    box-shadow: 0 8px 22px rgba(74, 160, 255, 0.10);
}

.nav-pill,
.lang-select {
    border: 1px solid var(--smt-line);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 8px 18px rgba(74, 160, 255, 0.06);
}

.nav-pill:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 12px 22px rgba(74, 160, 255, 0.10);
}

.hero {
    padding: 1.25rem 0 3rem;
}

.glass-card,
.mode-panel,
.gallery-card,
.repo-card,
.repo-filter-card,
.submit-form,
.submit-status,
.catalog-summary-card,
.catalog-branch,
.catalog-topic-card,
.repo-note,
.footer-card {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--smt-line);
    box-shadow: var(--smt-shadow);
}

.hero-copy,
.repo-hero,
.library-banner {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--smt-line);
    border-radius: 32px;
    box-shadow: var(--smt-shadow);
}

.repo-hero,
.library-banner {
    padding: 1.6rem 1.7rem;
}

.library-banner {
    background: rgba(255, 255, 255, 0.92);
    color: var(--smt-ink);
}

.library-banner p,
.library-preview-card p,
.gallery-copy span,
.mode-panel p,
.repo-subtitle,
.repo-note,
.submit-status,
.catalog-summary-card p,
.catalog-topic-card-copy p {
    color: var(--smt-muted);
}

.library-preview-card,
.hero-points li,
.gallery-frame,
.tree-topic-item {
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid rgba(74, 160, 255, 0.14);
}

.gallery-frame {
    background: rgba(255, 255, 255, 0.88);
}

.hero h1,
.repo-title,
.library-banner h2 {
    letter-spacing: -0.04em;
}

.hero h1 {
    font-size: clamp(2.4rem, 5vw, 4.2rem);
}

.repo-title {
    font-size: clamp(2rem, 4vw, 3.35rem);
}

.btn-smt-primary {
    background: #4aa0ff;
    color: #fff;
    box-shadow: 0 14px 28px rgba(74, 160, 255, 0.22);
}

.btn-smt-secondary {
    background: rgba(255, 255, 255, 0.94);
    color: var(--smt-blue);
    border: 1px solid var(--smt-line);
    box-shadow: 0 10px 20px rgba(74, 160, 255, 0.08);
}

.btn-smt-primary:hover,
.btn-smt-secondary:hover {
    transform: translateY(-1px);
}

.repo-chip.is-active,
.catalog-summary-label,
.brand-kicker {
    color: var(--smt-blue);
}

.repo-chip.is-active {
    background: var(--smt-blue-soft);
    border-color: var(--smt-line);
}

.floating-badge,
.library-tag,
.catalog-branch-count {
    border: 1px solid var(--smt-line);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 8px 18px rgba(74, 160, 255, 0.08);
}

.floating-badge-blue,
.floating-badge-red,
.floating-badge-green {
    color: var(--smt-ink);
}

.question-preview-item,
.repo-note.metadata-block {
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(74, 160, 255, 0.14);
    border-radius: 20px;
}

.submit-grid input,
.submit-grid select,
.submit-grid textarea {
    border: 1px solid var(--smt-line);
    border-radius: 18px;
    background: rgba(255,255,255,0.96);
}


.page-banner {
    position: relative;
    overflow: hidden;
}

.page-banner::after {
    content: "";
    position: absolute;
    inset: auto -80px -120px auto;
    width: 220px;
    height: 220px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(74, 160, 255, 0.16), transparent 65%);
    pointer-events: none;
}

.page-banner-submit::before,
.page-banner-review::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 1px solid rgba(110, 180, 255, 0.20);
    pointer-events: none;
}

.page-banner-submit .repo-subtitle,
.page-banner-review .repo-subtitle {
    max-width: 62ch;
}


/* Final app-like polish */
body {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 251, 255, 0.985)),
        radial-gradient(circle at top right, rgba(74, 160, 255, 0.08), transparent 24%),
        radial-gradient(circle at left 38%, rgba(74, 160, 255, 0.05), transparent 22%),
        url("../images/notebook-bg.jpg") center/cover fixed;
    background-blend-mode: normal, screen, screen, normal;
}

.site-header {
    background: rgba(255, 255, 255, 0.88);
    border-bottom: 1px solid rgba(110, 180, 255, 0.22);
    box-shadow: 0 8px 24px rgba(74, 160, 255, 0.05);
}

.page-shell::before {
    top: -220px;
    right: -160px;
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(74, 160, 255, 0.08), transparent 70%);
}

.page-shell::after {
    left: -120px;
    top: 480px;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(74, 160, 255, 0.045), transparent 70%);
}

.hero-copy,
.repo-hero,
.library-banner,
.catalog-tree-shell,
.catalog-sidebar,
.footer-card {
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(12px);
}

.hero-mini-copy,
.home-stat span,
.library-meta,
.catalog-summary-card p,
.repo-subtitle,
.repo-filter-head span {
    color: #738295;
}

.hero-shot,
.gallery-frame,
.library-preview-card,
.catalog-topic-card,
.catalog-summary-card,
.catalog-branch,
.submit-form,
.submit-status,
.repo-note,
.question-preview-item {
    border-color: rgba(110, 180, 255, 0.24);
}

.phone-screen {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(249, 252, 255, 0.96)),
        url("../images/notebook-bg.jpg") center/cover;
}


.topic-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.85rem;
}

.topic-metrics span {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.7rem;
    border-radius: 999px;
    background: rgba(43, 127, 255, 0.08);
    border: 1px solid rgba(43, 127, 255, 0.12);
    color: var(--smt-muted);
    font-size: 0.8rem;
    line-height: 1;
}

.store-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.store-badges-hero {
    margin: 1.15rem 0 1rem;
}

.store-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.72rem;
    min-width: 190px;
    padding: 0.72rem 1rem;
    border-radius: 18px;
    color: #ffffff;
    background: linear-gradient(135deg, #15191f, #05070a);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 16px 32px rgba(24, 33, 38, 0.18);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.store-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 42px rgba(24, 33, 38, 0.22);
}

.store-badge-featured {
    box-shadow: 0 20px 44px rgba(43, 127, 255, 0.28);
}

.store-badge-android {
    background: linear-gradient(135deg, #13382b, #060807);
}

.store-badge-ios {
    background: linear-gradient(135deg, #1c2632, #05070a);
}

.store-badge-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.14);
    font-size: 1.2rem;
    line-height: 1;
}

.store-badge small,
.store-badge strong {
    display: block;
    color: #ffffff;
    line-height: 1.05;
}

.store-badge small {
    margin-bottom: 0.22rem;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.72;
}

.store-badge strong {
    font-size: 0.95rem;
}

.app-promo-section {
    padding-top: 0;
}

.app-promo-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1.5rem;
    align-items: center;
    padding: clamp(1.4rem, 3vw, 2.2rem);
    border-radius: var(--smt-radius-xl);
    background:
        radial-gradient(circle at 8% 15%, rgba(33, 154, 113, 0.16), transparent 24%),
        radial-gradient(circle at 92% 20%, rgba(43, 127, 255, 0.18), transparent 26%),
        rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(110, 180, 255, 0.22);
    box-shadow: var(--smt-shadow);
}

.app-promo-copy h2 {
    max-width: 760px;
    margin: 0.3rem 0 0.6rem;
    font-size: clamp(1.7rem, 3vw, 2.45rem);
    line-height: 1.08;
}

.app-promo-copy p {
    max-width: 720px;
    margin: 0;
    color: var(--smt-muted);
    font-size: 1rem;
    line-height: 1.65;
}

.app-promo-badges {
    justify-content: flex-end;
}

.mobile-store-banner {
    position: fixed;
    left: 50%;
    bottom: 1rem;
    z-index: 50;
    display: none;
    align-items: center;
    gap: 0.85rem;
    width: min(680px, calc(100% - 2rem));
    padding: 0.7rem;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(110, 180, 255, 0.28);
    box-shadow: 0 22px 60px rgba(24, 33, 38, 0.22);
    backdrop-filter: blur(16px);
    transform: translateX(-50%);
}

.mobile-store-banner > span {
    flex: 1;
    color: var(--smt-ink);
    font-weight: 700;
    font-size: 0.92rem;
}

.mobile-store-banner .store-badge {
    min-width: 180px;
    padding: 0.62rem 0.85rem;
}

@media (max-width: 991.98px) {
    .app-promo-card {
        grid-template-columns: 1fr;
    }

    .app-promo-badges {
        justify-content: flex-start;
    }
}

@media (max-width: 767.98px) {
    .store-badges {
        align-items: stretch;
        flex-direction: column;
    }

    .store-badge {
        width: 100%;
        justify-content: flex-start;
    }

    .mobile-store-banner {
        display: flex;
    }

    body {
        padding-bottom: 7.2rem;
    }
}

@media (max-width: 420px) {
    .mobile-store-banner {
        align-items: stretch;
        flex-direction: column;
    }
}

.topic-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    justify-content: flex-end;
}

.topic-page {
    display: grid;
    gap: 2rem;
}

.topic-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    color: var(--smt-muted);
    font-size: 0.92rem;
}

.topic-breadcrumb a {
    color: var(--smt-blue);
    font-weight: 700;
    text-decoration: none;
}

.topic-breadcrumb :is(a, span):not(:first-child)::before {
    content: "/";
    margin-right: 0.5rem;
    color: rgba(29, 40, 47, 0.36);
}

.topic-breadcrumb a:hover {
    text-decoration: underline;
}

.topic-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
    gap: 1.4rem;
    align-items: stretch;
}

.topic-hero-copy,
.topic-cta-panel {
    border: 1px solid rgba(29, 40, 47, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--smt-soft-shadow);
}

.topic-hero-copy {
    padding: clamp(1.5rem, 4vw, 2.4rem);
}

.topic-hero-copy h1 {
    max-width: 980px;
    margin: 0.35rem 0 1rem;
    color: var(--smt-ink);
    font-size: clamp(2rem, 3.2vw, 3.1rem);
    line-height: 1.08;
    overflow-wrap: anywhere;
}

.topic-hero-copy p,
.topic-cta-panel p {
    color: var(--smt-muted);
    line-height: 1.65;
}

.topic-cta-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1rem;
    padding: 1.2rem;
}

.topic-store-badges {
    flex-direction: column;
    align-items: stretch;
}

.topic-store-badges .store-badge {
    width: 100%;
}

.topic-samples {
    display: grid;
    gap: 1.25rem;
}

.topic-sample-card {
    align-items: stretch;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background:
        radial-gradient(circle at top right, rgba(255, 184, 77, 0.18), transparent 34%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(245, 250, 255, 0.9));
}

.topic-sample-card p {
    margin: 0.35rem 0 0;
}

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

.topic-demo-progress,
.topic-demo-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem;
    border-radius: 24px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

.topic-demo-progress span,
.topic-demo-cta p {
    margin: 0;
    color: var(--smt-muted);
}

.topic-demo-progress strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 4.5rem;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    color: var(--smt-ink);
    background: rgba(255, 214, 125, 0.55);
}

.topic-question-number {
    display: inline-flex;
    width: max-content;
    margin-bottom: 0.85rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    color: var(--smt-blue);
    background: rgba(49, 106, 255, 0.1);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.topic-answer-options {
    display: grid;
    gap: 0.65rem;
    margin-top: 1rem;
}

.topic-answer-option {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.65rem;
    align-items: center;
    width: 100%;
    padding: 0.78rem 0.85rem;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 18px;
    color: var(--smt-ink);
    background: rgba(255, 255, 255, 0.9);
    text-align: left;
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.topic-answer-option:hover:not(:disabled),
.topic-answer-option:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(49, 106, 255, 0.38);
    box-shadow: 0 14px 30px rgba(49, 106, 255, 0.12);
    outline: none;
}

.topic-answer-option span {
    display: inline-grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    color: var(--smt-blue);
    background: rgba(49, 106, 255, 0.1);
    font-size: 0.82rem;
    font-weight: 800;
}

.topic-answer-option strong {
    font-size: 0.95rem;
    line-height: 1.35;
}

.topic-answer-option:disabled {
    cursor: default;
}

.topic-answer-option.is-correct {
    border-color: rgba(36, 153, 98, 0.55);
    background: rgba(36, 153, 98, 0.1);
}

.topic-answer-option.is-correct span {
    color: #fff;
    background: var(--smt-green);
}

.topic-answer-option.is-selected-wrong {
    border-color: rgba(221, 69, 69, 0.46);
    background: rgba(221, 69, 69, 0.08);
}

.topic-answer-option.is-selected-wrong span {
    color: #fff;
    background: #dd4545;
}

.nav-toggle {
    display: none;
    align-items: center;
    gap: 0.55rem;
    margin-left: auto;
    padding: 0.72rem 0.95rem;
    border: 1px solid rgba(24, 33, 38, 0.1);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--smt-ink);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(74, 160, 255, 0.08);
}

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
    display: block;
    width: 1.05rem;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
}

.nav-toggle-bars {
    position: relative;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
    content: "";
    position: absolute;
    left: 0;
}

.nav-toggle-bars::before {
    top: -5px;
}

.nav-toggle-bars::after {
    top: 5px;
}

.catalog-search-input {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 0.78rem 0.9rem;
    border: 1px solid rgba(48, 84, 112, 0.16);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.96);
    color: var(--smt-ink);
    font: inherit;
}

.filter-submit {
    width: 100%;
    justify-content: center;
}

.filter-reset {
    justify-self: center;
    color: var(--smt-blue);
    font-weight: 800;
}

@media (max-width: 767px) {
    .container {
        width: min(100% - 1rem, 1120px);
    }

    .page-shell {
        overflow: visible;
    }

    .page-shell::before,
    .page-shell::after {
        display: none;
    }

    .header-main {
        justify-content: space-between;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .header-nav-row {
        display: none;
        padding-top: 0.8rem;
    }

    .site-header.is-nav-open .header-nav-row {
        display: grid;
    }

    .site-nav {
        grid-template-columns: 1fr;
        gap: 0.55rem;
    }

    .nav-pill,
    .lang-select {
        width: 100%;
        text-align: center;
    }

    .section.pt-4 {
        padding-top: 0.9rem;
    }

    .glass-card.p-4,
    .glass-card.p-lg-5 {
        padding: 1rem;
        border-radius: 22px;
    }

    .policy-section {
        padding: 1rem;
        border-radius: 18px;
    }

    .policy-section p,
    .legal-note,
    .repo-subtitle {
        overflow-wrap: anywhere;
    }

    .repo-title {
        font-size: clamp(1.85rem, 10vw, 2.55rem);
        line-height: 1.04;
    }

    .catalog-topic-card {
        gap: 0.9rem;
    }

    .catalog-topic-card-copy h6,
    .catalog-topic-card-copy p,
    .repo-meta,
    .topic-metrics {
        overflow-wrap: anywhere;
    }
}

.topic-answer-feedback {
    min-height: 1.4rem;
    color: var(--smt-muted);
    font-weight: 700;
}

.topic-sample-card[data-answered="1"][data-correct="1"] .topic-answer-feedback {
    color: var(--smt-green);
}

.topic-sample-card[data-answered="1"][data-correct="0"] .topic-answer-feedback {
    color: #b73535;
}

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

    .topic-demo-grid {
        grid-template-columns: 1fr;
    }

    .topic-demo-progress,
    .topic-demo-cta {
        align-items: flex-start;
        flex-direction: column;
    }

    .topic-card-actions {
        justify-content: flex-start;
    }
}

/* Keep the web background aligned with the app: the lined notebook artwork must stay visible. */
body {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.78)),
        url("../images/notebook-bg.jpg") center top / cover fixed;
}

.page-shell,
.page-shell-home {
    background: transparent;
}

.page-shell::before,
.page-shell::after {
    display: none;
}
