/* The VeraGen Store (apps.veragen.ai, AS-11, VH-1070).
   A separate origin with a strict CSP (style-src 'self'; font-src 'self'), so this file stands on its own: it does not
   load the hub's /fields.css or /mobile.css, and carries their two rules itself (16px fields, so iOS never zooms on
   focus; no sideways page scroll, wide content scrolls inside its own box). Tokens are hub/brand-tokens.js's defaults.
   System font stack: no font file is served from this origin. */

:root {
  --vg-primary: #1268d4;
  --vg-bg: #ffffff;
  --vg-surface: #ffffff;
  --vg-ink: #0b1220;
  --vg-muted: #5b6880;
  --vg-line: #eef1f6;
  --vg-radius: 14px;
  --vg-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --vg-primary: #256cd5;
    --vg-bg: #0b1220;
    --vg-surface: #111b2e;
    --vg-ink: #e8eef7;
    --vg-muted: #9fb0c9;
    --vg-line: #1c2740;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--vg-bg);
  color: var(--vg-ink);
  font-family: var(--vg-font);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
  overflow-wrap: break-word;
}
h1, h2, h3, h4 { font-weight: 800; line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: 2rem; }
h2 { font-size: 1.4rem; margin-top: 1.6em; }
h3 { font-size: 1.1rem; }
h4 { font-size: 1rem; }
p { margin: 0 0 .8em; }
a { color: var(--vg-primary); }
img, video { max-width: 100%; height: auto; }
main, .top, .foot { max-width: 1120px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
main { display: block; padding-top: 8px; padding-bottom: 48px; }

/* focus: always visible, never removed without this replacement */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible, summary:focus-visible {
  outline: 3px solid var(--vg-primary);
  outline-offset: 2px;
}

/* visually hidden, still read aloud */
.vh {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.skip {
  position: absolute; left: 16px; top: -100px;
  background: var(--vg-primary); color: #fff;
  padding: 12px 16px; border-radius: 8px; z-index: 10; text-decoration: none; font-weight: 700;
}
.skip:focus { top: 8px; }

/* header */
.top {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px;
  padding-top: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--vg-line);
}
.top .bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex: 0 1 auto; min-width: 0; }
.brand { font-weight: 800; font-size: 1.2rem; color: var(--vg-ink); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
#vg-account:empty { display: none; }
.find { display: flex; gap: 8px; flex: 1 1 320px; min-width: 0; max-width: 560px; }
.find input {
  flex: 1 1 auto; min-width: 0; min-height: 44px;
  font: inherit; font-size: 16px; color: var(--vg-ink); background: var(--vg-surface);
  border: 1px solid var(--vg-muted); border-radius: 10px; padding: 8px 12px;
}
.find button, .btn {
  font: inherit; font-size: 16px; font-weight: 700; min-height: 44px; min-width: 44px;
  padding: 8px 18px; border-radius: 10px; border: 1px solid var(--vg-primary);
  background: var(--vg-primary); color: #fff; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
}
.find.big { flex-wrap: wrap; max-width: 720px; margin: 16px 0 24px; }
.find.big label { flex: 1 1 100%; font-weight: 700; }

.foot { border-top: 1px solid var(--vg-line); padding-top: 24px; padding-bottom: 32px; color: var(--vg-muted); font-size: .95rem; }

/* shared */
.lede { font-size: 1.1rem; color: var(--vg-muted); max-width: 70ch; }
.hint { color: var(--vg-muted); font-size: .95rem; }
.empty { color: var(--vg-muted); }
.blurb { color: var(--vg-muted); }
.meta { color: var(--vg-muted); font-size: .9rem; margin: 0; }
.trend { color: var(--vg-ink); font-weight: 700; }
.crumbs ol { list-style: none; margin: 8px 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; color: var(--vg-muted); font-size: .95rem; }
.crumbs li + li::before { content: "\203A"; margin-right: 4px; }
.crumbs a { display: inline-block; padding: 10px 0; }
.handle { color: var(--vg-muted); margin-top: -.3em; }

/* cards */
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.card { min-width: 0; }
.card a {
  display: block; height: 100%; min-height: 44px; padding: 12px;
  border: 1px solid var(--vg-line); border-radius: var(--vg-radius); background: var(--vg-surface);
  color: var(--vg-ink); text-decoration: none;
}
.card a:hover { border-color: var(--vg-primary); }
.card img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 10px; margin-bottom: 10px; background: var(--vg-line); }
.card h2, .card h3 { font-size: 1.05rem; margin: 0 0 4px; overflow-wrap: anywhere; }
.card .tag { color: var(--vg-muted); margin: 0 0 6px; overflow-wrap: anywhere; }
.strip { overflow-x: auto; overscroll-behavior-x: contain; }
.cats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.cats a {
  display: flex; align-items: center; min-height: 44px; padding: 8px 14px;
  border: 1px solid var(--vg-line); border-radius: 10px; background: var(--vg-surface); color: var(--vg-ink); text-decoration: none; font-weight: 600;
}

