/* Shared proportions, controls and card layout adapted from the supplied TSX design. */
html[data-flux-page] {
  --board-radius:10px;
  --board-border:var(--line);
  --board-inset:var(--canvas);
}

html[data-flux-page]:not([data-palette="light"]) {
  --canvas:#101010;
  --surface:#1a1a1a;
  --ink:#e6e6e2;
  --muted-ink:#b0b0ac;
  --line:#393939;
  --line-strong:#70706b;
  --blue:#bdcdb8;
  --blue-pale:#2b3229;
  --action:#ddddd7;
  --action-hover:#f0f0ea;
  --on-action:#171717;
  --disabled-fill:#282828;
  --disabled-ink:#adada7;
  --navy:#161616;
}

html[data-flux-page] body {
  -webkit-font-smoothing:antialiased;
  font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}

html[data-flux-page]:not([data-flux-page="workspace"]) .site-masthead {
  position:relative;
  z-index:10;
  padding:0;
  border:0;
  border-bottom:1px solid var(--line);
  background:var(--canvas);
  color:var(--ink);
}

html[data-flux-page]:not([data-flux-page="workspace"]) .site-masthead-inner {
  display:flex;
  gap:30px;
  width:min(1250px,100% - 48px);
  min-height:80px;
  margin-inline:auto;
  padding:0;
}

html[data-flux-page] .site-masthead a.flux-wordmark {
  color:var(--ink);
  font-size:17px;
  font-weight:650;
  letter-spacing:-.6px;
  text-decoration:none;
}

html[data-flux-page] .flux-wordmark > span {
  width:34px;
  height:34px;
  font-size:20px;
  font-weight:600;
  border:1px solid var(--line-strong);
  border-radius:8px;
  background:var(--surface);
  color:var(--ink);
  box-shadow:inset 0 1px 0 #ffffff0a;
}

html[data-flux-page] .site-masthead .site-links {
  display:flex;
  margin-left:auto;
  justify-content:flex-end;
  gap:23px;
  min-width:0;
  font-size:13px;
}

html[data-flux-page] .site-masthead .site-links a {
  color:var(--muted-ink);
  text-decoration:none;
  padding:7px 0;
}

html[data-flux-page] .site-masthead .site-links a[aria-current="page"] {
  color:var(--ink);
  text-decoration:none;
  box-shadow:0 1px 0 var(--line-strong);
}

html[data-flux-page] .site-masthead .site-links a:hover {
  color:var(--ink);
}

html[data-flux-page] .site-masthead .site-actions a {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  min-height:44px;
  padding:10px 20px;
  border:1px solid var(--line);
  border-radius:7px;
  color:var(--ink);
  background:var(--surface);
  text-decoration:none;
  font-size:13px;
  font-weight:550;
  box-shadow:inset 0 1px 0 #ffffff0a;
}

html[data-flux-page]:not([data-flux-page="workspace"]) :is(.public-main,.page-wrap,.admin-main,.admin-heading) {
  width:min(1220px,100% - 48px);
  max-width:1220px;
  margin-inline:auto;
}

html[data-flux-page]:not([data-flux-page="workspace"]) :is(.page-heading,.catalog-heading,.admin-heading) {
  padding:60px 0 34px;
  margin-top:0;
  border-bottom:0;
}

html[data-flux-page]:not([data-flux-page="workspace"]) :is(.page-heading,.catalog-heading,.admin-heading) h1 {
  color:var(--ink);
  font-size:clamp(34px,4.4vw,58px);
  line-height:1.1;
  font-weight:600;
  letter-spacing:-.052em !important;
}

html[data-flux-page]:not([data-flux-page="workspace"]) :is(.page-heading,.catalog-heading,.admin-heading) p {
  font-size:14px;
  line-height:1.8;
  margin-top:18px;
  max-width:60ch;
  color:var(--muted-ink);
}

html[data-flux-page]:not([data-flux-page="workspace"]) :is(.content-panel,.account-card,.admin-main > aside,.admin-main > section,.admin-main > article) {
  border-radius:var(--board-radius);
  border:1px solid var(--line);
  background:var(--surface);
  box-shadow:inset 0 1px 0 #ffffff04;
}

html[data-flux-page]:not([data-flux-page="workspace"]) :is(h2,h3) {
  font-weight:550;
  letter-spacing:-.025em;
}

