@import url('https://fonts.googleapis.com/css2?family=Fraunces:wght@500;600;700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&family=Manrope:wght@400;500;600;700&display=swap');

:root {
  --ink: #0b0f1a;
  --ink-2: #12182a;
  --graphite: #2a3350;
  --accent: #f0b429;
  --accent-2: #e25a2c;
  --mint: #3ab5a2;
  --paper: #f7f4ee;
  --paper-2: #efe9df;
  --surface-solid: #ffffff;
  --surface: rgba(255, 255, 255, 0.96);
  --line: #d9d2c7;
  --shadow: rgba(11, 15, 26, 0.12);
  --header-bg: rgba(247, 244, 238, 0.9);
  --bg: radial-gradient(circle at 15% 10%, #fff7e6 0%, transparent 45%),
    radial-gradient(circle at 80% 20%, #eef7f6 0%, transparent 50%),
    var(--paper);
  --maxw: 1540px;
  --header-height: 88px;
  --dock-top: 104px;
  --studio-chart-top: 284px;
  --safe-area-bottom: env(safe-area-inset-bottom, 0px);
  --glass-blur: 18px;
  --glass-tint: rgba(255, 255, 255, 0.68);
  --glass-border: rgba(255, 255, 255, 0.52);
  --glass-shadow: 0 14px 30px rgba(11, 15, 26, 0.14);
  --glass-radius: 18px;
  --glass-panel-fill:
    radial-gradient(140% 220% at 0% 0%, rgba(255, 255, 255, 0.82) 0%, rgba(255, 255, 255, 0.28) 30%, rgba(255, 255, 255, 0) 56%),
    radial-gradient(120% 180% at 100% 100%, rgba(145, 198, 255, 0.16) 0%, rgba(145, 198, 255, 0) 52%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.5) 0%, rgba(252, 249, 243, 0.22) 100%);
  --glass-panel-border-strong: rgba(255, 255, 255, 0.56);
  --glass-panel-shadow-strong:
    0 24px 48px rgba(11, 15, 26, 0.16),
    0 10px 22px rgba(11, 15, 26, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    inset 0 -1px 0 rgba(255, 255, 255, 0.22);
  --glass-control-fill:
    radial-gradient(120% 200% at 10% 0%, rgba(255, 255, 255, 0.88) 0%, rgba(255, 255, 255, 0.26) 34%, rgba(255, 255, 255, 0) 58%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.62) 0%, rgba(245, 240, 231, 0.34) 100%);
  --glass-control-border-strong: rgba(255, 255, 255, 0.62);
  --glass-control-shadow-strong:
    0 16px 34px rgba(15, 23, 42, 0.12),
    0 6px 14px rgba(15, 23, 42, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -1px 0 rgba(255, 255, 255, 0.2);
  --glass-control-hover-shadow:
    0 20px 40px rgba(15, 23, 42, 0.14),
    0 8px 18px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    inset 0 -1px 0 rgba(255, 255, 255, 0.18);
  --glass-focus-ring: rgba(56, 114, 255, 0.18);
  --glass-panel-backdrop: blur(calc(var(--glass-blur) + 4px)) saturate(170%);
  --glass-control-backdrop: blur(calc(var(--glass-blur) - 5px)) saturate(160%);
  --glass-text: #081221;
  --glass-muted: #33415c;
  --mobile-bottom-nav-height: 62px;
  --page-gutter: clamp(16px, 2.6vw, 32px);
  --page-gutter-mobile: 12px;
}

[data-theme="dark"] {
  --ink: #e9edf7;
  --ink-2: #d5def2;
  --graphite: rgba(233, 237, 247, 0.74);
  --paper: #0b0f1a;
  --paper-2: #12182a;
  --surface-solid: rgba(18, 24, 42, 0.92);
  --surface: rgba(18, 24, 42, 0.96);
  --line: rgba(233, 237, 247, 0.14);
  --shadow: rgba(0, 0, 0, 0.45);
  --header-bg: rgba(11, 15, 26, 0.86);
  --bg: radial-gradient(circle at 15% 10%, rgba(226, 90, 44, 0.18) 0%, transparent 42%),
    radial-gradient(circle at 75% 15%, rgba(58, 181, 162, 0.12) 0%, transparent 48%),
    var(--paper);
  --glass-blur: 20px;
  --glass-tint: rgba(18, 24, 42, 0.62);
  --glass-border: rgba(233, 237, 247, 0.2);
  --glass-shadow: 0 18px 36px rgba(0, 0, 0, 0.42);
  --glass-panel-fill:
    radial-gradient(140% 220% at 0% 0%, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.05) 26%, rgba(255, 255, 255, 0) 56%),
    radial-gradient(120% 180% at 100% 100%, rgba(76, 154, 255, 0.16) 0%, rgba(76, 154, 255, 0) 54%),
    linear-gradient(145deg, rgba(28, 38, 63, 0.72) 0%, rgba(18, 24, 42, 0.52) 100%);
  --glass-panel-border-strong: rgba(233, 237, 247, 0.18);
  --glass-panel-shadow-strong:
    0 26px 52px rgba(0, 0, 0, 0.4),
    0 10px 22px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -1px 0 rgba(255, 255, 255, 0.03);
  --glass-control-fill:
    radial-gradient(120% 200% at 10% 0%, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.04) 32%, rgba(255, 255, 255, 0) 58%),
    linear-gradient(145deg, rgba(29, 38, 63, 0.82) 0%, rgba(14, 20, 37, 0.62) 100%);
  --glass-control-border-strong: rgba(233, 237, 247, 0.2);
  --glass-control-shadow-strong:
    0 18px 36px rgba(0, 0, 0, 0.34),
    0 8px 18px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    inset 0 -1px 0 rgba(255, 255, 255, 0.03);
  --glass-control-hover-shadow:
    0 24px 44px rgba(0, 0, 0, 0.38),
    0 10px 22px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -1px 0 rgba(255, 255, 255, 0.03);
  --glass-focus-ring: rgba(116, 163, 255, 0.22);
  --glass-text: #f4f7ff;
  --glass-muted: rgba(212, 223, 245, 0.88);
}

* {
  box-sizing: border-box;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: "Manrope", "Avenir Next", "Gill Sans", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

.liquid-glass,
.card,
.results-panel,
.sidebar-card,
.sidebar-nav,
.modal-card,
.toast {
  background: var(--glass-tint);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(140%);
}

:is(
  .liquid-glass,
  .card,
  .results-panel,
  .sidebar-card,
  .sidebar-nav,
  .modal-card,
  .toast,
  .cookie-banner,
  .mobile-bottom-nav,
  .home-bottom-nav,
  .quantura-comments-card,
  .quantura-comments-shell
) {
  color: var(--glass-text);
}

:is(
  .liquid-glass,
  .card,
  .results-panel,
  .sidebar-card,
  .sidebar-nav,
  .modal-card,
  .toast,
  .cookie-banner,
  .quantura-comments-card,
  .quantura-comments-shell
) :is(p, .muted, .small, .meta, .meta-line, .status-note, .field-hint, .form-help, .helper-text) {
  color: var(--glass-muted);
}

:is(
  .liquid-glass,
  .card,
  .results-panel,
  .sidebar-card,
  .sidebar-nav,
  .modal-card,
  .toast,
  .cookie-banner,
  .quantura-comments-card,
  .quantura-comments-shell
) :is(h1, h2, h3, h4, h5, h6, strong, label, summary) {
  color: var(--glass-text);
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .liquid-glass,
  .card,
  .results-panel,
  .sidebar-card,
  .sidebar-nav,
  .modal-card,
  .toast,
  .mobile-bottom-nav,
  .cookie-banner {
    background: rgba(250, 250, 250, 0.95);
  }
  [data-theme="dark"] .liquid-glass,
  [data-theme="dark"] .card,
  [data-theme="dark"] .results-panel,
  [data-theme="dark"] .sidebar-card,
  [data-theme="dark"] .sidebar-nav,
  [data-theme="dark"] .modal-card,
  [data-theme="dark"] .toast,
  [data-theme="dark"] .mobile-bottom-nav,
  [data-theme="dark"] .cookie-banner {
    background: rgba(24, 32, 54, 0.95);
  }
}

h1, h2, h3, h4 {
  font-family: "Fraunces", "Playfair Display", "Georgia", serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 0.6rem 0;
}

p {
  margin: 0 0 1rem 0;
  color: var(--graphite);
  line-height: 1.7;
}

.muted {
  color: var(--graphite);
}

a {
  color: inherit;
  text-decoration: none;
}

/* Iconoir (CDN) */
i[class^="iconoir-"],
i[class*=" iconoir-"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

i[class^="iconoir-"]::before,
i[class*=" iconoir-"]::before {
  width: 1.1em;
  height: 1.1em;
}

.semantic-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1em;
  height: 1.1em;
  flex: 0 0 auto;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--page-gutter);
}

.header {
  position: sticky;
  top: 0;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  z-index: 10;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1.22rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1;
}

.logo span {
  display: inline-block;
  background: linear-gradient(95deg, #0f2a61 0%, #1d5ed8 48%, #3ab5a2 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.logo-img {
  height: 28px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  gap: 22px;
  font-size: 0.95rem;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
}

.nav-links a:hover {
  border-color: var(--accent);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header .nav-links a[data-analytics="nav_terminal"],
.header .nav-links a[data-analytics="nav_forecasting"],
.header .nav-links a[href="/terminal"],
.header .nav-links a[href="/forecasting"],
.header .nav-links a[data-analytics="nav_dashboard"],
.header .nav-actions a[data-analytics="nav_cta"] {
  display: none !important;
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 999px;
  font-weight: 600;
  box-shadow: 0 10px 20px var(--shadow);
  border: none;
  cursor: pointer;
}

.cta.secondary {
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink-2);
  border: 1px solid rgba(18, 24, 42, 0.28);
  box-shadow: none;
}

.cta.secondary:hover {
  background: #fff;
  border-color: rgba(226, 90, 44, 0.45);
}

.cta.secondary.danger {
  border-color: rgba(155, 43, 26, 0.45);
  color: #9b2b1a;
}

.cta.secondary.danger:hover {
  border-color: rgba(155, 43, 26, 0.65);
  background: rgba(255, 236, 232, 0.9);
}

[data-theme="dark"] .cta.secondary {
  background: rgba(18, 24, 42, 0.78);
  color: var(--ink);
  border-color: rgba(233, 237, 247, 0.18);
}

[data-theme="dark"] .cta.secondary:hover {
  background: rgba(18, 24, 42, 0.92);
  border-color: rgba(240, 180, 41, 0.35);
}

[data-theme="dark"] .cta.secondary.danger {
  border-color: rgba(255, 102, 89, 0.35);
  color: rgba(255, 186, 180, 0.95);
}

[data-theme="dark"] .cta.secondary.danger:hover {
  border-color: rgba(255, 102, 89, 0.55);
  background: rgba(38, 18, 18, 0.85);
}

:is(
  input:not([type]),
  input[type="text"],
  input[type="search"],
  input[type="email"],
  input[type="number"],
  input[type="date"],
  input[type="url"],
  input[type="tel"],
  input[type="password"],
  textarea,
  select,
  .file-input,
  .input.notes-input,
  .theme-toggle,
  .sidebar-link,
  .tab,
  .status-select,
  .notification-privacy-select,
  .modal-input,
  .personality-select,
  .mobile-sidebar-toggle,
  .download-history-toggle,
  .model-council-prompt-card
) {
  color: var(--glass-text);
}

:is(
  input:not([type]),
  input[type="text"],
  input[type="search"],
  input[type="email"],
  input[type="number"],
  input[type="date"],
  input[type="url"],
  input[type="tel"],
  input[type="password"],
  textarea,
  select,
  .modal-input
)::placeholder {
  color: var(--glass-muted);
  opacity: 1;
}

.cta.google {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: none;
}

.cta.facebook {
  background: #1877f2;
  color: #fff;
  border: 1px solid rgba(24, 119, 242, 0.55);
  box-shadow: none;
}

.cta.facebook:hover {
  background: #0f66d8;
  border-color: rgba(24, 119, 242, 0.75);
}

.cta.small {
  padding: 10px 16px;
  font-size: 0.9rem;
}

.nav-actions .cta {
  padding: 9px 13px;
  font-size: 0.82rem;
  line-height: 1;
}

.nav-actions .cta.icon-only {
  width: 40px;
  min-width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0;
  justify-content: center;
  gap: 0;
}

.nav-actions .cta.icon-only span {
  display: none;
}

.nav-actions .cta.icon-only i {
  font-size: 1.08rem;
}

.nav-actions .pill {
  padding: 5px 10px;
  font-size: 0.75rem;
}

.language-picker {
  display: grid;
  gap: 4px;
  min-width: 124px;
}

.language-picker-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--graphite);
}

.language-select {
  min-height: 40px;
}

.theme-toggle {
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  padding: 0;
  justify-content: center;
}

.theme-toggle i {
  font-size: 1rem;
}

.cta[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

.hero {
  padding: 90px 0 40px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
}

.hero-card {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 18px 40px rgba(26, 33, 56, 0.08);
}

.hero-card ul {
  padding-left: 18px;
  margin: 0;
  color: var(--graphite);
  line-height: 1.7;
}

.media-card {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 26px;
  box-shadow: 0 18px 40px rgba(26, 33, 56, 0.08);
}

.section-compact {
  padding-top: 24px;
}

.unsplash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  align-items: start;
}

.hero-card .unsplash-grid {
  grid-template-columns: 1fr;
}

.unsplash-card {
  margin: 0;
  display: grid;
  gap: 8px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 12px 24px rgba(26, 33, 56, 0.08);
  overflow: hidden;
  aspect-ratio: 16 / 11;
  min-height: 0;
}

.hero-moodboard {
  aspect-ratio: 16 / 9;
  max-height: 360px;
}

.unsplash-card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.unsplash-card figcaption {
  display: block;
  padding: 10px 12px 12px;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--graphite);
  background: rgba(255, 255, 255, 0.92);
}

.unsplash-card a {
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 700;
}

.brand-rail {
  position: relative;
  overflow: hidden;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.85) 0%, rgba(239, 245, 250, 0.75) 100%);
}

.brand-track {
  display: flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  padding: 14px 16px;
  animation: brandRailShift 40s linear infinite;
}

.brand-rail:hover .brand-track {
  animation-play-state: paused;
}

.brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 999px;
  border: 1px solid rgba(18, 24, 42, 0.18);
  background: rgba(255, 255, 255, 0.94);
  padding: 10px 15px;
  font-size: 0.97rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.brand-pill img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  display: block;
}

@keyframes brandRailShift {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.hero-video {
  width: 100%;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #0b0f1a;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #fef1cc;
  color: #6d4c00;
  font-size: 0.85rem;
  font-weight: 600;
}

.section {
  padding: 54px 0;
}

section.studio-section#terminal {
  padding-top: 0;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  align-items: start;
}

.card {
  background: var(--glass-tint);
  border-radius: var(--glass-radius);
  border: 1px solid var(--glass-border);
  padding: 26px;
  box-shadow: var(--glass-shadow);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.card-head h3 {
  margin: 0;
}

.card strong {
  color: var(--ink);
}

.feature-list {
  display: grid;
  gap: 14px;
}

.feature {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.feature span {
  width: 10px;
  height: 10px;
  background: var(--accent-2);
  border-radius: 50%;
  margin-top: 8px;
}

.feature i {
  margin-top: 2px;
  opacity: 0.82;
}

.pricing-page .feature span {
  display: none;
}

.pricing-page .feature {
  gap: 10px;
}

.offer {
  background: linear-gradient(135deg, #101726 0%, #1f2740 100%);
  color: #f4efe6;
  border-radius: 28px;
  padding: 40px;
  display: grid;
  gap: 22px;
}

.purchase-panel {
  display: grid;
  gap: 12px;
}

.offer h2 {
  color: #f4efe6;
}

.price {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--accent);
}

.offer ul {
  padding-left: 18px;
  margin: 0;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.footer {
  border-top: 1px solid var(--line);
  padding: 40px 0 30px;
  background: #f2ede4;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 20px;
}

.footer a {
  color: var(--graphite);
}

.legal-copy {
  line-height: 1.6;
}

.footer-terms {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.62);
}

.footer-terms summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--ink);
}

.footer-terms-list {
  margin: 10px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  color: var(--ink-2);
  line-height: 1.45;
}

.footer-terms-list li {
  margin: 0;
}

.footer-social {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.social-link {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.social-link svg {
  width: 18px;
  height: 18px;
  fill: var(--ink);
  opacity: 0.85;
}

.social-link img {
  width: 18px;
  height: 18px;
  display: block;
}

.social-link:hover {
  transform: translateY(-1px);
  border-color: var(--ink);
  box-shadow: 0 10px 18px rgba(11, 15, 26, 0.10);
}

[data-theme="dark"] .social-link img {
  filter: invert(1);
}

.footer-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.badge-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid var(--line);
  font-size: 0.76rem;
  color: var(--ink-2);
  font-weight: 600;
}

.metric-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.metric-chip .metric-label {
  opacity: 0.78;
  font-weight: 700;
}

.metric-chip .metric-value {
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.metric-strip {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 6px;
}

.small {
  font-size: 0.9rem;
  color: var(--graphite);
}

.tag {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 12px;
  background: #e1f4f0;
  color: #146a5d;
  font-size: 0.8rem;
  font-weight: 600;
}

form {
  display: grid;
  gap: 14px;
}

.auth-section {
  background: #f9f4ec;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.auth-brand-banner {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 14px;
  border: 1px solid rgba(29, 94, 216, 0.22);
  background: linear-gradient(105deg, rgba(15, 42, 97, 0.08), rgba(58, 181, 162, 0.14));
  border-radius: 16px;
  padding: 12px 14px;
  margin-bottom: 18px;
}

.auth-brand-logo {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid rgba(15, 42, 97, 0.2);
}

.auth-brand-banner h3 {
  margin: 2px 0 0;
}

.auth-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.auth-form {
  display: grid;
  gap: 12px;
}

.auth-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.feature-vote-form {
  display: grid;
  gap: 12px;
}

.feature-vote-options {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.vote-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  padding: 10px 14px;
  font-weight: 700;
  background: var(--surface-solid);
  color: var(--ink-2);
  cursor: pointer;
}

.vote-pill:hover {
  border-color: rgba(226, 90, 44, 0.45);
}

.vote-pill.active {
  background: var(--ink);
  color: var(--paper);
  border-color: transparent;
}

.feature-mockup-card {
  display: grid;
  gap: 10px;
}

.feature-mockup-window {
  border-radius: 14px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(244, 248, 255, 0.6));
  padding: 10px;
}

[data-theme="dark"] .feature-mockup-window {
  background: linear-gradient(180deg, rgba(18, 24, 42, 0.9), rgba(12, 18, 31, 0.7));
}

.feature-mockup-toolbar {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.feature-mockup-toolbar span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(18, 24, 42, 0.2);
}

[data-theme="dark"] .feature-mockup-toolbar span {
  background: rgba(233, 237, 247, 0.28);
}

.feature-mockup-lines {
  display: grid;
  gap: 7px;
}

.feature-mockup-lines div {
  height: 9px;
  border-radius: 8px;
  background: rgba(18, 24, 42, 0.1);
}

[data-theme="dark"] .feature-mockup-lines div {
  background: rgba(233, 237, 247, 0.14);
}

.feature-mockup-lines div:nth-child(1) {
  width: 82%;
}

.feature-mockup-lines div:nth-child(2) {
  width: 96%;
}

.feature-mockup-lines div:nth-child(3) {
  width: 67%;
}

.feature-mockup-lines div:nth-child(4) {
  width: 88%;
}

.feature-vote-admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.feature-vote-recent {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

@media (max-width: 860px) {
  .feature-vote-admin-grid {
    grid-template-columns: 1fr;
  }
}

.auth-inline {
  display: flex;
  justify-content: flex-end;
  margin-top: -6px;
}

.auth-link {
  font-size: 0.84rem;
}

.auth-provider-button {
  width: 100%;
  justify-content: flex-start;
}

.auth-provider-logo {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.auth-provider-logo svg {
  width: 100%;
  height: 100%;
  display: block;
}

.auth-provider-logo--x,
.auth-provider-logo--guest {
  color: currentColor;
}

body.native-runtime .auth-section,
body.native-platform-ios .auth-section,
body.native-platform-android .auth-section {
  background: linear-gradient(180deg, rgba(15, 42, 97, 0.08), rgba(58, 181, 162, 0.08));
  border-top-color: rgba(15, 42, 97, 0.24);
  border-bottom-color: rgba(15, 42, 97, 0.24);
}

body.native-runtime .auth-section .card,
body.native-platform-ios .auth-section .card,
body.native-platform-android .auth-section .card {
  border-color: rgba(15, 42, 97, 0.22);
  background: rgba(255, 255, 255, 0.9);
}

.label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-2);
}

.notice {
  background: #fff7e6;
  border: 1px solid #f1d9b0;
  border-radius: 14px;
  padding: 14px 16px;
  color: #6d4c00;
  font-size: 0.9rem;
  line-height: 1.5;
}

.hidden {
  display: none !important;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.profile-item {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.profile-item .value {
  font-weight: 600;
}

.profile-settings {
  margin: 10px 0 14px;
  padding: 10px 12px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.6);
}

[data-theme="dark"] .profile-settings {
  background: rgba(11, 15, 26, 0.4);
  border-color: rgba(233, 237, 247, 0.2);
}

.profile-settings summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--ink-2);
  list-style: none;
}

