:root {
  --bg-deep: #02050a;
  --bg-void: #010308;
  --bg-card: rgba(4, 14, 18, 0.62);
  --accent: #7dff4d;
  --accent-dim: rgba(125, 255, 77, 0.14);
  --accent-glow: rgba(125, 255, 77, 0.42);
  --cyan: #3dffe8;
  --plasma: #c8ff5a;
  --amber: #ffb347;
  --text: #e7fff4;
  --text-muted: #6f8f88;
  --border: rgba(61, 255, 232, 0.22);
  --error: #ff4d6d;
  --font-display: "Orbitron", sans-serif;
  --font-body: "Chakra Petch", sans-serif;
  --radius-sm: 4px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg-void);
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
}

body.xeno-deck {
  background:
    radial-gradient(ellipse 120% 80% at 50% -10%, rgba(61, 255, 232, 0.08), transparent 55%),
    radial-gradient(ellipse 70% 50% at 85% 90%, rgba(125, 255, 77, 0.05), transparent 50%),
    var(--bg-void);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ─── Cinematic void / UFO world layers ─── */
.void-field {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.nebula {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
  mix-blend-mode: screen;
}

.nebula-a {
  width: min(70vw, 720px);
  height: min(70vw, 720px);
  top: -18%;
  left: -12%;
  background: radial-gradient(circle, rgba(61, 255, 232, 0.35) 0%, rgba(61, 255, 232, 0) 70%);
  animation: nebulaDrift 28s ease-in-out infinite alternate;
}

.nebula-b {
  width: min(55vw, 560px);
  height: min(55vw, 560px);
  bottom: -10%;
  right: -8%;
  background: radial-gradient(circle, rgba(125, 255, 77, 0.28) 0%, rgba(125, 255, 77, 0) 70%);
  animation: nebulaDrift 34s ease-in-out infinite alternate-reverse;
}

.nebula-c {
  width: min(40vw, 420px);
  height: min(40vw, 420px);
  top: 38%;
  left: 48%;
  background: radial-gradient(circle, rgba(255, 179, 71, 0.12) 0%, transparent 70%);
  animation: nebulaPulse 12s ease-in-out infinite;
}

.starfield {
  position: absolute;
  inset: -20%;
  background-repeat: repeat;
}

.starfield-far {
  background-image:
    radial-gradient(1px 1px at 12% 18%, rgba(255, 255, 255, 0.7), transparent),
    radial-gradient(1px 1px at 28% 72%, rgba(61, 255, 232, 0.8), transparent),
    radial-gradient(1.5px 1.5px at 44% 34%, rgba(255, 255, 255, 0.55), transparent),
    radial-gradient(1px 1px at 61% 58%, rgba(200, 255, 90, 0.7), transparent),
    radial-gradient(1px 1px at 78% 22%, rgba(255, 255, 255, 0.45), transparent),
    radial-gradient(1.5px 1.5px at 91% 81%, rgba(61, 255, 232, 0.65), transparent),
    radial-gradient(1px 1px at 8% 48%, rgba(255, 255, 255, 0.4), transparent),
    radial-gradient(1px 1px at 52% 8%, rgba(255, 255, 255, 0.55), transparent);
  background-size: 420px 420px;
  opacity: 0.55;
  animation: starDrift 90s linear infinite;
}

.starfield-near {
  background-image:
    radial-gradient(1.5px 1.5px at 18% 26%, rgba(255, 255, 255, 0.95), transparent),
    radial-gradient(2px 2px at 36% 64%, rgba(125, 255, 77, 0.9), transparent),
    radial-gradient(1.5px 1.5px at 58% 18%, rgba(61, 255, 232, 0.95), transparent),
    radial-gradient(2px 2px at 74% 70%, rgba(255, 255, 255, 0.75), transparent),
    radial-gradient(1.5px 1.5px at 88% 40%, rgba(200, 255, 90, 0.85), transparent),
    radial-gradient(2.5px 2.5px at 6% 82%, rgba(61, 255, 232, 0.7), transparent);
  background-size: 560px 560px;
  opacity: 0.7;
  animation: starDrift 55s linear infinite reverse;
}

.ufo-orbit {
  position: absolute;
  top: 8%;
  right: 6%;
  width: min(38vw, 320px);
  height: min(38vw, 320px);
  opacity: 0.55;
}

.ufo-core {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, #fff 0%, var(--cyan) 35%, transparent 70%);
  box-shadow:
    0 0 24px var(--cyan),
    0 0 60px rgba(61, 255, 232, 0.45),
    0 0 100px rgba(125, 255, 77, 0.25);
  animation: ufoPulse 3.5s ease-in-out infinite;
}

.ufo-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid transparent;
}

.ufo-ring-a {
  inset: 12%;
  border-color: rgba(61, 255, 232, 0.35);
  border-top-color: var(--cyan);
  border-bottom-color: transparent;
  animation: ufoSpin 14s linear infinite;
  box-shadow: 0 0 20px rgba(61, 255, 232, 0.15);
}

.ufo-ring-b {
  inset: 28%;
  border-color: rgba(125, 255, 77, 0.25);
  border-left-color: var(--accent);
  border-right-color: transparent;
  animation: ufoSpin 9s linear infinite reverse;
}

.ufo-ring-c {
  inset: 42%;
  border-color: rgba(255, 179, 71, 0.2);
  border-top-color: var(--amber);
  animation: ufoSpinTilt 6s linear infinite;
}

@keyframes ufoSpinTilt {
  from { transform: rotateX(62deg) rotateZ(0deg); }
  to { transform: rotateX(62deg) rotateZ(360deg); }
}

.ufo-beam {
  position: absolute;
  top: 14%;
  right: 10%;
  width: min(28vw, 220px);
  height: 55vh;
  background: linear-gradient(
    180deg,
    rgba(61, 255, 232, 0.22) 0%,
    rgba(125, 255, 77, 0.08) 35%,
    transparent 85%
  );
  clip-path: polygon(38% 0, 62% 0, 100% 100%, 0 100%);
  filter: blur(1px);
  opacity: 0.45;
  animation: beamPulse 5s ease-in-out infinite;
  transform-origin: top center;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(61, 255, 232, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125, 255, 77, 0.028) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 40%, black 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 40%, black 20%, transparent 75%);
  perspective: 600px;
  transform: perspective(700px) rotateX(58deg) scale(1.6) translateY(-8%);
  transform-origin: center top;
}

.grid-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(61, 255, 232, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(125, 255, 77, 0.06) 0%, transparent 40%);
  transform: none;
}

.energy-sweep {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(61, 255, 232, 0.06) 48%,
    rgba(125, 255, 77, 0.08) 50%,
    rgba(61, 255, 232, 0.05) 52%,
    transparent 60%
  );
  background-size: 220% 100%;
  animation: energySweep 9s ease-in-out infinite;
}

.scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.14) 2px,
    rgba(0, 0, 0, 0.14) 4px
  );
  opacity: 0.4;
  z-index: 1;
}

.crt-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, transparent 35%, rgba(0, 0, 0, 0.55) 100%),
    linear-gradient(180deg, rgba(2, 8, 12, 0.35) 0%, transparent 18%, transparent 82%, rgba(2, 8, 12, 0.55) 100%);
  z-index: 2;
}

.hud-frame {
  position: absolute;
  inset: 10px;
  z-index: 3;
  border: 1px solid rgba(61, 255, 232, 0.12);
  border-radius: 2px;
  box-shadow: inset 0 0 40px rgba(61, 255, 232, 0.04);
}

.hud-corner {
  position: absolute;
  width: 28px;
  height: 28px;
  border-color: var(--cyan);
  border-style: solid;
  border-width: 0;
  opacity: 0.75;
}

.hud-tl { top: -1px; left: -1px; border-top-width: 2px; border-left-width: 2px; }
.hud-tr { top: -1px; right: -1px; border-top-width: 2px; border-right-width: 2px; }
.hud-bl { bottom: -1px; left: -1px; border-bottom-width: 2px; border-left-width: 2px; }
.hud-br { bottom: -1px; right: -1px; border-bottom-width: 2px; border-right-width: 2px; }

.hud-edge {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  height: 2px;
  width: min(28vw, 180px);
  background: linear-gradient(90deg, transparent, var(--accent), var(--cyan), transparent);
  opacity: 0.55;
  box-shadow: 0 0 12px rgba(61, 255, 232, 0.4);
}

.hud-top { top: -1px; }
.hud-bottom { bottom: -1px; }

.app {
  position: relative;
  z-index: 4;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.main,
.card,
.glass,
section,
header,
footer,
.ask-section,
.brain-section,
.scanner-section,
.portfolio-section,
.fundamental-section,
.earnings-section,
.news-section,
.sentinel-section {
  max-width: 100%;
  width: 100%;
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 2.5rem;
  animation: fadeDown 0.8s ease-out;
  position: relative;
}

.header::before {
  content: "";
  position: absolute;
  inset: -1rem -0.5rem auto;
  height: 100%;
  background: radial-gradient(ellipse at 50% 0%, rgba(61, 255, 232, 0.08), transparent 70%);
  pointer-events: none;
  z-index: -1;
}

.header-sector {
  font-family: var(--font-display);
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  color: var(--cyan);
  margin-bottom: 0.65rem;
  opacity: 0.75;
  text-transform: uppercase;
}

.header-hud-strip {
  display: flex;
  justify-content: center;
  gap: 0.45rem;
  margin-top: 1rem;
}

.header-hud-strip span {
  display: block;
  height: 3px;
  width: 28px;
  border-radius: 1px;
  background: linear-gradient(90deg, var(--accent), var(--cyan));
  box-shadow: 0 0 10px rgba(61, 255, 232, 0.45);
  animation: stripPulse 2.4s ease-in-out infinite;
}

.header-hud-strip span:nth-child(2) { animation-delay: 0.2s; width: 42px; opacity: 0.85; }
.header-hud-strip span:nth-child(3) { animation-delay: 0.4s; width: 18px; opacity: 0.65; }
.header-hud-strip span:nth-child(4) { animation-delay: 0.6s; width: 34px; opacity: 0.75; }

/* ─── Trionn-style deck nav + dual-text hover ─── */
.deck-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 1.1rem;
  margin: 1.35rem 0 0;
  padding: 0.65rem 0.5rem 0;
  border-top: 1px solid rgba(61, 255, 232, 0.12);
}

.nav-link,
[data-dual-text].is-dual {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.15;
  overflow: visible;
  user-select: none;
  -webkit-user-select: none;
}

.deck-nav .nav-link {
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  padding: 0.35rem 0;
}

.nav-link .text-layer,
[data-dual-text].is-dual .text-layer {
  display: inline-flex;
}

.nav-link .text-layer.clone,
[data-dual-text].is-dual .text-layer.clone {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  pointer-events: none;
  color: var(--cyan);
}

.nav-link .char,
[data-dual-text].is-dual .char {
  display: inline-block;
  will-change: transform, opacity;
  transition:
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.35s ease,
    filter 0.35s ease;
}

.nav-link .text-layer.original .char,
[data-dual-text].is-dual .text-layer.original .char {
  transform: translateY(0);
  opacity: 1;
}

.nav-link .text-layer.clone .char,
[data-dual-text].is-dual .text-layer.clone .char {
  transform: translateY(110%);
  opacity: 0;
}

.nav-link:hover .text-layer.original .char,
.nav-link:focus-visible .text-layer.original .char,
[data-dual-text].is-dual:hover .text-layer.original .char {
  transform: translateY(-110%);
  opacity: 0;
}

.nav-link:hover .text-layer.clone .char,
.nav-link:focus-visible .text-layer.clone .char,
[data-dual-text].is-dual:hover .text-layer.clone .char {
  transform: translateY(0);
  opacity: 1;
}

.nav-link:hover .text-layer.clone,
.nav-link:focus-visible .text-layer.clone,
[data-dual-text].is-dual:hover .text-layer.clone {
  opacity: 1;
}

/* stagger delays set via --i */
.nav-link .char,
[data-dual-text].is-dual .char {
  transition-delay: calc(var(--i, 0) * 28ms);
}

.feature-section-title.is-dual {
  overflow: hidden;
  min-height: 1.2em;
}

.feature-section-title.is-dual .text-layer.clone {
  color: var(--cyan);
}

/* ─── Hold to blast ─── */
.hold-blast-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  margin-top: 1.5rem;
}

