/* style-tresc.css — wspólny arkusz stron treściowych (ortografia, poradnik,
 * narzędzia, skład-ksiazki). Reguły wzięte z index.html (landing) — trzymać
 * się spójnie z jego design systemem. Strony statyczne: bez blobów, animacji,
 * tickera, demo dokumentu i reveal — tylko układ, typografia i przyciski. */

:root {
  --ink: #141a2e; --muted: #5b6478; --line: #e6e9f2; --bg: #f7f8fc;
  --brand: #3b5bdb; --brand-dark: #2f4ac2; --violet: #7c3aed;
  --good: #16a34a; --good-bg: #dcfce7; --bad: #dc2626; --bad-bg: #fee2e2;
  --shadow: 0 10px 30px -12px rgba(20,26,46,.18); --r: 14px;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; color: var(--ink); background: var(--bg); line-height: 1.6; overflow-x: hidden; }
a { color: var(--brand); text-decoration: none; }
h1, h2, h3 { line-height: 1.15; margin: 0; }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 6vw; }

/* --- nagłówek (jak landing) --- */
header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.8); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 6vw; max-width: 1140px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; color: var(--ink); }
.brand .mark { width: 32px; height: 32px; border-radius: 9px; background: linear-gradient(135deg, var(--brand), var(--violet)); color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 800; letter-spacing: -.5px; box-shadow: 0 6px 14px -6px rgba(59,91,219,.6); }
.brand small { color: var(--muted); font-weight: 400; font-size: 13px; }
nav { display: flex; align-items: center; gap: 22px; }
nav a { font-size: 14px; color: #2b3345; font-weight: 500; position: relative; }
nav a:not(.btn)::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -4px; height: 2px; background: var(--brand); transition: right .25s ease; }
nav a:not(.btn):hover::after { right: 0; }

