@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@500;600;700;800&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

/* Stocks HQ Live — bright, light market theme (Rumel, Nov 16: lighter/brighter than the original dark navy).
   Layout: Google-Finance style three columns under the header —
   left market summary, center chart/news, right watchlist —
   with the movers boards full-width below.
   The logo animation (draw / pop / heartbeat) is the final "Pulse"
   spec: white line + arrowhead in a circle on dark navy. */

:root {
  color-scheme: light;
  --bg: #f7f9fc;
  --bg-2: #eef2f7;
  --surface: #ffffff;
  --surface-alt: #eef2f7;
  --text: #14213a;
  --dim: #5b6b84;
  --border: #d9e1ec;
  --up: #1d9e5f;
  --down: #d93a2e;
  --amber: #b97a1c;
  --logo-disc: #1d9e5f;
  --logo-fg: #ffffff;
  --radius: 10px;
  --radius-lg: 14px;
  --font-display: "Archivo", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, monospace;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--text); }

.wrap {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 16px;
}

.mono { font-family: var(--font-mono); }
.up { color: var(--up); }
.down { color: var(--down); }
.dim { color: var(--dim); }

/* ------------------------------------------------------------------ */
/* Header                                                              */
/* ------------------------------------------------------------------ */

.site-header {
  background: linear-gradient(180deg, var(--bg-2), var(--bg));
  border-bottom: 1px solid var(--border);
}

.header-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 14px 0 12px;
}

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

.brand-name {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.2px;
  line-height: 1.1;
}

.brand-name .live { color: var(--up); }

.brand-tag {
  font-size: 12px;
  color: var(--dim);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.header-search {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
}

.header-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.header-status {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--dim);
  flex: none;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 999px;
  padding: 4px 11px;
  font-weight: 600;
  color: var(--text);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--dim);
}

.status-dot.open { background: var(--up); }

/* ------------------------------------------------------------------ */
/* Logo: the pulse line draws itself, the arrowhead pops in, then the  */
/* whole mark beats twice — one 3.6s loop.                             */
/* ------------------------------------------------------------------ */

@keyframes logo-draw-line {
  0% { stroke-dashoffset: 100; opacity: 1; }
  45%, 88% { stroke-dashoffset: 0; opacity: 1; }
  97% { stroke-dashoffset: 0; opacity: 0; }
  100% { stroke-dashoffset: 100; opacity: 0; }
}

@keyframes logo-pop-arrow {
  0%, 43% { opacity: 0; transform: scale(0.3); }
  53% { opacity: 1; transform: scale(1.25); }
  62%, 88% { opacity: 1; transform: scale(1); }
  97%, 100% { opacity: 0; transform: scale(1); }
}

@keyframes logo-beat {
  0%, 62% { transform: scale(1); }
  68% { transform: scale(1.14); }
  74% { transform: scale(1); }
  79% { transform: scale(1.08); }
  85%, 100% { transform: scale(1); }
}

.logo-draw-line {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: logo-draw-line 3.6s ease-in-out infinite;
}

.logo-pop-arrow {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: logo-pop-arrow 3.6s ease-in-out infinite;
}

.logo-beat {
  transform-origin: center;
  animation: logo-beat 3.6s ease-in-out infinite;
}

.logo-mark { width: 55px; height: 55px; flex: none; }
.logo-mark-lg { width: 84px; height: 84px; }

/* Blinking live dot */
@keyframes blink-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.15; }
}

.blink-dot { animation: blink-dot 1.6s ease-in-out infinite; }

/* ------------------------------------------------------------------ */
/* Ticker tape                                                         */
/* ------------------------------------------------------------------ */

