:root {
  --bg: #050303;
  --surface: #100b0b;
  --surface-soft: #1a1110;
  --ink: #fff6dc;
  --muted: #b79d72;
  --line: #3a2419;
  --green: #f0c75e;
  --red: #d9363e;
  --amber: #d9a441;
  --blue: #b21f2d;
  --teal: #d9a441;
  --panel-glow: rgba(217, 164, 65, 0.24);
  --blue-glow: rgba(178, 31, 45, 0.24);
  --shadow: 0 22px 54px rgba(0, 0, 0, 0.5);
  --safe-area-top: env(safe-area-inset-top, 0px);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(rgba(217, 164, 65, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(217, 164, 65, 0.03) 1px, transparent 1px),
    linear-gradient(180deg, rgba(5, 3, 3, 0.98), rgba(13, 7, 7, 0.98)),
    linear-gradient(90deg, rgba(217, 164, 65, 0.09), transparent 30%, rgba(178, 31, 45, 0.12)),
    var(--bg);
  background-size: 32px 32px, 32px 32px, auto, auto, auto;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(120deg, transparent 0 34%, rgba(217, 164, 65, 0.12) 34.2%, transparent 34.8%),
    linear-gradient(240deg, transparent 0 68%, rgba(178, 31, 45, 0.14) 68.2%, transparent 68.8%);
  opacity: 0.9;
}

@keyframes dataSweep {
  from {
    transform: translateX(-120%);
  }
  to {
    transform: translateX(120%);
  }
}

@keyframes pulseGlow {
  0%,
  100% {
    box-shadow: 0 0 18px rgba(217, 164, 65, 0.14);
  }
  50% {
    box-shadow: 0 0 34px rgba(217, 164, 65, 0.3);
  }
}

button,
input {
  font: inherit;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) auto minmax(320px, 1.5fr) auto auto;
  grid-template-areas:
    "brand market search sub lang"
    ". . history . .";
  align-items: center;
  column-gap: 18px;
  row-gap: 9px;
  padding: calc(18px + var(--safe-area-top)) 26px 18px;
  background: rgba(9, 13, 18, 0.9);
  border-bottom: 1px solid rgba(38, 54, 68, 0.86);
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 44px rgba(0, 0, 0, 0.34);
}

.market-switch {
  grid-area: market;
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(54px, 1fr));
  gap: 4px;
  padding: 4px;
  background: rgba(18, 25, 34, 0.92);
  border: 1px solid rgba(38, 54, 68, 0.86);
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px rgba(178, 31, 45, 0.05);
}

