:root {
  --bg: #0f1010;
  --panel: #18191a;
  --panel-2: #202225;
  --line: #33383d;
  --text: #edf4fb;
  --muted: #91a2b6;
  --gold: #f0b90b;
  --hay: #d99b1d;
  --green: #16c784;
  --red: #ea3943;
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: linear-gradient(180deg, #171817 0, var(--bg) 360px);
  color: var(--text);
}

body.modal-open,
body.ai-open,
body.detail-open {
  overflow: hidden;
}

.app-shell {
  width: min(1460px, calc(100% - 40px));
  margin: 0 auto;
  padding: 24px 0 42px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-ai-button {
  width: max-content;
  min-height: 34px;
  border-radius: 999px;
  padding: 0 14px;
  border-color: rgba(240,185,11,.32);
  background: rgba(240,185,11,.08);
  color: #ffdc82;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

.top-ai-button:hover,
.top-ai-button.active {
  background: rgba(240,185,11,.18);
  border-color: rgba(240,185,11,.5);
}

.language-toggle {
  display: inline-flex;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(24, 25, 26, .78);
}

.language-button {
  min-height: 32px;
  width: auto;
  border: 0;
  border-radius: 0;
  padding: 0 11px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.language-button.active {
  background: rgba(240,185,11,.18);
  color: #ffdc82;
}

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

.brand-name {
  font-size: 22px;
  font-weight: 900;
}

.brand-subtitle {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.haymark {
  width: 48px;
  height: 48px;
  border-radius: 7px;
  border: 1px solid rgba(240, 185, 11, .35);
  position: relative;
  overflow: hidden;
  background: #f0b90b;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.16), 0 8px 22px rgba(0,0,0,.22);
}

.haymark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 56%;
  filter: saturate(1.12) contrast(1.04);
}

.status-pill {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 12px;
  color: var(--muted);
  background: rgba(24, 25, 26, .78);
  font-size: 12px;
}

.hero {
  max-width: 920px;
  margin: 20px 0 16px;
}

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

h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.02;
  letter-spacing: 0;
}

.hero-copy {
  color: var(--muted);
  max-width: 760px;
  line-height: 1.7;
  margin: 16px 0 0;
}

.asset-tabs {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(18, 25, 35, .86);
  padding: 8px;
  margin-bottom: 14px;
}

.asset-tabs span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  margin: 0 4px;
}

.asset-tab {
  min-height: 32px;
  width: auto;
  border-radius: 7px;
  padding: 0 12px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 900;
}

.asset-tab:hover {
  background: rgba(255,255,255,.045);
  color: #d4e0ed;
}

.asset-tab.active {
  border-color: rgba(240,185,11,.42);
  background: rgba(240,185,11,.15);
  color: #ffdc82;
}

.panel {
  border: 1px solid var(--line);
  background: rgba(18, 25, 35, .86);
  border-radius: 8px;
}

.boards {
  margin-bottom: 14px;
}

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

.section-heading span {
  display: block;
  color: var(--gold);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.section-heading h2 {
  margin: 2px 0 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: 0;
}

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

.board-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(18, 25, 35, .86);
  overflow: hidden;
}

.board-card header {
  min-height: 94px;
  display: flex;
  align-items: flex-start;
  padding: 11px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}

.board-card h3 {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.25;
  letter-spacing: 0;
}

.board-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.board-list {
  display: grid;
}

.board-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border-bottom: 1px solid rgba(255,255,255,.055);
  cursor: pointer;
}

.board-row:hover {
  background: rgba(255,255,255,.035);
}

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

.board-row-main,
.board-row-metric {
  min-width: 0;
}

.board-row-main strong,
.board-row-main span,
.board-row-metric strong,
.board-row-metric span {
  display: block;
}

.board-row-main strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.board-row-main span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.board-row-metric {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.board-row-metric strong {
  color: var(--text);
  font-size: 13px;
}

.board-row-metric span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}

.board-loading,
.board-empty {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(18, 25, 35, .86);
  padding: 18px 12px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.filters {
  display: grid;
  grid-template-columns: minmax(220px, 1.3fr) repeat(3, minmax(140px, 1fr));
  gap: 10px;
  padding: 12px;
  margin-bottom: 14px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

input,
select,
button {
  min-height: 38px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111314;
  color: var(--text);
  padding: 0 10px;
  font: inherit;
}

button {
  cursor: pointer;
}

.ghost-button {
  align-self: end;
  background: rgba(240,185,11,.12);
  border-color: rgba(240,185,11,.32);
  color: #ffdc82;
  font-weight: 800;
}

.ghost-button:hover {
  background: rgba(240,185,11,.18);
}

.ai-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr);
  gap: 12px;
  padding: 12px;
  margin-bottom: 14px;
}

.ai-config {
  display: grid;
  gap: 8px;
}

.ai-primary {
  display: grid;
  grid-template-columns: minmax(130px, .8fr) minmax(240px, 1.4fr) minmax(80px, .35fr);
  gap: 10px;
  align-items: end;
}

.key-field {
  min-width: 0;
}

.ai-advanced {
  color: var(--muted);
  font-size: 12px;
}

.ai-advanced summary {
  width: max-content;
  cursor: pointer;
  color: #ffdc82;
  font-weight: 800;
  list-style-position: inside;
}

.ai-advanced-grid {
  display: grid;
  grid-template-columns: minmax(160px, .7fr) minmax(220px, 1fr);
  gap: 10px;
  margin-top: 10px;
}

.ai-output {
  min-height: 90px;
  border-left: 1px solid rgba(255,255,255,.08);
  padding-left: 12px;
  color: var(--muted);
  line-height: 1.55;
  font-size: 13px;
}

.ai-output strong {
  display: block;
  color: var(--text);
  margin-bottom: 5px;
}

.ai-quota-line {
  margin-bottom: 8px;
  color: #ffdc82;
  font-size: 12px;
  line-height: 1.5;
}

.ai-output p {
  margin: 0;
}

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

.ai-output li + li {
  margin-top: 5px;
}

.ai-drawer-shell[hidden] {
  display: none;
}

.ai-drawer-shell {
  position: fixed;
  inset: 0;
  z-index: 45;
}

.ai-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.58);
}