@keyframes tape-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.tape {
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.tape-track {
  display: flex;
  width: max-content;
  align-items: center;
  gap: 34px;
  padding: 8px 16px;
  animation: tape-scroll 60s linear infinite;
}

.tape-item {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 13px;
}

.tape-item .sym { font-weight: 600; }

/* ------------------------------------------------------------------ */
/* Search (in the header, Google-Finance style)                        */
/* ------------------------------------------------------------------ */

.search-box { position: relative; }

.search-row { display: flex; gap: 10px; }

.search-input {
  flex: 1;
  min-width: 0;
  min-height: 46px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 16px;
  padding: 0 18px;
  text-transform: uppercase;
}

.search-input::placeholder { color: var(--dim); text-transform: none; font-family: var(--font-display); font-size: 15px; }
.search-input:focus { outline: 2px solid var(--up); outline-offset: 1px; }

.btn {
  min-height: 46px;
  border: none;
  border-radius: 999px;
  background: var(--up);
  color: #06130b;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  padding: 0 20px;
  cursor: pointer;
}

.btn:hover { filter: brightness(1.08); }

.suggest {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  z-index: 30;
  box-shadow: 0 14px 34px rgba(16, 42, 80, 0.18);
}

.suggest button {
  display: flex;
  width: 100%;
  align-items: baseline;
  gap: 10px;
  background: none;
  border: none;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  padding: 11px 14px;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-display);
  font-size: 15px;
}

.suggest button:last-child { border-bottom: none; }
.suggest button:hover, .suggest button.active { background: var(--surface); }
.suggest .sym { font-family: var(--font-mono); font-weight: 600; min-width: 74px; }
.suggest .nm { color: var(--text); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest .ex { color: var(--dim); font-size: 12px; }

.quick-chips { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 14px; }
.chips-label { grid-column: 1 / -1; color: var(--dim); font-size: 13px; font-weight: 600; }

.chip {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  padding: 6px 2px;
  width: 100%;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  min-height: 32px;
}

.chip:hover { border-color: var(--up); }

/* ------------------------------------------------------------------ */
/* Three-column layout                                                 */
/* ------------------------------------------------------------------ */

.layout {
  display: grid;
  grid-template-columns: 288px minmax(0, 1fr) 332px;
  grid-template-areas: "left center right";
  gap: 18px;
  align-items: start;
  padding-top: 18px;
}

.col-left { grid-area: left; }
.col-center { grid-area: center; min-width: 0; }
.col-right { grid-area: right; }

@media (min-width: 1101px) {
  .col-left, .col-right { position: sticky; top: 14px; }
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 16px 10px;
  margin-bottom: 18px;
  box-shadow: 0 1px 3px rgba(16, 42, 80, 0.06);
}

/* Quick-nav shortcut buttons (top of the left column) */
.quick-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

.quick-nav button {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 3px rgba(16, 42, 80, 0.06);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  padding: 11px 14px;
  cursor: pointer;
  text-align: left;
}

.quick-nav button:hover { border-color: var(--up); }
.quick-nav .qn-arrow-up { color: var(--up); }
.quick-nav .qn-arrow-down { color: var(--down); }

@keyframes board-flash {
  0%, 60% { box-shadow: 0 0 0 3px var(--amber); }
  100% { box-shadow: 0 1px 3px rgba(16, 42, 80, 0.06); }
}

.board.flash { animation: board-flash 1.6s ease; }

.panel-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
}

.panel-head h3 { margin: 0; font-size: 16px; font-weight: 700; }
.panel-head .asof { color: var(--dim); font-size: 12px; margin-left: auto; }

/* Compact quote rows (summary + watchlist) */
.sum-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  background: none;
  border: none;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-display);
  padding: 9px 4px;
  cursor: pointer;
  text-align: left;
}

.sum-row:last-child { border-bottom: none; }
.sum-row:hover { background: var(--bg-2); }

.sum-name { font-weight: 600; font-size: 14.5px; }

.sum-id { display: flex; flex-direction: column; min-width: 0; }
.sum-id .sym { font-family: var(--font-mono); font-weight: 600; font-size: 14.5px; }
.sum-id .nm { color: var(--dim); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px; }

.sum-vals { display: flex; align-items: center; gap: 9px; flex: none; }
.sum-vals .px { font-family: var(--font-mono); font-size: 14.5px; font-weight: 500; }

.pct-pill {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  padding: 2.5px 8px;
  border-radius: 999px;
  min-width: 68px;
  text-align: center;
}

.pct-pill.up { color: var(--up); background: rgba(47, 191, 113, 0.13); }
.pct-pill.down { color: var(--down); background: rgba(240, 86, 74, 0.13); }
.pct-pill.dim { color: var(--dim); background: rgba(143, 163, 192, 0.13); }

/* ------------------------------------------------------------------ */
/* Sections + movers boards (full width, below the columns)            */
/* ------------------------------------------------------------------ */