.market-switch button {
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.market-switch button.active {
  color: #061018;
  background: var(--teal);
  box-shadow: 0 8px 22px rgba(217, 164, 65, 0.18);
}

.brand {
  grid-area: brand;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.avatar-upload {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid rgba(178, 31, 45, 0.38);
  border-radius: 50%;
  color: #061018;
  background: linear-gradient(135deg, #d9a441, #f3b44e);
  font-weight: 800;
  font-size: 13px;
  box-shadow: 0 0 26px rgba(217, 164, 65, 0.32);
  cursor: pointer;
  overflow: hidden;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.avatar-upload:hover,
.avatar-upload:focus-visible {
  border-color: rgba(217, 164, 65, 0.72);
  box-shadow:
    0 0 0 4px rgba(217, 164, 65, 0.12),
    0 0 28px rgba(217, 164, 65, 0.34);
  transform: translateY(-1px);
}

.avatar-upload img {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-upload.has-image img {
  display: block;
}

.avatar-upload.has-image span {
  display: none;
}

.brand-copy {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}

.brand-title-row {
  display: flex;
  align-items: center;
  gap: 0;
  min-width: 0;
}

.brand h1,
.brand p,
.section-title h2,
.section-title p,
.panel h3,
.panel p,
.hero-panel h2 {
  margin: 0;
}

.brand h1 {
  flex: 0 1 auto;
  min-width: 0;
  font-size: 20px;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 0 18px rgba(178, 31, 45, 0.26);
}

.user-name {
  width: min(150px, 34vw);
  min-width: 82px;
  height: 26px;
  margin-left: 2px;
  padding: 0 0 0 8px;
  border: 0;
  border-bottom: 1px solid rgba(178, 31, 45, 0.52);
  border-radius: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.15;
  text-shadow: 0 0 18px rgba(178, 31, 45, 0.26);
  transition:
    border-color 0.18s ease,
    text-shadow 0.18s ease;
}

.user-name::placeholder {
  color: rgba(143, 160, 173, 0.7);
  font-weight: 700;
}

.user-name:focus {
  border-color: rgba(178, 31, 45, 0.72);
  background: transparent;
  box-shadow: none;
  text-shadow: 0 0 22px rgba(217, 164, 65, 0.28);
}

.user-name[hidden],
.user-name-display[hidden] {
  display: none;
}

.user-name-display {
  max-width: min(210px, 36vw);
  height: auto;
  min-width: 0;
  padding: 0;
  border: 0;
  color: var(--ink);
  background: transparent;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  text-align: left;
  text-shadow: 0 0 18px rgba(178, 31, 45, 0.26);
  box-shadow: none;
}

.user-name-display:hover,
.user-name-display:focus-visible {
  color: #dffcff;
  text-shadow: 0 0 22px rgba(217, 164, 65, 0.34);
}

.crop-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(4, 8, 12, 0.72);
  backdrop-filter: blur(14px);
}

.crop-modal[hidden] {
  display: none;
}

.crop-card {
  width: min(440px, 100%);
  padding: 18px;
  border: 1px solid rgba(178, 31, 45, 0.34);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(18, 25, 34, 0.96), rgba(12, 19, 26, 0.98)),
    var(--surface);
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.52),
    0 0 42px rgba(217, 164, 65, 0.16);
}

.crop-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.crop-head h2,
.crop-head p {
  margin: 0;
}

.crop-head h2 {
  font-size: 18px;
}

.crop-head p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.crop-close {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(178, 31, 45, 0.28);
  border-radius: 7px;
  color: var(--ink);
  background: rgba(18, 25, 34, 0.72);
  cursor: pointer;
}

.crop-stage {
  position: relative;
  width: min(320px, 78vw);
  aspect-ratio: 1;
  margin: 0 auto 16px;
  border: 1px solid rgba(38, 54, 68, 0.9);
  border-radius: 8px;
  background:
    linear-gradient(rgba(178, 31, 45, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(178, 31, 45, 0.08) 1px, transparent 1px),
    rgba(7, 12, 18, 0.86);
  background-size: 24px 24px;
  overflow: hidden;
  touch-action: none;
  cursor: move;
}

.crop-stage canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.crop-frame {
  position: absolute;
  inset: 12%;
  border: 2px solid rgba(217, 164, 65, 0.92);
  border-radius: 50%;
  box-shadow:
    0 0 0 999px rgba(3, 7, 12, 0.42),
    0 0 26px rgba(217, 164, 65, 0.26);
  pointer-events: none;
}

.crop-control {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.crop-control input {
  width: 100%;
  accent-color: var(--teal);
}

.crop-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.crop-actions button {
  height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(178, 31, 45, 0.32);
  border-radius: 7px;
  color: var(--ink);
  background: rgba(18, 25, 34, 0.76);
  cursor: pointer;
}

.crop-actions button:last-child {
  border: 0;
  color: #061018;
  background: linear-gradient(135deg, var(--teal), var(--blue));
  font-weight: 800;
}

.subscription-modal {
  position: fixed;
  inset: 0;
  z-index: 58;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(4, 3, 3, 0.76);
  backdrop-filter: blur(14px);
}

.subscription-modal[hidden] {
  display: none;
}

.subscription-card {
  width: min(760px, 100%);
  max-height: min(86vh, 760px);
  overflow: auto;
  padding: 20px;
  border: 1px solid rgba(217, 164, 65, 0.42);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(178, 31, 45, 0.16), transparent 42%),
    linear-gradient(180deg, rgba(25, 13, 11, 0.98), rgba(8, 5, 5, 0.98)),
    var(--surface);
  box-shadow:
    0 28px 90px rgba(0, 0, 0, 0.62),
    0 0 48px rgba(217, 164, 65, 0.18);
}

.subscription-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.subscription-head h2,
.subscription-head p,
.subscription-note {
  margin: 0;
}

.subscription-head h2 {
  font-size: 22px;
}

.subscription-head p,
.subscription-note {
  color: var(--muted);
  font-size: 13px;
}

.subscription-close {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(217, 164, 65, 0.32);
  border-radius: 7px;
  color: var(--ink);
  background: rgba(18, 9, 8, 0.82);
  cursor: pointer;
}

.subscription-status {
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(217, 164, 65, 0.34);
  border-radius: 7px;
  color: #fffaf0;
  background:
    linear-gradient(90deg, rgba(217, 164, 65, 0.16), rgba(178, 31, 45, 0.1)),
    rgba(14, 8, 8, 0.88);
  font-weight: 800;
}

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

.subscription-plan {
  display: flex;
  flex-direction: column;
  min-height: 230px;
  padding: 16px;
  border: 1px solid rgba(217, 164, 65, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 250, 218, 0.08), transparent 38%),
    rgba(12, 7, 7, 0.9);
  box-shadow:
    inset 0 1px 0 rgba(255, 244, 194, 0.12),
    0 12px 32px rgba(0, 0, 0, 0.28);
}

.subscription-plan.featured {
  border-color: rgba(255, 236, 174, 0.62);
  background:
    linear-gradient(135deg, rgba(217, 164, 65, 0.22), rgba(178, 31, 45, 0.14)),
    rgba(14, 8, 8, 0.92);
}

.subscription-plan > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.subscription-plan strong {
  margin-top: 8px;
  color: #fffaf0;
  font-size: 28px;
  line-height: 1.1;
}

.subscription-plan p {
  flex: 1;
  margin: 12px 0 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.subscription-plan button {
  min-height: 42px;
  border: 1px solid rgba(255, 236, 174, 0.44);
  border-radius: 7px;
  color: #120806;
  background: linear-gradient(180deg, #ffe48f 0%, #d9a441 46%, #a96722 100%);
  font-weight: 900;
  cursor: pointer;
}

.subscription-plan button:disabled {
  color: rgba(255, 250, 240, 0.62);
  border-color: rgba(217, 164, 65, 0.18);
  background: rgba(26, 17, 16, 0.88);
  cursor: not-allowed;
}

.subscription-restore {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(255, 236, 174, 0.24);
  border-radius: 7px;
  color: #fffaf0;
  background: rgba(255, 255, 255, 0.06);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.subscription-restore:hover,
.subscription-restore:focus-visible {
  border-color: rgba(255, 236, 174, 0.44);
  background: rgba(255, 236, 174, 0.12);
}

.subscription-note {
  margin-top: 14px;
}

.subscription-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 10px;
  font-size: 13px;
}

.subscription-legal a {
  color: #ffe3a5;
  text-decoration: none;
}

.subscription-legal a:hover,
.subscription-legal a:focus-visible {
  color: #fff3c7;
  text-decoration: underline;
}

.brand p,
.section-title p,
.panel-head p,
.disclaimer {
  color: var(--muted);
  font-size: 13px;
}

.brand p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search {
  grid-area: search;
  position: relative;
  z-index: 40;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) max-content;
  align-items: center;
  min-width: 0;
  height: 50px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.02),
    0 12px 32px rgba(0, 0, 0, 0.24);
}

.search:focus-within {
  border-color: rgba(178, 31, 45, 0.72);
  box-shadow:
    0 0 0 4px rgba(178, 31, 45, 0.16),
    0 0 34px rgba(217, 164, 65, 0.16);
}

.search-icon {
  width: 15px;
  height: 15px;
  margin-left: 16px;
  border: 2px solid var(--muted);
  border-radius: 50%;
  position: relative;
}

.search-icon::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 2px;
  right: -6px;
  bottom: -3px;
  background: var(--muted);
  transform: rotate(45deg);
  border-radius: 2px;
}

.search input {
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
}

.search button,
.scenario-switch button {
  border: 0;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    background 0.18s ease,
    color 0.18s ease;
}

.search button {
  height: 38px;
  margin-right: 6px;
  min-width: 86px;
  padding: 0 18px;
  border-radius: 7px;
  color: #061018;
  background: linear-gradient(135deg, var(--teal), var(--blue));
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 0 22px rgba(217, 164, 65, 0.22);
}

.search button:hover,
.scenario-switch button:hover {
  transform: translateY(-1px);
}

.lang-toggle {
  grid-area: lang;
  justify-self: end;
  width: 52px;
  height: 42px;
  border: 1px solid rgba(178, 31, 45, 0.45);
  border-radius: 8px;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(178, 31, 45, 0.16), rgba(217, 164, 65, 0.1)),
    rgba(18, 25, 34, 0.92);
  font-weight: 800;
  cursor: pointer;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.025),
    0 0 22px rgba(178, 31, 45, 0.16);
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.subscription-toggle {
  grid-area: sub;
  min-width: 84px;
  height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(217, 164, 65, 0.34);
  border-radius: 7px;
  color: var(--ink);
  background: rgba(18, 25, 34, 0.76);
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.02),
    0 0 18px rgba(217, 164, 65, 0.14);
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.subscription-toggle.active,
.subscription-toggle.trial {
  color: #120806;
  border-color: rgba(255, 236, 174, 0.62);
  font-weight: 500;
}

