/* ===================================================================
   AI Werewolf Benchmark Platform - Honkai: Star Rail (hsr-ui) Theme
   Default active presentation layer; original dark cyber-wolf theme
   remains preserved intact in /css/app.css (no UI toggle shown).
   =================================================================== */

@font-face {
  font-family: "HSR SDK SC";
  src: url("/fonts/zh-cn.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@property --hs-p {
  syntax: "<number>";
  inherits: false;
  initial-value: 1;
}

/* ---------- Tokens ---------- */
html.hs-theme {
  --hs-f-ui: "HSR SDK SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --hs-f-num: "HSR SDK SC", "DIN Alternate", "Bahnschrift", system-ui, sans-serif;
  --hs-f-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "HSR SDK SC", monospace;

  --hs-r-big: 34px;
  --hs-r-card: 22px;
  --hs-r-tile: 18px;

  --hs-frost: rgba(234, 232, 236, 0.88);
  --hs-frost-solid: #E2E0E3;
  --hs-card: #F7F6F4;
  --hs-card-2: #EAE9EC;
  --hs-ink: #222327;
  --hs-ink-2: #55575E;
  --hs-ink-3: #6D7079;
  --hs-rule: rgba(30, 32, 40, 0.14);

  --hs-band: #262626;
  --hs-band-2: #303030;
  --hs-on-band: #F2F2F2;

  --hs-veil: rgba(28, 32, 46, 0.68);
  --hs-veil-line: rgba(255, 255, 255, 0.22);
  --hs-on-veil: #EEF0F6;
  --hs-on-veil-2: #C2C6D4;

  --hs-acc: #F6C55A;
  --hs-acc-hi: #FCDA8E;
  --hs-acc-lo: #EDB042;
  --hs-acc-ring: #D6A13E;
  --hs-on-acc: #1E1E22;
  --hs-acc-text: #E2C48A;
  --hs-acc-ink: #7E5F2E;
  --hs-acc-bar: #B59A6E;
  --hs-key: #E8933A;
  --hs-key-ink: #994D0E;
  --hs-time: #ECB260;
  --hs-alert: #D2263B;
  --hs-ok: #15803D;
  --hs-info: #4F85D0;
  --hs-band-gold: #E6D3A9;

  --hs-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --hs-ease-wipe: cubic-bezier(0.4, 0, 0.2, 1);
  --hs-t-blur: 200ms;
  --hs-t-fade: 170ms;
  --hs-t-row: 130ms;
  --hs-t-stagger: 33ms;
  --hs-t-wipe: 300ms;
  --hs-t-unwipe: 200ms;
  --hs-t-dialog: 170ms;
  --hs-shadow: 0 12px 32px rgba(0, 0, 0, 0.34);

  /* Override base CSS semantic variables cleanly on light frosted sheets */
  --bg-main: #12141C;
  --bg-card: var(--hs-frost);
  --bg-card-hover: #FFFFFF;
  --bg-input: rgba(255, 255, 255, 0.85);
  --border-color: rgba(30, 32, 40, 0.16);
  --border-focus: #C97711;
  --text-primary: var(--hs-ink);
  --text-secondary: var(--hs-ink-2);
  --text-muted: var(--hs-ink-3);
  --primary: #262626;
  --primary-hover: #363840;
  --font-family: var(--hs-f-ui);
  --font-mono: var(--hs-f-mono);
}

/* Classic emoji & icon visibility switcher (invisible to user, no toggle UI) */
.hs-only { display: none !important; }
html.hs-theme .hs-only { display: initial !important; }
html.hs-theme .classic-only { display: none !important; }
.hs-stage { display: none; }

/* ---------- Blurred World Stage ---------- */
html.hs-theme body {
  background: #12141C;
  color: var(--hs-on-veil);
  font-family: var(--hs-f-ui);
  line-height: 1.58;
  position: relative;
}

html.hs-theme .hs-stage {
  display: block;
  position: fixed;
  inset: 0;
  z-index: -2;
  background: url(/hsr/tex/scene.jpg) center / cover no-repeat, #1A1C26;
  pointer-events: none;
  animation: hs-fade 200ms linear;
}

html.hs-theme .hs-stage::before {
  content: "";
  position: fixed;
  inset: 0;
  background: url(/hsr/tex/grain.png) 0 0 / 240px repeat;
  opacity: 0.08;
  pointer-events: none;
}

html.hs-theme .hs-stage::after {
  content: "";
  position: fixed;
  inset: 0;
  background: linear-gradient(
    rgba(8, 9, 14, 0.64),
    rgba(8, 9, 14, 0.22) 18%,
    rgba(8, 9, 14, 0.14) 70%,
    rgba(8, 9, 14, 0.56)
  );
  pointer-events: none;
}

/* Custom subtle scrollbars */
html.hs-theme ::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
html.hs-theme ::-webkit-scrollbar-track {
  background: rgba(30, 32, 40, 0.08);
}
html.hs-theme ::-webkit-scrollbar-thumb {
  background: rgba(126, 95, 46, 0.45);
  border-radius: 0;
}
html.hs-theme ::-webkit-scrollbar-thumb:hover {
  background: rgba(126, 95, 46, 0.72);
}

/* ---------- Top Bar (.hs-top style) ---------- */
html.hs-theme header {
  background: linear-gradient(180deg, rgba(10, 12, 20, 0.72) 0%, rgba(10, 12, 20, 0.34) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 14px 24px;
}

html.hs-theme .header-content {
  gap: 18px;
}

html.hs-theme .brand {
  gap: 12px;
  min-width: 0;
}

html.hs-theme .brand-icon {
  width: 42px;
  height: 42px;
  background: none;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(234, 214, 166, 0.35);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

html.hs-theme .hs-brand-svg {
  display: block !important;
  width: 26px;
  height: 26px;
  color: #EAD6A6;
}

html.hs-theme .brand > div:not(.brand-icon) {
  display: flex;
  flex-direction: column-reverse;
  min-width: 0;
}

html.hs-theme .brand-title {
  font-size: 19px;
  font-weight: 500;
  letter-spacing: 0.02em;
  background: none;
  -webkit-background-clip: border-box;
  -webkit-text-fill-color: #FFFFFF;
  color: #FFFFFF;
  line-height: 1.25;
}

html.hs-theme .brand-subtitle {
  font-size: 12px;
  color: #E6D3A8;
  font-weight: 400;
  line-height: 1.25;
}

/* Navigation Tabs: HSR circular icon discs + readable labels + orbit ring + bottom white bar */
html.hs-theme .nav-tabs {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 2px 0;
  gap: 14px;
  align-items: center;
}

html.hs-theme .nav-tab-btn {
  position: relative;
  padding: 6px 10px 8px;
  border-radius: 999px;
  background: transparent;
  color: rgba(240, 242, 248, 0.84);
  font-size: 14px;
  font-weight: 500;
  gap: 8px;
  transition: color 130ms linear, background-color 130ms linear;
}

html.hs-theme .hs-tab-disc {
  position: relative;
  display: inline-grid !important;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: transparent;
  color: rgba(240, 242, 248, 0.86);
  flex-shrink: 0;
  transition: background-color 130ms linear, color 130ms linear, box-shadow 130ms linear;
}

html.hs-theme .hs-tab-svg {
  width: 20px;
  height: 20px;
}

html.hs-theme .nav-tab-btn:hover:not(.active) {
  background: transparent;
  color: #FFFFFF;
}

html.hs-theme .nav-tab-btn:hover:not(.active) .hs-tab-disc {
  background: rgba(255, 255, 255, 0.24);
  color: #FFFFFF;
}

html.hs-theme .nav-tab-btn:active:not(.active) .hs-tab-disc {
  background: rgba(16, 18, 28, 0.72);
  box-shadow: inset 0 0 0 1.5px var(--hs-acc-ring);
}

html.hs-theme .nav-tab-btn.active {
  background: transparent;
  box-shadow: none;
  color: #FFFFFF;
}

html.hs-theme .nav-tab-btn.active .hs-tab-disc {
  background: #F4F4F4;
  color: #1E1F24;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.38);
  transition: none;
}

html.hs-theme .nav-tab-btn.active.is-switching .hs-tab-disc {
  background-color: transparent;
  background-image: linear-gradient(45deg, #F4F4F4 0 34%, var(--hs-acc) 34% 64%, transparent 64%);
  background-size: 300% 300%;
  background-repeat: no-repeat;
  animation: hs-tab-sweep 270ms var(--hs-ease) both;
}

html.hs-theme .nav-tab-btn.active .hs-tab-disc::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  pointer-events: none;
  background:
    radial-gradient(circle, #FFFFFF 1.8px, transparent 2.4px) 0 50% / 6px 6px no-repeat,
    radial-gradient(circle, #FFFFFF 1.8px, transparent 2.4px) 100% 50% / 6px 6px no-repeat,
    url(/hsr/orn/ring-white.svg) center / contain no-repeat;
  transform: rotate(10deg);
  animation: hs-orbit 15.6s linear infinite;
}

html.hs-theme .nav-tab-btn.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  width: 100%;
  height: 3.5px;
  background: #FFFFFF;
  transform-origin: center center;
}

html.hs-theme .nav-tab-btn.active.is-switching::after {
  animation: hs-tab-bar 360ms 60ms var(--hs-ease) both;
}

html.hs-theme .nav-tab-btn .badge.badge-primary {
  background: var(--hs-acc);
  color: var(--hs-on-acc);
  border: 0;
  border-radius: 999px;
  font-family: var(--hs-f-num);
  font-weight: 600;
  padding: 1px 7px !important;
}

/* Header Reload Action Pill (.hs-coin style) */
html.hs-theme .header-reload-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  min-height: 36px;
  padding: 0 14px 0 4px !important;
  border-radius: 999px;
  background: rgba(16, 18, 24, 0.58) !important;
  color: #FFFFFF !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  box-shadow: none !important;
  font-size: 13px;
  font-weight: 500;
}

html.hs-theme .header-reload-btn::before {
  display: none !important;
}

html.hs-theme .header-reload-btn:hover {
  background: rgba(255, 255, 255, 0.2) !important;
  transform: none !important;
}

html.hs-theme .hs-reload-ico {
  display: inline-grid !important;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #3A4A6A, #1A2032);
  box-shadow: 0 0 0 1.5px rgba(234, 214, 166, 0.45);
  color: #EAD6A6;
}

/* ---------- World Headings & Top Section Controls ---------- */
html.hs-theme .question-section-label {
  color: #EEF0F6 !important;
  font-weight: 500 !important;
  font-size: 15px !important;
  display: flex;
  align-items: center;
  gap: 10px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
}

html.hs-theme .desktop-subtitle {
  color: rgba(238, 240, 246, 0.78) !important;
}

html.hs-theme .question-toggle-btn {
  background: rgba(16, 18, 24, 0.65) !important;
  color: #F2F2F2 !important;
  border: 1px solid rgba(255, 255, 255, 0.28) !important;
  border-radius: 999px !important;
  padding: 4px 12px !important;
  min-height: 28px !important;
  box-shadow: none !important;
}

html.hs-theme .question-toggle-btn::before {
  display: none !important;
}

html.hs-theme .question-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.18) !important;
}

html.hs-theme .mobile-question-dropdown .form-select {
  background: rgba(20, 24, 36, 0.78) !important;
  color: #E6D3A8 !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  border-radius: 0 var(--hs-r-tile) 0 0 !important;
}

/* ---------- Question Cards on the World (.hs-veil -> flipped pale .hs-card) ---------- */
html.hs-theme .question-card {
  position: relative;
  isolation: isolate;
  border-radius: 0 var(--hs-r-tile) 0 0;
  border: 0;
  border-left: 5px solid #6B7084;
  background: rgba(24, 28, 42, 0.68);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
  color: var(--hs-on-veil);
  --hs-sr: 16px;
  --sel: #EFEFEF;
  --wipe-band: #8E8F96;
  --wipe-out-a: 0.42;
  transition: background-color 100ms linear, box-shadow 100ms linear, color 100ms linear;
}

html.hs-theme .question-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--sel);
  clip-path: inset(0 100% 0 0);
  border-radius: inherit;
  pointer-events: none;
}

