/* ============================================================
   JoabStonks — Main Stylesheet
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Mono:ital,wght@0,400;0,500;1,400&family=Playfair+Display:ital,wght@0,700;0,900;1,700&family=Syne:wght@400;500;600;700;800&display=swap');

/* ── RESET & BASE ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #080a0d;
  --bg2:       #0e1117;
  --bg3:       #141820;
  --surface:   #1a1f2c;
  --surface2:  #212736;
  --border:    rgba(255,255,255,0.06);
  --border2:   rgba(255,255,255,0.11);
  --border3:   rgba(255,255,255,0.18);
  --text:      #e2e5ef;
  --text2:     #9ba3b8;
  --muted:     #555e75;
  --dim:       #333b50;

  --green:     #16a34a;
  --green-l:   #22c55e;
  --green-bg:  rgba(34,197,94,0.08);
  --red:       #dc2626;
  --red-l:     #ef4444;
  --red-bg:    rgba(239,68,68,0.08);
  --amber:     #d97706;
  --amber-l:   #f59e0b;
  --amber-bg:  rgba(245,158,11,0.08);
  --blue:      #2563eb;
  --blue-l:    #3b82f6;

  --accent:    #c084fc;
  --accent2:   #a855f7;
  --accent3:   #7e22ce;
  --accent-bg: rgba(192,132,252,0.08);

  --font-head: 'Playfair Display', Georgia, serif;
  --font-ui:   'Syne', sans-serif;
  --font-mono: 'DM Mono', 'Fira Mono', monospace;

  --radius-sm: 5px;
  --radius:    8px;
  --radius-lg: 12px;
  --radius-xl: 18px;

  --ticker-h:  46px;
  --header-h:  58px;
  --sidebar-w: 300px;
  --transition: 0.15s ease;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font-family: var(--font-ui); cursor: pointer; border: none; background: none; }
input { font-family: var(--font-ui); }

/* ── SCROLLBAR ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--dim); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* ── TICKER ────────────────────────────────────────────────── */
#ticker-bar {
  height: var(--ticker-h);
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  align-items: center;
  position: relative;
}
#ticker-bar::before,
#ticker-bar::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 80px;
  z-index: 2;
  pointer-events: none;
}
#ticker-bar::before { left: 0; background: linear-gradient(to right, var(--bg2), transparent); }
#ticker-bar::after  { right: 0; background: linear-gradient(to left, var(--bg2), transparent); }

#ticker-track {
  display: flex;
  animation: ticker-scroll 50s linear infinite;
  white-space: nowrap;
  will-change: transform;
}
#ticker-track:hover { animation-play-state: paused; }
@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.tick-item {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 28px;
  font-family: var(--font-mono);
  font-size: 13px;
  border-right: 1px solid var(--border);
  cursor: pointer;
}
.tick-item:hover { opacity: 0.75; }
.tick-sym   { color: var(--accent); font-weight: 500; letter-spacing: 0.05em; }
.tick-score { color: var(--text); font-weight: 500; }
.tick-chg   { font-size: 11px; }
.tick-chg.up { color: var(--green-l); }
.tick-chg.dn { color: var(--red-l); }

/* ── HEADER ────────────────────────────────────────────────── */
#site-header {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(8,10,13,0.95);
  backdrop-filter: blur(16px);
  z-index: 200;
  gap: 20px;
}

.logo {
  font-family: var(--font-ui);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.04em;
  white-space: nowrap;
  flex-shrink: 0;
}
.logo span { color: var(--accent); }

/* Search */
#search-wrap {
  position: relative;
  flex: 1;
  max-width: 420px;
}
#search-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 12px;
  padding: 7px 14px 7px 36px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
#search-input::placeholder { color: var(--muted); }
#search-input:focus { border-color: var(--accent2); box-shadow: 0 0 0 2px rgba(168,85,247,0.15); }
.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 12px;
  pointer-events: none;
}
#search-results-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  overflow: hidden;
  z-index: 300;
  display: none;
}
#search-results-dropdown.show { display: block; }
.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background var(--transition);
}
.search-result-item:hover { background: var(--surface); }
.search-result-item + .search-result-item { border-top: 1px solid var(--border); }
.sr-sym { font-family: var(--font-mono); font-size: 11px; color: var(--accent); width: 52px; flex-shrink: 0; }
.sr-title { font-size: 12px; flex: 1; }
.sr-score { font-family: var(--font-mono); font-size: 12px; font-weight: 500; }
.sr-score.up { color: var(--green-l); }
.sr-score.dn { color: var(--red-l); }
.sr-score.neu { color: var(--amber-l); }

/* Header right */
.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}
.market-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.06em;
  background: var(--surface);
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--border);
}
.market-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green-l);
  animation: blink 2.2s ease-in-out infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.3} }

/* ── NAV / CATEGORY FILTER ─────────────────────────────────── */
#category-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 28px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  overflow-x: auto;
  scrollbar-width: none;
}
#category-bar::-webkit-scrollbar { display: none; }
.cat-btn {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 20px;
  color: var(--text2);
  border: 1px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
}
.cat-btn:hover { color: var(--text); background: var(--surface); }
.cat-btn.active {
  color: var(--accent);
  background: var(--accent-bg);
  border-color: rgba(192,132,252,0.3);
}

/* ── LAYOUT ────────────────────────────────────────────────── */
#app { display: flex; min-height: calc(100vh - var(--ticker-h) - var(--header-h) - 41px); }

/* Feed */
#feed-panel {
  flex: 1;
  min-width: 0;
  border-right: 1px solid var(--border);
}
#feed-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  padding: 20px 24px 32px;
  align-items: start;
}
#feed-header {
  padding: 14px 28px 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.feed-label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text2);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
}
.sort-tabs { display: flex; gap: 2px; }
.sort-tab {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 5px 13px;
  border-radius: 5px;
  color: var(--text2);
  transition: all var(--transition);
}
.sort-tab:hover { color: var(--text); background: var(--surface); }
.sort-tab.active { background: var(--surface2); color: var(--text); }