.subscription-toggle:hover,
.subscription-toggle:focus-visible {
  border-color: rgba(217, 164, 65, 0.72);
  box-shadow: 0 0 28px rgba(217, 164, 65, 0.2);
  transform: translateY(-1px);
}

.lang-toggle:hover {
  transform: translateY(-1px);
  border-color: rgba(217, 164, 65, 0.7);
  box-shadow: 0 0 28px rgba(217, 164, 65, 0.2);
}

.suggestions {
  position: absolute;
  z-index: 50;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  display: none;
  max-height: 320px;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.suggestions.visible {
  display: block;
}

.suggestion {
  display: grid;
  grid-template-columns: 64px minmax(0, 1.2fr) minmax(0, 0.8fr);
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 50px;
  min-width: 0;
  box-sizing: border-box;
  padding: 10px 14px;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.suggestion:hover,
.suggestion.active {
  background: var(--surface-soft);
}

.suggestion strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  line-height: 1.25;
}

.suggestion span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.25;
}

.search-history {
  grid-area: history;
  position: relative;
  min-width: 0;
}

.history-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(38, 54, 68, 0.72);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(18, 25, 34, 0.66);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.02),
    0 10px 24px rgba(0, 0, 0, 0.14);
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.history-toggle:hover,
.history-toggle[aria-expanded="true"] {
  border-color: rgba(217, 164, 65, 0.5);
  background: rgba(24, 35, 48, 0.9);
  box-shadow: 0 0 22px rgba(217, 164, 65, 0.12);
}

