:root {
  color-scheme: dark;
  font-family: Inter, system-ui, sans-serif;
  color: #f5eefb;
  background: #0b0912;
  --muted: #b9abc9;
  --edge: #39294d;
  --violet: #c99aff;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--violet); text-underline-offset: 4px; }
a:focus-visible { outline: 3px solid #e0c3ff; outline-offset: 5px; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p { margin-top: 0; }
p, li { line-height: 1.65; }
h1, h2, h3 { line-height: 1.12; }
h2 { font-size: clamp(1.55rem, 3vw, 2.4rem); margin-bottom: 14px; }
.wrap { width: min(1160px, calc(100% - 48px)); margin-inline: auto; }
.header { border-bottom: 1px solid #ffffff12; background: #100c18; }
.nav, .nav-links, .actions, .row-actions, .section-head, .footer {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.nav { min-height: 76px; justify-content: space-between; padding-block: 12px; }
.nav-links a, .wordmark, .button { text-decoration: none; }
.wordmark { display: inline-flex; align-items: center; gap: 7px; color: #fff; font-size: 1.22rem; font-weight: 800; }
.wordmark img { margin-right: 5px; }
.wordmark span { color: #d4aaff; }
.button { display: inline-flex; gap: 10px; align-items: center; border: 1px solid var(--edge); border-radius: 10px; padding: 11px 16px; font-weight: 700; }
.button:hover, .button:focus-visible { filter: brightness(1.16); }
.primary { color: white; background: #7536c9; border-color: #a672f4; }
.secondary { color: #eee2ff; background: #21172d; }
.hero { display: grid; grid-template-columns: 1.06fr .94fr; align-items: center; min-height: 560px; gap: 34px; padding-block: 56px; }
.hero-copy { animation: rise .65s ease-out both; }
.hero h1, .dashboard-head h1 { letter-spacing: -.055em; }
.hero h1 { font-size: clamp(3rem, 6.6vw, 5.7rem); margin-bottom: 24px; }
.hero h1 em { color: #c789ff; font-style: normal; }
.eyebrow { color: #d3aaff; font-size: .78rem; letter-spacing: .12em; font-weight: 800; text-transform: uppercase; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #b068ff; margin-right: 7px; box-shadow: 0 0 12px #a15cf7; }
.lead { color: var(--muted); font-size: 1.1rem; max-width: 45ch; margin-bottom: 26px; }
.hero-art { position: relative; min-height: 340px; display: grid; place-items: center; isolation: isolate; }
.hero-art::before { content: ""; position: absolute; inset: 0; z-index: -2; background: radial-gradient(ellipse, #48217a 0%, #241339 38%, transparent 72%); }
.orbit { position: absolute; inset: 12% 6%; z-index: -1; border: 1px solid #a76bff55; border-radius: 50%; transform: rotate(-20deg); }
.mascot { width: min(84%, 400px); animation: float 6s ease-in-out infinite; filter: drop-shadow(0 14px 26px #20073d); }
.sample { position: absolute; right: 0; bottom: 0; border: 1px solid #67478a; border-radius: 12px; padding: 10px 14px; background: #1d132a; color: #e1ccf3; font-size: .86rem; }
.sample code { color: #e1b7ff; margin-left: 8px; }
.section { margin-block: 28px 48px; }
.workflow, .split, .plans, .metrics { display: grid; gap: 14px; }
.workflow { grid-template-columns: 1fr auto 1fr auto 1fr; align-items: stretch; }
.connector { align-self: center; color: var(--violet); font-size: 1.3rem; }
.split { grid-template-columns: 1fr 1fr; }
.plans { grid-template-columns: repeat(3, 1fr); }
.metrics { grid-template-columns: repeat(auto-fit,minmax(165px,1fr)); }
.panel { background: linear-gradient(145deg,#1c1426,#15101d); border: 1px solid var(--edge); padding: 22px; border-radius: 14px; min-width: 0; }
.panel p:last-child { margin-bottom: 0; }
.panel h3 { margin-bottom: 10px; }
.panel p, .muted { color: var(--muted); }
.node-icon { display: inline-grid; place-items: center; width: 35px; height: 35px; margin-bottom: 13px; border-radius: 8px; background: #4a2671; color: #eddbff; font-weight: 800; }
.node-icon.teal { background: #174741; color: #a0f2dc; }
.node-icon.pink { background: #552449; color: #ffbde9; }
.plan-limits { margin-bottom: 0; padding-left: 18px; color: var(--muted); }
.badge { display: inline-block; padding: 3px 9px; background: #312040; color: #e3caff !important; border-radius: 6px; font-size: .84rem; }
.dashboard-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; padding-block: 44px 16px; }
.dashboard-head h1 { font-size: clamp(2rem, 5vw, 3.8rem); margin-bottom: 10px; overflow-wrap: anywhere; }
.metrics strong { font-size: 1.85rem; }
.metrics p { margin-bottom: 7px; }
.section-head { justify-content: space-between; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: 14px 12px; border-bottom: 1px solid #ffffff14; vertical-align: top; }
th { color: #d8c5e8; font-size: .85rem; }
td { overflow-wrap: anywhere; }
td code { white-space: nowrap; }
.danger { color: #ffb4c8; }
.pagination { margin-top: 18px; }
.audit { list-style: none; padding: 0; }
.audit li { display: flex; justify-content: space-between; gap: 10px; padding-block: 6px; overflow-wrap: anywhere; }
.audit time { color: var(--muted); flex-shrink: 0; }
.footer { justify-content: space-between; padding-block: 22px 30px; border-top: 1px solid #ffffff18; color: var(--muted); }
.skip { position: absolute; left: 12px; top: -100px; background: #231532; padding: 10px; }
.skip:focus { top: 10px; z-index: 5; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@media (max-width: 740px) {
  .wrap { width: calc(100% - 32px); }
  .hero { grid-template-columns: 1fr; min-height: auto; padding-block: 40px 20px; gap: 12px; }
  .hero-art { min-height: 260px; }
  .mascot { width: min(73%, 300px); }
  .workflow, .split, .plans { grid-template-columns: 1fr; }
  .connector { display: none; }
  .nav { gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; }
}
/* Shared workspace and interactive editor preview. */
.hero-art .orbit { animation: orbit-drift 12s ease-in-out infinite; }
.hero-art .orbit-inner { inset: 20% 15%; border-color: #cf82ff50; transform: rotate(34deg) scaleY(.72); animation-delay: -4s; }
.hero-art::after { content: ""; position: absolute; width: 66%; aspect-ratio: 1; background: radial-gradient(circle, #b44bff2c, transparent 65%); border-radius: 50%; z-index: -1; animation: studio-glow 8s ease-in-out infinite; }
.studio-demo { border: 1px solid #563b70; border-radius: 18px; overflow: hidden; background: #110d19; box-shadow: 0 22px 60px #0005; }
.demo-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 11px; padding: 14px 20px; border-bottom: 1px solid #39294d; background: #20152d; }
.demo-bar .badge { margin-left: auto; }
.demo-workspace { display: grid; grid-template-columns: 1fr 1fr; }
.demo-workspace .workflow { display: grid; grid-template-columns: 1fr; align-content: center; justify-items: center; gap: 4px; padding: 25px; background: radial-gradient(circle, #62447555 1px, transparent 1px) 0 0 / 17px 17px; }
.demo-workspace .connector { display: block; }
.node { display: grid; grid-template-columns: 35px 1fr; column-gap: 12px; text-align: left; align-items: center; width: min(100%, 310px); border: 1px solid #513766; border-radius: 10px; background: #1c1428; color: inherit; padding: 12px; cursor: pointer; transition: border-color .2s, box-shadow .2s, transform .2s; }
.node:hover, .node[aria-pressed="true"] { border-color: #bb78ff; box-shadow: 0 0 22px #953bed42; transform: translateY(-2px); }
.node .node-icon { grid-row: span 2; margin: 0; }
.node small { color: var(--muted); }
.demo-preview { border-left: 1px solid #39294d; background: #181021; min-width: 0; padding: clamp(20px, 4vw, 44px); display: grid; align-items: center; }
.demo-preview > div:not([hidden]) { animation: rise .28s ease-out; }
.demo-preview h3 { font-size: clamp(1.35rem, 2vw, 1.85rem); }
.demo-preview p { color: var(--muted); }
.demo-code, .discord-example { border: 1px solid #52386b; background: #231730; border-radius: 9px; padding: 12px 14px; }
.demo-code { display: flex; justify-content: space-between; gap: 10px; font-family: ui-monospace, monospace; }
.demo-code span { color: #d1a8f4; }
.discord-example { border-left: 3px solid #ae65fa; }
.discord-example p { margin: 6px 0 0; }
.section-reveal { animation: rise .5s ease-out both; }
.dashboard-nav { display: flex; gap: 9px; flex-wrap: wrap; position: sticky; top: 0; z-index: 2; background: #0b0912; padding: 12px 0; margin-top: 16px; }
.dashboard-nav a { display: inline-block; border: 1px solid var(--edge); border-radius: 8px; padding: 8px 11px; background: #20162a; text-decoration: none; }
.section[id] { scroll-margin-top: 75px; }
.site-notice { margin-top: 18px; background: #281a3c; border: 1px solid #7853a1; border-radius: 10px; padding: 14px; }
.site-form { display: grid; gap: 10px; }
.site-form label { display: block; font-weight: 650; margin-bottom: 4px; }
.site-form input, .site-form select, .site-form textarea { font: inherit; color: inherit; display: block; width: 100%; padding: 9px 10px; border-radius: 8px; background: #0f0b18; border: 1px solid #614679; }
.site-form textarea { resize: vertical; }
.site-form .button { justify-self: start; cursor: pointer; font: inherit; font-weight: 700; }
.site-form .errorlist { color: #ffc4d0; }
.search-form { max-width: 480px; margin-bottom: 12px; }
.ticket { padding: 13px 0; border-bottom: 1px solid #ffffff19; overflow-wrap: anywhere; }
.ticket summary, .offer-control summary { cursor: pointer; color: #e9d2ff; }
.ticket summary .badge { margin-left: 7px; }
.ticket > p { margin: 10px 0; }
.ticket-message, .ticket-reply { white-space: pre-wrap; overflow-wrap: anywhere; }
.ticket-form { margin-top: 16px; max-width: 620px; }
.offer-control { margin-top: 10px; min-width: 160px; }
.offer-control form { margin-top: 10px; }
.admin-accounts, .admin-links { margin-top: 14px; }
@keyframes orbit-drift { 50% { transform: rotate(16deg) scaleY(.76); } }
@keyframes studio-glow { 50% { opacity: .38; transform: scale(.87); } }
@media (max-width: 740px) {
  .demo-workspace { grid-template-columns: 1fr; }
  .demo-preview { border-left: 0; border-top: 1px solid #39294d; }
}
.dashboard-overview {
  border: 1px solid var(--edge);
  border-radius: 16px;
  margin: 30px 0 16px;
  padding: clamp(20px, 4vw, 36px);
  background: radial-gradient(ellipse at 100% 0, #59318180, transparent 60%), #1a1224;
}
.dashboard-overview p:last-child { margin-bottom: 0; }
.overview-metrics strong { display: block; margin-bottom: 12px; }
.overview-metrics a { font-size: .9rem; }
.metric-unit { color: var(--muted); font-size: 1rem; font-weight: 600; }
#bots .section-head { margin-bottom: 12px; }
#bots .section-head h2 { margin: 0; }
/* Studio workspace */
.workspace-main { min-width: 0; }
.workspace-main > .site-notice { max-width: 940px; margin: 10px auto; }
.workspace-shell { display: grid; grid-template-columns: 212px minmax(0, 1fr); min-height: 100vh; background: #0b0812; }
.workspace-sidebar { position: sticky; top: 0; height: 100dvh; overflow-y: auto; padding: 18px 12px; border-right: 1px solid #56317560; background: radial-gradient(ellipse at 0 100%, #2c114b, transparent 48%), #100b19; }
.workspace-brand { display: grid; justify-items: center; margin-bottom: 20px; text-decoration: none; color: #f6edff; font-size: 1.35rem; }
.workspace-brand img { filter: drop-shadow(0 0 21px #9d36f73f); }
.workspace-brand span { color: #c883ff; }
.workspace-sidebar nav { display: grid; gap: 4px; }
.workspace-link { display: flex; gap: 11px; align-items: center; padding: 9px 11px; border: 1px solid transparent; border-radius: 9px; text-decoration: none; color: #e7d9f3; font-size: .92rem; }
.workspace-link span { width: 22px; flex-shrink: 0; text-align: center; color: #d4a3ff; font-size: 1.18rem; }
.workspace-link:hover { background: #281936; }
.workspace-link.selected { border-color: #8951bf; background: linear-gradient(110deg,#30184c,#59208b); box-shadow: 0 0 18px #842bc22c; }
.workspace-guide { display: block; margin: 20px 9px 0; font-size: .83rem; }
.workspace-body { width: min(1620px, 100%); min-width: 0; margin-inline: auto; padding: 0 22px 28px; }
.workspace-top { min-height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 0; }
.workspace-account { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.workspace-presence { display: inline-flex; gap: 7px; align-items: center; border: 1px solid #544164; border-radius: 8px; padding: 6px 9px; color: #c9b6dd; font-size: .8rem; background: #1d1527; }
.workspace-presence span { width: 7px; height: 7px; border-radius: 50%; background: #89779c; }
.workspace-presence.online { color: #aef8cf; border-color: #287d53; background: #112b20; }
.workspace-presence.online span { background: #52e68e; }
.workspace-hero { position: relative; display: flex; align-items: center; gap: clamp(14px, 3vw, 30px); min-height: 156px; margin-bottom: 15px; padding: 16px clamp(14px, 3vw, 34px); border: 1px solid #61328d; border-radius: 15px; overflow: hidden; isolation: isolate; background: radial-gradient(ellipse at 13% 5%, #63339a70, transparent 49%), linear-gradient(105deg,#231332,#120a20 55%,#351650); }
.workspace-hero::after { content: ""; position: absolute; width: 58%; height: 190%; right: -18%; top: -80%; border: 1px solid #9f58de7a; border-radius: 50%; transform: rotate(-18deg); z-index: -1; box-shadow: 0 0 42px #b739f663; }
.workspace-hero img { flex: 0 0 auto; width: clamp(64px, 9vw, 116px); filter: drop-shadow(0 0 24px #a93df653); animation: float 7s ease-in-out infinite; }
.workspace-hero .eyebrow { margin-bottom: 8px; }
.workspace-hero h1 { margin: 0 0 8px; color: #e8c9ff; font-size: clamp(1.8rem, 4vw, 3rem); letter-spacing: -.035em; }
.workspace-hero p:last-child { margin: 0; color: #d9c5e8; }
.workspace-metrics .panel { display: grid; gap: 5px; border-color: #5b3678; background: linear-gradient(150deg,#261838,#181021); padding: 15px 17px; }
.workspace-metrics p { margin: 0; font-size: .84rem; }
.workspace-metrics strong { color: #f0d9ff; }
.workspace-metrics small, .workspace-metrics a { font-size: .8rem; color: #cfadeb; }
.workspace-row { margin-top: 15px; }
.workspace-columns { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 14px; }
.workspace-shell h2 { font-size: clamp(1.15rem, 2vw, 1.55rem); letter-spacing: -.02em; }
.workspace-shell .panel { border-color: #4b305e; }
.workspace-shell .section-head { margin-bottom: 10px; }
.workspace-shell .section-head h2, .workspace-shell .section-head h3 { margin-bottom: 0; }
.workspace-dl { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, auto); gap: 7px 12px; align-items: baseline; margin: 10px 0 15px; }
.workspace-dl dt { color: #c5afd6; }
.workspace-dl dd { margin: 0; text-align: right; font-weight: 700; overflow-wrap: anywhere; }
.bot-cards { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(250px, 100%),1fr)); gap: 10px; }
.bot-card { min-width: 0; border: 1px solid #654586; border-radius: 11px; padding: 14px; background: #21142f; }
.bot-card .muted { overflow-wrap: anywhere; }
.status-online { color: #b0f8d0 !important; background: #163a28; }
.workspace-filter { grid-template-columns: repeat(2,minmax(0,1fr)) auto; align-items: end; }
.workspace-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.workspace-tabs a, .sync-flow span { padding: 8px 11px; border: 1px solid #6e4693; border-radius: 8px; background: #291837; text-decoration: none; }
.sync-flow { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; margin: 14px 0; }
.toggles input { width: auto; display: inline; margin-right: 7px; accent-color: #a75af2; }
.invite-link input { width: 100%; padding: 9px; border: 1px solid #6b4b83; border-radius: 7px; background: #120d1a; color: inherit; margin: 7px 0; }
.compact .panel { padding: 13px; }
.compact td, .compact th { padding: 8px 9px; }
@media (max-width: 900px) {
  .workspace-shell { grid-template-columns: 166px minmax(0, 1fr); }
  .workspace-body { padding-inline: 13px; }
  .workspace-columns { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .workspace-shell { display: block; }
  .workspace-sidebar { position: static; height: auto; padding: 8px 12px; border-right: 0; border-bottom: 1px solid #56317560; }
  .workspace-brand { display: flex; align-items: center; gap: 8px; margin: 0 0 7px; }
  .workspace-brand img { width: 36px; height: 36px; }
  .workspace-sidebar nav { display: flex; overflow-x: auto; }
  .workspace-link { flex-shrink: 0; padding: 5px 8px; }
  .workspace-guide { display: none; }
  .workspace-filter { grid-template-columns: 1fr; }
  .workspace-hero { min-height: 112px; }
}
.activity-bars { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: clamp(4px,2vw,18px); padding: 12px 0; }
.activity-bars > div { display: grid; gap: 5px; text-align: center; color: #d7b8ed; }
.activity-track { height: 74px; display: flex; align-items: end; background: #251735; border: 1px solid #573776; border-radius: 6px; overflow: hidden; }
.activity-track span { display: block; width: 100%; height: var(--activity); background: linear-gradient(0deg,#722ac6,#d890ff); }