html.hs-theme .question-card:not(.active):hover {
  background: rgba(52, 58, 80, 0.78);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.58);
}

html.hs-theme .question-card:not(.active):active {
  background: rgba(12, 14, 24, 0.86);
  box-shadow: inset 0 0 0 1.5px rgba(170, 172, 180, 0.7);
}

html.hs-theme .question-card.active {
  border-color: transparent !important;
  border-left: 5px solid var(--hs-acc-bar) !important;
  background: transparent !important;
  box-shadow: 0 0 0 2.5px rgba(255, 255, 255, 0.92), 0 6px 18px rgba(0, 0, 0, 0.3) !important;
  color: var(--hs-ink);
}

html.hs-theme .question-card.active::before {
  clip-path: inset(0 0 0 0);
}

html.hs-theme .question-card.active:not(.is-wiping) {
  background-color: var(--sel) !important;
}

html.hs-theme .question-card.active.is-wiping::before {
  --hs-xl: calc(var(--hs-p) * 100% + (var(--hs-p) - 1) * var(--hs-sr));
  --hs-xr: calc(var(--hs-p) * 100% + var(--hs-p) * var(--hs-sr));
  --hs-xh: calc(38% + 0.5px);
  background:
    radial-gradient(ellipse 100% 100% at 0 0, transparent 98.5%, var(--wipe-band) 100%) var(--hs-xl) 19.355% / var(--hs-sr) var(--hs-xh) no-repeat,
    radial-gradient(ellipse 100% 100% at 0 100%, transparent 98.5%, var(--wipe-band) 100%) var(--hs-xl) 80.645% / var(--hs-sr) var(--hs-xh) no-repeat,
    radial-gradient(ellipse 100% 100% at 100% 0, transparent 98.5%, var(--sel) 100%) var(--hs-xr) 19.355% / var(--hs-sr) var(--hs-xh) no-repeat,
    radial-gradient(ellipse 100% 100% at 100% 100%, transparent 98.5%, var(--sel) 100%) var(--hs-xr) 80.645% / var(--hs-sr) var(--hs-xh) no-repeat,
    linear-gradient(90deg, var(--sel) calc(var(--hs-p) * 100%), var(--wipe-band) calc(var(--hs-p) * 100%));
  clip-path: polygon(-10% 0, calc(var(--hs-p) * 100% + 26%) 0, calc(var(--hs-p) * 100% + 32%) 50%, calc(var(--hs-p) * 100% + 26%) 100%, -10% 100%);
  animation: hs-wipe var(--hs-t-wipe) var(--hs-ease-wipe) both;
}

