* { box-sizing: border-box; }

:root {
  --ink: #161513;
  --muted: #6a645a;
  --line: #ddd4c6;
  --paper: #f6f3ec;
  --card: #fffcf7;
  --accent: #8b1e1e;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Source Sans 3", Arial, sans-serif;
}

.wrap,
.masthead-meta,
.top,
.header-bottom,
.footer-inner {
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

header {
  background: var(--card);
  border-bottom: 2px solid var(--ink);
}

.masthead-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  padding-bottom: 8px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

.masthead-meta a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-top: 18px;
  padding-bottom: 14px;
}

.logo {
  font: 700 42px/1 "Libre Baskerville", Georgia, serif;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.03em;
}

.logo span { font-weight: 400; font-style: italic; }

.admin, button {
  background: var(--ink);
  color: #fff;
  padding: 9px 16px;
  border-radius: 999px;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  font: 700 13px "Source Sans 3", Arial, sans-serif;
}

.header-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-bottom: 0;
}

nav {
  display: flex;
  gap: 22px;
  overflow: auto;
}

nav a {
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  font: 650 14px/1 "Source Sans 3", Arial, sans-serif;
  padding: 12px 0 10px;
  border-bottom: 2px solid transparent;
}

nav a:hover { color: var(--accent); }
nav a.active { border-bottom-color: var(--ink); }

.socials {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.header-bottom .socials a {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-bottom .socials a:hover {
  background: var(--ink);
  border-color: var(--ink);
}

.header-bottom .socials a:hover svg { fill: #fff; }
.socials svg { width: 15px; height: 15px; fill: var(--ink); }
.socials a { color: var(--ink); text-decoration: none; font-weight: 650; }

.hero {
  margin-top: 28px;
  margin-bottom: 8px;
  padding: 42px 40px;
  background:
    linear-gradient(180deg, rgba(22,21,19,0.08), rgba(22,21,19,0.35)),
    #1c211c;
  color: #f7f1e6;
  border-radius: 6px;
}

.hero p {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #d9cbb6;
}

.hero h1 {
  font: 700 48px/1.12 "Libre Baskerville", Georgia, serif;
  margin: 10px 0 12px;
}

.hero div {
  max-width: 640px;
  font-size: 18px;
  line-height: 1.5;
  color: #efe6d6;
}

.section-head {
  padding-top: 28px;
}

.section-head h2,
.section-head h1 {
  margin: 0;
  font: 700 28px "Libre Baskerville", Georgia, serif;
}

.grid {
  padding-top: 18px;
  padding-bottom: 72px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.card, .article, .admin-panel {
  background: var(--card);
  border: 1px solid var(--line);
}

.card {
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(22, 21, 19, 0.08);
}

.card.featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
}

.card img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  background: #e7e0d4;
}

.card.featured img { height: 100%; min-height: 280px; }
.card-content { padding: 20px; }

.card small, .article small {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}

.card h3 {
  font: 700 23px/1.25 "Libre Baskerville", Georgia, serif;
  margin: 8px 0 10px;
}

.card.featured h3 { font-size: 36px; }
.card a { color: inherit; text-decoration: none; }
.card a:hover { text-decoration: underline; }

.card p, .lead {
  line-height: 1.6;
  color: #4d4943;
  margin: 0;
}

.empty {
  grid-column: 1 / -1;
  background: var(--card);
  border: 1px dashed var(--line);
  padding: 32px;
  color: var(--muted);
}

.article, .admin-panel {
  max-width: 820px;
  margin: 28px auto 64px;
  padding: 40px;
}

.article h1, .admin-panel h1 {
  font: 700 42px/1.18 "Libre Baskerville", Georgia, serif;
  margin: 10px 0 16px;
}

.article img {
  width: 100%;
  max-height: 460px;
  object-fit: cover;
  margin: 10px 0 20px;
}

.lead {
  font: italic 20px/1.55 "Libre Baskerville", Georgia, serif;
  color: #3f3b36;
  margin-bottom: 18px;
}

.body {
  font: 19px/1.8 "Libre Baskerville", Georgia, serif;
  white-space: pre-line;
}

.muted { color: var(--muted); }

label {
  display: block;
  font-weight: 700;
  margin: 18px 0;
}

input, textarea, select {
  display: block;
  width: 100%;
  margin-top: 7px;
  padding: 12px;
  border: 1px solid #cfc6b8;
  border-radius: 4px;
  font: 16px "Source Sans 3", Arial, sans-serif;
  background: #fff;
}

.admin-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.row-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.news-preview {
  padding: 0 0 18px;
  color: #333;
}

.news-preview img {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  margin: 8px 0 12px;
  border-radius: 6px;
}

.danger { background: var(--accent); }

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.check input { width: auto; margin: 0; }

.maintenance {
  max-width: 640px;
  margin: 12vh auto;
  padding: 40px 28px;
  text-align: center;
}

.maintenance h1 {
  font: 700 42px "Libre Baskerville", Georgia, serif;
  margin: 8px 0 16px;
}

.maintenance form {
  max-width: 360px;
  margin: 28px auto 0;
  text-align: left;
}

footer {
  background: #11110f;
  color: #d7d0c4;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding-top: 28px;
  padding-bottom: 28px;
}

.footer-inner strong {
  display: block;
  color: #fff;
  font: 700 20px "Libre Baskerville", Georgia, serif;
}

.footer-inner p { margin: 6px 0 0; }
.footer-inner a { color: #f0e7d8; }

@media (max-width: 860px) {
  .card.featured { grid-template-columns: 1fr; }
  .card.featured img { min-height: 200px; height: 220px; }
  .grid { grid-template-columns: 1fr; }
  .hero { padding: 28px 22px; }
  .hero h1, .card.featured h3, .article h1 { font-size: 30px; }
  .logo { font-size: 30px; }
  .article, .admin-panel { margin: 16px; padding: 22px; }
}
