/* Archiwum Poczty — strona. Kolory jak w aplikacji (ui/src/styles/tokens.css). Czcionki systemowe — bez pobierania. */
:root {
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;

  --bg: #ffffff;
  --bg-muted: #f6f7f9;
  --surface: #ffffff;
  --border: #e3e6ea;
  --text: #1b1f24;
  --text-muted: #5b6470;
  --accent: #2f5bd3;
  --accent-hover: #2549ad;
  --accent-soft: #eaf0fd;
  --accent-ink: #1e3f9e;
  --success: #2e7d4f;
  --danger: #b42318;
  --shadow-lg: 0 1px 2px rgb(16 24 40 / 0.06), 0 24px 48px -12px rgb(16 24 40 / 0.18);
  --shadow-sm: 0 1px 2px rgb(16 24 40 / 0.05);
  --radius: 14px;
  --container: 1160px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1216;
    --bg-muted: #151a20;
    --surface: #1a2027;
    --border: #2a323c;
    --text: #e8ebef;
    --text-muted: #a2acb8;
    --accent: #7c9cf0;
    --accent-hover: #9bb4f5;
    --accent-soft: #1d2a4a;
    --accent-ink: #b9cbf8;
    --success: #5cc48a;
    --danger: #f08a80;
    --shadow-lg: 0 1px 2px rgb(0 0 0 / 0.3), 0 24px 48px -12px rgb(0 0 0 / 0.6);
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--accent);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent-hover);
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.25rem, 5vw, 3.6rem);
  font-weight: 700;
}

h2 {
  font-size: clamp(1.75rem, 3.4vw, 2.5rem);
  font-weight: 700;
}

h3 {
  font-size: 1.175rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1em;
  text-wrap: pretty;
}

code {
  font-family: "Cascadia Mono", Consolas, ui-monospace, monospace;
  font-size: 0.9em;
  padding: 0.1em 0.35em;
  border-radius: 5px;
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.icon {
  flex-shrink: 0;
}

.container {
  width: min(100% - 32px, var(--container));
  margin-inline: auto;
}

.narrow {
  max-width: 820px;
}

.center {
  text-align: center;
}

.nowrap {
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
}

.skip-link:focus {
  top: 12px;
}

/* Przyciski */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0.7em 1.2em;
  border: 1px solid transparent;
  border-radius: 10px;
  font: 600 1rem/1.2 var(--font);
  text-decoration: none;
  transition: background-color 0.15s, border-color 0.15s, transform 0.15s, box-shadow 0.15s;
  cursor: pointer;
}

.button--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 1px 2px rgb(16 24 40 / 0.1), 0 6px 16px -6px rgb(47 91 211 / 0.6);
}

.button--primary:hover {
  background: var(--accent-hover);
  color: #fff;
  transform: translateY(-1px);
}

@media (prefers-color-scheme: dark) {
  .button--primary {
    background: #3d68dc;
  }
  .button--primary:hover {
    background: #4f78e6;
  }
}

.button--ghost {
  border-color: var(--border);
  background: var(--surface);
  color: var(--text);
}

.button--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.button--large {
  padding: 0.95em 1.5em;
  font-size: 1.0625rem;
}

.button--small {
  padding: 0.5em 0.95em;
  font-size: 0.9375rem;
}

/* Nagłówek */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.6) blur(14px);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font: 700 1.125rem/1 var(--font-display);
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand:hover {
  color: var(--text);
}

.site-nav {
  display: flex;
  gap: 28px;
  margin-left: auto;
}

.site-nav a {
  color: var(--text-muted);
  font-size: 0.9688rem;
  font-weight: 500;
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--text);
}

@media (max-width: 860px) {
  .site-nav {
    display: none;
  }
  .site-header__inner {
    justify-content: space-between;
  }
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(48px, 8vw, 88px) 0 clamp(56px, 8vw, 96px);
  background:
    radial-gradient(55% 45% at 50% 0%, color-mix(in srgb, var(--accent) 15%, transparent), transparent 75%),
    radial-gradient(40% 40% at 50% 85%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 70%),
    var(--bg);
}

.hero__grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(40px, 6vw, 64px);
  text-align: center;
}

.hero__copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 860px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow--light {
  color: #a9bdf5;
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.25rem);
}

.hero__lead {
  max-width: 36em;
  color: var(--text-muted);
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
}

.hero__actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 32px;
}

.hero__badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--text-muted);
  font-size: 0.9375rem;
  font-weight: 500;
}

.hero__badges li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero__badges .icon {
  color: var(--success);
}


/* Okno ze zrzutem ekranu */
.window {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.window__bar {
  display: flex;
  gap: 7px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-muted);
}

.window__bar span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--border);
}

.hero__shot {
  width: 100%;
  max-width: 1120px;
}

.window figcaption {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
}

