:root {
    --header-bg: #050b16;
    --header-bg-strong: #03070f;
    --header-text: #f8fafc;
    --page-bg: #07111f;
    --page-overlay: radial-gradient(circle at top left, rgba(42, 194, 188, 0.18), transparent 32rem), linear-gradient(180deg, #07111f 0%, #0a1424 52%, #0d1a2d 100%);
    --surface: #ffffff;
    --surface-soft: #f6f8fb;
    --surface-dark: #101827;
    --text: #111827;
    --text-soft: #4b5563;
    --muted: #6b7280;
    --line: #d9e1ea;
    --bronze: #c9914a;
    --bronze-strong: #a76825;
    --teal: #2ac2bc;
    --blue: #315bff;
    --crimson: #c43b54;
    --green: #15845b;
    --shadow: 0 22px 50px rgba(4, 11, 24, 0.12);
    --shadow-strong: 0 30px 80px rgba(4, 11, 24, 0.24);
    --radius: 8px;
    --font-sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.theme-light {
    --page-bg: #f5f7fb;
    --page-overlay: linear-gradient(180deg, #f5f7fb 0%, #ffffff 55%, #eef3f8 100%);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-sans);
    background: var(--page-bg);
    background-image: var(--page-overlay);
    color: var(--text);
    line-height: 1.6;
    padding-top: 126px;
    transition: background-color 220ms ease, background-image 220ms ease;
}

body.menu-open {
    overflow: hidden;
}

img {
    max-width: 100%;
}

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

button,
input,
select,
textarea {
    font: inherit;
}

button {
    border: 0;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.container {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}

.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: linear-gradient(180deg, rgba(5, 11, 22, 0.98), rgba(5, 11, 22, 0.94));
    border-bottom: 1px solid rgba(201, 145, 74, 0.42);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(14px);
    transition: transform 220ms ease, box-shadow 220ms ease, background 220ms ease;
}

.production-notice {
    min-height: 46px;
    display: flex;
    align-items: center;
    color: #f7edcf;
    background:
        linear-gradient(90deg, rgba(5, 40, 24, 0.98), rgba(42, 25, 12, 0.98) 48%, rgba(92, 23, 18, 0.98)),
        radial-gradient(circle at 8% 40%, rgba(240, 196, 119, 0.24), transparent 28rem);
    border-bottom: 1px solid rgba(240, 196, 119, 0.28);
    font-size: 0.82rem;
    line-height: 1.35;
}

.production-notice-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding-block: 8px;
}

.production-notice-kicker {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #9df2b6;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    white-space: nowrap;
}

.main-header.is-scrolled {
    background: rgba(3, 7, 15, 0.98);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.36);
}

.scroll-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, var(--bronze), var(--teal), var(--bronze));
    box-shadow: 0 0 16px rgba(42, 194, 188, 0.5);
}

.header-inner {
    min-height: 80px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 16px;
    align-items: center;
    transition: min-height 220ms ease;
}

.main-header.is-scrolled .header-inner {
    min-height: 62px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 320px;
}

.brand-logo {
    display: block;
    width: 360px;
    max-height: 64px;
    height: auto;
    object-fit: contain;
    transition: width 220ms ease, transform 220ms ease;
}

.main-header.is-scrolled .brand-logo {
    width: 310px;
}

.brand-fallback {
    display: none;
    color: var(--header-text);
    font-weight: 800;
    letter-spacing: 0.08em;
    white-space: nowrap;
}

.brand-fallback strong {
    color: var(--bronze);
    font-weight: 700;
}

.main-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
}

.main-nav a {
    color: rgba(248, 250, 252, 0.82);
    padding: 7px 9px;
    border-radius: var(--radius);
    font-size: 0.86rem;
    font-weight: 600;
    transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
    color: #ffffff;
    background: rgba(201, 145, 74, 0.16);
}

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

.language-menu {
    position: relative;
}

.language-toggle {
    width: 36px;
    height: 36px;
    min-height: 36px;
    min-width: 36px;
    padding: 0;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.08);
    color: #f8fafc;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    cursor: pointer;
    overflow: hidden;
}

.language-flag {
    font-size: 1.05rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 21px;
    height: 21px;
}

.language-flag-img {
    display: block;
    width: 21px;
    height: 21px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center center;
    flex: 0 0 auto;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.32);
}

.language-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 106px;
    padding: 5px;
    border-radius: var(--radius);
    border: 1px solid rgba(201, 145, 74, 0.28);
    background: #ffffff;
    color: #111827;
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-4px);
    transition: opacity 160ms ease, transform 160ms ease;
    z-index: 1500;
}

.language-menu:hover .language-dropdown,
.language-menu.is-open .language-dropdown {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.language-dropdown a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 9px;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #111827;
}

.language-dropdown .language-flag,
.language-dropdown .language-flag-img {
    margin-inline: 0;
}

.language-option-code {
    min-width: 24px;
    text-align: right;
    font-weight: 800;
}

.language-dropdown a:hover,
.language-dropdown a.is-active {
    background: rgba(201, 145, 74, 0.16);
    color: #000000;
}

.theme-switch {
    width: 36px;
    height: 36px;
    min-height: 36px;
    min-width: 36px;
    padding: 0;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.26);
    background: rgba(255, 255, 255, 0.08);
    color: #f8fafc;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.theme-icon {
    font-size: 0.92rem;
    color: #f8fafc;
    transition: transform 180ms ease, color 180ms ease;
}

body.theme-light .theme-icon {
    color: var(--bronze);
}

.mobile-menu-toggle,
.icon-button,
.btn-outline,
.btn-primary,
.btn-link {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: var(--radius);
    font-weight: 700;
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.mobile-menu-toggle,
.icon-button,
.btn-outline {
    color: var(--header-text);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.16);
    padding: 9px 13px;
}

.header-control,
.header-icon-action {
    position: relative;
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    padding: 0;
    border-radius: 999px;
}

.header-icon-action {
    font-size: 0.92rem;
}

.header-register-action {
    color: #101827;
    background: linear-gradient(135deg, #f0c477, var(--bronze));
    border-color: rgba(255, 255, 255, 0.2);
}

.header-control::after,
.header-icon-action::after {
    content: attr(data-tooltip);
    position: absolute;
    top: calc(100% + 9px);
    right: 0;
    z-index: 1600;
    width: max-content;
    max-width: 190px;
    padding: 6px 8px;
    border-radius: 6px;
    background: #ffffff;
    color: #111827;
    border: 1px solid rgba(201, 145, 74, 0.26);
    box-shadow: var(--shadow);
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.2;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-3px);
    transition: opacity 150ms ease, transform 150ms ease;
}

.header-control:hover::after,
.header-control:focus-visible::after,
.header-icon-action:hover::after,
.header-icon-action:focus-visible::after {
    opacity: 1;
    transform: translateY(0);
}

.btn-outline:not(.header-cta),
.content .btn-outline,
main .btn-outline {
    color: var(--text);
    background: #ffffff;
    border-color: var(--line);
}

.btn-primary {
    position: relative;
    overflow: hidden;
    color: #101827;
    background: linear-gradient(135deg, #f0c477, var(--bronze) 55%, #b16d27);
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 10px 16px;
    box-shadow: 0 10px 24px rgba(201, 145, 74, 0.28);
}

.outbound-page {
    min-height: 70vh;
    padding-top: 24px;
}

.outbound-shell {
    display: grid;
    place-items: center;
}

.outbound-card {
    width: min(760px, 100%);
    padding: clamp(24px, 4vw, 42px);
    border-color: rgba(201, 145, 74, 0.34);
    background: linear-gradient(145deg, rgba(8, 16, 30, 0.96), rgba(15, 28, 48, 0.94));
    color: #f8fafc;
}

.outbound-card h1 {
    margin: 12px 0 10px;
    color: #ffffff;
    font-size: clamp(1.45rem, 3vw, 2rem);
}

.outbound-card p {
    color: rgba(248, 250, 252, 0.82);
}

.outbound-domain {
    display: grid;
    gap: 4px;
    margin: 20px 0;
    padding: 14px 16px;
    border: 1px solid rgba(201, 145, 74, 0.36);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
}

.outbound-domain span {
    color: rgba(248, 250, 252, 0.62);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.outbound-domain strong {
    color: #f0c477;
    overflow-wrap: anywhere;
}

.outbound-progress {
    height: 4px;
    margin: 18px 0 22px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
}

.outbound-progress::before {
    content: "";
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #f0c477, var(--bronze), #ffffff);
    transform-origin: left center;
    animation: outboundCountdown var(--out-delay, 8s) linear forwards;
}

.outbound-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.outbound-disclosure {
    margin-top: 16px;
    font-size: 0.86rem;
}

.outbound-sponsor-slot {
    margin-top: 18px;
    padding: 14px 16px;
    border: 1px dashed rgba(201, 145, 74, 0.36);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
}

.outbound-sponsor-placeholder {
    display: grid;
    gap: 4px;
}

.outbound-sponsor-placeholder strong {
    color: #ffffff;
}

.outbound-sponsor-placeholder span {
    color: rgba(248, 250, 252, 0.72);
    font-size: 0.88rem;
}

body.theme-light .outbound-card {
    background: #ffffff;
    color: #111827;
}

body.theme-light .outbound-card h1,
body.theme-light .outbound-sponsor-placeholder strong {
    color: #111827;
}

body.theme-light .outbound-card p,
body.theme-light .outbound-sponsor-placeholder span {
    color: #374151;
}

body.theme-light .outbound-domain,
body.theme-light .outbound-sponsor-slot {
    background: #f8fafc;
}

body.theme-light .outbound-domain span {
    color: #6b7280;
}

@keyframes outboundCountdown {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

.btn-primary::after {
    content: "";
    position: absolute;
    inset: 0 auto 0 -120%;
    width: 70%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.38), transparent);
    transform: skewX(-18deg);
    transition: left 450ms ease;
}

.btn-primary:hover::after {
    left: 140%;
}

.btn-primary:hover,
.btn-outline:hover,
.icon-button:hover,
.mobile-menu-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

.mobile-menu-toggle {
    display: none;
}

.page-shell {
    overflow: hidden;
}

.hero {
    min-height: calc(100vh - 104px);
    display: grid;
    align-items: center;
    color: #f8fafc;
    padding: 56px 0 34px;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
    align-items: center;
    gap: 46px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #f0c477;
    font-size: 0.78rem;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.12em;
    margin-bottom: 18px;
}

.hero h1,
.page-hero h1 {
    margin: 0;
    max-width: 860px;
    font-size: clamp(2rem, 6vw, 4.8rem);
    line-height: 0.98;
    letter-spacing: 0;
}

.hero p,
.page-hero p {
    max-width: 720px;
    color: rgba(248, 250, 252, 0.82);
    font-size: clamp(1.02rem, 2vw, 1.22rem);
}

.hero-actions,
.section-actions,
.form-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

.hero-media {
    display: grid;
    gap: 14px;
}

.logo-showcase {
    background:
        radial-gradient(circle at 50% 12%, rgba(240, 196, 119, 0.2), transparent 32rem),
        linear-gradient(145deg, rgba(5, 18, 14, 0.92), rgba(10, 14, 18, 0.96));
    border: 1px solid rgba(240, 196, 119, 0.22);
    border-radius: var(--radius);
    padding: clamp(10px, 2vw, 22px);
    box-shadow: var(--shadow-strong);
}

.logo-showcase img {
    width: min(76%, 390px);
    max-height: 460px;
    margin: 0 auto;
    display: block;
    object-fit: contain;
    border-radius: 6px;
}

body.theme-light .logo-showcase img {
    filter: none;
}

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

.metric {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius);
    padding: 16px;
}

