/* Syczek — typografia książkowa (Minion) pod WriteFreely */

@font-face {
  font-family: "Minion Pro";
  font-weight: normal;
  font-style: normal;
  font-display: swap;
  src: url("/local/fonts/MinionPro-Regular.otf") format("opentype");
}
@font-face {
  font-family: "Minion Pro";
  font-weight: normal;
  font-style: italic;
  font-display: swap;
  src: url("/local/fonts/MinionPro-It.otf") format("opentype");
}
@font-face {
  font-family: "Minion Pro";
  font-weight: bold;
  font-style: normal;
  font-display: swap;
  src: url("/local/fonts/MinionPro-Bold.otf") format("opentype");
}
@font-face {
  font-family: "Minion Pro";
  font-weight: bold;
  font-style: italic;
  font-display: swap;
  src: url("/local/fonts/MinionPro-BoldIt.otf") format("opentype");
}
@font-face {
  font-family: "Minion Pro";
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url("/local/fonts/MinionPro-Semibold.otf") format("opentype");
}
@font-face {
  font-family: "Minion Pro";
  font-weight: 600;
  font-style: italic;
  font-display: swap;
  src: url("/local/fonts/MinionPro-SemiboldIt.otf") format("opentype");
}
@font-face {
  font-family: "Minion Pro";
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url("/local/fonts/MinionPro-Medium.otf") format("opentype");
}
@font-face {
  font-family: "Minion Pro";
  font-weight: 500;
  font-style: italic;
  font-display: swap;
  src: url("/local/fonts/MinionPro-MediumIt.otf") format("opentype");
}

body {
  font-family: "Minion Pro", Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  line-height: 1.55;
  font-variant-ligatures: common-ligatures;
  font-variant-numeric: oldstyle-nums;
  font-feature-settings: "liga" 1, "clig" 1, "kern" 1;
  -webkit-font-feature-settings: "liga" 1, "clig" 1, "kern" 1;
  -webkit-hyphens: auto;
  hyphens: auto;
  background: #f7f4ef;
  color: #1a1a1a;
}

#wrapper,
body#collection #wrapper,
body#post #wrapper {
  max-width: 38rem;
}

#blog-title a,
header h1 a,
header h2 a {
  font-family: "Minion Pro", Georgia, serif;
  font-weight: normal;
  font-variant-caps: small-caps;
  -webkit-font-variant-caps: small-caps;
  font-feature-settings: "smcp" 1, "kern" 1, "liga" 1, "dlig" 1;
  letter-spacing: 0.08em;
  text-decoration: none;
  color: #1a1a1a;
}

article,
body#collection article,
body#post article,
.e-content {
  font-family: "Minion Pro", Georgia, serif;
}

/*
 * write.css: body#post article { white-space: pre } — łamie wiersze poezji.
 * Na body#collection dotyczyło tylko article p; treść poza <p> zlewała się.
 * pre-wrap TYLKO na .e-content — nie na całym article (na głównej między
 * tytułem a treścią szablon ma puste linie: edit/pin/delete).
 * write.css: body#post article p { display: inline } — zabija text-align.
 */
body#collection article,
body#post article {
  white-space: normal;
}

body#collection article .e-content,
body#post article .e-content,
.e-content {
  white-space: pre-wrap !important;
}

body#post article p,
body#post article .e-content p,
body#collection article p,
.e-content p {
  display: block !important;
  text-align: justify;
  text-justify: inter-word;
  margin: 0;
  text-indent: 1.3em;
}

/* puste <p> po zagnieżdżonym HTML w Markdownie */
.e-content > p:empty {
  display: none !important;
}

body#post article p:first-of-type,
.e-content > p:first-child,
h1 + p, h2 + p, h3 + p {
  text-indent: 0;
}

/* Wyrównanie — klasa na samym <p> albo na opakowaniu */
.align-center,
p.align-center,
.motto,
p.motto {
  display: block !important;
  text-align: center !important;
  text-indent: 0 !important;
  text-justify: auto !important;
}
.align-right,
p.align-right {
  display: block !important;
  text-align: right !important;
  text-indent: 0 !important;
  text-justify: auto !important;
}
.align-left,
p.align-left {
  display: block !important;
  text-align: left !important;
  text-indent: 0 !important;
}
/* inline style z edytora */
.e-content p[style*="text-align: center"],
.e-content p[style*="text-align:center"],
body#post article p[style*="text-align: center"],
body#post article p[style*="text-align:center"],
body#collection article p[style*="text-align: center"],
body#collection article p[style*="text-align:center"] {
  text-align: center !important;
  text-indent: 0 !important;
}
.e-content p[style*="text-align: right"],
.e-content p[style*="text-align:right"],
body#post article p[style*="text-align: right"],
body#post article p[style*="text-align:right"],
body#collection article p[style*="text-align: right"],
body#collection article p[style*="text-align:right"] {
  text-align: right !important;
  text-indent: 0 !important;
}

