/* Recursion branding for Wiki.js (info.recursion.love). Served as a static file at
   /_assets/branding/recursion.css and linked from EVERY view (login, admin, profile,
   pages...) by the generated master.pug overlay (../../brand-template.sh). Wiki.js's own
   "CSS Override" (injectCSS) only reaches page/editor views, so it is left empty.
   Deploy changes with ../../../apply-theme.sh (cache-busted, see the README).
   Palette and logos follow the Recursion brand kit (C:/ai/recursion/brand/README.md,
   2026-10-05): black ground; BRACKET BLUE #1d8ff3 for everything at rest (borders,
   buttons, rules, chips); ACCENT CYAN #19b4ff for links; GLOW CYAN #00d6ff only for
   glows and hover; body text #c4d3e4, muted #7f93aa. Logo: codex-logo.svg (the kit's full wide
   logo) everywhere on the site: header, login card, page heroes, members-only page.
   The kit's square icon is for the SSO app tile only. Copied unchanged from assets/.
   Deliberately NO Microgramma (the site's display font only renders as capitals) and
   no forced-uppercase labels anywhere: the user asked for no capital-only text.
   Body font is the site's: system-ui. */

:root {
  --rc-blue: #1d8ff3;      /* bracket blue: at rest */
  --rc-link: #19b4ff;      /* accent cyan: links */
  --rc-cyan: rgb(0, 214, 255);
  --rc-text: #c4d3e4;
  --rc-muted: #7f93aa;
  --rc-card: #05080c;
  --rc-line: rgba(29, 143, 243, 0.28);
  --rc-glow: 0 0 22px rgba(0, 214, 255, 0.12), 0 0 1px rgba(0, 214, 255, 0.6);
  --rc-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---- Typography: system-ui everywhere, never forced uppercase ---- */
.v-application,
.v-application .text-h1, .v-application .text-h2, .v-application .text-h3,
.v-application .text-h4, .v-application .text-h5, .v-application .text-h6,
.v-application .text-subtitle-1, .v-application .text-subtitle-2,
.v-application .text-body-1, .v-application .text-body-2,
.v-application .text-caption, .v-application .text-overline, .v-application .text-button,
.v-application .display-1, .v-application .display-2, .v-application .display-3,
.v-application .display-4, .v-application .headline, .v-application .title,
.v-application .subtitle-1, .v-application .subtitle-2, .v-application .body-1,
.v-application .body-2, .v-application .caption, .v-application .overline {
  font-family: var(--rc-font) !important;
}
.v-application .overline, .v-application .text-overline,
.v-application .v-btn, .v-application .v-tab {
  text-transform: none !important;
  letter-spacing: 0.02em !important;
}
.v-application .overline, .v-application .text-overline {
  font-size: 0.8rem !important;
  font-weight: 600;
}

/* ---- Black ground ---- */
.v-application.theme--dark,
.v-application.theme--dark .v-application--wrap,
.v-application.theme--dark .v-main {
  background-color: #000 !important;
}
.v-application.theme--dark .nav-header {
  background-color: #000 !important;
  box-shadow: none !important;
}
/* The site's 3 px bracket-blue header rule. Drawn as an overlay, not a border: the header's
   inner toolbars are full height with their own black background and paint over a border. */
.v-application.theme--dark .nav-header::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 3px;
  background: var(--rc-blue);
  z-index: 10;
  pointer-events: none;
}
/* Header logo: the kit's wide Codex logo (logoUrl = codex-logo.svg). It already spells
   RECURSION CODEX, so the text title next to it is hidden. 3.366:1 aspect.
   Size: the lettering only reads from about 64 px of logo height (RECURSION's caps are
   ~1/6 of it; at Wiki.js's stock 64 px header the logo was 38 px and its letters ~6 px,
   unreadable). So the header is taller: 90 px with a 72 px logo (caps ~12 px), 72/56 on
   phones. The main site's header is 130 px with a 104 px logo. Every element Wiki.js
   positions against its 64 px header is moved by --rc-hdr below. */