.metric strong {
    display: block;
    color: #ffffff;
    font-size: 1.7rem;
    line-height: 1;
}

.metric span {
    color: rgba(248, 250, 252, 0.72);
    font-size: 0.86rem;
}

.page-hero {
    color: #f8fafc;
    padding: 58px 0 46px;
}

.page-hero.compact {
    padding-bottom: 26px;
}

.page-hero.image-page-hero {
    position: relative;
    overflow: hidden;
    min-height: clamp(360px, 46vw, 540px);
    display: flex;
    align-items: flex-start;
    padding: clamp(10px, 2.1vw, 22px) 0 clamp(36px, 6vw, 64px);
    background-image: var(--page-hero-image);
    background-size: cover;
    background-position: var(--page-hero-position, center center);
    background-repeat: no-repeat;
    border-bottom: 1px solid rgba(201, 145, 74, 0.26);
    box-shadow: none;
}

.page-hero-courses {
    --page-hero-image: url('../img/pages/hero-cursos.png');
}

.page-hero-tools {
    --page-hero-image: url('../img/pages/hero-herramientas.png');
}

.page-hero-marketplace {
    --page-hero-image: url('../img/pages/hero-marketplace.png');
}

.page-hero-academy {
    --page-hero-image: url('../img/pages/hero-academia.png');
    --page-hero-position: center center;
}

.page-hero-contact {
    --page-hero-image: url('../img/pages/hero-contacto.png');
}

.page-hero.image-page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: rgba(255, 255, 255, 0.2);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
}

.page-hero.image-page-hero:hover::before {
    opacity: 1;
}

.page-hero.image-page-hero::after {
    content: '';
    position: absolute;
    inset: auto 0 0;
    z-index: 3;
    height: 4px;
    background: linear-gradient(90deg, transparent, rgba(240, 196, 119, 0.78), rgba(58, 212, 255, 0.42), transparent);
    opacity: 0.84;
    pointer-events: none;
}

.page-hero.image-page-hero .container {
    position: relative;
    z-index: 2;
}

.page-hero.image-page-hero .eyebrow {
    margin-bottom: 8px;
}

.page-hero.image-page-hero h1 {
    max-width: 820px;
    font-size: clamp(1.45rem, 3vw, 2.55rem);
    color: #ffffff;
    text-shadow: 0 4px 24px rgba(0, 0, 0, 0.58);
}

.page-hero.image-page-hero p {
    max-width: 700px;
    margin: 8px 0 0;
    font-size: clamp(0.86rem, 1.05vw, 0.94rem);
    color: rgba(248, 250, 252, 0.88);
    text-shadow: 0 3px 18px rgba(0, 0, 0, 0.52);
}

.page-hero.compact.image-page-hero {
    min-height: clamp(340px, 42vw, 500px);
    padding-bottom: clamp(34px, 6vw, 60px);
}

.page-hero.image-page-hero.page-hero-marketplace {
    padding-bottom: 24px;
}

.page-hero-marketplace .container {
    min-height: calc(clamp(360px, 46vw, 540px) - clamp(10px, 2.1vw, 22px) - 24px);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.page-hero-marketplace .hero-actions {
    margin-top: auto;
    padding-top: 24px;
}

.section {
    padding: 72px 0;
}

.section.light-band {
    background: rgba(255, 255, 255, 0.72);
}

.section-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.section-header h2,
.content h2,
.dashboard-title h1 {
    margin: 0 0 10px;
    font-size: clamp(1.45rem, 2.6vw, 2.3rem);
    line-height: 1.05;
    letter-spacing: 0;
}

.section-header p,
.muted,
.content p {
    color: var(--text-soft);
}

body:not(.theme-light) main > .section:not(.content) > .container > .section-header h2,
body:not(.theme-light) main > .section:not(.content) .content-block h2 {
    color: #ffffff;
    text-shadow: 0 0 18px rgba(42, 194, 188, 0.16);
}

body:not(.theme-light) main > .section:not(.content) > .container > .section-header p,
body:not(.theme-light) main > .section:not(.content) .content-block p {
    color: rgba(236, 243, 252, 0.88);
}

.course-program-page > .section:not(.content) .section-header h2 {
    color: #ffffff;
    text-shadow: 0 0 18px rgba(42, 194, 188, 0.16);
}

.course-program-page > .section:not(.content) .section-header p {
    color: rgba(236, 243, 252, 0.88);
}

.course-program-page > .section.content {
    background: rgba(5, 11, 22, 0.82);
    border-top: 1px solid rgba(201, 145, 74, 0.22);
    border-bottom: 1px solid rgba(201, 145, 74, 0.12);
}

.course-program-page > .section.content > .section-header h2,
.course-program-page > .section.content .section-header h2,
.course-program-page .course-overview-layout > article > h2 {
    color: #ffffff;
}

.course-program-page > .section.content > .section-header p,
.course-program-page > .section.content .section-header p,
.course-program-page .course-overview-layout > article > p,
.course-program-page .course-overview-layout > article > .module-list li {
    color: rgba(236, 243, 252, 0.88);
}

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

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

.card,
.course-card,
.dashboard-panel,
.form-panel,
.event-row,
.verify-result,
.timeline-item,
.team-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.card,
.course-card,
.dashboard-panel,
.form-panel,
.team-card {
    padding: 24px;
}

.course-card {
    display: flex;
    min-height: 100%;
    flex-direction: column;
    gap: 14px;
}

.marketplace-listing-card {
    position: relative;
    overflow: hidden;
}

.auto-renew-corner {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
    padding: 4px 7px;
    border-radius: 6px;
    color: #f87171;
    background: rgba(30, 6, 12, 0.88);
    border: 1px solid rgba(248, 113, 113, 0.38);
    box-shadow: 0 0 16px rgba(248, 113, 113, 0.15);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0;
}

.auto-renew-corner:hover {
    color: #ffffff;
    background: rgba(196, 59, 84, 0.92);
}

.course-cover,
.course-card-electric .course-cover {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid rgba(201, 145, 74, 0.3);
    background: #050b16;
    min-height: 180px;
    margin-bottom: 12px;
}

.course-cover::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    background:
        radial-gradient(circle at 50% 28%, rgba(42, 194, 188, 0.18), transparent 34%),
        linear-gradient(180deg, rgba(3, 8, 16, 0.12), rgba(3, 8, 16, 0.55) 52%, rgba(3, 8, 16, 0.82));
    transition: opacity 220ms ease;
}

.course-cover-link {
    display: block;
    color: inherit;
    outline: none;
}

.course-cover-link:focus-visible {
    outline: 2px solid var(--teal);
    outline-offset: -4px;
}

.course-cover img,
.course-card-electric .course-cover img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    filter: saturate(1.08) contrast(1.03);
    transform: scale(1);
    transition: transform 260ms ease, filter 260ms ease;
}

