/* ============================================================
   quantrading.space — minimalist theme
   ============================================================ */

:root {
    --bg: #fcfcfb;
    --surface: #f5f5f2;
    --surface-2: #efefea;
    --fg: #18181b;
    --fg-soft: #3f3f46;
    --muted: #71717a;
    --accent: #2f6df6;
    --accent-soft: rgba(47, 109, 246, 0.10);
    --line: #e8e8e2;
    --line-strong: #d8d8d0;
    --code-bg: #f5f5f2;
    --shadow: 0 1px 2px rgba(24, 24, 27, 0.04), 0 12px 32px rgba(24, 24, 27, 0.06);

    --maxw: 44rem;
    --radius: 12px;
    --radius-sm: 8px;

    --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0e1014;
        --surface: #181b21;
        --surface-2: #1f232b;
        --fg: #e9e9e6;
        --fg-soft: #c4c8d0;
        --muted: #8b919c;
        --accent: #7aa2f7;
        --accent-soft: rgba(122, 162, 247, 0.14);
        --line: #262a31;
        --line-strong: #323741;
        --code-bg: #161920;
        --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 16px 40px rgba(0, 0, 0, 0.4);
    }
}

* { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--fg);
    font-family: var(--font-sans);
    font-size: 17px;
    line-height: 1.72;
    letter-spacing: -0.011em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

::selection {
    background: var(--accent-soft);
    color: var(--fg);
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 3px;
}

.site-header,
.content,
.site-footer {
    max-width: var(--maxw);
    margin: 0 auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

/* ---------- Header ---------- */
.site-header {
    padding-top: 3.5rem;
    padding-bottom: 1.75rem;
}

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

.site-title {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    transition: opacity 0.15s ease;
}

.site-title:hover { opacity: 0.82; }

.site-logo {
    display: block;
    height: 5.5rem;
    width: auto;
}

.site-tagline {
    margin: 0.55rem 0 0;
    color: var(--muted);
    font-size: 0.97rem;
    max-width: 38rem;
}

/* ---------- Navigation ---------- */
.site-nav {
    margin-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
    border-top: 1px solid var(--line);
    padding-top: 1.1rem;
}

.nav-link {
    color: var(--fg-soft);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    padding: 0.3rem 0.6rem;
    border-radius: 7px;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease;
}

.nav-link:hover {
    color: var(--fg);
    background: var(--surface);
}

.nav-item { position: relative; }

/* Invisible bridge so the mouse can cross the gap between the link and the
   dropdown without the menu closing. */
.nav-item::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 0.6rem;
    display: none;
}
.nav-item:hover::after,
.nav-item:focus-within::after { display: block; }

.nav-section {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
}

.caret { font-size: 0.62em; color: var(--muted); transition: transform 0.15s ease; }
.nav-item:hover .caret { transform: translateY(1px); }

.nav-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0.4rem;
    min-width: 280px;
    max-width: 360px;
    max-height: 70vh;
    overflow-y: auto;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0.5rem;
    display: none;
    z-index: 50;
    box-shadow: var(--shadow);
}

.nav-item:hover .nav-dropdown,
.nav-item:focus-within .nav-dropdown { display: block; }

.nav-dropdown a {
    display: block;
    padding: 0.5rem 0.7rem;
    color: var(--fg-soft);
    text-decoration: none;
    font-size: 0.86rem;
    line-height: 1.4;
    border-radius: var(--radius-sm);
    transition: background 0.12s ease, color 0.12s ease;
}

.nav-dropdown a:hover { background: var(--surface); color: var(--fg); }

.section-header { margin-bottom: 1.75rem; }

@media (max-width: 600px) {
    .nav-dropdown {
        position: static;
        max-height: none;
        box-shadow: none;
        min-width: 0;
        margin-top: 0.25rem;
        border: none;
        border-left: 2px solid var(--line);
        border-radius: 0;
        padding: 0.25rem 0 0.25rem 0.5rem;
    }
    .nav-item { width: 100%; }
}

/* ---------- Home intro ---------- */
.home-intro {
    padding: 0 0 2rem;
    margin-bottom: 2.25rem;
    border-bottom: 1px solid var(--line);
}

