/* Ten sam język co aplikacja: czerń na bieli, kolor tylko w kropkach oceny.
   Czcionka bazowa 18 px — czytelnicy to w większości osoby po 60. */
:root {
  --bg: #fff; --bg2: #f5f5f7; --tx: #1d1d1f; --tx2: #57575c; --bd: #e2e2e7;
  --ok: #34c759; --watch: #ff9500; --alert: #ff3b30;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #000; --bg2: #1c1c1e; --tx: #f5f5f7; --tx2: #a1a1a6; --bd: #38383a; }
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font: 18px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--tx); background: var(--bg); -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--tx); outline-offset: 3px; border-radius: 6px; }
img { max-width: 100%; height: auto; display: block; }

.top { max-width: 1040px; margin: 0 auto; padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; text-decoration: none; }
.brand img { border-radius: 8px; }
.lang { display: flex; gap: 4px; }
.lang a { text-decoration: none; font-size: 15px; font-weight: 600; padding: 6px 10px; border-radius: 999px; color: var(--tx2); }
.lang a[aria-current] { background: var(--bg2); color: var(--tx); }

main { max-width: 1040px; margin: 0 auto; padding: 0 20px 40px; }
section { margin-top: 72px; }
h1 { font-size: clamp(34px, 5.4vw, 54px); line-height: 1.08; letter-spacing: -0.025em; }
h2 { font-size: 26px; line-height: 1.25; letter-spacing: -0.015em; margin: 40px 0 12px; }
section > h2:first-child { margin-top: 0; }
h3 { font-size: 19px; line-height: 1.3; color: var(--tx); }
p, li { color: var(--tx2); }
strong { color: var(--tx); }
.lead { font-size: 21px; margin-top: 18px; color: var(--tx2); max-width: 36em; }

/* hero: tekst i odczyt ciśnienia jak w aplikacji */
.hero { margin-top: 40px; display: grid; grid-template-columns: 1.25fr 1fr; gap: 48px; align-items: center; }
.reading { background: var(--bg2); border-radius: 28px; padding: 44px 28px; text-align: center; }
.reading .num { font-size: clamp(64px, 9vw, 104px); font-weight: 200; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; color: var(--tx); }
.reading .slash { color: var(--tx2); opacity: .45; margin: 0 2px; font-weight: 100; }
.reading .unit { font-size: 17px; font-weight: 400; letter-spacing: 0; color: var(--tx2); margin-left: 6px; }
.reading .label { margin-top: 18px; font-size: 21px; font-weight: 600; color: var(--tx); display: flex; justify-content: center; align-items: center; gap: 9px; }
.reading .range { margin-top: 4px; font-size: 15px; color: var(--tx2); }
.dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; flex: none; margin-right: 9px; vertical-align: 1px; }
.reading .dot { margin-right: 0; }
.dot.ok { background: var(--ok); } .dot.watch { background: var(--watch); } .dot.alert { background: var(--alert); }

.store, .pdf {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 28px;
  background: var(--tx); color: var(--bg); text-decoration: none; font-weight: 600; font-size: 18px;
  padding: 15px 26px; border-radius: 18px; min-height: 52px;
}
.pdf { margin-top: 8px; }
.store:hover, .pdf:hover { opacity: .86; }
.note { font-size: 15px; margin-top: 12px; max-width: 32em; }

/* Kod QR przy przycisku App Store: tylko na ekranach z myszką (komputer), na telefonie wystarcza przycisk */
.qr { display: none; }
@media (hover: hover) and (pointer: fine) and (min-width: 821px) {
  .qr { display: flex; align-items: center; gap: 14px; margin-top: 16px; font-size: 15px; color: var(--tx2); max-width: 26em; }
  .qr svg { width: 92px; height: 92px; flex: none; border-radius: 10px; border: 1px solid var(--bd); }
}

.steps { list-style: none; counter-reset: s; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.steps li { counter-increment: s; background: var(--bg2); border-radius: 20px; padding: 24px; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--tx); color: var(--bg); font-weight: 700; font-size: 16px; margin-bottom: 14px; }
.steps p { margin-top: 6px; font-size: 16px; }