:root { --rc-hdr: 90px; --rc-logo-h: 72px; }
@media (max-width: 600px) { :root { --rc-hdr: 72px; --rc-logo-h: 56px; } }
#root .v-application header.nav-header,
#root .v-application header.nav-header .v-toolbar__content,
#root .v-application header.nav-header-inner { height: var(--rc-hdr) !important; }
#root .v-application nav.v-navigation-drawer--clipped {
  top: var(--rc-hdr) !important;
  max-height: calc(100% - var(--rc-hdr)) !important;
}
#root .v-application main.v-main { padding-top: var(--rc-hdr) !important; }
#root .v-application .page-col-sd { top: var(--rc-hdr) !important; }
#root .v-application .nav-header-inner .v-avatar {
  height: var(--rc-logo-h) !important;
  width: calc(var(--rc-logo-h) * 3.366) !important;
  min-width: calc(var(--rc-logo-h) * 3.366) !important;
}
#root .v-application .nav-header-inner .v-avatar .v-image__image { background-size: contain !important; }
#root .v-application .nav-header-inner .v-toolbar__title { display: none !important; }
/* #root prefix: Wiki.js paints the drawer (`grey darken-4-d4`) and footer
   (`grey darken-3`) from `#root .v-application .grey.darken-*` rules with !important,
   and only an id-level selector outranks those. */
#root .v-application.theme--dark nav.v-navigation-drawer {
  background-color: #000 !important;
  border-right: 1px solid rgba(29, 143, 243, 0.12);
}
.v-application.theme--dark .v-navigation-drawer__border { display: none; }
#root .v-application.theme--dark .v-footer {
  background-color: #000 !important;
  border-top: 1px solid rgba(29, 143, 243, 0.12);
  color: var(--rc-muted) !important;
}
.v-application.theme--dark .v-footer a { color: var(--rc-muted) !important; }

/* Page title strip + breadcrumb bar */
.v-application.theme--dark .page-header-section,
.v-application.theme--dark .v-main .v-toolbar {
  background-color: #000 !important;
}
.v-application.theme--dark .page-header-section {
  border-bottom: 1px solid rgba(29, 143, 243, 0.12);
}

/* Side cards (contents, tags, last edited) and other cards: near-black, thin glow */
.v-application.theme--dark .page-col-sd .v-card:not(.v-card--flat),
.v-application.theme--dark .v-main .v-card:not(.v-card--flat) {
  background-color: var(--rc-card) !important;
  border: 1px solid var(--rc-line) !important;
  border-radius: 6px !important;
  box-shadow: var(--rc-glow) !important;
}
.v-application.theme--dark .page-col-sd .v-card--flat { background-color: transparent !important; }

/* ---- Brand colour replaces Vuetify blue/teal ---- */
.v-application .primary { background-color: var(--rc-blue) !important; border-color: var(--rc-blue) !important; }
.v-application .primary--text,
.v-application .blue--text,
.v-application .overline.blue--text { color: var(--rc-blue) !important; caret-color: var(--rc-blue) !important; }
.v-application .v-chip.teal,
.v-application .v-chip.primary {
  background-color: transparent !important;
  border: 1px solid var(--rc-blue) !important;
  color: var(--rc-blue) !important;
}
.v-application .v-chip.teal .v-icon { color: var(--rc-blue) !important; }
.v-application .v-chip.teal:hover { background-color: rgba(29, 143, 243, 0.12) !important; }
.v-application a { color: var(--rc-link); }
.v-application .v-list-item--active { color: var(--rc-blue) !important; }