.profile-settings summary::-webkit-details-marker {
  display: none;
}

.profile-settings[open] summary {
  margin-bottom: 10px;
}

.profile-editor {
  display: grid;
  gap: 8px;
}

.profile-editor .input {
  width: 100%;
}

.profile-links-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.cta.secondary.success {
  background: rgba(58, 181, 162, 0.14);
  border-color: rgba(58, 181, 162, 0.45);
  color: #0f6b53;
}

#profile-status[data-variant="warn"] {
  color: #9b2b1a;
}

#profile-status[data-variant="success"] {
  color: #0f6b53;
}

.billing-panel {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  display: grid;
  gap: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: #e9f5ef;
  color: #0f6b53;
  font-weight: 600;
  font-size: 0.85rem;
}

.order-list {
  display: grid;
  gap: 16px;
}

.order-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  background: #fff;
  box-shadow: 0 10px 20px rgba(26, 33, 56, 0.06);
  display: grid;
  gap: 12px;
}

.order-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.order-title {
  font-weight: 700;
}

.order-meta {
  display: grid;
  gap: 6px;
  color: var(--graphite);
  font-size: 0.9rem;
}

.status {
  text-transform: capitalize;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: #e9eef9;
  color: #2c3e66;
}

.status.fulfilled {
  background: #e5f6ef;
  color: #1c6a50;
}

.status.in_progress {
  background: #fff1db;
  color: #7b4a12;
}

.status.cancelled {
  background: #fce3e1;
  color: #9b2b1a;
}

.order-actions {
  display: grid;
  grid-template-columns: 140px 1fr 120px;
  gap: 10px;
  align-items: center;
}

.status-select {
  border-radius: 10px;
  border: 1px solid var(--line);
  padding: 10px 12px;
  font: inherit;
  background: #fff;
}

.input.notes-input {
  border-radius: 10px;
  border: 1px solid var(--line);
  padding: 10px 12px;
  font: inherit;
}

.toast {
  position: fixed;
  bottom: calc(18px + var(--safe-area-bottom));
  right: auto;
  left: 24px;
  background: var(--glass-tint);
  color: var(--ink);
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
  z-index: 50;
  max-width: 320px;
  font-size: 0.9rem;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast[data-variant=\"warn\"] {
  background: #7c2d12;
}

input, textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  font: inherit;
  background: var(--surface-solid);
  color: var(--ink);
}

textarea {
  min-height: 140px;
  resize: vertical;
}

.app-layout .panel .card,
.app-layout .panel .results-panel {
  padding: 18px;
}

.app-layout .panel .form-grid {
  gap: 12px;
}

.app-layout .panel .field {
  gap: 4px;
}

.app-layout .panel input,
.app-layout .panel textarea,
.app-layout .panel select {
  padding: 10px 12px;
}

.app-layout .panel textarea {
  min-height: 96px;
}

.app-layout .panel .file-input {
  padding: 8px 10px;
}

@media (max-width: 980px) {
  .hero-grid,
  .grid-3,
  .split,
  .footer-grid,
  .auth-grid,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .unsplash-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nav-links {
    display: none;
  }
}

@media (max-width: 720px) {
  .order-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 var(--page-gutter-mobile);
  }

  .app-layout {
    padding: 0 var(--page-gutter-mobile) 36px;
  }

  .hero {
    padding-top: 60px;
  }

  .hero-card,
  .media-card,
  .card,
  .results-panel,
  .sidebar-card,
  .modal-card {
    padding: 20px;
  }

  .unsplash-grid {
    grid-template-columns: 1fr;
  }

  .brand-pill {
    font-size: 0.9rem;
    padding: 8px 12px;
  }

  .brand-pill img {
    width: 18px;
    height: 18px;
  }
}

.fade-in {
  animation: fadeIn 0.9s ease forwards;
  opacity: 0;
}

.fade-in.delay-1 {
  animation-delay: 0.2s;
}

.fade-in.delay-2 {
  animation-delay: 0.4s;
}

.fade-in.delay-3 {
  animation-delay: 0.6s;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-hero {
  padding: 80px 0 40px;
}

.page-hero .eyebrow {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #7b6b58;
  font-weight: 700;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.purchase-panel {
  display: grid;
  gap: 12px;
}

.purchase-note {
  margin: 0;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}

.stat-card {
  background: #fff;
  border-radius: 20px;
  border: 1px solid var(--line);
  padding: 20px;
  box-shadow: 0 12px 24px rgba(26, 33, 56, 0.06);
}

.stat-card strong {
  display: block;
  font-size: 1.6rem;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px;
  align-items: start;
}

.news-data-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
}

#download-end {
  width: 100%;
  min-width: 0;
}

.insight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}

.callout {
  background: #0f172a;
  color: #f8fafc;
  border-radius: 24px;
  padding: 32px;
  display: grid;
  gap: 12px;
}

.callout p,
.callout li,
.callout .small {
  color: #f8fafc;
}

.callout > p {
  color: #f8fafc !important;
}

.callout .callout-copy {
  color: #f8fafc !important;
}

.callout .cta.secondary {
  color: #f8fafc;
  border-color: #f8fafc;
}

.testimonial {
  border-left: 4px solid var(--accent);
  padding-left: 18px;
  font-style: italic;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}

.price-card {
  background: #fff;
  border-radius: 24px;
  border: 1px solid var(--line);
  padding: 28px;
  box-shadow: 0 12px 24px rgba(26, 33, 56, 0.06);
  display: grid;
  gap: 12px;
}

.price-card .price {
  font-size: 2rem;
}

.use-case-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
}

.use-case-card {
  display: grid;
  grid-template-columns: minmax(120px, 152px) minmax(0, 1fr);
  gap: 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 14px;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
  box-shadow: 0 10px 22px rgba(26, 33, 56, 0.08);
}

.use-case-card:hover,
.use-case-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(58, 181, 162, 0.46);
  box-shadow: 0 16px 28px rgba(26, 33, 56, 0.12);
}

.use-case-media {
  border-radius: 14px;
  min-height: 120px;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}

.use-case-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.use-case-media img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.28));
}

.use-case-media-goldman {
  background: linear-gradient(145deg, #0f172a 0%, #1e293b 60%, #334155 100%);
}

.use-case-media-openai {
  background: linear-gradient(145deg, #111827 0%, #1f2937 55%, #374151 100%);
}

.use-case-media-aws {
  background: linear-gradient(145deg, #111827 0%, #312e81 45%, #7c3aed 100%);
}

.use-case-media-perplexity {
  background: linear-gradient(145deg, #0f172a 0%, #0f766e 50%, #14b8a6 100%);
}

.use-case-body {
  display: grid;
  gap: 8px;
  align-content: center;
}

.use-case-body h3 {
  margin: 0;
}

.use-case-body p {
  margin: 0;
}

.use-case-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-2);
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.quote-carousel {
  display: grid;
  gap: 10px;
}

.quote-carousel.card {
  max-width: 960px;
  margin: 0 auto;
  padding: 18px 20px;
  border-radius: 24px;
  box-shadow: 0 18px 34px rgba(16, 24, 40, 0.08);
}

.quote-carousel-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 2px;
}

.quote-nav-buttons {
  display: inline-flex;
  gap: 6px;
}

.quote-nav-buttons .cta.small {
  min-width: 0;
  padding: 8px 12px;
  border-radius: 999px;
}

.quote-autoplay-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.quote-autoplay-label input {
  accent-color: var(--accent-2);
}

.quote-carousel-track {
  position: relative;
  min-height: 126px;
}

.quote-slide {
  margin: 0;
  display: none;
  gap: 8px;
  animation: quoteFadeIn 220ms ease-out;
}

.quote-carousel-track .quote-slide:first-child {
  display: grid;
}

.quote-slide.is-active {
  display: grid;
}

.quote-slide[hidden] {
  display: none !important;
}

.quote-slide blockquote {
  margin: 0;
  position: relative;
  max-width: 60ch;
  padding-left: 18px;
  font-family: "Fraunces", "Playfair Display", "Georgia", serif;
  font-size: clamp(1rem, 1.18vw, 1.18rem);
  line-height: 1.36;
  color: var(--ink);
}

.quote-slide blockquote::before {
  content: '"';
  position: absolute;
  left: 0;
  top: -0.06em;
  font-size: 1.6em;
  line-height: 1;
  color: rgba(43, 105, 196, 0.38);
}

.quote-slide figcaption {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--graphite);
  font-size: 0.79rem;
}

.quote-slide figcaption a {
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 700;
}

@keyframes quoteFadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-section {
  background: #f9f4ec;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.auth-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.auth-form {
  display: grid;
  gap: 12px;
}

.auth-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-2);
}

.notice {
  background: #fff7e6;
  border: 1px solid #f1d9b0;
  border-radius: 14px;
  padding: 14px 16px;
  color: #6d4c00;
  font-size: 0.9rem;
  line-height: 1.5;
}

.hidden {
  display: none !important;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}

.profile-item {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.profile-item .value {
  font-weight: 600;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: #e9f5ef;
  color: #0f6b53;
  font-weight: 600;
  font-size: 0.85rem;
}

.order-list {
  display: grid;
  gap: 16px;
}

.order-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  background: #fff;
  box-shadow: 0 10px 20px rgba(26, 33, 56, 0.06);
  display: grid;
  gap: 12px;
}

.order-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.order-title {
  font-weight: 700;
}

.order-meta {
  display: grid;
  gap: 6px;
  color: var(--graphite);
  font-size: 0.9rem;
}

.status {
  text-transform: capitalize;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: #e9eef9;
  color: #2c3e66;
}

.status.fulfilled {
  background: #e5f6ef;
  color: #1c6a50;
}

.status.in_progress {
  background: #fff1db;
  color: #7b4a12;
}

.status.cancelled {
  background: #fce3e1;
  color: #9b2b1a;
}

.status.status-icon-only {
  padding: 5px 8px;
  min-width: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.status-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
}

.status-icon svg {
  width: 16px;
  height: 16px;
  display: block;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.15;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.status-icon-completed {
  color: #1c6a50;
}

.status-icon-cancelled {
  color: #9b2b1a;
}

.order-actions {
  display: grid;
  grid-template-columns: 160px 1fr 140px;
  gap: 10px;
  align-items: center;
}

.order-actions .cta.update-status {
  color: #fff;
}

.status-select {
  border-radius: 10px;
  border: 1px solid var(--line);
  padding: 10px 12px;
  font: inherit;
  background: #fff;
}

.input.notes-input {
  border-radius: 10px;
  border: 1px solid var(--line);
  padding: 10px 12px;
  font: inherit;
}

.upload-row {
  display: flex;
  gap: 12px;
  align-items: center;
}

.file-input {
  flex: 1;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 10px;
  border-radius: 10px;
  border: 1px dashed var(--line);
  background: #faf8f4;
}

.file-input::file-selector-button {
  margin-right: 12px;
  padding: 10px 14px;
  border: 0;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.94);
  color: #f8fafc;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.file-list {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  display: grid;
  gap: 8px;
}

.file-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.9rem;
}

.file-list a {
  font-weight: 600;
  color: var(--ink);
}

.toast {
  position: fixed;
  bottom: calc(20px + var(--safe-area-bottom));
  right: auto;
  left: 24px;
  background: rgba(9, 13, 24, 0.96);
  color: #f8fbff;
  padding: 14px 18px;
  border-radius: 16px;
  border: 1px solid rgba(214, 227, 255, 0.18);
  box-shadow: 0 18px 34px rgba(4, 8, 18, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 180ms ease, transform 180ms ease, box-shadow 180ms ease;
  z-index: 120;
  max-width: min(360px, calc(100vw - 32px));
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 0.01em;
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast[data-variant="warn"] {
  background: linear-gradient(135deg, rgba(132, 41, 15, 0.98) 0%, rgba(92, 23, 7, 0.98) 100%);
  color: #fff7f3;
  border-color: rgba(255, 214, 204, 0.42);
  box-shadow: 0 18px 34px rgba(67, 17, 6, 0.34), 0 0 0 1px rgba(255, 244, 240, 0.06) inset;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.field {
  display: grid;
  gap: 6px;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.indicator-field {
  margin: 0;
  padding: 0;
  border: 0;
  min-inline-size: 0;
}

.indicator-field .label {
  margin: 0;
  padding: 0;
}

.checkbox-grid.indicator-toggle-grid {
  grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
  gap: 10px;
}

.indicator-toggle {
  position: relative;
  display: block;
  min-width: 0;
}

.indicator-toggle input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  white-space: nowrap;
  clip-path: inset(50%);
}

.indicator-toggle-label {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 56px;
  padding: 14px 62px 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(15, 42, 97, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(244, 239, 230, 0.84) 100%);
  color: var(--ink-2);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.2;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  cursor: pointer;
  user-select: none;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease, color 180ms ease;
}

.indicator-toggle-label::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 14px;
  width: 34px;
  height: 20px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  box-shadow: inset 0 0 0 1px rgba(15, 42, 97, 0.1);
  transform: translateY(-50%);
  transition: background 180ms ease, box-shadow 180ms ease;
}

.indicator-toggle-label::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 32px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.18);
  transform: translate(0, -50%);
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.indicator-toggle:hover .indicator-toggle-label {
  transform: translateY(-1px);
  border-color: rgba(31, 93, 255, 0.24);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12);
}

.indicator-toggle input:focus-visible + .indicator-toggle-label {
  border-color: rgba(31, 93, 255, 0.65);
  box-shadow: 0 0 0 4px rgba(31, 93, 255, 0.16), 0 14px 28px rgba(15, 23, 42, 0.12);
}

.indicator-toggle input:checked + .indicator-toggle-label {
  background: linear-gradient(135deg, #1f5dff 0%, #0f3fb8 100%);
  border-color: rgba(15, 63, 184, 0.62);
  color: #ffffff;
  box-shadow: 0 16px 32px rgba(15, 63, 184, 0.28);
}

.indicator-toggle input:checked + .indicator-toggle-label::before {
  background: rgba(255, 255, 255, 0.24);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.indicator-toggle input:checked + .indicator-toggle-label::after {
  transform: translate(14px, -50%);
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(8, 12, 22, 0.22);
}

.indicator-toggle input:disabled + .indicator-toggle-label {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.results-panel {
  background: var(--glass-tint);
  border: 1px solid var(--glass-border);
  border-radius: var(--glass-radius);
  padding: 20px;
  box-shadow: var(--glass-shadow);
  display: grid;
  gap: 12px;
}

.panel-output {
  max-height: 520px;
  overflow: auto;
  padding-right: 8px;
  overflow-wrap: anywhere;
}

.foundry-layout,
.foundry-main-grid,
.foundry-detail-card,
.foundry-runs-panel {
  min-width: 0;
}

.panel[data-panel="autopilot"] .container {
  display: grid;
  gap: 22px;
  max-width: min(1400px, calc(100vw - 28px));
}

.panel[data-panel="sports-autopilot"] .container {
  display: grid;
  gap: 22px;
  max-width: min(1400px, calc(100vw - 28px));
}

.foundry-layout {
  display: grid;
  gap: 18px;
}

.foundry-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: 22px;
  align-items: start;
}

.foundry-detail-card {
  display: grid;
  gap: 10px;
  align-content: start;
}

.panel[data-panel="autopilot"] #foundry-source-form,
.panel[data-panel="autopilot"] #foundry-source-form .form-grid,
.panel[data-panel="autopilot"] #foundry-source-form .field,
.panel[data-panel="autopilot"] #foundry-source-form input,
.panel[data-panel="autopilot"] #foundry-source-form textarea,
.panel[data-panel="autopilot"] #foundry-source-form select,
.panel[data-panel="autopilot"] #foundry-source-form .file-input,
.panel[data-panel="autopilot"] #foundry-upload-actions,
.panel[data-panel="autopilot"] #foundry-primary-actions {
  min-width: 0;
  max-width: 100%;
}

.panel[data-panel="autopilot"] #foundry-source-form input,
.panel[data-panel="autopilot"] #foundry-source-form textarea,
.panel[data-panel="autopilot"] #foundry-source-form select,
.panel[data-panel="autopilot"] #foundry-source-form .file-input {
  width: 100%;
  max-width: 100%;
}

.panel[data-panel="sports-autopilot"] #sports-foundry-form,
.panel[data-panel="sports-autopilot"] #sports-foundry-form .form-grid,
.panel[data-panel="sports-autopilot"] #sports-foundry-form .field,
.panel[data-panel="sports-autopilot"] #sports-foundry-form input,
.panel[data-panel="sports-autopilot"] #sports-foundry-form textarea,
.panel[data-panel="sports-autopilot"] #sports-foundry-form select,
.panel[data-panel="sports-autopilot"] .sports-foundry-actions {
  min-width: 0;
  max-width: 100%;
}

.panel[data-panel="sports-autopilot"] #sports-foundry-form input,
.panel[data-panel="sports-autopilot"] #sports-foundry-form textarea,
.panel[data-panel="sports-autopilot"] #sports-foundry-form select {
  width: 100%;
}

.panel[data-panel="autopilot"] #foundry-source-form .file-input {
  display: block;
  inline-size: 100%;
  max-inline-size: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.panel[data-panel="autopilot"] #foundry-upload-actions,
.panel[data-panel="autopilot"] #foundry-primary-actions {
  row-gap: 10px;
}

.foundry-runs-panel {
  width: 100%;
}

#autopilot-output.panel-output {
  max-height: 360px;
}

#sports-foundry-output.panel-output {
  max-height: 360px;
}

#foundry-run-meta.panel-output,
#predictions-agent-output.panel-output,
#predictions-preview.panel-output {
  max-height: none;
  padding-right: 0;
}

#sports-foundry-run-meta.panel-output,
#sports-foundry-analysis.panel-output,
#sports-foundry-preview.panel-output,
#sports-foundry-history-preview.panel-output {
  max-height: none;
  padding-right: 0;
}