/* ── REVIEW CARD ───────────────────────────────────────────── */
.review-card {
  display: flex;
  flex-direction: column;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color var(--transition);
  position: relative;
  overflow: hidden;
}
.review-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.35);
  border-color: var(--border2);
}
.review-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: transparent;
  transition: background var(--transition);
  z-index: 2;
}
.review-card:hover::before { background: var(--accent); }

.review-card.trending::after {
  content: 'HOT';
  position: absolute;
  top: 10px; right: 10px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  color: var(--amber-l);
  background: rgba(10,12,15,0.75);
  border: 1px solid rgba(245,158,11,0.35);
  padding: 3px 7px;
  border-radius: 4px;
  letter-spacing: 0.06em;
  z-index: 3;
}

/* ── CARD COVER (photo or graph) ─── */
.card-cover {
  position: relative;
  width: 100%;
  height: 160px;
  overflow: hidden;
  flex-shrink: 0;
}
.card-cover-img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}
.review-card:hover .card-cover-img { transform: scale(1.04); }
.card-cover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8,10,13,0.7) 0%, rgba(8,10,13,0.1) 55%, transparent 100%);
}
.card-cover--graph {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 8px 8px;
}

/* Badges overlaid on cover (symbol + category) */
.card-cover-badges {
  position: absolute;
  top: 10px; left: 10px;
  display: flex;
  gap: 5px;
  z-index: 2;
}
.card-sym-pill {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: rgba(8,10,13,0.75);
  border: 1px solid rgba(192,132,252,0.3);
  padding: 3px 8px;
  border-radius: 4px;
  backdrop-filter: blur(4px);
}
.card-cat-pill {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text2);
  background: rgba(8,10,13,0.75);
  border: 1px solid var(--border2);
  padding: 3px 7px;
  border-radius: 4px;
  backdrop-filter: blur(4px);
}

/* Score overlaid bottom-right of cover */
.card-cover-score {
  position: absolute;
  bottom: 10px; right: 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  z-index: 2;
}
.card-cover-score-val {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 500;
  line-height: 1;
  text-shadow: 0 1px 8px rgba(0,0,0,0.6);
}
.card-cover-score-val.up  { color: var(--green-l); }
.card-cover-score-val.dn  { color: var(--red-l); }
.card-cover-score-val.neu { color: var(--amber-l); }
.card-cover-score-delta {
  font-family: var(--font-mono);
  font-size: 11px;
  opacity: 0.9;
}
.card-cover-score-delta.up  { color: var(--green-l); }
.card-cover-score-delta.dn  { color: var(--red-l); }
.card-cover-score-delta.neu { color: var(--amber-l); }

/* Legacy (still used by sidebar mini chart) */
.card-mini-chart { width: 40px; height: 30px; display: block; }


/* Body */
.card-body { padding: 14px 16px 16px; flex: 1; display: flex; flex-direction: column; }
.card-title {
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 4px;
  color: var(--text);
}
.card-subtitle {
  font-size: 10px;
  color: var(--muted);
  font-family: var(--font-mono);
  margin-bottom: 7px;
}
.card-excerpt {
  font-size: 12px;
  color: var(--text2);
  line-height: 1.6;
  margin-bottom: 10px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: auto; }
.tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.03em;
  padding: 3px 8px;
  background: var(--surface);
  color: var(--muted);
  border-radius: 3px;
  transition: all var(--transition);
}
.review-card:hover .tag { color: var(--text2); }

/* card-score-col, card-delta, card-vol, card-author removed — old list layout */

/* Empty state */
#empty-state {
  padding: 60px 28px;
  text-align: center;
  color: var(--muted);
  display: none;
}
#empty-state h3 { font-size: 16px; margin-bottom: 6px; color: var(--text2); }

/* ── SIDEBAR ───────────────────────────────────────────────── */
#sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  padding: 20px 18px;
  overflow-y: auto;
}

.sidebar-section { margin-bottom: 28px; }
.sidebar-heading {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text2);
  font-weight: 500;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border2);
}

/* Index cards */
.index-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 11px 13px;
  margin-bottom: 7px;
  transition: border-color var(--transition);
}
.index-card:hover { border-color: var(--border2); }
.index-name { font-size: 11px; font-weight: 500; margin-bottom: 5px; color: var(--text2); }
.index-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.index-val { font-family: var(--font-mono); font-size: 17px; font-weight: 500; }
.index-chg { font-family: var(--font-mono); font-size: 11px; }
.index-chg.up { color: var(--green-l); }
.index-chg.dn { color: var(--red-l); }
.index-spark { width: 60px; height: 26px; flex-shrink: 0; }

/* Movers */
.mover-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 6px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition);
}
.mover-row:hover { background: var(--surface); }
.mover-rank {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--dim);
  width: 14px;
  flex-shrink: 0;
  text-align: center;
}
.mover-info { flex: 1; min-width: 0; }
.mover-sym { font-family: var(--font-mono); font-size: 11px; color: var(--accent); }
.mover-name { font-size: 10px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mover-chg { font-family: var(--font-mono); font-size: 12px; font-weight: 500; flex-shrink: 0; }
.mover-chg.up { color: var(--green-l); }
.mover-chg.dn { color: var(--red-l); }

/* Trending chips */
.trending-list { display: flex; flex-direction: column; gap: 4px; }
.trending-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
}
.trending-item:hover { border-color: var(--accent2); background: var(--accent-bg); }
.trending-num {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent);
  width: 14px;
}
.trending-title { font-size: 11px; flex: 1; }
.trending-cat { font-family: var(--font-mono); font-size: 9px; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; }

/* ── DETAIL VIEW ───────────────────────────────────────────── */
#detail-panel {
  display: none;
  flex: 1;
  min-width: 0;
  border-right: 1px solid var(--border);
  overflow-y: auto;
}
#detail-panel.active { display: block; }
#feed-panel.hidden { display: none; }

.detail-inner { padding: 28px 32px 60px; }

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 28px;
  padding: 5px 0;
  transition: color var(--transition);
}
.back-btn:hover { color: var(--accent); }
.back-arrow { font-size: 14px; }

