:root {
  color-scheme: light;
  font-family: Arial, sans-serif;
  color: #342f3a;
  background: #f7f3ee;
}

* { box-sizing: border-box; }

body {
  min-height: 100vh;
  margin: 0;
  padding: 52px 24px;
  background: #f7f3ee;
}

.page-header, main, footer {
  width: min(100%, 760px);
  margin-inline: auto;
}

.page-header { margin-bottom: 28px; }
.eyebrow { margin: 0 0 8px; color: #8b789f; font-size: 11px; font-weight: 700; letter-spacing: 1.4px; }
h1, h2 { margin: 0; }
h1 { font-family: Georgia, serif; font-size: clamp(30px, 7vw, 42px); font-weight: 500; }
.page-header > p:last-child { margin: 10px 0 0; color: #827b82; font-size: 14px; }

.index-card {
  padding: 24px;
  border: 1px solid #ebe5e0;
  border-radius: 18px;
  background: #fffdfa;
  box-shadow: 0 12px 40px #4b3c3810;
}

.card-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
h2 { font-family: Georgia, serif; font-size: 23px; font-weight: 500; }
.status { padding: 7px 10px; border-radius: 99px; background: #f1ecf3; color: #756581; font-size: 11px; }
.placeholder { margin: 24px 0; color: #817982; font-size: 14px; line-height: 1.6; }
.quote-value { margin: 24px 0; color: #342f3a; font-family: Georgia, serif; font-size: 30px; }
.card-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; border-top: 1px solid #f0ebe6; padding-top: 14px; color: #928a91; font-size: 11px; }
.data-note { margin: 14px 0 0; color: #928a91; font-size: 11px; }
.refresh-button { margin-top: 14px; padding: 9px 12px; border: 1px solid #e3dce3; border-radius: 8px; background: #fff; color: #756581; font: inherit; font-size: 11px; font-weight: 700; cursor: pointer; }
.refresh-button:disabled { opacity: .6; cursor: wait; }
footer { margin-top: 20px; color: #9a9297; font-size: 11px; }

.watchlist-section { margin-top: 30px; }
.section-heading { margin-bottom: 14px; }
.ticker-form { padding: 20px; border: 1px solid #ebe5e0; border-radius: 16px; background: #fffdfa; }
.ticker-form label { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 700; }
.ticker-controls { display: flex; gap: 9px; }
.ticker-controls input { flex: 1; min-width: 0; padding: 11px 12px; border: 1px solid #e3dce3; border-radius: 9px; background: #fff; color: #342f3a; font: inherit; }
.ticker-controls input:focus { outline: 2px solid #b9a9c4; outline-offset: 1px; }
.ticker-controls button { padding: 0 17px; border: 0; border-radius: 9px; background: #847293; color: white; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.ticker-controls button:hover { background: #716080; }
.form-help, .form-message { margin: 8px 0 0; color: #918991; font-size: 11px; }
.form-message { min-height: 16px; color: #756581; }
.watchlist { display: grid; gap: 9px; margin: 12px 0 0; padding: 0; list-style: none; }
.empty-row, .ticker-row { border: 1px solid #ebe5e0; border-radius: 12px; background: #fffdfa; }
.empty-row { padding: 18px; color: #918991; font-size: 12px; }
.ticker-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 15px 17px; }
.ticker-row strong, .ticker-row span { display: block; }
.ticker-row strong { font-family: Georgia, serif; font-size: 17px; }
.ticker-row span { margin-top: 3px; color: #918991; font-size: 11px; }
.ticker-info { flex: 1; min-width: 0; }
.history-chart { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.history-chart svg { width: min(100%, 210px); height: 42px; overflow: visible; }
.history-chart path.trend-up { stroke: #678c74; }
.history-chart path.trend-down { stroke: #bd6b68; }
.history-chart .trend-up, .history-chart .trend-down { font-weight: 700; }
.history-chart span { margin: 0; white-space: nowrap; }
.history-chart .trend-up { color: #678c74; }
.history-chart .trend-down { color: #bd6b68; }
.history-empty { color: #918991; font-size: 10px; }
.remove-button { border: 0; background: transparent; color: #847293; font: inherit; font-size: 11px; cursor: pointer; }

@media (max-width: 520px) {
  body { padding: 32px 17px; }
  .index-card { padding: 20px 17px; }
  .ticker-form { padding: 17px; }
}