#foundry-publish-host,
#foundry-run-meta,
#predictions-agent-output,
#predictions-plot-meta,
#predictions-preview {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

#predictions-agent-output .notice,
#predictions-agent-output .table-wrap,
#predictions-preview .table-wrap,
#foundry-run-meta .table-wrap {
  max-width: 100%;
}

#predictions-agent-output .data-table,
#predictions-preview .data-table {
  min-width: 620px;
}

#predictions-chart.chart {
  width: 100%;
  min-width: 0;
  overflow: hidden;
}

#sports-foundry-chart.chart {
  width: 100%;
  min-width: 0;
  overflow: hidden;
}

#sports-foundry-run-meta,
#sports-foundry-analysis,
#sports-foundry-preview,
#sports-foundry-history-preview,
#sports-foundry-publish-host {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

#sports-foundry-analysis .table-wrap,
#sports-foundry-preview .table-wrap,
#sports-foundry-history-preview .table-wrap {
  max-width: 100%;
}

#sports-foundry-preview .data-table,
#sports-foundry-history-preview .data-table {
  min-width: 620px;
}

.sports-foundry-preview-card {
  display: grid;
  gap: 10px;
}

.quantura-comments-section {
  margin-top: 24px;
}

.quantura-comments-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  margin-top: 14px;
  padding: 18px 20px;
  border-radius: calc(var(--glass-radius) - 2px);
  border: 1px solid rgba(217, 210, 199, 0.72);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0.52));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.quantura-comments-card .small {
  margin: 0;
}

.quantura-comments-host {
  width: 100%;
  min-width: 0;
  min-height: 240px;
}

.quantura-comments-shell {
  min-height: 240px;
  border-radius: 18px;
  border: 1px dashed rgba(42, 51, 80, 0.18);
  background: rgba(255, 255, 255, 0.54);
  padding: 16px;
}

.quantura-comments-loading {
  min-height: 206px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--graphite);
  font-size: 14px;
}

.quantura-comments-host iframe.giscus-frame {
  width: 100%;
}

.quantura-comments-fallback {
  display: grid;
  gap: 14px;
}

.quantura-comments-fallback-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.quantura-comments-fallback-head h4 {
  margin: 4px 0 0;
  font-size: 1.05rem;
}

.quantura-comments-fallback-head p {
  margin: 8px 0 0;
}

.quantura-comments-fallback-eyebrow {
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--glass-muted);
}

.quantura-comments-fallback-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(11, 15, 26, 0.92);
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 12px 24px rgba(11, 15, 26, 0.18);
}

.quantura-comments-fallback-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quantura-comments-fallback-summary span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.56);
  color: var(--glass-text);
  font-size: 0.82rem;
  font-weight: 700;
}

.quantura-comments-fallback-body {
  color: var(--glass-muted);
  line-height: 1.6;
}

.quantura-comments-fallback-body p {
  margin: 0;
}

.quantura-comments-fallback-list {
  display: grid;
  gap: 12px;
}

.quantura-comments-fallback-item {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.52);
}

.quantura-comments-fallback-author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.quantura-comments-fallback-author a {
  font-weight: 700;
  color: var(--glass-text);
  text-decoration: none;
}

.quantura-comments-fallback-avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.quantura-comments-fallback-avatar--placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(11, 15, 26, 0.12);
  color: var(--glass-text);
  font-weight: 800;
}

.quantura-comments-fallback-meta,
.quantura-comments-fallback-empty {
  color: var(--glass-muted);
  font-size: 0.9rem;
}

[data-theme="dark"] .quantura-comments-card {
  border-color: rgba(233, 237, 247, 0.14);
  background: linear-gradient(180deg, rgba(18, 24, 42, 0.86), rgba(18, 24, 42, 0.64));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

[data-theme="dark"] .quantura-comments-shell {
  border-color: rgba(233, 237, 247, 0.16);
  background: rgba(11, 15, 26, 0.48);
}

[data-theme="dark"] .quantura-comments-fallback-link {
  border-color: rgba(233, 237, 247, 0.16);
  background: rgba(233, 237, 247, 0.08);
  color: #ffffff;
}

[data-theme="dark"] .quantura-comments-fallback-summary span,
[data-theme="dark"] .quantura-comments-fallback-item {
  border-color: rgba(233, 237, 247, 0.12);
  background: rgba(18, 24, 42, 0.48);
}

[data-theme="dark"] .quantura-comments-fallback-avatar {
  border-color: rgba(233, 237, 247, 0.16);
}

.sports-foundry-workflow-toggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.sports-foundry-workflow-option {
  position: relative;
  display: block;
}

.sports-foundry-workflow-option input {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.sports-foundry-workflow-option span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 12px 16px;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(247, 240, 229, 0.98)),
    rgba(255, 255, 255, 0.94);
  color: #1f2937;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease, color 160ms ease;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.sports-foundry-workflow-option:hover span {
  transform: translateY(-1px);
  border-color: rgba(15, 23, 42, 0.2);
}

.sports-foundry-workflow-option input:focus-visible + span {
  outline: 2px solid rgba(201, 161, 84, 0.4);
  outline-offset: 2px;
}

.sports-foundry-workflow-option input:checked + span {
  border-color: rgba(177, 118, 34, 0.4);
  background:
    linear-gradient(135deg, rgba(252, 244, 226, 0.98), rgba(247, 226, 181, 0.94)),
    rgba(255, 248, 236, 0.98);
  color: #7c4a03;
  box-shadow: 0 16px 34px rgba(177, 118, 34, 0.14);
}

.sports-foundry-actions {
  row-gap: 10px;
}

@media (max-width: 1360px) {
  .foundry-main-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1100px) {
  .panel[data-panel="autopilot"] .container {
    max-width: var(--maxw);
  }

  .panel[data-panel="sports-autopilot"] .container {
    max-width: var(--maxw);
  }
}

@media (max-width: 760px) {
  .panel[data-panel="autopilot"] #foundry-source-form .form-grid {
    grid-template-columns: 1fr;
  }

  .panel[data-panel="sports-autopilot"] #sports-foundry-form .form-grid {
    grid-template-columns: 1fr;
  }

  .sports-foundry-workflow-toggle {
    grid-template-columns: 1fr;
  }
}

#forecast-output.panel-output {
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

.notification-log {
  display: grid;
  gap: 10px;
  max-height: 300px;
  overflow: auto;
  padding-right: 4px;
}

.notification-log-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-solid);
  padding: 10px 12px;
  display: grid;
  gap: 6px;
}

.notification-log-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.notification-pref-list {
  display: grid;
  gap: 10px;
  margin: 10px 0 8px;
}

.notification-pref-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.82);
}

.notification-pref-copy {
  display: grid;
  gap: 3px;
}

.notification-pref-title {
  font-weight: 700;
  color: var(--ink-2);
}

.notification-pref-hint {
  font-size: 0.8rem;
  color: var(--ink-3);
}

.notification-pref-item input[type="checkbox"] {
  appearance: none;
  width: 44px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid rgba(18, 24, 42, 0.3);
  background: rgba(233, 237, 247, 0.92);
  position: relative;
  margin: 0;
  transition: border-color 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

.notification-pref-item input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(18, 24, 42, 0.32);
  transition: transform 0.18s ease;
}

.notification-pref-item input[type="checkbox"]:checked {
  border-color: #1d5ed8;
  background: #1d5ed8;
}

.notification-pref-item input[type="checkbox"]:checked::after {
  transform: translateX(20px);
}

.notification-pref-item input[type="checkbox"]:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.notification-consent-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 6px;
}

.notification-consent-item {
  min-width: 0;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.82);
}

.notification-consent-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 3px 0 0;
}

.notification-consent-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.notification-consent-title {
  line-height: 1.35;
  font-weight: 600;
  color: var(--ink-2);
  overflow-wrap: anywhere;
}

.panel[data-panel="notifications"] .content-grid {
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: 22px;
}

.notification-privacy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.notification-privacy-select {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  min-height: 44px;
  color: var(--ink-1);
  padding: 0 12px;
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.notification-privacy-select:focus {
  outline: 2px solid rgba(45, 108, 223, 0.22);
  border-color: rgba(45, 108, 223, 0.5);
}

.notification-privacy-grid .field {
  gap: 2px;
  margin: 0;
  align-items: start;
}

.notification-privacy-grid .label {
  margin-bottom: 2px;
  line-height: 1.2;
}

@media (max-width: 760px) {
  .notification-consent-grid {
    grid-template-columns: 1fr;
  }

  .notification-privacy-grid {
    grid-template-columns: 1fr;
  }
}

#ticker-output {
  max-height: none;
  overflow: visible;
  padding-right: 0;
  overflow-wrap: normal;
  word-break: normal;
}

.output-stack {
  display: grid;
  gap: 8px;
}

.meta-line {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.table-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.table-wrap {
  width: 100%;
  overflow: auto;
  border-radius: 16px;
  border: 1px solid var(--line);
}

.link-button {
  background: transparent;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--ink-2);
  cursor: pointer;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.link-button:hover {
  color: var(--accent-2);
}

.forecast-chart-shell {
  display: grid;
  margin-top: 10px;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(98, 118, 147, 0.18);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(249, 251, 255, 0.98), rgba(240, 245, 252, 0.92));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.forecast-chart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

[data-theme="dark"] .forecast-chart-shell {
  border-color: rgba(206, 221, 255, 0.12);
  background: linear-gradient(180deg, rgba(22, 31, 52, 0.96), rgba(16, 23, 40, 0.94));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.forecast-output-plot {
  width: 100%;
  min-height: 650px;
  border-radius: 18px;
  overflow: hidden;
}

.horizon-rationale {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(240, 180, 41, 0.10);
  border: 1px solid rgba(240, 180, 41, 0.22);
}

@media (max-width: 720px) {
  .forecast-output-plot {
    min-height: 500px;
  }
}

.news-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px 16px;
  background: var(--surface-solid);
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.news-card--with-thumb {
  grid-template-columns: 88px minmax(0, 1fr);
  align-items: start;
  gap: 14px;
}

.news-thumb {
  width: 88px;
  height: 88px;
  border-radius: 16px;
  border: 1px solid var(--line);
  object-fit: cover;
  background: var(--paper-2);
}

.news-thumb--fallback {
  border-style: dashed;
}

.news-body {
  display: grid;
  gap: 8px;
}

.news-title {
  font-weight: 800;
  color: var(--ink);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-meta {
  color: var(--graphite);
}

.news-summary {
  color: var(--ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-link {
  font-weight: 700;
  color: var(--ink-2);
}

.news-link:hover {
  color: var(--accent-2);
}

.screener-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 6px 0 2px;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper-2) 78%, white 22%);
}

.screener-filter-tab {
  border: 1px solid var(--line);
  background: var(--surface-solid);
  color: var(--ink-2);
  border-radius: 999px;
  padding: 7px 12px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
}

.screener-filter-tab:hover {
  border-color: color-mix(in srgb, var(--ink-2) 35%, var(--line) 65%);
  color: var(--ink);
}

.screener-filter-tab.is-active {
  color: #fff;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
  border-color: transparent;
  box-shadow: 0 10px 20px rgba(17, 24, 39, 0.2);
}

.screener-filter-groups {
  display: grid;
  gap: 12px;
}

.screener-filter-group {
  display: none;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper-2);
  padding: 14px;
}

.screener-filter-group.is-active {
  display: block;
}

.screener-filter-group[hidden] {
  display: none !important;
}

.screener-filter-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.screener-filter-grid .field {
  margin: 0;
}

#screener-model {
  border: 1px solid rgba(15, 23, 42, 0.22);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96) 0%, rgba(243, 247, 255, 0.92) 100%);
  box-shadow: 0 8px 16px rgba(17, 24, 39, 0.08);
  font-weight: 700;
}

.ai-owner-identity {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

#market-social-output .x-post-card:last-child {
  margin-bottom: 0;
}

.help-layout {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.help-sidebar {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-solid);
  padding: 12px;
  display: grid;
  gap: 8px;
  position: sticky;
  top: calc(var(--dock-top) + 10px);
}

.help-sidebar .small {
  margin: 0;
}

.help-sidebar a {
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.84rem;
}

.help-sidebar a:hover {
  color: var(--accent-2);
}

.help-content {
  display: grid;
  gap: 14px;
}

.help-article {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-solid);
  padding: 14px 16px;
  display: grid;
  gap: 10px;
}

.help-article h3 {
  margin: 0;
}

.help-article p {
  margin: 0;
}

.help-kv-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#x-trending-output {
  display: grid;
  gap: 10px;
}

.x-empty-state {
  display: grid;
  gap: 8px;
}

.x-variant-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.x-pagination {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.x-post-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-solid);
  padding: 12px;
  display: grid;
  gap: 8px;
}

.x-post-top {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.x-post-author {
  font-weight: 800;
  color: var(--ink);
}

.x-post-handle {
  color: var(--graphite);
}

.x-post-text {
  color: var(--ink-2);
  line-height: 1.45;
  white-space: pre-wrap;
}

.x-post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--graphite);
}

.x-post-link {
  color: var(--ink-2);
  font-weight: 700;
}

.x-post-link:hover {
  color: var(--accent-2);
}

.x-story-divider {
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.x-story-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-solid);
  padding: 12px;
  display: grid;
  gap: 8px;
}

.x-story-title {
  font-weight: 800;
  color: var(--ink);
}

.x-story-hook {
  color: var(--ink-2);
  line-height: 1.4;
  white-space: pre-wrap;
}

.x-story-summary {
  line-height: 1.4;
}

@media (max-width: 1200px) {
  .screener-filter-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .screener-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .help-layout {
    grid-template-columns: 1fr;
  }

  .help-sidebar {
    position: static;
  }
}

@media (max-width: 640px) {
  .screener-filter-grid {
    grid-template-columns: 1fr;
  }

  .help-kv-grid {
    grid-template-columns: 1fr;
  }
}

.options-meta {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper-2);
}

.option-block {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px 12px;
  background: var(--surface-solid);
  margin-top: 12px;
}

.option-block summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--ink);
}

.row-itm td {
  background: rgba(58, 181, 162, 0.12);
}

.watchlist-item {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px 14px;
  background: var(--surface-solid);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: start;
  margin-bottom: 12px;
}

.alert-item {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px 14px;
  background: var(--surface-solid);
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.alert-item[data-status="triggered"] {
  border-color: rgba(226, 90, 44, 0.55);
  box-shadow: 0 14px 26px rgba(226, 90, 44, 0.12);
  background: rgba(255, 247, 230, 0.96);
}

.alert-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.productivity-shell {
  display: grid;
  gap: 24px;
}

.productivity-grid {
  display: grid;
  grid-template-columns: minmax(320px, 360px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.productivity-grid > * {
  min-width: 0;
}

.productivity-form {
  position: sticky;
  top: calc(var(--dock-top) + 8px);
  padding: 16px;
  display: grid;
  gap: 10px;
}

#productivity .productivity-form h3 {
  margin: 0 0 2px;
  font-size: 1.02rem;
}

#productivity .productivity-form .field {
  gap: 4px;
}

#productivity .form-grid-compact {
  gap: 10px;
}

#productivity .productivity-form textarea {
  min-height: 82px;
}

#productivity .productivity-form .cta {
  padding: 10px 14px;
}

#productivity #task-status-text {
  min-height: 1.1rem;
  margin: 0;
}

.productivity-board-wrap,
.productivity-calendar-wrap {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.productivity-head {
  display: grid;
  gap: 4px;
}

.kanban-host {
  min-height: 280px;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.kanban {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
  width: 100%;
  max-width: 100%;
}

.kanban-col {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  background: var(--surface-solid);
  min-height: 300px;
  min-width: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
}

.kanban-col.drag-over {
  outline: 2px solid rgba(58, 181, 162, 0.75);
  background: rgba(58, 181, 162, 0.1);
}

.kanban-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}

.kanban-col-body {
  display: grid;
  gap: 12px;
  max-height: 620px;
  overflow: auto;
  padding-right: 4px;
  min-width: 0;
}

.task-card {
  border: 1px solid rgba(18, 24, 42, 0.14);
  border-radius: 16px;
  padding: 12px;
  background: var(--surface-solid);
  box-shadow: 0 10px 18px rgba(26, 33, 56, 0.06);
  display: grid;
  gap: 10px;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.task-card[draggable="true"] {
  cursor: grab;
}

.task-card.dragging {
  opacity: 0.65;
}

.task-title {
  font-weight: 900;
  color: var(--ink);
  line-height: 1.3;
  font-size: 0.94rem;
}

.task-meta {
  line-height: 1.35;
}

.task-notes {
  line-height: 1.45;
  max-height: 4.2em;
  overflow: hidden;
}

.task-actions {
  display: grid;
  gap: 10px;
  margin-top: 2px;
}

.task-move-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(74px, 1fr));
  gap: 7px;
}

#productivity .task-actions .task-chip {
  text-align: center;
  width: 100%;
  min-height: 32px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#productivity .task-actions .task-chip.danger {
  width: auto;
  justify-self: start;
}

.task-chip {
  border: 1px solid rgba(18, 24, 42, 0.18);
  border-radius: 999px;
  padding: 6px 10px;
  background: transparent;
  cursor: pointer;
  font-weight: 800;
  font-size: 0.82rem;
}

.task-chip:hover {
  background: #fff7e6;
}

.task-chip[aria-pressed="true"] {
  background: rgba(240, 180, 41, 0.16);
  border-color: rgba(240, 180, 41, 0.42);
}

.task-chip.active {
  background: rgba(240, 180, 41, 0.16);
  border-color: rgba(240, 180, 41, 0.42);
}

.task-chip.danger {
  border-color: rgba(155, 43, 26, 0.45);
  color: #9b2b1a;
}

.csv-controls {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
}

.csv-toolbar {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  background: var(--surface-solid);
  margin: 0 0 12px;
}

.csv-toolbar.is-bottom {
  margin: 12px 0 0;
}

.csv-controls .csv-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.csv-footnote {
  color: var(--ink-2);
  font-weight: 600;
}

#predictions-preview .muted {
  color: var(--ink-2);
}

#predictions-preview .task-chip[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

#predictions-preview .task-chip:not([disabled]) {
  border-color: rgba(18, 24, 42, 0.28);
}

.task-upcoming {
  display: grid;
  gap: 12px;
}

.task-upcoming-row {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  background: var(--surface-solid);
  display: grid;
  gap: 6px;
}

.tasks-calendar {
  overflow: auto;
  padding-bottom: 8px;
}

.calendar-wrap {
  display: grid;
  gap: 14px;
}

.calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.calendar-nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
  min-width: 900px;
}

.calendar-dow {
  font-size: 0.72rem;
  font-weight: 900;
  color: var(--ink-2);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 8px;
}

.calendar-cell {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  min-height: 156px;
  background: var(--surface-solid);
  display: grid;
  gap: 10px;
  align-content: start;
}

.calendar-cell--out {
  opacity: 0.55;
  background: rgba(18, 24, 42, 0.03);
}

.calendar-cell--today {
  border-color: rgba(240, 180, 41, 0.65);
  box-shadow: 0 14px 24px rgba(240, 180, 41, 0.12);
}

.calendar-cell-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.calendar-day {
  font-weight: 950;
  color: var(--ink);
}

.calendar-tasks {
  display: grid;
  gap: 5px;
}

.calendar-task {
  font-size: 0.76rem;
  line-height: 1.28;
  padding: 6px 8px;
  border-radius: 10px;
  border: 1px solid rgba(18, 24, 42, 0.14);
  background: rgba(18, 24, 42, 0.06);
  color: var(--ink);
  min-height: 38px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.calendar-task[data-status="doing"] {
  background: rgba(240, 180, 41, 0.16);
  border-color: rgba(240, 180, 41, 0.3);
}

.calendar-task[data-status="done"] {
  background: rgba(58, 181, 162, 0.16);
  border-color: rgba(58, 181, 162, 0.3);
}

.calendar-task--more {
  background: rgba(18, 24, 42, 0.04);
  color: var(--ink-2);
  min-height: auto;
  white-space: nowrap;
  display: block;
}

.calendar-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  border: 1px solid var(--line);
  color: var(--ink-2);
  background: rgba(18, 24, 42, 0.06);
}

