:root {
  --ink: #182018;
  --muted: #687068;
  --paper: #f4f1e8;
  --card: #fbfaf5;
  --line: #d8d6cc;
  --acid: #d9ff43;
  --green: #127a4c;
  --red: #bd3b32;
  --shadow: 0 30px 70px rgba(31, 38, 27, 0.12);
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--paper); }

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 80% 3%, rgba(217, 255, 67, 0.35), transparent 24rem),
    linear-gradient(rgba(24, 32, 24, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(24, 32, 24, 0.035) 1px, transparent 1px),
    var(--paper);
  background-size: auto, 40px 40px, 40px 40px, auto;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, input { font: inherit; }
button { cursor: pointer; }

.shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 56px 0 30px; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  gap: 80px;
  align-items: end;
  padding: 24px 0 52px;
}

.eyebrow {
  display: inline-flex;
  margin: 0 0 20px;
  padding: 7px 10px;
  border: 1px solid var(--ink);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

h1 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(52px, 7vw, 88px); font-weight: 400; line-height: 0.9; letter-spacing: -0.055em; }
h1 span { color: var(--green); font-style: italic; }
.lede { max-width: 520px; margin: 24px 0 0; color: var(--muted); font-size: 17px; line-height: 1.6; }

.search { padding-bottom: 6px; }
.search label { display: block; margin-bottom: 10px; font-size: 12px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.search-row { display: flex; gap: 10px; }
.input-wrap { flex: 1; display: flex; align-items: center; min-width: 0; border: 1.5px solid var(--ink); background: var(--card); box-shadow: 5px 5px 0 var(--ink); }
.input-wrap:focus-within { outline: 3px solid rgba(18, 122, 76, 0.25); }
.input-wrap span { padding-left: 17px; color: var(--green); font-weight: 900; }
.input-wrap input { width: 100%; min-width: 0; padding: 17px 14px 17px 5px; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 19px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; }
.search button { padding: 0 21px; border: 1.5px solid var(--ink); color: var(--ink); background: var(--acid); font-weight: 850; box-shadow: 5px 5px 0 var(--ink); transition: transform 120ms, box-shadow 120ms; }
.search button:hover { transform: translate(2px, 2px); box-shadow: 3px 3px 0 var(--ink); }
.search button:disabled { cursor: wait; opacity: 0.65; }
.message { min-height: 22px; margin: 15px 0 0; color: var(--muted); font-size: 13px; }
.message.error { color: var(--red); font-weight: 700; }


.watchlist { margin-bottom: 42px; padding: 30px 34px; border: 1.5px solid var(--ink); background: rgba(251, 250, 245, 0.96); box-shadow: 8px 8px 0 var(--ink); }
.watchlist-heading { display: flex; justify-content: space-between; gap: 24px; align-items: start; }
.watchlist-heading .eyebrow { margin-bottom: 12px; }
.watchlist-heading h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 34px; font-weight: 400; letter-spacing: -0.03em; }
.watchlist-heading p { margin: 8px 0 0; color: var(--muted); }
.outline-button { padding: 11px 15px; border: 1px solid var(--ink); background: transparent; font-size: 12px; font-weight: 800; }
.outline-button:hover { background: var(--acid); }
.watchlist-form { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 10px; align-items: end; margin-top: 26px; }
.watchlist-form label { position: relative; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.watchlist-form input { width: 100%; margin-top: 7px; padding: 12px 32px 12px 12px; border: 1px solid var(--line); color: var(--ink); background: white; font-weight: 750; text-transform: uppercase; }
.watchlist-form label span { position: absolute; right: 12px; bottom: 13px; color: var(--muted); }
.watchlist-form button { min-height: 43px; padding: 0 18px; border: 1px solid var(--ink); background: var(--acid); font-weight: 850; }
.watchlist-items { display: grid; gap: 8px; margin-top: 18px; }
.watch-item { display: grid; grid-template-columns: minmax(80px, .7fr) repeat(3, 1fr) auto; gap: 12px; align-items: center; padding: 13px 15px; border: 1px solid var(--line); background: white; }
.watch-symbol { font-weight: 900; letter-spacing: .05em; }
.watch-metric span { display: block; margin-bottom: 3px; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.watch-metric strong { font-size: 13px; }
.watch-status { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 11px; }
.watch-status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #aaa; }
.watch-status.live::before { background: var(--green); }
.watch-actions { display: flex; gap: 6px; }
.watch-actions button, .alert-feed-heading button { padding: 7px 9px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 10px; font-weight: 800; }
.watch-actions button:hover, .alert-feed-heading button:hover { color: var(--ink); border-color: var(--ink); }
.alert-feed-heading { display: flex; justify-content: space-between; align-items: center; margin-top: 25px; padding-top: 20px; border-top: 1px solid var(--line); }
.alert-feed-heading h3 { margin: 0; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.alert-feed { display: grid; gap: 7px; margin-top: 12px; }
.alert-row { display: flex; justify-content: space-between; gap: 16px; padding: 10px 12px; border-left: 4px solid var(--green); background: var(--paper); font-size: 12px; }
.alert-row.fall { border-left-color: var(--red); }
.alert-row time, .empty-feed { color: var(--muted); }

.dashboard { overflow: hidden; border: 1.5px solid var(--ink); background: rgba(251, 250, 245, 0.96); box-shadow: var(--shadow), 8px 8px 0 var(--ink); }
.is-hidden { display: none !important; }
.dashboard-header { display: flex; justify-content: space-between; gap: 20px; padding: 30px 34px 22px; }
.symbol-line { display: flex; align-items: center; gap: 10px; }
.symbol-line h2 { margin: 0; font-size: 17px; letter-spacing: 0.06em; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px rgba(18, 122, 76, 0.12); }
.session-chip { padding: 4px 7px; color: var(--muted); border: 1px solid var(--line); font-size: 9px; font-weight: 800; letter-spacing: 0.1em; }
.quote-line { display: flex; align-items: baseline; gap: 14px; margin-top: 10px; }
.quote-line strong { font-family: Georgia, "Times New Roman", serif; font-size: clamp(39px, 5vw, 62px); font-weight: 400; letter-spacing: -0.04em; }
.quote-line span { font-size: 15px; font-weight: 800; }
.positive { color: var(--green); }
.negative { color: var(--red); }
.last-updated { margin: 5px 0 0; color: var(--muted); font-size: 12px; }

.chart-controls { display: flex; align-self: flex-start; border: 1px solid var(--line); }
.chart-controls button { min-width: 42px; height: 38px; padding: 0 12px; border: 0; border-right: 1px solid var(--line); background: transparent; color: var(--ink); font-weight: 750; }
.chart-controls button:last-child { border-right: 0; }
.chart-controls button:hover { background: var(--acid); }

.range-picker { display: flex; gap: 6px; padding: 0 34px 22px; overflow-x: auto; }
.range-picker button { min-width: 48px; padding: 8px 12px; border: 1px solid var(--line); color: var(--muted); background: transparent; font-size: 11px; font-weight: 850; letter-spacing: 0.05em; }
.range-picker button:hover { border-color: var(--ink); color: var(--ink); }
.range-picker button.active { border-color: var(--ink); color: var(--ink); background: var(--acid); box-shadow: 2px 2px 0 var(--ink); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats div { display: flex; justify-content: space-between; gap: 12px; padding: 14px 22px; border-right: 1px solid var(--line); }
.stats div:last-child { border-right: 0; }
.stats span { color: var(--muted); font-size: 12px; }
.stats strong { font-size: 13px; }

.chart-wrap { position: relative; min-height: 480px; padding: 18px 16px 0; }
#chart { width: 100%; height: 460px; }
.chart-label { position: absolute; z-index: 2; left: 26px; color: var(--muted); font-size: 9px; font-weight: 900; letter-spacing: 0.16em; pointer-events: none; }
.price-label { top: 27px; }
.volume-label { bottom: 76px; }
.chart-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-family: Georgia, "Times New Roman", serif; font-size: 22px; }
.chart-footer { display: flex; justify-content: space-between; padding: 10px 24px 15px; color: var(--muted); border-top: 1px solid var(--line); font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }

footer { display: flex; justify-content: space-between; gap: 20px; padding: 25px 3px; color: var(--muted); font-size: 11px; }

@media (max-width: 800px) {
  .shell { width: min(100% - 24px, 680px); padding-top: 28px; }
  .hero { grid-template-columns: 1fr; gap: 38px; padding-bottom: 38px; }
  .search-row { flex-direction: column; }
  .search button { min-height: 55px; }
  .dashboard-header { padding: 24px 18px 18px; }
  .watchlist { padding: 24px 18px; }
  .watchlist-heading { flex-direction: column; }
  .watchlist-form { grid-template-columns: 1fr 1fr; }
  .watch-item { grid-template-columns: 1fr 1fr; }
  .watch-actions { justify-content: flex-end; }
  .range-picker { padding: 0 18px 18px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats div:nth-child(2) { border-right: 0; }
  .stats div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .chart-wrap { min-height: 390px; padding-inline: 5px; }
  #chart { height: 380px; }
  .chart-label { left: 15px; }
  footer { flex-direction: column; }
}

@media (max-width: 480px) {
  h1 { font-size: 49px; }
  .dashboard-header { flex-direction: column; }
  .chart-controls { align-self: stretch; }
  .chart-controls button { flex: 1; }
  .session-chip { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}