/* listing */
.app-head { margin-bottom: 8px; }
.app-head h1 { overflow-wrap: anywhere; }
.app-head .tag { font-size: 1.15rem; color: var(--vg-muted); overflow-wrap: anywhere; }
.by { margin: 0 0 8px; }
.chips { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { border: 1px solid var(--vg-line); border-radius: 999px; padding: 4px 12px; font-size: .9rem; }
.actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px 16px; }
.actions .hint { flex: 1 1 100%; margin: 0; }
.btn.try { background: var(--vg-surface); color: var(--vg-primary); }
.shots { list-style: none; margin: 0; padding: 0 0 8px; display: flex; gap: 12px; }
.shots li { flex: 0 0 auto; max-width: 85%; }
.shots img { display: block; width: auto; max-height: 420px; border-radius: 10px; border: 1px solid var(--vg-line); }
.prose { max-width: 75ch; overflow-wrap: anywhere; }
.prose a { text-decoration: underline; }
.prose pre, .prose table { display: block; max-width: 100%; overflow-x: auto; }
.prose pre { background: var(--vg-line); padding: 12px; border-radius: 8px; }
.needs, .built { padding-left: 1.2em; }
.facts { margin: 0; display: grid; grid-template-columns: minmax(160px, 1fr) 2fr; border-top: 1px solid var(--vg-line); max-width: 900px; }
.fact { display: contents; }
.fact dt, .fact dd { margin: 0; padding: 10px 8px 10px 0; border-bottom: 1px solid var(--vg-line); min-width: 0; overflow-wrap: anywhere; }
.fact dt { font-weight: 700; }
.fact-gap { color: var(--vg-muted); }
.asof { color: var(--vg-muted); font-size: .9rem; }
.fact a { display: inline-block; padding: 2px 0; }
video { display: block; border-radius: 10px; background: #000; }

/* ratings */
.rating-sum { display: flex; flex-wrap: wrap; gap: 8px 32px; align-items: flex-start; }
.avg { margin: 0; }
.big { font-size: 2.4rem; font-weight: 800; }
.count { color: var(--vg-muted); }
.dist { list-style: none; margin: 0; padding: 0; min-width: 0; flex: 1 1 260px; max-width: 420px; }
.dist li { display: grid; grid-template-columns: 4.5em 1fr 2.5em; align-items: center; gap: 8px; }
.dist meter { width: 100%; height: 12px; }
.dist .n { text-align: right; color: var(--vg-muted); }
.reviews { list-style: none; margin: 16px 0 0; padding: 0; }
.reviews > li { border-top: 1px solid var(--vg-line); padding: 16px 0; }
.stars { margin: 0 0 4px; color: var(--vg-primary); letter-spacing: 2px; }
.reviews .body { overflow-wrap: anywhere; }
.reply { margin-top: 8px; padding: 12px; border-left: 3px solid var(--vg-line); }

/* S1 wave 2 integration: the classes the buyer scripts draw (store.js and signin.js VH-1071, reviews.js VH-1072,
   feedback.js VH-1073). Without these, screen-reader-only names showed on screen and search results were unstyled. */
.vg-sr {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.btn.ghost, .btn.link, .btn.steel { background: var(--vg-surface); color: var(--vg-primary); }
.btn.link { border-color: transparent; text-decoration: underline; padding-left: 4px; padding-right: 4px; }
.btn.danger { background: #b42318; border-color: #b42318; color: #fff; }
.btn.sm { font-size: .95rem; padding: 6px 12px; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .6; cursor: not-allowed; }
.err { color: #b42318; margin: 8px 0; }
.muted { color: var(--vg-muted); }
.row, .acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.acts { margin-top: 12px; }
.app-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.app-card { min-width: 0; border: 1px solid var(--vg-line); border-radius: var(--vg-radius); background: var(--vg-surface); padding: 12px; }
.app-card a { color: var(--vg-ink); }
.app-card h2, .app-card h3 { font-size: 1.05rem; margin: 0 0 4px; overflow-wrap: anywhere; }
.vg-form label, .vg-check { display: block; margin: 10px 0 4px; font-weight: 600; }
.vg-check { font-weight: 400; }
.vg-form input:not([type=checkbox]):not([type=radio]), .vg-form select, .vg-form textarea,
#vg-reviews textarea, #vg-reviews input[type=text], #vg-feedback textarea, #vg-feedback input[type=text], #vg-feedback select, #vg-support textarea,
#vg-demand textarea, #vg-demand input[type=text] {
  font: inherit; font-size: 16px; width: 100%; max-width: 560px; min-height: 44px; padding: 8px 10px;
  border: 1px solid var(--vg-line); border-radius: 10px; background: var(--vg-surface); color: var(--vg-ink);
}
.vg-signin-card, .vg-confirm, .vg-terms { max-width: 560px; border: 1px solid var(--vg-line); border-radius: var(--vg-radius); padding: 16px; background: var(--vg-surface); }
.vg-lib, .vg-req-list { list-style: none; margin: 0; padding: 0; }
.vg-lib-item, .vg-req-list > li { border-top: 1px solid var(--vg-line); padding: 12px 0; }
.rv-list { list-style: none; margin: 16px 0 0; padding: 0; }
.rv-list > li { border-top: 1px solid var(--vg-line); padding: 16px 0; }
.rv-stars { margin: 0 0 4px; color: var(--vg-primary); letter-spacing: 2px; }
.rv-title { margin: 0 0 4px; }
.rv-meta, .rv-state, .rv-end { color: var(--vg-muted); font-size: .9rem; margin: 0; }
.rv-body { overflow-wrap: anywhere; }
.rv-reply { margin-top: 8px; padding: 12px; border-left: 3px solid var(--vg-line); }
#vg-feedback { margin-top: 24px; }
/* AS-26 (VH-1085): Help with this app (support.js). The pane sits in the page flow; the creator's colour is only a border. */
#vg-support { margin-top: 24px; }
.vg-chat { list-style: none; margin: 12px 0; padding: 0; display: flex; flex-direction: column; gap: 8px; max-width: 720px; }
.vg-chat-bot, .vg-chat-me { border-radius: 10px; padding: 8px 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.vg-chat-bot { background: var(--vg-line); }
.vg-chat-me { border: 1px solid var(--vg-line); }
.vg-bot-accent { border-left: 4px solid var(--vg-bot, var(--vg-line)); padding-left: 12px; }
#vg-demand { margin-top: 24px; }

/* phones: the iOS zoom rule (as /fields.css), the header on two lines, home rows as a swipeable strip */
@media (max-width: 768px) {
  input, select, textarea, button { font-size: 16px; }
  .top { flex-direction: column; align-items: stretch; }
  .top .bar { flex: 1 1 auto; }
  .find { flex: 1 1 100%; max-width: none; }
  h1 { font-size: 1.6rem; }
  .strip .cards { grid-auto-flow: column; grid-auto-columns: 78%; grid-template-columns: none; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
  .strip .card { scroll-snap-align: start; }
  main > .cards { grid-template-columns: 1fr; }
  .actions { flex-direction: column; align-items: stretch; }
  .actions .btn, #vg-get .btn, #vg-get button { width: 100%; }
  .shots { scroll-snap-type: x mandatory; }
  .shots li { flex: 0 0 85%; scroll-snap-align: start; }
  .shots img { width: 100%; max-height: none; }
}
@media (max-width: 600px) {
  .facts { grid-template-columns: 1fr; }
  .fact dt { border-bottom: 0; padding-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