/* ---- Page content ---- */
.v-application.theme--dark .contents { color: var(--rc-text); }
.v-application.theme--dark .contents h1 { color: #fff; }
.v-application.theme--dark .contents h2 { color: #e3ecf6; }
.v-application.theme--dark .contents h3 { color: #b4c6da; }
.v-application.theme--dark .contents h4,
.v-application.theme--dark .contents h5 { color: #9fb3c8; }
.v-application.theme--dark .contents h1::after {
  background: linear-gradient(90deg, var(--rc-cyan), var(--rc-blue) 12%, rgba(29, 143, 243, 0)) !important;
}
.v-application.theme--dark .contents h2::after {
  background: linear-gradient(90deg, rgba(29, 143, 243, 0.55), rgba(29, 143, 243, 0)) !important;
}
.v-application.theme--dark .contents a:not(.toc-anchor) { color: var(--rc-link); }
.v-application.theme--dark .contents a:not(.toc-anchor):hover { color: var(--rc-cyan); }
.v-application.theme--dark .contents a.toc-anchor { color: var(--rc-muted); }
.v-application.theme--dark .contents :not(pre) > code {
  background-color: #0a1118;
  color: #9ad9ff;
}
.v-application.theme--dark .contents pre,
.v-application.theme--dark .contents pre[class*="language-"] {
  background-color: #070b10 !important;
  border: 1px solid rgba(29, 143, 243, 0.15);
}

/* Callouts: dark tint instead of solid Material blocks. Wiki.js draws the icon panel as
   a ~55px left BORDER with the icon on top of it, so the border gets a tint (not solid
   blue, which would swallow a blue icon) and the icon gets the brand blue. */
.v-application.theme--dark .contents blockquote.is-info {
  background-color: rgba(29, 143, 243, 0.07) !important;
  border-color: rgba(29, 143, 243, 0.20) !important;
  color: var(--rc-text) !important;
}
.v-application.theme--dark .contents blockquote.is-info::before { color: var(--rc-blue) !important; }

/* Tables */
.v-application.theme--dark .contents table { border-color: var(--rc-line) !important; }
.v-application.theme--dark .contents th {
  background-color: var(--rc-card) !important;
  color: #e3ecf6 !important;
  border-color: var(--rc-line) !important;
}
.v-application.theme--dark .contents td { border-color: rgba(29, 143, 243, 0.15) !important; }

/* ---- Login page: starfield, centred glowing card (matches auth.recursion.love) ----
   Background: Milky Way, Unsplash photo by Graham Holtshausen (fUnfEz3VLv4), from the
   6016px original, in three widths picked by screen width (the star field barely
   compresses, so the 2560 version only goes to screens wider than 1920). Changing the
   image means a NEW filename: /_assets is cached for 7 days.
   #root prefixes beat Vuetify's light-theme list colours, which are `!important` behind
   :not() chains. */
#root .v-application .login {
  background: #000 url("/_assets/branding/login-milkyway-1920.jpg") center / cover no-repeat !important;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}
@media (min-width: 1921px) {
  #root .v-application .login { background-image: url("/_assets/branding/login-milkyway-2560.jpg") !important; }
}
@media (max-width: 900px) {
  #root .v-application .login { background-image: url("/_assets/branding/login-milkyway-1280.jpg") !important; }
}
#root .v-application .login .login-sd {
  height: auto !important;
  width: 100%;
  max-width: 440px;
  margin: 0 !important;
  padding-bottom: 12px;
  background-color: rgba(5, 8, 12, 0.92) !important;
  border: 1px solid rgba(29, 143, 243, 0.35);
  border-radius: 6px;
  box-shadow: 0 0 28px rgba(0, 214, 255, 0.16), 0 0 2px rgba(0, 214, 255, 0.5) !important;
}
#root .v-application .login .login-logo { background-color: transparent !important; }
/* Login card: the wide Codex logo, centred, in place of the small logo box + title text. */
#root .v-application .login .login-sd > .d-flex { justify-content: center; padding-top: 22px; }
/* Wiki.js gives .login-logo a fixed 58 px box plus padding and margin, sized for its small
   square logo. The wide logo would overflow it to the right, off-centre. */
#root .v-application .login .login-logo {
  width: auto !important; height: auto !important;
  padding: 0 !important; margin: 0 !important;
}
#root .v-application .login .login-logo .v-avatar {
  width: 236px !important; min-width: 236px !important; height: 70px !important;
}
#root .v-application .login .login-logo .v-avatar .v-image__image { background-size: contain !important; }
#root .v-application .login .login-title { display: none !important; }
#root .v-application .login .login-title .text-h6,
#root .v-application .login .login-title .grey--text { color: #fff !important; }
#root .v-application .login .login-subtitle {
  background-image: none !important;
  border-bottom: 1px solid rgba(29, 143, 243, 0.2) !important;
}
#root .v-application .login .login-subtitle .text-subtitle-1 { color: var(--rc-muted) !important; }
#root .v-application .login .login-list { border-top-color: rgba(29, 143, 243, 0.2) !important; }
#root .v-application .login .login-list .v-list {
  background-color: transparent !important;
  box-shadow: none !important;
}
#root .v-application .login .login-list .v-list-item {
  border: 1px solid rgba(29, 143, 243, 0.35);
  border-radius: 6px !important;
  margin-bottom: 8px;
  color: #fff !important;
}
#root .v-application .login .login-list .v-list-item * { color: #fff !important; }
#root .v-application .login .login-list .v-list-item svg,
#root .v-application .login .login-list .v-list-item svg path { fill: var(--rc-blue) !important; }
#root .v-application .login .login-list .v-list-item .v-icon { color: var(--rc-blue) !important; }
#root .v-application .login .login-list .v-list-item:hover,
#root .v-application .login .login-list .v-list-item--active {
  background-color: rgba(29, 143, 243, 0.14) !important;
  box-shadow: 0 0 14px rgba(0, 214, 255, 0.35);
}
#root .v-application .login .login-list .v-list-item::before { background-color: transparent !important; }
/* Local (break-glass) form: dark fields, outlined brand button like auth's. The field
   slot MUST go dark together with the white text, or typed text is white-on-white. */