/* Detail header */
.detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}
.detail-meta-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.detail-sym {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.08em;
}
.detail-cat-badge {
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  background: var(--surface);
  color: var(--text2);
  border-radius: 3px;
}
.detail-title {
  font-family: var(--font-head);
  font-size: 34px;
  font-weight: 900;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 6px;
}
.detail-subtitle {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text2);
  margin-bottom: 8px;
}
.detail-author-line {
  font-size: 13px;
  color: var(--text2);
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
  gap: 8px;
}
.detail-author-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted); }

/* Score display */
.detail-score-box { text-align: right; flex-shrink: 0; }
.detail-score {
  font-family: var(--font-mono);
  font-size: 52px;
  font-weight: 500;
  line-height: 1;
  margin-bottom: 3px;
}
.detail-score.up  { color: var(--green-l); }
.detail-score.dn  { color: var(--red-l); }
.detail-score.neu { color: var(--amber-l); }
.detail-score-label { font-family: var(--font-mono); font-size: 11px; font-weight: 600; color: var(--text2); letter-spacing: 0.08em; text-transform: uppercase; }
.detail-delta { font-family: var(--font-mono); font-size: 13px; margin-top: 3px; }
.detail-delta.up { color: var(--green-l); }
.detail-delta.dn { color: var(--red-l); }

/* OHLC stats */
.ohlc-row {
  display: grid;
  grid-template-columns: repeat(4, 130px) 220px;
  gap: 8px;
  margin-bottom: 16px;
  align-items: start;
  width: fit-content;
}
.ohlc-box {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
}
.ohlc-box--sm {
  padding: 7px 11px;
}
.ohlc-box--vol {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 16px;
  justify-content: center;
}
.ohlc-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  font-weight: 600;
  margin-bottom: 6px;
  opacity: 0.65;
}
.ohlc-val {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 500;
  line-height: 1;
}
.ohlc-val--sm {
  font-size: 24px;
}
.ohlc-val.up  { color: var(--green-l); }
.ohlc-val.dn  { color: var(--red-l); }
.ohlc-val.neu { color: var(--text); }
.ohlc-vol-desc {
  font-size: 13px;
  color: var(--text);
  line-height: 1.45;
  opacity: 0.75;
}
/* Inline volatility badge */
.ds-vol-badge--inline {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  padding: 4px 12px;
  border-radius: 5px;
  display: inline-block;
  width: fit-content;
}

/* Chart section */
.chart-section {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  margin-bottom: 0;
}
.chart-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.chart-toolbar-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.period-btns { display: flex; gap: 2px; }
.period-btn {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 3px 10px;
  border-radius: 4px;
  color: var(--muted);
  transition: all var(--transition);
}
.period-btn:hover { color: var(--text2); background: var(--surface); }
.period-btn.active { background: var(--surface2); color: var(--text); }
#candle-canvas-wrap { position: relative; height: 300px; }

/* Review body */
.review-body-section { margin-bottom: 28px; }
.review-body-text {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 17px;
  line-height: 1.85;
  color: #b8bdd0;
}
.review-body-text p { margin-bottom: 1.4em; }
.review-body-text p:last-child { margin-bottom: 0; }

/* Update log */
.update-log { margin-bottom: 32px; }
.update-log-title {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.update-item {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
/* When row is in edit mode, collapse normal columns and let form fill width */
.update-item:has(.ue-form) {
  grid-template-columns: 1fr;
  padding: 8px 0;
}
.update-item:last-child { border-bottom: none; }
.update-date { font-family: var(--font-mono); font-size: 10px; color: var(--muted); }
.update-note { font-size: 12px; color: var(--text2); line-height: 1.5; }
.update-score { font-family: var(--font-mono); font-size: 13px; font-weight: 500; text-align: right; }
.update-score.up  { color: var(--green-l); }
.update-score.dn  { color: var(--red-l); }
.update-score.neu { color: var(--amber-l); }

/* ── UPDATE LOG HEADER ────────────────────────────────────── */
.update-log-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.add-update-toggle {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: var(--accent-bg);
  border: 1px solid rgba(192,132,252,0.22);
  border-radius: 5px;
  padding: 4px 12px;
  cursor: pointer;
  transition: all var(--transition);
}
.add-update-toggle:hover { background: rgba(192,132,252,0.15); }

/* Update item extras */
.update-item-right {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}
.update-item--custom { background: rgba(192,132,252,0.04); border-radius: var(--radius-sm); padding-left: 8px; }
.update-delete-btn {
  font-size: 9px;
  color: var(--dim);
  background: none;
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 2px 5px;
  cursor: pointer;
  line-height: 1;
  transition: all var(--transition);
  flex-shrink: 0;
}
.update-delete-btn:hover { color: var(--red-l); border-color: var(--red); background: var(--red-bg); }

/* ── ADD UPDATE FORM ───────────────────────────────────────── */
.add-update-form {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  padding: 0 18px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease, opacity 0.2s ease, margin 0.3s ease;
  opacity: 0;
  margin-bottom: 0;
}
.add-update-form.open {
  max-height: 400px;
  padding: 18px;
  opacity: 1;
  margin-bottom: 16px;
}
.auf-row {
  display: grid;
  grid-template-columns: 1fr 160px;
  gap: 14px;
  margin-bottom: 14px;
}
.auf-field { display: flex; flex-direction: column; gap: 6px; }
.auf-field--score { flex: 1; }
.auf-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.auf-hint { color: var(--dim); font-size: 9px; text-transform: none; letter-spacing: 0; }

.auf-score-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}
.auf-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 3px;
  background: var(--surface2);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
.auf-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: 2px solid var(--bg2);
  transition: transform 0.1s;
}
.auf-slider::-webkit-slider-thumb:hover { transform: scale(1.2); }
.auf-slider::-moz-range-thumb {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: 2px solid var(--bg2);
}
.auf-score-preview {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 500;
  color: var(--accent);
  min-width: 34px;
  text-align: right;
  line-height: 1;
}

.auf-input {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 12px;
  padding: 8px 12px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  font-family: var(--font-ui);
}
.auf-input:focus { border-color: var(--accent2); box-shadow: 0 0 0 2px rgba(168,85,247,0.12); }
.auf-full { width: 100%; margin-bottom: 14px; }

