/* UniSale product site, desktop documents (public/site/*.html, generated by tools/generate-public-site-pages.mjs).
   Phones get the separate *-mobile.html documents with site-mobile.css. The homepage (public/home.html) uses it too. */
:root {
  color-scheme: light;
  --bg: #f4f7f5;
  --surface: #ffffff;
  --surface-alt: #e8f0ec;
  --ink: #15302b;
  --muted: #4a6660;
  --line: #d2e0d9;
  --brand: #075f4b;
  --brand-ink: #ffffff;
  --brand-soft: #d6ebe3;
  --focus: #148572;
  --frame: #1b2b28;
  font: 17px/1.6 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0f1a18; --surface: #172623; --surface-alt: #13211e; --ink: #e4efeb; --muted: #a6bdb6;
    --line: #2a3d38; --brand: #3fb79a; --brand-ink: #062a21; --brand-soft: #1d3a33; --focus: #6fd6bd; --frame: #050a09;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1a18; --surface: #172623; --surface-alt: #13211e; --ink: #e4efeb; --muted: #a6bdb6;
  --line: #2a3d38; --brand: #3fb79a; --brand-ink: #062a21; --brand-soft: #1d3a33; --focus: #6fd6bd; --frame: #050a09;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); }
a { color: var(--brand); text-underline-offset: .2em; }
a:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; inset-inline-start: 16px; top: -100px; padding: 10px 16px; background: var(--surface); color: var(--ink); z-index: 10; border-radius: 8px; }
.skip-link:focus { top: 12px; }
.wrap { width: min(100% - 48px, 1160px); margin-inline: auto; }
section[id] { scroll-margin-top: 76px; }