html[data-flux-page]:not([data-flux-page="workspace"]) :is(button,.button,.download) {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:42px;
  padding:10px 16px;
  border:1px solid var(--line);
  border-radius:7px;
  background:var(--surface);
  color:var(--ink);
  font-size:13px;
  font-weight:550;
  line-height:1.4;
  text-decoration:none;
  box-shadow:inset 0 1px 0 #ffffff07;
}

html[data-flux-page]:not([data-flux-page="workspace"]) :is(.button,.download,button.primary) {
  background:var(--action);
  color:var(--on-action);
  border-color:var(--action);
}

html[data-flux-page]:not([data-flux-page="workspace"]) :is(.button,.download,button.primary):hover:not(:disabled) {
  color:var(--on-action);
  background:var(--action-hover);
  border-color:var(--action-hover);
}

html[data-flux-page]:not([data-flux-page="workspace"]) :is(input:not([type="checkbox"]):not([type="radio"]),textarea,select) {
  min-height:42px;
  padding:10px 13px;
  border-radius:7px;
  border:1px solid var(--line-strong);
  background:var(--canvas);
  color:var(--ink);
  font-size:14px;
  box-shadow:none;
}

html[data-flux-page]:not([data-flux-page="workspace"]) :is(input,textarea)::placeholder {
  color:var(--muted-ink);
}

html[data-flux-page] :is(button,a,input,textarea,select,summary):focus-visible {
  outline:2px solid var(--blue);
  outline-offset:3px;
}

/* The download catalog uses the same bordered cards as the homepage. */
html[data-flux-page="downloads"] .catalog-heading {
  grid-template-columns:minmax(0,1fr) auto;
  gap:35px;
  align-items:end;
}

html[data-flux-page="downloads"] .catalog-heading nav {
  display:flex;
  flex-direction:column;
  gap:10px;
  font-size:12px;
}

html[data-flux-page="downloads"] .catalog-heading nav a {
  color:var(--muted-ink);
  gap:25px;
}

html[data-flux-page="downloads"] .catalog-layout {
  display:block;
  margin-top:0;
}

html[data-flux-page="downloads"] .catalog-filter {
  margin:0 0 24px;
  padding:6px;
  width:fit-content;
  max-width:100%;
  border:1px solid var(--line);
  border-radius:10px;
  background:var(--surface);
}

html[data-flux-page="downloads"] .catalog-filter h2 {
  position:absolute;
  width:1px;
  height:1px;
  overflow:hidden;
  clip-path:inset(50%);
}

html[data-flux-page="downloads"] .device-tabs {
  display:flex;
  gap:4px;
  flex-wrap:wrap;
}

html[data-flux-page="downloads"] .device-tabs button {
  min-height:39px;
  padding:8px 15px;
  background:transparent;
  border-color:transparent;
  color:var(--muted-ink);
  font-size:12px;
}

html[data-flux-page="downloads"] .device-tabs button[aria-pressed="true"] {
  color:var(--ink);
  background:var(--canvas);
  border-color:var(--line-strong);
}

html[data-flux-page="downloads"] .filter-status {
  margin:0 0 15px;
  font-size:12px;
}

html[data-flux-page="downloads"] .cards {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:20px;
  border:0;
}

html[data-flux-page="downloads"] .app-card {
  position:relative;
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:16px;
  min-width:0;
  padding:25px 23px 20px;
  border:1px solid var(--line);
  border-radius:11px;
  background:var(--surface);
  box-shadow:inset 0 1px 0 #ffffff06;
}

html[data-flux-page="downloads"] .app-card .card-top {
  display:flex;
  align-items:center;
  min-height:48px;
}

html[data-flux-page="downloads"] .app-card .product-icon {
  width:46px;
  height:46px;
  background:var(--canvas);
  border:1px solid var(--line);
  border-radius:10px;
  color:var(--ink);
}

html[data-flux-page="downloads"] .app-card .product-icon svg {
  width:23px;
  height:23px;
}

html[data-flux-page="downloads"] .app-card h2 {
  font-size:19px;
  line-height:1.4;
  margin:0 0 11px;
  letter-spacing:-.035em;
}

html[data-flux-page="downloads"] .app-card p {
  font-size:12px;
  line-height:1.8;
  color:var(--muted-ink);
  margin:0 0 5px;
}

html[data-flux-page="downloads"] .package-copy {
  min-height:105px;
}