html.hs-theme .question-card.is-unwiping {
  transition: color 140ms linear, border-color 140ms linear, box-shadow 140ms linear;
}

html.hs-theme .question-card.is-unwiping .question-card-title,
html.hs-theme .question-card.is-unwiping .question-card-desc {
  transition: color 140ms linear;
}

html.hs-theme .question-card.is-unwiping::before {
  --hs-sw: calc(var(--hs-sr) * 2);
  --hs-xc: calc(var(--hs-p) * 100% + (var(--hs-p) - 0.5) * var(--hs-sw));
  background: var(--sel);
  clip-path: none;
  -webkit-mask-image: linear-gradient(90deg, #000 calc(var(--hs-p) * 100%), transparent calc(var(--hs-p) * 100%)), url(/hsr/orn/wipe-star.svg);
  -webkit-mask-position: 0 0, var(--hs-xc) 50%;
  -webkit-mask-size: 100% 100%, var(--hs-sw) 76%;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-composite: xor;
  mask-image: linear-gradient(90deg, #000 calc(var(--hs-p) * 100%), transparent calc(var(--hs-p) * 100%)), url(/hsr/orn/wipe-star.svg);
  mask-position: 0 0, var(--hs-xc) 50%;
  mask-size: 100% 100%, var(--hs-sw) 76%;
  mask-repeat: no-repeat;
  mask-composite: exclude;
  animation: hs-unwipe var(--hs-t-unwipe) var(--hs-ease-wipe) both;
}

html.hs-theme .question-card-title {
  color: #EEF0F6;
  font-weight: 500;
}

html.hs-theme .question-card-desc {
  color: var(--hs-on-veil-2);
}

html.hs-theme .question-card.active .question-card-title {
  color: var(--hs-ink);
  font-weight: 600;
}

html.hs-theme .question-card.active .question-card-desc {
  color: var(--hs-ink-2);
}

/* Tag contrast inside unselected dark veil question cards vs active pale card */
html.hs-theme .question-card:not(.active) .badge-purple {
  background: rgba(168, 123, 224, 0.22);
  color: #E2D1FA;
  border-color: rgba(168, 123, 224, 0.45);
}
html.hs-theme .question-card:not(.active) .badge-danger {
  background: rgba(210, 38, 59, 0.24);
  color: #FCA5A5;
  border-color: rgba(248, 113, 113, 0.45);
}
html.hs-theme .question-card:not(.active) .badge-success {
  background: rgba(60, 194, 30, 0.18);
  color: #86EFAC;
  border-color: rgba(134, 239, 172, 0.42);
}
html.hs-theme .question-card:not(.active) .badge-warning {
  background: rgba(246, 197, 90, 0.2);
  color: #FCD37D;
  border-color: rgba(246, 197, 90, 0.48);
}
html.hs-theme .question-card:not(.active) .badge-cyan {
  background: rgba(79, 133, 208, 0.24);
  color: #BAE6FD;
  border-color: rgba(125, 211, 252, 0.45);
}
html.hs-theme .question-card:not(.active) .badge-gray {
  background: rgba(255, 255, 255, 0.12);
  color: #E2E6F0;
  border-color: rgba(255, 255, 255, 0.24);
}

/* ---------- Pale Frosted Main Panels (.hs-frost + .hs-frame single top-right corner) ---------- */
html.hs-theme .card,
html.hs-theme .legal-card {
  position: relative;
  isolation: isolate;
  background: var(--hs-frost);
  -webkit-backdrop-filter: blur(22px) saturate(1.1);
  backdrop-filter: blur(22px) saturate(1.1);
  border: 0;
  border-radius: 0 var(--hs-r-big) 0 0;
  box-shadow: var(--hs-shadow);
  color: var(--hs-ink);
  --ink: var(--hs-ink);
  --ink-2: var(--hs-ink-2);
  --ink-3: var(--hs-ink-3);
}

html.hs-theme .card::before,
html.hs-theme .legal-card::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 8px 8px -8px -8px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: inherit;
  pointer-events: none;
}

html.hs-theme .card:hover {
  border-color: transparent;
}

html.hs-theme .card-header {
  border-bottom: 1px solid var(--hs-rule);
  padding-bottom: 14px;
}

html.hs-theme .card-title,
html.hs-theme .section-heading-text {
  color: var(--hs-ink) !important;
  font-weight: 500 !important;
}

html.hs-theme .sub-card-sub {
  color: var(--hs-ink-2) !important;
}

/* Nested cards inside comparison/overview */
html.hs-theme .comparison-sub-card,
html.hs-theme .card .card {
  position: relative;
  background: var(--hs-card);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 0;
  border-left: 4px solid #9C9EA4;
  border-radius: 0 var(--hs-r-card) 0 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

html.hs-theme .comparison-sub-card::before,
html.hs-theme .card .card::before {
  display: none;
}

html.hs-theme .comparison-sub-card:hover {
  background: #FFFFFF;
  border-left-color: var(--hs-acc-bar);
}

html.hs-theme .comparison-decision-box {
  background: #EFEFEF !important;
  border: 1px solid rgba(30, 32, 40, 0.12) !important;
  border-radius: 0 12px 0 0 !important;
}

html.hs-theme .comparison-answer-text {
  color: var(--hs-ink-2) !important;
}

html.hs-theme .mode-toggle-title,
html.hs-theme .overview-q-title,
html.hs-theme .python-code-title,
html.hs-theme .comparison-model-title,
html.hs-theme .agent-sim-title {
  color: var(--hs-ink) !important;
  font-weight: 600 !important;
}

html.hs-theme .comparison-sub-header {
  border-bottom: 1px solid var(--hs-rule) !important;
}

html.hs-theme .muted-caption {
  color: var(--hs-ink-2) !important;
}

html.hs-theme .pagination-page-num {
  color: var(--hs-acc-ink) !important;
  font-family: var(--hs-f-num);
}

html.hs-theme .edit-info-banner {
  background: var(--hs-card) !important;
  border-left: 4px solid var(--hs-info) !important;
  border-radius: 0 12px 0 0 !important;
  color: var(--hs-ink-2) !important;
}

html.hs-theme .edit-auth-banner {
  background: var(--hs-card) !important;
  border: 1px solid rgba(21, 128, 61, 0.3) !important;
  border-left: 4px solid #3CC21E !important;
  border-radius: 0 10px 0 0 !important;
  color: #15803D !important;
}

html.hs-theme .edit-ip-row {
  color: var(--hs-ink-2) !important;
}

html.hs-theme .edit-ip-val {
  color: var(--hs-acc-ink) !important;
}

html.hs-theme .view-ip-badge {
  background: rgba(79, 133, 208, 0.16) !important;
  border: 1px solid rgba(79, 133, 208, 0.42) !important;
  color: #1D4ED8 !important;
}

html.hs-theme .modal-details-divider {
  border-top: 1px solid var(--hs-rule) !important;
}

/* ---------- Semantic Sub-panels inside Frosted Cards ---------- */
html.hs-theme .dilemma-banner {
  background: var(--hs-card) !important;
  border: 0 !important;
  border-left: 5px solid var(--hs-alert) !important;
  border-radius: 0 var(--hs-r-tile) 0 0 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

html.hs-theme .dilemma-banner-tag {
  color: #B91C1C !important;
}

html.hs-theme .dilemma-banner-prompt {
  color: var(--hs-ink) !important;
  font-weight: 500 !important;
}

html.hs-theme .dilemma-banner-inst {
  color: var(--hs-ink-2) !important;
}

html.hs-theme .scenario-box {
  background: var(--hs-card) !important;
  border: 0 !important;
  border-left: 4px solid #8E9097 !important;
  border-radius: 0 12px 0 0 !important;
  color: var(--hs-ink-2) !important;
}

html.hs-theme .actions-targets-box {
  background: var(--hs-card) !important;
  border: 0 !important;
  border-left: 4px solid var(--hs-acc-bar) !important;
  border-radius: 0 12px 0 0 !important;
}

html.hs-theme .legal-label-actions {
  color: #1D4ED8 !important;
}

html.hs-theme .legal-label-targets {
  color: #6D28D9 !important;
}

html.hs-theme .transcript-details {
  background: var(--hs-band) !important;
  border: 0 !important;
  border-left: 4px solid var(--hs-acc-bar) !important;
  border-radius: 0 14px 0 0 !important;
  color: var(--hs-on-band);
}

html.hs-theme .transcript-summary {
  color: var(--hs-acc-text) !important;
}

html.hs-theme .transcript-pre {
  color: #E2E6F0 !important;
}

html.hs-theme .agent-notice-box {
  background: var(--hs-card) !important;
  border: 0 !important;
  border-left: 4px solid var(--hs-info) !important;
  border-radius: 0 14px 0 0 !important;
}

html.hs-theme .agent-notice-title {
  color: var(--hs-acc-ink) !important;
}

html.hs-theme .agent-notice-desc {
  color: var(--hs-ink-2) !important;
}

html.hs-theme .agent-notice-desc code {
  background: rgba(30, 32, 40, 0.08);
  color: var(--hs-key-ink);
  padding: 1px 5px;
  font-family: var(--hs-f-mono);
}

html.hs-theme .auth-status-box {
  background: var(--hs-card) !important;
  border: 1px solid rgba(30, 32, 40, 0.14) !important;
  border-left: 5px solid var(--hs-alert) !important;
  border-radius: 0 14px 0 0 !important;
}

html.hs-theme .auth-status-box.is-verified {
  border-left-color: #3CC21E !important;
}

html.hs-theme .auth-status-title {
  color: #B91C1C !important;
}

html.hs-theme .auth-status-box.is-verified .auth-status-title {
  color: #15803D !important;
}

html.hs-theme .auth-status-hint {
  color: var(--hs-ink-2) !important;
}

html.hs-theme .chat-guide-banner {
  background: #F7F6F4 !important;
  border: 0 !important;
  border-left: 4px solid var(--hs-acc-bar) !important;
  border-radius: 0 12px 0 0 !important;
  color: var(--hs-ink-2) !important;
}

html.hs-theme .chat-guide-banner strong {
  color: var(--hs-ink);
}

html.hs-theme .agent-guide-banner {
  background: #F7F6F4 !important;
  border: 0 !important;
  border-left: 4px solid var(--hs-info) !important;
  border-radius: 0 12px 0 0 !important;
  color: var(--hs-ink-2) !important;
}

html.hs-theme .agent-endpoints-box,
html.hs-theme .agent-sim-box,
html.hs-theme .api-endpoint-card {
  background: var(--hs-card) !important;
  border: 1px solid rgba(30, 32, 40, 0.14) !important;
  border-left: 4px solid var(--hs-acc-bar) !important;
  border-radius: 0 16px 0 0 !important;
  color: var(--hs-ink);
}

html.hs-theme .agent-endpoint-get {
  color: #15803D !important;
}

html.hs-theme .agent-endpoint-post {
  color: #7E5F2E !important;
}

/* Dark contrast band code blocks on pale frosted sheets */
html.hs-theme pre.code-block,
html.hs-theme .view-answer-pre {
  background: #22242C !important;
  color: #EEF0F6 !important;
  border: 0 !important;
  border-left: 4px solid var(--hs-acc-bar) !important;
  border-radius: 0 14px 0 0 !important;
}

/* ---------- Buttons (HSR flat pill + inset hairline & dot; gold = main CTA) ---------- */
html.hs-theme .btn:not(.mode-seg-btn) {
  --hs-btn-bg: #E5E5E5;
  --hs-btn-fg: #202125;
  --hs-btn-ring: rgba(0, 0, 0, 0.22);
  --hs-btn-dot: rgba(0, 0, 0, 0.36);
  position: relative;
  border: 0;
  border-radius: 999px;
  font-family: var(--hs-f-ui);
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--hs-btn-fg) !important;
  background: var(--hs-btn-bg) !important;
  box-shadow: none !important;
  transition: background-color 66ms linear, color 66ms linear, border-color 66ms linear;
}

html.hs-theme .btn:not(.btn-sm):not(.mode-seg-btn),
html.hs-theme .is-agent-submit,
html.hs-theme .hs-gold-cta {
  background:
    radial-gradient(circle at calc(23% + 2.16px) 4.5px, var(--hs-btn-dot, var(--hs-btn-ring)) 1.8px, transparent 2.3px),
    var(--hs-btn-bg) !important;
}

html.hs-theme .btn:not(.btn-sm):not(.mode-seg-btn)::before,
html.hs-theme .is-agent-submit::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 999px;
  border: 1px solid var(--hs-btn-ring);
  pointer-events: none;
  -webkit-mask: radial-gradient(circle at 23% 0.5px, transparent 5px, #000 5.5px);
  mask: radial-gradient(circle at 23% 0.5px, transparent 5px, #000 5.5px);
}

html.hs-theme .hs-btn-ico {
  display: inline-block !important;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: var(--hs-btn-fg);
}

html.hs-theme .hs-btn-primary-full {
  padding-left: 44px !important;
  padding-right: 44px !important;
}

html.hs-theme .hs-btn-with-ico {
  min-width: 140px;
  padding: 8px 30px 8px 42px !important;
}

html.hs-theme :is(.hs-btn-primary-full, .hs-btn-with-ico) .hs-btn-ico {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  width: 23px;
  height: 23px;
}

html.hs-theme .btn-primary:not(.btn-sm):not(.mode-seg-btn),
html.hs-theme .is-agent-submit,
html.hs-theme .hs-gold-cta {
  --hs-btn-bg: var(--hs-acc);
  --hs-btn-fg: var(--hs-on-acc);
  --hs-btn-ring: rgba(30, 24, 10, 0.28);
  --hs-btn-dot: rgba(30, 24, 10, 0.48);
  font-weight: 600;
  min-height: 46px;
}

html.hs-theme .btn-primary:not(.btn-sm):not(.mode-seg-btn):hover:not(:disabled),
html.hs-theme .is-agent-submit:hover:not(:disabled),
html.hs-theme .hs-gold-cta:hover:not(:disabled) {
  --hs-btn-bg: var(--hs-acc-hi);
  transform: none;
}

html.hs-theme .btn-primary:not(.btn-sm):not(.mode-seg-btn):active:not(:disabled),
html.hs-theme .is-agent-submit:active:not(:disabled),
html.hs-theme .hs-gold-cta:active:not(:disabled) {
  --hs-btn-bg: var(--hs-acc-lo);
}

/* Tool & Secondary buttons (plus table .btn-sm buttons) use dark capsules so 1 gold CTA stands out */
html.hs-theme .btn-secondary:not(.mode-seg-btn),
html.hs-theme .btn-primary.btn-sm:not(.is-agent-submit):not(.hs-gold-cta):not(.mode-seg-btn),
html.hs-theme .copy-prompt-btn {
  --hs-btn-bg: rgba(34, 36, 44, 0.9);
  --hs-btn-fg: #F2F2F2;
  --hs-btn-ring: rgba(255, 255, 255, 0.24);
  --hs-btn-dot: rgba(255, 255, 255, 0.46);
}

html.hs-theme .btn-secondary:not(.mode-seg-btn):hover:not(:disabled),
html.hs-theme .btn-primary.btn-sm:not(.is-agent-submit):not(.hs-gold-cta):not(.mode-seg-btn):hover:not(:disabled),
html.hs-theme .copy-prompt-btn:hover:not(:disabled) {
  --hs-btn-bg: #3A3D49;
}

html.hs-theme .btn-secondary:not(.mode-seg-btn):active:not(:disabled),
html.hs-theme .btn-primary.btn-sm:not(.is-agent-submit):not(.hs-gold-cta):not(.mode-seg-btn):active:not(:disabled),
html.hs-theme .copy-prompt-btn:active:not(:disabled) {
  --hs-btn-bg: #14161D;
}

html.hs-theme .copy-prompt-btn {
  min-height: 34px;
}

html.hs-theme .copy-prompt-btn.is-locked {
  --hs-btn-bg: rgba(120, 122, 130, 0.25);
  --hs-btn-fg: var(--hs-ink-3);
  border: 1px solid rgba(30, 32, 40, 0.22) !important;
  cursor: not-allowed;
}

html.hs-theme .btn-sm:not(.mode-seg-btn):not(.is-agent-submit) {
  padding: 5px 14px;
  min-height: 30px;
}

html.hs-theme .btn-danger:not(.mode-seg-btn) {
  --hs-btn-bg: rgba(210, 38, 59, 0.14);
  --hs-btn-fg: #B91C1C;
  border: 1px solid rgba(210, 38, 59, 0.42) !important;
}

html.hs-theme .btn-danger:not(.mode-seg-btn):hover:not(:disabled) {
  --hs-btn-bg: #D2263B;
  --hs-btn-fg: #FFFFFF;
}

/* Buttons inside dark band / modal band are light flat #E5E5E5 pills */
html.hs-theme .hs-modal-band .btn-secondary {
  --hs-btn-bg: #E5E5E5;
  --hs-btn-fg: #202125;
  --hs-btn-ring: rgba(0, 0, 0, 0.18);
  --hs-btn-dot: rgba(0, 0, 0, 0.34);
}

html.hs-theme .hs-modal-band .btn-secondary:hover:not(:disabled) {
  --hs-btn-bg: #FFFFFF;
}

html.hs-theme .hs-modal-band .btn-secondary:active:not(:disabled) {
  --hs-btn-bg: #CFCFCF;
}

/* ---------- Segmented Mode Toggle (.hs-seg: dark track, bright white selected pill) ---------- */
html.hs-theme .mode-toggle-bar {
  border-bottom: 1px solid var(--hs-rule) !important;
}

html.hs-theme .mode-toggle-btns {
  display: inline-flex !important;
  flex-wrap: wrap !important;
  gap: 2px !important;
  padding: 3px !important;
  border-radius: 999px !important;
  background: #24262E !important;
  border: 0 !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16) !important;
  max-width: 100% !important;
}

html.hs-theme .mode-toggle-btns .btn.mode-seg-btn {
  min-height: 34px !important;
  padding: 4px 12px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: transparent !important;
  color: #DFE3EE !important;
  box-shadow: none !important;
  font-size: 12.5px !important;
  font-weight: 500 !important;
  transition: background-color 110ms linear, color 110ms linear;
}

html.hs-theme .mode-toggle-btns .btn.mode-seg-btn::before {
  display: none !important;
}

html.hs-theme .mode-toggle-btns .btn.mode-seg-btn + .btn.mode-seg-btn.btn-secondary {
  box-shadow: -1px 0 0 rgba(255, 255, 255, 0.16) !important;
}

html.hs-theme .mode-toggle-btns .btn.mode-seg-btn.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14) !important;
  color: #FFFFFF !important;
}