#root .v-application .login .login-form .v-text-field .v-input__slot {
  background-color: #0a1118 !important;
  border: 1px solid rgba(29, 143, 243, 0.35);
}
#root .v-application .login .login-form .v-text-field--is-focused .v-input__slot {
  border-color: var(--rc-blue);
  box-shadow: 0 0 10px rgba(0, 214, 255, 0.25);
}
#root .v-application .login .login-form .v-text-field input { color: #fff !important; caret-color: var(--rc-blue) !important; }
#root .v-application .login .login-form .v-text-field input::placeholder { color: var(--rc-muted) !important; }
#root .v-application .login .login-form .v-text-field .v-icon { color: var(--rc-muted) !important; }
#root .v-application .login .login-form .v-btn--contained {
  background-color: transparent !important;
  border: 1px solid var(--rc-blue) !important;
  color: #fff !important;
  box-shadow: none !important;
}
#root .v-application .login .login-form .v-btn--contained:hover {
  background-color: rgba(29, 143, 243, 0.14) !important;
  box-shadow: 0 0 14px rgba(0, 214, 255, 0.45) !important;
}
#root .v-application .login .login-form .v-btn--text { color: var(--rc-muted) !important; }
#root .v-application .login .login-form .v-btn--text:hover { color: var(--rc-blue) !important; }

/* ---- Page components (rc-*) for hand-written HTML in pages, e.g. the landing page
   (config/pages/home.md). Wiki.js keeps `class` through its DOMPurify sanitizer. ---- */