html[data-flux-page="downloads"] .package-actions {
  display:grid;
  gap:8px;
  width:100%;
  margin-top:auto;
}

html[data-flux-page="downloads"] .package-actions .download {
  min-height:42px;
  padding:10px 11px;
  border-radius:7px;
  justify-content:space-between;
  font-size:12px;
  text-align:left;
}

html[data-flux-page="downloads"] .package-actions .text-link {
  display:block;
  padding:5px 0;
  font-size:11px;
  color:var(--muted-ink);
}

html[data-flux-page="downloads"] .package-archive {
  padding-top:13px;
  margin-top:2px;
  border-top:1px solid var(--line);
  font-size:11px;
}

html[data-flux-page="downloads"] .package-archive summary {
  color:var(--muted-ink);
}

html[data-flux-page="downloads"] .section-head h2 {
  font-size:clamp(24px,3vw,36px);
  font-weight:550;
  letter-spacing:-.04em;
}

html[data-flux-page="downloads"] :is(.terminal-panel,.install-help,.help-section > section) {
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:10px;
  margin-top:14px;
  padding:5px 12px;
}

html[data-flux-page="downloads"] :is(.terminal-panel,.install-help) > summary {
  min-height:56px;
  padding:14px 10px;
  align-items:center;
  font-size:14px;
}

html[data-flux-page="downloads"] :is(.terminal-content pre,.flux-command) {
  background:var(--canvas);
  color:var(--ink);
  border:1px solid var(--line);
  border-radius:7px;
  font:12px/1.8 ui-monospace,monospace;
}

html[data-flux-page="downloads"] .help-section p,
html[data-flux-page="downloads"] .help-section li {
  color:var(--muted-ink);
  font-size:13px;
  line-height:1.8;
}

html[data-flux-page="downloads"] footer {
  border-top:1px solid var(--line);
  margin-top:55px;
  padding:26px 0 12px;
  font-size:12px;
}

/* Collection, installation and account views share the same control surfaces. */
html[data-flux-page="collection"] .collection-grid {
  grid-template-columns:minmax(0,1.3fr) minmax(280px,.8fr);
  gap:23px;
}

html[data-flux-page="collection"] .content-panel,
html[data-flux-page="install"] .content-panel {
  padding:28px;
}

html[data-flux-page="collection"] .content-panel h2,
html[data-flux-page="install"] .content-panel h2 {
  font-size:22px;
  margin-bottom:14px;
}

html[data-flux-page="collection"] .content-panel p,
html[data-flux-page="install"] .content-panel :is(p,li) {
  font-size:13px;
  line-height:1.8;
}

html[data-flux-page="collection"] .collection-recipes .grid {
  gap:10px;
}

html[data-flux-page="collection"] .collection-recipes .grid button {
  padding:15px;
  border-radius:7px;
  text-align:left;
  justify-content:flex-start;
  line-height:1.6;
}

html[data-flux-page="collection"] .collection-feedback {
  border:1px solid var(--line);
  border-radius:8px;
  background:var(--surface);
  padding:15px 20px;
  font-size:13px;
}

html[data-flux-page="collection"] .collection-answers details {
  padding:18px 0;
  margin-block:18px;
}

html[data-flux-page="collection"] dialog {
  border-radius:11px;
  border-color:var(--line-strong);
}

html[data-flux-page="install"] .install-grid {
  grid-template-columns:minmax(0,1.4fr) minmax(290px,.8fr);
  gap:22px;
}

html[data-flux-page="install"] .instruction-list {
  padding-left:22px;
  margin-block:22px 26px;
}

html[data-flux-page="install"] .instruction-list li {
  margin-block:15px;
  padding-left:8px;
}

html[data-flux-page="install"] .install-heading > a {
  font-size:12px;
  color:var(--muted-ink);
}

html[data-flux-page="account"] main.account-layout {
  width:min(1090px,100% - 48px);
  max-width:1090px;
  margin:70px auto;
  gap:75px;
  grid-template-columns:minmax(0,1fr) minmax(330px,.9fr);
}

html[data-flux-page="account"] .account-intro {
  border:0;
  padding:22px 0;
}

html[data-flux-page="account"] .account-intro h2 {
  font-size:clamp(32px,4.3vw,50px);
  font-weight:600;
  line-height:1.12;
  letter-spacing:-.052em;
}

html[data-flux-page="account"] .account-intro p {
  font-size:14px;
  line-height:1.8;
  margin:24px 0;
  max-width:38ch;
}