.hold-blast-btn {
  position: relative;
  width: 148px;
  height: 148px;
  border-radius: 50%;
  border: 1px solid rgba(61, 255, 232, 0.35);
  background:
    radial-gradient(circle at 50% 40%, rgba(61, 255, 232, 0.12), transparent 55%),
    rgba(2, 10, 14, 0.75);
  cursor: pointer;
  color: var(--text);
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(61, 255, 232, 0.12),
    inset 0 0 30px rgba(125, 255, 77, 0.05);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.hold-blast-btn:hover,
.hold-blast-btn:focus-visible {
  border-color: var(--cyan);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.5),
    0 0 50px rgba(61, 255, 232, 0.28),
    inset 0 0 36px rgba(125, 255, 77, 0.08);
}

.hold-blast-btn.is-holding {
  transform: scale(0.97);
  border-color: var(--accent);
}

.hold-blast-btn.is-armed {
  border-color: var(--accent);
  box-shadow:
    0 0 60px rgba(125, 255, 77, 0.45),
    inset 0 0 40px rgba(61, 255, 232, 0.15);
  animation: holdFlash 0.45s ease;
}

.hold-blast-ring {
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: conic-gradient(
    var(--accent) calc(var(--hold-p, 0) * 1%),
    rgba(61, 255, 232, 0.12) 0
  );
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
  transition: background 0.05s linear;
}

.hold-blast-core {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 1rem;
}

.hold-blast-label {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-align: center;
  color: var(--cyan);
  line-height: 1.3;
}

.hold-blast-hint {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-align: center;
  max-width: 280px;
}

.hold-mini-btn {
  position: relative;
  width: 52px;
  height: 52px;
  min-width: 52px;
  border-radius: 50%;
  border: 1px solid rgba(61, 255, 232, 0.35);
  background: rgba(2, 12, 16, 0.85);
  color: var(--cyan);
  cursor: pointer;
  touch-action: none;
  font-family: var(--font-display);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 16px rgba(61, 255, 232, 0.12);
}

.hold-mini-ring {
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: conic-gradient(
    var(--accent) calc(var(--hold-p, 0) * 1%),
    rgba(255, 255, 255, 0.08) 0
  );
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
  pointer-events: none;
}

.hold-mini-label {
  position: relative;
  z-index: 1;
}

.hold-mini-btn.is-holding {
  border-color: var(--accent);
}

.hold-mini-btn.is-armed {
  animation: holdFlash 0.4s ease;
}

@keyframes holdFlash {
  0% { filter: brightness(1); }
  40% { filter: brightness(1.6); }
  100% { filter: brightness(1); }
}

@media (max-width: 768px) {
  .deck-nav {
    gap: 0.25rem 0.75rem;
  }

  .deck-nav .nav-link {
    font-size: 0.6rem;
  }

  .hold-blast-btn {
    width: 128px;
    height: 128px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav-link .char,
  [data-dual-text].is-dual .char {
    transition: none !important;
  }

  .hold-blast-btn.is-armed,
  .hold-mini-btn.is-armed {
    animation: none !important;
  }
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.live-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent), 0 0 20px var(--accent-glow);
  animation: pulse 2s ease-in-out infinite;
}

.live-label {
  color: var(--accent);
  font-weight: 700;
}

.live-tool-name {
  color: var(--text-muted);
}

/* Feature section headers — shared across all tools */
.feature-section-header {
  margin-bottom: 1rem;
}

.feature-section-header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.45rem;
}

.feature-section-title-block {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.feature-section-icon {
  font-size: 1.15rem;
  line-height: 1;
  flex-shrink: 0;
}

.feature-section-title {
  font-family: var(--font-display);
  font-size: clamp(0.85rem, 2.5vw, 0.98rem);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  line-height: 1.2;
}

.feature-section-header-badges {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

.feature-section-badge {
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.28rem 0.55rem;
  border-radius: 4px;
  border: 1px solid rgba(0, 255, 136, 0.35);
  background: rgba(0, 255, 136, 0.1);
  color: var(--accent);
  white-space: nowrap;
}

.feature-section-tagline {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 0.5rem;
  max-width: 42rem;
}

.feature-section-info-btn {
  display: inline-block;
  margin-left: auto;
  margin-bottom: 0.35rem;
  padding: 0;
  border: none;
  background: none;
  color: var(--cyan);
  font-family: var(--font-body);
  font-size: 0.82rem;
  cursor: pointer;
  text-align: right;
  width: 100%;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.feature-section-info-btn:hover {
  color: var(--accent);
  opacity: 0.95;
}

.feature-section-desc-card {
  margin-top: 0.65rem;
  padding: 0.9rem 1rem;
  background: rgba(8, 12, 18, 0.85);
  border: 1px solid rgba(0, 255, 136, 0.15);
  border-radius: 8px;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.35s ease, opacity 0.3s ease, margin-top 0.3s ease, padding 0.3s ease;
}

.feature-section-desc-card.is-open {
  max-height: 520px;
  opacity: 1;
}

.feature-section-desc-card.hidden:not(.is-open) {
  display: block;
  margin-top: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-color: transparent;
  max-height: 0;
  opacity: 0;
}

.feature-section-desc-card p {
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.55;
  margin-bottom: 0.65rem;
}

.feature-section-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.feature-section-bullets li {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.4;
  padding-left: 1rem;
  position: relative;
}

.feature-section-bullets li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent);
}

.auto-analyze-card .feature-section-header {
  margin-bottom: 1.1rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid rgba(0, 255, 136, 0.08);
}

.header-meta {
  font-family: var(--font-display);
  font-size: 0.75rem;
}

.header-meta .divider {
  margin: 0 0.5rem;
  opacity: 0.4;
}

.title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 7vw, 4rem);
  font-weight: 900;
  letter-spacing: 0.1em;
  line-height: 1.05;
  margin-bottom: 0.55rem;
}

.title-gradient {
  background: linear-gradient(
    120deg,
    var(--plasma) 0%,
    var(--cyan) 28%,
    var(--accent) 55%,
    #ffffff 72%,
    var(--cyan) 100%
  );
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientShift 5s ease infinite;
  filter: drop-shadow(0 0 18px rgba(61, 255, 232, 0.35)) drop-shadow(0 0 40px rgba(125, 255, 77, 0.2));
}

.subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: lowercase;
  font-weight: 500;
}

/* Glass cards — holographic console panels */
.glass {
  background:
    linear-gradient(160deg, rgba(61, 255, 232, 0.06) 0%, transparent 40%),
    var(--bg-card);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow:
    0 8px 40px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(61, 255, 232, 0.12),
    inset 0 -1px 0 rgba(125, 255, 77, 0.05),
    0 0 0 1px rgba(0, 0, 0, 0.35);
  position: relative;
}

.glass::before {
  content: "";
  position: absolute;
  top: 0;
  left: 8%;
  right: 8%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(61, 255, 232, 0.55), transparent);
  pointer-events: none;
  opacity: 0.7;
}

.card {
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(0, 255, 136, 0.1);
}

.card-icon {
  color: var(--accent);
  font-size: 1rem;
}

.card-header h2 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  flex: 1;
}

.card-badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.card-badge.accent {
  color: var(--accent);
  border-color: var(--border);
  background: var(--accent-dim);
}

.card-badge.error {
  color: var(--error);
  border-color: rgba(255, 77, 109, 0.3);
  background: rgba(255, 77, 109, 0.1);
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.btn-primary {
  position: relative;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.75rem 1.75rem;
  min-height: 44px;
  color: #021008;
  background: linear-gradient(135deg, var(--accent) 0%, var(--cyan) 100%);
  border: none;
  border-radius: 3px;
  cursor: pointer;
  overflow: hidden;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 0 20px rgba(125, 255, 77, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 0 24px var(--accent-glow);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transform: translateX(-100%);
  animation: btnShine 3s ease-in-out infinite;
}

.status-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.status-text.loading {
  color: var(--accent);
  animation: blink 1.2s ease-in-out infinite;
}

.error-content {
  color: var(--error);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Auto analyze */
.auto-hint {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1rem;
  letter-spacing: 0.03em;
}

.btn-auto .btn-text {
  letter-spacing: 0.18em;
}

.auto-loading-card {
  text-align: center;
  padding: 2rem 1.5rem;
}

.loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}

.spinner {
  width: 52px;
  height: 52px;
  border: 3px solid rgba(0, 255, 136, 0.15);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.25);
}

.loading-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  animation: blink 1.5s ease-in-out infinite;
}

.loading-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 420px;
  line-height: 1.5;
}

.loading-progress-track {
  width: 100%;
  max-width: 320px;
  height: 4px;
  margin-top: 0.5rem;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  overflow: hidden;
}

.loading-progress-bar {
  height: 100%;
  width: 30%;
  background: linear-gradient(90deg, var(--accent), var(--cyan));
  border-radius: 2px;
  animation: loadingSlide 2s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes loadingSlide {
  0% { transform: translateX(-100%); }
  50% { transform: translateX(200%); }
  100% { transform: translateX(-100%); }
}

/* Trade form */
.trade-form .field-group {
  margin-bottom: 1.1rem;
}

.field-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
}

.trade-form input[type="text"] {
  width: 100%;
  padding: 0.85rem 1rem;
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: var(--text);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(0, 255, 136, 0.15);
  border-radius: 8px;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.trade-form input[type="text"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

/* Analysis Report — Bloomberg / Reuters terminal style */
.report-terminal {
  --report-bg: #0d1117;
  --report-card: #161b22;
  --report-border: #30363d;
  --report-text: #c9d1d9;
  --report-muted: #8b949e;
  --report-mono: "IBM Plex Mono", "Consolas", monospace;
  --report-green: #3fb950;
  --report-red: #f85149;
  --report-yellow: #d29922;
  --report-blue: #58a6ff;

  font-family: var(--report-mono);
  background: var(--report-bg);
  border: 1px solid var(--report-border);
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  color: var(--report-text);
}

.report-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--report-border);
}

.report-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--report-muted);
  margin-bottom: 0.35rem;
}

.report-company-name {
  font-size: 1.65rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #f0f6fc;
  line-height: 1.25;
  margin: 0;
}

.report-symbol-sub {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--report-muted);
  margin: 0.25rem 0 0;
}

.report-timestamp {
  font-size: 0.72rem;
  color: var(--report-muted);
  white-space: nowrap;
}

.fundamental-mode-tabs {
  display: flex;
  gap: 0.5rem;
  margin: 0 0 0.85rem;
  flex-wrap: wrap;
}

.fundamental-mode-tab {
  border: 1px solid var(--report-border);
  background: rgba(13, 17, 23, 0.6);
  color: #8b949e;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.45rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
}

.fundamental-mode-tab.active {
  color: #00ff88;
  border-color: rgba(0, 255, 136, 0.35);
  background: rgba(0, 255, 136, 0.08);
}

.guardian-news-results {
  margin-top: 0.85rem;
}

.report-panel {
  background: var(--report-card);
  border: 1px solid var(--report-border);
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 0.85rem;
}

.analysis-basis-panel {
  padding: 0;
  overflow: hidden;
}

.analysis-basis-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.9rem 1rem;
  border: none;
  background: rgba(88, 166, 255, 0.08);
  color: #e6edf3;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s ease;
}

.analysis-basis-toggle:hover,
.analysis-basis-toggle[aria-expanded="true"] {
  background: rgba(88, 166, 255, 0.14);
}

.analysis-basis-toggle-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.analysis-basis-toggle-text {
  flex: 1;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--report-blue);
}

.analysis-basis-chevron {
  font-size: 0.7rem;
  color: var(--report-muted);
  transition: transform 0.2s ease;
}

.analysis-basis-toggle[aria-expanded="true"] .analysis-basis-chevron {
  transform: rotate(180deg);
}

.analysis-basis-body {
  padding: 0 1rem 1rem;
  border-top: 1px solid var(--report-border);
}

.analysis-basis-summary {
  margin: 0.85rem 0;
  font-size: 0.84rem;
  line-height: 1.65;
  color: #c9d1d9;
}

.analysis-basis-quality {
  margin-bottom: 0.85rem;
  padding: 0.55rem 0.75rem;
  border-radius: 6px;
  background: rgba(0, 255, 136, 0.06);
  border: 1px solid rgba(0, 255, 136, 0.2);
  font-size: 0.8rem;
  color: #8b949e;
}

.analysis-basis-section-title {
  margin: 0.85rem 0 0.45rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--report-muted);
  text-transform: uppercase;
}

