@font-face {
  font-family: 'Spectral';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/spectral-latin-ext-400-normal.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: 'Spectral';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/spectral-latin-400-normal.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: 'Spectral';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/spectral-latin-ext-500-normal.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: 'Spectral';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/spectral-latin-500-normal.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: 'Spectral';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/spectral-latin-ext-600-normal.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: 'Spectral';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/spectral-latin-600-normal.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: 'Work Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/work-sans-latin-ext-400-normal.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: 'Work Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/work-sans-latin-400-normal.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: 'Work Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/work-sans-latin-ext-500-normal.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: 'Work Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/work-sans-latin-500-normal.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;
}

:root {
  --paper: #F6F5F0;
  --card: #FDFCF9;
  --ink: #20261F;
  --muted: #6B7069;
  --line: #DFDED6;
  --accent: #1E5C43;
  --accent-soft: #E3EDE7;
  --gold: #A87F2E;
  --rust: #A34E2E;
  --amber: #B07A1B;
  --slate: #4A6178;
  --serif: 'Spectral', Georgia, serif;
  --sans: 'Work Sans', system-ui, -apple-system, sans-serif;
  --maxw: 44rem;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #181B17;
    --card: #20241F;
    --ink: #EBEAE2;
    --muted: #9AA096;
    --line: #32362F;
    --accent: #7CC2A2;
    --accent-soft: #24352C;
    --gold: #CBA452;
    --rust: #C97B58;
    --amber: #D0A04C;
    --slate: #8AA5BE;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
img { max-width: 100%; height: auto; }
iframe { max-width: 100%; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.25; }

/* Header */
.site-header {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.4rem 1.25rem 1.1rem;
  display: flex;
  flex-wrap: wrap;
  gap: .6rem 1.5rem;
  align-items: baseline;
  justify-content: space-between;
}
.site-name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--ink);
}
.site-name span { color: var(--accent); font-weight: 500; }
.site-name:hover { text-decoration: none; }
.site-nav { display: flex; flex-wrap: wrap; gap: .25rem .9rem; font-size: .9rem; }
.site-nav a { color: var(--muted); }
.site-nav a.active { color: var(--ink); border-bottom: 2px solid var(--accent); }
.site-nav a:hover { color: var(--ink); text-decoration: none; }

main { max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem 3rem; }

/* Signature rule: breviary double hairline */
.rule-double {
  height: 5px;
  border-top: 1px solid var(--accent);
  border-bottom: 1px solid var(--line);
  margin: 1.2rem 0 0;
}

/* Hero */
.hero { padding: 2.2rem 0 1.4rem; }
.hero-row { display: flex; gap: 2rem; align-items: center; }
.hero-photo {
  width: clamp(120px, 22vw, 190px);
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--line);
  flex-shrink: 0;
}
@media (max-width: 540px) {
  .hero-row { flex-direction: column; align-items: flex-start; gap: 1.2rem; }
  .hero-photo { width: 132px; }
}
.eyebrow {
  margin: 0 0 .5rem;
  font-size: .8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero h1 {
  margin: 0;
  font-size: clamp(1.5rem, 4.5vw, 2.1rem);
  font-weight: 500;
  max-width: 34ch;
}

/* Featured */
.section-label {
  margin: 1.8rem 0 .6rem;
  font-size: .8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.featured-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.1rem 1.3rem;
  color: var(--ink);
}
.featured-card:hover { border-color: var(--accent); text-decoration: none; }
.featured-title {
  display: block;
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 500;
  margin: .3rem 0 .2rem;
}
.featured-meta { font-size: .85rem; color: var(--muted); }

/* Category dots */
.cat-dot {
  display: inline-block;
  width: .55em; height: .55em;
  border-radius: 50%;
  background: var(--muted);
  margin-right: .45em;
  vertical-align: baseline;
}
.cat-dot[data-cat="nauczania"] { background: var(--accent); }
.cat-dot[data-cat="audio"] { background: var(--amber); }
.cat-dot[data-cat="wideo"], .cat-dot[data-cat="video"] { background: var(--rust); }
.cat-dot[data-cat="swiatlo-zycie"] { background: var(--gold); }
.cat-dot[data-cat="kartki-z-notatnika"] { background: var(--slate); }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: 2rem 0 1.1rem; }
.chip {
  font: inherit;
  font-size: .85rem;
  padding: .3rem .85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.chip:hover { border-color: var(--accent); color: var(--ink); }
.chip.active { background: var(--accent); border-color: var(--accent); color: var(--paper); }
.chip.active .cat-dot { background: var(--paper); }

/* Library grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .7rem; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: .85rem 1rem;
  color: var(--ink);
}
.card:hover { border-color: var(--accent); text-decoration: none; }
.card[hidden] { display: none; }
.card-title { display: block; font-weight: 500; font-size: .95rem; line-height: 1.4; margin: .25rem 0 .3rem; }
.card-meta { font-size: .8rem; color: var(--muted); }
.grid-empty { color: var(--muted); }
.more {
  display: block;
  margin: 1.5rem auto 0;
  font: inherit;
  font-size: .9rem;
  padding: .5rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
}
.more:hover { border-color: var(--accent); }

/* Post */
.post { padding-top: 1.8rem; }
.post-meta { margin: 0 0 .4rem; font-size: .85rem; color: var(--muted); }
.post-header h1 { margin: 0; font-size: clamp(1.5rem, 4.5vw, 2rem); }
.post-body { margin-top: 1.6rem; }
.post-body > p:first-child { font-size: 1.1rem; }
.post-body blockquote {
  margin: 1.5rem 0;
  padding: .2rem 0 .2rem 1.1rem;
  border-left: 3px solid var(--gold);
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink);
}
.post-back { margin-top: 2.5rem; font-size: .9rem; }

