/* «Свої в Польщі» — спокійна редакційна сітка.
   Navy + cream + terracotta. Без стокової «юридичної синяви». */
:root {
  --ink: #1b2430;
  --muted: #5c6570;
  --paper: #f6f1e8;
  --paper-2: #fffdf8;
  --line: #e4d8c8;
  --navy: #1f3a5f;
  --navy-2: #16304f;
  --terra: #9a4a2a;
  --terra-2: #7a3b22;
  --green: #2c5f4a;
  --ok: #1f6b4a;
  --warn: #9a5b12;
  --shadow: 0 18px 40px rgba(27, 36, 48, 0.08);
  --radius: 18px;
  --max: 1180px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Manrope, system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: var(--navy); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--terra); }
h1, h2, h3, .serif { font-family: "Source Serif 4", Georgia, serif; letter-spacing: -0.02em; }
.wrap { width: min(var(--max), calc(100% - 32px)); margin-inline: auto; }
.skip {
  position: absolute; left: -999px; top: 8px;
}
.skip:focus { left: 12px; background: #fff; padding: 8px 12px; z-index: 9; }

.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(246, 241, 232, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-row {
  display: flex; align-items: center; gap: 24px;
  min-height: 76px;
}
.brand { display: flex; gap: 10px; align-items: center; text-decoration: none; color: inherit; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--navy); color: #fff;
  display: grid; place-items: center;
  font-family: "Source Serif 4", serif; font-weight: 700;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 16px; }
.brand-text small { font-size: 11px; color: var(--muted); max-width: 260px; }
.nav { display: flex; gap: 16px; flex-wrap: wrap; font-size: 14px; font-weight: 600; }
.nav a { color: var(--ink); text-decoration: none; }
.nav a:hover { color: var(--terra); }
.header-actions { margin-left: auto; display: flex; gap: 12px; align-items: center; font-size: 14px; }
.who { color: var(--muted); font-size: 13px; }
.linkish { background: none; border: 0; color: var(--navy); cursor: pointer; font: inherit; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; padding: 10px 16px;
  border: 1px solid var(--navy); color: var(--navy);
  text-decoration: none; font-weight: 600; background: transparent;
  cursor: pointer;
}
.btn:hover { background: var(--navy); color: #fff; }
.btn-solid { background: var(--terra); border-color: var(--terra); color: #fff; }
.btn-solid:hover { background: var(--terra-2); color: #fff; }
.btn-sm { padding: 7px 12px; font-size: 13px; }
.btn-wide { width: 100%; }

.hero {
  padding: 48px 0 28px;
}
.hero-grid {
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 36px; align-items: center;
}
.eyebrow {
  text-transform: uppercase; letter-spacing: 0.16em;
  font-size: 12px; font-weight: 700; color: var(--terra); margin: 0 0 10px;
}
.hero h1 { font-size: clamp(32px, 5vw, 54px); line-height: 1.08; margin: 0 0 16px; }
.lede { font-size: 18px; color: var(--muted); margin: 0 0 22px; }
.hero-photo { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.hero-photo img { width: 100%; height: 360px; object-fit: cover; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.rubricator { padding: 10px 0 40px; }
.rubricator h2 { margin: 0 0 16px; font-size: 28px; }
.rubric-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
}
.rubric-card {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  min-height: 100%;
  text-decoration: none; color: inherit;
  box-shadow: var(--shadow);
}
.rubric-card img { width: 100%; height: 168px; object-fit: cover; }
.rubric-body { padding: 16px 18px 18px; }
.rubric-kicker {
  font-size: 12px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--navy);
}
.rubric-card h3 { margin: 6px 0 8px; font-size: 20px; }
.rubric-card p { margin: 0; color: var(--muted); font-size: 14px; }
.meta { font-size: 12px; color: var(--muted); margin-top: 10px; }

.section { padding: 12px 0 48px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.feed { display: grid; gap: 14px; }
.feed-item {
  display: grid; grid-template-columns: 160px 1fr; gap: 16px;
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: 14px; overflow: hidden; text-decoration: none; color: inherit;
}
.feed-item img { width: 100%; height: 110px; object-fit: cover; }
.feed-item h3 { margin: 12px 12px 6px; font-size: 20px; }
.feed-item p { margin: 0 12px 12px; color: var(--muted); font-size: 14px; }

.layout {
  display: grid; grid-template-columns: 1fr 320px; gap: 32px;
  padding: 36px 0 56px;
}
.prose { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 32px; }
.prose h1 { margin-top: 0; font-size: clamp(28px, 4vw, 42px); line-height: 1.15; }
.prose h2 { font-size: 26px; margin-top: 28px; }
.prose .lead { font-size: 19px; color: var(--muted); }
.cover { border-radius: 14px; overflow: hidden; margin: 12px 0 22px; }
.cover img { width: 100%; height: min(420px, 52vw); object-fit: cover; }
.badge {
  display: inline-block; font-size: 11px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  background: #efe4d4; color: var(--navy); padding: 3px 8px; border-radius: 999px;
}
.badge-expert { background: #dceae3; color: var(--green); }

.side-card {
  background: var(--navy);
  color: #f6f1e8;
  border-radius: var(--radius);
  padding: 22px;
}
.side-card h2, .side-card p, .side-card label { color: #f6f1e8; }
.side-card .field {
  background: #fff; color: var(--ink); width: 100%;
}
.side-soft {
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px; margin-top: 16px;
}
.side-soft a { display: block; margin: 8px 0; font-weight: 600; text-decoration: none; }

.field, input, textarea, select {
  width: 100%; border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 12px; font: inherit; background: #fff;
}
.field-lg { font-size: 18px; padding: 12px 14px; }
label { display: block; font-size: 13px; font-weight: 600; margin: 10px 0 4px; }
.help { color: var(--muted); font-size: 13px; }
.errorlist { color: var(--terra); padding-left: 16px; }

.comments { margin-top: 36px; }
.comment {
  border-top: 1px solid var(--line); padding: 14px 0;
}
.comment-meta { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.replies { margin-left: 22px; }

.topic-row {
  display: grid; grid-template-columns: 1fr auto; gap: 12px;
  padding: 14px 0; border-bottom: 1px solid var(--line);
  text-decoration: none; color: inherit;
}
.topic-row h3 { margin: 0 0 4px; font-size: 20px; }

.flashes { padding-top: 12px; }
.flash { background: #e7f3ec; border: 1px solid #b7d7c6; padding: 10px 12px; border-radius: 12px; }
.flash-error { background: #f8e8e2; border-color: #e3b6a6; }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 36px 0 24px;
  background: #efe6d8;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 24px; }
.footer-grid a { display: block; margin: 4px 0; text-decoration: none; color: var(--ink); }
.footer-label { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.fine { font-size: 13px; color: var(--muted); }
.footer-bottom { margin-top: 22px; padding-top: 12px; border-top: 1px solid var(--line); }

.auth-box { max-width: 460px; margin: 48px auto; background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }

@media (max-width: 920px) {
  .hero-grid, .layout, .rubric-grid, .footer-grid, .feed-item { grid-template-columns: 1fr; }
  .header-row { flex-wrap: wrap; padding: 10px 0; }
  .header-actions { margin-left: 0; }
  .hero-photo img { height: 240px; }
}
