/* Wspólny arkusz dla stron Astro ORAZ szablonów Go (blog, admin) — jeden plik,
   żeby blog renderowany serwerowo wyglądał identycznie jak reszta strony.

   Identyfikacja (2026-07-31): atrament + papier w chłodnym fiolecie, serif
   Literata w nagłówkach (blog o psychice = rzecz do CZYTANIA), Instrument Sans
   w tekście. Sygnatura strony głównej — „oddychająca" plama atramentu — żyje
   w index.astro; tu są tokeny, z których korzysta. */

/* ---- fonty (self-hosted, latin + latin-ext dla polskich znaków) ---- */
@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/fonts/instrumentsans-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/fonts/instrumentsans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Literata';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/literata-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Literata';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/literata-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---- tokeny ---- */
:root {
  --atrament: #201839;      /* głęboki fioletowy atrament — panel hero, nagłówki */
  --papier: #f6f4fa;        /* chłodny liliowy papier — tło */
  --wrzos: #6a4fc2;         /* linki, akcje */
  --wrzos-ciemny: #56409e;
  --bursztyn: #e3a54a;      /* JEDEN ciepły akcent — główne CTA */
  --grafit: #2b2735;        /* tekst */
  --mgla: #a99fc7;          /* tekst drugorzędny na atramencie */
  --szept: #6f6880;         /* tekst drugorzędny na papierze */
  --rule: #e3ddf0;
  --biel: #fffdfa;
  --max: 46rem;
  --font-display: 'Literata', Georgia, 'Times New Roman', serif;
  --font-body: 'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--papier);
  color: var(--grafit);
  line-height: 1.65;
  font-size: 1.02rem;
}

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--atrament);
}

a { color: var(--wrzos); }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--wrzos);
  outline-offset: 2px;
}

/* ---- nagłówek / stopka ---- */
header.site {
  border-bottom: 1px solid var(--rule);
  background: var(--papier);
}
header.site .inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.1rem 1.25rem;
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
  flex-wrap: wrap;
}
header.site .brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--atrament);
  text-decoration: none;
}
header.site .brand:hover { color: var(--wrzos); }
header.site nav { margin-left: auto; }
header.site nav a {
  color: var(--szept);
  text-decoration: none;
  margin-left: 1.25rem;
  font-weight: 500;
}
header.site nav a:hover { color: var(--atrament); }

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}
main.wide { max-width: 64rem; }

footer.site {
  border-top: 1px solid var(--rule);
  color: var(--szept);
  font-size: 0.85rem;
}
footer.site .inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.1rem 1.25rem;
}

/* ---- przyciski ---- */
button, .btn {
  display: inline-block;
  background: var(--wrzos);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 0.55rem 1.2rem;
  font-size: 0.95rem;
  font-family: var(--font-body);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
button:hover, .btn:hover { background: var(--wrzos-ciemny); }
button.secondary, .btn.secondary {
  background: transparent;
  color: var(--wrzos);
  border: 1px solid var(--wrzos);
}
button.secondary:hover, .btn.secondary:hover { background: rgba(106, 79, 194, 0.08); }
button.danger { background: #b3261e; }
button.danger:hover { background: #8f1e18; }

/* ---- blog ---- */
.post-list { list-style: none; padding: 0; margin-top: 2rem; }
.post-list li { margin: 0 0 2.25rem; }
.post-list .when {
  color: var(--szept);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.post-list h2 { margin: 0.15rem 0 0.3rem; font-size: 1.45rem; }
.post-list h2 a { color: var(--atrament); text-decoration: none; }
.post-list h2 a:hover { color: var(--wrzos); }
.post-list p { margin: 0.25rem 0 0; color: var(--szept); }

article.post .when {
  color: var(--szept);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.25rem;
}
article.post h1 { font-size: clamp(1.9rem, 4.5vw, 2.6rem); margin-top: 0.25rem; }
article.post img { max-width: 100%; border-radius: 10px; }
article.post blockquote {
  margin: 1.25rem 0;
  padding: 0.35rem 1.15rem;
  border-left: 3px solid var(--wrzos);
  color: var(--szept);
  font-family: var(--font-display);
  font-size: 1.05rem;
}
article.post pre {
  background: var(--atrament);
  color: var(--papier);
  padding: 1rem;
  border-radius: 10px;
  overflow-x: auto;
}

/* ---- admin ---- */
.admin table { width: 100%; border-collapse: collapse; }
.admin th, .admin td { text-align: left; padding: 0.5rem; border-bottom: 1px solid var(--rule); }
.admin .status-draft { color: var(--szept); }
.admin .status-published { color: #2e7d32; }

.editor { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.editor textarea {
  width: 100%;
  min-height: 28rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9rem;
  padding: 0.75rem;
  border: 1px solid var(--rule);
  border-radius: 8px;
  resize: vertical;
  background: var(--biel);
}
.editor .preview {
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 0 1rem;
  overflow-y: auto;
  max-height: 30rem;
  background: var(--biel);
}
@media (max-width: 60rem) { .editor { grid-template-columns: 1fr; } }

.editor-toolbar { margin-bottom: 0.5rem; display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.editor-toolbar .hint { color: var(--szept); font-size: 0.8rem; }

.field { margin-bottom: 1rem; }
.field label { display: block; font-weight: 600; margin-bottom: 0.25rem; }
.field input[type="text"] {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--rule);
  border-radius: 8px;
  font-size: 1rem;
  font-family: var(--font-body);
  background: var(--biel);
}
