:root {
  --bg: #0d0f0e;
  --panel: #151917;
  --panel-2: #1c211e;
  --line: #2a312d;
  --text: #e6ebe7;
  --muted: #8e9a93;
  --accent: #4ade80;
  --accent-ink: #062b14;
  --danger: #f87171;
  --radius: 10px;
  --pixel: 'Press Start 2P', monospace;
  --sans: 'Inter', system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 var(--sans);
  background-image:
    linear-gradient(rgba(74, 222, 128, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74, 222, 128, .04) 1px, transparent 1px);
  background-size: 32px 32px;
}
a { color: var(--accent); }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }

header.site {
  border-bottom: 1px solid var(--line);
  background: rgba(13, 15, 14, .85);
  backdrop-filter: blur(6px);
  position: sticky; top: 0; z-index: 5;
}
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 60px; }
.brand { font-family: var(--pixel); font-size: 13px; color: var(--accent); text-decoration: none; letter-spacing: .5px; }
.nav-link { color: var(--muted); text-decoration: none; font-size: 14px; }
.nav-link:hover { color: var(--text); }

.hero { padding: 56px 0 32px; }
.hero h1 { font-family: var(--pixel); font-size: clamp(18px, 4vw, 28px); line-height: 1.5; margin: 0 0 14px; }
.hero p { color: var(--muted); max-width: 560px; margin: 0 0 22px; }