.course-cover-title {
    position: absolute;
    left: 12px;
    right: 12px;
    top: 12px;
    z-index: 3;
    pointer-events: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 8px 12px;
    border: 1px solid rgba(201, 145, 74, 0.5);
    border-radius: var(--radius-sm);
    background:
        linear-gradient(90deg, rgba(3, 8, 16, 0.9), rgba(6, 17, 30, 0.78)),
        radial-gradient(circle at 10% 50%, rgba(42, 194, 188, 0.2), transparent 44%);
    color: #ffffff;
    box-shadow: 0 0 24px rgba(201, 145, 74, 0.2), inset 0 -1px 0 rgba(42, 194, 188, 0.25);
    font-size: clamp(0.82rem, 1vw, 1rem);
    font-weight: 900;
    line-height: 1.12;
    letter-spacing: 0;
    text-align: center;
    text-shadow: 0 2px 9px rgba(0, 0, 0, 0.92), 0 0 10px rgba(42, 194, 188, 0.28);
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 220ms ease, transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.course-cover-title::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: -1px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(42, 194, 188, 0.9), rgba(201, 145, 74, 0.9), transparent);
    opacity: 0.9;
}

.course-card:hover .course-cover::before,
.course-card:focus-within .course-cover::before,
.course-card.is-cover-hovered .course-cover::before,
.course-card.is-armed .course-cover::before {
    opacity: 1;
}

.course-card:hover .course-cover img,
.course-card:focus-within .course-cover img,
.course-card.is-cover-hovered .course-cover img,
.course-card.is-armed .course-cover img {
    filter: saturate(1.2) contrast(1.16) brightness(0.92);
    transform: scale(1.055);
}

.course-card:hover .course-cover-title,
.course-card:focus-within .course-cover-title,
.course-card.is-cover-hovered .course-cover-title,
.course-card.is-armed .course-cover-title {
    opacity: 1;
    transform: translateY(0);
    border-color: rgba(243, 202, 135, 0.82);
    box-shadow: 0 0 28px rgba(201, 145, 74, 0.34), 0 0 22px rgba(42, 194, 188, 0.18), inset 0 -1px 0 rgba(42, 194, 188, 0.38);
}

.course-card-electric .course-cover::before,
.course-card-electric .course-cover::after {
    content: "";
    position: absolute;
    top: 8px;
    bottom: 8px;
    width: 5px;
    border-radius: 8px;
    opacity: 0;
    transition: opacity 200ms ease, box-shadow 200ms ease;
    background: linear-gradient(180deg, rgba(42, 194, 188, 0.2), rgba(201, 145, 74, 0.95), rgba(42, 194, 188, 0.2));
    box-shadow: 0 0 0 rgba(201, 145, 74, 0);
}

.course-card-electric .course-cover::before { left: 6px; }
.course-card-electric .course-cover::after { right: 6px; }

.course-card-electric:hover .course-cover::before,
.course-card-electric:hover .course-cover::after,
.course-card-electric.is-armed .course-cover::before,
.course-card-electric.is-armed .course-cover::after {
    opacity: 1;
    box-shadow: 0 0 14px rgba(201, 145, 74, 0.68);
    animation: electricPulse 960ms linear infinite;
}

.course-price-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 4;
    padding: 10px 12px;
    color: #f8fafc;
    background: linear-gradient(180deg, rgba(3, 8, 16, 0.18), rgba(3, 8, 16, 0.93) 36%, rgba(3, 8, 16, 0.98));
    transform: translateY(100%);
    opacity: 0;
    transition: transform 220ms ease, opacity 220ms ease;
}

.course-card-electric:hover .course-price-overlay,
.course-card-electric.is-armed .course-price-overlay {
    transform: translateY(0);
    opacity: 1;
}

.course-hero-cover {
    position: relative;
    margin: 28px 0 0;
    overflow: hidden;
    border: 1px solid rgba(201, 145, 74, 0.38);
    border-radius: var(--radius);
    background: #050b16;
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.34), 0 0 42px rgba(42, 194, 188, 0.08);
}

.course-hero-cover::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(3, 8, 16, 0.32), transparent 38%, rgba(3, 8, 16, 0.44)),
        linear-gradient(180deg, transparent 48%, rgba(3, 8, 16, 0.86));
}

.course-hero-cover img {
    display: block;
    width: 100%;
    max-height: 520px;
    object-fit: cover;
    aspect-ratio: 16 / 9;
    filter: saturate(1.08) contrast(1.08);
}

.course-hero-cover figcaption {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid rgba(201, 145, 74, 0.48);
    border-radius: var(--radius-sm);
    background: rgba(3, 8, 16, 0.82);
    color: #ffffff;
    box-shadow: 0 0 24px rgba(201, 145, 74, 0.2);
}

.course-hero-cover figcaption span {
    color: #f3ca87;
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
}

.course-hero-cover figcaption strong {
    font-size: clamp(1rem, 2vw, 1.5rem);
    line-height: 1.1;
}

.price-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 7px;
    border-radius: var(--radius);
    background: rgba(201, 145, 74, 0.2);
    border: 1px solid rgba(201, 145, 74, 0.56);
    color: #f3ca87;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
}

.price-electric {
    margin-top: 6px;
    display: block;
    font-family: "Courier New", monospace;
    font-size: 1rem;
    letter-spacing: 0;
    color: #7de6ef;
    text-shadow: 0 0 9px rgba(125, 230, 239, 0.76), 0 0 3px rgba(125, 230, 239, 0.6);
    font-weight: 700;
}

.quick-buy-slider-wrap {
    margin-top: 2px;
    border: 1px solid rgba(201, 145, 74, 0.3);
    border-radius: var(--radius);
    padding: 10px;
    background: linear-gradient(180deg, #08121f, #091a2a);
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 220ms ease, max-height 220ms ease, margin-top 220ms ease;
}

.course-card-electric:hover .quick-buy-slider-wrap,
.course-card-electric.is-armed .quick-buy-slider-wrap {
    opacity: 1;
    max-height: 160px;
    margin-top: 8px;
}

.quick-buy-slider-wrap label {
    display: block;
    color: #f0c477;
    font-weight: 700;
    margin-bottom: 8px;
    font-size: 0.82rem;
}

.quick-buy-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 12px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(201, 145, 74, 0.2), rgba(42, 194, 188, 0.18));
    outline: none;
    border: 1px solid rgba(201, 145, 74, 0.42);
    cursor: pointer;
}

.quick-buy-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #ffffff 0%, #f0c477 36%, #b9712d 100%);
    border: 2px solid #f6ddaf;
    box-shadow: 0 0 14px rgba(201, 145, 74, 0.62);
}

.quick-buy-slider::-moz-range-thumb {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #ffffff 0%, #f0c477 36%, #b9712d 100%);
    border: 2px solid #f6ddaf;
    box-shadow: 0 0 14px rgba(201, 145, 74, 0.62);
}

.quick-buy-hint {
    margin: 8px 0 0;
    font-size: 0.76rem;
    color: rgba(248, 250, 252, 0.8);
}

@keyframes electricPulse {
    0% { filter: hue-rotate(0deg); opacity: 0.72; }
    50% { filter: hue-rotate(28deg); opacity: 1; }
    100% { filter: hue-rotate(0deg); opacity: 0.75; }
}

.course-card h3,
.card h3,
.team-card h3 {
    margin: 0;
    font-size: 1.08rem;
    line-height: 1.25;
}

h1, h2, h3 {
    letter-spacing: 0;
}

.badge {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 10px;
    border-radius: var(--radius);
    color: #ffffff;
    background: #182338;
    border-left: 4px solid var(--bronze);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.badge-danger {
    background: #3a0c17;
    border-left-color: #f87171;
    color: #fecdd3;
}

.course-meta,
.dashboard-meta,
.inline-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--muted);
    font-size: 0.92rem;
}

.hero-meta {
    margin-top: 16px;
    color: rgba(248, 250, 252, 0.84);
}

.hero-meta i {
    color: var(--bronze);
}

.course-anchor-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 26px;
}

.course-anchor-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 7px 11px;
    border-radius: var(--radius);
    border: 1px solid rgba(17, 24, 39, 0.14);
    color: #10253d;
    background: #f5f8fc;
    font-weight: 700;
    font-size: 0.84rem;
}

.course-anchor-nav a:hover {
    color: #fff;
    background: #182338;
    border-color: #182338;
}

.course-overview-layout h2,
.course-overview-layout h3,
.curriculum-module h3,
.curriculum-lesson h4,
.week-card h3,
.course-card h4 {
    margin-top: 0;
}

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

.pedagogic-card {
    position: relative;
}

.pedagogy-stage + .pedagogy-stage {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px dashed rgba(17, 24, 39, 0.18);
}

.pedagogy-stage h4 {
    margin: 0 0 8px;
    font-size: 0.96rem;
}

.pedagogy-subhead {
    margin-top: 22px;
}

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

.glossary-item h3 {
    font-size: 1rem;
}

.week-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.week-deliverable {
    margin: 0;
    color: var(--text);
}

.curriculum-stack {
    display: grid;
    gap: 18px;
}

.curriculum-module {
    display: grid;
    gap: 14px;
}

.curriculum-module-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.curriculum-hours {
    margin-left: auto;
    padding: 4px 8px;
    border-radius: var(--radius);
    border: 1px solid rgba(17, 24, 39, 0.16);
    color: #0f172a;
    background: #eef3fb;
    font-size: 0.82rem;
    font-weight: 700;
}

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

.curriculum-lesson {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-soft);
}

.curriculum-lesson h4 {
    margin-bottom: 8px;
    font-size: 0.98rem;
}

.curriculum-lesson p {
    margin: 8px 0 0;
}

.compact-list {
    margin-top: 8px;
}