.ai-drawer {
  position: absolute;
  top: 0;
  right: 0;
  width: min(480px, calc(100% - 20px));
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border-left: 1px solid var(--line);
  background: #101214;
  box-shadow: -24px 0 80px rgba(0,0,0,.45);
}

.ai-drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.ai-drawer-header strong,
.ai-drawer-header span {
  display: block;
}

.ai-drawer-header strong {
  font-size: 16px;
}

.ai-drawer-header span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.ai-panel.ai-drawer-content {
  grid-template-columns: 1fr;
  gap: 14px;
  overflow: auto;
  margin: 0;
  padding: 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.ai-panel.ai-drawer-content .ai-primary,
.ai-panel.ai-drawer-content .ai-advanced-grid {
  grid-template-columns: 1fr;
}

.ai-panel.ai-drawer-content .ghost-button {
  width: 100%;
}

.ai-panel.ai-drawer-content .ai-output {
  min-height: 120px;
  border-left: 0;
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 14px 0 0;
}

.table-panel {
  overflow: hidden;
}

.table-scroll {
  overflow: auto;
  max-height: calc(100vh - 440px);
  min-height: 420px;
}

.mobile-list {
  display: none;
}

table {
  width: 100%;
  min-width: 1420px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 13px;
}

th,
td {
  border-bottom: 1px solid rgba(255,255,255,.06);
  padding: 11px 10px;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}

th {
  color: var(--muted);
  background: #18191a;
  font-size: 12px;
  position: sticky;
  top: 0;
}

th.sortable {
  padding: 6px 8px;
}

.sort-button {
  min-height: 30px;
  width: 100%;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.sort-button:hover {
  background: rgba(255,255,255,.045);
  color: #d4e0ed;
}

.sort-button.active {
  background: rgba(240,185,11,.12);
  color: #ffdc82;
}

.sort-indicator {
  width: 12px;
  flex: 0 0 12px;
  color: currentColor;
  opacity: .8;
  text-align: center;
}

th:first-child,
th:nth-child(2),
th:nth-child(3),
th:nth-child(4),
td:first-child,
td:nth-child(2),
td:nth-child(3),
td:nth-child(4) {
  text-align: left;
}

tbody tr:hover {
  background: rgba(255,255,255,.035);
}

.stock-row,
.mobile-card {
  cursor: pointer;
}

.symbol {
  font-weight: 900;
}

.pos { color: var(--green); }
.neg { color: var(--red); }
.muted { color: var(--muted); }

.type-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 999px;
  padding: 0 8px;
  color: #c8d4e1;
  background: rgba(145,162,182,.16);
  font-size: 12px;
  font-weight: 900;
}

.type-pill.stock {
  color: #d7ecff;
  background: rgba(66,153,225,.16);
}

.type-pill.etf {
  color: #ffdc82;
  background: rgba(240,185,11,.14);
}

.tags {
  display: flex;
  gap: 5px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 999px;
  padding: 0 8px;
  background: rgba(240,185,11,.14);
  color: #ffda78;
  font-size: 12px;
}

.tag.warn {
  background: rgba(234,57,67,.13);
  color: #ff9299;
}

.tag.danger {
  background: rgba(234,57,67,.22);
  color: #ffbbc0;
}

.chart-button,
.analyze-button {
  min-height: 30px;
  width: auto;
  padding: 0 10px;
  border-color: rgba(240,185,11,.32);
  background: rgba(240,185,11,.1);
  color: #ffda78;
  font-size: 12px;
  font-weight: 800;
}

.analyze-button:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.mobile-card,
.mobile-empty {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(18, 25, 35, .9);
}

.mobile-card {
  display: grid;
  gap: 9px;
  padding: 10px;
}

.mobile-card-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: start;
  gap: 8px;
}