.analysis-basis-list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.82rem;
  line-height: 1.6;
  color: #e6edf3;
}

.analysis-basis-charts {
  display: grid;
  gap: 0.65rem;
}

.analysis-basis-chart-card {
  display: grid;
  gap: 0.45rem;
  padding: 0.65rem;
  border-radius: 6px;
  border: 1px solid var(--report-border);
  background: rgba(13, 17, 23, 0.5);
}

.analysis-basis-chart-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.analysis-basis-chart-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #e6edf3;
}

.analysis-basis-used-pill {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: rgba(0, 255, 136, 0.12);
  color: #00ff88;
  border: 1px solid rgba(0, 255, 136, 0.25);
}

.analysis-basis-ref-pill {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: rgba(88, 166, 255, 0.1);
  color: #58a6ff;
  border: 1px solid rgba(88, 166, 255, 0.25);
}

.analysis-basis-chart-detail {
  font-size: 0.76rem;
  color: #8b949e;
  line-height: 1.5;
}

.analysis-basis-chart-thumb {
  width: 100%;
  max-height: 180px;
  object-fit: contain;
  border-radius: 4px;
  border: 1px solid var(--report-border);
  background: #0d1117;
  cursor: pointer;
}

.analysis-basis-documents a {
  color: #58a6ff;
  text-decoration: none;
}

.analysis-basis-documents a:hover {
  text-decoration: underline;
}

.analysis-basis-quotes {
  display: grid;
  gap: 0.55rem;
}

.analysis-basis-quote {
  margin: 0;
  padding: 0.65rem 0.75rem;
  border-left: 3px solid var(--report-blue);
  background: rgba(88, 166, 255, 0.05);
  border-radius: 0 6px 6px 0;
  font-size: 0.8rem;
  line-height: 1.55;
  color: #c9d1d9;
}

.analysis-basis-quote cite {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.72rem;
  font-style: normal;
  color: #8b949e;
}

.panel-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--report-blue);
  margin-bottom: 0.85rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--report-border);
}

.tf-section {
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(48, 54, 61, 0.6);
}

.tf-section:last-of-type {
  border-bottom: none;
}

.tf-section-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.55rem;
}

.tf-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--report-muted);
}

.tf-bullets,
.indicator-list {
  list-style: none;
  margin: 0;
  padding: 0 0 0 0.15rem;
}

.tf-bullets li,
.indicator-row {
  font-size: 0.78rem;
  line-height: 1.65;
  color: var(--report-text);
  padding: 0.2rem 0;
}

.tf-bullets li::before {
  content: "•";
  color: var(--report-blue);
  margin-right: 0.45rem;
}

.indicator-label {
  color: var(--report-muted);
  font-weight: 500;
}

.indicator-value {
  color: #f0f6fc;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.indicator-sep {
  color: var(--report-muted);
  margin: 0 0.25rem;
}

.indicator-hinglish {
  color: var(--report-muted);
  font-size: 0.74rem;
  font-style: normal;
}

.bullet-key {
  color: var(--report-muted);
  font-weight: 500;
}

.range-52w-section {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--report-border);
}

.range-52w-title {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--report-muted);
  margin: 0 0 0.65rem;
}

.range-52w-labels {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.range-52w-end {
  font-size: 0.72rem;
  color: var(--report-text);
}

.range-52w-bar {
  padding: 0.35rem 0;
}

.range-52w-track {
  position: relative;
  height: 8px;
  background: linear-gradient(
    90deg,
    rgba(63, 185, 80, 0.35) 0%,
    rgba(88, 166, 255, 0.25) 50%,
    rgba(248, 81, 73, 0.35) 100%
  );
  border: 1px solid var(--report-border);
  border-radius: 4px;
}

.range-52w-marker {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  background: #f0f6fc;
  border: 2px solid var(--report-blue);
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(88, 166, 255, 0.6);
}

.range-52w-pct {
  font-size: 0.74rem;
  color: var(--report-muted);
  text-align: center;
  margin: 0.5rem 0 0;
}

.hinglish-note {
  font-size: 0.76rem;
  line-height: 1.6;
  color: var(--report-muted);
  margin: 0.65rem 0 0;
  padding: 0.55rem 0.65rem;
  background: rgba(13, 17, 23, 0.45);
  border-left: 2px solid var(--report-blue);
  border-radius: 0 4px 4px 0;
}

.sr-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.sr-group-label {
  display: block;
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--report-muted);
  margin-bottom: 0.5rem;
}

.sr-badges,
.sr-levels {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sr-level-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.sr-hint {
  font-size: 0.72rem;
  line-height: 1.45;
  color: var(--report-muted);
  padding-left: 0.15rem;
}

.sr-badge {
  display: inline-block;
  width: fit-content;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.3rem 0.55rem;
  border-radius: 4px;
  border: 1px solid transparent;
}

.sr-support {
  color: var(--report-green);
  background: rgba(63, 185, 80, 0.1);
  border-color: rgba(63, 185, 80, 0.35);
}

.sr-resistance {
  color: var(--report-red);
  background: rgba(248, 81, 73, 0.1);
  border-color: rgba(248, 81, 73, 0.35);
}

.sr-empty {
  font-size: 0.78rem;
  color: var(--report-muted);
}

.direction-pill {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  text-align: center;
  border: 1px solid transparent;
}

.dir-bullish {
  color: var(--report-green);
  background: rgba(63, 185, 80, 0.12);
  border-color: rgba(63, 185, 80, 0.35);
}

.dir-bearish {
  color: var(--report-red);
  background: rgba(248, 81, 73, 0.12);
  border-color: rgba(248, 81, 73, 0.35);
}

.dir-sideways {
  color: var(--report-yellow);
  background: rgba(210, 153, 34, 0.12);
  border-color: rgba(210, 153, 34, 0.35);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
}

.metric-card {
  background: rgba(13, 17, 23, 0.55);
  border: 1px solid var(--report-border);
  border-radius: 6px;
  padding: 0.7rem 0.75rem;
  min-height: 72px;
  transition: border-color 0.2s;
}

.metric-card:hover {
  border-color: rgba(88, 166, 255, 0.45);
}

.metric-card-wide {
  grid-column: span 2;
}

.metric-label {
  display: block;
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--report-muted);
  margin-bottom: 0.35rem;
}

.metric-value {
  font-size: 0.95rem;
  font-weight: 400;
  color: #f0f6fc;
  word-break: break-word;
  font-variant-numeric: tabular-nums;
  display: block;
}

.metric-hint {
  display: block;
  font-size: 0.7rem;
  line-height: 1.45;
  color: var(--report-muted);
  margin-top: 0.35rem;
}

.position-lines {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.position-line {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.72rem;
  color: var(--report-muted);
}

.position-val {
  color: #f0f6fc;
  font-weight: 400;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.halal-header {
  margin-bottom: 0.65rem;
}

.halal-summary {
  margin-top: 0;
}

.halal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 0.85rem;
  align-items: start;
}

.halal-label {
  display: block;
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--report-muted);
  margin-bottom: 0.35rem;
}

.halal-text {
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--report-text);
  margin: 0;
}

.shariah-pill {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid transparent;
}

.shariah-halal {
  color: var(--report-green);
  background: rgba(63, 185, 80, 0.12);
  border-color: rgba(63, 185, 80, 0.35);
}

.shariah-haram {
  color: var(--report-red);
  background: rgba(248, 81, 73, 0.12);
  border-color: rgba(248, 81, 73, 0.35);
}

.shariah-doubtful {
  color: var(--report-yellow);
  background: rgba(210, 153, 34, 0.12);
  border-color: rgba(210, 153, 34, 0.35);
}

.verdict-panel {
  text-align: center;
  padding: 1.25rem 1rem;
}

.verdict-bullets {
  list-style: none;
  margin: 0 auto 1rem;
  padding: 0;
  max-width: 640px;
  text-align: left;
}

.verdict-bullets li {
  font-size: 0.76rem;
  line-height: 1.6;
  color: var(--report-muted);
  padding: 0.3rem 0 0.3rem 0.85rem;
  position: relative;
}

.verdict-bullets li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--report-blue);
  font-size: 0.65rem;
}

.final-verdict {
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  margin-bottom: 1rem;
}

.fv-buy {
  color: var(--report-green);
}

.fv-avoid {
  color: var(--report-red);
}

.fv-wait {
  color: var(--report-yellow);
}

.verdict-confidence {
  max-width: 360px;
  margin: 0 auto;
}

.confidence-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.45rem;
}

.confidence-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--report-muted);
}

.confidence-score {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--report-blue);
}

.terminal-progress-track {
  height: 6px;
  background: rgba(48, 54, 61, 0.8);
  border-radius: 3px;
  overflow: hidden;
}

.terminal-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--report-blue);
  border-radius: 3px;
  transition: width 0.5s ease-out;
}

/* Stock Scanner */
.scanner-section {
  margin-bottom: 1.25rem;
}

.scanner-section-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.65rem;
}

.scanner-section-icon {
  font-size: 1.1rem;
}

.scanner-section-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  flex: 1;
}

.scanner-section-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1.1rem;
}

.scanner-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.scanner-card {
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 220px;
}

.scanner-card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.scanner-card-icon {
  font-size: 1rem;
}

.scanner-card-header h3 {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.scanner-card-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
  flex: 1;
}

.scanner-card-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.scanner-status-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.scanner-status-pill {
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  border: 1px solid transparent;
}

.scanner-status-idle {
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.scanner-status-scanning {
  color: var(--cyan);
  background: rgba(0, 212, 255, 0.1);
  border-color: rgba(0, 212, 255, 0.3);
  animation: blink 1.2s ease-in-out infinite;
}

.scanner-status-complete {
  color: var(--accent);
  background: var(--accent-dim);
  border-color: var(--border);
}

.scanner-progress-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.scanner-progress-track {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  overflow: hidden;
}

.scanner-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--cyan));
  border-radius: 2px;
  transition: width 0.4s ease;
}

.scanner-progress-text {
  font-size: 0.68rem;
  color: var(--text-muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.btn-scanner {
  width: 100%;
  font-size: 0.72rem;
  padding: 0.65rem 0.75rem;
}

.scanner-results {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.1rem;
}

.scanner-results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid rgba(0, 255, 136, 0.1);
}

.scanner-results-title {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.scanner-results-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.scanner-results-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
}

.scanner-tab {
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 0.35rem 0.65rem;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(0, 255, 136, 0.12);
  border-radius: 4px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.scanner-tab:hover {
  color: var(--text);
  border-color: rgba(0, 255, 136, 0.25);
}

.scanner-tab.active {
  color: var(--accent);
  background: var(--accent-dim);
  border-color: var(--border);
}

.scanner-table-wrap {
  overflow-x: auto;
}

.scanner-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.scanner-table th {
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: left;
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid rgba(0, 255, 136, 0.12);
}

.scanner-table td {
  padding: 0.65rem 0.6rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: top;
}

.scanner-table tbody tr:hover {
  background: rgba(0, 255, 136, 0.03);
}

.scanner-rank {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--accent);
  width: 2.5rem;
}

.scanner-stock-name {
  display: block;
  font-weight: 600;
  color: var(--text);
}

.scanner-stock-symbol {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  margin-top: 0.1rem;
}

.scanner-reason {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0.35rem 0 0;
  max-width: 320px;
}

.scanner-score {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--cyan);
  font-variant-numeric: tabular-nums;
}

.scanner-trend-pill {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  border: 1px solid transparent;
}

.scanner-trend-bullish {
  color: #3fb950;
  background: rgba(63, 185, 80, 0.12);
  border-color: rgba(63, 185, 80, 0.35);
}

.scanner-trend-bearish {
  color: #f85149;
  background: rgba(248, 81, 73, 0.12);
  border-color: rgba(248, 81, 73, 0.35);
}

.scanner-trend-sideways {
  color: #d29922;
  background: rgba(210, 153, 34, 0.12);
  border-color: rgba(210, 153, 34, 0.35);
}

.scanner-action {
  white-space: nowrap;
  vertical-align: middle;
}

