/* ==========================================================================
   Modern Chess — client site stylesheet
   Combined from static/CSS/Main.css + templates/layout/mc.css (Bootstrap-free)
   One rule per line. Sections:
     1. Tokens            7. Feedback                13. Select (sl-) & Modal
     2. Base              8. Cards & media           14. Calendar (cal-)
     3. Utilities         9. Dropdown (dd-)          15. Chess board
     4. Layout           10. Lists & navigation      16. Chess components
     5. Content pages    11. Buttons (mc-btn)        17. Legacy CMS content
     6. Labels, badges   12. Forms

   Section order matters: some elements carry classes from several sections
   (e.g. "dd-trigger mc-btn", "dd-filter mc-input", "sl-search mc-input"), and
   the later section must win. Keep dd- before buttons and forms before sl-.

   Header and footer styles live in their templates; page-specific styles
   live in their own files (e.g. analysis-board.css). Both load after this one.
   ========================================================================== */


/* 1. TOKENS
   ========================================================================== */
:root {
  /* brand & links */
  --mc-brand: #00a9e0;
  --mc-link: #337ab7;
  --mc-link-hover: #23527c;
  --mc-red: #cc0000;

  /* text */
  --mc-text: #1f2328;
  --mc-text-secondary: #57606a;
  --mc-text-muted: #8b949e;
  --mc-text-faint: #9ca3af;

  /* surfaces & borders */
  --mc-surface: #ffffff;
  --mc-surface-muted: #eef1f5;
  --mc-border: #d0d7de;
  --mc-border-light: #e8ebee;

  /* accent (dropdowns, selects, calendar, lists) */
  --mc-accent: #0a66c2;
  --mc-accent-bg: #eaf2fb;

  /* shape, depth & motion */
  --mc-radius-md: 6px;
  --mc-radius-lg: 10px;
  --mc-shadow: 0 20px 50px -12px rgba(15, 17, 21, 0.35);
  --mc-backdrop: rgba(15, 17, 21, 0.55);
  --mc-duration: 220ms;
  --mc-easing: cubic-bezier(0.22, 1, 0.36, 1);
}


/* 2. BASE
   ========================================================================== */