/* Fakty */
.facts {
  border-block: 1px solid var(--border);
  background: var(--bg-muted);
}

.facts__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.fact {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 28px 24px;
}

.fact + .fact {
  border-left: 1px solid var(--border);
}

.fact strong {
  font: 700 1.75rem/1.1 var(--font-display);
  letter-spacing: -0.02em;
}

.fact span {
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.4;
}

@media (max-width: 760px) {
  .facts__grid {
    grid-template-columns: 1fr 1fr;
  }
  .fact:nth-child(3) {
    border-left: 0;
  }
  .fact:nth-child(n + 3) {
    border-top: 1px solid var(--border);
  }
}

/* Sekcje */
.section {
  padding: clamp(64px, 9vw, 112px) 0;
}

.section--muted {
  background: var(--bg-muted);
}

.section__head {
  max-width: 760px;
  margin: 0 auto clamp(36px, 5vw, 56px);
}

.section__lead {
  color: var(--text-muted);
  font-size: 1.1875rem;
}

/* Kroki */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.step {
  position: relative;
  padding: 32px 28px 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  counter-increment: step;
}

.step::after {
  content: counter(step);
  position: absolute;
  top: 24px;
  right: 28px;
  color: var(--border);
  font: 700 2.5rem/1 var(--font-display);
}

.step__icon,
.card__icon {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 20px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}

.step p {
  margin: 0;
  color: var(--text-muted);
}

@media (max-width: 860px) {
  .steps {
    grid-template-columns: 1fr;
  }
}

/* Funkcja ze zrzutem */
.feature__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.feature__copy > p {
  color: var(--text-muted);
  font-size: 1.125rem;
}

.checklist {
  display: grid;
  gap: 12px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.checklist li {
  display: flex;
  gap: 12px;
}

.checklist .icon {
  margin-top: 4px;
  color: var(--success);
}

@media (max-width: 960px) {
  .feature__grid {
    grid-template-columns: 1fr;
  }
}

/* Karty bezpieczeństwa */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: clamp(40px, 6vw, 64px);
}

.card {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.card__icon {
  width: 46px;
  height: 46px;
  margin-bottom: 18px;
}

.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 1rem;
}

@media (max-width: 960px) {
  .cards {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 620px) {
  .cards {
    grid-template-columns: 1fr;
  }
}

.shot-wide {
  max-width: 980px;
  margin-inline: auto;
}

/* Bez AI */
.ai {
  background:
    radial-gradient(50% 80% at 100% 0%, rgb(47 91 211 / 0.45), transparent 70%),
    #101828;
  color: #e8ecf4;
}

.ai__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: start;
}

.ai h2 {
  color: #fff;
  font-size: clamp(2rem, 4vw, 3rem);
}

.ai__copy p {
  color: #c2cad8;
  font-size: 1.1875rem;
}

@media (max-width: 860px) {
  .ai__grid {
    grid-template-columns: 1fr;
  }
}

/* Dla kogo */
.audience {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.audience li {
  display: flex;
  gap: 16px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.audience li > .icon {
  color: var(--accent);
}

.audience h3 {
  margin-bottom: 4px;
  font-size: 1.0625rem;
}

.audience p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9688rem;
}

/* Wymagania */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
}

th,
td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

tr:last-child td {
  border-bottom: 0;
}

th {
  background: var(--bg-muted);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-muted);
}

.req td:last-child {
  white-space: nowrap;
}

.ok,
.no {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.ok {
  color: var(--success);
}

.no {
  color: var(--danger);
}

.muted {
  color: var(--text-muted);
}

.note {
  margin-top: 20px;
  color: var(--text-muted);
  font-size: 0.9688rem;
}

/* FAQ */
.faq {
  border-top: 1px solid var(--border);
}

.faq__item {
  border-bottom: 1px solid var(--border);
}

.faq__item summary {
  position: relative;
  padding: 22px 48px 22px 0;
  font: 600 1.125rem/1.4 var(--font-display);
  list-style: none;
  cursor: pointer;
}

.faq__item summary::-webkit-details-marker {
  display: none;
}

.faq__item summary::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 8px;
  width: 10px;
  height: 10px;
  margin-top: -7px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
  transition: transform 0.2s;
}

.faq__item[open] summary::after {
  margin-top: -2px;
  transform: rotate(-135deg);
}

.faq__answer {
  padding: 0 48px 12px 0;
  color: var(--text-muted);
}

/* Wezwanie do pobrania */
.cta {
  background:
    radial-gradient(60% 80% at 50% 0%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%),
    var(--bg);
}

.cta__logo {
  margin: 0 auto 24px;
  border-radius: 18px;
  box-shadow: 0 12px 32px -8px rgb(47 91 211 / 0.5);
}

.download {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 28px 0 20px;
}

