/*
 * Doko Agent, Social Doko edition (server/edition.js): Doko Agent in Social Doko's design. Social Doko's dark frosted
 * glass, its tokens (app/globals.css in Social Doko: --background, --surface, --border, --text-*, --accent-*), its type
 * (Inter for text, Bricolage Grotesque for headings) and its official logo. Laid over css/app.css, which stays Doko
 * Agent's own; the edition is dark only, as the Social Doko dashboard is.
 */
@font-face { font-family: "Inter"; src: url("../assets/socialdoko-fonts/inter-regular-6.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../assets/socialdoko-fonts/inter-display-medium-6.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../assets/socialdoko-fonts/inter-display-semibold-6.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../assets/socialdoko-fonts/inter-bold-6.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Bricolage Grotesque"; src: url("../assets/socialdoko-fonts/bricolage-grotesque-semibold.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Bricolage Grotesque"; src: url("../assets/socialdoko-fonts/bricolage-grotesque-bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

/* Social Doko's tokens, by Doko Agent's names. Both themes read the same: the edition is dark. */
:root[data-edition="socialdoko"],
:root[data-edition="socialdoko"][data-theme="light"] {
  color-scheme: dark;
  --sd-background: #070b14;
  --sd-surface: #121a2b;
  --sd-glass: rgba(12, 18, 32, 0.86);
  --sd-glass-solid: #101826;
  --sd-sidebar: #0b1220;
  --sd-accent-fill: #4f46e5;
  --sd-accent-fill-hover: #4338ca;
  --sd-brand-fill: #406ae4;

  --bg: #070b14;
  --rail: #0b1220;
  --raise: #121a2b;
  --raise-2: #162033;
  --hover: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.16);
  --ink: #f1f5f9;
  --ink-2: #d5deea;
  --muted: #b6c2d4;
  --faint: #8b9bb3;
  --accent: #a5b4fc;
  --on-accent: #0b1220;
  --ice: #93c5fd;
  --violet: #a5b4fc;
  --orchid: #818cf8;
  --amber: #fbbf24;
  --danger: #fca5a5;
  --on-danger: #2a0606;
  --ok: #34d399;
  --split: linear-gradient(90deg, #93c5fd, #a5b4fc 40%, #818cf8 70%, #2dd4bf);
  --split-v: linear-gradient(180deg, #93c5fd, #a5b4fc 40%, #818cf8 70%, #2dd4bf);
  --code-bg: #0b1220;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.04), 0 18px 40px -18px rgba(0, 0, 0, 0.75);
  --font-ui: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --font-turn: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
  --radius: 12px;
  --radius-lg: 16px;
}

:root[data-edition="socialdoko"] body {
  background: var(--sd-background);
  font-family: var(--font-ui);
}

/* Headings in Social Doko's display face, upright and bold (Doko Agent's own turn is an italic serif). */
:root[data-edition="socialdoko"] .hello h1,
:root[data-edition="socialdoko"] .dialog__head h2,
:root[data-edition="socialdoko"] .studio h1 {
  font-family: var(--font-turn);
  font-weight: 700;
  letter-spacing: -0.02em;
}
:root[data-edition="socialdoko"] .hello h1 .turn {
  font-family: var(--font-turn);
  font-style: normal;
  font-weight: 700;
  text-shadow: none;
  background: var(--split);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* The sidebar: Social Doko's sidebar colour and its official logo, white, as the dashboard shows it. */
:root[data-edition="socialdoko"] .rail { background: var(--sd-sidebar); border-right-color: var(--line); }
:root[data-edition="socialdoko"] .brand img { width: 28px; height: 28px; object-fit: contain; border-radius: 0; box-shadow: none; }
:root[data-edition="socialdoko"] .brand__word { font-family: var(--font-turn); font-weight: 700; letter-spacing: -0.02em; }

/* Frosted glass for what floats: menus, dialogs, the composer, the workspace bar. */
:root[data-edition="socialdoko"] .menu,
:root[data-edition="socialdoko"] .dialog {
  background: var(--sd-glass-solid);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 24px 60px -24px rgba(0, 0, 0, 0.8);
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root[data-edition="socialdoko"] .menu,
  :root[data-edition="socialdoko"] .dialog {
    background: var(--sd-glass);
    -webkit-backdrop-filter: blur(18px) saturate(1.5);
    backdrop-filter: blur(18px) saturate(1.5);
  }
}
:root[data-edition="socialdoko"] .dialog-wrap { background: rgba(7, 11, 20, 0.7); }
:root[data-edition="socialdoko"] .composer {
  background: var(--sd-surface);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 18px 40px -18px rgba(0, 0, 0, 0.75);
}
:root[data-edition="socialdoko"] .composer:focus-within { border-color: rgba(165, 180, 252, 0.55); box-shadow: 0 0 0 3px rgba(199, 210, 254, 0.18); }
:root[data-edition="socialdoko"] .workspace__bar { background: var(--sd-glass-solid); }

/* Filled buttons are Social Doko's indigo with a white label (its --accent-fill), never the near-white of Doko Agent. */
:root[data-edition="socialdoko"] .send,
:root[data-edition="socialdoko"] .btn--solid {
  background: var(--sd-accent-fill);
  border-color: var(--sd-accent-fill);
  color: #ffffff;
}
:root[data-edition="socialdoko"] .send:hover:not(:disabled),
:root[data-edition="socialdoko"] .btn--solid:hover:not(:disabled) { background: var(--sd-accent-fill-hover); border-color: var(--sd-accent-fill-hover); }
:root[data-edition="socialdoko"] .send:disabled { background: rgba(255, 255, 255, 0.1); color: var(--faint); }
:root[data-edition="socialdoko"] a { color: var(--accent); }
:root[data-edition="socialdoko"] :focus-visible { outline-color: #c7d2fe; }

/* Not in the edition: Content Factory (Doko Video), the Android app, Doko Agent's own upgrade, and the light theme. */
:root[data-edition="socialdoko"] #studio-link,
:root[data-edition="socialdoko"] #app-get,
:root[data-edition="socialdoko"] #upgrade-nudge,
:root[data-edition="socialdoko"] #theme-btn { display: none !important; }

/* No account menu inside Social Doko, which is the account (its email, credits, billing and sign-out are Social Doko's):
   Settings and Servers are in the sidebar instead, and the footer that held the account goes. */
:root[data-edition="socialdoko"] .rail__foot { display: none !important; }

/* The page that sends someone with no session to Social Doko (socialdoko-signin.html). */
.sd-signin {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #070b14;
  color: #f1f5f9;
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}
.sd-signin__card {
  max-width: 440px;
  padding: 32px 28px;
  border-radius: 16px;
  text-align: center;
  background: rgba(12, 18, 32, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 24px 60px -24px rgba(0, 0, 0, 0.8);
}
.sd-signin__logo { display: block; width: 56px; height: auto; margin: 0 auto 18px; }
.sd-signin h1 { margin: 0 0 10px; font-family: "Bricolage Grotesque", "Inter", sans-serif; font-weight: 700; font-size: 22px; letter-spacing: -0.02em; }
.sd-signin p { margin: 0 0 22px; color: #b6c2d4; font-size: 14px; line-height: 1.55; }
.sd-signin__go {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 12px;
  background: #4f46e5;
  color: #ffffff;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
}
.sd-signin__go:hover { background: #4338ca; }
.sd-signin__go:focus-visible { outline: 2px solid #c7d2fe; outline-offset: 2px; }