.btn-scanner-analyze {
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.35rem 0.55rem;
  border-radius: 4px;
  border: 1px solid rgba(0, 255, 136, 0.5);
  background: rgba(0, 255, 136, 0.12);
  color: var(--accent);
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.btn-scanner-analyze:hover:not(:disabled) {
  background: rgba(0, 255, 136, 0.22);
  box-shadow: 0 0 12px var(--accent-glow);
}

.btn-scanner-analyze:disabled,
.btn-scanner-analyze.is-analyzing {
  opacity: 0.65;
  cursor: not-allowed;
  box-shadow: none;
}

.scanner-empty-msg {
  font-size: 0.88rem;
  color: var(--text-muted);
  text-align: center;
  padding: 1.5rem 0;
}

/* Sentinel 24/7 War Room */
.sentinel-section {
  margin-bottom: 1.25rem;
  --sentinel-red: #ff4d6d;
  --sentinel-yellow: #ffc857;
  --sentinel-green: #00ff88;
  --sentinel-orange: #ff8c42;
}

.sentinel-section-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.65rem;
}

.sentinel-section-icon {
  font-size: 1.1rem;
}

.sentinel-section-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  flex: 1;
}

.sentinel-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sentinel-red);
  box-shadow: 0 0 10px rgba(255, 77, 109, 0.7);
  animation: pulse 2s ease-in-out infinite;
}

.sentinel-section-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1rem;
}

.sentinel-toolbar {
  padding: 1.1rem;
  margin-bottom: 0.85rem;
  border: 1px solid rgba(255, 77, 109, 0.15);
  background: rgba(20, 8, 12, 0.55);
}

.sentinel-watch-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  align-items: end;
  margin-bottom: 1rem;
}

.stock-search-group {
  position: relative;
}

.stock-search-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.4rem;
  flex-wrap: wrap;
}

.stock-search-label-row .field-label {
  margin-bottom: 0;
}

.price-capsule {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  max-width: 100%;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(61, 255, 232, 0.45);
  background: linear-gradient(180deg, rgba(61, 255, 232, 0.14), rgba(4, 14, 18, 0.85));
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-display);
  box-shadow: 0 0 14px rgba(61, 255, 232, 0.16);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}

.price-capsule:hover {
  transform: translateY(-1px);
  border-color: rgba(125, 255, 77, 0.7);
  box-shadow: 0 0 18px rgba(125, 255, 77, 0.22);
}

.price-capsule.is-loading {
  opacity: 0.75;
}

.price-capsule.is-error {
  border-color: rgba(255, 77, 109, 0.55);
  box-shadow: none;
}

.price-capsule-kicker {
  font-size: 0.52rem;
  letter-spacing: 0.12em;
  color: var(--cyan);
}

.price-capsule-value {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.sentinel-search-group {
  position: relative;
}

.sentinel-autocomplete {
  position: relative;
  width: 100%;
}

.sentinel-search-dropdown {
  position: fixed !important;
  z-index: 99999 !important;
  background: #0d1117;
  border: 1px solid #00ff88;
  border-radius: 8px;
  min-width: 280px;
  max-width: 620px;
  max-height: 320px;
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
  font-family: "IBM Plex Mono", "Consolas", monospace;
  scrollbar-color: #21262d #0d1117;
  scrollbar-width: thin;
}

.sentinel-search-dropdown::-webkit-scrollbar {
  width: 6px;
}

.sentinel-search-dropdown::-webkit-scrollbar-track {
  background: #0d1117;
}

.sentinel-search-dropdown::-webkit-scrollbar-thumb {
  background: #21262d;
  border-radius: 3px;
}

.sentinel-search-dropdown.hidden {
  display: none;
}

.sentinel-search-item {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding: 12px 16px;
  cursor: pointer;
  border: none;
  border-bottom: 1px solid #21262d;
  background: #0d1117;
  text-align: left;
  font-family: inherit;
  transition: background 0.12s ease;
}

.sentinel-search-item:last-child {
  border-bottom: none;
}

.sentinel-search-item:hover,
.sentinel-search-item.active {
  background: #161b22;
}

.sentinel-search-symbol {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #00ff88;
  line-height: 1.35;
  word-break: break-word;
}

.sentinel-search-company {
  font-size: 13px;
  font-weight: 300;
  color: #e6edf3;
  line-height: 1.45;
  word-break: break-word;
  white-space: normal;
}

.sentinel-search-highlight {
  background: #00ff8820;
  color: #00ff88;
  font-weight: 600;
  border-radius: 2px;
  padding: 0 2px;
}

.sentinel-search-empty {
  padding: 12px 16px;
  font-family: "IBM Plex Mono", "Consolas", monospace;
  font-size: 13px;
  font-weight: 400;
  color: #8b949e;
  text-align: center;
  background: #0d1117;
}

.sentinel-input-group input {
  width: 100%;
  padding: 0.75rem 0.9rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 77, 109, 0.2);
  border-radius: 8px;
}

.sentinel-input-group input:focus {
  outline: none;
  border-color: var(--sentinel-red);
  box-shadow: 0 0 0 3px rgba(255, 77, 109, 0.12);
}

.btn-sentinel-add,
.btn-sentinel-scan {
  font-size: 0.72rem;
  padding: 0.75rem 1.1rem;
  white-space: nowrap;
}

.btn-sentinel-scan {
  background: var(--sentinel-red);
}

.btn-sentinel-scan:hover:not(:disabled) {
  box-shadow: 0 0 24px rgba(255, 77, 109, 0.45);
}

.sentinel-actions-row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.sentinel-accuracy-block {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.sentinel-accuracy-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--text-muted);
}

.sentinel-accuracy-score {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--cyan);
}

.sentinel-accuracy-score.accuracy-good {
  color: var(--sentinel-green);
}

.sentinel-accuracy-score.accuracy-mid {
  color: var(--sentinel-yellow);
}

.sentinel-accuracy-score.accuracy-low {
  color: var(--sentinel-red);
}

.sentinel-accuracy-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.sentinel-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 0.85rem;
}

.sentinel-watchlist-panel,
.sentinel-alerts-panel {
  padding: 1rem;
  min-height: 320px;
  border: 1px solid rgba(255, 77, 109, 0.12);
  background: rgba(14, 10, 16, 0.6);
}

.sentinel-panel-title {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--sentinel-red);
  margin-bottom: 0.85rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 77, 109, 0.15);
}

.sentinel-watchlist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sentinel-watch-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0.65rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
}

.sentinel-watch-symbol {
  display: block;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--sentinel-red);
  letter-spacing: 0.06em;
}

.sentinel-watch-company {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

.sentinel-unwatch-btn {
  background: transparent;
  border: 1px solid rgba(255, 77, 109, 0.35);
  color: var(--sentinel-red);
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.75rem;
  line-height: 1;
  transition: background 0.15s;
}

.sentinel-unwatch-btn:hover {
  background: rgba(255, 77, 109, 0.15);
}

.sentinel-alerts-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 77, 109, 0.15);
}

.sentinel-alerts-header .sentinel-panel-title {
  margin: 0;
  padding: 0;
  border: none;
}

.sentinel-alerts-meta {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.sentinel-alerts-feed {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-height: 520px;
  overflow-y: auto;
}

.sentinel-alert-card {
  padding: 0.85rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-left: 3px solid var(--sentinel-red);
  border-radius: 6px;
  animation: fadeUp 0.35s ease-out;
}

.sentinel-alert-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.sentinel-alert-company {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text);
}

.sentinel-alert-symbol {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

.sentinel-alert-time {
  font-size: 0.68rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.sentinel-alert-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.55rem;
}

.sentinel-badge {
  font-family: var(--font-display);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  border: 1px solid transparent;
}

.sentinel-type-badge {
  color: var(--cyan);
  background: rgba(0, 212, 255, 0.1);
  border-color: rgba(0, 212, 255, 0.3);
}

.sentinel-priority-high {
  color: var(--sentinel-red);
  background: rgba(255, 77, 109, 0.12);
  border-color: rgba(255, 77, 109, 0.35);
}

.sentinel-priority-medium {
  color: var(--sentinel-yellow);
  background: rgba(255, 200, 87, 0.1);
  border-color: rgba(255, 200, 87, 0.35);
}

.sentinel-priority-low {
  color: var(--sentinel-green);
  background: rgba(0, 255, 136, 0.1);
  border-color: rgba(0, 255, 136, 0.35);
}

.sentinel-sentiment-bullish {
  color: var(--sentinel-green);
  background: rgba(0, 255, 136, 0.1);
  border-color: rgba(0, 255, 136, 0.3);
}

.sentinel-sentiment-bearish {
  color: var(--sentinel-red);
  background: rgba(255, 77, 109, 0.1);
  border-color: rgba(255, 77, 109, 0.3);
}

.sentinel-sentiment-neutral {
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

.sentinel-source-badge {
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.sentinel-alert-summary {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.sentinel-alert-impact {
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.sentinel-alert-link {
  font-size: 0.72rem;
  color: var(--cyan);
  text-decoration: none;
}

.sentinel-alert-link:hover {
  text-decoration: underline;
}

.sentinel-empty-msg {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
  padding: 1.25rem 0.5rem;
}

.sentinel-empty-msg.hidden {
  display: none;
}

/* Fundamental Analysis — war room theme */
.fundamental-section {
  margin-bottom: 1.25rem;
  font-family: "IBM Plex Mono", "Consolas", monospace;
}

.fundamental-section-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.65rem;
}

.fundamental-section-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #00ff88;
  flex: 1;
}

.fundamental-section-desc {
  font-size: 0.88rem;
  color: #8b949e;
  line-height: 1.5;
  margin-bottom: 1rem;
  letter-spacing: 0.02em;
}

.fundamental-card {
  background: #161b22;
  border: 1px solid #21262d;
  border-radius: 8px;
  box-shadow: none;
}

.fundamental-toolbar {
  padding: 1.1rem;
  margin-bottom: 0.85rem;
}

.fundamental-analyze-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  align-items: end;
  margin-bottom: 0.65rem;
}

.fundamental-analyze-form input[type="text"] {
  width: 100%;
  padding: 0.85rem 1rem;
  font-family: "IBM Plex Mono", "Consolas", monospace;
  font-size: 0.95rem;
  color: #e6edf3;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(0, 255, 136, 0.15);
  border-radius: 8px;
}

.fundamental-analyze-form input[type="text"]:focus {
  outline: none;
  border-color: #00ff88;
  box-shadow: 0 0 0 3px rgba(0, 255, 136, 0.12);
}

.fundamental-analyze-form .field-label {
  color: #8b949e;
}

.fundamental-status-text {
  font-size: 0.82rem;
  color: #8b949e;
}

.fundamental-status-text.loading {
  color: #00ff88;
  animation: blink 1.2s ease-in-out infinite;
}

.fundamental-error {
  margin-top: 0.65rem;
  font-size: 0.82rem;
  color: var(--error);
  line-height: 1.55;
}

.fundamental-error.hidden {
  display: none;
}

.fundamental-error-title {
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.fundamental-progress-steps {
  list-style: none;
  margin: 0.5rem 0 0.65rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.fundamental-progress-steps.hidden {
  display: none;
}

.fundamental-progress-step {
  font-size: 0.8rem;
  color: #8b949e;
  opacity: 0;
  transform: translateY(4px);
  animation: fundamentalStepIn 0.35s ease forwards;
}

.fundamental-progress-step.done {
  color: #00ff88;
  font-weight: 600;
}

.fundamental-btn-spin {
  display: inline-block;
  animation: spin 0.9s linear infinite;
}

@keyframes fundamentalStepIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fundamental-loading {
  text-align: center;
  padding: 2rem 1.5rem;
}

.fundamental-loading .loading-title {
  color: #00ff88;
}

.fundamental-loading .loading-subtitle {
  color: #8b949e;
}

.fundamental-results {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.fundamental-report {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.fundamental-report-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.1rem;
}

.fundamental-report-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.65rem;
}

.fundamental-folder-btn {
  font-family: "IBM Plex Mono", "Consolas", monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #00ff88;
  background: rgba(0, 255, 136, 0.08);
  border: 1px solid rgba(0, 255, 136, 0.35);
  border-radius: 6px;
  padding: 0.45rem 0.75rem;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.fundamental-folder-btn:hover {
  background: rgba(0, 255, 136, 0.16);
  border-color: #00ff88;
}

.fundamental-folder-btn.hidden {
  display: none;
}

.fundamental-management-insights {
  padding: 1rem;
}

.fundamental-management-insights.hidden {
  display: none;
}

.fundamental-insights-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.fundamental-insight-panel {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid #21262d;
  border-radius: 8px;
  padding: 0.85rem;
}

.fundamental-insight-title {
  font-family: var(--font-display);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #00ff88;
  margin: 0 0 0.65rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid #21262d;
}

.fundamental-insight-body {
  font-size: 0.78rem;
  line-height: 1.55;
  color: #e6edf3;
}

.fundamental-insight-meta {
  font-size: 0.72rem;
  color: #8b949e;
  margin-bottom: 0.45rem;
}

.fundamental-tone-badge {
  display: inline-block;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  margin-bottom: 0.5rem;
}

.fundamental-tone-confident {
  color: #00ff88;
  background: rgba(0, 255, 136, 0.12);
  border: 1px solid rgba(0, 255, 136, 0.35);
}

.fundamental-tone-cautious {
  color: #d29922;
  background: rgba(210, 153, 34, 0.12);
  border: 1px solid rgba(210, 153, 34, 0.35);
}

.fundamental-tone-neutral {
  color: #8b949e;
  background: rgba(139, 148, 158, 0.12);
  border: 1px solid rgba(139, 148, 158, 0.35);
}

.fundamental-insight-list {
  margin: 0.35rem 0 0;
  padding-left: 1.1rem;
}

.fundamental-insight-list li {
  margin-bottom: 0.3rem;
  color: #e6edf3;
}

.fundamental-insight-row {
  margin-bottom: 0.4rem;
}

.fundamental-insight-key {
  display: block;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #8b949e;
  margin-bottom: 0.12rem;
}

.fundamental-report-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #8b949e;
  margin-bottom: 0.35rem;
}

.fundamental-company-name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: #e6edf3;
  margin: 0;
}

.fundamental-symbol-meta {
  font-size: 0.76rem;
  color: #8b949e;
  margin-top: 0.25rem;
  letter-spacing: 0.04em;
}

.fundamental-verdict-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
}

.fundamental-verdict-pill {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid transparent;
}

.fv-strong-buy,
.fv-buy {
  color: #00ff88;
  background: rgba(0, 255, 136, 0.12);
  border-color: rgba(0, 255, 136, 0.35);
}

.fv-hold {
  color: #d29922;
  background: rgba(210, 153, 34, 0.12);
  border-color: rgba(210, 153, 34, 0.35);
}

.fv-avoid,
.fv-strong-avoid {
  color: var(--error);
  background: rgba(255, 77, 109, 0.12);
  border-color: rgba(255, 77, 109, 0.35);
}

.fundamental-overall-score {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: #00ff88;
}

.fundamental-score-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

.fundamental-gauge-card {
  padding: 1rem;
  text-align: center;
}

.fundamental-gauge-label {
  display: block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #8b949e;
  margin-bottom: 0.75rem;
}

.fundamental-gauge {
  position: relative;
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.fundamental-gauge-fill {
  height: 100%;
  width: 0%;
  background: #00ff88;
  border-radius: 4px;
  transition: width 0.6s ease;
}

.fundamental-gauge-value {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: #00ff88;
}

.fundamental-halal-badge {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  margin-bottom: 0.5rem;
}

.fundamental-halal-detail {
  font-size: 0.72rem;
  color: #8b949e;
  line-height: 1.45;
}

.fundamental-accuracy-score {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: #00ff88;
}

.fundamental-accuracy-meta {
  font-size: 0.72rem;
  color: #8b949e;
  margin-top: 0.25rem;
}

.fundamental-predictions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.fundamental-prediction-card {
  padding: 1rem;
}

.fundamental-prediction-title {
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #00ff88;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #21262d;
}

.fundamental-prediction-row {
  font-size: 0.78rem;
  line-height: 1.55;
  margin-bottom: 0.45rem;
  color: #e6edf3;
}

.fundamental-prediction-key {
  display: block;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #8b949e;
  margin-bottom: 0.15rem;
}

.fundamental-confidence {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  color: #00ff88;
  margin-top: 0.35rem;
}

.fundamental-panels-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.fundamental-panel {
  padding: 1rem;
}

.fundamental-panel-title {
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #00ff88;
  margin-bottom: 0.75rem;
}

.fundamental-panel-body {
  font-size: 0.78rem;
  line-height: 1.55;
  color: #e6edf3;
}

.fundamental-metric-row {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.3rem 0;
  border-bottom: 1px solid #21262d;
  font-size: 0.76rem;
}

.fundamental-metric-key {
  color: #8b949e;
}

.fundamental-metric-val {
  color: #e6edf3;
  font-weight: 600;
  text-align: right;
}

.fundamental-patterns-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  max-height: 280px;
  overflow-y: auto;
}

.fundamental-pattern-item {
  padding: 0.5rem 0.6rem;
  background: rgba(0, 0, 0, 0.25);
  border-left: 2px solid #00ff88;
  border-radius: 0 4px 4px 0;
  font-size: 0.74rem;
  line-height: 1.45;
  color: #e6edf3;
}

.fundamental-pattern-date {
  font-weight: 700;
  color: #00ff88;
}

.fundamental-summary {
  padding: 1rem;
}

.fundamental-summary-text {
  font-size: 0.84rem;
  line-height: 1.65;
  color: #e6edf3;
}

/* Portfolio section */
.portfolio-section {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(0, 255, 136, 0.12);
}

.portfolio-section-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.portfolio-section-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
}

.portfolio-section-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0 0 1.25rem;
  line-height: 1.55;
}

