/* OpenVibe.Coupons — 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: 16px/1.6 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: 820px; margin: 0 auto; padding: 6px 16px 0; text-align: right; font-size: 14px; color: var(--text-secondary, #96a7c2); }
.page { max-width: 820px; margin: 0 auto; padding: 16px 16px 64px; min-height: 60vh; }
h1 { font-size: 1.9rem; line-height: 1.2; margin: 1.1rem 0 .6rem; }
h2 { font-size: 1.3rem; margin: 1.6rem 0 .5rem; }
h3 { font-size: 1.1rem; margin: 0 0 .4rem; }
.lede { color: var(--text-secondary, #96a7c2); font-size: 1.05rem; }
.meta, .empty { color: var(--text-muted, #7386a3); font-size: .9rem; margin: .25rem 0; }
.unknown { font-style: italic; color: var(--text-secondary, #96a7c2); }
.coupon { border: 1px solid var(--border, #1f2d47); border-radius: 10px; padding: 12px 16px; margin: 12px 0; background: var(--bg-card, #131c2e); }
.coupon .coupon-title { font-size: 1.35rem; line-height: 1.3; margin: 4px 0 10px; }
.code-line { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: .3rem 0; }
.code-line .label { color: var(--text-muted, #7386a3); font-size: .85rem; }
.code { font: 600 1.15rem/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; padding: 4px 10px; border: 1px dashed var(--accent, #3b82f6); border-radius: 6px; user-select: all; -webkit-user-select: all; word-break: break-all; }
.status { display: inline-block; font-size: .78rem; padding: 1px 9px; border-radius: 999px; border: 1px solid var(--border-light, #2c3d5c); }
.status-reported_working { border-color: var(--success, #22c55e); color: var(--success-text, var(--success, #22c55e)); }
.status-reported_failed { border-color: var(--error, #ef4444); color: var(--error-text, var(--error, #ef4444)); }
.status-expired, .status-disabled { opacity: .8; }
.restrictions, .hints { margin: .4rem 0; padding-left: 1.2rem; font-size: .95rem; }
.report { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
form.inline { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
button { font: inherit; padding: 5px 12px; border-radius: 6px; border: 1px solid var(--border-light, #2c3d5c); background: var(--bg-tertiary, #172238); color: var(--text-primary, #e6edf7); cursor: pointer; }
button:hover { border-color: var(--accent, #3b82f6); }
input, select, textarea { font: inherit; padding: 5px 8px; border-radius: 6px; border: 1px solid var(--border-light, #2c3d5c); background: var(--bg-secondary, #0f1729); color: var(--text-primary, #e6edf7); max-width: 100%; }
.form label { display: block; margin: 8px 0; }
.form fieldset { border: 1px solid var(--border, #1f2d47); border-radius: 8px; margin: 12px 0; }
.search { margin: 12px 0; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* The front page under the showcase: one column, the showcase's own gutter dropped (the page has one). */
.page .sc-hero, .page .sc-sec { padding-left: 0; padding-right: 0; }
.page .sc-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.page .sc-sec + .sc-sec, .page section.sc-sec { margin-top: 28px; }
.find .search { margin: 0; flex-wrap: nowrap; }
.find .search input { flex: 1; min-width: 0; padding: 10px 12px; font-size: 1rem; border-radius: 10px; }
.find .search button { padding: 10px 18px; border-radius: 10px; }
button.primary { background: var(--accent-strong, #2563eb); border-color: var(--accent-strong, #2563eb); color: var(--on-accent-strong, #fff); font-weight: 600; }
.offers { list-style: none; padding: 0; margin: 0; }
.offers li { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, .1)); }
.offer-title { font-weight: 600; text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.offer-title:hover { text-decoration: underline; }
.offer-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: .9rem; color: var(--text-secondary, #96a7c2); }
.chips { list-style: none; padding: 0; margin: 8px 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border: 1px solid var(--border-light, #2c3d5c); border-radius: 999px; background: var(--bg-card, #131c2e); color: var(--text-primary, #e6edf7); text-decoration: none; font-size: .95rem; }
.chip:hover { border-color: var(--accent, #3b82f6); }
.chip-n { font-size: .78rem; font-weight: 700; padding: 0 7px; border-radius: 999px; background: var(--accent-strong, #2563eb); color: var(--on-accent-strong, #fff); }
.quiet { margin-top: 8px; }
.quiet summary { cursor: pointer; color: var(--text-secondary, #96a7c2); }
.merchant-list, .recent, .ended, .history { padding-left: 1.2rem; }
.notice { border-left: 3px solid var(--info, #38bdf8); padding: 6px 12px; background: var(--bg-card, #131c2e); }
.errors { border-left: 3px solid var(--error, #ef4444); padding: 6px 12px; background: var(--bg-card, #131c2e); }
.disclosure { border: 1px solid var(--warning, #f59e0b); border-radius: 8px; padding: 6px 10px; font-size: .9rem; }
.token-once { border: 1px solid var(--warning, #f59e0b); border-radius: 8px; padding: 8px 14px; }
.token { user-select: all; -webkit-user-select: all; word-break: break-all; font-size: 1rem; }
.installs { border-collapse: collapse; width: 100%; font-size: .92rem; }
.installs th, .installs td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--border, #1f2d47); }
.formula { font-family: ui-monospace, monospace; }
.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); }
@media (max-width: 600px) { .installs thead { display: none; } .installs td { display: block; border: 0; padding: 2px 0; } .installs tr { display: block; border-bottom: 1px solid var(--border, #1f2d47); padding: 6px 0; } }
/* The front page (server/render/home.js): wider, with the numbers beside the hero, code tickets, and questions. */
.home .page, .home .account-bar { max-width: 1080px; }
.cp-hero { padding-top: 28px; }
.cp-search { margin: 20px 0 0; flex-wrap: nowrap; max-width: 560px; }
.cp-search input { flex: 1; min-width: 0; padding: 10px 12px; font-size: 1rem; border-radius: 10px; }
.cp-search button { padding: 10px 18px; border-radius: 10px; }
.cp-stats { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cp-stats li { min-width: 0; }
.cp-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; }
.cp-stats a:hover, .cp-stats a:focus-visible { border-color: var(--accent, #3b82f6); }
.cp-stats b { font-size: 1.6rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.cp-stats span { font-size: .85rem; line-height: 1.35; color: var(--text-secondary, #96a7c2); }
.page section.cp-sec { margin-top: 44px; }
.cp-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.cp-head h2 { margin: 0; font-size: clamp(1.3rem, 2.4vw, 1.75rem); letter-spacing: -.01em; }
.cp-more { font-weight: 600; font-size: .95rem; text-decoration: none; }
.cp-more:hover { text-decoration: underline; text-underline-offset: 3px; }
.cp-lede { margin: 4px 0 14px; color: var(--text-secondary, #96a7c2); }
.cp-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); }
.cp-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); }
.cp-card:hover { border-color: color-mix(in srgb, var(--accent, #3b82f6) 55%, var(--border, #1f2d47)); }
.cp-card p { margin: 0; }
.cp-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 8px; }
.cp-shop { font-weight: 700; text-decoration: none; overflow-wrap: anywhere; }
.cp-shop:hover { text-decoration: underline; }
.cp-code .code { display: inline-block; max-width: 100%; font-size: 1.2rem; letter-spacing: .04em; }
.cp-card h3 { margin: 0; font-size: .98rem; line-height: 1.4; font-weight: 600; overflow-wrap: anywhere; }
.cp-card h3 a { color: var(--text-primary, #e6edf7); text-decoration: none; }
.cp-card h3 a:hover { color: var(--accent-light, #60a5fa); text-decoration: underline; text-underline-offset: 3px; }
.cp-card .meta { font-size: .84rem; }
.cp-via { margin-top: auto !important; }
.cp-faq { display: grid; gap: 8px; }
.cp-faq details { border: 1px solid var(--border, #1f2d47); border-radius: 12px; background: var(--bg-card, #131c2e); padding: 0 16px; }
.cp-faq summary { cursor: pointer; font-weight: 600; padding: 12px 0; }
.cp-faq p { margin: 0 0 14px; color: var(--text-secondary, #96a7c2); }
.cp-empty { margin-top: 24px; }
@media (max-width: 600px) { .cp-search { flex-wrap: wrap; } .cp-search button { width: 100%; } .cp-stats b { font-size: 1.3rem; } .cp-stats a { padding: 12px; } .cp-cards > li:nth-child(n+5) { display: none; } }
@media (prefers-reduced-motion: reduce) { .cp-stats a { transition: none; } }
.home .page .sc-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
