:root {
  --ink: #2c5439;
  --ink-strong: #1c3826;
  --ink-soft: #e4ebe3;
  --on-ink: #ffffff;
  --marker: #ffe066;
  --bg: #f3f5f0;
  --surface: #ffffff;
  --fg: #17211b;
  --muted: #5a665c;
  --line: #dde3da;
  --hard: #d4433f;
  --hard-soft: #fce7e6;
  --easy: #3f6f1c;
  --easy-soft: #eaf1de;
  --font-display: "Bricolage Grotesque", "Onest", system-ui, sans-serif;
  --font-body: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #8fbf9c;
    --ink-strong: #b9d9c1;
    --ink-soft: #22362a;
    --on-ink: #111812;
    --bg: #111812;
    --surface: #182219;
    --fg: #e9f3ec;
    --muted: #a0b6a8;
    --line: #2a3a2d;
    --hard: #f08a86;
    --hard-soft: #3a1f1e;
    --easy: #a8d38a;
    --easy-soft: #1f2e17;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html[lang="pl"] [lang="en"],
html[lang="en"] [lang="pl"] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
}

a { color: var(--ink); font-weight: 600; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px max(16px, calc((100% - 960px) / 2));
}

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--fg); font-family: var(--font-display); font-weight: 800; font-size: 22px; }
.brand img { width: 36px; height: 36px; }

.lang-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.lang-switch button { border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; padding: 4px 12px; cursor: pointer; }
.lang-switch button[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); }

main { flex: 1; width: 100%; max-width: 720px; margin: 0 auto; padding: 24px 16px 48px; }
main.narrow { max-width: 440px; }

h1, h2, h3 { font-family: var(--font-display); line-height: 1.2; text-wrap: balance; }
h1 { font-size: clamp(28px, 6vw, 40px); margin: 8px 0 16px; }
h2 { font-size: 22px; margin: 32px 0 8px; }
h3 { font-size: 17px; margin: 20px 0 4px; }
p, li { max-width: 65ch; }

.lead { font-size: 18px; color: var(--muted); }
.muted { color: var(--muted); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 24px; }

form { display: grid; gap: 14px; }
label { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
input {
  font: inherit;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--fg);
}
input:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 12px;
  padding: 13px 20px;
  background: var(--ink);
  color: var(--on-ink);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.button.secondary { background: var(--ink-soft); color: var(--ink-strong); }
.button.danger { background: var(--hard); color: #ffffff; }
.button[disabled] { opacity: .6; cursor: progress; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

.notice { border-radius: 12px; padding: 12px 14px; font-weight: 600; }
.notice.error { background: var(--hard-soft); color: var(--hard); }
.notice.success { background: var(--easy-soft); color: var(--easy); }

.code { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 28px; letter-spacing: .12em; font-weight: 700; }

.hero { display: grid; gap: 20px; padding-top: 24px; }
.hero img { width: 96px; height: 96px; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-top: 24px; }
.features .card { padding: 18px; }
.features h3 { margin-top: 0; }

.legal h2 { border-top: 1px solid var(--line); padding-top: 20px; }
.legal table { border-collapse: collapse; width: 100%; font-size: 14px; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 8px; border-bottom: 1px solid var(--line); }
.table-wrap { overflow-x: auto; }

footer { padding: 24px 16px; text-align: center; color: var(--muted); font-size: 14px; }
footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin-bottom: 8px; }
