
:root {
  --bg: #FDFBF7;
  --text: #2B2927;
  --accent: #2C4A3E;
  --accent-hover: #1A3028;
  --accent-light: #EBF0EE;
  --border: #E5E1D8;
  --link: #8A3A2B;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1A1A1A;
    --text: #EAEAEA;
    --accent: #5C8C7A;
    --accent-hover: #7CB09C;
    --accent-light: #2A3632;
    --border: #333333;
    --link: #D4796A;
  }
}

body {
  font-family: 'Source Serif 4', serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.8;
  margin: 0;
  padding: 0;
  font-size: 18px;
}

h1, h2, h3, h4, h5, .logo, nav a, th {
  font-family: 'Inter', sans-serif;
}

h1 { font-size: 2.5rem; color: var(--accent); margin-bottom: 0.5rem; line-height: 1.2; }
h2 { font-size: 1.8rem; color: var(--accent); margin-top: 2.5rem; border-bottom: 1px solid var(--border); padding-bottom: 0.5rem; }
h3 { font-size: 1.4rem; color: var(--text); margin-top: 1.5rem; }

a { color: var(--link); text-decoration: underline; text-underline-offset: 4px; transition: color 0.2s; }
a:hover { color: var(--accent); }

.container { max-width: 860px; margin: 0 auto; padding: 0 20px; }

header { background: var(--bg); border-bottom: 1px solid var(--border); padding: 20px 0; position: sticky; top: 0; z-index: 100; }
header .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 15px; }
.logo a { font-size: 1.8rem; font-weight: 700; text-decoration: none; color: var(--accent); letter-spacing: -0.5px; }
nav a { margin-left: 20px; text-decoration: none; font-weight: 500; font-size: 0.95rem; color: var(--text); }
nav a:hover { color: var(--accent); text-decoration: underline; }

.hero { text-align: center; padding: 60px 0 40px; }
.hero h1 { font-size: 3rem; margin-bottom: 20px; }
.hero p { font-size: 1.2rem; max-width: 600px; margin: 0 auto; color: #666; }
@media (prefers-color-scheme: dark) { .hero p { color: #aaa; } }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 40px; margin-top: 40px; }
.card { background: transparent; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; transition: transform 0.2s; display: flex; flex-direction: column; }
.card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.05); }
.card img { width: 100%; height: 220px; object-fit: cover; }
.card-content { padding: 25px; flex-grow: 1; display: flex; flex-direction: column; }
.card-content h3 { margin-top: 0; font-size: 1.3rem; margin-bottom: 15px; }
.card-content h3 a { color: var(--accent); text-decoration: none; }
.card-content p { font-size: 0.95rem; margin-bottom: 20px; flex-grow: 1; }
.read-more { font-family: 'Inter', sans-serif; font-weight: 600; font-size: 0.9rem; text-decoration: none; display: inline-block; margin-top: auto; }

article { padding-top: 40px; }
.meta { font-family: 'Inter', sans-serif; font-size: 0.9rem; color: #666; margin-bottom: 30px; display: block; }
@media (prefers-color-scheme: dark) { .meta { color: #aaa; } }
article img.hero-img { width: 100%; height: auto; max-height: 500px; object-fit: cover; border-radius: 12px; margin-bottom: 40px; }

.toc { background: var(--accent-light); padding: 25px; border-radius: 12px; margin-bottom: 40px; }
.toc h3 { margin-top: 0; font-size: 1.2rem; color: var(--accent); }
.toc ul { list-style: none; padding-left: 0; margin-bottom: 0; }
.toc li { margin-bottom: 12px; font-family: 'Inter', sans-serif; font-size: 0.95rem; }
.toc a { text-decoration: none; color: var(--text); }
.toc a:hover { color: var(--link); }

.expert-tip { background: var(--bg); border: 1px solid var(--border); border-left: 6px solid var(--accent); padding: 25px; margin: 40px 0; border-radius: 4px 12px 12px 4px; font-style: italic; position: relative; }
.expert-tip::before { content: "Wskazówka od redakcji"; display: block; font-family: 'Inter', sans-serif; font-style: normal; font-weight: 700; font-size: 0.85rem; color: var(--accent); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; }

table { width: 100%; border-collapse: collapse; margin: 40px 0; font-family: 'Inter', sans-serif; font-size: 0.95rem; }
th, td { padding: 15px; border: 1px solid var(--border); text-align: left; }
th { background: var(--accent-light); color: var(--accent); font-weight: 600; }
tr:nth-child(even) { background: rgba(0,0,0,0.02); }
@media (prefers-color-scheme: dark) { tr:nth-child(even) { background: rgba(255,255,255,0.02); } }

.related-articles { margin-top: 60px; padding-top: 40px; border-top: 2px solid var(--border); }
.related-articles h3 { color: var(--accent); margin-bottom: 20px; }
.related-articles ul { list-style: none; padding-left: 0; }
.related-articles li { margin-bottom: 15px; padding-left: 20px; position: relative; }
.related-articles li::before { content: "→"; position: absolute; left: 0; color: var(--accent); font-weight: bold; }

footer { border-top: 1px solid var(--border); padding: 40px 0; margin-top: 80px; text-align: center; color: #666; font-family: 'Inter', sans-serif; }
@media (prefers-color-scheme: dark) { footer { color: #aaa; } }
