/* BrixyAI visual refinement: quiet editorial surfaces, clear type, signature violet. */
:root:not([data-site-event="halloween"]) {
  --ws-bg: #0d0b12;
  --ws-panel: #17131e;
  --ws-raised: #211b2b;
  --ws-text: #f2eef8;
  --ws-muted: #b5acc4;
  --ws-accent: #b39aff;
  --ws-border: #e5d8f81a;
  --ws-danger: #f08e8e;
  --background: #0d0b12;
  --foreground: #f2eef8;
  --card: #17131e;
  --card-foreground: #f2eef8;
  --popover: #211b2b;
  --popover-foreground: #f2eef8;
  --primary: #b39aff;
  --primary-foreground: #1a1030;
  --muted: #211b2b;
  --muted-foreground: #b5acc4;
  --border: #e5d8f81a;
  --input: #e5d8f830;
  --ring: #b39aff;
}

html:not([data-site-event="halloween"]) body {
  background: radial-gradient(ellipse at 84% 0%, #b39aff08, transparent 38%), var(--ws-bg);
  color: var(--ws-text);
  font-family: Inter, "SF Pro Display", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

html:not([data-site-event="halloween"]) body :is(a, button, input, textarea, select, summary) {
  outline-offset: 4px;
}
html:not([data-site-event="halloween"]) body :is(a, button):focus-visible {
  outline: 2px solid var(--ws-accent) !important;
  outline-offset: 4px;
}
html:not([data-site-event="halloween"]) body ::selection {
  background: #b39aff40;
  color: #fff;
}

/* Public landing: floating navigation and a restrained, crafted hero. */
html:not([data-site-event="halloween"]) body .landing-nav {
  position: sticky;
  top: 14px;
  z-index: 30;
  width: min(1184px, calc(100% - 48px));
  height: 68px;
  padding: 0 22px;
  margin: 14px auto 0;
  border: 1px solid #e5d8f81a;
  border-radius: 18px;
  background: #121019e8;
  box-shadow:
    0 14px 42px #0003,
    inset 0 1px #ffffff0a;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
html:not([data-site-event="halloween"]) body .workshop-brand span,
html:not([data-site-event="halloween"]) body .landing-hero h1 > span,
html:not([data-site-event="halloween"]) body .ws-kicker > span,
html:not([data-site-event="halloween"]) body .ws-text-link,
html:not([data-site-event="halloween"]) body .workflow-rows article svg,
html:not([data-site-event="halloween"]) body .workshop-plan li svg {
  color: var(--ws-accent) !important;
}
html:not([data-site-event="halloween"]) body .landing-hero {
  position: relative;
  padding-top: clamp(92px, 11vw, 146px);
}
html:not([data-site-event="halloween"]) body .landing-hero::before {
  position: absolute;
  top: 10%;
  right: -12%;
  z-index: -1;
  width: min(56vw, 720px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, #b39aff10 0, #b39aff05 38%, transparent 70%);
  content: "";
  pointer-events: none;
}
html:not([data-site-event="halloween"]) body .landing-hero h1 {
  max-width: 1080px;
  font-size: clamp(56px, 8.3vw, 108px);
  line-height: 0.96;
  font-weight: 560;
}
html:not([data-site-event="halloween"]) body .hero-bottom p {
  color: #c1bacb;
}
html:not([data-site-event="halloween"]) body .build-canvas {
  border-color: #e5d8f825;
  border-radius: 22px;
  background-color: #121019;
  box-shadow:
    0 24px 80px #0004,
    inset 0 1px #ffffff08;
}
html:not([data-site-event="halloween"]) body .canvas-node,
html:not([data-site-event="halloween"]) body .canvas-core {
  border-color: #e5d8f81c;
  border-radius: 16px;
  background: linear-gradient(145deg, #211b2b, #17131e);
}
html:not([data-site-event="halloween"]) body .canvas-core {
  border-color: #b39aff40;
  box-shadow: 0 12px 38px #b39aff0d;
}
html:not([data-site-event="halloween"]) body .canvas-connector {
  background: linear-gradient(90deg, #b39aff30, #b39affa0);
}
html:not([data-site-event="halloween"]) body .workshop-plan {
  padding: clamp(24px, 3.2vw, 38px);
  border-radius: 20px;
  background: linear-gradient(145deg, #191522, #121019);
  box-shadow: inset 0 1px #ffffff08;
  transition:
    border-color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}
html:not([data-site-event="halloween"]) body .workshop-plan:hover {
  transform: translateY(-3px);
  border-color: #b39aff40;
  box-shadow:
    0 18px 44px #0003,
    inset 0 1px #ffffff0b;
}
html:not([data-site-event="halloween"]) body .workshop-plan.is-pro {
  border-color: #b39aff50;
  background: linear-gradient(145deg, #251e31, #17131e 76%);
}

/* Shared buttons and interactive surfaces. */
html:not([data-site-event="halloween"])
  body
  :is(
    .ws-button-primary,
    .home-primary,
    .admin-primary,
    .feature-primary,
    .project-dialog button[type="submit"],
    .pix-primary,
    .gift-primary,
    .update-primary,
    .pro-header-link,
    .login
  ) {
  border: 1px solid #b39aff !important;
  border-radius: 11px !important;
  background: linear-gradient(140deg, #cbb5fa, #a486ed) !important;
  color: #1a1030 !important;
  font-weight: 680 !important;
  box-shadow:
    0 7px 22px #a486ed15,
    inset 0 1px #ffffff70 !important;
  transition:
    transform 160ms ease,
    filter 160ms ease,
    box-shadow 160ms ease;
}
html:not([data-site-event="halloween"])
  body
  :is(
    .ws-button-primary,
    .home-primary,
    .admin-primary,
    .feature-primary,
    .project-dialog button[type="submit"],
    .pix-primary,
    .gift-primary,
    .update-primary,
    .pro-header-link,
    .login
  ):hover {
  transform: translateY(-1px);
  filter: brightness(1.045);
  box-shadow:
    0 10px 28px #a486ed20,
    inset 0 1px #ffffff78 !important;
}
html:not([data-site-event="halloween"])
  body
  :is(
    .ws-button-secondary,
    .feature-secondary,
    .header-docs-button,
    .workspace-command,
    .workspace-new
  ) {
  border-color: #e5d8f822;
  border-radius: 11px;
  background: #ffffff05;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease;
}
html:not([data-site-event="halloween"])
  body
  :is(
    .ws-button-secondary,
    .feature-secondary,
    .header-docs-button,
    .workspace-command,
    .workspace-new
  ):hover {
  border-color: #b39aff45;
  background: #b39aff0b;
}

/* A calmer, more legible creation workspace. */
html:not([data-site-event="halloween"]) body .chat-app {
  background: var(--ws-bg) !important;
  color: var(--ws-text);
}
html:not([data-site-event="halloween"]) body .chat-sidebar {
  background: #121019 !important;
  border-right: 1px solid #e5d8f81c !important;
}
html:not([data-site-event="halloween"]) body .chat-header {
  border-bottom-color: #e5d8f81c !important;
  color: #c1bacb;
}
html:not([data-site-event="halloween"])
  body
  .chat-sidebar
  :is(.new-project, .conversation-item.selected) {
  border-color: #b39aff38 !important;
}
html:not([data-site-event="halloween"]) body .chat-sidebar .new-project {
  background: #b39aff !important;
  color: #1a1030 !important;
  border-radius: 10px !important;
  box-shadow: 0 5px 16px #b39aff17 !important;
}
html:not([data-site-event="halloween"]) body .chat-sidebar .new-project:hover {
  background: #cbb5fa !important;
}
html:not([data-site-event="halloween"]) body .chat-composer .prompt-bar__field {
  border-color: #e5d8f825 !important;
  border-radius: 18px !important;
  background: #18151f !important;
  box-shadow:
    0 16px 42px #0003,
    inset 0 1px #ffffff08 !important;
}
html:not([data-site-event="halloween"]) body .chat-composer .prompt-bar__field:focus-within {
  border-color: #b39aff70 !important;
  box-shadow:
    0 0 0 3px #b39aff12,
    0 16px 42px #0003 !important;
}
html:not([data-site-event="halloween"]) body .chat-composer .prompt-bar__send {
  border-radius: 10px !important;
  background: #b39aff !important;
  color: #1a1030 !important;
}
html:not([data-site-event="halloween"]) body .chat-message.user {
  border-color: #e5d8f81b !important;
  border-radius: 16px !important;
  background: #211b2b !important;
}
html:not([data-site-event="halloween"]) body .message-label {
  color: #dbcaff !important;
}
html:not([data-site-event="halloween"]) body .profile-credit-plan {
  border-color: #e5d8f827 !important;
  border-radius: 16px !important;
  background: linear-gradient(145deg, #192016, #121019) !important;
}

/* Secondary pages: consistent card rhythm, fields, tables and dialogs. */
html:not([data-site-event="halloween"])
  body
  :is(
    .payments-panel,
    .admin-panel,
    .admin-stats > div,
    .admin-overview-grid > article,
    .admin-user-detail,
    .admin-system,
    .legal-page > main,
    .site-update-content,
    .support-full-page .admin-panel
  ) {
  border-color: #e5d8f81c !important;
  border-radius: 18px !important;
  background: linear-gradient(145deg, #191522, #17131e) !important;
  box-shadow:
    0 12px 38px #0002,
    inset 0 1px #ffffff07 !important;
}
html:not([data-site-event="halloween"])
  body
  :is(.payments-page, .admin-page, .support-full-page, .appeal-page, .legal-page, .docs-page) {
  background-color: var(--ws-bg) !important;
  color: var(--ws-text);
}
html:not([data-site-event="halloween"])
  body
  :is(
    .project-dialog,
    .account-settings,
    .admin-action-dialog,
    .glass-command-dialog,
    .credit-gift-dialog,
    .notifications-panel,
    .profile-popover
  ) {
  border-color: #e5d8f827 !important;
  border-radius: 20px !important;
  background: #191522f5 !important;
  box-shadow:
    0 28px 90px #0008,
    inset 0 1px #ffffff0b !important;
  color: var(--ws-text);
}
html:not([data-site-event="halloween"])
  body
  :is(
    input,
    textarea,
    select,
    .admin-filters input,
    .admin-filters select,
    .project-dialog-field input,
    .settings-content select
  ) {
  border-color: #e5d8f825 !important;
  border-radius: 10px !important;
  background-color: #100e16 !important;
  color: var(--ws-text) !important;
}
html:not([data-site-event="halloween"]) body :is(input, textarea, select):focus-visible {
  border-color: #b39aff70 !important;
  outline: 2px solid #b39aff35 !important;
  outline-offset: 2px;
}
html:not([data-site-event="halloween"])
  body
  .admin-sidebar
  :is(button[aria-current], button.active) {
  border-color: #b39aff30 !important;
  background: #b39aff10 !important;
  color: #e4d8ff !important;
}
html:not([data-site-event="halloween"]) body .admin-table-scroll tr:hover {
  background: #b39aff08 !important;
}
html:not([data-site-event="halloween"]) body .settings-card {
  border: 1px solid #e5d8f81c !important;
  border-radius: 15px !important;
  background: #ffffff04 !important;
  padding: 16px !important;
}
html:not([data-site-event="halloween"]) body .settings-layout > nav button[aria-pressed="true"] {
  border-color: #b39aff30 !important;
  background: #b39aff12 !important;
  color: #ece4ff !important;
}

/* Responsive spacing and motion that always honors the user's preference. */
@media (max-width: 700px) {
  html:not([data-site-event="halloween"]) body .landing-nav {
    top: 8px;
    width: calc(100% - 24px);
    height: 58px;
    padding-inline: 14px;
    margin-top: 8px;
    border-radius: 15px;
  }
  html:not([data-site-event="halloween"]) body .landing-hero {
    padding-top: 62px;
  }
  html:not([data-site-event="halloween"]) body .landing-hero h1 {
    font-size: clamp(48px, 12vw, 76px);
  }
  html:not([data-site-event="halloween"]) body .workshop-plan {
    border-radius: 17px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html:not([data-site-event="halloween"]) body *,
  html:not([data-site-event="halloween"]) body *::before,
  html:not([data-site-event="halloween"]) body *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Circular Usage meter. The violet arc grows clockwise with consumed allowance. */
.usage-ring {
  --usage-ring-size: 92px;
  position: relative;
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  isolation: isolate;
  color: var(--ws-text);
}
.usage-ring::before {
  position: absolute;
  inset: 13%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle, #b39aff09, transparent 75%);
  content: "";
}
.usage-ring-svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  transform: rotate(0deg);
}
.usage-ring-track,
.usage-ring-progress {
  fill: none;
  stroke-width: 7;
}
.usage-ring-track {
  stroke: #e5d8f812;
}
.usage-ring-progress {
  stroke-linecap: round;
  filter: drop-shadow(0 0 4px #b39aff24);
  transition:
    stroke-dashoffset 680ms cubic-bezier(0.22, 1, 0.36, 1),
    filter 300ms ease;
}
.usage-ring[data-level="steady"] .usage-ring-gradient-start {
  stop-color: #b39aff;
}
.usage-ring[data-level="steady"] .usage-ring-gradient-end {
  stop-color: #cbb5fa;
}
.usage-ring[data-level="warning"] .usage-ring-gradient-start {
  stop-color: #b39aff;
}
.usage-ring[data-level="warning"] .usage-ring-gradient-end {
  stop-color: #f0bf5f;
}
.usage-ring[data-level="urgent"] .usage-ring-gradient-start {
  stop-color: #efbd64;
}
.usage-ring[data-level="urgent"] .usage-ring-gradient-end {
  stop-color: #ef7d74;
}
.usage-ring[data-level="urgent"] .usage-ring-progress {
  filter: drop-shadow(0 0 6px #ef7d7435);
}
.usage-ring-center {
  position: absolute;
  inset: 23%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 2px;
  pointer-events: none;
  text-align: center;
}
.usage-ring-center strong {
  max-width: 100%;
  overflow: hidden;
  color: #f2eef8;
  font-size: clamp(13px, 2.6vw, 21px);
  font-weight: 680;
  letter-spacing: -0.065em;
  line-height: 1;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.usage-ring-center > span {
  color: #b5acc4;
  font-size: 8px;
  font-weight: 560;
  letter-spacing: 0.1em;
  line-height: 1.1;
  text-transform: uppercase;
}
.usage-ring[data-compact="true"] .usage-ring-track,
.usage-ring[data-compact="true"] .usage-ring-progress {
  stroke-width: 8;
}
.usage-ring[data-compact="true"] .usage-ring-center {
  inset: 20%;
  gap: 1px;
}

/* Sidebar Usage card: ring + units + daily reset + progress track. */
html body .chat-app .sidebar-credit-card.usage-card {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 14px 13px 13px;
  border: 1px solid #b39aff24;
  border-radius: 14px;
  background:
    radial-gradient(120% 90% at 100% 0%, #b39aff12, transparent 60%),
    #ffffff05;
  flex-shrink: 0;
}
/* Keep the card row layout in the project workspace (legacy glass rules stack it). */
html body .chat-app.project-workspace .sidebar-credit-card > .usage-card-head {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 10px !important;
}
html body .chat-app.project-workspace .sidebar-credit-card .usage-card-units {
  color: #f2eef8;
  font-size: 21px;
  font-weight: 660;
}
.usage-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.usage-card-title {
  color: #cfc7dd;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.usage-card-plan {
  padding: 3px 7px;
  border: 1px solid #ffffff1c;
  border-radius: 6px;
  color: var(--ws-muted, #a3aaa5);
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.1em;
}
.usage-card-plan[data-plan="pro"] {
  border-color: #b39aff45;
  background: #b39aff14;
  color: #cdbaff;
}
.usage-card-body {
  display: flex;
  align-items: center;
  gap: 13px;
}
.usage-card-meta {
  display: grid;
  gap: 5px;
  min-width: 0;
}
.usage-card-units {
  color: #f2eef8;
  font-size: 21px;
  font-weight: 660;
  letter-spacing: -0.05em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.usage-card-units small {
  color: #9d94ad;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.usage-card-reset {
  color: var(--ws-muted, #a3aaa5);
  font-size: 10px;
  line-height: 1.4;
}
.usage-card-track {
  height: 6px;
  overflow: hidden;
  border-radius: 99px;
  background: #ffffff10;
}
.usage-card-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #9d7cff, #cbb5fa);
  transition: width 650ms cubic-bezier(0.22, 1, 0.36, 1), background 300ms ease;
}
.usage-card-fill[data-level="warning"] {
  background: linear-gradient(90deg, #b39aff, #f0bf5f);
}
.usage-card-fill[data-level="urgent"],
.usage-card-fill[data-level="empty"] {
  background: linear-gradient(90deg, #efbd64, #ef7d74);
}
.usage-card-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 10px;
  border: 1px solid #b39aff40;
  border-radius: 9px;
  background: #b39aff14;
  color: #d3c4ff;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  transition: background 160ms ease, border-color 160ms ease;
}
.usage-card-cta:hover {
  border-color: #b39aff70;
  background: #b39aff24;
}
@media (prefers-reduced-motion: reduce) {
  .usage-card-fill {
    transition: none;
  }
}

/* Collapsed project rail: legacy rules reduce the card to a bare 44px ring —
   hide the new text blocks so only the ring renders (verified in harness). */
html body .chat-app.project-workspace.sidebar-collapsed .usage-card-head,
html body .chat-app.project-workspace.sidebar-collapsed .usage-card-meta,
html body .chat-app.project-workspace.sidebar-collapsed .usage-card-track,
html body .chat-app.project-workspace.sidebar-collapsed .usage-card-cta {
  display: none !important;
}
html body .chat-app.project-workspace.sidebar-collapsed .usage-card-body {
  display: flex;
  width: 100%;
  justify-content: center;
  gap: 0;
}

/* Expanded sidebar: show the full Usage card instead of the bare-ring-only
   treatment. Specificity sits between the base ring geometry (0,1,0..0,4,2)
   and the collapsed-rail rules (0,6,2), which still win when collapsed. */
html body .chat-app .sidebar-credit-card.usage-card {
  display: grid !important;
  width: auto !important;
  height: auto !important;
  min-height: 0 !important;
  grid-template-columns: minmax(0, 1fr) !important;
  place-items: stretch !important;
  gap: 12px;
  margin: 14px 0 0 !important;
  padding: 14px 13px 13px !important;
  overflow: visible;
  border: 1px solid #b39aff24 !important;
  border-radius: 14px !important;
  background:
    radial-gradient(120% 90% at 100% 0%, #b39aff12, transparent 60%),
    #ffffff05 !important;
  box-shadow: none !important;
}
html body .chat-app .sidebar-credit-card.usage-card::before {
  display: none !important;
}
html body .chat-app .sidebar-credit-card.usage-card .usage-ring {
  width: 68px !important;
  height: 68px !important;
}
html body .chat-app .sidebar-credit-card.usage-card .usage-ring-center strong {
  font-size: 16px !important;
  letter-spacing: -0.05em;
}

/* Plan settings: daily reset countdown below the Usage ring. */
.account-settings .plan-reset-note {
  display: block;
  margin-top: 10px;
  color: #9d94ad;
  font-size: 10px;
  line-height: 1.4;
  text-align: center;
}
.usage-ring[data-compact="true"] .usage-ring-center strong {
  font-size: clamp(10px, 3vw, 14px);
  letter-spacing: -0.05em;
}
.usage-ring[data-compact="true"] .usage-ring-center > span {
  font-size: 6px;
  letter-spacing: 0.07em;
}
.usage-ring-placeholder {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border: 1px solid #e5d8f81c;
  border-radius: 50%;
  color: #b5acc4;
}

.profile-credit-plan {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px !important;
  margin: 0 0 12px !important;
}
.profile-credit-copy {
  display: flex !important;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start !important;
  justify-content: center !important;
  gap: 6px !important;
}
.profile-credit-eyebrow {
  color: #b5acc4 !important;
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  font-size: 8px !important;
  font-weight: 650;
  letter-spacing: 0.13em;
}
.profile-credit-plan .profile-credit-copy strong {
  color: #f2eef8 !important;
  font-size: 13px !important;
}
.profile-credit-count {
  color: #b5acc4 !important;
  background: none !important;
  border: 0 !important;
  padding: 0 !important;
  font-size: 11px !important;
}
.sidebar-credit-card {
  padding: 10px !important;
  gap: 8px;
}
.sidebar-credit-card .profile-credit-copy {
  gap: 4px !important;
}
.sidebar-credit-card .profile-credit-copy strong {
  font-size: 11px !important;
}
.sidebar-credit-card .profile-credit-count {
  font-size: 10px !important;
}

.workspace-usage-meter {
  display: flex;
  min-height: 162px;
  align-items: center;
  gap: clamp(16px, 3vw, 28px);
}
.workspace-usage-meter > p {
  max-width: 240px;
  color: #b5acc4;
  font-size: 12px;
  line-height: 1.7;
}
.settings-usage-layout {
  display: flex;
  align-items: center;
  gap: 16px;
}
.settings-usage-layout > p {
  max-width: 230px;
}
.plan-overview .plan-balance {
  display: flex;
  min-width: 116px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid #e5d8f81a;
  border-radius: 18px;
  background: #ffffff04;
  padding: 14px;
}
.plan-overview .plan-balance > span:first-child {
  color: #b5acc4;
  font-size: 11px;
}
@media (max-width: 700px) {
  .workspace-usage-meter {
    min-height: 0;
    gap: 16px;
  }
  .workspace-usage-meter .usage-ring {
    width: 108px !important;
    height: 108px !important;
  }
  .profile-credit-plan {
    gap: 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .usage-ring-progress {
    transition: none;
  }
}

/* Keep the multiline AI composer visually integrated with its own surface. */
html:not([data-site-event="halloween"]) body .chat-composer .prompt-bar__input {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* Seasonal art keeps the same ring interaction while adopting its own accent. */
html[data-site-event="halloween"] .usage-ring[data-level="steady"] .usage-ring-gradient-start,
html[data-site-event="halloween"] .usage-ring[data-level="warning"] .usage-ring-gradient-start {
  stop-color: #b39aff;
}
html[data-site-event="halloween"] .usage-ring[data-level="steady"] .usage-ring-gradient-end {
  stop-color: #85d0cc;
}
html[data-site-event="halloween"] .usage-ring[data-level="warning"] .usage-ring-gradient-end {
  stop-color: #e0b66c;
}
html[data-site-event="halloween"] .usage-ring[data-level="urgent"] .usage-ring-gradient-start {
  stop-color: #e0b66c;
}
html[data-site-event="halloween"] .usage-ring[data-level="urgent"] .usage-ring-gradient-end {
  stop-color: #e783a8;
}
html[data-site-event="halloween"] .usage-ring::before {
  background: radial-gradient(circle, #b39aff12, transparent 75%);
}

/* The collapsed project rail centers only the compact meter. */
@media (min-width: 701px) {
  html:not([data-site-event="halloween"])
    body
    .chat-app.project-workspace.sidebar-collapsed
    .sidebar-credit-card {
    justify-content: center !important;
    padding: 7px 2px !important;
    overflow: hidden;
  }
  html:not([data-site-event="halloween"])
    body
    .chat-app.project-workspace.sidebar-collapsed
    .sidebar-credit-card
    .profile-credit-copy {
    display: none !important;
  }
  html:not([data-site-event="halloween"])
    body
    .chat-app.project-workspace.sidebar-collapsed
    .sidebar-credit-card
    .usage-ring {
    width: 48px !important;
    height: 48px !important;
  }
}

/* Usage summary — compact hierarchy, visible violet track and clean full allowance. */
.usage-ring-track {
  stroke: #b39aff30;
}
.usage-ring[data-empty="true"] .usage-ring-progress {
  visibility: hidden;
  filter: none;
}
.profile-credit-plan {
  position: relative;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 84px;
  padding: 14px 14px 14px 16px !important;
  margin: 0 0 12px !important;
  overflow: hidden;
  border: 1px solid #b39aff32 !important;
  border-radius: 16px !important;
  background:
    radial-gradient(ellipse at 100% 0, #b39aff16 0, transparent 48%),
    linear-gradient(145deg, #211a2a, #15121b) !important;
  box-shadow:
    inset 0 1px #ffffff0b,
    0 12px 28px #0003;
}
.profile-credit-plan::before {
  position: absolute;
  inset: 14px auto 14px 0;
  width: 2px;
  border-radius: 0 2px 2px 0;
  background: linear-gradient(180deg, #b39aff, #6d4bc5);
  content: "";
  pointer-events: none;
}
.sidebar-credit-card {
  grid-template-columns: minmax(0, 1fr) 72px;
  gap: 10px;
  min-height: 88px;
  padding: 12px 13px !important;
}
.sidebar-credit-card .profile-credit-copy {
  gap: 5px !important;
}
.sidebar-credit-card .profile-credit-eyebrow {
  font-size: 8px !important;
}
.sidebar-credit-card .profile-credit-copy strong {
  font-size: 12px !important;
  font-weight: 620;
}
.sidebar-credit-card .profile-credit-count {
  max-width: 126px;
  font-size: 10px !important;
  line-height: 1.45;
}
@media (min-width: 701px) {
  html:not([data-site-event="halloween"])
    body
    .chat-app.project-workspace.sidebar-collapsed
    .sidebar-credit-card {
    grid-template-columns: 1fr !important;
    justify-items: center;
  }
  html:not([data-site-event="halloween"])
    body
    .chat-app.project-workspace.sidebar-collapsed
    .sidebar-credit-card::before {
    display: none;
  }
}
@media (max-width: 700px) {
  .sidebar-credit-card {
    grid-template-columns: minmax(0, 1fr) 68px;
    gap: 8px;
  }
}

/* In /c, the collapsed rail keeps only a compact, text-free Usage ring. */
@media (min-width: 701px) {
  html:not([data-site-event="halloween"])
    body
    .chat-app.project-workspace.sidebar-collapsed
    .sidebar-credit-card,
  html[data-site-event="halloween"]
    body
    .chat-app.project-workspace.sidebar-collapsed
    .sidebar-credit-card {
    display: grid !important;
    width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    grid-template-columns: 1fr !important;
    justify-items: center;
    margin: auto auto 8px !important;
    padding: 0 !important;
    overflow: visible;
    border: 0 !important;
    border-radius: 50% !important;
    background: transparent !important;
    box-shadow: none !important;
  }
  html:not([data-site-event="halloween"])
    body
    .chat-app.project-workspace.sidebar-collapsed
    .sidebar-credit-card::before,
  html[data-site-event="halloween"]
    body
    .chat-app.project-workspace.sidebar-collapsed
    .sidebar-credit-card::before,
  html:not([data-site-event="halloween"])
    body
    .chat-app.project-workspace.sidebar-collapsed
    .sidebar-credit-card
    .profile-credit-copy,
  html[data-site-event="halloween"]
    body
    .chat-app.project-workspace.sidebar-collapsed
    .sidebar-credit-card
    .profile-credit-copy {
    display: none !important;
  }
  html:not([data-site-event="halloween"])
    body
    .chat-app.project-workspace.sidebar-collapsed
    .sidebar-credit-card
    .usage-ring,
  html[data-site-event="halloween"]
    body
    .chat-app.project-workspace.sidebar-collapsed
    .sidebar-credit-card
    .usage-ring {
    width: 44px !important;
    height: 44px !important;
  }
}

/* Base geometry for the standalone Usage ring. */
.sidebar-credit-card {
  display: grid !important;
  width: 92px;
  height: 92px;
  min-height: 92px !important;
  grid-template-columns: 1fr !important;
  place-items: center !important;
  gap: 0;
  margin: 10px auto 14px !important;
  padding: 0 !important;
  overflow: visible !important;
  border: 0 !important;
  border-radius: 50%;
  background: transparent !important;
  box-shadow: none !important;
}
.sidebar-credit-card::before {
  display: none !important;
}
.sidebar-credit-card .usage-ring {
  width: 72px !important;
  height: 72px !important;
}
.sidebar-credit-card .usage-ring[data-compact="true"] .usage-ring-center strong {
  font-size: 9px !important;
  letter-spacing: -0.06em;
}

/* Keep the ring anchored when the sidebar is collapsed. */
.sidebar-credit-card {
  width: 92px !important;
  margin-top: auto !important;
}

/* The sidebar Usage ring is reserved for the collapsed rail. */
.sidebar-credit-card {
  display: none !important;
}
@media (min-width: 701px) {
  html:not([data-site-event="halloween"])
    body
    .chat-app.project-workspace.sidebar-collapsed
    .sidebar-credit-card,
  html[data-site-event="halloween"]
    body
    .chat-app.project-workspace.sidebar-collapsed
    .sidebar-credit-card {
    display: grid !important;
  }
}

/* Keep the remaining percentage legible in the collapsed project rail. */
@media (min-width: 701px) {
  html
    body
    .chat-app.project-workspace.sidebar-collapsed
    .sidebar-credit-card
    .usage-ring-center
    strong {
    display: block !important;
    max-width: none;
    overflow: visible;
    font-size: 10px !important;
    letter-spacing: -0.07em;
  }
}