.portfolio-card {
  background: rgba(13, 17, 23, 0.85);
  border: 1px solid rgba(0, 255, 136, 0.15);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.portfolio-toolbar {
  margin-bottom: 1rem;
}

.portfolio-add-form {
  display: grid;
  grid-template-columns: 2fr 0.8fr 0.8fr 1fr auto;
  gap: 0.75rem;
  align-items: end;
}

.portfolio-add-form input[type="number"],
.portfolio-add-form input[type="date"],
.portfolio-add-form input[type="text"] {
  width: 100%;
  padding: 0.55rem 0.65rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid #30363d;
  border-radius: 4px;
  color: #e6edf3;
  font-size: 0.82rem;
}

.portfolio-status-text {
  font-size: 0.76rem;
  color: #8b949e;
  margin: 0.75rem 0 0;
}

.portfolio-error {
  margin-top: 0.75rem;
  padding: 0.65rem 0.85rem;
  background: rgba(248, 81, 73, 0.12);
  border: 1px solid rgba(248, 81, 73, 0.35);
  border-radius: 4px;
  color: #ff7b72;
  font-size: 0.78rem;
}

.portfolio-error.hidden {
  display: none;
}

.portfolio-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.portfolio-summary-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.portfolio-summary-label {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: #8b949e;
  text-transform: uppercase;
}

.portfolio-summary-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: #e6edf3;
}

.portfolio-pnl-big {
  font-size: 1.6rem;
}

.portfolio-pnl-pct {
  font-size: 0.85rem;
  font-weight: 600;
}

.portfolio-pnl-positive {
  color: #00ff88;
}

.portfolio-pnl-negative {
  color: #ff7b72;
}

.portfolio-panel-title {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: #8b949e;
  text-transform: uppercase;
  margin: 0 0 0.75rem;
}

.portfolio-table-wrap {
  overflow-x: auto;
}

.portfolio-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.76rem;
}

.portfolio-table th {
  text-align: left;
  padding: 0.5rem 0.4rem;
  color: #8b949e;
  letter-spacing: 0.08em;
  font-size: 0.68rem;
  border-bottom: 1px solid #21262d;
}

.portfolio-table td {
  padding: 0.55rem 0.4rem;
  border-bottom: 1px solid #21262d;
  color: #e6edf3;
}

.portfolio-table .portfolio-stock-name {
  font-weight: 600;
  color: #00ff88;
}

.portfolio-table .portfolio-stock-sub {
  font-size: 0.68rem;
  color: #8b949e;
}

.portfolio-remove-btn {
  padding: 0.25rem 0.5rem;
  font-size: 0.65rem;
  background: rgba(248, 81, 73, 0.15);
  border: 1px solid rgba(248, 81, 73, 0.4);
  color: #ff7b72;
  border-radius: 3px;
  cursor: pointer;
}

.portfolio-remove-btn:hover {
  background: rgba(248, 81, 73, 0.25);
}

.portfolio-risk-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.portfolio-gauge-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.portfolio-metric-big {
  font-size: 1.4rem;
  font-weight: 700;
  color: #00ff88;
}

.portfolio-metric-sub {
  font-size: 0.72rem;
  color: #8b949e;
  line-height: 1.4;
}