section.block { padding: 10px 0 6px; }

.section-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 14px;
}

.section-head h2 { font-size: 21px; margin: 0; font-weight: 700; }
.section-head .asof { color: var(--dim); font-size: 13px; }

.boards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}

.board {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(16, 42, 80, 0.06);
}

.board h3 {
  margin: 0;
  padding: 12px 14px;
  font-size: 15px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-alt);
}

.board table { width: 100%; border-collapse: collapse; font-size: 14px; }

.board td, .board th {
  padding: 8px 14px;
  border-bottom: 1px solid var(--border);
  text-align: right;
  font-family: var(--font-mono);
  white-space: nowrap;
}

.board tr:last-child td { border-bottom: none; }
.board td:first-child, .board th:first-child { text-align: left; }
.board tbody tr { cursor: pointer; }
.board tbody tr:hover { background: var(--bg-2); }
.board .sym { font-weight: 600; }
.board .nm { display: block; font-family: var(--font-display); font-size: 11px; color: var(--dim); white-space: normal; }

/* ------------------------------------------------------------------ */
/* Ticker detail (center column)                                       */
/* ------------------------------------------------------------------ */

.detail {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 18px;
  box-shadow: 0 1px 3px rgba(16, 42, 80, 0.06);
}

.detail-head { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: baseline; }
.detail-head .sym { font-family: var(--font-mono); font-size: 15px; color: var(--dim); font-weight: 600; }
.detail-head h2 { margin: 0; font-size: 26px; }
.detail-price { font-family: var(--font-mono); font-size: 34px; font-weight: 600; line-height: 1.1; }
.detail-chg { font-family: var(--font-mono); font-size: 16px; }

.range-row { display: flex; gap: 6px; margin: 16px 0 6px; flex-wrap: wrap; }

.range-btn {
  border: 1px solid var(--border);
  background: var(--bg-2);
  color: var(--dim);
  border-radius: 8px;
  padding: 5px 12px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  min-height: 32px;
}

.range-btn.active { color: var(--text); border-color: var(--up); background: var(--surface-alt); }

.chart-box { width: 100%; }
.chart-box svg { width: 100%; height: auto; display: block; }
.chart-axis { display: flex; justify-content: space-between; color: var(--dim); font-size: 12px; font-family: var(--font-mono); margin-top: 4px; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 18px;
}

.stat { background: var(--bg-2); padding: 10px 13px; }
.stat .k { color: var(--dim); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.stat .v { font-family: var(--font-mono); font-size: 16px; margin-top: 2px; }

.detail-news { margin-top: 20px; border-top: 1px solid var(--border); padding-top: 14px; }
.detail-news h3 { margin: 0 0 6px; font-size: 16px; }

/* ------------------------------------------------------------------ */
/* News                                                                */
/* ------------------------------------------------------------------ */

.news-panel { padding-bottom: 6px; }

.news-list { list-style: none; margin: 0; padding: 0; }

.news-list li { border-bottom: 1px solid var(--border); padding: 11px 2px; }
.news-list li:last-child { border-bottom: none; }

.news-list a { text-decoration: none; font-weight: 600; font-size: 16px; }
.news-list a:hover { text-decoration: underline; }

.news-meta { color: var(--dim); font-size: 13px; margin-top: 2px; }
.news-meta .tickers { font-family: var(--font-mono); color: var(--amber); }

/* ------------------------------------------------------------------ */
/* Signup (right column panel) + footer                                */
/* ------------------------------------------------------------------ */

.signup-panel .signup-copy { color: var(--dim); font-size: 14px; margin: 0 0 14px; }

.signup-panel form { display: flex; flex-direction: column; gap: 10px; }

.signup-panel input[type="email"] {
  width: 100%;
  min-height: 46px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 15px;
  padding: 0 14px;
  font-family: var(--font-display);
}

.signup-panel input[type="email"]:focus { outline: 2px solid var(--up); outline-offset: 1px; }

.signup-msg { font-size: 14px; min-height: 20px; }
.signup-msg.ok { color: var(--up); }
.signup-msg.err { color: var(--down); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 36px;
  padding: 22px 0 30px;
  color: var(--dim);
  font-size: 13px;
}

.footer-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.footer-row .brand-name { font-size: 17px; color: var(--text); }

.state-msg {
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 14px;
  color: var(--dim);
  text-align: center;
  font-size: 14px;
}

.state-msg.err { color: var(--down); border-color: var(--down); }

/* ------------------------------------------------------------------ */
/* Responsive: two columns, then one                                   */
/* ------------------------------------------------------------------ */

@media (max-width: 1100px) {
  .layout {
    grid-template-columns: 260px minmax(0, 1fr);
    grid-template-areas: "left center" "right right";
  }
  .col-right {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    align-items: start;
  }
  .col-right .panel { margin-bottom: 0; }
}

@media (max-width: 760px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "center" "right" "left";
  }
  .col-right { display: block; }
  .col-right .panel { margin-bottom: 18px; }
  .header-search { max-width: none; }
  .brand-name { font-size: 21px; }
  .detail { padding: 16px; }
  .detail-price { font-size: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  .tape-track { animation: none; }
  .logo-draw-line { animation: none; stroke-dashoffset: 0; }
  .logo-pop-arrow { animation: none; opacity: 1; transform: none; }
  .logo-beat { animation: none; transform: none; }
  .blink-dot { animation: none; }
  .status-dot.open { animation: none; }
}

/* Phone tap targets */
button, input, select { min-height: 2rem; }

/* Accounts: sign-in button, account chip, modal, personal watchlist */
.account-area { display: flex; align-items: center; gap: 10px; flex: none; }

.signin-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  padding: 8px 16px;
  cursor: pointer;
  white-space: nowrap;
}

