/* Wspolny styl stron PROOT Laptimer (index.html = wgrywanie + obsluga, budowa.html = jak zlozyc).
   Rzeczy specyficzne dla jednej strony (makiety ekranu 320x170, tabela czesci) siedza
   w <style> danej strony, zeby nie zasmiecac wspolnego arkusza. */

:root {
  color-scheme: light dark;
  --bg: #f4f5f7;
  --card: #ffffff;
  --fg: #16181d;
  --muted: #5c6370;
  --line: #e2e5ea;
  --accent: #d92d20;
  --brand: #6c7fb8;     /* niebieski ze slonia */
  --cream: #fdf6e3;     /* tlo logo */
  --ink: #3b322c;       /* kontury z logo */
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111317;
    --card: #191c22;
    --fg: #e8eaed;
    --muted: #9aa1ac;
    --line: #2a2e37;
    --accent: #ff5c4d;
    --brand: #8a9cd6;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  padding: 2rem 1rem 4rem;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  display: flex;
  justify-content: center;
}
main { width: 100%; max-width: 44rem; }

/* --- Naglowek z maskotka --- */
.hero {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 1.25rem;
}
.hero img { display: block; width: 100%; height: auto; }
.hero-cap {
  padding: 1.1rem 1.4rem 1.3rem;
  background: var(--card);
  border-top: 1px solid var(--line);
}
h1 { font-size: 1.6rem; margin: 0 0 .2rem; letter-spacing: -.015em; }
.sub { color: var(--muted); margin: 0; }
.crumb { font-size: .9rem; margin: .7rem 0 0; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}
.note { color: var(--muted); font-size: .9rem; }
.warn {
  border-left: 3px solid var(--accent);
  padding-left: .9rem;
  margin: 0;
  font-size: .93rem;
}
h2 {
  font-size: .8rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted); margin: 0 0 .9rem;
}
h3 { font-size: .98rem; margin: 1.4rem 0 .5rem; }
h3:first-of-type { margin-top: 0; }
dl { display: grid; grid-template-columns: auto 1fr; gap: .4rem 1.1rem; margin: 0; font-size: .93rem; }
dt { color: var(--muted); }
dd { margin: 0; }
code { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: .88em; }
ol, ul { margin: 0; padding-left: 1.2rem; }
li { margin-bottom: .45rem; }
li:last-child { margin-bottom: 0; }
a { color: var(--accent); }
p { margin: 0 0 .8rem; }
p:last-child { margin-bottom: 0; }

/* Klawisz / przycisk plytki */
kbd {
  font: 600 .8rem/1 system-ui, sans-serif;
  background: var(--bg);
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 6px;
  padding: .25rem .45rem;
  white-space: nowrap;
}

/* Tabele (przyciski, lista czesci) — waskie ekrany przewijaja poziomo sam kontener */
.tw { overflow-x: auto; margin: 0 -.4rem; padding: 0 .4rem; }
table { border-collapse: collapse; width: 100%; font-size: .9rem; min-width: 30rem; }
th, td { text-align: left; vertical-align: top; padding: .6rem .7rem; border-bottom: 1px solid var(--line); }
thead th { color: var(--muted); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; }
tbody th { font-weight: 600; white-space: nowrap; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }

/* Numerowane kroki z kolkiem */
.flow { counter-reset: step; list-style: none; padding: 0; }
.flow li {
  position: relative; padding-left: 2.1rem; margin-bottom: .9rem; counter-increment: step;
}
.flow li::before {
  content: counter(step);
  position: absolute; left: 0; top: .1rem;
  width: 1.5rem; height: 1.5rem; border-radius: 50%;
  background: var(--brand); color: #fff;
  font-size: .8rem; font-weight: 700;
  display: grid; place-items: center;
}
.tip {
  border-left: 3px solid var(--brand);
  padding: .1rem 0 .1rem .9rem;
  margin: .9rem 0 0;
  font-size: .92rem;
  color: var(--muted);
}

/* Wybor z listy (region firmware'u) — jeden wiersz, na waskim ekranie lamie sie sam */
.pick {
  display: flex; flex-wrap: wrap; gap: .5rem .7rem;
  align-items: baseline; justify-content: center;
  margin: 0 0 1.1rem;
}
.pick label { font-size: .93rem; color: var(--muted); }
select {
  font: inherit;
  font-size: .95rem;
  color: var(--fg);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .4rem .6rem;
}

/* Przycisk akcji (flasher, przejscie miedzy stronami) */
button.primary, a.primary {
  display: inline-block;
  font: inherit;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: 10px;
  padding: .85rem 1.9rem;
  cursor: pointer;
  text-decoration: none;
}
button.primary:hover, a.primary:hover { filter: brightness(1.08); }

footer { text-align: center; color: var(--muted); font-size: .85rem; margin-top: 2rem; }
