/* WowCodes documentation.
   Concept: a product handbook. Each product page opens on a masthead in that
   product's own colour (taken from its listing palette), set in Unbounded;
   the reading column below is quiet, printed-page typography in Onest, with
   one accent per product. Numbers are type, not badges; notes are tinted
   paragraphs, not boxes; code sits on dark slate in both themes. */

@font-face { font-family: 'Onest'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('fonts/onest-latin.woff2') format('woff2'); }
@font-face { font-family: 'Unbounded'; font-style: normal; font-weight: 500 800; font-display: swap; src: url('fonts/unbounded-latin.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/jetbrains-mono-500-latin.woff2') format('woff2'); }

:root {
  --paper: #f7f6f2; --sheet: #ffffff; --ink: #15171c; --ink-2: #51555f; --ink-3: #868a94; --rule: #e4e2dc; --tint: #efede7;
  --slate: #1b1e25; --slate-ink: #e6e8ee;
  --info-bg: #eaf0fb; --info: #24479f; --warn-bg: #fbf1d9; --warn: #7a5200; --stop-bg: #fbe7e4; --stop: #9d2a1e; --ok: #1e7a46;
  --p: #2b1a7a; --p-2: #3a2394; --p-on: #ffffff; --p-mark: #f5c542; --p-text: #4b33c4;
  --body: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Unbounded', 'Onest', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #111216; --sheet: #17191e; --ink: #ecedf1; --ink-2: #b5b9c3; --ink-3: #848995; --rule: #2a2c33; --tint: #1d1f25;
    --slate: #0b0c0f; --info-bg: #17213a; --info: #9cb6ff; --warn-bg: #2a2314; --warn: #f0c46a; --stop-bg: #2e1a18; --stop: #ff9b8f; --ok: #6cd39a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #111216; --sheet: #17191e; --ink: #ecedf1; --ink-2: #b5b9c3; --ink-3: #848995; --rule: #2a2c33; --tint: #1d1f25;
  --slate: #0b0c0f; --info-bg: #17213a; --info: #9cb6ff; --warn-bg: #2a2314; --warn: #f0c46a; --stop-bg: #2e1a18; --stop: #ff9b8f; --ok: #6cd39a;
  color-scheme: dark;
}

/* Product palettes, from each listing's own colours. --p-text is the
   colour as text on paper; in dark mode the accent mark is used instead. */
