:root {
  --bg: #f4ecde;
  --paper: rgba(255, 250, 242, 0.78);
  --paper-strong: rgba(255, 250, 242, 0.94);
  --ink: #1d1a16;
  --muted: #6f645a;
  --accent: #bb3f1f;
  --accent-deep: #7f2411;
  --gold: #c9952f;
  --line: rgba(53, 34, 22, 0.12);
  --success: #1f7a55;
  --warning: #b26a00;
  --danger: #a02121;
  --shadow: 0 18px 50px rgba(74, 37, 18, 0.12);
  --radius: 26px;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Space Grotesk", "Aptos", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(201, 149, 47, 0.22), transparent 28%),
    radial-gradient(circle at top right, rgba(187, 63, 31, 0.22), transparent 24%),
    linear-gradient(180deg, #fbf5eb 0%, #efe3cf 52%, #ead8c3 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(93, 58, 33, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(93, 58, 33, 0.04) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  opacity: 0.5;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  position: relative;
  max-width: 1480px;
  margin: 0 auto;
  padding: 32px 22px 48px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.7fr);
  gap: 24px;
  align-items: stretch;
  margin-bottom: 24px;
  position: relative;
  z-index: 30;
}

.hero-copy,
.hero-actions,
.panel {
  backdrop-filter: blur(16px);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: 34px;
  position: relative;
  overflow: hidden;
}

.hero-copy::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  right: -50px;
  bottom: -70px;
  background: radial-gradient(circle, rgba(187, 63, 31, 0.18), transparent 68%);
}

.eyebrow,
.panel-kicker,
.status-label {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  color: var(--accent-deep);
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: clamp(2.6rem, 4vw, 4.4rem);
  line-height: 0.95;
  margin-top: 10px;
  max-width: 9ch;
}

.hero-text {
  max-width: 62ch;
  color: var(--muted);
  margin-top: 18px;
  font-size: 1.02rem;
  line-height: 1.65;
}

.hero-actions {
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  position: relative;
  z-index: 31;
  overflow: visible;
}

.primary-button,
.secondary-button {
  border: 0;
  border-radius: 999px;
  color: #fff8f0;
  padding: 14px 20px;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.primary-button {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
  box-shadow: 0 16px 30px rgba(127, 36, 17, 0.22);
}

.secondary-button {
  background: linear-gradient(135deg, #2a2018 0%, #50311b 100%);
  box-shadow: 0 16px 30px rgba(42, 32, 24, 0.2);
}

.logout-form {
  margin: 0;
}

.logout-button {
  width: 100%;
}

.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-1px);
}

.ghost-button {
  background: linear-gradient(135deg, #8b6722 0%, #6c4d15 100%);
}

.toggle-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.inline-toggle {
  margin-top: 8px;
}

.status-block {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.42);
  position: relative;
  z-index: 32;
  overflow: visible;
}

.market-session-strip {
  display: grid;
  gap: 8px;
  margin-top: 2px;
}

.market-session-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.market-session-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.market-session-chip.low {
  background: rgba(31, 122, 85, 0.12);
  color: var(--success);
}

.market-session-chip.medium {
  background: rgba(178, 106, 0, 0.14);
  color: var(--warning);
}

.market-session-chip.high {
  background: rgba(160, 33, 33, 0.12);
  color: var(--danger);
}

.market-session-summary {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.45;
}

.status-tooltip-shell {
  position: relative;
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  z-index: 33;
}

.status-tooltip-trigger {
  cursor: help;
  text-decoration: underline dotted rgba(58, 45, 35, 0.35);
  text-underline-offset: 2px;
}

.status-tooltip-shell.is-pinned .status-tooltip-trigger {
  cursor: pointer;
  color: var(--accent-deep);
}

.status-tooltip {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 80;
  min-width: 320px;
  max-width: min(460px, 80vw);
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(127, 36, 17, 0.12);
  background: rgba(255, 249, 243, 0.96);
  box-shadow: 0 18px 36px rgba(42, 32, 24, 0.16);
  color: #3a2d23;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 140ms ease, transform 140ms ease, visibility 140ms ease;
}

