/* ==========================================================================
   DealDrop — Clean Editorial
   Light paper, ink type, one bold accent (signal orange).
   ========================================================================== */

:root {
  --paper: #FAFAF8;
  --card: #FFFFFF;
  --ink: #0B0B0C;
  --ink-2: #3A3A3E;
  --muted: #77777C;
  --faint: #A2A2A6;
  --line: #E8E8E3;
  --line-2: #D6D6CF;
  --wash: #F2F2EE;

  --accent: #FF4F00;
  --accent-ink: #D94300;
  --accent-soft: #FFF0E8;
  --accent-line: #FFCDB4;
  --accent-hover: #F04A00;
  --on-accent: #fff;
  --on-ink: #fff;
  --ink-hover: #222225;

  /* Surfaces + component tokens (themed) */
  --field: #fff;
  --field-focus: #fff;
  --focus-halo: rgba(11, 11, 12, .06);
  --nav-bg: rgba(250, 250, 248, .84);
  --controls-bg: rgba(250, 250, 248, .9);
  --tabs-bg: #EFEFEA;
  --tabs-ind: #fff;
  --tabs-ind-shadow: 0 1px 2px rgba(0,0,0,.07), 0 0 0 1px rgba(0,0,0,.04);
  --tab-n-bg: rgba(0,0,0,.06);
  --chip-n-on: rgba(255,255,255,.55);
  --line-soft: #F0F0EC;
  --chip-x-hover: #E2E2DC;
  --heat-off: #E3E3DD;
  --heat-low: #FF9A66;
  --pick-star: #FFB38A;
  --avatar-bg: linear-gradient(135deg, #EDEDE8, #D7D7CF);
  --avatar-edge: rgba(0,0,0,.05);
  --card-hover-shadow: 0 1px 2px rgba(0,0,0,.04), 0 10px 28px -12px rgba(0,0,0,.16);
  --accent-glow: rgba(255, 79, 0, .7);
  --dead-tint: #F1F1EE;
  --stamp-bg: rgba(255,255,255,.55);
  --ticker-bg: #0B0B0C;
  --ticker-edge: transparent;
  --toast-bg: #0B0B0C;
  --toast-edge: rgba(255,255,255,.06);

  /* Product line-art */
  --art-line: var(--ink);
  --art-body: #fff;
  --art-solid: var(--ink);
  --art-shadow: rgba(11,11,12,.08);

  --radius: 12px;
  --nav-h: 64px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);

  --sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Charter", "New York", "Source Serif Pro", ui-serif, Georgia, "Times New Roman", serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Mono", Menlo, Consolas, monospace;

  color-scheme: light;
}

/* ---------- Dark: ink-black paper, warm off-white type, tuned signal orange ---------- */
[data-theme="dark"] {
  --paper: #111110;
  --card: #19191A;
  --ink: #F3EEE6;
  --ink-2: #CFC9BF;
  --muted: #A29D94;
  --faint: #8C877F;
  --line: #2A2A2B;
  --line-2: #3D3D3E;
  --wash: #232324;

  --accent: #FF6A26;
  --accent-ink: #FF9259;
  --accent-soft: #2E1B11;
  --accent-line: #6B3519;
  --accent-hover: #FF7A3D;
  --on-accent: #160A03;
  --on-ink: #111110;
  --ink-hover: #FFFFFF;

  --field: #161617;
  --field-focus: #1C1C1D;
  --focus-halo: rgba(243, 238, 230, .08);
  --nav-bg: rgba(17, 17, 16, .82);
  --controls-bg: rgba(17, 17, 16, .88);
  --tabs-bg: #1E1E1F;
  --tabs-ind: #303032;
  --tabs-ind-shadow: 0 1px 2px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.06);
  --tab-n-bg: rgba(255,255,255,.08);
  --chip-n-on: rgba(17,17,16,.6);
  --line-soft: #242425;
  --chip-x-hover: #333335;
  --heat-off: #333335;
  --heat-low: #A9542B;
  --pick-star: #C24000;
  --avatar-bg: linear-gradient(135deg, #34343A, #222226);
  --avatar-edge: rgba(255,255,255,.08);
  --card-hover-shadow: 0 1px 2px rgba(0,0,0,.4), 0 14px 32px -14px rgba(0,0,0,.8);
  --accent-glow: rgba(255, 106, 38, .45);
  --dead-tint: #1A1A1B;
  --stamp-bg: rgba(17,17,16,.72);
  --ticker-bg: #080808;
  --ticker-edge: rgba(255,255,255,.07);
  --toast-bg: #242426;
  --toast-edge: rgba(255,255,255,.1);

  --art-line: #E9E3D8;
  --art-body: #262628;
  --art-solid: #0D0D0E;
  --art-shadow: rgba(0,0,0,.45);

  color-scheme: dark;
}

