/* =====================================================================
   Corpus — 3D anatomy website template
   Shared styles for the home, atlas, library, article and quiz pages.
   Tokens on :root, dark theme on [data-theme="dark"] (or the OS setting).
   ===================================================================== */
:root {
  --cp-brand: #0e8f83; --cp-brand-2: #0b766c; --cp-brand-soft: #d9f2ee; --cp-accent: #e8664f; --cp-gold: #c9962b;
  --cp-bg: #f5f6f4; --cp-surface: #ffffff; --cp-surface-2: #eef1ef; --cp-line: #dfe4e1; --cp-line-2: #cdd5d1;
  --cp-text: #12201d; --cp-text-2: #44524e; --cp-muted: #6c7a76;
  --cp-stage-1: #f3f5f6; --cp-stage-2: #d6dee3; --cp-shadow: 0 1px 2px rgba(16, 32, 29, .06), 0 8px 24px rgba(16, 32, 29, .08);
  --cp-radius: 14px; --cp-radius-sm: 9px; --cp-head: 60px;
  --cp-font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --cp-display: var(--cp-font);   /* Inter throughout, like the rest of CoreLuke */
  --cp-serif: var(--cp-font);
  --sys-skin: #e3b28f; --sys-muscular: #b5473a; --sys-skeletal: #d9cdb3; --sys-connective: #9fb2bd; --sys-nervous: #e0b43a; --sys-cardiovascular: #c8323a;
  --sys-respiratory: #e08b95; --sys-digestive: #d9876f; --sys-urinary: #b5603f; --sys-endocrine: #b77ccb; --sys-lymphatic: #7fae5c; --sys-reproductive: #d4728c; --sys-brain: #d9a3ae;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --cp-brand: #2cc4b3; --cp-brand-2: #5ad8c9; --cp-brand-soft: #0f3330; --cp-accent: #ff8a73;
    --cp-bg: #0b1114; --cp-surface: #121a1e; --cp-surface-2: #182327; --cp-line: #233136; --cp-line-2: #2e3f45;
    --cp-text: #e7efed; --cp-text-2: #b5c3bf; --cp-muted: #85958f;
    --cp-stage-1: #1d2a31; --cp-stage-2: #0a1013; --cp-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --cp-brand: #2cc4b3; --cp-brand-2: #5ad8c9; --cp-brand-soft: #0f3330; --cp-accent: #ff8a73;
  --cp-bg: #0b1114; --cp-surface: #121a1e; --cp-surface-2: #182327; --cp-line: #233136; --cp-line-2: #2e3f45;
  --cp-text: #e7efed; --cp-text-2: #b5c3bf; --cp-muted: #85958f;
  --cp-stage-1: #1d2a31; --cp-stage-2: #0a1013; --cp-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .35);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--cp-font); font-size: 15px; line-height: 1.55; color: var(--cp-text); background: var(--cp-bg); -webkit-font-smoothing: antialiased; }
a { color: var(--cp-brand); text-decoration: none; }
a:hover { color: var(--cp-brand-2); }
img { max-width: 100%; display: block; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--cp-brand); outline-offset: 2px; border-radius: 6px; }
.cp-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cp-wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.cp-ico { width: 1.15em; height: 1.15em; flex: none; display: inline-block; vertical-align: -0.2em; }
iconify-icon { flex: none; }

/* ── header ─────────────────────────────────────────────────────────── */
.cp-head { position: sticky; top: 0; z-index: 50; height: var(--cp-head); display: flex; align-items: center; gap: 18px; padding: 0 20px;
  background: color-mix(in srgb, var(--cp-surface) 86%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--cp-line); }
