:root {
    --bg: #faf7ff;
    --surface: #ffffff;
    --surface-muted: #f4edff;
    --text: #17202a;
    --muted: #67727e;
    --line: #e7dcf4;
    --brand: #c23ee8;
    --brand-dark: #8a2ed6;
    --blue: #6a4be8;
    --blue-dark: #332071;
    --app-pink: #d94ff2;
    --app-purple: #b94fe8;
    --app-violet: #8f45e8;
    --app-indigo: #5b43d6;
    --app-soft: #f1e8ff;
    --gold: #bf7a1a;
    --accent: #d946ef;
    --danger: #b42318;
    --shadow: 0 16px 42px rgba(23, 32, 42, 0.08);
    --shadow-strong: 0 22px 60px rgba(20, 34, 48, 0.14);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background:
        linear-gradient(180deg, rgba(185, 79, 232, 0.1), transparent 360px),
        linear-gradient(90deg, rgba(91, 67, 214, 0.08), transparent 45%),
        var(--bg);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.55;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(10px);
}

.site-topbar {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: #14212d;
    color: #eef6f4;
}

.site-topbar-inner {
    width: min(1180px, calc(100% - 32px));
    min-height: 42px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.topbar-clock {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    align-self: center;
    flex: 0 0 auto;
    gap: 8px;
    padding: 4px 9px 4px 5px;
    border: 1px solid rgba(159, 227, 207, 0.22);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.topbar-clock span {
    min-height: 22px;
    display: inline-flex;
    align-items: center;
    padding: 3px 7px;
    border-radius: 7px;
    background: #9fe3cf;
    color: #10251f;
    font-size: 0.7rem;
    font-weight: 900;
    text-transform: uppercase;
}

.topbar-clock time {
    color: #ffffff;
    font-family: "Courier New", monospace;
    font-size: 0.84rem;
    font-weight: 900;
    white-space: nowrap;
}

.topbar-note,
.topbar-links {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 10px;
    min-width: 0;
}

.topbar-links {
    justify-self: end;
    white-space: nowrap;
}

.topbar-note span {
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 8px;
    background: rgba(191, 122, 26, 0.18);
    color: #ffdca2;
    font-size: 0.76rem;
    font-weight: 900;
    text-transform: uppercase;
}

.topbar-note strong,
.topbar-links a {
    min-width: 0;
    color: #cdd9df;
    font-size: 0.84rem;
    font-weight: 800;
}

.topbar-links a {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
}

.topbar-note strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topbar-links a:hover {
    color: #ffffff;
}

.topbar-feature-link {
    min-height: 28px;
    padding: 4px 9px;
    border: 1px solid rgba(159, 227, 207, 0.28);
    border-radius: 8px;
    background: rgba(159, 227, 207, 0.1);
    color: #ffffff !important;
}

.topbar-feature-link:hover {
    background: #9fe3cf;
    color: #10251f !important;
}

.navbar {
    position: relative;
    width: min(1320px, calc(100% - 32px));
    min-height: 76px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: 0;
}

.brand {
    flex: 0 1 auto;
    min-width: 0;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--brand), var(--blue));
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(23, 107, 91, 0.18);
}

.brand-logo {
    width: auto;
    max-width: 150px;
    height: 40px;
    object-fit: contain;
}

.brand-text {
    display: grid;
    gap: 1px;
    min-width: 0;
}

.brand-text strong {
    color: var(--text);
    line-height: 1.12;
}

.brand-text small {
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 900;
    text-transform: uppercase;
}

.header-notice {
    padding: 8px 16px;
    background: #edf7f4;
    color: var(--brand-dark);
    text-align: center;
    font-size: 0.9rem;
    font-weight: 800;
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 1 1 auto;
    gap: 7px;
    min-width: 0;
    overflow: visible;
    white-space: nowrap;
    scrollbar-width: thin;
}

.nav-links::-webkit-scrollbar {
    height: 0;
}

.nav-links [hidden],
.nav-links .nav-auth-link[hidden],
.nav-links [data-auth-link][hidden] {
    display: none !important;
}

.nav-links a,
.primary-link,
.nav-logout button,
.user-chip,
.nav-dropdown summary {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 8px 12px;
    border-radius: 8px;
    color: var(--muted);
    font-weight: 700;
}

.nav-links a:hover,
.nav-links a.is-active,
.nav-dropdown[open] summary,
.nav-dropdown:hover summary,
.nav-dropdown.is-active summary,
.primary-link,
.nav-logout button:hover {
    background: var(--surface-muted);
    color: var(--brand-dark);
}

.nav-dropdown {
    position: relative;
    flex: 0 0 auto;
}

.nav-dropdown summary {
    gap: 8px;
    border-radius: 8px;
    cursor: pointer;
    list-style: none;
}

.nav-dropdown summary::-webkit-details-marker {
    display: none;
}

.nav-dropdown summary i {
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
    transition: transform 0.18s ease;
}

.nav-dropdown[open] summary i,
.nav-dropdown:hover summary i {
    transform: translateY(2px) rotate(225deg);
}

.subnav-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    z-index: 90;
    min-width: 220px;
    display: none;
    gap: 4px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--shadow-strong);
}

.nav-dropdown[open] .subnav-menu,
.nav-dropdown:hover .subnav-menu,
.nav-dropdown:focus-within .subnav-menu {
    display: grid;
}

.subnav-menu::before {
    content: "";
    position: absolute;
    top: -6px;
    left: 18px;
    width: 12px;
    height: 12px;
    border-top: 1px solid var(--line);
    border-left: 1px solid var(--line);
    background: #ffffff;
    transform: rotate(45deg);
}

.subnav-menu a {
    position: relative;
    z-index: 1;
    width: 100%;
    justify-content: flex-start;
    color: var(--text);
}

.subnav-menu a span {
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-auth-link {
    border: 1px solid rgba(23, 107, 91, 0.18);
    background: #ffffff;
}

.nav-auth-link:last-of-type {
    background: var(--brand);
    color: #ffffff;
}

.nav-auth-link:last-of-type:hover {
    background: var(--brand-dark);
    color: #ffffff;
}

.user-chip {
    background: #edf7f4;
    color: var(--brand-dark);
    font-weight: 900;
}

.nav-logout {
    flex: 0 0 auto;
    margin: 0;
}

.nav-logout button {
    border: 0;
    background: var(--brand);
    color: #ffffff;
    cursor: pointer;
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: var(--text);
}

.site-main {
    min-height: calc(100vh - 250px);
}

.home-hero {
    width: min(1180px, calc(100% - 32px));
    margin: 28px auto 0;
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(340px, 0.82fr);
    gap: 24px;
    align-items: stretch;
}

.home-hero-copy,
.home-hero-panel {
    border: 1px solid rgba(23, 107, 91, 0.14);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--shadow-strong);
}

.home-hero-copy {
    position: relative;
    min-height: 360px;
    overflow: hidden;
    padding: 36px;
    display: grid;
    align-content: center;
    background:
        linear-gradient(135deg, rgba(217, 79, 242, 0.97) 0%, rgba(185, 79, 232, 0.96) 46%, rgba(91, 67, 214, 0.94) 100%),
        linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 70px),
        var(--app-purple);
    color: #ffffff;
}

.home-hero-copy::after {
    content: "";
    position: absolute;
    inset: auto -12% -26% 30%;
    height: 44%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.13), rgba(255, 220, 162, 0.16));
    transform: skewY(-7deg);
}

.home-hero-copy > * {
    position: relative;
    z-index: 1;
}

.home-hero-copy .eyebrow {
    color: #ffdca2;
}

.home-hero-copy h1 {
    max-width: 720px;
    margin: 0;
    font-size: 2.55rem;
    line-height: 1.08;
}

.home-hero-copy p:not(.eyebrow) {
    max-width: 720px;
    margin: 14px 0 0;
    color: #dbe9e6;
    font-size: 1.02rem;
}

.home-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.hero-primary,
.hero-secondary {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 8px;
    font-weight: 900;
}

.hero-primary {
    background: #ffffff;
    color: var(--brand-dark);
}

.hero-secondary {
    border: 1px solid rgba(255, 255, 255, 0.26);
    color: #ffffff;
}

.hero-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.home-hero-points {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.home-hero-points span {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 900;
}

.home-hero-panel {
    padding: 18px;
    display: grid;
    gap: 14px;
    background:
        linear-gradient(180deg, #ffffff 0%, #f8fbff 100%),
        #ffffff;
}

.hero-panel-head {
    min-height: 132px;
    display: grid;
    align-content: end;
    gap: 4px;
    padding: 18px;
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(255, 247, 232, 0.96), rgba(237, 248, 244, 0.96)),
        #f3f7fb;
    border: 1px solid rgba(191, 122, 26, 0.16);
}

.hero-panel-head span {
    color: var(--gold);
    font-weight: 900;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.hero-panel-head strong {
    color: var(--text);
    font-size: 1.55rem;
    line-height: 1.1;
}

.hero-panel-head p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 800;
}

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

.hero-stat-grid div {
    min-height: 84px;
    display: grid;
    align-content: center;
    gap: 4px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.hero-stat-grid div:nth-child(1) {
    border-color: rgba(23, 107, 91, 0.18);
    background: #edf8f4;
}

.hero-stat-grid div:nth-child(2) {
    border-color: rgba(40, 92, 159, 0.18);
    background: #eef5ff;
}

.hero-stat-grid div:nth-child(3) {
    border-color: rgba(191, 122, 26, 0.2);
    background: #fff7e8;
}

.hero-stat-grid div:nth-child(4) {
    border-color: rgba(180, 35, 24, 0.14);
    background: #fff1ee;
}

.hero-stat-grid strong {
    color: var(--brand-dark);
    font-size: 1.22rem;
    line-height: 1.1;
}

.hero-stat-grid span {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
}

.hero-note-strip {
    display: grid;
    gap: 6px;
    padding: 13px;
    border: 1px solid rgba(23, 107, 91, 0.14);
    border-radius: 8px;
    background: #ffffff;
}

.hero-note-strip span {
    width: fit-content;
    padding: 3px 8px;
    border-radius: 8px;
    background: var(--app-indigo);
    color: #ffffff;
    font-size: 0.74rem;
    font-weight: 900;
    text-transform: uppercase;
}

.hero-note-strip p {
    margin: 0;
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 800;
}

.home-app-download {
    width: min(1180px, calc(100% - 32px));
    margin: 24px auto 0;
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(340px, 0.98fr);
    gap: 22px;
    align-items: center;
    overflow: hidden;
    padding: 24px;
    border: 1px solid rgba(23, 107, 91, 0.14);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(236, 253, 245, 0.94), rgba(239, 246, 255, 0.9) 50%, rgba(255, 247, 237, 0.92)),
        #ffffff;
    box-shadow: 0 24px 56px rgba(15, 23, 42, 0.12);
}

.home-app-copy {
    display: grid;
    gap: 12px;
}

.home-app-copy h2 {
    max-width: 620px;
    margin: 0;
    color: var(--text);
    font-size: clamp(1.6rem, 3vw, 2.6rem);
    line-height: 1.08;
}

.home-app-copy p:not(.eyebrow) {
    max-width: 680px;
    margin: 0;
    color: var(--muted);
    font-size: 1rem;
}

.home-app-points {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.home-app-points span {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border: 1px solid rgba(23, 107, 91, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.8);
    color: var(--brand-dark);
    font-size: 0.82rem;
    font-weight: 900;
}

.home-app-showcase {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
}

.home-app-phone {
    min-height: 238px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 8px;
    padding: 18px 12px;
    border: 8px solid #111827;
    border-radius: 28px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(236, 253, 245, 0.92)),
        #ffffff;
    box-shadow: 0 22px 44px rgba(15, 23, 42, 0.2);
    text-align: center;
}

.home-app-phone-speaker {
    width: 42px;
    height: 5px;
    border-radius: 999px;
    background: #111827;
}

.home-app-logo {
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--brand), #2d6cdf);
    color: #ffffff;
    font-weight: 1000;
}

.home-app-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-app-phone strong {
    color: var(--text);
    line-height: 1.15;
}

.home-app-phone small {
    color: var(--muted);
    font-weight: 800;
}

.home-app-store-grid {
    display: grid;
    gap: 10px;
}

.app-store-card {
    min-height: 72px;
    display: grid;
    grid-template-columns: 50px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 10px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 8px;
    background: #ffffff;
    color: var(--text);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.1);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

a.app-store-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.14);
}

.app-store-card.is-disabled {
    opacity: 0.72;
}

.app-store-mark {
    width: 50px;
    height: 50px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #111827;
    color: #ffffff;
    font-size: 0.92rem;
    font-weight: 1000;
}

.app-store-android .app-store-mark {
    background: linear-gradient(135deg, var(--app-pink), var(--app-indigo));
}

