/* Dark only, like the other Lotka24 microsites; tokens and the top bar follow statystyka.lotka24.pl.
   Only the preview background switches (--pv), because a picture may be made for a light e-mail. */
:root {
  --bg: #0A0F16;
  --bg-hi: #14233A;
  --text: #F0F5FA;
  --dim: rgba(240, 245, 250, 0.72);
  --faint: #93a4b6;
  --sheet: #111923;
  --sheet-2: #172230;
  --line: rgba(118, 205, 255, 0.18);
  --line-hi: rgba(118, 205, 255, 0.42);
  --blue: #76CDFF;
  --blue-tint: rgba(118, 205, 255, 0.14);
  --gold: #FAC775;
  --up: #5fd08a;
  --red: #ff8a89;
  --pv: #172230;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, Menlo, monospace;
  color-scheme: dark;
}
body[data-bg="light"] { --pv: #F2F5F8; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: radial-gradient(120% 60vh at 50% 0, var(--bg-hi) 0, var(--bg) 100%) no-repeat, var(--bg);
  color: var(--text);
  font: 400 16px/1.45 "Barlow", system-ui, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
h1, h2 { font-family: "Bebas Neue", "Barlow", sans-serif; font-weight: 400; letter-spacing: .01em; margin: 0; }
h3, p { margin: 0; }
button, input { font-family: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.sprite { position: absolute; }
.sprite symbol, .ic { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* ---- Top bar ---- */
.top { display: flex; align-items: center; justify-content: space-between; max-width: 1120px; margin: 0 auto; padding: calc(10px + env(safe-area-inset-top)) 16px 10px; }
.brand { display: flex; align-items: center; font: 400 22px "Bebas Neue", sans-serif; letter-spacing: .03em; min-height: 44px; }
.brand img { width: 34px; height: 34px; object-fit: contain; margin-right: 8px; }
.brand b, .foot b { font-weight: 400; color: var(--blue); }
.brand em { font: 500 13px "Barlow", sans-serif; font-style: normal; letter-spacing: 0; color: var(--dim); margin-left: 4px; }
.top-count { font-weight: 600; font-size: 13px; color: var(--dim); padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; }
.top-count:empty { display: none; }

/* ---- Title and the preview background switch ---- */
.hero { max-width: 1120px; margin: 0 auto; padding: 4px 16px 16px; }
h1 { font-size: clamp(38px, 10vw, 60px); line-height: .96; }
h1 span { color: var(--blue); }
.lead { font-size: clamp(15px, 2vw, 18px); color: var(--dim); margin-top: 6px; }
.bg-pick { display: flex; align-items: center; margin-top: 14px; }
.bg-pick > span { font-size: 13px; font-weight: 600; color: var(--faint); margin-right: 10px; }
.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--sheet); border: 1px solid var(--line); }
.seg button { min-height: 38px; padding: 0 13px; border: 0; border-radius: 7px; background: transparent; color: var(--dim); font-weight: 600; font-size: 14px; cursor: pointer; }
.seg button + button { margin-left: 2px; }
.seg button[aria-pressed="true"] { background: var(--blue-tint); color: var(--blue); box-shadow: inset 0 0 0 1px var(--line-hi); }

/* ---- Search and groups: stay in reach while the list scrolls ---- */
.tools { position: sticky; top: 0; z-index: 10; background: var(--bg); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 10px 16px; }
.tools-in { max-width: 1088px; margin: 0 auto; }
.search { position: relative; display: block; }
.search .ic { position: absolute; left: 13px; top: 50%; width: 18px; height: 18px; margin-top: -9px; color: var(--faint); pointer-events: none; }
/* 16px text: a smaller field makes iOS zoom the page on focus. */
.search input { width: 100%; min-height: 44px; padding: 0 12px 0 40px; border: 1px solid var(--line); border-radius: 10px; background: var(--sheet); color: var(--text); font-weight: 500; font-size: 16px; -webkit-appearance: none; appearance: none; }
.search input::placeholder { color: var(--faint); }
.search input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(118, 205, 255, .18); }
.chips { display: flex; overflow-x: auto; margin: 10px -16px 0; padding: 0 16px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; margin-right: 8px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--dim); font-weight: 600; font-size: 14px; white-space: nowrap; cursor: pointer; }
.chip b { font-weight: 500; font-size: 12px; color: var(--faint); margin-left: 7px; }
.chip:hover { border-color: var(--line-hi); }
.chip:active, .seg button:active, .ghost:active { transform: scale(.97); }
.chip[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: #06202f; }
.chip[aria-pressed="true"] b { color: rgba(6, 32, 47, .7); }

/* ---- Groups and tiles ---- */
#list { animation: rise .35s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.group { max-width: 1120px; margin: 0 auto; padding: 22px 16px 4px; }
.group h2 { display: flex; align-items: baseline; font-size: clamp(27px, 5vw, 36px); line-height: 1; margin-bottom: 12px; }
.group h2 small { font: 600 13px "Barlow", sans-serif; letter-spacing: 0; color: var(--faint); margin-left: 10px; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.card { display: flex; flex-direction: column; min-width: 0; padding: 8px; background: var(--sheet); border: 1px solid var(--line); border-radius: 14px; }
.card:hover { border-color: var(--line-hi); }

.pv { position: relative; display: grid; place-items: center; height: 124px; border-radius: 9px; overflow: hidden; background: var(--pv); }
body[data-bg="check"] .pv { background: conic-gradient(#cfd6dd 25%, #eef1f4 0 50%, #cfd6dd 0 75%, #eef1f4 0) 0 0 / 16px 16px; }
.pv img { display: block; max-width: calc(100% - 16px); max-height: calc(100% - 16px); object-fit: contain; }
.pv .ic { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; padding: 6px; border-radius: 50%; background: rgba(10, 15, 22, .72); color: #F0F5FA; opacity: .85; }
.pv:hover .ic { opacity: 1; background: rgba(10, 15, 22, .9); }

.name { margin-top: 8px; font-weight: 700; font-size: 14px; line-height: 1.25; overflow-wrap: anywhere; }
.facts { display: flex; flex-wrap: wrap; align-items: center; margin-top: 4px; }
.tag { position: relative; margin: 2px 6px 2px 0; padding: 2px 7px; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: var(--dim); font-weight: 700; font-size: 11px; line-height: 1.5; letter-spacing: .04em; }
.tag[aria-pressed] { cursor: pointer; }
.tag[aria-pressed]::after { content: ""; position: absolute; top: -9px; right: -3px; bottom: -9px; left: -3px; }
.tag.on { border-color: var(--line-hi); background: var(--blue-tint); color: var(--blue); }
.meta { font-size: 12.5px; color: var(--faint); white-space: nowrap; }
.note { display: flex; align-items: center; margin-top: 5px; font-size: 12px; line-height: 1.25; color: var(--gold); }
.note .ic { flex: none; width: 14px; height: 14px; margin-right: 5px; }
/* The whole address stays visible and one tap selects all of it, for copying by hand. */
.url { flex: 1; margin-top: 7px; font: 400 11.5px/1.4 var(--mono); overflow-wrap: anywhere; -webkit-user-select: all; user-select: all; }
.url span { color: var(--faint); }

.copy { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 44px; margin-top: 8px; padding: 0 8px; border: 0; border-radius: 10px; background: var(--blue-tint); color: var(--blue); font-weight: 700; font-size: 14px; cursor: pointer; transition: background-color .15s ease, color .15s ease, transform .1s ease; }
.copy .ic { flex: none; width: 17px; height: 17px; margin-right: 7px; }
.copy:hover { background: rgba(118, 205, 255, .24); }
.copy:active { transform: scale(.98); }
.copy.done { background: rgba(95, 208, 138, .16); color: var(--up); }
.copy.fail { background: rgba(226, 75, 74, .18); color: var(--red); }

/* ---- Loading, nothing found ---- */
.state { display: flex; flex-direction: column; align-items: center; color: var(--dim); text-align: center; padding: 56px 16px; }
.spinner { width: 36px; height: 36px; margin-bottom: 12px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--blue); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { display: flex; flex-direction: column; align-items: center; padding: 56px 16px 64px; color: var(--dim); text-align: center; }
.empty .ic { width: 34px; height: 34px; margin-bottom: 10px; color: var(--faint); }
.empty p { font-weight: 600; font-size: 17px; }
.ghost { display: inline-flex; align-items: center; min-height: 44px; margin-top: 14px; padding: 0 18px; border: 1px solid var(--line-hi); border-radius: 10px; background: transparent; color: var(--blue); font-weight: 700; font-size: 14px; cursor: pointer; }

.foot { display: flex; justify-content: space-between; align-items: center; max-width: 1120px; margin: 28px auto 0; padding: 14px 16px calc(22px + env(safe-area-inset-bottom)); font-size: 14px; color: var(--dim); border-top: 1px solid var(--line); }
.foot span:first-child { font: 400 18px "Bebas Neue", sans-serif; letter-spacing: .03em; color: var(--text); }

@media (max-width: 359px) {
  .bg-pick { flex-direction: column; align-items: flex-start; }
  .bg-pick > span { margin: 0 0 6px; }
}
@media (min-width: 600px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
  .pv { height: 140px; }
}
@media (min-width: 760px) {
  .hero { display: flex; align-items: flex-end; justify-content: space-between; padding-bottom: 20px; }
  .bg-pick { margin-top: 0; }
  .tools-in { display: flex; align-items: flex-start; }
  .search { flex: none; width: 230px; margin-right: 14px; }
  /* A mouse cannot swipe a row of chips, so they wrap here; smaller, to stay within two rows. */
  .chips { flex: 1; flex-wrap: wrap; overflow: visible; margin: 0 0 -6px; padding: 0; }
  .chip { min-height: 36px; padding: 0 11px; margin: 0 6px 6px 0; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  #list, .spinner { animation: none; }
  .copy { transition: none; }
}