.cp-logo { display: inline-flex; align-items: center; gap: 9px; font-family: var(--cp-display); font-weight: 800; font-size: 19px; letter-spacing: -.02em; color: var(--cp-text); }
.cp-logo:hover { color: var(--cp-text); }
.cp-logo svg { width: 30px; height: 30px; }
.cp-logo small { font: 600 10px/1 var(--cp-font); letter-spacing: .12em; text-transform: uppercase; color: var(--cp-muted); padding: 4px 6px; border: 1px solid var(--cp-line); border-radius: 6px; }
.cp-nav { display: flex; gap: 2px; margin-left: 6px; }
.cp-nav a { padding: 7px 12px; border-radius: 8px; color: var(--cp-text-2); font-weight: 550; font-size: 14px; }
.cp-nav a:hover { background: var(--cp-surface-2); color: var(--cp-text); }
.cp-nav a[aria-current="page"] { color: var(--cp-text); background: var(--cp-surface-2); }
.cp-head-search { flex: 1; max-width: 380px; margin-left: auto; position: relative; }
.cp-head-search input { width: 100%; height: 38px; border-radius: 10px; border: 1px solid var(--cp-line); background: var(--cp-surface-2); padding: 0 12px 0 36px; font-size: 14px; }
.cp-head-search input:focus { outline: none; border-color: var(--cp-brand); background: var(--cp-surface); box-shadow: 0 0 0 3px color-mix(in srgb, var(--cp-brand) 22%, transparent); }
.cp-head-search > iconify-icon { position: absolute; left: 11px; top: 11px; font-size: 16px; color: var(--cp-muted); }
.cp-head-search kbd { position: absolute; right: 9px; top: 9px; font: 600 11px/1 var(--cp-font); padding: 4px 6px; border-radius: 5px; border: 1px solid var(--cp-line); color: var(--cp-muted); background: var(--cp-surface); }
.cp-results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--cp-surface); border: 1px solid var(--cp-line); border-radius: 12px; box-shadow: var(--cp-shadow); max-height: 380px; overflow: auto; padding: 6px; display: none; z-index: 60; }
.cp-results.is-open { display: block; }
.cp-results a, .cp-results button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--cp-text); background: none; border: 0; text-align: left; }
.cp-results a:hover, .cp-results a.is-active, .cp-results button:hover, .cp-results button.is-active { background: var(--cp-surface-2); }
.cp-results small { color: var(--cp-muted); margin-left: auto; font-size: 12px; white-space: nowrap; }
.cp-results .cp-empty { padding: 14px; color: var(--cp-muted); font-size: 13px; }
.cp-head-actions { display: flex; align-items: center; gap: 8px; }
.cp-iconbtn { width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: 10px; border: 1px solid var(--cp-line); background: var(--cp-surface); color: var(--cp-text-2); font-size: 18px; }
.cp-iconbtn:hover { color: var(--cp-text); border-color: var(--cp-line-2); }
.cp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--cp-line); background: var(--cp-surface); color: var(--cp-text); font-weight: 600; font-size: 14px; white-space: nowrap; transition: transform .15s, background .15s, border-color .15s; }
.cp-btn:hover { border-color: var(--cp-line-2); color: var(--cp-text); }
.cp-btn:active { transform: scale(.98); }
.cp-btn.is-primary { background: var(--cp-brand); border-color: var(--cp-brand); color: #fff; }
.cp-btn.is-primary:hover { background: var(--cp-brand-2); border-color: var(--cp-brand-2); color: #fff; }
:root[data-theme="dark"] .cp-btn.is-primary, :root[data-theme="dark"] .cp-btn.is-primary:hover { color: #04201d; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cp-btn.is-primary, :root:not([data-theme="light"]) .cp-btn.is-primary:hover { color: #04201d; } }
.cp-btn.is-ghost { background: transparent; border-color: transparent; }
.cp-btn.is-lg { height: 48px; padding: 0 22px; font-size: 15px; border-radius: 12px; }
.cp-btn.is-sm { height: 32px; padding: 0 11px; font-size: 13px; border-radius: 8px; }
.cp-menu-btn { display: none; }
@media (max-width: 960px) {
  .cp-nav { display: none; }
  .cp-nav.is-open { display: flex; flex-direction: column; position: absolute; top: var(--cp-head); left: 0; right: 0; background: var(--cp-surface); border-bottom: 1px solid var(--cp-line); padding: 10px 16px 16px; box-shadow: var(--cp-shadow); }
  .cp-menu-btn { display: inline-grid; }
  .cp-head-actions .cp-btn:not(.is-keep) { display: none; }
}
@media (max-width: 640px) {
  .cp-head { gap: 10px; padding: 0 12px; }
  .cp-logo small, .cp-head-search kbd { display: none; }
  .cp-head-search { max-width: none; }
}

/* ── chips, cards, system dots ──────────────────────────────────────── */
.cp-chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--cp-surface-2); color: var(--cp-text-2); border: 1px solid var(--cp-line); white-space: nowrap; }
.cp-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--c, var(--cp-brand)); box-shadow: 0 0 0 2px color-mix(in srgb, var(--c, var(--cp-brand)) 25%, transparent); }
.cp-card { background: var(--cp-surface); border: 1px solid var(--cp-line); border-radius: var(--cp-radius); }
.cp-kicker { font: 700 12px/1 var(--cp-font); letter-spacing: .14em; text-transform: uppercase; color: var(--cp-brand); }
.cp-h1, .cp-h2, .cp-h3 { font-family: var(--cp-display); letter-spacing: -.025em; margin: 0; line-height: 1.08; }
.cp-h1 { font-size: clamp(36px, 5.4vw, 64px); font-weight: 800; }
.cp-h2 { font-size: clamp(28px, 3.6vw, 42px); font-weight: 800; }
.cp-h3 { font-size: 19px; font-weight: 700; letter-spacing: -.015em; }
.cp-lead { font-size: 18px; color: var(--cp-text-2); max-width: 60ch; }

