/* Public homepage, signed-in banner, and the two image slideshow panels. Real HTML/CSS: only the artwork is an image. */
:root{ --paper:#FFFDF6; --cream:#FEFCF5; --head-navy:#12274A; }
.home{ max-width:1080px; margin:0 auto; display:grid; gap:18px; }
body.door-mode .main{ padding-top:18px; }

/* hero: logo lockup + knight artwork */
.h-hero{ display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); overflow:hidden; background:#FDF8EE; }
.h-hero img{ display:block; width:100%; height:100%; object-fit:cover; }
.h-hero .h-logo{ object-fit:contain; }
.h-hero .h-knight{ object-position:center 30%; }

/* the four courses (Coach Training, Students, Tournament Director Training, Chess Clubs) */
.h-courses{ display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:18px; }
@media (max-width:1100px) and (min-width:901px){ .h-courses{ grid-template-columns:repeat(2,minmax(0,1fr)); } }
.h-card{ display:flex; flex-direction:column; overflow:hidden; text-decoration:none; color:var(--ink); background:var(--paper); transition:transform .15s ease, box-shadow .15s ease; }
.h-card:hover,.h-card:focus-visible{ transform:translateY(-3px); box-shadow:0 10px 22px rgba(14,43,62,.22); }
.h-card .h-art{ display:block; width:100%; aspect-ratio:10/7; object-fit:cover; border-bottom:2px solid var(--edge); }
.h-card .h-body{ padding:12px 16px 16px; display:flex; flex-direction:column; gap:6px; flex:1 1 auto; }
.h-card h2{ margin:0; font-size:clamp(20px,2.4vw,26px); line-height:1.1; font-family:var(--head); }
.h-card p{ margin:0; color:var(--ink-soft); font-size:16px; }
.h-go{ margin-top:auto; align-self:flex-start; display:inline-flex; align-items:center; justify-content:center; min-width:64px; min-height:44px; border-radius:7px; background:var(--charcoal); color:#fff; font-size:22px; font-weight:700; }
.h-card:hover .h-go,.h-card:focus-visible .h-go{ background:var(--charcoal-3); }

/* Play for Fun: the Endgame Challenge, in its own section */
.h-play{ display:grid; grid-template-columns:minmax(0,1.1fr) minmax(0,1fr); align-items:center; gap:10px; overflow:hidden; background:var(--paper); }
.h-play .h-play-text{ padding:18px 22px; }
.ribbon{ display:inline-block; background:var(--teal); color:#fff; font-family:var(--head); font-weight:800; font-style:italic; font-size:clamp(17px,2.2vw,22px); padding:5px 18px; transform:rotate(-2deg); border-radius:3px; margin-bottom:6px; }
.h-play h2{ margin:2px 0 4px; font-size:clamp(28px,4vw,42px); }
.h-play p{ margin:0 0 12px; color:var(--ink-soft); }
.h-play .btn{ min-height:46px; padding:0 22px; font-size:19px; text-decoration:none; display:inline-flex; align-items:center; gap:8px; }
.h-play img{ display:block; width:100%; height:100%; min-height:150px; object-fit:cover; }

/* Words from the chess world */
.h-words{ padding:16px 18px 20px; background:var(--paper); }
.h-words h2{ text-align:center; margin:0 0 12px; font-size:clamp(20px,2.6vw,28px); }
.h-words .quote-grid{ display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.h-words .quote-card{ position:relative; margin:0; padding:14px 16px 16px; background:#FFF9E8; border:1.5px solid var(--edge); border-radius:8px; display:flex; flex-direction:column; gap:6px; }
.h-words .qmark{ font-family:Georgia,serif; font-size:44px; line-height:.6; color:var(--teal); height:22px; }
.h-words .quote-card.is-opening .qmark{ display:none; }
.h-words .q-book{ display:none; width:34px; height:34px; mix-blend-mode:multiply; }
.h-words .quote-card.is-opening .q-book{ display:block; }
.h-words blockquote{ margin:0; font-size:17px; line-height:1.4; color:var(--ink); }
.h-words .quote-card.is-opening blockquote{ font-family:var(--head); font-weight:800; font-size:20px; }
.h-words .q-by{ color:var(--ink-soft); font-weight:600; font-size:15px; }
.h-words .quote-card.is-opening .q-by{ font-style:italic; }
.h-words .q-plain{ margin:0; font-size:15px; color:var(--ink-soft); }

/* two independent slideshow panels */
.h-media{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; align-items:start; }
.mp{ background:var(--paper); padding:12px 14px 14px; }
.mp-head{ display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:10px; }
.mp-head h2{ margin:0; font-size:clamp(19px,2.3vw,26px); }
.mp-ctl{ display:flex; gap:6px; }
.mp-ctl button{ min-width:44px; min-height:44px; border-radius:8px; border:1.5px solid var(--charcoal); background:var(--charcoal); color:#fff; font-size:20px; font-weight:700; line-height:1; cursor:pointer; }
.mp-ctl button:hover,.mp-ctl button:focus-visible{ background:var(--charcoal-3); }
.mp-ctl button[hidden]{ display:none; }
.mp-stage{ position:relative; height:clamp(260px,52vw,380px); background:#EDE4CC; border:1.5px solid var(--edge); border-radius:8px; overflow:hidden; }
.mp[data-panel=flyers] .mp-stage{ height:clamp(380px,100vw,520px); background:#E6DDC3; }
.mp-slide{ position:absolute; inset:0; margin:0; opacity:0; visibility:hidden; transition:opacity var(--mp-fade,600ms) ease, visibility 0s linear var(--mp-fade,600ms); }
.mp-slide.is-active{ opacity:1; visibility:visible; transition:opacity var(--mp-fade,600ms) ease, visibility 0s; }
.mp-open{ display:block; width:100%; height:100%; padding:0; border:0; background:transparent; cursor:zoom-in; }
.mp-slide img{ display:block; width:100%; height:100%; object-fit:cover; object-position:center 35%; }
.mp[data-panel=flyers] .mp-slide img{ object-fit:contain; object-position:center; }
.mp-empty{ position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px; text-align:center; padding:20px; color:var(--ink-soft); font-weight:600; }
.mp-empty svg{ width:64px; height:64px; opacity:.55; }
.mp-empty a{ color:var(--slate); font-weight:700; }
.mp-dots{ display:flex; justify-content:center; gap:6px; margin-top:10px; min-height:14px; flex-wrap:wrap; }
.mp-dots button{ width:14px; height:14px; padding:0; border-radius:50%; border:1.5px solid var(--charcoal); background:transparent; cursor:pointer; position:relative; }
.mp-dots button::after{ content:""; position:absolute; inset:-15px -5px; }
.mp-dots button[aria-current=true]{ background:var(--brass); border-color:#8A5F06; }
.mp-count{ text-align:center; font-size:13px; color:var(--ink-soft); margin:4px 0 0; }

/* enlarge */
.mp-lightbox{ position:fixed; inset:0; z-index:2000; display:flex; align-items:center; justify-content:center; background:rgba(14,18,22,.92); padding:max(12px,env(safe-area-inset-top,0px)) 12px 12px; }
.mp-lightbox[hidden]{ display:none; }
.mp-lightbox img{ max-width:min(96vw,1200px); max-height:86vh; width:auto; height:auto; object-fit:contain; background:#fff; border-radius:4px; }
.mp-lightbox .lb-x,.mp-lightbox .lb-nav{ position:absolute; min-width:48px; min-height:48px; border-radius:50%; border:2px solid #fff; background:rgba(30,41,49,.9); color:#fff; font-size:24px; cursor:pointer; }
.mp-lightbox .lb-x{ top:max(10px,env(safe-area-inset-top,0px)); right:10px; }
.mp-lightbox .lb-prev{ left:8px; top:50%; transform:translateY(-50%); }
.mp-lightbox .lb-next{ right:8px; top:50%; transform:translateY(-50%); }
.mp-lightbox .lb-cap{ position:absolute; bottom:10px; left:0; right:0; text-align:center; color:#fff; font-size:15px; padding:0 70px; }

/* signed-in banner: one title, Atlanta skyline with the six pieces, then the equipment strip */
.d-banner{ text-align:center; overflow:hidden; background:var(--cream); padding:14px 14px 0; }
.d-title{ margin:0; font-family:Rockwell,'Rockwell Extra Bold','Roboto Slab',Georgia,'Noto Serif',serif; font-weight:900; font-size:clamp(30px,6.6vw,66px); line-height:1.04; color:var(--head-navy); letter-spacing:-.01em; text-shadow:0 2px 0 rgba(255,255,255,.9); }
.d-title::after{ content:""; display:block; height:7px; width:min(86%,640px); margin:6px auto 0; background:var(--brass); border-radius:50% 50% 50% 50%/100% 100% 0 0; transform:rotate(-1.2deg); }
.d-sub{ margin:8px 0 6px; font-weight:800; text-transform:uppercase; letter-spacing:.14em; font-size:clamp(11px,1.7vw,18px); color:#1F3A66; }
.d-skyline{ display:block; width:100%; height:auto; mix-blend-mode:multiply; margin-top:2px; }
.d-equip{ display:flex; align-items:center; justify-content:space-around; gap:10px; padding:12px 16px; background:linear-gradient(#FFFDF6,#F6EDD6); overflow:hidden; }
.d-equip img{ display:block; width:auto; height:clamp(92px,19vw,168px); max-width:32%; object-fit:contain; mix-blend-mode:multiply; }
.d-row{ display:grid; grid-template-columns:minmax(0,1.25fr) minmax(0,1fr); gap:16px; margin-top:16px; }
.d-start{ padding:16px 20px; display:flex; flex-direction:column; gap:12px; background:var(--paper); }
.d-start .d-lede{ display:flex; gap:12px; align-items:flex-start; }
.d-start .d-lede img{ width:48px; height:48px; flex:0 0 48px; mix-blend-mode:multiply; }
.d-start .d-lede p{ margin:0; font-size:18px; line-height:1.4; color:var(--ink); }
.d-start .btn-row{ display:flex; flex-wrap:wrap; gap:10px; }
.d-start .btn{ text-decoration:none; display:inline-flex; align-items:center; min-height:46px; }
.d-ring{ padding:16px 18px; display:flex; flex-direction:column; align-items:center; gap:10px; background:var(--paper); text-align:left; }
.d-ring .small{ color:var(--ink-soft); font-size:15px; }
.d-ring .ring-bg{ stroke:#DDD2B4; } .d-ring .ring-fg{ stroke:var(--brass); } .d-ring .big{ color:var(--ink); } .d-ring .ring-mid{ color:var(--ink); }

@media (max-width:900px){
  .h-courses{ grid-template-columns:1fr; }
  .h-card{ flex-direction:row; align-items:stretch; }
  .h-card .h-art{ width:42%; aspect-ratio:auto; border-bottom:0; border-right:2px solid var(--edge); flex:0 0 42%; }
  .h-words .quote-grid{ grid-template-columns:1fr; }
  .h-media{ grid-template-columns:1fr; }
  .d-row{ grid-template-columns:1fr; }
}
@media (max-width:640px){
  .h-hero{ grid-template-columns:1fr; }
  .h-hero .h-knight{ height:170px; }
  .h-play{ grid-template-columns:1fr; }
  .h-play img{ min-height:120px; max-height:170px; }
  .h-card .h-art{ width:38%; flex-basis:38%; }
  .h-card p{ font-size:15px; }
  .d-equip{ padding:10px 8px; gap:6px; }
  .d-equip img{ height:clamp(78px,24vw,110px); }
  .mp[data-panel=flyers] .mp-stage{ height:min(130vw,520px); }
}
@media (prefers-reduced-motion:reduce){ .mp-slide,.mp-slide.is-active{ transition:none!important; } .h-card{ transition:none; } .h-card:hover{ transform:none; } }
.d-row{ margin-bottom:18px; }
.h-words .quote-card{ padding-right:46px; }
.h-words .q-piece{ position:absolute; right:12px; bottom:10px; width:30px; height:30px; opacity:.9; }
.h-words .q-piece svg{ width:100%; height:100%; display:block; }
.ribbon{ transform:rotate(-2deg); font-style:italic; }

/* ---------- compact in-app header: title, Atlanta banner and equipment in one short band ---------- */
.d-head{ display:grid; grid-template-columns:auto minmax(0,1fr); align-items:center; column-gap:18px; row-gap:4px; padding:8px 14px 10px; text-align:left; overflow:hidden; }
.d-head .d-titlebar{ grid-column:1 / -1; display:flex; flex-wrap:wrap; align-items:baseline; gap:0 16px; }
.d-head .d-title{ font-size:clamp(22px,2.5vw,32px); line-height:1.1; text-shadow:none; -webkit-text-stroke:.8px var(--head-navy); }
.d-head .d-title::after{ height:4px; width:100%; margin:2px 0 0; transform:rotate(-.6deg); }
.d-head .d-sub{ margin:0; font-size:12px; letter-spacing:.12em; }
.d-head .d-skyline{ height:clamp(104px,21vh,168px); width:auto; max-width:100%; margin:0; }
.d-head .d-equip{ display:flex; align-items:center; justify-content:space-evenly; gap:8px; padding:0; background:none; border:0; margin:0; overflow:visible; }
.d-head .d-equip img{ height:clamp(58px,11vh,92px); width:auto; max-width:32%; }
.d-start,.d-ring{ padding:12px 16px; }
.d-start{ gap:10px; } .d-start .d-lede p{ font-size:16px; line-height:1.4; }
.d-start .d-lede img{ width:40px; height:40px; flex-basis:40px; }
.d-ring{ gap:6px; } .d-ring .ring-wrap{ width:78px; height:78px; } .d-ring .small{ font-size:14px; line-height:1.4; }
.d-row{ margin:0; }
.main{ padding-top:16px; }
@media (max-width:640px){
  .d-head{ grid-template-columns:1fr; padding:8px 12px 10px; }
  .d-head .d-title{ font-size:clamp(20px,6vw,26px); }
  .d-head .d-skyline{ width:100%; height:auto; max-height:150px; object-fit:contain; }
  .d-head .d-equip img{ height:clamp(50px,15vw,70px); }
}
/* lesson pages: a small header, so the lesson text and the playable board come first */
body.no-scatter .main{ padding-top:10px; }
body.no-scatter .crumbs{ font-size:14px; margin-bottom:2px; }
body.no-scatter .lesson-head{ padding-bottom:8px; margin-bottom:2px; gap:8px; align-items:center; }
body.no-scatter .lesson-head h1{ font-size:clamp(22px,2.4vw,28px); margin:0; line-height:1.15; }
body.no-scatter .lesson-kicker{ font-size:13px; margin-bottom:0; }
body.no-scatter .lesson-head .btn,body.no-scatter .lesson-head button{ min-height:38px; padding-top:4px; padding-bottom:4px; font-size:14px; }
body.no-scatter .lesson-head + p.small,body.no-scatter .page > p.small[data-aud=coach]{ font-size:13px; margin:4px 0 0; }
body.no-scatter .tabs{ margin:6px 0 10px; }
body.no-scatter .tabs button{ min-height:42px; padding:8px 14px; }
.d-head .d-equip img{ height:clamp(66px,13vh,100px); }
.d-start .btn{ min-height:42px; padding:0 15px; font-size:15px; }
.d-start .btn-row{ gap:8px; flex-wrap:wrap; }
.d-ring .ring-wrap{ width:66px; height:66px; } .d-ring .small{ font-size:13.5px; }
.d-ring{ padding:10px 14px; gap:4px; }
@media (max-width:640px){ .d-head .d-equip img{ height:clamp(50px,15vw,70px); } .d-start .btn{ min-height:46px; font-size:15px; } .d-ring .ring-wrap{ width:72px; height:72px; } }
body.no-scatter .page > p.small[data-aud=coach]{ max-width:none; }
body.no-scatter .sec-h{ margin-top:14px; margin-bottom:6px; }
body.no-scatter .sec-h h2,body.no-scatter h2.sec-h{ font-size:22px; margin-top:12px; margin-bottom:6px; }
body.no-scatter .sec-h .n{ font-size:18px; }
body.no-scatter .summary{ padding:10px 14px; margin-top:0; margin-bottom:8px; }
body.no-scatter .summary h2{ font-size:15px; margin:0 0 4px; }
body.no-scatter .summary ul,body.no-scatter .summary ol{ margin:0; padding-left:18px; }
body.no-scatter .summary li{ font-size:15px; line-height:1.35; margin:2px 0; }
body.no-scatter .act-picker{ gap:6px; margin-bottom:8px; }
body.no-scatter .act-picker .btn{ min-height:40px; padding-top:4px; padding-bottom:4px; font-size:14px; }
/* equipment images: scale proportionally, never squeezed */
.d-head .d-equip img{ height:auto; width:auto; max-height:clamp(66px,13vh,100px); max-width:32%; flex:0 1 auto; min-width:0; object-fit:contain; }
@media (max-width:640px){ .d-head .d-equip img{ max-height:clamp(50px,15vw,70px); } }