.v-application .contents .rc-hero {
  position: relative;
  text-align: center;
  padding: 44px 24px 36px;
  margin: 0 0 28px;
  border: 1px solid rgba(29, 143, 243, 0.35);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.82)),
    #000 url("/_assets/branding/login-milkyway-1280.jpg") center / cover no-repeat;
  box-shadow: 0 0 28px rgba(0, 214, 255, 0.14), 0 0 2px rgba(0, 214, 255, 0.5);
}
/* Hero logo: the kit's full wide Codex logo (the icon alone is for the SSO app tile). */
.v-application .contents .rc-hero-logo {
  display: block;
  width: min(460px, 92%); height: auto;
  margin: 0 auto 10px;
}
.v-application .contents .rc-hero-title {
  font-size: 2rem; line-height: 1.2; font-weight: 600;
  color: #fff;
  text-shadow: 0 0 18px rgba(0, 214, 255, 0.45);
}
.v-application .contents .rc-hero-sub {
  max-width: 640px; margin: 10px auto 0;
  font-size: 1.05rem; color: var(--rc-text);
}
.v-application .contents .rc-actions {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
  margin-top: 22px;
}
.v-application .contents a.rc-btn {
  display: inline-block;
  padding: 8px 18px;
  border: 1px solid var(--rc-blue);
  border-radius: 6px;
  color: #fff !important;
  text-decoration: none !important;
  background: rgba(0, 0, 0, 0.35);
  transition: background-color 0.2s, box-shadow 0.2s;
}
.v-application .contents a.rc-btn.rc-btn-primary { background: rgba(29, 143, 243, 0.22); }
.v-application .contents a.rc-btn:hover {
  background: rgba(29, 143, 243, 0.18);
  box-shadow: 0 0 14px rgba(0, 214, 255, 0.45);
}
.v-application .contents .rc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin: 14px 0 24px;
}
.v-application .contents .rc-card {
  display: block;
  padding: 16px 18px;
  background: var(--rc-card);
  border: 1px solid var(--rc-line);
  border-radius: 6px;
  box-shadow: var(--rc-glow);
  color: var(--rc-text) !important;
  text-decoration: none !important;
}
.v-application .contents a.rc-card { transition: border-color 0.2s, box-shadow 0.2s; }
.v-application .contents a.rc-card:hover {
  border-color: var(--rc-blue);
  box-shadow: 0 0 18px rgba(0, 214, 255, 0.3);
}
.v-application .contents .rc-card-title {
  display: block;
  font-size: 1.05rem; font-weight: 600;
  color: #fff;
  margin-bottom: 6px;
}
.v-application .contents .rc-card-text { display: block; font-size: 0.92rem; color: var(--rc-muted); }
.v-application .contents .rc-card-text strong { color: var(--rc-text); }
/* Wiki.js marks off-site links with a trailing icon; not wanted on buttons/cards. */
.v-application .contents a.rc-btn::after,
.v-application .contents a.rc-card::after { display: none !important; }

/* ---- Leftover Wiki.js greys (all `#root .v-application .grey.darken-*` rules, hence #root) ----
   Sidebar: the Home/Browse strip, its buttons and the page list. Page column: the list
   inside the contents card. */
#root .v-application.theme--dark nav.v-navigation-drawer .grey,
#root .v-application.theme--dark nav.v-navigation-drawer .v-list {
  background-color: #000 !important;
}
#root .v-application.theme--dark nav.v-navigation-drawer .pa-3.d-flex {
  border-bottom: 1px solid rgba(29, 143, 243, 0.12);
}
#root .v-application.theme--dark nav.v-navigation-drawer .v-btn {
  background-color: var(--rc-card) !important;
  border: 1px solid var(--rc-line) !important;
}
#root .v-application.theme--dark nav.v-navigation-drawer .v-btn:hover { box-shadow: 0 0 12px rgba(0, 214, 255, 0.3); }
#root .v-application.theme--dark .page-col-sd .v-card .v-list { background-color: transparent !important; }
/* Share/print strip under the side cards, header search box, breadcrumb bar. */
#root .v-application.theme--dark .page-shortcuts-card .grey {
  background-color: var(--rc-card) !important;
  border: 1px solid var(--rc-line);
  border-radius: 6px;
}
#root .v-application.theme--dark .nav-header .v-input__slot {
  background-color: #0a1118 !important;
  border: 1px solid rgba(29, 143, 243, 0.25);
}
#root .v-application.theme--dark .v-main .v-toolbar,
#root .v-application.theme--dark .v-main .v-toolbar.grey {
  background-color: #000 !important;
  border-bottom: 1px solid rgba(29, 143, 243, 0.12);
}