.compact-list li {
    padding-top: 8px;
    padding-bottom: 8px;
}

#resumen,
#nivelacion,
#metodo-estudio,
#itinerario-novato,
#rutina-semanal-novato,
#casos-guiados,
#plan-semanal,
#curriculum,
#laboratorios,
#glosario,
#evaluacion,
#documentacion {
    scroll-margin-top: 130px;
}

.course-card .btn-link {
    margin-top: auto;
    justify-content: flex-start;
    color: var(--bronze-strong);
    background: transparent;
    padding: 0;
}

.feature-list,
.check-list,
.module-list,
.tool-list {
    list-style: none;
    padding: 0;
    margin: 18px 0 0;
}

.feature-list li,
.check-list li,
.module-list li {
    position: relative;
    padding: 10px 0 10px 30px;
    border-bottom: 1px solid rgba(217, 225, 234, 0.75);
}

.feature-list li::before,
.check-list li::before,
.module-list li::before {
    content: "\f00c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    top: 11px;
    left: 0;
    color: var(--green);
}

.quote-card {
    border-left: 4px solid var(--bronze);
}

.quote-text {
    margin-top: 0;
    color: #1f2937;
    font-weight: 600;
}

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

.tool-list li {
    padding: 7px 10px;
    border-radius: var(--radius);
    color: #0b233a;
    background: #e9f6f5;
    border: 1px solid #ccecea;
    font-weight: 700;
    font-size: 0.86rem;
}

.toolkit-hero .container {
    max-width: 1060px;
}

.toolkit-security-note {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    max-width: 900px;
    margin-top: 18px;
    padding: 14px 16px;
    color: #f8fafc;
    background: rgba(3, 7, 15, 0.76);
    border: 1px solid rgba(201, 145, 74, 0.42);
    border-radius: var(--radius);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
}

.toolkit-security-note i {
    margin-top: 3px;
    color: var(--bronze);
}

.toolkit-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 24px;
}

.toolkit-nav a {
    padding: 8px 11px;
    color: #111827;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-size: 0.84rem;
    font-weight: 850;
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.toolkit-nav a:hover,
.toolkit-nav a.is-active {
    transform: translateY(-1px);
    color: #07111f;
    border-color: rgba(201, 145, 74, 0.8);
    background: linear-gradient(135deg, #f3c777, #2ac2bc);
    box-shadow: 0 10px 24px rgba(42, 194, 188, 0.18);
}

.toolkit-stack {
    display: grid;
    gap: 22px;
}

.toolkit-block {
    position: relative;
    overflow: hidden;
}

.toolkit-block::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: linear-gradient(90deg, var(--bronze), var(--teal), var(--bronze));
}

.toolkit-block-header,
.toolkit-resource-callout {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.toolkit-block-header {
    margin-bottom: 20px;
}

.toolkit-block-header h3,
.toolkit-resource-callout h3 {
    margin: 8px 0 6px;
    color: #111827;
}

.toolkit-block-header p,
.toolkit-resource-callout p {
    margin: 0;
    color: #374151;
}

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

.toolkit-item {
    display: flex;
    min-height: 100%;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #f7fafc 100%);
    border: 1px solid rgba(217, 225, 234, 0.95);
    border-radius: var(--radius);
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.toolkit-item:hover {
    transform: translateY(-2px);
    border-color: rgba(42, 194, 188, 0.74);
    box-shadow: 0 16px 34px rgba(4, 11, 24, 0.14), 0 0 0 1px rgba(201, 145, 74, 0.12);
}

.toolkit-item-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--bronze-strong);
}

.toolkit-type {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 8px;
    color: #0b233a;
    background: #e9f6f5;
    border: 1px solid #ccecea;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 900;
}

.toolkit-item h4 {
    margin: 0;
    color: #111827;
    font-size: 1rem;
}

.toolkit-item p {
    flex: 1;
    margin: 0;
    color: #4b5563;
    font-size: 0.92rem;
}

.toolkit-item .btn-primary {
    width: 100%;
    min-height: 38px;
    justify-content: center;
    padding: 8px 10px;
    font-size: 0.86rem;
}

.toolkit-resource-callout {
    margin: 0 0 22px;
}

.tool-link-list {
    display: grid;
    gap: 8px;
    margin: 12px 0 14px;
}

.tool-link-list a {
    position: relative;
    display: block;
    padding: 10px 34px 10px 12px;
    color: #111827;
    background: #f8fafc;
    border: 1px solid rgba(217, 225, 234, 0.95);
    border-radius: var(--radius);
    transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.tool-link-list a:hover {
    transform: translateX(2px);
    border-color: rgba(42, 194, 188, 0.72);
    background: #edfafa;
}

.tool-link-list span {
    display: block;
    color: var(--bronze-strong);
    font-size: 0.7rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.tool-link-list strong {
    display: block;
    line-height: 1.25;
}

.tool-link-list i {
    position: absolute;
    top: 17px;
    right: 12px;
    color: var(--teal);
}

.toolkit-aside-button {
    width: 100%;
    justify-content: center;
}

.locked-tools {
    display: grid;
    gap: 10px;
    margin-top: 14px;
    padding: 14px;
    background: #f8fafc;
    border: 1px dashed rgba(201, 145, 74, 0.58);
    border-radius: var(--radius);
}

.locked-tools > i {
    color: var(--bronze-strong);
}

.locked-tools p {
    margin: 0;
    color: #374151;
    font-size: 0.9rem;
}

.locked-tools .btn-outline {
    justify-content: center;
}

.split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.72fr);
    gap: 28px;
    align-items: start;
}

.content {
    background: rgba(255, 255, 255, 0.86);
    border-top: 1px solid rgba(255, 255, 255, 0.7);
}

.content-block {
    max-width: 820px;
}

.timeline {
    display: grid;
    gap: 12px;
}

.timeline-item,
.event-row {
    padding: 18px;
}

.timeline-item time,
.event-row time {
    display: block;
    color: var(--bronze-strong);
    font-weight: 800;
    font-size: 0.86rem;
    margin-bottom: 5px;
}

.stats-band {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}

.stat-box {
    background: var(--surface);
    padding: 24px;
}

.stat-box strong {
    display: block;
    color: var(--bronze-strong);
    font-size: 2rem;
    line-height: 1;
}

.login-layout,
.register-layout,
.contact-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(340px, 0.62fr);
    gap: 28px;
    align-items: start;
}

.form-panel {
    position: relative;
}

.input-group {
    margin-bottom: 18px;
}

.input-group label,
.check-row {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
}

.input-group input,
.input-group select,
.input-group textarea {
    width: 100%;
    min-height: 46px;
    color: var(--text);
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 11px 13px;
    outline: none;
    transition: border-color 180ms ease, box-shadow 180ms ease;
}

.input-group textarea {
    min-height: 130px;
    resize: vertical;
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
    border-color: var(--bronze);
    box-shadow: 0 0 0 4px rgba(201, 145, 74, 0.16);
}

