:root {
  --bg: #f6f7f9; --surface: #fff; --surface2: #f1f3f6; --border: #e3e6eb; --border-strong: #d3d8df;
  --text: #16191f; --muted: #6b7280; --accent: #2563eb; --accent-soft: #e8efff;
  --watching: #f59e0b; --low: #b45309; --low-bg: #fef3c7; --danger: #dc2626; --danger-bg: #fee2e2;
  --good: #16a34a; --radius: 12px; --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(16,24,40,.05), 0 1px 3px rgba(16,24,40,.06);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: var(--font); font-size: 15px; background: var(--bg); color: var(--text); line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.muted { color: var(--muted); }
.wrap { max-width: 1240px; margin: 0 auto; padding: 1.75rem 1.5rem 3rem; }
header.app-header { margin-bottom: 1rem; }
header h1 { margin: 0; font-size: 1.6rem; font-weight: 700; letter-spacing: -0.02em; }

.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--border); margin-bottom: 1.25rem; }
.tab { color: var(--muted); font-weight: 600; font-size: .95rem; padding: .6rem 1rem; border-bottom: 2px solid transparent; margin-bottom: -1px; border-radius: 8px 8px 0 0; }
.tab:hover { color: var(--text); background: var(--surface2); text-decoration: none; }
.tab-active, .tab-active:hover { color: var(--accent); border-bottom-color: var(--accent); background: transparent; }

.pills { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .9rem; }
.pill { display: inline-flex; align-items: center; padding: .38rem .95rem; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font-size: .875rem; font-weight: 500; transition: all .12s; }
.pill:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.pill-on, .pill-on:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.stats { color: var(--muted); font-size: .85rem; margin: 0 0 .75rem; }
.empty { background: var(--surface); border: 1px dashed var(--border-strong); border-radius: var(--radius); padding: 2.5rem 1rem; text-align: center; color: var(--muted); }