.signin-btn:hover { border-color: var(--up); }

.account-email {
  color: var(--dim);
  font-size: 13.5px;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-btn {
  background: none;
  border: none;
  color: var(--up);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

.sync-hint { color: var(--dim); font-size: 13px; margin: 2px 0 8px; }

.watch-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  padding: 7px 14px;
  cursor: pointer;
}

.watch-btn:hover { border-color: var(--amber); }
.watch-btn.on { border-color: var(--amber); color: var(--amber); }

.prow { cursor: default; }
.prow:hover { background: none; }

.prow-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex: 1;
  background: none;
  border: none;
  color: var(--text);
  font-family: var(--font-display);
  cursor: pointer;
  text-align: left;
  padding: 0;
  min-width: 0;
}

.prow-x {
  background: none;
  border: none;
  color: var(--dim);
  font-size: 13px;
  cursor: pointer;
  padding: 4px 6px;
  flex: none;
}

.prow-x:hover { color: var(--down); }

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 33, 58, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
}

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

.modal-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(16, 42, 80, 0.25);
  padding: 26px 24px 20px;
  width: min(92vw, 390px);
}

.modal-card h3 { font-size: 20px; margin: 0 24px 8px 0; }
.modal-sub { color: var(--dim); font-size: 14.5px; margin: 0 0 14px; }
.modal-alt { margin: 12px 0 0; font-size: 14px; }

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  color: var(--dim);
  font-size: 16px;
  cursor: pointer;
  padding: 6px;
}

.modal-card input[type="email"],
.modal-card input[type="text"] {
  width: 100%;
  min-height: 46px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 16px;
  padding: 10px 12px;
  margin-bottom: 10px;
}

.modal-card input:focus { outline: 2px solid var(--up); outline-offset: 0; border-color: transparent; }

.code-input { text-align: center; font-size: 26px !important; letter-spacing: 8px; font-weight: 700; }

.modal-btn { width: 100%; min-height: 46px; }

.auth-msg { min-height: 20px; margin: 12px 0 0; font-size: 14px; color: var(--up); }
.auth-msg.err { color: var(--down); }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Chart scrub (drag to inspect a point) */
#chart-svg { touch-action: none; cursor: crosshair; display: block; }

.chart-readout {
  min-height: 24px;
  margin-bottom: 2px;
  font-family: var(--font-display);
}

.chart-readout .ro-price { font-size: 19px; font-weight: 800; }
.chart-readout .ro-date { color: var(--dim); font-size: 13.5px; font-weight: 600; margin-left: 8px; }

.chart-hint { color: var(--dim); font-size: 12px; margin-top: 4px; }