.app-store-ios .app-store-mark {
    background: linear-gradient(135deg, #31205f, var(--app-violet));
}

.app-store-windows .app-store-mark {
    background: linear-gradient(135deg, var(--app-indigo), var(--app-purple));
}

.app-store-card small,
.app-store-card strong,
.app-store-card em {
    display: block;
    min-width: 0;
}

.app-store-card small {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.app-store-card strong {
    color: var(--text);
    line-height: 1.15;
}

.app-store-card em {
    margin-top: 2px;
    color: var(--brand-dark);
    font-size: 0.78rem;
    font-style: normal;
    font-weight: 900;
}

.home-content-band {
    width: min(1180px, calc(100% - 32px));
    margin: 24px auto 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.home-content-band article {
    min-height: 128px;
    display: grid;
    align-content: start;
    gap: 8px;
    padding: 16px;
    border: 1px solid rgba(23, 107, 91, 0.12);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(23, 32, 42, 0.1);
}

.home-content-band article:nth-child(1) {
    background: linear-gradient(180deg, #edf8f4, #ffffff 72%);
}

.home-content-band article:nth-child(2) {
    background: linear-gradient(180deg, #eef5ff, #ffffff 72%);
}

.home-content-band article:nth-child(3) {
    background: linear-gradient(180deg, #fff7e8, #ffffff 72%);
}

.home-content-band article:nth-child(4) {
    background: linear-gradient(180deg, #fff1ee, #ffffff 72%);
}

.home-content-band span {
    color: var(--text);
    font-weight: 900;
}

.home-content-band p {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.home-card-zone {
    width: min(1180px, calc(100% - 32px));
    margin: 24px auto 0;
}

.home-news-zone {
    width: min(1180px, calc(100% - 32px));
    margin: 28px auto 56px;
}

.home-section-subtitle {
    max-width: 680px;
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.home-news-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.home-news-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(16, 30, 54, 0.1);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 16px 34px rgba(23, 32, 42, 0.1);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.home-news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 44px rgba(23, 32, 42, 0.15);
}

.home-news-media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(135deg, #dcefe9, #e9effa);
}

.home-news-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.home-news-card:hover .home-news-media img {
    transform: scale(1.035);
}

.home-news-media > span {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: var(--brand-dark);
    font-size: 2.2rem;
    font-weight: 900;
}

.home-news-media em {
    position: absolute;
    left: 10px;
    top: 10px;
    padding: 5px 8px;
    border-radius: 6px;
    background: rgba(14, 81, 74, 0.94);
    color: #ffffff;
    font-size: 0.7rem;
    font-style: normal;
    font-weight: 900;
    text-transform: uppercase;
}

.home-news-body {
    display: grid;
    gap: 8px;
    padding: 13px 14px 15px;
}

.home-news-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
}

.home-news-meta span {
    min-width: 0;
    overflow: hidden;
    color: var(--brand-dark);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-news-meta time {
    flex: 0 0 auto;
}

.home-news-card h3 {
    margin: 0;
    font-size: 1rem;
    line-height: 1.28;
}

.home-news-card h3 a {
    color: var(--text);
}

.home-news-card p {
    display: -webkit-box;
    overflow: hidden;
    margin: 0;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.home-card-zone:last-of-type {
    margin-bottom: 56px;
}

.home-section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.home-section-head h2 {
    margin: 0;
    color: var(--text);
    font-size: clamp(1.35rem, 2vw, 1.9rem);
    line-height: 1.15;
}

.home-section-head a {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border: 1px solid rgba(23, 107, 91, 0.18);
    border-radius: 8px;
    background: #ffffff;
    color: var(--brand-dark);
    font-size: 0.88rem;
    font-weight: 900;
}

.home-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.home-action-card {
    min-height: 240px;
    display: grid;
    align-content: start;
    gap: 12px;
    padding: 18px;
    border: 1px solid var(--widget-border, var(--line));
    border-radius: 8px;
    background:
        linear-gradient(180deg, var(--widget-soft, #f6faf8), #ffffff 66%),
        #ffffff;
    box-shadow: 0 18px 38px rgba(23, 32, 42, 0.12), 0 4px 12px rgba(23, 32, 42, 0.06);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.home-action-card:hover {
    transform: translateY(-4px);
    border-color: var(--widget-accent, var(--brand));
    box-shadow: 0 24px 48px rgba(23, 32, 42, 0.16), 0 8px 18px rgba(23, 32, 42, 0.08);
}

.home-action-card > span,
.site-widget-badge {
    width: fit-content;
    min-height: 26px;
    display: inline-flex;
    align-items: center;
    padding: 4px 9px;
    border-radius: 999px;
    background: var(--widget-accent, var(--brand));
    color: #ffffff;
    font-size: 0.76rem;
    font-weight: 900;
    text-transform: uppercase;
}

.home-action-card h3,
.site-widget h2 {
    margin: 0;
    color: var(--text);
    line-height: 1.2;
}

.home-action-card h3 {
    font-size: 1.15rem;
}

.home-course-zone,
.course-page {
    width: min(1180px, calc(100% - 32px));
    margin: 24px auto 0;
}

.home-course-rail,
.course-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.course-page .course-grid {
    margin-top: 18px;
}

.course-card {
    overflow: hidden;
    border: 1px solid rgba(16, 30, 54, 0.1);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 18px 38px rgba(23, 32, 42, 0.12), 0 5px 14px rgba(23, 32, 42, 0.07);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.course-card:hover {
    transform: translateY(-4px);
    border-color: rgba(185, 79, 232, 0.28);
    box-shadow: 0 24px 48px rgba(23, 32, 42, 0.16), 0 8px 18px rgba(23, 32, 42, 0.08);
}

.course-card-media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    margin: 16px 16px 0;
    overflow: hidden;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--app-indigo), var(--app-purple) 58%, var(--app-pink));
}

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

.course-card-media span,
.course-detail-media span {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: #ffffff;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.course-card-body {
    display: grid;
    gap: 8px;
    padding: 14px 16px 16px;
}

.course-card h2 {
    margin: 0;
    font-size: 1.02rem;
    line-height: 1.22;
}

.course-card h2 a {
    color: var(--text);
}

.course-author {
    min-height: 18px;
    margin: 0;
    color: #4f5f78;
    font-size: 0.78rem;
    line-height: 1.3;
}

.course-card-meta,
.course-price-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
}

.course-card-meta span {
    min-height: 23px;
    display: inline-flex;
    align-items: center;
    padding: 3px 7px;
    border: 1px solid #dce4f2;
    border-radius: 5px;
    background: #ffffff;
    color: #4f5f78;
    font-size: 0.72rem;
    font-weight: 700;
}

.course-card-meta .course-badge {
    border-color: transparent;
    background: #bff1f0;
    color: #075a5a;
    font-weight: 900;
}

.course-card-meta .course-rating {
    color: #9b5a00;
}

.course-price-row strong {
    color: var(--text);
    font-size: 1rem;
    font-weight: 900;
}

.course-price-row del {
    color: #6b7485;
    font-size: 0.86rem;
}

.course-hero,
.course-detail-hero,
.course-description {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 18px 38px rgba(23, 32, 42, 0.1);
}

.course-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(400px, 0.86fr);
    gap: 22px;
    align-items: end;
    padding: 28px;
    background:
        linear-gradient(135deg, rgba(23, 107, 91, 0.1), rgba(49, 108, 244, 0.08) 44%, rgba(245, 178, 72, 0.12)),
        #ffffff;
}

.course-hero-heading {
    grid-column: 1 / -1;
    min-width: 0;
}

.course-hero h1 {
    margin: 0;
    color: var(--text);
    font-size: 2.45rem;
    line-height: 1.05;
    white-space: nowrap;
}

.course-hero p:not(.eyebrow) {
    max-width: 700px;
    margin: 12px 0 0;
    color: var(--muted);
}

.course-filter {
    display: grid;
    grid-template-columns: minmax(140px, 0.8fr) minmax(160px, 1fr) auto;
    gap: 10px;
    width: 100%;
    padding: 10px;
    border: 1px solid rgba(23, 107, 91, 0.16);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.8);
}

.course-filter select,
.course-filter input,
.course-filter button {
    min-height: 42px;
    border-radius: 8px;
    font: inherit;
}

.course-filter select,
.course-filter input {
    width: 100%;
    border: 1px solid var(--line);
    padding: 0 12px;
    background: #ffffff;
}

.course-filter button {
    border: 0;
    padding: 0 18px;
    background: var(--text);
    color: #ffffff;
    font-weight: 900;
}

.course-category-chips {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 18px 0;
}

.course-category-chips a {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #ffffff;
    color: var(--text);
    font-size: 0.88rem;
    font-weight: 900;
}

.course-category-chips a.is-active,
.course-category-chips a:hover {
    border-color: var(--brand);
    background: #eef8f4;
    color: var(--brand-dark);
}

.course-category-chips small {
    color: var(--muted);
}

.course-detail-hero {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: 24px;
    padding: 24px;
}

.course-detail-media {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 8px;
    background: linear-gradient(135deg, #31205f, var(--app-indigo) 58%, var(--app-pink));
}

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

.course-detail-copy {
    display: grid;
    align-content: center;
    gap: 12px;
}

.course-detail-copy h1 {
    margin: 0;
    color: var(--text);
    font-size: clamp(1.7rem, 3vw, 2.8rem);
    line-height: 1.08;
}

.course-detail-copy > p:not(.eyebrow) {
    margin: 0;
    color: var(--muted);
}

.course-description {
    margin-top: 18px;
    padding: 24px;
    color: var(--text);
    line-height: 1.75;
}

.course-video-page {
    max-width: 1180px;
}

.course-premium-hero {
    position: relative;
    overflow: hidden;
    padding: 34px 46px 78px;
    border-radius: 8px;
    background:
        radial-gradient(circle at 86% 20%, rgba(32, 180, 134, 0.24), transparent 34%),
        radial-gradient(circle at 4% 86%, rgba(242, 184, 75, 0.18), transparent 30%),
        linear-gradient(135deg, #12131d, #191d2b 58%, #112720);
    color: #ffffff;
    box-shadow: 0 24px 54px rgba(15, 23, 42, 0.24);
}

.course-crumbs,
.course-premium-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
}

.course-crumbs {
    margin-bottom: 26px;
    color: #c9d2e3;
    font-size: 0.84rem;
    font-weight: 900;
}

.course-crumbs a {
    color: #c7b8ff;
}

.course-premium-copy {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
    gap: 30px;
    align-items: end;
}

.course-premium-copy h1 {
    max-width: 840px;
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.25rem);
    line-height: 1.05;
}

.course-premium-copy p {
    max-width: 860px;
    margin: 16px 0 0;
    color: #f4f7fb;
    font-size: clamp(1rem, 1.6vw, 1.22rem);
    line-height: 1.55;
}

.course-premium-meta {
    margin-top: 20px;
    color: #d9e2ef;
    font-size: 0.9rem;
    font-weight: 800;
}

.course-premium-meta span:not(.course-badge) {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
}

.course-hero-thumb {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    background: linear-gradient(135deg, var(--app-indigo), var(--app-pink));
    box-shadow: 0 24px 54px rgba(0, 0, 0, 0.28);
}

.course-hero-thumb img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.course-hero-thumb span {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: #ffffff;
    font-size: 3rem;
    font-weight: 900;
}

.course-premium-stats {
    width: min(92%, 1060px);
    display: grid;
    grid-template-columns: 1.2fr repeat(3, 1fr);
    margin: -46px auto 28px;
    position: relative;
    z-index: 2;
    overflow: hidden;
    border: 1px solid #d8e0ee;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 20px 44px rgba(15, 23, 42, 0.15);
}

.course-premium-stats > div {
    display: grid;
    place-items: center;
    min-height: 92px;
    padding: 14px 18px;
    text-align: center;
    border-left: 1px solid #d8e0ee;
}

.course-premium-stats > div:first-child {
    border-left: 0;
}

.course-premium-stats span,
.course-premium-stats small {
    color: #5d6680;
    font-size: 0.82rem;
    font-weight: 800;
}

.course-premium-stats strong {
    color: var(--text);
    font-size: 1.45rem;
    line-height: 1.1;
}

.course-premium-stats del {
    color: #6b7485;
    font-size: 0.8rem;
}

.course-premium-stats .premium-tile {
    place-items: center start;
    text-align: left;
    background: linear-gradient(135deg, var(--app-indigo), var(--app-purple));
}

.course-premium-stats .premium-tile span,
.course-premium-stats .premium-tile strong,
.course-premium-stats .premium-tile del {
    color: #ffffff;
}

.course-classroom {
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(330px, 0.82fr);
    gap: 18px;
    align-items: start;
}

.course-player-panel,
.course-content-panel,
.course-empty-lessons {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 18px 38px rgba(23, 32, 42, 0.1);
}

.course-player-panel {
    overflow: hidden;
}

.course-player-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background:
        radial-gradient(circle at 20% 15%, rgba(32, 180, 134, 0.22), transparent 30%),
        linear-gradient(135deg, #0d1322, #16192a);
}

.course-player-frame iframe,
.course-player-frame video {
    width: 100%;
    height: 100%;
    display: block;
    border: 0;
    background: #050712;
}

.course-player-empty {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    padding: 24px;
    color: #ffffff;
    text-align: center;
}

.course-player-empty span,
.course-player-empty strong {
    display: block;
}

.course-player-empty span {
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.13);
    font-weight: 900;
}

.course-player-info {
    padding: 18px;
}

.course-player-info h2 {
    margin: 0 0 10px;
    color: var(--text);
    font-size: clamp(1.2rem, 2vw, 1.65rem);
    line-height: 1.2;
}

.course-content-panel {
    overflow: hidden;
}

.course-content-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid var(--line);
}

.course-content-head h2 {
    margin: 2px 0 0;
    color: var(--text);
    font-size: 1rem;
}

.course-content-head button {
    border: 0;
    background: transparent;
    color: #5b2be0;
    cursor: pointer;
    font: inherit;
    font-size: 0.86rem;
    font-weight: 900;
}

.course-section {
    border-bottom: 1px solid var(--line);
}

.course-section:last-child {
    border-bottom: 0;
}

.course-section summary {
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    cursor: pointer;
    background: #f7f9fc;
    color: var(--text);
}

.course-section summary strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.course-section summary span {
    flex: 0 0 auto;
    color: #5d6680;
    font-size: 0.82rem;
    font-weight: 800;
}

.course-lesson-buttons {
    display: grid;
}

.course-lesson-button {
    min-height: 52px;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto auto;
    gap: 8px;
    align-items: center;
    border: 0;
    border-top: 1px solid #eef2f7;
    background: #ffffff;
    color: #34405a;
    cursor: pointer;
    font: inherit;
    padding: 11px 14px;
    text-align: left;
}

.course-lesson-button:hover,
.course-lesson-button.is-active {
    background: #eef8f4;
    color: #075a5a;
}

.lesson-play-dot {
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    border: 1px solid #dbe3ee;
    border-radius: 50%;
    color: inherit;
    font-size: 0.68rem;
}

.lesson-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lesson-preview {
    color: #5b2be0;
    font-size: 0.8rem;
    font-weight: 900;
    text-decoration: underline;
}

.lesson-duration {
    color: #5d6680;
    font-size: 0.82rem;
    font-weight: 800;
}

.course-empty-lessons {
    display: grid;
    gap: 6px;
    margin: 16px;
    padding: 16px;
}

.course-empty-lessons p {
    margin: 0;
    color: var(--muted);
}

.course-lesson-manager {
    display: grid;
    gap: 12px;
    margin: 18px 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfd;
}

.admin-subsection-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.admin-subsection-head p,
.admin-subsection-head h3 {
    margin: 0;
}

.admin-subsection-head p {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.admin-subsection-head h3 {
    color: var(--text);
    font-size: 1.1rem;
}

.course-lesson-list {
    display: grid;
    gap: 10px;
}

.course-lesson-row {
    overflow: hidden;
    border: 1px solid #dce4f2;
    border-radius: 8px;
    background: #ffffff;
}

.course-lesson-row summary {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 10px 12px;
    cursor: pointer;
}

.course-lesson-row summary span {
    flex: 0 0 auto;
    padding: 4px 8px;
    border-radius: 999px;
    background: #eef8f4;
    color: var(--brand-dark);
    font-size: 0.78rem;
    font-weight: 900;
}

.course-lesson-row summary strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.course-lesson-fields {
    display: grid;
    gap: 12px;
    padding: 0 12px 12px;
}

.home-action-card p,
.site-widget p {
    margin: 0;
    color: var(--muted);
}

.home-action-card a,
.site-widget a {
    width: fit-content;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 4px;
    padding: 8px 12px;
    border-radius: 8px;
    background: var(--widget-accent, var(--brand));
    color: #ffffff;
    font-size: 0.88rem;
    font-weight: 900;
}

.home-action-card a:hover,
.site-widget a:hover {
    filter: brightness(0.94);
}

.home-guide-zone,
.home-flow-zone {
    width: min(1180px, calc(100% - 32px));
    margin: 24px auto 0;
}

.home-guide-zone {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.7fr);
    gap: 18px;
    align-items: stretch;
}

.home-guide-article,
.home-trust-panel,
.home-flow-grid article {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.home-guide-article {
    padding: 24px;
    background:
        linear-gradient(90deg, rgba(23, 107, 91, 0.07), transparent 34%),
        #ffffff;
}

.home-guide-article h2 {
    max-width: 760px;
    margin: 0;
    color: var(--text);
    font-size: 1.75rem;
    line-height: 1.18;
}

.home-guide-article p:not(.eyebrow) {
    margin: 14px 0 0;
    color: var(--muted);
}

.home-trust-panel {
    padding: 20px;
    background:
        linear-gradient(180deg, #3a2476, var(--app-indigo)),
        var(--app-indigo);
    color: #ffffff;
}

.home-trust-panel span {
    display: block;
    color: #ffdca2;
    font-size: 0.82rem;
    font-weight: 900;
    text-transform: uppercase;
}

.home-trust-panel ul {
    display: grid;
    gap: 10px;
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
}

.home-trust-panel li {
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    font-weight: 800;
}

.home-flow-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.home-flow-grid article {
    min-height: 176px;
    display: grid;
    align-content: start;
    gap: 10px;
    padding: 16px;
}

.home-flow-grid span {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--app-indigo);
    color: #ffffff;
    font-weight: 900;
}

.home-flow-grid article:nth-child(2) span {
    background: var(--brand);
}

.home-flow-grid article:nth-child(3) span {
    background: var(--gold);
}

.home-flow-grid article:nth-child(4) span {
    background: var(--danger);
}

.home-flow-grid h3 {
    margin: 0;
    color: var(--text);
    font-size: 1.02rem;
}

.home-flow-grid p {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.plugin-card,
.plugin-notice,
.plugin-link-list {
    width: min(1180px, calc(100% - 32px));
    margin: 18px auto;
    border-radius: 8px;
}

.site-layout-primary .plugin-card,
.site-layout-primary .plugin-notice,
.site-layout-primary .plugin-link-list,
.right-widget-sidebar .plugin-card,
.right-widget-sidebar .plugin-notice,
.right-widget-sidebar .plugin-link-list,
.site-footer .plugin-card,
.site-footer .plugin-notice,
.site-footer .plugin-link-list {
    width: 100%;
    margin: 12px 0;
}

.plugin-card {
    padding: 16px;
    border: 1px solid var(--line);
    background:
        linear-gradient(135deg, rgba(20, 115, 95, 0.09), rgba(45, 108, 223, 0.07)),
        #ffffff;
    box-shadow: 0 16px 34px rgba(23, 32, 42, 0.1);
}

.plugin-card > span,
.plugin-link-list strong {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.plugin-card strong {
    display: block;
    margin-top: 8px;
    color: var(--text);
    font-size: 1.15rem;
    line-height: 1.25;
}

.plugin-card p {
    margin: 8px 0 0;
    color: var(--muted);
}

.plugin-card a,
.plugin-link-list a {
    display: inline-flex;
    margin-top: 12px;
    color: var(--brand-dark);
    font-weight: 900;
}

.plugin-notice {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding: 12px 14px;
    border: 1px solid rgba(20, 115, 95, 0.18);
    background: #effaf6;
    color: var(--brand-dark);
}

.plugin-notice span {
    color: var(--muted);
}

.plugin-link-list {
    display: grid;
    gap: 6px;
    padding: 14px;
    border: 1px solid var(--line);
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(23, 32, 42, 0.08);
}

.widget-green {
    --widget-accent: var(--brand);
    --widget-border: rgba(23, 107, 91, 0.22);
    --widget-soft: #edf8f4;
}

.widget-blue {
    --widget-accent: var(--blue);
    --widget-border: rgba(40, 92, 159, 0.22);
    --widget-soft: #eef5ff;
}

.widget-gold {
    --widget-accent: var(--gold);
    --widget-border: rgba(191, 122, 26, 0.24);
    --widget-soft: #fff7e8;
}

.widget-plain {
    --widget-accent: #344054;
    --widget-border: var(--line);
    --widget-soft: #f6f8fa;
}

.page-wrap {
    width: min(1180px, calc(100% - 32px));
    margin: 24px auto 56px;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.sidebar {
    position: sticky;
    top: 128px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow-strong);
}

.sidebar-search {
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
    padding: 12px;
    border: 1px solid rgba(23, 107, 91, 0.16);
    border-radius: 8px;
    background: #f7fbf9;
}

.sidebar-search label {
    color: var(--brand-dark);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.sidebar-search div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px;
}

.sidebar-search input {
    width: 100%;
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--text);
    font: inherit;
    font-size: 0.9rem;
    outline: 0;
}

.sidebar-search input:focus {
    border-color: rgba(23, 107, 91, 0.42);
    box-shadow: 0 0 0 3px rgba(23, 107, 91, 0.08);
}

.sidebar-search button {
    min-height: 38px;
    padding: 8px 11px;
    border: 0;
    border-radius: 8px;
    background: var(--brand);
    color: #ffffff;
    cursor: pointer;
    font: inherit;
    font-weight: 900;
}

.sidebar-search button:hover {
    background: var(--brand-dark);
}

.sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 8px 12px;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 800;
    text-transform: uppercase;
}

.sidebar-head p {
    margin: 0;
}

.sidebar-head span {
    color: var(--accent);
}

.category-link {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 8px;
    padding: 12px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--muted);
    font-weight: 700;
}

.category-link strong {
    color: var(--text);
    font-size: 0.88rem;
}

.category-link:hover,
.category-link.is-active {
    border-color: rgba(23, 107, 91, 0.22);
    background: #eef8f5;
    color: var(--brand-dark);
    box-shadow: 0 10px 22px rgba(23, 107, 91, 0.08);
}

.page-wrap.has-right-sidebar {
    grid-template-columns: 260px minmax(0, 1fr) 280px;
}

.site-layout-with-sidebar {
    width: min(1180px, calc(100% - 32px));
    margin: 28px auto 56px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 24px;
    align-items: start;
}

.site-layout-primary {
    min-width: 0;
}

.site-layout-primary > .content-page,
.site-layout-primary > .community-page,
.site-layout-primary > .syllabus-page,
.site-layout-primary > .poll-page,
.site-layout-primary > .exam-page,
.site-layout-primary > .exam-solve-page {
    width: 100%;
    margin: 0;
}

.right-widget-sidebar {
    position: sticky;
    top: 128px;
    display: grid;
    gap: 12px;
    min-width: 0;
}

.right-widget-head,
.site-widget {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 16px 34px rgba(23, 32, 42, 0.1);
}

.right-widget-head {
    padding: 14px;
    background:
        linear-gradient(135deg, rgba(185, 79, 232, 0.95), rgba(91, 67, 214, 0.94)),
        var(--app-indigo);
    color: #ffffff;
}

.right-widget-head p {
    margin: 0 0 3px;
    color: #ffdca2;
    font-size: 0.76rem;
    font-weight: 900;
    text-transform: uppercase;
}

.right-widget-head strong {
    display: block;
    font-size: 1.05rem;
    line-height: 1.15;
}

.site-widget {
    display: grid;
    gap: 10px;
    padding: 14px;
    border-color: var(--widget-border, var(--line));
    background:
        linear-gradient(180deg, var(--widget-soft, #f6faf8), #ffffff 70%),
        #ffffff;
}

.site-widget h2 {
    font-size: 1rem;
}

.site-widget p {
    font-size: 0.9rem;
    line-height: 1.45;
}

.question-area {
    min-width: 0;
}

.question-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 18px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.eyebrow {
    margin: 0 0 6px;
    color: var(--accent);
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
}

.question-toolbar h1,
.error-page h1 {
    margin: 0;
    font-size: clamp(1.55rem, 2.2vw, 2.2rem);
    line-height: 1.16;
}

.category-description {
    max-width: 720px;
    margin: 10px 0 0;
    color: var(--muted);
}

.result-count {
    min-width: 104px;
    padding: 13px 14px;
    border: 1px solid rgba(23, 107, 91, 0.18);
    border-radius: 8px;
    text-align: center;
    background: #f2faf7;
}

.result-count strong,
.result-count span {
    display: block;
}

.result-count strong {
    font-size: 1.45rem;
}

.result-count span {
    color: var(--muted);
    font-size: 0.82rem;
}

.featured-category-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.featured-category-card {
    display: grid;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 18px 34px rgba(23, 32, 42, 0.13), 0 3px 10px rgba(23, 32, 42, 0.06);
    transition: transform 0.18s ease, border-color 0.18s ease;
}

.featured-category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(23, 107, 91, 0.34);
    box-shadow: 0 22px 42px rgba(23, 32, 42, 0.16), 0 5px 14px rgba(23, 32, 42, 0.08);
}

.featured-category-media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #dce9e5;
}

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

.featured-category-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(23, 32, 42, 0) 32%, rgba(23, 32, 42, 0.72) 100%);
}

.featured-category-fallback {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #e7f4ef 0%, #edf0f8 100%);
    color: var(--brand-dark);
    font-size: 2rem;
    font-weight: 900;
}

.featured-category-count {
    position: absolute;
    right: 10px;
    bottom: 10px;
    z-index: 1;
    max-width: calc(100% - 20px);
    padding: 5px 8px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--brand-dark);
    font-size: 0.76rem;
    font-weight: 900;
    white-space: nowrap;
}

.featured-category-body {
    display: grid;
    gap: 4px;
    min-height: 88px;
    padding: 12px;
}

.featured-category-body strong,
.featured-category-body small {
    min-width: 0;
}

.featured-category-body strong {
    color: var(--text);
    font-size: 0.98rem;
    line-height: 1.2;
}

.featured-category-body small {
    color: var(--muted);
    font-size: 0.8rem;
    line-height: 1.35;
}

/* Homepage visual refresh */
.home-hero {
    position: relative;
    overflow: hidden;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 8px;
    background:
        linear-gradient(135deg, var(--app-pink) 0%, var(--app-purple) 38%, var(--app-indigo) 100%),
        var(--app-purple);
    box-shadow: 0 26px 70px rgba(116, 55, 210, 0.24);
}

.home-hero::before,
.home-program-zone::before,
.home-app-showcase::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.13) 0 1px, transparent 1px 28px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.16), transparent 42%);
}

