/* Slopdog Universe theme for the docs prototype. Palette and fonts follow the
   Universe console (Catppuccin Mocha, glows, Inter and JetBrains Mono). Dark only. */
:root, [data-md-color-scheme="slate"] {
  --crust: #11111b; --mantle: #181825; --base: #1e1e2e;
  --s0: #313244; --s1: #45475a; --o0: #6c7086; --o1: #7f849c; --o2: #9399b2;
  --sub0: #a6adc8; --sub1: #bac2de; --text: #cdd6f4;
  --lavender: #b4befe; --blue: #89b4fa; --sky: #89dceb; --teal: #94e2d5; --green: #a6e3a1;
  --yellow: #f9e2af; --peach: #fab387; --red: #f38ba8; --mauve: #cba6f7; --pink: #f5c2e7; --rose: #f5e0dc;
  --line: rgba(180, 190, 254, 0.09); --line-2: rgba(180, 190, 254, 0.16);
  --mono: 'JetBrains Mono', ui-monospace, monospace; --sans: 'Inter', system-ui, sans-serif;

  --md-default-bg-color: var(--crust);
  --md-default-fg-color: var(--text);
  --md-default-fg-color--light: var(--sub0);
  --md-default-fg-color--lighter: var(--o1);
  --md-default-fg-color--lightest: var(--s0);
  --md-primary-fg-color: var(--mantle);
  --md-primary-bg-color: var(--text);
  --md-accent-fg-color: var(--mauve);
  --md-typeset-color: var(--text);
  --md-typeset-a-color: var(--blue);
  --md-code-bg-color: rgba(49, 50, 68, .6);
  --md-code-fg-color: var(--text);
  --md-footer-bg-color: var(--mantle);
}
body, .md-typeset { font-family: var(--sans); -webkit-font-smoothing: antialiased; }
body { background: var(--crust); }
.md-main { background:
  radial-gradient(900px 600px at 78% -8%, rgba(203,166,247,.16), transparent 62%),
  radial-gradient(700px 520px at -6% 40%, rgba(137,180,250,.10), transparent 60%),
  radial-gradient(640px 420px at 100% 100%, rgba(245,194,231,.10), transparent 60%); }
.md-header { background: linear-gradient(180deg, rgba(24,24,37,.95), rgba(17,17,27,.8)); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); box-shadow: none; }
.md-header__title { font-weight: 800; letter-spacing: .2em; font-size: .8rem; }
.md-header__title .md-ellipsis { background: linear-gradient(90deg, var(--rose), var(--pink) 40%, var(--mauve)); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 10px rgba(245,194,231,.35)); }
.md-tabs { display: none; }
.md-sidebar { padding-bottom: 80px; }
.md-nav { font-size: .66rem; }
.md-nav__link { color: var(--sub0); }
.md-nav__item .md-nav__link--active, .md-nav__link:is(:focus, :hover) { color: var(--mauve); }
.md-nav__item--section > .md-nav__link { color: var(--sub1); font-weight: 600; letter-spacing: .06em; }
.md-nav--primary .md-nav__title { background: transparent; color: var(--o2); }
.md-nav--secondary .md-nav__title { font-family: var(--mono); font-size: .58rem; letter-spacing: .16em; text-transform: uppercase; color: var(--o1); }