.download__soon {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 14px 22px;
  border: 1px dashed var(--accent);
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-weight: 600;
}

.download__meta {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.cta__help {
  font-size: 0.9688rem;
}

/* Artykuły (poradniki, polityka) */
.article {
  width: min(100% - 32px, 760px);
  margin: 0 auto;
  padding: clamp(40px, 6vw, 72px) 0 clamp(64px, 8vw, 96px);
}

.article h1 {
  font-size: clamp(2rem, 4.4vw, 2.9rem);
}

.breadcrumbs {
  margin-bottom: 24px;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.breadcrumbs a {
  color: var(--text-muted);
}

.article__meta {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.lead {
  color: var(--text-muted);
  font-size: 1.25rem;
}

.prose {
  font-size: 1.0938rem;
}

.prose h2 {
  margin-top: 2em;
  font-size: 1.6rem;
}

.prose h3 {
  margin-top: 1.6em;
}

.prose ul,
.prose ol {
  padding-left: 1.4em;
}

.prose li {
  margin-bottom: 0.4em;
}

.prose table {
  margin: 1.5em 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  font-size: 0.97rem;
}

.prose aside {
  margin: 1.6em 0;
  padding: 18px 22px;
  border-left: 4px solid var(--accent);
  border-radius: 0 12px 12px 0;
  background: var(--accent-soft);
}

.prose aside p:last-child {
  margin-bottom: 0;
}

.prose aside.warning {
  border-left-color: #c47f00;
  background: color-mix(in srgb, #ffb020 14%, var(--bg));
}

.prose aside.cta {
  margin-top: 3em;
  padding: 24px 28px;
  border: 1px solid var(--border);
  border-left: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-muted);
  font-weight: 500;
}

.guide-grid {
  display: grid;
  gap: 16px;
  margin-top: 32px;
}

.guide-card {
  display: block;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.guide-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
  color: var(--text);
}

.guide-card h2 {
  font-size: 1.35rem;
}

.guide-card p {
  color: var(--text-muted);
}

.guide-card__more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-weight: 600;
}

/* Stopka */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-muted);
  font-size: 0.9375rem;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding: 56px 0 40px;
}

.site-footer__brand p {
  max-width: 28em;
  margin-top: 16px;
  color: var(--text-muted);
}

.site-footer nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.site-footer h2 {
  margin: 0 0 6px;
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.site-footer nav a {
  color: var(--text);
  text-decoration: none;
}

.site-footer nav a:hover {
  color: var(--accent);
}

.site-footer__legal {
  padding: 24px 0 40px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.875rem;
}

.site-footer__legal p {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0 0 8px;
}

@media (max-width: 760px) {
  .site-footer__grid {
    grid-template-columns: 1fr;
  }
}

@media print {
  .site-header,
  .site-footer,
  .hero__actions {
    display: none;
  }
}

/* Wąskie ekrany: nagłówek w jednej linii */
.brand span,
.site-header .button {
  white-space: nowrap;
}

@media (max-width: 480px) {
  .site-header__inner {
    gap: 12px;
  }
  .brand {
    font-size: 1rem;
  }
  .brand img {
    width: 28px;
    height: 28px;
  }
  .site-header .button {
    padding: 0.5em 0.75em;
    font-size: 0.875rem;
  }
}

/* Długie ścieżki i tabele nie poszerzają strony na telefonie */
.prose code {
  overflow-wrap: anywhere;
}

.prose table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
}

/* Co dalej */
.roadmap {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.roadmap li {
  display: flex;
  gap: 16px;
  padding: 24px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.roadmap li > .icon {
  color: var(--accent);
}

.roadmap h3 {
  margin-bottom: 4px;
  font-size: 1.0625rem;
}

.roadmap p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9688rem;
}

.roadmap__note {
  margin: 32px 0 0;
  text-align: center;
  color: var(--text-muted);
}

@media (max-width: 760px) {
  .roadmap {
    grid-template-columns: 1fr;
  }
}

/* Kontakt */
.contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.contact__card {
  display: block;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s, transform 0.15s;
}

.contact__card:hover {
  border-color: var(--accent);
  color: var(--text);
  transform: translateY(-2px);
}

.contact__card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9688rem;
}

.contact__address,
.contact__privacy {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  justify-content: center;
  margin: 24px 0 0;
  color: var(--text-muted);
  font-size: 0.9688rem;
}

.contact__address {
  align-items: center;
  font-size: 1.0625rem;
  font-weight: 600;
}

.contact__privacy {
  padding: 14px 18px;
  border-radius: 12px;
  background: color-mix(in srgb, #ffb020 12%, var(--bg));
  text-align: left;
}

.contact__privacy .icon {
  margin-top: 3px;
  color: #b26b00;
}

@media (max-width: 620px) {
  .contact {
    grid-template-columns: 1fr;
  }
}