.auf-actions { display: flex; gap: 8px; align-items: center; }
.auf-cancel {
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--muted);
  background: none;
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 8px 16px;
  cursor: pointer;
  transition: all var(--transition);
}
.auf-cancel:hover { color: var(--text2); background: var(--surface); }
.auf-submit {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: var(--accent3);
  border: none;
  border-radius: var(--radius);
  padding: 8px 20px;
  cursor: pointer;
  transition: all var(--transition);
  letter-spacing: 0.02em;
}
.auf-submit:hover { background: var(--accent2); transform: translateY(-1px); }
.auf-submit:active { transform: translateY(0); }
.auf-error {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--red-l);
  margin-top: 8px;
  min-height: 16px;
}

/* ── LIKES SECTION ─────────────────────────────────────────── */
.likes-section {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  margin-bottom: 40px;
}
.review-like-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 30px;
  padding: 10px 20px;
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--text2);
  transition: all var(--transition);
}
.review-like-btn:hover { border-color: var(--accent); background: var(--accent-bg); color: var(--accent); }
.review-like-btn.liked { border-color: var(--accent); background: var(--accent-bg); color: var(--accent); }
.like-heart { font-size: 16px; line-height: 1; transition: transform 0.15s; }
.review-like-btn:hover .like-heart,
.review-like-btn.liked  .like-heart { transform: scale(1.2); }
.like-count {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--surface2);
  padding: 2px 8px;
  border-radius: 10px;
  color: var(--muted);
}
.review-like-btn.liked .like-count { color: var(--accent); }

/* ── ANIMATIONS ────────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.review-card {
  animation: fadeInUp 0.35s ease both;
}
.review-card:nth-child(1)  { animation-delay: 0.03s; }
.review-card:nth-child(2)  { animation-delay: 0.07s; }
.review-card:nth-child(3)  { animation-delay: 0.11s; }
.review-card:nth-child(4)  { animation-delay: 0.15s; }
.review-card:nth-child(5)  { animation-delay: 0.19s; }
.review-card:nth-child(6)  { animation-delay: 0.23s; }
.review-card:nth-child(7)  { animation-delay: 0.27s; }
.review-card:nth-child(8)  { animation-delay: 0.31s; }

/* ── RESPONSIVE ────────────────────────────────────────────── */
@media (max-width: 1100px) {
  #sidebar { width: 240px; }
}
@media (max-width: 860px) {
  #sidebar { display: none; }
  #feed-list { grid-template-columns: 1fr; gap: 12px; padding: 14px 16px 24px; }
  .detail-inner { padding: 20px 18px 48px; }
  #site-header { padding: 0 16px; }
  #category-bar { padding: 8px 16px; }
}
@media (max-width: 580px) {
  .detail-title { font-size: 22px; }
  .ohlc-row { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .detail-header { flex-direction: column; }
  .detail-score-box { text-align: left; }
}

/* ── EXPORT BUTTON ─────────────────────────────────────────── */
.export-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  font-weight: 500;
  color: var(--green-l);
  background: var(--green-bg);
  border: 1px solid rgba(34,197,94,0.25);
  border-radius: var(--radius);
  padding: 5px 13px;
  cursor: pointer;
  transition: all var(--transition);
  animation: exportPulse 2.5s ease-in-out infinite;
}
.export-btn:hover { background: rgba(34,197,94,0.15); border-color: rgba(34,197,94,0.4); }
@keyframes exportPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
  50%     { box-shadow: 0 0 0 3px rgba(34,197,94,0.12); }
}

/* ── ADMIN CONTROLS ────────────────────────────────────────── */
.admin-badge {
  display: none;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-bg);
  border: 1px solid rgba(192,132,252,0.25);
  padding: 3px 8px;
  border-radius: 3px;
}
.admin-btn {
  display: none;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 5px 12px;
  cursor: pointer;
  transition: all var(--transition);
}
.admin-btn:hover { color: var(--text2); border-color: var(--border3); background: var(--surface2); }
.admin-btn--logout:hover { color: var(--red-l); border-color: var(--red); background: var(--red-bg); }
.admin-btn-icon { font-size: 12px; line-height: 1; }

/* ── LOGIN MODAL ───────────────────────────────────────────── */
#login-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
#login-modal.open {
  display: flex;
}
#login-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
}
.login-modal-box {
  position: relative;
  z-index: 1001;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--radius-xl);
  padding: 28px 28px 22px;
  width: 360px;
  max-width: calc(100vw - 32px);
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
  animation: modalIn 0.18s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.login-modal-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}
.login-modal-icon {
  width: 42px; height: 42px;
  border-radius: 10px;
  background: var(--accent-bg);
  border: 1px solid rgba(192,132,252,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--accent);
  flex-shrink: 0;
}
.login-modal-title { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.login-modal-sub   { font-size: 11px; color: var(--muted); font-family: var(--font-mono); }

.login-field { margin-bottom: 14px; }
.login-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.login-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
  padding: 10px 14px;
  outline: none;
  font-family: var(--font-ui);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.login-input:focus { border-color: var(--accent2); box-shadow: 0 0 0 2px rgba(168,85,247,0.15); }

.login-error {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--red-l);
  min-height: 16px;
  margin-bottom: 14px;
}

.login-actions { display: flex; gap: 8px; margin-bottom: 16px; }
.login-cancel-btn {
  flex: 1;
  background: none;
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 13px;
  padding: 10px;
  cursor: pointer;
  font-family: var(--font-ui);
  transition: all var(--transition);
}
.login-cancel-btn:hover { color: var(--text2); background: var(--surface); }
.login-submit-btn {
  flex: 2;
  background: var(--accent3);
  border: none;
  border-radius: var(--radius);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 10px;
  cursor: pointer;
  font-family: var(--font-ui);
  transition: all var(--transition);
  letter-spacing: 0.02em;
}
.login-submit-btn:hover { background: var(--accent2); }
.login-submit-btn:disabled { opacity: 0.6; cursor: wait; }

.login-hint {
  font-size: 11px;
  color: var(--dim);
  line-height: 1.6;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}
.login-hint code {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  background: var(--surface);
  padding: 1px 5px;
  border-radius: 3px;
}