/* Cross-fade colors only while the user toggles (class added by JS; skipped under reduced motion) */
html.theme-anim *, html.theme-anim *::before, html.theme-anim *::after {
  transition: background-color .35s ease, color .35s ease, border-color .35s ease,
              fill .35s ease, stroke .35s ease, box-shadow .35s ease, outline-color .35s ease !important;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 140px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 14px/1.45 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
svg { display: block; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.wrap { max-width: 1440px; margin: 0 auto; padding: 0 32px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; z-index: 100; background: var(--ink); color: var(--on-ink); padding: 8px 12px; border-radius: 8px; }

/* ---------- Live dot ---------- */
.live-dot {
  flex: none;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  animation: live 1.8s ease-out infinite;
}
@keyframes live {
  0%   { box-shadow: 0 0 0 0 rgba(255, 79, 0, .55); }
  70%  { box-shadow: 0 0 0 7px rgba(255, 79, 0, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 79, 0, 0); }
}

/* ==========================================================================
   Ticker
   ========================================================================== */
.ticker {
  display: flex; align-items: center;
  height: 34px;
  background: var(--ticker-bg); color: #D9D9D6;
  box-shadow: inset 0 -1px 0 var(--ticker-edge);
  font-size: 12px;
  overflow: hidden;
}
.ticker__label {
  flex: none; position: relative; z-index: 1;
  display: flex; align-items: center; gap: 8px;
  height: 100%;
  padding: 0 16px 0 max(32px, calc((100vw - 1440px) / 2 + 32px));
  font: 600 10.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase;
  color: #fff;
  border-right: 1px solid rgba(255,255,255,.12);
}
.ticker__viewport {
  flex: 1; min-width: 0; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 32px, #000 calc(100% - 48px), transparent);
          mask-image: linear-gradient(90deg, transparent, #000 32px, #000 calc(100% - 48px), transparent);
}
.ticker__track { display: flex; width: max-content; animation: marquee 80s linear infinite; }
.ticker:hover .ticker__track, .ticker:focus-within .ticker__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.tick {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 0 20px; line-height: 34px; white-space: nowrap;
  transition: color .2s;
}
.tick::after { content: ""; width: 3px; height: 3px; border-radius: 50%; background: #4A4A4F; margin-left: 12px; }
.tick:hover { color: #fff; }
.tick:hover b { color: var(--accent); }
.tick__v { font: 600 11px var(--mono); color: var(--accent); font-variant-numeric: tabular-nums; }
.tick b { font-weight: 650; color: #fff; font-variant-numeric: tabular-nums; transition: color .2s; }
.tick__s { color: #85858B; }

/* ==========================================================================
   Nav
   ========================================================================== */
.nav {
  position: sticky; top: 0; z-index: 40;
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(1.6) blur(16px);
          backdrop-filter: saturate(1.6) blur(16px);
  border-bottom: 1px solid var(--line);
}
.nav__inner { display: flex; align-items: center; gap: 20px; height: var(--nav-h); }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 18px; letter-spacing: -.035em; flex: none; }
.brand__mark { width: 26px; height: 26px; transition: transform .5s var(--spring); }
.brand:hover .brand__mark { transform: translateY(2px) rotate(-8deg); }

.search {
  flex: 1; max-width: 540px;
  display: flex; align-items: center; gap: 10px;
  height: 40px; padding: 0 8px 0 13px;
  background: var(--field); border: 1px solid var(--line); border-radius: 10px;
  transition: border-color .2s, box-shadow .2s;
}
.search:hover { border-color: var(--line-2); }
.search:focus-within { border-color: var(--ink); box-shadow: 0 0 0 4px var(--focus-halo); }
.search > svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; font: inherit; font-size: 14px; color: var(--ink); }
.search input::placeholder { color: var(--faint); }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }
kbd {
  font: 500 11px/1 var(--mono); color: var(--muted);
  border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px;
  padding: 3px 6px; background: var(--paper);
}

.nav__links { display: flex; gap: 2px; margin-left: auto; }
.nav__links a { padding: 8px 10px; border-radius: 8px; color: var(--ink-2); font-weight: 500; transition: background .15s, color .15s; }
.nav__links a:hover { background: var(--wash); color: var(--ink); }
.nav__actions { display: flex; align-items: center; gap: 8px; flex: none; }

.icon-btn {
  position: relative; width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 10px; border: 1px solid var(--line); background: var(--card);
  transition: border-color .2s, transform .15s var(--ease);
}
.icon-btn:hover { border-color: var(--line-2); }
.icon-btn:active { transform: scale(.94); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover svg { animation: ring .6s var(--ease); transform-origin: 50% 10%; }
@keyframes ring { 20% { transform: rotate(14deg); } 45% { transform: rotate(-10deg); } 70% { transform: rotate(5deg); } }
/* Theme toggle: sun in light, moon in dark */
.theme-toggle svg { transition: transform .5s var(--spring), opacity .3s; }
.theme-toggle:hover svg { animation: none; transform: rotate(-18deg); }
.theme-toggle .i-moon { display: none; }
[data-theme="dark"] .theme-toggle .i-sun { display: none; }
[data-theme="dark"] .theme-toggle .i-moon { display: block; }

.badge {
  position: absolute; top: -6px; right: -6px;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; border: 2px solid var(--paper);
  background: var(--accent); color: var(--on-accent);
  font: 700 10px/14px var(--sans); text-align: center; font-variant-numeric: tabular-nums;
}
.badge[hidden] { display: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 40px; padding: 0 16px; border-radius: 10px;
  font-weight: 600; white-space: nowrap;
  transition: transform .15s var(--ease), background .2s, box-shadow .2s;
}
.btn svg { width: 15px; height: 15px; }
.btn:active { transform: scale(.97); }
.btn--accent { background: var(--accent); color: var(--on-accent); box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 4px 14px -6px var(--accent-glow); }
.btn--accent:hover { background: var(--accent-hover); }
.btn--ghost { background: var(--card); border: 1px solid var(--line-2); height: 36px; }
.btn--ghost:hover { border-color: var(--ink); }
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--avatar-bg);
  font: 700 12px var(--sans); color: var(--ink-2);
  box-shadow: inset 0 0 0 1px var(--avatar-edge);
}

/* ==========================================================================
   Masthead
   ========================================================================== */
.masthead {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
  gap: 56px; align-items: end;
  padding: 36px 0 28px;
  border-bottom: 1px solid var(--ink);
}
.kicker {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 16px;
  font: 600 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}
.kicker .sep { color: var(--line-2); }
h1 {
  margin: 0; max-width: 18ch;
  font: 400 clamp(34px, 4.1vw, 58px)/1.0 var(--serif);
  letter-spacing: -.028em;
  text-wrap: balance;
}
h1 em { font-style: italic; color: var(--accent); }
.stats { display: flex; gap: 36px; margin: 24px 0 0; }
.stat { display: flex; flex-direction: column-reverse; gap: 4px; }
.stat dt { font-size: 12px; color: var(--muted); }
.stat dd { margin: 0; font: 700 22px/1 var(--sans); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat--zero dd { color: var(--accent); }

.pledge { border-left: 3px solid var(--accent); padding: 2px 0 2px 22px; }
.pledge__line { margin: 0; font: 500 26px/1.12 var(--serif); letter-spacing: -.015em; }
.pledge__line em { font-style: italic; }
.pledge__sub { margin: 12px 0 0; font-size: 13px; color: var(--ink-2); max-width: 46ch; }
.pledge__sub a { font-weight: 600; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; transition: text-decoration-color .2s, color .2s; }
.pledge__sub a:hover { color: var(--accent-ink); text-decoration-color: var(--accent); }

/* ==========================================================================
   Controls (sticky)
   ========================================================================== */
.controls {
  position: sticky; top: var(--nav-h); z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  margin: 0 -32px; padding: 12px 32px;
  background: var(--controls-bg);
  -webkit-backdrop-filter: blur(16px);
          backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.tabs {
  position: relative; flex: none;
  display: flex; gap: 2px; padding: 3px;
  background: var(--tabs-bg); border-radius: 10px;
}
.tabs__ind {
  position: absolute; top: 3px; left: 0; height: 32px; width: 0;
  background: var(--tabs-ind); border-radius: 7px;
  box-shadow: var(--tabs-ind-shadow);
  transition: transform .4s var(--ease), width .4s var(--ease);
}
.tab {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 13px; border-radius: 7px;
  font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap;
  transition: color .2s;
}
.tab svg { width: 13px; height: 13px; }
.tab:hover { color: var(--ink-2); }
.tab[aria-selected="true"] { color: var(--ink); }
.tab[data-tab="hot"][aria-selected="true"] svg { color: var(--accent); }
.tab__n {
  font: 600 10px/1 var(--mono); padding: 3px 5px; border-radius: 5px;
  background: var(--tab-n-bg); color: var(--muted); font-variant-numeric: tabular-nums;
  transition: background .2s, color .2s;
}
.tab[aria-selected="true"] .tab__n { background: var(--accent-soft); color: var(--accent-ink); }

.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 12px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--card);
  font-size: 13px; font-weight: 550; color: var(--ink-2);
  transition: background .2s, border-color .2s, color .2s, transform .15s var(--ease);
}
.chip:hover { border-color: var(--line-2); color: var(--ink); }
.chip:active { transform: scale(.95); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.chip__n { font: 500 11px/1 var(--mono); color: var(--faint); font-variant-numeric: tabular-nums; }
.chip[aria-pressed="true"] .chip__n { color: var(--chip-n-on); }

/* ==========================================================================
   Layout + feed
   ========================================================================== */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; padding: 20px 0 64px; }

.feed-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 12px; margin: 2px 0 14px; }
.feed-head h2 { margin: 0; font: 700 15px/1.2 var(--sans); letter-spacing: -.01em; }
.count { font: 500 12px var(--mono); color: var(--muted); }
.sample-tag {
  align-self: center;
  font: 600 9.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase;
  padding: 4px 7px; border: 1px dashed var(--line-2); border-radius: 5px; color: var(--muted);
}
.feed-head__note { margin-left: auto; font-size: 12px; color: var(--muted); }

.feed { display: grid; grid-template-columns: repeat(auto-fill, minmax(226px, 1fr)); gap: 14px; }
.feed[hidden] { display: none; }

/* ---------- Card ---------- */
.card {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .2s, box-shadow .6s var(--ease), transform .3s var(--ease);
}
.card:hover {
  border-color: var(--line-2);
  box-shadow: var(--card-hover-shadow);
  transform: translateY(-2px);
}

.card__media {
  --tint: #EEF0F4; --tint-2: #D9DEE7;
  position: relative;
  aspect-ratio: 16 / 10;
  display: grid; place-items: center;
  background: var(--tint);
  color: var(--art-line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.card__media[data-cat="tech"]    { --tint: #ECF0F6; --tint-2: #D3DCEA; }
.card__media[data-cat="gaming"]  { --tint: #F0EDF7; --tint-2: #DCD4EE; }
.card__media[data-cat="home"]    { --tint: #F5F1E9; --tint-2: #E7DDCA; }
.card__media[data-cat="grocery"] { --tint: #EDF4EA; --tint-2: #D2E5CD; }
.card__media[data-cat="fashion"] { --tint: #F8EFEC; --tint-2: #ECD6CE; }
.card__media[data-cat="travel"]  { --tint: #E9F3F5; --tint-2: #CCE2E7; }
[data-theme="dark"] .card__media                    { --tint: #181A1E; --tint-2: #2C313A; }
[data-theme="dark"] .card__media[data-cat="tech"]    { --tint: #161A21; --tint-2: #283244; }
[data-theme="dark"] .card__media[data-cat="gaming"]  { --tint: #1A1723; --tint-2: #322A47; }
[data-theme="dark"] .card__media[data-cat="home"]    { --tint: #1D1A15; --tint-2: #3A3124; }
[data-theme="dark"] .card__media[data-cat="grocery"] { --tint: #151C16; --tint-2: #253A23; }
[data-theme="dark"] .card__media[data-cat="fashion"] { --tint: #1F1716; --tint-2: #3D2A24; }
[data-theme="dark"] .card__media[data-cat="travel"]  { --tint: #141C1E; --tint-2: #213A40; }
.card__media svg { width: 74%; height: auto; max-height: 90%; transition: transform .6s var(--ease); }
.card:hover .card__media svg { transform: scale(1.045) rotate(-1.2deg); }

.card__body {
  container-type: inline-size;
  flex: 1;
  display: flex; flex-direction: column; gap: 8px;
  padding: 12px 14px 12px;
}

.card__flags { display: flex; flex-wrap: wrap; gap: 5px; }
.card__flags:empty { display: none; }
.flag {
  display: inline-flex; align-items: center; gap: 5px;
  height: 20px; padding: 0 7px; border-radius: 5px;
  font: 700 9.5px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap;
}
.flag svg { width: 10px; height: 10px; }
.flag--front { background: var(--accent-soft); color: var(--accent-ink); }
.flag--pick  { background: var(--ink); color: var(--on-ink); }
.flag--pick svg { color: var(--pick-star); }
.flag--fast  { color: var(--accent-ink); box-shadow: inset 0 0 0 1px var(--accent-line); }
.flag--new   { background: var(--accent); color: var(--on-accent); }
.flag.pop    { animation: pop .55s var(--spring); }
@keyframes pop { 0% { transform: scale(.5); opacity: 0; } 100% { transform: none; opacity: 1; } }
.pulse { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: live 1.5s ease-out infinite; }

.card__title {
  margin: 0;
  font: 600 14px/1.33 var(--sans); letter-spacing: -.006em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 2.66em;
}
.card__title a { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .35s var(--ease); }
.card__title a:hover { background-size: 100% 1px; }

.card__price { display: flex; align-items: baseline; gap: 7px; }
.card__price strong { font: 750 21px/1 var(--sans); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.card__price s { font-size: 13px; color: var(--faint); font-variant-numeric: tabular-nums; text-decoration-thickness: 1px; }
.pct {
  margin-left: auto; align-self: center;
  padding: 4px 6px; border-radius: 5px;
  font: 700 11.5px/1 var(--sans); font-variant-numeric: tabular-nums;
  background: var(--accent-soft); color: var(--accent-ink);
}

.card__meta { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 12px; color: var(--muted); }
.card__meta .store { font-weight: 650; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card__meta .user { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card__meta time { white-space: nowrap; }
.dot { flex: none; width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .55; }
.alert-hit { margin-left: auto; flex: none; display: inline-flex; color: var(--accent); }
.alert-hit svg { width: 13px; height: 13px; }

.timer {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 8px; border-radius: 6px;
  background: var(--wash); color: var(--ink-2);
  font: 500 11.5px/1 var(--sans);
}
.timer svg { width: 12px; height: 12px; }
.timer b { font: 600 11.5px/1 var(--mono); font-variant-numeric: tabular-nums; }
.timer.is-urgent { background: var(--accent-soft); color: var(--accent-ink); }

.card__foot {
  margin-top: auto;
  display: flex; align-items: center; gap: 10px;
  padding-top: 10px; border-top: 1px solid var(--line-soft);
}

/* ---------- Votes ---------- */
.vote {
  position: relative; flex: none;
  display: inline-flex; align-items: center;
  height: 30px; padding: 0 1px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--card);
  transition: border-color .2s, background .2s;
}
.vote__btn {
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  color: var(--muted);
  transition: background .15s, color .15s, transform .2s var(--spring);
}
.vote__btn svg { width: 14px; height: 14px; }
.vote__btn:hover { background: var(--wash); color: var(--ink); }
.vote__up:hover { color: var(--accent); }
.vote__btn:active { transform: scale(.82); }
.vote__score {
  display: inline-block; min-width: 30px; text-align: center;
  font: 700 13px/1 var(--sans); font-variant-numeric: tabular-nums;
}
.vote[data-state="1"] { border-color: var(--accent-line); background: var(--accent-soft); }
.vote[data-state="1"] .vote__up { background: var(--accent); color: var(--on-accent); }
.vote[data-state="1"] .vote__score { color: var(--accent-ink); }
.vote[data-state="-1"] .vote__down { background: var(--ink); color: var(--on-ink); }
.vote[data-state="-1"] .vote__score { color: var(--muted); }

.vote__score.bump { animation: bump .5s var(--spring); }
@keyframes bump { 0% { transform: scale(1); } 30% { transform: scale(1.45) translateY(-2px); } 100% { transform: none; } }
.vote__score.nudge { animation: nudge .9s ease; }
@keyframes nudge { 0% { color: var(--accent); transform: translateY(-3px); } 40% { transform: none; } 100% { } }
.vote__up.fly svg   { animation: fly .45s var(--ease); }
.vote__down.fly svg { animation: dive .45s var(--ease); }
@keyframes fly  { 40% { transform: translateY(-4px); } }
@keyframes dive { 40% { transform: translateY(4px); } }
.vote__float {
  position: absolute; left: 50%; top: -6px;
  font: 800 12px/1 var(--sans); color: var(--accent);
  pointer-events: none;
  animation: floatUp .75s var(--ease) forwards;
}
.vote__float.neg { color: var(--ink); }
@keyframes floatUp {
  from { opacity: 1; transform: translate(-50%, 0) scale(.9); }
  to   { opacity: 0; transform: translate(-50%, -20px) scale(1.1); }
}

/* ---------- Heat ---------- */
.heat { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.heat__bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.heat__bars i { width: 3px; border-radius: 1px; background: var(--heat-off); transition: background .3s; }
.heat__bars i:nth-child(1) { height: 4px; }
.heat__bars i:nth-child(2) { height: 6px; }
.heat__bars i:nth-child(3) { height: 8px; }
.heat__bars i:nth-child(4) { height: 10px; }
.heat__bars i:nth-child(5) { height: 12px; }
.heat__bars i.on { background: var(--accent); }
.heat[data-level="1"] .heat__bars i.on, .heat[data-level="2"] .heat__bars i.on { background: var(--heat-low); }
.heat[data-level="5"] .heat__label { color: var(--accent-ink); }
@container (max-width: 236px) { .heat__label { display: none; } }
@container (max-width: 252px) { .card__meta .user, .card__meta .user + .dot { display: none; } }

.comments {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 6px; border-radius: 6px;
  font-size: 12px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums;
  transition: background .15s, color .15s;
}
.comments svg { width: 14px; height: 14px; }
.comments:hover { background: var(--wash); color: var(--ink); }

/* ---------- Card states ---------- */
.card.is-dead .card__media { background: var(--dead-tint); }
.card.is-dead .card__media svg { filter: grayscale(1); opacity: .32; }
.card.is-dead .card__title, .card.is-dead .card__price { opacity: .5; }
.card.is-dead .pct { background: var(--wash); color: var(--muted); }
.card.is-dead:hover .card__media svg { transform: none; }
.stamp {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%) rotate(-9deg);
  padding: 7px 14px 6px;
  border: 2.5px solid var(--ink); border-radius: 6px;
  outline: 1px solid var(--ink); outline-offset: 2px;
  font: 800 14px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink); background: var(--stamp-bg);
  animation: stamp .45s var(--spring) both;
}
.stamp--expired { border-color: var(--accent-ink); outline-color: var(--accent-ink); color: var(--accent-ink); }
@keyframes stamp { from { opacity: 0; transform: translate(-50%, -50%) rotate(-9deg) scale(1.9); } }

.card.is-drop { animation: dropIn .8s var(--ease) both; }
@keyframes dropIn {
  0%   { opacity: 0; transform: translateY(-22px) scale(.96); }
  100% { opacity: 1; transform: none; }
}
.card.is-glow { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 16px 36px -16px rgba(255, 79, 0, .55); }
.card.is-flash { animation: flash 1.6s var(--ease); }
@keyframes flash { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 79, 0, 0); } 25% { box-shadow: 0 0 0 4px rgba(255, 79, 0, .9); } }

/* ---------- Empty ---------- */
.empty { border: 1px dashed var(--line-2); border-radius: var(--radius); padding: 56px 24px; text-align: center; color: var(--muted); }
.empty h3 { margin: 0 0 6px; font: 400 28px/1.1 var(--serif); letter-spacing: -.02em; color: var(--ink); }
.empty p { margin: 0 auto 18px; max-width: 40ch; }

/* ==========================================================================
   Sidebar
   ========================================================================== */
.sidebar { position: sticky; top: calc(var(--nav-h) + 78px); align-self: start; display: flex; flex-direction: column; gap: 14px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.panel__head { display: flex; align-items: center; gap: 8px; }
.panel__head h2 { margin: 0; font: 700 14px/1.2 var(--sans); letter-spacing: -.01em; }
.panel__icon { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); }
.panel__icon svg { width: 14px; height: 14px; }
.panel__sub { margin: 8px 0 14px; font-size: 12.5px; color: var(--muted); }

.alert-form { display: flex; gap: 6px; }
.alert-form input {
  flex: 1; min-width: 0; height: 36px; padding: 0 11px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--paper);
  font: inherit; font-size: 13px; color: var(--ink); outline: 0;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.alert-form input:focus { border-color: var(--ink); background: var(--field-focus); box-shadow: 0 0 0 3px var(--focus-halo); }
.alert-form input.shake { animation: shake .35s; border-color: var(--accent); }
@keyframes shake { 25% { transform: translateX(-4px); } 50% { transform: translateX(4px); } 75% { transform: translateX(-2px); } }
.alert-form button {
  height: 36px; padding: 0 14px; border-radius: 8px;
  background: var(--ink); color: var(--on-ink); font-weight: 600; font-size: 13px;
  transition: transform .15s var(--ease), background .2s;
}
.alert-form button:hover { background: var(--ink-hover); }
.alert-form button:active { transform: scale(.95); }

.alert-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.alert-list:empty { display: none; }
.alert-chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 3px 0 10px; border-radius: 999px;
  background: var(--wash); font-size: 12.5px; font-weight: 600;
}
.alert-chip.is-new { animation: pop .45s var(--spring); }
.alert-chip__n { font: 600 10px/1 var(--mono); color: var(--faint); font-variant-numeric: tabular-nums; }
.alert-chip.has-hits .alert-chip__n { color: var(--accent-ink); }
.alert-chip button { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); transition: background .15s, color .15s; }
.alert-chip button:hover { background: var(--chip-x-hover); color: var(--ink); }
.alert-chip button svg { width: 10px; height: 10px; }
.alert-empty { margin: 12px 0 0; font-size: 12px; color: var(--faint); }
.suggest { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 12px; font-size: 12px; color: var(--muted); }
.suggest button { color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; transition: color .15s, text-decoration-color .15s; }
.suggest button:hover { color: var(--accent-ink); text-decoration-color: var(--accent); }
.panel__foot { display: flex; align-items: center; gap: 6px; margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--line-soft); font-size: 11.5px; color: var(--muted); }
.panel__foot svg { width: 13px; height: 13px; flex: none; }

.steps { list-style: none; counter-reset: s; margin: 14px 0 0; padding: 0; display: grid; gap: 12px; }
.steps li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; font-size: 12.5px; color: var(--muted); }
.steps li::before {
  counter-increment: s; content: counter(s);
  width: 22px; height: 22px; border-radius: 6px;
  display: grid; place-items: center;
  background: var(--wash); color: var(--ink);
  font: 600 11px/1 var(--mono);
}
.steps b { display: block; font-size: 13px; color: var(--ink); }
.zero { display: flex; align-items: center; gap: 14px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.zero b { font: 400 46px/.9 var(--serif); color: var(--accent); letter-spacing: -.03em; }
.zero span { font-size: 12px; color: var(--ink-2); }

/* ==========================================================================
   Footer + toasts
   ========================================================================== */
.foot {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px;
  padding-top: 22px; padding-bottom: 48px;
  border-top: 1px solid var(--line);
  font-size: 12px; color: var(--muted);
}
.foot b { color: var(--ink-2); }

.toasts {
  position: fixed; left: 50%; bottom: 20px; z-index: 60;
  transform: translateX(-50%);
  width: min(430px, calc(100vw - 24px));
  display: flex; flex-direction: column; gap: 8px;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex; align-items: center; gap: 12px;
  padding: 11px 12px 11px 11px; border-radius: 12px;
  background: var(--toast-bg); color: #fff;
  font-size: 13px;
  box-shadow: 0 18px 40px -14px rgba(0,0,0,.45), 0 0 0 1px var(--toast-edge) inset;
  animation: toastIn .45s var(--spring);
}
.toast.out { animation: toastOut .3s ease forwards; }
@keyframes toastIn  { from { opacity: 0; transform: translateY(14px) scale(.97); } }
@keyframes toastOut { to   { opacity: 0; transform: translateY(8px) scale(.98); } }
.toast__icon { flex: none; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); }
.toast__icon svg { width: 15px; height: 15px; }
.toast__body { flex: 1; min-width: 0; }
.toast__body b { display: block; font-weight: 650; }
.toast__body span { display: block; color: #A8A8AE; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toast__action {
  flex: none; height: 30px; padding: 0 11px; border-radius: 8px;
  background: rgba(255,255,255,.12); color: #fff; font-size: 12px; font-weight: 650;
  transition: background .15s;
}
.toast__action:hover { background: rgba(255,255,255,.22); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1200px) {
  .nav__links { display: none; }
  .layout { grid-template-columns: minmax(0, 1fr) 272px; gap: 24px; }
}

@media (max-width: 1024px) {
  .masthead { grid-template-columns: 1fr; gap: 22px; align-items: start; }
  .controls { flex-direction: column; align-items: stretch; gap: 10px; }
  .tabs { align-self: flex-start; }
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
}

@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .ticker__label { padding-left: 16px; }
  .nav { position: relative; }
  .nav__inner { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 10px; gap: 10px; }
  .nav__actions { margin-left: auto; }
  .search { order: 3; flex-basis: 100%; max-width: none; height: 40px; }
  .search kbd, .avatar, .hide-sm { display: none; }
  .btn--accent { padding: 0 13px; }

  .masthead { padding: 22px 0 20px; gap: 18px; }
  .kicker { margin-bottom: 12px; }
  h1 { font-size: 34px; }
  .stats { gap: 22px; margin-top: 18px; }
  .stat dd { font-size: 19px; }
  .stat dt { font-size: 11px; }
  .pledge { padding-left: 16px; }
  .pledge__line { font-size: 21px; }

  .controls { top: 0; margin: 0 -16px; padding: 10px 16px; gap: 8px; }
  .tabs { align-self: stretch; overflow-x: auto; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { padding: 0 9px; flex: 1 0 auto; justify-content: center; font-size: 12.5px; }
  .tab svg { display: none; }
  .chips { margin: 0 -16px; padding: 0 16px; }

  .layout { padding-top: 14px; }
  .feed-head__note { display: none; }
  .feed { grid-template-columns: 1fr; gap: 10px; }

  .card { display: grid; grid-template-columns: 104px minmax(0, 1fr); }
  .card:hover { transform: none; }
  .card__media { aspect-ratio: auto; height: 100%; min-height: 120px; border-bottom: 0; border-right: 1px solid var(--line); }
  .card__media svg { width: 88%; }
  .card__body { padding: 10px 12px; gap: 6px; }
  .card__title { font-size: 14px; min-height: 0; }
  .card__price strong { font-size: 19px; }
  .card__foot { padding-top: 8px; }
  .stamp { font-size: 10px; padding: 5px 7px 4px; letter-spacing: .1em; border-width: 2px; }

  .sidebar { grid-template-columns: 1fr; }
  .foot { flex-direction: column; }
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .ticker__track { animation: none !important; }
  .ticker__viewport { overflow-x: auto; scrollbar-width: none; }
  .live-dot, .pulse { animation: none !important; }
  .card:hover, .card:hover .card__media svg { transform: none; }
}

/* ==========================================================================
   Additions for the real app (links instead of buttons, new card parts)
   ========================================================================== */
/* Tabs and chips are links: aria-current mirrors the mockup's aria-selected / aria-pressed */
.tab[aria-current="page"] { color: var(--ink); }
.tab[data-tab="hot"][aria-current="page"] svg { color: var(--accent); }
.tab[aria-current="page"] .tab__n { background: var(--accent-soft); color: var(--accent-ink); }
.tabs:not(.has-ind) .tab[aria-current="page"] { background: var(--tabs-ind); box-shadow: var(--tabs-ind-shadow); }
.chip[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.chip[aria-current="true"] .chip__n { color: var(--chip-n-on); }

/* Card parts */
.card__media img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.card.is-dead .card__media img { filter: grayscale(1); opacity: .35; }
.card__meta a.user:hover { color: var(--ink); text-decoration: underline; }
.flag--coupon { box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink-2); font-family: var(--mono); letter-spacing: .02em; }
.flag--coupon svg { color: var(--accent); }
.card__meta .sample-tag { margin-left: auto; flex: none; }
.get-deal {
  margin-left: 4px; padding: 6px 10px; border-radius: 7px;
  background: var(--ink); color: var(--on-ink); font-size: 12px; font-weight: 650; white-space: nowrap;
  transition: background .2s, transform .15s var(--ease);
}
.get-deal:hover { background: var(--accent); color: var(--on-accent); }
.get-deal:active { transform: scale(.96); }

/* Header: logged-out links, anchor buttons */
.nav-login { padding: 8px 10px; border-radius: 8px; color: var(--ink-2); font-weight: 500; white-space: nowrap; }
.nav-login:hover { background: var(--wash); color: var(--ink); }
.nav-signup { height: 40px; white-space: nowrap; }
.btn { text-decoration: none; }

/* Pagination */
.more { display: flex; justify-content: center; padding: 22px 0 0; }
.more[hidden] { display: none; }
#moreWrap:empty { display: none; }

/* Sidebar alert chips contain a delete form */
.alert-chip form { display: contents; }
.panel .btn--ghost { width: 100%; justify-content: center; }
.alert-form + .alert-list, .alert-form + .alert-empty { margin-top: 12px; }

@media (max-width: 760px) {
  .nav-login { display: none; }
  .nav-signup { height: 36px; padding: 0 12px; }
}

/* ==========================================================================
   Chunk 2: accounts, post form, deal page, comments, profile
   ========================================================================== */
.muted { color: var(--muted); }
.logout { display: inline-flex; margin: 0; }
.logout .nav-login { background: none; border: 0; cursor: pointer; font: inherit; font-weight: 500; }
.avatar { text-decoration: none; }
.avatar--sm { width: 30px; height: 30px; font-size: 11px; flex: none; }
.avatar--xl { width: 72px; height: 72px; font-size: 24px; flex: none; }
.btn { cursor: pointer; border: 0; font-family: inherit; font-size: inherit; color: inherit; }
.btn--accent { color: var(--on-accent); }
.btn--ghost { border: 1px solid var(--line-2); color: var(--ink); }
.btn--danger { color: var(--accent-ink); }
.btn--xl { height: 54px; padding: 0 26px; font-size: 16px; font-weight: 700; border-radius: 12px; width: 100%; }
.btn--xl svg { width: 17px; height: 17px; }
.flag--dead { background: var(--wash); color: var(--muted); }

/* Notices + banners */
.notice, .banner { margin: 0 0 18px; padding: 11px 14px; border-radius: 10px; font-size: 13.5px; border: 1px solid var(--line-2); background: var(--card); }
.notice--ok { border-color: #BFDDB6; background: #F0F8EC; color: #2C5A1F; }
.notice--err { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent-ink); }
[data-theme="dark"] .notice--ok { border-color: #2F5A27; background: #15200F; color: #A8D69B; }
.banner { border-style: dashed; border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }

/* Breadcrumb */
.crumbs { display: flex; align-items: center; gap: 8px; padding: 22px 0 14px; font-size: 12.5px; color: var(--muted); min-width: 0; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs span { color: var(--faint); }
.crumbs .crumbs__title { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Auth */
.auth { display: grid; place-items: start center; padding: 56px 0 72px; }
.auth__card { width: 100%; max-width: 420px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 34px 32px 28px; box-shadow: var(--card-hover-shadow); }
.auth__card h1 { margin: 0; font: 400 34px/1.05 var(--serif); letter-spacing: -.02em; }
.auth__sub { margin: 8px 0 22px; color: var(--muted); font-size: 13.5px; }
.auth__submit { width: 100%; height: 46px; margin-top: 6px; }
.auth__alt { margin: 18px 0 0; text-align: center; font-size: 13px; color: var(--muted); }
.auth__alt a { color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }

/* Form fields */
.field { margin: 0 0 16px; min-width: 0; }
.field label { display: block; margin-bottom: 6px; font-size: 12.5px; font-weight: 650; color: var(--ink-2); }
.field input, .field select, .field textarea, .comment-form textarea, .reply textarea, .report input[type="text"] {
  width: 100%; border: 1px solid var(--line-2); background: var(--field); color: var(--ink);
  border-radius: 10px; padding: 0 13px; height: 44px; font: inherit; outline: 0;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.field textarea, .comment-form textarea, .reply textarea { height: auto; padding: 11px 13px; resize: vertical; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus, .comment-form textarea:focus, .reply textarea:focus, .report input[type="text"]:focus {
  border-color: var(--ink); background: var(--field-focus); box-shadow: 0 0 0 4px var(--focus-halo);
}
.field::placeholder, input::placeholder, textarea::placeholder { color: var(--faint); }
.field.has-err input, .field.has-err select, .field.has-err textarea { border-color: var(--accent); }
.field__err { margin: 6px 0 0; font-size: 12.5px; color: var(--accent-ink); font-weight: 550; }
.field__hint { margin: 6px 0 0; font-size: 12px; color: var(--muted); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

/* Post form */
.formcard { max-width: 720px; margin: 0 auto 72px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 32px 36px 30px; }
.formcard__head h1 { margin: 0; font: 400 38px/1.05 var(--serif); letter-spacing: -.02em; }
.formcard__head p { margin: 8px 0 26px; color: var(--muted); font-size: 14px; max-width: 54ch; }
.urlrow { display: flex; gap: 8px; }
.urlrow .btn { height: 44px; flex: none; }
.fetch-status { margin: 8px 0 0; min-height: 18px; font-size: 12.5px; color: var(--muted); }
.fetch-status.is-ok { color: #2C7A1F; font-weight: 600; }
[data-theme="dark"] .fetch-status.is-ok { color: #8FD27F; }
.fetch-status.is-bad { color: var(--accent-ink); font-weight: 600; }
.fetch-status.is-busy::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 8px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--accent); animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.preview { margin: 0 0 18px; height: 150px; border: 1px solid var(--line); border-radius: 12px; background: var(--wash); display: grid; place-items: center; overflow: hidden; }
.preview[hidden] { display: none; }
.preview img { max-width: 100%; max-height: 100%; object-fit: contain; padding: 8px; }
.formcard__actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; padding-top: 20px; border-top: 1px solid var(--line-soft); }
.formcard__actions .btn { height: 44px; padding: 0 22px; }

/* Deal page */
.deal { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.dmedia { aspect-ratio: 4 / 3; border: 1px solid var(--line); border-radius: 16px; position: sticky; top: calc(var(--nav-h) + 20px); }
.dmedia img { width: 100%; height: 100%; object-fit: contain; padding: 28px; }
.dmedia svg { width: 62%; }
.dmedia.is-dead svg { filter: grayscale(1); opacity: .32; }
.dmedia.is-dead img { filter: grayscale(1); opacity: .35; }
.dmedia.is-dead { background: var(--dead-tint); }
.stamp--lg { font-size: 24px; padding: 11px 24px 9px; }
.dinfo { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.dinfo > * { max-width: 100%; }
.dinfo.is-dead .dtitle, .dinfo.is-dead .dprice { opacity: .55; }
.dtitle { margin: 0; font: 400 40px/1.08 var(--serif); letter-spacing: -.02em; text-wrap: balance; }
.dprice { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.dprice strong { font: 750 46px/1 var(--sans); letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.dprice s { font-size: 19px; color: var(--faint); }
.dprice .pct { font-size: 14px; padding: 5px 9px; }
.dmeta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; font-size: 13.5px; color: var(--muted); }
.dmeta .store { font-weight: 700; color: var(--ink); }
.dmeta .user { color: var(--ink-2); font-weight: 600; }
.dmeta .user:hover, .comment__head .user:hover { text-decoration: underline; }
.timer--lg { padding: 7px 12px; font-size: 13px; }
.timer--lg b { font-size: 14px; }
.flagged { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; color: var(--accent-ink); font-weight: 600; }
.flagged svg { width: 14px; height: 14px; }
.coupon { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px 12px 16px; border: 1.5px dashed var(--accent-line); background: var(--accent-soft); border-radius: 12px; }
.coupon__label { display: block; font: 600 10px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 6px; }
.coupon code { font: 700 20px/1 var(--mono); letter-spacing: .04em; color: var(--ink); }
.coupon .btn { height: 36px; }
.dactions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.vote--lg { height: 48px; }
.vote--lg .vote__btn { width: 44px; height: 44px; }
.vote--lg .vote__btn svg { width: 17px; height: 17px; }
.vote--lg .vote__score { min-width: 44px; font-size: 18px; }
.clicks { font: 500 12.5px var(--mono); color: var(--muted); }
.dactions .comments { height: 40px; padding: 0 12px; }

.dcols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; padding: 44px 0 72px; align-items: start; }
.dsection { margin: 0 0 32px; }
.dsection h2 { margin: 0 0 14px; font: 700 15px/1.2 var(--sans); letter-spacing: -.01em; display: flex; gap: 10px; align-items: baseline; }
.dbody { margin: 0; font-size: 15.5px; line-height: 1.65; color: var(--ink-2); max-width: 68ch; }
.pledge-note { font-size: 12.5px; color: var(--muted); padding-left: 14px; border-left: 3px solid var(--accent); margin: 0; }
.pledge-note b { color: var(--ink); }
.dcols__side .dsection { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.dcols__side .dsection h2 { margin-bottom: 12px; }
.admin-tools__row { display: flex; flex-direction: column; gap: 8px; }
.admin-tools__row form { display: contents; }
.admin-tools__row .btn { width: 100%; justify-content: flex-start; }
.report summary { cursor: pointer; font-weight: 700; font-size: 14px; list-style: none; display: flex; justify-content: space-between; }
.report summary::after { content: "+"; font-weight: 400; color: var(--muted); }
.report[open] summary::after { content: "–"; }
.report form { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.report .btn { align-self: flex-start; }
.report--anon { font-size: 13px; color: var(--muted); }
.report--anon a { color: var(--ink); font-weight: 600; text-decoration: underline; }
.radios { display: flex; flex-wrap: wrap; gap: 6px; }
.radio input { position: absolute; opacity: 0; pointer-events: none; }
.radio span { display: inline-block; padding: 7px 12px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 12.5px; font-weight: 550; cursor: pointer; color: var(--ink-2); transition: all .15s; }
.radio input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.radio input:focus-visible + span { box-shadow: 0 0 0 3px var(--focus-halo); outline: 2px solid var(--ink); }

/* Comments */
.comment-form { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; margin-bottom: 22px; }
.comment-form .btn { height: 40px; }
.comment-login { margin: 0 0 18px; color: var(--muted); font-size: 14px; }
.comment-login a, .reply-login { color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.comments-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.comments-list--replies { margin-top: 16px; padding-left: 18px; border-left: 2px solid var(--line); }
.comment { display: flex; gap: 12px; }
.comment__main { flex: 1; min-width: 0; }
.comment__head { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.comment__head .user { font-weight: 700; color: var(--ink); }
.comment__body { margin: 4px 0 6px; font-size: 14.5px; line-height: 1.55; color: var(--ink-2); overflow-wrap: anywhere; }
.comment.is-removed .comment__body { color: var(--faint); font-style: italic; }
.comment__actions { display: flex; align-items: flex-start; gap: 14px; font-size: 12.5px; }
.reply summary, .reply-login, .linkbtn { cursor: pointer; font-size: 12.5px; font-weight: 650; color: var(--muted); list-style: none; background: none; border: 0; padding: 0; font-family: inherit; }
.reply summary:hover, .linkbtn:hover { color: var(--ink); }
.linkbtn { color: var(--accent-ink); }
.reply[open] summary { margin-bottom: 8px; }
.reply form { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; min-width: min(480px, 70vw); }
.inline { display: inline; margin: 0; }

/* Profile */
.profile { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; padding: 40px 0 30px; }
.profile__who h1 { margin: 0; font: 400 40px/1.05 var(--serif); letter-spacing: -.02em; display: flex; gap: 12px; align-items: center; }
.profile__who p { margin: 6px 0 0; font-size: 13.5px; }
.profile__stats { margin: 0 0 0 auto; }

@media (max-width: 900px) {
  .deal, .dcols { grid-template-columns: 1fr; gap: 24px; }
  .dmedia { position: static; }
  .dtitle { font-size: 30px; }
  .grid3 { grid-template-columns: 1fr 1fr; }
  .profile__stats { margin-left: 0; }
}
@media (max-width: 560px) {
  .formcard { padding: 22px 18px; border-radius: 12px; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .urlrow { flex-direction: column; }
  .urlrow .btn { width: 100%; }
  .auth__card { padding: 26px 20px; }
}

/* ==========================================================================
   Chunk 3: bell dropdown, alerts page, admin, radar
   ========================================================================== */
.bell { position: relative; }
.bell-pop {
  position: absolute; right: -8px; top: calc(100% + 10px); width: 340px; z-index: 60;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  box-shadow: 0 2px 4px rgba(0,0,0,.05), 0 20px 44px -14px rgba(0,0,0,.28);
  animation: dropIn .22s var(--ease);
}
.bell-pop[hidden] { display: none; }
.bell-pop__head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--line-soft); font-size: 13.5px; }
.bell-pop__head button { font: 600 12px var(--sans); color: var(--accent-ink); background: none; border: 0; cursor: pointer; padding: 4px 6px; border-radius: 6px; }
.bell-pop__head button:hover { background: var(--accent-soft); }
.bell-pop__list { list-style: none; margin: 0; padding: 4px; max-height: 360px; overflow-y: auto; }
.bell-pop__empty { padding: 22px 14px; text-align: center; font-size: 12.5px; color: var(--muted); }
.bell-item { display: block; position: relative; padding: 9px 12px 9px 26px; border-radius: 9px; }
.bell-item:hover, .bell-item:focus-visible { background: var(--wash); }
.bell-item.is-unread::before { content: ""; position: absolute; left: 11px; top: 16px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.bell-item__t { display: block; font-size: 13px; font-weight: 600; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.bell-item__m { display: block; margin-top: 2px; font-size: 11.5px; color: var(--muted); }
.bell-pop__foot { display: block; padding: 11px 14px; text-align: center; border-top: 1px solid var(--line-soft); font-size: 12.5px; font-weight: 650; color: var(--ink-2); }
.bell-pop__foot:hover { background: var(--wash); color: var(--ink); }
@keyframes dropIn { from { opacity: 0; transform: translateY(-6px); } }
@media (max-width: 560px) { .bell-pop { position: fixed; left: 12px; right: 12px; top: 74px; width: auto; } }

/* Alerts page */
.alerts-page { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 32px; align-items: start; padding-bottom: 72px; }
.alerts-page .panel .notice { margin: 12px 0 0; }
.notes { list-style: none; margin: 0; padding: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.note { display: flex; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--line-soft); }
.note:last-child { border-bottom: 0; }
.note a { font-weight: 650; }
.note a:hover { text-decoration: underline; }
.note p { margin: 3px 0 0; font-size: 12.5px; color: var(--muted); }
.note .kw { font: 600 11.5px var(--mono); color: var(--accent-ink); }
.note__dot { flex: none; width: 8px; height: 8px; margin-top: 7px; border-radius: 50%; background: transparent; box-shadow: inset 0 0 0 1.5px var(--line-2); }
.note.is-unread .note__dot { background: var(--accent); box-shadow: none; }
@media (max-width: 900px) { .alerts-page { grid-template-columns: 1fr; } }

/* Admin */
.admin-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 34px 0 22px; }
.admin-head h1 { margin: 6px 0 0; font: 400 44px/1 var(--serif); letter-spacing: -.02em; }
.tabs.has-static { position: relative; }
.btn--sm { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 8px; }
.btn--danger { color: var(--accent-ink); border-color: var(--accent-line); }
.btn--danger:hover { background: var(--accent-soft); border-color: var(--accent); }
.admin-grid { display: grid; gap: 28px; padding-bottom: 72px; }
.apanel { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; margin-bottom: 24px; }
.admin-grid .apanel { margin: 0; }
.apanel .feed-head { margin-top: 0; }
.apanel__empty { margin: 8px 0 4px; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; flex: none; }
.pills { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 999px; font: 600 11px/1.3 var(--sans); background: var(--accent-soft); color: var(--accent-ink); }
.pill b { font-family: var(--mono); }
.pill--plain { background: var(--wash); color: var(--muted); }
.pill--warn { background: var(--ink); color: var(--on-ink); }
.rgroup { border: 1px solid var(--line); border-radius: 12px; margin-top: 14px; overflow: hidden; }
.rgroup > header { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; padding: 14px 16px; background: var(--wash); }
.rgroup__title { font-weight: 700; font-size: 14.5px; }
.rgroup__title:hover { text-decoration: underline; }
.rgroup ul, .replist { list-style: none; margin: 0; padding: 0; }
.rep { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line-soft); font-size: 13px; }
.replist .rep:first-child { border-top: 0; }
.replist .rep { padding-left: 0; padding-right: 0; }
.rep a:hover { text-decoration: underline; }
.rep__note { margin: 4px 0 0; color: var(--muted); font-size: 12.5px; overflow-wrap: anywhere; }
.rep.is-gone .rep__note { font-style: italic; color: var(--faint); }
.tablewrap { overflow-x: auto; }
.atable { width: 100%; border-collapse: collapse; font-size: 13px; }
.atable th { text-align: left; font: 600 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); }
.atable td { padding: 11px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.atable tr:last-child td { border-bottom: 0; }
.atable .num { text-align: right; font: 600 13px var(--mono); font-variant-numeric: tabular-nums; width: 70px; }
.t-title a { font-weight: 650; }
.t-title a:hover { text-decoration: underline; }
.t-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* Radar */
.srcs { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.src { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.src.is-off { background: var(--wash); }
.src header { display: flex; justify-content: space-between; align-items: center; }
.src__feeds { list-style: none; margin: 10px 0 0; padding: 0; font: 12px var(--mono); color: var(--ink-2); overflow-wrap: anywhere; display: grid; gap: 4px; }
.src__run { margin: 10px 0 0; font-size: 12.5px; color: var(--muted); }
.cand { display: grid; grid-template-columns: 88px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line-soft); }
.cand:first-of-type { border-top: 0; }
.cand__img { width: 88px; height: 66px; border-radius: 10px; background: var(--wash); border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; color: var(--faint); }
.cand__img img { width: 100%; height: 100%; object-fit: cover; }
.cand__img svg { width: 22px; height: 22px; }
.cand h3 { margin: 0; font: 650 14.5px/1.3 var(--sans); }
.cand h3 a:hover { text-decoration: underline; }
.cand__meta { margin: 3px 0 0; font-size: 12.5px; color: var(--muted); }
.cand__meta b { color: var(--ink-2); }
.cand__sum { margin: 6px 0 0; font-size: 13px; color: var(--ink-2); max-width: 80ch; }
.apanel .tabs { margin-left: auto; }
@media (max-width: 760px) { .cand { grid-template-columns: 64px 1fr; } .cand .row-actions { grid-column: 1 / -1; } .rgroup > header, .rep { flex-direction: column; align-items: flex-start; } }