.skeleton {
  display: grid;
  gap: 10px;
}

.output-loading-stack {
  display: grid;
  gap: 12px;
}

.output-loading-indicator {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(18, 24, 42, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
}

.output-loading-copy {
  display: grid;
  gap: 4px;
}

.output-loading-title {
  font-size: 0.86rem;
  line-height: 1.2;
}

.spinner-ring {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid rgba(11, 77, 122, 0.18);
  border-top-color: #0b4d7a;
  animation: quantura-spin 0.8s linear infinite;
  flex: 0 0 auto;
}

.skeleton-line {
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(18, 24, 42, 0.08) 0%, rgba(18, 24, 42, 0.16) 45%, rgba(18, 24, 42, 0.08) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.2s ease-in-out infinite;
}

.w85 { width: 85%; }
.w70 { width: 70%; }
.w50 { width: 50%; }

.native-inline-ad-slot {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-solid);
  box-shadow: var(--shadow-soft);
  padding: 12px;
  margin-top: 12px;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.native-inline-ad-inner {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.native-inline-ad-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.native-inline-ad-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(226, 90, 44, 0.18);
  color: #8c3518;
  border: 1px solid rgba(226, 90, 44, 0.35);
}

.native-inline-ad-choices {
  font-size: 0.72rem;
  color: var(--ink-3);
}

.native-inline-ad-main {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.native-inline-ad-copy {
  min-width: 0;
}

.native-inline-ad-title {
  margin: 0;
  font-size: 1rem;
  line-height: 1.3;
}

.native-inline-ad-body {
  margin: 6px 0 0;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--ink-3);
  overflow-wrap: anywhere;
}

.native-inline-ad-meta {
  margin-top: 6px;
  font-size: 0.78rem;
  color: var(--ink-3);
}

.native-inline-ad-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
}

.native-inline-ad-icon-fallback {
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #1b4aa0;
  background: rgba(48, 132, 220, 0.18);
}

.native-inline-ad-media {
  width: 100%;
  min-height: 118px;
  border-radius: 12px;
  border: 1px solid var(--line);
  object-fit: cover;
  background: linear-gradient(135deg, rgba(226, 90, 44, 0.14), rgba(61, 189, 204, 0.2));
}

.native-inline-ad-media-fallback {
  min-height: 100px;
}

.native-inline-ad-cta {
  justify-self: start;
}

#native-ad-container {
  width: 100%;
  max-width: 100%;
  margin-top: 12px;
}

.native-inline-ad-skeleton {
  display: grid;
  gap: 10px;
}

@keyframes shimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

@keyframes quantura-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.data-table th,
.data-table td {
  border-bottom: 1px solid var(--line);
  padding: 10px;
  text-align: left;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
}

#fiscaldata-macro-groups,
#fiscaldata-macro-groups .content-grid {
  min-width: 0;
}

#fiscaldata-macro-groups .fiscaldata-card {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  contain: layout paint;
}

#fiscaldata-macro-groups section {
  min-width: 0;
}

#fiscaldata-macro-groups .content-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 14px;
}

.fiscaldata-endpoint,
.fiscaldata-card-meta,
.fiscaldata-detail-line {
  margin-top: 8px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.fiscaldata-card-table,
.fiscaldata-detail-table {
  margin-top: 10px;
  width: 100%;
  min-width: 0;
}

.fiscaldata-card-actions {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.fiscaldata-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface-solid) 96%, var(--paper-2) 4%);
  -webkit-overflow-scrolling: touch;
}

.fiscaldata-card .panel-output,
.fiscaldata-card .fiscaldata-detail-line {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.insider-table.fiscaldata-macro-table {
  width: 100%;
  min-width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}

.insider-table.fiscaldata-macro-table th,
.insider-table.fiscaldata-macro-table td {
  border-bottom: 1px solid var(--line);
  padding: 9px 10px;
  vertical-align: top;
}

.insider-table.fiscaldata-macro-table th {
  background: color-mix(in srgb, var(--paper-2) 75%, var(--surface-solid) 25%);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-2);
  text-transform: none;
}

.insider-table.fiscaldata-macro-table td {
  font-size: 0.84rem;
  color: var(--ink);
  white-space: normal;
  text-overflow: ellipsis;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.insider-table.fiscaldata-macro-table tbody tr:nth-child(even) td {
  background: color-mix(in srgb, var(--paper-2) 24%, var(--surface-solid) 76%);
}

.fiscaldata-detail-code {
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.ticker-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.ticker-pill {
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  font-weight: 600;
  text-align: center;
  cursor: pointer;
}

.ticker-pill:hover {
  border-color: rgba(226, 90, 44, 0.6);
  box-shadow: 0 10px 18px rgba(26, 33, 56, 0.06);
}

.trending-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
}

.trending-card,
.trending-hot-chip {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  background: var(--surface-solid);
  box-shadow: 0 10px 18px rgba(26, 33, 56, 0.06);
  display: grid;
  gap: 10px;
  cursor: pointer;
  text-align: left;
  width: 100%;
  min-height: 96px;
  font: inherit;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.trending-card:hover,
.trending-hot-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(226, 90, 44, 0.45);
  box-shadow: 0 14px 24px rgba(26, 33, 56, 0.09);
}

.trending-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.trending-symbol {
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trending-logo-wrap {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  overflow: hidden;
  flex: 0 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.08);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
}

.trending-logo-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.9);
}

.trending-logo-img--fallback {
  background: transparent;
}

.trending-price {
  font-weight: 900;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.trending-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.trending-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.82rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.trending-chip--up {
  background: rgba(58, 181, 162, 0.16);
  border-color: rgba(58, 181, 162, 0.32);
  color: #0f6b53;
}

.trending-chip--down {
  background: rgba(226, 90, 44, 0.14);
  border-color: rgba(226, 90, 44, 0.3);
  color: #9b2b1a;
}

.trending-chip--flat {
  background: rgba(18, 24, 42, 0.04);
  border-color: var(--line);
  color: var(--ink-2);
}

.intel-head {
  display: grid;
  gap: 8px;
}

.intel-name {
  font-weight: 900;
  color: var(--ink);
}

.intel-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.intel-stat {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  background: var(--paper-2);
}

.intel-stat-v {
  font-weight: 900;
  color: var(--ink);
}

.intel-summary {
  margin-top: 12px;
  color: var(--graphite);
  line-height: 1.65;
}

.intel-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 14px;
}

.intel-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.intel-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.intel-k {
  font-weight: 800;
  color: var(--ink-2);
}

.intel-v {
  color: var(--ink);
}

.intel-analyst {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.intel-subtabs {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

#ticker-predictions-output {
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

.predictions-shell {
  display: grid;
  gap: 14px;
}

.predictions-toolbar {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.45);
  display: grid;
  gap: 10px;
}

.predictions-tabs {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
}

.predictions-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
}

.predictions-search-row input {
  min-width: 0;
}

.predictions-include-closed {
  display: inline-flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 100%;
  min-width: 0;
  font-size: 0.82rem;
  color: var(--graphite);
  font-weight: 700;
}

.predictions-include-closed input {
  flex: 0 0 auto;
  margin-top: 2px;
}

.predictions-include-closed span {
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

.predictions-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.predictions-events {
  display: grid;
  gap: 12px;
}

.prediction-event-group {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.34);
  padding: 12px;
  display: grid;
  gap: 10px;
}

.prediction-event-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.prediction-event-title {
  margin: 0;
  font-size: 1rem;
  color: var(--ink-2);
}

.prediction-card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.prediction-market-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px;
  background: rgba(255, 255, 255, 0.48);
  display: grid;
  gap: 8px;
}

.prediction-market-row {
  background: linear-gradient(160deg, #0a1322 0%, #0f1b2f 100%);
  border-color: rgba(77, 111, 161, 0.45);
  color: #eaf1ff;
  box-shadow: inset 0 0 0 1px rgba(128, 170, 235, 0.12);
}

.prediction-market-row .muted {
  color: rgba(191, 207, 233, 0.84);
}

.prediction-market-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.prediction-market-row-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(240px, auto);
  gap: 12px;
  align-items: center;
}

.prediction-market-row-question {
  display: grid;
  gap: 6px;
}

.prediction-market-row-prob {
  display: grid;
  justify-items: center;
  gap: 4px;
  min-width: 90px;
}

.prediction-market-prob {
  font-size: 2.2rem;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0.01em;
  color: #f8fbff;
}

.prediction-market-row-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(110px, 1fr));
  gap: 8px;
}

.prediction-buy-btn {
  border: 0;
  border-radius: 10px;
  min-height: 44px;
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1.1;
  color: #e5f2ff;
  cursor: default;
}

.prediction-buy-btn.yes {
  background: linear-gradient(140deg, rgba(31, 114, 76, 0.9) 0%, rgba(41, 182, 123, 0.86) 100%);
}

.prediction-buy-btn.no {
  background: linear-gradient(140deg, rgba(126, 30, 30, 0.9) 0%, rgba(188, 52, 62, 0.86) 100%);
}

.prediction-market-card-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--graphite);
}

.prediction-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 9px;
  background: rgba(11, 16, 32, 0.05);
  color: var(--ink-2);
  font-weight: 800;
}

.prediction-market-row .prediction-chip {
  border-color: rgba(130, 169, 228, 0.4);
  background: rgba(115, 160, 228, 0.16);
  color: #d9e9ff;
}

.prediction-market-title {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.prediction-market-row .prediction-market-title {
  color: #f4f8ff;
  font-size: 1.05rem;
}

.prediction-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.prediction-market-row .prediction-pill-row {
  margin-top: 2px;
}

.prediction-outcome-pill {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0;
  background: rgba(255, 255, 255, 0.82);
  min-height: 32px;
  overflow: hidden;
  cursor: default;
}

.prediction-market-row .prediction-outcome-pill {
  border-color: rgba(128, 170, 235, 0.34);
  background: rgba(11, 25, 45, 0.8);
}

.prediction-outcome-pill-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: rgba(29, 78, 216, 0.18);
  width: 0;
  transition: width 0.24s ease;
}

.prediction-outcome-pill.yes .prediction-outcome-pill-fill {
  background: rgba(34, 197, 94, 0.2);
}

.prediction-outcome-pill.no .prediction-outcome-pill-fill {
  background: rgba(248, 113, 113, 0.2);
}

.prediction-outcome-pill-text {
  position: relative;
  z-index: 1;
  display: inline-flex;
  padding: 6px 10px;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--ink);
}

.prediction-market-row .prediction-outcome-pill-text {
  color: #e8f1ff;
}

.prediction-market-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.prediction-warning {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.prediction-no-price-badge {
  display: inline-flex;
  align-items: center;
  border: 1px dashed var(--line);
  border-radius: 999px;
  padding: 4px 10px;
}

.predictions-show-more-row {
  display: flex;
  justify-content: center;
}

.prediction-skeleton-card {
  pointer-events: none;
}

.prediction-skeleton-line {
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(148, 163, 184, 0.16) 0%, rgba(148, 163, 184, 0.38) 50%, rgba(148, 163, 184, 0.16) 100%);
  background-size: 180% 100%;
  animation: predictionSkeletonPulse 1.2s ease-in-out infinite;
}

.prediction-skeleton-line.short {
  width: 35%;
}

.prediction-skeleton-line.medium {
  width: 60%;
}

@keyframes predictionSkeletonPulse {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 180% 50%;
  }
}

.predictions-shell {
  --prediction-surface: #ffffff;
  --prediction-border: #e5e7eb;
  --prediction-ink: #111827;
  --prediction-muted: #6b7280;
  --prediction-subtle: #f8fafc;
  --prediction-accent: #0b0e11;
  --prediction-green: #00c805;
  --prediction-red: #ff3b30;
  display: grid;
  gap: 12px;
}

.predictions-toolbar {
  border: 1px solid var(--prediction-border);
  border-radius: 16px;
  padding: 12px;
  background: var(--prediction-surface);
  display: grid;
  gap: 10px;
}

.predictions-tabs {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
}

.predictions-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
}

.predictions-search-row input {
  min-width: 0;
}

.predictions-include-closed {
  display: inline-flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 100%;
  min-width: 0;
  font-size: 0.82rem;
  color: var(--prediction-muted);
  font-weight: 700;
}

.predictions-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--prediction-muted);
}

.predictions-events {
  display: grid;
  gap: 12px;
}

.prediction-event-group {
  border: 1px solid var(--prediction-border);
  border-radius: 20px;
  background: var(--prediction-surface);
  padding: 16px;
  display: grid;
  gap: 14px;
}

.prediction-event-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
}

.prediction-event-main {
  display: flex;
  gap: 14px;
  min-width: 0;
}

.prediction-event-icon-shell {
  flex: 0 0 auto;
}

.prediction-event-icon {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  object-fit: cover;
  background: var(--prediction-accent);
  border: 1px solid var(--prediction-border);
}

.prediction-event-icon-fallback {
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  font-weight: 900;
  color: #ffffff;
  background: var(--prediction-accent);
}

.prediction-event-copy {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.prediction-breadcrumbs {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--prediction-muted);
  font-size: 0.94rem;
  font-weight: 700;
}

