:root {
  --accent: #ffcd05;          /* żółty ECUMASTER: RGB 255/205/5, RAL 1023 (brand book) */
  --accent-ink: #16181c;      /* tekst na żółtym tle */
  --accent-text: #7a5c00;     /* żółty jako kolor tekstu na jasnym tle (czytelność) */
  --bg: #f4f5f7;
  --surface: #ffffff;
  --ink: #16181c;
  --muted: #5d6470;
  --line: #e2e5ea;
  --top: #111316;
  --thumb: #1d2025;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 4px 14px rgba(0,0,0,.05);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1113; --surface: #181b1f; --ink: #eef0f3; --muted: #9aa2ad; --line: #2a2f36;
    --top: #08090a; --thumb: #0b0c0e; --shadow: none; --accent-text: #ffcd05;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 "Open Sans", system-ui, sans-serif; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.2; margin: 0; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* top bar */
.topbar { background: var(--top); color: #fff; position: sticky; top: 0; z-index: 10; border-bottom: 3px solid var(--accent); }
.topbar-inner { display: flex; align-items: center; gap: 24px; min-height: 58px; flex-wrap: wrap; }
.brand { font-weight: 700; letter-spacing: .06em; text-decoration: none; font-size: 17px; color: var(--accent); }
.brand span { font-weight: 400; letter-spacing: 0; opacity: .7; margin-left: 6px; }
.topnav { display: flex; gap: 4px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.topnav::-webkit-scrollbar { display: none; }
.subselect { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 14px; font-weight: 600; }
.subselect select { font: inherit; font-weight: 600; min-width: 0; max-width: 100%; flex: 0 1 auto; padding: 7px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.topnav a { white-space: nowrap; text-decoration: none;padding: 6px 12px; border-radius: 6px; opacity: .75; font-size: 14px; }
.topnav a:hover { opacity: 1; background: rgba(255,255,255,.08); }
.topnav a.active { opacity: 1; background: rgba(255,255,255,.12); }
.mode { margin-left: auto; font-size: 12px; background: #f5b70033; color: #ffd667; padding: 3px 10px; border-radius: 99px; }
.mode:empty { display: none; }

/* hero */
.hero { padding: 40px 0 24px; }
.hero h1 { font-size: clamp(24px, 4vw, 34px); }
.hero p { color: var(--muted); margin: 8px 0 20px; max-width: 60ch; }
.search input {
  width: 100%; max-width: 560px; font: inherit; padding: 12px 16px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
}
.search input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

/* sections */
.block { margin: 28px 0 36px; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.block-head h2 { font-size: 19px; }
.link { color: var(--accent-text);text-decoration: none; font-weight: 600; font-size: 14px; }
.empty { color: var(--muted); padding: 40px 0; }
.login { max-width: 340px; margin: 12vh auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px 24px; }
.login h1 { font-size: 22px; margin: 0 0 6px; }
.login p { color: var(--muted); font-size: 14px; margin: 0 0 16px; }
.login input[type=password] { width: 100%; box-sizing: border-box; font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); color: var(--ink); }
.login input[type=password]:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.login .login-err { color: #d64545; font-size: 13px; min-height: 18px; margin: 6px 0 8px; }
.login .btn { width: 100%; padding: 10px 14px; font-size: 14px; }
.login-remember { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; margin-top: 14px; }

/* product cards */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.pcard { display: block; text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .15s, border-color .15s; }
.pcard:hover { transform: translateY(-2px); border-color: var(--accent); }
.pcard-img { position: relative; aspect-ratio: 16 / 10; background: var(--thumb); }
.pcard-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pcard-badges { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; }
.pcard-body { padding: 14px 16px 16px; }
.pcard-body h3 { font-size: 17px; }
.pcard-body p { margin: 4px 0 8px; color: var(--muted); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard-meta { font-size: 12px; color: var(--muted); }

.badge { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 3px 8px; border-radius: 4px; background: #000a; color: #fff; vertical-align: middle; }
.badge-new { background: var(--accent); color: var(--accent-ink); }

/* product page */
.crumbs { padding: 20px 0 0; font-size: 13px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.phead { display: flex; justify-content: space-between; gap: 24px; padding: 14px 0 22px; flex-wrap: wrap; }
.phead h1 { font-size: clamp(24px, 4vw, 32px); }
.tagline { color: var(--muted); margin: 6px 0 0; font-size: 16px; }
.desc { max-width: 70ch; margin: 12px 0 0; }
.launch { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 16px; align-self: flex-start; }
.launch span { display: block; font-size: 12px; color: var(--muted); }
.related { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; font-size: 13px; color: var(--muted); }
.chip { text-decoration: none; padding: 4px 10px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 600; }
.chip:hover { border-color: var(--accent); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { text-decoration: none; padding: 10px 14px; font-weight: 600; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab span { font-weight: 400; font-size: 12px; margin-left: 4px; }
.tab.active { color: var(--ink); border-color: var(--accent); }

.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 0; }
.langs { display: flex; gap: 6px; flex-wrap: wrap; }
.lang { font: inherit; font-size: 13px; padding: 5px 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.lang.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.variants { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 14px; }
.variant { font: inherit; font-size: 14px; font-weight: 600; padding: 7px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.variant:hover { border-color: var(--ink); }
.variant.active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.hint { margin: -4px 0 14px; font-size: 13px; color: var(--muted); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; font: inherit; font-size: 13px; font-weight: 600; padding: 7px 14px; border-radius: 7px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; cursor: pointer; }
.btn:hover { border-color: var(--ink); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.08); border-color: var(--accent); }
.btn-ghost { border-color: transparent; color: var(--muted); }
.btn:disabled { opacity: .6; cursor: progress; }

/* asset cards */
.agrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; padding-bottom: 20px; }
.asset { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.thumb { position: relative; aspect-ratio: 4 / 3; background: var(--thumb); display: grid; place-items: center; }
.thumb img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.thumb .badge { position: absolute; top: 8px; left: 8px; }
.ext { color: #fff; font-weight: 700; opacity: .6; letter-spacing: .1em; }
.asset-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.asset-product { font-size: 12px; font-weight: 600; color: var(--accent-text);text-decoration: none; }
.asset h3 { font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.meta { margin: 0; font-size: 12px; color: var(--muted); }
.meta.dim { opacity: .8; }
.meta.shared { color: var(--accent-text); font-weight: 600; }
.actions { display: flex; gap: 6px; margin-top: auto; padding-top: 10px; flex-wrap: wrap; }

.footer { color: var(--muted); font-size: 12px; padding: 30px 16px 40px; border-top: 1px solid var(--line); margin-top: 20px; }

.toast { position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 30px); opacity: 0; pointer-events: none; background: var(--top); color: #fff; padding: 10px 16px; border-radius: 8px; font-size: 14px; max-width: calc(100% - 32px); transition: .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 600px) {
  .topbar-inner { gap: 8px; padding-top: 8px; padding-bottom: 8px; }
  .mode { margin-left: 0; }
  .agrid { grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); }
}