html.hs-theme .mode-toggle-btns .btn.mode-seg-btn.btn-primary {
  background: #F4F4F6 !important;
  color: #1E1F24 !important;
  font-weight: 600 !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3) !important;
}

html.hs-theme .btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ---------- Forms, Inputs, Checkboxes (.hs-check style) & Quick Pills ---------- */
html.hs-theme .form-label {
  color: var(--hs-ink);
  font-weight: 500;
}

html.hs-theme .form-input,
html.hs-theme .form-select,
html.hs-theme .form-textarea {
  background: rgba(255, 255, 255, 0.88);
  color: var(--hs-ink);
  border: 1px solid rgba(30, 32, 40, 0.2);
  border-radius: 2px;
}

html.hs-theme .form-select option {
  background: #FFFFFF;
  color: #222327;
}

html.hs-theme .mobile-question-dropdown .form-select option {
  background: #1C202E;
  color: #EEF0F6;
}

html.hs-theme .form-input::placeholder,
html.hs-theme .form-textarea::placeholder {
  color: #7D808A;
}

html.hs-theme .form-input:focus,
html.hs-theme .form-select:focus,
html.hs-theme .form-textarea:focus {
  background: #FFFFFF;
  border-color: #C97711;
  box-shadow: 0 0 0 2px rgba(201, 119, 17, 0.28);
}