html[data-flux-page="account"] .account-intro nav a {
  font-size:13px;
  padding:15px 0;
  max-width:340px;
}

html[data-flux-page="account"] .account-card {
  border-radius:12px;
  padding:28px;
  border-color:var(--line);
  box-shadow:inset 0 1px 0 #ffffff06;
}

html[data-flux-page="account"] .account-card h1 {
  font-size:27px;
  line-height:1.2;
  letter-spacing:-.035em;
}

html[data-flux-page="account"] .account-card :is(.hint,.footer,#intro,.divider) {
  font-size:12px;
  line-height:1.7;
}

html[data-flux-page="account"] .account-card .tabs {
  display:flex;
  padding:4px;
  gap:4px;
  border:1px solid var(--line);
  background:var(--canvas);
  border-radius:8px;
  margin-top:22px;
}

html[data-flux-page="account"] .account-card .tabs button {
  min-height:39px;
  padding:9px 12px;
  border-radius:5px;
}

html[data-flux-page="account"] .account-card .tabs button[aria-selected="true"] {
  background:var(--surface);
  color:var(--ink);
  box-shadow:inset 0 0 0 1px var(--line-strong);
}

html[data-flux-page="account"] .account-card .row {
  gap:10px;
}

html[data-flux-page="account"] .account-card button.primary {
  min-height:45px;
  border-radius:7px;
}

html[data-flux-page="account"] .account-card .social {
  gap:9px;
}

html[data-flux-page="account"] .account-card .social button {
  min-height:42px;
  border:1px solid var(--line);
  background:var(--canvas);
  color:var(--ink);
}

html[data-flux-page="account"] .account-card .codebox {
  border-radius:8px;
  background:var(--canvas);
}

/* Administration keeps its working layout while sharing the website components. */
html[data-flux-page="admin"] :is(.admin-heading,.admin-main) {
  width:min(1220px,100% - 48px);
  margin-inline:auto;
}

html[data-flux-page="admin"] .admin-heading {
  padding:48px 0 28px;
  margin-bottom:0;
}

html[data-flux-page="admin"] :is(main > aside,section,article,.card,#draft,#compose,dialog) {
  border:1px solid var(--line);
  border-radius:10px;
  background:var(--surface);
  box-shadow:none;
}

html[data-flux-page="admin"] :is(main > aside,.admin-main > section,.admin-main > article,#draft,#compose) {
  padding:24px;
}

html[data-flux-view="account-setup"] .admin-main {
  max-width:800px;
  margin-left:max(24px,calc((100% - 1220px) / 2));
  padding:27px;
  border:1px solid var(--line);
  border-radius:10px;
}

html[data-flux-view="campaigns"] .admin-main {
  max-width:980px;
  margin-left:max(24px,calc((100% - 1220px) / 2));
}

html[data-flux-page="admin"] pre {
  border:1px solid var(--line);
  border-radius:7px;
  background:var(--canvas);
  color:var(--ink);
}

html[data-flux-view="subscription"] .content-panel {
  max-width:560px;
  margin-bottom:50px;
  padding:28px;
}