.avatar-picker {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.avatar-radio {
    position: absolute;
    width: 1px !important;
    height: 1px !important;
    min-width: 1px !important;
    min-height: 1px !important;
    opacity: 0;
    pointer-events: none;
}

.avatar-card {
    position: relative;
    min-height: 132px;
    display: grid;
    place-items: center;
    padding: 12px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    background: transparent;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease, background 180ms ease;
}

.avatar-card::after {
    content: "\f00c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    right: 12px;
    top: 12px;
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    color: #08111f;
    background: linear-gradient(135deg, #f6d298, #c9914a);
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 50%;
    box-shadow: 0 0 14px rgba(201, 145, 74, 0.42);
    opacity: 0;
    transform: scale(0.72);
    transition: opacity 160ms ease, transform 160ms ease;
}

.avatar-card img {
    width: 92px;
    height: 92px;
    object-fit: cover;
    border-radius: 50%;
    padding: 5px;
    background: #050b16;
    border: 1px solid rgba(201, 145, 74, 0.38);
    box-shadow: 0 0 18px rgba(201, 145, 74, 0.16);
    transition: transform 180ms ease, filter 180ms ease;
}

.avatar-card-copy {
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 8px;
    z-index: 2;
    display: grid;
    gap: 3px;
    min-width: 0;
    padding: 9px;
    color: #f8fafc;
    background: linear-gradient(180deg, rgba(3, 7, 15, 0.08), rgba(3, 7, 15, 0.94));
    border: 1px solid rgba(201, 145, 74, 0.26);
    border-radius: 7px;
    opacity: 0;
    transform: translateY(12px) scale(0.98);
    pointer-events: none;
    transition: opacity 180ms ease, transform 180ms ease;
}

.avatar-card-copy strong {
    color: #ffffff;
    font-size: 0.84rem;
    line-height: 1.2;
}

.avatar-card-copy small {
    width: fit-content;
    padding: 2px 7px;
    border-radius: 999px;
    color: #08111f;
    background: linear-gradient(135deg, #f0c477, #c9914a);
    font-size: 0.68rem;
    font-weight: 900;
    text-transform: uppercase;
}

.avatar-card-copy em {
    color: rgba(248, 250, 252, 0.84);
    font-size: 0.72rem;
    font-style: normal;
    line-height: 1.35;
}

.avatar-card:hover img,
.avatar-radio:focus-visible + .avatar-card img {
    transform: scale(1.06);
    filter: saturate(1.08) contrast(1.04);
}

.avatar-card:hover .avatar-card-copy,
.avatar-radio:focus-visible + .avatar-card .avatar-card-copy {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.avatar-radio:checked + .avatar-card {
    border-color: transparent;
    background: transparent;
    box-shadow: none;
}

.avatar-radio:checked + .avatar-card::after {
    opacity: 1;
    transform: scale(1);
}

.avatar-radio:checked + .avatar-card img {
    border-color: #f0c477;
    box-shadow: 0 0 0 3px rgba(201, 145, 74, 0.22), 0 0 22px rgba(201, 145, 74, 0.34);
}

.avatar-radio:focus-visible + .avatar-card {
    outline: 3px solid rgba(42, 194, 188, 0.25);
    outline-offset: 2px;
}

.avatar-radio:disabled + .avatar-card {
    opacity: 0.56;
    cursor: not-allowed;
    filter: grayscale(0.25);
}

.profile-avatar-preview {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border-radius: 50%;
    object-fit: cover;
    padding: 3px;
    background: #050b16;
    border: 1px solid rgba(201, 145, 74, 0.5);
}

.vh-check {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    min-width: 14px;
    min-height: 14px;
    max-width: 14px;
    padding: 0;
    flex: 0 0 14px;
    margin: 0;
    display: inline-grid;
    place-content: center;
    vertical-align: middle;
    border-radius: 4px;
    border: 1px solid rgba(201, 145, 74, 0.78);
    background: rgba(5, 11, 22, 0.08);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
    cursor: pointer;
}

.vh-check::before {
    content: "";
    width: 8px;
    height: 8px;
    transform: scale(0);
    transition: transform 120ms ease;
    background: linear-gradient(135deg, #f0c477, var(--bronze));
    clip-path: polygon(14% 44%, 0 61%, 40% 100%, 100% 18%, 82% 5%, 38% 68%);
}

.vh-check:checked::before {
    transform: scale(1);
}

.vh-check:disabled {
    opacity: 0.62;
    cursor: not-allowed;
}

.auto-renew-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.auto-renew-form label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: var(--text);
    font-weight: 800;
    font-size: 0.88rem;
}

.auto-renew-form select {
    max-width: 94px;
    min-height: 38px;
    padding: 7px 9px;
}

.btn-renew {
    min-height: 38px;
    padding: 8px 13px;
}

.instructor-hero {
    margin-bottom: 22px;
}

.totp-qr-box {
    width: 210px;
    min-height: 210px;
    padding: 8px;
    margin: 12px 0 16px;
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    background: #ffffff;
    display: grid;
    place-items: center;
}

.totp-qr-box img,
.totp-qr-box canvas {
    width: 100% !important;
    height: auto !important;
    display: block;
}

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

.check-row {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    margin: 10px 0;
}

input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    min-width: 14px;
    min-height: 14px;
    max-width: 14px;
    padding: 0;
    flex: 0 0 14px;
    margin: 0;
    border-radius: 4px;
    border: 1px solid #2a4164;
    background: linear-gradient(180deg, #f7faff 0%, #eaf0f9 100%);
    display: inline-grid;
    place-content: center;
    vertical-align: middle;
    cursor: pointer;
    transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 120ms ease;
}

input[type="checkbox"]::before {
    content: "";
    width: 4px;
    height: 7px;
    border-right: 2px solid #051327;
    border-bottom: 2px solid #051327;
    transform: rotate(45deg) scale(0);
    transform-origin: center;
    transition: transform 120ms ease;
}

input[type="checkbox"]:checked {
    border-color: #a76825;
    background: linear-gradient(180deg, #f6d298 0%, #c9914a 100%);
    box-shadow: 0 0 0 2px rgba(201, 145, 74, 0.2);
}

input[type="checkbox"]:checked::before {
    transform: rotate(45deg) scale(1);
}

input[type="checkbox"]:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(42, 194, 188, 0.2), 0 0 0 4px rgba(9, 19, 34, 0.16);
}

input[type="checkbox"]:active {
    transform: scale(0.95);
}

input[type="checkbox"]:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.alert,
.error-msg,
.success-msg,
.flash {
    border-radius: var(--radius);
    padding: 12px 14px;
    margin: 14px 0;
    font-weight: 700;
}

.error-msg,
.alert-error,
.flash-error {
    color: #842437;
    background: #fff1f3;
    border: 1px solid #ffd1d9;
}

.success-msg,
.alert-success,
.flash-success {
    color: #0d6442;
    background: #e9f8f1;
    border: 1px solid #bfe9d4;
}

.flash-stack {
    position: fixed;
    top: 118px;
    right: 20px;
    z-index: 1200;
    width: min(380px, calc(100% - 40px));
}

.dashboard-shell {
    padding: 42px 0 72px;
}

.dashboard-shell > .container > .section-header h1,
.dashboard-shell > .container > .section-header h2 {
    color: #f8fafc;
}

.dashboard-shell > .container > .section-header p {
    color: rgba(248, 250, 252, 0.82);
}

.dashboard-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 20px;
    align-items: stretch;
    margin-bottom: 22px;
}

.dashboard-title {
    color: #f8fafc;
}

.dashboard-title p {
    max-width: 780px;
    color: rgba(248, 250, 252, 0.78);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 20px;
}

.progress-track {
    height: 10px;
    background: #e5ecf3;
    border-radius: 999px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: var(--value, 0%);
    background: linear-gradient(90deg, var(--bronze), var(--teal));
}

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

.lesson-item {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 14px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.lesson-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: #182338;
    border-radius: var(--radius);
}

.code-box {
    overflow: auto;
    color: #e5edf8;
    background: #08111f;
    border: 1px solid #203047;
    border-radius: var(--radius);
    padding: 16px;
}

.verify-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    margin-top: 18px;
}

.verify-result {
    margin-top: 20px;
    padding: 20px;
}

.modal,
.cookie-banner {
    display: none;
}

.modal.is-open {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    z-index: 1600;
    padding: 24px;
    background: rgba(3, 7, 15, 0.72);
}

.modal-content {
    position: relative;
    width: min(620px, 100%);
    max-height: min(760px, calc(100vh - 48px));
    overflow: auto;
    background: #ffffff;
    color: var(--text);
    border-radius: var(--radius);
    box-shadow: var(--shadow-strong);
    padding: 26px;
}

.modal-wide {
    width: min(820px, 100%);
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    color: var(--text);
    background: var(--surface-soft);
    border-radius: var(--radius);
    cursor: pointer;
}

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

.legal-scroll {
    max-height: 380px;
    overflow: auto;
    padding-right: 12px;
}

.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1500;
    width: 100%;
    align-items: center;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 20px;
    padding: 14px max(20px, calc((100vw - 1180px) / 2 + 20px));
    color: #f9f4e8;
    background:
        linear-gradient(90deg, rgba(3, 28, 18, 0.98), rgba(30, 20, 12, 0.98) 46%, rgba(7, 10, 16, 0.98)),
        radial-gradient(circle at 12% 50%, rgba(201, 145, 74, 0.22), transparent 24rem);
    border-top: 1px solid rgba(240, 196, 119, 0.36);
    box-shadow: 0 -18px 48px rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(14px);
}

.cookie-banner.is-visible {
    display: grid;
}

.cookie-banner-inner {
    min-width: 0;
    display: grid;
    grid-template-columns: 50px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
}

.cookie-brand-mark {
    width: 50px;
    height: 50px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(240, 196, 119, 0.45);
    border-radius: 50%;
    background: #07100c;
    box-shadow: 0 0 24px rgba(201, 145, 74, 0.2);
}

.cookie-brand-mark img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.cookie-banner strong {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    line-height: 1.25;
    color: #a7f3bd;
    font-size: 0.98rem;
}

.cookie-banner p {
    margin: 4px 0 0;
    color: rgba(249, 244, 232, 0.82);
    max-width: 46rem;
    font-size: 0.9rem;
}

.cookie-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    flex-shrink: 0;
    max-width: none;
}

.cookie-actions button {
    white-space: nowrap;
    min-height: 40px;
    padding-inline: 14px;
}

.cookie-actions .btn-outline {
    color: #f9f4e8;
    border-color: rgba(240, 196, 119, 0.48);
    background: rgba(255, 255, 255, 0.04);
}

@media (max-width: 900px) {
    .cookie-banner {
        align-items: stretch;
        grid-template-columns: 1fr;
    }

    .cookie-actions {
        width: 100%;
        justify-content: stretch;
    }

    .cookie-actions button {
        flex: 1 1 150px;
    }
}

.user-menu {
    position: relative;
}

.user-menu-toggle {
    min-height: 38px;
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 4px 10px 4px 6px;
    cursor: pointer;
}

.user-menu-toggle img {
    width: 28px;
    height: 28px;
    object-fit: cover;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.user-menu-toggle span {
    max-width: 120px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 0.82rem;
}

.user-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 260px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: none;
    z-index: 1400;
}

.user-dropdown.is-open {
    display: block;
}

.user-dropdown-head {
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-dropdown-avatar {
    width: 42px;
    height: 42px;
    min-width: 42px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid rgba(201, 145, 74, 0.45);
    background: #f8fafc;
}

.user-dropdown-copy {
    display: grid;
    min-width: 0;
}

.user-dropdown-copy strong,
.user-dropdown-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-dropdown-head small {
    color: var(--muted);
}

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    padding: 10px 14px;
    border-top: 1px solid #f2f4f8;
    font-size: 0.9rem;
}

.user-dropdown a:hover {
    background: #f8fafc;
}