@font-face { font-family: "NothingYouCouldDo"; src: url(https://static.modern-chess.com/Fonts/NothingYouCouldDo.ttf) format("truetype"); }

html { box-sizing: border-box; font-size: 62.5%; }
*, *::before, *::after { box-sizing: border-box; }
body { font-size: 1.6rem; line-height: 1.6; margin: 0; padding-top: 70px; font-family: "Open Sans", Arial, Helvetica, sans-serif; background-color: #f2f0ea; }

h1, h2, h3, h4, h5, h6 { color: #333; margin: 0 0 10px 0; padding: 5px 0; font-weight: 500; line-height: 1.5; }
h1 { font-size: 3.2rem; margin: 10px 0 30px 0; font-weight: 400; }
h2 { font-size: 2.6rem; }
h3 { font-size: 2.2rem; font-weight: 600; }
h4 { font-size: 1.9rem; }
h5 { font-size: 1.7rem; }
h1 small, h2 small { font-size: 70%; display: inline-block; position: relative; top: -0.1em; }
h2 a, h3 a, h4 a, h5 a, h6 a { color: #333; border-bottom: none; }
h2 a:hover, h3 a:hover, h4 a:hover, h5 a:hover, h6 a:hover { color: #205b8c !important; text-decoration: none; }

p { margin: 0 0 10px; }
hr { margin-top: 20px; margin-bottom: 20px; border: 0; border-top: 1px solid #eeeeee; }

button, a { transition: all .3s; }
button, input, select, textarea { font: inherit; margin: 0; color: inherit; }

a { color: var(--mc-link); text-decoration: none; }
a:hover { color: var(--mc-link-hover); text-decoration: none; }
a:focus { outline: none; }
a.link { text-decoration: none; border-bottom: 1px solid transparent; }
a.link:hover { border-color: var(--mc-link); }

@media (max-width: 767px) {
    body { font-size: 1.5rem; padding-top: 50px; }
    h1 { font-size: 2.8rem; }
    h2 { font-size: 2.2rem; }
    h3 { font-size: 2.0rem; }
    h4 { font-size: 1.8rem; }
    h5 { font-size: 1.6rem; }
}


/* 3. UTILITIES
   ========================================================================== */
.hidden { display: none; }
.text-center { text-align: center; }
.center-block { display: block; margin-left: auto; margin-right: auto; }
.icon-left  { margin-right: 9px; }
.icon-right { margin-left: 9px; }
.mc-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.mc-img-responsive, img.mc-responsive { max-width: 100%; height: auto; display: block; }


/* 4. LAYOUT (container, page, grid, item lists)
   ========================================================================== */
.mc-container { margin: 0 auto; padding: 0 15px; }

body.default .page, body.profile .page { background-color: white; border: 1px solid rgba(0, 0, 0, 0.15); border-radius: 8px; margin-bottom: 40px; padding: 20px 30px; }
body.profile { background: #f8f9fa; }

.mc-layout { display: flex; flex-wrap: wrap; gap: 20px 30px; }
.mc-layout > .sidebar, .mc-layout > .main { width: 100%; min-width: 0; }

/* 12-column grid: full width on mobile, fixed fractions from 768px */
.row { display: flex; flex-wrap: wrap; margin-left: -15px; margin-right: -15px; }
.col-1, .col-2, .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9, .col-10, .col-11, .col-12 { box-sizing: border-box; width: 100%; min-width: 0; padding-left: 15px; padding-right: 15px; }

/* item lists: thumbnail column + text column */
.items .item { display: flex; flex-wrap: wrap; margin-left: -15px; margin-right: -15px; margin-bottom: 10px; }
.items .item .left-column, .items .item .right-column { box-sizing: border-box; padding-left: 15px; padding-right: 15px; margin-top: 20px; flex: 0 0 100%; max-width: 100%; }
.items-wide .item { display: flex; flex-wrap: wrap; margin-left: -15px; margin-right: -15px; margin-bottom: 10px; }
.items-wide .item .left-column, .items-wide .item .right-column { box-sizing: border-box; padding-left: 15px; padding-right: 15px; margin-top: 20px; flex: 0 0 100%; max-width: 100%; }
.items-medium .item { display: flex; flex-wrap: wrap; margin-left: -15px; margin-right: -15px; margin-bottom: 10px; }
.items-medium .item .left-column, .items-medium .item .right-column { box-sizing: border-box; padding-left: 15px; padding-right: 15px; margin-top: 20px; flex: 0 0 100%; max-width: 100%; }
.item .authors { margin-top: 5px; font-size: 15px; color: #999; }

@media (max-width: 767px) {
    .mc-container { padding: 0 15px; }
    body.default .page { margin: 0; padding: 20px; }
}
@media (min-width: 768px) {
    .mc-container { max-width: 750px; }
    .mc-layout > .sidebar { width: calc(25% - 22.5px); }
    .mc-layout > .main { width: calc(75% - 7.5px); }

    .col-1  { flex: 0 0 8.33333%;  max-width: 8.33333%; }
    .col-2  { flex: 0 0 16.66667%; max-width: 16.66667%; }
    .col-3  { flex: 0 0 25%;       max-width: 25%; }
    .col-4  { flex: 0 0 33.33333%; max-width: 33.33333%; }
    .col-5  { flex: 0 0 41.66667%; max-width: 41.66667%; }
    .col-6  { flex: 0 0 50%;       max-width: 50%; }
    .col-7  { flex: 0 0 58.33333%; max-width: 58.33333%; }
    .col-8  { flex: 0 0 66.66667%; max-width: 66.66667%; }
    .col-9  { flex: 0 0 75%;       max-width: 75%; }
    .col-10 { flex: 0 0 83.33333%; max-width: 83.33333%; }
    .col-11 { flex: 0 0 91.66667%; max-width: 91.66667%; }
    .col-12 { flex: 0 0 100%;      max-width: 100%; }

    .offset-1  { margin-left: 8.33333%; }
    .offset-2  { margin-left: 16.66667%; }
    .offset-3  { margin-left: 25%; }
    .offset-4  { margin-left: 33.33333%; }
    .offset-5  { margin-left: 41.66667%; }
    .offset-6  { margin-left: 50%; }
    .offset-7  { margin-left: 58.33333%; }
    .offset-8  { margin-left: 66.66667%; }
    .offset-9  { margin-left: 75%; }
    .offset-10 { margin-left: 83.33333%; }
    .offset-11 { margin-left: 91.66667%; }

    .items .item .left-column { flex: 0 0 25%; max-width: 25%; }
    .items .item .right-column { flex: 0 0 75%; max-width: 75%; }
    .items-wide .item .left-column { flex: 0 0 41.66667%; max-width: 41.66667%; }
    .items-wide .item .right-column { flex: 0 0 58.33333%; max-width: 58.33333%; }
    .items-medium .item .left-column { flex: 0 0 33.33333%; max-width: 33.33333%; }
    .items-medium .item .right-column { flex: 0 0 66.66667%; max-width: 66.66667%; }
}
@media (min-width: 992px) {
    .mc-container { max-width: 970px; }
}
@media (min-width: 1200px) {
    .mc-container { max-width: 1170px; }
}
@media (min-width: 1400px) {
    .mc-container { max-width: 1370px; }
}
@media (min-width: 480px) and (max-width: 767px) {
    .items .item .left-column { flex: 0 0 33.33333%; max-width: 33.33333%; }
    .items .item .right-column { flex: 0 0 66.66667%; max-width: 66.66667%; }
    .items-medium .item .left-column { flex: 0 0 33.33333%; max-width: 33.33333%; }
    .items-medium .item .right-column { flex: 0 0 66.66667%; max-width: 66.66667%; }
}
@media (max-width: 480px) {
    .items .item .left-column { flex: 0 0 70%; max-width: 70%; margin-left: 15%; margin-right: 15%; }
    .items .item .right-column { margin-top: 0; }
    .items-medium .item .right-column { margin-top: 0; }
}


/* 5. CONTENT PAGES (articles, orders, cart & purchase, course progress, misc)
   ========================================================================== */
.article img { margin: 20px 0; width: 400px; max-width: 100%; display: block; }
.article a { text-decoration: none; border-bottom: 1px solid transparent; }
.article a:hover { border-color: var(--mc-link); }
#article img { display: block; margin-right: auto; margin-left: auto; }

.abstract { margin-bottom: 35px; }
.abstract a { text-decoration: none; border-bottom: 1px solid transparent; }
.abstract a:hover { border-color: var(--mc-link); }

.article_meta { color: #777; font-size: 1.5rem; margin-bottom: 10px; border-bottom: 1px solid transparent; }
.article_meta a { border-bottom: 1px solid transparent; }
.article_meta a:hover { text-decoration: none; border-color: var(--mc-link-hover); }
.article_meta .fa, .article_meta .fas { padding-right: 3px; color: #aaa; text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.1); }
.article_meta .date { display: inline-block; margin-right: 15px; }
.article_meta .favorite { display: inline-block; margin-right: 10px; }
.article_meta .openings { display: inline-block; margin-right: 10px; }
.article_meta .authors { display: inline-block; margin-right: 10px; }
.article_meta .authors > a { display: inline-block; white-space: nowrap; margin-right: 7px; margin-bottom: 3px; }

.content strong { color: #555; }
.content h4, .form h4 { padding-top: 10px; color: #333; }
.content a, .form a { border-bottom: 1px solid transparent; padding: 0 1px; }
.content a:hover, .form a:hover { text-decoration: none; border-bottom-color: var(--mc-link-hover); }
.content.info { padding-bottom: 15px; }

.my-orders .order h2 { margin-bottom: 20px; }
.my-orders .order .order-info strong { width: 130px; display: inline-block; }
.my-orders .order p { margin-bottom: 15px; }
.my-orders .order .order-details h4 a { color: var(--mc-link) !important; }
.my-orders .order .order-details h4 a:hover { color: #205b8c !important; }

h3.price { margin: 0; padding: 0; color:#333; }
h3.price .del { color: var(--mc-red); font-size: 18px; text-decoration: line-through; padding-right:10px; }
.purchase_form { margin-bottom: 25px; text-align: right; }
.purchase_form label.price { text-align: right; display: block; font-weight: 600; }
.purchase_form h3.price { margin-bottom: 15px; }
div.row.price { margin-bottom: 20px; }
div.row.price label { padding-top: 5px; display: block; text-align: right; color: #333; }
.promotion-discount, .promotion-discount label, .promotion-discount h3.price { color: #205b8c; }

.course-progress { margin: 10px 0 15px; padding: 12px 14px; background: #fbf9f5; border: 1px solid #e5dfd3; border-radius: 6px; max-width: 520px; }
.course-progress-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 6px; }
.course-progress-percent { font-weight: 600; font-size: 1.5rem; color: var(--mc-text); }
.course-progress-meta { font-size: 1.3rem; color: var(--mc-text-secondary); }
.course-progress .mc-progress { height: 10px; margin-bottom: 10px; }
.course-progress-foot { display: flex; align-items: center; gap: 12px; }
.course-progress-foot .mc-btn { margin-left: auto; flex-shrink: 0; }
.course-progress-chapter { flex: 1; min-width: 0; font-size: 1.4rem; color: var(--mc-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.course-progress-label { color: var(--mc-text-secondary); margin-right: 4px; }

.clock-display { margin: 0 auto; border-spacing: 11px; border-collapse: separate; }
.clock-display td { width: 60px; text-align: center; vertical-align: middle; }
.clock-data { font-size: 33px; border: 1px solid #d4c8b4; border-radius: 3px; }
.clock-info { font-size: 13px; color: var(--mc-link); }
span.monospace { display: inline-block; width: 20px; }

#cookies-consent { opacity: 0; transition: opacity 1s; width: 250px; position: fixed; right: 30px; bottom: 50px; z-index: 10; background-color: #333; color: white; border-radius: 4px; padding: 20px 25px 30px 25px; }
#cookies-consent p { margin-bottom: 20px; }
#cookies-consent a { color: #89c0ef; text-decoration: underline; font-size: 16px; }
#cookies-consent button { font-size: 16px; padding: 8px 20px; }

@media (max-width: 767px) {
    .article_meta { font-size: 1.4rem; }
}
@media (max-width: 480px) {
    .course-progress-foot { flex-wrap: wrap; }
    .course-progress-foot .mc-btn { width: 100%; margin-left: 0; justify-content: center; }
}


/* 6. LABELS, BADGES & TAGS
   ========================================================================== */
.mc-label-group { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 11px; vertical-align: middle; }
.mc-label-group .dd-wrapper { display: inline-flex; align-items: center; vertical-align: middle; }
.mc-label { display: inline-block; line-height: normal; border-radius: 4px; font-weight: 600; font-size: 1.5rem; padding: 6px 12px; color: white; text-shadow: 0 0 3px rgba(0, 0, 0, 0.15); box-shadow: inset 0 0 1px rgba(0, 0, 0, .15); }
.mc-label.mc-small { font-size: 1.4rem; padding: 4px 10px; }
.mc-label.mc-disabled { background-color: #999; }
.mc-label.mc-success { background-color: #2e9e4f; }
.mc-label.mc-danger { background-color: #d9483f; }
.mc-label.mc-info { background-color: #2ba8c4; }
.mc-label.mc-violet { background-color: #9a67ea; }
.mc-label.mc-warning { background-color: #e6a23c; }
.mc-label.mc-premium { background: linear-gradient(135deg, #fee870, #fada27); color: black; font-weight: 700; text-shadow: 0 1px 2px rgba(255, 255, 255, 0.7); }
.mc-label.mc-platinum { background: linear-gradient(135deg, #e5ecf3, #d3dce3); color: #1a2b3f; font-weight: 700; text-shadow: 0 1px 2px rgba(255, 255, 255, 0.7); }
.mc-label.mc-arsenal { background: linear-gradient(135deg, #e0f0ff, #cce4f5); color: #0a3f5a; font-weight: 700; text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8); }
.mc-label.mc-tier { background: linear-gradient(135deg, #f9fafb, #f3f4f6); border: 1px solid #e5e7eb; color: #1f2937; text-shadow: 0 1px 2px rgba(255, 255, 255, 0.7); }
.mc-label.mc-academy { background: linear-gradient(135deg, #f9fafb, #f3f4f6); border: 1px solid #e5e7eb; color: #1f2937; text-shadow: 0 1px 2px rgba(255, 255, 255, 0.7); }
.mc-label.mc-favorite { color: #b45309; background: #fff6d3; font-weight: 500; text-shadow: none; box-shadow: none; }

.mc-badge { display: inline-block; font-size: 1.2rem; font-weight: 600; padding: 2px 8px; border-radius: 99px; margin-left: 6px; vertical-align: middle; color: #fff; }
.mc-badge.mc-free { background-color: #5cb85c; }
.mc-badge.mc-closed { background-color: #aaa; }
.mc-badge.mc-success { background: #5cb85c; color: #fff; }
.mc-badge.mc-lg, .mc-badge.mc-large { font-size: 1.4rem; padding: 4px 12px; }
.mc-badge-free { background: #e6f4ea; color: #1e7e34; }
.mc-badge-locked { background: var(--mc-surface-muted); color: var(--mc-text-muted); }

.opening-tag { display: inline-block; padding: 5px 9px; margin: 2px 7px 2px 0; font-size: 1.5rem; border-radius: 4px; text-decoration: none; color: #1a56db; background: #eff6ff; transition: all 0.2s ease; border: none !important; }
.opening-tag:hover { color: #1e40af; background: #dbeafe; border-color: transparent; transform: translateY(-1px); }
.feature-tag { display: inline-block; padding: 4px 9px; margin: 3px 7px 3px 0; font-size: 1.5rem; border-radius: 4px; text-decoration: none; color: #475569; background: #f3f7fc; transition: all 0.15s ease; }
.feature-tag i { font-size: 1.4rem; padding-right: 10px; opacity: 0.8; }
.favorite-tag { display: inline-block; padding: 5px 11px; margin: 2px 7px 2px 0; font-size: 1.5rem; border: none; border-radius: 4px; text-decoration: none; color: #b45309; background: #fff6d3; transition: all 0.2s ease; }
.favorite-tag:hover { color: #aa4b02; background: #ffeda6; transform: translateY(-1px); cursor: pointer; }
.favorite-tag.favorited { color: #dc2626; background: #fef2f2; }
.favorite-tag.favorited:hover { color: #b91c1c; background: #ffd1d1; }

.fide_title { font-weight: 700; color: var(--mc-red); }
.fide-title { color: var(--mc-red); }

@media (max-width: 767px) {
    .mc-label { font-size: 1.4rem; padding: 5px 10px; }
    .opening-tag { padding: 4px 9px; font-size: 1.4rem; }
    .favorite-tag { padding: 4px 11px; font-size: 1.4rem; }
    .feature-tag { font-size: 1.4rem; }
    .feature-tag i { display: none; font-size: 1.3rem; }
}


/* 7. FEEDBACK (site messages, alerts, toasts, tooltips, progress)
   ========================================================================== */
.site-message { margin-bottom: 20px; padding: 0; }
.site-message a img { transition: opacity .5s; width: 100%; min-height: 70px; }
.site-message a:hover img { opacity: 0.7; }
.mc-container.site-message { padding: 0; margin-bottom: 20px; }
.site-message .mc-thumbnail { width: auto; }
.text-message { text-align: center; margin-top: -19px; margin-bottom: 20px; min-height: 140px; }
.text-message a { text-decoration: none; border-bottom: 1px solid transparent; font-weight: 600; }

.mc-alert { position: relative; padding: 10px 14px; border-radius: 6px; margin-bottom: 30px; }
.mc-alert:has(.mc-alert-close) { padding-right: 40px; }
.mc-alert.mc-info    { background: #eaf2fb; color: #0a66c2; border: 1px solid #cfe3f7; }
.mc-alert.mc-success { background: #e6f4ea; color: #1e7e34; border: 1px solid #b7dfc0; }
.mc-alert.mc-danger  { background: #fbeaea; color: #a12622; border: 1px solid #f0c4c2; }
.mc-alert.mc-warning { background: #fcf3e3; color: #8a6116; border: 1px solid #f7e2b8; }
.mc-alert-close { position: absolute; top: 8px; right: 12px; padding: 0; border: none; background: none; color: inherit; font-size: 2rem; line-height: 1; opacity: 0.5; cursor: pointer; }
.mc-alert-close:hover { opacity: 0.8; }
.mc-alert-link { font-weight: 700; color: inherit; }
.mc-alert-link:hover { text-decoration: underline; }
.cart-alert .mc-alert { margin-bottom: 35px; }

.mc-toast-container { position: fixed; top: 100px; right: 24px; z-index: 1200; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.mc-toast { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--mc-radius-lg); background: #333; color: #fff; font-size: 1.4rem; box-shadow: 0 4px 8px rgba(0,0,0,0.2); opacity: 0; transform: scale(0.95); transition: opacity 200ms ease, transform 200ms ease; cursor: pointer; }
.mc-toast.mc-show { opacity: 1; transform: scale(1); }
.mc-toast-success { background: #2e7d32; }
.mc-toast-error { background: #c0392b; }
.mc-toast-warning { background: #b7791f; }
.mc-toast-close { background: none; border: none; color: inherit; font-size: 1.8rem; line-height: 1; cursor: pointer; margin-left: auto; padding: 0; }

.mc-tooltip { position: fixed; z-index: 1150; --mc-tooltip-gap: 8px; max-width: 240px; padding: 6px 10px; background: #1f2937; color: #fff; font-size: 1.3rem; line-height: 1.4; border-radius: 4px; box-shadow: 0 4px 12px rgba(0,0,0,0.18); opacity: 0; transform: scale(0.95); transition: opacity 120ms ease, transform 120ms ease; pointer-events: none; }
.mc-tooltip.mc-show { opacity: 1; transform: scale(1); }
.mc-tooltip-inner { position: relative; z-index: 1; }
.mc-tooltip-arrow { position: absolute; width: 8px; height: 8px; background: #1f2937; transform: rotate(45deg); }
.mc-tooltip-top    .mc-tooltip-arrow { bottom: -4px; left: 50%; margin-left: -4px; }
.mc-tooltip-bottom .mc-tooltip-arrow { top: -4px; left: 50%; margin-left: -4px; }
.mc-tooltip-left   .mc-tooltip-arrow { right: -4px; top: 50%; margin-top: -4px; }
.mc-tooltip-right  .mc-tooltip-arrow { left: -4px; top: 50%; margin-top: -4px; }
.info-icon { border: 2px solid #aaa; color: #aaa; border-radius: 50%; cursor: pointer; display: inline-block; width: 24px; height: 24px; line-height: 20px; text-align: center; padding-right: 1px; margin-left: 5px; }

.mc-progress { position: relative; width: 100%; height: 16px; background: var(--mc-surface-muted); border-radius: 99px; overflow: hidden; box-shadow: inset 0 1px 3px rgba(0,0,0,0.16); }
.mc-progress-bar { position: absolute; top: 0; left: 0; height: 100%; width: 0%; background-color: var(--mc-brand); border-radius: 99px; transition: width 300ms ease; }
.mc-progress-bar.mc-progress-success { background-color: #2e7d32; }
.mc-progress-bar.mc-progress-danger  { background-color: #c0392b; }
.mc-progress-bar.mc-progress-warning { background-color: #b7791f; }
.mc-progress-bar.mc-progress-striped { background-image: repeating-linear-gradient(45deg, rgba(255,255,255,0.15) 0, rgba(255,255,255,0.15) 8px, transparent 8px, transparent 16px); }
.mc-progress-bar.mc-progress-striped.mc-progress-animated { animation: mc-progress-stripes 1s linear infinite; }
.mc-progress.mc-progress-indeterminate .mc-progress-bar { width: 40%; transition: none; animation: mc-progress-indeterminate 1.2s ease-in-out infinite; }
@keyframes mc-progress-stripes { from { background-position: 0 0; } to { background-position: 22.63px 0; } } /* 16px pattern period / cos(45deg) — one full, seamless loop */
@keyframes mc-progress-indeterminate { 0% { left: -40%; } 100% { left: 100%; } }

@media (max-width: 767px) {
    .mc-container.site-message { margin-bottom: 0; aspect-ratio: unset; }
    .site-message .mc-thumbnail { padding: 0; box-shadow: none; border: none; border-radius: 0; margin-bottom: 0; }
    .site-message .mc-thumbnail img { border-radius: 0; min-height: 40px; }
    .text-message { margin-top: -14px; }
    .text-message.mc-alert { margin-bottom: 0; min-height: 130px; }
}
@media (prefers-reduced-motion: reduce) {
    .mc-tooltip { transition: none; }
    .mc-progress-bar { transition: none; }
    .mc-progress.mc-progress-indeterminate .mc-progress-bar { animation: none; left: 0; }
    .mc-progress-bar.mc-progress-striped.mc-progress-animated { animation: none; }
}


/* 8. CARDS & MEDIA
   ========================================================================== */
.mc-card { display: block; margin-bottom: 30px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); padding: 5px; border: 1px solid transparent; border-radius: 4px; transition: box-shadow .5s, border-color 1s; }
.mc-card h2 { display: block; padding: 9px 4px 4px 4px; text-align: center; font-size: 17px; margin: 0; line-height: 27px; }
.mc-card h2 strong { color: var(--mc-red); }
.mc-card img { transition: opacity .5s; }
.mc-card:hover { box-shadow: 0 1px 3px var(--mc-link); border-color: var(--mc-link); text-decoration: none; }
.mc-card:hover img { opacity: .7; }
.mc-card:hover h2 { color: var(--mc-link); }

.team .author { display: block; margin-bottom: 30px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); padding: 5px; border: 1px solid transparent; border-radius: 4px; transition: box-shadow .5s, border-color 1s; }
.team .author h2 { display: block; padding: 9px 4px 4px 4px; text-align: center; font-size: 17px; margin: 0; line-height: 27px; }
.team .author h2 strong { color: var(--mc-red); }
.team .author img { transition: opacity .5s; }
.team .author:hover { box-shadow: 0 1px 3px var(--mc-link); border-color: var(--mc-link); text-decoration: none; }
.team .author:hover img { opacity: .7; }
.team .author:hover h2 { color: var(--mc-link); }

.mc-thumbnail { display: block; width: fit-content; max-width: 100%; padding: 5px; margin: 0 auto 20px; line-height: 1.43; background-color: #fff; border: 1px solid #ccc; border-radius: 4px; transition: all 0.2s ease-in-out; }
.mc-thumbnail img { margin-left: auto; margin-right: auto; border-radius: 4px; }
.mc-thumbnail:hover, .mc-thumbnail:focus { opacity: 0.7; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); border-color: #0066cc; }

.mc-video-wrap { margin-bottom: 20px; }
.mc-video-responsive { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 4px; overflow: hidden; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); }
.mc-video-responsive iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }
.mc-video-responsive video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }

.offer-card { border-radius: 4px; margin-bottom: 30px; padding: 30px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); transition: box-shadow 0.3s ease; line-height: 1.6; }
.offer-card:hover { box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35); }
.offer-description { margin: 15px 0 25px; }
.offer-details { margin-bottom: 35px; }
.offer-details .row { margin-bottom: 15px; }
.offer-details label { font-weight: 600; margin-bottom: 10px; padding-top: 7px; }
.card-highlight { position: relative; overflow: hidden; }
.card-highlight::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, #f39c12, #e67e22, #27ae60, #3498db); }

.promo-code { display: inline-block; min-width: 150px; padding: 8px 16px; border-radius: 6px; font-family: 'Courier New', monospace; font-weight: bold; font-size: 0.95em; text-align: center; color: white; text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.15); background: linear-gradient(135deg, #f39c12, #e67e22); cursor: pointer; transition: all 0.3s ease; }
.promo-code:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(243, 156, 18, 0.3); }
.promo-code-red { background: linear-gradient(135deg, #e74c3c, #c0392b); }
.promo-code-violet { background: linear-gradient(135deg, #9b59b6, #8e44ad); }
.promo-code-orange { background: linear-gradient(135deg, #f39c12, #e67e22); }
.promo-code-blue { background: linear-gradient(135deg, #3498db, #2980b9); }
.promo-code-olive { background: linear-gradient(135deg, #c0b24d, #b0991c); }
.promo-code-coral { background: linear-gradient(135deg, #ff7f50, #e85d4f); }

@media (min-width: 768px) {
    .mc-video-wrap { width: 66.667%; margin-left: 16.667%; }
}
@media (min-width: 480px) and (max-width: 768px) {
    .img-profile { min-height: calc(50vw - 35px); }
}
@media (max-width: 480px) {
    .img-profile { min-height: calc(100vw - 50px); }
}


/* 9. DROPDOWN (dd-) — used by Dropdown.js, Select.js, popovers
   ========================================================================== */
.dd-wrapper { position: relative; display: inline-block; --dd-gap: 4px; --dd-gap-arrow: 7px; }
.dd-trigger { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; cursor: pointer; color: var(--mc-text); line-height: 1.4; white-space: nowrap; background: transparent; border: none; }
.dd-trigger:hover:not(.mc-btn):not(.mc-label) { background: rgba(0, 0, 0, 0.05); color: #111827; border-radius: 4px; }
.dd-trigger .dd-arrow { font-size: 12px; transition: transform 0.15s; display: inline-block; flex-shrink: 0; }
.dd-trigger.open .dd-arrow { transform: rotate(180deg); }
.dd-trigger .dd-icon { flex-shrink: 0; }
.dd-trigger .dd-trigger-label:empty { display: none; }
.dd-trigger-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }

.dd-menu { position: absolute; top: calc(100% + var(--dd-gap)); left: 0; min-width: 180px; background: var(--mc-surface); border: 0.5px solid var(--mc-border); border-radius: 4px; padding: 4px 0; z-index: 1010; display: none; box-shadow: 0 4px 16px rgba(0,0,0,0.10); }
.dd-menu.right { right: 0; left: auto; }
.dd-menu.open  { display: block; }
.dd-menu:has(.dd-menu-scroll) { padding: 0; }
.dd-menu-scroll { padding: 4px 0; }
.dd-menu::-webkit-scrollbar, .dd-menu-scroll::-webkit-scrollbar { width: 4px; }
.dd-menu::-webkit-scrollbar-track, .dd-menu-scroll::-webkit-scrollbar-track { background: transparent; }
.dd-menu::-webkit-scrollbar-thumb, .dd-menu-scroll::-webkit-scrollbar-thumb { background: var(--mc-border); border-radius: 99px; }

/* placement — which side of the trigger the menu opens on (default: bottom) */
.dd-menu.pop-top   { top: auto; bottom: calc(100% + var(--dd-gap)); }
.dd-menu.pop-left  { top: 0; left: auto; right: calc(100% + var(--dd-gap)); }
.dd-menu.pop-right { top: 0; left: calc(100% + var(--dd-gap)); }

/* arrow */
.dd-menu-arrow { position: absolute; width: 10px; height: 10px; background: var(--mc-surface); border: 0.5px solid var(--mc-border); transform: rotate(45deg); }
.dd-menu:not(.pop-top):not(.pop-left):not(.pop-right) .dd-menu-arrow { top: -5px; border-bottom: none; border-right: none; }
.dd-menu.pop-top   .dd-menu-arrow { bottom: -5px; top: auto; border-top: none; border-left: none; }
.dd-menu.pop-left  .dd-menu-arrow { right: -5px; left: auto; top: 14px; border-bottom: none; border-left: none; }
.dd-menu.pop-right .dd-menu-arrow { left: -5px; top: 14px; border-top: none; border-right: none; }
.dd-menu:not(.pop-left):not(.pop-right).right .dd-menu-arrow { left: auto; right: 14px; }
.dd-menu:not(.pop-left):not(.pop-right):not(.right) .dd-menu-arrow { left: 14px; }
.dd-menu:has(.dd-menu-arrow)           { top: calc(100% + var(--dd-gap-arrow)); }
.dd-menu:has(.dd-menu-arrow).pop-top   { top: auto; bottom: calc(100% + var(--dd-gap-arrow)); }
.dd-menu:has(.dd-menu-arrow).pop-left  { top: 0; left: auto; right: calc(100% + var(--dd-gap-arrow)); }
.dd-menu:has(.dd-menu-arrow).pop-right { top: 0; left: calc(100% + var(--dd-gap-arrow)); }

/* items */
.dd-item { padding: 8px 14px; cursor: pointer; color: var(--mc-text); white-space: nowrap; display: flex; align-items: center; gap: 15px; text-decoration: none; }
.dd-item:hover   { background: var(--mc-surface-muted); }
.dd-item.danger  { color: var(--mc-red); }
.dd-item.selected { background: var(--mc-accent-bg); color: var(--mc-accent); font-weight: 500; }
.dd-item.active { background: var(--mc-surface-muted); box-shadow: inset 2px 0 0 var(--mc-accent); }
.dd-divider { border: none; border-top: 0.5px solid var(--mc-border-light); margin: 4px 0; }
.dd-group-label { font-size: 12px; color: var(--mc-text-muted); padding: 6px 14px 2px; font-weight: 500; }

/* filter box */
.dd-filter-wrap { padding: 10px; }
.dd-filter { width: 100%; padding: 6px 12px; font-family: inherit; border: 0.5px solid var(--mc-border); border-radius: var(--mc-radius-md); background: var(--mc-surface-muted); color: var(--mc-text); outline: none; }
.dd-filter:focus { border-color: var(--mc-accent); }
.dd-no-results { padding: 10px 14px; font-size: 13px; color: var(--mc-text-muted); text-align: center; }

/* popover content (custom HTML instead of a menu) */
.dd-popup { min-width: 240px; }
.dd-popup .dd-menu-scroll { padding: 0; } /* .dd-popup-body supplies its own padding instead */
.dd-popup-body { padding: 14px 16px; font-size: 1.4rem; line-height: 1.5; color: var(--mc-text); }
.dd-popup-body a { color: var(--mc-link); border-bottom: none; }
.dd-popup-body a:hover { color: var(--mc-accent); text-decoration: underline; text-underline-offset: 3px; }
.dd-popup-body:has(.sl-multi-body) { padding: 0; }
.dd-popup-body:has(.cal-container) { padding: 0; }


/* 10. LISTS & NAVIGATION (list, pagination, course nav, toolbar)
   ========================================================================== */
.mc-list { display: flex; flex-direction: column; gap: 2px; }
.mc-list-item { display: block; padding: 9px 12px; border-radius: 6px; color: var(--mc-text); text-decoration: none !important; }
.mc-list-item:hover { background: var(--mc-surface-muted); }
.mc-list-item.mc-list-item-disabled { cursor: not-allowed; color: var(--mc-text-muted); opacity: 0.8; }
.mc-list-item.active { background: var(--mc-accent-bg); color: var(--mc-accent); font-weight: 600; }

.mc-pagination { display: inline-block; padding-left: 0; margin: 20px 0; border-radius: var(--mc-radius-md); }
.mc-pagination > li { display: inline; }
.mc-pagination > li > a, .mc-pagination > li > span { position: relative; float: left; padding: 6px 12px; line-height: 1.42857143; text-decoration: none; color: var(--mc-link); background-color: #fff; border: 1px solid #ddd; margin-left: -1px; }
.mc-pagination > li:first-child > a, .mc-pagination > li:first-child > span { margin-left: 0; border-top-left-radius: var(--mc-radius-md); border-bottom-left-radius: var(--mc-radius-md); }
.mc-pagination > li:last-child > a, .mc-pagination > li:last-child > span { border-top-right-radius: var(--mc-radius-md); border-bottom-right-radius: var(--mc-radius-md); }
.mc-pagination > li > a:hover, .mc-pagination > li > span:hover, .mc-pagination > li > a:focus, .mc-pagination > li > span:focus { z-index: 2; color: var(--mc-link-hover); background-color: #eee; border-color: #ddd; }
.mc-pagination > li.active > a, .mc-pagination > li.active > span, .mc-pagination > li.active > a:hover, .mc-pagination > li.active > span:hover, .mc-pagination > li.active > a:focus, .mc-pagination > li.active > span:focus { z-index: 3; color: #fff; background-color: var(--mc-brand); border-color: #0094c4; text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.15); font-weight: 600; cursor: default; }
.mc-pagination > li.disabled > a, .mc-pagination > li.disabled > a:hover, .mc-pagination > li.disabled > a:focus, .mc-pagination > li.disabled > span, .mc-pagination > li.disabled > span:hover, .mc-pagination > li.disabled > span:focus { color: #aaa; background-color: #fff; border-color: #ddd; cursor: not-allowed; }

.course-nav { max-height: 500px; height: 500px; overflow-y: auto; position: relative; margin-bottom: 50px; display: flex; flex-direction: column; }
.course-nav .item { display: block; padding: 10px 15px; text-decoration: none; color: inherit; border: none; box-shadow: inset 0 0 1px rgba(0, 0, 0, 0.1); background-color: #f6f6f6; border-radius: 4px; margin: 2px; }
.course-nav .item:hover { background-color: #eee; }
.course-nav .item.disabled { color: #777; cursor: not-allowed; opacity: 0.9; }
.course-nav .item.active, .course-nav .item.active:focus { background-color: var(--mc-brand); color: white; font-weight: 600; }
.course-nav .authors { font-size: 14px; margin-top: 3px; }
.course-nav .item.active .authors { font-weight: 500; }
.course-nav .item.active .authors .fide_title { background-color: var(--mc-red); color: white; padding: 0 3px; border-radius: 4px; box-shadow: 0 0 1px rgba(0, 0, 0, 0.15); text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.15); }

.mc-toolbar { display: flex; flex-wrap: wrap; gap: 30px; margin-bottom: 30px; }
.mc-toolbar .mc-btn { flex: 0 1 calc(33.333% - 20px); display: flex; align-items: center; justify-content: center; text-decoration: none; padding: 12px 18px; font-size: 1.6rem; }

@media (max-width: 767px) {
    .course-nav { margin-bottom: 30px; }
    .mc-toolbar { flex-direction: column; gap: 15px; }
}
@media (max-width: 480px) {
    .course-nav { max-height: 400px; }
}


/* 11. BUTTONS (mc-btn, button groups)
   ========================================================================== */
.mc-btn { display: inline-flex; align-items: center; justify-content: center; padding: 10px 20px; border: 1px solid transparent; border-radius: 6px; font-size: 1.6rem; line-height: 1.33; text-align: center; white-space: nowrap; cursor: pointer; filter: brightness(1); transition: filter 0.25s ease, box-shadow 250ms ease, transform 100ms ease; }
.mc-btn:hover { filter: brightness(0.95); }
.mc-active-down:active { box-shadow: 0 1px 2px rgba(0,0,0,0.12); transform: translateY(1px); }

.mc-btn.mc-default { color: #333; background-color: #f3f4f6; text-shadow: 1px 1px rgba(255,255,255,0.5); border-bottom-color: #ccc; box-shadow: 0 3px 4px -2px rgba(0,0,0,0.25); }
.mc-btn.mc-default:hover { border-bottom-color: #ccc; }
.mc-btn.mc-primary { color: #fff; background-color: var(--mc-brand); border: 1px solid rgba(0,0,0,0.15); box-shadow: 0 4px 4px -2px rgba(0,0,0,0.3); text-shadow: 1px 1px 1px rgba(0,0,0,0.25); }
.mc-btn.mc-danger { color: #fff; background-color: #e74c3c; border: 1px solid rgba(0,0,0,0.15); box-shadow: 0 4px 4px -2px rgba(0,0,0,0.3); text-shadow: 1px 1px 1px rgba(0,0,0,0.25); }
.mc-btn.mc-white { color: #333; background-color: #fff; border: 1px solid #d1d5db; box-shadow: 0 4px 4px -2px rgba(0,0,0,0.1); text-shadow: none; }
.mc-btn.mc-success { color: #fff; font-weight: 500; background-color: #5cb85c; border: 1px solid rgba(0,0,0,0.15); box-shadow: 0 4px 4px -2px rgba(0,0,0,0.3); text-shadow: 1px 1px 1px rgba(0,0,0,0.25); }
.mc-btn.mc-payment:hover { box-shadow: 0 1px 3px var(--mc-link); border-color: rgba(0,0,0,0.15); }
.mc-btn.mc-payment:hover img { opacity: 0.7; }
.mc-danger.mc-outline { color: var(--mc-red); border-color: var(--mc-red); background-color: white; text-shadow: none; }

.mc-btn-group { display: inline-flex; }
.mc-btn-group .dd-trigger { display: inline-flex; align-items: center; justify-content: center; }
.mc-btn-group > .mc-btn, .mc-btn-group > .dd-wrapper > .mc-btn { border-radius: 0; position: relative; }
.mc-btn-group > .mc-btn:first-child, .mc-btn-group > .dd-wrapper:first-child > .mc-btn { border-radius: 6px 0 0 6px; }
.mc-btn-group > .mc-btn:last-child, .mc-btn-group > .dd-wrapper:last-child > .mc-btn { border-radius: 0 6px 6px 0; }
.mc-btn-group > .mc-btn:not(:first-child), .mc-btn-group > .dd-wrapper:not(:first-child) > .mc-btn { margin-left: -1px; }
.mc-btn-group:has(> :only-child) .mc-btn { border-radius: 6px; }
.mc-btn-group.mc-btn-group-justified { display: flex; align-items: stretch; width: 100%; }
.mc-btn-group.mc-btn-group-justified > .mc-btn, .mc-btn-group.mc-btn-group-justified > .dd-wrapper { flex: 1 1 0; width: 1%; min-width: 0; }
.mc-btn-group.mc-btn-group-justified > .dd-wrapper { display: flex; }
.mc-btn-group.mc-btn-group-justified > .dd-wrapper > .mc-btn { flex: 1 1 auto; width: 100%; min-width: 0; overflow: hidden; white-space: nowrap; }

.mc-btn.active { filter: brightness(0.9); color: #fff !important; border-color: #0087b3; box-shadow: inset 0 3px 5px rgba(0,0,0,0.12); }
.mc-btn.mc-white.active, .mc-btn.mc-default.active { color: black !important; }

.mc-btn .icon-left { margin-right: 7px; }
.mc-btn .icon-right { margin-left: 7px; }
.mc-btn.mc-lg .icon-left, .mc-btn.mc-large .icon-left { margin-right: 10px; }
.mc-btn.mc-lg .icon-right, .mc-btn.mc-large .icon-right { margin-left: 10px; }

.mc-btn.mc-block { display: flex; width: 100%; justify-content: center; }
.mc-btn.mc-block .dd-trigger-label { flex: 1; }
.sl-trigger.mc-block { min-width: 0; max-width: none; }
.dd-wrapper:has(.mc-btn.mc-block) { display: block; width: 100%; }

.mc-btn.mc-warning { color: #fff; background-color: #f0ad4e; border: 1px solid rgba(0,0,0,0.15); box-shadow: 0 4px 4px -2px rgba(0,0,0,0.2); text-shadow: 1px 1px 1px rgba(0,0,0,0.25); }
.mc-btn.mc-info { color: #fff; background-color: #5bc0de; border: 1px solid rgba(0,0,0,0.15); box-shadow: 0 4px 4px -2px rgba(0,0,0,0.2); text-shadow: 1px 1px 1px rgba(0,0,0,0.25); }

.mc-btn.mc-lg, .mc-btn.mc-large { padding: 10px 16px; font-size: 1.8rem; }
.mc-btn.mc-md, .mc-btn.mc-medium { padding: 6px 15px 7px 15px; font-size: 1.6rem; }
.mc-btn.mc-sm, .mc-btn.mc-small { padding: 5px 15px 6px 15px; font-size: 1.5rem; }

@media (max-width: 480px) {
    .mc-btn-group.mc-btn-group-justified > .mc-btn, .mc-btn-group.mc-btn-group-justified > .dd-wrapper > .mc-btn { padding-left: 8px; padding-right: 8px; font-size: 14px; }
}


/* 12. FORMS (form layout, inputs, fields, password reveal, checkbox/radio, switch, filters)
   ========================================================================== */
.form-row { align-items: center; margin-bottom: 15px; }
.form-label { margin: 0 0 5px 0; font-weight: 700; }
.form-actions { margin-top: 30px; margin-bottom: 30px; }

.mc-input { width: 100%; line-height: 1.33; padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 1.6rem; outline: none; transition: border-color var(--mc-duration), box-shadow var(--mc-duration); }
.mc-input:hover { border-color: #80bdff; box-shadow: 0 0 0 3px rgba(213, 213, 213, 0.5); }
.mc-input:focus { border-color: #80bdff; box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25); }
.mc-input[readonly], .mc-input:disabled { background-color: #f3f4f6; color: #6b7280; cursor: default; }
.mc-input:disabled { cursor: not-allowed; }

.mc-field { display: flex; flex-direction: column; height: 100%; }
.mc-field .mc-input { flex: 0 0 70%; resize: vertical; margin-bottom: 15px; }
.mc-field.has-error .mc-input { border-color: var(--mc-red); box-shadow: 0 0 0 3px rgba(204, 0, 0, 0.15); }
.mc-field.has-success .mc-input { border-color: #2e7d32; }

.password-reveal { position: relative; }
.password-reveal .mc-input { width: 100%; box-sizing: border-box; padding-right: 44px; }
.password-reveal .mc-input::-ms-reveal, .password-reveal .mc-input::-ms-clear { display: none; }
.password-reveal-btn { position: absolute; top: 0; right: 0; bottom: 0; width: 44px; display: flex; align-items: center; justify-content: center; padding: 0; border: 0; background: transparent; color: inherit; cursor: pointer; opacity: .6; transition: opacity .15s; }
.password-reveal-btn:hover, .password-reveal-btn:focus-visible { opacity: 1; }
.password-reveal-btn:focus-visible { outline: 2px solid currentColor; outline-offset: -4px; border-radius: 4px; }
.password-reveal-btn .fas { width: 20px; text-align: center; }

.prevent-jump { min-height: 43px; }

/* checkbox & radio (markup from render_checkbox / render_radio) */
.checkbox, .radio { display: block; position: relative; cursor: pointer; user-select: none; margin: 0 0 5px; padding: 0 0 0 4.3rem; }
.checkbox + .checkbox, .radio + .radio { margin-top: 0; }
.checkbox .checkmark, .radio .checkmark, .checkbox .text, .radio .text { transition: all ease-in-out .3s; }
.checkbox input:disabled ~ .checkmark, .radio input:disabled ~ .checkmark { border: 1px solid #ddd; color: #aaa; }
.checkbox input:disabled ~ .text, .radio input:disabled ~ .text { color: #aaa; }
.checkbox:hover input:disabled ~ .checkmark, .radio:hover input:disabled ~ .checkmark { background-color: white; }
.checkbox .checkmark .fas, .radio .checkmark .fas { display: none; }
.checkbox input, .radio input { position: absolute; opacity: 0; cursor: pointer; height: 0; width: 0; }
.checkbox .checkmark, .radio .checkmark { position: absolute; top: 0; left: 0; border: 1px solid #ccc; background-color: white; display: flex; align-items: center; justify-content: center; }
.checkbox:hover input ~ .checkmark, .radio:hover input ~ .checkmark { background-color: #eee; }
.checkbox input:focus ~ .checkmark, .radio input:focus ~ .checkmark { box-shadow: 0 0 0 3px #bfdeff; border-color: #4ba0ff; }
.checkbox > label, .radio > label { font-weight: 500; }
.checkbox .text, .radio .text { display: inline-block; vertical-align: middle; line-height: 1.8; }
.checkbox .checkmark { border-radius: 4px; height: 2.8rem; width: 2.8rem; }
.checkbox input:checked ~ .checkmark { background-image: linear-gradient(to right, #eee , #ddd); border: 2px solid #4ba0ff; }
.checkbox input:checked ~ .checkmark .fas { display: block; color: #4ba0ff; font-size: 1.6rem; }
.checkbox input:checked ~ .text { text-decoration: underline; color: #007bff; }
.radio .checkmark { border-radius: 50%; height: 3rem; width: 3rem; }
.radio input:checked ~ .checkmark { background-image: linear-gradient(to right, #eee , #ddd); border: 2px solid #4ba0ff; }
.radio input:checked ~ .checkmark .fas { display: block; color: #4ba0ff; font-size: 1.6rem; opacity: 0.8; }
.radio input:checked ~ .text { text-decoration: underline; color: #007bff; }
.radio .description { margin-left: 20px; padding-top: 0.5rem; color: #666; font-size: 1.6rem; }

.switch { display: inline-flex; width: 47px; height: 28px; border-radius: 14px; background: #eee; box-shadow: inset 0 0 7px rgba(0,0,0,0.15); padding: 2px; cursor: pointer; align-items: center; justify-content: flex-start; }
.switch.on { background: #a1d8a3; justify-content: flex-end; }
.thumb { width: 24px; height: 24px; background: white; border-radius: 50%; box-shadow: 0 0 5px rgba(0,0,0,0.15); }

.mc-filter { padding: 0 15px; margin: 15px 0 30px; background-color: #eee; border-radius: 8px; border: 1px solid #e6e6e6; }
.mc-filter .filter-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 0; margin: 10px -15px; }
.mc-filter .filter-row > div { padding: 0 15px; box-sizing: border-box; flex: 1 1 33.333%; max-width: 33.333%; }
.mc-filter .sl-trigger { width: 100%; text-align: left; }
.openings-filter { background-color: #eee; border-radius: 8px; border: 1px solid #e6e6e6; margin-bottom: 20px; padding: 0 15px; }

@media (max-width: 767px) {
    .mc-filter .filter-row > div { flex: 1 1 100%; max-width: 100%; }
}
@media (min-width: 768px) {
    .form-label { margin-bottom: 0; }
}


/* 13. SELECT (sl-) & MODAL
   ========================================================================== */
.sl-trigger { min-width: 160px; max-width: 260px; justify-content: space-between; overflow: hidden; }
.sl-trigger .dd-trigger-label { flex: 1; } /* fixed-width button: label fills the space, caret stays pinned right */
.sl-trigger-label { flex: 1; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sl-trigger-label.placeholder { color: var(--mc-text); }
.sl-inline { display: flex; flex-direction: column; min-width: 0; }
.sl-inline .sl-list { height: 42vh; overflow-y: auto; overflow-x: hidden; min-width: 0; }
.sl-inline .sl-search-wrap { padding: 0 0 25px; }
.sl-search-wrap, .sl-clear-wrap { min-width: 0; }
.sl-list.sl-busy, .dd-menu-scroll.sl-busy { opacity: 0.5; pointer-events: none; transition: opacity 0.15s; }
.sl-row { align-items: center; }
.sl-row-value { flex: 1; min-width: 0; display: flex; align-items: center; overflow: hidden; }
.sl-check { width: 14px; height: 14px; border-radius: 3px; flex-shrink: 0; border: 0.5px solid var(--mc-border); display: inline-flex; align-items: center; justify-content: center; font-size: 10px; align-self: center; }
.dd-item.selected .sl-check { background: var(--mc-accent); border-color: var(--mc-accent); color: #fff; }
.sl-search-wrap { padding: 10px; }
.sl-search { width: 100%; padding: 6px 12px; font-family: inherit; border: 0.5px solid var(--mc-border); border-radius: var(--mc-radius-md); background: var(--mc-surface-muted); color: var(--mc-text); outline: none; }
.sl-search:focus { border-color: var(--mc-accent); }
.sl-no-results { padding: 10px 14px; font-size: 13px; color: var(--mc-text-muted); text-align: center; }
.sl-loading { padding: 10px 14px; font-size: 13px; color: var(--mc-text-muted); text-align: center; display: flex; align-items: center; justify-content: center; gap: 6px; }
.sl-clear-wrap { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; margin-top: 4px; }
.sl-clear-count { font-size: 14px; color: var(--mc-text-secondary); }
.sl-clear { font-size: 14px; color: var(--mc-accent); cursor: pointer; font-weight: 500; }
.sl-clear:hover { color: var(--mc-red); }

/* course row markup inside selects (built by caller, passed as label) */
.course-row { display: flex; align-items: center; gap: 12px; width: 100%; min-width: 0; }
.course-thumb { width: 40px; height: 56px; object-fit: cover; border-radius: 4px; flex-shrink: 0; border: 0.5px solid var(--mc-border-light); }
.course-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; overflow: hidden; }
.course-name { font-size: 1.6rem; font-weight: 600; color: var(--mc-text); white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.course-author { font-size: 1.4rem; color: var(--mc-text-secondary); white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }

/* modal (Modal.js) */
body.mc-open { overflow: hidden; }
.mc-backdrop { display: none; position: fixed; inset: 0; z-index: 1050; align-items: flex-start; justify-content: center; padding: 4vh 16px; overflow-y: auto; background: transparent; transition: background var(--mc-duration) var(--mc-easing); }
.mc-backdrop.mc-show { background: var(--mc-backdrop); }
.mc-dialog { width: 100%; max-width: 500px; margin: auto 0; opacity: 0; transform: translateY(-24px) scale(0.96); transition: opacity var(--mc-duration) var(--mc-easing), transform var(--mc-duration) var(--mc-easing); }
.mc-backdrop.mc-show .mc-dialog { opacity: 1; transform: translateY(0) scale(1); }
.mc-dialog.mc-pulse { animation: mc-pulse 200ms ease-in-out; }
.mc-dialog.modal-sm { max-width: 430px; }
.mc-dialog.modal-lg { max-width: 830px; }
.mc-content { display: flex; flex-direction: column; background: var(--mc-surface); border-radius: var(--mc-radius-lg); box-shadow: var(--mc-shadow); outline: none; overflow: hidden; }
.mc-header, .mc-body, .mc-footer { min-width: 0; }
.mc-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 24px 12px; }
.mc-title { font-size: 3rem; font-weight: 600; color: var(--mc-text); line-height: 1.4; }
.mc-close { flex-shrink: 0; width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border: none; background: transparent; border-radius: 8px; color: var(--mc-text-faint); font-size: 2rem; cursor: pointer; transition: background 250ms ease, color 250ms ease; padding: 0; }
.mc-close:hover { background: #f2f3f5; color: var(--mc-text); }
.mc-close:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }
.mc-body { padding: 20px 24px; color: var(--mc-text); font-size: 1.6rem; line-height: 1.55; }
.mc-footer { display: flex; justify-content: flex-end; gap: 15px; padding: 20px 24px 24px; }
.mc-confirm-message { margin: 0; color: var(--mc-text); }
.mc-prompt-label { display: block; margin-bottom: 8px; font-size: 1.4rem; font-weight: 500; color: var(--mc-text); }
@keyframes mc-pulse { 50% { transform: scale(1.02); } }

@media (max-width: 480px) {
    .mc-dialog .mc-title { font-size: 2.7rem; }
}
@media (prefers-reduced-motion: reduce) {
    .mc-backdrop, .mc-dialog, .mc-dialog.mc-pulse { transition: none; animation: none; }
}


/* 14. CALENDAR (cal-) — Calendar.js
   ========================================================================== */
.cal-container { width: 280px; padding: 12px; font-size: 1.4rem; color: var(--mc-text); box-sizing: border-box; }
.cal-inline { width: 100%; max-width: 320px; }
.cal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; gap: 4px; }
.cal-title { font-weight: 600; font-size: 1.4rem; }
button.cal-title-btn { background: none; border: none; padding: 4px 8px; border-radius: 6px; cursor: pointer; color: var(--mc-text); }
button.cal-title-btn:hover { background: var(--mc-surface-muted); }
.cal-nav { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border: none; background: transparent; border-radius: 6px; cursor: pointer; color: var(--mc-text-secondary); font-size: 1.8rem; line-height: 1; padding: 0; flex-shrink: 0; }
.cal-nav:hover { background: var(--mc-surface-muted); color: var(--mc-text); }
.cal-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); margin-bottom: 4px; }
.cal-weekday { text-align: center; font-size: 1.1rem; font-weight: 600; color: var(--mc-text-muted); padding: 4px 0; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-day { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border-radius: 6px; cursor: pointer; color: var(--mc-text); outline: none; }
.cal-day:hover:not(.cal-disabled) { background: var(--mc-surface-muted); }
.cal-day.cal-outside  { color: var(--mc-text-muted); opacity: 0.7; }
.cal-day.cal-disabled { color: var(--mc-text-muted); opacity: 0.35; cursor: not-allowed; }
.cal-day.cal-today    { box-shadow: inset 0 0 0 1px var(--mc-accent); font-weight: 600; }
.cal-day.cal-selected { background: var(--mc-accent); color: #fff; font-weight: 600; }
.cal-day.cal-in-range    { background: var(--mc-accent-bg); border-radius: 0; }
.cal-day.cal-range-start { border-radius: 6px 0 0 6px; }
.cal-day.cal-range-end   { border-radius: 0 6px 6px 0; }
.cal-day.cal-range-start.cal-range-end { border-radius: 6px; } /* single-day range: don't leave one side square */
.cal-day.cal-focus:focus-visible { box-shadow: 0 0 0 2px var(--mc-accent); }
.cal-grid-months, .cal-grid-years { grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 4px 0; }
.cal-cell { border: none; background: transparent; padding: 12px 4px; border-radius: 6px; cursor: pointer; font-size: 1.3rem; color: var(--mc-text); }
.cal-cell:hover:not(:disabled) { background: var(--mc-surface-muted); }
.cal-cell:disabled { color: var(--mc-text-muted); opacity: 0.35; cursor: not-allowed; }
.cal-cell.cal-cell-today   { box-shadow: inset 0 0 0 1px var(--mc-accent); font-weight: 600; }
.cal-cell.cal-cell-current { background: var(--mc-accent); color: #fff; font-weight: 600; }
.cal-footer { display: flex; justify-content: flex-end; margin-top: 6px; }
.cal-clear-btn { background: none; border: none; color: var(--mc-accent); font-size: 1.3rem; font-weight: 500; cursor: pointer; padding: 4px 6px; }
.cal-clear-btn:hover { text-decoration: underline; }


/* 15. CHESS BOARD
   ========================================================================== */
.chess-board { position: relative; touch-action: none; }
.chess-board.board-wrapper > .board-canvas { position: absolute; top: 0; pointer-events: none; opacity: 0.5; z-index: 2; }
.chess-board > .board { display: grid; grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(8, 1fr); aspect-ratio: 1 / 1; box-shadow: 0 0 5px rgba(0,0,0,0.3); border: 2px solid #333; }
.chess-board > .board .square { position: relative; touch-action: none; }
.chess-board > .board .square img { width: 100%; height: 100%; z-index: 1; position: absolute; top: 0; left: 0; margin: 0 !important; }
.chess-board > .board .square.square-white { background-color: #f0d9b5; }
.chess-board > .board .square.square-black { background-color: #b58863; }
.chess-board > .board .square.square_G:before { background-image: linear-gradient(to right, rgba(0, 204, 0, 0.7), rgba(0, 204, 0, 0.7)) !important; }
.chess-board > .board .square.square_R:before { background-image: linear-gradient(to right, rgba(204, 0, 0, 0.7), rgba(204, 0, 0, 0.7)) !important; }
.chess-board > .board .square.square-selected { background-image: linear-gradient(to right, rgba(0, 204, 0, 0.7), rgba(0, 204, 0, 0.7)); }
.chess-board > .board .piece { user-select: none; touch-action: none; }
.chess-board > .board .piece-choice { background: white; transition: background-color .4s; }
.chess-board > .board .piece-choice:hover { background: #ccc; cursor: pointer; }

.chess-board .notation { font-size: 11px; font-weight: bold; }
.chess-board .notation > div { user-select: none; pointer-events: none; }
.chess-board .notation div:nth-child(even) { color: #b58863; }
.chess-board .notation div:nth-child(odd) { color: #f0d9b5; }
.chess-board .notation-rows { position: absolute; display: grid; top: 0; right: 0; width: 3%; min-width: 15px; height: 100%; grid-template-rows: repeat(8, 1fr); }
.chess-board .notation-rows div { text-align: center; margin-top: 5px; }
.chess-board .notation-columns { position: absolute; display: grid; bottom: 0; left: 0; height: 3%; min-height: 15px; width: 100%; grid-template-columns: repeat(8, 1fr); }
.chess-board .notation-columns div { display: table-cell; vertical-align: middle; padding-left: 7px; }

.article .chess-viewer, .article .chess-tester { margin: 35px 0; }
.chess-viewer .chess-board, .chess-tester .chess-board { margin-bottom: 15px; }


/* 16. CHESS COMPONENTS
   ========================================================================== */

/* shared component parts: logo, engine analysis bar, move list, chapters */
.component .chess-logo { margin-bottom: 15px; }
.component .chess-logo img { max-height: 50px; width: auto !important; max-width: auto !important; margin: 0; }
.component .chess-analysis { background-color: #fbf9f5; border-bottom: 1px solid #dcd4c7; height: 40px; font-size: 1.6rem; padding: 0 0 0 10px; display: flex; align-items: center; }
.component .chess-analysis .analysis-info { font-size: 1.5rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.component .chess-analysis .analysis-btn { margin-left: auto; border-right: none; border-top: none; border-bottom: none; align-self: stretch; padding-top: 0 !important; padding-bottom: 0 !important; display: flex; align-items: center; }
.component .close { float: none; padding-left: 5px; }
.component .right-column .chess-moves { height: calc(100% - 40px); }
.component .trainer-navigation { overflow-y: auto; margin-bottom: 0; }

.component .chess-moves { font-size: 1.6rem; padding: 15px; overflow-y: scroll; overflow-x: hidden; }
.component .chess-moves h2 { font-size: 21px; line-height: 29px; margin: 0; padding: 0; font-weight: 600; text-align: center; }
.component .chess-moves h2 span.elo { font-weight: normal; }
.component .chess-moves h2 span.result { display: inline; font-size: 2.1rem; }
.component .chess-moves h3  { font-size: 1.7rem; line-height: 23px; margin: 0; padding: 0; margin-bottom: 10px; font-weight: 600; text-align: center; }
.component .chess-moves h3 span.event, .component .chess-moves h3 span.date, .component .chess-moves h3 span.annotator { font-weight: normal; }
.component .chess-moves h3 span.annotator { font-style: italic; }
.component .chess-moves .move { cursor: pointer; color: var(--mc-link-hover); font-weight: 600; transition: all .4s; font-size: 1.8rem; padding: 0 3px; margin-bottom: 3px; line-height: 32px; height: 32px; display: inline-flex; align-items: center; }
.component .chess-moves .move .icon { font-size: 2.2rem; font-weight: normal; line-height: 1; margin-top: -3px; }
.component .chess-moves .move:hover { background-color: #ffeda7; border-radius: 4px; }
.component .chess-moves .move.active { background-color: #ffeda7; border-radius: 4px; }
.component .chess-moves .variant .move { line-height: 28px; height: 28px; display: inline-flex; margin: 0; font-weight: 400; font-size: 1.7rem; }
.component .chess-moves .variant .move .icon { font-size: 2.0rem; margin-top: -2px; }
.component .chess-moves .variant .comment { display: inline; }
.component .chess-moves .comment { display: block; margin-bottom: 3px; }
.component .chess-moves .variant { display: block; margin-left: 25px; }
.component .chess-moves .variant.analysis .move { color: #006400; }
.component .chess-moves .result { font-size: 1.6rem; display: block; margin-top: 10px; font-weight: 700; }

/* chess viewer */
.chess-viewer { margin-bottom: 30px; }
.chess-viewer .main { display: flex; border: 1px solid #dcd4c7; border-radius: 3px; transition: box-shadow 0.2s ease-in-out, border-color 0.2s ease-in-out; }
.chess-viewer .left-column { flex: 6.5; min-width: 0; padding: 15px; background-color: #f4efe7; border-right: 1px solid #dcd4c7; }
.chess-viewer .right-column { flex: 5.5; display: flex; flex-direction: column; min-width: 0; background-color: #fbf9f5; }
.chess-viewer .chess-moves { flex: 1; overflow-y: scroll; min-height: 0; contain: size layout; }
.chess-viewer[tabindex="0"]:focus { outline: none; }
.chess-viewer[tabindex="0"]:focus .main { box-shadow: 0 0 0 3px #bfdeff; border-color: #4ba0ff; }
.component.chess-viewer .chess-analysis .stockfish-short { display: none; }

/* chess tester */
.chess-tester { margin-bottom: 30px; }
.chess-tester .main { display: flex; border: 1px solid #dcd4c7; border-radius: 3px; transition: box-shadow 0.2s ease-in-out, border-color 0.2s ease-in-out; }
.chess-tester .left-column { flex: 6.5; min-width: 0; padding: 15px; background-color: #f4efe7; border-right: 1px solid #dcd4c7; }
.chess-tester .right-column { flex: 5.5; display: flex; flex-direction: column; min-width: 0; background-color: #fbf9f5; }
.chess-tester .chess-moves { flex: 1; overflow-y: auto; min-height: 0; contain: size layout; }
.chess-tester .chess-controls { display: flex; align-items: stretch; border-bottom: 1px solid #dcd4c7; }
.chess-tester .chess-controls .control-btn { margin-left: auto; border: none; border-left: 1px solid #dcd4c7; align-self: stretch; padding: 0 25px !important; display: flex; align-items: center; }
.chess-tester .chess-progress { flex: 1; padding: 7px 5px 7px 15px; }
.chess-tester .chess-progress i { font-size: 25px; padding: 5px; }
.chess-tester .chess-progress .far.fa-check-circle { color: green; }
.chess-tester .chess-progress .far.fa-times-circle { color: var(--mc-red); }
.chess-tester[tabindex="0"]:focus { outline: none; }
.chess-tester[tabindex="0"]:focus .main { box-shadow: 0 0 0 3px #bfdeff; border-color: #4ba0ff; }

/* memory booster */
.memory-booster { margin-bottom: 30px; }
.memory-booster .chess-logo img, .computer-practice .chess-logo img { margin-left: 0 !important; }
.memory-booster .main { display: flex; border: 1px solid lightgray; border-radius: 4px; background-color: #fbf9f5; }
.memory-booster .left-column { flex: 6.5; min-width: 0; padding: 20px; }
.memory-booster .right-column { display: flex; flex: 5.5; min-width: 0; }
.memory-booster .progress-column { flex: 1; min-width: 0; padding: 20px; }
.memory-booster .chapters-column { flex: 1; min-width: 0; padding: 20px; overflow-y: auto; min-height: 0; contain: size layout; }
.memory-booster .mc-progress { margin-bottom: 20px; }

/* strategy booster */
.strategy-booster { margin-bottom: 30px; }
.strategy-booster .chess-logo img { margin-left: 0 !important; }
.strategy-booster .main { display: flex; border: 1px solid lightgray; border-radius: 4px; background-color: #fbf9f5; }
.strategy-booster .left-column { flex: 6.5; min-width: 0; padding: 20px; }
.strategy-booster .right-column { display: flex; flex: 5.5; min-width: 0; }
.strategy-booster .progress-column { flex: 1; min-width: 0; padding: 20px; overflow-y: auto; }
.strategy-booster .chapters-column { flex: 1; min-width: 0; padding: 20px; overflow-y: auto; min-height: 0; contain: size layout; }
.strategy-booster .mc-progress { margin-bottom: 20px; }
.strategy-booster .problem-status { font-size: 1.6rem; font-weight: 600; color: var(--mc-text); margin: 0 0 10px; }

/* computer practice */
.computer-practice { margin-bottom: 30px; }
.computer-practice .main { display: flex; border: 1px solid #dcd4c7; border-radius: 4px; background-color: #fbf9f5; }
.computer-practice .left-column { flex: 6; min-width: 0; padding: 20px; }
.computer-practice .right-column { display: flex; flex: 6; min-width: 0; }
.computer-practice .progress-column { flex: 1; min-width: 0; padding: 20px; }
.computer-practice .chapters-column { flex: 1; min-width: 0; padding: 20px; overflow-y: auto; min-height: 0; contain: size layout; }
.component.computer-practice p { margin-bottom:20px; }

/* video synchronizer */
.video-synchronizer { padding: 20px; margin-bottom: 30px; }
.video-synchronizer .main { display: flex; border: 1px solid #dcd4c7; border-radius: 4px; background-color: #fbf9f5; }
.video-synchronizer .left-column { flex: 6.5; min-width: 0; padding: 20px; }
.video-synchronizer .right-column { flex: 5.5; min-width: 0; padding: 20px; display: flex; align-items: center; }
.video-synchronizer .mc-video-wrap { width: 100%; margin-bottom: 0; }

/* position setup */
.position-setup { margin-bottom: 5px; }
.position-setup .main { display: flex; gap: 20px; margin-bottom: 10px; }
.position-setup .left-column { flex: 7; min-width: 0; }
.position-setup .right-column { flex: 5; min-width: 0; }
.position-setup .mc-help-text { margin-top: -5px; margin-bottom: 10px; font-size: 1.4rem; color: var(--mc-red); }
.position-setup .mc-input { font-size: 15px; }
.position-setup .controls { display: flex; align-items: flex-start; gap: 15px; }
.position-setup .board-controls { flex: 7; }
.position-setup .search-btn-wrap { flex: 5; }
.position-setup .board-controls .mc-btn-group { width: 100%; }
.position-setup .board-controls .mc-btn { color: #777; }
.position-setup .search-btn-wrap .mc-btn { width: 100%; }

@media (max-width: 1200px) {
    .component .chess-analysis .analysis-info { font-size: 1.3rem; }
    .component .chess-analysis .analysis-btn { font-size: 1.4rem; line-height: normal; }
}
@media (min-width: 768px) and (max-width: 991px) {
    .component.chess-viewer .chess-analysis .info { line-height: 18px; font-size: 1.3rem; }
    .component.chess-viewer .chess-analysis .stockfish { display: none; }
    .component.chess-viewer .chess-analysis .stockfish-short { display: inline-block; }
}
@media (min-width: 768px) {
    .position-setup .board-controls .mc-btn-group { width: 50%; }
}
@media (max-width: 767px) {
    .component .chess-logo { margin-bottom: 10px; }
    .component .chess-logo img { max-height: 40px; }
    .component .chess-analysis .analysis-info { font-size: 1.5rem; }
    .component .chess-analysis .analysis-btn { font-size: 1.5rem; line-height: normal; }
    .component .chess-moves { font-size: 1.5rem; }
    .component .chess-moves .result { font-size: 1.5rem; }
    .chess-viewer .main { flex-direction: column; }
    .chess-viewer .left-column { border-right: none; border-bottom: 1px solid #dcd4c7; }
    .chess-viewer .right-column { min-height: 320px; }
    .chess-tester .main { flex-direction: column; }
    .chess-tester .left-column { border-right: none; border-bottom: 1px solid #dcd4c7; }
    .chess-tester .right-column { min-height: 320px; }
    .chess-tester .chess-progress .progress-label { display: none; }
    .memory-booster .main { flex-direction: column; }
    .memory-booster .right-column { border-left: none; border-top: 1px solid lightgray; }
    .memory-booster .chess-logo img { margin-left: auto !important; }
    .strategy-booster .main { flex-direction: column; }
    .strategy-booster .right-column { border-left: none; border-top: 1px solid lightgray; }
    .strategy-booster .chess-logo img { margin-left: auto !important; margin-right: auto !important; }
    .computer-practice .main { flex-direction: column; }
    .computer-practice .right-column { border-left: none; border-top: 1px solid #dcd4c7; }
    .video-synchronizer .main { flex-direction: column; }
    .position-setup .mc-input { font-size: 13px; }
    .position-setup .controls { flex-direction: column; }
    .position-setup .board-controls { width: 50%; margin-bottom: 10px; }
    .position-setup .search-btn-wrap { width: 100%; }
}
@media (max-width: 480px) {
    .position-setup .right-column { display: none; }
}


/* 17. LEGACY CMS CONTENT
   No template or script uses these classes any more. They are kept only because
   older article/page bodies stored in the database may still contain them.
   Check the DB (e.g. body LIKE '%embed-responsive%') and delete what is unused.
   ========================================================================== */
.embed-responsive { position: relative; display: block; height: 0; padding: 0; overflow: hidden; box-shadow: 1px 2px 3px rgba(0, 0, 0, 0.15); border-color: #ddd #ccc #ccc #ddd; border-radius: 4px; border: 1px solid #ddd; transition: all .5s; }
.embed-responsive:hover { border-color: var(--mc-link); }
.embed-responsive .embed-responsive-item, .embed-responsive iframe, .embed-responsive embed, .embed-responsive object, .embed-responsive video { position: absolute; top: 0; left: 0; bottom: 0; height: 100%; width: 100%; border: 0; }
.embed-responsive-item { padding: 5px; }
.embed-responsive-16by9 { padding-bottom: 56.25%; }
.embed-responsive-4by3 { padding-bottom: 75%; }
.video.embed-responsive { box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); border-color: #ddd #ccc #ccc #ddd; border-radius: 4px; border: 1px solid #ddd; transition: all .5s; }
.video.embed-responsive, .youtube.embed-responsive { margin-bottom: 35px; }
.video.embed-responsive:hover { border-color: var(--mc-link); }
.video:focus { outline: none !important; }
.youtube.embed-responsive { box-shadow: 1px 2px 3px rgba(0, 0, 0, 0.15); border-color: #ddd #ccc #ccc #ddd; border-radius: 4px; border: 1px solid #ddd; transition: all .5s; }
.youtube.embed-responsive:hover { border-color: var(--mc-link); }
.youtube .embed-responsive-item { padding: 5px; }
.box { background-color: #f6f6f6; border: 1px solid #d9d9d9; border-radius: 1px; box-shadow: 1px 2px 3px #ddd; padding: 7px 14px; }
.box a { border-bottom: 1px solid transparent; }
.box a:hover { text-decoration: none; border-color: var(--mc-link-hover); }
.link.red-link { color: var(--mc-red); }
.link.red-link:hover { border-color: var(--mc-red); }
.no-margin { margin: 0; }
.ago { color: #aaa; font-size: 13px; font-weight: 600; }