.home-intro p {
    margin: 0 0 1.1rem;
    font-size: 1.18rem;
    line-height: 1.6;
    color: var(--fg-soft);
    letter-spacing: -0.014em;
}

.home-intro-cta {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    flex-wrap: wrap;
    font-size: 1rem;
}

.home-intro-link { color: var(--muted); font-size: 0.92rem; text-decoration: none; }
.home-intro-link:hover { color: var(--fg); }

/* ---------- Post list ---------- */
.post-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.post-item {
    padding: 1.6rem 0;
    border-top: 1px solid var(--line);
}

.post-item:first-child {
    border-top: none;
    padding-top: 0;
}

.post-date {
    display: block;
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.post-item-title {
    margin: 0.45rem 0 0.55rem;
    font-size: 1.42rem;
    font-weight: 650;
    line-height: 1.28;
    letter-spacing: -0.022em;
}

.post-item-title a {
    color: var(--fg);
    text-decoration: none;
    transition: color 0.15s ease;
}

.post-item-title a:hover { color: var(--accent); }

.post-excerpt {
    margin: 0 0 0.75rem;
    color: var(--muted);
    line-height: 1.6;
}

.read-more {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--accent);
    text-decoration: none;
}

.read-more:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Single post ---------- */
.post-header { margin-bottom: 2.25rem; }

.post-meta {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.post-meta .post-date { display: inline; }
.post-meta .dot { opacity: 0.5; }

.post-title {
    margin: 0.5rem 0 0;
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.post-body { font-size: 1.06rem; color: var(--fg-soft); }

.post-body > p:first-of-type { color: var(--fg); }

.post-body h2 {
    margin-top: 2.6rem;
    margin-bottom: 0.7rem;
    font-size: 1.5rem;
    font-weight: 650;
    letter-spacing: -0.02em;
    color: var(--fg);
    scroll-margin-top: 1.5rem;
}

.post-body h3 {
    margin-top: 2rem;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: -0.015em;
    color: var(--fg);
}

.post-body p { margin: 1.05rem 0; }

.post-body ul, .post-body ol { padding-left: 1.3rem; }
.post-body li { margin: 0.35rem 0; }
.post-body li::marker { color: var(--muted); }

.post-body a {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent);
    text-underline-offset: 2.5px;
    transition: text-decoration-color 0.15s ease;
}

.post-body a:hover { text-decoration-color: var(--accent); }

.post-body img { max-width: 100%; height: auto; border-radius: var(--radius-sm); }

.post-body strong { color: var(--fg); font-weight: 650; }

.post-body blockquote {
    margin: 1.6rem 0;
    padding: 0.5rem 0 0.5rem 1.3rem;
    border-left: 3px solid var(--accent);
    color: var(--muted);
    font-style: italic;
}

.post-body blockquote p { margin: 0.3rem 0; }

/* Inline + block code */
.post-body code {
    background: var(--surface);
    padding: 0.14em 0.4em;
    border-radius: 5px;
    font-family: var(--font-mono);
    font-size: 0.85em;
    color: var(--fg);
}

.post-body pre {
    background: var(--code-bg);
    border: 1px solid var(--line);
    padding: 1.1rem 1.3rem;
    border-radius: var(--radius);
    overflow-x: auto;
    line-height: 1.6;
    margin: 1.5rem 0;
}

.post-body pre code {
    background: none;
    padding: 0;
    font-size: 0.84rem;
    color: var(--fg-soft);
}

/* Tables */
.post-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.6rem 0;
    font-size: 0.9rem;
    display: block;
    overflow-x: auto;
}

.post-body thead th {
    text-align: left;
    background: var(--surface);
    border-bottom: 1px solid var(--line-strong);
    padding: 0.6rem 0.8rem;
    font-weight: 600;
    color: var(--fg);
    white-space: nowrap;
}

.post-body tbody td {
    border-bottom: 1px solid var(--line);
    padding: 0.6rem 0.8rem;
    vertical-align: top;
}

.post-body tbody tr:last-child td { border-bottom: none; }
.post-body tbody tr:hover td { background: var(--surface); }

hr {
    border: none;
    border-top: 1px solid var(--line);
    margin: 2.75rem 0;
}

