:root {
  --bg: #ffffff;
  --bg-soft: #f6f3f5;
  --card: #ffffff;
  --text: #1f2328;
  --muted: #555b63;
  --line: #e3dde1;
  --accent: #714b67;
  --accent-strong: #5b3a53;
  --accent-soft: #f1e9ef;
  --on-accent: #ffffff;
  --free: #146c43;
  --free-bg: #e3f4ea;
  --focus: #0b65c2;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(30, 20, 30, .06), 0 4px 16px rgba(30, 20, 30, .06);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17141a;
    --bg-soft: #201b23;
    --card: #221d25;
    --text: #ece7ee;
    --muted: #b3aab6;
    --line: #3a323e;
    --accent: #c69bbb;
    --accent-strong: #e0bfd6;
    --accent-soft: #33283a;
    --on-accent: #1b1320;
    --free: #7fd6a5;
    --free-bg: #1c3427;
    --focus: #8cc4ff;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4);
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-wrap: break-word;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-strong); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { line-height: 1.25; margin: 1.6em 0 .5em; }
h1 { font-size: 1.85rem; margin-top: .4em; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.15rem; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em;
  background: var(--bg-soft); padding: .1em .35em; border-radius: 4px; }
pre { overflow-x: auto; background: var(--bg-soft); padding: 12px; border-radius: 8px; }
pre code { background: none; padding: 0; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 720px; padding-top: 32px; padding-bottom: 48px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--on-accent); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

/* header */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 5; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.1rem; color: var(--text); text-decoration: none; }
.brand-sub { font-weight: 400; color: var(--muted); }
.logo { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px;
  background: #714b67; color: #fff; font-weight: 700; }
.menu { position: relative; }
.menu summary { cursor: pointer; list-style: none; padding: 8px 12px; border: 1px solid var(--line);
  border-radius: 8px; font-weight: 600; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary::after { content: " \25BE"; }
.menu ul { position: absolute; right: 0; top: calc(100% + 6px); list-style: none; margin: 0; padding: 6px;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); min-width: 240px; }
.menu li a { display: block; padding: 8px 10px; border-radius: 6px; color: var(--text); text-decoration: none; }
.menu li a:hover { background: var(--accent-soft); }

/* hero */
.hero { background: linear-gradient(160deg, var(--accent-soft), var(--bg) 70%); padding: 36px 0 28px; border-bottom: 1px solid var(--line); }
.hero h1 { font-size: 1.9rem; margin: 0 0 .4em; max-width: 30ch; }
.lead { font-size: 1.1rem; color: var(--muted); max-width: 62ch; margin: 0 0 1em; }
.hero-search { display: flex; gap: 8px; max-width: 560px; }
.hero-search input { flex: 1; min-width: 0; }
.hero-points { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 18px 0 0; }
.hero-points li { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: .9rem; }
input, select { font: inherit; color: var(--text); background: var(--card); border: 1px solid var(--line);
  border-radius: 8px; padding: 10px 12px; min-height: 44px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 10px 18px;
  background: #714b67; color: #fff; border: 0; border-radius: 8px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:hover { background: #5b3a53; color: #fff; }
.store-buttons { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 8px; }
.btn-store { flex-direction: column; align-items: flex-start; gap: 0; padding: 10px 18px; font-size: 1rem; line-height: 1.3; }
.btn-store small { font-weight: 400; opacity: .9; font-size: .85rem; }
.note { color: var(--muted); font-size: .92rem; }

/* categories */
.cats { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; grid-template-columns: 1fr; }
.cats a { display: grid; gap: 2px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); color: var(--text); text-decoration: none; box-shadow: var(--shadow); height: 100%; }
.cats a:hover { border-color: var(--accent); }
.cat-name { font-weight: 700; font-size: 1.1rem; color: var(--accent); }
.cat-count { font-size: .9rem; color: var(--muted); }
.cat-desc { font-size: .92rem; }

/* cards */
.cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; grid-template-columns: 1fr; }
.card a { display: flex; flex-direction: column; height: 100%; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; background: var(--card); color: var(--text); text-decoration: none; box-shadow: var(--shadow); }
.card a:hover { border-color: var(--accent); }
.card img { display: block; width: 100%; aspect-ratio: 2 / 1; object-fit: cover; background: var(--bg-soft); }
.card-body { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 14px; flex: 1; }
.card-title { font-weight: 700; color: var(--accent); line-height: 1.3; }
.card-sum { font-size: .93rem; color: var(--muted); flex: 1; }
.card-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 6px; font-size: .9rem; }
.price { font-weight: 700; }
.price.free { color: var(--free); background: var(--free-bg); padding: 1px 8px; border-radius: 999px; }
.vers { color: var(--muted); }
[hidden] { display: none !important; }
.filters { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; margin: 0 0 16px; }
.filters label { display: grid; gap: 4px; font-size: .9rem; font-weight: 600; flex: 1 1 200px; }
.filters output { font-size: .9rem; color: var(--muted); padding-bottom: 10px; }
.contact { margin: 40px 0; padding: 20px; background: var(--bg-soft); border-radius: var(--radius); }
.contact h2 { margin-top: 0; }

