/* Blog fakturoskop.pl/blog/ — tokeny granat-light skopiowane z landingu
   (repo produktu: www/src/styles.css). Gdy paleta aplikacji się zmieni,
   zsynchronizuj ręcznie. Jasny motyw, czcionka systemowa, zero fontów
   i skryptów z zewnątrz (CSP landingu obowiązuje też tutaj). */
:root {
  --color-bg: #eff2f6;
  --color-surface: #ffffff;
  --color-border: #d9e0ea;
  --color-text: #1d2534;
  --color-muted: #59657a;
  --color-accent: #2d4d92;
  --color-accent-dark: #24407e;
  --color-accent-fg: #ffffff;
  --color-accent-soft: #e2e9f5;
  --color-danger: #b02a2a;
  --color-ok: #116a45;
  --color-amber: #8a5a00;
  --color-dark: #1b3166;
  --color-dark-text: #e6ecf7;
  --color-dark-muted: #b4c3e2;
  --color-dark-rule: #3b559a;
  --radius: 10px;
  --measure: 68ch;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family:
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}

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

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

h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0 0 0.5em;
}

h1 {
  font-size: clamp(1.8rem, 1.2rem + 2vw, 2.4rem);
}

h2 {
  font-size: 1.45rem;
}

h3 {
  font-size: 1.15rem;
}

p {
  margin: 0 0 1em;
}

.container,
.container-narrow {
  width: 100%;
  margin: 0 auto;
  padding: 0 16px;
}

.container {
  max-width: 1120px;
}

.container-narrow {
  max-width: 760px;
  padding-top: 32px;
  padding-bottom: 48px;
}

/* --- Nagłówek jak na landingu ------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

.header-row {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 60px;
  flex-wrap: wrap;
  padding-top: 8px;
  padding-bottom: 8px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
}

.wordmark-mark {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--color-accent);
  background-image: linear-gradient(
    to bottom,
    transparent 25%,
    var(--color-accent-soft) 25%,
    var(--color-accent-soft) 35%,
    transparent 35%,
    transparent 50%,
    var(--color-accent-soft) 50%,
    var(--color-accent-soft) 60%,
    transparent 60%,
    transparent 75%,
    var(--color-accent-soft) 75%,
    var(--color-accent-soft) 85%,
    transparent 85%
  );
  background-size: 60% 100%;
  background-repeat: no-repeat;
  background-position: 50% 50%;
}

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

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

.site-nav a:hover {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.button {
  display: inline-block;
  padding: 8px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--color-accent);
  text-decoration: none;
  font-weight: 600;
}

.button-primary {
  background: var(--color-accent);
  color: var(--color-accent-fg);
}

.button-primary:hover {
  background: var(--color-accent-dark);
  color: var(--color-accent-fg);
}

/* --- Lista wpisów --------------------------------------------------------- */
.page-header {
  margin-bottom: 24px;
}

.post-lead {
  color: var(--color-muted);
  font-size: 1.125rem;
}

.feed-hint {
  font-size: 0.95rem;
  color: var(--color-muted);
}

.post-list ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

.post-list li {
  border-top: 1px solid var(--color-border);
  padding: 20px 0;
}

.post-card h2 {
  margin-bottom: 0.3em;
}

.post-card h2 a {
  text-decoration: none;
  color: var(--color-text);
}

.post-card h2 a:hover {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.post-card p {
  margin: 0;
}

.post-meta {
  color: var(--color-muted);
  font-size: 0.95rem;
  margin-bottom: 0.4em;
}

.post-tag {
  display: inline-block;
  padding: 0 8px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font-size: 0.85rem;
}

/* --- Wpis ------------------------------------------------------------------ */
.post-header {
  margin-bottom: 24px;
}

.post-body > * {
  max-width: var(--measure);
}

.post-body h2 {
  margin-top: 1.6em;
}

.post-body h3 {
  margin-top: 1.3em;
}

.post-body ul,
.post-body ol {
  padding-left: 1.4em;
  margin: 0 0 1em;
}

.post-body li {
  margin-bottom: 0.3em;
}

.post-body blockquote {
  margin: 0 0 1em;
  padding: 4px 0 4px 16px;
  border-left: 3px solid var(--color-accent-soft);
  color: var(--color-muted);
}

.post-body code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.92em;
  background: var(--color-accent-soft);
  padding: 1px 5px;
  border-radius: 4px;
}

.post-body pre {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 12px 14px;
  overflow-x: auto;
  margin: 0 0 1em;
}

.post-body pre code {
  background: none;
  padding: 0;
}

.post-body table {
  border-collapse: collapse;
  width: 100%;
  margin: 0 0 1em;
  font-size: 0.97rem;
}

.post-body th,
.post-body td {
  text-align: left;
  padding: 6px 10px;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}

.post-body th {
  color: var(--color-muted);
  font-weight: 600;
}

.post-body img,
.post-body video {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
}

.post-body hr {
  border: 0;
  border-top: 1px solid var(--color-border);
  margin: 1.5em 0;
}

/* Nagranie = link z miniaturą (bez osadzania obcego odtwarzacza). */
.video-card {
  display: block;
  margin: 0 0 24px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  overflow: hidden;
  text-decoration: none;
  color: var(--color-text);
}

.video-card img {
  display: block;
  width: 100%;
  height: auto;
}

.video-card-label {
  display: block;
  padding: 12px 16px;
  font-weight: 600;
  color: var(--color-accent);
}

.video-card:hover .video-card-label {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.video-card-label small {
  font-weight: 400;
  color: var(--color-muted);
}

.plan-notice {
  margin-top: 24px;
  padding: 12px 16px;
  border-left: 3px solid var(--color-amber);
  background: var(--color-surface);
  color: var(--color-muted);
  font-size: 0.95rem;
}

.post-footer {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
}

/* --- Stopka jak na landingu --------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
  padding: 24px 0 32px;
  font-size: 0.9rem;
  color: var(--color-muted);
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-bottom: 12px;
}

.footer-company {
  margin: 0 auto 6px;
  max-width: 1120px;
  padding: 0 16px;
}

@media (max-width: 640px) {
  .site-nav {
    margin-left: 0;
    gap: 12px;
  }

  .header-row .button {
    margin-left: auto;
  }
}