@media (max-width:1100px) {
  html[data-flux-page="downloads"] .cards {
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media (max-width:860px) {
  html[data-flux-page]:not([data-flux-page="workspace"]) .site-masthead-inner {
    width:calc(100% - 36px);
    min-height:74px;
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    gap:0 15px;
    padding:12px 0 8px;
  }

  html[data-flux-page] .site-masthead .site-links {
    grid-column:1/-1;
    grid-row:2;
    flex-wrap:wrap;
    justify-content:flex-start;
    margin:6px 0 0;
    padding:5px 0;
    gap:8px 19px;
    font-size:12px;
  }

  html[data-flux-page] .site-masthead .site-actions {
    grid-column:2;
    grid-row:1;
  }

  html[data-flux-page] .site-masthead .site-actions a {
    min-height:40px;
    padding:9px 12px;
    font-size:12px;
  }

  html[data-flux-page]:not([data-flux-page="workspace"]) :is(.public-main,.page-wrap,.admin-main,.admin-heading) {
    width:calc(100% - 36px);
  }

  html[data-flux-page]:not([data-flux-page="workspace"]) :is(.page-heading,.catalog-heading,.admin-heading) {
    padding:38px 0 26px;
  }

  html[data-flux-page="downloads"] .catalog-heading {
    grid-template-columns:1fr;
    gap:22px;
  }

  html[data-flux-page="downloads"] .catalog-heading nav {
    flex-direction:row;
    flex-wrap:wrap;
    gap:12px 20px;
    font-size:11px;
  }

  html[data-flux-page="account"] main.account-layout {
    width:calc(100% - 36px);
    grid-template-columns:1fr;
    gap:22px;
    margin:36px auto 46px;
  }

  html[data-flux-page="account"] .account-intro {
    padding:0;
  }

  html[data-flux-page="account"] .account-intro h2 {
    font-size:34px;
  }

  html[data-flux-page="account"] .account-intro nav {
    display:flex;
    gap:10px 20px;
    flex-wrap:wrap;
  }

  html[data-flux-page="account"] .account-intro nav a {
    padding:6px 0;
    font-size:12px;
  }

  html[data-flux-page="collection"] .collection-grid,
  html[data-flux-page="install"] .install-grid {
    grid-template-columns:1fr;
    gap:18px;
  }

  html[data-flux-page="collection"] .content-panel,
  html[data-flux-page="install"] .content-panel {
    padding:23px;
  }

  html[data-flux-view="account-setup"] .admin-main,
  html[data-flux-view="campaigns"] .admin-main {
    width:calc(100% - 36px);
    margin-inline:auto;
  }

  html[data-flux-page="admin"] :is(main > aside,.admin-main > section,.admin-main > article,#draft,#compose) {
    padding:18px;
  }
}

@media (max-width:560px) {
  html[data-flux-page="downloads"] .cards {
    grid-template-columns:1fr;
    gap:17px;
  }

  html[data-flux-page="downloads"] .app-card {
    padding:23px 21px 19px;
  }

  html[data-flux-page="downloads"] .package-copy {
    min-height:0;
  }

  html[data-flux-page="downloads"] .app-card .package-actions {
    margin-top:10px;
  }

  html[data-flux-page="downloads"] .device-tabs button {
    min-height:37px;
    padding:8px 11px;
    font-size:11px;
  }

  html[data-flux-page="downloads"] .catalog-heading nav {
    display:none;
  }

  html[data-flux-page="downloads"] :is(.terminal-panel,.install-help) > summary {
    font-size:13px;
    gap:9px;
  }

  html[data-flux-page="downloads"] :is(.terminal-content,.install-help > :not(summary)) {
    padding:0 8px 13px;
  }

  html[data-flux-page="downloads"] .flux-commands-grid {
    grid-template-columns:1fr;
  }

  html[data-flux-page="downloads"] footer {
    flex-direction:column;
    align-items:flex-start;
  }

  html[data-flux-page="account"] .account-card {
    padding:22px 18px;
  }

  html[data-flux-page="account"] .account-intro h2 {
    font-size:30px;
  }

  html[data-flux-page="account"] .account-card .row {
    flex-wrap:wrap;
  }

  html[data-flux-page="collection"] .content-panel,
  html[data-flux-page="install"] .content-panel {
    padding:21px 18px;
  }

  html[data-flux-page="collection"] .heading {
    flex-wrap:wrap;
  }
}

@media (prefers-reduced-motion:reduce) {
  html[data-flux-page] :is(.app-card,.content-panel,.account-card) {
    transition:none;
  }
}

/* Working chat and all in-app sections. */
html[data-flux-page="workspace"] body {
  --desk-side:248px;
  --header-height:72px;
}

html[data-flux-page="workspace"]:not([data-palette="light"]) body {
  --rail:#171717;
  --rail-border:#353535;
  --rail-selected:#272a25;
  --rail-text:#e4e4de;
  --rail-muted:#b0b0aa;
  --chat-entry:#222;
  --chat-entry-hover:#2b2b2b;
}

html[data-flux-page="workspace"] body .app-sidebar {
  border-right:1px solid var(--work-line) !important;
  padding:24px 18px 17px !important;
}

html[data-flux-page="workspace"] .app-sidebar .sidebar-header {
  padding:0 4px 22px !important;
}

html[data-flux-page="workspace"] .app-sidebar .brand-logo {
  width:34px !important;
  height:34px !important;
  font-size:20px !important;
  border:1px solid var(--line-strong) !important;
  border-radius:8px !important;
  background:var(--work-surface) !important;
}

html[data-flux-page="workspace"] .app-sidebar .brand-name {
  font-size:17px !important;
  font-weight:650 !important;
  letter-spacing:-.6px !important;
}

html[data-flux-page="workspace"] .app-sidebar .sidebar-new-chat-box {
  margin-bottom:12px !important;
}

html[data-flux-page="workspace"] .app-sidebar .new-chat-btn {
  min-height:42px !important;
  justify-content:center !important;
  background:var(--work-surface) !important;
  border:1px solid var(--line-strong) !important;
  border-radius:7px !important;
  color:var(--work-ink) !important;
  font-size:12px !important;
}

html[data-flux-page="workspace"] .app-sidebar .new-chat-btn:hover {
  background:var(--work-selected) !important;
}

html[data-flux-page="workspace"] .app-sidebar .sidebar-nav {
  max-height:45vh;
}

html[data-flux-page="workspace"] .app-sidebar .sidebar-nav-item,
html[data-flux-page="workspace"] .app-sidebar .rail-more > summary {
  min-height:39px !important;
  padding:9px 10px !important;
  font-size:12px !important;
  border-radius:7px !important;
}

html[data-flux-page="workspace"] body #appSidebar .studio-history-search input {
  min-height:39px !important;
  background:var(--rail) !important;
  color:var(--rail-text) !important;
  border-color:var(--rail-border) !important;
  font-size:12px;
}

html[data-flux-page="workspace"] .app-sidebar .sidebar-chat-item {
  border-radius:6px !important;
  font-size:12px !important;
  line-height:1.5;
  padding:10px !important;
}

html[data-flux-page="workspace"] .app-sidebar .sidebar-chat-item.active {
  border:1px solid var(--line-strong) !important;
  color:var(--work-ink) !important;
  background:var(--work-surface) !important;
}

html[data-flux-page="workspace"] .app-sidebar .rail-history {
  margin-top:12px;
  padding-top:13px;
}

html[data-flux-page="workspace"] .app-sidebar .sidebar-section-title {
  font-size:10px !important;
  padding:0 5px 12px !important;
}

html[data-flux-page="workspace"] body .app-header {
  height:var(--header-height) !important;
  padding-inline:26px !important;
  background:var(--work-canvas) !important;
  border-bottom:1px solid var(--work-line) !important;
}

html[data-flux-page="workspace"] .app-header #chatModelSelect {
  min-height:39px;
  font-size:13px !important;
  border-radius:7px !important;
}