.home-hero-copy,
.home-hero-panel {
    position: relative;
    z-index: 1;
    border: 0;
    border-radius: 8px;
}

.home-hero-copy {
    min-height: 350px;
    padding: 28px;
    background: transparent;
    box-shadow: none;
}

.home-hero-copy::after {
    inset: auto -18% -30% 24%;
    height: 48%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04));
}

.home-hero-copy h1 {
    max-width: 780px;
    font-size: clamp(2.15rem, 4vw, 3.35rem);
    letter-spacing: 0;
}

.home-hero-copy p:not(.eyebrow) {
    max-width: 650px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 700;
}

.hero-primary {
    color: var(--brand-dark);
    box-shadow: 0 12px 28px rgba(83, 45, 150, 0.22);
}

.hero-secondary {
    background: rgba(255, 255, 255, 0.12);
}

.home-hero-panel {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.18);
}

.hero-panel-head {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(244, 237, 255, 0.98)),
        #ffffff;
}

.home-app-download {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.home-app-copy,
.home-app-showcase {
    min-height: 240px;
    border-radius: 8px;
    box-shadow: 0 22px 55px rgba(15, 23, 42, 0.12);
}

.home-app-copy {
    padding: 26px;
    align-content: center;
    background:
        linear-gradient(135deg, var(--app-pink) 0%, var(--app-purple) 50%, var(--app-indigo) 100%),
        var(--app-purple);
    color: #ffffff;
}

.home-app-copy .eyebrow,
.home-app-copy h2,
.home-app-copy p:not(.eyebrow) {
    color: #ffffff;
}

.home-app-copy p:not(.eyebrow) {
    color: rgba(255, 255, 255, 0.9);
}

.home-app-points span {
    border-color: rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
}

.home-app-showcase {
    position: relative;
    overflow: hidden;
    padding: 20px;
    border: 1px solid rgba(185, 79, 232, 0.14);
    background:
        linear-gradient(115deg, #f5ecff 0%, #ffffff 56%, #efeafd 100%),
        #ffffff;
}

.home-app-showcase > * {
    position: relative;
    z-index: 1;
}

.home-content-band {
    padding: 14px;
    border: 1px solid rgba(185, 79, 232, 0.12);
    border-radius: 8px;
    background:
        linear-gradient(110deg, rgba(255, 255, 255, 0.92), rgba(245, 236, 255, 0.96), rgba(239, 234, 253, 0.94)),
        #ffffff;
}

.home-content-band article {
    border-color: rgba(255, 255, 255, 0.78);
}

.home-program-zone,
.home-trending-zone,
.home-category-zone,
.home-news-zone,
.home-flow-zone {
    position: relative;
}

.home-program-zone {
    overflow: hidden;
    padding: 22px;
    border-radius: 8px;
    background:
        linear-gradient(135deg, var(--app-pink) 0%, var(--app-purple) 50%, var(--app-indigo) 100%),
        var(--app-purple);
    box-shadow: 0 26px 70px rgba(116, 55, 210, 0.22);
}

.home-program-zone > * {
    position: relative;
    z-index: 1;
}

.home-program-zone .home-section-head .eyebrow,
.home-program-zone .home-section-head h2 {
    color: #ffffff;
}

.home-program-zone .home-section-head a {
    border-color: rgba(255, 255, 255, 0.5);
    color: var(--brand-dark);
}

.home-program-zone .home-card-grid {
    grid-template-columns: 1.05fr repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.home-program-zone .home-action-card {
    min-height: 210px;
    border-color: rgba(255, 255, 255, 0.72);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
}

.home-program-zone .home-action-card:first-child {
    grid-row: span 2;
    align-content: center;
    background:
        linear-gradient(150deg, #4b1f9c 0%, var(--app-purple) 58%, var(--app-pink) 100%),
        var(--app-purple);
    color: #ffffff;
}

.home-program-zone .home-action-card:first-child h3,
.home-program-zone .home-action-card:first-child p {
    color: #ffffff;
}

.home-program-zone .home-action-card:first-child > span {
    background: rgba(255, 255, 255, 0.18);
}

.home-program-zone .home-action-card:first-child a {
    background: #ffffff;
    color: var(--brand-dark);
}

.home-trending-zone,
.home-category-zone,
.home-news-zone {
    padding: 20px;
    border: 1px solid rgba(185, 79, 232, 0.12);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(245, 236, 255, 0.96) 55%, rgba(239, 234, 253, 0.92)),
        #ffffff;
    box-shadow: 0 22px 54px rgba(15, 23, 42, 0.1);
}

.home-category-zone {
    background:
        linear-gradient(135deg, rgba(249, 232, 255, 0.94), rgba(255, 255, 255, 0.96) 44%, rgba(241, 232, 255, 0.96)),
        #ffffff;
}

.home-news-zone {
    margin-bottom: 56px;
    background:
        linear-gradient(135deg, rgba(241, 232, 255, 0.96), rgba(255, 255, 255, 0.98) 55%, rgba(250, 232, 255, 0.92)),
        #ffffff;
}

.home-trending-zone .course-card,
.home-news-card,
.featured-category-card {
    border-color: rgba(255, 255, 255, 0.82);
}

.home-flow-zone {
    padding: 20px;
    border-radius: 8px;
    background:
        linear-gradient(115deg, #f7f0ff, #ffffff 50%, #f2ecff),
        #ffffff;
}

.home-flow-grid article {
    border-color: rgba(185, 79, 232, 0.12);
}

.all-category-page {
    width: min(1260px, calc(100% - 32px));
    margin: 30px auto 56px;
}

.all-category-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    align-items: center;
    min-height: 170px;
    padding: 38px 46px;
    border-radius: 8px;
    background:
        radial-gradient(circle at 8% 18%, rgba(255, 255, 255, 0.1), transparent 28%),
        linear-gradient(135deg, #31205f 0%, var(--app-indigo) 48%, var(--app-pink) 100%);
    box-shadow: 0 24px 54px rgba(15, 23, 42, 0.18);
}

.all-category-hero h1 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(2.2rem, 4.3vw, 3.3rem);
    line-height: 1.05;
}

.all-category-hero p {
    max-width: 760px;
    margin: 10px 0 0;
    color: #e5fff8;
    font-size: clamp(1rem, 1.5vw, 1.22rem);
}

.all-category-summary {
    min-width: 236px;
    display: grid;
    grid-template-columns: auto auto;
    align-items: end;
    gap: 0 8px;
    padding: 20px 24px;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 18px 38px rgba(2, 6, 23, 0.13);
}

.all-category-summary span,
.all-category-summary small {
    color: #5f6f82;
    font-size: 0.86rem;
    font-weight: 900;
}

.all-category-summary span {
    grid-column: 1 / -1;
}

.all-category-summary strong {
    color: var(--brand-dark);
    font-size: 2.1rem;
    line-height: 1;
}

.all-category-summary small {
    color: var(--gold);
}

.all-category-content {
    margin-top: 38px;
}

.all-category-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
}

.all-category-head h2 {
    margin: 0;
    color: var(--text);
    font-size: clamp(1.55rem, 2.4vw, 2rem);
    line-height: 1.1;
}

.all-category-head p {
    margin: 5px 0 0;
    color: var(--muted);
}

.all-category-sort {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-end;
}

.all-category-sort a {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 18px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #ffffff;
    color: var(--brand-dark);
    font-size: 0.88rem;
    font-weight: 900;
    box-shadow: 0 8px 18px rgba(23, 32, 42, 0.06);
}

.all-category-sort a.is-active,
.all-category-sort a:hover {
    border-color: rgba(23, 107, 91, 0.28);
    background: #eef8f4;
}

.all-category-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px 20px;
}

.all-category-card {
    min-height: 88px;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 18px;
    border: 1px solid #dce4ea;
    border-radius: 8px;
    background: #ffffff;
    color: var(--text);
    box-shadow: 3px 7px 0 rgba(178, 198, 212, 0.32), 0 14px 28px rgba(23, 32, 42, 0.07);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.all-category-card:hover {
    transform: translateY(-3px);
    border-color: rgba(23, 107, 91, 0.32);
    box-shadow: 4px 9px 0 rgba(178, 198, 212, 0.36), 0 20px 38px rgba(23, 32, 42, 0.1);
}

.all-category-letter {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--brand);
    color: #ffffff;
    font-size: 1.32rem;
    font-weight: 900;
}

.all-category-card.is-blue .all-category-letter {
    background: var(--blue);
}

.all-category-card.is-gold .all-category-letter {
    background: var(--gold);
}

.all-category-card.is-purple .all-category-letter {
    background: #6d3deb;
}

.all-category-copy {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.all-category-copy strong,
.all-category-copy small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.all-category-copy strong {
    color: var(--text);
    font-size: 1.05rem;
    line-height: 1.2;
}

.all-category-copy small {
    color: #58677b;
    font-size: 0.86rem;
    font-weight: 900;
}

.all-category-arrow {
    color: #9aa8b8;
    font-size: 1.9rem;
    font-weight: 900;
    line-height: 1;
}

.question-list {
    display: grid;
    gap: 16px;
}

.question-card,
.empty-state,
.error-page {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.question-card {
    padding: 22px;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.question-card:hover {
    transform: translateY(-2px);
    border-color: rgba(23, 107, 91, 0.24);
    box-shadow: var(--shadow-strong);
}

.question-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.exam-meta {
    color: #7a8490;
    font-size: 0.84rem;
    font-weight: 700;
}

.type-meta {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--surface-muted);
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.question-title {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px;
    margin: 0;
    font-size: 1.08rem;
    line-height: 1.45;
}

.question-title span {
    color: var(--brand);
}

.option-list {
    display: grid;
    gap: 9px;
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
}

.option-list li {
    display: grid;
    grid-template-columns: 34px 1fr;
    align-items: start;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfd;
    transition: border-color 0.16s ease, background 0.16s ease;
}

.option-list li:hover {
    border-color: rgba(40, 92, 159, 0.22);
    background: #f7fbff;
}

.option-list span {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #e8eef1;
    color: var(--text);
    font-weight: 800;
}

.option-list p,
.answer-panel p {
    margin: 0;
}

.answer-toggle {
    margin-top: 16px;
    min-height: 40px;
    padding: 9px 14px;
    border: 0;
    border-radius: 8px;
    background: var(--brand);
    color: #ffffff;
    cursor: pointer;
    font-weight: 800;
}

.answer-toggle:hover {
    background: var(--brand-dark);
}

.answer-panel {
    display: grid;
    gap: 14px;
    margin-top: 14px;
    padding: 14px;
    border-left: 4px solid var(--brand);
    border-radius: 8px;
    background: #f3faf7;
}

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

.answer-label {
    margin-bottom: 4px !important;
    color: var(--brand-dark);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.answer-text {
    font-weight: 800;
}

.empty-state,
.error-page {
    padding: 34px;
}

.empty-state h2,
.empty-state p,
.error-page p {
    margin: 0;
}

.empty-state p,
.error-page p {
    color: var(--muted);
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 22px;
}

.pagination a,
.pagination span {
    min-width: 40px;
    min-height: 40px;
    display: grid;
    place-items: center;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--muted);
    font-weight: 800;
}

.pagination a.is-active {
    border-color: var(--brand);
    background: var(--brand);
    color: #ffffff;
}

.pagination a.is-disabled {
    pointer-events: none;
    opacity: 0.45;
}

.site-footer {
    --footer-bg: #10252a;
    --footer-surface: #18363a;
    --footer-accent: #69d8b5;
    position: relative;
    overflow: hidden;
    width: 100%;
    border-top: 4px solid var(--footer-accent);
    background:
        linear-gradient(112deg, rgba(255, 255, 255, 0.035), transparent 38%),
        var(--footer-bg);
    color: #eef4f2;
}

.site-footer::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 190px;
    pointer-events: none;
    background:
        repeating-linear-gradient(135deg, transparent 0 18px, rgba(255, 255, 255, 0.025) 18px 19px);
}

.footer-ribbon {
    position: relative;
    width: min(1600px, calc(100% - 48px));
    margin: 0 auto;
    padding: 18px 0 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-ribbon span {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border: 1px solid color-mix(in srgb, var(--footer-accent) 34%, transparent);
    border-radius: 8px;
    background: color-mix(in srgb, var(--footer-accent) 10%, transparent);
    color: #effffb;
    font-size: 0.78rem;
    font-weight: 900;
}

.footer-inner {
    position: relative;
    width: min(1600px, calc(100% - 48px));
    margin: 0 auto;
    padding: 34px 0 30px;
    display: grid;
    grid-template-columns: minmax(230px, 0.8fr) minmax(600px, 2.75fr) minmax(230px, 0.8fr);
    gap: clamp(24px, 3vw, 52px);
    align-items: start;
}

.footer-inner.is-two-column {
    grid-template-columns: minmax(260px, 0.8fr) minmax(600px, 2.2fr);
}

.footer-inner.is-single-column {
    grid-template-columns: 1fr;
}

.footer-inner p {
    max-width: 460px;
    margin: 8px 0 0;
    color: #becdc9;
    font-size: 0.9rem;
    line-height: 1.62;
}

.footer-links {
    min-width: 220px;
    display: grid;
    gap: 8px;
}

.footer-links p {
    margin: 0 0 4px;
    color: #ffffff;
    font-weight: 800;
}

.footer-links a {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    color: #cbd8d5;
    font-weight: 800;
}

.footer-links a:hover {
    color: #ffffff;
}

.footer-about {
    display: grid;
    align-content: start;
    gap: 10px;
}

.footer-share {
    min-width: 220px;
}

.footer-brand-mark {
    min-width: 42px;
    max-width: 84px;
    height: 42px;
    display: grid;
    place-items: center;
    padding: 0 8px;
    border-radius: 8px;
    background: var(--footer-accent);
    color: #10251f;
    font-size: 0.9rem;
    font-weight: 900;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.footer-trust-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 2px;
}

.footer-trust-list span {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    padding: 4px 7px;
    border: 1px solid color-mix(in srgb, var(--footer-accent) 35%, transparent);
    border-radius: 8px;
    background: color-mix(in srgb, var(--footer-accent) 10%, transparent);
    color: var(--footer-accent);
    font-size: 0.72rem;
    font-weight: 900;
}

.footer-link-groups {
    display: grid;
    grid-template-columns: repeat(5, minmax(120px, 1fr));
    gap: clamp(18px, 2vw, 34px);
}

.footer-link-group {
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

.footer-link-group p,
.footer-contact-card p,
.footer-share > p {
    margin: 0 0 8px;
    color: #ffffff;
    font-size: 0.92rem;
    font-weight: 900;
}

.footer-link-group p {
    min-height: 32px;
    padding-bottom: 10px;
    border-bottom: 2px solid color-mix(in srgb, var(--footer-accent) 58%, transparent);
}

.footer-link-group a {
    min-height: 30px;
    display: flex;
    align-items: center;
    gap: 7px;
    color: #c7d5d2;
    font-size: 0.84rem;
    font-weight: 750;
    line-height: 1.3;
}

.footer-link-group a + a {
    margin-top: 3px;
}

.footer-link-group a span {
    width: 16px;
    height: 16px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: color-mix(in srgb, var(--footer-accent) 13%, transparent);
    color: var(--footer-accent);
    flex: 0 0 auto;
}

.footer-link-group a:hover {
    color: #ffffff;
}

.footer-link-group a:hover span {
    background: var(--footer-accent);
    color: #10251f;
}

.footer-connect {
    display: grid;
    align-content: start;
    gap: 18px;
}

.footer-contact-card {
    padding: 16px;
    border: 1px solid color-mix(in srgb, var(--footer-accent) 22%, transparent);
    border-radius: 8px;
    background: color-mix(in srgb, var(--footer-surface) 84%, transparent);
}

.footer-contact-card a,
.footer-contact-card span {
    display: block;
    color: #cbd8d5;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.footer-contact-card span {
    margin-top: 4px;
    color: #9facb4;
    font-size: 0.82rem;
}

.footer-contact-card a:hover {
    color: #ffffff;
}

.share-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.share-links a,
.share-links button {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 8px;
    border: 1px solid color-mix(in srgb, var(--footer-accent) 28%, transparent);
    border-radius: 8px;
    background: color-mix(in srgb, var(--footer-surface) 82%, transparent);
    color: #eef4f2;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 800;
    cursor: pointer;
}

.share-links a:hover,
.share-links button:hover {
    background: var(--footer-accent);
    color: #10251f;
}

.share-links span {
    align-self: center;
    color: #9fe3cf;
    font-size: 0.86rem;
    font-weight: 800;
}

.footer-bottom {
    position: relative;
    width: min(1600px, calc(100% - 48px));
    margin: 0 auto;
    padding: 17px 0 20px;
    display: flex;
    justify-content: space-between;
    gap: 14px;
    border-top: 1px solid color-mix(in srgb, var(--footer-accent) 22%, transparent);
}

.footer-bottom p {
    margin: 0;
    color: #9facb4;
    font-size: 0.86rem;
    font-weight: 800;
}

@media (max-width: 1240px) {
    .footer-inner {
        grid-template-columns: minmax(230px, 0.8fr) minmax(0, 2.2fr);
    }

    .footer-connect {
        grid-column: 1 / -1;
        grid-template-columns: minmax(260px, 0.75fr) minmax(0, 1.25fr);
    }

    .footer-link-groups {
        grid-template-columns: repeat(3, minmax(140px, 1fr));
    }
}

.cookie-consent {
    position: fixed;
    left: 18px;
    right: 18px;
    bottom: 18px;
    z-index: 80;
    width: min(920px, calc(100% - 36px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 16px;
    border: 1px solid rgba(18, 128, 100, 0.18);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 22px 56px rgba(13, 31, 44, 0.18);
}

.cookie-consent[hidden] {
    display: none;
}

.exam-tools-page {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 24px 0 34px;
}

.exam-tools-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: end;
    margin-bottom: 18px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(20, 32, 45, 0.08);
}

.exam-tools-hero h1 {
    margin: 4px 0 0;
    color: var(--ink);
    font-size: clamp(1.6rem, 3vw, 2.7rem);
    line-height: 1.08;
}

.exam-tools-hero p:not(.eyebrow) {
    max-width: 760px;
    margin: 8px 0 0;
    color: var(--muted);
    font-weight: 800;
    line-height: 1.5;
}

.tool-limit-card {
    min-width: 126px;
    padding: 14px;
    border: 1px solid rgba(18, 128, 100, 0.18);
    border-radius: 8px;
    background: var(--brand-soft);
    text-align: center;
}

.tool-limit-card strong,
.tool-limit-card span {
    display: block;
}

.tool-limit-card strong {
    color: var(--brand-dark);
    font-size: 1.7rem;
    font-weight: 900;
}

.tool-limit-card span {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 900;
}

.tool-tabbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 14px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(20, 32, 45, 0.06);
}

.tool-tabbar button {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: #f7fafc;
    color: var(--muted);
    cursor: pointer;
    font: inherit;
    font-size: 0.88rem;
    font-weight: 900;
}

.tool-tabbar button:hover,
.tool-tabbar button.is-active {
    border-color: rgba(18, 128, 100, 0.22);
    background: var(--brand-soft);
    color: var(--brand-dark);
}

.exam-tool-panels {
    display: grid;
    gap: 14px;
}

.tool-tab-panel[hidden] {
    display: none !important;
}

.exam-tool-card {
    min-width: 0;
    display: grid;
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 16px 36px rgba(20, 32, 45, 0.08);
}

.exam-tool-card.is-wide {
    grid-template-columns: 1fr;
}

.tool-card-head {
    display: flex;
    gap: 10px;
    align-items: center;
}

.tool-card-head span {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--brand-soft);
    color: var(--brand-dark);
    font-weight: 900;
}

.tool-card-head h2 {
    margin: 0;
    color: var(--ink);
    font-size: 1.08rem;
    line-height: 1.2;
}

.exam-tool-card .form-grid,
.exam-tool-card .compact-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.tool-workspace {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
    gap: 16px;
    align-items: start;
}

.tool-control-stack {
    min-width: 0;
    display: grid;
    gap: 14px;
}

.tool-preview-grid {
    min-width: 0;
    display: grid;
    gap: 12px;
}

.tool-preview-grid.is-single {
    grid-template-columns: 1fr;
}

.tool-preview-box {
    min-width: 0;
    display: grid;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}

.tool-preview-box.is-combined {
    box-shadow: 0 16px 36px rgba(20, 32, 45, 0.08);
}

.tool-preview-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.tool-preview-head strong {
    color: var(--ink);
    font-size: 0.9rem;
}

.tool-preview-head span,
.tool-preview-box small,
.tool-preview-strip small {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.tool-output-preview {
    display: grid;
    gap: 8px;
    padding: 10px;
    border: 1px solid rgba(23, 107, 91, 0.14);
    border-radius: 8px;
    background: #ffffff;
}

.tool-preview-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.tool-preview-strip strong {
    display: block;
    color: var(--ink);
    font-size: 0.88rem;
}

.tool-preview-strip small {
    display: block;
    margin-top: 2px;
}

.tool-preview-head button,
.tool-preview-strip button {
    min-height: 30px;
    padding: 5px 9px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--brand-dark);
    cursor: pointer;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 900;
}

.tool-preview-box canvas {
    width: 100%;
    max-height: 420px;
    border: 1px dashed rgba(23, 107, 91, 0.24);
    border-radius: 8px;
    background: #ffffff;
    touch-action: none;
}

.tool-preview-box canvas[data-crop-canvas] {
    cursor: crosshair;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.tool-output-preview canvas {
    width: auto;
    max-width: 100%;
    max-height: 260px;
    justify-self: center;
    touch-action: auto;
}

.tool-check-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tool-check-row label {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 9px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
    color: var(--ink);
    font-size: 0.84rem;
    font-weight: 900;
}

.tool-check-row input {
    accent-color: var(--brand);
}

.tool-submit {
    width: 100%;
    justify-content: center;
    border: 0;
    cursor: pointer;
}

.tool-support-note {
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--muted);
    font-weight: 800;
}

.exam-tools-page .form-alert {
    margin-bottom: 14px;
    padding: 12px 14px;
    border: 1px solid rgba(190, 65, 65, 0.18);
    border-radius: 8px;
    background: #fff5f5;
    color: #8c2f2f;
    font-weight: 800;
}

.exam-tools-page .form-alert p {
    margin: 0;
}

.exam-tools-page .form-alert p + p {
    margin-top: 5px;
}

.cookie-consent-copy {
    display: grid;
    gap: 5px;
}

.cookie-consent-copy strong {
    color: var(--text);
    font-size: 1rem;
    font-weight: 900;
}

.cookie-consent-copy p {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.cookie-consent-copy a {
    width: fit-content;
    color: var(--brand);
    font-size: 0.9rem;
    font-weight: 900;
}

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

.cookie-consent-actions button {
    min-height: 40px;
    padding: 9px 13px;
    border-radius: 8px;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

.cookie-reject {
    border: 1px solid var(--line);
    background: #ffffff;
    color: var(--text);
}

.cookie-accept {
    border: 1px solid var(--brand);
    background: var(--brand);
    color: #ffffff;
}

.error-page {
    width: min(760px, calc(100% - 32px));
    margin: 50px auto;
}

.content-page {
    width: min(900px, calc(100% - 32px));
    margin: 34px auto 60px;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.content-page h1 {
    margin: 0 0 16px;
    font-size: clamp(1.7rem, 3vw, 2.4rem);
    line-height: 1.15;
}

.page-content {
    max-width: 100%;
    overflow-wrap: anywhere;
    color: var(--text);
}

.policy-page {
    background:
        linear-gradient(135deg, rgba(15, 118, 110, 0.055), transparent 34%),
        var(--surface);
}

.policy-content {
    font-size: 1rem;
    line-height: 1.75;
}

.policy-content h2 {
    margin: 28px 0 8px;
    color: var(--text);
    font-size: 1.18rem;
    line-height: 1.35;
}

.policy-content p {
    margin: 0 0 13px;
    color: var(--muted);
}

.policy-content a {
    color: var(--primary);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.policy-content a:hover {
    color: var(--primary-dark);
}

.search-page {
    width: min(980px, calc(100% - 32px));
    margin: 28px auto 56px;
    display: grid;
    gap: 18px;
}

.site-layout-primary > .search-page {
    width: 100%;
    margin: 0;
}

.search-hero,
.search-summary,
.search-panel,
.quick-result-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.search-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.6fr);
    gap: 18px;
    align-items: stretch;
    padding: 22px;
}

.search-hero h1,
.search-summary h2 {
    margin: 0;
    line-height: 1.16;
}

.search-hero p:not(.eyebrow) {
    max-width: 650px;
    margin: 10px 0 0;
    color: var(--muted);
}

.search-panel {
    display: grid;
    align-content: center;
    gap: 8px;
    padding: 14px;
    box-shadow: none;
}

.search-panel label {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 900;
    text-transform: uppercase;
}

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

.search-input-row input {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font: inherit;
}

.search-input-row button {
    min-height: 44px;
    padding: 10px 14px;
    border: 0;
    border-radius: 8px;
    background: var(--brand);
    color: #ffffff;
    cursor: pointer;
    font: inherit;
    font-weight: 900;
}

.search-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px;
}

.quick-result-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.quick-result-card {
    display: grid;
    gap: 7px;
    min-height: 142px;
    padding: 14px;
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.quick-result-card:hover {
    transform: translateY(-3px);
    border-color: rgba(23, 107, 91, 0.28);
    box-shadow: var(--shadow-strong);
}

.quick-result-card span {
    width: fit-content;
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    background: #edf7f4;
    color: var(--brand-dark);
    font-size: 0.76rem;
    font-weight: 900;
    text-transform: uppercase;
}

.quick-result-card strong {
    color: var(--text);
    line-height: 1.25;
}

.quick-result-card small {
    color: var(--muted);
    line-height: 1.4;
}

.access-notice p {
    margin: 0;
    color: var(--muted);
}

.notice-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.register-page {
    max-width: 940px;
}

.register-intro {
    margin: -4px 0 20px;
    color: var(--muted);
}

.public-alert {
    margin: 0 0 18px;
    padding: 12px 14px;
    border: 1px solid rgba(180, 35, 24, 0.22);
    border-radius: 8px;
    background: #fff1f0;
    color: #8a1f14;
}

.public-alert p {
    margin: 0;
}

.public-alert p + p,
.public-alert strong {
    display: block;
    margin-top: 6px;
}

.public-success {
    border-color: rgba(23, 107, 91, 0.22);
    background: #eefaf5;
    color: var(--brand-dark);
}

.social-login-box {
    margin: 0 0 20px;
    padding: 14px;
    border: 1px solid rgba(23, 107, 91, 0.14);
    border-radius: 8px;
    background: linear-gradient(135deg, #ffffff, #f6fbf8);
}

.social-login-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 900;
    text-transform: uppercase;
}

.social-login-divider::before,
.social-login-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line);
}

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

.social-login-btn {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--text);
    font-weight: 900;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.social-login-btn:hover {
    border-color: rgba(23, 107, 91, 0.28);
    color: var(--brand-dark);
    transform: translateY(-1px);
}

.social-login-icon {
    display: inline-grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 50%;
    background: #f1f5f9;
    color: var(--brand-dark);
    font-size: 0.82rem;
}

.social-login-google .social-login-icon {
    background: #fff4f0;
    color: #c2410c;
}

.social-login-facebook .social-login-icon {
    background: #eff6ff;
    color: #1d4ed8;
}

.social-login-note {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 0.88rem;
}

.register-form {
    display: grid;
    gap: 18px;
}

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

.wide-field {
    grid-column: 1 / -1;
}

.field-group {
    display: grid;
    gap: 7px;
}

.field-group label {
    color: var(--text);
    font-weight: 800;
}

.field-group input,
.field-group select,
.field-group textarea {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--text);
    font: inherit;
}

.field-group input:focus,
.field-group select:focus,
.field-group textarea:focus {
    outline: 3px solid rgba(23, 107, 91, 0.14);
    border-color: var(--brand);
}

.field-group small {
    color: var(--muted);
}

.register-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
}

.register-actions a {
    color: var(--brand-dark);
    font-weight: 900;
}

.register-actions button {
    min-height: 44px;
    padding: 10px 18px;
    border: 0;
    border-radius: 8px;
    background: var(--brand);
    color: #ffffff;
    cursor: pointer;
    font: inherit;
    font-weight: 900;
}

.register-actions button:hover {
    background: var(--brand-dark);
}

.account-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.account-logout {
    min-height: 40px;
    padding: 8px 14px;
    border: 0;
    border-radius: 8px;
    background: var(--surface-muted);
    color: var(--brand-dark);
    cursor: pointer;
    font: inherit;
    font-weight: 900;
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.profile-grid div {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfd;
}

.profile-grid span,
.profile-grid strong {
    display: block;
}

.profile-grid span {
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 900;
    text-transform: uppercase;
}

.profile-grid strong {
    margin-top: 4px;
}

.profile-extra {
    margin-top: 24px;
}

.notification-preference-panel {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.notification-preference-panel h2 {
    margin: 2px 0 0;
    color: var(--text);
    font-size: 1.15rem;
}

.notification-preference-form {
    display: grid;
    gap: 14px;
    margin-top: 14px;
}

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

.preference-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfd;
}

.preference-card input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--brand);
}

.preference-card strong,
.preference-card small {
    display: block;
}

.preference-card small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.86rem;
    line-height: 1.45;
}