.prediction-event-question {
  margin: 0;
  color: var(--prediction-ink);
  font-size: clamp(1.65rem, 2.8vw, 2.85rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.prediction-event-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.prediction-meta-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--prediction-border);
  background: var(--prediction-subtle);
  color: var(--prediction-muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.prediction-market-brand {
  display: inline-flex;
  align-items: center;
  color: var(--prediction-muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.prediction-countdown {
  display: grid;
  grid-template-columns: repeat(3, minmax(64px, 1fr));
  gap: 10px;
}

.prediction-countdown-unit {
  display: grid;
  gap: 6px;
  justify-items: center;
}

.prediction-countdown-digit {
  min-width: 64px;
  min-height: 64px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  border: 1px solid var(--prediction-border);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(243, 244, 246, 0.94) 48%, rgba(229, 231, 235, 0.96) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
  color: var(--prediction-ink);
  font-family: "SFMono-Regular", SFMono-Regular, ui-monospace, Menlo, Monaco, Consolas, monospace;
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.prediction-countdown-unit small {
  color: var(--prediction-muted);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.prediction-countdown.is-inactive .prediction-countdown-digit {
  opacity: 0.72;
}

.prediction-market-list {
  display: grid;
}

.prediction-list-row {
  display: grid;
  grid-template-columns: minmax(118px, 220px) minmax(92px, 120px) minmax(280px, 1fr);
  gap: 16px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--prediction-border);
}

.prediction-list-row:first-child {
  border-top: 0;
}

.prediction-list-row-target {
  display: grid;
  gap: 4px;
}

.prediction-target-price {
  color: var(--prediction-ink);
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.prediction-row-volume {
  color: var(--prediction-muted);
}

.prediction-list-row-probability {
  display: flex;
  justify-content: center;
}

.prediction-market-prob {
  color: var(--prediction-ink);
  font-size: clamp(2.35rem, 3.2vw, 3.2rem);
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.prediction-market-row-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.prediction-trade-btn {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition:
    transform 120ms ease,
    box-shadow 120ms ease,
    background 120ms ease,
    border-color 120ms ease;
}

.prediction-trade-btn strong {
  font-size: 1.08rem;
}

.prediction-trade-btn.yes {
  background: rgba(0, 200, 5, 0.12);
  border-color: rgba(0, 200, 5, 0.22);
  color: #008b04;
}

.prediction-trade-btn.no {
  background: rgba(255, 59, 48, 0.12);
  border-color: rgba(255, 59, 48, 0.22);
  color: #d92c23;
}

.prediction-trade-btn:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
}

.prediction-trade-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.prediction-card-grid {
  display: grid;
  gap: 12px;
}

.prediction-skeleton-card {
  border: 1px solid var(--prediction-border);
  border-radius: 18px;
  background: var(--prediction-surface);
  padding: 14px;
  display: grid;
  gap: 10px;
}

.prediction-interstitial-overlay {
  position: fixed;
  inset: 0;
  z-index: 1600;
  display: grid;
  place-items: center;
  padding: 24px;
}

.prediction-interstitial-overlay.hidden {
  display: none;
}

.prediction-interstitial-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 11, 18, 0.72);
  backdrop-filter: blur(12px);
}

.prediction-interstitial-card {
  position: relative;
  width: min(560px, 100%);
  border-radius: 24px;
  border: 1px solid var(--prediction-border);
  background: var(--prediction-surface);
  color: var(--prediction-ink);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.28);
  padding: 20px;
  display: grid;
  gap: 16px;
}

.prediction-interstitial-topline,
.prediction-interstitial-footer,
.prediction-interstitial-creative {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.prediction-interstitial-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--prediction-subtle);
  border: 1px solid var(--prediction-border);
  color: var(--prediction-muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.prediction-interstitial-dismiss {
  border: 0;
  background: transparent;
  color: var(--prediction-muted);
  font-weight: 800;
  cursor: pointer;
}

.prediction-interstitial-dismiss:disabled {
  opacity: 0.62;
  cursor: wait;
}

.prediction-interstitial-body {
  display: grid;
  gap: 14px;
}

.prediction-interstitial-kicker {
  margin: 0;
  color: var(--prediction-muted);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.prediction-interstitial-body h3 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.prediction-interstitial-body p {
  margin: 0;
}

.prediction-interstitial-orb {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 30% 30%, rgba(0, 200, 5, 0.85), transparent 58%),
    radial-gradient(circle at 70% 70%, rgba(255, 59, 48, 0.8), transparent 55%),
    linear-gradient(160deg, #0b0e11 0%, #172033 100%);
}

.prediction-interstitial-price {
  color: var(--prediction-ink);
  font-size: 1.4rem;
  font-weight: 900;
}

body.prediction-interstitial-open {
  overflow: hidden;
}

[data-theme="dark"] .predictions-shell {
  --prediction-surface: #0b0e11;
  --prediction-border: rgba(229, 231, 235, 0.12);
  --prediction-ink: #f9fafb;
  --prediction-muted: #9ca3af;
  --prediction-subtle: rgba(255, 255, 255, 0.04);
  --prediction-accent: #0b0e11;
}

[data-theme="dark"] .prediction-countdown-digit {
  background:
    linear-gradient(180deg, rgba(20, 24, 32, 0.96) 0%, rgba(11, 14, 17, 0.98) 50%, rgba(7, 9, 12, 0.98) 100%);
  border-color: rgba(255, 255, 255, 0.09);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

[data-theme="dark"] .prediction-trade-btn.yes {
  background: rgba(0, 200, 5, 0.18);
  border-color: rgba(0, 200, 5, 0.28);
  color: #7cff83;
}

[data-theme="dark"] .prediction-trade-btn.no {
  background: rgba(255, 59, 48, 0.18);
  border-color: rgba(255, 59, 48, 0.28);
  color: #ff9c95;
}

[data-theme="dark"] .prediction-trade-btn:not(:disabled):hover {
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.32);
}

[data-theme="dark"] .prediction-interstitial-backdrop {
  background: rgba(2, 3, 5, 0.78);
}

@media (max-width: 780px) {
  .predictions-search-row {
    grid-template-columns: 1fr;
  }

  .prediction-event-hero {
    grid-template-columns: 1fr;
  }

  .prediction-countdown {
    justify-content: flex-start;
  }

  .prediction-list-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .prediction-list-row-probability {
    justify-content: flex-start;
  }

  .prediction-market-prob {
    font-size: 2.5rem;
  }

  .prediction-market-row-actions {
    grid-template-columns: 1fr;
  }

  .predictions-meta {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .prediction-event-main {
    flex-direction: column;
  }

  .prediction-event-icon,
  .prediction-event-icon-fallback {
    width: 60px;
    height: 60px;
  }

  .prediction-countdown-digit {
    min-width: 56px;
    min-height: 56px;
    font-size: 1.6rem;
  }

  .prediction-trade-btn {
    min-height: 48px;
  }

  .prediction-interstitial-card {
    padding: 18px;
  }

  .prediction-interstitial-body h3 {
    font-size: 1.7rem;
  }
}

@media (max-width: 980px) {
  .metrics,
  .content-grid,
  .insight-grid,
  .faq-grid,
  .use-case-grid,
  .pricing-grid,
  .auth-grid,
  .dashboard-grid,
  .form-grid,
  .ticker-grid {
    grid-template-columns: 1fr;
  }

  .use-case-card {
    grid-template-columns: 1fr;
  }

  .use-case-media {
    min-height: 96px;
  }
}

@media (max-width: 720px) {
  .order-actions {
    grid-template-columns: 1fr;
  }

  .upload-row {
    flex-direction: column;
    align-items: stretch;
  }

  .checkbox-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .insider-table.fiscaldata-macro-table {
    min-width: 320px;
  }

  .fiscaldata-card .hero-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

.app-layout {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 clamp(12px, 2.2vw, 32px) 48px;
  display: grid;
  grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
  gap: clamp(18px, 2vw, 32px);
  align-items: start;
}

.app-main {
  min-width: 0;
}

.app-main > .section > .container {
  max-width: none;
  margin: 0;
  padding: 0;
}

.app-sidebar {
  position: sticky;
  top: var(--dock-top, 96px);
  align-self: start;
  display: grid;
  gap: 16px;
}

.sidebar-card {
  background: var(--glass-tint);
  border: 1px solid var(--glass-border);
  border-radius: var(--glass-radius);
  padding: 18px;
  box-shadow: var(--glass-shadow);
  display: grid;
  gap: 10px;
}

.sidebar-nav {
  background: var(--glass-tint);
  border: 1px solid var(--glass-border);
  border-radius: var(--glass-radius);
  padding: 12px;
  box-shadow: var(--glass-shadow);
  display: grid;
  gap: 6px;
}

.sidebar-nav a {
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 600;
  color: var(--ink-2);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-link {
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 700;
  color: var(--ink-2);
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-nav a:hover {
  background: #fff7e6;
}

.sidebar-link:hover {
  background: #fff7e6;
}

.sidebar-link.active {
  background: linear-gradient(135deg, rgba(240, 180, 41, 0.22) 0%, rgba(58, 181, 162, 0.14) 100%);
  border: 1px solid rgba(240, 180, 41, 0.35);
}

@media (min-width: 981px) {
  .app-layout.is-sidebar-collapsed {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .app-layout.is-sidebar-collapsed .sidebar-card {
    display: none;
  }

  .app-layout.is-sidebar-collapsed .sidebar-nav {
    padding: 10px;
    gap: 8px;
  }

  .app-layout.is-sidebar-collapsed .sidebar-link {
    justify-content: center;
    padding: 12px 0;
    gap: 0;
  }

  .app-layout.is-sidebar-collapsed .sidebar-link span {
    display: none;
  }

  .app-layout.is-sidebar-collapsed .sidebar-link i {
    font-size: 1.25rem;
  }

  .sidebar-toggle {
    background: rgba(18, 24, 42, 0.04);
    border: 1px solid rgba(18, 24, 42, 0.1);
  }
}

.terminal-grid {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.chart-shell {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-solid);
  box-shadow: 0 12px 24px rgba(26, 33, 56, 0.06);
  padding: 14px;
  display: grid;
  gap: 12px;
}

.chart {
  width: 100%;
  min-height: 420px;
}

.chart .rangeslider-container,
.chart .modebar {
  display: none !important;
}

.chart-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.chart-range-group,
.chart-view-group,
.chart-theme-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.chart-control-btn {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  background: var(--surface-solid);
  color: var(--ink-2);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease;
}

.chart-control-btn:hover {
  border-color: rgba(226, 90, 44, 0.45);
}

.chart-control-btn.active {
  background: #0b0f1a;
  border-color: #0b0f1a;
  color: #ffffff;
}

.ai-owner-links {
  margin-top: 6px;
  flex-wrap: wrap;
}

.ai-owner-links .task-chip {
  text-decoration: none;
}

#indicator-chart.chart {
  min-height: 260px;
}

.tradingview-terminal {
  display: grid;
  gap: 10px;
}

.tradingview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.tv-span-2 {
  grid-column: span 2;
}

.tv-widget-status-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.tv-widget-slot {
  width: 100%;
  border: 1px solid rgba(18, 24, 42, 0.08);
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(31, 99, 255, 0.04), rgba(58, 181, 162, 0.04));
  min-height: 200px;
}

.tv-widget-slot iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.tv-slot-info {
  min-height: 220px;
}

.tv-slot-advanced {
  min-height: 500px;
}

.tv-slot-tape {
  min-height: 80px;
}

.tv-slot-company {
  min-height: 390px;
}

.tv-slot-fundamentals {
  min-height: 775px;
}

.tv-slot-technical {
  min-height: 425px;
}

.tv-slot-news {
  min-height: 600px;
}

.tv-widget-fallback {
  margin-top: 0;
  grid-column: span 2;
}

.tv-widget-credit {
  margin: 0;
}

.chart-shell.chart-engine-tradingview #ticker-chart {
  display: none !important;
}

.chart-shell.chart-engine-legacy #tradingview-terminal-root {
  display: none !important;
}

.studio-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(420px, 1fr);
  gap: 22px;
  align-items: start;
}

.studio-layout.is-main-hidden {
  grid-template-columns: minmax(0, 1fr);
}

.studio-layout.is-main-hidden .studio-main {
  display: none;
}

.studio-layout.is-panel-hidden {
  grid-template-columns: minmax(0, 1fr);
}

.studio-layout.is-panel-hidden .studio-panel {
  display: none;
}

.studio-main {
  min-width: 0;
  display: grid;
  gap: 16px;
}

.ticker-intelligence-hero {
  display: none;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px 20px;
  background:
    radial-gradient(circle at top left, rgba(31, 99, 255, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 244, 236, 0.94));
  box-shadow: 0 12px 24px rgba(26, 33, 56, 0.06);
}

.studio-layout.is-panel-hidden .ticker-intelligence-hero {
  display: grid;
  gap: 8px;
}

.ticker-intelligence-hero .panel-header {
  margin: 0;
}

.ticker-intelligence-hero-kicker {
  margin: 0;
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.studio-panel {
  min-width: 0;
  display: grid;
  gap: 14px;
  align-content: start;
}

.studio-panel .content-grid {
  grid-template-columns: 1fr;
}

.studio-chart {
  position: relative;
  top: 0;
  z-index: 1;
}

.studio-layout.is-panel-hidden .studio-main {
  gap: 18px;
}

.studio-layout.is-panel-hidden .studio-chart {
  min-height: calc(100vh - 220px);
}

.studio-layout.is-panel-hidden .chart-shell.studio-chart {
  padding: 16px;
}

.studio-layout.is-panel-hidden .tradingview-terminal {
  min-height: calc(100vh - 280px);
  align-content: start;
}

.studio-layout.is-panel-hidden .tv-slot-advanced {
  min-height: clamp(560px, 62vh, 860px);
}

.studio-layout.is-panel-hidden #intel-strip {
  grid-template-columns: minmax(0, 1fr);
}

.terminal-context {
  position: relative;
  top: 0;
  z-index: 2;
}

.terminal-context-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 14px;
  align-items: end;
}

.ticker-hint {
  margin-top: 12px;
}

.ticker-history {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.ticker-history-title {
  font-weight: 700;
}

.ticker-history-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ticker-history-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper-2);
}

.ticker-history-chip {
  border: none;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  padding: 6px 8px;
  border-radius: 999px;
  cursor: pointer;
}

.ticker-history-chip:hover {
  background: rgba(226, 90, 44, 0.08);
}

.ticker-history-remove {
  border: none;
  background: transparent;
  color: var(--ink-2);
  font-size: 1rem;
  line-height: 1;
  padding: 6px;
  border-radius: 999px;
  cursor: pointer;
}

.ticker-history-remove:hover {
  background: rgba(226, 90, 44, 0.14);
  color: var(--ink);
}

.studio-secondary {
  display: grid;
  gap: 16px;
}

.studio-secondary .panel-output {
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

#news-output,
#options-output {
  width: 100%;
  min-height: 360px;
}

.options-chain-panel {
  width: 100%;
}

.options-date-tool {
  margin-top: 14px;
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    radial-gradient(circle at top left, rgba(31, 93, 255, 0.08), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 244, 236, 0.92));
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
}

.options-date-tool-grid {
  gap: 12px;
  align-items: stretch;
}

.options-date-status {
  min-height: 92px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid rgba(15, 42, 97, 0.14);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
  color: var(--ink);
}

.options-date-status[data-state="ready"] {
  border-color: rgba(31, 93, 255, 0.22);
  background: linear-gradient(135deg, rgba(31, 93, 255, 0.12), rgba(255, 255, 255, 0.96));
}

.options-date-status[data-state="warn"] {
  border-color: rgba(226, 90, 44, 0.22);
  background: linear-gradient(135deg, rgba(240, 180, 41, 0.16), rgba(255, 250, 241, 0.96));
}

.options-date-status-value {
  font-size: 1.24rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--ink-2);
}

.options-date-status-detail {
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.45;
  color: var(--graphite);
}

.panel-header {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.screener-panel-header {
  gap: 4px;
  margin-top: 0;
  padding-top: 0;
}

.screener-panel-header h2,
.screener-panel-header p {
  margin-top: 0;
}

.learn-more {
  margin-top: 14px;
}

.learn-more summary {
  cursor: pointer;
  font-weight: 800;
}

.faq-section .section-title {
  margin-bottom: 14px;
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.faq-item {
  border: 1px solid rgba(18, 24, 42, 0.16);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(245, 248, 255, 0.88) 100%);
  padding: 15px 16px;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
  align-self: start;
}

.faq-item:hover {
  border-color: rgba(18, 24, 42, 0.28);
  box-shadow: 0 10px 18px rgba(26, 33, 56, 0.08);
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  font-weight: 800;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1.4;
  font-size: 0.97rem;
  position: relative;
  padding-right: 36px;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary i {
  color: var(--accent);
  font-size: 1.05rem;
  flex: 0 0 auto;
}

.faq-item summary .faq-icon-svg {
  width: 1.1rem;
  height: 1.1rem;
  color: var(--accent);
  flex: 0 0 auto;
}

.faq-item summary::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid rgba(18, 24, 42, 0.2);
  display: grid;
  place-items: center;
  color: var(--ink-2);
  background: rgba(18, 24, 42, 0.04);
  background-image:
    linear-gradient(currentColor, currentColor),
    linear-gradient(currentColor, currentColor);
  background-size: 10px 2px, 2px 10px;
  background-position: center;
  background-repeat: no-repeat;
  flex: 0 0 auto;
}

.faq-item[open] {
  border-color: rgba(240, 180, 41, 0.45);
  box-shadow: 0 12px 22px rgba(240, 180, 41, 0.14);
  transform: none;
}

.faq-item[open] summary::after {
  border-color: rgba(240, 180, 41, 0.42);
  color: #7b2b14;
  background: rgba(240, 180, 41, 0.12);
  background-image:
    linear-gradient(currentColor, currentColor),
    linear-gradient(currentColor, currentColor);
  background-size: 10px 2px, 0 0;
  background-position: center;
  background-repeat: no-repeat;
}

.faq-answer {
  margin: 13px 0 0;
  line-height: 1.58;
  color: var(--ink-2);
  font-size: 0.9rem;
  max-width: 62ch;
}

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 80;
}

body.modal-open {
  overflow: hidden;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 15, 26, 0.45);
  backdrop-filter: blur(6px);
}

.modal-card {
  position: relative;
  width: min(640px, calc(100% - 40px));
  z-index: 1;
}

.modal-dialog {
  position: relative;
  z-index: 1;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface-solid);
  color: var(--ink);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  flex-wrap: wrap;
  margin-top: 12px;
}

.modal-input {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 12px 14px;
  font: inherit;
  background: var(--surface-solid);
  color: var(--ink);
  margin-top: 6px;
}

.modal-input:focus {
  outline: 2px solid rgba(240, 180, 41, 0.42);
  outline-offset: 2px;
}

.foundry-chart-launcher {
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(240, 180, 41, 0.16), transparent 38%),
    linear-gradient(180deg, color-mix(in srgb, var(--surface-solid) 94%, white 6%), var(--surface-solid));
  padding: 18px;
}

.foundry-chart-launcher-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.foundry-chart-launcher-title {
  margin-top: 4px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
}

.foundry-chart-modal-card {
  width: min(1220px, calc(100% - 28px));
  max-height: min(90vh, 980px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 18px 18px 20px;
}

.foundry-chart-modal-head {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-right: 44px;
}

.foundry-chart-modal-head h3 {
  margin: 6px 0 0;
}

.foundry-chart-modal-plot {
  min-height: min(68vh, 760px);
  margin-top: 14px;
}

@media (max-width: 720px) {
  .foundry-chart-launcher-card {
    align-items: stretch;
    flex-direction: column;
  }

  .foundry-chart-modal-card {
    width: calc(100% - 16px);
    padding: 16px 14px 18px;
  }

  .foundry-chart-modal-plot {
    min-height: min(60vh, 620px);
  }
}

.solve-now-modal-card {
  width: min(720px, calc(100% - 40px));
  max-height: min(86vh, 860px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.solve-now-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.solve-now-head h3 {
  margin-bottom: 6px;
}

.solve-now-head .small {
  margin: 0;
}

.solve-now-form {
  margin-top: 14px;
  display: grid;
  gap: 10px;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}

.solve-now-input {
  min-height: 108px;
  resize: vertical;
}

.solve-now-controls {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.solve-now-actions {
  margin-top: 0;
}

.solve-now-actions .cta {
  min-height: 40px;
}

.solve-now-output {
  margin-top: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.68);
  padding: 14px;
  max-height: min(46vh, 430px);
  overflow: auto;
}

.solve-now-output h4 {
  margin: 0 0 6px;
}

.solve-now-output p {
  margin: 0 0 10px;
  line-height: 1.55;
}

.solve-now-output ol {
  margin: 0 0 10px 18px;
  padding: 0;
  display: grid;
  gap: 5px;
}

.solve-now-output details {
  margin: 0 0 8px;
}

.solve-now-output pre {
  margin: 8px 0 0;
  max-height: 220px;
  overflow: auto;
}

.solve-now-meta {
  margin-bottom: 8px;
}

.solve-now-disclaimer {
  margin: 0;
}

.markdown-output {
  color: var(--ink);
  line-height: 1.58;
  word-break: break-word;
}

.markdown-output p,
.markdown-output ul,
.markdown-output ol,
.markdown-output blockquote,
.markdown-output pre,
.markdown-output table {
  margin: 0 0 10px;
}

.markdown-output ul,
.markdown-output ol {
  padding-left: 18px;
}

.markdown-output code {
  font-family: "JetBrains Mono", "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.82rem;
  background: rgba(12, 23, 48, 0.08);
  border-radius: 6px;
  padding: 1px 6px;
}

.markdown-output pre {
  border: 1px solid var(--line);
  background: rgba(12, 23, 48, 0.06);
  border-radius: 12px;
  padding: 12px;
  overflow: auto;
}

.markdown-output pre code {
  background: transparent;
  padding: 0;
  border-radius: 0;
}

.markdown-output table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.markdown-output th,
.markdown-output td {
  border: 1px solid var(--line);
  padding: 6px 8px;
  text-align: left;
  vertical-align: top;
}

.markdown-output th {
  background: rgba(12, 23, 48, 0.06);
  font-weight: 600;
}

.markdown-output a {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.module-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
}

.module-picker-chip {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 11px 13px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(247, 244, 236, 0.92));
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.25;
  cursor: pointer;
  min-height: 52px;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.16s ease;
}

.module-picker-chip.is-selected {
  border-color: rgba(29, 94, 216, 0.48);
  background: linear-gradient(180deg, rgba(232, 241, 255, 0.95), rgba(221, 235, 255, 0.92));
  box-shadow: 0 10px 24px rgba(29, 94, 216, 0.14);
  transform: translateY(-1px);
}

.module-picker-chip:hover {
  border-color: rgba(29, 94, 216, 0.34);
  box-shadow: 0 8px 20px rgba(18, 24, 42, 0.08);
}

.module-picker-chip span {
  flex: 1 1 auto;
  min-width: 0;
}

.module-picker-chip input {
  margin: 0;
  appearance: none;
  order: 2;
  flex: 0 0 auto;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid rgba(18, 24, 42, 0.22);
  background: rgba(216, 222, 234, 0.92);
  position: relative;
  display: inline-block;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.module-picker-chip input::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(18, 24, 42, 0.28);
  transition: transform 0.16s ease;
}

.module-picker-chip input:checked {
  background: #1d5ed8;
  border-color: #1d5ed8;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.module-picker-chip input:checked::after {
  transform: translateX(18px);
}

.model-council-prompt-panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.62);
}

.model-council-prompt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.model-council-prompt-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.model-council-prompt-card {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink-2);
  border-radius: 12px;
  padding: 10px 11px;
  font-size: 0.82rem;
  line-height: 1.35;
  text-align: left;
  min-height: 82px;
  display: flex;
  align-items: flex-start;
  transition: transform 0.12s ease, border-color 0.18s ease, box-shadow 0.2s ease;
}

.model-council-prompt-card:hover {
  border-color: rgba(29, 94, 216, 0.5);
  box-shadow: 0 10px 20px rgba(29, 94, 216, 0.14);
  transform: translateY(-1px);
}

.model-council-improve-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 9px 11px;
  background: rgba(255, 255, 255, 0.82);
  width: fit-content;
}

.model-council-improve-toggle input[type="checkbox"] {
  appearance: none;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid rgba(18, 24, 42, 0.3);
  background: rgba(233, 237, 247, 0.92);
  position: relative;
  margin: 0;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.model-council-improve-toggle input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(18, 24, 42, 0.32);
  transition: transform 0.18s ease;
}

.model-council-improve-toggle input[type="checkbox"]:checked {
  border-color: #1d5ed8;
  background: #1d5ed8;
}

.model-council-improve-toggle input[type="checkbox"]:checked::after {
  transform: translateX(18px);
}

.model-council-toggle-label {
  color: var(--ink-2);
  font-weight: 600;
}

.model-council-cache-toggle {
  margin-top: 6px;
}

#ticker-query-improve-preview {
  min-height: 130px;
}

.model-council-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  margin-bottom: 8px;
}

.model-council-module {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.64);
}

.model-council-module + .model-council-module {
  margin-top: 8px;
}

.model-council-module summary {
  cursor: pointer;
  font-weight: 700;
}

.model-council-module pre {
  margin-top: 8px;
  max-height: 220px;
  overflow: auto;
}

.profile-feedback-button {
  margin-top: 10px;
}

/* Dark mode polish (override hard-coded light surfaces). */
[data-theme="dark"] .footer {
  background: var(--paper-2);
}

[data-theme="dark"] .footer-terms {
  background: rgba(18, 24, 42, 0.68);
  border-color: rgba(233, 237, 247, 0.2);
}

[data-theme="dark"] .faq-item {
  background: rgba(18, 24, 42, 0.72);
  border-color: rgba(233, 237, 247, 0.16);
}