.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: start; }
.split h2:first-child { margin-top: 0; }
.checks { list-style: none; }
.checks li { padding-left: 30px; position: relative; margin: 6px 0; }
.checks li::before { content: ""; position: absolute; left: 4px; top: 10px; width: 11px; height: 11px; border-radius: 50%; background: var(--ok); }
.shots { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.shots img { border-radius: 22px; border: 1px solid var(--bd); }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { display: block; text-decoration: none; border: 1px solid var(--bd); border-radius: 20px; padding: 22px; transition: background .15s; }
.card:hover { background: var(--bg2); }
.card p { font-size: 15px; margin-top: 8px; }

.faq details { border-bottom: 1px solid var(--bd); padding: 16px 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 19px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::after { content: "+"; font-weight: 300; font-size: 26px; line-height: 1; color: var(--tx2); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin-top: 10px; }

/* artykuły */
.text { max-width: 700px; margin-top: 40px; }
.text ul, .text ol { padding-left: 24px; margin: 10px 0; }
.text .byline { font-size: 15px; margin-top: 14px; }
.text .byline a { color: inherit; }
.text section { margin-top: 48px; }
.sources li { font-size: 15px; overflow-wrap: anywhere; }
.text li { margin: 6px 0; }
.text p { margin: 10px 0; }
.norms { width: 100%; border-collapse: collapse; margin: 28px 0 8px; font-size: 17px; }
.norms th { text-align: left; font-size: 14px; text-transform: uppercase; letter-spacing: .04em; color: var(--tx2); font-weight: 600; padding: 0 12px 10px 0; border-bottom: 2px solid var(--tx); }
.norms td { padding: 13px 12px 13px 0; border-bottom: 1px solid var(--bd); vertical-align: top; font-variant-numeric: tabular-nums; }
.norms td.name { font-weight: 600; }

.appbox { max-width: 700px; margin-top: 56px; display: flex; gap: 24px; align-items: center; background: var(--bg2); border-radius: 24px; padding: 24px; }
.appbox img { border-radius: 16px; width: 140px; }
.appbox h2 { margin: 0 0 6px; font-size: 22px; }
.appbox p { font-size: 16px; }
.appbox .store { margin-top: 16px; font-size: 17px; }
.more { max-width: 700px; margin-top: 48px; }
.more h2 { font-size: 20px; margin: 0 0 8px; }
.more ul { list-style: none; }
.more li { margin: 6px 0; }

.root { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 32px; text-align: left; }
.root img { border-radius: 22px; }
.root .cards { width: 100%; }

footer { max-width: 1040px; margin: 0 auto; padding: 32px 20px 48px; border-top: 1px solid var(--bd); }
footer p { font-size: 14px; margin: 6px 0; max-width: 52em; }

@media (max-width: 820px) {
  .hero, .split { grid-template-columns: 1fr; gap: 32px; }
  .steps, .cards { grid-template-columns: 1fr; }
  section { margin-top: 56px; }
  .appbox { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* tabela porównawcza (strony „jaka aplikacja”): przewijana w poziomie na telefonie */
.cmp { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1rem 0; }
table.cmp { min-width: 960px; font-size: 0.88rem; }
table.cmp td, table.cmp th { vertical-align: top; }
table.cmp td.name { font-weight: 600; min-width: 11rem; }
table.cmp tbody tr:first-child td { background: rgba(0, 0, 0, 0.03); }

/* kalkulator średniej z 7 dni (D4) */
.avg { margin: 24px 0 8px; background: var(--bg2); border-radius: 20px; padding: 18px 16px; }
.avg-grid { width: 100%; border-collapse: collapse; }
.avg-grid th { text-align: left; font-size: 13px; color: var(--tx2); font-weight: 600; padding: 4px 6px; }
.avg-grid th small { display: block; font-weight: 400; font-size: 11px; }
.avg-grid td { padding: 4px 6px; }
.avg-grid tbody th { font-weight: 600; font-size: 15px; white-space: nowrap; }
.avg-pair { display: inline-flex; align-items: center; gap: 4px; }
.avg-pair input { width: 4.2em; height: 40px; font: inherit; font-size: 17px; text-align: center; border: 1px solid var(--bd); border-radius: 10px; background: var(--bg); color: var(--tx); -moz-appearance: textfield; }
.avg-pair input::-webkit-outer-spin-button, .avg-pair input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.avg-pair span { color: var(--tx2); }
.avg-skip { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0 0; font-size: 15px; }
.avg-skip input { width: 20px; height: 20px; margin-top: 2px; }
.avg-out { margin-top: 16px; padding: 14px 16px; border-radius: 14px; background: var(--bg); }
.avg-main { margin: 0; font-size: 17px; }
.avg-num { font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; }
.avg-num.hi { color: #b4232c; } .avg-num.ok { color: #1f7a3a; }
.avg-n, .avg-note, .avg-empty { color: var(--tx2); font-size: 14.5px; }
.avg-class { margin: 8px 0 0; font-weight: 600; }
.avg-parts { margin: 8px 0 0; padding-left: 20px; font-size: 15.5px; }
.avg-note { margin: 8px 0 0; }
.avg-actions { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-top: 14px; }
.avg-actions .store { border: 0; cursor: pointer; font: inherit; }
.avg-actions .store:disabled { opacity: .5; cursor: default; }
.avg-actions .linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--tx2); text-decoration: underline; cursor: pointer; }
@media (max-width: 480px) { .avg-grid th small { display: none; } .avg-pair input { width: 3.6em; font-size: 16px; } .avg-grid td, .avg-grid th { padding: 3px 2px; } }

/* lista stron wartości (D5) */
.values { max-width: 700px; margin-top: 40px; }
.values-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.values-list li { background: var(--bg2); border-radius: 12px; padding: 10px 12px; font-variant-numeric: tabular-nums; }
.values-list a { font-weight: 600; text-decoration: none; }
.values-list small { display: block; color: var(--tx2); font-size: 12.5px; }

.pdfs { display: flex; flex-wrap: wrap; gap: 10px; }
.pdf.secondary { opacity: .85; }
figure.posture { margin: 20px 0 8px; }
figure.posture img { width: 100%; max-width: 640px; height: auto; display: block; border: 1px solid #e5e5ea; border-radius: 12px; background: #fff; }
figure.posture figcaption { font-size: 14px; color: #6e6e73; margin-top: 6px; }
.text h3 { font-size: 18px; margin: 18px 0 6px; }

/* ── Schmerztagebuch: kolory oceny z ikony aplikacji i elementy, których strona Dzienniczka nie ma ── */
:root { --ok: #2fae5b; --watch: #f2802a; --alert: #d2382b; }
.reading .unit { font-size: 28px; font-weight: 300; opacity: .55; margin-left: 4px; }
.store.soon { background: var(--bg2); color: var(--tx); cursor: default; border: 1px solid var(--bd); }
.store.soon:hover { opacity: 1; }
.cards .card:only-child { grid-column: span 2; }