.mobile-title {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.mobile-name {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.mobile-stat {
  min-width: 0;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 7px;
  background: rgba(255,255,255,.025);
  padding: 6px;
}

.mobile-stat small,
.mobile-stat strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-stat small {
  color: var(--muted);
  font-size: 10px;
  margin-bottom: 3px;
}

.mobile-stat strong {
  color: var(--text);
  font-size: 12px;
}

.mobile-risk {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.mobile-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mobile-actions .chart-button,
.mobile-actions .analyze-button {
  width: 100%;
}

.mobile-empty {
  padding: 24px 12px;
  color: var(--muted);
  text-align: center;
}

.load-more-wrap {
  display: flex;
  justify-content: center;
  padding: 12px;
}

.load-more-button {
  width: min(360px, 100%);
  min-height: 38px;
  border-color: rgba(240,185,11,.28);
  background: rgba(240,185,11,.08);
  color: #ffdc82;
  font-size: 12px;
  font-weight: 900;
}

.load-more-button:disabled {
  cursor: default;
  opacity: .68;
}

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

.chart-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
}

.chart-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.72);
}

.chart-dialog {
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
  height: min(720px, calc(100vh - 48px));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101214;
  box-shadow: 0 24px 90px rgba(0,0,0,.52);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.chart-header strong {
  display: block;
  font-size: 16px;
}

.chart-header span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

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

.chart-actions a {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(240,185,11,.32);
  border-radius: 8px;
  padding: 0 10px;
  color: #ffda78;
  text-decoration: none;
  font-size: 12px;
  font-weight: 800;
}

.icon-button {
  min-height: 32px;
  width: 32px;
  border-radius: 8px;
  padding: 0;
  font-size: 22px;
  line-height: 1;
}

.chart-dialog iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #101214;
}

.detail-drawer-shell[hidden] {
  display: none;
}

.detail-drawer-shell {
  position: fixed;
  inset: 0;
  z-index: 38;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.55);
}

.detail-drawer {
  position: absolute;
  top: 0;
  right: 0;
  width: min(640px, calc(100% - 28px));
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border-left: 1px solid var(--line);
  background: #101214;
  box-shadow: -24px 0 80px rgba(0,0,0,.46);
}

.detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.detail-header strong,
.detail-header span {
  display: block;
}

.detail-header strong {
  font-size: 17px;
}

.detail-header span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.detail-body {
  overflow: auto;
  padding: 14px;
}

.detail-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.detail-symbol-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.detail-summary h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: 0;
}

.detail-summary p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.detail-price-block {
  display: grid;
  justify-items: end;
  gap: 4px;
  font-variant-numeric: tabular-nums;
}

.detail-price-block strong {
  font-size: 24px;
}

.detail-actions {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
  margin: 14px 0;
}

.detail-actions .chart-button,
.detail-actions .analyze-button {
  width: 100%;
}

.detail-actions a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(240,185,11,.32);
  border-radius: 8px;
  padding: 0 11px;
  color: #ffda78;
  text-decoration: none;
  font-size: 12px;
  font-weight: 900;
}

.detail-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 0 0 10px;
  margin: 0 0 4px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.detail-tab {
  flex: 0 0 auto;
  width: auto;
  min-height: 32px;
  border-radius: 999px;
  padding: 0 11px;
  color: var(--muted);
  background: rgba(255,255,255,.025);
  font-size: 12px;
  font-weight: 900;
}

