/* App shelf: an app-store look for software stores, with products as icon rows. */
:root {
  --font: -apple-system, "SF Pro Text", "Segoe UI Variable", system-ui, "Segoe UI", Roboto, sans-serif;
  --font-head: -apple-system, "SF Pro Display", "Segoe UI Variable Display", system-ui, sans-serif;
  --accent: #0a66d8; --line: #e5e5ea; --bad: #d70015; --ok: #248a3d;
  --bg: #ffffff; --surface: #f5f5f7; --text: #1d1d1f; --muted: #6e6e73; --pill: #eef4fe;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --accent: #4ea1ff; --line: #2c2c2e; --bad: #ff6961; --ok: #30d158;
    --bg: #000000; --surface: #1c1c1e; --text: #f5f5f7; --muted: #98989d; --pill: #0f2a4a; }
}
:root[data-theme="dark"] { --accent: #4ea1ff; --line: #2c2c2e; --bad: #ff6961; --ok: #30d158;
  --bg: #000000; --surface: #1c1c1e; --text: #f5f5f7; --muted: #98989d; --pill: #0f2a4a; }

body { background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.site-header { max-width: 62rem; border-bottom-color: var(--line); padding: .9rem 1rem; }
.brand { font-weight: 700; font-size: 1.15rem; letter-spacing: -.02em; }
.site-header nav a { color: var(--text); font-weight: 500; font-size: .95rem; }
.header-right > a { color: var(--accent); font-size: .95rem; }
.currency-menu summary { color: var(--text); font-size: .9rem; }
.currency-menu ul { background: var(--bg); color: var(--text); border-color: var(--line); border-radius: .75rem; box-shadow: 0 10px 30px #0002; }
.currency-menu li a { border-radius: .45rem; }
.currency-menu li a:hover { background: var(--surface); text-decoration: none; }
.currency-menu li a.on { color: var(--accent); }
.mode-toggle { border: 0; background: var(--surface); color: var(--muted); }

main, .site-footer { max-width: 62rem; }
.site-footer { border-top-color: var(--line); color: var(--muted); font-size: .85rem; opacity: 1; }
.site-footer a, .site-footer button.link { color: var(--muted); }

h1, h2, h3 { letter-spacing: -.025em; font-weight: 700; }
h1 { font-size: clamp(2rem, 4.2vw, 2.8rem); margin: 1.75rem 0 .5rem; }
.lead, .hint { color: var(--muted); opacity: 1; }

/* Products as app rows: icon, name and summary, price pill */
.grid { grid-template-columns: repeat(auto-fill, minmax(min(24rem, 100%), 1fr)); gap: 0 2rem; margin-top: 1.25rem; }
.card-item { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr) auto; column-gap: 1rem; align-items: center; align-content: center;
  border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 1rem 0; }
.card-item a { display: contents; color: inherit; }
.card-item img, .noimg { grid-column: 1; grid-row: 1 / span 4; width: 4.5rem; aspect-ratio: 1; border-radius: 22%; object-fit: cover; align-self: center;
  border: 1px solid var(--line); box-sizing: border-box; }
.noimg { opacity: 1; background: linear-gradient(160deg, var(--accent), color-mix(in srgb, var(--accent) 60%, #000)); color: #fff; font-size: .7rem; font-weight: 600; border: 0; }
.card-item h2 { grid-column: 2; font-size: 1.02rem; font-weight: 600; margin: 0; letter-spacing: -.01em; }
.card-item p { grid-column: 2; margin: .1rem 0 0; font-size: .88rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.card-item .price { grid-column: 3; grid-row: 1 / span 4; margin: 0; padding: .3rem .9rem; border-radius: 999px; background: var(--pill); color: var(--accent); font-size: .85rem; font-weight: 600; white-space: nowrap; }
.price { font-weight: 700; }
.price.big { font-size: 1.9rem; }

/* Product page */
.product-layout { gap: 2.5rem; }
@media (min-width: 52rem) { .product-layout { grid-template-columns: minmax(0, 1fr) 19rem; } }
.buybox { background: var(--surface); border: 0; border-radius: 1.1rem; padding: 1.4rem; }
.gallery { grid-auto-flow: column; grid-auto-columns: min(80%, 22rem); grid-template-columns: none; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: .5rem; }
.gallery li { scroll-snap-align: start; }
.gallery li:first-child { grid-column: auto; }
.gallery img, .gallery video { border-radius: 1rem; border: 1px solid var(--line); }
.subnav { border-bottom-color: var(--line); }
.prose { line-height: 1.6; }
.prose pre { background: var(--surface); border-radius: .75rem; }
.prose blockquote { border-left-color: var(--accent); color: var(--muted); }
.release { border-bottom: 1px solid var(--line); padding-bottom: 1rem; }

button, .btn { border-radius: 999px; font-weight: 600; background: var(--accent); padding: .65rem 1.3rem; }
button:hover, .btn:hover { filter: brightness(1.08); text-decoration: none; }
button.link { background: none; color: var(--accent); padding: 0; border-radius: 0; font-weight: inherit; }
button.secondary { background: var(--pill); color: var(--accent); border: 0; }
.buy-button { padding: .75rem 1.3rem; }
input:not([type=checkbox]):not([type=radio]) { border-radius: .7rem; background: var(--bg); border-color: var(--line); padding: .6rem .8rem; }
input:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent); border-color: var(--accent); }
fieldset { border: 1px solid var(--line); border-radius: .75rem; }
hr { border: 0; border-top: 1px solid var(--line); }
.notice { border-radius: .75rem; border-width: 0; background: var(--surface); }
.notice.ok { color: var(--ok); }
.notice.err { color: var(--bad); }
.card.narrow { background: var(--surface); border: 0; border-radius: 1.1rem; }
.tag { font-size: .72rem; font-weight: 600; padding: .1rem .5rem; border-radius: 999px; background: var(--pill); color: var(--accent); }
th { font-size: .8rem; color: var(--muted); font-weight: 600; }
th, td { border-bottom-color: var(--line); }
.consent { background: var(--bg); color: var(--text); }
