/* XD layout: topics pages. Shared by every app; colors only through var(--theme-*, <current default>) so apps without the theme keys keep their look. */
/* XD layout batch 1 (X2): browse landing (content/section.html, XD "Resources": 842px column, 26px title + search,
   hero = header ad, 22px section titles + See all, one-column sections as 293x176 image rows), course detail
   (content/course.html, XD topic category / lesson completed: 958px, title + rating + summary + counts + Course
   Progress left, 465x279 media right, centered Lessons | Comments tabs, lesson rows with state) and post detail (XD
   topic post: the same header, then a 622px centered article, CTA and comments).
   Roles: --theme-text, --theme-secondary-text (descriptions' secondary lines, handles), --theme-input-field (search,
   Write a Comment), --theme-tinted-banner ("..." pill), --theme-ratings (stars, else tintedBanner),
   --theme-progress-bar-line / -circle / -unfilled (Course Progress, else primaryButton), --theme-underscore (active
   tab), --theme-tinted-more-card (rules), --theme-success-green (completed), --theme-in-progress (started),
   --theme-primary-button (CTA), --theme-secondary-button (View more). */
.xt{--xt-rule:var(--theme-tinted-more-card,color-mix(in srgb,var(--theme-text,#000) 18%,transparent));
  --xt-muted:var(--theme-secondary-text,color-mix(in srgb,var(--theme-text,#000) 70%,transparent));
  --xt-field:var(--theme-input-field,color-mix(in srgb,var(--theme-text,#000) 9%,var(--theme-default-background,#fff)));
  box-sizing:border-box;width:100%;margin:0 auto;color:var(--theme-text,inherit)}
.xt *{box-sizing:border-box}
.xt h1,.xt h2,.xt h3{color:var(--theme-text,inherit)}
.xt-icon{display:block;flex:none}

/* ---- landing (section.html) ---- */
.xt-browse .album-page.xt{max-width:874px;padding:30px 16px 48px}
.xt .xt-top{display:flex;align-items:center;flex-wrap:wrap;gap:16px 72px;margin:0 0 32px}
.xt .xt-top h1{margin:0;font-size:26px;font-weight:700;line-height:1.2;min-width:0;overflow-wrap:anywhere}
.xt .xt-top .section-create{display:inline-flex;align-items:center;justify-content:center;min-width:40px;min-height:40px;color:inherit;text-decoration:none}
.xt .xt-search{position:relative;display:flex;align-items:center;flex:1 1 300px;max-width:474px;min-width:0;height:38px;margin:0;border-radius:6px;background:var(--xt-field);color:var(--theme-text,inherit)}
.xt .xt-search-icon{position:absolute;left:12px;top:50%;transform:translateY(-50%);display:flex;pointer-events:none}
.xt .xt-search input{flex:1;min-width:0;height:100%;margin:0;padding:0 10px 0 38px!important;border:0!important;border-radius:6px;background:transparent!important;box-shadow:none!important;color:inherit!important;font-size:15px}
.xt .xt-search input::placeholder{color:var(--xt-muted);opacity:1}
.xt .xt-hero{margin:0 0 26px}
.xt .xt-hero a{display:block}
.xt .xt-hero img{display:block;width:100%;height:auto;max-height:260px;object-fit:cover;border-radius:8px}
.xt-browse .category-scroll-list{margin:0 0 30px!important}
.xt-browse .category-header{display:flex;justify-content:space-between;align-items:baseline;gap:12px;margin:0 0 14px;font-size:22px;font-weight:700;line-height:1.2}
.xt-browse .title-for-category{min-width:0;overflow-wrap:anywhere}
.xt-browse .see-all{display:inline-flex;align-items:center;min-height:40px;font-size:14px;font-weight:500;letter-spacing:0;white-space:nowrap;color:var(--theme-text,inherit)!important;text-decoration:none}
.xt-browse .not-found-resources{display:flex;justify-content:center;margin-top:12px}
.xt-browse .not-found-text{margin:0;padding:12px 18px;border-radius:8px;background:var(--xt-field);color:var(--theme-text,inherit);font-size:18px;font-weight:600}

/* ---- row card (_xt_row.html): landing one-column sections and course lessons ---- */
.xt-rows{display:flex;flex-direction:column;gap:34px}
.xt-row{display:grid;grid-template-columns:293px minmax(0,1fr);gap:0 31px;align-items:start}
.xt-row-media{position:relative;aspect-ratio:293/176;border-radius:4px;overflow:hidden;background:color-mix(in srgb,var(--theme-text,#000) 8%,transparent)}
.xt-row-image{position:absolute;inset:0;display:block}
.xt-row-image img,.xt-row-image video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.xt-row-media .type-bg{position:absolute;inset:0;background-size:cover;background-position:center;filter:blur(8px)}
.xt-row-body{display:flex;flex-direction:column;min-width:0;padding-top:24px}
.xt-row-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.xt-row-title{margin:0;font-size:21px;font-weight:700;line-height:1.3;min-width:0;overflow-wrap:anywhere}
.xt-row-title a{color:var(--theme-text,inherit)!important;text-decoration:none}
.xt-row-title a:hover{text-decoration:underline}
.xt-row-title .episode-subtitle{display:block;font-size:13px;font-weight:500;color:var(--xt-muted)}
.xt-row-desc{margin:10px 0 0 4px;font-size:16px;line-height:1.3;color:var(--theme-text,inherit);overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.xt-row-meta{margin:4px 0 0 4px;font-size:14px;color:var(--xt-muted)}
.xt-row-tools{display:flex;align-items:center;gap:8px;flex:none;margin-top:-8px}
/* landing rows: the "..." pill sits on the image's top right corner (XD) */
.xt-browse .xt-row{position:relative}
.xt-browse .xt-row-tools{position:absolute;top:0;left:0;width:293px;height:0;margin:0}
.xt-browse .xt-row .xt-menu{position:absolute;top:4px;right:4px}
.xt-social{display:flex;align-items:center;gap:6px 18px;flex-wrap:wrap;margin-top:22px}
.xt-social a,.xt-social button,.xt-count{display:inline-flex;align-items:center;gap:6px;min-height:40px;min-width:40px;margin:0;padding:0;border:0;background:transparent;color:var(--theme-text,inherit)!important;font-size:13px;font-weight:700;text-decoration:none;cursor:pointer}
.xt-count{cursor:default}
/* "..." pill (tintedBanner) with an options menu */
.xt-menu{position:relative}
.xt-menu summary{display:flex;align-items:center;justify-content:center;width:44px;height:40px;list-style:none;cursor:pointer}
.xt-menu summary::-webkit-details-marker{display:none}
.xt-dots{display:flex;align-items:center;justify-content:center;gap:3px;width:34px;height:22px;border-radius:5px;background:var(--theme-tinted-banner,#EDEDED);box-shadow:0 0 0 1px rgba(0,0,0,.08)}
.xt-dots i{width:4px;height:4px;border-radius:50%;background:var(--theme-default-background,#1B1B1B)}
.xt-menu-list{position:absolute;z-index:5;top:100%;right:0;display:flex;flex-direction:column;min-width:140px;padding:6px 0;border-radius:8px;border:1px solid var(--xt-rule);
  background:var(--theme-more-card,var(--theme-default-background,#fff));box-shadow:0 6px 18px rgba(0,0,0,.25)}
.xt-menu-list a,.xt-menu-list button{display:flex;align-items:center;min-height:40px;padding:0 14px;border:0;background:transparent;color:var(--theme-text,inherit)!important;font-size:14px;font-weight:600;text-align:left;text-decoration:none;cursor:pointer}
.xt-menu-list a:hover,.xt-menu-list button:hover{background:color-mix(in srgb,var(--theme-text,#000) 8%,transparent)}
/* lesson state */
.xt-state{display:inline-flex;align-items:center;justify-content:center;min-width:40px;min-height:40px}
.xt-state-completed{color:var(--theme-success-green,#00BF2C)}
.xt-state-started{color:var(--theme-in-progress,var(--theme-primary-button,#657EEF))}
.xt-state-not_started{color:var(--theme-text,currentColor)}

/* ---- detail header (course.html) ---- */
.xt-detail{max-width:990px;padding:20px 16px 56px}
.xt-back{margin:0 0 8px}
.xt-back a{display:inline-flex;align-items:center;min-height:40px;font-size:16px;font-weight:600;color:var(--theme-text,inherit)!important;text-decoration:none}
.xt-hero{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,465px);gap:24px 52px;align-items:start}
.xt-info{min-width:0}
.xt-info .episode-subtitle{margin:0 0 4px;font-size:13px;color:var(--xt-muted)}
.xt-title{margin:0;font-size:26px;font-weight:700;line-height:1.25;overflow-wrap:anywhere}
.xt-rating{display:inline-flex;align-items:center;gap:8px;min-height:40px;margin:2px 0 0;color:var(--theme-ratings,var(--theme-tinted-banner,#F5B301))!important;text-decoration:none}
.xt-stars{display:inline-flex;gap:1px;font-size:19px;line-height:1}
.xt-stars i{font-style:normal;opacity:.35}.xt-stars i.on{opacity:1}
.xt-rating-count{font-size:14px;font-weight:600}
.xt-summary{margin:10px 0 0;font-size:16px;line-height:1.4;overflow-wrap:anywhere}
.xt-owner{margin:8px 0 0;font-size:13px;color:var(--xt-muted)}
.xt-actions{display:flex;align-items:center;flex-wrap:wrap;gap:4px 18px;margin:14px 0 0}
.xt-actions form{margin:0}
.xt-act{display:inline-flex;align-items:center;gap:6px;min-height:40px;min-width:40px;margin:0;padding:0;border:0;background:transparent!important;color:var(--theme-text,inherit)!important;font-size:14px;font-weight:600;text-decoration:none;cursor:pointer}
.xt-act.xt-flag{font-weight:500;font-size:13px;color:var(--xt-muted)!important}
.xt-progress{margin:30px 0 0;max-width:300px}
.xt-progress h2{margin:0 0 8px;font-size:16px;font-weight:700}
.xt-progress-row{display:flex;align-items:center;gap:10px}
.xt-progress-track{position:relative;flex:1;height:4px;margin:0 8px;border-radius:2px;background:var(--theme-progress-bar-unfilled,color-mix(in srgb,var(--theme-text,#000) 30%,transparent))}
.xt-progress-fill{position:absolute;left:0;top:0;bottom:0;width:var(--xt-progress,0%);border-radius:2px;background:var(--theme-progress-bar-line,var(--theme-primary-button,#657EEF))}
.xt-progress-ball{position:absolute;top:50%;left:var(--xt-progress,0%);width:16px;height:16px;border-radius:50%;transform:translate(-50%,-50%);background:var(--theme-progress-bar-circle,var(--theme-progress-bar-line,var(--theme-primary-button,#657EEF)))}
.xt-progress-text{font-size:13px;font-weight:600;white-space:nowrap}
.xt-cta{display:inline-flex;align-items:center;justify-content:center;min-width:180px;min-height:40px;margin:22px 0 0;padding:8px 22px;border-radius:8px;background:var(--theme-primary-button,#657EEF);color:var(--theme-inverse-text,#fff)!important;font-size:14px;font-weight:700;text-align:center;text-decoration:none}
.xt-media{position:relative;width:100%;aspect-ratio:465/279;overflow:hidden;background-size:cover;background-position:center}
.xt-media img,.xt-media video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block}

/* ---- course tabs + lessons ---- */
.xt-tabs{display:flex;justify-content:center;margin:44px 0 16px;border-bottom:1px solid var(--xt-rule)}
.xt-tabs a{display:flex;align-items:center;justify-content:center;min-width:94px;min-height:42px;padding:6px 18px;margin-bottom:-1px;border-bottom:2px solid transparent;color:var(--theme-text,inherit)!important;font-size:16px;font-weight:600;text-decoration:none}
.xt-tabs a.active{border-bottom-color:var(--theme-underscore,var(--theme-primary-button,currentColor))}
.xt-lessons{display:flex;flex-direction:column;gap:26px;padding-top:2px}
.xt-lesson .xt-row-body{padding-top:28px;padding-right:min(70px,6%)}
.xt-empty{margin:12px 0;color:var(--xt-muted)}
.xt-assets{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:28px 0 0}
.xt-assets a{display:block;aspect-ratio:16/10;overflow:hidden;border-radius:4px}
.xt-assets img{width:100%;height:100%;object-fit:cover}
.xt-files{margin-top:20px}
.xt-course .xt-article{margin:28px 0 0}
.xt-detail .detail-tabs{margin-top:30px}

/* ---- post body (centered article, CTA, comments) ---- */
.xt-body{max-width:622px;margin:56px auto 0;text-align:center}
.xt-article{font-size:14px;line-height:1.5;overflow-wrap:anywhere}
.xt-post .xt-article h1,.xt-post .xt-article h2,.xt-post .xt-article h3{font-size:21px;font-weight:700;margin:0 0 8px}
.xt-post .xt-article h4,.xt-post .xt-article h5{font-size:16px;font-weight:700;margin:22px 0 8px}
.xt-post .xt-article ul,.xt-post .xt-article ol{display:inline-block;text-align:left}
.xt-article img,.xt-article video,.xt-article iframe{display:block;max-width:min(100%,492px);height:auto;margin:22px auto;border-radius:4px}
.xt-article a{color:var(--theme-secondary-button,var(--theme-primary-button,#4AA4FF))}
.xt-body .xt-assets{grid-template-columns:repeat(auto-fill,minmax(140px,1fr))}
.xt-body .xt-cta{margin-top:36px;min-width:244px}
.xt-comments{max-width:622px;margin:48px auto 0}
.xt-detail .xt-comments{border:0;padding:0}
.xt-comment-form{display:flex;align-items:stretch;gap:0;margin:0 0 18px;background:var(--xt-field);box-shadow:0 3px 8px rgba(0,0,0,.18)}
.xt-comment-form textarea{flex:1;min-width:0;min-height:51px;margin:0;padding:15px 22px;border:0;resize:vertical;background:transparent;color:var(--theme-text,inherit);font-size:14px;font-weight:700}
.xt-comment-form textarea::placeholder{color:var(--theme-text,inherit);opacity:.9}
.xt-comment-form button{flex:none;min-width:64px;min-height:40px;margin:5px;padding:0 14px;border:0;border-radius:6px;background:var(--theme-primary-button,#657EEF);color:var(--theme-inverse-text,#fff);font-size:14px;font-weight:700}
.xt-comment{display:grid!important;grid-template-columns:56px minmax(0,1fr);gap:0 50px;align-items:start;padding:12px 16px!important;border:0!important}
.xt-comment img{width:56px;height:56px;border-radius:50%;object-fit:cover}
.xt-comment strong{display:block;font-size:14px;font-weight:600}
.xt-comment .xt-handle{display:block;font-size:13px;color:var(--xt-muted)}
.xt-comment p{margin:4px 0 0;font-size:13px;overflow-wrap:anywhere}
.xt-comment .xt-when{display:block;margin-top:4px;font-size:10px;font-weight:600}
.xt-more-comments summary{display:inline-flex;align-items:center;min-height:40px;padding:0 14px;list-style:none;cursor:pointer;font-size:13px;font-weight:600;color:var(--theme-secondary-button,#4AA4FF)}
.xt-more-comments summary::-webkit-details-marker{display:none}
.xt-more-comments[open] summary{display:none}

/* ---- responsive ---- */
@media (max-width:900px){
  .xt-hero{grid-template-columns:minmax(0,1fr) minmax(0,42%);gap:20px 28px}
  .xt-row{grid-template-columns:minmax(0,40%) minmax(0,1fr);gap:0 22px}
  .xt-browse .xt-row-tools{width:40%}
}
@media (max-width:640px){
  .xt-browse .album-page.xt{padding:20px 14px 36px}
  .xt .xt-top{gap:14px;margin-bottom:22px}
  .xt .xt-search{flex-basis:100%;max-width:none;height:42px}
  .xt-hero{grid-template-columns:minmax(0,1fr)}
  .xt-media{order:-1}
  .xt-title{font-size:23px}
  .xt-row{grid-template-columns:minmax(0,1fr);gap:12px}
  .xt-browse .xt-row-tools{width:100%}
  .xt-row-body,.xt-lesson .xt-row-body{padding-top:0;padding-right:0}
  .xt-row-title{font-size:19px}
  .xt-row-desc{font-size:15px;margin-left:0}
  .xt-social{margin-top:10px}
  .xt-tabs{margin-top:30px}
  .xt-body{margin-top:36px}
  .xt-assets{grid-template-columns:repeat(2,minmax(0,1fr))}
  .xt-comment{grid-template-columns:44px minmax(0,1fr);gap:0 14px;padding:10px 4px!important}
  .xt-comment img{width:44px;height:44px}
  .xt-comment-form textarea{padding:14px}
}

/* ---- overrides of the legacy browse / detail rules (site.css .c-album / .c-scroll, app.css .detail-actions) ---- */
.c-album .xt .album-header.xt-top{padding:0;justify-content:flex-start;flex-direction:row;align-items:center}
.c-album .xt .album-header.xt-top h1{margin:0!important;color:var(--theme-text,#000)}
.c-album .xt .album-header .xt-search{max-width:474px}
.c-scroll.xt-browse .category-scroll-list h2.category-header{margin:0 0 14px;padding:0!important;font-family:inherit;font-size:22px;font-weight:700;letter-spacing:0;text-transform:none;text-align:left}
.c-scroll.xt-browse .category-scroll-list h2 span,.c-scroll.xt-browse .category-scroll-list h2 a{color:var(--theme-text,#000)}
.c-scroll.xt-browse .category-scroll-list .xt-rows{margin:0}
.xt-actions.detail-actions{margin-top:14px}
.xt-actions .xt-act{flex-direction:row;white-space:nowrap}
.xt-actions .xt-act .counter{margin:0;font-size:14px;font-weight:600}
.xt-act .counter{display:inline;line-height:1}
.xt .xt-act,.xt .xt-social a,.xt .xt-back a{display:inline-flex!important}
.c-album.xt-browse{width:100%}
.c-album .album-page.xt{width:100%;margin-left:auto;margin-right:auto}
.c-album .xt .album-header.xt-top h1.section-header-label{font-size:26px;font-weight:700;line-height:1.2}

/* Poll cards (content/_tournament_card.html; iOS TournamentCell, laid out like the live CEO site's poll card). Colors
   only from the theme: the status badge is the round's button color (submission primaryButton, voting
   secondaryButton, end tertiaryButton, as iOS backgroundColor(for:); each falls back to primaryButton), the "..."
   button overflowButton (web addition) else primaryButton, with inverseText; title and timer the text color. Phones:
   two across; wider screens: cards share the column (one poll fills it, as on the live CEO site). */
.xp-cards{display:grid;gap:16px;grid-template-columns:repeat(auto-fill,minmax(160px,1fr))}
@media (min-width:768px){.xp-cards{grid-template-columns:repeat(auto-fit,minmax(300px,1fr))}}
.xp-card{position:relative;min-width:0;color:var(--theme-text,inherit)}
.xp-media{position:relative;display:block;aspect-ratio:16 / 9;border-radius:8px;overflow:hidden;background:var(--theme-tinted-background,rgba(127,127,127,.2))}
.xp-media img{width:100%;height:100%;object-fit:cover;display:block}
.xp-status{position:absolute;left:6px;bottom:6px;padding:3px 8px;border-radius:4px;font-size:11px;font-weight:700;letter-spacing:.3px;line-height:1.3;color:var(--theme-inverse-text,#fff)}
.xp-status-submission{background:var(--theme-primary-button,#4F4F4F)}
.xp-status-voting{background:var(--theme-secondary-button,var(--theme-primary-button,#4F4F4F))}
.xp-status-end{background:var(--theme-tertiary-button,var(--theme-primary-button,#4F4F4F))}
.xp-menu{position:absolute!important;top:2px;right:2px}
.xp-menu summary{width:40px;height:32px}
.xp-menu .xt-dots{width:32px;height:20px;background:var(--theme-overflow-button,var(--theme-primary-button,#4F4F4F));box-shadow:none}
.xp-menu .xt-dots i{background:var(--theme-inverse-text,#fff)}
.xp-title{display:block;margin:6px 4px 4px;font-size:14px;font-weight:700;line-height:1.35;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:inherit!important;text-decoration:none}
.xp-timer{display:flex;align-items:flex-start;gap:6px;font-variant-numeric:tabular-nums}
.xp-timer span{display:flex;flex-direction:column;align-items:center;min-width:34px}
.xp-timer b{font-size:15px;font-weight:700;line-height:1.2}
.xp-timer small{font-size:11px;font-weight:600;line-height:1.3;white-space:nowrap}
@media (max-width:767px){.xp-timer{gap:2px}.xp-timer small{font-size:10px}.xp-timer i{padding-top:4px}}
.xp-timer i{font-style:normal;font-weight:700;line-height:1.2;padding-top:6px}