.profile-edit-panel {
    padding-top: 22px;
    border-top: 1px solid var(--line);
}

.referral-dashboard {
    display: grid;
    gap: 18px;
}

.referral-hero {
    min-height: 190px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    padding: 26px;
    border: 1px solid rgba(185, 79, 232, 0.2);
    border-radius: 8px;
    background:
        linear-gradient(120deg, rgba(194, 62, 232, 0.96), rgba(91, 67, 214, 0.94)),
        #8f45e8;
    color: #ffffff;
    box-shadow: 0 20px 46px rgba(91, 67, 214, 0.22);
}

.referral-hero .eyebrow,
.referral-hero p {
    color: rgba(255, 255, 255, 0.84);
}

.referral-hero h1 {
    max-width: 720px;
    margin: 4px 0 8px;
    color: #ffffff;
    font-size: clamp(1.8rem, 4vw, 3.15rem);
    line-height: 1.05;
}

.referral-hero p {
    max-width: 680px;
    margin: 0;
}

.referral-back-link {
    flex: 0 0 auto;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    font-weight: 900;
}

.referral-share-panel,
.referral-wallet-section,
.referral-history-section {
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.referral-leaderboard-section {
    margin-top: 20px;
    padding: 22px;
    border: 1px solid rgba(194, 62, 232, 0.18);
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(217, 79, 242, 0.12), rgba(91, 67, 214, 0.09)),
        var(--surface);
    box-shadow: 0 16px 42px rgba(91, 67, 214, 0.08);
}

.referral-rank-chip {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--app-pink), var(--app-violet));
    color: #fff;
    font-weight: 800;
}

.referral-leaderboard-list {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.referral-leaderboard-list > div {
    display: grid;
    gap: 4px;
    min-width: 0;
    padding: 14px;
    border: 1px solid rgba(91, 67, 214, 0.12);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.82);
}

.referral-leaderboard-list > div.is-current-user {
    border-color: rgba(194, 62, 232, 0.45);
    box-shadow: inset 0 0 0 1px rgba(194, 62, 232, 0.28);
}

.referral-leaderboard-list span {
    width: max-content;
    border-radius: 999px;
    padding: 2px 8px;
    background: rgba(194, 62, 232, 0.12);
    color: var(--brand);
    font-weight: 900;
}

.referral-leaderboard-list strong,
.referral-leaderboard-list small {
    overflow: hidden;
    text-overflow: ellipsis;
}

.referral-leaderboard-list strong {
    white-space: nowrap;
    color: var(--text);
}

.referral-leaderboard-list small {
    color: var(--muted);
    font-weight: 700;
}

.referral-share-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(180px, 0.35fr);
    gap: 16px;
}

.referral-share-copy h2,
.referral-section-head h2,
.referral-campaign-band h2 {
    margin: 2px 0 0;
    color: var(--text);
    font-size: 1.3rem;
}

.referral-share-copy > p:last-child,
.referral-campaign-band p {
    margin: 7px 0 0;
    color: var(--muted);
}

.referral-code-box {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 4px 10px;
    padding: 12px;
    border: 1px dashed rgba(194, 62, 232, 0.4);
    border-radius: 8px;
    background: var(--app-soft);
}

.referral-code-box span {
    grid-column: 1 / -1;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 900;
    text-transform: uppercase;
}

.referral-code-box strong {
    overflow-wrap: anywhere;
    color: var(--blue-dark);
    font-size: 1.15rem;
}

.referral-code-box button,
.referral-link-row button,
.referral-share-actions button,
.referral-share-actions a {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border: 0;
    border-radius: 8px;
    background: var(--brand);
    color: #ffffff;
    cursor: pointer;
    font: inherit;
    font-weight: 900;
}

.referral-link-row {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
}

.referral-link-row input {
    min-width: 0;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfd;
    color: var(--text);
    font: inherit;
}

.referral-share-actions {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.referral-share-actions a {
    background: #ffffff;
    border: 1px solid var(--line);
    color: var(--brand-dark);
}

.referral-copy-status {
    color: var(--brand-dark);
    font-size: 0.82rem;
    font-weight: 900;
}

.referral-stat-grid,
.referral-wallet-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.referral-stat-grid > div,
.referral-wallet-grid > div {
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(31, 24, 70, 0.08);
}

.referral-stat-grid > div:nth-child(1) {
    border-top: 4px solid var(--app-purple);
}

.referral-stat-grid > div:nth-child(2) {
    border-top: 4px solid #e0a22f;
}

.referral-stat-grid > div:nth-child(3) {
    border-top: 4px solid #268b70;
}

.referral-stat-grid > div:nth-child(4) {
    border-top: 4px solid var(--app-indigo);
}

.referral-stat-grid span,
.referral-stat-grid strong,
.referral-wallet-grid span,
.referral-wallet-grid strong {
    display: block;
}

.referral-stat-grid span,
.referral-wallet-grid span {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.referral-stat-grid strong {
    margin-top: 6px;
    color: var(--text);
    font-size: 1.45rem;
    overflow-wrap: anywhere;
}

.referral-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.referral-section-head a {
    color: var(--brand-dark);
    font-weight: 900;
}

.referral-section-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px 14px;
}

.referral-wallet-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.referral-wallet-grid strong {
    margin-top: 5px;
    overflow-wrap: anywhere;
}

.referral-campaign-band {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 22px;
    padding: 20px;
    border: 1px solid rgba(91, 67, 214, 0.2);
    border-radius: 8px;
    background: linear-gradient(110deg, rgba(194, 62, 232, 0.08), rgba(91, 67, 214, 0.08));
}

.referral-campaign-band dl {
    display: grid;
    grid-template-columns: repeat(3, minmax(90px, 1fr));
    gap: 10px;
    margin: 0;
}

.referral-campaign-band dl div {
    padding-left: 12px;
    border-left: 2px solid rgba(194, 62, 232, 0.32);
}

.referral-campaign-band dt {
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 900;
    text-transform: uppercase;
}

.referral-campaign-band dd {
    margin: 3px 0 0;
    color: var(--text);
    font-weight: 900;
}

.referral-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.referral-table {
    width: 100%;
    min-width: 700px;
    border-collapse: collapse;
}

.referral-table th,
.referral-table td {
    padding: 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
}

.referral-table th {
    background: #f8f5fc;
    color: var(--muted);
    font-size: 0.76rem;
    text-transform: uppercase;
}

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

.referral-table td strong,
.referral-table td small {
    display: block;
}

.referral-table td small {
    margin-top: 2px;
    color: var(--muted);
}

.referral-status {
    display: inline-flex;
    padding: 4px 8px;
    border-radius: 999px;
    background: #fff5d8;
    color: #7b5310;
    font-size: 0.76rem;
    font-weight: 900;
}

.referral-status.is-qualified {
    background: #e7f7ef;
    color: #176b4e;
}

.referral-status.is-rejected,
.referral-status.is-reversed {
    background: #fff0ef;
    color: var(--danger);
}

.referral-empty-state {
    border: 1px dashed var(--line);
    border-radius: 8px;
    background: #fbfcfd;
}

.referral-payout-page {
    --payout-success: #176b4e;
    --payout-warning: #8a5b12;
}

.referral-payout-hero {
    background:
        linear-gradient(120deg, rgba(194, 62, 232, 0.96), rgba(91, 67, 214, 0.94)),
        #8f45e8;
}

.referral-payout-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.referral-payout-grid.is-single-step {
    grid-template-columns: minmax(0, 1fr);
}

.referral-payout-grid > section {
    min-width: 0;
}

.referral-payout-form {
    display: grid;
    gap: 13px;
}

.referral-payout-form .field-group {
    display: grid;
    gap: 6px;
}

.referral-payout-form label,
.payout-upload-grid > label {
    color: var(--text);
    font-size: 0.84rem;
    font-weight: 900;
}

.referral-payout-form input,
.referral-payout-form select {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--text);
    font: inherit;
}

