/* ============================================================
   Food Hunt: Pixel Puzzle — food-hunt.ru
   Стиль «Деревянный стол пиксель-мастерской»: фон-дерево,
   кремовые панели-«холсты», акценты цветов блоков игры,
   моноширинные заголовки, жёсткие пиксельные тени (без blur).
   Шрифты только системные (без внешних CDN).
   ============================================================ */

:root {
  --wood: #7B5233;
  --wood-dark: #4E3018;
  --wood-darker: #33200D;
  --cream: #FAF3E3;
  --cream-2: #F1E4C8;
  --ink: #33220F;
  --muted: #7A6248;
  --red: #E03434;
  --yellow: #FFC72C;
  --green: #58B368;
  --purple: #6B46C0;
  --cyan: #3BA7BC;
  --shadow: 6px 6px 0 rgba(40, 22, 6, .35);
  --shadow-sm: 4px 4px 0 rgba(40, 22, 6, .35);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  font: 17px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background-color: var(--wood);
  background-image:
    repeating-linear-gradient(90deg, rgba(0,0,0,.10) 0 2px, transparent 2px 110px),
    repeating-linear-gradient(90deg, rgba(255,255,255,.04) 0 55px, transparent 55px 110px),
    repeating-linear-gradient(0deg, rgba(0,0,0,.05) 0 3px, transparent 3px 42px);
}

h1, h2, h3, h4 {
  font-family: "Courier New", Courier, Menlo, monospace;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: .01em;
}

h1 { font-size: 30px; margin: 0 0 14px; }
h2 {
  font-size: 22px;
  margin: 34px 0 12px;
  padding-bottom: 8px;
  border-bottom: 3px dashed rgba(122, 81, 41, .35);
}
h3 { font-size: 18px; margin: 22px 0 8px; }