.history-chevron {
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--teal);
  border-bottom: 2px solid var(--teal);
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.18s ease;
}

.history-toggle[aria-expanded="true"] .history-chevron {
  transform: translateY(2px) rotate(225deg);
}

.history-panel {
  position: absolute;
  top: calc(100% + 7px);
  left: 0;
  right: 0;
  z-index: 30;
  padding: 10px;
  border: 1px solid rgba(217, 164, 65, 0.34);
  border-radius: 8px;
  background: rgba(12, 19, 26, 0.98);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.history-panel[hidden] {
  display: none;
}

.history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 13px;
}

.history-head span {
  color: var(--ink);
  font-weight: 800;
  letter-spacing: 0;
}

.history-head button {
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  cursor: pointer;
}

.history-head button:hover {
  color: var(--teal);
}

.history-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 34px;
  padding: 8px;
  max-height: 150px;
  overflow: auto;
  border: 1px solid rgba(38, 54, 68, 0.72);
  border-radius: 8px;
  background: rgba(18, 25, 34, 0.46);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.02),
    0 10px 24px rgba(0, 0, 0, 0.14);
}

.history-empty {
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.history-chip {
  flex: 0 1 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  padding: 0 11px;
  border: 1px solid rgba(178, 31, 45, 0.26);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(9, 13, 18, 0.5);
  cursor: pointer;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.history-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(217, 164, 65, 0.54);
  background: rgba(217, 164, 65, 0.1);
  box-shadow: 0 0 20px rgba(217, 164, 65, 0.14);
}

.history-chip strong {
  font-size: 13px;
}

.history-chip span {
  max-width: 150px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.layout {
  display: grid;
  gap: 20px;
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 22px 26px 42px;
}

.watchlist {
  position: relative;
  height: auto;
  overflow: hidden;
  padding: 18px;
  background: rgba(18, 25, 34, 0.78);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

#watchlist {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  margin-bottom: 14px;
}

.section-title h2 {
  font-size: 17px;
}

.stock-row {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  width: 100%;
  margin-bottom: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: inherit;
  background: var(--surface);
  text-align: left;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  transition:
    border-color 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.stock-row::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, var(--teal), var(--blue));
  opacity: 0;
}

.stock-row:hover {
  transform: translateY(-2px);
  border-color: rgba(217, 164, 65, 0.42);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22);
}

.stock-row.active {
  border-color: rgba(178, 31, 45, 0.68);
  box-shadow: 0 0 0 3px rgba(178, 31, 45, 0.14);
}

.stock-row.active::before {
  opacity: 1;
}

.stock-row strong {
  display: block;
  margin-bottom: 2px;
}

.stock-row span,
.mini {
  color: var(--muted);
  font-size: 12px;
}

.positive {
  color: var(--green);
}

.negative {
  color: var(--red);
}

.workspace {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.hero-panel,
.panel {
  position: relative;
  overflow: hidden;
  background: rgba(18, 25, 34, 0.9);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.62s ease,
    transform 0.62s ease,
    border-color 0.62s ease,
    box-shadow 0.62s ease;
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
  border-color: rgba(217, 164, 65, 0.34);
}

.reveal-on-scroll.is-visible::before {
  animation: dataSweep 1.1s ease-out 0.08s both;
}

.hero-panel::before,
.panel::before,
.watchlist::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent, rgba(217, 164, 65, 0.2), transparent) top left / 100% 1px no-repeat,
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 26%);
}

.hero-panel {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 18px;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(217, 164, 65, 0.12), transparent 36%),
    linear-gradient(180deg, rgba(18, 25, 34, 0.96), rgba(12, 18, 25, 0.92));
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-panel h2 {
  font-size: 34px;
  line-height: 1.1;
}

.ticker-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.ticker-line strong {
  padding: 5px 8px;
  color: #061018;
  background: var(--teal);
  border-radius: 6px;
  box-shadow: 0 0 18px rgba(217, 164, 65, 0.28);
}

.ticker-line span {
  font-weight: 700;
}

#changeTag {
  padding: 5px 8px;
  border-radius: 6px;
  background: var(--surface-soft);
}