/* Top 100 crypto table */
.ct-panel { padding: 6px 0; }

.ct-head, .ct-row {
  display: grid;
  grid-template-columns: 32px 1fr auto 76px 92px;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
}

.ct-head {
  color: var(--dim);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  border-bottom: 1px solid var(--border);
}

.ct-head .ct-r, .ct-row .ct-price, .ct-row .ct-cap { text-align: right; }
.ct-head span:nth-child(4) { text-align: right; }

.ct-row {
  width: 100%;
  background: none;
  border: none;
  border-bottom: 1px solid var(--border);
  font: inherit;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.ct-row:last-child { border-bottom: none; }
.ct-row:hover { background: #eef3fa; }
.ct-rank { color: var(--dim); font-weight: 700; }
.ct-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ct-sym { color: var(--dim); font-weight: 600; font-size: 12.5px; margin-left: 4px; }
.ct-price { font-family: var(--font-display); font-weight: 700; }
.ct-cap { color: var(--dim); font-weight: 600; }
.ct-row .pill { justify-self: end; }

@media (max-width: 560px) {
  .ct-head, .ct-row { grid-template-columns: 30px 1fr auto 74px 84px; gap: 7px; padding: 8px 10px; }
  .ct-cap { font-size: 13px; }
}

@media (max-width: 480px) {
  .chip { font-size: 12px; }
}

/* Side-by-side Top 100 boards (stocks | crypto) */
.rank-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

.rank-col { min-width: 0; }
.rank-col .section-head { margin-bottom: 10px; }

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

/* Top 100 period dropdown */
.rank-col .section-head { align-items: center; }
.period-select {
  margin-left: auto;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 9px;
  cursor: pointer;
  min-height: 30px;
}

/* Full Circle ad at the foot of the ticker news list — animated */
.news-list li.fc-ad {
  border-bottom: none;
  margin-top: 12px;
  padding: 0;
  background: #525250;
  border-radius: 14px;
  position: relative;
  overflow: hidden;
}

.fc-ad-link { display: block; text-decoration: none; color: inherit; line-height: normal; }
.fc-ad-site { color: #fff; font-size: 14px; font-weight: 600; }
.fc-ad-div { width: 3px; height: 18px; background: #ed3237; border-radius: 2px; flex: none; }

.fc-ad-img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 1;
  object-fit: cover;
  display: block;
}

.fc-ad-body { display: block; padding: 12px 16px 14px; }

.fc-ad::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.16) 50%, transparent 60%);
  transform: translateX(-130%);
  animation: fc-shine 4.5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes fc-shine {
  0%, 55% { transform: translateX(-130%); }
  90%, 100% { transform: translateX(130%); }
}

.fc-ad-top { display: flex; align-items: center; justify-content: center; gap: 8px; }

.fc-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ed3237;
  flex: none;
  animation: fc-pulse 1.6s ease-in-out infinite;
}

@keyframes fc-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(237, 50, 55, 0.55); }
  50% { box-shadow: 0 0 0 6px rgba(237, 50, 55, 0); }
}

.news-list .fc-ad-brand {
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
}

.fc-ad-line { display: block; color: #e8e8e8; font-size: 14px; margin-top: 6px; text-align: center; }

.fc-rotate {
  color: #ff6b6f;
  font-weight: 700;
  display: inline-block;
  transition: opacity 0.22s ease;
}

.fc-rotate.swap { opacity: 0; }

.fc-ad-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
}

.news-list .fc-ad-phone { color: #fff; font-size: 14px; font-weight: 600; text-decoration: none; }

.fc-ad-cta {
  background: #ed3237;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  padding: 7px 14px;
  border-radius: 999px;
}

@media (prefers-reduced-motion: reduce) {
  .fc-ad::after { animation: none; }
  .fc-live-dot { animation: none; }
  .fc-rotate { transition: none; }
}

/* Extended hours (pre-market / after-hours) */
.ext-line { margin-top: 4px; font-size: 13.5px; color: var(--ink, #14213a); }
.ext-line b { font-weight: 700; }
.ext-chip {
  margin-left: 6px; padding: 1px 6px; border: 1px solid #b9c6da; border-radius: 999px;
  font-size: 10.5px; font-weight: 600; color: #5b6b84; white-space: nowrap;
}