/* --- przyciski (jak landing) --- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 10px; padding: 12px 22px; font-size: 15px; font-weight: 600; transition: transform .2s ease, box-shadow .2s ease, border-color .2s, color .2s; position: relative; overflow: hidden; white-space: nowrap; }
.btn.sm { padding: 8px 14px; font-size: 14px; border-radius: 8px; }
.btn.primary { background: linear-gradient(135deg, var(--brand), #5b4fe0); color: #fff; box-shadow: 0 10px 24px -10px rgba(59,91,219,.7); }
.btn.primary:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -12px rgba(59,91,219,.8); }
.btn.primary::after { content: ""; position: absolute; top: -50%; bottom: -50%; left: -30%; width: 30%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent); transform: skewX(-20deg) translateX(-200%); transition: transform .6s ease; }
.btn.primary:hover::after { transform: skewX(-20deg) translateX(600%); }
.btn.ghost { background: #fff; border: 1px solid #cfd5e3; color: var(--ink); }
.btn.ghost:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-2px); }
.btn.light { background: #fff; color: var(--brand); }
.btn.light:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -12px rgba(0,0,0,.4); }
.btn.outline-w { border: 1px solid rgba(255,255,255,.7); color: #fff; }
.btn.outline-w:hover { background: rgba(255,255,255,.12); transform: translateY(-2px); }

/* --- hero / tag (jak landing, kropka statyczna — zero animacji) --- */
.tag { display: inline-flex; align-items: center; gap: 8px; background: #eef1fd; color: var(--brand); font-size: 13px; font-weight: 600; border-radius: 999px; padding: 6px 14px; margin-bottom: 18px; border: 1px solid #dde3fb; }
.tag .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); }
h1 { font-size: clamp(34px, 4.6vw, 54px); letter-spacing: -.02em; margin-bottom: 16px; }
.lead { font-size: 18px; color: #404a60; max-width: 580px; margin: 0 0 26px; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* --- sekcje (jak landing) --- */
section { padding: 64px 0; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); margin-bottom: 10px; }
h2 { font-size: clamp(26px, 3.4vw, 38px); letter-spacing: -.02em; margin-bottom: 12px; }
/* Nagłówki-cel linków w treści: sticky header nie zasłania skoku do sekcji. */
.tresc h2, .final h2 { scroll-margin-top: 84px; }
.sub { font-size: 17px; color: #404a60; max-width: 720px; margin: 0 0 34px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 22px; transition: transform .25s ease, box-shadow .25s ease, border-color .25s; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #cdd5f5; }
.card h3 { font-size: 17px; margin: 0 0 8px; }
.card p { margin: 0; font-size: 14.5px; color: #4b5567; }

/* --- treść długa: artykuł --- */
.tresc { padding: 48px 0 24px; }
.tresc article { max-width: 720px; margin: 0 auto; }
.tresc article p { margin: 0 0 14px; }
.tresc article ul, .tresc article ol { margin: 0 0 14px; padding-left: 24px; }
.tresc article li { margin: 6px 0; }
.tresc article h2 { margin-top: 34px; }
.tresc article blockquote { margin: 18px 0; padding: 12px 18px; border-left: 4px solid var(--brand); background: #fff; border-radius: 0 var(--r) var(--r) 0; color: #404a60; }
/* Tabele w tresci dlugiej: blokowe z poziomym przewijaniem — tabela szersza
   od viewportu (mobile) musi byc przewijalna, nie ucinana przez overflow-x. */
.tresc table { display: block; width: max-content; max-width: 100%; overflow-x: auto; }
.tresc article table { display: block; width: max-content; max-width: 100%; overflow-x: auto; border-collapse: collapse; font-size: 15px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.tresc article th, .tresc article td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.tresc article thead th { background: #fafbfe; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.tresc article tr:last-child td { border-bottom: 0; }
.tresc article dt { font-weight: 600; margin-top: 14px; }
.tresc article dd { margin: 4px 0 0; font-size: 15px; color: #4b5567; }
mark { background: #fff3bf; padding: 0 2px; }
.muted { color: var(--muted); font-size: 13px; }

/* --- finalny box CTA (jak landing :722-734, koła statyczne) --- */
.final { padding: 0 0 72px; }
.final .box { position: relative; overflow: hidden; background: linear-gradient(135deg, #2f4ac2, #6d3fd9 60%, #8b5cf6); color: #fff; border-radius: 22px; padding: 56px 6vw; text-align: center; box-shadow: 0 30px 60px -30px rgba(59,91,219,.7); }
.final .box::before, .final .box::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,.12); filter: blur(10px); }
.final .box::before { width: 320px; height: 320px; top: -140px; left: -80px; }
.final .box::after { width: 260px; height: 260px; bottom: -120px; right: -60px; }
.final h2 { color: #fff; margin-bottom: 10px; position: relative; }
.final p { color: rgba(255,255,255,.88); font-size: 17px; max-width: 620px; margin: 0 auto 26px; position: relative; }
.final .cta { justify-content: center; position: relative; }

/* --- stopka (jak landing) --- */
footer { border-top: 1px solid var(--line); background: #fff; padding: 28px 0; font-size: 13.5px; color: var(--muted); }
footer .wrap { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; align-items: center; }
footer a { color: #404a60; }
footer a:hover { color: var(--brand); }

@media (max-width: 760px) {
  nav a:not(.btn) { display: none; }
  .brand small { display: none; }
  section { padding: 48px 0; }
  .final .box { padding: 44px 6vw; }
}
/* Mobile ≤640px: nawigacja sekcji wraca pod logo — CSS-only, bez hamburgera
 * i JS (cel: Narzędzia/Poradnik/Ortografia osiągalne z nagłówka). Pozycja
 * w kaskadzie po bloku 760px przywraca linki ukryte powyższą regułą. */
@media (max-width: 640px) {
  .nav { flex-direction: column; align-items: center; gap: 6px; padding-top: 10px; padding-bottom: 10px; }
  nav { flex-wrap: wrap; justify-content: center; gap: 8px 14px; }
  nav a { font-size: 13px; }
  nav a:not(.btn) { display: inline; }
}
/* Desktop: 6vw wewnątrz border-box max-width zwężało kolumnę im szerszy
   ekran — na desktopie stały wąski margines zamiast rosnącego (z landing). */
@media (min-width: 1140px) {
  .wrap, .nav { padding-left: 32px; padding-right: 32px; }
}
