/* TradingTeaching v3 — content pages.
   Loaded after v3.css on every page except the home page. Restyles the old
   page markup (written for a dark theme) in the v3 publisher look. Three
   families, set on <body> by scripts/build_v3.py:
     fam-article  articles/**      (364 pages, one layout)
     fam-blog     blog/**          (388 pages, one layout)
     fam-main     everything else  (pattern rules + per-page fixes)          */

/* ============ base ============ */
:root.v3 body { background: var(--paper); color: var(--ink); }
:root.v3 body main, :root.v3 body section { color: var(--ink); }
:root.v3 body h1, :root.v3 body h2, :root.v3 body h3, :root.v3 body h4 { color: var(--navy); }
:root.v3 body h1, :root.v3 body h2 {
    font-family: var(--serif);
    font-weight: 700;
    letter-spacing: -.01em;
    line-height: 1.15;
}
:root.v3 body h1 { font-size: clamp(34px, 4.2vw, 52px); margin: 0 0 16px; }
:root.v3 body h2 { font-size: clamp(26px, 2.8vw, 36px); margin: 0 0 16px; }
:root.v3 body h3 { font-family: var(--serif); font-size: 21px; line-height: 1.3; margin: 0 0 10px; }
:root.v3 body h4 { font-family: var(--sans); font-size: 16px; font-weight: 700; margin: 0 0 8px; }
:root.v3 body p { color: var(--ink-2); }
:root.v3 body strong, :root.v3 body b { color: var(--ink); }
:root.v3 body .container { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
:root.v3 body hr { border: 0; border-top: 1px solid var(--rule); margin: 40px 0; }
:root.v3 body .text-gold { color: var(--gold); }
:root.v3 body .muted-text, :root.v3 body .helper-text { color: var(--ink-3); }

/* inline colours written for the dark theme */
:root.v3 body [style*="b0b8c4"], :root.v3 body [style*="e0e6ed"], :root.v3 body [style*="8892a0"],
:root.v3 body [style*="rgba(255,255,255,0.7)"], :root.v3 body [style*="rgba(255, 255, 255, 0.7)"],
:root.v3 body [style*="color: #ccc"], :root.v3 body [style*="color:#ccc"] { color: var(--ink-2) !important; }
:root.v3 body [style*="color: #fff"], :root.v3 body [style*="color:#fff"], :root.v3 body [style*="color: #ffffff"],
:root.v3 body [style*="color: white"] { color: var(--navy) !important; }
:root.v3 body [style*="background-color: #102A43"], :root.v3 body [style*="background-color: #071827"], :root.v3 body [style*="background: #1a1a2e"],
:root.v3 body [style*="background: #0a0a14"], :root.v3 body [style*="background-color: #f8f9fa"] {
    background: var(--cloud) !important; color: var(--ink) !important;
}

/* ============ buttons ============ */
:root.v3 body .btn, :root.v3 body a[class^="btn-"], :root.v3 body button[class^="btn-"], :root.v3 body button[type="submit"], :root.v3 body input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 22px;
    border-radius: 4px;
    font: 600 15px/1.2 var(--sans);
    border: 1.5px solid var(--navy);
    background: transparent;
    color: var(--navy);
    cursor: pointer;
    text-decoration: none;
    transition: background .25s, color .25s, border-color .25s, transform .25s var(--ease), box-shadow .25s;
}
:root.v3 body .btn:hover, :root.v3 body a[class^="btn-"]:hover, :root.v3 body button[class^="btn-"]:hover { background: var(--navy); color: #fff; }
:root.v3 body .btn-primary, :root.v3 body .btn-cta, :root.v3 body .btn-subscribe, :root.v3 body .btn-amazon,
:root.v3 body button[type="submit"], :root.v3 body input[type="submit"] {
    background: var(--navy); color: #fff; border-color: var(--navy);
}
:root.v3 body .btn-primary:hover, :root.v3 body .btn-cta:hover, :root.v3 body .btn-subscribe:hover, :root.v3 body .btn-amazon:hover,
:root.v3 body button[type="submit"]:hover {
    background: var(--blue-text); border-color: var(--blue-text); color: #fff;
    transform: translateY(-1px); box-shadow: 0 10px 24px -10px rgba(23,102,195,.6);
}
:root.v3 body .btn-group, :root.v3 body .buy-buttons, :root.v3 body .course-card-buttons, :root.v3 body .bundle-cta-buttons,
:root.v3 body .action-row { display: flex; flex-wrap: wrap; gap: 12px; }
:root.v3 body .read-more, :root.v3 body .back-to-category, :root.v3 body .continue-reading { font-weight: 600; color: var(--blue-text); display: inline-flex; gap: 8px; align-items: center; }
:root.v3 body .back-to-category svg { width: 16px; height: 16px; }

/* ============ page header (393 pages) ============ */
:root.v3 body .page-header {
    background: linear-gradient(180deg, #fff, var(--paper));
    border-bottom: 1px solid var(--rule);
    padding: 64px 0 56px !important;
    text-align: left;
    position: relative;
    overflow: hidden;
}
:root.v3 body .page-header::after {           /* faint chart grid, same family as the home hero */
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(rgba(7,24,39,.045) 1px, transparent 1px) 0 0 / 100% 64px;
    pointer-events: none;
}
:root.v3 body .page-header .container { position: relative; z-index: 1; }
:root.v3 body .page-header h1 { max-width: 20em; }
:root.v3 body .page-header p { font-size: 19px; max-width: 40em; color: var(--ink-2); margin: 0; }
:root.fam-article body .page-header { padding: 22px 0 !important; background: #fff; }
:root.fam-article body .page-header::after { display: none; }

/* breadcrumb */
:root.v3 body .breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    color: var(--ink-3);
    margin-bottom: 18px;
}
:root.v3 body .breadcrumb a { color: var(--blue-text); }
:root.v3 body .breadcrumb span { color: var(--ink-3); }
:root.v3 body .breadcrumb-section, :root.v3 body .breadcrumb-bar { background: #fff; border-bottom: 1px solid var(--rule); padding: 16px 0; }
:root.v3 body .breadcrumb-section .breadcrumb, :root.v3 body .page-header .breadcrumb:last-child { margin-bottom: 0; }

/* ============ generic sections + patterns (fam-main) ============ */
:root.fam-main body main > section, :root.fam-main body > section:not(.page-header) { padding: 88px 0; }
:root.fam-main:not(.v3-hand) body > section:nth-of-type(even):not(.page-header):not(.cta):not([class*="cta"]) { background: #fff; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
:root.v3 body .section-header { max-width: 46em; margin: 0 0 48px; }
:root.v3 body .section-header p { font-size: 18px; }
:root.v3 body .section-header h2::before {
    content: "";
    display: block;
    width: 32px;
    height: 2px;
    background: var(--blue);
    margin-bottom: 18px;
}

/* any *-grid lays out as responsive columns */
:root.v3 body [class$="-grid"]:not(.footer-grid), :root.v3 body [class*="-grid "] {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

/* any *-card is a white card */
:root.v3 body :is([class$="-card"], [class*="-card "], .card, .faq-item, .term-card, .resource-item, .contact-item, .info-box, .highlight-box, .pricing-box, .signup-box, .notify-box, .newsletter-form-box, .final-cta-box, .available-now-box, .intro-box, .faq-cta-box, .glossary-cta, .submit-review-box) {
    background: #fff;
    border: 1px solid var(--rule);
    border-radius: 2px;
    padding: 28px;
    color: var(--ink);
    transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s;
}
:root.v3 body a:is([class$="-card"], [class*="-card "]) { display: block; }
:root.v3 body a:is([class$="-card"], [class*="-card "]):hover,
:root.v3 body :is(.feature-card, .course-card, .book-card, .blog-card, .resource-card, .sample-card, .platform-card, .option-card):hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 40px -26px rgba(7,24,39,.4);
}
:root.v3 body :is([class$="-card"], [class*="-card "]) p { font-size: 15.5px; }

/* callout boxes */
:root.v3 body :is([class$="-box"], [class*="-box "], .key-takeaway, .article-disclaimer, .disclaimer, .risk-warning, .limited-offer):where(:not(.search-box, .signup-box, .notify-box, .newsletter-form-box, .final-cta-box, .pricing-box, .available-now-box, .intro-box, .faq-cta-box, .submit-review-box)) {
    background: var(--cloud);
    border: 1px solid var(--rule);
    border-left: 3px solid var(--blue);
    padding: 20px 24px;
    margin: 28px 0;
    color: var(--ink-2);
}
:root.v3 body :is(.warning-box, .con-box, .risk-warning, .article-disclaimer, .disclaimer) { border-left-color: #C0503A !important; }
:root.v3 body :is(.tip-box, .pro-box, .key-takeaway, .verdict-box) { border-left-color: var(--level-2) !important; }
:root.v3 body :is(.formula-box) { font-family: ui-monospace, Consolas, monospace; }

/* icons: the old pages used emoji chips. A trade publisher does not, so they
   go, and a card opens with a short rule instead. SVG icons are kept. */
:root.v3 body :is([class$="-icon"], [class*="-icon "]):not(svg):not(img):not(.error-icon):not(.video-placeholder-icon):not(.hero-icon) {
    display: none;
}
:root.v3 body :is(.feature-card, .benefit-card, .guideline-card, .bonus-card, .include-card, .inside-card, .platform-card, .step-card, .book-feature, .benefit-item, .credential, .contact-item, .resource-item, .trust-item) {
    position: relative;
}
:root.v3 body :is(.feature-card, .benefit-card, .guideline-card, .bonus-card, .include-card, .inside-card)::before {
    content: "";
    display: block;
    width: 28px;
    height: 3px;
    background: var(--blue);
    margin-bottom: 18px;
}

/* badges and small labels */
:root.v3 body :is([class$="-badge"], [class*="-badge "], .hero-badge, .article-category, .hero-category, .blog-card-category, .related-card-category, .book-tag, .course-number, .letter-badge) {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--blue-text);
    background: rgba(47,128,237,.08);
    border: 0;
    border-radius: 2px;
    padding: 5px 10px;
    margin-bottom: 12px;
}
:root.v3 body :is(.price-free, .status-coming) { color: var(--level-2); }

/* *-hero bands (book pages, bundle, companion, newsletter …) */
:root.v3 body :is([class$="-hero"], [class*="-hero "]):not(.article-hero) {
    background: linear-gradient(180deg, #fff, var(--paper));
    border-bottom: 1px solid var(--rule);
    padding: 72px 0;
}

/* images in content */
:root.v3 body main img:not(.course-top img), :root.v3 body section img:not(.course-top img) { height: auto; }
:root.v3 body :is(.book-cover, .book-hero-cover, .bundle-cover, .companion-cover, .sample-card-cover) img,
:root.v3 body img:is(.book-cover, .book-hero-cover) {
    box-shadow: inset 4px 0 6px -3px rgba(0,0,0,.35), 0 24px 40px -18px rgba(7,24,39,.5);
    border-radius: 2px 4px 4px 2px;
}

/* stats */
:root.v3 body .stat-item h3, :root.v3 body .stat-number, :root.v3 body .highlight-stat strong, :root.v3 body .community-stat strong {
    font-family: var(--sans); font-weight: 700; font-size: 36px; color: var(--navy); letter-spacing: -.02em;
}

/* CTA bands */
:root.v3 body :is(section.cta, .cta-section, .final-cta, .guarantee-section, .notify-section) {
    background: radial-gradient(1200px 400px at 85% 0%, rgba(47,128,237,.25), transparent 60%), var(--navy-2) !important;
    color: #fff;
    padding: 80px 0;
    text-align: left;
}
:root.v3 body :is(section.cta, .cta-section, .final-cta) :is(h2, h3) { color: #fff; }
:root.v3 body :is(section.cta, .cta-section, .final-cta) p { color: #C7D6E2 !important; }
:root.v3 body :is(section.cta, .cta-section, .final-cta) :is(.btn, a[class^="btn-"]):not(.btn-light) { border-color: rgba(255,255,255,.6); color: #fff; }
:root.v3 body :is(section.cta, .cta-section, .final-cta) :is(a.btn-primary, a.btn-cta, a.btn.btn-primary) { background: #fff; color: var(--navy) !important; border-color: #fff !important; }
:root.v3 body :is(section.cta, .cta-section, .final-cta) [style*="color"] { color: #fff !important; border-color: rgba(255,255,255,.6) !important; }
:root.v3 body :is(section.cta, .cta-section, .final-cta) :is(.btn, a[class^="btn-"]):hover { background: var(--blue-light); color: var(--navy); border-color: var(--blue-light); }
:root.v3 body .final-cta-box { background: transparent; border: 0; color: #fff; }

/* tables */
:root.v3 body table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 15px; background: #fff; }
:root.v3 body th { background: var(--navy); color: #fff; text-align: left; font-weight: 600; padding: 12px 14px; }
:root.v3 body td { border-bottom: 1px solid var(--rule); padding: 12px 14px; color: var(--ink-2); vertical-align: top; }
:root.v3 body tr:nth-child(even) td { background: var(--cloud); }
:root.v3 body .table-wrap, :root.v3 body .comparison-section .container { overflow-x: auto; }

/* forms */
:root.v3 body label { font-size: 14px; font-weight: 600; color: var(--ink); display: block; margin-bottom: 6px; }
:root.v3 body :is(input[type="text"], input[type="email"], input[type="tel"], input[type="search"], input[type="number"], select, textarea) {
    width: 100%;
    font: 400 16px/1.4 var(--sans);
    color: var(--ink);
    background: #fff;
    border: 1px solid #C9D2DC;
    border-radius: 3px;
    padding: 12px 14px;
    transition: border-color .2s, box-shadow .2s;
}
:root.v3 body :is(input, select, textarea):focus { outline: 0; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(47,128,237,.18); }
:root.v3 body .form-group { margin-bottom: 18px; }
:root.v3 body .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* FAQ */
:root.v3 body .faq-question { font-family: var(--serif); font-size: 19px; color: var(--navy); cursor: pointer; display: flex; justify-content: space-between; gap: 16px; background: none; border: 0; width: 100%; text-align: left; padding: 0; }
:root.v3 body .faq-item h3 { font-size: 19px; }
:root.v3 body .faq-answer { color: var(--ink-2); margin-top: 10px; }

/* ads: empty slots take no room */
:root.v3 body .ad-container:empty { display: none; }

/* ============ articles (fam-article) ============ */
:root.fam-article body .article-wrapper {
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 48px 24px 96px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 64px;
}
:root.fam-article body .article-header { margin: 18px 0 32px; padding-bottom: 28px; border-bottom: 1px solid var(--rule); }
:root.fam-article body .article-title { font-size: clamp(32px, 4vw, 46px); margin: 6px 0 16px; }
:root.fam-article body .article-meta { display: flex; flex-wrap: wrap; gap: 20px; font-size: 14px; color: var(--ink-3); }
:root.fam-article body .article-meta-item { display: inline-flex; gap: 8px; align-items: center; }
:root.fam-article body .article-meta-item svg { width: 16px; height: 16px; }
:root.fam-article body .article-author { color: var(--ink-2); font-weight: 600; }

/* shared long-form typography */
:root.v3 body :is(.article-content, .article-body, .legal-content, .chapter-content, .blog-content) {
    font-size: 18px;
    line-height: 1.75;
    color: var(--ink-2);
    max-width: 44em;
}
:root.v3 body :is(.article-content, .article-body, .legal-content, .chapter-content, .blog-content) h2 {
    font-size: 30px; margin: 48px 0 14px; padding: 0; border: 0;
}
:root.v3 body :is(.article-content, .article-body, .legal-content, .chapter-content, .blog-content) h3 {
    font-size: 22px; margin: 32px 0 10px; padding: 0; border: 0;
}
:root.v3 body :is(.article-content, .article-body, .legal-content, .chapter-content) :is(p, ul, ol) { margin: 0 0 18px; }
:root.v3 body :is(.article-content, .article-body, .legal-content, .chapter-content) li { margin-bottom: 8px; }
:root.v3 body :is(.article-content, .article-body, .legal-content, .chapter-content) li::marker { color: var(--blue); }
:root.v3 body :is(.article-content, .article-body, .legal-content, .chapter-content) a { color: var(--blue-text); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
:root.v3 body :is(.article-content, .article-body, .chapter-content) blockquote {
    font-family: var(--serif); font-size: 22px; font-style: italic; color: var(--navy);
    border-left: 3px solid var(--gold); margin: 32px 0; padding: 4px 0 4px 24px;
}
:root.v3 body :is(.article-content, .article-body, .chapter-content) img { margin: 28px 0; border: 1px solid var(--rule); }
:root.v3 body code { font-family: ui-monospace, Consolas, monospace; font-size: .88em; background: var(--cloud); border: 1px solid var(--rule); padding: 1px 6px; border-radius: 3px; color: var(--navy); }
:root.v3 body pre { background: var(--navy); color: #E6EEF6; padding: 20px 22px; overflow-x: auto; border-radius: 3px; font-size: 14px; line-height: 1.6; margin: 24px 0; }
:root.v3 body pre code { background: none; border: 0; padding: 0; color: inherit; }

/* share + nav + related */
:root.v3 body :is(.article-actions) { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; margin: 48px 0 32px; padding: 20px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
:root.v3 body .share-buttons { display: flex; align-items: center; gap: 10px; }
:root.v3 body .share-label { font-size: 13px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .12em; }
:root.v3 body .share-btn { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--rule); color: var(--navy); background: #fff; }
:root.v3 body .share-btn:hover { background: var(--navy); color: #fff; }
:root.v3 body .share-btn svg { width: 16px; height: 16px; }
:root.v3 body .copy-link-btn { font: 600 14px var(--sans); display: inline-flex; gap: 8px; align-items: center; background: none; border: 1px solid var(--rule); padding: 9px 14px; cursor: pointer; color: var(--navy); }
:root.v3 body .copy-link-btn svg { width: 16px; height: 16px; }
:root.v3 body :is(.article-nav) { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 32px 0 56px; }
:root.v3 body :is(.article-nav-link, .nav-link) { display: block; border: 1px solid var(--rule); background: #fff; padding: 18px 20px; color: var(--ink); transition: border-color .3s, transform .3s var(--ease); }
:root.v3 body :is(.article-nav-link, .nav-link):hover { border-color: var(--blue); transform: translateY(-2px); }
:root.v3 body :is(.article-nav-link, .nav-link).next { text-align: right; }
:root.v3 body .nav-direction { display: block; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--blue-text); margin-bottom: 6px; }
:root.v3 body .nav-title { font-family: var(--serif); font-size: 17px; color: var(--navy); }
:root.v3 body .related-title { font-size: 28px; margin-bottom: 22px; }
:root.v3 body .related-card { padding: 22px; }
:root.v3 body .related-card-title { font-size: 18px; margin: 4px 0 10px; }
:root.v3 body .related-card-meta { font-size: 13px; color: var(--ink-3); }

/* sidebar */
:root.v3 body :is(.article-sidebar, .sidebar-column) .sidebar-sticky,
:root.v3 body .sidebar-column > :first-child { position: sticky; top: 100px; }
:root.v3 body .sidebar-widget { background: #fff; border: 1px solid var(--rule); padding: 24px; margin-bottom: 24px; }
:root.v3 body :is(.sidebar-widget-title, .sidebar-title) { font-family: var(--serif); font-size: 19px; color: var(--navy); margin: 0 0 12px; padding-bottom: 12px; border-bottom: 1px solid var(--rule); }
:root.v3 body .sidebar-widget p { font-size: 15px; }
:root.v3 body .sidebar-widget .btn { width: 100%; }
:root.v3 body .sidebar-list { list-style: none; margin: 0; padding: 0; }
:root.v3 body .sidebar-list li { border-bottom: 1px solid var(--rule); }
:root.v3 body .sidebar-list li:last-child { border-bottom: 0; }
:root.v3 body .sidebar-list a { display: block; padding: 10px 0; font-size: 15px; color: var(--ink); }
:root.v3 body .sidebar-list a:hover { color: var(--blue-text); }

/* ============ blog posts (fam-blog) ============ */
:root.fam-blog body .article-hero {
    background: linear-gradient(180deg, #fff, var(--paper));
    border-bottom: 1px solid var(--rule);
    padding: 64px 0 52px;
    text-align: left;
}
:root.fam-blog body .hero-icon { display: none; }               /* the emoji */
:root.fam-blog body .hero-title { font-size: clamp(34px, 4.4vw, 54px); max-width: 18em; margin: 8px 0 16px; }
:root.fam-blog body .hero-description { font-size: 19px; max-width: 40em; color: var(--ink-2); }
:root.fam-blog body .hero-meta { display: flex; gap: 22px; flex-wrap: wrap; font-size: 14px; color: var(--ink-3); margin-top: 18px; }
:root.fam-blog body .hero-meta-item { display: inline-flex; gap: 8px; align-items: center; }
:root.fam-blog body .hero-meta-item svg { width: 16px; height: 16px; }
:root.fam-blog body main.container { padding-top: 48px; padding-bottom: 96px; }
:root.fam-blog body .main-content { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 64px; }
:root.fam-blog body .related-section { margin-top: 64px; }
:root.fam-blog body .article-nav { margin-top: 40px; }
/* blog category index pages */
:root.fam-blog body .category-hero { background: linear-gradient(180deg, #fff, var(--paper)); border-bottom: 1px solid var(--rule); padding: 64px 0; }
:root.fam-blog body .articles-section { padding: 64px 0 96px; }

/* blog cards (blog.html and category pages) */
:root.v3 body .blog-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
:root.v3 body .blog-card-content { padding: 24px; }
:root.v3 body .blog-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
:root.v3 body .blog-card-meta { font-size: 13px; color: var(--ink-3); }

/* ============ glossary / search / misc ============ */
:root.v3 body .letter-nav, :root.v3 body .category-filters, :root.v3 body .reviews-filter { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 32px; }
:root.v3 body :is(.letter-link, .filter-btn, .category-link-btn) { padding: 8px 12px; border: 1px solid var(--rule); background: #fff; color: var(--navy); font-weight: 600; font-size: 14px; }
:root.v3 body :is(.letter-link, .filter-btn, .category-link-btn):hover,
:root.v3 body :is(.filter-btn).active { background: var(--navy); color: #fff; }
:root.v3 body .term-name { font-family: var(--serif); font-size: 20px; color: var(--navy); }
:root.v3 body .term-example { font-size: 15px; color: var(--ink-3); font-style: italic; }
:root.v3 body .search-input { font-size: 18px; padding: 16px 18px; }

/* ============ responsive ============ */
@media (max-width: 960px) {
    :root.fam-article body .article-wrapper, :root.fam-blog body .main-content { grid-template-columns: 1fr; gap: 40px; }
    :root.v3 body :is(.article-sidebar, .sidebar-column) .sidebar-sticky { position: static; }
    :root.v3 body .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    :root.v3 body :is(.article-content, .article-body) { font-size: 17px; }
    :root.v3 body .article-nav { grid-template-columns: 1fr; }
    :root.fam-main body > section:not(.page-header) { padding: 64px 0; }
    :root.v3 body .page-header { padding: 44px 0 40px !important; }
}

/* stat rows and module lists (course pages) */
:root.v3 body .stat-row { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); margin: 28px 0; }
:root.v3 body .stat-row > div { padding: 18px 16px; border-left: 1px solid var(--rule); display: flex; flex-direction: column; }
:root.v3 body .stat-row > div:first-child { border-left: 0; padding-left: 0; }
:root.v3 body .stat-row strong { font-size: 32px; font-weight: 700; color: var(--navy); letter-spacing: -.02em; line-height: 1.1; }
:root.v3 body .stat-row span { font-size: 13px; color: var(--ink-3); }
:root.v3 body .course-price { margin: 18px 0; }
:root.v3 body :is(.price-now, .course-price strong, .price-n, .offer-price, .format-price, .bundle-offer-price) { font-size: 34px; font-weight: 700; color: var(--navy); letter-spacing: -.02em; }
:root.v3 body .module-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 48px; counter-reset: m; border-top: 1px solid var(--rule); }
:root.v3 body .module-item { display: grid; grid-template-columns: 52px 1fr; gap: 14px; padding: 20px 0; border-bottom: 1px solid var(--rule); }
:root.v3 body .module-num { font-family: var(--serif); font-size: 30px; line-height: 1; color: var(--blue); font-weight: 700; }
:root.v3 body .module-item h4 { font-family: var(--serif); font-size: 18px; font-weight: 700; margin-bottom: 4px; }
:root.v3 body .module-item p { margin: 0; font-size: 15px; }
@media (max-width: 760px) {
    :root.v3 body .module-list { grid-template-columns: 1fr; }
    :root.v3 body .stat-row { grid-template-columns: 1fr 1fr; }
}
/* SVG icons whose size lived in the removed inline styles */
:root.v3:not(.v3-hand) body main svg:not([width]):not([class]), :root.v3:not(.v3-hand) body section svg:not([width]):not([class]) {
    width: 1.1em; height: 1.1em; vertical-align: -.18em; flex: none;
}
:root.v3 body .course-meta, :root.v3 body .book-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 14px; color: var(--ink-3); margin: 12px 0 16px; }
:root.v3 body .course-meta-item { display: inline-flex; gap: 6px; align-items: center; }
:root.v3 body .course-card { padding: 0; overflow: hidden; }
:root.v3 body .course-card-image img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
:root.v3 body :is(.course-card-header, .course-card-body) { padding: 22px 24px 0; }
:root.v3 body .course-card-body { padding-bottom: 24px; }
:root.v3 body .course-details h4 { margin-top: 18px; }
:root.v3 body .course-details ul { padding-left: 18px; font-size: 15px; color: var(--ink-2); }

/* book pages: cover beside the text */
:root.v3 body .book-hero-content { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 64px; align-items: start; }
:root.v3 body .book-hero-cover { position: sticky; top: 110px; }
:root.v3 body .book-hero-cover img { border-radius: 2px 4px 4px 2px !important; }
:root.v3 body .book-features { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 24px; margin: 20px 0; }
:root.v3 body .book-features li { font-size: 15px; color: var(--ink-2); }
:root.v3 body .pricing-box { margin-top: 24px; }

/* chapter lists */
:root.v3 body .chapters-list { border-top: 1px solid var(--rule); }
:root.v3 body .chapter-item { display: grid; grid-template-columns: 64px 1fr; gap: 16px; padding: 24px 0; border-bottom: 1px solid var(--rule); }
:root.v3 body .chapter-num { font-family: var(--serif); font-size: 36px; line-height: 1; font-weight: 700; color: var(--blue); }
:root.v3 body .chapter-title h4 { font-family: var(--serif); font-size: 21px; font-weight: 700; margin-bottom: 6px; }
:root.v3 body .chapter-title p { margin: 0 0 8px; font-size: 16px; }
:root.v3 body .chapter-topics { font-size: 14px !important; color: var(--ink-3) !important; }
@media (max-width: 860px) {
    :root.v3 body .book-hero-content { grid-template-columns: 1fr; }
    :root.v3 body .book-hero-cover { position: static; max-width: 280px; }
    :root.v3 body .book-features { grid-template-columns: 1fr; }
}
/* footer keeps its own colours (the content p rule above would grey them out) */
:root.v3 body .foot p { color: #9FB0C2; }
:root.v3 body .foot .risk strong, :root.v3 body .foot strong { color: #fff; }
:root.v3 body .foot h4 { color: #fff; font-family: var(--sans); font-size: 13px; }

/* ============ workbooks/index.html (hand-built, templates/pages/workbooks) ============ */
:root.page-workbooks-index body .wbk-top {
    position: relative; overflow: hidden; padding: 56px 0 96px;
    background: linear-gradient(180deg, #fff, var(--paper));
    border-bottom: 1px solid var(--rule);
}
.wbk-top::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(rgba(7,24,39,.045) 1px, transparent 1px) 0 0 / 100% 64px;
}
.wbk-top-in { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
:root.page-workbooks-index body .wbk-title { font-size: clamp(40px, 5vw, 64px); margin: 18px 0 18px; line-height: 1.05; }
.wbk-title em, .wbk-head h2 em { font-style: italic; color: var(--blue); }
.wbk-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
:root.page-workbooks-index body .wbk-note { font-size: 14px; color: var(--ink-3); margin: 14px 0 0; }
.wbk-facts { list-style: none; padding: 0; margin: 34px 0 0; display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: 34px; border-top: 1px solid var(--rule); padding-top: 22px; }
.wbk-facts li { display: flex; flex-direction: column; }
.wbk-facts b { font-size: 28px; font-weight: 700; color: var(--navy); letter-spacing: -.02em; line-height: 1.1; }
.wbk-facts span { font-size: 13px; color: var(--ink-3); }

/* the stack: two real pages behind three drawn covers */
.wbk-stack { position: relative; height: 520px; perspective: 1600px; }
.wbk-sheet {
    position: absolute; width: 46%; height: auto; background: #fff;
    box-shadow: 0 30px 50px -24px rgba(7,24,39,.45), 0 1px 2px rgba(7,24,39,.1);
    border: 1px solid var(--rule);
}
.wbk-sheet.s1 { left: 2%; top: 4%; transform: rotate(-7deg); }
.wbk-sheet.s2 { right: 0; top: 0; transform: rotate(6deg); }
.wbk-cover {
    position: absolute; display: flex; flex-direction: column; justify-content: flex-start;
    width: 40%; aspect-ratio: 432 / 648; padding: 0 0 16px;
    border-radius: 2px 5px 5px 2px; overflow: hidden;
    box-shadow: inset 5px 0 8px -4px rgba(0,0,0,.3), 0 34px 60px -26px rgba(7,24,39,.6);
    transition: transform .8s var(--ease);
}
.wbk-cover.c1 { background: #E6EEF9; left: 0; top: 16%; transform: rotate(-4deg); z-index: 2; }
.wbk-cover.c2 { background: #E2F1EC; left: 30%; top: 8%; transform: rotate(1deg); z-index: 3; }
.wbk-cover.c3 { background: #F4EDDF; left: 60%; top: 18%; transform: rotate(5deg); z-index: 2; }
.wbk-stack:hover .c1 { transform: rotate(-7deg) translate(-14px, 4px); }
.wbk-stack:hover .c3 { transform: rotate(8deg) translate(14px, 6px); }
.wbk-stack:hover .c2 { transform: rotate(0) translateY(-8px); }
.wbk-cover-top {
    display: flex; align-items: center; gap: 8px; background: var(--navy); color: #fff;
    font-size: 10px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; padding: 10px 14px;
    border-bottom: 3px solid var(--blue);
}
.c2 .wbk-cover-top { border-bottom-color: var(--level-2); }
.c3 .wbk-cover-top { border-bottom-color: var(--level-3); }
.wbk-cover-top i { width: 12px; height: 12px; background: url(../images/brand/tt07-logo-dark.svg) left center / auto 100% no-repeat; flex: none; }
.wbk-cover strong { font-family: var(--serif); font-size: clamp(18px, 1.9vw, 26px); line-height: 1.1; color: var(--navy); padding: 20px 16px 8px; }
.wbk-cover em { font-style: normal; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--blue-text); padding: 0 16px; }
.c2 em { color: #157a5a; }
.c3 em { color: #8d6626; }
.wbk-art { display: block; margin: 14px 16px 12px; flex: 1; min-height: 0; border-radius: 2px; background-size: 175% auto; background-position: 50% 55%; box-shadow: inset 0 0 0 1px rgba(7,24,39,.08); }
.c1 .wbk-art { background-image: url(../images/books/forex-trading-foundations-2027.jpg); }
.c2 .wbk-art { background-image: url(../images/books/forex-trading-strategies-2027.jpg); }
.c3 .wbk-art { background-image: url(../images/books/forex-trading-mastery-2027.jpg); }
.wbk-cover.small .wbk-art { margin: 8px 9px 9px; }
.wbk-cover-foot { margin-top: 0; padding: 0 16px; font-size: 10px; color: var(--ink-3); }
.wbk-cover.small { position: relative; left: auto; top: auto; transform: none; width: 150px; flex: none; }
.wbk-cover.small strong { font-size: 18px; padding: 16px 12px 6px; }
.wbk-cover.small em { font-size: 9px; padding: 0 12px; }

/* sections */
:root.page-workbooks-index body :is(.wbk-inside, .wbk-three, .wbk-how) { padding: 104px 0; }
.wbk-three { background: #fff; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.wbk-head { max-width: 46em; margin-bottom: 52px; }
:root.page-workbooks-index body .wbk-head h2 { font-size: clamp(30px, 3.6vw, 46px); margin: 16px 0 14px; }

/* real pages */
.wbk-pages { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.wbk-page { margin: 0; }
.wbk-page a { display: block; position: relative; height: 340px; overflow: hidden; background: #fff; border: 1px solid var(--rule); box-shadow: 0 24px 40px -28px rgba(7,24,39,.45); }
.wbk-page a::after {
    content: "Open page"; position: absolute; left: 50%; bottom: 18px; transform: translate(-50%, 10px);
    background: var(--navy); color: #fff; font-size: 12px; font-weight: 600; padding: 7px 12px; border-radius: 999px;
    opacity: 0; transition: opacity .3s, transform .3s var(--ease);
}
.wbk-page a::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 90px; background: linear-gradient(transparent, #fff); z-index: 1; }
.wbk-page a:hover::after { opacity: 1; transform: translate(-50%, 0); z-index: 2; }
.wbk-page img { width: 100%; height: auto; transition: transform 1.4s var(--ease); transform-origin: top center; }
.wbk-page a:hover img { transform: translateY(-14%); }
.wbk-page figcaption { padding-top: 18px; font-size: 15px; color: var(--ink-2); }
.wbk-page figcaption b { display: block; font-family: var(--serif); font-size: 19px; color: var(--navy); line-height: 1.25; margin-bottom: 6px; }
.wbk-page figcaption small { display: block; margin-top: 8px; font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }

/* three workbooks */
.wbk-books { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.wbk-book { display: flex; gap: 22px; align-items: flex-start; padding: 26px; border: 1px solid var(--rule); background: var(--paper); transition: transform .4s var(--ease), box-shadow .4s var(--ease); }
.wbk-book:hover { transform: translateY(-4px); box-shadow: 0 24px 40px -26px rgba(7,24,39,.4); }
.wbk-book h3 { font-size: 20px; margin: 6px 0 8px; }
.wbk-book p { font-size: 15px; margin: 0 0 12px; }
.wbk-book .wbk-cover.small { width: 104px; }
.wbk-book .wbk-cover.small strong { font-size: 14px; padding: 12px 9px 5px; }
.wbk-book .wbk-cover.small em { font-size: 7px; padding: 0 9px; }
.wbk-book .wbk-cover-top { font-size: 7px; padding: 6px 8px; }
.wbk-level { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.wbk-level.l1 { color: var(--level-1); }
.wbk-level.l2 { color: var(--level-2); }
.wbk-level.l3 { color: var(--level-3); }

/* steps */
.wbk-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; position: relative; }
.wbk-steps::before { content: ""; position: absolute; top: 27px; left: 28px; right: 28px; height: 2px; background: repeating-linear-gradient(90deg, var(--blue) 0 8px, transparent 8px 16px); opacity: .5; }
.wbk-steps li { position: relative; }
.wbk-steps span { position: relative; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 700; font-size: 20px; margin-bottom: 22px; box-shadow: 0 0 0 8px var(--paper); }
.wbk-steps h3 { font-size: 21px; }
.wbk-steps p { font-size: 15.5px; margin: 0; }
:root.page-workbooks-index body .wbk-help { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--rule); font-size: 15px; }
:root.page-workbooks-index body .wbk-risk { font-size: 13px; margin-top: 28px; color: #9FB0C2 !important; }
:root.page-workbooks-index body .wbk-risk a { color: #fff; text-decoration: underline; }

@media (max-width: 1080px) {
    .wbk-top-in { grid-template-columns: 1fr; }
    .wbk-stack { max-width: 560px; width: 100%; margin: 0 auto; }
    .wbk-pages { grid-template-columns: repeat(2, 1fr); }
    .wbk-books { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .wbk-stack { height: 380px; }
    .wbk-facts { grid-template-columns: 1fr 1fr; gap: 18px; }
    .wbk-pages, .wbk-steps { grid-template-columns: 1fr; }
    .wbk-steps::before { display: none; }
    .wbk-page a { height: 300px; }
}

/* strong/b inherit their colour inside dark panels (the rule above made them navy on navy) */
:root.v3 body :is(.portrait figcaption, section.cta, .cta-section, .final-cta, .method, .strip, .foot, .fan-note, .edition-tag) :is(strong, b) { color: inherit; }

/* .btn-light (white button on navy) survives the generic .btn reset above */
:root.v3 body a.btn.btn-light, :root.v3 body .btn.btn-light { background: #fff; color: var(--navy); border-color: #fff; }
:root.v3 body a.btn.btn-light:hover { background: var(--blue-light); border-color: var(--blue-light); color: var(--navy); }
