/* bbsmart.smarthelmet.pl: dark, like the app; one accent colour. */
:root {
  --bg: #0a0a0a;
  --surface: #141414;
  --raised: #1b1b1b;
  --border: #262626;
  --text: #f5f5f5;
  --body: #d4d4d4;
  --muted: #a3a3a3;
  --faint: #737373;
  --accent: #ff4444;
  --accent-dark: #e03a3a;
  --info: #60a5fa;
  --info-bg: #0f1a2b;
  --warn: #f59e0b;
  --warn-bg: #24180a;
  --radius: 14px;
  --wrap: 1080px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #ff6b6b; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

img { max-width: 100%; height: auto; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 10; background: var(--surface); padding: 8px 12px; border-radius: 8px; }

/* Header */
.top {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(10, 10, 10, 0.86);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 800; letter-spacing: 0.06em; }
.brand:hover { color: var(--text); }
.brand img { width: 40px; height: auto; }
.brand b { color: var(--accent); }
.nav { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.nav a { color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 600; padding: 8px 12px; border-radius: 999px; }
.nav a:hover { color: var(--text); background: var(--surface); }
.nav a[aria-current="page"] { color: var(--text); background: var(--raised); }

/* Documents */
.doc { max-width: 800px; padding-top: 48px; padding-bottom: 72px; }
.doc h1 { color: var(--text); font-size: clamp(30px, 5vw, 42px); line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 14px; }
.lead { color: var(--muted); font-size: 18px; margin: 0 0 28px; }

.toc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 22px; margin: 0 0 36px; }
.toc-title { color: var(--text); font-weight: 700; margin: 0 0 8px; }
.toc ol { margin: 0; padding-left: 22px; columns: 2 260px; column-gap: 32px; }
.toc li { margin: 4px 0; break-inside: avoid; }
.toc a { color: var(--body); text-decoration: none; }
.toc a:hover { color: var(--accent); }

.prose h2 { color: var(--text); font-size: 22px; line-height: 1.3; margin: 44px 0 12px; padding-top: 22px; border-top: 1px solid var(--border); scroll-margin-top: 84px; }
.prose > h2:first-child, .prose > section:first-child > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.prose h3 { color: var(--text); font-size: 18px; margin: 28px 0 8px; scroll-margin-top: 84px; }
.prose p { margin: 0 0 14px; }
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 24px; }
.prose li { margin: 6px 0; }
.prose li::marker { color: var(--faint); }
.prose strong { color: var(--text); }
.prose .meta { color: var(--faint); font-size: 14px; margin-bottom: 24px; }