/* The document behind the Vue app: without this, a page shorter than the window shows
   the browser's default white below the footer. */
html, body { background-color: #000 !important; }

/* Hide the stock "Powered by Wiki.js" footer (user's request: don't advertise the
   platform). It's rendered client-side only (never in the server HTML), and Wiki.js
   always renders it even with footerOverride set, so CSS is the safe lever; removing
   the node with a script would fight Vue's patching. */
#root .v-application footer.v-footer { display: none !important; }

/* ---- "Unauthorized" page: what a logged-out visitor gets on a members-only page (e.g.
   /members). Wiki.js remembers the page (loginRedirect cookie) and returns there after
   sign-in. Same starfield and card as the login page; the stock red/blue gradient,
   wave/diagonal overlays (::before/::after) and shield icon are replaced. Labels are
   swapped with CSS because the strings come from Wiki.js's locale. ---- */
#root .v-application .unauthorized {
  background: #000 url("/_assets/branding/login-milkyway-1920.jpg") center / cover no-repeat !important;
}
@media (min-width: 1921px) {
  #root .v-application .unauthorized { background-image: url("/_assets/branding/login-milkyway-2560.jpg") !important; }
}
@media (max-width: 900px) {
  #root .v-application .unauthorized { background-image: url("/_assets/branding/login-milkyway-1280.jpg") !important; }
}
#root .v-application .unauthorized::before,
#root .v-application .unauthorized::after { display: none !important; }
#root .v-application .unauthorized-content {
  background-color: rgba(5, 8, 12, 0.92);
  border: 1px solid rgba(29, 143, 243, 0.35);
  border-radius: 6px;
  box-shadow: 0 0 28px rgba(0, 214, 255, 0.16), 0 0 2px rgba(0, 214, 255, 0.5);
  padding: 32px 28px 24px;
  width: calc(100% - 32px);
  max-width: 420px;
}
#root .v-application .unauthorized-content img {
  content: url("/_assets/branding/codex-logo.svg");
  width: 300px; max-width: 100%; height: auto;
}
#root .v-application .unauthorized-content .headline { font-size: 0 !important; }
#root .v-application .unauthorized-content .headline::after {
  content: "Members only";
  font-size: 1.5rem; font-weight: 600; color: #fff;
}
#root .v-application .unauthorized-content .subtitle-1 { color: var(--rc-muted) !important; }
#root .v-application .unauthorized-content .v-btn--contained {
  background-color: rgba(29, 143, 243, 0.18) !important;
  border: 1px solid var(--rc-blue) !important;
  color: #fff !important;
  box-shadow: none !important;
}
#root .v-application .unauthorized-content .v-btn--contained:hover { box-shadow: 0 0 14px rgba(0, 214, 255, 0.45) !important; }
#root .v-application .unauthorized-content .v-btn--contained .v-btn__content > span { font-size: 0; }
#root .v-application .unauthorized-content .v-btn--contained .v-btn__content > span::after {
  content: "Member sign in";
  font-size: 0.95rem;
}
#root .v-application .unauthorized-content .v-btn--outlined {
  color: var(--rc-muted) !important;
  border-color: rgba(127, 147, 170, 0.5) !important;
}
#root .v-application .unauthorized-content .v-icon { color: var(--rc-blue) !important; }