html[data-flux-page="workspace"] .app-header .header-actions {
  gap:8px !important;
}

html[data-flux-page="workspace"] .app-header :is(.header-action-btn,.header-account-link) {
  min-height:38px;
  border:1px solid var(--work-line) !important;
  background:var(--work-surface) !important;
  color:var(--work-ink) !important;
  border-radius:7px !important;
  font-size:12px !important;
  font-weight:550;
}

html[data-flux-page="workspace"] .app-header .sync-indicator {
  color:var(--work-secondary);
  border-color:var(--work-line);
  font-size:11px;
}

html[data-flux-page="workspace"] .app-header .plan-pill {
  padding:6px 9px;
  border:1px solid var(--work-line);
  border-radius:5px;
  background:var(--work-surface);
  color:var(--work-secondary);
}

html[data-flux-page="workspace"] body .tab-panel:not(#panel-chat) .work-section-heading h1 {
  font-size:clamp(30px,3.2vw,44px) !important;
  font-weight:550;
  letter-spacing:-.045em;
}

html[data-flux-page="workspace"] body :is(.card,.glass-card,.char-card,.model-tools-panel,.modal-card) {
  border:1px solid var(--work-line) !important;
  border-radius:10px !important;
  background:var(--work-surface) !important;
  box-shadow:inset 0 1px 0 #ffffff04 !important;
}

html[data-flux-page="workspace"] body :is(.btn,.micro-btn,.header-action-btn,.close-modal-btn) {
  min-height:38px;
  padding:9px 14px;
  border-radius:7px !important;
  font-size:12px;
  font-weight:550;
}

html[data-flux-page="workspace"] body :is(.btn.primary,#chatSendBtn) {
  color:var(--on-action) !important;
  background:var(--action) !important;
  border-color:var(--action) !important;
}

html[data-flux-page="workspace"] body :is(.btn.primary,#chatSendBtn):hover:not(:disabled) {
  color:var(--on-action) !important;
  background:var(--action-hover) !important;
  border-color:var(--action-hover) !important;
}