.notification-button {
    position: relative;
}

.notif-dot {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    display: grid;
    place-items: center;
}

.header-fade-zone {
    position: fixed;
    top: 63px;
    left: 0;
    right: 0;
    height: 52px;
    pointer-events: none;
    z-index: 950;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    background: linear-gradient(180deg, rgba(5, 11, 22, 0.78) 0%, rgba(5, 11, 22, 0.38) 55%, rgba(5, 11, 22, 0) 100%);
    mask-image: linear-gradient(180deg, #000 0%, #000 60%, transparent 100%);
}

.side-rails,
.static-side-rails {
    display: none;
    pointer-events: none;
}

.side-rail,
.static-side-rail {
    width: 190px;
    overflow: visible;
    z-index: 700;
    pointer-events: none;
}

.side-rail {
    position: fixed;
    top: var(--vh-rail-safe-top, 122px);
    bottom: 24px;
}

.static-side-rail {
    position: absolute;
    top: calc(var(--vh-rail-safe-top, 122px) + 210px);
    min-height: calc(100vh - var(--vh-rail-safe-top, 122px) - 240px);
    z-index: 650;
}

.side-rail-left,
.static-side-rail-left {
    left: 10px;
}

.side-rail-right,
.static-side-rail-right {
    right: 10px;
}

.rail-widget {
    position: relative;
    width: min(var(--widget-width, 190px), 100%);
    min-height: var(--widget-height, auto);
    margin-top: var(--widget-offset-top, 0);
    background: var(--widget-bg, rgba(255, 255, 255, 0.96));
    color: var(--widget-text, var(--text));
    border: 1px solid rgba(201, 145, 74, 0.24);
    border-radius: var(--radius);
    padding: 10px 12px;
    margin-bottom: 10px;
    box-shadow: var(--shadow);
    overflow: visible;
    transform-origin: center center;
    isolation: isolate;
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease, background 180ms ease;
    pointer-events: auto;
}

.rail-widget > * {
    position: relative;
    z-index: 1;
}

.side-rail-left .rail-widget,
.static-side-rail-left .rail-widget {
    margin-right: auto;
}

.side-rail-right .rail-widget,
.static-side-rail-right .rail-widget {
    margin-left: auto;
}

.rail-widget h4 {
    margin: 0 0 5px;
    font-size: 0.86rem;
    color: var(--widget-text, var(--text));
}

.rail-widget-image {
    width: 100%;
    display: block;
    border-radius: 6px;
    border: 1px solid rgba(17, 24, 39, 0.08);
    margin: 6px 0 8px;
}

.rail-widget-image:not([src]),
.rail-widget-image[src=""] {
    display: none;
}

.rail-widget-content {
    margin: 0;
    color: var(--widget-text, var(--text));
    font-size: 0.82rem;
    line-height: 1.45;
}

.rail-widget-content p,
.rail-widget-content ul,
.rail-widget-content ol {
    margin: 0 0 7px;
}

.rail-widget-content p:last-child,
.rail-widget-content ul:last-child,
.rail-widget-content ol:last-child {
    margin-bottom: 0;
}

.rail-widget-content a {
    color: var(--bronze-strong);
    text-decoration: underline;
}

.widget-close {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 8;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    color: #ffffff;
    background: rgba(5, 11, 22, 0.82);
    border: 1px solid rgba(201, 145, 74, 0.55);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
    cursor: pointer;
    opacity: 0;
    transform: translateY(-3px) scale(0.9);
    transition: opacity 160ms ease, transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.rail-widget:hover .widget-close,
.widget-close:focus-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.widget-close:hover {
    background: rgba(196, 59, 84, 0.92);
    border-color: rgba(255, 255, 255, 0.55);
}

.is-widget-dismissed {
    display: none !important;
}

.rail-border-none {
    border-color: transparent;
    box-shadow: none;
}

.rail-border-bronze-glow:hover {
    border-color: rgba(201, 145, 74, 0.82);
    box-shadow: 0 0 0 1px rgba(201, 145, 74, 0.28), 0 0 20px rgba(201, 145, 74, 0.36), var(--shadow);
}

.rail-border-circuit-scan::before,
.rail-border-terminal-dash::before,
.rail-border-lock-pulse::before,
.rail-border-academy-rays::before {
    content: "";
    position: absolute;
    inset: -1px;
    z-index: 0;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    transition: opacity 180ms ease;
}

.rail-border-circuit-scan::before {
    background: conic-gradient(from 0deg, rgba(42, 194, 188, 0), rgba(42, 194, 188, 0.75), rgba(201, 145, 74, 0.9), rgba(42, 194, 188, 0));
    padding: 1px;
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask-composite: exclude;
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
}

.rail-border-circuit-scan:hover::before {
    opacity: 1;
    animation: widgetBorderSpin 1.4s linear infinite;
}

.rail-border-terminal-dash::before {
    inset: -2px;
    border: 1px dashed rgba(42, 194, 188, 0.78);
    box-shadow: inset 0 0 12px rgba(42, 194, 188, 0.18);
}

.rail-border-terminal-dash:hover {
    border-color: rgba(42, 194, 188, 0.72);
    border-style: dashed;
}

.rail-border-terminal-dash:hover::before {
    opacity: 1;
    animation: widgetTerminalDash 1s linear infinite;
}

.rail-border-lock-pulse:hover {
    border-color: rgba(201, 145, 74, 0.86);
    animation: widgetLockPulse 1.45s ease-in-out infinite;
}

.rail-border-lock-pulse::before {
    border: 1px solid rgba(201, 145, 74, 0.42);
}

.rail-border-lock-pulse:hover::before {
    opacity: 1;
}

.rail-border-academy-rays::before {
    background:
        linear-gradient(90deg, transparent 0 16%, rgba(201, 145, 74, 0.95) 18%, transparent 24% 54%, rgba(42, 194, 188, 0.78) 56%, transparent 62%),
        linear-gradient(180deg, transparent 0 42%, rgba(255, 255, 255, 0.12) 48%, transparent 54%);
    background-size: 180% 100%, 100% 180%;
    padding: 1px;
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask-composite: exclude;
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
}

.rail-border-academy-rays:hover::before {
    opacity: 1;
    animation: widgetAcademyRays 1.2s linear infinite;
}

.rail-effect-glow {
    box-shadow: 0 0 0 1px rgba(201, 145, 74, 0.25), 0 0 14px rgba(201, 145, 74, 0.35), var(--shadow);
}

.rail-effect-pulse {
    animation: railPulse 2.6s ease-in-out infinite;
}

.rail-effect-float {
    animation: railFloat 3.2s ease-in-out infinite;
}

.rail-effect-glass {
    background: var(--widget-bg, rgba(255, 255, 255, 0.84));
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.rail-effect-neon {
    border-color: rgba(42, 194, 188, 0.65);
    box-shadow: 0 0 0 1px rgba(42, 194, 188, 0.3), 0 0 16px rgba(42, 194, 188, 0.32), var(--shadow);
}

@keyframes railPulse {
    0% { transform: translateY(0); box-shadow: var(--shadow); }
    50% { transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(201, 145, 74, 0.25), 0 0 14px rgba(201, 145, 74, 0.28), var(--shadow); }
    100% { transform: translateY(0); box-shadow: var(--shadow); }
}

@keyframes railFloat {
    0% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
    100% { transform: translateY(0); }
}

@keyframes widgetBorderSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes widgetTerminalDash {
    0% { clip-path: inset(0 0 0 0); }
    50% { clip-path: inset(0 2px 0 2px); }
    100% { clip-path: inset(0 0 0 0); }
}

@keyframes widgetLockPulse {
    0% { box-shadow: var(--shadow); }
    50% { box-shadow: 0 0 0 1px rgba(201, 145, 74, 0.38), 0 0 22px rgba(201, 145, 74, 0.44), var(--shadow); }
    100% { box-shadow: var(--shadow); }
}

@keyframes widgetAcademyRays {
    0% { background-position: 160% 0, 0 160%; }
    100% { background-position: -40% 0, 0 -40%; }
}

.widget-measure-studio {
    margin: 16px 0;
    border: 1px solid rgba(201, 145, 74, 0.28);
    border-radius: var(--radius);
    background: rgba(5, 11, 22, 0.54);
    padding: 14px;
}

#widgetForm {
    grid-column: 1 / -1;
}

.widget-measure-header {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 12px;
}

.widget-measure-header strong {
    color: var(--text);
}

.widget-measure-header p {
    margin: 4px 0 0;
}

.widget-measure-readout {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 7px;
    min-width: 220px;
}

.widget-measure-readout span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 1px solid rgba(201, 145, 74, 0.28);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.22);
    color: var(--text-soft);
    font-size: 0.76rem;
    padding: 5px 8px;
}

.widget-measure-readout strong {
    color: var(--bronze);
    font-variant-numeric: tabular-nums;
}

.widget-preview-stage {
    position: relative;
    min-height: 420px;
    display: grid;
    grid-template-columns: minmax(330px, 0.95fr) minmax(260px, 1fr) minmax(330px, 0.95fr);
    gap: 14px;
    padding: 72px 12px 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    background:
        linear-gradient(90deg, rgba(201, 145, 74, 0.08) 0, transparent 1px),
        linear-gradient(180deg, rgba(201, 145, 74, 0.08) 0, transparent 1px),
        rgba(2, 6, 14, 0.68);
    background-size: 24px 24px;
    overflow: hidden;
}