/* Header (shared by every generated page) */
.site-header { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; gap: 28px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 750; font-size: 1.2rem; color: var(--ink); text-decoration: none; }
.brand img { border-radius: 9px; }
.site-nav { display: flex; align-items: center; gap: 22px; margin-inline-start: auto; font-size: .94rem; }
.site-nav > a, .nav-menu summary { color: var(--ink); text-decoration: none; font-weight: 550; padding-block: 8px; white-space: nowrap; }
.site-nav > a:hover, .nav-menu summary:hover { color: var(--brand); }
.site-nav [aria-current="page"], .nav-menu[data-current] summary { color: var(--brand); box-shadow: inset 0 -2px 0 var(--brand); }
.nav-menu { position: relative; }
.nav-menu summary { list-style: none; cursor: pointer; }
.nav-menu summary::-webkit-details-marker { display: none; }
.nav-menu summary::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-inline-start: 8px; border-bottom: 2px solid currentColor; border-inline-end: 2px solid currentColor; transform: translateY(-3px) rotate(45deg); }
.menu-panel { position: absolute; top: calc(100% + 8px); inset-inline-start: -16px; min-width: 250px; display: flex; flex-direction: column; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 16px 40px rgb(10 40 32 / .16); z-index: 6; }
.menu-panel a { padding: 10px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.menu-panel a:hover, .menu-panel a[aria-current="page"] { background: var(--surface-alt); color: var(--brand); }
.language select { font: inherit; min-height: 40px; max-width: 180px; }

/* Type */
h1 { font-size: clamp(2.1rem, 3.6vw, 3.1rem); line-height: 1.12; letter-spacing: -.02em; margin: 0 0 20px; text-wrap: balance; }
h2 { font-size: 1.9rem; line-height: 1.2; margin: 0 0 12px; text-wrap: balance; }
h3 { font-size: 1.08rem; line-height: 1.3; margin: 0 0 6px; }
.eyebrow { display: inline-block; margin: 0 0 14px; padding: 4px 12px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-weight: 700; font-size: .85rem; }
.lead { font-size: 1.16rem; color: var(--muted); max-width: 48ch; margin: 0 0 30px; }
.lead-sm { color: var(--muted); font-size: 1.05rem; margin: 0 0 20px; }
.section-note { color: var(--muted); margin: 0 0 32px; max-width: 72ch; }
.caption { color: var(--muted); font-size: .86rem; margin: 18px 0 0; }

/* Buttons */
.primary, .secondary { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; border-radius: 12px; font-weight: 650; text-decoration: none; }
.primary { background: var(--brand); color: var(--brand-ink); }
.primary:hover { filter: brightness(1.08); }
.secondary { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.secondary:hover { border-color: var(--brand); color: var(--brand); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.more { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin: 28px 0 0; }
.more .caption { margin: 0; }

/* Hero */
.hero { padding-block: 64px 72px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 56px; align-items: center; }
.facts { list-style: none; margin: 28px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 10px; }
.facts li { padding: 6px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: .88rem; font-weight: 600; }
.facts li:first-child { background: var(--brand-soft); border-color: transparent; color: var(--brand); }
.hero-visual { position: relative; }
.hero-visual.has-phone { padding-bottom: 36px; padding-inline-end: 36px; }
.hero-visual > .screen { box-shadow: 0 24px 60px rgb(10 40 32 / .22); }
.hero-phone { position: absolute; inset-inline-end: 0; bottom: 0; width: 30%; }
.hero-phone .phone { box-shadow: 0 18px 40px rgb(10 40 32 / .28); }
.hero-icons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.hero-icons .icon { width: auto; height: 150px; border-radius: 28px; margin: 0; background: var(--surface); border: 1px solid var(--line); }
.hero-icons .icon:nth-child(2) { transform: translateY(28px); background: var(--brand-soft); }
.hero-icons .icon svg { width: 56px; height: 56px; stroke-width: 1.5; }

/* Device frames */
.screen { border-radius: 14px; overflow: hidden; border: 6px solid var(--frame); background: var(--frame); }
.phone { border-radius: 22px; overflow: hidden; border: 5px solid var(--frame); background: var(--frame); }
.tablet { border-radius: 18px; overflow: hidden; border: 6px solid var(--frame); background: var(--frame); }

/* Bands and cards */
.band { padding-block: 72px; }
.band-alt { background: var(--surface-alt); }
.card-grid { display: grid; gap: 18px; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px; }
.card p { margin: 0; color: var(--muted); font-size: .95rem; }
.card-link { color: var(--ink); text-decoration: none; transition: border-color .15s, transform .15s; }
.card-link:hover { border-color: var(--brand); transform: translateY(-2px); }
.card-link .arrow { margin-top: auto; padding-top: 12px; color: var(--brand); font-weight: 700; font-size: 1.2rem; }
[dir="rtl"] .card-link .arrow { transform: scaleX(-1); align-self: flex-end; }
@media (prefers-reduced-motion: reduce) { .card-link { transition: none; } .card-link:hover { transform: none; } }
.icon { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--brand-soft); margin-bottom: 14px; }
.icon svg { width: 24px; height: 24px; fill: none; stroke: var(--brand); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.channels { list-style: none; margin: 28px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.channels li { padding: 7px 15px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-weight: 550; font-size: .92rem; }
.section-head { display: flex; gap: 22px; align-items: flex-start; }
.hub-mark { flex: none; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 16px; background: var(--brand); color: var(--brand-ink); font-weight: 800; }
.hub-mark.small { width: 56px; height: 56px; border-radius: 14px; }

/* Flow */
.flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.flow li { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px; }
.flow li:not(:last-child)::after { content: ""; position: absolute; top: 36px; inset-inline-end: -14px; width: 10px; height: 10px; border-top: 2.5px solid var(--brand); border-inline-end: 2.5px solid var(--brand); transform: rotate(45deg); z-index: 1; }
[dir="rtl"] .flow li:not(:last-child)::after { transform: rotate(-45deg); }
.flow p { margin: 0; color: var(--muted); font-size: .95rem; }
.step { display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 8px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); font-weight: 800; margin-bottom: 14px; }
.flow .is-done { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.flow .is-done p { color: var(--brand-ink); opacity: .92; }
.flow .is-done .step { background: rgb(255 255 255 / .18); color: var(--brand-ink); }

/* Feature: copy + screenshot */
.feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.feature.wide { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); }
.feature.reverse .feature-copy { order: 2; }
.feature-media { display: flex; justify-content: center; align-items: flex-end; gap: 18px; }
.feature-media .phone, .feature-media .tablet { max-width: 300px; box-shadow: 0 20px 44px rgb(10 40 32 / .2); }
.feature-media.pair-media .phone { max-width: 46%; }
.feature-media .screen { box-shadow: 0 20px 50px rgb(10 40 32 / .2); }
.feature-icon .icon { width: 140px; height: 140px; border-radius: 32px; }
.feature-icon .icon svg { width: 64px; height: 64px; stroke-width: 1.4; }

/* Lists */
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-inline-start: 30px; }
.ticks li::before { content: ""; position: absolute; inset-inline-start: 2px; top: .45em; width: 14px; height: 8px; border-left: 2.5px solid var(--brand); border-bottom: 2.5px solid var(--brand); transform: rotate(-45deg); }
.ticks.boxed { gap: 12px; }
.ticks.boxed li { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; padding-inline-start: 46px; }
.ticks.boxed li::before { inset-inline-start: 18px; top: 1.25em; }
.split { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 56px; align-items: start; }
.split-head .section-note { margin-bottom: 0; }
.callout { margin: 18px 0 0; padding: 14px 18px; border-radius: 14px; background: var(--brand-soft); font-size: .95rem; }

/* Apps */
.app-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.app-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; }
.app-row img { border-radius: 14px; }
.app-row h3 { margin: 0; }
.app-row p { margin: 2px 0 0; color: var(--muted); font-size: .92rem; }
.platforms { font-size: .78rem; font-weight: 650; color: var(--brand); background: var(--brand-soft); padding: 4px 10px; border-radius: 999px; white-space: nowrap; }

/* Payment providers (rendered by home.js) */
.payments { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.payment { display: grid; grid-template-columns: 40px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.payment-mark { grid-row: 1 / span 2; width: 40px; height: 40px; border-radius: 10px; overflow: hidden; display: grid; place-items: center; background: #ffffff; border: 1px solid var(--line); }
.payment-mark img { width: 100%; height: 100%; object-fit: contain; }
.payment-mark.is-monogram { background: var(--surface-alt); color: var(--brand); font-weight: 800; font-size: .8rem; }
.payment-name { font-weight: 600; font-size: .92rem; overflow-wrap: anywhere; }
.payment-countries { font-size: .76rem; color: var(--muted); }

/* Panels and call to action */
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 32px; }
.panel h2 { font-size: 1.5rem; }
.panel p { margin: 0; color: var(--muted); }
.panel.accent { border-color: var(--brand); box-shadow: inset 0 4px 0 var(--brand); }
.cta { background: var(--brand); color: var(--brand-ink); padding-block: 56px; }
.cta-wide { display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.cta h2 { margin-bottom: 6px; }
.cta p { margin: 0; font-size: 1.1rem; }
.cta .fine { font-size: .88rem; opacity: .85; margin-top: 10px; }
.primary.inverse { background: var(--brand-ink); color: var(--brand); flex: none; }

/* Homepage */
.hero-apps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 120px); gap: 22px; justify-content: center; }
.hero-apps li { display: grid; place-items: center; width: 120px; height: 120px; border-radius: 28px; background: var(--surface); border: 1px solid var(--line); }
.hero-apps img { border-radius: 20px; }
.teaser { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 48px; align-items: center; }
.teaser .section-note { margin-bottom: 24px; }
.teaser-apps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.teaser-apps li { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; text-align: center; font-size: .82rem; font-weight: 600; }
.teaser-apps img { border-radius: 14px; }

/* Page intro (downloads, payments, solutions) */
.page-intro { padding-block: 56px 8px; }
.page-intro .lead { max-width: 60ch; margin-bottom: 0; }
.band-tight { padding-block: 32px 72px; }

/* Downloads (markup from tools/public-site/downloads-desktop.html) */
.group-title { font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 36px 0 14px; }
.group-title:first-child { margin-top: 0; }
.app-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.app-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.app-head { display: flex; gap: 16px; align-items: center; }
.app-head img { border-radius: 14px; flex: none; }
.app-head h3 { margin: 0; font-size: 1.2rem; }
.app-head p { margin: 2px 0 0; color: var(--muted); }
.scan-hint { margin: 0; font-size: .88rem; color: var(--muted); }
.stores { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 16px; }
.store { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 150px; text-align: center; }
.store .qr { width: 132px; height: 132px; padding: 6px; background: #ffffff; border: 1px solid var(--line); border-radius: 12px; image-rendering: pixelated; }
.store.is-unavailable .qr { display: none; }
.store-windows { width: auto; min-width: 220px; flex: 1; align-items: flex-start; text-align: start; }
.windows-mark svg { width: 32px; height: 32px; fill: var(--brand); }
.store-link { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 16px; border-radius: 10px; background: var(--ink); color: var(--bg); font-weight: 650; font-size: .95rem; text-decoration: none; }
.store-link:hover { background: var(--brand); color: var(--brand-ink); }
.meta { font-size: .82rem; color: var(--muted); }
.unavailable, .note { font-size: .88rem; color: var(--muted); }

/* Payments */
.payment-columns { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 36px; }
.payment-columns h2 { margin: 0 0 14px; font-size: 1.15rem; }

/* Solutions index */
.solution h2 { font-size: 1.15rem; margin: 0 0 6px; }
.mini-chips { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.mini-chips li { padding: 3px 10px; border-radius: 999px; background: var(--surface-alt); border: 1px solid var(--line); font-size: .8rem; font-weight: 600; color: var(--ink); }

/* Footer (shared by every generated page) */
.site-footer { border-top: 1px solid var(--line); padding-block: 36px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr repeat(4, minmax(0, 1fr)); gap: 28px; color: var(--muted); }
.footer-grid nav { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.footer-grid h2 { font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); margin: 0 0 4px; }
.footer-grid a { text-decoration: none; }
.footer-grid a:hover { text-decoration: underline; }
.footer-brand p { margin: 10px 0 0; }
.footer-brand .brand { font-size: 1.05rem; }
#unisale-china-filing { color: var(--muted); }

/* Narrow desktop windows. Phones are served the separate *-mobile.html documents. */
@media (max-width: 1180px) {
  .site-nav { gap: 16px; font-size: .9rem; }
}
@media (max-width: 1080px) {
  .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow li::after { display: none; }
}
@media (max-width: 900px) {
  .hero-grid, .feature, .feature.wide, .split, .pair, .app-list { grid-template-columns: 1fr; }
  .feature.reverse .feature-copy { order: 0; }
  .cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-nav { display: none; }
  .language { margin-inline-start: auto; }
  .cta-wide { flex-direction: column; align-items: flex-start; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .hero-apps { display: none; }
  .teaser, .app-grid, .payment-columns { grid-template-columns: 1fr; }
  .teaser-apps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .wrap { width: calc(100% - 32px); }
  .cols-2, .cols-3, .cols-4, .flow { grid-template-columns: 1fr; }
  .app-row { grid-template-columns: auto minmax(0, 1fr); }
  .platforms { grid-column: 2; justify-self: start; }
}