.ip-box {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 8px 8px 8px 14px; max-width: 100%;
}
.ip-box code { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

button, .btn {
  font: 600 14px var(--sans);
  border: 1px solid var(--line); background: var(--panel-2); color: var(--text);
  padding: 8px 14px; border-radius: 8px; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
button:hover, .btn:hover { border-color: #3c4640; }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-primary:hover { background: #6ee79b; border-color: #6ee79b; }
.btn-danger { color: var(--danger); }
.btn-sm { padding: 5px 10px; font-size: 13px; }
button:disabled { opacity: .5; cursor: default; }

.grid { display: grid; gap: 16px; padding-bottom: 64px; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px;
}
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.card h2 { margin: 0 0 4px; font-size: 20px; }
.desc { color: var(--muted); margin: 6px 0 0; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.tag { font-size: 12px; padding: 2px 8px; border-radius: 99px; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); }
.tag.accent { color: var(--accent); border-color: rgba(74, 222, 128, .35); }
.dl-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.meta { font-size: 12px; color: var(--muted); }

details.changelog { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
details.changelog summary { cursor: pointer; color: var(--muted); font-size: 14px; }
.release { padding: 14px 0; border-bottom: 1px dashed var(--line); }
.release:last-child { border-bottom: 0; }
.release-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.release-head strong { font-family: var(--pixel); font-size: 11px; }
.notes { white-space: pre-wrap; color: #c6cec9; margin: 8px 0 0; font-size: 14px; }
.hash { font-family: ui-monospace, monospace; font-size: 11px; color: var(--muted); word-break: break-all; margin-top: 6px; }

.empty { text-align: center; color: var(--muted); padding: 48px 16px; }

/* forms */
label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 4px; }
input, textarea, select {
  width: 100%; font: 14px var(--sans); color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px;
}
input:focus, textarea:focus { outline: 2px solid rgba(74, 222, 128, .4); border-color: var(--accent); }
textarea { min-height: 110px; resize: vertical; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.actions { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.msg { font-size: 13px; margin-top: 10px; min-height: 1em; }
.msg.err { color: var(--danger); }
.msg.ok { color: var(--accent); }
.section-title { font-family: var(--pixel); font-size: 12px; color: var(--muted); margin: 32px 0 12px; }
.login { max-width: 360px; margin: 80px auto; }
progress { width: 100%; height: 8px; margin-top: 10px; accent-color: var(--accent); }

.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: var(--accent-ink); font-weight: 600;
  padding: 8px 16px; border-radius: 8px; opacity: 0; transition: opacity .2s; pointer-events: none;
}
.toast.show { opacity: 1; }

@media (max-width: 600px) {
  .row { grid-template-columns: 1fr; }
  .dl-side { align-items: flex-start; }
  .hero { padding-top: 36px; }
}

/* client detail page */
.detail-hero { padding-bottom: 24px; }
.eyebrow { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-family: var(--pixel); font-size: 10px; color: var(--accent); text-transform: uppercase; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stats div { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.stats span { display: block; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.stats strong { display: block; margin-top: 4px; font-size: 16px; }
.status { color: var(--accent); }
.btn-lg { padding: 11px 18px; font-size: 15px; }
.verify { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.hash-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.hash-row code { flex: 1 1 260px; min-width: 0; font-size: 12px; word-break: break-all; color: var(--muted); }
.prose { white-space: pre-wrap; margin: 0; color: #c6cec9; }
.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.feature h3 { margin: 0; font-size: 15px; }
.feature p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.steps { list-style: none; margin: 0; padding: 0; }
.step { display: flex; gap: 16px; padding: 14px 0; border-bottom: 1px dashed var(--line); }
.step:first-child { padding-top: 0; }
.step:last-child { border-bottom: 0; padding-bottom: 0; }
.step-n { font-family: var(--pixel); font-size: 12px; color: var(--accent); padding-top: 3px; }
.step h3 { margin: 0 0 6px; font-size: 16px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.step p { margin: 0 0 8px; color: #c6cec9; }
.step > div { min-width: 0; flex: 1; }
.paths { display: grid; gap: 6px; }
.path { display: flex; align-items: center; gap: 10px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 6px 6px 6px 12px; }
.path span { font-size: 12px; color: var(--muted); width: 64px; flex: none; }
.path code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; font-size: 13px; }
.faq details { padding: 12px 0; border-bottom: 1px dashed var(--line); }
.faq details:first-child { padding-top: 0; }
.faq details:last-child { border-bottom: 0; padding-bottom: 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq .prose { margin-top: 8px; }
.card h2 a { color: inherit; text-decoration: none; }
.card h2 a:hover { color: var(--accent); }
.hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
@media (max-width: 700px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .features { grid-template-columns: 1fr; }
}

/* ---------- shared: stars, demo badge, a11y ---------- */
.stars {
  display: inline-block; letter-spacing: 1px; line-height: 1; white-space: nowrap;
  background: linear-gradient(90deg, #facc15 calc(var(--r) / 5 * 100%), #3a433e 0);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.demo-badge {
  position: fixed; left: 12px; bottom: 12px; z-index: 60; font-size: 12px; color: #fde68a;
  background: rgba(30, 24, 6, .92); border: 1px solid rgba(250, 204, 21, .5); border-radius: 8px; padding: 6px 10px; pointer-events: none;
}
.demo-badge b { color: #facc15; margin-right: 6px; letter-spacing: .06em; }

/* ---------- client page: rating, chart, reviews ---------- */
.hero-rating { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; color: var(--muted); text-decoration: none; font-size: 14px; }
.hero-rating .stars { font-size: 18px; }
.hero-rating b { color: var(--text); font-size: 16px; }
.hero-rating:hover b { color: var(--accent); }

.chart-head { display: flex; gap: 28px; flex-wrap: wrap; margin-bottom: 16px; }
.chart-head strong { display: block; font-size: 22px; font-variant-numeric: tabular-nums; }
.chart-head span { font-size: 12px; color: var(--muted); }
.chart { position: relative; height: 150px; cursor: crosshair; touch-action: pan-y; }
.chart svg { width: 100%; height: 100%; display: block; overflow: visible; border-bottom: 1px solid var(--line); }
.chart path { fill: #16a34a; transition: fill .12s; }
.chart path.today { opacity: .55; }
.chart path.on { fill: var(--accent); opacity: 1; }
.chart-tip {
  position: absolute; top: -8px; transform: translate(-50%, -100%); pointer-events: none; white-space: nowrap;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 13px; box-shadow: 0 8px 24px rgba(0, 0, 0, .5);
}
.chart-tip span { display: block; font-size: 11px; color: var(--muted); }
.chart-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 6px; }

.rv-summary { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.rv-big { display: flex; flex-direction: column; align-items: center; gap: 4px; padding-right: 8px; }
.rv-big strong { font: 900 48px/1 var(--sans); }
.rv-big .stars { font-size: 18px; }
.rv-big span { font-size: 12px; color: var(--muted); }
.rv-dist { display: grid; gap: 6px; }
.rv-bar { display: grid; grid-template-columns: 28px 1fr 32px; gap: 10px; align-items: center; font-size: 12px; color: var(--muted); }
.rv-bar span:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.rv-track { height: 8px; border-radius: 4px; background: var(--panel-2); overflow: hidden; }
.rv-track i { display: block; height: 100%; border-radius: 4px; background: #b77b03; }
.rv-list { display: grid; }
.rv-item { padding: 16px 0; border-bottom: 1px dashed var(--line); }
.rv-item:last-child { border-bottom: 0; }
.rv-head { display: flex; align-items: center; gap: 10px; }
.rv-av { width: 32px; height: 32px; flex: none; padding: 6px; border-radius: 8px; background: var(--bg); border: 1px solid var(--line); }
.rv-av svg { width: 100%; height: 100%; display: block; }
.rv-who { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.rv-who b { font-size: 14px; }
.rv-who span { font-size: 11px; color: var(--muted); }
.rv-item p { margin: 10px 0 0; color: #d4dbd6; font-size: 14px; }
#rv-more { margin-top: 12px; }
.star-pick { display: flex; gap: 2px; padding-top: 4px; }
.star-pick label { margin: 0; cursor: pointer; font-size: 28px; line-height: 1; color: #3a433e; transition: color .1s, transform .1s; }
.star-pick label.lit { color: #facc15; }
.star-pick label:hover { transform: scale(1.12); }
.star-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-pick label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
@media (max-width: 600px) {
  .rv-summary { grid-template-columns: 1fr; gap: 16px; }
}
.status-off, .paused-note b { color: #fbbf24; }
.paused-note { margin: 0 0 14px; padding: 12px 16px; border-radius: var(--radius); border: 1px solid rgba(251, 191, 36, .4); background: rgba(251, 191, 36, .07); color: #e7dcc0; font-size: 14px; }

/* ---------- site-wide polish ---------- */
@view-transition { navigation: auto; }
::view-transition-group(*) { animation-duration: .45s; animation-timing-function: cubic-bezier(.2, .8, .2, 1); }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .3s; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }
html { scrollbar-color: #2a312d var(--bg); scrollbar-width: thin; }
::selection { background: rgba(74, 222, 128, .35); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
/* faint film grain over everything, for depth */
body::after {
  content: ''; position: fixed; inset: 0; z-index: 70; pointer-events: none; opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* admin: preview manager */
.pv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin: 12px 0; }
.pv { margin: 0; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.pv-media { aspect-ratio: 16 / 9; background: #070908; }
.pv-media img, .pv-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.pv figcaption { font-size: 12px; color: var(--muted); padding: 8px 10px 0; }
.pv-actions { display: flex; gap: 6px; padding: 8px 10px 10px; }
.pv-actions .btn-danger { margin-left: auto; }

/* uploaded client logos fill their emblem tile edge to edge */
.has-logo { padding: 0 !important; overflow: hidden; }
.has-logo .logo-img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* admin: logo + accent */
.logo-row { display: flex; gap: 16px; align-items: center; padding-bottom: 14px; margin-bottom: 4px; border-bottom: 1px dashed var(--line); }
.logo-prev { width: 64px; height: 64px; flex: none; padding: 12px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); }
.logo-prev svg { width: 100%; height: 100%; display: block; }
.logo-form { flex: 1; min-width: 0; }
.logo-form label { margin-top: 0; }
.logo-form input[type=file] { width: auto; flex: 1; min-width: 0; }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-left: 4px; border: 1px solid rgba(255, 255, 255, .25); }

/* ---------- pre-launch "coming soon" placeholder (no download published yet) ---------- */
.tag.soon { color: var(--muted); border-style: dashed; }
button.soon, .btn.soon {
  cursor: default;
  color: var(--acc, var(--accent));
  background: color-mix(in srgb, var(--acc, var(--accent)) 10%, transparent);
  border: 1px dashed color-mix(in srgb, var(--acc, var(--accent)) 55%, var(--line));
  position: relative;
  overflow: hidden;
}
button.soon:disabled { opacity: 1; }
/* a slow light sweep so the placeholder reads as "on the way", not broken */
button.soon::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg, transparent 42%, color-mix(in srgb, var(--acc, var(--accent)) 24%, transparent), transparent 58%);
  transform: translateX(-120%);
  animation: soon-sweep 2.8s ease-in-out infinite;
}
.c-soon-note { margin: 12px 0 0; font-size: 13px; color: var(--muted); }
@keyframes soon-sweep { 0% { transform: translateX(-120%); } 55%, 100% { transform: translateX(120%); } }
@media (prefers-reduced-motion: reduce) { button.soon::after { animation: none; display: none; } }