.referral-payout-form input:focus,
.referral-payout-form select:focus {
    border-color: var(--brand);
    outline: 3px solid rgba(194, 62, 232, 0.13);
}

.referral-payout-form > small,
.payout-upload-grid small {
    color: var(--muted);
    line-height: 1.45;
}

.payout-bank-fields,
.payout-form-row,
.payout-upload-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.payout-bank-fields .field-group:last-child {
    grid-column: 1 / -1;
}

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

.payout-upload-grid > label {
    min-width: 0;
    display: grid;
    align-content: start;
    gap: 7px;
    padding: 12px;
    border: 1px dashed rgba(194, 62, 232, 0.32);
    border-radius: 8px;
    background: var(--app-soft);
}

.payout-upload-grid input {
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
    font-size: 0.78rem;
}

.payout-saved-summary {
    display: grid;
    gap: 3px;
    margin-bottom: 14px;
    padding: 12px;
    border-left: 4px solid var(--brand);
    border-radius: 4px;
    background: var(--app-soft);
}

.payout-saved-summary strong {
    color: var(--text);
    overflow-wrap: anywhere;
}

.payout-saved-summary span,
.payout-saved-summary small {
    color: var(--muted);
}

.referral-primary-button,
.payout-cancel-button {
    min-height: 42px;
    padding: 9px 14px;
    border: 0;
    border-radius: 8px;
    background: var(--brand);
    color: #ffffff;
    cursor: pointer;
    font: inherit;
    font-weight: 900;
}

.referral-primary-button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.referral-withdraw-form {
    grid-template-columns: minmax(150px, 0.35fr) minmax(220px, 1fr) auto;
    align-items: end;
}

.payout-rule-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 13px;
}

.payout-rule-list span {
    padding: 5px 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #ffffff;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 800;
}

.payout-history-table {
    min-width: 940px;
}

.payout-cancel-button {
    min-height: 34px;
    padding: 6px 10px;
    background: #fff0ef;
    color: var(--danger);
}

.referral-status.is-pending-verification,
.referral-status.is-pending,
.referral-status.is-under-review,
.referral-status.is-processing {
    background: #fff5d8;
    color: var(--payout-warning);
}

.referral-status.is-verified,
.referral-status.is-approved,
.referral-status.is-paid {
    background: #e7f7ef;
    color: var(--payout-success);
}

.referral-status.is-rejected,
.referral-status.is-disabled,
.referral-status.is-cancelled {
    background: #fff0ef;
    color: var(--danger);
}

@media (max-width: 820px) {
    .referral-share-panel,
    .referral-campaign-band,
    .referral-payout-grid {
        grid-template-columns: 1fr;
    }

    .referral-stat-grid,
    .referral-wallet-grid,
    .referral-leaderboard-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .referral-campaign-band dl {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .referral-hero {
        min-height: 0;
        display: grid;
        align-items: start;
        padding: 20px;
    }

    .referral-hero h1 {
        font-size: 1.85rem;
    }

    .referral-back-link {
        width: max-content;
    }

    .referral-share-panel,
    .referral-wallet-section,
    .referral-history-section,
    .referral-leaderboard-section {
        padding: 15px;
    }

    .referral-leaderboard-list {
        grid-template-columns: 1fr;
    }

    .referral-link-row,
    .referral-code-box {
        grid-template-columns: 1fr;
    }

    .referral-code-box span {
        grid-column: auto;
    }

    .referral-code-box button,
    .referral-link-row button {
        width: 100%;
    }

    .referral-stat-grid,
    .referral-wallet-grid,
    .referral-campaign-band dl {
        grid-template-columns: 1fr;
    }

    .referral-section-head {
        align-items: flex-start;
    }

    .referral-section-actions {
        justify-content: flex-start;
    }

    .payout-bank-fields,
    .payout-form-row,
    .payout-upload-grid,
    .referral-withdraw-form {
        grid-template-columns: 1fr;
    }

    .payout-bank-fields .field-group:last-child {
        grid-column: auto;
    }
}

.user-profile-page {
    display: grid;
    gap: 18px;
}

.public-profile-hero {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(23, 107, 91, 0.08), rgba(49, 108, 244, 0.08)),
        #ffffff;
    box-shadow: 0 18px 38px rgba(23, 32, 42, 0.1);
}

.public-profile-avatar,
.follow-user-avatar {
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(185, 79, 232, 0.16);
    background: linear-gradient(135deg, var(--app-purple), var(--app-indigo));
    color: #ffffff;
    font-weight: 900;
}

.public-profile-avatar {
    width: 92px;
    aspect-ratio: 1;
    border-radius: 22px;
    font-size: 2.1rem;
}

.public-profile-avatar img,
.follow-user-avatar img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.public-profile-copy h1 {
    margin: 0;
    color: var(--text);
    font-size: clamp(1.8rem, 3vw, 2.7rem);
    line-height: 1.06;
}

.public-profile-copy > p:not(.eyebrow) {
    margin: 6px 0 0;
    color: var(--muted);
    font-weight: 800;
}

.follow-stat-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.follow-stat-row a {
    min-width: 118px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--text);
}

.follow-stat-row strong,
.follow-stat-row span {
    display: block;
}

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

.follow-stat-row span {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.public-profile-action {
    display: flex;
    justify-content: flex-end;
}

.follow-button {
    min-height: 44px;
    min-width: 128px;
    border: 0;
    border-radius: 8px;
    background: var(--brand);
    color: #ffffff;
    cursor: pointer;
    font: inherit;
    font-weight: 900;
}

.follow-button.is-following {
    border: 1px solid rgba(23, 107, 91, 0.22);
    background: #eef8f4;
    color: var(--brand-dark);
}

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

.follow-preview-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.follow-preview-head a {
    color: var(--brand-dark);
    font-size: 0.88rem;
    font-weight: 900;
}

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

.follow-user-card {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-height: 68px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--text);
    box-shadow: 0 10px 24px rgba(23, 32, 42, 0.08);
}

.follow-user-avatar {
    width: 48px;
    aspect-ratio: 1;
    border-radius: 14px;
}

.follow-user-card strong,
.follow-user-card small {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.follow-user-card small,
.muted-copy {
    color: var(--muted);
}

.account-follow-row {
    margin: 18px 0 0;
}

.user-directory-page {
    display: grid;
    gap: 18px;
}

.directory-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
    gap: 18px;
    align-items: end;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(23, 107, 91, 0.1), rgba(255, 191, 71, 0.12)),
        #ffffff;
    box-shadow: 0 18px 42px rgba(23, 32, 42, 0.1);
}

.directory-hero h1 {
    margin: 0;
    font-size: clamp(1.8rem, 3vw, 2.65rem);
    line-height: 1.08;
}

.directory-hero p:not(.eyebrow) {
    max-width: 640px;
    margin: 8px 0 0;
    color: var(--muted);
}

.directory-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.directory-search input,
.directory-search button {
    min-height: 44px;
    border-radius: 8px;
    font: inherit;
}

.directory-search input {
    min-width: 0;
    border: 0;
    padding: 0 10px;
    outline: none;
}

.directory-search button {
    border: 0;
    padding: 0 16px;
    background: var(--brand);
    color: #ffffff;
    font-weight: 900;
}

.directory-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--muted);
    font-weight: 800;
}

.directory-meta a,
.mini-link {
    color: var(--brand-dark);
    font-weight: 900;
}

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

.directory-card {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 14px 32px rgba(23, 32, 42, 0.09);
}

.directory-card-main {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    color: var(--text);
}

.directory-card-main strong,
.directory-card-main small,
.directory-card-details span {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.directory-card-main small,
.directory-card-details,
.directory-card-foot small {
    color: var(--muted);
}

.directory-card-details {
    display: grid;
    gap: 4px;
    font-size: 0.9rem;
    font-weight: 800;
}

.directory-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 34px;
}

.mini-follow {
    min-height: 34px;
    border: 0;
    border-radius: 8px;
    padding: 0 12px;
    background: var(--brand);
    color: #ffffff;
    cursor: pointer;
    font: inherit;
    font-size: 0.85rem;
    font-weight: 900;
}

.mini-follow.is-following {
    border: 1px solid rgba(23, 107, 91, 0.22);
    background: #eef8f4;
    color: var(--brand-dark);
}

.notification-preview-panel {
    margin-top: 18px;
}

.notification-list {
    display: grid;
    gap: 12px;
}

.notification-list.is-preview {
    gap: 8px;
}

.notification-card {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(23, 32, 42, 0.08);
}

.notification-card.is-unread {
    border-color: rgba(23, 107, 91, 0.28);
    background: linear-gradient(135deg, rgba(23, 107, 91, 0.07), rgba(191, 122, 26, 0.08)), #ffffff;
}

.notification-avatar {
    width: 46px;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: linear-gradient(135deg, var(--brand), var(--blue));
    color: #ffffff;
    font-weight: 900;
}

.notification-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.notification-copy {
    min-width: 0;
}

.notification-copy strong,
.notification-copy p,
.notification-copy small {
    display: block;
    min-width: 0;
}

.notification-copy strong {
    color: var(--text);
    line-height: 1.25;
}

.notification-copy p {
    margin: 3px 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.notification-copy small {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.notification-actions,
.notice-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.notification-actions {
    justify-content: flex-end;
    margin: 8px 0 0;
}

.notification-actions form,
.notice-actions form {
    margin: 0;
}

.notification-actions button,
.notice-actions button.primary-link,
.danger-link {
    min-height: 36px;
    border: 0;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    font: inherit;
    font-size: 0.86rem;
    font-weight: 900;
}

.notification-actions button,
.notice-actions button.primary-link {
    background: var(--surface-muted);
    color: var(--brand-dark);
}

.danger-link {
    background: #fff1f0;
    color: var(--danger);
}

.syllabus-page {
    width: min(1000px, calc(100% - 32px));
    margin: 28px auto 56px;
    display: grid;
    gap: 18px;
}

.syllabus-hero,
.syllabus-detail,
.syllabus-viewer-panel,
.syllabus-content-box,
.syllabus-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 18px 42px rgba(23, 32, 42, 0.1);
}

.syllabus-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 22px;
}

.syllabus-hero h1,
.syllabus-detail h1,
.syllabus-viewer-head h2 {
    margin: 0;
    line-height: 1.16;
}

.syllabus-hero h1 {
    font-size: clamp(1.65rem, 3vw, 2.45rem);
}

.syllabus-hero p:not(.eyebrow) {
    max-width: 700px;
    margin: 10px 0 0;
    color: var(--muted);
}

.syllabus-list {
    display: grid;
    gap: 14px;
}

.syllabus-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
}

.syllabus-card-main {
    min-width: 0;
}

.syllabus-card h2 {
    margin: 8px 0 6px;
    color: var(--text);
    font-size: 1.15rem;
    line-height: 1.25;
}

.syllabus-card p,
.syllabus-description {
    color: var(--muted);
}

.syllabus-card p {
    margin: 0 0 10px;
}

.syllabus-download-link {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    padding: 9px 14px;
    border-radius: 8px;
    background: var(--brand);
    color: #ffffff;
    font-weight: 900;
}

.syllabus-download-link:hover {
    background: var(--brand-dark);
}

.syllabus-detail,
.syllabus-viewer-panel,
.syllabus-content-box {
    min-width: 0;
    padding: 22px;
}

.syllabus-content-box {
    overflow: hidden;
}

.syllabus-description {
    margin-top: 14px;
}

.syllabus-rich-content {
    overflow-x: auto;
    max-width: 100%;
    color: var(--text);
    line-height: 1.7;
    -webkit-overflow-scrolling: touch;
}

.syllabus-rich-content > *:first-child {
    margin-top: 0;
}

.syllabus-rich-content > *:last-child {
    margin-bottom: 0;
}

.syllabus-rich-content h2,
.syllabus-rich-content h3,
.syllabus-rich-content h4 {
    color: var(--text);
    line-height: 1.2;
}

.syllabus-rich-content p {
    color: var(--muted);
}

.syllabus-rich-content img,
.syllabus-rich-content video,
.syllabus-rich-content iframe,
.syllabus-rich-content figure {
    display: block;
    max-width: 100% !important;
    height: auto !important;
}

.syllabus-rich-content figure {
    margin-inline: 0;
}

.syllabus-rich-content table {
    width: 100% !important;
    max-width: 100% !important;
    border-collapse: collapse;
    table-layout: fixed;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.syllabus-rich-content th,
.syllabus-rich-content td {
    padding: 10px;
    border: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.syllabus-rich-content th {
    background: #edf7f4;
    color: var(--brand-dark);
}

.syllabus-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
}

.syllabus-actions-below {
    justify-content: center;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.syllabus-pdf-action-grid {
    margin-top: 18px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.syllabus-pdf-action-card {
    min-height: 104px;
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 14px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 8px;
    background:
        linear-gradient(135deg, #ffffff, #f8fbff),
        #ffffff;
    color: var(--text);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.1);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.syllabus-pdf-action-card:hover {
    transform: translateY(-2px);
    border-color: rgba(23, 107, 91, 0.24);
    box-shadow: 0 22px 44px rgba(15, 23, 42, 0.14);
}

.syllabus-action-icon {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--brand), #2d6cdf);
    color: #ffffff;
    font-size: 0.84rem;
    font-weight: 1000;
}

.syllabus-download-card .syllabus-action-icon {
    background: linear-gradient(135deg, #d97706, #b42318);
}

.syllabus-action-copy {
    display: grid;
    gap: 3px;
}

.syllabus-action-copy small,
.syllabus-action-copy strong,
.syllabus-action-copy em {
    display: block;
    min-width: 0;
}

.syllabus-action-copy small {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.syllabus-action-copy strong {
    color: var(--text);
    font-size: 1.05rem;
    line-height: 1.18;
}

.syllabus-action-copy em {
    color: var(--brand-dark);
    font-size: 0.84rem;
    font-style: normal;
    font-weight: 900;
}

.syllabus-delay-link.is-locked {
    cursor: wait;
    opacity: 0.68;
    filter: grayscale(0.2);
    pointer-events: auto;
}

.syllabus-delay-link[aria-disabled="true"] {
    background: #f3f4f6;
    color: var(--text);
}

.syllabus-viewer-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
}

.syllabus-pdf-viewer {
    width: 100%;
    min-height: 720px;
    height: min(82vh, 820px);
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f4f7f9;
}

.community-page {
    width: min(960px, calc(100% - 32px));
    margin: 28px auto 56px;
    display: grid;
    gap: 18px;
}

.community-hero,
.community-submit-panel,
.community-detail,
.community-comments {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 18px 42px rgba(23, 32, 42, 0.1);
}

.community-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 22px;
}

.community-hero h1,
.community-detail h1 {
    margin: 0;
    line-height: 1.16;
}

.community-hero h1 {
    font-size: clamp(1.65rem, 3vw, 2.45rem);
}

.community-hero p:not(.eyebrow) {
    max-width: 680px;
    margin: 10px 0 0;
    color: var(--muted);
}

.community-submit-panel,
.community-detail,
.community-comments {
    padding: 20px;
}

.community-submit-panel h2,
.community-section-head h2 {
    margin: 4px 0 0;
    line-height: 1.2;
}

.community-submit-panel form {
    margin-top: 16px;
}

.community-author-grid {
    grid-template-columns: minmax(0, 320px);
}

.community-section-head,
.community-card,
.comment-card {
    display: flex;
    gap: 14px;
}

.community-section-head {
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.community-list {
    display: grid;
    gap: 14px;
}

.community-card {
    align-items: stretch;
    justify-content: space-between;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 14px 32px rgba(23, 32, 42, 0.08);
}

.community-card-main {
    min-width: 0;
}

.community-card h2 {
    margin: 0;
    color: var(--text);
    font-size: 1.08rem;
    line-height: 1.3;
}

.community-card a:hover h2 {
    color: var(--brand-dark);
}

.community-card p {
    margin: 8px 0 10px;
    color: var(--muted);
}

.community-count {
    min-width: 88px;
    display: grid;
    place-items: center;
    align-content: center;
    padding: 10px;
    border-radius: 8px;
    background: #edf7f4;
    color: var(--brand-dark);
    text-align: center;
    font-weight: 900;
}

.community-count strong,
.community-count span {
    display: block;
}

.community-count strong {
    font-size: 1.45rem;
    line-height: 1;
}

.community-count span {
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.76rem;
}

.muted-link {
    display: inline-flex;
    margin-bottom: 14px;
    color: var(--brand-dark);
    font-weight: 900;
}

.community-detail .question-meta {
    margin: 12px 0 0;
}

.community-body {
    margin-top: 18px;
    color: var(--text);
    font-size: 1.02rem;
}

.comment-card {
    align-items: flex-start;
    padding: 14px 0;
    border-top: 1px solid var(--line);
}

.comment-card:first-of-type {
    border-top: 0;
}

.comment-avatar {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--brand);
    color: #ffffff;
    font-weight: 900;
}

.comment-head {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.comment-head span {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
}

.comment-card p {
    margin: 6px 0 0;
}

.honeypot-field {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.poll-page {
    width: min(1040px, calc(100% - 32px));
    margin: 28px auto 56px;
    display: grid;
    gap: 18px;
}

.poll-hero,
.poll-create-panel,
.poll-detail {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 18px 42px rgba(23, 32, 42, 0.1);
}

.poll-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 22px;
}

.poll-hero h1,
.poll-section-head h2,
.poll-detail h1 {
    margin: 0;
    line-height: 1.16;
}

.poll-hero h1 {
    font-size: clamp(1.65rem, 3vw, 2.45rem);
}

.poll-hero p:not(.eyebrow),
.poll-detail > p {
    max-width: 700px;
    margin: 10px 0 0;
    color: var(--muted);
}

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

.poll-card {
    min-height: 210px;
    display: grid;
    align-content: start;
    gap: 12px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(20, 115, 95, 0.1), rgba(45, 108, 223, 0.08)),
        var(--surface);
    box-shadow: 0 16px 34px rgba(23, 32, 42, 0.1);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.poll-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 22px 48px rgba(23, 32, 42, 0.14);
}

.poll-card-top,
.poll-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.poll-card-top span,
.poll-card-top strong,
.poll-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.86);
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: capitalize;
}

.poll-card-top strong {
    color: var(--brand-dark);
}

.poll-card h2 {
    margin: 0;
    font-size: 1.2rem;
    line-height: 1.25;
}

.poll-card h2 a {
    color: var(--text);
}

.poll-card h2 a:hover {
    color: var(--brand-dark);
}

.poll-card p {
    margin: 0;
    color: var(--muted);
}

.poll-create-panel,
.poll-detail {
    padding: 22px;
}

.poll-section-head {
    margin-bottom: 14px;
}

.poll-section-head p {
    margin: 0 0 4px;
    color: var(--brand-dark);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.poll-form {
    display: grid;
    gap: 14px;
}

.poll-option-editor {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.poll-detail {
    display: grid;
    gap: 16px;
}

.poll-vote-form {
    display: grid;
    gap: 12px;
}

.poll-result-option {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) minmax(120px, 34%) auto;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.poll-result-option.is-voted {
    border-color: rgba(20, 115, 95, 0.36);
    background: #f1fbf7;
}

.poll-result-option input {
    width: 18px;
    height: 18px;
    margin: 0;
}

.poll-option-text {
    min-width: 0;
    color: var(--text);
    font-weight: 900;
    overflow-wrap: anywhere;
}

.poll-result-track {
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: #e6edf1;
}

.poll-result-track span {
    display: block;
    height: 100%;
    min-width: 2px;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--brand), #2d6cdf);
}

.poll-result-option strong {
    min-width: 92px;
    color: var(--brand-dark);
    text-align: right;
}

.poll-result-option small {
    display: block;
    color: var(--muted);
    font-size: 0.72rem;
}

.poll-widget-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.poll-widget-grid .home-action-card strong {
    display: block;
    margin-top: 10px;
    color: var(--text);
    font-size: 1.15rem;
    line-height: 1.22;
}

.error-page pre {
    overflow: auto;
    margin: 18px 0;
    padding: 14px;
    border-radius: 8px;
    background: #101828;
    color: #f9fafb;
}

.affiliate-page {
    width: min(1180px, calc(100% - 32px));
    margin: 28px auto 56px;
}

.affiliate-hero,
.affiliate-detail,
.affiliate-description {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.affiliate-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
    gap: 24px;
    align-items: end;
    padding: 30px;
    background:
        linear-gradient(135deg, rgba(255, 247, 237, 0.9), rgba(236, 253, 245, 0.92)),
        #ffffff;
}

.affiliate-hero-advanced {
    grid-template-columns: minmax(0, 1.05fr) minmax(330px, 0.95fr);
    align-items: stretch;
    background:
        radial-gradient(circle at top left, rgba(45, 108, 223, 0.14), transparent 28%),
        linear-gradient(135deg, rgba(255, 247, 237, 0.96), rgba(236, 253, 245, 0.94) 52%, rgba(239, 246, 255, 0.94)),
        #ffffff;
}

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

.affiliate-hero-points {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.affiliate-hero-points span {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    color: var(--brand-dark);
    font-size: 0.8rem;
    font-weight: 900;
}

.affiliate-search-panel {
    display: grid;
    align-content: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.68);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.1);
}

.affiliate-platform-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.affiliate-platform-chips a {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 999px;
    background: #ffffff;
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 900;
}

.affiliate-platform-chips a.is-active,
.affiliate-platform-chips a:hover {
    border-color: var(--brand);
    background: #edf7f4;
    color: var(--brand-dark);
}

.affiliate-platform-chips small {
    min-width: 22px;
    min-height: 22px;
    display: grid;
    place-items: center;
    padding: 0 6px;
    border-radius: 999px;
    background: #111827;
    color: #ffffff;
}

.affiliate-hero h1,
.affiliate-detail h1 {
    margin: 4px 0 10px;
    font-size: clamp(1.8rem, 3.4vw, 3rem);
    line-height: 1.08;
}

.affiliate-hero p,
.affiliate-detail p,
.affiliate-description p {
    margin: 0;
    color: var(--muted);
}

.affiliate-filter {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr) auto;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.86);
}