[data-theme="dark"] .faq-item[open] {
  border-color: rgba(240, 180, 41, 0.42);
  box-shadow: 0 10px 20px rgba(240, 180, 41, 0.16);
}

[data-theme="dark"] .faq-item summary::after {
  border-color: rgba(233, 237, 247, 0.24);
  color: rgba(233, 237, 247, 0.92);
  background: rgba(233, 237, 247, 0.08);
}

[data-theme="dark"] .faq-item[open] summary::after {
  border-color: rgba(240, 180, 41, 0.48);
  color: #ffd089;
  background: rgba(240, 180, 41, 0.16);
}

[data-theme="dark"] .faq-answer {
  color: rgba(233, 237, 247, 0.88);
}

[data-theme="dark"] .media-card,
[data-theme="dark"] .sidebar-card,
[data-theme="dark"] .sidebar-nav {
  background: rgba(18, 24, 42, 0.78);
  border-color: rgba(233, 237, 247, 0.14);
}

[data-theme="dark"] .unsplash-card {
  background: rgba(18, 24, 42, 0.82);
  border-color: rgba(233, 237, 247, 0.18);
}

[data-theme="dark"] .brand-rail {
  background: linear-gradient(120deg, rgba(18, 24, 42, 0.9) 0%, rgba(12, 17, 30, 0.9) 100%);
  border-color: rgba(233, 237, 247, 0.2);
}

[data-theme="dark"] .brand-pill {
  background: rgba(18, 24, 42, 0.92);
  border-color: rgba(233, 237, 247, 0.22);
  color: var(--ink);
}

[data-theme="dark"] .social-link,
[data-theme="dark"] .badge-chip {
  background: rgba(18, 24, 42, 0.78);
  border-color: rgba(233, 237, 247, 0.18);
}

[data-theme="dark"] .module-picker-chip,
[data-theme="dark"] .model-council-module {
  background: rgba(18, 24, 42, 0.82);
  border-color: rgba(233, 237, 247, 0.2);
}

[data-theme="dark"] .ticker-intelligence-hero {
  background:
    radial-gradient(circle at top left, rgba(96, 145, 238, 0.16), transparent 36%),
    linear-gradient(180deg, rgba(18, 24, 42, 0.96), rgba(11, 15, 26, 0.98));
}

[data-theme="dark"] .module-picker-chip.is-selected {
  border-color: rgba(96, 145, 238, 0.72);
  background: linear-gradient(180deg, rgba(34, 58, 109, 0.66), rgba(25, 45, 90, 0.72));
  box-shadow: 0 10px 18px rgba(8, 12, 22, 0.42);
}

[data-theme="dark"] .module-picker-chip input {
  border-color: rgba(233, 237, 247, 0.26);
  background: rgba(80, 91, 121, 0.72);
}

[data-theme="dark"] .module-picker-chip input:checked {
  border-color: #6091ee;
  background: #6091ee;
}

[data-theme="dark"] .model-council-prompt-panel {
  background: rgba(18, 24, 42, 0.76);
  border-color: rgba(233, 237, 247, 0.18);
}

[data-theme="dark"] .model-council-prompt-card {
  background: rgba(12, 17, 30, 0.84);
  border-color: rgba(233, 237, 247, 0.16);
  color: rgba(233, 237, 247, 0.9);
}

[data-theme="dark"] .model-council-prompt-card:hover {
  border-color: rgba(96, 145, 238, 0.6);
  box-shadow: 0 12px 24px rgba(8, 12, 22, 0.5);
}

[data-theme="dark"] .model-council-improve-toggle {
  background: rgba(18, 24, 42, 0.86);
  border-color: rgba(233, 237, 247, 0.22);
}

[data-theme="dark"] .model-council-improve-toggle input[type="checkbox"] {
  border-color: rgba(233, 237, 247, 0.28);
  background: rgba(233, 237, 247, 0.18);
}

[data-theme="dark"] .model-council-improve-toggle input[type="checkbox"]:checked {
  border-color: #6091ee;
  background: #6091ee;
}

[data-theme="dark"] .model-council-toggle-label {
  color: rgba(233, 237, 247, 0.92);
}

[data-theme="dark"] .native-inline-ad-slot {
  background: rgba(18, 24, 42, 0.82);
  border-color: rgba(233, 237, 247, 0.2);
}

[data-theme="dark"] .notification-pref-item {
  background: rgba(18, 24, 42, 0.84);
  border-color: rgba(233, 237, 247, 0.2);
}

[data-theme="dark"] .notification-pref-title {
  color: rgba(233, 237, 247, 0.95);
}

[data-theme="dark"] .notification-pref-hint {
  color: rgba(233, 237, 247, 0.72);
}

[data-theme="dark"] .notification-pref-item input[type="checkbox"] {
  border-color: rgba(233, 237, 247, 0.3);
  background: rgba(233, 237, 247, 0.14);
}

[data-theme="dark"] .notification-pref-item input[type="checkbox"]:checked {
  border-color: #6091ee;
  background: #6091ee;
}

[data-theme="dark"] .options-date-tool {
  border-color: rgba(233, 237, 247, 0.18);
  background:
    radial-gradient(circle at top left, rgba(96, 145, 238, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(18, 24, 42, 0.96), rgba(11, 15, 26, 0.98));
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.28);
}

[data-theme="dark"] .options-date-status {
  border-color: rgba(233, 237, 247, 0.16);
  background: rgba(12, 17, 30, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  color: rgba(233, 237, 247, 0.92);
}

[data-theme="dark"] .options-date-status[data-state="ready"] {
  border-color: rgba(96, 145, 238, 0.34);
  background: linear-gradient(135deg, rgba(47, 99, 218, 0.34), rgba(16, 28, 58, 0.94));
}

[data-theme="dark"] .options-date-status[data-state="warn"] {
  border-color: rgba(240, 180, 41, 0.28);
  background: linear-gradient(135deg, rgba(146, 64, 14, 0.36), rgba(68, 35, 17, 0.92));
}

[data-theme="dark"] .options-date-status-value {
  color: rgba(233, 237, 247, 0.96);
}

[data-theme="dark"] .options-date-status-detail {
  color: rgba(233, 237, 247, 0.76);
}

[data-theme="dark"] .indicator-toggle-label {
  border-color: rgba(233, 237, 247, 0.18);
  background: linear-gradient(180deg, rgba(28, 35, 58, 0.94) 0%, rgba(18, 24, 42, 0.92) 100%);
  color: rgba(233, 237, 247, 0.92);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.24);
}

[data-theme="dark"] .indicator-toggle-label::before {
  background: rgba(233, 237, 247, 0.14);
  box-shadow: inset 0 0 0 1px rgba(233, 237, 247, 0.16);
}

[data-theme="dark"] .indicator-toggle-label::after {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

[data-theme="dark"] .indicator-toggle:hover .indicator-toggle-label {
  border-color: rgba(96, 145, 238, 0.42);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.34);
}

[data-theme="dark"] .indicator-toggle input:focus-visible + .indicator-toggle-label {
  border-color: rgba(96, 145, 238, 0.78);
  box-shadow: 0 0 0 4px rgba(96, 145, 238, 0.18), 0 16px 28px rgba(0, 0, 0, 0.34);
}

[data-theme="dark"] .indicator-toggle input:checked + .indicator-toggle-label {
  background: linear-gradient(135deg, #6091ee 0%, #2f63da 100%);
  border-color: rgba(96, 145, 238, 0.62);
  box-shadow: 0 18px 30px rgba(16, 28, 58, 0.46);
}

[data-theme="dark"] .indicator-toggle input:checked + .indicator-toggle-label::before {
  background: rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

[data-theme="dark"] .notification-privacy-select {
  background: rgba(18, 24, 42, 0.9);
  border-color: rgba(233, 237, 247, 0.25);
  color: rgba(233, 237, 247, 0.93);
}

[data-theme="dark"] .notification-privacy-select:focus {
  outline-color: rgba(96, 145, 238, 0.3);
  border-color: rgba(96, 145, 238, 0.6);
}

[data-theme="dark"] .native-inline-ad-badge {
  background: rgba(240, 180, 41, 0.2);
  border-color: rgba(240, 180, 41, 0.45);
  color: #ffd089;
}

[data-theme="dark"] .native-inline-ad-icon {
  background: rgba(12, 17, 30, 0.8);
}

[data-theme="dark"] .order-card,
[data-theme="dark"] .stat-card,
[data-theme="dark"] .price-card {
  background: var(--surface-solid);
}

[data-theme="dark"] .predictions-toolbar,
[data-theme="dark"] .prediction-event-group,
[data-theme="dark"] .prediction-market-card,
[data-theme="dark"] .prediction-outcome-pill,
[data-theme="dark"] .prediction-chip,
[data-theme="dark"] .prediction-no-price-badge {
  background: #0b0e11;
  border-color: rgba(229, 231, 235, 0.12);
}

[data-theme="dark"] .prediction-outcome-pill-fill {
  background: rgba(59, 130, 246, 0.22);
}

[data-theme="dark"] .prediction-outcome-pill.yes .prediction-outcome-pill-fill {
  background: rgba(34, 197, 94, 0.24);
}

[data-theme="dark"] .prediction-outcome-pill.no .prediction-outcome-pill-fill {
  background: rgba(248, 113, 113, 0.25);
}

[data-theme="dark"] .mobile-bottom-link {
  color: rgba(233, 237, 247, 0.9);
}

[data-theme="dark"] .mobile-bottom-link.active {
  background: linear-gradient(135deg, #1f5dff 0%, #0f3fb8 100%);
  border-color: rgba(31, 93, 255, 0.72);
  color: #ffffff;
}

[data-theme="dark"] .mobile-bottom-link.active i {
  color: #ffffff;
}

[data-theme="dark"] .status-select,
[data-theme="dark"] .input.notes-input,
[data-theme="dark"] .file-input,
[data-theme="dark"] .task-card,
[data-theme="dark"] .task-chip,
[data-theme="dark"] .calendar-task {
  background: rgba(18, 24, 42, 0.86);
  border-color: rgba(233, 237, 247, 0.18);
  color: var(--ink);
}

[data-theme="dark"] .sports-foundry-workflow-option span {
  border-color: rgba(233, 237, 247, 0.18);
  background:
    linear-gradient(135deg, rgba(17, 24, 39, 0.96), rgba(27, 37, 58, 0.94)),
    rgba(18, 24, 42, 0.9);
  color: rgba(233, 237, 247, 0.92);
  box-shadow: 0 14px 28px rgba(2, 6, 23, 0.34);
}

[data-theme="dark"] .sports-foundry-workflow-option:hover span {
  border-color: rgba(233, 237, 247, 0.28);
}

[data-theme="dark"] .sports-foundry-workflow-option input:checked + span {
  border-color: rgba(245, 200, 110, 0.38);
  background:
    linear-gradient(135deg, rgba(72, 48, 11, 0.96), rgba(108, 72, 19, 0.92)),
    rgba(92, 61, 16, 0.9);
  color: #ffe2a8;
  box-shadow: 0 18px 36px rgba(120, 78, 17, 0.26);
}

[data-theme="dark"] #screener-model {
  background: linear-gradient(135deg, rgba(18, 24, 42, 0.96) 0%, rgba(25, 35, 58, 0.9) 100%);
  border-color: rgba(233, 237, 247, 0.24);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .output-loading-indicator {
  background: rgba(18, 24, 42, 0.72);
  border-color: rgba(233, 237, 247, 0.14);
}

[data-theme="dark"] .spinner-ring {
  border-color: rgba(166, 209, 255, 0.18);
  border-top-color: #8ac8ff;
}

[data-theme="dark"] .cta.secondary.success {
  background: rgba(58, 181, 162, 0.2);
  border-color: rgba(58, 181, 162, 0.45);
  color: #b2f0e3;
}

[data-theme="dark"] .file-input {
  background: rgba(18, 24, 42, 0.72);
}

[data-theme="dark"] .calendar-task[data-status="doing"] {
  background: rgba(240, 180, 41, 0.18);
  border-color: rgba(240, 180, 41, 0.32);
}

[data-theme="dark"] .calendar-task[data-status="done"] {
  background: rgba(58, 181, 162, 0.18);
  border-color: rgba(58, 181, 162, 0.32);
}

[data-theme="dark"] .calendar-count {
  background: rgba(233, 237, 247, 0.08);
  border-color: rgba(233, 237, 247, 0.2);
  color: var(--ink);
}

[data-theme="dark"] .notice {
  background: rgba(240, 180, 41, 0.12);
  border-color: rgba(240, 180, 41, 0.28);
  color: var(--ink-2);
}

[data-theme="dark"] .sidebar-nav a:hover,
[data-theme="dark"] .sidebar-link:hover,
[data-theme="dark"] .task-chip:hover {
  background: rgba(240, 180, 41, 0.12);
}

[data-theme="dark"] .task-chip[aria-pressed="true"],
[data-theme="dark"] .task-chip.active {
  background: rgba(240, 180, 41, 0.22);
  border-color: rgba(240, 180, 41, 0.45);
}

[data-theme="dark"] .calendar-cell--out {
  opacity: 0.72;
  background: rgba(233, 237, 247, 0.04);
}

[data-theme="dark"] .skeleton-line {
  background: linear-gradient(90deg, rgba(233, 237, 247, 0.08) 0%, rgba(233, 237, 247, 0.16) 45%, rgba(233, 237, 247, 0.08) 100%);
  background-size: 200% 100%;
}

[data-theme="dark"] .toast {
  background: rgba(8, 12, 22, 0.98);
  color: #f8fbff;
  border: 1px solid rgba(233, 237, 247, 0.18);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.42), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}

[data-theme="dark"] .toast[data-variant="warn"] {
  background: rgba(124, 45, 18, 0.92);
  color: #fff4f0;
  border-color: rgba(255, 214, 204, 0.4);
}

[data-theme="dark"] .cta:not(.secondary):not(.google) {
  background: linear-gradient(135deg, rgba(240, 180, 41, 0.95) 0%, rgba(226, 90, 44, 0.88) 100%);
  color: #0b0f1a;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.45);
}

[data-theme="dark"] .order-actions .cta.update-status {
  color: #fff;
}

[data-theme="dark"] .cta.google {
  background: rgba(18, 24, 42, 0.92);
  color: var(--ink);
  border-color: rgba(233, 237, 247, 0.18);
}

[data-theme="dark"] .pill {
  background: rgba(58, 181, 162, 0.16);
  color: var(--ink);
  border: 1px solid rgba(58, 181, 162, 0.28);
}

[data-theme="dark"] .status {
  background: rgba(233, 237, 247, 0.1);
  color: var(--ink);
  border: 1px solid rgba(233, 237, 247, 0.14);
}

[data-theme="dark"] .trending-chip--up {
  color: rgba(185, 255, 242, 0.92);
}

[data-theme="dark"] .trending-chip--down {
  color: rgba(255, 200, 187, 0.92);
}

[data-theme="dark"] .trending-chip--flat {
  background: rgba(233, 237, 247, 0.06);
  border-color: rgba(233, 237, 247, 0.18);
  color: var(--ink-2);
}

[data-theme="dark"] #predictions-preview .muted {
  color: rgba(233, 237, 247, 0.92);
}

[data-theme="dark"] .csv-footnote {
  color: rgba(233, 237, 247, 0.92);
}

[data-theme="dark"] .csv-toolbar {
  background: rgba(18, 24, 42, 0.72);
  border-color: rgba(233, 237, 247, 0.18);
}

[data-theme="dark"] .logo span {
  background: linear-gradient(95deg, #8bb8ff 0%, #6dd3f5 44%, #6fe7cf 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.admin-page .status,
.admin-page .status.fulfilled,
.admin-page .status.in_progress,
.admin-page .status.cancelled {
  color: #fff;
}

@media (max-width: 980px) {
  .app-layout {
    grid-template-columns: 1fr;
    padding: 0 14px 40px;
  }

  .app-sidebar {
    position: relative;
    top: 0;
  }

  .sidebar-nav {
    display: none;
  }

  .app-sidebar.mobile-sidebar-open .sidebar-nav {
    display: grid;
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: calc(var(--mobile-bottom-nav-height) + var(--safe-area-bottom) + 72px);
    max-height: min(68vh, 620px);
    overflow: auto;
    z-index: 74;
    border-color: rgba(29, 94, 216, 0.26);
  }

  body.mobile-bottom-nav-enabled {
    padding-bottom: calc(var(--mobile-bottom-nav-height) + var(--safe-area-bottom) + 22px);
  }

  body.mobile-bottom-nav-enabled .app-layout {
    padding-bottom: calc(var(--mobile-bottom-nav-height) + var(--safe-area-bottom) + 28px);
  }

  body.mobile-bottom-nav-enabled .cookie-banner {
    bottom: calc(var(--mobile-bottom-nav-height) + var(--safe-area-bottom) + 16px);
  }

  .terminal-grid {
    grid-template-columns: 1fr;
  }

  .kanban {
    grid-template-columns: 1fr;
  }

  .productivity-grid {
    grid-template-columns: 1fr;
  }

  .productivity-form {
    position: relative;
    top: 0;
  }

  .calendar-grid {
    min-width: 700px;
  }

  .studio-layout {
    grid-template-columns: 1fr;
  }

  .studio-layout.is-panel-hidden {
    grid-template-columns: 1fr;
  }

  .studio-panel {
    order: 1;
  }

  .studio-main {
    order: 2;
  }

  .studio-chart,
  .terminal-context {
    position: relative;
    top: 0;
  }

  .studio-layout.is-panel-hidden .studio-panel {
    display: none;
  }

  .studio-layout.is-panel-hidden .studio-main {
    order: 1;
  }

  .studio-layout.is-panel-hidden .studio-chart,
  .studio-layout.is-panel-hidden .tradingview-terminal {
    min-height: auto;
  }

  .terminal-context-form {
    grid-template-columns: 1fr;
  }

  .tradingview-grid {
    grid-template-columns: 1fr;
  }

  .tv-span-2,
  .tv-widget-fallback {
    grid-column: span 1;
  }

  .news-data-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 981px) {
  .mobile-bottom-nav {
    display: none !important;
  }

  .cookie-banner {
    width: min(760px, calc(100% - 32px));
    left: 50%;
    right: auto;
    transform: translateX(-50%);
  }
}

@media (max-width: 1400px) {
  .studio-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .cookie-banner-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .cookie-banner-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .calendar-grid {
    min-width: 640px;
  }

  .calendar-cell {
    min-height: 138px;
  }

  .faq-item summary::after {
    width: 26px;
    height: 26px;
  }

  .faq-item summary {
    align-items: flex-start;
    padding-right: 40px;
  }
}

.promo-banner {
  background: linear-gradient(135deg, rgba(240, 180, 41, 0.14) 0%, rgba(31, 99, 255, 0.12) 100%);
  border-bottom: 1px solid var(--line);
}

.welcome-banner {
  background: linear-gradient(135deg, rgba(58, 181, 162, 0.12) 0%, rgba(240, 180, 41, 0.1) 100%);
  border-bottom: 1px solid var(--line);
}

.welcome-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.welcome-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(58, 181, 162, 0.14);
  border: 1px solid rgba(58, 181, 162, 0.28);
  font-weight: 800;
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.welcome-text {
  font-weight: 650;
  color: var(--ink);
}

.promo-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.promo-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.promo-actions a.cta,
.promo-actions a.cta span {
  color: #ffffff !important;
}

.promo-actions a.cta.secondary {
  background: #0b0f1a;
  border-color: #0b0f1a;
}

.promo-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(240, 180, 41, 0.16);
  border: 1px solid rgba(240, 180, 41, 0.32);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.01em;
}

.promo-title {
  margin-top: 6px;
  font-weight: 700;
  color: var(--ink);
}

.metrics-tight {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
}

.code-block {
  margin-top: 12px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.04);
  overflow: auto;
  max-height: 320px;
  font-size: 0.85rem;
  line-height: 1.4;
}

[data-theme="dark"] .promo-banner {
  background: linear-gradient(135deg, rgba(240, 180, 41, 0.1) 0%, rgba(31, 99, 255, 0.08) 100%);
  border-bottom-color: rgba(233, 237, 247, 0.14);
}

[data-theme="dark"] .welcome-banner {
  background: linear-gradient(135deg, rgba(58, 181, 162, 0.1) 0%, rgba(240, 180, 41, 0.08) 100%);
  border-bottom-color: rgba(233, 237, 247, 0.14);
}

[data-theme="dark"] .welcome-badge {
  border-color: rgba(58, 181, 162, 0.22);
  background: rgba(58, 181, 162, 0.1);
}

[data-theme="dark"] .promo-title {
  color: var(--ink);
}

[data-theme="dark"] .code-block {
  background: rgba(233, 237, 247, 0.06);
  border-color: rgba(233, 237, 247, 0.14);
}

@media (max-width: 720px) {
  .promo-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Mobile nav overlay */
.mobile-nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-solid);
  color: var(--ink);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.mobile-nav-toggle i {
  font-size: 1.25rem;
  line-height: 1;
}

  .mobile-nav-backdrop {
  position: fixed;
  inset: 0;
  border: 0;
  background: rgba(11, 15, 26, 0.38);
  backdrop-filter: blur(4px);
  z-index: 35;
}

body.mobile-nav-lock {
  overflow: hidden;
}

body.mobile-sidebar-lock {
  overflow: hidden;
}

.mobile-sidebar-toggle {
  position: fixed;
  right: 14px;
  bottom: calc(var(--mobile-bottom-nav-height) + var(--safe-area-bottom) + 72px);
  z-index: 75;
  width: 54px;
  height: 54px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(145deg, #1d5ed8 0%, #2a7bf7 100%);
  color: #fff;
  box-shadow: 0 12px 24px rgba(13, 45, 112, 0.42);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mobile-sidebar-toggle span {
  display: none;
}

.mobile-sidebar-toggle i {
  font-size: 1.22rem;
}

.mobile-sidebar-toggle.hidden {
  display: none;
}

.mobile-sidebar-backdrop {
  position: fixed;
  inset: 0;
  border: 0;
  background: rgba(11, 15, 26, 0.38);
  backdrop-filter: blur(4px);
  z-index: 73;
}

.mobile-sidebar-backdrop.hidden {
  display: none;
}

.mobile-bottom-nav {
  position: fixed;
  left: 8px;
  right: 8px;
  bottom: calc(10px + var(--safe-area-bottom));
  z-index: 92;
  border-radius: calc(var(--glass-radius) + 6px);
  border: 1px solid rgba(29, 94, 216, 0.26);
  background:
    radial-gradient(120% 180% at 10% -60%, rgba(80, 140, 255, 0.24) 0%, rgba(80, 140, 255, 0) 55%),
    linear-gradient(140deg, rgba(255, 255, 255, 0.9) 0%, rgba(233, 243, 255, 0.82) 100%);
  box-shadow:
    0 18px 36px rgba(15, 42, 97, 0.24),
    0 4px 10px rgba(15, 42, 97, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.66);
  backdrop-filter: blur(calc(var(--glass-blur) + 4px)) saturate(165%);
  -webkit-backdrop-filter: blur(calc(var(--glass-blur) + 4px)) saturate(165%);
  overflow: hidden;
}

.mobile-bottom-nav::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.58) 0%, rgba(229, 241, 255, 0.22) 100%);
  pointer-events: none;
  z-index: 0;
}