/* HSR Check Row (.hs-check) */
html.hs-theme .subagent-checkbox-card {
  background: #EFEFEF;
  border: 0;
  border-radius: 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.14);
  transition: box-shadow 80ms linear;
}

html.hs-theme .subagent-checkbox-card:hover {
  box-shadow: inset 0 0 0 1.5px #292929, 0 1px 2px rgba(0, 0, 0, 0.14);
}

html.hs-theme .subagent-checkbox-card.checked {
  background: #EFEFEF;
  box-shadow: inset 0 0 0 1.5px #292929, 0 1px 2px rgba(0, 0, 0, 0.14);
}

html.hs-theme .subagent-checkbox-input {
  accent-color: #F29E39;
}

/* Quick Select Pills */
html.hs-theme .quick-pill {
  background: #F4F3F5;
  color: var(--hs-ink);
  border: 1px solid rgba(30, 32, 40, 0.18);
  border-radius: 999px;
  font-weight: 500;
}

html.hs-theme .quick-pill:hover {
  background: #FFFFFF;
  border-color: #292929;
  color: var(--hs-ink);
}

html.hs-theme .quick-pill.is-selected {
  background: #222222 !important;
  color: #E3C891 !important;
  border-color: #222222 !important;
}

html.hs-theme .quick-pill.is-human:not(.is-selected) {
  border-color: rgba(21, 128, 61, 0.55);
  color: #15803D;
  font-weight: 600;
}

