.ekmo-portal { --ekmo-accent: #b3121b; max-width: 1100px; margin: 0 auto; }
.ekmo-portal * { box-sizing: border-box; }
.ekmo-muted { color: inherit; opacity: .75; font-size: .9em; }

.ekmo-btn { display: inline-block; background: var(--ekmo-accent); color: #fff !important; border: 0; border-radius: 6px; padding: .6em 1.2em; font-weight: 600; text-decoration: none; cursor: pointer; }
.ekmo-btn:hover { filter: brightness(1.1); }
.ekmo-btn-ghost { background: transparent; color: var(--ekmo-accent) !important; border: 2px solid var(--ekmo-accent); }

.ekmo-msg { padding: .8em 1em; border-radius: 6px; margin: 0 0 1em; border-left: 4px solid; }
.ekmo-msg-ok { background: #ecf8ef; border-color: #2e9e44; }
.ekmo-msg-err { background: #fdecec; border-color: #c62828; }
.ekmo-msg-info { background: #eef4fc; border-color: #1f5fbf; }

.ekmo-login { max-width: 420px; margin: 2em auto; padding: 1.5em; border: 1px solid #e3e3e3; border-radius: 10px; background: #fff; }
.ekmo-login label, .ekmo-exam label { display: block; font-weight: 600; margin-bottom: .3em; }
.ekmo-login input[type=email], .ekmo-login input[type=password],
.ekmo-exam input[type=url], .ekmo-exam textarea { width: 100%; padding: .6em; border: 1px solid #ccc; border-radius: 6px; font-size: 1em; }
.ekmo-row { display: flex; justify-content: space-between; align-items: center; gap: 1em; }
.ekmo-row label { display: inline; font-weight: normal; }

.ekmo-header { display: flex; justify-content: space-between; align-items: center; padding: .6em 0 1em; border-bottom: 1px solid #eee; margin-bottom: 1.2em; }

.ekmo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1em; }
.ekmo-rank { display: flex; flex-direction: column; border: 1px solid #e3e3e3; border-radius: 10px; overflow: hidden; background: #fff; }
.ekmo-rank-belt { height: 10px; background: var(--ekmo-c); }
.ekmo-rank-body { padding: 1em; display: flex; flex-direction: column; gap: .4em; flex: 1; }
.ekmo-rank-body h3 { margin: 0; }
.ekmo-rank-body .ekmo-btn { align-self: flex-start; margin-top: auto; }
.ekmo-rank-status { font-weight: 600; margin: .3em 0 .6em; }
.ekmo-status-locked, .ekmo-status-not_purchased { opacity: .75; }
.ekmo-status-passed .ekmo-rank-status { color: #2e9e44; }
.ekmo-status-pending .ekmo-rank-status { color: #1f5fbf; }

.ekmo-rank-title { border-left: 8px solid var(--ekmo-c); padding-left: .5em; }
.ekmo-section { margin: 2em 0; }
.ekmo-lesson { margin-bottom: 1.8em; }
.ekmo-video { position: relative; width: 100%; padding-top: 56.25%; background: #000; border-radius: 8px; overflow: hidden; }
.ekmo-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ekmo-instructions { background: #fafafa; border: 1px solid #eee; border-radius: 8px; padding: 1em; margin-bottom: 1.2em; }
.ekmo-exam { background: #fff; border: 1px solid #e3e3e3; border-radius: 10px; padding: 1.2em; }
.ekmo-history { list-style: none; padding: 0; }
.ekmo-history li { border-bottom: 1px solid #eee; padding: .6em 0; }
.ekmo-feedback { background: #fafafa; padding: .6em; border-radius: 6px; margin-top: .4em; white-space: normal; }

/* Checkout */
.ekmo-checkout { max-width: 640px; }
.ekmo-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; border: 1px solid rgba(0,0,0,.25); }
.ekmo-bundle { display: flex; gap: .8em; align-items: flex-start; padding: 1em; border: 2px solid var(--ekmo-accent); border-radius: 10px; background: #fff8f8; cursor: pointer; }
.ekmo-bundle input { margin-top: .3em; transform: scale(1.3); }
.ekmo-price { font-size: 1.4em; font-weight: 700; color: var(--ekmo-accent); }
.ekmo-save { display: inline-block; background: var(--ekmo-accent); color: #fff; border-radius: 4px; padding: 0 .5em; font-size: .85em; font-weight: 600; margin-left: .3em; }
.ekmo-or { text-align: center; color: #888; margin: 1em 0 .5em; }
.ekmo-cart-table { width: 100%; border-collapse: collapse; }
.ekmo-cart-table th, .ekmo-cart-table td { text-align: left; padding: .5em; border-bottom: 1px solid #eee; }
.ekmo-cart-table input:disabled + * , .ekmo-cart-table label:has(input:disabled) { opacity: .45; }
.ekmo-total { font-size: 1.2em; margin: 1em 0; }
.ekmo-small { font-size: .85em; }
.ekmo-busy { opacity: .5; pointer-events: none; }

/* Registration */
.ekmo-register { max-width: 640px; margin: 1em auto; padding: 1.5em; border: 1px solid #e3e3e3; border-radius: 10px; background: #fff; }
.ekmo-register label, .ekmo-label { display: block; font-weight: 600; margin-bottom: .3em; }
.ekmo-register label.ekmo-inline { display: inline; font-weight: normal; margin-right: 1em; }
.ekmo-register input[type=text], .ekmo-register input:not([type]), .ekmo-register input[type=email], .ekmo-register input[type=password],
.ekmo-register input[type=tel], .ekmo-register input[type=date], .ekmo-register textarea { width: 100%; padding: .6em; border: 1px solid #ccc; border-radius: 6px; font-size: 1em; }
.ekmo-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1em; }
@media (max-width: 560px) { .ekmo-cols { grid-template-columns: 1fr; } }
.ekmo-guardian { background: #fafafa; border: 1px dashed #ddd; border-radius: 8px; padding: .2em 1em; margin: 1em 0; }
.ekmo-waiver { background: #fff8e6; border: 1px solid #f0d98c; border-radius: 8px; padding: 1em; }
.ekmo-msg ul { margin: 0; padding-left: 1.2em; }
.ekmo-ref label { display: block; font-weight: 600; margin-bottom: .3em; }
.ekmo-ref input { width: 220px; max-width: 100%; padding: .5em; border: 1px solid #ccc; border-radius: 6px; text-transform: uppercase; }

/* Dark themes: boxes with a light background always use dark text. */
.ekmo-bundle, .ekmo-login, .ekmo-register, .ekmo-exam, .ekmo-rank, .ekmo-instructions,
.ekmo-msg, .ekmo-feedback, .ekmo-guardian, .ekmo-waiver { color: #222; }
.ekmo-bundle a, .ekmo-login a, .ekmo-register a, .ekmo-exam a, .ekmo-rank a, .ekmo-msg a, .ekmo-waiver a { color: #b3121b; }
.ekmo-bundle .ekmo-muted, .ekmo-login .ekmo-muted, .ekmo-register .ekmo-muted, .ekmo-exam .ekmo-muted,
.ekmo-rank .ekmo-muted { color: #666; opacity: 1; }
.ekmo-rank .ekmo-btn, .ekmo-login .ekmo-btn, .ekmo-register .ekmo-btn, .ekmo-exam .ekmo-btn { color: #fff; }
.ekmo-rank .ekmo-btn-ghost { color: #b3121b; }
.ekmo-dot { border-color: rgba(255,255,255,.6); box-shadow: 0 0 0 1px rgba(0,0,0,.3); }
.ekmo-login-cta { text-align: center; margin: 0 0 1.2em; }
.ekmo-checkout .ekmo-btn-ghost { background: #fff; }

/* Headings take the page's text color (white on a dark theme, dark inside light boxes). */
.ekmo-portal h1, .ekmo-portal h2, .ekmo-portal h3, .ekmo-portal h4, .ekmo-portal h5 { color: inherit; }
.ekmo-portal .ekmo-section > h3 { margin-top: 1.5em; }

/* Shop */
.ekmo-shop-cta { display: flex; flex-wrap: wrap; gap: .8em; align-items: center; justify-content: space-between; padding: .8em 1em; margin-bottom: 1.2em; border: 1px solid rgba(255,255,255,.25); border-radius: 10px; }
.ekmo-shop { max-width: 720px; }
.ekmo-shop select { padding: .3em .5em; border-radius: 6px; border: 1px solid #ccc; color: #222; background: #fff; }
.ekmo-sizes { display: flex; flex-wrap: wrap; gap: .8em 1.2em; margin-bottom: 1em; }
.ekmo-sizes label { display: flex; align-items: center; gap: .4em; }
.ekmo-sizes span { font-weight: 700; min-width: 3em; }
.ekmo-btn-ghost { background: #fff; }
.ekmo-patch-cell { display: flex; align-items: center; gap: .6em; }
.ekmo-patch-img { width: 64px; height: auto; aspect-ratio: 400 / 474; object-fit: contain; border-radius: 6px; background: rgba(255,255,255,.08); }
.ekmo-coupon { margin: 1em 0; }
.ekmo-coupon label { display: block; font-weight: 600; margin-bottom: .3em; }
.ekmo-coupon-row { display: inline-flex; gap: .5em; }
.ekmo-coupon input { width: 200px; padding: .5em; border: 1px solid #ccc; border-radius: 6px; text-transform: uppercase; color: #222; background: #fff; }
.ekmo-coupon-msg { display: block; margin-top: .3em; font-size: .9em; }

/* Representatives area */
.ekmo-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8em; margin: 1em 0 1.5em; }
.ekmo-stats > div { background: #fff; color: #222; border-radius: 10px; padding: .8em 1em; }
.ekmo-stats span { display: block; font-size: .85em; color: #666; }
.ekmo-stats strong { font-size: 1.4em; }
.ekmo-copy { width: 100%; max-width: 560px; padding: .5em; border: 1px solid #ccc; border-radius: 6px; color: #222; background: #fff; font-family: monospace; }

/* Syllabus */
.ekmo-progress-bar, .ekmo-mini-progress { height: 10px; border-radius: 5px; background: rgba(127,127,127,.3); overflow: hidden; }
.ekmo-mini-progress { height: 6px; margin-top: .2em; }
.ekmo-progress-bar span, .ekmo-mini-progress span { display: block; height: 100%; background: #2e9e44; transition: width .3s; }
.ekmo-progress-text { margin: .4em 0 1em; }
.ekmo-syllabus h4 { margin: 1.4em 0 .4em; }
.ekmo-ex-list { list-style: none; margin: 0; padding: 0; }
.ekmo-ex { display: flex; flex-wrap: wrap; gap: .5em 1em; justify-content: space-between; align-items: flex-start; padding: .6em .8em; margin-bottom: .4em; border-radius: 8px; background: rgba(255,255,255,.06); border-left: 4px solid transparent; }
.ekmo-ex-ok { border-left-color: #2e9e44; }
.ekmo-ex-improve { border-left-color: #f0a30a; }
.ekmo-ex-main { display: flex; gap: .7em; flex: 1 1 320px; min-width: 0; }
.ekmo-ex-code { font-weight: 700; min-width: 2.6em; }
.ekmo-ex details summary { cursor: pointer; }
.ekmo-ex details p { margin: .4em 0 0; opacity: .85; font-size: .92em; }
.ekmo-ex-marks { display: flex; gap: .4em; flex-wrap: wrap; }
.ekmo-ex-marks button { border: 1px solid rgba(127,127,127,.6); background: transparent; color: inherit; border-radius: 16px; padding: .25em .8em; font-size: .85em; cursor: pointer; }
.ekmo-ex-marks button[data-state="ok"][aria-pressed="true"] { background: #2e9e44; border-color: #2e9e44; color: #fff; }
.ekmo-ex-marks button[data-state="improve"][aria-pressed="true"] { background: #f0a30a; border-color: #f0a30a; color: #222; }

/* Testimonials */
.ekmo-reco-box { margin: 1em 0; }
.ekmo-reco-box summary { cursor: pointer; font-weight: 600; }
.ekmo-reco-box form { margin-top: .8em; }
.ekmo-reco-box form label { display: block; font-weight: 600; margin-bottom: .3em; }
.ekmo-reco-box form label.ekmo-inline { display: inline; font-weight: normal; margin-right: .8em; }
.ekmo-reco-box input:not([type=radio]):not([type=checkbox]):not([type=file]), .ekmo-reco-box textarea { width: 100%; padding: .6em; border: 1px solid #ccc; border-radius: 6px; }
.ekmo-reco-grid { display: grid; grid-template-columns: repeat(var(--ekmo-cols, 3), minmax(0, 1fr)); gap: 1.2em; }
@media (max-width: 900px) { .ekmo-reco-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .ekmo-reco-grid { grid-template-columns: 1fr; } }
.ekmo-reco { margin: 0; background: #fff; color: #222; border-radius: 12px; padding: 1.2em; display: flex; flex-direction: column; gap: .8em; box-shadow: 0 2px 10px rgba(0,0,0,.15); }
.ekmo-reco-stars { color: #f2b400; letter-spacing: 2px; }
.ekmo-reco blockquote { margin: 0; padding: 0; border: 0; font-style: italic; flex: 1; color: #333; }
.ekmo-reco blockquote p { margin: 0 0 .6em; }
.ekmo-reco figcaption { display: flex; align-items: center; gap: .8em; }
.ekmo-reco figcaption > span { display: flex; flex-direction: column; }
.ekmo-reco-photo { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: 0 0 56px; }
.ekmo-reco-initial { display: inline-flex; align-items: center; justify-content: center; background: #b3121b; color: #fff; font-weight: 700; font-size: 1.4em; }
.ekmo-reco-country { color: #666; font-size: .9em; }
.ekmo-reco-rank { font-size: .8em; font-weight: 600; border-left: 5px solid var(--ekmo-c); padding-left: .4em; margin-top: .2em; color: #444; }
.ekmo-placement-row { display: flex; gap: .8em; align-items: flex-start; margin: 1.2em 0; padding: 1em; background: #fff; color: #222; border: 2px solid #1f5fbf; border-radius: 10px; cursor: pointer; }
.ekmo-placement-row .ekmo-muted { color: #555; opacity: 1; }
.ekmo-placement-row input { margin-top: .3em; transform: scale(1.2); }

/* Lesson thumbnails (player loads on click) */
.ekmo-video-lazy button { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: #000; cursor: pointer; }
.ekmo-video-lazy img { width: 100%; height: 100%; object-fit: cover; opacity: .85; transition: opacity .2s; }
.ekmo-video-lazy button:hover img { opacity: 1; }
.ekmo-play { position: absolute; top: 50%; left: 50%; width: 68px; height: 48px; margin: -24px 0 0 -34px; background: #b3121b; border-radius: 12px; }
.ekmo-play::after { content: ''; position: absolute; top: 14px; left: 27px; border-style: solid; border-width: 10px 0 10px 17px; border-color: transparent transparent transparent #fff; }
.ekmo-start { position: absolute; right: 10px; bottom: 10px; background: rgba(0,0,0,.75); color: #fff; font-size: .85em; padding: .15em .5em; border-radius: 4px; }

/* Lessons grid: 5 per row, the player opens in a pop-up (with YouTube's full-screen button) */
.ekmo-lessons { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1em .8em; }
@media (max-width: 1100px) { .ekmo-lessons { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 860px) { .ekmo-lessons { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .ekmo-lessons { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ekmo-tile { display: flex; flex-direction: column; gap: .4em; padding: 0; border: 0; background: none; color: inherit; text-align: left; cursor: pointer; font: inherit; text-decoration: none; }
.ekmo-tile-img { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: #000; }
.ekmo-tile-img img { width: 100%; height: 100%; object-fit: cover; opacity: .85; transition: opacity .2s, transform .2s; }
.ekmo-tile:hover .ekmo-tile-img img, .ekmo-tile:focus-visible .ekmo-tile-img img { opacity: 1; transform: scale(1.04); }
.ekmo-tile .ekmo-play { width: 44px; height: 31px; margin: -15px 0 0 -22px; border-radius: 8px; }
.ekmo-tile .ekmo-play::after { top: 9px; left: 18px; border-width: 6px 0 6px 11px; }
.ekmo-tile .ekmo-start { right: 6px; bottom: 6px; font-size: .75em; }
.ekmo-tile-title { font-size: .88em; line-height: 1.3; }
.ekmo-tile-ext { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 2em; }
.ekmo-modal { position: fixed; inset: 0; z-index: 99999; background: rgba(0,0,0,.85); display: flex; align-items: center; justify-content: center; padding: 2vh 2vw; }
.ekmo-modal[hidden] { display: none; }
.ekmo-modal-box { width: min(1100px, 96vw); }
.ekmo-modal-head { display: flex; justify-content: space-between; align-items: center; color: #fff; margin-bottom: .4em; gap: 1em; }
.ekmo-modal-close { background: none; border: 0; color: #fff; font-size: 2.2em; line-height: 1; cursor: pointer; padding: 0 .2em; }
.ekmo-modal-player { border-radius: 8px; }
body.ekmo-modal-open { overflow: hidden; }
.ekmo-ex-play { flex: 0 0 auto; align-self: flex-start; border: 0; border-radius: 14px; background: #b3121b; color: #fff; font-size: .8em; font-weight: 600; padding: .3em .75em; cursor: pointer; line-height: 1.2; white-space: nowrap; }
.ekmo-ex-play:hover { filter: brightness(1.15); }

/* Lesson cards (option A): exercise number on a card with the belt color */
.ekmo-tile-card { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: 16 / 10; background: #fff; color: #222; border-radius: 8px; border-top: 6px solid var(--ekmo-c, #b3121b); transition: transform .15s, box-shadow .15s; }
.ekmo-tile:hover .ekmo-tile-card, .ekmo-tile:focus-visible .ekmo-tile-card { transform: translateY(-3px); box-shadow: 0 6px 16px rgba(0,0,0,.35); }
.ekmo-tile-code { font-size: 2em; font-weight: 700; letter-spacing: .02em; line-height: 1; }
.ekmo-tile-code-long { font-size: 1.4em; }
.ekmo-tile-icon { position: absolute; left: 8px; bottom: 6px; color: #b3121b; font-size: .9em; }
.ekmo-tile-time { position: absolute; right: 6px; bottom: 6px; background: #222; color: #fff; font-size: .72em; padding: .1em .45em; border-radius: 4px; }
.ekmo-lessons { --ekmo-c: #b3121b; }
.ekmo-placement-row > span { display: flex; flex-direction: column; gap: .25em; }
.ekmo-pl-req { margin-top: .5em; }
.ekmo-pl-list { display: flex; flex-direction: column; gap: .15em; }
.ekmo-pl-list span { color: #1f5fbf; }
.ekmo-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