/* ── ADD UPDATE FORM — save hint ───────────────────────────── */
.auf-save-hint {
  margin-top: 10px;
  font-size: 11px;
  color: var(--dim);
  line-height: 1.6;
}
.auf-save-hint strong { color: var(--muted); font-weight: 500; }
.auf-save-hint code {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  background: var(--surface);
  padding: 1px 5px;
  border-radius: 3px;
}

/* ── NEW REVIEW BUTTON (feed header) ───────────────────────── */
#new-review-bar {
  padding: 10px 28px 0;
}
.new-review-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--accent);
  background: var(--accent-bg);
  border: 1px solid rgba(192,132,252,0.25);
  border-radius: var(--radius);
  padding: 7px 16px;
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: 2px;
}
.new-review-btn:hover {
  background: rgba(192,132,252,0.14);
  border-color: rgba(192,132,252,0.45);
}
.new-review-btn span { font-size: 15px; line-height: 1; }

/* ── NEW REVIEW MODAL ──────────────────────────────────────── */
#new-review-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px 40px;
  overflow-y: auto;
}
#new-review-modal.open { display: flex; }

#new-review-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(4px);
}

.nr-modal-box {
  position: relative;
  z-index: 1001;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 620px;
  box-shadow: 0 28px 70px rgba(0,0,0,0.55);
  animation: modalIn 0.18s ease;
}

.nr-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
}
.nr-modal-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}
.nr-modal-close {
  font-size: 14px;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.nr-modal-close:hover { color: var(--text); background: var(--surface); }

.nr-modal-body {
  padding: 20px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.nr-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: end;
}
.nr-field { display: flex; flex-direction: column; gap: 6px; }
.nr-field--sm { min-width: 130px; }

.nr-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.nr-req  { color: var(--accent); }
.nr-hint { color: var(--dim); font-size: 9px; text-transform: none; letter-spacing: 0; }

.nr-input {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 13px;
  padding: 8px 12px;
  outline: none;
  font-family: var(--font-ui);
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
}
.nr-input:focus {
  border-color: var(--accent2);
  box-shadow: 0 0 0 2px rgba(168,85,247,0.12);
}
.nr-input--mono { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.06em; }
.nr-select { cursor: pointer; }
.nr-select option { background: var(--bg3); }

.nr-textarea {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 13px;
  padding: 10px 12px;
  outline: none;
  font-family: var(--font-ui);
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
  width: 100%;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.nr-textarea:focus {
  border-color: var(--accent2);
  box-shadow: 0 0 0 2px rgba(168,85,247,0.12);
}
.nr-textarea::placeholder { color: var(--muted); }

.nr-error {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--red-l);
  min-height: 14px;
}

.nr-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding-top: 4px;
}

/* New reviews in the feed get a subtle accent border */
.review-card--new::before {
  background: var(--accent) !important;
}


/* ── LOGO AS BUTTON ────────────────────────────────────────── */
button.logo {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.04em;
  white-space: nowrap;
  flex-shrink: 0;
  color: var(--text);
  transition: opacity var(--transition);
}
button.logo:hover { opacity: 0.75; }
button.logo span  { color: var(--accent); }

/* ── REVIEW EDIT SECTION ───────────────────────────────────── */
.review-body-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 10px;
}
.edit-review-btn {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 5px;
  padding: 4px 12px;
  cursor: pointer;
  transition: all var(--transition);
}
.edit-review-btn:hover { color: var(--accent); border-color: rgba(192,132,252,0.3); background: var(--accent-bg); }

.review-edit-form {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  padding: 0 18px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.3s ease, padding 0.3s ease, opacity 0.2s ease, margin 0.3s ease;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.review-edit-form.open {
  max-height: 900px;
  padding: 18px;
  opacity: 1;
  margin-bottom: 16px;
}

/* ── UPDATE ENTRY EDIT FORM (inline row swap) ──────────────── */
.update-edit-btn {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.05em;
  color: var(--muted);
  background: none;
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 2px 7px;
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
}
.update-edit-btn:hover { color: var(--accent); border-color: rgba(192,132,252,0.3); background: var(--accent-bg); }

.ue-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  /* Break out of the parent grid — span all columns */
  grid-column: 1 / -1;
  width: 100%;
  box-sizing: border-box;
}
.ue-row {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 14px;
  align-items: end;
}
.ue-actions {
  display: flex;
  gap: 8px;
}

/* Edited card indicator */
.review-card--edited::before { background: var(--amber-l) !important; }

/* ── CHART TYPE TOGGLE ─────────────────────────────────────── */
.chart-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 10px;
}
.chart-type-btns {
  display: flex;
  gap: 2px;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 2px;
}
.chart-type-btn {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  font-weight: 500;
  padding: 4px 14px;
  border-radius: 5px;
  color: var(--muted);
  border: none;
  background: none;
  cursor: pointer;
  transition: all var(--transition);
}
.chart-type-btn:hover { color: var(--text2); }
.chart-type-btn.active {
  background: var(--surface2);
  color: var(--text);
}

/* ── FEED SECTIONS (category grouping) ─────────────────────── */
#feed-list:has(.feed-section) {
  display: block;
  padding: 0;
}
.feed-section {
  padding: 0 0 8px;
  border-bottom: 1px solid var(--border);
}
.feed-section:last-child { border-bottom: none; }