html.hs-theme .quick-pill.is-human.is-selected {
  background: #15803D !important;
  color: #FFFFFF !important;
  border-color: #15803D !important;
}

/* ---------- Badges on Light Frosted Sheets & Tables (AA+ contrast) ---------- */
html.hs-theme :is(.card, .modal-content, .legal-card, .question-card.active) .badge-primary {
  background: rgba(79, 133, 208, 0.16);
  color: #1D4ED8;
  border-color: rgba(79, 133, 208, 0.42);
}
html.hs-theme :is(.card, .modal-content, .legal-card, .question-card.active) .badge-success {
  background: rgba(21, 128, 61, 0.14);
  color: #15803D;
  border-color: rgba(21, 128, 61, 0.36);
}
html.hs-theme :is(.card, .modal-content, .legal-card, .question-card.active) .badge-warning {
  background: rgba(246, 197, 90, 0.28);
  color: #7E5F2E;
  border-color: rgba(181, 154, 110, 0.58);
}
html.hs-theme :is(.card, .modal-content, .legal-card, .question-card.active) .badge-danger {
  background: rgba(210, 38, 59, 0.14);
  color: #B91C1C;
  border-color: rgba(210, 38, 59, 0.38);
}
html.hs-theme :is(.card, .modal-content, .legal-card, .question-card.active) .badge-purple {
  background: rgba(133, 79, 185, 0.14);
  color: #6D28D9;
  border-color: rgba(133, 79, 185, 0.38);
}
html.hs-theme :is(.card, .modal-content, .legal-card, .question-card.active) .badge-cyan {
  background: rgba(6, 182, 212, 0.15);
  color: #0E7490;
  border-color: rgba(14, 116, 144, 0.38);
}
html.hs-theme :is(.card, .modal-content, .legal-card, .question-card.active) .badge-orange {
  background: rgba(232, 147, 58, 0.18);
  color: #994D0E;
  border-color: rgba(153, 77, 14, 0.4);
}
html.hs-theme :is(.card, .modal-content, .legal-card, .question-card.active) .badge-pink {
  background: rgba(236, 72, 153, 0.14);
  color: #BE185D;
  border-color: rgba(190, 24, 93, 0.36);
}
html.hs-theme :is(.card, .modal-content, .legal-card, .question-card.active) .badge-indigo {
  background: rgba(99, 102, 241, 0.14);
  color: #4338CA;
  border-color: rgba(67, 56, 202, 0.36);
}
html.hs-theme :is(.card, .modal-content, .legal-card, .question-card.active) .badge-gray {
  background: rgba(30, 32, 40, 0.08);
  color: #3E4048;
  border-color: rgba(30, 32, 40, 0.2);
}