.portfolio-risk-badge {
  display: inline-block;
  padding: 0.35rem 0.65rem;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.portfolio-risk-high {
  background: rgba(248, 81, 73, 0.2);
  color: #ff7b72;
  border: 1px solid rgba(248, 81, 73, 0.45);
}

.portfolio-risk-medium {
  background: rgba(255, 166, 0, 0.15);
  color: #ffa657;
  border: 1px solid rgba(255, 166, 0, 0.4);
}

.portfolio-risk-low {
  background: rgba(0, 255, 136, 0.12);
  color: #00ff88;
  border: 1px solid rgba(0, 255, 136, 0.35);
}

.portfolio-sector-bars {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.portfolio-sector-row {
  display: grid;
  grid-template-columns: 120px 48px 1fr;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.76rem;
}

.portfolio-sector-label {
  color: #e6edf3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.portfolio-sector-pct {
  color: #8b949e;
  text-align: right;
}

.portfolio-sector-bar-track {
  height: 10px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 2px;
  overflow: hidden;
}

.portfolio-sector-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #00ff88, #00cc6a);
  border-radius: 2px;
  min-width: 2px;
}

.portfolio-sector-row.over .portfolio-sector-bar-fill {
  background: linear-gradient(90deg, #ffa657, #ff7b72);
}

.portfolio-correlation-list,
.portfolio-suggestion-list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.78rem;
  line-height: 1.55;
  color: #e6edf3;
}

.portfolio-correlation-list li,
.portfolio-suggestion-list li {
  margin-bottom: 0.4rem;
}

.portfolio-whatif-body {
  font-size: 0.78rem;
  line-height: 1.55;
  color: #e6edf3;
}

.portfolio-whatif-row {
  padding: 0.45rem 0;
  border-bottom: 1px solid #21262d;
}

.portfolio-analyze-row {
  margin: 1rem 0;
}

.portfolio-analysis-summary {
  margin-top: 0.85rem;
  font-size: 0.82rem;
  line-height: 1.65;
  color: #e6edf3;
}

.portfolio-data-sources {
  margin-bottom: 0.85rem;
  padding: 0.65rem 0.75rem;
  background: rgba(0, 255, 136, 0.06);
  border: 1px solid rgba(0, 255, 136, 0.2);
  border-radius: 4px;
  font-size: 0.72rem;
  line-height: 1.55;
  color: #8b949e;
  white-space: pre-line;
}

.portfolio-structured-suggestion {
  margin-bottom: 0.75rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  line-height: 1.55;
}

.portfolio-halal-halal { color: #00ff88; font-weight: 600; }
.portfolio-halal-doubtful { color: #ffa657; font-weight: 600; }
.portfolio-halal-haram { color: #ff7b72; font-weight: 600; }

/* News Sentiment */
.news-section {
  margin-top: 2.5rem;
}

.news-section-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.news-section-title {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: 0.06em;
  color: #ff7b72;
  text-transform: uppercase;
}

.news-badge {
  background: rgba(255, 123, 114, 0.15);
  color: #ff7b72;
  border: 1px solid rgba(255, 123, 114, 0.45);
}

.news-section-desc {
  margin: 0 0 1rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.55;
}

.news-card {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 123, 114, 0.18);
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 0.85rem;
}

.news-toolbar {
  margin-bottom: 1rem;
}

.news-input-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.news-text-group textarea {
  width: 100%;
  min-height: 140px;
  resize: vertical;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 123, 114, 0.25);
  border-radius: 4px;
  color: #e6edf3;
  padding: 0.75rem;
  font-family: inherit;
  font-size: 0.85rem;
  line-height: 1.5;
}

.news-headline-only {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.65rem;
  font-size: 0.78rem;
  color: #8b949e;
}

.btn-news-analyze {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border: 1px solid rgba(255, 123, 114, 0.55);
  background: linear-gradient(135deg, rgba(255, 123, 114, 0.25), rgba(255, 166, 0, 0.15));
  color: #ffb4a8;
  font-weight: 700;
  letter-spacing: 0.1em;
  cursor: pointer;
  border-radius: 4px;
  overflow: hidden;
}

.btn-news-analyze:hover {
  border-color: #ff7b72;
  color: #fff;
}

.btn-news-analyze:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.news-status-text {
  margin: 0.65rem 0 0;
  font-size: 0.78rem;
  color: #8b949e;
}

.news-verification-card {
  border-width: 2px;
}

.news-verification-card.verified {
  border-color: rgba(0, 255, 136, 0.45);
  background: rgba(0, 80, 50, 0.2);
}

.news-verification-card.unverified {
  border-color: rgba(255, 200, 87, 0.45);
  background: rgba(80, 60, 0, 0.15);
}

.news-verification-card.fake {
  border-color: rgba(255, 77, 109, 0.55);
  background: rgba(80, 0, 20, 0.25);
}

.news-verification-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.news-verification-verdict {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.news-verification-score {
  font-size: 0.9rem;
  color: #8b949e;
}

.news-verification-sources,
.news-verification-red-flags {
  margin-bottom: 0.65rem;
  font-size: 0.85rem;
  line-height: 1.6;
}

.news-verification-explanation {
  margin: 0.5rem 0;
  font-size: 0.88rem;
  line-height: 1.55;
  color: #c9d1d9;
  font-style: italic;
}

.news-verification-recommendation {
  margin: 0;
  font-size: 0.82rem;
  color: #ffb4a8;
  font-weight: 600;
}

.news-fake-warning {
  border: 2px solid rgba(255, 77, 109, 0.6);
  background: rgba(120, 0, 30, 0.3);
  text-align: center;
  font-weight: 700;
  color: #ff4d6d;
}

.news-fake-warning p {
  margin: 0;
}

.news-sentiment-section.dimmed {
  opacity: 0.85;
}

.sentinel-manual-news {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 77, 109, 0.2);
}

.sentinel-manual-news textarea,
.sentinel-manual-news input[type="url"] {
  width: 100%;
  margin-bottom: 0.65rem;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 77, 109, 0.25);
  border-radius: 4px;
  color: #e6edf3;
  padding: 0.65rem 0.75rem;
  font-family: inherit;
  font-size: 0.85rem;
}

.sentinel-manual-news-hint {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  color: #8b949e;
}

.btn-sentinel-manual {
  width: 100%;
  background: linear-gradient(135deg, #3dffe8 0%, #7dff4d 100%);
  color: #021008;
  border: none;
  font-weight: 700;
  box-shadow: 0 0 22px rgba(61, 255, 232, 0.4);
}

.btn-sentinel-manual .btn-text {
  color: #021008;
  -webkit-text-fill-color: #021008;
}

.btn-sentinel-manual:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 0 32px rgba(61, 255, 232, 0.6);
}

.btn-sentinel-manual:disabled {
  opacity: 0.55;
  filter: grayscale(0.2);
}

.sentinel-manual-status {
  margin: 0.5rem 0 0;
  font-size: 0.78rem;
  color: #8b949e;
}

.sentinel-type-manual_analysis {
  color: #ff8c42;
  border-color: rgba(255, 140, 66, 0.4);
}

.news-error {
  margin-top: 0.65rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(255, 123, 114, 0.45);
  background: rgba(255, 123, 114, 0.08);
  color: #ff7b72;
  font-size: 0.8rem;
  border-radius: 4px;
}

.news-report-label {
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: #ff7b72;
}

.news-headline-text {
  margin: 0.35rem 0 0.25rem;
  font-size: 1.1rem;
  color: #e6edf3;
}

.news-meta {
  margin: 0;
  font-size: 0.75rem;
  color: #8b949e;
}

.news-panel-title {
  margin: 0 0 0.75rem;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: #ffa657;
}

.news-sentiment-bar-wrap {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.65rem;
  align-items: center;
}

.news-sentiment-label.bearish { color: #ff7b72; font-size: 0.72rem; font-weight: 700; }
.news-sentiment-label.bullish { color: #00ff88; font-size: 0.72rem; font-weight: 700; }

.news-sentiment-track {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff7b72, #ffa657 50%, #00ff88);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.news-sentiment-marker {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #ffa657;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 10px rgba(255, 166, 0, 0.6);
}

.news-sentiment-detail {
  margin: 0.65rem 0 0;
  font-size: 0.8rem;
  color: #e6edf3;
}

.news-sentiment-bullish { color: #00ff88; }
.news-sentiment-bearish { color: #ff7b72; }
.news-sentiment-neutral { color: #ffa657; }

.news-table-wrap { overflow-x: auto; }

.news-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.news-table th,
.news-table td {
  padding: 0.55rem 0.45rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  text-align: left;
}

.news-table th {
  color: #8b949e;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.news-stock-portfolio {
  display: block;
  font-size: 0.68rem;
  color: #ffa657;
  margin-top: 0.15rem;
}

.news-direction-up { color: #00ff88; }
.news-direction-down { color: #ff7b72; }
.news-direction-neutral { color: #ffa657; }

.news-alert-card {
  border-color: rgba(255, 166, 0, 0.45);
  background: rgba(255, 166, 0, 0.06);
}

.news-watchlist-card {
  border-color: rgba(0, 255, 136, 0.25);
}

.news-alert-list,
.news-action-list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.8rem;
  line-height: 1.6;
  color: #e6edf3;
}

.news-sector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.55rem;
}

.news-sector-item {
  padding: 0.55rem 0.65rem;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.76rem;
}

.news-sector-positive { border-color: rgba(0, 255, 136, 0.3); }
.news-sector-negative { border-color: rgba(255, 123, 114, 0.3); }
.news-sector-neutral { border-color: rgba(255, 166, 0, 0.25); }

.news-macro-body,
.news-historical-body,
.news-summary-text {
  font-size: 0.8rem;
  line-height: 1.65;
  color: #e6edf3;
}

.news-summary-text { margin: 0; white-space: pre-line; }

/* Earnings Decoder — war room green theme */
.earnings-section {
  margin-bottom: 1.25rem;
  font-family: "IBM Plex Mono", "Consolas", monospace;
}

.earnings-section-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.65rem;
}

.earnings-section-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #00ff88;
  flex: 1;
}

.earnings-badge {
  background: rgba(0, 255, 136, 0.12);
  border-color: rgba(0, 255, 136, 0.45);
  color: #00ff88;
}

.earnings-section-desc {
  font-size: 0.85rem;
  color: #8b949e;
  line-height: 1.55;
  margin-bottom: 1rem;
}

.earnings-card {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(0, 255, 136, 0.18);
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 0.85rem;
}

.earnings-toolbar {
  margin-bottom: 1rem;
}

.earnings-decode-form {
  display: grid;
  grid-template-columns: 1.2fr 1.5fr auto;
  gap: 0.75rem;
  align-items: end;
  margin-bottom: 0.65rem;
}

.earnings-decode-form input[type="text"] {
  width: 100%;
  padding: 0.75rem;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(0, 255, 136, 0.25);
  border-radius: 4px;
  color: #e6edf3;
  font-family: inherit;
  font-size: 0.85rem;
}

.earnings-decode-form input[type="text"]:focus {
  outline: none;
  border-color: #00ff88;
  box-shadow: 0 0 0 3px rgba(0, 255, 136, 0.12);
}

.btn-earnings-decode {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.25rem;
  border: 1px solid rgba(0, 255, 136, 0.55);
  background: linear-gradient(135deg, rgba(0, 255, 136, 0.2), rgba(0, 180, 100, 0.12));
  color: #00ff88;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  border-radius: 4px;
  white-space: nowrap;
}

.btn-earnings-decode:hover:not(:disabled) {
  border-color: #00ff88;
  color: #fff;
  box-shadow: 0 0 16px rgba(0, 255, 136, 0.25);
}

.btn-earnings-decode:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.earnings-progress-steps {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
}

.earnings-progress-steps li {
  font-size: 0.8rem;
  color: #8b949e;
  padding: 0.2rem 0;
}

.earnings-progress-steps li.done {
  color: #00ff88;
}

.earnings-status-text {
  margin: 0.5rem 0 0;
  font-size: 0.78rem;
  color: #8b949e;
}

.earnings-status-text.loading {
  color: #00ff88;
}

.earnings-error {
  margin-top: 0.75rem;
  padding: 0.85rem;
  border: 1px solid rgba(255, 77, 109, 0.45);
  background: rgba(80, 0, 20, 0.2);
  border-radius: 4px;
  color: #ff8fa3;
  font-size: 0.85rem;
}

.earnings-error-title {
  margin: 0 0 0.5rem;
  font-weight: 700;
}

.btn-earnings-fundamental {
  margin-top: 0.65rem;
  padding: 0.55rem 0.9rem;
  border: 1px solid rgba(0, 255, 136, 0.4);
  background: transparent;
  color: #00ff88;
  cursor: pointer;
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.8rem;
}

.btn-earnings-fundamental:hover {
  background: rgba(0, 255, 136, 0.1);
}

.earnings-report-label {
  margin: 0 0 0.35rem;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: #8b949e;
}

.earnings-scorecard-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.earnings-company-name {
  margin: 0;
  font-size: 1.2rem;
  color: #e6edf3;
}

.earnings-quarter-meta {
  margin: 0.25rem 0 0;
  font-size: 0.82rem;
  color: #8b949e;
}

.earnings-verdict-badge {
  display: inline-block;
  padding: 0.45rem 0.75rem;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  border: 1px solid transparent;
}

.earnings-verdict-strong_beat,
.earnings-verdict-beat {
  color: #00ff88;
  border-color: rgba(0, 255, 136, 0.45);
  background: rgba(0, 80, 50, 0.25);
}

.earnings-verdict-in_line {
  color: #ffc857;
  border-color: rgba(255, 200, 87, 0.45);
  background: rgba(80, 60, 0, 0.2);
}

.earnings-verdict-miss,
.earnings-verdict-strong_miss {
  color: #ff4d6d;
  border-color: rgba(255, 77, 109, 0.45);
  background: rgba(80, 0, 20, 0.25);
}

.earnings-headline {
  margin: 0.75rem 0 0;
  font-size: 0.9rem;
  color: #c9d1d9;
}

.earnings-panel-title {
  margin: 0 0 0.75rem;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: #00ff88;
}

.earnings-table-wrap {
  overflow-x: auto;
}

.earnings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.earnings-table th,
.earnings-table td {
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid rgba(0, 255, 136, 0.12);
  text-align: left;
}

.earnings-metric-up {
  color: #00ff88;
}

.earnings-metric-down {
  color: #ff4d6d;
}

.earnings-trend-bars {
  display: flex;
  align-items: flex-end;
  gap: 0.45rem;
  min-height: 140px;
  padding-top: 0.5rem;
}

.earnings-trend-bar-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.earnings-trend-bar {
  width: 100%;
  max-width: 42px;
  background: linear-gradient(180deg, rgba(0, 255, 136, 0.75), rgba(0, 255, 136, 0.25));
  border-radius: 3px 3px 0 0;
  min-height: 8px;
}

.earnings-trend-bar.latest {
  background: linear-gradient(180deg, #00ff88, rgba(0, 255, 136, 0.35));
  box-shadow: 0 0 12px rgba(0, 255, 136, 0.35);
}

.earnings-trend-label {
  font-size: 0.62rem;
  color: #8b949e;
  text-align: center;
  line-height: 1.2;
}

.earnings-trend-value {
  font-size: 0.68rem;
  color: #e6edf3;
}

.earnings-mgmt-quote {
  margin: 0 0 0.65rem;
  padding: 0.75rem 0.9rem;
  border-left: 3px solid #00ff88;
  background: rgba(0, 255, 136, 0.06);
  font-style: italic;
  color: #e6edf3;
  font-size: 0.85rem;
  line-height: 1.55;
}

.earnings-tone-badge {
  display: inline-block;
  padding: 0.25rem 0.55rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  border: 1px solid rgba(0, 255, 136, 0.3);
  color: #00ff88;
}

.earnings-tone-cautious {
  color: #ffc857;
  border-color: rgba(255, 200, 87, 0.4);
}

.earnings-tone-defensive {
  color: #ff4d6d;
  border-color: rgba(255, 77, 109, 0.4);
}

.earnings-quality-list,
.earnings-sources-list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.82rem;
  line-height: 1.6;
  color: #e6edf3;
}

.earnings-stock-reaction {
  font-size: 0.85rem;
  line-height: 1.6;
  color: #e6edf3;
}

.earnings-halal-status {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.earnings-halal-maintained {
  color: #00ff88;
}

.earnings-halal-concern {
  color: #ffc857;
}

.earnings-halal-note {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  color: #8b949e;
}

.earnings-summary-text {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.65;
  color: #e6edf3;
  white-space: pre-line;
}

.earnings-comparison-card {
  padding-bottom: 1rem;
}

.earnings-comparison-tabs {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
}

.earnings-cmp-tab {
  font-family: var(--font-display);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  padding: 0.4rem 0.75rem;
  border: 1px solid rgba(0, 255, 136, 0.25);
  background: rgba(0, 255, 136, 0.06);
  color: var(--text-muted);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.earnings-cmp-tab:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.earnings-cmp-tab.active {
  color: var(--accent);
  background: rgba(0, 255, 136, 0.15);
  border-color: var(--accent);
}

.earnings-cmp-panel {
  display: none;
}

.earnings-cmp-panel.active {
  display: block;
}

.earnings-cmp-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
}

.earnings-comparison-table th,
.earnings-comparison-table td {
  font-size: 0.82rem;
}

.earnings-cmp-up {
  color: var(--accent);
}

.earnings-cmp-down {
  color: var(--error);
}

.earnings-cmp-level-label {
  font-size: 0.8rem;
  color: var(--cyan);
  margin-top: 0.75rem;
}

.earnings-cmp-trend-summary {
  font-size: 0.88rem;
  color: var(--text);
  margin-top: 0.5rem;
  line-height: 1.45;
}

.earnings-cmp-best-worst {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  line-height: 1.4;
}

.earnings-decade-chart {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0.5rem 0;
}

.earnings-decade-row {
  display: grid;
  grid-template-columns: 3.5rem 1fr auto;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
}

.earnings-decade-label {
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 0.68rem;
}

.earnings-decade-bar-track {
  height: 10px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  overflow: hidden;
}

.earnings-decade-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, rgba(0, 255, 136, 0.5), var(--accent));
  border-radius: 4px;
  min-width: 2%;
}

.earnings-decade-bar-fill.latest {
  background: linear-gradient(90deg, var(--cyan), var(--accent));
}

.earnings-decade-bar-fill.peak {
  box-shadow: 0 0 8px rgba(0, 255, 136, 0.4);
}

.earnings-decade-value {
  color: var(--text);
  white-space: nowrap;
  font-size: 0.78rem;
}

.earnings-decade-tag {
  font-size: 0.65rem;
  color: var(--cyan);
  margin-left: 0.25rem;
}

.earnings-context-box {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  background: rgba(8, 12, 18, 0.85);
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 8px;
}

.earnings-context-box.hidden {
  display: none;
}

.earnings-context-title {
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--cyan);
  margin-bottom: 0.4rem;
}

.earnings-context-text {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.5;
  white-space: pre-line;
}

@media (max-width: 900px) {
  .earnings-decode-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .news-input-grid {
    grid-template-columns: 1fr;
  }
}

/* Footer */
.footer {
  margin-top: auto;
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-link {
  color: rgba(61, 255, 232, 0.55);
}

/* Animations */
.fade-in {
  animation: fadeUp 0.6s ease-out;
}

.hidden {
  display: none;
}

.fade-in-show {
  animation: fadeUp 0.5s ease-out forwards;
}

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

@keyframes fadeDown {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 100% center; }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 0 8px var(--accent), 0 0 20px var(--accent-glow);
  }
  50% {
    opacity: 0.6;
    transform: scale(0.85);
    box-shadow: 0 0 4px var(--accent), 0 0 10px var(--accent-glow);
  }
}

@keyframes btnShine {
  0%, 100% { transform: translateX(-100%); }
  50% { transform: translateX(100%); }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

@keyframes starDrift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-8%, -6%, 0); }
}