.feed-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px 12px;
}
.feed-section-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 700;
  color: var(--text2);
  letter-spacing: 0.01em;
}
.feed-section-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.cat-dot-film         { background: #3b82f6; }
.cat-dot-tv           { background: #ef4444; }
.cat-dot-games        { background: #22c55e; }
.cat-dot-other-media  { background: #f59e0b; }

.feed-section-count {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1px 7px;
  border-radius: 10px;
}

.feed-section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  padding: 0 24px 20px;
  align-items: start;
}

/* Newest review highlight in each category */
.review-card--newest {
  border-color: var(--border2);
  position: relative;
}
.review-card--newest::after {
  content: 'NEW';
  position: absolute;
  top: 10px; right: 10px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.07em;
  color: var(--accent);
  background: rgba(8,10,13,0.82);
  border: 1px solid rgba(192,132,252,0.4);
  padding: 3px 7px;
  border-radius: 4px;
  z-index: 3;
}
/* If also trending, trending badge takes priority — hide NEW */
.review-card--newest.trending::after { content: 'HOT'; color: var(--amber-l); border-color: rgba(245,158,11,0.35); }

/* ── CATEGORY MANAGE BUTTON ───────────────────────────────── */
.cat-manage-btn {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.05em;
  color: var(--muted);
  background: none;
  border: 1px dashed var(--border2);
  border-radius: 20px;
  padding: 5px 13px;
  cursor: pointer;
  margin-left: 6px;
  transition: all var(--transition);
  flex-shrink: 0;
}
.cat-manage-btn:hover {
  color: var(--accent);
  border-color: rgba(192,132,252,0.35);
  background: var(--accent-bg);
}

/* ── CATEGORY MANAGER MODAL ───────────────────────────────── */
#cat-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
#cat-modal.open { display: flex; }
#cat-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
}
.cat-modal-box {
  position: relative;
  z-index: 1001;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--radius-xl);
  width: 420px;
  max-width: calc(100vw - 32px);
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
  animation: modalIn 0.18s ease;
  overflow: hidden;
}
.cat-modal-body {
  padding: 16px 20px 20px;
}

/* Category list */
.cat-list { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; }
.cat-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition);
}
.cat-list-item:hover { border-color: var(--border2); }
.cat-list-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}
.cat-list-name {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}
.cat-list-actions {
  display: flex;
  gap: 3px;
  align-items: center;
}
.cat-move-btn {
  font-size: 12px;
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--muted);
  cursor: pointer;
  transition: all var(--transition);
  line-height: 1;
  font-family: var(--font-ui);
}
.cat-move-btn:hover { color: var(--text); background: var(--surface2); border-color: var(--border2); }
.cat-move-btn--ghost { border-color: transparent; cursor: default; visibility: hidden; }
.cat-del-btn {
  font-size: 14px;
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--muted);
  cursor: pointer;
  transition: all var(--transition);
  line-height: 1;
  font-family: var(--font-ui);
}
.cat-del-btn:hover { color: var(--red-l); border-color: var(--red); background: var(--red-bg); }
.cat-del-btn--ghost { border-color: transparent; cursor: default; visibility: hidden; }

/* Add row */
.cat-add-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
.cat-add-row .auf-input { flex: 1; }
.cat-add-row .auf-submit { flex-shrink: 0; padding: 8px 16px; font-size: 12px; }

.cat-modal-error {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--red-l);
  min-height: 14px;
  margin-bottom: 4px;
}
.cat-modal-hint {
  font-size: 11px;
  color: var(--dim);
  line-height: 1.5;
  border-top: 1px solid var(--border);
  padding-top: 10px;
  margin-top: 6px;
}


/* ── DEBUT BANNER ──────────────────────────────────────────── */
#debut-banner { padding: 20px 24px 4px; }

.debut-banner {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 220px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--bg2);
  border: 1px solid var(--border2);
  cursor: pointer;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 0 0 1px transparent, 0 4px 24px rgba(0,0,0,0.3);
}
.debut-banner:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08), 0 12px 40px rgba(0,0,0,0.45);
}
.debut-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-xl);
  background: radial-gradient(ellipse at 0% 50%, color-mix(in srgb, var(--debut-color) 15%, transparent), transparent 65%);
  pointer-events: none;
}

/* Cover side */
.debut-cover {
  position: relative;
  overflow: hidden;
  background: var(--surface);
}
.debut-cover-img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}
.debut-banner:hover .debut-cover-img { transform: scale(1.04); }
.debut-cover--graph {
  display: flex;
  align-items: center;
  padding: 16px 12px;
  background: color-mix(in srgb, var(--debut-color) 8%, var(--bg2));
}
.debut-cover--graph svg { width: 100%; height: 100%; }
.debut-cover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, transparent 50%, var(--bg2) 100%);
}

/* Content side */
.debut-content {
  padding: 22px 26px 22px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}
.debut-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
}
.debut-label {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--accent);
  background: var(--accent-bg);
  border: 1px solid rgba(192,132,252,0.3);
  padding: 3px 9px;
  border-radius: 4px;
}
.debut-sym {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.06em;
}
.debut-cat {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
  background: var(--surface);
  padding: 2px 7px;
  border-radius: 3px;
}
.debut-title {
  font-family: var(--font-head);
  font-size: 26px;
  font-weight: 900;
  line-height: 1.1;
  color: var(--text);
  margin: 0;
}
.debut-subtitle {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  margin: -6px 0 0;
}
.debut-excerpt {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.6;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}
.debut-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
}
.debut-score-block {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.debut-score {
  font-family: var(--font-mono);
  font-size: 36px;
  font-weight: 500;
  line-height: 1;
}
.debut-score.up  { color: var(--green-l); }
.debut-score.dn  { color: var(--red-l); }
.debut-score.neu { color: var(--amber-l); }
.debut-score-label {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 0.08em;
  line-height: 1.2;
}
.debut-delta {
  font-family: var(--font-mono);
  font-size: 12px;
}
.debut-delta.up  { color: var(--green-l); }
.debut-delta.dn  { color: var(--red-l); }
.debut-delta.neu { color: var(--amber-l); }
.debut-tags { display: flex; flex-wrap: wrap; gap: 5px; justify-content: flex-end; }

/* Responsive */
@media (max-width: 860px) {
  .debut-banner { grid-template-columns: 1fr; min-height: auto; }
  .debut-cover  { height: 160px; }
  .debut-cover-overlay { background: linear-gradient(to top, var(--bg2) 0%, transparent 60%); }
}

/* ── IPO CARDS (sidebar) ───────────────────────────────────── */
#ipo-area { display: flex; flex-direction: column; gap: 8px; }

.ipo-card {
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-left: 3px solid var(--ipo-color, var(--accent));
  border-radius: var(--radius);
  padding: 12px 14px;
  font-family: var(--font-mono);
  transition: border-color var(--transition), background var(--transition);
  cursor: default;
}
.ipo-card:hover {
  background: var(--surface);
  border-color: var(--border3);
  border-left-color: var(--ipo-color, var(--accent));
}

.ipo-listing {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 7px;
}
.ipo-listing-label {
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 500;
}
.ipo-sym {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text2);
}
.ipo-trend-icon {
  margin-left: auto;
  font-size: 13px;
  line-height: 1;
}
.ipo-trend-up  { color: var(--green-l); }
.ipo-trend-neu { color: var(--muted); font-size: 10px; letter-spacing: 2px; }