.verdict {
  display: grid;
  place-items: center;
  align-content: center;
  min-width: 156px;
  padding: 18px;
  border-radius: 8px;
  color: #061018;
  background: linear-gradient(135deg, #f0c75e, #b21f2d);
  box-shadow:
    inset 0 0 24px rgba(255, 255, 255, 0.18),
    0 0 34px rgba(217, 164, 65, 0.18);
}

.verdict.watch {
  background: linear-gradient(135deg, #f3b44e, #b21f2d);
}

.verdict.avoid {
  color: #fff7f3;
  background: linear-gradient(135deg, #d9363e, #8c6cf5);
}

.verdict span {
  font-size: 15px;
  font-weight: 700;
}

.verdict strong {
  font-size: 44px;
  line-height: 1;
}

.panel {
  padding: 20px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}

.panel-head.compact {
  align-items: center;
}

.panel-head h3 {
  font-size: 18px;
  text-shadow: 0 0 18px rgba(178, 31, 45, 0.18);
}

.panel-head span {
  color: var(--muted);
  font-size: 13px;
}

.chart-panel {
  overflow: hidden;
}

.realtime-panel {
  overflow: hidden;
  border-color: rgba(217, 164, 65, 0.32);
}

.realtime-head {
  align-items: stretch;
}

.realtime-head > div:first-child {
  width: 100%;
  text-align: left;
}

.realtime-head h3,
.realtime-head p {
  text-align: left;
}

.realtime-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.kline-switch,
.chart-tools {
  display: inline-grid;
  grid-auto-flow: column;
  gap: 4px;
  padding: 4px;
  background: var(--surface-soft);
  border: 1px solid rgba(38, 54, 68, 0.78);
  border-radius: 8px;
}

.kline-switch button,
.chart-tools button {
  min-width: 46px;
  height: 30px;
  padding: 0 9px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 6px;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  transition:
    color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.kline-switch button:hover,
.chart-tools button:hover,
.kline-switch button.active,
.chart-tools button.active {
  color: #061018;
  background: linear-gradient(135deg, #f0c75e, #d9a441);
  box-shadow: 0 6px 18px rgba(217, 164, 65, 0.18);
}

.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
  color: var(--green);
  background: rgba(217, 164, 65, 0.1);
  border: 1px solid rgba(217, 164, 65, 0.34);
  border-radius: 8px;
  font-size: 13px;
}

.live-indicator span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 14px rgba(240, 199, 94, 0.72);
  animation: livePulse 1.4s ease-in-out infinite;
}

@keyframes livePulse {
  0%,
  100% {
    transform: scale(0.82);
    opacity: 0.66;
  }
  50% {
    transform: scale(1.18);
    opacity: 1;
  }
}

.realtime-chart-wrap {
  position: relative;
  width: 100%;
  height: 238px;
  border: 1px solid rgba(183, 157, 114, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(rgba(183, 157, 114, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(183, 157, 114, 0.028) 1px, transparent 1px),
    linear-gradient(180deg, rgba(10, 12, 15, 0.96), rgba(5, 6, 8, 0.99));
  background-size: 48px 48px, 48px 48px, auto;
  box-shadow:
    inset 0 0 28px rgba(0, 0, 0, 0.22),
    0 0 20px rgba(0, 0, 0, 0.16);
  touch-action: none;
  cursor: grab;
  user-select: none;
}

.realtime-chart-wrap:active {
  cursor: grabbing;
}

.realtime-chart-wrap::after {
  content: none;
}

.realtime-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.realtime-stats div {
  position: relative;
  overflow: hidden;
  padding: 13px 14px;
  background: var(--surface-soft);
  border: 1px solid rgba(38, 54, 68, 0.78);
  border-radius: 8px;
}

.realtime-stats div::after {
  content: "";
  position: absolute;
  inset: auto 10px 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(217, 164, 65, 0.48), transparent);
}

.realtime-stats span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.realtime-stats strong {
  display: block;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.scenario-switch {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: 234px;
  padding: 4px;
  background: var(--surface-soft);
  border-radius: 8px;
  border: 1px solid rgba(38, 54, 68, 0.88);
}

.scenario-switch button {
  height: 32px;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
  font-weight: 700;
}

.scenario-switch button.active {
  color: #061018;
  background: var(--teal);
}

.chart-wrap {
  width: 100%;
  height: 320px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(rgba(217, 164, 65, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(217, 164, 65, 0.045) 1px, transparent 1px),
    linear-gradient(180deg, rgba(24, 35, 48, 0.84), rgba(14, 20, 28, 0.96)),
    repeating-linear-gradient(0deg, transparent, transparent 63px, rgba(143, 160, 173, 0.12) 64px);
  background-size: 24px 24px, 24px 24px, auto, auto;
  box-shadow:
    inset 0 0 44px rgba(0, 0, 0, 0.24),
    0 0 28px rgba(178, 31, 45, 0.08);
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.realtime-chart-wrap canvas {
  touch-action: none;
}

.forecast-stats,
.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.forecast-stats div,
.metric {
  position: relative;
  overflow: hidden;
  padding: 14px;
  background: var(--surface-soft);
  border: 1px solid rgba(38, 54, 68, 0.78);
  border-radius: 8px;
  transition:
    transform 0.24s ease,
    border-color 0.24s ease,
    box-shadow 0.24s ease;
}

.forecast-stats div.is-counting,
.metric.is-counting,
.verdict.is-counting {
  animation: pulseGlow 1.1s ease-in-out;
  border-color: rgba(217, 164, 65, 0.42);
}

.forecast-stats div::after,
.metric::after {
  content: "";
  position: absolute;
  inset: auto 10px 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(217, 164, 65, 0.48), transparent);
}

.forecast-stats div > span,
.metric > span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-break: keep-all;
}

.forecast-stats div > strong,
.metric > strong {
  display: block;
  font-size: 18px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.data-token {
  display: inline-block;
  color: #dffefa;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 12px rgba(217, 164, 65, 0.2);
}

.data-token.is-counting {
  color: var(--teal);
}

.grid.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}

.decision-copy {
  color: #d9e4ea;
  line-height: 1.7;
}

.investment-panel {
  border-color: rgba(178, 31, 45, 0.28);
}

.investment-brief {
  display: grid;
  gap: 12px;
  color: #d9e4ea;
  line-height: 1.8;
}

.investment-brief p {
  margin: 0;
  padding: 14px 16px;
  background: var(--surface-soft);
  border-left: 4px solid rgba(178, 31, 45, 0.78);
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px rgba(178, 31, 45, 0.08);
}

.company-intro-panel {
  border-color: rgba(217, 164, 65, 0.28);
}

.company-intro-body {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr);
  gap: 16px;
  align-items: start;
}

.company-intro-copy {
  display: grid;
  gap: 10px;
  color: #d9e4ea;
  line-height: 1.75;
}

.company-intro-copy p {
  margin: 0;
}

.company-intro-copy strong {
  color: #f4fbff;
}

.company-intro-note {
  color: var(--muted);
  font-size: 13px;
}

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

.company-finance-item {
  min-width: 0;
  padding: 12px;
  background: var(--surface-soft);
  border: 1px solid rgba(38, 54, 68, 0.78);
  border-radius: 8px;
}

.company-finance-item span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.company-finance-item strong {
  display: block;
  color: #f4fbff;
  font-size: 16px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.score-bars {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.bar-row {
  display: grid;
  grid-template-columns: 88px 1fr 42px;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.bar-track {
  height: 9px;
  overflow: hidden;
  background: #243240;
  border-radius: 999px;
}

.bar-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--green));
  box-shadow: 0 0 14px rgba(240, 199, 94, 0.32);
  transition: width 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.evidence-list {
  display: grid;
  gap: 10px;
}

.evidence {
  display: grid;
  grid-template-columns: 10px 1fr;
  gap: 10px;
  align-items: start;
  line-height: 1.55;
}

.evidence i {
  width: 10px;
  height: 10px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px currentColor;
}

.evidence.risk i {
  background: var(--red);
}

.evidence.neutral i {
  background: var(--amber);
}

.evidence strong {
  display: block;
  margin-bottom: 2px;
}

.evidence span {
  color: var(--muted);
  font-size: 13px;
}

.metric-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  margin-top: 0;
}

.peer-table {
  display: grid;
  gap: 8px;
}

.peer-row {
  display: grid;
  grid-template-columns: 86px 1fr 82px 82px;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.peer-row:last-child {
  border-bottom: 0;
}

.peer-bar {
  height: 9px;
  background: #243240;
  border-radius: 999px;
  overflow: hidden;
}

.peer-bar span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--blue), var(--teal));
  box-shadow: 0 0 14px rgba(178, 31, 45, 0.3);
  transition: width 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.disclaimer {
  margin: 0;
  padding: 0 4px;
  line-height: 1.7;
}

.legal-links {
  display: flex;
  gap: 18px;
  padding: 0 4px 8px;
  font-size: 13px;
}

.legal-links a {
  color: var(--blue);
  text-decoration: none;
}

.legal-links a:hover {
  color: var(--teal);
  text-decoration: underline;
}

/* Black, red, and gold theme */
.topbar,
.search input,
.history-panel,
.suggestions,
.panel,
.watchlist,
.hero-panel,
.company-finance-item,
.forecast-stats div,
.metric,
.stock-row,
.crop-card {
  background-color: rgba(16, 11, 11, 0.94);
  border-color: rgba(217, 164, 65, 0.28);
}

.topbar {
  background: rgba(5, 3, 3, 0.93);
  box-shadow: 0 12px 44px rgba(0, 0, 0, 0.58);
}

.avatar-upload,
.market-switch button.active,
.search button,
.scenario-switch button.active {
  color: #120806;
  background: linear-gradient(135deg, #f5d77a, #c88a2c);
  box-shadow: 0 10px 28px rgba(217, 164, 65, 0.24);
}

.market-switch,
.scenario-switch,
.history-toggle,
.search {
  background: rgba(16, 11, 11, 0.92);
  border-color: rgba(217, 164, 65, 0.3);
}

.hero-panel {
  background:
    linear-gradient(90deg, transparent, rgba(217, 164, 65, 0.22), transparent) top left / 100% 1px no-repeat,
    linear-gradient(135deg, rgba(178, 31, 45, 0.15), transparent 42%),
    linear-gradient(180deg, rgba(16, 11, 11, 0.96), rgba(9, 5, 5, 0.94));
}

.verdict {
  background: linear-gradient(135deg, #d9363e, #d9a441);
  color: #fff8e6;
}

.verdict.watch {
  background: linear-gradient(135deg, #d9a441, #8f2b21);
}

.verdict.avoid {
  background: linear-gradient(135deg, #b21f2d, #d9a441);
}

.ticker-line strong,
.suggestion strong,
.stock-row strong,
.brand h1,
.panel h3,
.company-finance-item strong {
  color: #fff1bf;
}

.ticker-line span,
.data-token,
.legal-links a,
.section-title h2 {
  color: #f0c75e;
}

.positive {
  color: #f0c75e;
}

.negative,
.evidence.risk i {
  color: #ff5a61;
}

.bar-fill,
.peer-bar span {
  background: linear-gradient(90deg, #d9363e, #d9a441);
  box-shadow: 0 0 14px rgba(217, 164, 65, 0.28);
}

.chart-wrap {
  border-color: rgba(217, 164, 65, 0.3);
  background:
    linear-gradient(rgba(217, 164, 65, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(217, 164, 65, 0.045) 1px, transparent 1px),
    linear-gradient(180deg, rgba(20, 12, 10, 0.88), rgba(8, 5, 5, 0.96)),
    repeating-linear-gradient(0deg, transparent, transparent 63px, rgba(183, 157, 114, 0.13) 64px);
}

.data-token,
.data-token.is-counting,
[data-count],
#ticker,
#price,
#changeTag,
#changeTag [data-count],
.ticker-line strong,
.ticker-line span,
.forecast-stats div > strong,
.metric > strong,
.company-finance-item strong,
.peer-row .mini,
.stock-row strong {
  color: #fffaf0 !important;
}

button,
.stock-row,
.suggestion,
.history-toggle {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.market-switch,
.search,
.history-toggle,
.scenario-switch,
.lang-toggle,
.subscription-toggle,
.stock-row,
.suggestion,
.crop-actions button {
  box-shadow:
    inset 0 1px 0 rgba(255, 244, 194, 0.18),
    inset 0 -1px 0 rgba(65, 17, 16, 0.72),
    0 10px 24px rgba(0, 0, 0, 0.34);
}

.market-switch button,
.search button,
.scenario-switch button,
.lang-toggle,
.subscription-toggle,
.history-toggle,
.suggestion,
.stock-row,
.crop-actions button {
  border-color: rgba(217, 164, 65, 0.38);
  background:
    linear-gradient(180deg, rgba(255, 250, 218, 0.16) 0%, rgba(255, 250, 218, 0.05) 18%, transparent 42%),
    linear-gradient(90deg, rgba(255, 236, 173, 0.1), transparent 36%, rgba(178, 31, 45, 0.12) 74%, rgba(255, 236, 173, 0.08)),
    linear-gradient(180deg, rgba(46, 31, 20, 0.96), rgba(13, 7, 7, 0.96));
  background-clip: padding-box;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.65);
}

.market-switch button.active,
.scenario-switch button.active {
  background:
    linear-gradient(180deg, rgba(255, 255, 230, 0.58) 0%, rgba(255, 236, 174, 0.16) 20%, transparent 38%),
    linear-gradient(90deg, rgba(255, 250, 203, 0.2), transparent 42%, rgba(108, 37, 16, 0.14) 76%, rgba(255, 250, 203, 0.12)),
    linear-gradient(180deg, #ffe48f 0%, #d9a441 42%, #a96722 100%);
  border: 1px solid rgba(255, 236, 174, 0.62);
  color: #120806;
  text-shadow: 0 1px 0 rgba(255, 244, 194, 0.35);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 230, 0.56),
    inset 0 -2px 0 rgba(86, 32, 12, 0.42),
    0 0 0 1px rgba(92, 28, 20, 0.28);
}

.subscription-toggle.active,
.subscription-toggle.trial {
  background:
    linear-gradient(180deg, rgba(255, 255, 230, 0.58) 0%, rgba(255, 236, 174, 0.16) 20%, transparent 38%),
    linear-gradient(90deg, rgba(255, 250, 203, 0.2), transparent 42%, rgba(108, 37, 16, 0.14) 76%, rgba(255, 250, 203, 0.12)),
    linear-gradient(180deg, #ffe48f 0%, #d9a441 42%, #a96722 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 230, 0.56),
    inset 0 -2px 0 rgba(86, 32, 12, 0.42),
    0 0 0 1px rgba(92, 28, 20, 0.28);
}

.search button {
  background:
    linear-gradient(180deg, rgba(255, 255, 230, 0.58) 0%, rgba(255, 236, 174, 0.16) 20%, transparent 38%),
    linear-gradient(90deg, rgba(255, 250, 203, 0.2), transparent 42%, rgba(108, 37, 16, 0.14) 76%, rgba(255, 250, 203, 0.12)),
    linear-gradient(180deg, #ffe48f 0%, #d9a441 42%, #a96722 100%);
  border: 1px solid rgba(255, 236, 174, 0.62);
  color: #120806;
  text-shadow: 0 1px 0 rgba(255, 244, 194, 0.35);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 230, 0.56),
    inset 0 -2px 0 rgba(86, 32, 12, 0.42),
    0 6px 14px rgba(217, 164, 65, 0.18),
    0 0 0 1px rgba(92, 28, 20, 0.28);
}

.suggestions {
  background:
    linear-gradient(180deg, rgba(255, 236, 174, 0.035), transparent 34%),
    linear-gradient(180deg, rgba(18, 9, 9, 0.98), rgba(7, 4, 4, 0.98));
  border-color: rgba(217, 164, 65, 0.24);
}

.suggestions .suggestion {
  background:
    linear-gradient(90deg, rgba(178, 31, 45, 0.1), transparent 46%),
    rgba(11, 7, 7, 0.94);
  color: #fff8e6;
  text-shadow: none;
}

.suggestions .suggestion + .suggestion {
  border-top: 1px solid rgba(217, 164, 65, 0.12);
}

.suggestions .suggestion:hover,
.suggestions .suggestion.active {
  background:
    linear-gradient(90deg, rgba(178, 31, 45, 0.22), rgba(217, 164, 65, 0.08)),
    rgba(22, 10, 10, 0.98);
  filter: none;
}

.suggestions .suggestion strong {
  color: #fff8e6;
}

.suggestions .suggestion span {
  color: #d9c08a;
}

.suggestions .suggestion span:last-child {
  color: #a98d68;
}

.search button:hover,
.market-switch button.active:hover,
.scenario-switch button.active:hover,
.lang-toggle:hover,
.subscription-toggle:hover,
.history-toggle:hover,
.suggestion:hover,
.stock-row:hover {
  filter: brightness(1.08) saturate(1.05);
}

button:active,
.stock-row:active,
.suggestion:active,
.history-toggle:active {
  transform: translateY(1px);
  box-shadow:
    inset 0 2px 5px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 244, 194, 0.12);
}

@media (max-width: 980px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas:
      "brand sub lang"
      "market market market"
      "search search search"
      "history history history";
  }

  .market-switch {
    width: 100%;
  }

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

  .grid.two-col {
    grid-template-columns: 1fr;
  }

  .company-intro-body {
    grid-template-columns: 1fr;
  }

  .subscription-plans {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .topbar,
  .layout {
    padding-left: 14px;
    padding-right: 14px;
  }

  .topbar {
    column-gap: 10px;
  }

  .history-chip span {
    max-width: 112px;
  }

  .company-finance-grid {
    grid-template-columns: 1fr;
  }

  .brand {
    gap: 10px;
  }

  .brand h1 {
    font-size: 18px;
  }

  .user-name {
    width: min(118px, 32vw);
    padding-left: 6px;
    font-size: 18px;
  }

  .user-name-display {
    max-width: min(118px, 32vw);
    font-size: 18px;
  }

  .search {
    grid-template-columns: 34px minmax(0, 1fr) max-content;
  }

  .search button {
    min-width: 84px;
    padding: 0 14px;
  }

  .hero-panel,
  .panel-head {
    flex-direction: column;
  }

  .realtime-actions {
    justify-content: stretch;
    width: 100%;
  }

  .kline-switch {
    grid-auto-flow: initial;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    width: 100%;
  }

  .chart-tools {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: calc(100% - 88px);
  }

  .kline-switch button,
  .chart-tools button {
    min-width: 0;
    padding: 0 6px;
  }

  .hero-panel h2 {
    font-size: 26px;
  }

  .verdict {
    width: 100%;
  }

#watchlist,
  .forecast-stats,
  .metric-grid,
  .realtime-stats {
    grid-template-columns: 1fr;
  }

  .scenario-switch {
    width: 100%;
  }

  .chart-wrap {
    height: 260px;
  }

  .realtime-chart-wrap {
    height: 220px;
  }

  .peer-row {
    grid-template-columns: 72px 1fr 64px;
  }

  .peer-row .mini:last-child {
    display: none;
  }
}

@media (max-width: 380px) {
  .topbar {
    column-gap: 8px;
  }

  .brand {
    gap: 8px;
  }

  .avatar-upload {
    width: 38px;
    height: 38px;
  }

  .subscription-toggle {
    min-width: 76px;
    padding: 0 10px;
  }

  .lang-toggle {
    width: 46px;
  }

  .user-name {
    width: min(86px, 26vw);
    min-width: 62px;
  }

  .user-name-display {
    max-width: min(86px, 26vw);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .reveal-on-scroll {
    opacity: 1;
    transform: none;
  }
}
