@import url("/orbita.css");

/* Move Atlas appearance: graphite surfaces, coral links, original red actions. */
html[data-theme="light"]{color-scheme:light}
body>header .theme-picker{display:inline-flex;align-items:center;gap:8px;margin:0;flex:0 0 auto;font-size:.8rem;font-weight:600;color:var(--muted)}
body>header .theme-picker select{width:auto;min-width:112px;min-height:44px;margin:0;padding:9px 30px 9px 12px;font-size:.875rem;font-weight:500;cursor:pointer}
@media screen{
 html[data-theme="dark"]{color-scheme:dark;--ink:#edf1f6;--muted:#b0bac9;--line:#384353;--green:#c04438;--paper:#11161e;--surface:#1b222c;--sage:#36272e;--accent:#c04438;--accent-hover:#a7332b;--graphite:#29323e;--shadow:0 8px 28px #0003;--theme-link:#ffb0a3}
 html[data-theme="dark"] body{background:var(--paper);color:var(--ink)}
 html[data-theme="dark"] :is(h1,h2,h3,h4,h5,h6){color:var(--ink)}
 html[data-theme="dark"] :is(.muted,.intro,.breadcrumb,footer){color:var(--muted)}
 html[data-theme="dark"] a:where(:not(.button):not(.route-card):not(.route-skill)){color:var(--theme-link)}
 html[data-theme="dark"] body>header{background:#191f28;border-color:var(--line)}
 html[data-theme="dark"] header :is(.brand,.brand small){color:var(--ink)}
 html[data-theme="dark"] header .site-main-nav a{color:var(--muted)}
 html[data-theme="dark"] header .site-main-nav a[aria-current="page"]{background:#394555;color:#fff}
 html[data-theme="dark"] header .theme-picker{color:var(--muted)}
 html[data-theme="dark"] header .theme-picker select{background:#242d39;border-color:#485668;color:var(--ink)}
 html[data-theme="dark"] :is(button,.button){--accent:#c04438;--green:#c04438}
 html[data-theme="dark"] :is(input,select,textarea){color:var(--ink);border-color:#485568}
 html[data-theme="dark"] :focus-visible{outline-color:#ffb0a3}
 html[data-theme="dark"] ::selection{background:#7c3439;color:#fff}
 html[data-theme="dark"] :is(dialog,.pl-dialog,.em-dialog,.ma-notifications)::backdrop{background:#05090fc9;backdrop-filter:blur(4px)}
 html[data-theme="dark"] :is(.map-scroll,.map-workspace .map-scroll){background:#141b24!important}
 html[data-theme="dark"] .function-lanes rect{fill:#1d2632;stroke:#3f4c5d}
 html[data-theme="dark"] .function-lanes rect:nth-of-type(even){fill:#202b38}
 html[data-theme="dark"] :is(.function-lane-title,.map-category text,.map-node text,.map-pending text){fill:#edf1f6}
 html[data-theme="dark"] .map-category>rect{fill:#1b2732;stroke:#465c68}
 html[data-theme="dark"] .map-node>rect{fill:#202d3b}
 html[data-theme="dark"] .map-node.flex>rect{fill:#1d322e}
 html[data-theme="dark"] .map-node.milestone>rect{fill:#3c3020}
 html[data-theme="dark"] .map-node.rank-complementary>rect{fill:#252e3a!important;stroke:#8c99ac!important}
 html[data-theme="dark"] .map-node .rank-inner{fill:none!important}
 html[data-theme="dark"] .map-node:focus{outline-color:#fff}
 html[data-theme="dark"] .map-edge{stroke:#94b9b2}
 html[data-theme="dark"] .map-edge.related{stroke:#98abc0}
 html[data-theme="dark"] .map-edge.prerequisite{stroke:#e2ba6e}
 html[data-theme="dark"] .map-edge.emphasized{stroke:#ffb0a3}
 html[data-theme="dark"] .progress-page{--progress-red:#ffa393;--progress-blue:#8cbfff;--progress-purple:#c1a5ff}
 html[data-theme="dark"] .progress-metric.metric-reps{--metric-color:var(--progress-blue)}
 html[data-theme="dark"] .progress-metric.metric-seconds{--metric-color:var(--progress-purple)}
 html[data-theme="dark"] .cd-dashboard{--cd-ink:#edf1f6;--cd-muted:#b0bac9;--cd-accent:#ffa393;--cd-berry:#e8a3bf}
 html[data-theme="dark"] .pm-map{--pm-ink:#edf1f6;--pm-accent:#ffa393}
 html[data-theme="dark"] .tl{--tl-ink:#edf1f6;--tl-muted:#b0bac9;--tl-line:#384353}
 html[data-theme="dark"] :is(.catalog .card h2 a,.route-card,.route-card strong){color:#edf1f6}
 html[data-theme="dark"] .catalog .card.rank-complementary{border-color:#475467!important}
 html[data-theme="dark"] .external-video-host{background:#11161e;color:#e4eaf2}
 /* Keep logos, video frames, photographs and personal media in their original colors. */
 html[data-theme="dark"] :is(video,iframe,img){filter:none}
}
@media(max-width:760px){body>header .theme-picker{align-self:flex-start}body>header .theme-picker select{min-width:112px}}
@media print{.theme-picker{display:none!important}html[data-theme]{color-scheme:light}}
@media screen {
 :root {--font:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;--paper:#f6f5f2;--surface:#fff;--ink:#20262b;--muted:#566169;--line:#d9dde0;--accent:#a93d32;--accent-hover:#8e3028;--theme-link:#96362c}
 html[data-theme=dark] {--paper:#13181e;--surface:#1c232b;--ink:#eef1f3;--muted:#b0bac2;--line:#38414a;--accent:#a93d32;--accent-hover:#913228;--theme-link:#ffb0a3}
 body {font-family:var(--font);background-color:var(--paper);color:var(--ink)}
 :is(button,input,select,textarea) {font-family:inherit}
}
#library-view .search-panel {display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:12px;background:var(--surface);border:1px solid var(--line);padding:16px;border-radius:12px}
#library-view .search-panel>.filter-field:first-child,#library-view .search-panel>.advanced-filter-grid {grid-column:1/-1}
#library-view .search-panel>.advanced-filter-grid {margin:0;grid-template-columns:repeat(2,minmax(0,1fr))}
#library-view .advanced-library-filters {grid-column:1/-1;border:0;border-top:1px solid var(--line);border-radius:0;background:transparent;padding:8px 0 0}
#library-view .advanced-library-filters>summary,#library-view .catalog-metadata>summary {cursor:pointer;min-height:44px;align-content:center}
#library-view .advanced-library-filters .library-browser {grid-column:1/-1;width:100%;padding:0;margin:0}
#library-view #reset-catalog {justify-self:start;background:transparent;color:var(--theme-link);border:0;padding:0;margin:0}
#library-view .catalog {display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,275px),1fr));gap:12px}
#library-view .catalog article.card.rank-frame {display:block;align-self:start;min-height:0;padding:16px;border:1px solid var(--line)!important;border-radius:10px;background:var(--surface)!important;color:var(--ink);box-shadow:none}
#library-view .catalog article[hidden] {display:none!important}
#library-view .catalog article h2 {margin:0;font:600 1.05rem/1.4 var(--font);letter-spacing:-.015em}
#library-view .catalog article h2 a {display:block;align-content:center;min-height:44px;color:var(--ink)}
#library-view .catalog article>p {margin:0 0 5px;color:var(--muted);font-size:.9rem}
#library-view .catalog-metadata {margin:0;color:var(--muted);font-size:.85rem}
.map-selection:not([hidden]) {display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px;padding:12px 16px;margin:10px 0;background:var(--surface);color:var(--ink);border:1px solid var(--line);border-radius:10px}
.map-selection>strong {flex-basis:100%}
.map-selection>div:not([hidden]) {display:flex;flex-wrap:wrap;gap:4px 12px;align-items:center}
.map-selection>div span {color:var(--muted);font-size:.875rem}
.map-selection a {display:inline-flex;align-items:center;min-height:44px;color:var(--theme-link)}
.map-selection button {margin-inline-start:auto}
.map-scroll .following-path .map-node.selected-skill rect:first-child {stroke:var(--theme-link)!important;stroke-width:4px}
@media(max-width:540px){
 #library-view .search-panel>.advanced-filter-grid {grid-template-columns:1fr}
 #library-view .catalog {gap:0}
 #library-view .catalog article.card.rank-frame {border:0!important;border-bottom:1px solid var(--line)!important;border-radius:0}
 .map-selection>div {flex-basis:100%}
}
@media(prefers-reduced-motion:reduce){
 html:has(.atlas-hub),html:has(.client-shell) {scroll-behavior:auto}
 .atlas-hub *, .client-shell * {scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:0s!important}
}
/* Apply the Orbita tokens to the existing component roles. Semantic warnings,
   destructive actions and skill tiers keep their own colours. */
@media screen {
  html[data-theme] {
    --paper: var(--orb-canvas);
    --surface: var(--orb-panel);
    --ink: var(--orb-text);
    --muted: var(--orb-muted);
    --line: var(--orb-line);
    --green: var(--orb-solid);
    --accent: var(--orb-solid);
    --accent-hover: #0c554f;
    --theme-link: var(--orb-action);
    --graphite: #302345;
    --sage: var(--orb-tint);
  }
  html[data-theme] body { background: var(--paper); color: var(--ink); }
  html[data-theme] body > header { background: var(--surface); border-color: var(--line); }
  html[data-theme] header .site-main-nav a { color: var(--muted); }
  html[data-theme] header .site-main-nav a:is(:hover,[aria-current=page]) {
    color: var(--theme-link); background: var(--sage);
  }
  html[data-theme] header :is(.theme-picker,.language-picker) select,
  html[data-theme] :is(input:not([type=checkbox]):not([type=radio]):not([type=range]),textarea,select) {
    color: var(--ink); background-color: var(--surface); border-color: var(--orb-control);
  }
  html[data-theme] :is(input,textarea)::placeholder { color: var(--muted); }
  html[data-theme] :is(input[type=checkbox],input[type=radio],progress) { accent-color: var(--orb-action); }
  html[data-theme] :is(button,.button) { --accent: var(--orb-solid); --green: var(--orb-solid); }
  html[data-theme] :is(.button:not(.secondary),button[type=submit]:not(.secondary)) {
    background: var(--orb-action); color: var(--orb-on-action);
  }
  html[data-theme] :is(.button:not(.secondary),button[type=submit]:not(.secondary)):enabled:hover,
  html[data-theme] a.button:not(.secondary):hover { background: var(--orb-hover); color: var(--orb-on-action); }
  html[data-theme] :is(.secondary,button.secondary) { background: var(--orb-raised); color: var(--ink); }
  html[data-theme] :is(.secondary,button.secondary):hover { background: var(--sage); color: var(--theme-link); }
  html[data-theme] a:where(:not(.button):not(.brand):not(.route-skill):not(.route-card)),
  html[data-theme] :is(.eyebrow,.current-target small,.payment-kind) { color: var(--theme-link); }
  html[data-theme] :focus-visible { outline-color: var(--theme-link); }
  html[data-theme] ::selection { background: var(--orb-action); color: var(--orb-on-action); }
  html[data-theme] :is(.panel,.offer-card,.library-gate,.workout-card,.payment-card,.payment-empty,.ma-notifications,.ma-bell,.em-dialog,.em-top,.progress-filters,.progress-metric,.cd-filters,.cd-item,.cd-empty) {
    color: var(--ink); background-color: var(--surface); border-color: var(--line);
  }
  html[data-theme] :is(.ma-bell-count,.exercise-number) { background: var(--orb-tint); color: var(--orb-action); }
  html[data-theme] .progress-page { --progress-red:var(--orb-action); color:var(--ink); }
  html[data-theme] .cd-dashboard { --cd-ink:var(--ink); --cd-muted:var(--muted); --cd-accent:var(--theme-link); --cd-berry:var(--theme-link); }
  html[data-theme] .coach-layout { --aw-soft:var(--surface); --aw-tint:var(--sage); --aw-accent:var(--theme-link); }
  html[data-theme] .pm-map { --pm-ink:var(--ink); --pm-accent:var(--theme-link); }
  html[data-theme] .tl { --tl-ink:var(--ink); --tl-muted:var(--muted); --tl-line:var(--line); }
  html[data-theme] .current-target { background:var(--sage); border-left-color:var(--theme-link); }
  html[data-theme] .map-edge.emphasized { stroke:var(--theme-link); }
  html[data-theme=dark] :is(.map-scroll,.map-workspace .map-scroll) { background:var(--paper)!important; }
  html[data-theme=dark] .function-lanes rect { fill:var(--surface); stroke:var(--line); }
  html[data-theme=dark] .function-lanes rect:nth-of-type(even) { fill:var(--orb-raised); }
  html[data-theme=dark] .map-node:not(.flex):not(.milestone)>rect:first-child { fill:var(--surface); }
}