.detail-tab:hover {
  color: #d4e0ed;
  background: rgba(255,255,255,.05);
}

.detail-tab.active {
  border-color: rgba(240,185,11,.42);
  background: rgba(240,185,11,.15);
  color: #ffdc82;
}

.detail-tab-panel {
  min-height: 280px;
}

.detail-section {
  padding: 14px 0;
  border-top: 1px solid rgba(255,255,255,.08);
}

.detail-section:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.detail-tab-panel .detail-section:first-child {
  border-top: 0;
  padding-top: 14px;
}

.detail-section h3 {
  margin: 0 0 10px;
  color: #dce7f3;
  font-size: 13px;
  letter-spacing: 0;
}

.detail-signal-grid,
.detail-metric-grid,
.detail-extra-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.detail-signal,
.detail-metric {
  min-width: 0;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 8px;
  background: rgba(255,255,255,.025);
  padding: 10px;
}

.detail-signal span,
.detail-signal strong,
.detail-signal small,
.detail-metric span,
.detail-metric strong {
  display: block;
}

.detail-signal span,
.detail-metric span {
  color: var(--muted);
  font-size: 11px;
}

.detail-signal strong,
.detail-metric strong {
  margin-top: 5px;
  color: var(--text);
  font-size: 16px;
  overflow-wrap: anywhere;
}

.detail-signal small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.detail-signal.hot {
  border-color: rgba(240,185,11,.34);
  background: rgba(240,185,11,.08);
}

.detail-signal.warn {
  border-color: rgba(240,185,11,.28);
}

.detail-signal.danger {
  border-color: rgba(234,57,67,.34);
  background: rgba(234,57,67,.08);
}

.detail-extra-block + .detail-extra-block {
  margin-top: 16px;
}

.detail-extra-loading,
.detail-extra-empty {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.detail-description {
  margin: 10px 0 0;
  color: #aab7c8;
  font-size: 12px;
  line-height: 1.65;
}

.detail-website-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  margin-top: 8px;
  border: 1px solid rgba(240,185,11,.28);
  border-radius: 8px;
  padding: 0 11px;
  color: #ffda78;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.detail-news-list,
.detail-earnings-list {
  display: grid;
  gap: 8px;
}

.detail-news-item,
.detail-earnings-item {
  display: block;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 8px;
  background: rgba(255,255,255,.025);
  padding: 10px;
  text-decoration: none;
}

.detail-news-item:hover {
  border-color: rgba(240,185,11,.24);
  background: rgba(240,185,11,.06);
}

.detail-news-item strong,
.detail-news-item span,
.detail-earnings-item strong,
.detail-earnings-item span {
  display: block;
}

.detail-news-item strong,
.detail-earnings-item strong {
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
}

.detail-news-item span,
.detail-earnings-item span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.detail-risk-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

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

.detail-risk-list li {
  border-left: 3px solid rgba(145,162,182,.45);
  border-radius: 7px;
  background: rgba(255,255,255,.025);
  padding: 9px 10px;
}

.detail-risk-list li.warn {
  border-left-color: rgba(240,185,11,.7);
}

.detail-risk-list li.danger {
  border-left-color: rgba(234,57,67,.8);
}

.detail-risk-list strong,
.detail-risk-list span {
  display: block;
}

.detail-risk-list strong {
  color: var(--text);
  font-size: 13px;
}

.detail-risk-list span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.detail-chart-frame {
  height: 320px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
  background: #101214;
}

.detail-chart-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #101214;
}

.detail-ai-main {
  width: 100%;
  margin-top: 12px;
}

.empty {
  padding: 34px 12px;
  text-align: center;
  color: var(--muted);
}

.disclaimer {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  margin-top: 12px;
}

@media (max-width: 980px) {
  .hero,
  .filters,
  .ai-panel,
  .ai-primary,
  .ai-advanced-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .ai-output {
    border-left: 0;
    padding-left: 0;
  }
}