/* ── 3D stage (shared by atlas, home hero, article and quiz) ────────── */
.cp-stage { position: relative; overflow: hidden; background: radial-gradient(120% 90% at 50% 38%, var(--cp-stage-1), var(--cp-stage-2)); touch-action: none; user-select: none; -webkit-user-select: none; }
.cp-stage .cp-canvas { display: block; position: absolute; inset: 0; outline: none; cursor: grab; }
.cp-stage .cp-canvas:active { cursor: grabbing; }
.cp-labels { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.cp-leaders { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.cp-leaders line { stroke: var(--cp-text); stroke-opacity: .55; stroke-width: 1.2; }
.cp-leaders circle { fill: var(--cp-surface); stroke: var(--cp-text); stroke-width: 1.4; }
.cp-label { position: absolute; left: 0; top: 0; pointer-events: auto; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 6px 10px; border-radius: 9px; border: 1px solid var(--cp-line); background: color-mix(in srgb, var(--cp-surface) 92%, transparent); box-shadow: var(--cp-shadow); text-align: left; max-width: 220px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.cp-label b { font-size: 13px; font-weight: 650; line-height: 1.2; }
.cp-label small { font-size: 11px; color: var(--cp-muted); line-height: 1.2; }
.cp-label.is-sel { border-color: var(--cp-brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--cp-brand) 22%, transparent), var(--cp-shadow); }
.cp-tip { position: absolute; left: 0; top: 0; z-index: 4; pointer-events: none; padding: 5px 9px; border-radius: 7px; background: rgba(10, 18, 20, .86); color: #fff; font-size: 12.5px; font-weight: 550; white-space: nowrap; opacity: 0; transition: opacity .12s; }
.cp-tip.is-on { opacity: 1; }
.cp-loading { position: absolute; inset: 0; z-index: 6; display: grid; place-items: center; pointer-events: none; transition: opacity .5s; }
.cp-loading.is-done { opacity: 0; }
.cp-loading-card { pointer-events: auto; width: min(340px, 86%); padding: 18px 20px; border-radius: 16px; background: color-mix(in srgb, var(--cp-surface) 90%, transparent); border: 1px solid var(--cp-line); box-shadow: var(--cp-shadow); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.cp-loading-card b { display: block; font-size: 14px; }
.cp-loading-card span { display: block; font-size: 12.5px; color: var(--cp-muted); margin-top: 2px; min-height: 1.5em; }
.cp-bar { height: 6px; border-radius: 9px; background: var(--cp-surface-2); overflow: hidden; margin-top: 12px; }
.cp-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--cp-brand), var(--cp-brand-2)); transition: width .25s; }

/* ── atlas app ─────────────────────────────────────────────────────── */
.cp-app { height: 100dvh; display: grid; grid-template-rows: var(--cp-head) 1fr; overflow: hidden; }
body:has(.cp-app) { overflow: hidden; }
.cp-app .cp-head { position: relative; }
/* clip (not hidden) so focus or find-in-page can never scroll the closed drawer and sheet into view */
.cp-atlas { position: relative; display: grid; grid-template-columns: 300px 1fr 360px; min-height: 0; overflow: hidden; overflow: clip; }
.cp-atlas.no-left { grid-template-columns: 0 1fr 360px; }
.cp-atlas.no-right { grid-template-columns: 300px 1fr 0; }
.cp-atlas.no-left.no-right { grid-template-columns: 0 1fr 0; }
.cp-panel { min-height: 0; display: flex; flex-direction: column; background: var(--cp-surface); overflow: hidden; }
.cp-panel.is-left { border-right: 1px solid var(--cp-line); }
.cp-panel.is-right { border-left: 1px solid var(--cp-line); }
.cp-tabs { display: flex; gap: 4px; padding: 10px 12px 0; border-bottom: 1px solid var(--cp-line); flex: none; }
.cp-tabs button { flex: 1; border: 0; background: none; padding: 9px 6px 11px; font-size: 13px; font-weight: 600; color: var(--cp-muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.cp-tabs button[aria-selected="true"] { color: var(--cp-text); border-color: var(--cp-brand); }
.cp-scroll { overflow: auto; min-height: 0; flex: 1; overscroll-behavior: contain; }
.cp-pane { padding: 12px; }
.cp-pane[hidden] { display: none; }
.cp-sys { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 4px 10px; padding: 9px 10px; border-radius: 11px; border: 1px solid transparent; }
.cp-sys + .cp-sys { margin-top: 2px; }
.cp-sys:hover { background: var(--cp-surface-2); }
.cp-sys.is-on { border-color: var(--cp-line); background: var(--cp-surface); }
.cp-sys-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 16%, transparent); color: var(--c); }
.cp-sys-ico svg { width: 20px; height: 20px; }
.cp-sys-name { font-weight: 600; font-size: 14px; line-height: 1.2; }
.cp-sys-name small { display: block; font-weight: 500; font-size: 11.5px; color: var(--cp-muted); }
.cp-sys input[type="range"] { grid-column: 2 / 4; width: 100%; height: 18px; accent-color: var(--c); }
.cp-sys:not(.is-on) input[type="range"] { display: none; }
.cp-sys:not(.is-on) .cp-sys-ico { filter: grayscale(1); opacity: .55; }
.cp-switch { position: relative; width: 38px; height: 22px; border-radius: 99px; border: 0; background: var(--cp-line-2); transition: background .2s; flex: none; }
.cp-switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .2s; }
.cp-switch[aria-checked="true"] { background: var(--c, var(--cp-brand)); }
.cp-switch[aria-checked="true"]::after { transform: translateX(16px); }
.cp-section-t { display: flex; align-items: center; justify-content: space-between; font: 700 11px/1 var(--cp-font); letter-spacing: .12em; text-transform: uppercase; color: var(--cp-muted); margin: 18px 4px 8px; }
.cp-section-t:first-child { margin-top: 4px; }
.cp-section-t button { font: 600 12px/1 var(--cp-font); letter-spacing: 0; text-transform: none; color: var(--cp-brand); background: none; border: 0; padding: 4px; }
.cp-peel { padding: 6px 6px 2px; }
.cp-peel input { width: 100%; accent-color: var(--cp-brand); }
.cp-peel-steps { display: flex; justify-content: space-between; font-size: 11px; color: var(--cp-muted); margin-top: 2px; }
.cp-peel-steps span.is-on { color: var(--cp-text); font-weight: 650; }
.cp-presets { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.cp-preset { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 10px; border: 1px solid var(--cp-line); background: var(--cp-surface); font-size: 13px; font-weight: 600; text-align: left; }
.cp-preset:hover { border-color: var(--cp-line-2); }
.cp-preset.is-on { border-color: var(--cp-brand); background: var(--cp-brand-soft); }
.cp-regions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.cp-filter { position: relative; margin-bottom: 10px; }
.cp-filter input { width: 100%; height: 36px; border-radius: 9px; border: 1px solid var(--cp-line); background: var(--cp-surface-2); padding: 0 10px 0 32px; font-size: 13.5px; }
.cp-filter input:focus { outline: none; border-color: var(--cp-brand); background: var(--cp-surface); }
.cp-filter iconify-icon { position: absolute; left: 10px; top: 10px; color: var(--cp-muted); }
.cp-tree details { border-radius: 9px; }
.cp-tree summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 8px; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.cp-tree summary::-webkit-details-marker { display: none; }
.cp-tree summary:hover { background: var(--cp-surface-2); }
.cp-tree summary .cp-caret { transition: transform .15s; color: var(--cp-muted); }
.cp-tree details[open] > summary .cp-caret { transform: rotate(90deg); }
.cp-tree summary small { margin-left: auto; color: var(--cp-muted); font-weight: 500; font-size: 12px; }
.cp-tree details details summary { font-weight: 550; font-size: 13px; padding-left: 22px; }
.cp-tree ul { list-style: none; margin: 0 0 4px; padding: 0 0 0 30px; }
.cp-row { display: flex; align-items: center; gap: 6px; padding: 4px 6px 4px 8px; border-radius: 7px; font-size: 13px; }
.cp-row:hover { background: var(--cp-surface-2); }
.cp-row.is-sel { background: var(--cp-brand-soft); }
.cp-row button.cp-name { flex: 1; min-width: 0; text-align: left; background: none; border: 0; padding: 2px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-row .cp-side { font-size: 10.5px; font-weight: 700; color: var(--cp-muted); border: 1px solid var(--cp-line); border-radius: 5px; padding: 1px 4px; }
.cp-row .cp-eye { border: 0; background: none; width: 26px; height: 24px; border-radius: 6px; color: var(--cp-muted); display: grid; place-items: center; }
.cp-row .cp-eye:hover { color: var(--cp-text); background: var(--cp-surface); }
.cp-row.is-other .cp-name { color: var(--cp-muted); }
.cp-sexmark { font-size: 11px; color: var(--cp-muted); }
.cp-row.is-hidden .cp-name { color: var(--cp-muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--cp-muted) 50%, transparent); }

.cp-stage-wrap { position: relative; min-width: 0; min-height: 0; }
.cp-stage-wrap .cp-stage { position: absolute; inset: 0; }
.cp-float { position: absolute; z-index: 5; }
.cp-bar-top { top: 12px; left: 12px; right: 12px; display: flex; align-items: flex-start; gap: 8px; pointer-events: none; }
.cp-bar-top > * { pointer-events: auto; }
.cp-pill { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 12px; background: color-mix(in srgb, var(--cp-surface) 88%, transparent); border: 1px solid var(--cp-line); box-shadow: var(--cp-shadow); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.cp-pill button { height: 34px; min-width: 34px; padding: 0 10px; border-radius: 9px; border: 0; background: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--cp-text-2); white-space: nowrap; }
.cp-pill button:hover { background: var(--cp-surface-2); color: var(--cp-text); }
.cp-pill button[aria-pressed="true"] { background: var(--cp-brand); color: #fff; }
:root[data-theme="dark"] .cp-pill button[aria-pressed="true"] { color: #04201d; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cp-pill button[aria-pressed="true"] { color: #04201d; } }
.cp-pill button iconify-icon { font-size: 17px; }
.cp-pill .cp-sep { width: 1px; height: 20px; background: var(--cp-line); margin: 0 3px; }
#cpViews { overflow-x: auto; scrollbar-width: none; max-width: 100%; }
#cpViews::-webkit-scrollbar { display: none; }
.cp-bar-top { min-width: 0; }
.cp-crumb { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; font-size: 13px; }
.cp-crumb b { font-weight: 650; }
.cp-spacer { flex: 1; }
.cp-stage-wrap { container-type: inline-size; }
.cp-dock { left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; max-width: calc(100% - 24px); }
@container (min-width: 1040px) { .cp-dock { flex-direction: row; } }
.cp-dock .cp-pill { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.cp-dock .cp-pill::-webkit-scrollbar { display: none; }
.cp-turn { display: flex; align-items: center; gap: 10px; padding: 6px 12px 6px 6px; }
.cp-turn input { width: 220px; accent-color: var(--cp-brand); }
.cp-deg { font: 700 13px/1 var(--cp-font); font-variant-numeric: tabular-nums; min-width: 44px; text-align: right; }
.cp-compass { width: 38px; height: 38px; flex: none; }
.cp-compass circle { fill: var(--cp-surface-2); stroke: var(--cp-line-2); }
.cp-compass .n { fill: var(--cp-brand); }
.cp-compass text { font: 700 7px/1 var(--cp-font); fill: var(--cp-muted); text-anchor: middle; dominant-baseline: central; }
.cp-pop { position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); min-width: 260px; padding: 12px; border-radius: 14px; background: var(--cp-surface); border: 1px solid var(--cp-line); box-shadow: var(--cp-shadow); display: none; }
.cp-pop.is-open { display: block; }
.cp-pop h4 { margin: 0 0 8px; font-size: 13px; }
.cp-seg { display: flex; gap: 4px; padding: 3px; border-radius: 10px; background: var(--cp-surface-2); }
.cp-seg button { flex: 1; height: 30px; border-radius: 8px; border: 0; background: none; font-size: 12.5px; font-weight: 600; color: var(--cp-text-2); }
.cp-seg button[aria-pressed="true"] { background: var(--cp-surface); color: var(--cp-text); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.cp-pop input[type="range"] { width: 100%; margin: 12px 0 4px; accent-color: var(--cp-brand); }
.cp-pop .cp-row-flex { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--cp-muted); }
.cp-quizbar { top: 60px; left: 50%; transform: translateX(-50%); display: none; align-items: center; gap: 12px; padding: 10px 12px 10px 16px; border-radius: 14px; background: var(--cp-surface); border: 1px solid var(--cp-line); box-shadow: var(--cp-shadow); max-width: calc(100% - 24px); }
.cp-quizbar.is-on { display: flex; }
.cp-quizbar .q { font-size: 14px; }
.cp-quizbar .q b { font-size: 15px; }
.cp-quizbar .cp-score { font: 700 13px/1 var(--cp-font); padding: 7px 10px; border-radius: 9px; background: var(--cp-surface-2); white-space: nowrap; }
.cp-flash { position: absolute; inset: 0; z-index: 4; pointer-events: none; opacity: 0; transition: opacity .35s; }
.cp-flash.is-good { background: radial-gradient(60% 60% at 50% 50%, transparent 60%, rgba(30, 180, 120, .28)); opacity: 1; }
.cp-flash.is-bad { background: radial-gradient(60% 60% at 50% 50%, transparent 60%, rgba(220, 70, 60, .28)); opacity: 1; }

/* detail panel */
.cp-detail { padding: 18px 18px 28px; }
.cp-detail-empty { padding: 26px 22px; color: var(--cp-text-2); }
.cp-detail-empty h3 { margin: 14px 0 6px; font-size: 17px; }
.cp-detail-empty p { margin: 0 0 16px; font-size: 14px; }
.cp-tips { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: 13.5px; }
.cp-tips li { display: flex; gap: 10px; align-items: flex-start; }
.cp-tips iconify-icon { font-size: 18px; color: var(--cp-brand); margin-top: 1px; }
.cp-tips kbd { font: 600 11px/1 var(--cp-font); padding: 3px 5px; border: 1px solid var(--cp-line); border-radius: 5px; background: var(--cp-surface-2); }
.cp-d-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.cp-d-name { font-family: var(--cp-display); font-size: 24px; font-weight: 800; letter-spacing: -.02em; line-height: 1.12; margin: 0; }
.cp-d-latin { font-family: var(--cp-serif); font-style: italic; color: var(--cp-text-2); margin: 4px 0 0; font-size: 15px; }
.cp-d-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 16px 0; }
.cp-act { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 9px 4px 8px; border-radius: 11px; border: 1px solid var(--cp-line); background: var(--cp-surface); font-size: 11.5px; font-weight: 600; color: var(--cp-text-2); }
.cp-act iconify-icon { font-size: 19px; color: var(--cp-text); }
.cp-act:hover { border-color: var(--cp-line-2); color: var(--cp-text); }
.cp-act[aria-pressed="true"] { border-color: var(--cp-brand); background: var(--cp-brand-soft); color: var(--cp-text); }
.cp-d-summary { font-size: 14.5px; color: var(--cp-text); margin: 0 0 16px; }
.cp-facts { margin: 0 0 16px; border: 1px solid var(--cp-line); border-radius: 12px; overflow: hidden; }
.cp-facts div { display: grid; grid-template-columns: 104px 1fr; gap: 10px; padding: 10px 12px; font-size: 13.5px; }
.cp-facts div + div { border-top: 1px solid var(--cp-line); }
.cp-facts dt { font-weight: 650; color: var(--cp-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; padding-top: 1px; }
.cp-facts dd { margin: 0; }
.cp-callout { border-radius: 12px; padding: 12px 14px; background: color-mix(in srgb, var(--cp-accent) 9%, var(--cp-surface)); border: 1px solid color-mix(in srgb, var(--cp-accent) 28%, var(--cp-line)); font-size: 13.5px; margin-bottom: 16px; }
.cp-callout b { display: flex; align-items: center; gap: 7px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--cp-accent); margin-bottom: 4px; }
.cp-related { display: flex; flex-wrap: wrap; gap: 6px; }
.cp-related button, .cp-related a { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 99px; border: 1px solid var(--cp-line); background: var(--cp-surface); font-size: 12.5px; font-weight: 600; color: var(--cp-text); }
.cp-related button:hover, .cp-related a:hover { border-color: var(--cp-brand); color: var(--cp-text); }
.cp-d-foot { display: flex; gap: 8px; margin-top: 18px; }
.cp-d-foot .cp-btn { flex: 1; }
.cp-lock { margin-top: 18px; padding: 14px; border-radius: 12px; background: linear-gradient(135deg, color-mix(in srgb, var(--cp-gold) 14%, var(--cp-surface)), var(--cp-surface)); border: 1px solid color-mix(in srgb, var(--cp-gold) 35%, var(--cp-line)); font-size: 13px; }
.cp-lock b { display: flex; align-items: center; gap: 6px; color: var(--cp-gold); }
.cp-sheet-grip { display: none; }

@media (max-width: 1180px) { .cp-atlas { grid-template-columns: 270px 1fr 320px; } }
@media (max-width: 900px) {
  .cp-atlas, .cp-atlas.no-left, .cp-atlas.no-right { grid-template-columns: 1fr; }
  .cp-panel.is-left { position: absolute; z-index: 30; top: 0; bottom: 0; left: 0; width: min(330px, 88vw); transform: translateX(-102%); transition: transform .28s cubic-bezier(.2, .8, .2, 1); box-shadow: var(--cp-shadow); }
  .cp-atlas.show-left .cp-panel.is-left { transform: none; }
  .cp-panel.is-right { position: absolute; z-index: 30; left: 0; right: 0; bottom: 0; height: min(64dvh, 560px); border: 1px solid var(--cp-line); border-radius: 18px 18px 0 0; transform: translateY(102%); transition: transform .3s cubic-bezier(.2, .8, .2, 1); box-shadow: 0 -10px 30px rgba(0, 0, 0, .18); }
  .cp-atlas.show-right .cp-panel.is-right { transform: none; }
  .cp-sheet-grip { display: block; width: 44px; height: 5px; border-radius: 9px; background: var(--cp-line-2); margin: 8px auto 0; flex: none; }
  .cp-turn input { width: 120px; }
  .cp-hide-sm { display: none !important; }
  .cp-quizbar { top: 58px; }
}
.cp-only-sm { display: none !important; }
@media (max-width: 900px) { .cp-only-sm { display: inline-flex !important; } }

/* ── atlas workspace (CoreLuke workspace bar, glass HUD, zoom stack, view cube) ── */
.cp-app.is-ws { grid-template-rows: 52px 1fr; }
.cp-ws { position: relative; z-index: 50; display: flex; align-items: center; gap: 10px; padding: 0 12px; height: 52px; background: var(--cp-surface); border-bottom: 1px solid var(--cp-line); }
.cp-ws .cp-logo { font-size: 17px; margin-right: 4px; }
.cp-ws .cp-logo svg { width: 28px; height: 28px; }
.cp-wsseg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--cp-surface-2); border: 1px solid var(--cp-line); flex: none; }
.cp-wsseg button { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: 8px; border: 0; background: none; font-size: 13px; font-weight: 600; color: var(--cp-text-2); white-space: nowrap; }
.cp-wsseg button:hover { color: var(--cp-text); }
.cp-wsseg button[aria-checked="true"] { background: var(--cp-surface); color: var(--cp-text); box-shadow: 0 1px 2px rgba(0, 0, 0, .12), 0 0 0 1px var(--cp-line); }
.cp-wsseg button iconify-icon { font-size: 16px; }
.cp-wsseg.is-sex b { font-size: 15px; line-height: 1; font-weight: 700; }
.cp-wsseg.is-sex button[data-sex="m"][aria-checked="true"] b { color: #3d7fd9; }
.cp-wsseg.is-sex button[data-sex="f"][aria-checked="true"] b { color: #d4567d; }
.cp-ws-search { max-width: 440px; margin-left: 6px; }
.cp-ws-search input { height: 34px; }
.cp-ws-search > iconify-icon { top: 9px; }
.cp-ws-search kbd { top: 7px; }
.cp-ws-nav { display: flex; gap: 2px; margin-left: auto; }
.cp-ws-nav a { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; border-radius: 8px; color: var(--cp-text-2); font-size: 13px; font-weight: 600; }
.cp-ws-nav a:hover { background: var(--cp-surface-2); color: var(--cp-text); }
.cp-ws-nav iconify-icon { font-size: 16px; }
.cp-ws-actions { display: flex; align-items: center; gap: 6px; }
.cp-ws-actions .cp-iconbtn { width: 34px; height: 34px; font-size: 17px; border-radius: 9px; }
.cp-ws-pop { position: relative; }
.cp-pop.is-down { top: calc(100% + 8px); bottom: auto; left: auto; right: 0; transform: none; z-index: 70; min-width: 320px; }
.cp-help dl { margin: 0; display: grid; gap: 8px; font-size: 12.5px; }
.cp-help dl div { display: grid; grid-template-columns: 74px 1fr; gap: 8px; }
.cp-help dt { color: var(--cp-muted); font-weight: 650; }
.cp-help dd { margin: 0; color: var(--cp-text-2); line-height: 1.7; }
.cp-help kbd, .cp-hud kbd { font: 600 10.5px/1 var(--cp-font); padding: 3px 5px; border: 1px solid var(--cp-line); border-bottom-width: 2px; border-radius: 5px; background: var(--cp-surface-2); color: var(--cp-text); }
.cp-set-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 9px 0; font-size: 13px; font-weight: 600; }
.cp-set-row + .cp-set-row { border-top: 1px solid var(--cp-line); }
.cp-set-row small { display: block; font-weight: 500; font-size: 11.5px; color: var(--cp-muted); }
.cp-set-row .cp-seg { min-width: 150px; }
@media (max-width: 1240px) { .cp-ws-nav span, .cp-wsseg:not(.is-sex) button span { display: none; } .cp-wsseg:not(.is-sex) button { padding: 0 9px; } }
@media (max-width: 900px) {
  .cp-ws { gap: 6px; padding: 0 8px; }
  .cp-ws .cp-logo span, .cp-ws .cp-logo small, .cp-ws-nav, .cp-ws-search kbd, .cp-wsseg.is-sex span { display: none; }
  .cp-ws-search { margin-left: 0; min-width: 0; }
  .cp-ws-actions .cp-ws-pop:first-child { display: none; }
}
@media (max-width: 560px) { .cp-ws-search { display: none; } .cp-wsseg button { padding: 0 8px; } }

/* glass HUD */
.cp-hud { gap: 8px; padding: 6px 12px; font-size: 12.5px; font-weight: 600; color: var(--cp-text-2); }
.cp-hud:empty { display: none; }
.cp-hud b { color: var(--cp-text); font-variant-numeric: tabular-nums; }
.cp-hud .cp-sep { width: 1px; height: 16px; background: var(--cp-line); }

/* view cube + nudges */
.cp-nav3d { top: 58px; right: 14px; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.cp-cubewrap { position: relative; width: 108px; height: 108px; display: grid; place-items: center; }
.cp-cube { width: 62px; height: 62px; perspective: 260px; }
.cp-cube-in { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; }
.cp-cube-in button { position: absolute; inset: 0; display: grid; place-items: center; border: 1px solid var(--cp-line-2); border-radius: 7px; background: color-mix(in srgb, var(--cp-surface) 92%, transparent); color: var(--cp-text-2); font: 700 10.5px/1 var(--cp-font); letter-spacing: .06em; backface-visibility: hidden; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--cp-surface) 40%, transparent); }
.cp-cube-in button:hover { background: var(--cp-brand-soft); color: var(--cp-brand); border-color: var(--cp-brand); }
.cp-cube-in .f-a { transform: translateZ(31px); }
.cp-cube-in .f-p { transform: rotateY(180deg) translateZ(31px); }
.cp-cube-in .f-l { transform: rotateY(90deg) translateZ(31px); }
.cp-cube-in .f-r { transform: rotateY(-90deg) translateZ(31px); }
.cp-cube-in .f-s { transform: rotateX(90deg) translateZ(31px); }
.cp-cube-in .f-i { transform: rotateX(-90deg) translateZ(31px); }
.cp-nudge { position: absolute; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 7px; border: 1px solid var(--cp-line); background: color-mix(in srgb, var(--cp-surface) 88%, transparent); color: var(--cp-text-2); font-size: 13px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.cp-nudge:hover { color: var(--cp-text); border-color: var(--cp-line-2); }
.cp-nudge.is-up { top: 0; left: 42px; } .cp-nudge.is-down { bottom: 0; left: 42px; }
.cp-nudge.is-left { left: 0; top: 42px; } .cp-nudge.is-right { right: 0; top: 42px; }
.cp-views-btn { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 9px; border-radius: 8px; border: 1px solid var(--cp-line); background: color-mix(in srgb, var(--cp-surface) 88%, transparent); font-size: 12px; font-weight: 600; color: var(--cp-text-2); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.cp-views-btn:hover, .cp-views-btn[aria-expanded="true"] { color: var(--cp-text); border-color: var(--cp-line-2); }
.cp-viewlist[hidden] { display: none; }
@container (max-width: 820px) { #cpTools button > span { display: none; } }
.cp-viewlist { display: flex; flex-direction: column; gap: 2px; padding: 3px; border-radius: 11px; background: color-mix(in srgb, var(--cp-surface) 88%, transparent); border: 1px solid var(--cp-line); box-shadow: var(--cp-shadow); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.cp-viewlist button { display: flex; align-items: center; justify-content: space-between; gap: 10px; height: 28px; padding: 0 8px; border: 0; border-radius: 7px; background: none; font-size: 12px; font-weight: 600; color: var(--cp-text-2); min-width: 128px; }
.cp-viewlist button:hover { background: var(--cp-surface-2); color: var(--cp-text); }
.cp-viewlist button[aria-pressed="true"] { background: var(--cp-brand-soft); color: var(--cp-text); }
.cp-viewlist kbd { font: 600 10px/1 var(--cp-font); color: var(--cp-muted); }

/* zoom stack */
.cp-zoom { right: 14px; bottom: 96px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 3px; border-radius: 12px; background: color-mix(in srgb, var(--cp-surface) 88%, transparent); border: 1px solid var(--cp-line); box-shadow: var(--cp-shadow); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.cp-zoom button { width: 36px; height: 34px; border: 0; border-radius: 9px; background: none; display: grid; place-items: center; color: var(--cp-text-2); font-size: 17px; }
.cp-zoom button:hover:not(:disabled) { background: var(--cp-surface-2); color: var(--cp-text); }
.cp-zoom button:disabled { opacity: .35; cursor: default; }
.cp-zoom .cp-zoom-pct { font: 700 11px/1 var(--cp-font); font-variant-numeric: tabular-nums; width: 44px; }
.cp-zoom .cp-sep { width: 20px; height: 1px; background: var(--cp-line); margin: 3px 0; }

/* dock and popovers */
.cp-dock { bottom: 14px; }
.cp-pop .cp-seg + input[type="range"] { margin-top: 14px; }
.cp-pill button:disabled { opacity: .4; cursor: default; }

/* compare */
.cp-cmp-tags { top: 60px; left: 0; right: 0; display: none; pointer-events: none; }
.cp-atlas.is-compare .cp-cmp-tags { display: grid; grid-template-columns: 1fr 1fr; }
.cp-cmp-tags span { justify-self: start; margin-left: 12px; font-size: 12.5px; font-weight: 700; padding: 6px 12px; border-radius: 99px; background: color-mix(in srgb, var(--cp-surface) 88%, transparent); border: 1px solid var(--cp-line); box-shadow: var(--cp-shadow); }
.cp-atlas.is-compare .cp-stage-wrap::after { content: ''; position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; background: var(--cp-line-2); pointer-events: none; z-index: 2; }

/* motion dock */
.cp-motion { left: 50%; bottom: 66px; transform: translateX(-50%); width: min(820px, calc(100% - 150px)); display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border-radius: 16px; background: color-mix(in srgb, var(--cp-surface) 92%, transparent); border: 1px solid var(--cp-line); box-shadow: var(--cp-shadow); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.cp-motion[hidden] { display: none; }
.cp-clips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.cp-clips::-webkit-scrollbar { display: none; }
.cp-clips .cp-clip-g { display: flex; align-items: center; gap: 4px; flex: none; }
.cp-clips .cp-clip-g + .cp-clip-g { padding-left: 8px; border-left: 1px solid var(--cp-line); }
.cp-clips .cp-clip-g > small { font: 700 10px/1 var(--cp-font); letter-spacing: .1em; text-transform: uppercase; color: var(--cp-muted); writing-mode: vertical-rl; transform: rotate(180deg); }
.cp-clip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border-radius: 9px; border: 1px solid var(--cp-line); background: var(--cp-surface); font-size: 12.5px; font-weight: 600; color: var(--cp-text-2); white-space: nowrap; }
.cp-clip:hover { color: var(--cp-text); border-color: var(--cp-line-2); }
.cp-clip[aria-checked="true"] { border-color: var(--cp-brand); background: var(--cp-brand-soft); color: var(--cp-text); }
.cp-clip iconify-icon { font-size: 16px; }
.cp-transport { display: flex; align-items: center; gap: 10px; }
.cp-play { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 0; background: var(--cp-brand); color: #fff; font-size: 18px; }
:root[data-theme="dark"] .cp-play { color: #04201d; }
.cp-play:disabled { opacity: .4; }
.cp-scrub { flex: 1; min-width: 0; }
.cp-scrub-t { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 12.5px; }
.cp-scrub-t b { font-size: 13px; }
.cp-scrub-t span { color: var(--cp-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-scrub input { width: 100%; accent-color: var(--cp-brand); margin: 4px 0 0; }
.cp-seg.is-speed { flex: none; }
.cp-seg.is-speed button { padding: 0 8px; }
.cp-transport .cp-btn[aria-pressed="true"] { border-color: var(--cp-brand); background: var(--cp-brand-soft); }
.cp-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 11.5px; color: var(--cp-text-2); }
.cp-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cp-legend span::before { content: ''; width: 18px; height: 8px; border-radius: 4px; background: var(--k); }
.cp-legend .k-c, .cp-k-c { --k: #ff5a2e; } .cp-legend .k-e, .cp-k-e { --k: #3d86ff; } .cp-legend .k-i, .cp-k-i { --k: #ffb21e; } .cp-legend .k-0 { --k: #9aa3a6; }
@media (max-width: 900px) { .cp-motion { width: calc(100% - 20px); bottom: 64px; } .cp-legend { display: none; } }

/* origin / insertion markers drawn by the viewer */
.cp-pole { position: absolute; left: 0; top: 0; z-index: 3; pointer-events: none; display: flex; align-items: center; gap: 6px; margin: -7px 0 0 -7px; }
.cp-pole i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .35), 0 2px 6px rgba(0, 0, 0, .3); }
.cp-pole.is-o i { background: #2f9e62; } .cp-pole.is-i i { background: #d6452c; }
.cp-pole span { font-size: 11px; font-weight: 700; padding: 3px 7px; border-radius: 6px; color: #fff; background: rgba(10, 18, 20, .82); }

/* detail additions */
.cp-live { border: 1px solid var(--cp-line); border-radius: 12px; padding: 12px; margin: 0 0 16px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.cp-live > div { display: flex; flex-direction: column; gap: 3px; }
.cp-live small { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--cp-muted); }
.cp-live b { font-size: 17px; font-variant-numeric: tabular-nums; }
.cp-live .cp-meter { grid-column: 1 / -1; height: 6px; border-radius: 6px; background: var(--cp-surface-2); overflow: hidden; }
.cp-live .cp-meter i { display: block; height: 100%; background: var(--k, var(--cp-brand)); transition: width .15s; }
.cp-kind { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 650; }
.cp-kind::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--k, #9aa3a6); }
.cp-attach { display: grid; gap: 4px; margin-bottom: 16px; }
.cp-attach button { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 9px; border: 1px solid var(--cp-line); background: var(--cp-surface); font-size: 13px; text-align: left; }
.cp-attach button:hover { border-color: var(--cp-brand); }
.cp-attach small { font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 5px; background: var(--cp-surface-2); color: var(--cp-muted); }
.cp-attach small.is-o { color: #2f9e62; } .cp-attach small.is-i { color: #d6452c; }
.cp-active { display: grid; gap: 4px; }
.cp-active button { display: grid; grid-template-columns: 1fr 90px 38px; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; border: 0; background: none; font-size: 13px; text-align: left; }
.cp-active button:hover { background: var(--cp-surface-2); }
.cp-active .bar { height: 6px; border-radius: 6px; background: var(--cp-surface-2); overflow: hidden; }
.cp-active .bar i { display: block; height: 100%; background: var(--k); }
.cp-active em { font-style: normal; font-variant-numeric: tabular-nums; font-size: 12px; color: var(--cp-muted); text-align: right; }
.cp-measure-r { display: flex; align-items: center; gap: 8px; }
.cp-dimmed { opacity: .45; pointer-events: none; }

/* ── marketing pages ───────────────────────────────────────────────── */
.cp-hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--cp-line); }
.cp-hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 24px; min-height: min(760px, calc(100dvh - var(--cp-head))); }
.cp-hero-copy { padding: 64px 0; position: relative; z-index: 2; }
.cp-hero-copy .cp-lead { margin: 20px 0 30px; }
.cp-hero-cta { display: flex; flex-wrap: wrap; gap: 10px; }
.cp-hero-stats { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 40px; }
.cp-hero-stats b { display: block; font-family: var(--cp-display); font-size: 30px; font-weight: 800; letter-spacing: -.03em; }
.cp-hero-stats span { font-size: 13px; color: var(--cp-muted); }
.cp-hero-stage { position: relative; height: min(760px, calc(100dvh - var(--cp-head))); min-height: 520px; }
.cp-hero-stage .cp-stage { position: absolute; inset: 0; background: none; }
.cp-hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(60% 70% at 78% 45%, var(--cp-stage-1), transparent 70%); pointer-events: none; }
.cp-hero-layers { position: absolute; z-index: 5; right: 8px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 6px; }
.cp-hero-layers button { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--cp-line); background: color-mix(in srgb, var(--cp-surface) 85%, transparent); font-size: 13px; font-weight: 600; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.cp-hero-layers button[aria-pressed="true"] { border-color: var(--cp-brand); color: var(--cp-brand); }
.cp-hero-hint { position: absolute; z-index: 5; left: 50%; bottom: 18px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--cp-muted); padding: 7px 12px; border-radius: 99px; background: color-mix(in srgb, var(--cp-surface) 80%, transparent); border: 1px solid var(--cp-line); white-space: nowrap; }
.cp-sec { padding: 96px 0; }
.cp-sec.is-alt { background: var(--cp-surface); border-block: 1px solid var(--cp-line); }
.cp-sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 40px; }
.cp-sec-head p { margin: 12px 0 0; color: var(--cp-text-2); max-width: 56ch; }
.cp-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.cp-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.cp-feature { padding: 24px; }
.cp-feature .cp-feature-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--cp-brand-soft); color: var(--cp-brand); font-size: 22px; margin-bottom: 16px; }
.cp-feature h3 { margin: 0 0 6px; font-size: 17px; font-family: var(--cp-display); letter-spacing: -.01em; }
.cp-feature p { margin: 0; color: var(--cp-text-2); font-size: 14.5px; }
.cp-region { display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: var(--cp-radius); border: 1px solid var(--cp-line); background: var(--cp-surface); color: var(--cp-text); transition: border-color .2s, transform .2s; }
.cp-region:hover { border-color: var(--cp-brand); color: var(--cp-text); transform: translateY(-2px); }
.cp-region > svg { width: 54px; height: 54px; color: var(--cp-brand); }
.cp-region .cp-sys-ico { width: 40px; height: 40px; flex: none; }
.cp-region .cp-sys-ico svg { width: 22px; height: 22px; }
.cp-region b { font-family: var(--cp-display); font-size: 16px; }
.cp-region span { font-size: 13px; color: var(--cp-muted); }
.cp-plan { padding: 28px; display: flex; flex-direction: column; gap: 16px; }
.cp-plan.is-best { border-color: var(--cp-brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--cp-brand) 16%, transparent); }
.cp-plan h3 { margin: 0; font-family: var(--cp-display); font-size: 18px; }
.cp-price { font-family: var(--cp-display); font-size: 40px; font-weight: 800; letter-spacing: -.03em; }
.cp-price small { font: 500 14px/1 var(--cp-font); color: var(--cp-muted); letter-spacing: 0; }
.cp-plan ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; font-size: 14px; }
.cp-plan li { display: flex; gap: 9px; }
.cp-plan li iconify-icon { color: var(--cp-brand); font-size: 18px; margin-top: 1px; }
.cp-plan .cp-btn { margin-top: auto; }
.cp-quote { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.cp-quote p { margin: 0; font-family: var(--cp-serif); font-size: 17px; line-height: 1.55; }
.cp-who { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--cp-muted); }
.cp-who b { color: var(--cp-text); display: block; font-size: 14px; }
.cp-avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; background: var(--c, var(--cp-brand)); }
.cp-cta-band { padding: 48px; border-radius: 22px; background: linear-gradient(135deg, var(--cp-brand), color-mix(in srgb, var(--cp-brand) 55%, #063b36)); color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cp-cta-band h2 { color: #fff; }
.cp-cta-band p { margin: 10px 0 0; opacity: .85; max-width: 52ch; }
.cp-cta-band .cp-btn { background: #fff; color: #063b36; border-color: #fff; }
.cp-foot { padding: 56px 0 40px; border-top: 1px solid var(--cp-line); background: var(--cp-surface); font-size: 14px; color: var(--cp-text-2); }
.cp-foot-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 24px; }
.cp-foot h4 { margin: 0 0 10px; font-size: 13px; color: var(--cp-text); }
.cp-foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 7px; }
.cp-foot a { color: var(--cp-text-2); }
.cp-foot a:hover { color: var(--cp-text); }
.cp-foot-note { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--cp-line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--cp-muted); }
@media (max-width: 960px) {
  .cp-hero-grid { grid-template-columns: 1fr; min-height: 0; }
  .cp-hero-copy { padding: 44px 0 0; }
  .cp-hero-stage { height: 560px; min-height: 0; }
  .cp-grid-3 { grid-template-columns: 1fr; }
  .cp-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .cp-sec { padding: 64px 0; }
  .cp-sec-head { flex-direction: column; align-items: flex-start; }
  .cp-foot-grid { grid-template-columns: 1fr 1fr; }
  .cp-cta-band { padding: 32px 24px; }
}
@media (max-width: 520px) { .cp-grid-4 { grid-template-columns: 1fr 1fr; gap: 10px; } .cp-hero-stats { gap: 18px; } .cp-hero-stats b { font-size: 24px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; } }
