/* Shared by the series pages (books.html, the book pages, the samples, the
   companions): level colours and the 3D book (a real <img> cover with a spine). */

:root:is(.page-books, .page-free-samples, .page-books-forex-forex-trading-foundations, .page-books-forex-forex-trading-strategies, .page-books-forex-forex-trading-mastery, .page-books-forex-forex-trading-foundations-sample, .page-books-forex-forex-trading-strategies-sample, .page-books-forex-forex-trading-mastery-sample, .page-companion-forex-foundations-index, .page-companion-forex-strategies-index, .page-companion-forex-mastery-index) body {
    --lv: var(--blue);
}
:root:is(.page-books, .page-free-samples, .page-books-forex-forex-trading-foundations, .page-books-forex-forex-trading-strategies, .page-books-forex-forex-trading-mastery, .page-books-forex-forex-trading-foundations-sample, .page-books-forex-forex-trading-strategies-sample, .page-books-forex-forex-trading-mastery-sample, .page-companion-forex-foundations-index, .page-companion-forex-strategies-index, .page-companion-forex-mastery-index) body :is(.l1) { --lv: var(--level-1); --lv-d: #1d5fb8; --lv-t: #1766C3; --lv-bg: #E6EEF9; }
:root:is(.page-books, .page-free-samples, .page-books-forex-forex-trading-foundations, .page-books-forex-forex-trading-strategies, .page-books-forex-forex-trading-mastery, .page-books-forex-forex-trading-foundations-sample, .page-books-forex-forex-trading-strategies-sample, .page-books-forex-forex-trading-mastery-sample, .page-companion-forex-foundations-index, .page-companion-forex-strategies-index, .page-companion-forex-mastery-index) body :is(.l2) { --lv: var(--level-2); --lv-d: #157a5a; --lv-t: #15805E; --lv-bg: #E2F1EC; }
:root:is(.page-books, .page-free-samples, .page-books-forex-forex-trading-foundations, .page-books-forex-forex-trading-strategies, .page-books-forex-forex-trading-mastery, .page-books-forex-forex-trading-foundations-sample, .page-books-forex-forex-trading-strategies-sample, .page-books-forex-forex-trading-mastery-sample, .page-companion-forex-foundations-index, .page-companion-forex-strategies-index, .page-companion-forex-mastery-index) body :is(.l3) { --lv: var(--level-3); --lv-d: #8d6626; --lv-t: #8A6420; --lv-bg: #F4EDDF; }

/* ---- the 3D book ---- */
:root:is(.page-books, .page-free-samples, .page-books-forex-forex-trading-foundations, .page-books-forex-forex-trading-strategies, .page-books-forex-forex-trading-mastery, .page-books-forex-forex-trading-foundations-sample, .page-books-forex-forex-trading-strategies-sample, .page-books-forex-forex-trading-mastery-sample, .page-companion-forex-foundations-index, .page-companion-forex-strategies-index, .page-companion-forex-mastery-index) body .b3d {
    --w: 240px;
    --d: 22px;
    --ry: 24deg;
    display: inline-block;
    perspective: 1500px;
    padding: 0 0 0 var(--d);
    color: inherit;
}
:root:is(.page-books, .page-free-samples, .page-books-forex-forex-trading-foundations, .page-books-forex-forex-trading-strategies, .page-books-forex-forex-trading-mastery, .page-books-forex-forex-trading-foundations-sample, .page-books-forex-forex-trading-strategies-sample, .page-books-forex-forex-trading-mastery-sample, .page-companion-forex-foundations-index, .page-companion-forex-strategies-index, .page-companion-forex-mastery-index) body .b3d.lg { --w: 320px; --d: 28px; }
:root:is(.page-books, .page-free-samples, .page-books-forex-forex-trading-foundations, .page-books-forex-forex-trading-strategies, .page-books-forex-forex-trading-mastery, .page-books-forex-forex-trading-foundations-sample, .page-books-forex-forex-trading-strategies-sample, .page-books-forex-forex-trading-mastery-sample, .page-companion-forex-foundations-index, .page-companion-forex-strategies-index, .page-companion-forex-mastery-index) body .b3d.sm { --w: 190px; --d: 18px; }
:root:is(.page-books, .page-free-samples, .page-books-forex-forex-trading-foundations, .page-books-forex-forex-trading-strategies, .page-books-forex-forex-trading-mastery, .page-books-forex-forex-trading-foundations-sample, .page-books-forex-forex-trading-strategies-sample, .page-books-forex-forex-trading-mastery-sample, .page-companion-forex-foundations-index, .page-companion-forex-strategies-index, .page-companion-forex-mastery-index) body .b3d.xs { --w: 92px; --d: 10px; --ry: 18deg; }
:root:is(.page-books, .page-free-samples, .page-books-forex-forex-trading-foundations, .page-books-forex-forex-trading-strategies, .page-books-forex-forex-trading-mastery, .page-books-forex-forex-trading-foundations-sample, .page-books-forex-forex-trading-strategies-sample, .page-books-forex-forex-trading-mastery-sample, .page-companion-forex-foundations-index, .page-companion-forex-strategies-index, .page-companion-forex-mastery-index) body .b3d-obj {
    position: relative;
    display: block;
    width: var(--w);
    max-width: 100%;
    transform-style: preserve-3d;
    transform: rotateY(var(--ry));
    transition: transform .8s var(--ease);
}
:root:is(.page-books, .page-free-samples, .page-books-forex-forex-trading-foundations, .page-books-forex-forex-trading-strategies, .page-books-forex-forex-trading-mastery, .page-books-forex-forex-trading-foundations-sample, .page-books-forex-forex-trading-strategies-sample, .page-books-forex-forex-trading-mastery-sample, .page-companion-forex-foundations-index, .page-companion-forex-strategies-index, .page-companion-forex-mastery-index) body .b3d-front {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 640 / 1024;
    margin: 0;
    border: 0;
    border-radius: 2px 4px 4px 2px;
    transform: translateZ(calc(var(--d) / 2));
    box-shadow: 0 1px 1px rgba(7,24,39,.1), 0 22px 34px -14px rgba(7,24,39,.5), 0 44px 70px -34px rgba(7,24,39,.45);
}
:root:is(.page-books, .page-free-samples, .page-books-forex-forex-trading-foundations, .page-books-forex-forex-trading-strategies, .page-books-forex-forex-trading-mastery, .page-books-forex-forex-trading-foundations-sample, .page-books-forex-forex-trading-strategies-sample, .page-books-forex-forex-trading-mastery-sample, .page-companion-forex-foundations-index, .page-companion-forex-strategies-index, .page-companion-forex-mastery-index) body .b3d-spine {
    position: absolute;
    top: 0; bottom: 0; left: 0;
    width: var(--d);
    transform-origin: left center;
    transform: translateZ(calc(var(--d) / 2)) rotateY(90deg);
    background: linear-gradient(90deg, var(--lv-d, #1d5fb8), var(--lv, #2F80ED) 70%, var(--lv-d, #1d5fb8));
    filter: brightness(.82);
    border-radius: 2px 0 0 2px;
}
:root:is(.page-books, .page-free-samples, .page-books-forex-forex-trading-foundations, .page-books-forex-forex-trading-strategies, .page-books-forex-forex-trading-mastery, .page-books-forex-forex-trading-foundations-sample, .page-books-forex-forex-trading-strategies-sample, .page-books-forex-forex-trading-mastery-sample, .page-companion-forex-foundations-index, .page-companion-forex-strategies-index, .page-companion-forex-mastery-index) body .b3d-sheen {
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: 2px 4px 4px 2px;
    transform: translateZ(calc(var(--d) / 2 + 1px));
    background:
        linear-gradient(90deg, rgba(0,0,0,.28), rgba(0,0,0,0) 4%, rgba(255,255,255,.18) 5.5%, rgba(255,255,255,0) 8%),
        linear-gradient(105deg, rgba(255,255,255,0) 40%, rgba(255,255,255,.26) 50%, rgba(255,255,255,0) 60%);
    background-size: 100% 100%, 250% 100%;
    background-position: 0 0, 120% 0;
    transition: background-position 1.2s var(--ease);
}
:root:is(.page-books, .page-free-samples, .page-books-forex-forex-trading-foundations, .page-books-forex-forex-trading-strategies, .page-books-forex-forex-trading-mastery, .page-books-forex-forex-trading-foundations-sample, .page-books-forex-forex-trading-strategies-sample, .page-books-forex-forex-trading-mastery-sample, .page-companion-forex-foundations-index, .page-companion-forex-strategies-index, .page-companion-forex-mastery-index) body .b3d:hover .b3d-obj,
:root:is(.page-books, .page-free-samples, .page-books-forex-forex-trading-foundations, .page-books-forex-forex-trading-strategies, .page-books-forex-forex-trading-mastery, .page-books-forex-forex-trading-foundations-sample, .page-books-forex-forex-trading-strategies-sample, .page-books-forex-forex-trading-mastery-sample, .page-companion-forex-foundations-index, .page-companion-forex-strategies-index, .page-companion-forex-mastery-index) body a.b3d:focus-visible .b3d-obj { transform: rotateY(calc(var(--ry) * .35)) translateY(-6px); }
:root:is(.page-books, .page-free-samples, .page-books-forex-forex-trading-foundations, .page-books-forex-forex-trading-strategies, .page-books-forex-forex-trading-mastery, .page-books-forex-forex-trading-foundations-sample, .page-books-forex-forex-trading-strategies-sample, .page-books-forex-forex-trading-mastery-sample, .page-companion-forex-foundations-index, .page-companion-forex-strategies-index, .page-companion-forex-mastery-index) body .b3d:hover .b3d-sheen { background-position: 0 0, -20% 0; }
:root:is(.page-books, .page-free-samples, .page-books-forex-forex-trading-foundations, .page-books-forex-forex-trading-strategies, .page-books-forex-forex-trading-mastery, .page-books-forex-forex-trading-foundations-sample, .page-books-forex-forex-trading-strategies-sample, .page-books-forex-forex-trading-mastery-sample, .page-companion-forex-foundations-index, .page-companion-forex-strategies-index, .page-companion-forex-mastery-index) body a.b3d:focus-visible { outline: none; }
:root:is(.page-books, .page-free-samples, .page-books-forex-forex-trading-foundations, .page-books-forex-forex-trading-strategies, .page-books-forex-forex-trading-mastery, .page-books-forex-forex-trading-foundations-sample, .page-books-forex-forex-trading-strategies-sample, .page-books-forex-forex-trading-mastery-sample, .page-companion-forex-foundations-index, .page-companion-forex-strategies-index, .page-companion-forex-mastery-index) body a.b3d:focus-visible .b3d-front { outline: 3px solid var(--blue); outline-offset: 4px; }

/* shared focus ring for every link and button on these pages */
:root:is(.page-books, .page-free-samples, .page-books-forex-forex-trading-foundations, .page-books-forex-forex-trading-strategies, .page-books-forex-forex-trading-mastery, .page-books-forex-forex-trading-foundations-sample, .page-books-forex-forex-trading-strategies-sample, .page-books-forex-forex-trading-mastery-sample, .page-companion-forex-foundations-index, .page-companion-forex-strategies-index, .page-companion-forex-mastery-index) body main :is(a, button):focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

@media (max-width: 560px) {
    :root:is(.page-books, .page-free-samples, .page-books-forex-forex-trading-foundations, .page-books-forex-forex-trading-strategies, .page-books-forex-forex-trading-mastery, .page-books-forex-forex-trading-foundations-sample, .page-books-forex-forex-trading-strategies-sample, .page-books-forex-forex-trading-mastery-sample, .page-companion-forex-foundations-index, .page-companion-forex-strategies-index, .page-companion-forex-mastery-index) body .b3d.lg { --w: 230px; --d: 22px; }
    :root:is(.page-books, .page-free-samples, .page-books-forex-forex-trading-foundations, .page-books-forex-forex-trading-strategies, .page-books-forex-forex-trading-mastery, .page-books-forex-forex-trading-foundations-sample, .page-books-forex-forex-trading-strategies-sample, .page-books-forex-forex-trading-mastery-sample, .page-companion-forex-foundations-index, .page-companion-forex-strategies-index, .page-companion-forex-mastery-index) body .b3d { --w: 200px; }
}