.widget-preview-fixed-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid rgba(201, 145, 74, 0.38);
    background: linear-gradient(180deg, #050b16 0%, #080d17 100%);
    color: rgba(248, 250, 252, 0.86);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    z-index: 2;
}

.widget-preview-rail {
    position: relative;
    min-height: 320px;
    border: 1px dashed rgba(201, 145, 74, 0.28);
    border-radius: 8px;
    padding: 8px;
}

.widget-preview-rail-left .widget-preview-card {
    margin-right: auto;
}

.widget-preview-rail-right .widget-preview-card {
    margin-left: auto;
}

.widget-preview-center {
    min-height: 320px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    color: rgba(248, 250, 252, 0.52);
    font-size: 0.82rem;
}

.widget-preview-card {
    position: relative;
    width: min(var(--widget-width, 190px), 320px);
    min-height: var(--widget-height, 128px);
    height: auto;
    margin-top: var(--widget-offset-top, 0);
    touch-action: none;
    user-select: none;
}

.widget-preview-card .widget-close {
    pointer-events: none !important;
}

.widget-preview-card.is-dragging {
    outline: 2px solid rgba(201, 145, 74, 0.76);
    outline-offset: 2px;
}

.widget-resize-handle {
    position: absolute;
    z-index: 4;
    border: 0;
    background: rgba(201, 145, 74, 0.92);
    box-shadow: 0 0 0 2px rgba(5, 11, 22, 0.95), 0 0 12px rgba(201, 145, 74, 0.5);
}

.widget-resize-top,
.widget-resize-bottom {
    left: 50%;
    width: 34px;
    height: 7px;
    border-radius: 999px;
    transform: translateX(-50%);
    cursor: ns-resize;
}

.widget-resize-top {
    top: -5px;
}

.widget-resize-bottom {
    bottom: -5px;
}

.widget-resize-left,
.widget-resize-right {
    top: 50%;
    width: 7px;
    height: 34px;
    border-radius: 999px;
    transform: translateY(-50%);
    cursor: ew-resize;
}

.widget-resize-left {
    left: -5px;
}

.widget-resize-right {
    right: -5px;
}

.widget-preview-card[data-side="left"] .widget-resize-left,
.widget-preview-card[data-side="right"] .widget-resize-right {
    display: none;
}

body.theme-light .widget-measure-studio {
    background: rgba(255, 255, 255, 0.88);
    border-color: #d9e1ea;
}

body.theme-light .widget-measure-readout span {
    background: #ffffff;
    border-color: #d0dae6;
    color: #0b0b0b;
}

body.theme-light .widget-preview-stage {
    background:
        linear-gradient(90deg, rgba(201, 145, 74, 0.11) 0, transparent 1px),
        linear-gradient(180deg, rgba(201, 145, 74, 0.11) 0, transparent 1px),
        #eef3f8;
    background-size: 24px 24px;
    border-color: #d0dae6;
}

body.theme-light .widget-preview-rail {
    border-color: #c6d0dc;
}

body.theme-light .widget-preview-center {
    background: rgba(255, 255, 255, 0.68);
    border-color: #d0dae6;
    color: #334155;
}

@media (max-width: 960px) {
    .widget-measure-header {
        display: block;
    }

    .widget-measure-readout {
        justify-content: flex-start;
        margin-top: 10px;
    }

    .widget-preview-stage {
        grid-template-columns: 1fr;
        min-height: 720px;
    }

    .widget-preview-rail {
        min-height: 220px;
    }

    .widget-preview-center {
        min-height: 120px;
        order: 2;
    }
}

body.theme-light .rail-effect-glass {
    background: var(--widget-bg, rgba(255, 255, 255, 0.95));
}

body.theme-light {
    --page-bg: #f5f7fb;
    --page-overlay: linear-gradient(180deg, #f5f7fb 0%, #ffffff 55%, #eef3f8 100%);
    --text: #000000;
    --text-soft: #111827;
    --muted: #1f2937;
}

body.theme-light .hero,
body.theme-light .page-hero,
body.theme-light .dashboard-title {
    color: #0b0b0b;
}

body.theme-light .page-hero.image-page-hero,
body.theme-light .page-hero.image-page-hero h1 {
    color: #ffffff;
}

body.theme-light .hero p,
body.theme-light .page-hero p,
body.theme-light .dashboard-title p {
    color: #111827;
}

body.theme-light .page-hero.image-page-hero p {
    color: rgba(248, 250, 252, 0.9);
}

body.theme-light .dashboard-shell > .container > .section-header h1,
body.theme-light .dashboard-shell > .container > .section-header h2 {
    color: #0b0b0b;
}

body.theme-light .dashboard-shell > .container > .section-header p {
    color: #111827;
}

body.theme-light .logo-showcase,
body.theme-light .metric {
    background: #ffffff;
    border-color: #d9e1ea;
}

body.theme-light .metric strong,
body.theme-light .metric span {
    color: #0b0b0b;
}

body.theme-light .content p,
body.theme-light .content li,
body.theme-light .dashboard-panel p,
body.theme-light .dashboard-panel li,
body.theme-light .course-card p,
body.theme-light .card p,
body.theme-light .timeline-item p,
body.theme-light .event-row p,
body.theme-light .section-header p,
body.theme-light .muted,
body.theme-light .course-meta,
body.theme-light .dashboard-meta {
    color: #0b0b0b;
}

body.theme-light main > .section:not(.content) > .container > .section-header h2,
body.theme-light main > .section:not(.content) .content-block h2 {
    color: #0b0b0b;
    text-shadow: none;
}

body.theme-light main > .section:not(.content) > .container > .section-header p,
body.theme-light main > .section:not(.content) .content-block p {
    color: #111827;
}

body.theme-light .course-program-page > .section.content {
    background: rgba(255, 255, 255, 0.9);
    border-top-color: rgba(217, 225, 234, 0.9);
    border-bottom-color: rgba(217, 225, 234, 0.7);
}

body.theme-light .course-program-page > .section:not(.content) .section-header h2,
body.theme-light .course-program-page > .section.content .section-header h2,
body.theme-light .course-program-page .course-overview-layout > article > h2 {
    color: #0b0b0b;
    text-shadow: none;
}

body.theme-light .course-program-page > .section:not(.content) .section-header p,
body.theme-light .course-program-page > .section.content .section-header p,
body.theme-light .course-program-page .course-overview-layout > article > p,
body.theme-light .course-program-page .course-overview-layout > article > .module-list li {
    color: #111827;
}

body.theme-light .auto-renew-corner {
    color: #b91c1c;
    background: #fff1f2;
    border-color: #fecdd3;
}

body.theme-light .auto-renew-form label {
    color: #0b0b0b;
}

body.theme-light .vh-check {
    background: #ffffff;
}

body.theme-light .badge-danger {
    background: #fff1f2;
    color: #b91c1c;
}

body.theme-light .course-anchor-nav a {
    color: #0b0b0b;
    background: #ffffff;
    border-color: #d0dae6;
}

body.theme-light .course-anchor-nav a:hover {
    color: #ffffff;
    background: #111827;
    border-color: #111827;
}

body.theme-light .site-footer,
body.theme-light .site-footer p,
body.theme-light .site-footer a,
body.theme-light .site-footer h4,
body.theme-light .footer-bottom {
    color: rgba(248, 250, 252, 0.82);
}

.site-footer {
    color: rgba(248, 250, 252, 0.82);
    background: #050b16;
    border-top: 1px solid rgba(201, 145, 74, 0.26);
    padding: 48px 0 24px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 28px;
}

.footer-brand img {
    width: min(360px, 100%);
    display: block;
    margin-bottom: 10px;
}

.site-footer h4 {
    color: #ffffff;
    margin: 0 0 12px;
}

.site-footer a,
.footer-link {
    display: block;
    width: fit-content;
    margin: 7px 0;
    color: rgba(248, 250, 252, 0.76);
    background: transparent;
    padding: 0;
    cursor: pointer;
}

.site-footer a:hover,
.footer-link:hover {
    color: var(--bronze);
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 22px;
    justify-content: space-between;
    margin-top: 34px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.9rem;
}

.irc-layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr) 280px;
    gap: 14px;
}

.irc-layout.irc-hybrid-layout {
    grid-template-columns: 260px minmax(0, 1fr) 320px;
    align-items: stretch;
}

.irc-card {
    background: #0b1220;
    color: #d5def0;
    border: 1px solid #253a58;
    border-radius: var(--radius);
    padding: 12px;
    box-shadow: var(--shadow);
}

.irc-card h3 {
    margin: 0 0 10px;
    color: #f4f7ff;
    font-size: 0.95rem;
}

.irc-public-meta {
    display: grid;
    gap: 8px;
    margin: 0 0 12px;
}

.irc-public-meta div {
    display: grid;
    gap: 2px;
    padding: 8px;
    border: 1px solid #233a5a;
    border-radius: var(--radius);
    background: #091321;
}

.irc-public-meta dt {
    color: #7fa4d2;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.irc-public-meta dd {
    margin: 0;
    color: #f4f7ff;
    overflow-wrap: anywhere;
}

.irc-warning-list,
.irc-privacy-note {
    border: 1px solid rgba(245, 203, 133, 0.28);
    border-radius: var(--radius);
    background: rgba(245, 203, 133, 0.08);
    color: #f7ddb3;
    padding: 9px 10px;
    font-size: 0.84rem;
}

