/* ChessDepth Chess Lab */
.lab-bar { background: #fff; border-bottom: 1px solid var(--cd-line, #e5e7eb); }
.lab-bar-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 52px; flex-wrap: wrap; }
.lab-tabs { display: flex; gap: .25rem; overflow-x: auto; }
.lab-tabs a { display: inline-flex; align-items: center; gap: .45rem; padding: .55rem .8rem; border-radius: 6px; color: #374151; font-weight: 500; font-size: .9rem; white-space: nowrap; }
.lab-tabs a i { color: #6366f1; }
.lab-tabs a:hover { background: #eef2ff; }
.lab-tabs a[aria-current] { background: #4f46e5; color: #fff; }
.lab-tabs a[aria-current] i { color: #c7d2fe; }
.lab-bar-status { display: flex; gap: .4rem; flex-wrap: wrap; }
.lab-chip { display: inline-flex; align-items: center; gap: .35rem; border: 1px solid #e5e7eb; border-radius: 9999px; padding: .2rem .65rem; font-size: .8rem; color: #374151; background: #fff; }
.lab-chip i { color: #6366f1; }
.lab-chip-pts b { color: #111827; }
.lab-lv { font-size: 1rem; line-height: 1; }
.lab-demo { background: #fff7e6; color: #7a5a1e; font-size: .82rem; text-align: center; padding: .4rem 1rem; border-top: 1px solid #f1e3c4; }
.lab-demo button { text-decoration: underline; margin-left: .4rem; font-weight: 600; color: inherit; }

.lab-page { padding-top: 2rem; padding-bottom: 3rem; }
.lab-h1 { font-weight: 600; font-size: 2rem; color: #111827; line-height: 1.15; }
.lab-h2 { font-weight: 600; font-size: 2rem; color: #111827; }
.lab-loading { text-align: center; color: #6b7280; padding: 4rem 0; }
.lab-btn { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; background: #4f46e5; color: #fff; font-weight: 600; font-size: .92rem; padding: .75rem 1.3rem; border-radius: 6px; border: 0; cursor: pointer; transition: background .15s; }
.lab-btn:hover { background: #4338ca; color: #fff; }
.lab-btn-sm { padding: .4rem .8rem; font-size: .8rem; }
.lab-btn-o { display: inline-flex; align-items: center; gap: .45rem; border: 1px solid #d1d5db; border-radius: 6px; padding: .55rem .9rem; font-weight: 600; font-size: .85rem; color: #111827; background: #fff; }
.lab-btn-o:hover:not(:disabled) { border-color: #4f46e5; }
.lab-btn-o:disabled { opacity: .45; cursor: not-allowed; }
.lab-link { color: #4b5563; text-decoration: underline; font-size: .85rem; margin-top: .8rem; }
.lab-google { background: #fff; color: #111827; border: 1px solid #d1d5db; }
.lab-google:hover { background: #f9fafb; color: #111827; }

/* Access screens */
.lab-gate { display: flex; justify-content: center; padding: 2rem 0 3rem; }
.lab-gate-card { max-width: 30rem; width: 100%; background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 2rem; text-align: center; box-shadow: 0 18px 40px -28px rgba(17,24,39,.45); }
.lab-gate-card h2 { font-weight: 600; font-size: 1.9rem; color: #111827; line-height: 1.15; margin: .4rem 0 .6rem; }
.lab-gate-card > p { color: #4b5563; }
.lab-gate-kicker { font-size: .82rem; font-weight: 600; color: #4f46e5; }
.lab-gate-list { text-align: left; margin: 1.2rem auto; display: grid; gap: .55rem; max-width: 22rem; }
.lab-gate-list li { display: flex; gap: .6rem; color: #374151; font-size: .92rem; }
.lab-gate-list i { color: #6366f1; margin-top: .2rem; width: 1rem; }
.lab-gate-card .lab-btn { width: 100%; margin-top: .5rem; }
.lab-gate-small { font-size: .8rem; color: #6b7280; margin-top: .8rem; }
.lab-price { font-size: 1.6rem; font-weight: 600; color: #111827; margin: .2rem 0 .6rem; }
.lab-price-soon { font-family: inherit; font-size: .95rem; color: #4f46e5; font-weight: 600; }

/* Boards */
.lab-board { display: block; width: 100%; max-width: 560px; margin: 0 auto; }

/* Tactics */
.tt-layout { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 900px) { .tt-layout { grid-template-columns: minmax(0, 560px) minmax(0, 1fr); align-items: start; } }
.tt-side { display: flex; flex-direction: column; gap: 1rem; }
.tt-status { border-left: 4px solid #d1d5db; background: #fff; border-radius: 0 8px 8px 0; padding: .9rem 1rem; }
.tt-status.ok { border-color: #16a34a; } .tt-status.bad { border-color: #dc2626; }
.tt-status-main { font-weight: 700; font-size: 1.15rem; color: #111827; }
.tt-status-sub { color: #4b5563; font-size: .92rem; margin-top: .15rem; }
.tt-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.tt-info { font-size: .9rem; color: #374151; display: grid; gap: .25rem; }
.tt-info:empty { display: none; }
.tt-up { color: #15803d; font-weight: 600; } .tt-down { color: #b91c1c; font-weight: 600; }
.tt-credit { font-size: .78rem; color: #6b7280; }
.tt-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.tt-stats div { background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; padding: .6rem .7rem; }
.tt-stats dt { font-size: .75rem; color: #6b7280; }
.tt-stats dd { font-size: 1.35rem; font-weight: 700; color: #111827; }
.tt-filters { display: grid; gap: .6rem; }
.tt-filters label { display: grid; gap: .25rem; font-size: .8rem; font-weight: 600; color: #374151; }
.tt-filters #tt-filters-lichess { display: grid; gap: .6rem; grid-template-columns: 1fr 1fr; }
.tt-filters select { border: 1px solid #d1d5db; border-radius: 6px; padding: .5rem; font-size: .88rem; background: #fff; color: #111827; }
.tt-points-note { font-size: .78rem; color: #6b7280; }

/* Openings */
.op-layout { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 1100px) { .op-layout { grid-template-columns: 17rem minmax(0, 520px) minmax(0, 1fr); align-items: start; } }
@media (min-width: 760px) and (max-width: 1099px) { .op-layout { grid-template-columns: 15rem minmax(0, 1fr); } .op-side { grid-column: 1 / -1; } }
.op-list { display: grid; gap: .35rem; margin-top: 1rem; max-height: 34rem; overflow-y: auto; }
.op-group { font-size: .78rem; font-weight: 700; color: #4f46e5; margin-top: .6rem; }
.op-item { text-align: left; border: 1px solid #e5e7eb; border-radius: 8px; background: #fff; padding: .55rem .7rem; display: grid; gap: .2rem; }
.op-item:hover { border-color: #a5b4fc; }
.op-item.is-active { border-color: #4f46e5; box-shadow: inset 3px 0 0 #4f46e5; }
.op-item-name { font-weight: 600; font-size: .86rem; color: #111827; }
.op-item-meta { font-size: .74rem; color: #6b7280; }
.op-badge { font-weight: 600; }
.op-learned { color: #1d4ed8; } .op-mastered { color: #4f46e5; } .op-due { color: #b91c1c; }
.op-title { font-weight: 600; font-size: 1.6rem; color: #111827; line-height: 1.2; }
.op-intro { color: #4b5563; font-size: .92rem; margin-top: .3rem; }
.op-modes { display: flex; gap: .4rem; margin-top: 1rem; }
.op-mode { display: inline-flex; align-items: center; gap: .4rem; border: 1px solid #d1d5db; border-radius: 6px; padding: .5rem .85rem; font-weight: 600; font-size: .85rem; color: #111827; background: #fff; }
.op-mode.is-active { background: #4f46e5; border-color: #4f46e5; color: #fff; }
.op-status { margin-top: 1rem; font-size: .95rem; color: #111827; border-left: 4px solid #d1d5db; padding: .5rem .8rem; background: #fff; border-radius: 0 8px 8px 0; }
.op-status.ok { border-color: #16a34a; } .op-status.bad { border-color: #dc2626; }
.op-note { margin-top: .8rem; font-size: .92rem; color: #374151; line-height: 1.6; min-height: 3rem; }
.op-moves { margin-top: .8rem; display: grid; grid-template-columns: 2.2rem 1fr 1fr; gap: .2rem .4rem; font-size: .9rem; }
.op-no { color: #9ca3af; text-align: right; }
.op-mv { color: #9ca3af; padding: .05rem .3rem; border-radius: 4px; }
.op-mv.done { color: #111827; font-weight: 600; }
.op-mv.now { background: #eef2ff; color: #111827; font-weight: 700; }

/* Progress dashboard */
.pd-top { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); margin-top: 1.2rem; }
.pd-grid2 { display: grid; gap: 1rem; grid-template-columns: 1fr; margin-top: 1rem; }
@media (min-width: 900px) { .pd-grid2 { grid-template-columns: 1fr 1fr; } }
.pd-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 1.1rem 1.2rem; }
.pd-level { display: flex; gap: 1rem; align-items: center; }
.pd-level-icon { font-size: 3rem; line-height: 1; color: #111827; }
.pd-level-body { flex: 1; }
.pd-label { font-size: .78rem; color: #6b7280; font-weight: 600; }
.pd-big { font-size: 1.9rem; font-weight: 700; color: #111827; line-height: 1.2; }
.pd-big i { color: #6366f1; font-size: 1.4rem; }
.pd-small { font-size: .8rem; color: #6b7280; margin-top: .25rem; }
.pd-bar { height: .5rem; background: #e5e7eb; border-radius: 9999px; overflow: hidden; margin-top: .4rem; }
.pd-bar span { display: block; height: 100%; background: #6366f1; }
.pd-h2 { font-weight: 700; color: #111827; margin-bottom: .7rem; }
.pd-empty { color: #6b7280; font-size: .9rem; }
.pd-empty a, .pd-tip b { color: #111827; }
.pd-svg { width: 100%; height: auto; }
.pd-line { fill: none; stroke: #4f46e5; stroke-width: 2.5; stroke-linejoin: round; }
.pd-dot { fill: #6366f1; }
.pd-grid { stroke: #e5e7eb; stroke-dasharray: 3 4; }
.pd-axis { font-size: 11px; fill: #6b7280; }
.pd-theme { display: grid; grid-template-columns: 8.5rem 1fr 6.5rem; gap: .6rem; align-items: center; font-size: .85rem; margin-bottom: .45rem; }
.pd-theme-name { color: #374151; }
.pd-theme-bar { height: .55rem; background: #e5e7eb; border-radius: 9999px; overflow: hidden; }
.pd-theme-bar span { display: block; height: 100%; }
.pd-theme-bar .good { background: #15803d; } .pd-theme-bar .mid { background: #6366f1; } .pd-theme-bar .low { background: #b91c1c; }
.pd-theme-pct { color: #111827; font-weight: 600; text-align: right; }
.pd-theme-pct small { color: #6b7280; font-weight: 400; }
.pd-tip { font-size: .85rem; color: #374151; margin-top: .7rem; background: #eef2ff; padding: .55rem .7rem; border-radius: 6px; }
.pd-tip i { color: #6366f1; }
.pd-list { display: grid; gap: .35rem; margin-top: .4rem; }
.pd-list li { display: flex; justify-content: space-between; gap: 1rem; font-size: .86rem; color: #374151; border-bottom: 1px solid #f3f4f6; padding-bottom: .35rem; }
.pd-state { font-weight: 600; white-space: nowrap; color: #9ca3af; }
.pd-mastered { color: #4f46e5; } .pd-learned { color: #1d4ed8; } .pd-started { color: #374151; }
.pd-pts { color: #15803d; font-weight: 700; white-space: nowrap; }
.pd-lb { display: grid; gap: .3rem; margin-top: .5rem; }
.pd-lb li { display: grid; grid-template-columns: 2rem 1fr auto; align-items: center; padding: .4rem .55rem; border-radius: 6px; font-size: .9rem; color: #374151; }
.pd-lb li.me { background: #eef2ff; font-weight: 700; color: #111827; }
.pd-rank { color: #4f46e5; font-weight: 700; }
.pd-lb-pts { font-weight: 700; color: #111827; }
.pd-levels { display: flex; flex-wrap: wrap; gap: .4rem; }
.pd-lvl { border: 1px solid #e5e7eb; border-radius: 9999px; padding: .25rem .7rem; font-size: .85rem; color: #374151; }
.pd-lvl small { color: #9ca3af; }
.pd-lvl.is-current { background: #4f46e5; border-color: #4f46e5; color: #fff; }
.pd-lvl.is-current small { color: #e0e7ff; }

/* Admin */
.admin-search { width: 100%; max-width: 22rem; border: 1px solid #d1d5db; border-radius: 6px; padding: .5rem .7rem; margin-bottom: .8rem; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.admin-table th { text-align: left; font-size: .78rem; color: #6b7280; padding: .4rem; border-bottom: 1px solid #e5e7eb; }
.admin-table td { padding: .55rem .4rem; border-bottom: 1px solid #f3f4f6; vertical-align: middle; }
.admin-table input[type=date] { border: 1px solid #d1d5db; border-radius: 6px; padding: .3rem; }
.admin-msg { font-size: .8rem; color: #6b7280; }

/* Public Lab page */
.lab-hero { background: #4f46e5; color: #e0e7ff; }
.lab-hero-inner { display: grid; gap: 2.5rem; padding-top: 3.5rem; padding-bottom: 3.5rem; align-items: center; }
@media (min-width: 900px) { .lab-hero-inner { grid-template-columns: 1.2fr .8fr; } }
.lab-hero-kicker { color: #c7d2fe; font-weight: 600; font-size: .88rem; }
.lab-hero-title { font-weight: 600; font-size: clamp(2.8rem, 6vw, 4.4rem); color: #fff; line-height: 1.02; margin-top: .6rem; }
.lab-hero-lead { font-size: 1.12rem; line-height: 1.7; margin-top: 1rem; max-width: 36rem; color: #e0e7ff; }
.lab-hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-top: 1.8rem; }
.lab-hero .lab-btn { background: #fff; color: #4338ca; }
.lab-hero .lab-btn:hover { background: #eef2ff; color: #3730a3; }
.lab-hero-note { font-size: .85rem; color: #c7d2fe; }
.lab-hero-art img { width: 100%; max-width: 320px; margin: 0 auto; display: block; border-radius: 8px; box-shadow: 0 30px 60px -30px rgba(0,0,0,.7); transform: rotate(-3deg); }
.lab-section { padding-top: 3.5rem; padding-bottom: 3.5rem; }
.lab-tools { display: grid; gap: 1.2rem; margin-top: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); }
.lab-tool { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 1.5rem; display: flex; flex-direction: column; }
.lab-tool-top { display: flex; justify-content: space-between; align-items: center; }
.lab-tool-top > i { font-size: 1.5rem; color: #6366f1; }
.lab-lock { font-size: .75rem; font-weight: 600; color: #6b7280; border: 1px solid #e5e7eb; border-radius: 9999px; padding: .15rem .6rem; }
.lab-lock.is-open { color: #15803d; border-color: #bbf7d0; }
.lab-tool h3 { font-weight: 700; font-size: 1.15rem; color: #111827; margin-top: 1rem; }
.lab-tool p { color: #4b5563; font-size: .92rem; margin-top: .4rem; line-height: 1.6; }
.lab-tool ul { margin: .9rem 0 1.2rem; display: grid; gap: .35rem; flex-grow: 1; }
.lab-tool li { font-size: .85rem; color: #374151; padding-left: 1.1rem; position: relative; }
.lab-tool li::before { content: '♦'; position: absolute; left: 0; color: #6366f1; font-size: .7rem; top: .15rem; }
.lab-tool-link { font-weight: 600; color: #111827; text-decoration: underline; text-underline-offset: 3px; }
.lab-band { background: #f9fafb; border-top: 1px solid #e5e7eb; border-bottom: 1px solid #e5e7eb; }
.lab-steps { display: grid; gap: 1.5rem; margin-top: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.lab-steps li { display: flex; gap: 1rem; }
.lab-steps span { flex-shrink: 0; width: 2.2rem; height: 2.2rem; border-radius: 9999px; border: 1px solid #6366f1; color: #4f46e5; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 1.15rem; }
.lab-steps h3 { font-weight: 700; color: #111827; }
.lab-steps p { font-size: .9rem; color: #4b5563; margin-top: .2rem; }
.lab-price-line { margin-top: 1.8rem; color: #374151; }
.lab-faq details { border-bottom: 1px solid #e5e7eb; padding: 1rem 0; max-width: 46rem; }
.lab-faq summary { font-weight: 600; color: #111827; cursor: pointer; }
.lab-faq details p { color: #4b5563; margin-top: .5rem; font-size: .95rem; }
.lab-faq a { color: #111827; text-decoration: underline; }

/* Toast */
.lab-toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: #4f46e5; color: #fff; padding: .7rem 1.1rem; border-radius: 8px; font-size: .9rem; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 60; box-shadow: 0 10px 25px -10px rgba(0,0,0,.5); }
.lab-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Night mode */
html.dark .lab-bar { background: #0f172a; border-color: #273449; }
html.dark .lab-tabs a { color: #a8b3c4; }
html.dark .lab-tabs a:hover { background: #162032; }
html.dark .lab-tabs a[aria-current] { background: #6366f1; color: #fff; }
html.dark .lab-tabs a[aria-current] i { color: #fff; }
html.dark .lab-chip, html.dark .lab-gate-card, html.dark .tt-status, html.dark .tt-stats div, html.dark .op-item, html.dark .op-status, html.dark .pd-card, html.dark .lab-tool, html.dark .lab-btn-o, html.dark .op-mode, html.dark .tt-filters select { background: #162032; border-color: #273449; color: #cbd5e1; }
html.dark .lab-h1, html.dark .lab-h2, html.dark .lab-gate-card h2, html.dark .tt-status-main, html.dark .tt-stats dd, html.dark .op-title, html.dark .op-item-name, html.dark .pd-big, html.dark .pd-h2, html.dark .lab-tool h3, html.dark .lab-steps h3, html.dark .lab-faq summary, html.dark .pd-lb-pts, html.dark .pd-theme-pct, html.dark .lab-price, html.dark .lab-chip-pts b, html.dark .pd-level-icon, html.dark .lab-tool-link, html.dark .op-mv.done { color: #f1f5f9; }
html.dark .lab-gate-card > p, html.dark .tt-status-sub, html.dark .tt-info, html.dark .op-intro, html.dark .op-note, html.dark .lab-tool p, html.dark .lab-steps p, html.dark .lab-faq details p, html.dark .pd-list li, html.dark .lab-gate-list li, html.dark .lab-tool li, html.dark .tt-filters label, html.dark .pd-theme-name, html.dark .op-status { color: #a8b3c4; }
html.dark .lab-btn { background: #6366f1; color: #fff; }
html.dark .lab-btn:hover { background: #4f46e5; color: #fff; }
html.dark .op-mode.is-active { background: #6366f1; border-color: #6366f1; color: #fff; }
html.dark .op-item.is-active { border-color: #818cf8; }
html.dark .op-mv.now, html.dark .pd-lb li.me { background: rgba(99,102,241,.22); color: #fff; }
html.dark .pd-bar, html.dark .pd-theme-bar { background: #273449; }
html.dark .pd-line { stroke: #a5b4fc; }
html.dark .pd-grid { stroke: #273449; }
html.dark .pd-tip { background: #1e293b; color: #a8b3c4; }
html.dark .pd-tip b, html.dark .pd-empty a { color: #f1f5f9; }
html.dark .pd-list li { border-color: #273449; }
html.dark .lab-band { background: #0f172a; border-color: #273449; }
html.dark .lab-demo { background: rgba(99,102,241,.14); color: #c7d2fe; border-color: rgba(99,102,241,.22); }
html.dark .lab-lock { border-color: #273449; color: #a8b3c4; }
html.dark .admin-table td, html.dark .admin-table th { border-color: #273449; }
.tt-layout > *, .op-layout > * { min-width: 0; }
.tt-filters select { width: 100%; min-width: 0; }
.tt-filters #tt-filters-lichess { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.lab-bar-inner > * { min-width: 0; }
@media (max-width: 520px) {
  .lab-tabs a:not([aria-current]) span { display: none; }
  .lab-tabs a { padding: .55rem .7rem; }
  .tt-filters #tt-filters-lichess { grid-template-columns: 1fr; }
}
.lab-hero { overflow: hidden; }
.lab-board { --light-color: #eef0fb; --dark-color: #8b93d6; }
/* Puzzle Streak */
.ps-scores { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.ps-scores > div { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: .7rem .9rem; }
.ps-score { font-size: 3rem; font-weight: 600; line-height: 1; color: #111827; }
.ps-best { font-size: 3rem; font-weight: 600; line-height: 1; color: #6366f1; }
.ps-rules { display: grid; gap: .3rem; font-size: .82rem; color: #4b5563; padding-left: 1rem; list-style: disc; }
html.dark .ps-scores > div { background: #162032; border-color: #273449; }
html.dark .ps-score { color: #f1f5f9; }
html.dark .ps-rules { color: #a8b3c4; }
/* Launch offer */
.lab-offer { background: #4f46e5; color: #c7d2fe; font-size: .85rem; text-align: center; padding: .5rem 1rem; }
.lab-offer b { color: #fff; }
.lab-offer-note { margin-top: .8rem; color: #4f46e5 !important; font-weight: 600; font-size: .92rem; }
html.dark .lab-offer { background: rgba(99,102,241,.14); }

/* ---- Match the main site (About, Courses, Resources): Poppins, indigo/purple, soft cards ---- */
.lab-hero { background-image: linear-gradient(45deg, rgba(255,255,255,.06) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.06) 75%), linear-gradient(45deg, rgba(255,255,255,.06) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.06) 75%), linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%); background-size: 48px 48px, 48px 48px, auto; background-position: 0 0, 24px 24px, 0 0; color: #e0e7ff; }
.lab-hero-kicker { text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; font-weight: 600; color: #c7d2fe; }
.lab-hero-title { font-weight: 800; font-size: clamp(2.25rem, 5vw, 3rem); line-height: 1.15; letter-spacing: -.01em; }
.lab-hero-lead { color: #e0e7ff; }
.lab-hero-note { color: #c7d2fe; }
.lab-hero .lab-btn { background: #fff; color: #4338ca; box-shadow: 0 4px 14px -4px rgba(0,0,0,.25); }
.lab-hero .lab-btn:hover { background: #eef2ff; color: #3730a3; }
.lab-h1 { font-weight: 700; font-size: 1.875rem; line-height: 1.25; }
.lab-h2 { font-weight: 700; font-size: 1.875rem; line-height: 1.25; }
.lab-gate-card h2 { font-weight: 700; font-size: 1.6rem; line-height: 1.25; }
.lab-gate-kicker { text-transform: uppercase; letter-spacing: .14em; font-size: .75rem; font-weight: 700; color: #4f46e5; }
.lab-price { font-weight: 700; font-size: 1.5rem; }
.op-title { font-weight: 700; font-size: 1.4rem; }
.ps-score, .ps-best { font-weight: 800; font-size: 2.6rem; }
.ps-best { color: #7c3aed; }
.lab-btn { border-radius: .5rem; }
.lab-btn-o, .op-mode, .tt-filters select { border-radius: .5rem; }
.lab-tool, .pd-card, .lab-gate-card, .tt-stats div, .ps-scores > div, .op-item, .tt-status, .op-status { border-color: transparent; box-shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04); }
.lab-tool, .pd-card, .lab-gate-card { border-radius: .75rem; }
.lab-tool { transition: transform .2s, box-shadow .2s; }
.lab-tool:hover { transform: translateY(-3px); box-shadow: 0 10px 25px -8px rgba(79,70,229,.25); }
.lab-tool-top > i { width: 2.75rem; height: 2.75rem; border-radius: .6rem; background: #eef2ff; color: #4f46e5; display: inline-flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.lab-tool li::before { color: #6366f1; }
.lab-tool-link { color: #4f46e5; text-decoration: none; }
.lab-tool-link:hover { color: #3730a3; text-decoration: underline; }
.lab-steps span { border: 0; background: #4f46e5; color: #fff; font-weight: 700; font-size: 1rem; width: 2.5rem; height: 2.5rem; }
.lab-band { background: #fff; }
.lab-offer { background: #eef2ff; color: #3730a3; border-bottom: 1px solid #e0e7ff; }
.lab-offer b { color: #312e81; }
.lab-offer-note { color: #4f46e5 !important; }
.lab-tabs a[aria-current] { background: #4f46e5; }
.op-item.is-active { box-shadow: inset 3px 0 0 #4f46e5, 0 1px 3px rgba(0,0,0,.08); }
.tt-status.ok, .op-status.ok { border-left-color: #16a34a; } .tt-status.bad, .op-status.bad { border-left-color: #dc2626; }
.tt-status, .op-status { border-left: 4px solid #a5b4fc; }
html.dark .lab-band { background: #162032; }
html.dark .lab-tool-top > i { background: rgba(99,102,241,.18); color: #a5b4fc; }
html.dark .lab-tool-link { color: #a5b4fc; }
html.dark .lab-tool, html.dark .pd-card, html.dark .lab-gate-card, html.dark .tt-stats div, html.dark .ps-scores > div, html.dark .op-item, html.dark .tt-status, html.dark .op-status { border-color: transparent; box-shadow: 0 1px 3px rgba(0,0,0,.5); }
html.dark .tt-status, html.dark .op-status { border-left-color: #6366f1; }
html.dark .op-item.is-active { box-shadow: inset 3px 0 0 #818cf8, 0 1px 3px rgba(0,0,0,.5); }
html.dark .lab-gate-kicker, html.dark .lab-offer-note { color: #a5b4fc !important; }
html.dark .ps-best { color: #c4b5fd; }
html.dark .lab-offer { background: rgba(99,102,241,.14); color: #c7d2fe; border-color: #273449; }
html.dark .lab-offer b { color: #fff; }
html.dark .lab-hero .lab-btn { background: #fff; color: #4338ca; }
.cd-wrap.lab-section { padding-top: 3.5rem; padding-bottom: 3.5rem; }
.lab-hero-inner { padding-top: 4rem; padding-bottom: 4rem; }
.lab-hero-art img { max-width: 280px; }
html.dark .lab-price-line { color: #a8b3c4; }
html.dark .lab-price-line b, html.dark .lab-price-line strong { color: #f1f5f9; }

.lab-hero-title { font-size: clamp(2rem, 4.5vw, 3rem); line-height: 1.15; }
.lab-hero-inner { min-height: 20rem; padding-top: 2.5rem; padding-bottom: 2.5rem; }
.lab-hero-art img { max-width: 240px; }
/* Academy students: enrollment number unlock */
.lab-enroll { text-align: left; background: #eef2ff; border-radius: .75rem; padding: 1rem 1.1rem; margin: 1.1rem 0 .4rem; }
.lab-enroll label { display: block; font-size: .88rem; color: #312e81; line-height: 1.5; }
.lab-enroll label i { color: #4f46e5; margin-right: .2rem; }
.lab-enroll-row { display: flex; gap: .5rem; margin-top: .6rem; }
.lab-enroll-row input { flex: 1; min-width: 0; border: 1.5px solid #c7d2fe; border-radius: .5rem; padding: .6rem .75rem; font-size: .95rem; text-transform: uppercase; letter-spacing: .04em; background: #fff; color: #111827; }
.lab-enroll-row input:focus { outline: 2px solid #6366f1; outline-offset: 1px; }
.lab-gate-card .lab-enroll .lab-btn { width: auto; margin-top: 0; }
.lab-enroll-msg { font-size: .82rem; margin-top: .45rem; color: #4b5563; min-height: 1em; }
.lab-enroll-msg.ok { color: #15803d; font-weight: 600; }
.lab-enroll-msg.bad { color: #b91c1c; }
.lab-enroll-compact { margin: .7rem 0; }
.lab-enroll-panel { background: #f9fafb; border-top: 1px solid #e5e7eb; }
.lab-gate-or { font-size: .85rem; color: #6b7280; margin-top: 1rem; }
.lab-gate-academy { font-size: .82rem; color: #4338ca; background: #eef2ff; border-radius: .5rem; padding: .55rem .7rem; margin-top: .9rem; }
.lab-chip-link { cursor: pointer; color: #4338ca; border-color: #c7d2fe; }
.lab-chip-link:hover { background: #eef2ff; }
.lab-chip-academy { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.lab-chip-academy i, .lab-chip-link i { color: inherit; }
.admin-block { margin-bottom: 2.5rem; }
.admin-add { margin: .8rem 0 1rem; }
.admin-text { display: block; width: 100%; max-width: 34rem; border: 1px solid #d1d5db; border-radius: .5rem; padding: .6rem .7rem; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85rem; margin: .4rem 0 .6rem; }
html.dark .lab-enroll, html.dark .lab-gate-academy { background: rgba(99,102,241,.14); }
html.dark .lab-enroll label, html.dark .lab-gate-academy { color: #c7d2fe; }
html.dark .lab-enroll-row input { background: #0b1120; color: #e2e8f0; border-color: #475569; }
html.dark .lab-enroll-msg { color: #a8b3c4; }
html.dark .lab-enroll-msg.ok { color: #86efac; }
html.dark .lab-enroll-msg.bad { color: #fca5a5; }
html.dark .lab-enroll-panel { background: #0f172a; border-color: #273449; }
html.dark .lab-chip-link { color: #c7d2fe; border-color: #475569; }
html.dark .lab-chip-academy { background: rgba(34,197,94,.15); color: #86efac; border-color: rgba(34,197,94,.3); }
.lab-enroll-compact { max-width: 40rem; }

/* Thank-you to Lichess */
.cd-wrap.lab-thanks-wrap { padding-top: 1rem; padding-bottom: 0; }
.lab-thanks { display: flex; gap: 1.1rem; align-items: flex-start; background: #fff; border-radius: .75rem; padding: 1.4rem 1.5rem; box-shadow: 0 1px 3px rgba(0,0,0,.08); border-left: 4px solid #6366f1; max-width: 52rem; }
.lab-thanks-icon { flex-shrink: 0; width: 2.75rem; height: 2.75rem; border-radius: .6rem; background: #fdf2f8; color: #db2777; display: inline-flex; align-items: center; justify-content: center; font-size: 1.15rem; }
.lab-thanks-title { font-size: 1.2rem; font-weight: 700; color: #111827; }
.lab-thanks p { color: #4b5563; line-height: 1.7; margin-top: .35rem; font-size: .95rem; }
.lab-thanks p a { color: #4f46e5; font-weight: 600; }
.lab-thanks-link { display: inline-flex; align-items: center; gap: .4rem; margin-top: .7rem; font-weight: 600; color: #4f46e5; }
.lab-thanks-link:hover { color: #3730a3; }
html.dark .lab-thanks { background: #162032; box-shadow: 0 1px 3px rgba(0,0,0,.5); }
html.dark .lab-thanks-title { color: #f1f5f9; }
html.dark .lab-thanks p { color: #a8b3c4; }
html.dark .lab-thanks p a, html.dark .lab-thanks-link { color: #a5b4fc; }
html.dark .lab-thanks-icon { background: rgba(219,39,119,.15); color: #f9a8d4; }

/* Lab reviews */
.cd-wrap.lab-reviews { padding-bottom: 1.5rem; }
.lab-reviews > .rv, .lab-rv-lead { max-width: 52rem; }
.lab-rv-lead { color: #4b5563; margin: .4rem 0 1.25rem; line-height: 1.6; }
html.dark .lab-rv-lead { color: #a8b3c4; }

.cd-wrap.lab-community { padding-bottom: 1rem; }