@media (max-width: 680px) {
  body { background: var(--bg); }
  .app-shell {
    width: min(100% - 20px, 1460px);
    padding: 10px 0 28px;
    display: flex;
    flex-direction: column;
  }
  .topbar {
    order: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(150px, 180px);
    align-items: start;
    gap: 8px;
    margin-bottom: 8px;
  }
  .brand { gap: 8px; }
  .haymark { width: 36px; height: 36px; }
  .brand-name { font-size: 20px; }
  .brand-subtitle { display: none; }
  .top-actions {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: end;
    align-items: center;
    margin-left: 0;
    gap: 6px;
  }
  .language-toggle {
    flex: 0 0 auto;
    min-height: 30px;
  }
  .language-button {
    min-height: 28px;
    padding: 0 9px;
    font-size: 11px;
  }
  .status-pill {
    flex: 0 0 100%;
    width: 100%;
    min-height: 28px;
    padding: 5px 9px;
    border-radius: 7px;
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .top-ai-button {
    flex: 0 0 auto;
    min-height: 30px;
    padding: 0 10px;
    font-size: 11px;
  }
  .hero {
    order: 2;
    display: none;
  }
  .asset-tabs {
    order: 3;
    align-items: center;
    gap: 6px;
    min-height: 38px;
    padding: 6px;
    margin-bottom: 8px;
  }
  .asset-tabs span {
    width: auto;
    margin-right: 0;
  }
  .asset-tab {
    flex: 1;
    min-height: 30px;
    padding: 0 6px;
  }
  .filters {
    order: 4;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 8px;
    margin-bottom: 8px;
  }
  .boards {
    order: 5;
    margin-bottom: 8px;
  }
  .section-heading {
    margin-bottom: 7px;
  }
  .section-heading h2 {
    font-size: 15px;
  }
  .board-grid {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
    scroll-snap-type: x proximity;
  }
  .board-card {
    flex: 0 0 min(86vw, 340px);
    scroll-snap-align: start;
  }
  .board-card header {
    min-height: 82px;
    padding: 10px;
  }
  .board-card p {
    font-size: 10px;
  }
  .board-row {
    padding: 8px 9px;
  }
  .filters label:first-child {
    grid-column: 1 / -1;
  }
  label { gap: 4px; font-size: 11px; }
  input,
  select,
  button {
    min-height: 34px;
    border-radius: 7px;
    padding: 0 8px;
  }
  .table-panel {
    order: 6;
    border: 0;
    background: transparent;
    overflow: visible;
  }
  .table-scroll {
    display: none;
  }
  .mobile-list {
    display: grid;
    gap: 8px;
  }
  .load-more-wrap {
    padding: 10px 0 2px;
  }
  .load-more-button {
    width: 100%;
  }
  .ai-panel {
    order: 8;
    margin-top: 6px;
  }
  .ai-panel.ai-drawer-content {
    order: auto;
    margin-top: 0;
  }
  .ai-drawer {
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: min(78vh, 660px);
    border-left: 0;
    border-top: 1px solid var(--line);
    border-radius: 12px 12px 0 0;
  }
  .ai-drawer-header {
    padding: 12px;
  }
  .ai-drawer-header strong {
    font-size: 15px;
  }
  .ai-drawer-header span {
    font-size: 11px;
  }
  .chart-modal { padding: 10px; }
  .chart-dialog { height: calc(100vh - 20px); }
  .chart-header { align-items: flex-start; flex-direction: column; }
  .chart-actions { width: 100%; justify-content: space-between; }
  .detail-drawer {
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: min(88vh, 760px);
    border-left: 0;
    border-top: 1px solid var(--line);
    border-radius: 12px 12px 0 0;
  }
  .detail-header {
    padding: 12px;
  }
  .detail-header strong {
    font-size: 15px;
  }
  .detail-header span {
    font-size: 11px;
  }
  .detail-body {
    padding: 12px;
  }
  .detail-summary {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .detail-summary h2 {
    font-size: 18px;
  }
  .detail-price-block {
    justify-items: start;
  }
  .detail-actions {
    grid-template-columns: 1fr 1fr;
  }
  .detail-actions a {
    grid-column: 1 / -1;
  }
  .detail-signal-grid,
  .detail-metric-grid,
  .detail-extra-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }
  .detail-tabs {
    gap: 5px;
  }
  .detail-tab {
    min-height: 30px;
    padding: 0 10px;
    font-size: 11px;
  }
  .detail-signal,
  .detail-metric {
    padding: 8px;
  }
  .detail-signal strong,
  .detail-metric strong {
    font-size: 14px;
  }
  .detail-chart-frame {
    height: 260px;
  }
  .ai-panel,
  .ai-primary,
  .ai-advanced-grid {
    grid-template-columns: 1fr;
  }
  .disclaimer {
    order: 9;
  }
}