/* Tags */
.post-tags {
    margin-top: 2.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    font-family: var(--font-mono);
    font-size: 0.76rem;
    color: var(--muted);
    background: var(--surface);
    border: 1px solid var(--line);
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
}

.back-link { margin-top: 3rem; font-size: 0.9rem; }
.back-link a { color: var(--muted); text-decoration: none; }
.back-link a:hover { color: var(--accent); }

.empty { color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer {
    margin-top: 4.5rem;
    padding-top: 2rem;
    padding-bottom: 3.5rem;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.85rem;
}

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

.site-footer-brand { display: inline-block; margin-bottom: 1rem; transition: opacity 0.15s ease; }
.site-footer-brand:hover { opacity: 0.82; }
.site-footer-brand img { display: block; height: 3rem; width: auto; }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
    font: inherit;
    font-size: 0.9rem;
    font-weight: 550;
    cursor: pointer;
    display: inline-block;
    text-decoration: none;
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--accent);
    background: var(--accent);
    color: #fff;
    transition: filter 0.15s ease, transform 0.1s ease;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.6; cursor: default; }
.btn-ghost {
    background: transparent;
    color: var(--fg);
    border-color: var(--line-strong);
}
.btn-ghost:hover { background: var(--surface); filter: none; }

/* ============================================================
   Email capture modal
   ============================================================ */
.email-modal {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
}
.email-modal.show { display: flex; }

.email-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(12, 14, 18, 0.55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    animation: email-fade 0.25s ease;
}

.email-modal-card {
    position: relative;
    width: 100%;
    max-width: 26rem;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 2rem 1.9rem 1.9rem;
    box-shadow: var(--shadow);
    animation: email-pop 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.email-modal-x {
    position: absolute;
    top: 0.7rem;
    right: 0.8rem;
    border: none;
    background: none;
    color: var(--muted);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.2rem 0.4rem;
    border-radius: 6px;
    transition: background 0.15s ease, color 0.15s ease;
}
.email-modal-x:hover { background: var(--surface); color: var(--fg); }

.email-modal-eyebrow {
    margin: 0 0 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
}

.email-modal-title {
    margin: 0 0 0.45rem;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

.email-modal-sub {
    margin: 0 0 1.4rem;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.55;
}

.email-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.email-form-row {
    display: flex;
    gap: 0.5rem;
}

.email-input {
    flex: 1;
    min-width: 0;
    font: inherit;
    font-size: 0.95rem;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--fg);
    transition: border-color 0.15s ease, background 0.15s ease;
}
.email-input::placeholder { color: var(--muted); }
.email-input:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--bg);
}

.email-submit { flex-shrink: 0; }

.email-msg {
    margin: 0.7rem 0 0;
    font-size: 0.85rem;
    min-height: 1em;
    color: var(--muted);
}
.email-msg.error { color: #dc2626; }

.email-success {
    margin: 0.5rem 0;
    font-size: 1rem;
    color: var(--fg);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.email-success-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: #16a34a;
    color: #fff;
    font-size: 0.85rem;
    flex-shrink: 0;
}

@keyframes email-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes email-pop {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 600px) {
    .qt-dash-top { grid-template-columns: repeat(2, 1fr); }
    .post-title { font-size: 1.85rem; }
    .site-header { padding-top: 2.5rem; }
    body { font-size: 16px; }
    .email-form-row { flex-direction: column; }
    .email-submit { width: 100%; }
}

/* ============================================================
   Course, course access, lessons & coaching
   ============================================================ */

/* Wide layout for course/coaching pages */
.content.wide { max-width: 62rem; }

/* Header account area + accent nav */
.site-account {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}
.account-pill {
    color: var(--fg);
    text-decoration: none;
    font-weight: 550;
    padding: 0.3rem 0.75rem;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    transition: background 0.15s ease, border-color 0.15s ease;
    white-space: nowrap;
    max-width: 12rem;
    overflow: hidden;
    text-overflow: ellipsis;
}
.account-pill:hover { background: var(--surface); border-color: var(--accent); }
.account-out { color: var(--muted); text-decoration: none; }
.account-out:hover { color: var(--fg); }

.nav-link-accent { color: var(--accent); font-weight: 600; }
.nav-link-accent:hover { color: var(--accent); }

/* Shared bits */
.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--accent);
    margin: 0 0 0.6rem;
}
.btn-lg { padding: 0.8rem 1.6rem; font-size: 1rem; }
.btn-block { display: block; width: 100%; text-align: center; }