.table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow-x: auto; }
table.deals { width: 100%; border-collapse: collapse; min-width: 860px; }
table.deals th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; background: var(--surface2); padding: .65rem .8rem; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.deals td { padding: .8rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.deals tbody tr:last-child td { border-bottom: none; }
table.deals tbody tr:hover td { background: #fafbfc; }
td.title, th.title { width: 34%; min-width: 260px; }
td.title a { color: var(--text); font-weight: 600; }
td.title a:hover { color: var(--accent); }
td.price, .price { white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 600; }
.price[title] { cursor: help; border-bottom: 1px dotted var(--border-strong); }
.col-star { width: 44px; text-align: center; }
.col-meta { white-space: nowrap; }
.meta-stack { display: flex; flex-direction: column; gap: 1px; font-size: .84rem; }
.meta-stack span { white-space: nowrap; }
.meta-loc { color: var(--text); }
.meta-source, .meta-seen { color: var(--muted); }
.col-type { white-space: nowrap; }
.col-type .status { margin-left: .35rem; }
.col-open { white-space: nowrap; padding-right: 1.75rem !important; }
.col-hide { white-space: nowrap; padding-left: 1.75rem !important; border-left: 1px solid var(--border); text-align: center; min-width: 96px; }
.ext-link { font-weight: 600; font-size: .875rem; white-space: nowrap; }

.badge, .status { display: inline-block; font-size: .72rem; font-weight: 600; padding: .15rem .55rem; border-radius: 999px; background: var(--surface2); color: var(--muted); border: 1px solid var(--border); text-transform: capitalize; }
.badge-rv { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.badge-lawncare { background: #ecfccb; color: #3f6212; border-color: #d9f99d; }
.badge-low { background: var(--low-bg); color: var(--low); border-color: #fde68a; margin-left: .45rem; vertical-align: middle; text-transform: none; }
.status-hidden { background: #f3f4f6; color: #4b5563; }

.star-form, .hide-form { display: inline; margin: 0; }
.btn-star { background: none; border: none; font-size: 1.3rem; line-height: 1; cursor: pointer; color: #c4c9d2; padding: .2rem; }
.btn-star:hover { color: var(--watching); }
.btn-star.on { color: var(--watching); }
.btn-hide { font: inherit; font-size: .82rem; font-weight: 600; color: var(--danger); background: var(--surface); border: 1px solid #fecaca; border-radius: var(--radius-sm); padding: .32rem .8rem; cursor: pointer; white-space: nowrap; }
.btn-hide:hover { background: var(--danger-bg); }

.strength { display: inline-flex; align-items: flex-end; gap: 2px; margin-left: .5rem; height: 14px; vertical-align: middle; }
.strength i { display: block; width: 4px; background: #d1d5db; border-radius: 1px; }
.strength i:nth-child(1) { height: 6px; } .strength i:nth-child(2) { height: 10px; } .strength i:nth-child(3) { height: 14px; }
.strength i.on { background: var(--good); }

.back { display: inline-block; margin-bottom: .9rem; font-weight: 500; }
.detail-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.4rem; margin-bottom: 1rem; }
.detail-card h2 { margin: .5rem 0 .25rem; font-size: 1.35rem; letter-spacing: -0.01em; }
.detail-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.hide-slot { margin-left: auto; padding-left: 2rem; }
.meta-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .9rem 1.25rem; margin: 1.1rem 0 0; }
.meta-grid dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.meta-grid dd { margin: .15rem 0 0; }
.notes-box { background: var(--surface2); border-radius: var(--radius-sm); padding: .8rem 1rem; white-space: pre-wrap; font-size: .92rem; }
.history-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.history-table th, .history-table td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--border); }
.history-table th { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; }

/* Feeds */
.sources { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .6rem 1rem; margin-bottom: 1rem; box-shadow: var(--shadow); }
.sources summary { cursor: pointer; font-weight: 600; font-size: .9rem; color: var(--muted); }
.source-list { list-style: none; margin: .6rem 0 .2rem; padding: 0; display: flex; flex-direction: column; gap: .45rem; }
.source { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; font-size: .9rem; }
.source a { font-weight: 600; color: var(--text); }
.source-state { font-size: .75rem; font-weight: 600; padding: .1rem .5rem; border-radius: 999px; background: #dcfce7; color: #166534; }
.source-error .source-state { background: var(--danger-bg); color: var(--danger); }
.source-pending .source-state, .source-inactive .source-state { background: var(--surface2); color: var(--muted); }
.plat, .cat, .badge-breaking { display: inline-block; font-size: .7rem; font-weight: 700; padding: .12rem .5rem; border-radius: 999px; letter-spacing: .02em; }
.plat { background: #111827; color: #fff; }
.plat-youtube { background: #ff0033; }
.plat-x { background: #000; }
.cat { background: var(--accent-soft); color: var(--accent); }
.cat-tesla-spacex { background: #ede9fe; color: #6d28d9; }
.cat-ai-si { background: #e0f2fe; color: #0369a1; }
.cat-macro-markets { background: #dcfce7; color: #15803d; }
.cat-world-events { background: #ffedd5; color: #c2410c; }
.badge-breaking { background: var(--danger); color: #fff; text-transform: uppercase; }
.feed-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1rem; }
.feed-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: box-shadow .15s, transform .15s; }
.feed-card:hover { box-shadow: 0 6px 18px rgba(16,24,40,.09); transform: translateY(-1px); }
.feed-card.is-breaking { border-color: #fca5a5; }
.feed-thumb { display: block; aspect-ratio: 16 / 9; background: var(--surface2); overflow: hidden; }
.feed-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.feed-thumb-empty { display: flex; align-items: center; justify-content: center; color: var(--muted); font-weight: 700; }
.feed-body { padding: .85rem 1rem 1rem; display: flex; flex-direction: column; gap: .4rem; flex: 1; }
.feed-tags { display: flex; flex-wrap: wrap; gap: .35rem; }
.feed-title { margin: 0; font-size: 1rem; line-height: 1.35; }
.feed-title a { color: var(--text); }
.feed-title a:hover { color: var(--accent); }
.feed-meta { font-size: .82rem; color: var(--muted); display: flex; gap: .35rem; }
.feed-author { font-weight: 600; color: var(--text); }
.feed-summary { margin: .2rem 0 0; font-size: .9rem; background: var(--surface2); border-left: 3px solid var(--accent); padding: .5rem .7rem; border-radius: 4px; }
.feed-open { margin-top: auto; padding-top: .3rem; font-size: .85rem; font-weight: 600; }

@media (max-width: 720px) {
  .wrap { padding: 1rem .75rem 2rem; }
  header h1 { font-size: 1.3rem; }
  .feed-list { grid-template-columns: 1fr; }
  .tab { padding: .55rem .8rem; }
}
.cat-food { background: #fce7f3; color: #be185d; }
.feed-ai { margin-top: .2rem; background: var(--surface2); border-radius: 6px; padding: .45rem .7rem; font-size: .88rem; }
.feed-ai summary { cursor: pointer; font-weight: 600; color: var(--accent); font-size: .8rem; }
.feed-ai-body { white-space: pre-wrap; margin-top: .4rem; }
/* Vertical feed */
.feed-col { max-width: 640px; margin: 0 auto; }
.fi-list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.fi { border-bottom: 1px solid var(--border); }
.fi:last-child { border-bottom: none; }
.fi.is-breaking { box-shadow: inset 3px 0 0 var(--danger); }
.fi-post { display: flex; gap: .75rem; padding: .9rem 1rem; }
.fi-post:hover, .fi-yt:hover { background: #fafbfc; }
.fi-avatar { width: 44px; height: 44px; border-radius: 50%; flex: 0 0 44px; object-fit: cover; background: var(--surface2); }
.fi-initial { display: flex; align-items: center; justify-content: center; font-weight: 700; color: #fff; background: #6366f1; font-size: 1.1rem; }
.fi-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .35rem; }
.fi-head, .fi-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; font-size: .88rem; color: var(--muted); }
.fi-name { font-weight: 700; color: var(--text); }
.fi-handle { color: var(--muted); }
.fi-head .plat { margin-left: auto; }
.fi-meta .cat, .fi-meta .badge-breaking { margin-left: .25rem; }
.fi-text { white-space: pre-wrap; word-wrap: break-word; overflow-wrap: anywhere; font-size: .95rem; line-height: 1.45; }
.fi-tags { display: flex; gap: .35rem; flex-wrap: wrap; }
.fi-yt { padding: 1rem; }
.fi-thumb { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: var(--surface2); margin-bottom: .65rem; }
.fi-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fi-thumb .plat { position: absolute; left: .5rem; top: .5rem; }
.fi-title { margin: 0; font-size: 1.02rem; line-height: 1.35; }
.fi-title a { color: var(--text); }
.fi-actions { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: .15rem; font-size: .85rem; font-weight: 600; }
.fi-hide { margin: 0 0 0 2.5rem; }
.fi-hide button { font: inherit; font-size: .78rem; color: var(--muted); background: none; border: 1px solid var(--border); border-radius: 999px; padding: .15rem .7rem; cursor: pointer; }
.fi-hide button:hover { color: var(--danger); border-color: #fecaca; background: var(--danger-bg); }
@media (max-width: 720px) {
  .fi-list { border-radius: 0; border-left: none; border-right: none; margin: 0 -.75rem; }
  .fi-post { padding: .8rem .75rem; } .fi-yt { padding: .8rem .75rem; }
  .fi-avatar { width: 38px; height: 38px; flex-basis: 38px; }
}
/* ---- Native-style feed (X / YouTube) ---- */
.fi-list { padding: 0; }
.xp, .yt { position: relative; border-bottom: 1px solid var(--border); }
.xp:last-child, .yt:last-child { border-bottom: none; }
.fi-cover { position: absolute; inset: 0; z-index: 0; }
.xp a:not(.fi-cover), .yt a:not(.fi-cover), .fi-x, .feed-ai, .x-quote, .x-card { position: relative; z-index: 1; }
.xp:hover, .yt:hover { background: var(--hover); }
.is-breaking { box-shadow: inset 3px 0 0 var(--danger); }
.fi-x { position: absolute !important; top: .35rem; right: .4rem; margin: 0; z-index: 2 !important; }
.fi-x button { width: 28px; height: 28px; border-radius: 50%; border: none; background: transparent; color: var(--muted); font-size: 1.1rem; line-height: 1; cursor: pointer; opacity: .45; }
.xp:hover .fi-x button, .yt:hover .fi-x button { opacity: .9; }
.fi-x button:hover { background: var(--danger-bg); color: var(--danger); opacity: 1; }
/* X post */
.xp { display: flex; gap: .7rem; padding: .75rem 2.4rem .6rem 1rem; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
.x-avatar { width: 40px; height: 40px; border-radius: 50%; flex: 0 0 40px; object-fit: cover; position: relative; z-index: 1; }
.fi-initial { display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; }
.x-body { flex: 1; min-width: 0; }
.x-head { display: flex; align-items: center; gap: .25rem; font-size: 15px; line-height: 20px; color: var(--muted); white-space: nowrap; overflow: hidden; }
.x-name { font-weight: 700; color: var(--text); overflow: hidden; text-overflow: ellipsis; }
.x-handle { overflow: hidden; text-overflow: ellipsis; }
.fi-verified { width: 18px; height: 18px; fill: #1d9bf0; flex: 0 0 18px; }
.x-text { font-size: 15px; line-height: 20px; white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 2px; color: var(--text); }
.fi-inline { color: #1d9bf0; }
.x-media { margin-top: .6rem; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
.x-media img { width: 100%; display: block; max-height: 510px; object-fit: cover; }
.x-card { display: block; margin-top: .6rem; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; color: var(--text); text-decoration: none !important; }
.x-card img { width: 100%; aspect-ratio: 1.91 / 1; object-fit: cover; display: block; }
.x-card-body { padding: .55rem .8rem; display: flex; flex-direction: column; font-size: 14px; }
.x-card-host { color: var(--muted); } .x-card-title { color: var(--text); }
.x-quote { display: block; margin-top: .6rem; border: 1px solid var(--border); border-radius: 16px; padding: .6rem .8rem; color: var(--text); text-decoration: none !important; }
.x-qtext { font-size: 15px; line-height: 20px; white-space: pre-wrap; margin-top: 2px; }
.x-actions { display: flex; justify-content: space-between; max-width: 425px; margin-top: .5rem; color: var(--muted); font-size: 13px; }
.x-act { display: inline-flex; align-items: center; gap: .3rem; min-width: 3.5rem; }
.x-act svg { width: 18px; height: 18px; fill: currentColor; }
.xp .fi-tags { margin-top: .4rem; }
/* YouTube card */
.yt { padding: .9rem 1rem 1rem; }
.yt-thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: var(--surface2); }
.yt-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.yt-dur { position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,.8); color: #fff; font-size: 12px; font-weight: 600; padding: 1px 5px; border-radius: 4px; }
.yt-row { display: flex; gap: .75rem; margin-top: .7rem; }
.yt-avatar { width: 36px; height: 36px; border-radius: 50%; flex: 0 0 36px; object-fit: cover; font-size: .95rem; }
.yt-text { min-width: 0; }
.yt-title { margin: 0; font-size: 16px; line-height: 22px; font-weight: 600; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.yt-meta { color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.yt .fi-tags { margin-top: .35rem; }
.yt-summary { margin: .55rem 0 0 calc(36px + .75rem); }
.fi-more { display: block; text-align: center; margin: 1rem auto; padding: .6rem 1.2rem; border: 1px solid var(--border-strong); border-radius: 999px; width: max-content; font-weight: 600; background: var(--surface); }
:root { --hover: rgba(0,0,0,.025); }
@media (max-width: 720px) {
  .xp { padding: .7rem 2.2rem .55rem .75rem; } .yt { padding: .75rem .75rem .9rem; }
  .yt-thumb { border-radius: 10px; }
}
/* Dark mode (whole site) */
@media (prefers-color-scheme: dark) {
  :root { --bg: #000; --surface: #0f0f0f; --surface2: #1c1f23; --border: #2f3336; --border-strong: #3e4144; --text: #e7e9ea;
    --muted: #8b98a5; --accent: #1d9bf0; --accent-soft: #10273a; --danger-bg: #3a1214; --low-bg: #3a2a08; --hover: rgba(255,255,255,.03);
    --shadow: none; color-scheme: dark; }
  table.deals tbody tr:hover td { background: #16181c; }
  .badge, .status { border-color: var(--border); }
  .badge-rv { background: #0f2e1a; color: #86efac; border-color: #14532d; }
  .badge-lawncare { background: #1f2a0b; color: #bef264; border-color: #365314; }
  .cat { filter: brightness(.85) saturate(1.2); }
  .btn-hide { background: transparent; border-color: #7f1d1d; }
  .strength i { background: #3f3f46; }
  .pill-on, .pill-on:hover { color: #fff; }
  .plat-x { background: #333; }
}
/* Email newsletter card */
.em { position: relative; display: flex; gap: .7rem; padding: .8rem 2.4rem .7rem 1rem; border-bottom: 1px solid var(--border); }
.em:hover { background: var(--hover); }
.em-icon { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 50%; background: #fde68a; display: flex; align-items: center; justify-content: center; }
.em-icon svg { width: 22px; height: 22px; fill: #92400e; }
.em-tag { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; background: var(--surface2); border-radius: 4px; padding: 0 .35rem; color: var(--muted); }
.em-subject { font-weight: 700; font-size: 15.5px; line-height: 21px; margin-top: 2px; color: var(--text); }
.em-summary { font-size: 14.5px; line-height: 20px; color: var(--text); margin-top: .25rem; white-space: pre-wrap; }
.em .fi-tags { margin-top: .4rem; }
.em-read { display: inline-block; margin-top: .4rem; font-weight: 600; font-size: .88rem; position: relative; z-index: 1; }
/* Digest */
.dg { max-width: 680px; margin: 0 auto; }
.dg-date { margin: .25rem 0 .15rem; font-size: 1.35rem; letter-spacing: -0.01em; }
.dg-nav { display: flex; justify-content: space-between; align-items: center; margin: .25rem 0 .75rem; font-weight: 600; font-size: .9rem; }
.dg-sec { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .6rem 1rem .4rem; margin-bottom: 1rem; }
.dg-sec h2 { font-size: 1rem; margin: .2rem 0 .4rem; display: flex; align-items: center; gap: .5rem; }
.dg-n { font-size: .75rem; color: var(--muted); background: var(--surface2); border-radius: 999px; padding: 0 .5rem; font-weight: 600; }
.dg-breaking { border-color: #fca5a5; }
.dg-breaking h2 { color: var(--danger); }
.dg-sec ul { list-style: none; margin: 0; padding: 0; }
.dg-sec li { padding: .55rem 0; border-top: 1px solid var(--border); font-size: .95rem; line-height: 1.45; }
.dg-sec li:first-child { border-top: none; }
.dg-sec li a { color: var(--text); font-weight: 600; }
.dg-by { color: var(--muted); font-size: .85rem; }
.dg-kind { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: .05rem .4rem; border-radius: 4px; background: var(--surface2); color: var(--muted); vertical-align: 1px; }
.dg-youtube { background: #ff0033; color: #fff; } .dg-x { background: #111; color: #fff; } .dg-email { background: #fde68a; color: #92400e; }
.dg-note { color: var(--muted); font-size: .88rem; margin-top: .15rem; }
.dg-sum { margin-top: .2rem; font-size: .88rem; }
.dg-sum summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: .8rem; }
.dg-sum div { white-space: pre-wrap; margin-top: .3rem; color: var(--text); }
@media (prefers-color-scheme: dark) { .em-icon { background: #3a2a08; } .em-icon svg { fill: #fbbf24; } .dg-x { background: #333; } .dg-email { background: #3a2a08; color: #fbbf24; } }
/* ---- Deals v2: triage, thumbs, sortable, mobile cards ---- */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.pill-n { margin-left: .4rem; font-size: .75rem; opacity: .75; font-variant-numeric: tabular-nums; }
.pills-cat { margin-top: -.3rem; }
.pill-sm { padding: .25rem .75rem; font-size: .8rem; }
.d-search { display: flex; gap: .4rem; margin: 0 0 .7rem; flex-wrap: wrap; }
.d-search input[type=search] { flex: 1 1 220px; min-width: 0; font: inherit; padding: .45rem .7rem; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface); color: var(--text); }
.d-search select, .d-search button { font: inherit; font-size: .88rem; padding: .4rem .6rem; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface); color: var(--text); }
.d-search button { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; padding: .4rem .9rem; cursor: pointer; }
.d-search select { display: none; }
table.deals2 { min-width: 0; }
table.deals2 th a.th-sort { color: inherit; text-decoration: none; }
table.deals2 th a.th-sort.on { color: var(--accent); }
.c-thumbs { width: 44px; text-align: center; padding-left: .5rem !important; padding-right: .25rem !important; }
.thumbs { display: flex; flex-direction: column; gap: .3rem; align-items: center; margin: 0; }
.thumb { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.thumb svg { width: 16px; height: 16px; fill: currentColor; }
.thumb-up:hover, .thumb-up.lit { color: #fff; background: var(--good); border-color: var(--good); }
.thumb-down:hover, .thumb-down.lit { color: #fff; background: var(--danger); border-color: var(--danger); }
.thumb:not(.lit):hover { opacity: .8; }
.c-title { min-width: 280px; }
.d-row { display: flex; gap: .7rem; align-items: flex-start; }
.d-img { width: 64px; height: 48px; flex: 0 0 64px; border-radius: 8px; object-fit: cover; background: var(--surface2); }
.d-img-ph { display: inline-flex; align-items: center; justify-content: center; font-size: 1.4rem; }
.d-main { min-width: 0; }
.d-title { color: var(--text) !important; font-weight: 600; }
.d-title:hover { color: var(--accent) !important; }
.d-info { display: inline-flex; align-items: center; justify-content: center; margin-left: .3rem; width: 26px; height: 26px; border-radius: 50%; color: var(--muted); font-size: 1rem; vertical-align: middle; }
.d-info:hover { background: var(--surface2); color: var(--accent); text-decoration: none; }
.d-badges { display: flex; gap: .3rem; flex-wrap: wrap; margin-top: .2rem; }
.d-badges .badge-low { margin-left: 0; }
.badge-drop { background: #dcfce7; color: #166534; border-color: #bbf7d0; text-transform: none; }
.badge-stale { text-transform: none; }
.badge-other { text-transform: capitalize; }
.mini-hist { font-size: .78rem; color: var(--muted); margin-top: .2rem; font-variant-numeric: tabular-nums; }
.c-price { white-space: nowrap; font-variant-numeric: tabular-nums; }
.p-usd { font-weight: 700; display: inline; }
.p-sub { font-size: .76rem; color: var(--muted); font-weight: 400; }
.c-dist { white-space: nowrap; font-variant-numeric: tabular-nums; }
.c-meta { white-space: nowrap; }
tr.stale td { opacity: .5; }
tr.stale td.c-thumbs { opacity: 1; }
.detail-top { display: flex; align-items: center; gap: .8rem; }
.detail-top .thumbs { flex-direction: row; }
.detail-img { width: 100%; max-height: 360px; object-fit: cover; border-radius: 10px; margin-top: .8rem; }
.detail-card h3 { margin: 1.2rem 0 .4rem; font-size: 1rem; }
table.kv { width: 100%; border-collapse: collapse; font-size: .88rem; }
table.kv th { text-align: left; color: var(--muted); font-weight: 600; width: 140px; padding: .3rem .5rem .3rem 0; vertical-align: top; }
table.kv td { padding: .3rem 0; overflow-wrap: anywhere; border-bottom: 1px solid var(--border); }
pre.raw { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .78rem; background: var(--surface2); padding: .6rem; border-radius: 8px; }
@media (prefers-color-scheme: dark) { .badge-drop { background: #0f2e1a; color: #86efac; border-color: #14532d; } }
@media (max-width: 720px) {
  .d-search select { display: inline-block; }
  table.deals2, table.deals2 tbody { display: block; }
  table.deals2 thead { display: none; }
  table.deals2 tr { display: grid; grid-template-columns: 44px 1fr auto; grid-template-areas: "th ti pr" "th me di"; gap: .15rem .6rem; padding: .7rem .6rem; border-bottom: 1px solid var(--border); }
  table.deals2 td { display: block; padding: 0 !important; border: none !important; min-width: 0; }
  table.deals2 tbody tr:hover td { background: transparent; }
  .c-thumbs { grid-area: th; width: auto; }
  .c-title { grid-area: ti; min-width: 0; }
  .c-price { grid-area: pr; text-align: right; }
  .c-meta { grid-area: me; white-space: normal; }
  .c-meta .meta-stack { flex-direction: row; flex-wrap: wrap; gap: .1rem .5rem; font-size: .78rem; }
  .c-dist { grid-area: di; text-align: right; font-size: .82rem; color: var(--muted); }
  .c-cat { display: none !important; }
  .d-img { width: 52px; height: 40px; flex-basis: 52px; }
  .c-price .strength { display: none; }
  .table-wrap { overflow-x: visible; }
  .thumb { width: 36px; height: 36px; }
}
/* ---- Feeds v2: tabs, unread, category themes, action bar, watch list ---- */
:root { --c-breaking: #dc2626; --c-ai-si: #0284c7; --c-tesla-spacex: #7c3aed; --c-macro-markets: #16a34a; --c-world-events: #ea580c; --c-food: #db2777; --c-watchlist: #64748b; --c-saved: #ca8a04; }
.ftabs { display: flex; gap: .35rem; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding: .1rem 0 .6rem; margin-bottom: .4rem; }
.ftabs::-webkit-scrollbar { display: none; }
.ft { --c: var(--accent); flex: 0 0 auto; display: inline-flex; align-items: center; gap: .35rem; padding: .42rem .85rem; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font-size: .88rem; font-weight: 600; white-space: nowrap; }
.ft:hover { text-decoration: none; border-color: var(--c); color: var(--c); }
.ft-on, .ft-on:hover { background: var(--c); border-color: var(--c); color: #fff; }
.ft-n { min-width: 1.35rem; padding: 0 .38rem; border-radius: 999px; background: var(--c); color: #fff; font-size: .72rem; font-weight: 700; text-align: center; line-height: 1.35rem; }
.ft-on .ft-n { background: rgba(255,255,255,.25); }
.ft-breaking { --c: var(--c-breaking); } .ft-ai-si { --c: var(--c-ai-si); } .ft-tesla-spacex { --c: var(--c-tesla-spacex); }
.ft-macro-markets { --c: var(--c-macro-markets); } .ft-world-events { --c: var(--c-world-events); } .ft-food { --c: var(--c-food); }
.ft-watchlist { --c: var(--c-watchlist); } .ft-saved { --c: var(--c-saved); }
.ft-breaking:not(.ft-on) { border-color: #fca5a5; color: var(--c-breaking); }
.ftheme-breaking .fi-list { border-color: #fca5a5; box-shadow: 0 0 0 1px #fecaca; }
.ftool { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-bottom: .6rem; }
.ftool .stats { margin: 0; }
.seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 999px; overflow: hidden; }
.seg-b { padding: .28rem .8rem; font-size: .82rem; font-weight: 600; color: var(--muted); }
.seg-b:hover { text-decoration: none; color: var(--text); }
.seg-b.on { background: var(--text); color: var(--surface); }
/* category accent on each card */
.fi-item { --fc: var(--border-strong); border-left: 3px solid var(--fc); }
.fc-ai-si { --fc: var(--c-ai-si); } .fc-tesla-spacex { --fc: var(--c-tesla-spacex); } .fc-macro-markets { --fc: var(--c-macro-markets); }
.fc-world-events { --fc: var(--c-world-events); } .fc-food { --fc: var(--c-food); }
.fi-item.is-breaking { --fc: var(--c-breaking); box-shadow: none; background: linear-gradient(90deg, rgba(220,38,38,.06), transparent 60%); }
.fi-item.unread::before { content: ""; position: absolute; left: 6px; top: 14px; width: 7px; height: 7px; border-radius: 50%; background: var(--fc); z-index: 2; }
.fi-item.read { opacity: .78; }
.fi-item.read:hover { opacity: 1; }
.ftheme-breaking .badge-breaking { animation: none; }
.badge-breaking { box-shadow: 0 0 0 2px rgba(220,38,38,.18); }
/* action bar */
.fi-bar { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; margin-top: .5rem; }
.fi-bar form { margin: 0; }
.yt .fi-bar { margin-left: calc(36px + .75rem); }
.fb { font: inherit; font-size: .78rem; font-weight: 600; color: var(--muted); background: transparent; border: 1px solid var(--border); border-radius: 999px; padding: .22rem .65rem; cursor: pointer; list-style: none; white-space: nowrap; }
.fb::-webkit-details-marker { display: none; }
.fb:hover { color: var(--text); border-color: var(--border-strong); background: var(--surface2); }
.fb.on { color: var(--c-saved); border-color: var(--c-saved); }
.fb-mute { position: relative; }
.fb-mute[open] > summary { color: var(--text); background: var(--surface2); }
.fb-menu { position: absolute; z-index: 5; bottom: calc(100% + 4px); left: 0; display: flex; flex-direction: column; gap: 2px; min-width: 150px; padding: .4rem; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.15); }
.fb-menu span { font-size: .75rem; color: var(--muted); padding: .1rem .4rem .25rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fb-menu button { font: inherit; font-size: .85rem; text-align: left; background: none; border: none; padding: .35rem .5rem; border-radius: 6px; color: var(--text); cursor: pointer; }
.fb-menu button:hover { background: var(--surface2); }
.fi-cm { position: relative; z-index: 1; margin-top: .5rem; font-size: .88rem; background: var(--surface2); border-radius: 8px; padding: .45rem .65rem; }
.fi-cm summary { cursor: pointer; font-weight: 600; font-size: .8rem; color: var(--accent); }
.fi-cm-body { white-space: pre-wrap; margin-top: .3rem; }
.fi-cm-pending { color: var(--muted); }
.fi-cm-error { color: var(--danger); }
/* watch list */
.wl { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.wl-row { display: flex; align-items: center; gap: .75rem; padding: .65rem .9rem; border-bottom: 1px solid var(--border); }
.wl-row:last-child { border-bottom: none; }
.wl-row.is-muted .wl-main { opacity: .6; }
.wl-av { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 50%; object-fit: cover; }
.wl-main { flex: 1; min-width: 0; }
.wl-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wl-name a { color: var(--text); }
.wl-sub { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; font-size: .8rem; color: var(--muted); margin-top: .1rem; }
.wl-st { font-size: .7rem; font-weight: 700; padding: .05rem .45rem; border-radius: 999px; background: var(--surface2); }
.wl-ok { background: #dcfce7; color: #166534; } .wl-err { background: var(--danger-bg); color: var(--danger); cursor: help; }
.wl-ctl { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; justify-content: flex-end; }
.wl-ctl form { margin: 0; display: flex; gap: .3rem; }
.wl-ctl select { font: inherit; font-size: .8rem; border: 1px solid var(--border); border-radius: 999px; padding: .15rem .4rem; background: var(--surface); color: var(--text); }
.wl-muted { font-size: .78rem; font-weight: 600; color: var(--c-saved); }
@media (prefers-color-scheme: dark) {
  .wl-ok { background: #0f2e1a; color: #86efac; }
  .ftheme-breaking .fi-list { border-color: #7f1d1d; box-shadow: none; }
  .ft-breaking:not(.ft-on) { border-color: #7f1d1d; }
  .seg-b.on { background: #e7e9ea; color: #000; }
}
@media (max-width: 720px) {
  .ftabs { margin: 0 -.75rem .3rem; padding: .1rem .75rem .6rem; }
  .wl-row { flex-wrap: wrap; padding: .6rem .75rem; }
  .wl-ctl { width: 100%; justify-content: flex-start; padding-left: calc(40px + .75rem); }
  .yt .fi-bar { margin-left: 0; }
  .fb { padding: .3rem .7rem; }
}
.fi-list { overflow: visible; }
@media (min-width: 721px) { .ftabs { flex-wrap: wrap; overflow: visible; } }
