:root {
  --ink: #23231f;
  --ink-soft: #5f6158;
  --line: #e4e2da;
  --bg: #fffdf9;
  --bg-soft: #f5f2e9;
  --accent: #2f6b46;
  --accent-dark: #245236;
  --accent-soft: #eaf1ea;
  --brick: #b5562f;
  --brick-soft: #fbeee7;
  --max: 940px;
}

* { box-sizing: border-box; }

img { max-width: 100%; height: auto; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.68 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 22px; }

a { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 2px; text-decoration-color: #b9cfc0; }
a:hover { color: var(--brick); text-decoration-color: currentColor; }

/* ---- Шапка ---- */
.site-head { border-bottom: 2px solid var(--accent); background: var(--bg); }
.head-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; padding-top: 15px; padding-bottom: 13px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand-logo { width: 40px; height: 40px; display: block; }
.brand-text b {
  display: block; font-size: 19px; line-height: 1.15; letter-spacing: .2px;
  font-family: Georgia, "Times New Roman", serif;
}
.brand-text small { display: block; color: var(--ink-soft); font-size: 12.5px; }
.nav { display: flex; gap: 20px; flex-wrap: wrap; font-size: 15px; }
.nav a { color: var(--ink-soft); text-decoration: none; }
.nav a:hover { color: var(--brick); }
.nav a.on { color: var(--accent); font-weight: 600; }

/* ---- Хлебные крошки ---- */
.crumbs { font-size: 13.5px; color: var(--ink-soft); margin: 18px 0 4px; }
.crumbs a { color: var(--ink-soft); text-decoration: none; }
.crumbs a:hover { color: var(--brick); }
.crumbs span { margin: 0 7px; }
.crumbs .cur { margin: 0; }

/* ---- Типографика ---- */
h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; font-weight: 700; }
h1 { font-size: 33px; line-height: 1.22; margin: 20px 0 14px; }
h2 { font-size: 24px; line-height: 1.3; margin: 36px 0 12px; }
h3 { font-size: 19.5px; margin: 26px 0 8px; }
p { margin: 0 0 16px; }
ul, ol { margin: 0 0 16px; padding-left: 22px; }
li { margin-bottom: 8px; }
main { padding-bottom: 54px; }

.lead {
  font-size: 19px; color: var(--ink-soft); margin-bottom: 26px;
  padding-left: 16px; border-left: 3px solid var(--brick);
}
.meta { font-size: 13.5px; color: var(--ink-soft); margin: -6px 0 22px; }

figure { margin: 26px 0; }
.figpair { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin: 26px 0; }
.figpair figure { margin: 0; }
.figpair img { border: 1px solid var(--line); }
figure img { width: 100%; height: auto; border-radius: 6px; display: block; background: var(--bg-soft); }
figcaption { font-size: 13.5px; color: var(--ink-soft); margin-top: 8px; }

blockquote {
  margin: 24px 0; padding: 14px 18px;
  background: var(--bg-soft); border-left: 3px solid var(--accent);
}
blockquote p:last-child { margin-bottom: 0; }

table { width: 100%; border-collapse: collapse; margin: 22px 0; font-size: 15.5px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
th { background: var(--bg-soft); font-weight: 600; }
.table-scroll { overflow-x: auto; }

/* ---- Карточки ---- */
.grid { display: grid; gap: 16px; margin: 26px 0; }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.card {
  border: 1px solid var(--line); border-top: 3px solid var(--accent);
  padding: 16px 18px; background: var(--bg);
}
.card:hover { border-top-color: var(--brick); }
.card h3 { margin: 0 0 6px; font-size: 17.5px; }
.card p { margin: 0; font-size: 14.5px; color: var(--ink-soft); }
.card a { text-decoration: none; }

/* ---- Списки материалов ---- */
.entries { list-style: none; padding: 0; margin: 22px 0; }
.entries li { border-bottom: 1px solid var(--line); padding: 15px 0; margin: 0; }
.entries a { font-size: 17.5px; font-weight: 600; text-decoration: none; font-family: Georgia, "Times New Roman", serif; }
.entries .when { display: block; font-size: 13px; color: var(--ink-soft); margin-top: 4px; }
.entries .about { font-size: 14.5px; color: var(--ink-soft); margin-top: 5px; }

.section-title { margin-top: 42px; padding-bottom: 8px; border-bottom: 2px solid var(--line); }

.note {
  background: var(--accent-soft); padding: 15px 18px; margin: 28px 0;
  font-size: 15.5px; border-left: 3px solid var(--accent);
}
.note p:last-child { margin-bottom: 0; }

/* ---- Форма обратной связи ---- */
.form { margin: 24px 0 36px; }
.form-row { display: grid; gap: 0 18px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 14px; color: var(--ink-soft); margin-bottom: 6px; }
.field input,
.field textarea {
  width: 100%; font: inherit; font-size: 16px; line-height: 1.5;
  padding: 10px 12px; color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: 0;
}
.field textarea { resize: vertical; min-height: 150px; }
.field input:focus,
.field textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.form-actions { margin-top: 2px; }
.btn {
  font: inherit; font-weight: 600; font-size: 16px;
  padding: 12px 28px; cursor: pointer;
  color: var(--bg); background: var(--accent);
  border: 1px solid var(--accent); border-radius: 0;
}
.btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.form-status {
  margin: 20px 0 0; padding: 13px 18px; font-size: 15px;
  background: var(--brick-soft); border-left: 3px solid var(--brick);
}

.archive-note {
  background: var(--brick-soft); padding: 13px 18px; margin: 0 0 24px;
  font-size: 15px; border-left: 3px solid var(--brick);
}
.archive-note p:last-child { margin-bottom: 0; }

/* ---- Подвал ---- */
.site-foot { border-top: 2px solid var(--accent); background: var(--bg-soft); padding: 34px 0 18px; margin-top: 44px; }
.foot-inner { display: grid; gap: 26px; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); }
.foot-col b { display: block; margin-bottom: 10px; font-size: 15px; font-family: Georgia, "Times New Roman", serif; }
.foot-col p { font-size: 14px; color: var(--ink-soft); margin: 0; }
.foot-col ul { list-style: none; padding: 0; margin: 0; }
.foot-col li { margin-bottom: 7px; font-size: 14.5px; }
.foot-col a { text-decoration: none; }
.foot-bottom {
  margin-top: 26px; padding-top: 14px; border-top: 1px solid var(--line);
  font-size: 13.5px; color: var(--ink-soft);
}

@media (max-width: 620px) {
  body { font-size: 16.5px; }
  h1 { font-size: 27px; }
  h2 { font-size: 21.5px; }
  .head-inner { padding-bottom: 10px; }
  .nav { gap: 15px; font-size: 14.5px; }
  .lead { font-size: 17.5px; }
}
