/* Mirror of the Trader v30 — Layout 2 "Modular Focus" redesign layer.
   Palette (approved): #050405 background · #100002 near-black cherry · #D4AF5A antique gold · #A98238 dark brass · #F3E8D8 warm ivory.
   The base tokens live in app.css :root; this file adds the homepage, modal, cookie popup and the member-page surface styling. */
:root{--cherry:#100002;--brass:#A98238;--antique:#D4AF5A;--ivory-w:#F3E8D8;--wide:1240px}

/* ---------- homepage ---------- */
.v30-narrow{max-width:760px}
.wrap.v30-wide{max-width:min(1320px,calc(100% - 48px))}
.v30-intro h2{max-width:20ch;margin:0 auto}
.v30-intro{padding:clamp(56px,8vw,104px) 0 clamp(28px,4vw,48px);background:var(--black)}
.v30-lede{margin:24px auto 0;max-width:58ch;color:var(--ivory);font-size:clamp(1.05rem,1.5vw,1.22rem)}
.v30-features{padding:clamp(18px,3vw,36px) 0 clamp(48px,7vw,88px);background:var(--black)}
.v30-feature-grid{list-style:none;display:grid;grid-template-columns:repeat(3,1fr);gap:clamp(16px,2.4vw,32px);max-width:var(--wide);margin:0 auto}
.v30-feature{background:var(--cherry);border:1px solid var(--brass);border-radius:6px;padding:clamp(26px,3vw,40px) clamp(20px,2.4vw,34px);text-align:center;display:flex;flex-direction:column;align-items:center}
.v30-ficon{width:96px;height:96px;object-fit:contain;margin-bottom:20px}
.v30-feature h3{font-size:1.35rem;color:var(--antique);margin-bottom:10px}
.v30-feature p{color:var(--ivory);max-width:30ch}
.v30-two{margin-left:auto;margin-right:auto;display:grid;grid-template-columns:minmax(0,5fr) minmax(0,6fr);gap:clamp(28px,5vw,72px);align-items:center;max-width:var(--wide)}
.v30-two--rev{grid-template-columns:minmax(0,6fr) minmax(0,5fr)}
.v30-book{padding:clamp(48px,7vw,96px) 0;background:linear-gradient(180deg,var(--black),var(--cherry) 55%,var(--black))}
.v30-book-art img{width:min(100%,440px);height:auto;margin:0 auto;filter:drop-shadow(0 24px 40px rgba(0,0,0,.6))}
.v30-book-copy .lede,.v30-story-copy .lede{color:var(--ivory);max-width:52ch}
.v30-free{margin-top:18px;font-style:italic;color:var(--antique);font-size:1.12rem}
.v30-actions{display:flex;flex-wrap:wrap;gap:14px;margin-top:28px}
.v30-chapters{padding:clamp(48px,7vw,96px) 0;background:var(--black)}
.v30-cards{list-style:none;display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:clamp(10px,1.4vw,20px);margin:0 auto}
.v30-card{display:block;width:100%;padding:0;background:none;border:0;border-radius:14px;cursor:pointer;transition:transform .3s var(--ease),box-shadow .3s}
.v30-card img{width:100%;height:auto;border-radius:14px}
.v30-card:hover,.v30-card:focus-visible{transform:translateY(-6px);box-shadow:0 14px 30px rgba(0,0,0,.55)}
.v30-card:focus-visible{outline:2px solid var(--antique);outline-offset:4px}
.v30-story{padding:clamp(48px,7vw,96px) 0;background:linear-gradient(180deg,var(--black),var(--cherry) 60%,var(--black))}
.v30-story-art{margin:0}
.v30-story-art img{width:100%;height:auto;border-radius:6px;border:1px solid var(--brass)}
.v30-storytext{padding:clamp(40px,6vw,72px) 0 0;background:var(--black)}
.v30-more .stage{margin-top:0}
@media(max-width:1100px){.v30-cards{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:900px){.v30-feature-grid{grid-template-columns:1fr;max-width:520px}.v30-two,.v30-two--rev{grid-template-columns:1fr}.v30-two--rev .v30-story-art{order:-1}.v30-book-art img{width:min(70%,340px)}}
@media(max-width:640px){.v30-cards{grid-template-columns:repeat(2,minmax(0,1fr))}.v30-actions .btn{flex:1 1 100%;text-align:center}}

/* ---------- chapter modal ---------- */
.v30-modal-open,.v30-modal-open body{overflow:hidden}
.v30-modal-bg{position:fixed;inset:0;z-index:12000;background:rgba(5,4,5,.86);display:grid;place-items:center;padding:16px;overflow:auto}
.v30-modal{position:relative;width:min(560px,100%);background:var(--cherry);border:1px solid var(--brass);border-radius:14px;padding:clamp(28px,4vw,44px);text-align:center;box-shadow:0 30px 80px rgba(0,0,0,.7);max-height:calc(100vh - 32px);overflow:auto}
.v30-modal-x{position:absolute;top:10px;right:14px;font-size:2rem;line-height:1;color:var(--antique);padding:6px 12px;min-width:44px;min-height:44px}
.v30-modal-x:focus-visible,.v30-modal .btn:focus-visible{outline:2px solid var(--antique);outline-offset:2px}
.v30-modal-logo{width:clamp(96px,28vw,150px);height:auto;margin:0 auto 14px}
.v30-modal-title{font-size:clamp(1.5rem,3vw,2rem);color:var(--antique)}
.v30-modal-rule{display:block;width:64px;height:1px;background:var(--brass);margin:16px auto}
.v30-modal-sum{color:var(--ivory);font-size:1.05rem;line-height:1.8}
.v30-modal-pending{font-style:italic;color:var(--grey)}
.v30-modal-actions{display:flex;flex-wrap:wrap;gap:12px;justify-content:center;margin-top:26px}

/* ---------- cookie popup (Layout 2 palette) ---------- */
.mott-analytics-choice{position:fixed;left:50%;bottom:20px;transform:translateX(-50%);z-index:11000;width:min(560px,calc(100vw - 24px));max-height:calc(100vh - 40px);overflow:auto;
  background:var(--cherry);color:var(--ivory);border:1px solid var(--brass);border-radius:16px;padding:22px 22px 18px;box-shadow:0 24px 70px rgba(0,0,0,.7)}
.mott-analytics-choice__heading{font-size:1.2rem;color:var(--antique);margin:0 0 8px;font-family:var(--serif)}
.mott-analytics-choice__copy{font-size:.95rem;line-height:1.65;margin:0 0 14px;color:var(--ivory)}
.mott-analytics-choice__copy a,.mott-analytics-choice__links a{color:var(--antique);text-decoration:underline;text-underline-offset:3px}
.mott-analytics-choice__cat{border:1px solid rgba(169,130,56,.5);border-radius:10px;padding:12px 14px;margin:0 0 10px;display:flex;gap:14px;align-items:flex-start;justify-content:space-between}
.mott-analytics-choice__cat b{display:block;font-weight:600;color:var(--ivory)}
.mott-analytics-choice__cat span{display:block;font-size:.88rem;color:var(--grey);line-height:1.5;margin-top:2px}
.mott-analytics-choice__req{font-size:.8rem;color:var(--antique);white-space:nowrap;border:1px solid var(--brass);border-radius:999px;padding:2px 10px}
.mott-switch{position:relative;flex:none;width:46px;height:26px}
.mott-switch input{position:absolute;inset:0;opacity:0;width:100%;height:100%;margin:0;cursor:pointer}
.mott-switch i{position:absolute;inset:0;border-radius:999px;background:#3a2c2f;border:1px solid var(--brass);transition:background .2s;pointer-events:none}
.mott-switch i::after{content:"";position:absolute;top:3px;left:3px;width:18px;height:18px;border-radius:50%;background:var(--ivory);transition:transform .2s}
.mott-switch input:checked+i{background:var(--antique)}
.mott-switch input:checked+i::after{transform:translateX(20px);background:#050405}
.mott-switch input:focus-visible+i{outline:2px solid var(--antique);outline-offset:2px}
.mott-analytics-choice__more{margin:0 0 12px;font-size:.88rem;color:var(--grey);line-height:1.6}
.mott-analytics-choice__more[hidden]{display:none}
.mott-analytics-choice__links{font-size:.85rem;margin:0 0 14px;display:flex;gap:16px;flex-wrap:wrap}
.mott-analytics-choice__actions{display:flex;flex-wrap:wrap;gap:10px}
.mott-analytics-choice__actions button{flex:1 1 140px;min-height:44px;border-radius:999px;border:1px solid var(--brass);padding:10px 16px;font-size:.92rem;color:var(--ivory);background:transparent}
.mott-analytics-choice__actions button.primary{background:var(--antique);color:#050405;border-color:var(--antique);font-weight:600}
.mott-analytics-choice__actions button:focus-visible,.mott-analytics-choice__toggle:focus-visible{outline:2px solid var(--antique);outline-offset:2px}
.mott-analytics-choice__toggle{color:var(--antique);text-decoration:underline;text-underline-offset:3px;font-size:.88rem;padding:6px 0;margin:0 0 10px;min-height:36px}
:root[data-site-theme="light"] .mott-analytics-choice{background:#FFF3E5;color:#291A18;border-color:#AC7D35}
:root[data-site-theme="light"] .mott-analytics-choice__copy,:root[data-site-theme="light"] .mott-analytics-choice__cat b{color:#291A18}
:root[data-site-theme="light"] .mott-analytics-choice__cat span,:root[data-site-theme="light"] .mott-analytics-choice__more{color:#70544D}
:root[data-site-theme="light"] .mott-analytics-choice__heading,:root[data-site-theme="light"] .mott-analytics-choice__req,:root[data-site-theme="light"] .mott-analytics-choice__toggle,:root[data-site-theme="light"] .mott-analytics-choice a{color:#4A101B}
:root[data-site-theme="light"] .mott-analytics-choice__actions button{color:#291A18;border-color:#AC7D35}
:root[data-site-theme="light"] .mott-analytics-choice__actions button.primary{background:#500D19;color:#FFF3E5}
:root[data-site-theme="light"] .mott-switch i{background:#EBD3B8}
:root[data-site-theme="light"] .mott-switch input:checked+i{background:#500D19}
@media(max-width:480px){.mott-analytics-choice{bottom:10px;padding:18px 16px 14px;border-radius:14px}.mott-analytics-choice__actions button{flex:1 1 100%}}

/* ---------- member surfaces: black cherry + antique gold (dark theme; light theme keeps its own card overrides) ---------- */
:root:not([data-site-theme="light"]) .card,
:root:not([data-site-theme="light"]) .panel,
:root:not([data-site-theme="light"]) .qcard,
:root:not([data-site-theme="light"]) .emocard,
:root:not([data-site-theme="light"]) .auth,
:root:not([data-site-theme="light"]) .jentry,
:root:not([data-site-theme="light"]) .jed,
:root:not([data-site-theme="light"]) .col{background:linear-gradient(160deg,#110001,#100002);border-color:var(--brass)}
:root:not([data-site-theme="light"]) .tool-card .num{color:var(--antique);font-size:.95rem;letter-spacing:.14em}
.tool-card{border-radius:6px}
.tool-card h3{color:var(--antique)}
#v-worksheets .phead{background:linear-gradient(180deg,var(--cherry),var(--black))}
#v-worksheets #hubCards{gap:clamp(16px,2.2vw,28px)}
#v-worksheets .tool-card{display:flex;flex-direction:column}
#v-worksheets .tool-card .tool-actions{margin-top:auto;padding-top:18px}

/* ---------- reader: closed book + book-page surface (presentation only) ---------- */
#memberReader[data-book="closed"]>:not(.book-closed){display:none!important}
.book-closed{display:none}
#memberReader[data-book="closed"] .book-closed{display:flex;justify-content:center;padding:clamp(8px,3vw,36px) 0 clamp(24px,5vw,60px)}
.book-closed-btn{display:flex;flex-direction:column;align-items:center;gap:18px;padding:12px;background:none;border:0;cursor:pointer;color:var(--ivory)}
.book-closed-btn img{width:min(78vw,430px);height:auto;filter:drop-shadow(0 30px 44px rgba(0,0,0,.65));transition:transform .4s var(--ease)}
.book-closed-btn:hover img,.book-closed-btn:focus-visible img{transform:translateY(-6px) rotate(-.6deg)}
.book-closed-btn:focus-visible{outline:2px solid #D4AF5A;outline-offset:6px;border-radius:8px}
.book-closed-cta{font-size:1.05rem;letter-spacing:.06em;color:#D4AF5A;border:1px solid #A98238;border-radius:999px;padding:10px 26px}
#memberReader .readpane.paged .pg-view,#memberReader .readpane:not(.paged) .chap-body{border-radius:4px}
#memberReader .readpane.paged .pg-view{box-shadow:inset 18px 0 22px -16px rgba(0,0,0,.55),0 0 0 1px rgba(169,130,56,.55),0 18px 40px rgba(0,0,0,.5)}
#memberReader[data-rtheme="light"] .readpane.paged .pg-view{box-shadow:inset 18px 0 22px -16px rgba(60,40,10,.35),0 0 0 1px rgba(172,125,53,.45),0 14px 30px rgba(60,40,10,.25)}
@media(prefers-reduced-motion:reduce){.book-closed-btn img{transition:none}}

/* ---------- Light theme: warm-ivory / charcoal adaptation of the same brand (supplied artwork is never recoloured) ---------- */
:root[data-site-theme="light"]{--cherry:#FFF3E5;--brass:#AC7D35;--antique:#4A101B}
:root[data-site-theme="light"] .v30-feature,:root[data-site-theme="light"] .v30-modal{background:#FFF3E5}
:root[data-site-theme="light"] .v30-feature h3,:root[data-site-theme="light"] .v30-modal-title,:root[data-site-theme="light"] .v30-free{color:#4A101B}
:root[data-site-theme="light"] .v30-modal-bg{background:rgba(31,27,22,.7)}
:root[data-site-theme="light"] .v30-card:hover,:root[data-site-theme="light"] .v30-card:focus-visible{box-shadow:0 14px 30px rgba(60,40,10,.35)}
:root[data-site-theme="light"] .v30-story-art img{border-color:#AC7D35}
.v30-ficon{border-radius:12px}