.status-tooltip-shell:hover .status-tooltip:not(.is-hidden),
.status-tooltip-shell:focus-within .status-tooltip:not(.is-hidden),
.status-tooltip-shell.is-pinned .status-tooltip:not(.is-hidden) {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.status-tooltip-section + .status-tooltip-section {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(127, 36, 17, 0.1);
}

.status-tooltip-title {
  font-size: 0.9rem;
  font-weight: 700;
}

.status-tooltip-subtitle {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.status-tooltip-list {
  margin: 6px 0 0;
  padding-left: 18px;
}

.status-tooltip-list li + li {
  margin-top: 4px;
}

.status-tooltip-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed rgba(127, 36, 17, 0.16);
  color: var(--muted);
  font-size: 0.76rem;
}

.status-tooltip-close {
  border: 0;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(127, 36, 17, 0.1);
  color: var(--accent-deep);
  font-size: 0.76rem;
  font-weight: 700;
}

.status-tooltip-close:hover {
  background: rgba(127, 36, 17, 0.16);
}

.is-hidden {
  display: none;
}

#connection-status {
  font-size: 1.1rem;
}

#last-updated,
#refresh-hit-status,
#push-status {
  color: var(--muted);
  font-size: 0.9rem;
}

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

.auth-page-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-shell {
  width: min(100%, 460px);
}

.auth-panel {
  backdrop-filter: blur(16px);
  background: var(--paper-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
}

.auth-panel h1 {
  max-width: none;
  font-size: clamp(2rem, 3vw, 2.8rem);
}

.auth-copy {
  margin-top: 14px;
  color: var(--muted);
  line-height: 1.6;
}

.auth-form {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}

.auth-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 600;
}

.auth-form input {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.8);
  padding: 14px 16px;
  color: var(--ink);
}

.auth-form input:focus {
  outline: 2px solid rgba(187, 63, 31, 0.2);
  border-color: rgba(187, 63, 31, 0.4);
}

.auth-submit {
  margin-top: 6px;
}

.auth-error {
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(160, 33, 33, 0.12);
  color: var(--danger);
  font-weight: 700;
}

.panel {
  padding: 22px;
  min-height: 180px;
}

.span-12 { grid-column: span 12; }
.span-8 { grid-column: span 8; }
.span-7 { grid-column: span 7; }
.span-6 { grid-column: span 6; }
.span-5 { grid-column: span 5; }
.span-4 { grid-column: span 4; }

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

.panel-head h2 {
  margin-top: 6px;
  font-size: 1.55rem;
}

.panel-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.panel-meta-chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(39, 25, 18, 0.06);
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
}

.panel-meta-chip-button {
  border: 0;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.panel-meta-chip-button::after {
  content: '->';
  margin-left: 8px;
  font-size: 0.74rem;
  opacity: 0.72;
}

.panel-meta-chip-button:hover,
.panel-meta-chip-button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(39, 25, 18, 0.1);
  outline: none;
}

.panel-meta-chip.low {
  background: rgba(38, 84, 57, 0.14);
  color: #1f5b39;
}

.panel-meta-chip.medium {
  background: rgba(164, 105, 27, 0.14);
  color: #8a5415;
}

.panel-meta-chip.high {
  background: rgba(148, 35, 35, 0.14);
  color: #8e2424;
}

.warning-console {
  background: linear-gradient(135deg, rgba(126, 41, 21, 0.92), rgba(58, 20, 12, 0.92));
  color: #fff4ea;
}

.warning-console .panel-kicker,
.warning-console h2,
.warning-console .pill {
  color: #fff4ea;
}

.warning-summary {
  line-height: 1.7;
  max-width: 80ch;
}

.warning-list {
  margin: 14px 0 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
  color: rgba(255, 244, 234, 0.84);
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pill.neutral,
.signal-card.neutral {
  background: rgba(63, 48, 35, 0.08);
  color: var(--muted);
}

.pill.low,
.signal-card.low {
  background: rgba(176, 106, 0, 0.12);
  color: var(--warning);
}

.pill.medium,
.signal-card.medium {
  background: rgba(201, 149, 47, 0.18);
  color: #7b5700;
}

.pill.high,
.signal-card.high {
  background: rgba(187, 63, 31, 0.14);
  color: var(--accent-deep);
}

.pill.critical,
.signal-card.critical {
  background: rgba(160, 33, 33, 0.14);
  color: var(--danger);
}

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

.signal-card {
  border-radius: 24px;
  padding: 20px;
  min-height: 168px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.48);
}