@keyframes nebulaDrift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(4%, 3%, 0) scale(1.08); }
}

@keyframes nebulaPulse {
  0%, 100% { opacity: 0.35; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.12); }
}

@keyframes ufoSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes ufoPulse {
  0%, 100% {
    opacity: 1;
    box-shadow:
      0 0 24px var(--cyan),
      0 0 60px rgba(61, 255, 232, 0.45),
      0 0 100px rgba(125, 255, 77, 0.25);
  }
  50% {
    opacity: 0.75;
    box-shadow:
      0 0 12px var(--cyan),
      0 0 36px rgba(61, 255, 232, 0.3),
      0 0 70px rgba(125, 255, 77, 0.15);
  }
}

@keyframes beamPulse {
  0%, 100% { opacity: 0.3; transform: scaleX(0.92); }
  50% { opacity: 0.55; transform: scaleX(1.05); }
}

@keyframes energySweep {
  0% { background-position: 120% 0; }
  100% { background-position: -120% 0; }
}

@keyframes stripPulse {
  0%, 100% { opacity: 0.35; transform: scaleX(0.85); }
  50% { opacity: 1; transform: scaleX(1); }
}

@media (prefers-reduced-motion: reduce) {
  .starfield,
  .nebula,
  .ufo-ring,
  .ufo-core,
  .ufo-beam,
  .energy-sweep,
  .header-hud-strip span,
  .title-gradient {
    animation: none !important;
  }
}

@media (max-width: 900px) {
  .scanner-cards {
    grid-template-columns: 1fr;
  }

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

  .sentinel-watch-form {
    grid-template-columns: 1fr;
  }

  .fundamental-score-grid,
  .fundamental-predictions-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .fundamental-analyze-form {
    grid-template-columns: 1fr;
  }

  .portfolio-add-form {
    grid-template-columns: 1fr 1fr;
  }

  .portfolio-summary-grid,
  .portfolio-risk-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .header-top {
    flex-direction: column;
    gap: 0.75rem;
  }

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

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

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

  .metric-card-wide {
    grid-column: span 2;
  }

  .fundamental-score-grid,
  .fundamental-predictions-grid,
  .fundamental-panels-grid {
    grid-template-columns: 1fr;
  }

  .fundamental-insights-grid {
    grid-template-columns: 1fr;
  }

  .portfolio-add-form,
  .portfolio-summary-grid,
  .portfolio-risk-grid {
    grid-template-columns: 1fr;
  }

  .footer {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
}

/* Data collection modal */
body.collect-modal-open {
  overflow: hidden;
}

.collect-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  pointer-events: auto;
}

.collect-modal.hidden {
  display: none;
}

.collect-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
}

.collect-modal-card {
  position: relative;
  width: min(520px, 100%);
  padding: 1.5rem 1.75rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 0 40px rgba(0, 255, 136, 0.12);
}

.collect-modal-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.collect-modal-subtitle {
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.4;
}

.collect-modal-steps {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.collect-modal-step.running {
  color: var(--cyan);
}

.collect-modal-step.done {
  color: var(--accent);
}

.collect-modal-step.failed {
  color: var(--error);
}

.collect-modal-progress-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.collect-modal-progress-track {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.collect-modal-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--cyan));
  border-radius: 999px;
  transition: width 0.4s ease;
}

.collect-modal-progress-pct {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--accent);
  min-width: 2.5rem;
  text-align: right;
}

.collect-modal-eta {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.collect-modal-done {
  margin-top: 0.75rem;
  color: var(--accent);
  font-weight: 600;
}

.collect-modal-done.hidden {
  display: none;
}

/* --- THE BRAIN (Master Intelligence) --- */
.brain-section.ask-section {
  margin-bottom: 2rem;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.brain-section-header {
  margin-bottom: 1.25rem;
}

.brain-badge {
  background: rgba(61, 255, 232, 0.1);
  color: var(--cyan);
  border-color: rgba(61, 255, 232, 0.4);
}

.brain-form {
  border: 1px solid rgba(61, 255, 232, 0.28);
  background:
    linear-gradient(145deg, rgba(61, 255, 232, 0.08), rgba(125, 255, 77, 0.05)),
    rgba(4, 14, 18, 0.55);
  box-shadow: 0 0 48px rgba(61, 255, 232, 0.08), inset 0 0 30px rgba(125, 255, 77, 0.03);
}

.brain-input-wrap {
  border-color: rgba(61, 255, 232, 0.2);
}

.btn-brain {
  background: linear-gradient(135deg, var(--accent) 0%, var(--cyan) 100%);
  color: #021008;
}

.brain-response-summary {
  border-left-color: var(--cyan);
}

.ask-summary-detail,
.ask-hinglish-summary {
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text-muted);
  margin: 0 0 1rem;
}

.brain-fab:hover {
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5), 0 0 28px rgba(61, 255, 232, 0.4);
}

.ask-section {
  margin-bottom: 2rem;
  padding: 1.75rem 1.5rem 2rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(0, 255, 170, 0.06), rgba(0, 120, 255, 0.04));
  border: 1px solid rgba(0, 255, 170, 0.18);
  box-shadow: 0 0 40px rgba(0, 255, 170, 0.06);
}

.ask-section-header {
  margin-bottom: 1.25rem;
}

.ask-title-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.ask-brain-icon {
  font-size: 1.75rem;
  filter: drop-shadow(0 0 8px rgba(0, 255, 170, 0.5));
}

.ask-section-title {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  letter-spacing: 0.08em;
  color: var(--accent);
  margin: 0;
}

.ask-master-badge {
  font-size: 0.65rem;
  font-family: var(--font-display);
  letter-spacing: 0.12em;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(0, 255, 170, 0.12);
  color: var(--accent);
  border: 1px solid rgba(0, 255, 170, 0.35);
}

.ask-tagline {
  color: var(--text-muted);
  margin: 0.5rem 0 0;
  font-size: 0.95rem;
}

.ask-form {
  display: flex;
  gap: 0.75rem;
  align-items: stretch;
  padding: 0.85rem;
  margin-bottom: 0.85rem;
}

.ask-input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 0 0.75rem;
}

.ask-input-wrap input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 1.05rem;
  padding: 0.9rem 0;
  outline: none;
  min-width: 0;
}

.ask-input-wrap input::placeholder {
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.9rem;
}

.ask-voice-btn {
  border: none;
  background: transparent;
  font-size: 1.2rem;
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-ask {
  min-width: 7rem;
  font-size: 1.05rem;
  letter-spacing: 0.1em;
  padding: 0.9rem 1.5rem;
}

.ask-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.ask-suggestion-chip {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  cursor: pointer;
  min-height: 44px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.ask-suggestion-chip:hover {
  border-color: rgba(0, 255, 170, 0.4);
  color: var(--accent);
  background: rgba(0, 255, 170, 0.06);
}

.ask-loading {
  padding: 1rem 1.1rem;
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 1rem;
}

.ask-loading-title {
  font-family: var(--font-display);
  color: var(--cyan);
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
}

.ask-tool-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.ask-tool-step {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.92rem;
  color: var(--text-muted);
  transition: color 0.25s;
}

.ask-tool-step.running {
  color: var(--cyan);
}

.ask-tool-step.done {
  color: var(--accent);
}

.ask-tool-step.failed {
  color: var(--error);
}

.ask-tool-step-icon {
  width: 1.25rem;
  text-align: center;
}

.ask-error {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  background: rgba(255, 80, 80, 0.1);
  border: 1px solid rgba(255, 80, 80, 0.35);
  color: #ff9a9a;
  margin-bottom: 1rem;
}

.ask-response {
  animation: fadeIn 0.4s ease;
}

.ask-response-summary {
  padding: 1.1rem 1.25rem;
  margin-bottom: 1rem;
  border-left: 3px solid var(--accent);
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--text);
}

.ask-response-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

@media (max-width: 768px) {
  .ask-form {
    flex-direction: column;
  }

  .ask-response-grid {
    grid-template-columns: 1fr;
  }
}

.ask-card {
  padding: 1rem 1.1rem;
}

.ask-card-title {
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin: 0 0 0.75rem;
}

.ask-findings-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.ask-finding-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.92rem;
  line-height: 1.45;
}

.ask-source-badge {
  align-self: flex-start;
  font-size: 0.65rem;
  font-family: var(--font-display);
  letter-spacing: 0.06em;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: rgba(0, 200, 255, 0.12);
  color: var(--cyan);
  border: 1px solid rgba(0, 200, 255, 0.25);
}

.ask-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.ask-action-group-title {
  font-size: 0.72rem;
  font-family: var(--font-display);
  letter-spacing: 0.08em;
  margin-bottom: 0.25rem;
}

.ask-action-group-title.do {
  color: var(--accent);
}

.ask-action-group-title.watch {
  color: var(--cyan);
}

.ask-action-group-title.avoid {
  color: var(--error);
}

.ask-action-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.ask-action-list li {
  font-size: 0.9rem;
  padding-left: 1rem;
  position: relative;
  line-height: 1.4;
}