/* ---------- Answer Distribution ---------- */
html.hs-theme .dist-item {
  background: var(--hs-card);
  border: 0;
  border-left: 5px solid #8E9097;
  border-radius: 0 16px 0 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

html.hs-theme .dist-item:hover {
  background: #FFFFFF;
  border-left-color: var(--hs-acc-bar);
}

html.hs-theme .dist-count strong {
  color: var(--hs-ink) !important;
  font-family: var(--hs-f-num);
}

html.hs-theme .dist-count span,
html.hs-theme .dist-pct-text {
  color: var(--hs-acc-ink) !important;
  font-family: var(--hs-f-num);
  font-weight: 600;
}

html.hs-theme .dist-progress-bg {
  background: rgba(30, 32, 40, 0.12);
}

/* ---------- Tables & Filter Bar & Pagination ---------- */
html.hs-theme .filter-bar {
  background: rgba(255, 255, 255, 0.52) !important;
  border: 1px solid rgba(30, 32, 40, 0.14) !important;
  border-radius: 0 14px 0 0 !important;
}

html.hs-theme .table-wrapper {
  border: 1px solid rgba(30, 32, 40, 0.16);
  border-radius: 0 16px 0 0;
  background: var(--hs-card);
}

html.hs-theme th {
  background: var(--hs-band);
  color: var(--hs-acc-text);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  font-weight: 500;
}

html.hs-theme th.sortable:hover {
  background: var(--hs-band-2);
  color: #FFFFFF;
}

html.hs-theme td {
  border-bottom: 1px solid rgba(30, 32, 40, 0.1);
  color: var(--hs-ink);
}

html.hs-theme tr:hover td {
  background: #FFFFFF;
}

html.hs-theme .table-question-title,
html.hs-theme .submission-model-name,
html.hs-theme .matrix-model-cell {
  color: var(--hs-ink) !important;
}

html.hs-theme .submission-human-name {
  color: #15803D !important;
}

html.hs-theme .table-scroll-hint {
  color: var(--hs-acc-ink) !important;
  font-weight: 500;
}

html.hs-theme .pagination-bar {
  background: var(--hs-card);
  border: 1px solid rgba(30, 32, 40, 0.16);
  border-radius: 0 14px 0 0;
  color: var(--hs-ink-2);
}

html.hs-theme .pagination-bar strong {
  color: var(--hs-ink) !important;
}

html.hs-theme .pagination-btn {
  background: #E5E5E5;
  color: var(--hs-ink);
  border: 1px solid rgba(30, 32, 40, 0.16);
  border-radius: 999px;
}

html.hs-theme .pagination-btn:hover:not(:disabled) {
  background: #FFFFFF;
  border-color: #292929;
  color: var(--hs-ink);
}

html.hs-theme .pagination-btn.active {
  background: #222222;
  border-color: #222222;
  color: #E3C891;
}

/* ---------- Modals (.hs-scrim + .hs-dialog + .hs-dialog__band) ---------- */
html.hs-theme .modal-overlay {
  background: rgba(6, 8, 14, 0.48);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: hs-fade var(--hs-t-dialog) linear;
}

html.hs-theme .modal-content {
  position: relative;
  --modal-pad-x: 28px;
  background: rgba(236, 234, 237, 0.96);
  border: 0 !important;
  border-radius: 0 var(--hs-r-big) 0 0;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.42), 0 20px 50px rgba(0, 0, 0, 0.48) !important;
  color: var(--hs-ink);
  animation: hs-pop 170ms var(--hs-ease);
}

html.hs-theme .modal-title-heading {
  color: var(--hs-ink) !important;
  font-weight: 500 !important;
}

html.hs-theme .modal-success-title {
  color: #15803D !important;
}

html.hs-theme .modal-password-banner {
  background: var(--hs-card) !important;
  border: 1px solid rgba(21, 128, 61, 0.3) !important;
  border-left: 5px solid #3CC21E !important;
  border-radius: 0 14px 0 0 !important;
}

html.hs-theme .modal-password-banner-title {
  color: #15803D !important;
}

html.hs-theme .modal-password-code-row {
  background: var(--hs-band) !important;
  border: 1px dashed rgba(246, 197, 90, 0.65) !important;
  border-radius: 0 10px 0 0 !important;
}

html.hs-theme .modal-password-value {
  color: var(--hs-acc) !important;
}

html.hs-theme .modal-password-hint {
  color: var(--hs-ink-2) !important;
}

html.hs-theme .modal-details-card {
  background: var(--hs-card) !important;
  border: 1px solid rgba(30, 32, 40, 0.14) !important;
  border-radius: 0 14px 0 0 !important;
}

html.hs-theme .modal-detail-val {
  color: var(--hs-ink) !important;
}

html.hs-theme .hs-modal-band {
  display: flex;
  justify-content: flex-end;
  gap: 14px;
  background: var(--hs-band);
  margin: 18px calc(-1 * var(--modal-pad-x)) calc(-1 * var(--modal-pad-x));
  padding: 14px var(--modal-pad-x);
}

/* ---------- Toast (.hs-toast black horizontal strip) ---------- */
html.hs-theme .toast {
  left: 50%;
  right: auto;
  top: 22%;
  bottom: auto;
  transform: translateX(-50%);
  width: min(640px, calc(100vw - 32px));
  min-height: 44px;
  justify-content: center;
  border-radius: 0;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(16, 18, 24, 0.84);
  color: #FFFFFF;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  animation: hs-toast-in 130ms var(--hs-ease) both;
}

html.hs-theme .toast.is-leaving {
  animation: hs-toast-out 130ms linear both;
}

/* ---------- Footer ---------- */
html.hs-theme .site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(238, 240, 246, 0.78);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}

html.hs-theme .site-footer a {
  color: var(--hs-acc-text);
}

html.hs-theme .site-footer a:hover {
  color: #FFFFFF;
}

html.hs-theme .footer-sep {
  color: rgba(255, 255, 255, 0.35);
}

/* ---------- Legal Pages (/privacy, /terms) ---------- */
html.hs-theme .legal-nav-link {
  color: rgba(240, 242, 248, 0.84);
  border-radius: 999px;
  padding: 6px 14px;
}

html.hs-theme .legal-nav-link:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #FFFFFF;
}

html.hs-theme .legal-nav-link.active {
  background: #F4F4F4;
  color: #1E1F24;
  font-weight: 600;
}

html.hs-theme .legal-title {
  color: var(--hs-ink);
  font-weight: 500;
}

html.hs-theme .legal-article h2 {
  color: var(--hs-acc-ink);
  font-weight: 600;
  border-left: 4px solid var(--hs-acc-bar);
  padding-left: 10px;
}

html.hs-theme .legal-article h3 {
  color: var(--hs-ink);
  font-weight: 600;
}

html.hs-theme .legal-article p,
html.hs-theme .legal-article ul,
html.hs-theme .legal-meta {
  color: var(--hs-ink-2);
}

html.hs-theme .legal-article code {
  background: rgba(30, 32, 40, 0.08);
  border: 1px solid rgba(30, 32, 40, 0.16);
  color: var(--hs-key-ink);
}

html.hs-theme .legal-callout {
  background: var(--hs-card);
  border: 0;
  border-left: 5px solid var(--hs-acc-bar);
  border-radius: 0 14px 0 0;
  color: var(--hs-ink);
}

html.hs-theme .legal-lang-pill {
  background: var(--hs-card);
  border: 1px solid rgba(30, 32, 40, 0.22);
  color: var(--hs-ink);
}

html.hs-theme .legal-lang-pill:hover {
  background: #222222;
  color: #E3C891;
  border-color: #222222;
}

html.hs-theme .legal-inline-link {
  color: var(--hs-acc-ink);
  font-weight: 600;
}

/* ---------- Tab transition swap & animations ---------- */
@keyframes hs-fade {
  from { opacity: 0; }
}

@keyframes hs-pop {
  from { opacity: 0; transform: scale(0.96); }
}

@keyframes hs-orbit {
  to { transform: rotate(360deg); }
}

