:root {
  --bg: #0f1115;
  --panel: #171a21;
  --panel-2: #1f2430;
  --border: #2b3240;
  --text: #e8edf5;
  --muted: #a8b2c5;
  --accent: #d9dde7;
  --good: #1f8f4e;
  --bad: #b44141;
  --neutral: #6f7b8f;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: linear-gradient(180deg, #0c0f14 0%, #111520 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.page-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 20px 48px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.brand-wrap {
  min-width: 0;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0;
}

.brand-logo {
  height: 84px;
  width: auto;
  display: block;
  border: none;
  background: transparent;
  padding: 0;
  border-radius: 0;
}

.brand-text h1 {
  margin: 0;
  font-size: 1.9rem;
  line-height: 1.1;
}

.brand-text p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.top-nav {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.top-nav a {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

.top-nav a:hover {
  background: rgba(255, 255, 255, 0.07);
}

.main-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr;
  gap: 20px;
}

.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}

.hero-card {
  min-height: 320px;
}

.tools-card {
  grid-column: 1 / -1;
}

.card-header h2 {
  margin: 0 0 6px;
  font-size: 1.25rem;
}

.card-header p {
  margin: 0 0 18px;
  color: var(--muted);
}

.quote-form-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.quote-form-row input {
  flex: 1 1 280px;
  min-width: 0;
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 12px;
  padding: 14px 14px;
}

.quote-form-row button,
.secondary-btn,
.primary-link-btn {
  border: 0;
  border-radius: 12px;
  padding: 14px 16px;
  cursor: pointer;
}

.quote-form-row button,
.primary-link-btn {
  background: var(--accent);
  color: #111;
  font-weight: 600;
}

.secondary-btn {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.secondary-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.quote-meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.muted-text {
  color: var(--muted);
  font-size: 0.95rem;
}

.quote-result {
  min-height: 150px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
}

.empty-state {
  color: var(--muted);
  display: flex;
  align-items: center;
}

.quote-symbol {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.quote-price {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.quote-change {
  font-size: 1rem;
  margin-bottom: 10px;
}

.quote-change.positive {
  color: #7be0a3;
}

.quote-change.negative {
  color: #ff8d8d;
}

.quote-change.flat {
  color: var(--muted);
}

.quote-source {
  color: var(--muted);
  font-size: 0.94rem;
}

.signal-header p {
  display: none;
}

.signal-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 320px;
}

.signal-badge-large {
  min-width: 220px;
  padding: 22px 30px;
  font-size: 1.9rem;
  font-weight: 800;
  margin-top: 8px;
  margin-bottom: 18px;
}

.signal-actions {
  margin-top: auto;
}

.signal-detail-btn {
  padding: 10px 16px;
  font-size: 0.95rem;
  font-weight: 600;
  width: fit-content;
}

.signal-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-width: 140px;
  padding: 16px 22px;
  border-radius: 999px;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 18px;
  border: 1px solid transparent;
  transition: all 0.25s ease;
}

.signal-summary {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.15;
  color: var(--text);
  margin: 6px 0 24px;
}

.signal-badge.long {
  background: rgba(31, 143, 78, 0.18);
  color: #7be0a3;
  border-color: rgba(31, 143, 78, 0.45);
}

.signal-badge.short {
  background: rgba(180, 65, 65, 0.18);
  color: #ff8d8d;
  border-color: rgba(180, 65, 65, 0.45);
}

.signal-badge.neutral {
  background: rgba(111, 123, 143, 0.18);
  color: #cbd4e4;
  border-color: rgba(111, 123, 143, 0.35);
}

.signal-summary {
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 20px;
  white-space: normal;
}

.signal-actions {
  margin-top: auto;
}

.primary-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.tool-tile {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
}

.tool-tile h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.tool-tile p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.5;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

@media (max-width: 900px) {
  .main-grid {
    grid-template-columns: 1fr;
  }

  .tools-card {
    grid-column: auto;
  }

  .tool-grid {
    grid-template-columns: 1fr;
  }
}