.mobile-bottom-nav.hidden {
  display: none;
}

.mobile-bottom-nav-inner {
  min-height: var(--mobile-bottom-nav-height);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  padding: 10px 10px calc(10px + var(--safe-area-bottom));
  position: relative;
  z-index: 1;
}

.mobile-bottom-link {
  min-width: 0;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 3px;
  padding: 6px 4px;
  border-radius: 12px;
  font-size: 0.62rem;
  color: var(--ink-2);
  border: 1px solid transparent;
  text-align: center;
  font-weight: 800;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.mobile-bottom-link i {
  font-size: 1.1rem;
}

.mobile-bottom-label {
  line-height: 1;
  letter-spacing: 0.01em;
}

.mobile-bottom-link.active {
  background: linear-gradient(135deg, #1f5dff 0%, #0f3fb8 100%);
  border-color: rgba(31, 93, 255, 0.58);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(31, 93, 255, 0.34), 0 0 0 1px rgba(255, 255, 255, 0.16) inset;
}

.mobile-bottom-link.active i {
  color: #ffffff;
}

[data-theme="dark"] .mobile-bottom-nav {
  border-color: rgba(129, 166, 233, 0.22);
  background: linear-gradient(145deg, rgba(15, 24, 42, 0.92) 0%, rgba(17, 34, 61, 0.86) 100%);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(148, 163, 184, 0.12);
}

[data-theme="dark"] .mobile-bottom-nav::before {
  background: linear-gradient(155deg, rgba(148, 163, 184, 0.2) 0%, rgba(30, 41, 59, 0.06) 100%);
}

#fx-submit,
#fx-submit span,
#fx-submit i,
.fx-convert-cta,
.fx-convert-cta span,
.fx-convert-cta i {
  color: #ffffff !important;
}

.fx-convert-cta {
  background: linear-gradient(135deg, #142447 0%, #0a1228 100%);
}

.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: calc(12px + var(--safe-area-bottom));
  z-index: 96;
  border-radius: calc(var(--glass-radius) + 4px);
  border: 1px solid var(--glass-panel-border-strong);
  background: var(--glass-panel-fill);
  box-shadow: var(--glass-panel-shadow-strong);
  backdrop-filter: var(--glass-panel-backdrop);
  -webkit-backdrop-filter: var(--glass-panel-backdrop);
}

.cookie-banner.hidden {
  display: none;
}

.cookie-banner-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
}

.cookie-banner-content h3 {
  margin-bottom: 4px;
  color: var(--glass-text);
}

.cookie-banner-content .small {
  margin: 0;
  color: var(--glass-muted);
}

.cookie-banner-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.cookie-banner .cta,
.cookie-banner .cta.secondary,
[data-theme="dark"] .cookie-banner .cta,
[data-theme="dark"] .cookie-banner .cta.secondary {
  background: #0b0f1a;
  color: #ffffff;
  border: 1px solid #0b0f1a;
  box-shadow: 0 12px 24px rgba(11, 15, 26, 0.28);
}

.cookie-banner .cta:hover,
.cookie-banner .cta.secondary:hover,
[data-theme="dark"] .cookie-banner .cta:hover,
[data-theme="dark"] .cookie-banner .cta.secondary:hover {
  background: #16233d;
  border-color: #16233d;
  color: #ffffff;
}

.cookie-banner .cta span,
.cookie-banner .cta i,
.cookie-banner .cta.secondary span,
.cookie-banner .cta.secondary i {
  color: #ffffff !important;
}

/* Better select/dropdown layering and readability */
.field {
  position: relative;
  min-width: 0;
}

select {
  --simple-select-height: 50px;
  --simple-select-padding: 12px 48px 12px 16px;
  --simple-select-radius: 18px;
  --simple-select-border: rgba(15, 42, 97, 0.14);
  --simple-select-surface-top: rgba(255, 255, 255, 0.96);
  --simple-select-surface-bottom: rgba(244, 239, 230, 0.9);
  --simple-select-chevron: rgba(15, 42, 97, 0.72);
  --simple-select-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  width: 100%;
  min-width: 0;
  min-height: var(--simple-select-height);
  position: relative;
  z-index: 2;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  border-radius: var(--simple-select-radius);
  border: 1px solid var(--simple-select-border);
  padding: var(--simple-select-padding);
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
  background:
    linear-gradient(135deg, transparent 50%, var(--simple-select-chevron) 50%) calc(100% - 20px) calc(50% - 2px) / 8px 8px no-repeat,
    linear-gradient(225deg, transparent 50%, var(--simple-select-chevron) 50%) calc(100% - 14px) calc(50% - 2px) / 8px 8px no-repeat,
    linear-gradient(180deg, var(--simple-select-surface-top) 0%, var(--simple-select-surface-bottom) 100%);
  color: var(--ink);
  box-shadow: var(--simple-select-shadow);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease, color 180ms ease;
}

select:is(.status-select, .notification-privacy-select, .modal-input) {
  min-height: var(--simple-select-height);
  border-radius: var(--simple-select-radius);
  border: 1px solid var(--simple-select-border);
  padding: var(--simple-select-padding);
  background:
    linear-gradient(135deg, transparent 50%, var(--simple-select-chevron) 50%) calc(100% - 20px) calc(50% - 2px) / 8px 8px no-repeat,
    linear-gradient(225deg, transparent 50%, var(--simple-select-chevron) 50%) calc(100% - 14px) calc(50% - 2px) / 8px 8px no-repeat,
    linear-gradient(180deg, var(--simple-select-surface-top) 0%, var(--simple-select-surface-bottom) 100%);
  color: var(--ink);
  box-shadow: var(--simple-select-shadow);
}

select.language-select {
  --simple-select-height: 40px;
  --simple-select-padding: 8px 40px 8px 12px;
  --simple-select-radius: 14px;
  font-size: 0.88rem;
}

select:is(.status-select, .notification-privacy-select, .modal-input) {
  --simple-select-height: 44px;
  --simple-select-padding: 10px 44px 10px 12px;
  --simple-select-radius: 14px;
}

select:hover {
  transform: translateY(-1px);
  border-color: rgba(31, 93, 255, 0.28);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12);
}

select:focus,
select:focus-visible,
select:is(.status-select, .notification-privacy-select, .modal-input):focus,
select:is(.status-select, .notification-privacy-select, .modal-input):focus-visible {
  outline: none;
  transform: translateY(-1px);
  border-color: rgba(31, 93, 255, 0.62);
  box-shadow: 0 0 0 4px rgba(31, 93, 255, 0.16), 0 14px 28px rgba(15, 23, 42, 0.12);
}

select:disabled,
select:is(.status-select, .notification-privacy-select, .modal-input):disabled {
  opacity: 0.58;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

select option,
select optgroup {
  background: var(--surface-solid);
  color: var(--ink);
}

select option[disabled] {
  color: rgba(18, 24, 42, 0.45);
}

select::-ms-expand {
  display: none;
}

[data-theme="dark"] select {
  --simple-select-border: rgba(233, 237, 247, 0.2);
  --simple-select-surface-top: rgba(28, 35, 58, 0.94);
  --simple-select-surface-bottom: rgba(18, 24, 42, 0.92);
  --simple-select-chevron: rgba(233, 237, 247, 0.82);
  --simple-select-shadow: 0 12px 24px rgba(0, 0, 0, 0.28);
}

[data-theme="dark"] select:is(.status-select, .notification-privacy-select, .modal-input) {
  border-color: var(--simple-select-border);
  background:
    linear-gradient(135deg, transparent 50%, var(--simple-select-chevron) 50%) calc(100% - 20px) calc(50% - 2px) / 8px 8px no-repeat,
    linear-gradient(225deg, transparent 50%, var(--simple-select-chevron) 50%) calc(100% - 14px) calc(50% - 2px) / 8px 8px no-repeat,
    linear-gradient(180deg, var(--simple-select-surface-top) 0%, var(--simple-select-surface-bottom) 100%);
  color: var(--ink);
  box-shadow: var(--simple-select-shadow);
}

[data-theme="dark"] select:hover {
  border-color: rgba(96, 145, 238, 0.42);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.34);
}

[data-theme="dark"] select:focus,
[data-theme="dark"] select:focus-visible,
[data-theme="dark"] select:is(.status-select, .notification-privacy-select, .modal-input):focus,
[data-theme="dark"] select:is(.status-select, .notification-privacy-select, .modal-input):focus-visible {
  border-color: rgba(96, 145, 238, 0.72);
  box-shadow: 0 0 0 4px rgba(96, 145, 238, 0.18), 0 16px 28px rgba(0, 0, 0, 0.34);
}

[data-theme="dark"] select option,
[data-theme="dark"] select optgroup {
  background: rgba(18, 24, 42, 0.98);
  color: rgba(233, 237, 247, 0.94);
}

@media (max-width: 768px) {
  select {
    --simple-select-height: 46px;
    --simple-select-padding: 10px 46px 10px 14px;
    font-size: 0.95rem;
  }

  select.language-select {
    --simple-select-height: 40px;
    --simple-select-padding: 8px 38px 8px 12px;
  }

  select:is(.status-select, .notification-privacy-select, .modal-input) {
    --simple-select-height: 44px;
    --simple-select-padding: 10px 42px 10px 12px;
  }
}

/* Ticker Intelligence institutional view */
.ticker-intelligence-panel {
  width: 100%;
}

.intel-institutional-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.intel-column-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-solid);
  padding: 14px;
  display: grid;
  gap: 10px;
}

.intel-subhead {
  font-weight: 800;
  color: var(--ink);
}

.intel-kv {
  display: grid;
  gap: 7px;
}

.intel-kv-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.88rem;
}

.intel-kv-row span:first-child {
  color: var(--graphite);
  font-weight: 700;
  flex: 0 1 48%;
  min-width: 0;
}

.intel-kv-row span:last-child {
  color: var(--ink);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  flex: 1 1 auto;
  min-width: 0;
  text-align: right;
}

.intel-raw-shell {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-solid);
  padding: 12px;
  display: grid;
  gap: 10px;
}

.intel-raw-controls {
  display: grid;
  gap: 6px;
}

.intel-raw-controls input {
  width: 100%;
}

.screener-leaderboard-card .panel-output {
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

.intel-heatmap {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.intel-heat-cell {
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 10px;
  min-height: 72px;
  display: grid;
  gap: 6px;
  align-content: space-between;
}

.intel-heat-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-2);
}

.intel-heat-score {
  font-size: 1.05rem;
  font-weight: 900;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--ink);
}

.peer-comparison-wrap {
  margin-top: 14px;
}

.peer-comparison-wrap .data-table td,
.peer-comparison-wrap .data-table th {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.82rem;
}

/* AI personality selector + tier credit UI */
.ai-credits-shell {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(18, 24, 42, 0.04);
}

.personality-select-wrap {
  position: relative;
}

.personality-select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  border: 1px solid color-mix(in srgb, var(--line) 72%, #1d4ed8 28%);
  border-radius: 12px;
  padding: 11px 38px 11px 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.03), rgba(15, 23, 42, 0.06)),
    linear-gradient(120deg, rgba(29, 78, 216, 0.08), rgba(16, 185, 129, 0.08));
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.personality-select:focus {
  outline: none;
  border-color: rgba(29, 78, 216, 0.55);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.15);
}

.personality-select-wrap::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  margin-top: -2px;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--ink-2);
  border-bottom: 2px solid var(--ink-2);
  transform: rotate(45deg);
  pointer-events: none;
}

.ai-credits-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ink-2);
}

.ai-credits-bar {
  margin-top: 8px;
  height: 10px;
  border-radius: 999px;
  background: rgba(18, 24, 42, 0.12);
  overflow: hidden;
}

.ai-credits-bar > span {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #1d4ed8 0%, #10b981 100%);
  transition: width 180ms ease;
}

.personality-select option[disabled] {
  color: rgba(18, 24, 42, 0.45);
}

form[data-provider-accent="openai"] #screener-generate-button {
  background: linear-gradient(135deg, #0f172a 0%, #14532d 100%);
}

form[data-provider-accent="anthropic"] #screener-generate-button {
  background: linear-gradient(135deg, #7c2d12 0%, #c2410c 100%);
}

form[data-provider-accent="google"] #screener-generate-button {
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 45%, #0ea5e9 100%);
}

form[data-provider-accent="amazon_nova"] #screener-generate-button {
  background: linear-gradient(135deg, #78350f 0%, #b45309 55%, #ea580c 100%);
}

.model-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.06);
  color: var(--ink-2);
}

.model-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.9;
}

.model-badge-openai {
  color: #14532d;
  border-color: rgba(20, 83, 45, 0.28);
  background: rgba(16, 185, 129, 0.12);
}

.model-badge-amazon_nova {
  color: #9a3412;
  border-color: rgba(194, 65, 12, 0.26);
  background: rgba(249, 115, 22, 0.14);
}

[data-theme="dark"] .model-badge {
  background: rgba(148, 163, 184, 0.15);
}

[data-theme="dark"] .model-badge-openai {
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.18);
}

[data-theme="dark"] .model-badge-amazon_nova {
  color: #fdba74;
  border-color: rgba(249, 115, 22, 0.4);
  background: rgba(249, 115, 22, 0.2);
}

/* Research library page */
.research-page {
  background: #f8fafc;
  font-family: "Manrope", "Inter", "Segoe UI", sans-serif;
}

.research-shell {
  padding-top: 28px;
}

.research-intro {
  max-width: 920px;
}

.research-intro .small {
  max-width: 780px;
  line-height: 1.6;
}

.research-pillars {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 16px;
}

.research-pillar {
  display: grid;
  gap: 10px;
}

.research-pillar h2 {
  margin: 0;
}

.research-bullet-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
  color: var(--ink-2);
}

.research-library {
  margin-top: 8px;
  display: grid;
  gap: 12px;
}

.research-library-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.research-library-head h2 {
  margin: 0;
}

.research-note-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.research-note-card {
  display: grid;
  gap: 8px;
}

.research-note-card h3 {
  margin: 0;
}

.research-note-card p {
  margin: 0;
  color: var(--ink-2);
}

.research-note-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 999px;
  border: 1px solid rgba(18, 24, 42, 0.14);
  background: rgba(58, 181, 162, 0.12);
  color: #0f172a;
  padding: 4px 10px;
}

.research-note-pages {
  margin-top: 16px;
  display: grid;
  gap: 14px;
}

.research-note-page {
  display: grid;
  gap: 10px;
}

.research-note-page h2,
.research-note-page h3,
.research-note-page h4 {
  margin: 0;
}

.research-note-page p {
  margin: 0;
  color: var(--ink-2);
  line-height: 1.55;
}

.research-code {
  margin: 10px 0 0;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #dbe3f0;
  background: #f1f5f9;
  color: #0f172a;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.82rem;
  line-height: 1.45;
  overflow: auto;
}

.research-diagram {
  margin-top: 2px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 12px;
  background: #f1f5f9;
  padding: 12px;
  color: #0f172a;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.82rem;
  line-height: 1.5;
  overflow-x: auto;
}

.research-links {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
}

.research-links a {
  color: #1d4ed8;
  text-decoration: underline;
  text-underline-offset: 2px;
}

[data-theme="dark"] .research-page {
  background: #0a1020;
  color: rgba(233, 237, 247, 0.95);
}

[data-theme="dark"] .research-page .card,
[data-theme="dark"] .research-note-card,
[data-theme="dark"] .research-note-page,
[data-theme="dark"] .research-pillar {
  background: rgba(17, 24, 39, 0.72);
  border-color: rgba(148, 163, 184, 0.24);
}

[data-theme="dark"] .research-note-card p,
[data-theme="dark"] .research-note-page p,
[data-theme="dark"] .research-bullet-list {
  color: rgba(203, 213, 225, 0.92);
}

[data-theme="dark"] .research-note-tag {
  color: #bfdbfe;
  border-color: rgba(96, 165, 250, 0.45);
  background: rgba(30, 64, 175, 0.28);
}

[data-theme="dark"] .research-code,
[data-theme="dark"] .research-diagram {
  background: rgba(15, 23, 42, 0.88);
  border-color: rgba(148, 163, 184, 0.28);
  color: rgba(226, 232, 240, 0.95);
}

