/* OpenVibe.Deals — readable, theme-token driven (openvibe-shared presets). No JavaScript needed. */
:root { color-scheme: dark; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg-primary, #0a0f1c); color: var(--text-primary, #e6edf7); font: 17px/1.65 var(--ov-font, 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif); }
a { color: var(--accent-light, #60a5fa); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid var(--accent, #3b82f6); outline-offset: 2px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; background: var(--bg-card, #131c2e); padding: 8px 12px; z-index: 10; }
.account-bar { max-width: 760px; margin: 0 auto; padding: 6px 16px 0; text-align: right; font-size: 14px; color: var(--text-secondary, #96a7c2); }
.page { max-width: 760px; margin: 0 auto; padding: 16px 16px 64px; min-height: 60vh; }
h1 { font-size: 2.1rem; line-height: 1.2; margin: 1.2rem 0 .6rem; }
h2 { font-size: 1.35rem; margin: 1.6rem 0 .5rem; }
.lede { color: var(--text-secondary, #96a7c2); font-size: 1.1rem; }
.meta, .byline, .empty { color: var(--text-muted, #7386a3); font-size: .9rem; }
.badge { display: inline-block; font-size: .75rem; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--border-light, #2c3d5c); color: var(--text-secondary); vertical-align: middle; }
.summary { margin: 6px 0; }
.tags a, .categories a { margin-right: 6px; }
.disclosure { border: 1px solid var(--warning, #f59e0b); border-radius: 8px; padding: 8px 12px; }
.sources ol { padding-left: 1.2rem; }
.ov-breadcrumbs ol { list-style: none; padding: 0; margin: 8px 0; display: flex; flex-wrap: wrap; gap: 6px; font-size: .9rem; }
.ov-breadcrumbs li + li::before { content: "›"; margin-right: 6px; color: var(--text-muted); }
.ov-pagination { display: flex; gap: 10px; flex-wrap: wrap; margin: 20px 0; }
.comments { margin-top: 40px; border-top: 1px solid var(--border, #1f2d47); }
.comment { padding: 10px 0; border-bottom: 1px solid var(--border, #1f2d47); }
.replies { margin-left: 22px; }
.notice { border-left: 3px solid var(--info, #38bdf8); padding: 6px 12px; background: var(--bg-card, #131c2e); }
.notice.error { border-color: var(--danger, #ef4444); }
.card { border: 1px solid var(--border, #1f2d47); border-radius: 10px; padding: 12px 16px; margin: 16px 0; background: var(--bg-card, #131c2e); }
label { display: block; margin: 10px 0 4px; font-weight: 600; font-size: .95rem; }
label input[type=checkbox] { margin-right: 6px; }
input, textarea, select { width: 100%; font: inherit; color: var(--text-primary); background: var(--bg-input, #0d1424); border: 1px solid var(--border-light, #2c3d5c); border-radius: 6px; padding: 8px 10px; }
input[type=checkbox] { width: auto; }
textarea { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 15px; }
button, .button { display: inline-block; margin-top: 10px; font: inherit; font-weight: 600; background: var(--accent-strong, var(--accent, #3472d8)); color: var(--on-accent-strong, var(--on-accent, #fff)); border: 0; border-radius: 6px; padding: 8px 16px; cursor: pointer; text-decoration: none; }
button.danger { background: var(--danger, #ef4444); }
form.inline { display: inline; }
form.inline button { margin: 0 0 0 8px; padding: 2px 10px; font-size: .85rem; }
.actions form { margin: 10px 0; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media (max-width: 600px) { h1 { font-size: 1.7rem; } body { font-size: 16px; } }
/* Deals */
.page { max-width: 900px; }
.account-bar { max-width: 900px; }
.sr { position: absolute; left: -9999px; }
.tabs { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 8px; }
.tabs [aria-current] { font-weight: 700; }
.tabs form.search { margin-left: auto; display: flex; gap: 6px; }
.tabs form.search input { width: 200px; }
.tabs form.search button { margin: 0; }
.deal-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 10px; }
.deal-item { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 14px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--border, #1f2d47); background: var(--bg-card, #131c2e); transition: border-color .15s, transform .15s; }
.deal-item:hover { border-color: color-mix(in srgb, var(--accent, #3b82f6) 55%, var(--border, #1f2d47)); transform: translateY(-1px); }
.deal-item .score { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: 56px; border-radius: 12px; font-weight: 800; font-size: 1rem; color: var(--text-secondary, #96a7c2); background: var(--bg-secondary, #0f1729); border: 1px solid var(--border, #1f2d47); }
.deal-item .score span { font-size: .7rem; line-height: 1; color: var(--text-muted, #7386a3); }
.deal-item .score.up { color: var(--success, #22c55e); border-color: color-mix(in srgb, var(--success, #22c55e) 40%, transparent); }
.deal-item .score.up span { color: var(--success, #22c55e); }
.deal-item .score.down { color: var(--warning, #f59e0b); }
.deal-body { min-width: 0; }
.deal-title { margin: 0 0 6px; font-size: 1.05rem; line-height: 1.35; overflow-wrap: anywhere; }
.deal-title a { color: var(--text-primary); text-decoration: none; }
.deal-title a:hover { color: var(--accent-light, #60a5fa); text-decoration: underline; text-underline-offset: 3px; }
.price-line { margin: 0 0 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: .9rem; }
.price { font-size: 1.05rem; color: var(--warning, #f59e0b); }
.price.price-none { font-size: .8rem; font-weight: 500; color: var(--text-muted, #7386a3); }
.price-line .as-of { font-size: .8rem; }
.attribution { margin: 0; font-size: .82rem; color: var(--text-muted, #7386a3); }
.deal-item .meta { margin: 2px 0 0; font-size: .82rem; }
@media (max-width: 600px) { .deal-item { grid-template-columns: 44px minmax(0, 1fr); padding: 12px; } .deal-item .score { height: 48px; } }
@media (prefers-reduced-motion: reduce) { .deal-item { transition: none; } }
.badge.fresh { border-color: var(--success, #22c55e); color: var(--success, #22c55e); }
.badge.stale, .badge.expired { border-color: var(--warning, #f59e0b); color: var(--warning, #f59e0b); }
.stale-notice { border-color: var(--warning, #f59e0b); }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; }
.facts dt { color: var(--text-muted, #7386a3); }
.facts dd { margin: 0; }
table.obs, table.compare { width: 100%; border-collapse: collapse; font-size: .92rem; display: block; overflow-x: auto; }
table.obs th, table.obs td, table.compare th, table.compare td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--border, #1f2d47); vertical-align: top; }
table.obs caption, table.compare caption { text-align: left; color: var(--text-muted, #7386a3); font-size: .85rem; padding: 4px 0; }
tr.removed { opacity: .6; }
.vote button[aria-pressed="true"] { outline: 2px solid var(--on-accent, #fff); }
.mod form { margin: 10px 0; }
details.card summary { cursor: pointer; font-weight: 600; }
code { overflow-wrap: anywhere; }
@media (max-width: 600px) { .tabs form.search { margin-left: 0; width: 100%; } .tabs form.search input { width: 100%; } .deal-item .score { min-width: 36px; } }

/* The front page's showcase sections share the page's gutter, so the hero, the cards and the list line up. */
.page { max-width: 1080px; }
.account-bar { max-width: 1080px; }
.page .sc-hero, .page .sc-sec, .page .sc-cta { padding-left: 0; padding-right: 0; }
/* Crowdfunding (server/http/crowdfunding.js) */
.cf-search { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 8px; }
.cf-search input { flex: 1 1 260px; width: auto; }
.cf-search button { margin: 0; }
.cf-groups, .cf-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.cf-grid { list-style: none; padding: 0; }
.cf-group, .cf-campaign { margin: 0; }
.cf-group h3, .cf-campaign h3 { margin: 0 0 4px; font-size: 1.05rem; }
.cf-links { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.cf-links .button { margin: 0; padding: 6px 12px; }
.seller-list { columns: 3 220px; padding-left: 1.1rem; }
.seller-list li { margin: 4px 0; break-inside: avoid; }
/* The front page (server/render/home.js): stats beside the hero, then sections of deal cards, chips and questions. */
.hm-hero { padding-top: 32px; }
.hm-search { display: flex; gap: 8px; margin-top: 20px; max-width: 560px; }
.hm-search input { flex: 1 1 auto; min-width: 0; width: auto; }
.hm-search button { margin: 0; }
.hm-stats { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hm-stats li { min-width: 0; }
.hm-stats a { display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--border, #1f2d47); background: var(--bg-secondary, #0f1729); color: inherit; text-decoration: none; transition: border-color .15s; }
.hm-stats a:hover, .hm-stats a:focus-visible { border-color: var(--accent, #3b82f6); }
.hm-stats b { font-size: 1.6rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.hm-stats span { font-size: .85rem; line-height: 1.35; color: var(--text-secondary, #96a7c2); }
.hm-sec { margin-top: 48px; }
.hm-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.hm-head h2 { margin: 0; font-size: clamp(1.3rem, 2.4vw, 1.75rem); letter-spacing: -.01em; }
.hm-more { font-weight: 600; font-size: .95rem; text-decoration: none; white-space: nowrap; }
.hm-more:hover { text-decoration: underline; text-underline-offset: 3px; }
.hm-lede { margin: 4px 0 14px; color: var(--text-secondary, #96a7c2); font-size: .98rem; }
.hm-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); }
.hm-card { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--border, #1f2d47); background: var(--bg-card, #131c2e); transition: border-color .15s; }
.hm-card:hover { border-color: color-mix(in srgb, var(--accent, #3b82f6) 55%, var(--border, #1f2d47)); }
.hm-card h3 { margin: 0; font-size: 1rem; line-height: 1.35; overflow-wrap: anywhere; }
.hm-card h3 a { color: var(--text-primary, #e6edf7); text-decoration: none; }
.hm-card h3 a:hover { color: var(--accent-light, #60a5fa); text-decoration: underline; text-underline-offset: 3px; }
.hm-price { margin: auto 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.hm-card .price { font-size: 1.15rem; }
.hm-card .badge { font-size: .72rem; }
.hm-ends { margin: 0; font-size: .85rem; font-weight: 600; }
.hm-ends .meta { font-weight: 400; font-size: .78rem; }
.hm-where { margin: 0; font-size: .82rem; overflow-wrap: anywhere; }
.hm-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.hm-chips li { min-width: 0; max-width: 100%; }
.hm-chips a { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border-light, #2c3d5c); background: var(--bg-secondary, #0f1729); color: var(--text-primary, #e6edf7); text-decoration: none; font-size: .92rem; overflow-wrap: anywhere; }
.hm-chips a:hover, .hm-chips a:focus-visible { border-color: var(--accent, #3b82f6); }
.hm-n { font-size: .78rem; font-weight: 700; color: var(--text-muted, #7386a3); font-variant-numeric: tabular-nums; }
.hm-cf { margin: 0; }
.hm-faq { display: grid; gap: 8px; }
.hm-faq details { border: 1px solid var(--border, #1f2d47); border-radius: 12px; background: var(--bg-card, #131c2e); padding: 0 16px; }
.hm-faq summary { cursor: pointer; font-weight: 600; padding: 12px 0; }
.hm-faq p { margin: 0 0 14px; color: var(--text-secondary, #96a7c2); }
.hm-empty { margin-top: 24px; }
@media (max-width: 600px) { .hm-search { flex-wrap: wrap; } .hm-search button { width: 100%; } .hm-stats b { font-size: 1.3rem; } .hm-stats a { padding: 12px; } }
@media (prefers-reduced-motion: reduce) { .hm-card, .hm-stats a { transition: none; } }
.hm-card .price-none { font-size: .88rem; font-weight: 500; }
/* A phone shows four cards a section (all eight stay in the page for crawlers and the "see all" link has the rest). */
@media (max-width: 600px) { .hm-cards > li:nth-child(n+5) { display: none; } }