.ipo-title {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin-bottom: 10px;
}

.ipo-meta-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid var(--border);
  padding-top: 8px;
}
.ipo-meta-label {
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 3px;
  text-transform: uppercase;
  font-weight: 500;
}
.ipo-valuation {
  font-size: 20px;
  font-weight: 500;
  color: var(--green-l);
  letter-spacing: -0.02em;
  line-height: 1;
}
.ipo-tminus-block { text-align: right; }
.ipo-tminus {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.03em;
  line-height: 1;
}

/* ── IPO ADMIN CONTROLS ────────────────────────────────────── */
/* ipo-add-btn removed — IPOs now added via New Review form */

.ipo-admin-bar {
  display: flex;
  gap: 4px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.ipo-edit-btn {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.05em;
  color: var(--muted);
  background: none;
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 4px 0;
  cursor: pointer;
  transition: all var(--transition);
}
.ipo-edit-btn:hover { color: var(--accent); border-color: rgba(192,132,252,0.3); background: var(--accent-bg); }
.ipo-del-btn {
  width: 26px;
  font-size: 13px;
  color: var(--muted);
  background: none;
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 3px 0;
  cursor: pointer;
  transition: all var(--transition);
  line-height: 1;
  font-family: var(--font-ui);
}
.ipo-del-btn:hover { color: var(--red-l); border-color: var(--red); background: var(--red-bg); }

/* ── IPO EDIT MODAL ────────────────────────────────────────── */
#ipo-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
#ipo-modal.open { display: flex; }
#ipo-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(4px);
}
.ipo-modal-box {
  position: relative;
  z-index: 1001;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--radius-xl);
  width: 480px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 60px);
  overflow-y: auto;
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
  animation: modalIn 0.18s ease;
}
.ipo-modal-body {
  padding: 16px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ipo-color-picker {
  width: 100%;
  height: 36px;
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  padding: 2px 4px;
}

/* ── TOP RATED STRIP (replaces trending list) ──────────────── */
.top-rated-strip {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.top-rated-chip {
  display: grid;
  grid-template-columns: 24px 1fr auto auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
}
.top-rated-chip:hover {
  background: var(--surface);
  border-color: var(--border2);
  transform: translateX(2px);
}
.trc-rank {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--dim);
  letter-spacing: 0.06em;
}
.trc-sym {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.05em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.trc-score {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
}
.trc-score.up  { color: var(--green-l); }
.trc-score.dn  { color: var(--red-l); }
.trc-score.neu { color: var(--amber-l); }
.trc-delta {
  font-family: var(--font-mono);
  font-size: 10px;
  min-width: 36px;
  text-align: right;
}
.trc-delta.up  { color: var(--green-l); }
.trc-delta.dn  { color: var(--red-l); }
.trc-delta.neu { color: var(--amber-l); }

/* ── CATEGORY VIEW SUBSECTIONS ─────────────────────────────── */
.feed-subsection {
  padding: 0 0 8px;
}
.feed-subsection + .feed-subsection {
  border-top: 1px solid var(--border);
  padding-top: 4px;
}
.feed-subsection-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px 10px;
}
.feed-subsection-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text2);
}
.feed-subsection-label--ipo {
  color: var(--accent);
}
.feed-subsection-count {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1px 7px;
  border-radius: 10px;
}
.feed-subsection-empty {
  font-size: 12px;
  color: var(--muted);
  padding: 8px 24px 16px;
  font-style: italic;
}

/* ── IPO FEED CARD ─────────────────────────────────────────── */
.ipo-feed-card {
  border-left: 3px solid var(--ipo-color, var(--accent));
}
.ipo-feed-cover {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 10px 12px;
}
.ipo-feed-score-box {
  position: absolute;
  bottom: 10px;
  right: 12px;
  text-align: right;
}
.ipo-feed-ev-label {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.45);
  margin-bottom: 2px;
}
.ipo-feed-tminus {
  position: absolute;
  bottom: 10px;
  left: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--text2);
}
.ipo-feed-tminus .ipo-feed-ev-label {
  color: rgba(255,255,255,0.45);
}

/* ── CATEGORY PAGE TWO-COLUMN SPLIT ───────────────────────── */
/* When both Reviews and IPOs subsections exist, lay them side by side */
#feed-list:has(.feed-subsection + .feed-subsection) {
  display: flex;
  flex-direction: column;
}
/* Two-subsection split: reviews 2/3, IPOs 1/3 */
.feed-cat-split {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 0;
  min-height: 0;
}
.feed-cat-split .feed-subsection {
  padding-bottom: 0;
}
.feed-cat-split .feed-subsection + .feed-subsection {
  border-top: none;
  border-left: 1px solid var(--border);
  padding-top: 0;
}
.feed-cat-split .feed-section-grid {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  padding: 0 16px 20px;
}
@media (max-width: 860px) {
  .feed-cat-split { grid-template-columns: 1fr; }
  .feed-cat-split .feed-subsection + .feed-subsection { border-left: none; border-top: 1px solid var(--border); }
}

/* ── IPO CHECKBOX IN NEW REVIEW FORM ───────────────────────── */
.nr-ipo-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  transition: all var(--transition);
}
.nr-ipo-toggle:hover { border-color: var(--accent2); background: var(--accent-bg); }
.nr-ipo-toggle input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--accent2);
  cursor: pointer;
  flex-shrink: 0;
}
.nr-ipo-toggle-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text2);
}
.nr-ipo-only {
  background: var(--accent-bg);
  border: 1px solid rgba(192,132,252,0.2);
  border-radius: var(--radius);
  padding: 12px 14px;
  flex-direction: column;
  gap: 6px;
}

/* ── IPO SECTION COUNT BADGE ───────────────────────────────── */
.feed-section-count--ipo {
  color: var(--accent);
  border-color: rgba(192,132,252,0.25);
  background: var(--accent-bg);
}