article h1, article h2,
.e-content h1, .e-content h2,
body#post header h2 {
  font-family: "Minion Pro", Georgia, serif;
  font-weight: normal;
  font-size: 1.35em;
  text-align: center;
  margin-top: 1.8em;
  margin-bottom: 1.2em;
  font-variant-caps: small-caps;
  font-feature-settings: "smcp" 1, "kern" 1, "liga" 1, "dlig" 1;
  letter-spacing: 0.08em;
}

/* Główna: tytuł w pierwszym wierszu, akcje w drugim — bez ruszania .hidden / opacity */
body#collection #wrapper h2.post-title {
  text-align: center;
}

body#collection #wrapper h2.post-title > a.u-url,
body#collection #wrapper h2.post-title > time {
  display: block;
  text-align: center;
}

body#collection #wrapper h2.post-title > a.action,
body#collection #wrapper h2.post-title > div.action {
  float: none !important;
}

/* Nadpisz ewentualny cache CF ze starym opacity:0.55 — wróć do zachowania WF */
body#collection #wrapper h2.post-title > a.action.hidden,
body#collection #wrapper h2.post-title > div.action.hidden {
  opacity: 0;
}
body#collection #wrapper article:hover h2.post-title > .hidden {
  opacity: 1;
}
@media (pointer: coarse) {
  body#collection #wrapper article h2.post-title > .hidden {
    opacity: 1;
  }
}

article h3, .e-content h3 {
  font-weight: 600;
  font-size: 1.1em;
  text-align: left;
  margin-top: 1.4em;
}

article a, .e-content a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

header nav .views { display: none; }

/* Ukryj branding WriteFreely (publicznie i w panelu) — !important przez write.css */
body#collection > footer,
body#post > footer,
body#subpage > footer {
  display: none !important;
}
footer nav a[href*="writefreely.org"]:not([href*="/docs/main/writer"]),
footer nav a[href*="write.as"],
footer nav a[href*="developers.write.as"],
footer nav a[href*="github.com/writefreely"],
footer nav p {
  display: none !important;
}
footer .marketing-section {
  display: none !important;
}

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

blockquote {
  margin: 1.5em 0 1.5em 1em;
  padding-left: 1.1em;
  border-left: 2px solid #777;
  font-style: italic;
}
blockquote p {
  text-indent: 0 !important;
  text-align: left;
}

/* klasy z EPUB — używaj w HTML w poście */
.sc, .small-caps {
  font-variant-caps: small-caps;
  font-feature-settings: "smcp" 1, "kern" 1;
  letter-spacing: 0.05em;
}
.all-sc {
  font-variant-caps: all-small-caps;
  font-feature-settings: "smcp" 1, "c2sc" 1, "kern" 1;
  letter-spacing: 0.06em;
}
.motto {
  padding: 3em 0 1.5em;
  width: 85%;
  margin: 0 auto;
  text-align: center;
  font-style: italic;
  font-feature-settings: "liga" 1, "dlig" 1, "kern" 1;
}
.motto p { text-align: center !important; text-indent: 0 !important; }
.motto-author {
  font-style: normal;
  font-size: 0.9em;
  margin-top: 1.2em;
  font-variant-caps: small-caps;
  letter-spacing: 0.05em;
}
.wyroznienie-blok_a {
  margin: 1.8em 2em;
  text-indent: 0;
  font-size: 0.95em;
  line-height: 1.45;
  text-align: justify;
}
.wyroznienie-blok {
  margin: 1.8em 0 1.8em 1em;
  padding-left: 1.2em;
  border-left: 2px solid #777;
  text-indent: 0;
  font-size: 0.95em;
}
.wyroznienie-blok p, .wyroznienie-blok_a p { text-indent: 0 !important; }
.title-page, .frontmatter { text-align: center; margin: 2em auto; }
.title-page p, .frontmatter p { text-align: center !important; text-indent: 0 !important; }
.book-title { font-size: 1.5em; font-weight: normal; margin-bottom: 1.5em; }
.book-author { font-size: 1.15em; letter-spacing: 0.08em; margin-bottom: 1em; }
.translator { font-size: 0.85em; font-style: italic; }
.publisher { font-size: 0.85em; }
.logo-wrap { display: inline-block; max-width: 100px; }
img.logo { width: 100%; height: auto; margin: 0; }
.pagebreak {
  display: block;
  margin: 2.5em 0;
  border-top: 1px solid #ccc;
  height: 0;
}
.footnotes { margin-top: 3em; font-size: 0.85em; }
.footnotes-sep {
  width: 25%;
  margin: 0 0 1.5em;
  border: none;
  border-top: 1px solid #888;
}
.footnote, .footnote p { text-indent: 0 !important; text-align: left !important; }
nav#toc { margin: 2em 0; }
nav#toc ol, nav#toc ul { list-style: none; padding-left: 0; }
nav#toc li { margin-bottom: 0.8em; }
nav#toc a { text-decoration: none; color: inherit; }
