:root {
  --font: Tahoma, Verdana, Arial, sans-serif;
  --heading-font: inherit;
  --bg: #000;
  --page-background: #000;
  --text: #fff;
  --muted: #c0c0c0;
  --faint: #888;
  --accent: #ffff00;
  --hover: #00ffff;
  --heading-2: #00d878;
  --border: #777;
  --border-soft: #555;
  --rule: #444;
  --rule-soft: #333;
  --panel: rgba(255, 255, 255, 0.02);
  --field: #111;
  --button-text: #000;
  --error: #ff6b6b;
}

/* "konkwistadorzy-chalwy" (default): the olive palette of the old
   konkwistadorzy.blogspot.com Watermark template. :root above is "gildia". */
:root[data-theme="konkwistadorzy-chalwy"] {
  --font: Arial, Tahoma, Helvetica, FreeSans, sans-serif;
  --heading-font: Georgia, Utopia, "Palatino Linotype", Palatino, serif;
  --bg: #515812;
  --page-background: radial-gradient(ellipse at top, #6f7a2a 0%, #515812 45%, #2f340a 100%) fixed;
  --text: #f5ffde;
  --muted: #a2ab8a;
  --faint: #8a926f;
  --accent: #ffeecc;
  --hover: #e8ffcd;
  --heading-2: #fdffdd;
  --border: #929957;
  --border-soft: #727c58;
  --rule: #727c58;
  --rule-soft: #5f6633;
  --panel: rgba(0, 0, 0, 0.18);
  --field: #3d4210;
  --button-text: #2f340a;
  --error: #ffb3a1;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  background: var(--page-background);
  background-attachment: fixed;
  scrollbar-face-color: #000;
  scrollbar-arrow-color: #fff;
  scrollbar-track-color: #dcebd6;
  scrollbar-shadow-color: #516145;
  scrollbar-highlight-color: #c5d0c1;
  scrollbar-3dlight-color: #c5d0c1;
  scrollbar-darkshadow-color: #cfcfcf;
}

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

h1,
h2,
h3,
.post-title,
.nav-link {
  font-family: var(--heading-font);
}

a:visited {
  color: var(--muted);
}

a:active,
a:hover {
  color: var(--hover);
}

.container {
  /* Grows with the window: 820px on small laptops up to 1280px on wide screens. */
  max-width: clamp(820px, 82vw, 1280px);
  margin: 0 auto;
  padding: 18px 22px;
}

.header {
  padding: 20px 0 12px;
  margin-bottom: 24px;
  text-align: center;
}

.header .container {
  border-bottom: 1px solid var(--border);
}

.site-logo {
  display: block;
  width: min(760px, 92vw);
  height: auto;
  margin: 0 auto 8px;
}

.blog-subtitle {
  color: var(--muted);
  font-size: 0.82rem;
}

.blog-subtitle {
  margin-bottom: 18px;
}

.header a {
  color: inherit;
}

.nav-link {
  display: inline-block;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 14px 16px;
  text-decoration: underline;
}

.nav-link:hover {
  color: var(--hover);
}

.portal {
  text-align: center;
}

.marquee-line {
  max-width: 766px;
  margin: 18px auto;
  color: var(--text);
  font-size: 1rem;
}

.site-note {
  margin: 26px auto;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

.site-note a {
  color: var(--accent);
}

.portal-table,
.section-page {
  max-width: min(100%, 1100px);
  margin: 0 auto 34px;
  text-align: left;
}

.portal-table {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.portal-table h3,
.section-page h1 {
  margin: 18px 0;
  color: var(--accent);
  font-size: 1.25rem;
}

.section-page h2 {
  margin: 22px 0 10px;
  color: var(--heading-2);
  font-size: 1.2rem;
}

.section-page h3 {
  margin: 24px 0 12px;
  color: var(--accent);
  font-size: 1rem;
}

.section-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 18px;
  padding: 12px 0;
  border-top: 1px solid var(--rule-soft);
  font-size: 0.9rem;
}

.section-row a {
  color: var(--accent);
  font-weight: 700;
}

.section-row span,
.section-page p,
.section-page li {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 400;
}

.section-page p {
  margin-bottom: 18px;
  text-align: justify;
}

.section-page .campaign-intro,
.section-page .post-date {
  text-indent: 0;
}

.section-page ul {
  margin: 0 0 28px 38px;
}

.section-page li {
  margin-bottom: 10px;
}

.section-page ul.blogroll {
  list-style: none;
  margin: 0 0 28px;
}

.blogroll-item {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 18px;
  padding: 10px 0;
  border-top: 1px solid var(--rule-soft);
}

.blogroll-name a {
  color: var(--accent);
  font-weight: 700;
}

.blogroll-latest .post-date {
  margin: 2px 0 0;
  font-weight: 400;
}

.blogroll-quiet .blogroll-name a {
  color: var(--faint);
  font-weight: 400;
}

@media (max-width: 600px) {
  .blogroll-item {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

.session-report {
  padding-bottom: 24px;
}

.blog-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.blog-layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 28px;
  align-items: start;
}

.blog-archive {
  border: 1px solid var(--rule);
  padding: 16px;
  background: var(--panel);
}

/* Sidebar comes first in the markup but sits on the right (below on phones). */
.blog-sidebar {
  order: 2;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.recent-comments ul {
  list-style: none;
}

.recent-comments li {
  padding: 8px 0;
  border-top: 1px solid var(--rule-soft);
  font-size: 0.8rem;
}

.recent-comments li:first-child {
  border-top: 0;
}

.recent-comments a {
  text-decoration: none;
}

.recent-comments a:hover .recent-comment-page {
  text-decoration: underline;
}

.recent-comment-page {
  color: var(--accent);
}

.recent-comment-excerpt {
  margin-top: 2px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.blogroll-compact {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 0.78rem;
  line-height: 1.4;
}

.blogroll-compact-name {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

/* Long post titles are cut to one line; the full title is in the tooltip. */
.blogroll-compact-post {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.blogroll-compact-post a {
  color: var(--text);
}

.blogroll-compact-age {
  color: var(--muted);
  font-size: 0.72rem;
}

.blog-archive h2 {
  color: var(--accent);
  font-size: 1rem;
  margin-bottom: 14px;
}

.archive-year,
.archive-month {
  margin-bottom: 8px;
}

.archive-year summary,
.archive-month summary {
  cursor: pointer;
  color: var(--text);
  font-weight: 700;
  font-size: 0.86rem;
  margin-bottom: 6px;
}

.archive-month-list {
  margin-left: 12px;
}

.archive-post-list {
  list-style: none;
  margin: 0 0 10px 12px;
}

.archive-post-list li {
  margin-bottom: 6px;
}

.archive-post-list a {
  color: var(--text);
  font-size: 0.82rem;
  text-decoration: underline;
}

.archive-post-list a:hover {
  color: var(--hover);
}

.archive-post-list a.archive-post-active {
  color: var(--accent);
  font-weight: 700;
}

.blog-main {
  min-width: 0;
}

.blog-card {
  padding: 14px 0 16px;
  border-bottom: 1px solid var(--border-soft);
}

.post-title {
  color: var(--accent);
  font-size: 1.35rem;
  margin-bottom: 10px;
  line-height: 1.2;
  font-weight: 700;
}

.post-title a {
  color: var(--accent);
}

.post-title a:hover {
  color: var(--hover);
}

.post-date {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  margin-bottom: 14px;
  font-weight: 700;
}

.blog-card-body {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.blog-card-thumb {
  flex: 0 0 120px;
}

.blog-card-thumb img {
  display: block;
  width: 120px;
  height: 90px;
  object-fit: cover;
  border: 1px solid var(--border-soft);
}

.blog-card-links {
  margin-top: 8px;
  display: flex;
  gap: 20px;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  padding: 12px 0 10px;
  font-size: 0.9rem;
  font-weight: 700;
}

.pagination-current {
  color: var(--accent);
}

@media (max-width: 600px) {
  .blog-card-thumb {
    flex-basis: 80px;
  }

  .blog-card-thumb img {
    width: 80px;
    height: 60px;
  }
}

.post-excerpt {
  color: var(--text);
  margin-bottom: 14px;
  line-height: 1.6;
  font-size: 0.95rem;
  text-align: justify;
}

.read-more {
  display: inline-block;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 700;
}

.read-more:hover {
  color: var(--hover);
}

.blog-post {
  padding-bottom: 36px;
}

.back-link {
  display: inline-block;
  color: var(--text);
  margin-bottom: 28px;
  font-size: 0.82rem;
  font-weight: 700;
}

.back-link:hover {
  color: var(--hover);
}

.blog-post .post-title {
  color: var(--accent);
  font-size: 1.7rem;
  margin-bottom: 14px;
  font-weight: 700;
  line-height: 1.1;
}

.blog-post .post-date {
  margin-bottom: 28px;
}

.post-content {
  color: var(--text);
  font-size: clamp(0.9rem, 0.62rem + 0.35vw, 1.1rem);
  font-weight: 400;
  line-height: 1.7;
  text-align: justify;
}

.post-content p {
  margin-bottom: 18px;
}

.post-content h2 {
  margin-top: 32px;
  margin-bottom: 16px;
  color: var(--accent);
  font-size: 1.1rem;
  font-weight: 700;
}

.post-content ul,
.post-content ol {
  margin-left: 40px;
  margin-bottom: 25px;
}

.post-content li {
  margin-bottom: 10px;
  font-weight: 400;
}

.post-content li::marker {
  color: var(--accent);
}

.post-comments {
  margin-top: 42px;
  padding-top: 22px;
  border-top: 1px solid var(--rule);
}

.post-comments h2 {
  color: var(--accent);
  font-size: 1.05rem;
  margin-bottom: 16px;
}

.comment-thread {
  list-style: none;
  margin: 0;
  padding-left: 0;
}

.comment-item {
  margin-bottom: 16px;
  padding: 12px 0 0 14px;
  border-left: 1px solid var(--border-soft);
}

.comment-thread .comment-thread {
  margin-top: 12px;
  margin-left: 14px;
}

.comment-meta {
  color: var(--muted);
  font-size: 0.8rem;
  margin-bottom: 6px;
}

.comment-author {
  color: var(--accent);
  font-weight: 700;
}

.comment-content {
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.65;
}

.comment-content p {
  margin-bottom: 12px;
  text-indent: 0;
}

.comment-form {
  margin-top: 28px;
}

.comment-form h3 {
  color: var(--accent);
  font-size: 0.95rem;
  margin-bottom: 12px;
}

.comment-form label {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  margin-bottom: 12px;
}

.comment-form input,
.comment-form textarea {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 6px 8px;
  color: var(--text);
  background: var(--field);
  border: 1px solid var(--border);
  font: inherit;
  font-size: 0.88rem;
}

.comment-form textarea {
  resize: vertical;
}

.comment-form button {
  margin-top: 12px;
  padding: 5px 16px;
  color: var(--button-text);
  background: var(--accent);
  border: 0;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.comment-form button:disabled {
  opacity: 0.6;
  cursor: default;
}

.comment-form-note {
  margin-top: 10px;
  color: var(--heading-2);
  font-size: 0.85rem;
}

.comment-form-error {
  color: var(--error);
}

/* Honeypot: off-screen rather than display:none, which some bots skip. */
.comment-hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.not-found {
  padding: 60px 24px;
  text-align: center;
}

.not-found h1 {
  color: var(--accent);
  margin-bottom: 24px;
  font-size: 1.8rem;
  font-weight: 700;
}

@media (max-width: 768px) {
  .container {
    padding: 14px;
  }

  .site-logo {
    width: min(520px, 96vw);
  }

  .post-title {
    font-size: 1.2rem;
  }

  .blog-post .post-title {
    font-size: 1.45rem;
  }

  .section-row {
    grid-template-columns: 1fr;
  }

  /* minmax(0, ...) so long sidebar lines can't widen the page past the screen. */
  .blog-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .blog-archive {
    position: static;
  }
}

.theme-switcher {
  position: absolute;
  top: 10px;
  right: 14px;
  color: var(--muted);
  font-size: 0.75rem;
}

.theme-switcher select {
  margin-left: 6px;
  padding: 2px 4px;
  color: var(--text);
  background: var(--field);
  border: 1px solid var(--border);
  font: inherit;
}

.site-title-link {
  text-decoration: none;
}

.site-title-text {
  display: none;
}

/* Olive theme: a plain title, as on the old Blogspot header. */
:root[data-theme="konkwistadorzy-chalwy"] .site-logo {
  display: none;
}

:root[data-theme="konkwistadorzy-chalwy"] .site-title-text {
  display: block;
  margin: 24px 0 14px;
  color: #ffffff;
  font: normal normal 60px Georgia, Utopia, "Palatino Linotype", Palatino, serif;
  line-height: 1.1;
  text-shadow: 2px 2px rgba(0, 0, 0, 0.25);
}

@media (max-width: 600px) {
  :root[data-theme="konkwistadorzy-chalwy"] .site-title-text {
    font-size: 38px;
  }
}

/* Serif, tight and justified, like the Blogger label cloud it imitates. */
.label-cloud ul {
  list-style: none;
  font-family: Georgia, Utopia, "Palatino Linotype", Palatino, serif;
  line-height: 1.2;
  text-align: justify;
}

.label-cloud li {
  display: inline;
  color: var(--muted);
}

.label-cloud a {
  color: var(--accent);
  text-decoration: none;
}

.label-cloud a:hover {
  text-decoration: underline;
}

.post-labels {
  margin-top: 24px;
  color: var(--muted);
  font-size: 0.82rem;
}

.tag-heading {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.tag-heading strong {
  color: var(--accent);
}

/* Keep "Odpowiedz" close to the text: drop the last paragraph's margin. */
.comment-content > :last-child {
  margin-bottom: 0;
}

.comment-reply {
  display: inline-block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.75rem;
}

.comment-form-reply {
  margin-top: 8px;
}

.comment-form .comment-cancel {
  margin-left: 8px;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border);
}

/* The Gildia Gorlicka credit only applies to the black theme modelled on it. */
:root:not([data-theme="gildia"]) .site-note {
  display: none;
}

.comment-body {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.comment-avatar {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  object-fit: cover;
  border: 1px solid var(--border-soft);
}

.comment-main {
  min-width: 0;
  flex: 1;
}

/* Images in posts never wider than the column. */
.post-content img {
  max-width: 100%;
  height: auto;
}

.blog-sidebar {
  min-width: 0;
}

/* Phones: modelled on Blogger's mobile template — centered title and menu,
   thumbnail to the right of the snippet, plain "Nowsze / Starsze" paging. */
@media (max-width: 768px) {
  body {
    font-size: 14px;
  }

  .header {
    padding-top: 8px;
    margin-bottom: 12px;
  }

  .theme-switcher {
    position: static;
    display: block;
    margin-bottom: 8px;
    text-align: right;
  }

  :root[data-theme="konkwistadorzy-chalwy"] .site-title-text {
    margin: 4px 0 8px;
    font-size: clamp(28px, 9vw, 44px);
  }

  .blog-subtitle {
    margin-bottom: 10px;
  }

  .nav-link {
    margin: 0 8px 10px;
    font-size: 0.9rem;
  }

  .blog-layout {
    gap: 20px;
  }

  .blog-list {
    gap: 4px;
  }

  .blog-card {
    padding: 14px 0 16px;
  }

  .blog-card-body {
    flex-direction: row-reverse;
    gap: 12px;
  }

  .blog-card-thumb {
    flex-basis: 72px;
  }

  .blog-card-thumb img {
    width: 72px;
    height: 72px;
  }

  .post-excerpt {
    flex: 1;
    text-align: left;
    font-size: 0.9rem;
  }

  .post-content {
    text-align: left;
  }

  /* Only "Nowsze" and "Starsze", like Blogger mobile. */
  .pagination a:not(.pagination-step),
  .pagination-current {
    display: none;
  }

  .pagination {
    justify-content: space-between;
  }

  /* "Starsze" stays on the right even on the first page. */
  .pagination .pagination-step:last-child {
    margin-left: auto;
  }

  .comment-avatar {
    flex-basis: 28px;
    width: 28px;
    height: 28px;
  }

  .comment-thread .comment-thread {
    margin-left: 4px;
  }

  .comment-item {
    padding-left: 10px;
  }
}

/* Long URLs and words wrap instead of widening the page (mainly on phones). */
.post-excerpt,
.post-content,
.comment-content,
.blog-card {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* Phones keep the sidebar short: no label cloud or recent comments. */
@media (max-width: 768px) {
  .label-cloud,
  .recent-comments {
    display: none;
  }
}

/* Phones: a flat background instead of the desktop gradient. */
@media (max-width: 768px) {
  :root[data-theme="konkwistadorzy-chalwy"] {
    --page-background: #515812;
  }
}

/* Phones: plain sans-serif headings and unadorned post titles, to keep it calm. */
@media (max-width: 768px) {
  :root[data-theme="konkwistadorzy-chalwy"] {
    --heading-font: Arial, Tahoma, Helvetica, FreeSans, sans-serif;
  }

  .post-title,
  .post-title a {
    text-decoration: none;
    font-weight: 700;
  }

  .post-title {
    font-size: 1.1rem;
    line-height: 1.25;
  }

  .blog-post .post-title {
    font-size: 1.3rem;
  }
}

/* Olive theme: post titles a shade brighter than the other accents. */
:root[data-theme="konkwistadorzy-chalwy"] .post-title,
:root[data-theme="konkwistadorzy-chalwy"] .post-title a {
  color: #fffaf0;
}