/* breadcrumbs / category */
.crumbs { font-size: .9rem; color: var(--muted); margin: 16px 0 4px; }
.cat-head { margin-bottom: 20px; }

/* module page */
.module-head { display: grid; gap: 20px; align-items: start; }
.module-head h1 { margin-top: .3em; }
.banner { width: 100%; max-width: 560px; border-radius: var(--radius); border: 1px solid var(--line); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px 18px; margin: 0 0 8px; }
.facts div { min-width: 0; }
.facts .wide { grid-column: 1 / -1; }
.facts dt { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; }
.price-big { font-size: 1.4rem; color: var(--accent); }
.chips { list-style: none; padding: 0; margin: 2px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { background: var(--accent-soft); color: var(--accent-strong); border-radius: 6px; padding: 0 8px; font-size: .9rem; }
.desc { margin-top: 28px; border-top: 1px solid var(--line); padding-top: 8px; max-width: 900px; }
.desc img { display: block; margin: 14px 0 22px; border: 1px solid var(--line); border-radius: 8px; }
.desc ul, .desc ol { padding-left: 1.3em; }
.desc li { margin: .2em 0; }
.desc div { margin: .4em 0; }
.table-wrap { overflow-x: auto; margin: 1em 0; }
.desc table { border-collapse: collapse; width: 100%; font-size: .93rem; }
.desc th, .desc td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.desc th { background: var(--bg-soft); }
.video-frame { position: relative; aspect-ratio: 16 / 9; max-width: 900px; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: var(--radius); }
.video-frame video { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: var(--radius); background: #000; }
.cta { margin: 36px 0; padding: 20px; border-radius: var(--radius); background: var(--accent-soft); }
.cta h2 { margin-top: 0; }
.related { margin-bottom: 40px; }

/* footer */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-soft); padding: 20px 0 28px; font-size: .92rem; }
.site-footer p { margin: .4em 0; }
.fine { color: var(--muted); font-size: .85rem; }

@media (min-width: 600px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .cats { grid-template-columns: repeat(2, 1fr); }
  h1 { font-size: 2.1rem; }
  .hero h1 { font-size: 2.4rem; }
}
@media (min-width: 900px) {
  .cards { grid-template-columns: repeat(3, 1fr); }
  .cats { grid-template-columns: repeat(3, 1fr); }
  .hero { padding: 56px 0 40px; }
  .module-head { grid-template-columns: minmax(0, 1fr) minmax(0, 460px); }
  .module-head .banner { margin-top: 18px; }
}
@media (prefers-reduced-motion: no-preference) {
  .card a, .cats a { transition: border-color .15s; }
}