@keyframes hs-bob {
  0%, 30% { transform: translateX(0); }
  62% { transform: translateX(-3px); }
  100% { transform: translateX(0); }
}

@keyframes hs-tab-sweep {
  from { background-position: 100% 0; }
  to { background-position: 0 100%; }
}

@keyframes hs-tab-bar {
  0% { transform: scaleX(0); background: var(--hs-acc); }
  40% { transform: scaleX(1); background: var(--hs-acc); }
  65% { background: var(--hs-acc); }
  100% { transform: scaleX(1); background: #FFFFFF; }
}

@keyframes hs-wipe {
  from { --hs-p: -0.32; }
  to { --hs-p: 1.08; }
}

@keyframes hs-unwipe {
  from { --hs-p: 1.06; opacity: 1; }
  to { --hs-p: -0.08; opacity: var(--wipe-out-a, 1); }
}

@keyframes hs-toast-in {
  from { clip-path: inset(22% 0); opacity: 0; }
  75% { opacity: 1; }
  to { clip-path: inset(0 0); opacity: 1; }
}

@keyframes hs-toast-out {
  from { clip-path: inset(0 0); color: #FFFFFF; }
  45% { color: #FFFFFF; }
  to { clip-path: inset(20% 0); color: transparent; background-color: rgba(0, 0, 0, 0.44); }
}

html.hs-theme .hs-enter > * {
  animation: hs-fade var(--hs-t-row) var(--hs-ease) backwards;
  animation-delay: calc(var(--i, 0) * var(--hs-t-stagger) + var(--hs-enter-base, var(--hs-t-blur)));
}

html.hs-theme .hs-swap {
  animation: hs-fade var(--hs-t-fade) var(--hs-ease);
}

@media (prefers-reduced-motion: reduce) {
  html.hs-theme *,
  html.hs-theme ::before,
  html.hs-theme ::after {
    animation-duration: 1ms !important;
    transition-duration: 1ms !important;
  }
}

/* ---------- Mobile Responsive Overrides for HSR Theme ---------- */
@media (max-width: 768px) {
  html.hs-theme header {
    padding: 10px 12px !important;
  }

  html.hs-theme .brand-icon {
    width: 34px !important;
    height: 34px !important;
  }

  html.hs-theme .hs-brand-svg {
    width: 20px;
    height: 20px;
  }

  html.hs-theme .nav-tabs {
    padding: 8px 4px 10px !important;
    gap: 6px !important;
  }

  html.hs-theme .nav-tab-btn {
    padding: 4px 10px 6px !important;
    font-size: 12px !important;
    gap: 6px !important;
  }

  html.hs-theme .hs-tab-disc {
    width: 28px !important;
    height: 28px !important;
  }

  html.hs-theme .hs-tab-svg {
    width: 15px !important;
    height: 15px !important;
  }

  html.hs-theme .nav-tab-btn.active::after {
    left: 0;
    right: 0;
    width: 100%;
    bottom: -3px;
  }

  html.hs-theme .card,
  html.hs-theme .legal-card,
  html.hs-theme .modal-content {
    border-radius: 0 22px 0 0 !important;
    --modal-pad-x: 12px;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  html.hs-theme .card::before,
  html.hs-theme .legal-card::before {
    display: none !important;
  }

  html.hs-theme .mode-toggle-btns {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 4px !important;
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 16px !important;
    box-sizing: border-box !important;
  }

  html.hs-theme .mode-toggle-btns .btn.mode-seg-btn {
    width: 100% !important;
    min-width: 0 !important;
    padding: 6px 6px !important;
    font-size: 11.5px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    box-shadow: none !important;
    border-radius: 12px !important;
  }

  html.hs-theme .hs-btn-primary-full {
    padding-left: 34px !important;
    padding-right: 12px !important;
    font-size: 13px !important;
    white-space: normal !important;
  }

  html.hs-theme .hs-btn-with-ico {
    min-width: 0 !important;
    padding: 8px 12px 8px 32px !important;
    font-size: 12.5px !important;
  }

  html.hs-theme :is(.hs-btn-primary-full, .hs-btn-with-ico) .hs-btn-ico {
    left: 9px !important;
    width: 19px !important;
    height: 19px !important;
  }

  html.hs-theme .hs-modal-band {
    margin: 14px -12px -16px;
    padding: 12px;
    gap: 8px;
    flex-wrap: wrap;
  }

  html.hs-theme .hs-modal-band .btn {
    flex: 1 1 auto;
    min-width: 0;
  }

  html.hs-theme .toast {
    top: auto !important;
    bottom: 14px !important;
    left: 14px !important;
    right: 14px !important;
    width: auto !important;
    transform: none !important;
  }
}

/* ---------- Direct API Mode Light Paper Theme Overrides ---------- */
html.hs-theme .api-security-banner {
  background: #F0FDF4 !important;
  border: 1px solid rgba(22, 163, 74, 0.28) !important;
  border-left: 4px solid #16A34A !important;
  color: #166534 !important;
}

html.hs-theme .api-inline-check {
  color: var(--hs-ink-2) !important;
}

html.hs-theme .api-preset-hint,
html.hs-theme .api-advanced-box,
html.hs-theme .api-queue-preview,
html.hs-theme .api-progress-card,
html.hs-theme .api-task-card {
  background: #F7F6F4 !important;
  border: 1px solid rgba(30, 32, 40, 0.14) !important;
  color: var(--hs-ink) !important;
}

html.hs-theme .api-queue-item {
  background: #FFFFFF !important;
  border: 1px solid rgba(30, 32, 40, 0.12) !important;
  color: var(--hs-ink) !important;
}

html.hs-theme .api-models-picker {
  background: #F0FDF4 !important;
  border: 1px solid rgba(22, 163, 74, 0.25) !important;
}

html.hs-theme .api-models-error {
  background: #FFFBEB !important;
  border: 1px solid rgba(217, 119, 6, 0.35) !important;
  color: #92400E !important;
}

html.hs-theme .api-task-title {
  color: var(--hs-ink) !important;
}

html.hs-theme .api-task-error {
  background: #FEF2F2 !important;
  border: 1px solid rgba(220, 38, 38, 0.3) !important;
  color: #B91C1C !important;
}

html.hs-theme .api-task-card.is-running {
  border-color: #2563EB !important;
}

html.hs-theme .api-task-card.is-success {
  border-color: #16A34A !important;
}

html.hs-theme .api-task-card.is-error {
  border-color: #DC2626 !important;
}

html.hs-theme .api-progress-track {
  background: rgba(30, 32, 40, 0.12) !important;
}

html.hs-theme .api-task-answer-pre {
  background: #1C1E26 !important;
  color: #F4F4F6 !important;
  border-color: rgba(30, 32, 40, 0.18) !important;
}