html[data-flux-page="workspace"] body :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea) {
  border-radius:7px !important;
  font-size:13px;
}

html[data-flux-page="workspace"] body #panel-chat .chat-window-card {
  border:1px solid var(--work-line) !important;
  border-radius:13px !important;
  background:var(--work-surface) !important;
  overflow:hidden;
}

html[data-flux-page="workspace"] #panel-chat .studio-welcome h1 {
  font-size:clamp(27px,3.1vw,40px) !important;
  font-weight:550 !important;
  color:var(--work-ink);
}

html[data-flux-page="workspace"] #panel-chat #chatMessages {
  scrollbar-width:thin;
  scrollbar-color:var(--work-line) transparent;
}

html[data-flux-page="workspace"] #panel-chat .composer-block {
  padding:14px 20px 15px;
}

html[data-flux-page="workspace"] #panel-chat .chat-window-card #chatForm.flux-v0 {
  padding:12px 13px 10px !important;
  border:1px solid var(--line-strong) !important;
  border-radius:10px !important;
  background:var(--chat-entry) !important;
  box-shadow:inset 0 1px 0 #ffffff07 !important;
}

html[data-flux-page="workspace"] #panel-chat #chatInput {
  font-size:14px !important;
  line-height:1.6;
  background:transparent !important;
}

html[data-flux-page="workspace"] #panel-chat #chatForm .composer-actions :is(button,a) {
  min-height:34px;
}

html[data-flux-page="workspace"] #panel-chat .chat-window-card:has(#chatMessages[data-studio-empty="true"]) #chatChipsCarousel {
  width:min(100% - 48px,700px) !important;
}

html[data-flux-page="workspace"] #panel-chat .chat-window-card:has(#chatMessages[data-studio-empty="true"]):not(.show-examples) #chatChipsCarousel .flux-v0-actions {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
}

html[data-flux-page="workspace"] #panel-chat .chat-window-card .flux-v0-actions .v0-action {
  display:flex;
  align-items:center;
  justify-content:flex-start;
  min-height:62px;
  width:100%;
  gap:10px;
  padding:14px;
  border:1px solid var(--work-line);
  border-radius:8px;
  background:var(--chat-entry);
  color:var(--work-ink);
  white-space:normal;
  text-align:left;
  font:550 11px/1.5 var(--font);
}

html[data-flux-page="workspace"]:not([data-palette="light"]) #panel-chat .flux-v0-actions .v0-action:nth-child(3n+1) {
  background:#1d231e;
  border-color:#3d493f;
}

html[data-flux-page="workspace"]:not([data-palette="light"]) #panel-chat .flux-v0-actions .v0-action:nth-child(3n+2) {
  background:#25211c;
  border-color:#4b4032;
}

html[data-flux-page="workspace"]:not([data-palette="light"]) #panel-chat .flux-v0-actions .v0-action:nth-child(3n) {
  background:#20252e;
  border-color:#3b4559;
}

html[data-flux-page="workspace"] #panel-chat .flux-v0-actions .v0-action:hover {
  border-color:var(--line-strong);
}

html[data-flux-page="workspace"] #panel-chat #chatMessages .user-bubble {
  margin:18px 0 18px auto !important;
  max-width:min(85%,650px);
}

html[data-flux-page="workspace"] #panel-chat #chatMessages .user-bubble .bubble-body {
  background:var(--chat-entry) !important;
  border:1px solid var(--work-line) !important;
  border-radius:10px 10px 3px 10px !important;
  padding:12px 16px !important;
  font-size:14px;
  line-height:1.75;
}

html[data-flux-page="workspace"] #panel-chat #chatMessages .ai-bubble {
  margin-block:23px !important;
  line-height:1.8;
}

html[data-flux-page="workspace"] #panel-chat #chatMessages .ai-bubble .bubble-avatar {
  width:29px !important;
  height:29px !important;
  border:1px solid var(--line-strong) !important;
  border-radius:6px !important;
  background:var(--work-selected) !important;
  color:var(--work-accent) !important;
}

html[data-flux-page="workspace"] #panel-chat #chatMessages :is(.code-block-wrapper,.code-block-preview,.prose-preview) {
  border:1px solid var(--work-line) !important;
  border-radius:8px !important;
  background:var(--work-canvas) !important;
}