.affiliate-filter select,
.affiliate-filter input,
.affiliate-filter button {
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font: inherit;
}

.affiliate-filter select,
.affiliate-filter input {
    width: 100%;
    min-width: 0;
    padding: 8px 10px;
    background: #ffffff;
}

.affiliate-filter button,
.affiliate-buy-button,
.affiliate-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 9px 14px;
    border: 0;
    border-radius: 8px;
    background: #111827;
    color: #ffffff;
    cursor: pointer;
    font-weight: 900;
}

.affiliate-disclosure {
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid rgba(217, 119, 6, 0.22);
    border-radius: 8px;
    background: #fff7ed;
    color: #92400e;
    font-size: 0.92rem;
    font-weight: 700;
}

.affiliate-insight-row {
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 150px)) minmax(0, 1fr);
    gap: 12px;
    align-items: stretch;
}

.affiliate-insight-row div,
.affiliate-insight-row p {
    margin: 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.affiliate-insight-row strong,
.affiliate-insight-row span {
    display: block;
}

.affiliate-insight-row strong {
    color: var(--text);
    font-size: 1.25rem;
    line-height: 1.05;
}

.affiliate-insight-row span,
.affiliate-insight-row p {
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 800;
}

.affiliate-spotlight {
    margin-top: 18px;
    display: grid;
    grid-template-columns: minmax(260px, 420px) minmax(0, 1fr);
    gap: 20px;
    align-items: center;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background:
        linear-gradient(135deg, #ffffff, #f8fbff 58%, #fff7ed),
        #ffffff;
    box-shadow: var(--shadow);
}

.affiliate-spotlight-media {
    position: relative;
    aspect-ratio: 16 / 10;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 8px;
    background:
        radial-gradient(circle at top right, rgba(217, 119, 6, 0.22), transparent 36%),
        linear-gradient(135deg, #eef6ff, #ecfdf5);
    color: var(--brand-dark);
    font-size: 3rem;
    font-weight: 1000;
}

.affiliate-spotlight-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.affiliate-spotlight-media em {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    background: #111827;
    color: #ffffff;
    font-size: 0.78rem;
    font-style: normal;
    font-weight: 900;
}

.affiliate-spotlight-copy {
    display: grid;
    gap: 12px;
}

.affiliate-spotlight-copy h2 {
    margin: 0;
    color: var(--text);
    font-size: clamp(1.35rem, 2.4vw, 2.1rem);
    line-height: 1.12;
}

.affiliate-spotlight-copy p:not(.eyebrow) {
    margin: 0;
    color: var(--muted);
}

.affiliate-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 22px;
}

.affiliate-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.11);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.affiliate-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.15);
}

.affiliate-media {
    position: relative;
    aspect-ratio: 4 / 3;
    display: grid;
    place-items: center;
    overflow: hidden;
    background:
        radial-gradient(circle at top left, rgba(20, 115, 95, 0.22), transparent 34%),
        linear-gradient(135deg, #eef6ff, #fff7ed);
    color: var(--brand-dark);
    font-size: 2.4rem;
    font-weight: 1000;
}

.affiliate-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.affiliate-media em {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    background: #111827;
    color: #ffffff;
    font-size: 0.78rem;
    font-style: normal;
    font-weight: 900;
}

.affiliate-card-body {
    display: grid;
    gap: 12px;
    padding: 16px;
}

.affiliate-card-meta,
.affiliate-price-row,
.affiliate-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.affiliate-card-meta span {
    padding: 5px 8px;
    border-radius: 999px;
    background: #eef6ff;
    color: #1d4ed8;
    font-size: 0.78rem;
    font-weight: 900;
}

.affiliate-card h2 {
    margin: 0;
    font-size: 1.08rem;
    line-height: 1.25;
}

.affiliate-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.94rem;
}

.affiliate-price-row strong {
    font-size: 1.15rem;
    color: var(--brand-dark);
}

.affiliate-price-row del {
    color: var(--muted);
}

.affiliate-price-row span {
    color: #b42318;
    font-size: 0.84rem;
    font-weight: 900;
}

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

.affiliate-actions a {
    flex: 1 1 132px;
}

.affiliate-actions a.secondary {
    border: 1px solid var(--line);
    background: #ffffff;
    color: var(--text);
}

.affiliate-platform-flipkart .affiliate-actions a:not(.secondary) {
    background: #1d4ed8;
}

.affiliate-platform-meesho .affiliate-actions a:not(.secondary) {
    background: #c026d3;
}

.affiliate-platform-amazon .affiliate-actions a:not(.secondary) {
    background: #111827;
}

.affiliate-detail {
    padding: 24px;
}

.affiliate-detail-grid {
    display: grid;
    grid-template-columns: minmax(260px, 420px) minmax(0, 1fr);
    gap: 24px;
    align-items: center;
    margin-top: 14px;
}