p { margin: 10px 0; }
a { color: #9A4D12; text-decoration-thickness: 1.5px; text-underline-offset: 2px; }
a:hover { color: var(--red); }

code {
  font-family: "Courier New", Menlo, monospace;
  background: var(--cream-2);
  border: 1px solid #D9C69C;
  border-radius: 4px;
  padding: 1px 6px;
  font-size: .92em;
}

.container { max-width: 1080px; margin: 0 auto; padding: 0 18px; }

/* ---------- шапка ---------- */
.site-header {
  background: var(--wood-dark);
  border-bottom: 4px solid var(--wood-darker);
}
.site-header .container {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding-top: 12px;
  padding-bottom: 12px;
}
.logo {
  display: flex;
  align-items: baseline;
  gap: 9px;
  text-decoration: none;
  color: var(--cream);
  font-family: "Courier New", Courier, monospace;
  font-weight: 700;
  font-size: 19px;
}
.logo img { width: 30px; height: 30px; border-radius: 6px; align-self: center; }
.logo small { display: block; font-size: 11px; font-weight: 400; color: #D9BD96; }
.nav { margin-left: auto; display: flex; flex-wrap: wrap; gap: 4px; }
.nav a {
  color: var(--cream);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  padding: 7px 11px;
  border-radius: 6px;
}
.nav a:hover { background: rgba(250, 243, 227, .14); }
.nav a.active { background: var(--yellow); color: var(--wood-darker); }
.burger {
  display: none;
  margin-left: auto;
  background: none;
  border: 2px solid var(--cream);
  color: var(--cream);
  font-size: 20px;
  border-radius: 6px;
  padding: 2px 10px;
  cursor: pointer;
}

/* ---------- крошки (внутри .container из шаблона) ---------- */
.crumbs { font-size: 14px; padding-top: 16px; color: #EBDCC0; }
.crumbs a { color: var(--yellow); }

/* ---------- панели-«холсты» ---------- */
.panel {
  background: var(--cream);
  border: 2px solid var(--wood-darker);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 24px 26px;
  margin: 20px 0;
}
main { padding-bottom: 34px; }

/* ---------- герой главной ---------- */
.hero {
  display: flex;
  gap: 26px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.hero-icon {
  width: 128px;
  height: 128px;
  border-radius: 22px;
  border: 3px solid var(--wood-darker);
  box-shadow: var(--shadow-sm);
  flex: 0 0 auto;
}
.hero-text { flex: 1 1 320px; }
.hero-text p.lead { font-size: 18px; }

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 16px 0 4px; }

/* ---------- кнопки-блоки (только внутри контента) ---------- */
.btn {
  display: inline-block;
  font-family: "Courier New", Courier, monospace;
  font-weight: 700;
  font-size: 16px;
  color: #fff;
  background: var(--red);
  border: 2px solid var(--wood-darker);
  border-radius: 8px;
  padding: 10px 20px;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform .06s ease, box-shadow .06s ease;
}
.btn:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 rgba(40,22,6,.35); color: #fff; }
.btn-green { background: var(--green); }
.btn-purple { background: var(--purple); }
.btn-yellow { background: var(--yellow); color: var(--wood-darker); }
.btn-yellow:hover { color: var(--wood-darker); }
.btn-lg { font-size: 19px; padding: 14px 28px; }

/* ---------- сетки и статы ---------- */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.card-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }

.card {
  background: #fff;
  border: 2px solid var(--wood-darker);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  padding: 16px 18px;
  text-decoration: none;
  color: var(--ink);
  display: block;
}
.card:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 rgba(40,22,6,.35); }
.card h3 { margin: 0 0 6px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.card .tag {
  display: inline-block;
  font-family: "Courier New", Courier, monospace;
  font-size: 12px;
  font-weight: 700;
  border-radius: 4px;
  padding: 1px 8px;
  margin-bottom: 8px;
  color: #fff;
}
.tag-red { background: var(--red); } .tag-yellow { background: var(--yellow); color: var(--wood-darker); }
.tag-green { background: var(--green); } .tag-purple { background: var(--purple); }
.tag-cyan { background: var(--cyan); }

.grid-stats { display: flex; flex-wrap: wrap; gap: 12px; margin: 14px 0; }
.stat {
  background: #fff;
  border: 2px solid var(--wood-darker);
  border-radius: 8px;
  padding: 10px 16px;
  min-width: 130px;
  box-shadow: var(--shadow-sm);
}
.stat .label { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.stat .value { font-family: "Courier New", Courier, monospace; font-weight: 700; font-size: 18px; }
.stat .value small { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }

/* ---------- галерея скриншотов ---------- */
.screenshot-gallery {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 6px 2px 18px;
}
.screenshot-gallery img {
  height: 330px;
  width: auto;
  border: 3px solid var(--wood-darker);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  background: #fff;
  flex: 0 0 auto;
}

/* ---------- таблицы ---------- */
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; margin: 12px 0; background: #fff; }
th {
  background: var(--purple);
  color: #fff;
  text-align: left;
  font-family: "Courier New", Courier, monospace;
  font-size: 14px;
  padding: 10px 12px;
}
td { padding: 10px 12px; border-bottom: 1px solid #E7D9BB; vertical-align: top; }
tbody tr:nth-child(even) { background: var(--cream); }
td a { font-weight: 600; text-decoration: underline; }

/* ---------- статусы/badge ---------- */
.st {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  border-radius: 999px;
  padding: 2px 12px;
  white-space: nowrap;
}
.st-ok { background: #DDF3DF; color: #1E6B2C; border: 1px solid #58B368; }
.st-check { background: #FFF1CB; color: #8A5B00; border: 1px solid #FFC72C; }
.st-exp { background: #FBE3E3; color: #93201F; border: 1px solid #E03434; }

.note {
  background: var(--cream-2);
  border-left: 6px solid var(--yellow);
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 15px;
}
.v-mark { color: var(--red); font-weight: 700; }

/* ---------- FAQ-аккордеон с цветными бордерами ---------- */
details.faq {
  background: #fff;
  border: 2px solid var(--wood-darker);
  border-left-width: 8px;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  margin: 12px 0;
  padding: 0;
}
details.faq:nth-of-type(4n+1) { border-left-color: var(--red); }
details.faq:nth-of-type(4n+2) { border-left-color: var(--yellow); }
details.faq:nth-of-type(4n+3) { border-left-color: var(--green); }
details.faq:nth-of-type(4n+4) { border-left-color: var(--purple); }
details.faq summary {
  cursor: pointer;
  font-weight: 700;
  padding: 12px 16px;
  list-style-position: inside;
  font-family: "Courier New", Courier, monospace;
  font-size: 16px;
}
details.faq[open] summary { border-bottom: 1px dashed #D9C69C; }
details.faq .faq-body { padding: 10px 18px 14px; }

/* ---------- шаги гайдов ---------- */
ol.steps { counter-reset: step; list-style: none; padding-left: 0; }
ol.steps > li {
  counter-increment: step;
  position: relative;
  background: #fff;
  border: 2px solid var(--wood-darker);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  padding: 12px 16px 12px 58px;
  margin: 12px 0;
}
ol.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 12px;
  top: 12px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--red);
  color: #fff;
  font-family: "Courier New", Courier, monospace;
  font-weight: 700;
  border: 2px solid var(--wood-darker);
  border-radius: 6px;
}
ol.steps > li:nth-child(3n+2)::before { background: var(--green); }
ol.steps > li:nth-child(3n)::before { background: var(--purple); }
ol.steps b { font-family: "Courier New", Courier, monospace; }

blockquote.quote {
  margin: 14px 0;
  background: #fff;
  border: 2px solid var(--wood-darker);
  border-radius: 8px;
  padding: 12px 16px;
  font-style: italic;
}
blockquote.quote footer { font-style: normal; font-size: 14px; color: var(--muted); margin-top: 6px; }

/* ---------- новости ---------- */
.news-item { border-left: 8px solid var(--green); }
.news-item.alt { border-left-color: var(--purple); }
.news-meta { font-size: 13px; color: var(--muted); font-family: "Courier New", Courier, monospace; }

/* ---------- футер одной строкой ---------- */
.site-footer {
  background: var(--wood-dark);
  border-top: 4px solid var(--wood-darker);
  color: #E8D8BC;
  padding: 20px 0 26px;
  font-size: 15px;
}
.footer-links { font-family: "Courier New", Courier, monospace; font-weight: 700; }
.footer-links a { color: var(--yellow); text-decoration: none; margin: 0 4px; }
.footer-links a:hover { text-decoration: underline; }
.footer-links span.sep { color: #B08F63; }
.disclaimer { font-size: 12.5px; color: #C4A87F; margin: 10px 0 0; }

/* ---------- адаптив ---------- */
@media (max-width: 760px) {
  h1 { font-size: 25px; }
  .burger { display: block; }
  .nav {
    display: none;
    width: 100%;
    flex-direction: column;
    margin-left: 0;
  }
  .nav.open { display: flex; }
  .grid-2, .grid-3, .card-grid { grid-template-columns: 1fr; }
  .screenshot-gallery img { height: 240px; }
  .panel { padding: 18px 16px; }
  .hero-icon { width: 96px; height: 96px; }
}