.irc-warning-list {
    display: grid;
    gap: 6px;
    margin-bottom: 12px;
}

.irc-warning-list p,
.irc-privacy-note {
    margin: 0;
}

.irc-side {
    display: grid;
    align-content: start;
    gap: 10px;
}

.irc-channel-list {
    display: grid;
    gap: 6px;
    margin-bottom: 10px;
}

.irc-channel-btn {
    text-align: left;
    border: 1px solid #2f4360;
    border-radius: var(--radius);
    background: #101a2c;
    color: #f5cb85;
    padding: 7px 8px;
    cursor: pointer;
}

.irc-channel-btn.is-active {
    background: #23324b;
    color: #fff;
}

.irc-mini-form,
.irc-form {
    display: grid;
    gap: 8px;
}

.irc-mini-form input,
.irc-mini-form select,
.irc-form input,
.irc-form select {
    border: 1px solid #334f73;
    background: #091321;
    color: #dce7fb;
    border-radius: var(--radius);
    min-height: 34px;
    padding: 7px 9px;
}

.irc-mini-form textarea,
.irc-form textarea {
    border: 1px solid #334f73;
    background: #091321;
    color: #dce7fb;
    border-radius: var(--radius);
    min-height: 118px;
    padding: 8px 9px;
    resize: vertical;
}

.private-message-form {
    margin-top: 2px;
}

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

.irc-main-head strong {
    color: #fff;
    font-size: 1.1rem;
}

.irc-presence {
    display: flex;
    align-items: center;
    gap: 8px;
}

.irc-presence .check-row {
    margin: 0;
    color: #d5def0;
}

.irc-presence input[type="text"] {
    width: 180px;
    border: 1px solid #334f73;
    background: #091321;
    color: #dce7fb;
    border-radius: var(--radius);
    min-height: 32px;
    padding: 6px 8px;
}

.irc-messages {
    height: 420px;
    overflow: auto;
    background: #050a14;
    border: 1px solid #1f3452;
    border-radius: var(--radius);
    padding: 10px;
    margin-bottom: 10px;
}

.irc-webchat-card {
    min-height: 620px;
}

.irc-webchat-shell {
    height: 560px;
    overflow: hidden;
    border: 1px solid #1f3452;
    border-radius: var(--radius);
    background: #050a14;
}

.irc-webchat-frame {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background: #050a14;
}

.chat-status-line {
    min-height: 22px;
    color: #9fb4d2;
    font-size: 0.82rem;
}

.chat-status-line.is-ok {
    color: #72dc9f;
}

.chat-status-line.is-error {
    color: #fecdd3;
}

.friend-recipient-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.friend-recipient-btn {
    border: 1px solid #334f73;
    border-radius: var(--radius);
    background: #101a2c;
    color: #dce7fb;
    min-height: 32px;
    padding: 6px 9px;
    cursor: pointer;
}

.friend-recipient-btn:hover {
    border-color: #f5cb85;
    color: #f5cb85;
}

.irc-message {
    border-bottom: 1px solid #16263d;
    padding: 7px 0;
    font-family: "Courier New", monospace;
    font-size: 0.9rem;
}

.irc-message:last-child {
    border-bottom: 0;
}

.irc-meta {
    color: #7fa4d2;
    font-size: 0.76rem;
}

.irc-user {
    font-weight: 700;
    margin-right: 6px;
}

.irc-delete {
    margin-left: 8px;
    min-height: 24px;
    padding: 2px 7px;
    border-radius: 5px;
    color: #fecdd3;
    background: rgba(196, 59, 84, 0.18);
    border: 1px solid rgba(248, 113, 113, 0.36);
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 800;
    cursor: pointer;
}

.irc-delete:hover {
    color: #ffffff;
    background: rgba(196, 59, 84, 0.65);
}

.tone-amber .irc-user { color: #f5cb85; }
.tone-green .irc-user { color: #72dc9f; }
.tone-cyan .irc-user { color: #7de6ef; }
.tone-violet .irc-user { color: #c5b4ff; }

@media (max-width: 1180px) {
    body {
        padding-top: 120px;
    }

    .header-inner {
        min-height: 76px;
        grid-template-columns: auto auto auto;
        gap: 12px;
    }

    .brand-logo {
        width: 300px;
    }

    .main-header.is-scrolled .brand-logo {
        width: 255px;
    }

    .mobile-menu-toggle {
        display: inline-flex;
        order: 3;
        width: 38px;
        min-width: 38px;
        padding-inline: 0;
    }

    .main-nav {
        position: fixed;
        top: 120px;
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 16px 20px 22px;
        background: var(--header-bg-strong);
        border-bottom: 1px solid rgba(201, 145, 74, 0.28);
    }

    body.menu-open .main-nav {
        display: flex;
    }

    .main-nav a {
        padding: 13px 14px;
    }

    .nav-actions {
        margin-left: auto;
    }

    .hero-grid,
    .split,
    .login-layout,
    .register-layout,
    .contact-layout,
    .dashboard-top,
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .course-grid,
    .card-grid,
    .toolkit-grid,
    .stats-band,
    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .glossary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .course-week-grid,
    .curriculum-lesson-grid {
        grid-template-columns: 1fr;
    }

    .irc-layout {
        grid-template-columns: 1fr;
    }

    .irc-webchat-card {
        min-height: 540px;
    }

    .irc-webchat-shell {
        height: 480px;
    }
}

@media (max-width: 720px) {
    body {
        padding-top: 132px;
    }

    .container {
        width: min(100% - 28px, 1180px);
    }

    .header-inner {
        min-height: 70px;
        gap: 6px;
    }

    .main-header.is-scrolled .header-inner { min-height: 60px; }

    .production-notice {
        min-height: 62px;
        font-size: 0.76rem;
    }

    .production-notice-inner {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
        padding-block: 7px;
    }

    .brand {
        min-width: 0;
    }

    .brand-logo {
        width: 210px;
        max-height: 52px;
    }

    .main-header.is-scrolled .brand-logo {
        width: 184px;
    }

    .brand-logo[src=""] {
        display: none;
    }

    .main-nav {
        top: 132px;
    }

    .user-menu-toggle span { display: none; }

    .nav-actions {
        gap: 5px;
    }

    .language-dropdown {
        right: -12px;
    }

    .header-control,
    .header-icon-action,
    .language-toggle,
    .theme-switch {
        width: 34px;
        height: 34px;
        min-width: 34px;
        min-height: 34px;
    }

    .mobile-menu-toggle {
        width: 36px;
        min-width: 36px;
        min-height: 36px;
    }

    .header-control::after,
    .header-icon-action::after {
        display: none;
    }

    .hero {
        min-height: auto;
        padding-top: 38px;
    }

    .hero-grid,
    .hero-metrics,
    .metrics-grid,
    .course-grid,
    .toolkit-grid,
    .course-week-grid,
    .glossary-grid,
    .curriculum-lesson-grid,
    .card-grid,
    .stats-band,
    .footer-grid,
    .checkbox-group {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 52px 0;
    }

    .course-hero-cover figcaption {
        left: 10px;
        right: 10px;
        bottom: 10px;
        padding: 10px;
    }

    .section-header {
        display: block;
    }

    .toolkit-block-header,
    .toolkit-resource-callout {
        display: grid;
    }

    .toolkit-nav {
        display: grid;
    }

    .verify-form {
        grid-template-columns: 1fr;
    }

    .lesson-item {
        grid-template-columns: 42px minmax(0, 1fr);
    }

    .lesson-item .btn-outline,
    .lesson-item .btn-primary {
        grid-column: 1 / -1;
        width: 100%;
    }

    .avatar-picker {
        grid-template-columns: 1fr;
    }

    .cookie-banner {
        align-items: stretch;
        grid-template-columns: 1fr;
        right: 14px;
        bottom: 14px;
        width: calc(100% - 28px);
    }

    .cookie-actions {
        width: 100%;
        max-width: none;
        justify-content: stretch;
    }

    .cookie-actions button {
        flex: 1 1 150px;
    }

    .irc-webchat-card {
        min-height: 460px;
    }

    .irc-webchat-shell {
        height: 400px;
    }
}

@media (max-width: 380px) {
    .container {
        width: min(100% - 20px, 1180px);
    }

    .header-inner {
        gap: 5px;
    }

    .brand-logo {
        width: 148px;
    }

    .main-header.is-scrolled .brand-logo {
        width: 136px;
    }

    .nav-actions {
        gap: 3px;
    }

    .header-control,
    .header-icon-action,
    .language-toggle,
    .theme-switch {
        width: 30px;
        height: 30px;
        min-width: 30px;
        min-height: 30px;
        font-size: 0.8rem;
    }

    .language-flag {
        font-size: 0.95rem;
    }

    .language-flag-img {
        width: 19px;
        height: 19px;
    }

    .mobile-menu-toggle {
        width: 32px;
        min-width: 32px;
        min-height: 32px;
        font-size: 0.86rem;
    }
}

@media (min-width: 1200px) {
    body {
        padding-left: clamp(165px, calc((100vw - 980px) / 2 + 10px), 360px);
        padding-right: clamp(165px, calc((100vw - 980px) / 2 + 10px), 360px);
    }

    .container {
        width: min(980px, calc(100% - 40px));
    }

    .side-rails,
    .static-side-rails {
        display: block;
    }

    .side-rail,
    .static-side-rail {
        width: clamp(145px, calc((100vw - 980px) / 2 - 24px), 320px);
    }
}