.affiliate-detail-media {
    aspect-ratio: 4 / 3;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: linear-gradient(135deg, #eef6ff, #fff7ed);
    color: var(--brand-dark);
    font-size: 3rem;
    font-weight: 1000;
}

.affiliate-detail-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.affiliate-detail-copy {
    display: grid;
    gap: 14px;
}

.affiliate-buy-button {
    width: min(100%, 260px);
}

.affiliate-note {
    color: var(--muted);
    font-weight: 700;
}

.affiliate-description {
    margin-top: 18px;
    padding: 22px;
}

.exam-page,
.exam-solve-page {
    width: min(1180px, calc(100% - 32px));
    margin: 28px auto 56px;
}

.exam-hero,
.paper-detail,
.paper-result-head,
.subject-breakdown,
.answer-review {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.exam-hero,
.paper-result-head {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding: 28px;
}

.exam-hero h1,
.paper-detail h1,
.paper-result-head h1 {
    margin: 4px 0 10px;
    font-size: clamp(1.7rem, 3vw, 2.45rem);
    line-height: 1.12;
}

.exam-hero p,
.paper-detail p,
.paper-result-head p {
    margin: 0;
    color: var(--muted);
}

.exam-hero-stat,
.result-score {
    min-width: 150px;
    display: grid;
    place-items: center;
    align-content: center;
    padding: 16px;
    border-radius: 8px;
    background: #edf7f4;
    color: var(--brand-dark);
    text-align: center;
}

.exam-hero-stat strong,
.result-score strong {
    font-size: 2rem;
    line-height: 1;
}

.exam-hero-stat span,
.result-score span {
    margin-top: 5px;
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 800;
    text-transform: uppercase;
}

.exam-alert {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    padding: 14px 16px;
    border: 1px solid rgba(23, 107, 91, 0.2);
    border-radius: 8px;
    background: #edf7f4;
    color: var(--brand-dark);
}

.exam-alert.is-danger {
    border-color: rgba(180, 35, 24, 0.2);
    background: #fff1f0;
    color: var(--danger);
}

.exam-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 18px;
}

.exam-card,
.paper-card {
    display: grid;
    gap: 14px;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.exam-card {
    grid-template-columns: 54px minmax(0, 1fr);
    padding: 16px;
}

.exam-card:hover,
.paper-card:hover {
    border-color: rgba(23, 107, 91, 0.26);
    transform: translateY(-2px);
}

.exam-card-mark {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--brand);
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 900;
}

.exam-card-body,
.paper-card-main {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.exam-card-body strong,
.paper-card-main strong {
    font-size: 1.05rem;
    line-height: 1.25;
}

.exam-card-body small,
.paper-card-main small {
    color: var(--muted);
}

.exam-card-meta,
.paper-card-stats {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.exam-card-meta span,
.paper-card-stats span,
.paper-type,
.paper-badge,
.premium-label {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--surface-muted);
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 900;
}

.paper-list {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.all-paper-list {
    margin-top: 24px;
}

.exam-section-head h2 {
    margin: 4px 0 0;
}

.paper-card {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    padding: 18px;
}

.paper-card-stats {
    justify-content: flex-end;
}

.paper-detail {
    padding: 28px;
}

.paper-detail-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin-top: 12px;
}

.paper-stat-grid,
.result-stat-grid,
.subject-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.paper-stat-grid div,
.result-stat-grid div,
.subject-grid div {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfd;
}

.paper-stat-grid strong,
.result-stat-grid strong,
.subject-grid strong {
    display: block;
    font-size: 1.35rem;
    line-height: 1.15;
}

.paper-stat-grid span,
.result-stat-grid span,
.subject-grid span,
.subject-grid small {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
}

.paper-instructions {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.paper-instructions h2,
.subject-breakdown h2,
.answer-review h2 {
    margin: 0 0 12px;
}

.paper-start-button,
.paper-submit-button {
    width: 100%;
    min-height: 46px;
    margin-top: 18px;
    border: 0;
    border-radius: 8px;
    background: var(--brand);
    color: #ffffff;
    cursor: pointer;
    font-weight: 900;
}

.paper-start-button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.exam-solve-top {
    position: sticky;
    top: 69px;
    z-index: 12;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow);
}

.exam-solve-top h1 {
    margin: 0;
    font-size: 1.25rem;
}

.exam-timer {
    min-width: 104px;
    padding: 9px 12px;
    border-radius: 8px;
    background: #101828;
    color: #ffffff;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 900;
}

.exam-timer.is-low {
    background: var(--danger);
}

.paper-language-switch {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #f6f8fb;
}

.paper-language-switch label {
    cursor: pointer;
}

.paper-language-switch input {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    opacity: 0;
}

.paper-language-switch span {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 900;
    white-space: nowrap;
}

.paper-language-switch .is-active span {
    background: var(--brand);
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(20, 115, 95, 0.2);
}

.math-content {
    overflow-wrap: anywhere;
}

.exam-solve-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 18px;
    align-items: start;
}

.paper-question-list {
    display: grid;
    gap: 14px;
}

.paper-question,
.review-question {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.paper-options {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.paper-option {
    display: grid;
    grid-template-columns: 22px 34px minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    padding: 11px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfd;
    cursor: pointer;
}

.paper-option:hover,
.paper-option:has(input:checked) {
    border-color: rgba(23, 107, 91, 0.34);
    background: #edf7f4;
}

.paper-option > span {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--surface-muted);
    color: var(--brand-dark);
    font-weight: 900;
}

.paper-option strong {
    display: block;
    min-width: 0;
    font-weight: 700;
    line-height: 1.45;
}

[data-lang-content][hidden] {
    display: none !important;
}

.paper-option [data-lang-content],
.question-title [data-lang-content] {
    width: auto;
    height: auto;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: inherit;
    line-height: inherit;
}

.one-line-answer {
    display: grid;
    gap: 8px;
    margin-top: 14px;
    color: var(--muted);
    font-weight: 800;
}

.one-line-answer input {
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font: inherit;
}

.paper-palette {
    position: sticky;
    top: 154px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.palette-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.palette-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

.palette-grid a {
    min-height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--muted);
    font-weight: 900;
}

.palette-grid a.is-answered {
    border-color: rgba(23, 107, 91, 0.3);
    background: #edf7f4;
    color: var(--brand-dark);
}

.result-expired {
    color: var(--danger) !important;
    font-weight: 800;
}

.result-stat-grid,
.subject-breakdown,
.answer-review {
    margin-top: 18px;
}

.subject-breakdown,
.answer-review {
    padding: 22px;
}

.answer-review {
    display: grid;
    gap: 14px;
}

.review-question h3 {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
    margin: 8px 0 14px;
    font-size: 1.05rem;
}

.review-answer-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.review-answer-grid div,
.review-explanation {
    padding: 12px;
    border-radius: 8px;
    background: #fbfcfd;
}

.review-answer-grid span,
.review-explanation span {
    display: block;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.premium-label {
    width: max-content;
    margin-left: 6px;
    background: #fff3d6;
    color: #8a4b00;
}

.review-answer-grid strong {
    display: block;
}

.review-explanation {
    margin-top: 12px;
}

.review-explanation p {
    margin: 0;
}

.review-question.is-correct {
    border-color: rgba(23, 107, 91, 0.28);
}

.review-question.is-wrong {
    border-color: rgba(180, 35, 24, 0.25);
}

.news-hero {
    width: min(1180px, calc(100% - 32px));
    margin: 26px auto 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
    gap: 18px;
    align-items: end;
    padding: 26px;
    border: 1px solid rgba(23, 107, 91, 0.16);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(23, 107, 91, 0.12), rgba(40, 92, 159, 0.08)),
        #ffffff;
    box-shadow: var(--shadow);
}

.news-hero span,
.home-section-head span {
    color: var(--brand-dark);
    font-size: 0.8rem;
    font-weight: 900;
    text-transform: uppercase;
}

.news-hero h1 {
    margin: 8px 0 8px;
    font-size: clamp(2rem, 4vw, 3.8rem);
    line-height: 1.02;
}

.news-hero p {
    max-width: 720px;
    margin: 0;
    color: var(--muted);
    font-size: 1.02rem;
    font-weight: 700;
}

.news-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.news-search input,
.news-search button {
    min-height: 44px;
    border-radius: 8px;
    font: inherit;
    font-weight: 800;
}

.news-search input {
    min-width: 0;
    padding: 9px 11px;
    border: 1px solid var(--line);
}

.news-search button {
    border: 0;
    padding: 9px 14px;
    background: var(--brand);
    color: #ffffff;
    cursor: pointer;
}

/* Unified public page heroes */
.course-hero,
.news-hero,
.syllabus-hero,
.community-hero,
.poll-hero,
.exam-hero,
.exam-tools-hero,
.search-hero,
.directory-hero,
.affiliate-hero,
.all-category-hero {
    --hero-accent: var(--app-purple);
    --hero-accent-dark: var(--app-indigo);
    --hero-soft: var(--app-soft);
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 210px;
    align-items: center;
    padding: 34px 38px;
    border: 1px solid color-mix(in srgb, var(--hero-accent) 22%, #dbe4ec);
    border-radius: 8px;
    background:
        linear-gradient(118deg, #ffffff 0%, color-mix(in srgb, var(--hero-soft) 62%, #ffffff) 68%, #f7fafc 100%);
    box-shadow: 0 22px 52px rgba(20, 32, 45, 0.12);
}

.course-hero::before,
.news-hero::before,
.syllabus-hero::before,
.community-hero::before,
.poll-hero::before,
.exam-hero::before,
.exam-tools-hero::before,
.search-hero::before,
.directory-hero::before,
.affiliate-hero::before,
.all-category-hero::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0 auto auto 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--hero-accent), var(--hero-accent-dark) 58%, #e8aa35);
}

.course-hero::after,
.news-hero::after,
.syllabus-hero::after,
.community-hero::after,
.poll-hero::after,
.exam-hero::after,
.exam-tools-hero::after,
.search-hero::after,
.directory-hero::after,
.affiliate-hero::after,
.all-category-hero::after {
    content: "";
    position: absolute;
    z-index: -1;
    top: 22px;
    right: 24px;
    width: 180px;
    height: 94px;
    border: 1px solid color-mix(in srgb, var(--hero-accent) 14%, transparent);
    background: repeating-linear-gradient(
        135deg,
        transparent 0 13px,
        color-mix(in srgb, var(--hero-accent) 8%, transparent) 13px 14px
    );
    opacity: 0.8;
}

.course-hero > *,
.news-hero > *,
.syllabus-hero > *,
.community-hero > *,
.poll-hero > *,
.exam-hero > *,
.exam-tools-hero > *,
.search-hero > *,
.directory-hero > *,
.affiliate-hero > *,
.all-category-hero > * {
    position: relative;
    z-index: 1;
}

.course-hero .eyebrow,
.syllabus-hero .eyebrow,
.community-hero .eyebrow,
.poll-hero .eyebrow,
.exam-hero .eyebrow,
.exam-tools-hero .eyebrow,
.search-hero .eyebrow,
.directory-hero .eyebrow,
.affiliate-hero .eyebrow,
.news-hero > div > span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
    color: var(--hero-accent-dark);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.course-hero .eyebrow::before,
.syllabus-hero .eyebrow::before,
.community-hero .eyebrow::before,
.poll-hero .eyebrow::before,
.exam-hero .eyebrow::before,
.exam-tools-hero .eyebrow::before,
.search-hero .eyebrow::before,
.directory-hero .eyebrow::before,
.affiliate-hero .eyebrow::before,
.news-hero > div > span::before {
    content: "";
    width: 22px;
    height: 3px;
    border-radius: 3px;
    background: var(--hero-accent);
}

.course-hero h1,
.news-hero h1,
.syllabus-hero h1,
.community-hero h1,
.poll-hero h1,
.exam-hero h1,
.exam-tools-hero h1,
.search-hero h1,
.directory-hero h1,
.affiliate-hero h1,
.all-category-hero h1 {
    max-width: 100%;
    margin: 0;
    color: #17212e;
    font-size: 1.85rem;
    line-height: 1.12;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow-wrap: normal;
}

.course-hero h1 {
    max-width: none;
    font-size: 1.85rem;
}

.course-hero p:not(.eyebrow),
.news-hero p,
.syllabus-hero p:not(.eyebrow),
.community-hero p:not(.eyebrow),
.poll-hero p:not(.eyebrow),
.exam-hero p:not(.eyebrow),
.exam-tools-hero p:not(.eyebrow),
.search-hero p:not(.eyebrow),
.directory-hero p:not(.eyebrow),
.affiliate-hero-copy > p:not(.eyebrow),
.all-category-hero p {
    max-width: 720px;
    margin: 12px 0 0;
    color: #5b6878;
    font-size: 0.9rem;
    font-weight: 650;
    line-height: 1.45;
}

.course-hero {
    --hero-accent: #bf7a13;
    --hero-accent-dark: #80500a;
    --hero-soft: #fff2d8;
}

.news-hero {
    --hero-accent: #08766a;
    --hero-accent-dark: #07544d;
    --hero-soft: #def4ef;
}

.syllabus-hero {
    --hero-accent: #2866c7;
    --hero-accent-dark: #17468f;
    --hero-soft: #e6efff;
}

.community-hero {
    --hero-accent: #b54c76;
    --hero-accent-dark: #7d2d50;
    --hero-soft: #fbe8f0;
}

.poll-hero {
    --hero-accent: #6e57c7;
    --hero-accent-dark: #49379a;
    --hero-soft: #eeeaff;
}

.exam-hero {
    --hero-accent: #16756a;
    --hero-accent-dark: #0e514a;
    --hero-soft: #e0f4ef;
}

.exam-tools-hero {
    --hero-accent: #d45b38;
    --hero-accent-dark: #963c23;
    --hero-soft: #fff0e9;
}

.search-hero {
    --hero-accent: #3269ba;
    --hero-accent-dark: #214a87;
    --hero-soft: #e9f1ff;
}

.directory-hero {
    --hero-accent: #16816b;
    --hero-accent-dark: #0d584a;
    --hero-soft: #e2f6f0;
}

.affiliate-hero {
    --hero-accent: #cb6d16;
    --hero-accent-dark: #8c4608;
    --hero-soft: #fff0dc;
}

.all-category-hero {
    --hero-accent: #2d6ea9;
    --hero-accent-dark: #17466f;
    --hero-soft: #e7f1fa;
}

.all-category-hero h1,
.all-category-hero p {
    color: #17212e;
}

.news-search,
.course-filter,
.search-panel,
.directory-search,
.affiliate-search-panel {
    border: 1px solid color-mix(in srgb, var(--hero-accent) 16%, #dce4eb);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 14px 34px rgba(20, 32, 45, 0.1);
}

.news-search button,
.course-filter button,
.search-input-row button,
.directory-search button,
.affiliate-filter button {
    border: 0;
    background: var(--hero-accent-dark);
    color: #ffffff;
    font-weight: 900;
    cursor: pointer;
}

.syllabus-hero .result-count,
.community-hero .result-count,
.exam-hero .exam-hero-stat,
.exam-tools-hero .tool-limit-card,
.all-category-hero .all-category-summary {
    min-width: 150px;
    padding: 18px 22px;
    border: 1px solid color-mix(in srgb, var(--hero-accent) 18%, #ffffff);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--hero-accent-dark);
    box-shadow: 0 14px 32px rgba(20, 32, 45, 0.1);
}

.syllabus-hero .result-count strong,
.community-hero .result-count strong,
.exam-hero .exam-hero-stat strong,
.exam-tools-hero .tool-limit-card strong,
.all-category-hero .all-category-summary strong {
    color: var(--hero-accent-dark);
}

@media (max-width: 860px) {
    .course-hero,
    .news-hero,
    .syllabus-hero,
    .community-hero,
    .poll-hero,
    .exam-hero,
    .exam-tools-hero,
    .search-hero,
    .directory-hero,
    .affiliate-hero,
    .all-category-hero {
        min-height: 0;
        padding: 24px 20px;
        gap: 20px;
    }

    .course-hero::after,
    .news-hero::after,
    .syllabus-hero::after,
    .community-hero::after,
    .poll-hero::after,
    .exam-hero::after,
    .exam-tools-hero::after,
    .search-hero::after,
    .directory-hero::after,
    .affiliate-hero::after,
    .all-category-hero::after {
        top: 18px;
        right: -50px;
        width: 150px;
        height: 72px;
    }

    .course-hero h1,
    .news-hero h1,
    .syllabus-hero h1,
    .community-hero h1,
    .poll-hero h1,
    .exam-hero h1,
    .exam-tools-hero h1,
    .search-hero h1,
    .directory-hero h1,
    .affiliate-hero h1,
    .all-category-hero h1 {
        font-size: 1.65rem;
        line-height: 1.14;
        overflow: visible;
        text-overflow: clip;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .news-search,
    .course-filter,
    .affiliate-filter,
    .directory-search,
    .search-input-row {
        width: 100%;
        grid-template-columns: 1fr;
    }

    .syllabus-hero .result-count,
    .community-hero .result-count,
    .exam-hero .exam-hero-stat,
    .exam-tools-hero .tool-limit-card,
    .all-category-hero .all-category-summary {
        width: 100%;
        min-width: 0;
    }
}

.news-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 22px auto;
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.news-category-strip {
    position: sticky;
    top: 112px;
    display: grid;
    gap: 8px;
}

.news-category-strip a {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--muted);
    font-weight: 900;
}

.news-category-strip a.is-active,
.news-category-strip a:hover {
    border-color: rgba(23, 107, 91, 0.24);
    background: #edf7f4;
    color: var(--brand-dark);
}

.news-category-strip small {
    color: var(--blue);
}

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

.news-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(23, 32, 42, 0.07);
}

.news-card.is-featured {
    border-color: rgba(191, 122, 26, 0.28);
}

.news-card-media {
    aspect-ratio: 16 / 9;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: linear-gradient(135deg, #edf7f4, #eef4ff);
    color: var(--brand-dark);
    font-weight: 900;
    text-transform: uppercase;
}

.news-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-card-body {
    display: grid;
    gap: 10px;
    padding: 14px;
}

.news-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.news-card-meta a,
.news-card-meta span {
    color: var(--brand-dark);
}

.news-card h2 {
    margin: 0;
    font-size: 1.08rem;
    line-height: 1.32;
}

.news-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.news-read-link {
    color: var(--brand-dark);
    font-weight: 900;
}

.news-detail {
    width: min(1180px, calc(100% - 32px));
    margin: 24px auto;
}

.news-detail-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
    gap: 22px;
    align-items: start;
}

.news-detail-copy,
.news-detail-image,
.news-video-box,
.news-article-body,
.news-detail-side > div,
.news-ad-slot,
.related-news {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.news-detail-copy {
    padding: 28px;
}

.news-detail-copy > span,
.news-breadcrumb {
    display: inline-flex;
    margin-right: 8px;
    color: var(--brand-dark);
    font-size: 0.82rem;
    font-weight: 900;
    text-transform: uppercase;
}

.news-detail-copy h1 {
    margin: 12px 0;
    font-size: clamp(1.75rem, 3vw, 2.75rem);
    line-height: 1.12;
    overflow-wrap: anywhere;
}

.news-detail-copy p {
    margin: 0;
    color: var(--muted);
    font-size: 1.05rem;
    font-weight: 700;
}

.news-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin-top: 18px;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 800;
}

.news-detail-image {
    overflow: hidden;
    margin: 0;
    width: 100%;
    aspect-ratio: 16 / 9;
    min-height: 0;
}

.news-detail-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-video-box {
    margin-top: 18px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
}

.news-video-box iframe,
.news-video-box video {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    background: #101820;
}

.news-content-wrap {
    margin-top: 18px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 18px;
    align-items: start;
}

.news-article-body {
    padding: 24px;
    max-width: 100%;
    overflow-x: auto;
    color: #202a34;
    font-size: 1.02rem;
    -webkit-overflow-scrolling: touch;
}

.news-article-body h2,
.news-article-body h3 {
    margin: 24px 0 10px;
}

.news-article-body p {
    margin: 0 0 14px;
}

.news-article-body img,
.news-article-body video,
.news-article-body iframe,
.news-article-body figure {
    display: block;
    max-width: 100% !important;
    height: auto !important;
}

.news-article-body figure {
    margin-inline: 0;
}

.news-article-body table {
    width: 100% !important;
    max-width: 100% !important;
    border-collapse: collapse;
    table-layout: fixed;
    margin: 16px 0;
}

.news-article-body th,
.news-article-body td {
    padding: 10px;
    border: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.news-article-body th {
    background: #edf7f4;
    color: var(--brand-dark);
}

.news-detail-side {
    display: grid;
    gap: 12px;
}

.news-detail-side > div {
    padding: 14px;
}

.news-detail-side h2 {
    margin: 0 0 8px;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.news-detail-side a {
    color: var(--brand-dark);
    font-weight: 900;
}

.news-ad-slot {
    margin: 18px 0;
    padding: 14px;
    text-align: center;
    overflow: hidden;
}

.related-news {
    margin-top: 18px;
    padding: 18px;
}

.news-card-grid.is-compact {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1280px) {
    .navbar {
        min-height: 70px;
    }

    .nav-toggle {
        display: grid;
        place-items: center;
        flex: 0 0 42px;
    }

    .nav-links {
        position: absolute;
        z-index: 60;
        top: calc(100% + 8px);
        left: 0;
        right: 0;
        display: none;
        grid-template-columns: 1fr;
        gap: 6px;
        max-height: min(70vh, 460px);
        overflow-x: hidden;
        overflow-y: auto;
        white-space: normal;
        padding: 10px;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: var(--surface);
        box-shadow: var(--shadow);
    }

    .nav-links.is-open {
        display: grid;
    }

    .nav-links a,
    .nav-logout,
    .nav-logout button,
    .user-chip {
        width: 100%;
    }

    .nav-links a,
    .nav-logout button,
    .user-chip {
        justify-content: flex-start;
    }

    .nav-dropdown {
        width: 100%;
    }

    .nav-dropdown summary {
        width: 100%;
        justify-content: space-between;
    }

    .nav-dropdown:not([open]):hover .subnav-menu,
    .nav-dropdown:not([open]):focus-within .subnav-menu {
        display: none;
    }

    .nav-dropdown[open] .subnav-menu {
        display: grid;
    }

    .subnav-menu {
        position: static;
        min-width: 0;
        margin: 4px 0 2px;
        padding: 6px;
        border: 0;
        background: #f6faf8;
        box-shadow: none;
    }

    .subnav-menu::before {
        display: none;
    }

    .subnav-menu a {
        min-height: 38px;
        padding-left: 18px;
    }
}

@media (max-width: 980px) {
    .news-hero,
    .news-shell,
    .news-detail-hero,
    .news-content-wrap {
        grid-template-columns: 1fr;
    }

    .news-category-strip {
        position: static;
        display: flex;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .news-category-strip a {
        flex: 0 0 auto;
        min-width: 170px;
    }

    .news-card-grid,
    .news-card-grid.is-compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .all-category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .all-category-hero {
        grid-template-columns: 1fr;
        padding: 28px;
    }

    .all-category-summary {
        width: fit-content;
    }

    .affiliate-hero {
        grid-template-columns: 1fr;
        align-items: start;
        gap: 18px;
        padding: 24px;
    }

    .affiliate-filter {
        width: 100%;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) auto;
    }
}

@media (max-width: 860px) {
    .navbar {
        min-height: 68px;
        gap: 10px;
    }

    .brand {
        min-width: 0;
        flex: 1 1 auto;
    }

    .brand-text {
        min-width: 0;
    }

    .brand-text strong {
        display: block;
        max-width: 210px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .site-topbar-inner {
        min-height: auto;
        padding: 8px 0;
        display: grid;
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .topbar-clock {
        width: fit-content;
    }

    .topbar-note strong {
        white-space: normal;
    }

    .topbar-links {
        gap: 12px;
    }

    .nav-toggle {
        display: grid;
        place-items: center;
        flex: 0 0 42px;
    }

    .nav-links {
        position: absolute;
        top: calc(100% + 8px);
        left: 0;
        right: 0;
        display: none;
        grid-template-columns: 1fr;
        gap: 6px;
        max-height: min(70vh, 460px);
        overflow-x: hidden;
        overflow-y: auto;
        white-space: normal;
        padding: 10px;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: var(--surface);
        box-shadow: var(--shadow);
    }

    .nav-links.is-open {
        display: grid;
    }

    .nav-links a,
    .nav-logout,
    .nav-logout button,
    .user-chip {
        width: 100%;
    }

    .nav-links a,
    .nav-logout button,
    .user-chip {
        justify-content: flex-start;
    }

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

    .news-hero {
        padding: 18px;
    }

    .news-search {
        grid-template-columns: 1fr;
    }

    .news-card-grid,
    .news-card-grid.is-compact {
        grid-template-columns: 1fr;
    }

    .news-detail-copy,
    .news-article-body,
    .related-news {
        padding: 18px;
    }

    .home-hero-copy {
        min-height: auto;
    }

    .home-section-head {
        display: grid;
        align-items: start;
    }

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

    .home-app-download,
    .home-app-showcase {
        grid-template-columns: 1fr;
    }

    .home-app-download {
        padding: 20px;
    }

    .home-app-phone {
        width: min(100%, 220px);
        justify-self: center;
    }

    .home-content-band,
    .home-flow-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-guide-zone {
        grid-template-columns: 1fr;
    }

    .page-wrap {
        grid-template-columns: 1fr;
    }

    .page-wrap.has-right-sidebar,
    .site-layout-with-sidebar {
        grid-template-columns: 1fr;
    }

    .question-area {
        order: 1;
    }

    .sidebar {
        order: 2;
        position: static;
    }

    .right-widget-sidebar {
        order: 3;
        position: static;
    }

    .question-toolbar,
    .footer-inner,
    .footer-inner.is-two-column,
    .footer-inner.is-single-column {
        grid-template-columns: 1fr;
    }

    .search-hero,
    .search-summary {
        display: grid;
    }

    .quick-result-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .footer-inner {
        gap: 24px;
    }

    .footer-connect {
        grid-column: auto;
        grid-template-columns: 1fr;
    }

    .footer-link-groups {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .footer-bottom {
        display: grid;
    }

    .cookie-consent {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .cookie-consent-actions {
        justify-content: flex-start;
    }

    .exam-tools-hero,
    .exam-tool-panels,
    .tool-workspace {
        grid-template-columns: 1fr;
    }

    .exam-tools-hero {
        align-items: start;
    }

    .question-toolbar {
        display: grid;
    }

    .featured-category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .wide-field {
        grid-column: auto;
    }

    .account-head,
    .profile-grid {
        grid-template-columns: 1fr;
    }

    .account-head {
        display: grid;
    }

    .result-count {
        width: 100%;
        text-align: left;
    }

    .community-hero,
    .syllabus-hero,
    .syllabus-card,
    .syllabus-viewer-head,
    .community-card,
    .community-section-head {
        display: grid;
    }

    .community-author-grid {
        grid-template-columns: 1fr;
    }

    .community-count {
        min-width: 0;
        grid-template-columns: auto auto;
        justify-content: start;
        gap: 6px;
    }

    .community-count span {
        margin-top: 0;
    }

    .poll-hero,
    .poll-card-top,
    .poll-meta {
        display: grid;
    }

    .poll-option-editor {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .poll-result-option {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .poll-result-track,
    .poll-result-option strong {
        grid-column: 1 / -1;
    }

    .poll-result-option strong {
        text-align: left;
    }

    .exam-hero,
    .affiliate-hero,
    .paper-detail-head,
    .paper-result-head,
    .paper-card,
    .exam-solve-top {
        display: grid;
    }

    .affiliate-hero {
        grid-template-columns: 1fr;
        padding: 22px;
    }

    .exam-card-grid,
    .affiliate-grid,
    .affiliate-detail-grid {
        grid-template-columns: 1fr;
    }

    .affiliate-insight-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .affiliate-insight-row p,
    .affiliate-spotlight {
        grid-column: 1 / -1;
    }

    .affiliate-spotlight {
        grid-template-columns: 1fr;
    }

    .affiliate-filter {
        grid-template-columns: 1fr;
    }

    .paper-stat-grid,
    .result-stat-grid,
    .subject-grid,
    .review-answer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .syllabus-pdf-action-grid {
        grid-template-columns: 1fr;
    }

    .exam-solve-layout {
        grid-template-columns: 1fr;
    }

    .paper-palette {
        order: -1;
        position: static;
    }

    .paper-card-stats {
        justify-content: flex-start;
    }
}

@media (max-width: 900px) {
    .home-course-rail,
    .course-grid,
    .home-news-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .course-hero,
    .course-detail-hero {
        grid-template-columns: 1fr;
    }

    .course-filter {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 560px) {
    .site-topbar-inner,
    .navbar,
    .home-hero,
    .home-app-download,
    .home-card-zone,
    .home-course-zone,
    .home-news-zone,
    .home-content-band,
    .home-guide-zone,
    .home-flow-zone,
    .page-wrap,
    .site-layout-with-sidebar,
    .search-page,
    .poll-page,
    .course-page,
    .affiliate-page,
    .footer-ribbon,
    .footer-inner,
    .footer-bottom,
    .exam-page,
    .exam-solve-page {
        width: min(100% - 22px, 1180px);
    }

    .site-topbar {
        display: block;
    }

    .site-topbar-inner {
        width: min(100% - 22px, 1180px);
        padding: 6px 0;
        place-items: center;
    }

    .topbar-note,
    .topbar-links {
        display: none;
    }

    .topbar-clock {
        justify-content: center;
        width: 100%;
        max-width: 340px;
    }

    .navbar {
        min-height: 68px;
    }

    .brand-mark {
        width: 38px;
        height: 38px;
    }

    .brand-text small {
        display: none;
    }

    .brand-text strong {
        max-width: 150px;
    }

    .brand-logo {
        max-width: 118px;
    }

    .home-hero {
        margin-top: 18px;
    }

    .home-hero-copy,
    .home-hero-panel {
        padding: 16px;
    }

    .home-hero-copy h1 {
        font-size: 1.85rem;
    }

    .home-hero-actions {
        display: grid;
    }

    .home-app-download {
        padding: 16px;
    }

    .home-app-store-grid {
        grid-template-columns: 1fr;
    }

    .app-store-card {
        min-height: 68px;
    }

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

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

    .home-content-band,
    .home-flow-grid {
        grid-template-columns: 1fr;
    }

    .home-guide-article,
    .home-trust-panel {
        padding: 16px;
    }

    .home-guide-article h2 {
        font-size: 1.35rem;
    }

    .search-input-row,
    .quick-result-grid {
        grid-template-columns: 1fr;
    }

    .home-action-card {
        min-height: auto;
    }

    .footer-ribbon {
        gap: 6px;
    }

    .footer-link-groups {
        grid-template-columns: 1fr;
    }

    .footer-link-group,
    .footer-contact-card {
        padding: 12px;
    }

    .question-card,
    .question-toolbar,
    .empty-state,
    .error-page,
    .content-page {
        padding: 16px;
    }

    .social-login-grid {
        grid-template-columns: 1fr;
    }

    .cookie-consent {
        left: 11px;
        right: 11px;
        bottom: 11px;
        width: calc(100% - 22px);
        padding: 14px;
    }

    .cookie-consent-actions button {
        flex: 1 1 130px;
    }

    .exam-tools-page {
        width: min(100% - 22px, 1180px);
        padding-top: 14px;
    }

    .exam-tools-hero,
    .exam-tool-card {
        padding: 14px;
    }

    .exam-tool-card .form-grid,
    .exam-tool-card .compact-grid {
        grid-template-columns: 1fr;
    }

    .tool-tabbar {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tool-tabbar button {
        width: 100%;
    }

    .tool-preview-strip {
        align-items: stretch;
        flex-direction: column;
    }

    .tool-preview-strip button {
        width: 100%;
    }

    .question-title {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .option-list li {
        grid-template-columns: 30px 1fr;
        padding: 9px;
    }

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

    .all-category-page {
        width: min(100% - 22px, 1260px);
        margin-top: 18px;
    }

    .all-category-hero {
        padding: 20px 16px;
        border-radius: 8px;
    }

    .all-category-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .all-category-sort {
        width: 100%;
        justify-content: flex-start;
    }

    .all-category-grid {
        grid-template-columns: 1fr;
    }

    .all-category-card {
        min-height: 76px;
        grid-template-columns: 40px minmax(0, 1fr) auto;
        gap: 12px;
        padding: 14px;
    }

    .all-category-letter {
        width: 40px;
        height: 40px;
        font-size: 1.15rem;
    }

    .all-category-copy strong {
        font-size: 0.98rem;
    }

    .all-category-summary {
        width: 100%;
        min-width: 0;
    }

    .featured-category-body {
        min-height: auto;
        padding: 9px;
    }

    .featured-category-body strong {
        font-size: 0.88rem;
    }

    .featured-category-body small {
        display: none;
    }

    .featured-category-count {
        right: 7px;
        bottom: 7px;
        padding: 4px 6px;
        font-size: 0.68rem;
    }

    .community-page,
    .poll-page {
        width: min(100% - 22px, 960px);
    }

    .syllabus-page {
        width: min(100% - 22px, 960px);
    }

    .syllabus-hero,
    .syllabus-detail,
    .syllabus-viewer-panel,
    .syllabus-content-box,
    .syllabus-card,
    .community-hero,
    .community-submit-panel,
    .community-detail,
    .community-comments,
    .community-card,
    .poll-hero,
    .poll-create-panel,
    .poll-detail,
    .poll-card {
        padding: 16px;
    }

    .poll-grid,
    .poll-option-editor,
    .poll-widget-grid {
        grid-template-columns: 1fr;
    }

    .syllabus-pdf-viewer {
        min-height: 520px;
    }

    .syllabus-viewer-head h2,
    .syllabus-rich-content h2,
    .news-article-body h2 {
        font-size: 1.35rem;
        line-height: 1.2;
    }

    .syllabus-rich-content table,
    .news-article-body table {
        font-size: 0.88rem;
    }

    .syllabus-rich-content th,
    .syllabus-rich-content td,
    .news-article-body th,
    .news-article-body td {
        padding: 8px;
    }

    .comment-card {
        padding: 12px 0;
    }

    .exam-hero,
    .paper-detail,
    .paper-result-head,
    .subject-breakdown,
    .answer-review,
    .paper-question,
    .review-question {
        padding: 16px;
    }

    .paper-stat-grid,
    .result-stat-grid,
    .subject-grid,
    .review-answer-grid {
        grid-template-columns: 1fr;
    }

    .paper-option {
        grid-template-columns: 20px 30px minmax(0, 1fr);
        padding: 10px;
    }

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

    .home-course-rail {
        display: flex;
        gap: 12px;
        overflow-x: auto;
        padding: 2px 2px 18px;
        scroll-snap-type: x mandatory;
        scrollbar-width: thin;
    }

    .home-course-rail .course-card {
        flex: 0 0 min(82vw, 292px);
        scroll-snap-align: start;
    }

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

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

    .course-card-media {
        margin: 12px 12px 0;
    }

    .course-card-body {
        padding: 12px;
    }

    .course-hero,
    .course-detail-hero,
    .course-description {
        padding: 18px;
    }

    .paper-language-switch {
        order: 3;
        width: 100%;
        justify-content: center;
    }

    .directory-hero {
        padding: 16px;
    }

    .directory-search {
        grid-template-columns: 1fr;
    }

    .public-profile-hero,
    .follow-preview-grid,
    .follow-list-grid {
        grid-template-columns: 1fr;
    }

    .public-profile-action {
        justify-content: flex-start;
    }

    .public-profile-avatar {
        width: 76px;
        border-radius: 18px;
    }

    .follow-stat-row a {
        flex: 1 1 120px;
    }

    .notification-card {
        grid-template-columns: 42px minmax(0, 1fr);
        align-items: flex-start;
    }

    .notification-card > .mini-link {
        grid-column: 2;
        justify-self: flex-start;
    }

    .notification-actions,
    .notice-actions {
        justify-content: flex-start;
    }

    .palette-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media (max-width: 980px) {
    .course-premium-copy,
    .course-classroom {
        grid-template-columns: 1fr;
    }

    .course-premium-hero {
        padding: 26px 22px 66px;
    }

    .course-hero-thumb {
        max-width: 420px;
    }

    .course-premium-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .course-premium-stats > div:nth-child(3) {
        border-left: 0;
        border-top: 1px solid #d8e0ee;
    }

    .course-premium-stats > div:nth-child(4) {
        border-top: 1px solid #d8e0ee;
    }
}

@media (max-width: 640px) {
    .course-video-page {
        width: min(100% - 20px, 1180px);
    }

    .course-premium-hero {
        padding: 20px 16px 56px;
    }

    .course-premium-copy h1 {
        font-size: clamp(1.55rem, 8vw, 2.15rem);
    }

    .course-premium-copy p {
        font-size: 0.96rem;
    }

    .course-crumbs,
    .course-premium-meta {
        gap: 7px;
    }

    .course-premium-stats {
        width: calc(100% - 18px);
        grid-template-columns: 1fr 1fr;
        margin-top: -38px;
    }

    .course-premium-stats > div {
        min-height: 78px;
        padding: 11px 10px;
    }

    .course-premium-stats strong {
        font-size: 1.12rem;
    }

    .course-player-info,
    .course-content-head {
        padding: 14px;
    }

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

    .course-section summary {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .course-section summary strong {
        white-space: normal;
    }

    .course-lesson-button {
        grid-template-columns: 24px minmax(0, 1fr) auto;
        min-height: 58px;
    }

    .course-lesson-button .lesson-duration {
        grid-column: 2;
    }

    .lesson-title {
        white-space: normal;
    }

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

@media (max-width: 980px) {
    .home-hero {
        padding: 18px;
    }

    .home-program-zone .home-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-program-zone .home-action-card:first-child {
        grid-column: 1 / -1;
        grid-row: auto;
        min-height: 190px;
    }

    .home-app-copy,
    .home-app-showcase {
        min-height: auto;
    }

    .home-app-download {
        padding: 0;
    }

    .home-trending-zone,
    .home-category-zone,
    .home-news-zone,
    .home-flow-zone {
        padding: 18px;
    }
}

@media (max-width: 640px) {
    .home-hero {
        padding: 12px;
        background:
            linear-gradient(145deg, var(--app-pink) 0%, var(--app-purple) 54%, var(--app-indigo) 100%),
            var(--app-purple);
    }

    .home-hero-copy {
        padding: 16px;
    }

    .home-hero-copy h1 {
        font-size: clamp(1.7rem, 8vw, 2.2rem);
    }

    .home-hero-copy p:not(.eyebrow) {
        font-size: 0.94rem;
    }

    .home-program-zone,
    .home-trending-zone,
    .home-category-zone,
    .home-news-zone,
    .home-flow-zone {
        padding: 14px;
    }

    .home-program-zone .home-card-grid {
        grid-template-columns: 1fr;
    }

    .home-program-zone .home-action-card {
        min-height: 184px;
    }

    .home-program-zone .home-action-card:first-child {
        min-height: 200px;
    }

    .home-app-copy {
        padding: 20px;
    }

    .home-app-copy h2 {
        font-size: clamp(1.45rem, 8vw, 2rem);
    }

    .home-app-showcase {
        padding: 14px;
    }

    .home-app-download {
        padding: 0;
    }

    .home-section-head a {
        width: fit-content;
    }
}

/* Referral phase 10 public growth pages */
.referral-public-page {
    display: grid;
    gap: 22px;
    padding: 22px 0 34px;
}

.referral-public-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 22px;
    align-items: stretch;
    padding: 28px;
    border: 1px solid color-mix(in srgb, var(--app-purple) 20%, #ffffff);
    border-radius: 22px;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--app-pink) 86%, #ffffff), color-mix(in srgb, var(--app-violet) 92%, #1f1b58));
    color: #ffffff;
    box-shadow: 0 24px 58px color-mix(in srgb, var(--app-violet) 22%, transparent);
}

.referral-public-compact-hero {
    grid-template-columns: minmax(0, 1fr) 220px;
}

.referral-public-hero-copy {
    display: grid;
    align-content: center;
    gap: 14px;
    max-width: 760px;
}

.referral-public-hero .eyebrow,
.referral-public-section-head .eyebrow {
    margin: 0;
    color: inherit;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
    opacity: 0.82;
}

.referral-public-hero h1 {
    margin: 0;
    max-width: 900px;
    color: #ffffff;
    font-size: clamp(2rem, 4vw, 3.7rem);
    line-height: 1.02;
}

.referral-public-hero p:not(.eyebrow) {
    margin: 0;
    max-width: 720px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 1.02rem;
    line-height: 1.7;
}

.referral-public-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.referral-public-primary,
.referral-public-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    font-weight: 900;
    text-decoration: none;
}

.referral-public-primary {
    background: #ffffff;
    color: var(--app-violet);
}

.referral-public-secondary {
    border: 1px solid rgba(255, 255, 255, 0.46);
    color: #ffffff;
}

.referral-public-card {
    border: 1px solid color-mix(in srgb, var(--app-purple) 14%, #e7eaf0);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 18px 42px rgba(21, 21, 54, 0.08);
}

.referral-public-hero-card {
    display: grid;
    align-content: end;
    gap: 8px;
    min-height: 220px;
    padding: 22px;
    background:
        linear-gradient(150deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.08)),
        rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.34);
    color: #ffffff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.referral-public-hero-card span,
.referral-public-hero-card small {
    color: rgba(255, 255, 255, 0.82);
    font-weight: 800;
}

.referral-public-hero-card strong {
    color: #ffffff;
    font-size: 2.4rem;
    line-height: 1;
}

.referral-public-stats,
.referral-public-card-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.referral-public-stats article,
.referral-public-badge {
    display: grid;
    gap: 8px;
    min-height: 132px;
    padding: 18px;
}

.referral-public-stats span,
.referral-public-badge small,
.referral-campaign-mini-list small,
.referral-step-list span {
    color: var(--muted);
    font-weight: 700;
    line-height: 1.5;
}

.referral-public-stats strong {
    color: var(--text);
    font-size: 2rem;
    line-height: 1;
}

.referral-public-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    gap: 18px;
}

.referral-public-leaderboard,
.referral-public-card:not(.referral-public-hero-card) {
    padding: 18px;
}

.referral-public-section {
    display: grid;
    gap: 14px;
}

.referral-public-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.referral-public-section-head h2 {
    margin: 4px 0 0;
    color: var(--text);
    font-size: clamp(1.25rem, 2vw, 1.7rem);
}

.referral-public-section-head a {
    color: var(--app-purple);
    font-weight: 900;
    text-decoration: none;
}

.referral-public-rank-list,
.referral-campaign-mini-list,
.referral-step-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
}

.referral-public-rank-list > div,
.referral-campaign-mini-list > a,
.referral-campaign-mini-list > div,
.referral-step-list li {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid color-mix(in srgb, var(--app-purple) 12%, #e9edf4);
    border-radius: 14px;
    background: color-mix(in srgb, var(--app-soft) 42%, #ffffff);
    color: var(--text);
    text-decoration: none;
}

.referral-public-rank-list > div span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--app-pink), var(--app-violet));
    color: #ffffff;
    font-weight: 900;
}

.referral-public-rank-list > div strong,
.referral-campaign-mini-list strong,
.referral-step-list strong {
    overflow: hidden;
    color: var(--text);
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.referral-public-rank-list > div small {
    color: var(--muted);
    font-weight: 800;
}

.referral-public-rank-list > div em {
    color: var(--app-purple);
    font-style: normal;
    font-weight: 900;
}

.referral-public-empty {
    margin: 0;
    color: var(--muted);
    font-weight: 800;
}

.referral-public-badge span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--app-pink), var(--app-violet));
    color: #ffffff;
    font-weight: 900;
}

.referral-public-badge strong {
    color: var(--text);
    font-size: 1.05rem;
}

.referral-period-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.referral-period-tabs a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 16px;
    border: 1px solid color-mix(in srgb, var(--app-purple) 18%, #dfe5ef);
    border-radius: 999px;
    background: #ffffff;
    color: var(--muted);
    font-weight: 900;
    text-decoration: none;
}

.referral-period-tabs a.is-active {
    border-color: transparent;
    background: linear-gradient(135deg, var(--app-pink), var(--app-violet));
    color: #ffffff;
}

.referral-public-leaderboard-full .referral-public-rank-list > div {
    grid-template-columns: auto minmax(0, 1fr) minmax(150px, auto) auto;
}

.referral-campaign-hero {
    grid-template-columns: minmax(0, 1fr) 320px;
}

.referral-step-list {
    list-style: none;
}

.referral-step-list li {
    grid-template-columns: minmax(0, 0.7fr) minmax(0, 1fr);
}

.referral-share-card {
    display: grid;
    gap: 14px;
    align-content: center;
    min-height: 360px;
    padding: 26px;
    border-radius: 22px;
    background: linear-gradient(145deg, var(--app-pink), var(--app-violet));
    color: #ffffff;
    box-shadow: 0 28px 70px color-mix(in srgb, var(--app-violet) 24%, transparent);
}

.referral-share-card-blue {
    background: linear-gradient(145deg, #276ff1, #32b7c4);
}

.referral-share-card-green {
    background: linear-gradient(145deg, #0d8d79, #67c36f);
}

.referral-share-card span,
.referral-share-card strong,
.referral-share-card code {
    color: rgba(255, 255, 255, 0.92);
    font-weight: 900;
}

.referral-share-card h1,
.referral-share-card h2 {
    margin: 0;
    max-width: 680px;
    color: #ffffff;
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1.03;
}

.referral-share-card p {
    margin: 0;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 700;
    line-height: 1.6;
}

.referral-share-card code {
    display: inline-flex;
    width: max-content;
    max-width: 100%;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    word-break: break-word;
}

.referral-share-card a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: max-content;
    min-height: 44px;
    max-width: 100%;
    padding: 0 18px;
    border-radius: 999px;
    background: #ffffff;
    color: var(--app-violet);
    font-weight: 900;
    text-decoration: none;
}

.referral-share-page {
    justify-items: center;
}

.referral-share-page .referral-share-card {
    width: min(760px, 100%);
}

.referral-share-actions-public .referral-public-secondary {
    border-color: color-mix(in srgb, var(--app-purple) 28%, #ffffff);
    color: var(--app-purple);
}

.referral-terms-card {
    color: var(--text);
    line-height: 1.7;
}

.referral-growth-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

@media (max-width: 900px) {
    .referral-public-hero,
    .referral-public-compact-hero,
    .referral-campaign-hero,
    .referral-public-grid {
        grid-template-columns: 1fr;
    }

    .referral-public-stats,
    .referral-public-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .referral-public-hero-card {
        min-height: 150px;
    }
}

@media (max-width: 560px) {
    .referral-public-page {
        gap: 16px;
        padding-top: 12px;
    }

    .referral-public-hero,
    .referral-share-card {
        border-radius: 18px;
        padding: 20px;
    }

    .referral-public-hero h1,
    .referral-share-card h1,
    .referral-share-card h2 {
        font-size: 2rem;
    }

    .referral-public-stats,
    .referral-public-card-grid {
        grid-template-columns: 1fr;
    }

    .referral-public-rank-list > div,
    .referral-public-leaderboard-full .referral-public-rank-list > div,
    .referral-campaign-mini-list > a,
    .referral-campaign-mini-list > div,
    .referral-step-list li {
        grid-template-columns: 1fr;
        justify-items: start;
    }

    .referral-public-actions {
        width: 100%;
    }

    .referral-public-primary,
    .referral-public-secondary {
        width: 100%;
    }
}