.signal-title {
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.signal-value {
  font-size: clamp(1.7rem, 3vw, 2.7rem);
  font-weight: 700;
  line-height: 1;
}

.signal-summary,
.empty-state,
.result-meta,
.news-meta,
.table-shell th,
.table-shell td:last-child {
  color: var(--muted);
}

.judgement-strip {
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(29, 26, 22, 0.96), rgba(89, 43, 24, 0.92));
  color: #fff8f0;
  line-height: 1.7;
  min-height: 130px;
}

.bullet-list {
  margin: 16px 0 0;
  padding-left: 20px;
  display: grid;
  gap: 10px;
}

.battle-map {
  display: grid;
  gap: 14px;
}

.battle-row {
  display: grid;
  grid-template-columns: minmax(90px, 120px) 1fr minmax(120px, 150px);
  gap: 12px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.battle-symbol {
  font-weight: 700;
}

.battle-bar {
  position: relative;
  height: 14px;
  border-radius: 999px;
  background: rgba(39, 25, 18, 0.08);
  overflow: hidden;
}

.battle-bar-fill {
  position: absolute;
  inset: 0 auto 0 50%;
  border-radius: 999px;
  transform-origin: left center;
}

.battle-bar-fill.positive {
  background: linear-gradient(90deg, rgba(31, 122, 85, 0.65), rgba(31, 122, 85, 0.95));
}

.battle-bar-fill.negative {
  background: linear-gradient(90deg, rgba(160, 33, 33, 0.95), rgba(160, 33, 33, 0.55));
  transform-origin: right center;
}

.battle-meta {
  text-align: right;
  font-size: 0.9rem;
  color: var(--muted);
}

.table-shell {
  border-radius: 20px;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: rgba(255, 255, 255, 0.48);
}

.watchlist-groups {
  display: grid;
  gap: 16px;
}

.watchlist-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.watchlist-filter-chip {
  border: 0;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.watchlist-filter-chip:hover,
.watchlist-filter-chip:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(39, 25, 18, 0.1);
  outline: none;
}

.watchlist-filter-chip.is-active {
  box-shadow: inset 0 0 0 2px rgba(127, 36, 17, 0.24), 0 8px 18px rgba(39, 25, 18, 0.08);
  color: var(--accent-deep);
}

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

.research-card {
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 16px;
  display: grid;
  gap: 14px;
}

.research-actions {
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px;
}

.compact-control-form {
  margin-top: 4px;
  padding: 0;
}

.compact-form-grid {
  margin-bottom: 10px;
}

.research-metrics {
  margin-top: 0;
}

.research-findings {
  display: grid;
  gap: 8px;
}

.research-findings .result-quote {
  margin-top: 0;
}

.research-params {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.research-detail-block,
.research-section,
.research-suggestion-list,
.research-case-list {
  display: grid;
  gap: 12px;
}

.research-detail-button {
  padding: 10px 16px;
  font-size: 0.9rem;
}

.research-ledger-head {
  margin-top: 20px;
}

.research-adoption-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.research-adoption-item .result-quote {
  margin-top: 8px;
}

.research-adopt-button {
  padding: 10px 16px;
}

.watchlist-group {
  display: grid;
  gap: 10px;
}

.watchlist-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.watchlist-symbol-cell {
  min-width: 0;
}

.watchlist-symbol-main {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}

.watchlist-company-name {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.watchlist-meta-stack {
  display: grid;
  gap: 6px;
  margin-top: 8px;
  min-width: 0;
}

.watchlist-symbol-cell .result-meta,
.watchlist-symbol-cell .detail-tag {
  max-width: 100%;
}

.watchlist-meta-stack > .result-meta,
.watchlist-meta-stack .inline-signal-list > .result-meta {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.45;
  word-break: break-word;
}

.watchlist-symbol-cell .detail-tag-row {
  overflow: hidden;
}

.watchlist-symbol-cell .watchlist-row-actions .secondary-button {
  max-width: 100%;
}

@media (max-width: 1180px) {
  .watchlist-table-grid th:nth-child(6),
  .watchlist-table-grid td:nth-child(6),
  .watchlist-table-grid th:nth-child(7),
  .watchlist-table-grid td:nth-child(7),
  .watchlist-table-grid th:nth-child(8),
  .watchlist-table-grid td:nth-child(8) {
    display: none;
  }

  .watchlist-col-symbol {
    width: 42%;
  }

  .watchlist-col-research {
    width: 16%;
  }

  .watchlist-col-action {
    width: 16%;
  }
}

@media (max-width: 920px) {
  .watchlist-table-grid th:nth-child(3),
  .watchlist-table-grid td:nth-child(3) {
    display: none;
  }

  .watchlist-col-symbol {
    width: 50%;
  }
}

.watchlist-research-button {
  padding: 8px 14px;
  font-size: 0.82rem;
}

.watchlist-research-button.is-active {
  box-shadow: inset 0 0 0 2px rgba(201, 149, 47, 0.35);
}

.watchlist-replay-button.is-active {
  box-shadow: inset 0 0 0 2px rgba(187, 63, 31, 0.3);
}

.watchlist-detail-block {
  margin-top: 14px;
}

.replay-inline-block {
  margin-top: 12px;
}

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

.watchlist-group-head h3 {
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

.watchlist-table-grid {
  min-width: 1080px;
  table-layout: fixed;
}

.watchlist-col-symbol {
  width: 30%;
}

.watchlist-col-metric {
  width: 8.5%;
}

.watchlist-col-research,
.watchlist-col-capital {
  width: 12%;
}

.watchlist-col-action {
  width: 11%;
}

.watchlist-table-grid th,
.watchlist-table-grid td {
  vertical-align: top;
}

.watchlist-table-grid th {
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(244, 236, 222, 0.96);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.06);
}

.table-shell table {
  width: 100%;
  border-collapse: collapse;
}

.table-shell th,
.table-shell td {
  padding: 13px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.table-shell th {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

@media (max-width: 1180px) {
  .watchlist-table-grid {
    min-width: 920px;
  }

  .watchlist-table-grid th:nth-child(6),
  .watchlist-table-grid td:nth-child(6),
  .watchlist-table-grid th:nth-child(7),
  .watchlist-table-grid td:nth-child(7),
  .watchlist-table-grid th:nth-child(8),
  .watchlist-table-grid td:nth-child(8) {
    display: none;
  }

  .watchlist-col-symbol {
    width: 42%;
  }

  .watchlist-col-research {
    width: 16%;
  }

  .watchlist-col-action {
    width: 16%;
  }
}

@media (max-width: 920px) {
  .watchlist-table-grid {
    min-width: 760px;
  }

  .watchlist-table-grid th:nth-child(3),
  .watchlist-table-grid td:nth-child(3) {
    display: none;
  }

  .watchlist-col-symbol {
    width: 50%;
  }
}

.stack-list,
.news-grid,
.result-shell {
  display: grid;
  gap: 14px;
}

.profile-item,
.news-item,
.result-block {
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 16px;
}

.profile-head,
.news-head,
.result-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.source-note {
  margin-top: 4px;
  color: var(--accent-deep);
  font-size: 0.82rem;
}

.result-notes {
  display: grid;
  gap: 6px;
  margin-top: 14px;
}

.detail-panels {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.detail-panel {
  border-radius: 18px;
  background: rgba(255, 252, 247, 0.88);
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 14px;
}

.detail-panel-head,
.detail-item-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.detail-panel-title,
.seat-column-title {
  font-size: 0.86rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

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

.detail-list,
.seat-column,
.inline-signal-list {
  display: grid;
  gap: 8px;
}

.detail-list,
.seat-grid {
  margin-top: 12px;
}

.detail-item,
.seat-item {
  border-radius: 14px;
  background: rgba(39, 25, 18, 0.04);
  padding: 10px 12px;
}

.detail-item-body {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.84rem;
}

.detail-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.detail-tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(187, 63, 31, 0.1);
  color: var(--accent-deep);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

.detail-tag.low {
  background: rgba(62, 125, 88, 0.12);
  color: #285941;
}

.detail-tag.medium {
  background: rgba(201, 149, 47, 0.14);
  color: #8b5f12;
}

.detail-tag.high,
.detail-tag.critical {
  background: rgba(187, 63, 31, 0.12);
  color: #8f2e16;
}

.detail-tag.neutral {
  background: rgba(39, 25, 18, 0.07);
  color: var(--accent-deep);
}

.inline-signal-list {
  margin-top: 6px;
}

.research-inline-tags {
  margin-top: 6px;
}

.macro-risk-inline-tags {
  margin-top: 6px;
}

.research-result-panel {
  margin-top: 14px;
}

.macro-risk-action-list {
  margin-top: 12px;
}

.macro-risk-action-item .detail-item-body {
  margin-top: 0;
}

.research-match-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.research-match-item {
  background: rgba(39, 25, 18, 0.04);
}

.daily-pick-item {
  border-left: 3px solid rgba(187, 63, 31, 0.28);
}

.daily-picks-history-item {
  background: rgba(255, 252, 247, 0.72);
}

#daily-top-picks-limit {
  width: 88px;
}

#daily-top-picks-history-date,
#daily-top-picks-market-filter,
#daily-top-picks-tier-filter {
  min-width: 150px;
}

.research-prompt-block {
  margin-top: 12px;
  border-radius: 14px;
  background: rgba(39, 25, 18, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.05);
  padding: 10px 12px;
}

.research-prompt-block summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--accent-deep);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
}

.research-prompt-block summary::-webkit-details-marker {
  margin-right: 8px;
}

.prompt-copy-button {
  padding: 8px 14px;
  font-size: 0.8rem;
  line-height: 1;
  flex-shrink: 0;
}

.prompt-copy-button.is-copied {
  background: linear-gradient(135deg, #1f7a55 0%, #165c40 100%);
  box-shadow: 0 14px 24px rgba(31, 122, 85, 0.18);
}

.prompt-copy-button.is-copy-failed {
  background: linear-gradient(135deg, #a02121 0%, #7c1818 100%);
  box-shadow: 0 14px 24px rgba(160, 33, 33, 0.18);
}

.research-prompt-block pre {
  margin-top: 10px;
}

.profile-metrics,
.result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
  margin-top: 14px;
}

.metric {
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(39, 25, 18, 0.05);
}

.metric-label {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.metric-value {
  display: block;
  margin-top: 5px;
  font-weight: 700;
}

.control-form {
  display: grid;
  gap: 14px;
}

.preset-block {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(250, 239, 225, 0.86));
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.preset-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.empty-state-inline {
  min-height: 24px;
  align-items: center;
}

.preset-chip {
  border: 0;
  border-radius: 999px;
  padding: 9px 12px;
  background: rgba(39, 25, 18, 0.07);
  color: var(--ink);
  font-size: 0.84rem;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.preset-chip:hover {
  transform: translateY(-1px);
  background: rgba(187, 63, 31, 0.12);
}

.preset-chip.is-active {
  background: linear-gradient(135deg, rgba(187, 63, 31, 0.16), rgba(201, 149, 47, 0.22));
  box-shadow: inset 0 0 0 1px rgba(127, 36, 17, 0.18);
  color: var(--accent-deep);
}

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

.control-form label {
  display: grid;
  gap: 8px;
}

.control-form label span {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.watchlist-price-alert-form {
  margin-bottom: 14px;
}

.watchlist-price-alert-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.watchlist-price-alert-actions .secondary-button {
  padding-inline: 16px;
}

.watchlist-price-alert-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
}

.watchlist-price-alert-chip.low {
  background: rgba(178, 106, 0, 0.12);
  color: var(--warning);
}

.watchlist-price-alert-chip.high {
  background: rgba(160, 33, 33, 0.12);
  color: var(--danger);
}

.alpha-trainer-form {
  margin-top: 14px;
}

.alpha-trainer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.alpha-trainer-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.alpha-trainer-item {
  border-radius: 14px;
  background: rgba(39, 25, 18, 0.04);
  padding: 10px 12px;
}

.alpha-trainer-item h4 {
  margin: 0;
  font-size: 0.92rem;
}

.alpha-trainer-item .result-meta {
  margin-top: 6px;
}

.alpha-trainer-item-actions {
  margin-top: 8px;
}

.alpha-trainer-compare-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.alpha-trainer-compare-card {
  border: 1px solid rgba(39, 25, 18, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.52);
  padding: 10px;
}

.compare-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-strong);
}

.alpha-trainer-param-change-row {
  display: grid;
  grid-template-columns: 56px 1fr 20px 1fr;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
  font-size: 0.82rem;
}

.compare-arrow {
  color: var(--text-muted);
  text-align: center;
}

.compare-value-strong {
  font-weight: 700;
}

.alpha-trainer-compare-row {
  display: grid;
  grid-template-columns: 72px 1fr 1fr auto;
  gap: 8px;
  align-items: baseline;
  margin-top: 6px;
  font-size: 0.8rem;
}

.compare-label {
  color: var(--text-muted);
}

.compare-value,
.compare-delta {
  color: var(--text-strong);
}

.compare-delta.is-positive {
  color: #16794f;
}

.compare-delta.is-negative {
  color: #b5472f;
}

@media (max-width: 900px) {
  .alpha-trainer-compare-grid {
    grid-template-columns: 1fr;
  }

  .alpha-trainer-compare-row {
    grid-template-columns: 1fr;
  }

  .alpha-trainer-param-change-row {
    grid-template-columns: 1fr;
  }
}

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

.alpha-trainer-summary-grid .metric {
  margin-top: 0;
}

.alpha-trainer-review-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.alpha-trainer-review-card {
  border-radius: 12px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(39, 25, 18, 0.08);
}

.alpha-trainer-review-card.is-complete {
  background: rgba(31, 122, 85, 0.08);
  border-color: rgba(31, 122, 85, 0.18);
}

.alpha-trainer-review-card.is-pending {
  background: rgba(201, 149, 47, 0.08);
  border-color: rgba(201, 149, 47, 0.18);
}

.alpha-trainer-review-card.is-skipped {
  background: rgba(63, 48, 35, 0.05);
}

.alpha-trainer-review-label {
  font-weight: 700;
  color: var(--accent-deep);
}

@media (max-width: 980px) {
  .alpha-trainer-grid {
    grid-template-columns: 1fr;
  }

  .alpha-trainer-review-grid {
    grid-template-columns: 1fr;
  }
}

input,
select,
textarea {
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.75);
  padding: 12px 14px;
  color: var(--ink);
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(187, 63, 31, 0.22);
  border-color: rgba(187, 63, 31, 0.4);
}

.result-shell {
  min-height: 180px;
}

.result-title,
.news-item a {
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}

.news-item a:hover {
  color: var(--accent-deep);
}

.result-quote {
  margin-top: 10px;
  line-height: 1.7;
}

.chart-shell {
  margin-top: 16px;
  padding: 14px;
  border-radius: 20px;
  background: rgba(39, 25, 18, 0.05);
}

.chart-shell svg {
  width: 100%;
  height: 180px;
  display: block;
}

.chart-caption {
  margin-top: 10px;
  font-size: 0.88rem;
  color: var(--muted);
}

pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: "IBM Plex Mono", "Cascadia Code", Consolas, monospace;
  font-size: 0.9rem;
  line-height: 1.7;
}

.emphasis-panel {
  background: linear-gradient(180deg, rgba(255, 244, 228, 0.92), rgba(249, 229, 202, 0.76));
}

.action-panel {
  background: rgba(255, 249, 240, 0.9);
}

@media (max-width: 1100px) {
  .hero,
  .dashboard-grid,
  .signal-grid,
  .form-grid,
  .profile-metrics,
  .result-grid,
  .detail-panel-grid,
  .seat-grid,
  .battle-row {
    grid-template-columns: 1fr;
  }

  .span-12,
  .span-8,
  .span-7,
  .span-6,
  .span-5,
  .span-4 {
    grid-column: span 1;
  }

  .battle-meta {
    text-align: left;
  }
}

@media (max-width: 720px) {
  .app-shell {
    padding: 20px 14px 32px;
  }

  .research-prompt-block summary {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .prompt-copy-button {
    width: 100%;
    justify-content: center;
  }

  .hero-copy,
  .hero-actions,
  .panel {
    padding: 18px;
  }

  h1 {
    max-width: 12ch;
  }
}