.md-typeset h1 { font-weight: 800; letter-spacing: -.01em; color: var(--text); background: linear-gradient(90deg, var(--rose), var(--pink) 45%, var(--mauve)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; filter: drop-shadow(0 0 14px rgba(245,194,231,.25)); }
.md-typeset h2 { font-weight: 700; color: var(--text); border-bottom: 1px solid var(--line); padding-bottom: .3em; }
.md-typeset h3 { color: var(--lavender); font-family: var(--mono); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; }
.md-typeset hr { border-color: var(--line); }
.md-typeset code { font-family: var(--mono); background: rgba(49,50,68,.6); }
.md-typeset em { color: var(--sub1); }

/* grid cards as glass tiles */
.md-typeset .grid.cards > ul > li, .md-typeset .grid > .card {
  background: var(--glass, rgba(24,24,37,.72)); border: 1px solid var(--line-2); border-radius: 10px;
  transition: border-color .2s, box-shadow .2s, transform .2s; }
.md-typeset .grid.cards > ul > li:hover { border-color: rgba(203,166,247,.55); box-shadow: 0 0 22px rgba(203,166,247,.18); transform: translateY(-1px); }
.md-typeset .grid.cards hr { border-color: var(--line-2); }
.md-typeset .grid.cards a { color: var(--text); }

.md-typeset .admonition, .md-typeset details { background: rgba(24,24,37,.6); border: 1px solid var(--line-2); border-left: 3px solid var(--mauve); border-radius: 8px; box-shadow: none; font-size: .68rem; }
.md-typeset .admonition-title { background: rgba(203,166,247,.08) !important; }

/* kind chips on part pages */
.sd-kind { font: 600 .6rem var(--mono); letter-spacing: .14em; text-transform: uppercase; padding: 2px 8px; border-radius: 10px; border: 1px solid; }
.sd-kind-rule { color: var(--yellow); border-color: rgba(249,226,175,.4); }
.sd-kind-skill { color: var(--teal); border-color: rgba(148,226,213,.4); }
.sd-kind-hook { color: var(--pink); border-color: rgba(245,194,231,.4); }
.sd-kind-script { color: var(--peach); border-color: rgba(250,179,135,.4); }

/* video placeholder */
.sd-video { position: relative; aspect-ratio: 16 / 9; max-width: 760px; border-radius: 12px; border: 1px solid var(--line-2); display: grid; place-content: center; justify-items: center; gap: 6px; overflow: hidden;
  background: radial-gradient(60% 80% at 30% 20%, rgba(203,166,247,.22), transparent 70%), radial-gradient(60% 80% at 80% 90%, rgba(137,180,250,.18), transparent 70%), var(--mantle);
  box-shadow: 0 0 40px rgba(203,166,247,.10); margin: 1rem 0; }
.sd-video::after { content: ''; position: absolute; inset: 0; opacity: .05; mix-blend-mode: overlay; background-image: repeating-linear-gradient(0deg, #fff 0 1px, transparent 1px 3px); pointer-events: none; }
.sd-video-play { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; color: var(--rose); border: 1.5px solid var(--mauve); box-shadow: 0 0 24px rgba(203,166,247,.55), inset 0 0 16px rgba(203,166,247,.25); }
.sd-video-play svg { margin-left: 3px; }
.sd-video-cap { font: 700 .75rem var(--mono); letter-spacing: .22em; text-transform: uppercase; color: var(--text); }
.sd-video-sub { font-size: .65rem; color: var(--o2); }

/* diagrams in the diagram-design style: hairlines, no shadows, one accent */
.sd-diagram { display: block !important; width: 100% !important; max-width: 100% !important; box-sizing: border-box; margin: 1rem 0 !important; padding: 14px; border: 1px solid var(--line-2); border-radius: 12px; background: rgba(24,24,37,.55); }
.sd-diagram svg { width: 100%; height: auto; display: block; }
.d-mask { fill: var(--mantle); }
.d-box { fill: var(--base); stroke: var(--o1); stroke-width: 1; }
.d-box.focal { fill: rgba(203,166,247,.10); stroke: var(--mauve); stroke-width: 1.4; }
.d-name { fill: var(--text); font: 600 13px var(--sans); }
.d-sub { fill: var(--sub0); font: 400 9px var(--mono); }
.d-tag { fill: var(--o2); font: 500 8px var(--mono); letter-spacing: .18em; }
.d-lab { fill: var(--o2); font: 400 8px var(--mono); letter-spacing: .06em; }
.d-arrow { fill: none; stroke: var(--sub0); stroke-width: 1.2; }
.d-arrow.accent { stroke: var(--mauve); }
.d-head { fill: var(--sub0); }
.d-band { fill: none; stroke: var(--o1); stroke-width: 1; stroke-dasharray: 5 4; }
.sd-diagram a:hover .d-box { stroke: var(--mauve); }
.sd-diagram a { text-decoration: none; }

/* chat bar docked at the bottom */
.sd-chat { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; background: linear-gradient(180deg, rgba(24,24,37,.92), rgba(17,17,27,.96)); backdrop-filter: blur(14px); border-top: 1px solid var(--line-2); box-shadow: 0 -8px 40px rgba(0,0,0,.45); transition: height .28s cubic-bezier(.2,.8,.2,1); height: 56px; display: flex; flex-direction: column; }
.sd-chat.open { height: min(46vh, 380px); }
.sd-chat-bar { display: flex; align-items: center; gap: 10px; padding: 0 16px; min-height: 56px; max-width: 1220px; width: 100%; margin: 0 auto; }
.sd-chat-badge { font: 600 .55rem var(--mono); letter-spacing: .14em; color: var(--yellow); border: 1px solid rgba(249,226,175,.3); border-radius: 4px; padding: 2px 6px; flex: none; }
.sd-chat-input { flex: 1; min-width: 0; height: 34px; border-radius: 17px; border: 1px solid var(--line-2); background: rgba(17,17,27,.6); color: var(--text); padding: 0 14px; font: inherit; font-size: .7rem; outline: none; }
.sd-chat-input:focus { border-color: rgba(203,166,247,.6); box-shadow: 0 0 18px rgba(203,166,247,.18); }
.sd-chat-send { height: 34px; padding: 0 14px; border-radius: 17px; border: 1px solid rgba(203,166,247,.5); color: var(--mauve); background: rgba(203,166,247,.08); font-size: .68rem; cursor: pointer; }
.sd-chat-note { font-size: .58rem; color: var(--o1); max-width: 260px; line-height: 1.3; flex: none; }
.sd-chat-body { flex: 1; overflow: auto; padding: 4px 16px 14px; max-width: 1220px; width: 100%; margin: 0 auto; display: none; font-size: .7rem; }
.sd-chat.open .sd-chat-body { display: block; }
.sd-msg { margin: 8px 0; padding: 8px 12px; border-radius: 10px; max-width: 640px; border: 1px solid var(--line); background: rgba(49,50,68,.35); color: var(--sub1); }
.sd-msg b { color: var(--pink); font-family: var(--mono); font-size: .58rem; letter-spacing: .14em; display: block; margin-bottom: 2px; }
.sd-msg.you { margin-left: auto; background: rgba(203,166,247,.10); border-color: rgba(203,166,247,.3); }
.md-main__inner { margin-bottom: 84px; }
.sd-chat-note a { color: var(--mauve); white-space: nowrap; }
.sd-chat-foot { margin: 10px 0 0; font-size: .62rem; color: var(--o1); }
.sd-chat-foot a { color: var(--mauve); }
.sd-msg.wait { opacity: .6; }
.md-typeset img.sd-banner { width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line); margin: 0 0 8px; display: block; }
@media (max-width: 900px) { .sd-chat-note { display: none; } }

/* ---- The Loop: pillar-coloured diagram parts (set --c on a .lp group) ---- */
.sd-loop svg { min-width: 640px; }
.sd-loop { overflow-x: auto; }
.md-main .md-grid:has(.sd-loop) { max-width: min(96rem, 100%); }
.lp .lp-box { fill: color-mix(in srgb, var(--c) 12%, var(--base)); stroke: var(--c); stroke-width: 1.4; }
.lp .lp-sector { fill: color-mix(in srgb, var(--c) 20%, var(--base)); stroke: var(--c); stroke-width: 1.2; }
.lp .lp-card { fill: color-mix(in srgb, var(--c) 7%, var(--base)); stroke: color-mix(in srgb, var(--c) 70%, transparent); stroke-width: 1.1; }
.lp .d-tag, .lp .lp-key { fill: var(--c); }
.lp .lp-acc, .lp-acc { fill: var(--mauve); }
.lp-arc { fill: none; stroke: var(--sub0); stroke-width: 1.4; }
.lp-arc.accent { stroke: var(--mauve); stroke-width: 1.8; }
.d-head.accent { fill: var(--mauve); }
.lp-ring { fill: none; stroke: var(--teal); stroke-width: 1.2; stroke-dasharray: 7 6; opacity: .75; }
.lp-spoke { fill: none; stroke: var(--c); stroke-width: 1; opacity: .45; }
.lp-dot { fill: var(--c); }
.lp-rule { stroke: var(--line-2); stroke-width: 1; }
.lp-chip rect { fill: var(--mantle); stroke: var(--teal); stroke-width: 1; }
.lp-chip text { fill: var(--teal); font: 400 11px var(--mono); }
.lp-chip-script rect { stroke: var(--peach); }
.lp-chip-script text { fill: var(--peach); }
.lp-chip-more rect { stroke: var(--o1); stroke-dasharray: 3 3; }
.lp-chip-more text { fill: var(--o2); }
.lp .lp-phase { font: 700 13px var(--sans); }
.lp .lp-blurb { font-size: 8.5px; }
.lp .lp-step { font: 600 12px var(--sans); }
.lp .lp-glyph { fill: var(--mauve); font-size: 18px; }

/* ---- Home: atomic thinking pills ---- */
.sd-atoms > p { line-height: 2.1; }
.sd-pill { font: inherit; font-weight: 600; cursor: pointer; padding: 1px 12px; margin: 0 1px; border-radius: 999px; border: 1px solid var(--c, var(--mauve)); color: var(--c, var(--mauve)); background: transparent; transition: background .15s; }
.sd-pill:hover { background: color-mix(in srgb, var(--c, var(--mauve)) 16%, transparent); }
.sd-pill[aria-expanded="true"] { background: color-mix(in srgb, var(--c, var(--mauve)) 26%, transparent); }
.sd-pill:focus-visible { outline: 2px solid var(--c, var(--mauve)); outline-offset: 2px; }
.sd-pill::after { content: " +"; opacity: .7; }
.sd-pill[aria-expanded="true"]::after { content: " \2212"; }
.sd-pill[data-k="module"], .sd-atom-def[data-k="module"] { --c: var(--mauve); }
.sd-pill[data-k="feature"], .sd-atom-def[data-k="feature"] { --c: var(--blue); }
.sd-pill[data-k="rule"], .sd-atom-def[data-k="rule"] { --c: var(--yellow); }
.sd-pill[data-k="skill"], .sd-atom-def[data-k="skill"] { --c: var(--teal); }
.sd-pill[data-k="hook"], .sd-atom-def[data-k="hook"] { --c: var(--pink); }
.sd-pill[data-k="script"], .sd-atom-def[data-k="script"] { --c: var(--peach); }
.sd-atom-def { margin: .6rem 0; padding: 4px 18px; max-width: 760px; border: 1px solid var(--line-2); border-left: 3px solid var(--c); border-radius: 8px; background: rgba(24,24,37,.6); font-size: .72rem; }
.sd-atom-def[hidden] { display: none; }
.sd-atom-ex span { font: 600 .58rem var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--c); margin-right: 6px; }

/* ---- Module-tinted cards (restrained: soft tint, coloured top edge, gentle glow on hover) ---- */
.sd-m { display: none; }
.md-typeset .grid.cards > ul > li:has(.sd-m-trust) { --mc: var(--green); }
.md-typeset .grid.cards > ul > li:has(.sd-m-digestible) { --mc: var(--yellow); }
.md-typeset .grid.cards > ul > li:has(.sd-m-aligned) { --mc: var(--blue); }
.md-typeset .grid.cards > ul > li:has(.sd-m-evolve) { --mc: var(--mauve); }
.md-typeset .grid.cards > ul > li:has(.sd-m-momentum) { --mc: var(--peach); }
.md-typeset .grid.cards > ul > li:has(.sd-m-outside) { --mc: var(--teal); }
.md-typeset .grid.cards > ul > li:has(.sd-m) {
  background: color-mix(in srgb, var(--mc) 8%, rgba(24,24,37,.72));
  border-color: color-mix(in srgb, var(--mc) 26%, transparent);
  border-top: 2px solid color-mix(in srgb, var(--mc) 70%, transparent); }
.md-typeset .grid.cards > ul > li:has(.sd-m):hover {
  border-color: color-mix(in srgb, var(--mc) 55%, transparent);
  box-shadow: 0 0 22px color-mix(in srgb, var(--mc) 22%, transparent); }
.md-typeset .grid.cards > ul > li:has(.sd-m) hr { border-color: color-mix(in srgb, var(--mc) 25%, transparent); }

/* ---- The Loop: nudge toward the Lo-fi tab ---- */
.sd-nudge { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 .6rem; padding: 3px 12px 3px 8px; border-radius: 999px; font-size: .7rem; color: var(--sub1); background: color-mix(in srgb, var(--mauve) 10%, transparent); border: 1px solid color-mix(in srgb, var(--mauve) 30%, transparent); }
.sd-nudge strong { color: var(--mauve); }
.sd-nudge-arrow { display: inline-block; color: var(--mauve); font-weight: 700; animation: sd-bounce 1.4s ease-in-out infinite; }
@keyframes sd-bounce { 0%, 100% { transform: translateY(2px); } 50% { transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .sd-nudge-arrow { animation: none; } }

/* ---- View source link on part pages ---- */
.md-typeset a.sd-source { display: inline-block; font: 600 .62rem var(--mono); letter-spacing: .1em; text-transform: uppercase; padding: 3px 12px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--blue) 40%, transparent); background: color-mix(in srgb, var(--blue) 8%, transparent); }
.md-typeset a.sd-source:hover { background: color-mix(in srgb, var(--blue) 18%, transparent); }

/* The mission line on home: plain text whose three parts are small links that expand. */
.sd-mission .sd-mission-line { font-size: inherit; font-weight: 400; line-height: 1.6; }
.sd-mission .sd-pill { all: unset; cursor: pointer; color: var(--md-accent-fg-color, #cba6f7); text-decoration: underline dotted; text-underline-offset: 3px; }
.sd-mission .sd-pill:hover, .sd-mission .sd-pill[aria-expanded="true"] { text-decoration-style: solid; }
.sd-mission .sd-pill:focus-visible { outline: 1px dashed currentColor; outline-offset: 2px; }

/* The atomic-thinking diagram spans the content column. */
.md-typeset figure.sd-atom-fig { display: block; width: 100%; max-width: 720px; margin: 1rem 0 1.4rem; }
.md-typeset figure.sd-atom-fig svg { width: 100%; }

.sd-generated { margin-top: 2.5rem; font-size: .72rem; color: var(--o1, #6c7086); opacity: .8; }
