/* sp9uob.verox.pl - wspólny arkusz stron projektów.
   Na bazie support.verox.pl: fonty systemowe (bez CDN), tryb jasny/ciemny
   z prefers-color-scheme, bez JS. Kolory jak na support: granat i pomarańcz. */

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --fg: #1d1d1f;
  --muted: #5f6368;
  --line: #d8dce3;
  --card: #f4f6f9;
  --link: #1a56a8;
  --accent: #e8701a;
  --warn: #b3261e;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1216;
    --fg: #ecedef;
    --muted: #a3a8b0;
    --line: #2f353d;
    --card: #181c22;
    --link: #79b0ff;
    --accent: #f5893a;
    --warn: #ffb4b4;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0 auto;
  max-width: 46rem;
  padding: 1rem 1rem 3rem;
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--fg);
  background: var(--bg);
}

a { color: var(--link); text-underline-offset: 2px; }
h1 { font-size: 1.7rem; line-height: 1.25; margin: 2rem 0 .5rem; }
h2 { font-size: 1.2rem; margin: 2.2rem 0 .6rem; padding-left: .6rem; border-left: 3px solid var(--accent); }
h3 { font-size: 1rem; margin: 1.4rem 0 .25rem; }
p, ul, ol, dl, pre, table, figure { margin: .5rem 0 1rem; }
li { margin: .2rem 0; }
small, .muted { color: var(--muted); }
.byline { margin-top: 0; color: var(--muted); }
.warn { color: var(--warn); }
hr { margin: 3rem 0; border: 0; border-top: 1px solid var(--line); }
[id] { scroll-margin-top: 1rem; }

/* nagłówek strony i przełącznik języka */
.top {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .5rem 0 1rem;
  border-bottom: 1px solid var(--line);
}
.top .titles { flex: 1; min-width: 0; }
.top .site-name { margin: 0; font-size: 1.35rem; font-weight: 700; line-height: 1.2; }
.top .site-name a { color: var(--fg); text-decoration: none; }
.top .tagline { margin: .1rem 0 0; color: var(--muted); font-size: .95rem; }
.lang { display: flex; gap: .35rem; flex: none; align-self: flex-start; }
.lang a {
  display: inline-block;
  min-width: 2.75rem;
  padding: .35rem .6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  text-align: center;
  text-decoration: none;
  font-weight: 600;
  font-size: .9rem;
  color: var(--fg);
  background: var(--card);
}
.lang a:hover, .lang a:focus-visible { border-color: var(--accent); }
.lang a[aria-current="page"] { border-color: var(--accent); color: var(--accent); }

/* lista projektów na stronie głównej */
.projects { padding-left: 0; list-style: none; }
.projects li { margin: 0 0 .6rem; padding: .7rem 1rem; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.projects a { font-weight: 600; }
.projects .muted { display: block; font-size: .92rem; }

/* obrazki z podpisem */
figure { margin: 1.2rem 0; text-align: center; }
figure img { display: block; max-width: 100%; height: auto; margin: 0 auto; border: 1px solid var(--line); border-radius: 8px; }
figcaption { margin-top: .4rem; font-size: .88rem; color: var(--muted); }

/* filmy YouTube: proporcje zamiast sztywnej wysokości, żeby nie rozjeżdżały się na telefonie */
iframe { display: block; width: 100%; max-width: 640px; height: auto; aspect-ratio: 4 / 3; margin: 1rem auto; border: 0; border-radius: 8px; }
iframe.wide { aspect-ratio: 16 / 9; }

/* nota prawna, uwagi; zrobione punkty z listy TODO */
.notice { margin: 1rem 0; padding: .75rem 1rem; font-size: .9rem; color: var(--muted); background: var(--card); border-left: 3px solid var(--warn); border-radius: 8px; }
.notice p, .notice ul { margin: .3rem 0; }
del { color: var(--muted); }

/* kod i wydruki z konsoli: bez zawijania (kolumny), przewijane w poziomie */
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
code { font-size: .92em; }
pre {
  overflow-x: auto;
  padding: .75rem 1rem;
  font-size: 14px;
  line-height: 1.45;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
}

/* tabele (szerokie owinąć w .table-wrap) */
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { padding: .4rem .6rem; border: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: var(--card); }
/* na telefonie tabela przewija się w poziomie zamiast ściskać kolumny do kilku liter */
.table-wrap table { min-width: 36rem; }
.table-wrap table.bom { min-width: 60rem; }
.nowrap { white-space: nowrap; }
body.wide { max-width: 72rem; }

footer {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: .9rem;
  color: var(--muted);
}
footer p { margin: .25rem 0; }
.donate { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin: .75rem 0; }
.donate form { margin: 0; }