html[data-flux-page="workspace"] #panel-chat .chat-footer-note {
  font-size:10px;
  padding:8px 0 0;
}

html[data-flux-page="workspace"] #panel-images .art-preset-card {
  border:1px solid var(--work-line) !important;
  border-radius:8px !important;
  padding:16px !important;
  background:var(--work-surface) !important;
}

html[data-flux-page="workspace"] #panel-images .preset-name {
  color:var(--work-ink) !important;
}

html[data-flux-page="workspace"] .store-hero,
html[data-flux-page="workspace"] .image-studio-card {
  padding:25px !important;
}

html[data-flux-page="workspace"] #panel-plans .plan-card {
  border-radius:10px !important;
  border:1px solid var(--work-line) !important;
  background:var(--work-surface) !important;
}

html[data-flux-page="workspace"] .modal-card :is(h2,h3) {
  color:var(--work-ink);
  font-weight:550;
  letter-spacing:-.025em;
}

@media (min-width:960px) {
  html[data-flux-page="workspace"] body.tab-chat-active main.shell {
    padding:22px 26px 23px !important;
  }

  html[data-flux-page="workspace"] #panel-chat.active {
    max-width:1260px !important;
    width:100% !important;
  }

  html[data-flux-page="workspace"] body.tab-chat-active #panel-chat .chat-window-card {
    height:calc(100dvh - var(--header-height) - 45px) !important;
    max-height:calc(100dvh - var(--header-height) - 45px) !important;
    min-height:0 !important;
  }

  html[data-flux-page="workspace"] .app-header .header-shell {
    max-width:1260px !important;
    margin:auto !important;
  }
}

@media (max-width:959px) {
  html[data-flux-page="workspace"] body {
    --header-height:58px;
  }

  html[data-flux-page="workspace"] body .app-header {
    padding-inline:10px !important;
  }

  html[data-flux-page="workspace"] body .app-sidebar {
    padding:20px 17px !important;
  }

  html[data-flux-page="workspace"] .app-header .header-actions {
    gap:5px !important;
  }

  html[data-flux-page="workspace"] .app-header .header-actions .header-action-btn {
    padding:6px 9px !important;
    min-width:33px;
    min-height:34px;
  }

  html[data-flux-page="workspace"] .app-header .header-account-link {
    min-height:34px;
    padding:6px 10px;
  }

  html[data-flux-page="workspace"] .app-header #chatModelSelect {
    font-size:12px !important;
  }

  html[data-flux-page="workspace"] body.tab-chat-active main.shell {
    padding:8px 9px 10px !important;
  }

  html[data-flux-page="workspace"] body #panel-chat .chat-window-card {
    border-radius:10px !important;
  }

  html[data-flux-page="workspace"] #panel-chat .chat-window-card:has(#chatMessages[data-studio-empty="true"]) #chatChipsCarousel {
    width:calc(100% - 24px) !important;
  }

  html[data-flux-page="workspace"] #panel-chat .chat-window-card:has(#chatMessages[data-studio-empty="true"]):not(.show-examples) #chatChipsCarousel .flux-v0-actions {
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:7px;
  }

  html[data-flux-page="workspace"] #panel-chat .chat-window-card .flux-v0-actions .v0-action {
    min-height:48px;
    font-size:10px;
    padding:10px;
    gap:7px;
  }

  html[data-flux-page="workspace"] #panel-chat .composer-block {
    padding:10px 12px;
  }

  html[data-flux-page="workspace"] #panel-chat .chat-window-card #chatForm.flux-v0 {
    padding:10px 9px 8px !important;
  }

  html[data-flux-page="workspace"] #panel-chat #chatInput {
    font-size:14px !important;
  }

  html[data-flux-page="workspace"] body :is(.store-hero,.image-studio-card) {
    padding:20px !important;
  }
}

@media (max-width:380px) {
  html[data-flux-page="workspace"] #panel-chat .chat-window-card .flux-v0-actions .v0-action {
    font-size:9px;
    padding:9px;
    gap:6px;
  }

  html[data-flux-page="workspace"] #panel-chat .flux-v0-actions .v0-action svg {
    width:13px;
    height:13px;
  }
}
html[data-flux-page][data-palette="oled"] {
  --canvas:#080808;
  --surface:#141414;
  --navy:#0e0e0e;
}
html[data-flux-page]:not([data-flux-page="workspace"]) .site-masthead a.flux-wordmark {
  color:var(--ink);
}