.prose table { width: 100%; border-collapse: collapse; margin: 8px 0 22px; font-size: 15px; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.prose th { color: var(--text); background: var(--surface); font-weight: 700; }

.note, .warn { border-radius: var(--radius); padding: 16px 18px; margin: 18px 0 22px; border: 1px solid; }
.note { background: var(--info-bg); border-color: #1e3a5f; }
.warn { background: var(--warn-bg); border-color: #5c3d0e; }
.note > :last-child, .warn > :last-child { margin-bottom: 0; }
.note strong { color: #bfdbfe; }
.warn strong { color: #fde68a; }

.prose ol.steps { list-style: none; counter-reset: step; padding-left: 0; }
.prose ol.steps > li { counter-increment: step; position: relative; padding-left: 46px; margin: 14px 0; min-height: 32px; }
.prose ol.steps > li::before {
  content: counter(step);
  position: absolute; left: 0; top: -2px;
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255, 68, 68, 0.14); color: var(--accent);
  display: grid; place-items: center; font-weight: 800; font-size: 15px;
}

.prose details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin: 10px 0; }
.prose details[open] { border-color: #3a3a3a; }
.prose summary { cursor: pointer; list-style: none; color: var(--text); font-weight: 650; padding: 16px 48px 16px 18px; position: relative; }
.prose summary::-webkit-details-marker { display: none; }
.prose summary::after {
  content: ""; position: absolute; right: 20px; top: 50%;
  width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: translateY(-70%) rotate(45deg); transition: transform 0.15s;
}
.prose details[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.prose details > :not(summary) { margin-left: 18px; margin-right: 18px; }
.prose details > :last-child { margin-bottom: 18px; }

.contact { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 8px 0 26px; }
.contact > div { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; }
.contact h3 { margin-top: 0; }

/* Home */
.hero { padding: 64px 0 56px; }
.hero-in { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center; }
.hero h1 { color: var(--text); font-size: clamp(34px, 6vw, 56px); line-height: 1.06; letter-spacing: -0.02em; margin: 0 0 18px; }
.hero h1 em { color: var(--accent); font-style: normal; }
.hero .lead { font-size: 19px; max-width: 560px; }
.stores { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 22px; border-radius: 12px; font-weight: 700; text-decoration: none; }
.btn svg { width: 22px; height: 22px; flex: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-ghost { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { color: var(--text); border-color: #3a3a3a; }

.phone { justify-self: center; width: min(320px, 100%); background: linear-gradient(180deg, #161616, #0d0d0d); border: 1px solid var(--border); border-radius: 36px; padding: 22px 16px 28px; box-shadow: 0 30px 80px rgba(255, 68, 68, 0.08); }
.phone-time { text-align: center; color: var(--text); font-size: 52px; font-weight: 300; letter-spacing: 0.02em; margin: 10px 0 2px; }
.phone-date { text-align: center; color: var(--muted); font-size: 14px; margin-bottom: 22px; }
.notif { display: grid; grid-template-columns: 38px 1fr; gap: 10px; background: rgba(38, 38, 38, 0.85); border-radius: 18px; padding: 12px; margin-top: 10px; }
.notif img { width: 38px; height: 38px; border-radius: 9px; background: #000; padding: 4px; }
.notif-app { color: var(--faint); font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; }
.notif-title { color: var(--text); font-weight: 700; font-size: 15px; line-height: 1.3; }
.notif-body { color: var(--body); font-size: 14px; line-height: 1.35; }

.band { padding: 64px 0; border-top: 1px solid var(--border); }
.band h2 { color: var(--text); font-size: clamp(26px, 4vw, 34px); line-height: 1.2; margin: 0 0 12px; }
.band .lead { max-width: 640px; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin-top: 32px; }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.feature svg { width: 28px; height: 28px; color: var(--accent); }
.feature h3 { color: var(--text); font-size: 18px; margin: 14px 0 6px; }
.feature p { margin: 0; color: var(--muted); }

.partner { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 28px; }
.partner-logo { width: 120px; height: 120px; border-radius: 18px; background: #fff; display: grid; place-items: center; }
.partner-logo img { width: 84px; }
.partner h2 { margin-bottom: 8px; }
.partner p { margin: 0 0 10px; }

.steps-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 28px; counter-reset: s; }
.steps-row > div { counter-increment: s; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; }
.steps-row > div::before { content: counter(s); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 68, 68, 0.14); color: var(--accent); font-weight: 800; margin-bottom: 10px; }
.steps-row h3 { color: var(--text); font-size: 17px; margin: 0 0 4px; }
.steps-row p { margin: 0; color: var(--muted); }
.band .more { margin: 28px 0 0; }

.status { display: none; margin: 24px 0 0; border-radius: var(--radius); padding: 16px 18px; border: 1px solid; }
.status.ok { display: block; background: #0f2418; border-color: #1f5135; color: #bbf7d0; }
.status.err { display: block; background: var(--warn-bg); border-color: #5c3d0e; color: #fde68a; }
.status strong { color: inherit; display: block; margin-bottom: 2px; }

/* Footer */
.foot { border-top: 1px solid var(--border); background: #070707; color: var(--muted); font-size: 14px; }
.foot-in { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; padding-top: 36px; padding-bottom: 40px; }
.foot p { margin: 0 0 8px; }
.foot-brand { color: var(--text); font-weight: 800; letter-spacing: 0.06em; }
.foot-brand b { color: var(--accent); }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--text); }
.foot nav { display: flex; flex-direction: column; gap: 6px; }

@media (max-width: 820px) {
  .hero { padding-top: 40px; }
  .hero-in { grid-template-columns: 1fr; gap: 36px; }
  .foot-in { grid-template-columns: 1fr; gap: 18px; }
}

@media (max-width: 640px) {
  .top-in { flex-direction: column; align-items: stretch; gap: 0; padding-top: 10px; }
  .nav { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; margin: 4px -20px 0; padding: 0 14px 10px; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { white-space: nowrap; padding: 6px 10px; font-size: 14px; }
  .doc { padding-top: 32px; }
  .partner { grid-template-columns: 1fr; text-align: left; }
  .stores .btn { flex: 1 1 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

@media print {
  .top, .foot, .toc { display: none; }
  body { background: #fff; color: #000; }
  .prose h2, .prose h3, .prose strong, .doc h1 { color: #000; }
}