/* Embeds */
.embed { margin: 1.6rem 0; }
.embed iframe { width: 100%; border: 0; border-radius: 12px; }
.embed.is-video iframe { aspect-ratio: 16 / 9; height: auto; }
.yt-facade {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  cursor: pointer;
  padding: 0;
}
.yt-facade img { width: 100%; height: 100%; object-fit: cover; opacity: .85; }
.yt-facade::after {
  content: '▶';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 2.6rem;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0,0,0,.6);
}

/* Footer */
.site-footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.4rem 1.25rem 2.2rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.5rem;
  justify-content: space-between;
  font-size: .85rem;
  color: var(--muted);
}
.site-footer p { margin: 0; }
.social a { margin-left: 1rem; }
.social a:first-child { margin-left: 0; }

@media (prefers-reduced-motion: no-preference) {
  .card, .featured-card, .chip { transition: border-color .15s ease; }
}

/* Archive */
.hero-slim { padding-bottom: 0.4rem; }
.page-lead { color: var(--muted); font-size: .95rem; max-width: 55ch; }
.arch-search {
  font: inherit; font-size: .95rem;
  width: 100%; max-width: 26rem;
  margin: 0 0 1.1rem;
  padding: .5rem .9rem;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--card); color: var(--ink);
}
.arch-search:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.chip small { opacity: .7; font-size: .75em; }
.arch-hint { color: var(--muted); font-size: .85rem; margin-top: 1.2rem; }

/* Gallery */
.cat-dot[data-cat="galeria"] { background: #7A527E; }
@media (prefers-color-scheme: dark) { .cat-dot[data-cat="galeria"] { background: #B78ABB; } }
.ggrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr));
  gap: .6rem;
}
.gcard {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--card);
}
.gcard img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gcard:hover { border-color: var(--accent); }
.gdate {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: .9rem .6rem .35rem;
  font-size: .72rem;
  color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,.55));
}

/* Missing-photo tiles fall back to text */
.gcard-noimg { background: var(--accent-soft); }
.gcard-noimg .gcard-title {
  display: block;
  padding: .9rem .9rem 2rem;
  font-size: .85rem;
  line-height: 1.45;
  color: var(--ink);
  font-family: var(--serif);
  overflow: hidden;
}

/* Muza */
.muza-daily { margin-top: 1.6rem; }
.daily-card {
  background: var(--card);
  border: 1px solid var(--accent);
  border-radius: 14px;
  padding: 1.3rem 1.5rem;
}
.daily-date { margin: 0 0 .6rem; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.daily-content { font-size: 1.02rem; }
.daily-content .embed { margin: 1rem 0 .4rem; }
.daily-link { margin: .8rem 0 0; font-size: .9rem; }
.muza-own { margin-top: 2.4rem; padding-top: 1.6rem; border-top: 1px solid var(--line); }
.muza-own h2 { font-size: 1.4rem; margin: 0 0 .6rem; }
.channels { display: flex; gap: .5rem; margin-top: 1rem; }
.library .section-label { margin-top: 2.4rem; }


/* Daily memory (gallery) */
.daily-photo {
  display: flex;
  gap: 1.2rem;
  align-items: center;
  text-decoration: none;
  color: var(--ink);
  margin-bottom: 1.6rem;
}
.daily-photo:hover { text-decoration: none; border-color: var(--gold); }
.daily-photo img {
  width: clamp(110px, 24vw, 190px);
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 10px;
  flex-shrink: 0;
}
.daily-photo-title {
  display: block;
  font-family: var(--serif);
  font-size: 1.15rem;
  margin: .25rem 0 .5rem;
  line-height: 1.35;
}
.daily-link-fake { font-size: .9rem; color: var(--accent); }
@media (max-width: 480px) {
  .daily-photo { flex-direction: column; align-items: flex-start; }
  .daily-photo img { width: 100%; max-height: 230px; aspect-ratio: auto; }
}

.daily-photo.noimg { background: var(--accent-soft); }
.daily-photo.noimg .daily-photo-title { font-size: 1.05rem; }

/* Daily photo card: containment hardening */
.daily-photo-text { min-width: 0; flex: 1; }
.daily-photo-title { overflow-wrap: break-word; }
.daily-photo { overflow: hidden; }