/* ── IPO ADMIN HINT ────────────────────────────────────────── */
.ipo-admin-hint {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--dim);
  letter-spacing: 0.04em;
  padding: 6px 2px;
  text-align: center;
  line-height: 1.5;
}

/* ── DETAIL PAGE: CHART + SIDEBAR ROW ─────────────────────── */
.detail-chart-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  align-items: start;
  margin-bottom: 16px;
}
.detail-chart-col {
  min-width: 0; /* prevent overflow */
}
.detail-chart-col .chart-section {
  margin-bottom: 0; /* row gap handles spacing */
}

/* ── DETAIL SIDEBAR ────────────────────────────────────────── */
.detail-sidebar {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ds-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
}
.ds-card-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

/* Volatility card */
.ds-vol-badge {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
  padding: 4px 10px;
  border-radius: var(--radius);
  display: inline-block;
}
.vol-low     { color: var(--green-l); background: var(--green-bg); }
.vol-high    { color: var(--amber-l); background: var(--amber-bg); }
.vol-extreme { color: var(--red-l);   background: var(--red-bg); }
.vol-na      { color: var(--muted);   background: var(--surface); }

.ds-vol-desc {
  font-size: 11px;
  color: var(--text2);
  line-height: 1.55;
  margin: 0;
}

/* Related Analysis */
.ds-related-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ds-related-item {
  display: flex;
  gap: 10px;
  align-items: center;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: var(--radius);
  transition: background var(--transition);
}
.ds-related-item:hover { background: var(--surface); }

.ds-related-cover {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  gap: 2px;
}
.ds-related-sym {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.ds-related-score {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
}
.ds-related-score.up  { color: var(--green-l); }
.ds-related-score.dn  { color: var(--red-l); }
.ds-related-score.neu { color: var(--amber-l); }

.ds-related-info { flex: 1; min-width: 0; }
.ds-related-title {
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ds-related-cat {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 2px;
}

/* Responsive: stack at narrow widths */
@media (max-width: 860px) {
  .detail-chart-row {
    grid-template-columns: 1fr;
  }
  .detail-sidebar {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
  }
  .ds-card { flex: 1; min-width: 200px; }
}

/* ── DETAIL BODY WRAP (review text + update log + likes) ───── */
/* ── DETAIL BODY ROW: review text left, related analysis right ─ */
.detail-body-row {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 44px;
  align-items: start;
  padding-top: 8px;
}
.detail-body-main {
  min-width: 0;
}
.detail-body-main .review-body-section {
  margin-bottom: 20px;
}
.detail-body-main .review-body-header {
  margin-bottom: 6px;
}

/* ── RELATED ANALYSIS SIDEBAR ──────────────────────────────── */
.related-sidebar {
  position: sticky;
  top: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.related-sidebar-header {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border2);
}
.related-section-title {
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}
.related-section-sub {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.related-sidebar-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Related cards */
.rel-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color var(--transition);
  display: flex;
  flex-direction: column;
}
.rel-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.35);
  border-color: var(--border2);
}
.rel-card-cover {
  position: relative;
  height: 110px;
  overflow: hidden;
  flex-shrink: 0;
}
.rel-card-cover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8,10,13,0.65) 0%, transparent 60%);
}
.rel-card-score-badge {
  position: absolute;
  bottom: 8px;
  right: 10px;
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 500;
  line-height: 1;
  text-shadow: 0 1px 6px rgba(0,0,0,0.5);
}
.rel-card-score-badge.up  { color: var(--green-l); }
.rel-card-score-badge.dn  { color: var(--red-l); }
.rel-card-score-badge.neu { color: var(--amber-l); }

.rel-card-body {
  padding: 14px 16px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.rel-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}
.rel-card-sym {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.06em;
}
.rel-card-cat {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface);
  padding: 2px 6px;
  border-radius: 3px;
}
.rel-card-title {
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
}
.rel-card-subtitle {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
}
.rel-card-excerpt {
  font-size: 12px;
  color: var(--text2);
  line-height: 1.55;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 4px 0 0;
}
.rel-card-delta {
  font-family: var(--font-mono);
  font-size: 11px;
  margin-top: 6px;
  font-weight: 500;
}
.rel-card-delta.up  { color: var(--green-l); }
.rel-card-delta.dn  { color: var(--red-l); }
.rel-card-delta.neu { color: var(--muted); }

@media (max-width: 1000px) {
  .detail-body-row { grid-template-columns: 1fr; }
  .related-sidebar { position: static; }
  .related-sidebar-cards { display: grid; grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .related-sidebar-cards { grid-template-columns: 1fr; }
}

/* ── PEEK CARD (see-all teaser at end of category section) ─── */
.review-card--peek {
  position: relative;
  cursor: pointer;
  overflow: hidden;
}
/* The peek-fade sits over the cover + body, fading L→R */
.peek-fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    transparent 0%,
    rgba(14,17,22,0.2) 20%,
    rgba(14,17,22,0.75) 50%,
    rgba(14,17,22,0.97) 80%,
    rgba(14,17,22,1.0) 100%
  );
  z-index: 1;
  pointer-events: none;
}
/* "See all" overlay centred on the right half */
.peek-overlay {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  width: 55%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  z-index: 2;
  padding: 0 12px;
  text-align: center;
}
.peek-overlay-label {
  font-family: var(--font-ui);
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1;
}
.peek-overlay-count {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-transform: uppercase;
}
.review-card--peek:hover .peek-overlay-label { color: var(--accent); }
.review-card--peek:hover .peek-overlay-count  { color: var(--text2); }

/* Body text also fades out */
.peek-body {
  opacity: 0.4;
}
.review-card--peek:hover .peek-body { opacity: 0.55; }

/* ── PASSWORD FIELD WITH SHOW/HIDE TOGGLE ──────────────────── */
.login-pw-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.login-pw-wrap .login-input {
  padding-right: 40px; /* room for the toggle button */
}
.login-pw-toggle {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 100%;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--muted);
  border-radius: 0 var(--radius) var(--radius) 0;
  transition: color var(--transition);
  line-height: 1;
}
.login-pw-toggle:hover { color: var(--text2); }