.ask-action-list.do li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
}

.ask-action-list.watch li::before {
  content: "👁";
  position: absolute;
  left: 0;
}

.ask-action-list.avoid li::before {
  content: "✕";
  position: absolute;
  left: 0;
  color: var(--error);
}

.ask-scores {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.ask-score-pill,
.ask-intent-pill {
  font-size: 0.78rem;
  font-family: var(--font-display);
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
}

.ask-intent-pill {
  color: var(--cyan);
  border-color: rgba(61, 255, 232, 0.3);
}

.ask-summary-detail {
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text-muted);
  margin: 0 0 1rem;
}

.ask-pick-cards {
  display: grid;
  gap: 0.75rem;
  margin: 0 0 1rem;
}

.ask-pick-cards-title {
  margin: 0 0 0.25rem;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--cyan);
}

.ask-pick-card {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
}

.ask-pick-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
}

.ask-pick-score {
  font-size: 0.78rem;
  color: #00ff88;
  font-weight: 700;
}

.ask-pick-meta,
.ask-pick-reason {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.ask-pick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.65rem;
}

.ask-pick-actions .btn-auto {
  font-size: 0.75rem;
  padding: 0.4rem 0.65rem;
}

.ask-detail-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ask-detail-link {
  font-size: 0.82rem;
  color: var(--cyan);
  text-decoration: none;
  padding: 0.35rem 0.7rem;
  border: 1px solid rgba(0, 200, 255, 0.25);
  border-radius: var(--radius-sm);
  background: rgba(0, 200, 255, 0.06);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.ask-detail-link:hover {
  background: rgba(0, 200, 255, 0.12);
  border-color: rgba(0, 200, 255, 0.45);
}

/* Floating BRAIN FAB + popup */
body.brain-popup-open {
  overflow: hidden;
}

/* Floating brain — icon only (no button chrome) */
#brain-float-btn,
.brain-icon-hit {
  position: fixed !important;
  right: 0.75rem !important;
  bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px)) !important;
  left: auto !important;
  top: auto !important;
  z-index: 99997 !important;
  width: 48px !important;
  height: 48px !important;
  min-width: 48px !important;
  min-height: 48px !important;
  max-width: 48px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  animation: none !important;
  transform: none !important;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}

#brain-float-btn img,
.brain-icon-hit img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 0 10px rgba(61, 255, 232, 0.45));
  pointer-events: none;
}

#brain-float-btn:hover,
#brain-float-btn:active,
.brain-icon-hit:hover,
.brain-icon-hit:active {
  background: transparent !important;
  box-shadow: none !important;
  transform: scale(1.06) !important;
}

/* Alien logout — top-right icon only (never full-width) */
#auth-logout-btn,
#auth-logout-btn.auth-logout-alien {
  position: fixed !important;
  top: calc(0.45rem + env(safe-area-inset-top, 0px)) !important;
  right: 0.45rem !important;
  left: auto !important;
  bottom: auto !important;
  z-index: 100000 !important;
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  min-height: 40px !important;
  max-width: 40px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: none;
  font-size: 0 !important;
  line-height: 0 !important;
  color: transparent !important;
}

#auth-logout-btn img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 0 8px rgba(61, 255, 232, 0.5));
  pointer-events: none;
}

#auth-logout-btn:hover {
  transform: scale(1.08);
  background: transparent !important;
}

/* Markdown brain / trade-plan output */
.ask-summary-detail.md-render,
.ask-response-summary.md-render,
.md-render {
  color: var(--text);
  white-space: normal;
}

.md-render .md-h1 {
  margin: 0.4rem 0 0.65rem;
  font-size: 1.15rem;
  color: var(--cyan);
  letter-spacing: 0.04em;
}

.md-render .md-h2 {
  margin: 0.85rem 0 0.4rem;
  font-size: 0.98rem;
  color: var(--accent, #7dff4d);
}

.md-render .md-h3 {
  margin: 0.7rem 0 0.35rem;
  font-size: 0.9rem;
  color: var(--text);
}

.md-render .md-p {
  margin: 0.35rem 0;
  line-height: 1.55;
  color: var(--text-muted);
}

.md-render .md-list {
  margin: 0.35rem 0 0.65rem 1.1rem;
  padding: 0;
  color: var(--text-muted);
}

.md-render .md-list li {
  margin: 0.25rem 0;
  line-height: 1.45;
}

.md-render strong {
  color: var(--text);
}

@keyframes brainFabPulse {
  0%,
  100% {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45), 0 0 16px rgba(61, 255, 232, 0.2);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 8px 36px rgba(0, 0, 0, 0.5), 0 0 36px rgba(125, 255, 77, 0.45);
    transform: scale(1.03);
  }
}

.ask-fab:active,
.brain-fab:active {
  transform: scale(0.97);
  animation: none;
}

.ask-fab:hover,
.brain-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5), 0 0 28px rgba(61, 255, 232, 0.4);
}

.ask-fab-popup,
.quick-ask-popup,
#quick-ask-popup {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem 1rem 5.5rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.ask-fab-popup.is-open,
.quick-ask-popup.is-open,
#quick-ask-popup.is-open {
  display: flex;
  pointer-events: auto;
  opacity: 1;
}

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

.ask-fab-backdrop,
.quick-ask-overlay {
  position: absolute;
  inset: 0;
  z-index: 99998;
  background: rgba(0, 0, 0, 0.75);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.ask-fab-card,
.quick-ask-card {
  position: relative;
  z-index: 99999;
  width: min(420px, calc(100vw - 2rem));
  padding: 1rem 1.1rem 1.1rem;
  border-radius: var(--radius-lg);
  animation: slideUpFab 0.25s ease;
  touch-action: manipulation;
}

.ask-fab-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  position: relative;
}

.ask-fab-header h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--accent);
  letter-spacing: 0.06em;
  flex: 1;
  min-width: 0;
}

.ask-fab-close {
  position: relative;
  z-index: 3;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  width: 44px;
  height: 44px;
  margin: -0.35rem -0.35rem -0.35rem 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.ask-fab-close:active {
  background: rgba(255, 255, 255, 0.12);
  transform: scale(0.96);
}

.ask-fab-form {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
  align-items: stretch;
}

.ask-fab-form input {
  flex: 1;
  min-height: 48px;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  font-size: 16px;
}

.btn-ask-mini {
  padding: 0.65rem 1rem;
  font-size: 0.8rem;
  min-width: auto;
  min-height: 48px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.brain-suggestions-scroll {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.brain-suggestions-scroll,
.ask-fab-suggestions {
  margin-bottom: 0.5rem;
}

.ask-fab-status {
  font-size: 0.82rem;
  color: var(--text-muted);
  min-height: 1.2rem;
}

.ask-fab-status.loading {
  color: var(--cyan);
}

.ask-fab-status.error {
  color: var(--error);
}

@media (max-width: 768px) {
  .ask-fab-popup {
    align-items: flex-end;
    justify-content: center;
    padding: 0.75rem 0.75rem calc(5rem + env(safe-area-inset-bottom, 0px));
  }

  .ask-fab-card {
    width: 90vw;
    max-width: 90vw;
  }

  .ask-fab,
  .brain-fab,
  #brain-float-btn,
  .brain-icon-hit {
    right: 0.65rem !important;
    bottom: calc(0.65rem + env(safe-area-inset-bottom, 0px)) !important;
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    max-width: 44px !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
  }

  .brain-suggestions-scroll,
  .ask-suggestions,
  .brain-suggestions {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 0.5rem;
    padding-bottom: 0.25rem;
  }

  .brain-suggestions-scroll::-webkit-scrollbar,
  .ask-suggestions::-webkit-scrollbar,
  .brain-suggestions::-webkit-scrollbar {
    display: none;
  }

  .ask-suggestion-chip {
    flex: 0 0 auto;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  button:not(#auth-logout-btn):not(#brain-float-btn):not(.brain-icon-hit),
  .btn-primary,
  .btn-ask,
  .btn-ask-mini,
  .ask-detail-link,
  .feature-section-info-btn,
  .ask-fab-close {
    min-height: 48px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  .ask-fab-close {
    min-width: 44px;
    min-height: 44px;
    width: 44px;
    height: 44px;
  }

  .ask-input-wrap input {
    font-size: 16px;
    min-height: 48px;
  }
}

/* --- Mobile responsive (768px) --- */
@media (max-width: 768px) {
  html,
  body {
    overflow-x: hidden;
    max-width: 100vw;
  }

  .app {
    padding: 1rem;
    max-width: 100%;
  }

  .title,
  h1.title {
    font-size: 1.8rem !important;
  }

  .feature-section-title,
  .ask-section-title,
  h2.feature-section-title {
    font-size: 1.4rem !important;
  }

  .card,
  .glass,
  .portfolio-card,
  .fundamental-card,
  .earnings-card,
  .news-card,
  .scanner-card,
  .ask-card,
  .brain-form {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding: 16px;
  }

  .main {
    gap: 1rem;
  }

  .form-actions,
  .ask-form,
  .brain-form,
  .trade-form,
  .portfolio-add-form,
  .fundamental-analyze-form,
  .earnings-decode-form,
  .ask-fab-form,
  .scanner-cards,
  .portfolio-summary-grid,
  .portfolio-risk-grid,
  .sentinel-grid,
  .fundamental-score-grid,
  .fundamental-predictions-grid,
  .fundamental-panels-grid,
  .fundamental-insights-grid,
  .ask-response-grid,
  .news-input-grid,
  .metric-grid,
  .halal-grid,
  .sr-grid {
    display: flex;
    flex-direction: column;
    grid-template-columns: 1fr !important;
    gap: 0.75rem;
  }

  button:not(#auth-logout-btn):not(#brain-float-btn):not(.brain-icon-hit),
  .btn-primary,
  .btn-ask,
  .btn-auto,
  .btn-scanner,
  .btn-scanner-analyze,
  .btn-ask-mini,
  .ask-detail-link,
  .feature-section-info-btn {
    width: 100%;
    min-height: 48px;
    min-width: 44px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  input[type="text"],
  input[type="number"],
  input[type="date"],
  input[type="search"],
  textarea,
  select,
  .ask-input-wrap input,
  .ask-fab-form input,
  #quick-ask-input {
    width: 100%;
    max-width: 100%;
    font-size: 16px;
    min-height: 48px;
  }

  .ask-form,
  .brain-form {
    flex-direction: column;
  }

  .feature-section-desc-card.is-open {
    width: 100%;
    padding: 16px;
  }

  .scanner-table-wrap,
  .portfolio-table-wrap,
  .news-table-wrap,
  .earnings-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .scanner-table thead {
    display: none;
  }

  .scanner-table tbody tr {
    display: block;
    width: 100%;
    margin-bottom: 12px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.2);
  }

  .scanner-table tbody td {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.35rem 0;
    border: none;
    text-align: right;
  }

  .scanner-table tbody td::before {
    content: attr(data-label);
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-align: left;
    flex-shrink: 0;
  }

  .scanner-table tbody td.scanner-action {
    justify-content: stretch;
  }

  .scanner-table tbody td.scanner-action::before {
    display: none;
  }

  .scanner-table .btn-scanner-analyze {
    width: 100%;
  }

  .brain-suggestions-scroll,
  .ask-suggestions {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .ask-suggestion-chip {
    flex: 0 0 auto;
    min-height: 44px;
  }
}

.auto-analyze-progress-steps {
  list-style: none;
  margin: 0.75rem 0 1rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  text-align: left;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.auto-analyze-progress-steps li {
  padding: 0.25rem 0;
}

.auto-analyze-progress-steps li.active {
  color: var(--cyan);
}

.earnings-trade-plan-row {
  margin: 0 0 1rem;
}

.earnings-trade-plan-row .btn-auto {
  width: 100%;
}

.engine-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 99990;
  padding: 0.65rem 1rem;
  background: rgba(8, 20, 28, 0.96);
  border-bottom: 1px solid rgba(61, 255, 232, 0.35);
  color: #c8ffe8;
  font-size: 0.82rem;
  line-height: 1.45;
  text-align: center;
  backdrop-filter: blur(10px);
}

.engine-banner.hidden {
  display: none !important;
}

.engine-banner code {
  font-family: var(--font-mono, "IBM Plex Mono", monospace);
  color: var(--cyan, #3dffe8);
  font-size: 0.78rem;
}

.engine-banner a {
  color: var(--accent, #7dff4d);
}