.research-blueprint {
  margin-top: 16px;
}

.blueprint-flow {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(18, 24, 42, 0.14);
  border-radius: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.66);
}

.blueprint-node {
  border: 1px solid rgba(18, 24, 42, 0.18);
  border-radius: 10px;
  padding: 8px 12px;
  background: var(--surface-solid);
  font-weight: 700;
  color: var(--ink);
}

.blueprint-arrow {
  color: var(--graphite);
  font-weight: 900;
  line-height: 1;
}

/* Layout polish for desktop whitespace usage */
.panel[data-panel="news"] .content-grid {
  grid-template-columns: minmax(340px, 0.85fr) minmax(300px, 1fr);
}

.download-form-card .card-head {
  margin-bottom: 14px;
}

.download-form-subcopy {
  margin: 6px 0 0;
  line-height: 1.45;
}

.download-form-grid {
  grid-template-columns: minmax(0, 1.1fr) repeat(2, minmax(0, 0.9fr));
}

.download-history-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
}

.download-history-note {
  margin-top: 8px;
  line-height: 1.45;
}

.download-form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.download-form-actions #download-status {
  margin: 0;
}

.download-guidance-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.download-guidance-card #download-preview {
  min-height: 230px;
}

.panel[data-panel="options"] .results-panel {
  width: 100%;
}

#news-output,
#options-output {
  min-height: 420px;
}

#download-end {
  max-width: 100%;
  min-width: 0;
}

@media (max-width: 980px) {
  .nav {
    justify-content: flex-start;
    gap: 10px;
  }

  .logo {
    margin-right: 0;
  }

  .mobile-nav-toggle {
    display: inline-flex;
    margin-left: 0;
    margin-right: 6px;
    flex-shrink: 0;
  }

  .sidebar-toggle {
    display: none !important;
  }

  .nav-links,
  .nav-actions {
    display: none;
  }

  .header.nav-open .nav {
    align-items: flex-start;
  }

  .header.nav-open .nav-links,
  .header.nav-open .nav-actions {
    display: grid;
    width: auto;
    gap: 10px;
    margin-top: 0;
    background: var(--surface-solid);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px;
    position: fixed;
    left: 16px;
    right: 16px;
    z-index: 40;
  }

  .header.nav-open .nav-links {
    top: calc(var(--header-height) + 8px);
  }

  .header.nav-open .nav-actions {
    top: calc(var(--header-height) + 208px);
  }

  .header.nav-open .nav-actions .pill {
    display: none;
  }

  .header.nav-open .language-picker {
    min-width: 108px;
    gap: 3px;
  }

  .header.nav-open .language-picker-label {
    font-size: 0.62rem;
  }

  .header.nav-open .language-select {
    min-height: 40px;
    padding: 8px 10px;
    font-size: 0.84rem;
  }

  .header.nav-open .nav {
    flex-wrap: wrap;
  }

  .panel[data-panel="news"] .content-grid {
    grid-template-columns: 1fr;
  }

  .download-form-grid {
    grid-template-columns: 1fr;
  }

  .download-form-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .intel-institutional-grid {
    grid-template-columns: 1fr;
  }

  .intel-heatmap {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .research-pillars {
    grid-template-columns: 1fr;
  }

  .solve-now-controls {
    grid-template-columns: 1fr;
  }

  .model-council-prompt-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .solve-now-actions {
    justify-content: stretch;
  }

  .solve-now-actions .cta {
    width: 100%;
  }

  .research-note-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .card,
  .results-panel {
    padding: 16px;
  }

  .chart-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .chart-range-group,
  .chart-view-group,
  .chart-theme-group {
    width: 100%;
  }

  .tv-slot-advanced {
    min-height: 440px;
  }

  .intel-heatmap {
    grid-template-columns: 1fr;
  }

  .research-note-grid {
    grid-template-columns: 1fr;
  }

  .blueprint-flow {
    align-items: stretch;
  }

  .blueprint-arrow {
    text-align: center;
    width: 100%;
  }

  .model-council-prompt-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
}

.home-bottom-nav {
  position: fixed;
  left: max(8px, env(safe-area-inset-left));
  right: max(8px, env(safe-area-inset-right));
  bottom: calc(12px + var(--safe-area-bottom));
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: min(460px, calc(100% - 16px));
  margin-inline: auto;
  padding: 10px;
  border-radius: calc(var(--glass-radius) + 10px);
  border: 1px solid var(--glass-panel-border-strong);
  background: var(--glass-panel-fill);
  box-shadow: var(--glass-panel-shadow-strong);
  backdrop-filter: var(--glass-panel-backdrop);
  -webkit-backdrop-filter: var(--glass-panel-backdrop);
  z-index: 160;
  overflow: hidden;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.home-bottom-nav::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: calc(var(--glass-radius) + 8px);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.76) 0%, rgba(255, 255, 255, 0.2) 30%, rgba(255, 255, 255, 0) 60%),
    radial-gradient(120% 120% at 92% 100%, rgba(118, 156, 255, 0.2), rgba(118, 156, 255, 0) 62%);
  pointer-events: none;
  z-index: 0;
}

.home-bottom-nav-link {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 6px;
  min-height: 58px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(118, 156, 255, 0.18);
  background: var(--glass-control-fill);
  color: var(--ink-2);
  font-weight: 800;
  text-decoration: none;
  box-shadow:
    0 12px 24px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.84),
    inset 0 -1px 0 rgba(255, 255, 255, 0.16);
  backdrop-filter: var(--glass-control-backdrop);
  -webkit-backdrop-filter: var(--glass-control-backdrop);
  transition:
    transform 160ms ease,
    background 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    color 160ms ease;
  z-index: 1;
}

.home-bottom-nav-link i {
  font-size: 1.18rem;
}

.home-bottom-nav-link span {
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
}

.home-bottom-nav-link:hover,
.home-bottom-nav-link:focus-visible {
  transform: translateY(-1px);
  background:
    radial-gradient(130% 200% at 0% 0%, rgba(255, 255, 255, 0.52) 0%, rgba(255, 255, 255, 0.16) 30%, rgba(255, 255, 255, 0) 58%),
    linear-gradient(145deg, rgba(66, 120, 255, 0.18) 0%, rgba(34, 196, 193, 0.1) 100%);
  border-color: rgba(118, 156, 255, 0.32);
  box-shadow:
    0 18px 30px rgba(44, 93, 211, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -1px 0 rgba(255, 255, 255, 0.2);
  outline: none;
}

[data-theme="dark"] .home-bottom-nav {
  border-color: rgba(125, 171, 255, 0.18);
}

[data-theme="dark"] .home-bottom-nav::before {
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.06) 28%, rgba(255, 255, 255, 0) 60%),
    radial-gradient(120% 120% at 92% 100%, rgba(125, 171, 255, 0.18), rgba(125, 171, 255, 0) 62%);
}

[data-theme="dark"] .home-bottom-nav-link {
  border-color: rgba(125, 171, 255, 0.14);
  background: rgba(10, 15, 28, 0.4);
  box-shadow:
    0 12px 26px rgba(3, 6, 13, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

[data-theme="dark"] .home-bottom-nav-link:hover,
[data-theme="dark"] .home-bottom-nav-link:focus-visible {
  background:
    radial-gradient(130% 200% at 0% 0%, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.06) 30%, rgba(255, 255, 255, 0) 58%),
    linear-gradient(145deg, rgba(58, 102, 214, 0.3) 0%, rgba(26, 136, 143, 0.18) 100%);
  border-color: rgba(125, 171, 255, 0.34);
  box-shadow:
    0 18px 32px rgba(2, 6, 23, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

@media (max-width: 980px) {
  body.home-page,
  body.home-bottom-nav-enabled {
    padding-bottom: calc(98px + var(--safe-area-bottom));
  }

  body.home-page .cookie-banner,
  body.home-bottom-nav-enabled .cookie-banner {
    bottom: calc(106px + var(--safe-area-bottom));
  }

  .home-bottom-nav {
    width: min(460px, calc(100% - 16px));
    padding: 8px;
  }
}

@media (min-width: 981px) {
  .home-bottom-nav {
    width: min(420px, calc(100% - 32px));
    bottom: 20px;
  }
}

.quantura-rn-injection-shell {
  margin-top: 8px;
  margin-bottom: 4px;
}

body:not(.native-runtime) .quantura-rn-injection-shell {
  display: none;
}

.quantura-rn-root {
  width: 100%;
}

[data-theme="dark"] .quantura-rn-root {
  color-scheme: dark;
}

html[data-liquid-glass-mode="refraction"] {
  --glass-panel-backdrop: url("#quantura-liquid-glass-panel-filter") blur(calc(var(--glass-blur) + 3px)) saturate(174%);
  --glass-control-backdrop: url("#quantura-liquid-glass-control-filter") blur(calc(var(--glass-blur) - 6px)) saturate(164%);
}

:is(
  .liquid-glass,
  .card,
  .results-panel,
  .sidebar-card,
  .sidebar-nav,
  .modal-card,
  .toast,
  .mobile-bottom-nav,
  .cookie-banner,
  .home-bottom-nav,
  .quantura-comments-card,
  .quantura-comments-shell
) {
  background: var(--glass-panel-fill);
  border-color: var(--glass-panel-border-strong);
  box-shadow: var(--glass-panel-shadow-strong);
  backdrop-filter: var(--glass-panel-backdrop);
  -webkit-backdrop-filter: var(--glass-panel-backdrop);
}

:is(
  .card,
  .results-panel,
  .sidebar-card,
  .sidebar-nav,
  .modal-card,
  .tab,
  .sidebar-link,
  .module-picker-chip,
  .sports-foundry-workflow-option span,
  .quantura-comments-card,
  .quantura-comments-shell,
  .home-bottom-nav,
  .home-bottom-nav-link
) {
  position: relative;
  isolation: isolate;
}

:is(
  .card,
  .results-panel,
  .sidebar-card,
  .sidebar-nav,
  .modal-card,
  .tab,
  .sidebar-link,
  .module-picker-chip,
  .sports-foundry-workflow-option span,
  .quantura-comments-card,
  .quantura-comments-shell,
  .home-bottom-nav,
  .home-bottom-nav-link
)::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(158deg, rgba(255, 255, 255, 0.72) 0%, rgba(255, 255, 255, 0.22) 28%, rgba(255, 255, 255, 0) 56%),
    radial-gradient(110% 90% at 84% 100%, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0) 68%);
  opacity: 0.85;
}

[data-theme="dark"] :is(
  .card,
  .results-panel,
  .sidebar-card,
  .sidebar-nav,
  .modal-card,
  .tab,
  .sidebar-link,
  .module-picker-chip,
  .sports-foundry-workflow-option span,
  .quantura-comments-card,
  .quantura-comments-shell,
  .home-bottom-nav,
  .home-bottom-nav-link
)::before {
  background:
    linear-gradient(158deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.06) 26%, rgba(255, 255, 255, 0) 56%),
    radial-gradient(110% 90% at 84% 100%, rgba(125, 171, 255, 0.16), rgba(125, 171, 255, 0) 68%);
}

:is(
  input:not([type]),
  input[type="text"],
  input[type="search"],
  input[type="email"],
  input[type="number"],
  input[type="date"],
  input[type="url"],
  input[type="tel"],
  input[type="password"],
  textarea,
  select,
  .file-input,
  .input.notes-input,
  .theme-toggle,
  .sidebar-link,
  .tab,
  .status-select,
  .notification-privacy-select,
  .modal-input,
  .personality-select,
  .model-council-improve-toggle,
  .module-picker-chip,
  .sports-foundry-workflow-option span,
  .mobile-sidebar-toggle,
  .download-history-toggle,
  .model-council-prompt-card
) {
  background: var(--glass-control-fill);
  border-color: var(--glass-control-border-strong);
  box-shadow: var(--glass-control-shadow-strong);
  backdrop-filter: var(--glass-control-backdrop);
  -webkit-backdrop-filter: var(--glass-control-backdrop);
}

:is(
  input:not([type]),
  input[type="text"],
  input[type="search"],
  input[type="email"],
  input[type="number"],
  input[type="date"],
  input[type="url"],
  input[type="tel"],
  input[type="password"],
  textarea,
  select,
  .file-input,
  .input.notes-input,
  .theme-toggle,
  .sidebar-link,
  .tab,
  .status-select,
  .notification-privacy-select,
  .modal-input,
  .personality-select,
  .mobile-sidebar-toggle,
  .download-history-toggle,
  .model-council-prompt-card
):hover {
  box-shadow: var(--glass-control-hover-shadow);
}

:is(
  input:not([type]),
  input[type="text"],
  input[type="search"],
  input[type="email"],
  input[type="number"],
  input[type="date"],
  input[type="url"],
  input[type="tel"],
  input[type="password"],
  textarea,
  select,
  .file-input,
  .input.notes-input,
  .theme-toggle,
  .sidebar-link,
  .tab,
  .status-select,
  .notification-privacy-select,
  .modal-input,
  .personality-select,
  .mobile-sidebar-toggle,
  .download-history-toggle,
  .model-council-prompt-card
):focus,
:is(
  input:not([type]),
  input[type="text"],
  input[type="search"],
  input[type="email"],
  input[type="number"],
  input[type="date"],
  input[type="url"],
  input[type="tel"],
  input[type="password"],
  textarea,
  select,
  .file-input,
  .input.notes-input,
  .theme-toggle,
  .sidebar-link,
  .tab,
  .status-select,
  .notification-privacy-select,
  .modal-input,
  .personality-select,
  .mobile-sidebar-toggle,
  .download-history-toggle,
  .model-council-prompt-card
):focus-visible {
  outline: none;
  border-color: rgba(82, 132, 255, 0.42);
  box-shadow:
    0 0 0 4px var(--glass-focus-ring),
    var(--glass-control-hover-shadow);
}

.theme-toggle,
.sidebar-link,
.tab,
.mobile-sidebar-toggle,
.download-history-toggle {
  overflow: hidden;
}

.sidebar-nav a:hover,
.sidebar-link:hover {
  background: var(--glass-control-fill);
}

.sidebar-link.active,
.tab.is-active,
.screener-filter-tab.is-active,
.mobile-bottom-link.active,
.home-bottom-nav-link.active {
  border-color: rgba(118, 156, 255, 0.4);
  background:
    radial-gradient(130% 200% at 0% 0%, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.16) 30%, rgba(255, 255, 255, 0) 58%),
    linear-gradient(145deg, rgba(66, 120, 255, 0.28) 0%, rgba(34, 196, 193, 0.16) 100%);
  color: var(--ink);
  box-shadow:
    0 18px 38px rgba(44, 93, 211, 0.18),
    0 8px 18px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    inset 0 -1px 0 rgba(255, 255, 255, 0.18);
}

[data-theme="dark"] .sidebar-link.active,
[data-theme="dark"] .tab.is-active,
[data-theme="dark"] .screener-filter-tab.is-active,
[data-theme="dark"] .mobile-bottom-link.active,
[data-theme="dark"] .home-bottom-nav-link.active {
  border-color: rgba(125, 171, 255, 0.42);
  background:
    radial-gradient(130% 200% at 0% 0%, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.06) 30%, rgba(255, 255, 255, 0) 58%),
    linear-gradient(145deg, rgba(58, 102, 214, 0.38) 0%, rgba(26, 136, 143, 0.22) 100%);
  color: var(--ink);
}

.sports-foundry-workflow-option span,
.module-picker-chip,
.model-council-improve-toggle {
  isolation: isolate;
}

.sports-foundry-workflow-option span,
.module-picker-chip {
  overflow: hidden;
}

.sports-foundry-workflow-option span,
.module-picker-chip,
.model-council-improve-toggle {
  border-color: var(--glass-control-border-strong);
  box-shadow:
    0 14px 30px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.sports-foundry-workflow-option span {
  background:
    radial-gradient(150% 180% at 0% 0%, rgba(255, 255, 255, 0.78) 0%, rgba(255, 255, 255, 0.26) 28%, rgba(255, 255, 255, 0) 56%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(243, 239, 232, 0.9));
  color: var(--glass-text);
}

.module-picker-chip input,
.model-council-improve-toggle input[type="checkbox"] {
  border-color: rgba(15, 23, 42, 0.08);
  background: rgba(148, 163, 184, 0.24);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(calc(var(--glass-blur) - 8px)) saturate(140%);
  -webkit-backdrop-filter: blur(calc(var(--glass-blur) - 8px)) saturate(140%);
}

.module-picker-chip input::after,
.model-council-improve-toggle input[type="checkbox"]::after {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(239, 244, 252, 0.92));
  box-shadow:
    0 4px 12px rgba(15, 23, 42, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.94);
}

.sports-foundry-workflow-option:hover span,
.module-picker-chip:hover,
.model-council-improve-toggle:hover {
  border-color: rgba(82, 132, 255, 0.28);
  box-shadow:
    0 18px 34px rgba(15, 23, 42, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.module-picker-chip.is-selected,
.sports-foundry-workflow-option input:checked + span,
.model-council-improve-toggle:has(input[type="checkbox"]:checked) {
  border-color: rgba(82, 132, 255, 0.38);
  box-shadow:
    0 18px 38px rgba(44, 93, 211, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.module-picker-chip input:checked,
.model-council-improve-toggle input[type="checkbox"]:checked {
  border-color: rgba(71, 114, 255, 0.28);
  background: linear-gradient(145deg, rgba(71, 114, 255, 0.78), rgba(34, 196, 193, 0.48));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.18),
    0 6px 16px rgba(44, 93, 211, 0.18);
}

[data-theme="dark"] .sports-foundry-workflow-option span,
[data-theme="dark"] .module-picker-chip,
[data-theme="dark"] .model-council-improve-toggle {
  border-color: rgba(233, 237, 247, 0.16);
  box-shadow:
    0 18px 34px rgba(2, 6, 23, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .sports-foundry-workflow-option span {
  background:
    radial-gradient(150% 180% at 0% 0%, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.04) 28%, rgba(255, 255, 255, 0) 56%),
    linear-gradient(145deg, rgba(23, 33, 58, 0.92), rgba(14, 21, 39, 0.9));
  color: var(--glass-text);
}

[data-theme="dark"] .module-picker-chip input,
[data-theme="dark"] .model-council-improve-toggle input[type="checkbox"] {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(148, 163, 184, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .module-picker-chip input::after,
[data-theme="dark"] .model-council-improve-toggle input[type="checkbox"]::after {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(214, 226, 247, 0.88));
  box-shadow:
    0 6px 16px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

[data-theme="dark"] .module-picker-chip.is-selected,
[data-theme="dark"] .sports-foundry-workflow-option input:checked + span,
[data-theme="dark"] .model-council-improve-toggle:has(input[type="checkbox"]:checked) {
  border-color: rgba(125, 171, 255, 0.34);
  box-shadow:
    0 20px 38px rgba(2, 6, 23, 0.36),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .module-picker-chip input:checked,
[data-theme="dark"] .model-council-improve-toggle input[type="checkbox"]:checked {
  background: linear-gradient(145deg, rgba(76, 118, 232, 0.88), rgba(31, 155, 149, 0.5));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.1),
    0 8px 18px rgba(10, 24, 56, 0.32);
}

.personality-select-wrap::after {
  border-color: color-mix(in srgb, var(--ink-2) 76%, white 24%);
}

.search-wrap input,
.ticker-filter input,
.inline-controls input {
  background: var(--glass-control-fill);
  border-color: var(--glass-control-border-strong);
  box-shadow: var(--glass-control-shadow-strong);
  backdrop-filter: var(--glass-control-backdrop);
  -webkit-backdrop-filter: var(--glass-control-backdrop);
}