.alert {
    padding: 0.8rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.92rem;
    margin: 0 0 1.1rem;
    border: 1px solid var(--line-strong);
}
.alert-error { background: rgba(220, 38, 38, 0.08); border-color: rgba(220, 38, 38, 0.35); color: #b91c1c; }
.alert-success { background: rgba(22, 163, 74, 0.08); border-color: rgba(22, 163, 74, 0.35); color: #15803d; }
@media (prefers-color-scheme: dark) {
    .alert-error { color: #fca5a5; }
    .alert-success { color: #86efac; }
}

.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li {
    position: relative;
    padding-left: 1.7rem;
    margin: 0.6rem 0;
    color: var(--fg-soft);
}
.checklist li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--accent);
    font-weight: 700;
}

/* ---------- Auth ---------- */
.auth-wrap { display: flex; justify-content: center; padding: 1rem 0 3rem; }
.auth-card {
    width: 100%;
    max-width: 26rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.75rem;
    box-shadow: var(--shadow);
}
.auth-tabs {
    display: flex;
    gap: 0.25rem;
    background: var(--surface-2);
    border-radius: 999px;
    padding: 0.25rem;
    margin-bottom: 1.5rem;
}
.auth-tab {
    flex: 1;
    text-align: center;
    text-decoration: none;
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 550;
    padding: 0.45rem 0.5rem;
    border-radius: 999px;
}
.auth-tab.is-active { background: var(--bg); color: var(--fg); box-shadow: var(--shadow); }
.auth-title { margin: 0 0 0.35rem; font-size: 1.5rem; letter-spacing: -0.02em; }
.auth-sub { margin: 0 0 1.4rem; color: var(--muted); font-size: 0.92rem; }
.auth-form { display: flex; flex-direction: column; gap: 1rem; }
.auth-alt { margin: 1.25rem 0 0; text-align: center; color: var(--muted); font-size: 0.88rem; }
.auth-alt a { color: var(--accent); }

.field { display: flex; flex-direction: column; gap: 0.35rem; }
.field > span { font-size: 0.82rem; font-weight: 550; color: var(--fg-soft); }
.field input,
.field select,
.field textarea {
    font: inherit;
    font-size: 0.95rem;
    width: 100%;
    padding: 0.65rem 0.8rem;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--fg);
}
.field textarea { resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ---------- Course landing ---------- */
.course-hero { text-align: center; padding: 1rem 0 2.5rem; border-bottom: 1px solid var(--line); }
.course-hero h1 { margin: 0 0 0.75rem; font-size: 2.4rem; letter-spacing: -0.03em; line-height: 1.1; }
.course-hero-sub { max-width: 38rem; margin: 0 auto 1.75rem; color: var(--fg-soft); font-size: 1.08rem; }
.course-cta { display: flex; flex-direction: column; align-items: center; gap: 0.85rem; }
.course-cta form { margin: 0; }
.course-price { font-size: 1.3rem; font-weight: 650; color: var(--fg); }
.course-price span { display: block; font-size: 0.8rem; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.course-cta-note { margin: 0; font-size: 0.85rem; color: var(--muted); }
.course-cta-note a { color: var(--accent); }
.course-notice { max-width: 32rem; margin: 0 auto 1.5rem; }
.paywall-secure { margin: 0.85rem 0 0; font-size: 0.8rem; color: var(--muted); }

/* Checkout result */
.checkout-result { padding: 1.5rem 0 2.5rem; }
.checkout-sub { margin: 1rem 0 0 !important; font-size: 0.88rem; }
.checkout-sub a { color: var(--accent); }
.apply-success-icon.checkout-pending { background: var(--muted); }

.course-progress { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; width: 100%; max-width: 22rem; }
.course-progress-bar { width: 100%; height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.course-progress-bar span { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width 0.3s ease; }
.course-progress-label { font-size: 0.82rem; color: var(--muted); }

.course-outcomes { padding: 2.5rem 0; border-bottom: 1px solid var(--line); }
.course-outcomes h2 { margin: 0 0 1.1rem; font-size: 1.5rem; letter-spacing: -0.02em; }

/* Curriculum */
.curriculum { padding: 2.5rem 0; }
.curriculum-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.curriculum-head h2 { margin: 0; font-size: 1.5rem; letter-spacing: -0.02em; }
.curriculum-meta { margin: 0; color: var(--muted); font-size: 0.85rem; }

.module {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    margin-bottom: 1rem;
    overflow: hidden;
    background: var(--surface);
}
.module-head { padding: 1.1rem 1.25rem 0.5rem; }
.module-head h3 { margin: 0 0 0.3rem; font-size: 1.12rem; display: flex; align-items: center; gap: 0.6rem; }
.module-num {
    display: inline-flex; align-items: center; justify-content: center;
    width: 1.7rem; height: 1.7rem; flex-shrink: 0;
    background: var(--accent); color: #fff; border-radius: 50%;
    font-size: 0.85rem; font-weight: 600;
}
.module-summary { margin: 0; color: var(--muted); font-size: 0.9rem; }
.lesson-list { list-style: none; margin: 0.75rem 0 0; padding: 0; border-top: 1px solid var(--line); }
.lesson-row { border-bottom: 1px solid var(--line); }
.lesson-row:last-child { border-bottom: none; }
.lesson-link {
    display: flex; align-items: center; gap: 0.85rem;
    padding: 0.75rem 1.25rem;
    text-decoration: none; color: var(--fg);
}
a.lesson-link:hover { background: var(--surface-2); }
.lesson-state {
    display: inline-flex; align-items: center; justify-content: center;
    width: 1.5rem; height: 1.5rem; flex-shrink: 0;
    border-radius: 50%; font-size: 0.78rem; font-weight: 600;
    background: var(--surface-2); color: var(--muted);
}
.lesson-row.is-done .lesson-state { background: #16a34a; color: #fff; }
.lesson-row.is-locked .lesson-link { color: var(--muted); cursor: default; }
.lesson-row.is-locked .lesson-state { background: transparent; font-size: 0.95rem; }
.lesson-title { flex: 1; font-size: 0.95rem; }
.lesson-min { color: var(--muted); font-size: 0.78rem; flex-shrink: 0; }

.course-foot-cta {
    text-align: center;
    padding: 2.5rem 1.5rem;
    margin-top: 1rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.course-foot-cta h2 { margin: 0 0 0.5rem; letter-spacing: -0.02em; }
.course-foot-cta p { color: var(--muted); margin: 0 0 1.25rem; }
.course-foot-cta form { margin: 0; }
.course-foot-coaching { margin-top: 1.1rem !important; font-size: 0.88rem; }
.course-foot-coaching a { color: var(--accent); }

/* ---------- Paywall ---------- */
.paywall { text-align: center; padding: 1rem 0 3rem; }
.paywall > h1 { margin: 0.3rem 0 1.75rem; letter-spacing: -0.02em; }
.paywall-lock {
    max-width: 28rem; margin: 0 auto;
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 2rem 1.75rem; box-shadow: var(--shadow);
}
.paywall-lock-icon { font-size: 2rem; display: block; margin-bottom: 0.75rem; }
.paywall-lock p { margin: 0.4rem 0; color: var(--fg-soft); }
.paywall-price { font-weight: 650; color: var(--fg) !important; margin-bottom: 1.25rem !important; }
.paywall-lock form { margin: 0 0 1rem; }
.paywall-back a { color: var(--muted); font-size: 0.88rem; }

/* ---------- Lesson viewer ---------- */
.lesson-top {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem; font-size: 0.85rem; margin-bottom: 1.5rem;
    padding-bottom: 0.85rem; border-bottom: 1px solid var(--line);
}
.lesson-top a { color: var(--muted); text-decoration: none; }
.lesson-top a:hover { color: var(--fg); }
.lesson-counter { color: var(--muted); }
.lesson-header { margin-bottom: 2rem; }
.lesson-header h1 { margin: 0.3rem 0 0.5rem; font-size: 2rem; letter-spacing: -0.03em; line-height: 1.15; }
.lesson-meta { color: var(--muted); font-size: 0.88rem; margin: 0; }
.lesson-done-tag { color: #16a34a; font-weight: 600; }

.lesson-actions {
    margin: 2.5rem 0 1.5rem;
    padding: 1.5rem 0;
    border-top: 1px solid var(--line);
    text-align: center;
}
.lesson-actions form { margin: 0; }
.lesson-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.lesson-nav a {
    display: flex; flex-direction: column; gap: 0.2rem;
    padding: 1rem 1.1rem;
    border: 1px solid var(--line); border-radius: var(--radius);
    text-decoration: none; color: var(--fg); background: var(--surface);
}
.lesson-nav a:hover { border-color: var(--accent); }
.lesson-nav-next { text-align: right; }
.lesson-nav span { font-size: 0.78rem; color: var(--muted); }
.lesson-nav strong { font-size: 0.92rem; font-weight: 550; }

/* ---------- Account ---------- */
.account-head { margin-bottom: 1.75rem; }
.account-head h1 { margin: 0 0 0.35rem; letter-spacing: -0.02em; }
.account-email { margin: 0; color: var(--muted); font-size: 0.9rem; }
.account-email a { color: var(--accent); }
.account-card {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1.25rem;
}
.account-card h2 { margin: 0 0 0.75rem; font-size: 1.25rem; letter-spacing: -0.02em; }
.account-card .btn { margin-top: 0.5rem; }
.account-card form { margin: 0; }
.account-status { color: var(--muted); margin: 0 0 1rem; }
.account-status-on { color: #16a34a; font-weight: 550; }
.account-link { display: inline-block; margin-top: 0.85rem; margin-left: 0.85rem; color: var(--accent); font-size: 0.88rem; }

/* ---------- Coaching ---------- */
.section-head {
    margin-bottom: 1.75rem;
    max-width: 36rem;
}
.section-head h2 {
    margin: 0 0 0.45rem;
    font-size: 1.55rem;
    letter-spacing: -0.02em;
}
.section-head p {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
}

/* Hero — split layout */
.coaching-hero {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 2.5rem;
    align-items: start;
    padding: 0.5rem 0 3rem;
    border-bottom: 1px solid var(--line);
}
.coaching-hero-main { padding-top: 0.25rem; }
.coaching-hero h1 {
    margin: 0 0 1rem;
    font-size: 2.65rem;
    letter-spacing: -0.035em;
    line-height: 1.08;
    max-width: 14ch;
}
.coaching-lead {
    margin: 0 0 1.75rem;
    color: var(--fg-soft);
    font-size: 1.08rem;
    line-height: 1.65;
    max-width: 34rem;
}
.coaching-hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 1.25rem;
}
.coaching-hero-link {
    color: var(--muted);
    font-size: 0.9rem;
    text-decoration: none;
}
.coaching-hero-link:hover { color: var(--accent); }

.coaching-hero-aside {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.25rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.coaching-stat {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--line);
}
.coaching-stat:last-child { border-bottom: none; padding-bottom: 0; }
.coaching-stat:first-child { padding-top: 0; }
.coaching-stat-val {
    font-size: 1.05rem;
    font-weight: 650;
    letter-spacing: -0.02em;
    color: var(--fg);
}
.coaching-stat-label {
    font-size: 0.82rem;
    color: var(--muted);
    line-height: 1.45;
}

/* Focus areas grid */
.coaching-focus {
    padding: 3rem 0;
    border-bottom: 1px solid var(--line);
}
.focus-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.85rem;
}
.focus-card {
    padding: 1.15rem 1.2rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    transition: border-color 0.15s ease;
}
.focus-card:hover { border-color: var(--line-strong); }
.focus-card h3 {
    margin: 0 0 0.4rem;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}
.focus-card p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--muted);
    line-height: 1.55;
}

/* Process steps */
.coaching-process {
    padding: 3rem 0;
    border-bottom: 1px solid var(--line);
}
.process-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}
.process-step {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.25rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.process-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 700;
    flex-shrink: 0;
}
.process-step h3 {
    margin: 0 0 0.35rem;
    font-size: 1rem;
    font-weight: 600;
}
.process-step p {
    margin: 0;
    font-size: 0.86rem;
    color: var(--muted);
    line-height: 1.55;
}

/* Tier cards */
.tiers { padding: 3rem 0; border-bottom: 1px solid var(--line); }
.tiers-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    align-items: stretch;
}
.tier {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.5rem 1.35rem 1.35rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.tier:hover { border-color: var(--line-strong); }
.tier-featured {
    border-color: var(--accent);
    background: var(--surface);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}
.tier-selected {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
.tier-badge {
    position: absolute;
    top: -0.65rem;
    left: 1.25rem;
    background: var(--accent);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
}
.tier-best-for {
    margin: 0 0 0.35rem;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
}
.tier h3 {
    margin: 0 0 0.5rem;
    font-size: 1.22rem;
    letter-spacing: -0.02em;
}
.tier-price {
    margin: 0 0 0.85rem;
    font-size: 1.65rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
}
.tier-price span {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.78rem;
    font-weight: 450;
    color: var(--muted);
    letter-spacing: 0;
}
.tier-desc {
    color: var(--fg-soft);
    font-size: 0.88rem;
    line-height: 1.55;
    margin: 0 0 1.1rem;
    flex: 1;
}
.tier-list { margin-bottom: 1.35rem !important; }
.tier-list li { font-size: 0.86rem; }
.tier .btn { margin-top: auto; }

/* FAQ */
.coaching-faq {
    padding: 3rem 0;
    border-bottom: 1px solid var(--line);
}
.faq-list { max-width: 40rem; }
.faq-item {
    border-bottom: 1px solid var(--line);
    padding: 0.15rem 0;
}
.faq-item summary {
    cursor: pointer;
    padding: 0.9rem 0;
    font-weight: 550;
    font-size: 0.95rem;
    color: var(--fg);
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: "+";
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--muted);
    flex-shrink: 0;
    transition: transform 0.15s ease;
}
.faq-item[open] summary::after {
    content: "\2212";
    color: var(--accent);
}
.faq-item p {
    margin: 0 0 1rem;
    padding-right: 2rem;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Apply section */
.coaching-apply { padding: 3rem 0 1.5rem; }
.apply-layout {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 2rem;
    align-items: start;
}
.apply-form-wrap h2 {
    margin: 0 0 0.4rem;
    font-size: 1.55rem;
    letter-spacing: -0.02em;
}
.coaching-apply-sub { color: var(--muted); margin: 0 0 1.5rem; font-size: 0.92rem; }
.coaching-form { display: flex; flex-direction: column; gap: 1rem; }

.selected-tier-pill {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem 0.5rem;
    padding: 0.65rem 0.9rem;
    background: var(--accent-soft);
    border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    color: var(--fg-soft);
    transition: box-shadow 0.2s ease;
}
.selected-tier-pill.tier-pulse {
    box-shadow: 0 0 0 3px var(--accent-soft);
}
.selected-tier-pill strong { color: var(--fg); }
.selected-tier-pill a {
    margin-left: auto;
    font-size: 0.82rem;
    color: var(--accent);
    text-decoration: none;
}
.selected-tier-pill a:hover { text-decoration: underline; }

.apply-aside {
    position: sticky;
    top: 1.5rem;
    padding: 1.5rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.apply-aside h3 {
    margin: 0 0 1rem;
    font-size: 1rem;
    font-weight: 600;
}
.apply-aside-steps {
    margin: 0 0 1.25rem;
    padding-left: 1.2rem;
    color: var(--fg-soft);
    font-size: 0.88rem;
}
.apply-aside-steps li { margin: 0.45rem 0; }
.apply-aside-note {
    padding-top: 1.1rem;
    border-top: 1px solid var(--line);
}
.apply-aside-note p {
    margin: 0 0 0.5rem;
    font-size: 0.86rem;
    color: var(--muted);
    line-height: 1.55;
}
.apply-aside-note p:last-child { margin-bottom: 0; }
.apply-aside-note a { color: var(--accent); }

.apply-success {
    text-align: center;
    max-width: 28rem;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.apply-success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    margin-bottom: 1rem;
    border-radius: 50%;
    background: #16a34a;
    color: #fff;
    font-size: 1.4rem;
    font-weight: 700;
}
.apply-success h2 { margin: 0 0 0.5rem; letter-spacing: -0.02em; }
.apply-success p { color: var(--muted); margin: 0 0 1.5rem; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

@media (max-width: 900px) {
    .coaching-hero { grid-template-columns: 1fr; gap: 1.5rem; }
    .coaching-hero h1 { max-width: none; font-size: 2.2rem; }
    .focus-grid { grid-template-columns: repeat(2, 1fr); }
    .process-steps { grid-template-columns: repeat(2, 1fr); }
    .tiers-grid { grid-template-columns: 1fr; }
    .tier-featured { transform: none; }
    .apply-layout { grid-template-columns: 1fr; }
    .apply-aside { position: static; }
}

@media (max-width: 600px) {
    .course-hero h1, .coaching-hero h1 { font-size: 1.9rem; }
    .lesson-header h1 { font-size: 1.6rem; }
    .lesson-nav { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .account-link { display: block; margin-left: 0; }
    .focus-grid { grid-template-columns: 1fr; }
    .process-steps { grid-template-columns: 1fr; }
    .coaching-hero-actions { flex-direction: column; align-items: stretch; }
    .coaching-hero-actions .btn { text-align: center; }
    .cookie-banner-inner { flex-direction: column; align-items: stretch; }
    .cookie-banner-actions { justify-content: stretch; }
    .cookie-banner-actions .btn { flex: 1; }
}

/* ============================================================
   Legal / GDPR pages
   ============================================================ */
.legal-page { max-width: 42rem; }

.legal-head { margin-bottom: 1.5rem; }
.legal-head h1 { margin: 0.35rem 0 0.5rem; font-size: 2rem; letter-spacing: -0.03em; }
.legal-updated { margin: 0; color: var(--muted); font-size: 0.88rem; }

.legal-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--line);
    font-size: 0.88rem;
}

.legal-nav a {
    color: var(--muted);
    text-decoration: none;
}
.legal-nav a:hover,
.legal-nav a[aria-current="page"] { color: var(--accent); }

.legal-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0 1.25rem;
    font-size: 0.92rem;
}
.legal-body th,
.legal-body td {
    border: 1px solid var(--line);
    padding: 0.55rem 0.75rem;
    text-align: left;
    vertical-align: top;
}
.legal-body th { background: var(--surface); font-weight: 600; }

.footer-legal {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1.25rem;
    margin-bottom: 0.85rem;
    font-size: 0.82rem;
}
.footer-legal a {
    color: var(--muted);
    text-decoration: none;
}
.footer-legal a:hover { color: var(--accent); }

.auth-legal,
.purchase-legal,
.email-consent {
    margin: 0.85rem 0 0;
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.45;
}
.auth-legal { text-align: center; }
.purchase-legal { max-width: 32rem; }

.field-check {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 0.65rem;
}
.field-check input[type="checkbox"] {
    width: auto;
    min-width: 1.05rem;
    height: 1.05rem;
    margin: 0.2rem 0 0;
    padding: 0;
    flex-shrink: 0;
    accent-color: var(--accent);
}
.field-check span {
    flex: 1;
    font-size: 0.88rem;
    line-height: 1.45;
    color: var(--muted);
    font-weight: 400;
}
.field-check a { color: var(--fg-soft); }

/* Cookie consent banner */
.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9000;
    padding: 1rem 1.25rem;
    background: var(--surface);
    border-top: 1px solid var(--line);
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.12);
    transform: translateY(110%);
    transition: transform 0.25s ease;
}
.cookie-banner.show { transform: translateY(0); }

.cookie-banner-inner {
    max-width: var(--maxw);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
}

.cookie-banner-title {
    margin: 0 0 0.25rem;
    font-weight: 600;
    font-size: 0.95rem;
}

.cookie-banner-text p:last-child {
    margin: 0;
    color: var(--muted);
    font-size: 0.85rem;
    line-height: 1.45;
    max-width: 42rem;
}

.cookie-banner-text a { color: var(--fg-soft); }

.cookie-banner-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}