body[data-product="home"], body[data-product="kb"] { --p: #15171c; --p-2: #2a2d35; --p-mark: #f5c542; --p-text: #15171c; }
body[data-product="prizex"]            { --p: #26166b; --p-2: #3a2394; --p-mark: #f5c542; --p-text: #4b33c4; }
body[data-product="prizex-rewards"]    { --p: #3d1d8f; --p-2: #5a2fbf; --p-mark: #f5c542; --p-text: #5a2fbf; }
body[data-product="raffking-standard"] { --p: #0b1f8f; --p-2: #1336d8; --p-mark: #ffc21f; --p-text: #1336d8; }
body[data-product="raffking-rewards"]  { --p: #0b1f8f; --p-2: #2b55ff; --p-mark: #ffc21f; --p-text: #1336d8; }
body[data-product="bidking-starter"]   { --p: #1d4ed8; --p-2: #2563eb; --p-mark: #bfdbfe; --p-text: #1d4ed8; }
body[data-product="bidking-plus"]      { --p: #1d1f22; --p-2: #2c2f33; --p-mark: #f2c230; --p-text: #1d1f22; }
body[data-product="bidking-pro"]       { --p: #1d4a3a; --p-2: #24604b; --p-mark: #d9b46a; --p-text: #1d4a3a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body { --p-text: var(--p-mark); } :root:not([data-theme="light"]) body[data-product="home"], :root:not([data-theme="light"]) body[data-product="kb"] { --p-text: #f5c542; } }
:root[data-theme="dark"] body { --p-text: var(--p-mark); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.7 var(--body); }
a { color: var(--p-text); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--p-2); outline-offset: 2px; border-radius: 4px; }
img { max-width: 100%; height: auto; }
::selection { background: var(--p-mark); color: #15171c; }

/* Top bar: ink, with the product's colour as a hairline underneath */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; display: flex; align-items: center; gap: 6px; height: 60px;
  padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(14px, env(safe-area-inset-right, 0px));
  background: rgba(18,19,24,.94); -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px); color: #e9eaee;
  box-shadow: inset 0 -1px 0 rgba(255,255,255,.07); }
.top::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--p-mark); opacity: .9; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 21; background: #121318; }
.brand { display: flex; align-items: center; gap: 10px; margin-right: 18px; color: inherit; text-decoration: none; white-space: nowrap; }
.brand .mark { width: 34px; height: auto; aspect-ratio: 464 / 262; flex: none; display: block; }
.brand b { font: 700 17px/1 var(--display); letter-spacing: -.01em; }
.brand .sep { width: 1px; height: 18px; background: #3a3d48; }
.brand i { font: 500 15px/1 var(--body); font-style: normal; color: #a9adba; }
.top-nav { display: flex; gap: 2px; }
.top-nav a { color: #b9bdc9; text-decoration: none; font-size: 15px; padding: 8px 12px; border-radius: 8px; }
.top-nav a:hover { color: #fff; background: rgba(255,255,255,.06); }
.top-nav a[aria-current="page"] { color: #fff; }
.search { width: 260px; margin-left: auto; margin-right: 4px; position: relative; }
.search input { width: 100%; font: 400 14px/1 var(--body); color: #e9eaee; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: 999px; padding: 9px 36px 9px 34px; transition: width .2s ease, border-color .15s ease; }
.search input::placeholder { color: #8f93a0; }
.search input:focus { border-color: var(--p-mark); background: rgba(255,255,255,.09); outline: none; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #8f93a0; pointer-events: none; }
.search kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font: 500 11px/1 var(--mono); color: #8f93a0; border: 1px solid rgba(255,255,255,.14); border-radius: 5px; padding: 3px 6px; }
.results { position: absolute; top: calc(100% + 10px); right: 0; width: min(440px, calc(100vw - 32px)); background: var(--sheet); color: var(--ink); border: 1px solid var(--rule);
  border-radius: 10px; box-shadow: 0 18px 50px rgba(10,10,20,.22); max-height: 60vh; overflow: auto; padding: 6px; }
.results a { display: block; padding: 9px 12px; border-radius: 7px; color: var(--ink); text-decoration: none; font-weight: 500; }
.results a:hover, .results a[aria-selected="true"] { background: var(--tint); }
.results small { display: block; color: var(--ink-3); font-size: 13px; font-weight: 400; }
.top-link { color: #c9ccd5; text-decoration: none; font-size: 15px; }
.top-link:hover { color: #fff; }
.icon-btn { background: none; border: 0; color: #c9ccd5; padding: 8px; cursor: pointer; line-height: 0; border-radius: 8px; }
.icon-btn:hover { background: #1e2028; color: #fff; }
.menu-btn { display: none; }
.search-btn { display: none; }

/* Masthead: the product's own colour */
.mast { background: var(--p); color: var(--p-on); position: relative; overflow: hidden; }
.mast::after { content: ""; position: absolute; right: -80px; top: -120px; width: 460px; height: 460px; border-radius: 50%;
  background: radial-gradient(closest-side, var(--p-2), transparent); opacity: .9; pointer-events: none; }
.mast-in { position: relative; z-index: 1; max-width: 1280px; margin: 0 auto; padding-block: 34px 32px;
  padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.landing .mast-in { padding-block: 52px 46px; }
.crumbs { font-size: 14px; margin-bottom: 8px; opacity: .8; }
.crumbs a { color: inherit; text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.kind { display: inline-block; font-size: 14px; font-weight: 600; color: var(--p-mark); margin-bottom: 10px; }
.mast h1 { font: 700 clamp(26px, 3.6vw, 40px)/1.12 var(--display); letter-spacing: -.02em; margin: 0; max-width: 24ch; text-wrap: balance; }
.landing .mast h1 { font-size: clamp(30px, 4.6vw, 54px); max-width: 18ch; }
.lede { font-size: 18.5px; line-height: 1.55; margin: 14px 0 0; max-width: 60ch; opacity: .9; }
.specline { display: flex; flex-wrap: wrap; margin: 30px 0 0; padding: 0; list-style: none; border-top: 1px solid rgba(255,255,255,.2); }
.specline li { padding: 16px 28px 0 0; margin: 0 28px 0 0; border-right: 1px solid rgba(255,255,255,.2); line-height: 1.25; }
.specline li:last-child { border-right: 0; }
.specline b { display: block; font: 700 26px/1 var(--display); color: var(--p-mark); }
.specline span { font-size: 14px; opacity: .85; }

/* Layout */
.frame { display: grid; grid-template-columns: 250px minmax(0, 1fr) 210px; max-width: 1280px; margin: 0 auto; gap: 0 8px; }
.rail { position: sticky; top: 62px; align-self: start; max-height: calc(100vh - 62px); overflow: auto; padding: 30px 12px 40px 20px; }
.rail h4 { margin: 26px 0 8px 12px; font: 600 13px/1.2 var(--body); color: var(--ink); }
.rail a { display: block; padding: 5px 12px; color: var(--ink-2); text-decoration: none; font-size: 15px; line-height: 1.4; border-radius: 6px; position: relative; }
.rail a:hover { color: var(--ink); background: var(--tint); }
.rail a[aria-current="page"] { color: var(--p-text); font-weight: 600; }
.rail a[aria-current="page"]::before { content: ""; position: absolute; left: 0; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--p-mark); box-shadow: 0 0 0 2px var(--p-2); }
.rail .soon { color: var(--ink-3); pointer-events: none; }
.switch { display: grid; gap: 6px; margin: 0 0 6px 12px; }
.switch label { font-size: 13px; color: var(--ink-3); }
.switch select { font: 600 15px var(--body); color: var(--ink); background: var(--sheet); border: 1px solid var(--rule); border-radius: 8px; padding: 9px 10px; }

main { min-width: 0; padding: 30px 28px 90px; }
.doc { max-width: 72ch; }
h2 { font: 700 24px/1.25 var(--display); letter-spacing: -.015em; margin: 56px 0 14px; text-wrap: balance; scroll-margin-top: 82px; }
.doc > h2:first-child, .doc > .shot:first-child + h2 { margin-top: 8px; }
h3 { font: 600 19px/1.35 var(--body); margin: 34px 0 8px; scroll-margin-top: 82px; }
h2 .anchor, h3 .anchor { margin-left: 8px; color: var(--ink-3); text-decoration: none; opacity: 0; font-weight: 400; font-family: var(--body); }
h2:hover .anchor, h3:hover .anchor { opacity: 1; }
p, ul, ol { margin: 0 0 18px; }
li { margin: 5px 0; }
li > ul, li > ol { margin: 6px 0 0; }
ul { padding-left: 1.2em; }
ul li::marker { color: var(--ink-3); }
strong { font-weight: 650; }
code { font: 500 .86em var(--mono); background: var(--tint); padding: 2px 6px; border-radius: 5px; overflow-wrap: anywhere; }
.ui { font-weight: 600; color: var(--ink); }
.ui + .ui::before { content: "→"; color: var(--ink-3); font-weight: 400; margin: 0 .4em; }

/* Code on dark slate in both themes */
.code { position: relative; margin: 6px 0 22px; background: var(--slate); border-radius: 10px; overflow: hidden; }
.code .label { display: block; padding: 10px 16px 0; font: 500 12.5px/1 var(--body); color: #8e93a1; }
.code pre { margin: 0; padding: 12px 84px 16px 16px; overflow-x: auto; color: var(--slate-ink); font: 500 14px/1.65 var(--mono); }
.code pre code { background: none; padding: 0; font-size: inherit; color: inherit; }
.copy { position: absolute; top: 8px; right: 8px; font: 500 12.5px/1 var(--body); background: #2a2e38; color: #d6d9e1; border: 0; border-radius: 6px; padding: 7px 10px; cursor: pointer; }
.copy:hover { background: #363a46; }
.copy.done { background: #1e5a3a; color: #d9f5e6; }

/* Notes: a tinted paragraph with a lead word */
.call { background: var(--info-bg); color: var(--ink); border-radius: 10px; padding: 14px 18px; margin: 0 0 20px; }
.call > :last-child { margin-bottom: 0; }
.call b.t { font-weight: 700; color: var(--info); margin-right: 6px; }
.call b.t + p { display: inline; }
.call b.t + p + * { margin-top: 10px; }
.call.warn { background: var(--warn-bg); } .call.warn b.t { color: var(--warn); }
.call.stop { background: var(--stop-bg); } .call.stop b.t { color: var(--stop); }

/* Procedures: big numerals hanging in the margin */
.steps { list-style: none; counter-reset: s; padding: 0; margin: 10px 0 26px; }
.steps > li { counter-increment: s; position: relative; padding: 0 0 22px 64px; margin: 0; }
.steps > li::before { content: counter(s, decimal-leading-zero); position: absolute; left: 0; top: 2px; font: 700 22px/1 var(--display); color: var(--p-text); letter-spacing: -.02em; }
.steps > li + li { border-top: 1px solid var(--rule); padding-top: 22px; }
.steps > li + li::before { top: 24px; }
.steps > li > h3, .steps > li > strong:first-child { display: block; margin: 0 0 6px; font: 600 18.5px/1.35 var(--body); }

/* Tables */
.tablewrap { overflow-x: auto; margin: 6px 0 24px; border-top: 2px solid var(--ink); }
table { border-collapse: collapse; width: 100%; font-size: 15.5px; }
th, td { text-align: left; padding: 11px 14px 11px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-weight: 600; font-size: 13.5px; color: var(--ink-2); }
td:first-child { font-weight: 600; padding-right: 22px; }
td.num { font-variant-numeric: tabular-nums; }

/* Small lists */
.facts { display: none; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 18px; padding: 0; list-style: none; }
.tags li { margin: 0; font: 500 14.5px/1 var(--body); padding: 8px 12px; border-radius: 999px; background: var(--sheet); border: 1px solid var(--rule); }
.check { list-style: none; padding: 0; }
.check li { padding-left: 28px; position: relative; }
.check li::before { content: ""; position: absolute; left: 3px; top: .58em; width: 11px; height: 6px; border-left: 2px solid var(--p-text); border-bottom: 2px solid var(--p-text); transform: rotate(-45deg); }

/* Screenshots */
.shot { margin: 8px 0 30px; }
.shot img { display: block; width: 100%; border-radius: 12px; box-shadow: 0 0 0 1px var(--rule), 0 24px 50px -24px rgba(20,20,40,.4); }
.shot figcaption { font-size: 14px; color: var(--ink-3); margin-top: 10px; }

/* Start page: products as a typeset index */
.families { display: grid; gap: 40px; margin: 6px 0 20px; }
.family h2 { margin: 0 0 6px; font: 600 15px/1.2 var(--body); color: var(--ink-3); letter-spacing: 0; }
.prod { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 18px 0; border-top: 1px solid var(--rule); color: var(--ink); text-decoration: none; }
.family .prod:last-child { border-bottom: 1px solid var(--rule); }
.prod .sw { width: 54px; height: 54px; border-radius: 14px; display: block; object-fit: cover; box-shadow: 0 0 0 1px var(--rule); }
h1.with-logo { display: flex; align-items: center; gap: 14px; }
h1.with-logo > span { min-width: 0; }
.plogo { width: 1.1em; height: 1.1em; border-radius: 22%; flex: none; box-shadow: 0 0 0 1px var(--rule); }
.prod b { display: block; font: 700 20px/1.2 var(--display); letter-spacing: -.01em; }
.prod p { margin: 4px 0 0; color: var(--ink-2); font-size: 15.5px; line-height: 1.5; }
.prod .go { color: var(--ink-3); font-size: 14px; white-space: nowrap; }
a.prod:hover b { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
a.prod:hover .go { color: var(--ink); }
.prod.soon { opacity: .6; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 64px; }
.pager a { display: block; padding: 16px 18px; border: 1px solid var(--rule); border-radius: 10px; text-decoration: none; color: var(--ink); background: var(--sheet); }
.pager a:hover { border-color: var(--p-2); }
.pager small { display: block; color: var(--ink-3); font-size: 13px; margin-bottom: 2px; }
.pager .next { grid-column: 2; text-align: right; }

.toc { position: sticky; top: 62px; align-self: start; padding: 34px 20px 0 8px; font-size: 14px; }
.toc b { display: block; font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 10px; }
.toc a { display: block; color: var(--ink-3); text-decoration: none; padding: 4px 0; line-height: 1.4; }
.toc a:hover { color: var(--ink); }
.toc a.on { color: var(--p-text); font-weight: 600; }
.foot { color: var(--ink-3); font-size: 14px; margin-top: 40px; }

@media (max-width: 1040px) { .top-nav a:not([aria-current]):nth-child(1) { display: none; } }
@media (max-width: 1180px) { .frame { grid-template-columns: 240px minmax(0, 1fr); } .toc { display: none; } }
@media (max-width: 860px) {
  .frame { grid-template-columns: minmax(0, 1fr); }
  .menu-btn { display: inline-flex; }
  .rail { position: fixed; z-index: 30; top: 62px; left: 0; bottom: 0; max-height: none; width: min(86vw, 320px); background: var(--sheet);
    transform: translateX(-102%); transition: transform .2s ease; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
  body.nav-open .rail { transform: none; }
  .brand { margin-right: auto; }
  .brand i, .brand .sep, .top-nav, .search kbd { display: none; }
  .search-btn { display: inline-flex; }
  .search { display: none; position: absolute; left: 12px; right: 12px; top: 10px; width: auto; margin: 0; z-index: 2; }
  .search input { padding-block: 10px; background: #1e2028; }
  body.search-open .search { display: block; }
  body.search-open .search-btn, body.search-open #theme, body.search-open .brand, body.search-open .menu-btn { visibility: hidden; }
  main { padding: 26px max(18px, env(safe-area-inset-right, 0px)) 80px max(18px, env(safe-area-inset-left, 0px)); }
  .specline li { padding-right: 16px; margin-right: 16px; }
  .steps > li { padding-left: 46px; }
  .prod { grid-template-columns: 44px minmax(0, 1fr); } .prod .sw { width: 44px; height: 44px; border-radius: 12px; } .prod .go { display: none; }
  .pager { grid-template-columns: 1fr; } .pager .next { grid-column: 1; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Buy card on a product overview's masthead */
.mast-in.has-buy { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; align-items: start; }
.mast-main { min-width: 0; }
.buy { background: var(--sheet); color: var(--ink); border-radius: 14px; padding: 22px 22px 20px; box-shadow: 0 24px 60px -24px rgba(0,0,0,.45); }
.buy[hidden] { display: none; }
.buy-k { margin: 0 0 10px; font-size: 13px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; }
.buy-price { margin: 0 0 14px; display: flex; flex-direction: column; gap: 2px; }
.buy-price b { font: 700 32px/1.1 var(--display); color: var(--ink); }
.buy-price span { font-size: 14px; color: var(--ink-3); }
.buy-facts { list-style: none; margin: 0 0 18px; padding: 14px 0 0; border-top: 1px solid var(--rule); display: grid; gap: 8px; font-size: 15px; }
.buy-facts li { padding-left: 24px; position: relative; color: var(--ink-2); }
.buy-facts li::before { content: ""; position: absolute; left: 2px; top: .45em; width: 12px; height: 7px; border-left: 2px solid var(--p-text); border-bottom: 2px solid var(--p-text); transform: rotate(-45deg); }
.buy-facts li[hidden] { display: none; }
.buy-btn { display: block; text-align: center; background: var(--p); color: var(--p-on, #fff); text-decoration: none; font-weight: 600; padding: 13px 16px; border-radius: 10px; }
.buy-btn:hover { filter: brightness(1.12); }
@media (max-width: 960px) { .mast-in.has-buy { grid-template-columns: minmax(0, 1fr); gap: 24px; } .buy { max-width: 420px; } }
.buy-where { margin: 10px 0 0; text-align: center; font-size: 13px; color: var(--ink-3); }
