:root {
  --accent: #236bf5;
  --border: #35435b;
  --muted: #aebcd2;
  --red: #ff817c;
  color-scheme: dark;
  background: #080d17;
  color: #f4f7ff;
}

body { background: radial-gradient(ellipse at 80% -20%, #1c3b70, transparent 42rem), #080d17; }
button, .button {
  color: #f4f7ff;
  background-color: #17243a;
  background-image: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 40 70%22%3E%3Cpath d=%22M20 1l19 11v22L20 45 1 34V12L20 1Zm0 24 19 11v22L20 69 1 58V36l19-11Z%22 fill=%22none%22 stroke=%22%23ffffff%22 stroke-opacity=%22.12%22/%3E%3C/svg%3E"), linear-gradient(135deg, #ffffff0d, transparent 65%);
  background-size: 20px 35px, auto;
  border-color: #526783;
  border-radius: 10px;
  box-shadow: 0 5px 0 #050914, 0 8px 18px #0007, inset 0 1px #ffffff24;
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
button:hover, .button:hover { filter: brightness(1.14); transform: translateY(-2px); box-shadow: 0 7px 0 #050914, 0 12px 22px #0008, inset 0 1px #ffffff30; }
button:active, .button:active { transform: translateY(2px); box-shadow: 0 2px 0 #050914, 0 4px 9px #0007; }
button.primary, .primary { color: #fff; background-color: #175bd2; border-color: #5790fa; }
button.primary:hover { background-color: #236bf5; }
:focus-visible { outline-color: #ff9d2e; }
input, select, textarea { color: #f4f7ff; background: #0b1322; border-color: #465873; border-radius: 9px; box-shadow: inset 0 2px 6px #0004; }
input::placeholder, textarea::placeholder { color: #8192ab; }
select option { color: #f4f7ff; background: #111a2a; }
.auth-screen { color: #f4f7ff; background-color: #080d17; background-image: radial-gradient(ellipse at 50% 18%, #19396b 0, transparent 34rem), url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 40 70%22%3E%3Cpath d=%22M20 1l19 11v22L20 45 1 34V12L20 1Zm0 24 19 11v22L20 69 1 58V36l19-11Z%22 fill=%22none%22 stroke=%22%23ffffff%22 stroke-opacity=%22.08%22/%3E%3C/svg%3E"); background-size: auto, 30px 52px; border-top: 5px solid #ff9d2e; }
.auth-content { padding: 38px; background: linear-gradient(145deg, #152138, #101827); border: 1px solid #3a4e6c; border-radius: 18px; box-shadow: 0 25px 75px #000a, inset 0 1px #ffffff10; }
.auth-content .brand { margin-bottom: 28px; color: #fff; }
.auth-content h1 { color: #fff; }
.auth-foot { color: #aebcd2; }
.segments { background: #0b1322; border: 1px solid #354863; }
.segments button { color: #ced9e9; background: transparent; border-color: transparent; box-shadow: none; }
.segments button.selected { color: #fff; background: #1a2b46; border-color: #526783; box-shadow: 0 2px 9px #0006; }

/* Horizontal Workroom shell */
.workspace { display: block; min-height: 100dvh; background: transparent; }
.sidebar {
  position: sticky;
  z-index: 20;
  top: 0;
  width: 100%;
  height: auto;
  min-height: 74px;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  padding: 12px clamp(16px, 3.5vw, 52px);
  color: #f4f7ff;
  background-color: #0b1220;
  background-image: linear-gradient(105deg, #0b1220f5, #0d1b31ed), url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 40 70%22%3E%3Cpath d=%22M20 1l19 11v22L20 45 1 34V12L20 1Zm0 24 19 11v22L20 69 1 58V36l19-11Z%22 fill=%22none%22 stroke=%22%23ffffff%22 stroke-opacity=%22.12%22/%3E%3C/svg%3E");
  background-size: auto, 26px 46px;
  border: 0;
  border-bottom: 1px solid #536783;
  box-shadow: 0 8px 24px #0008, inset 0 -1px #ffffff10;
}
.sidebar .brand { flex: 0 0 auto; padding: 0 4px; color: #fff; font-size: 19px; font-weight: 800; }
.brand-mark { background: linear-gradient(135deg, #256cf0, #164294); border: 1px solid #6ca1ff; border-radius: 10px; box-shadow: 0 4px 14px #001744; }
.nav-heading { display: none; }
.sidebar nav { display: flex; flex: 1 1 auto; align-items: center; justify-content: center; gap: 5px; min-width: 0; }
.nav-item { width: auto; flex: 0 1 auto; justify-content: flex-start; gap: 8px; padding: 9px 11px; color: #c4d2e9; background: transparent; border: 1px solid transparent; border-radius: 9px; white-space: nowrap; }
.nav-item:hover { color: #fff; background-color: #ffffff12; border-color: #7183a044; }
.nav-item.active { color: #fff; background-color: #174dba; border-color: #6094f4; box-shadow: 0 5px 15px #0008, inset 0 1px #ffffff36; }
.nav-item.active svg { color: #ffb24c; }
.badge { color: #101725; background: #ffae45; }
.sidebar-bottom { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; margin: 0; padding: 0 0 0 12px; border: 0; }
.connection { padding: 0 6px; color: #b5c4d9; }
.profile-button { width: auto; gap: 9px; padding: 5px; color: #fff; }
.profile-button:hover, .signout:hover { background-color: #ffffff12; }
.profile-button small, .signout { color: #b5c4d9; }
.signout { margin: 0; padding: 8px; white-space: nowrap; }

.main { min-height: calc(100dvh - 74px); background: transparent; }
.page-header { height: auto; min-height: 104px; padding: 22px clamp(18px, 4vw, 56px); color: #f4f7ff; background: #0b1220d9; border-bottom-color: #2d3e58; }
.page-header h1 { color: #fff; font-size: clamp(24px, 3vw, 32px); font-weight: 760; letter-spacing: -.6px; }
.eyebrow { color: #ffad48; font-weight: 800; letter-spacing: 1.5px; }
.header-right { color: #bac8dd; }
.view { max-width: 1440px; margin: 0 auto; padding: 28px clamp(16px, 4vw, 56px) 54px; }
.toolbar { gap: 12px; }
.toolbar select, .toolbar .search { background: #101a2a; }
.section-caption { color: #b4c2d7; border-color: #33435c; }
.post { padding: 22px; background: linear-gradient(145deg, #152138, #101827); border: 1px solid #35435b; border-radius: 14px; box-shadow: 0 12px 28px #0005, inset 0 1px #ffffff08; }
.post-meta, .post-bottom { color: #aebcd2; }
.post-body { color: #f0f4fc; }
.replies { border-color: #344a69; }

/* Home splash */
.home-hero { position: relative; min-height: clamp(300px, 38vw, 470px); margin: 0 0 22px; overflow: hidden; isolation: isolate; background: #09111e; border: 1px solid #46617f; border-radius: 20px; box-shadow: 0 22px 50px #0008, inset 0 1px #ffffff22; }
.home-hero::after { position: absolute; z-index: -1; inset: 0; content: ""; background: linear-gradient(90deg, #070d19f5 0%, #09111edb 30%, #09111e40 67%, transparent 100%), linear-gradient(0deg, #07101b99, transparent 38%); }
.home-hero-art { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 54%; }
.home-hero-copy { position: absolute; left: clamp(22px, 4vw, 58px); bottom: clamp(24px, 5vw, 58px); width: min(470px, 80%); }
.home-hero-kicker { color: #ffb24c; font-size: 11px; font-weight: 850; letter-spacing: 2px; }
.home-hero-copy h2 { margin: 9px 0 10px; color: #fff; font-size: clamp(32px, 5vw, 56px); line-height: 1.02; letter-spacing: -1.6px; text-shadow: 0 4px 24px #000b; }
.home-hero-copy p { max-width: 390px; color: #d6e2f4; font-size: 15px; line-height: 1.65; text-shadow: 0 2px 12px #000; }
.home-tool-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 34px 0 10px; padding-top: 22px; border-top: 1px solid #33435c; }
.home-tools-heading { grid-column: 1 / -1; margin-bottom: 0; color: #fff; font-size: 17px; }
.home-tool { display: flex; min-height: 82px; align-items: center; gap: 13px; padding: 16px; color: #f4f7ff; text-decoration: none; background-color: #111c2d; background-image: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 40 70%22%3E%3Cpath d=%22M20 1l19 11v22L20 45 1 34V12L20 1Zm0 24 19 11v22L20 69 1 58V36l19-11Z%22 fill=%22none%22 stroke=%22%23ffffff%22 stroke-opacity=%22.12%22/%3E%3C/svg%3E"), linear-gradient(135deg, #1a3154, #111a2a); background-size: 22px 38px, auto; border: 1px solid #455a78; border-radius: 13px; box-shadow: 0 7px 0 #050914, 0 12px 22px #0006, inset 0 1px #ffffff20; transition: transform .15s ease, box-shadow .15s ease; }
.home-tool:hover { color: #fff; transform: translateY(-3px); box-shadow: 0 9px 0 #050914, 0 16px 26px #0008, inset 0 1px #ffffff28; }
.home-tool > i { display: grid; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; color: #ffad48; background: #0a1424; border: 1px solid #3b5d91; border-radius: 11px; }
.home-tool > span { display: grid; gap: 3px; }
.home-tool strong { font-size: 14px; }
.home-tool small { color: #b0bfd5; font-size: 12px; }

/* Keep the messaging surface visually familiar. */
.messages-view { --accent: #087f73; --border: #dde2e0; --muted: #69736e; color: #252b29; background: #fff; }
.messages-view input, .messages-view select, .messages-view textarea { color: #252b29; background: #fff; border-color: #cbd3cf; box-shadow: none; }
.messages-view .chat-item { color: inherit; background: transparent; border-radius: 0; box-shadow: none; }
.messages-view .chat-item:hover { background: #f0f2f5; }
.messages-view .chat-item.selected { background: #e7f0eb; border-left-color: #087f73; }
.messages-view .conversation, .messages-view .inbox { background: #fff; }
.messages-view .chat-compose { background: #fff; }
.messages-view .chat-compose button { color: #fff; background: #087f73; border-color: #087f73; border-radius: 5px; box-shadow: none; }
.messages-view .chat-compose button:hover { background: #07685f; transform: none; }
.messages-view .bubble { color: #252b29; background: #f0f2f5; }
.messages-view .bubble.mine { background: #e0f1e9; }

@media (max-width: 1100px) {
  .sidebar { flex-wrap: wrap; gap: 8px 12px; padding: 10px 16px; }
  .sidebar nav { justify-content: flex-start; order: 3; flex: 1 0 100%; flex-wrap: wrap; }
  .sidebar-bottom { margin-left: auto; }
  .nav-item { min-height: 38px; padding: 7px 9px; font-size: 12px; }
}
@media (max-width: 700px) {
  .sidebar { position: sticky; padding: 10px 12px 7px; }
  .sidebar .brand { font-size: 17px; }
  .sidebar nav { display: flex; flex-wrap: nowrap; gap: 2px; overflow-x: auto; padding-bottom: 2px; }
  .nav-item { min-height: 40px; flex-direction: row; padding: 7px 9px; font-size: 11px; }
  .nav-item svg { width: 16px; height: 16px; }
  .sidebar-bottom { position: static; gap: 4px; }
  .sidebar-bottom .connection, .profile-button > span:nth-child(2), .profile-button > svg { display: none; }
  .profile-button { width: 38px; height: 38px; padding: 2px; }
  .signout { font-size: 0; padding: 8px; }
  .signout svg { width: 16px; }
  .page-header { min-height: 78px; padding: 14px 18px; }
  .view { padding: 16px 14px 34px; }
  .home-hero { min-height: 340px; }
  .home-hero-art { object-position: 60% center; }
  .home-hero::after { background: linear-gradient(90deg, #070d19eF, #09111e80 58%, #09111e20), linear-gradient(0deg, #07101bb0, transparent 50%); }
  .home-hero-copy { width: 88%; }
  .home-tool-links { grid-template-columns: 1fr; gap: 10px; }
  .home-tool { min-height: 68px; }
  .auth-content { padding: 28px 22px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

.retention-note { margin: -2px 0 18px; color: #aebcd2; font-size: 12px; }
