/* 5824: видеосправочник. Подключается после style.css и использует его цвета. */
.logo { display: inline-flex; flex-direction: column; gap: 2px; }
.logo-sub { font: 500 .72rem/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.foot .logo-sub { color: var(--foot-muted); }

/* первый экран */
.g-hero { padding-top: clamp(36px, 7vw, 96px); padding-bottom: clamp(36px, 7vw, 96px); max-width: 1100px; margin: 0 auto; }
.g-hero h1 { color: #fff; font-size: clamp(2.1rem, 5vw, 4rem); letter-spacing: -.015em; }
.g-hero p.lead { font-size: 1.2rem; color: var(--foot-muted); max-width: 34em; margin: 18px 0 28px; }
.g-hero-search { display: flex; gap: 10px; flex-wrap: wrap; max-width: 680px; }
.g-hero-search input { flex: 1 1 280px; height: 52px; border-radius: 999px; border: 0; padding: 0 22px; font: inherit; background: #fff; color: #152b3d; max-width: none; }
.g-hero-search .btn { background: #fff; color: #152b3d; border-color: #fff; height: 52px; padding: 0 28px; }
.g-hero-search .btn:hover { background: #e6ecf3; border-color: #e6ecf3; }

/* плитки зон и типов */
.g-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.g-tile { display: flex; flex-direction: column; gap: 4px; padding: 20px 22px; border-radius: 16px; background: var(--birch); border: 1.5px solid transparent; color: var(--ink); text-decoration: none; min-height: 96px; }
.g-tile:hover { border-color: var(--ink); }
.g-tile strong { font: 600 1.2rem/1.25 var(--serif); }
.g-tile span { color: var(--muted); font-size: .9rem; }
.g-tile-danger { border-color: var(--berry); }

/* карточки */
.g-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(clamp(240px, 20vw, 320px), 1fr)); gap: 30px 22px; }
.g-card { display: flex; flex-direction: column; min-width: 0; }
.g-card-img { position: relative; display: block; border-radius: 12px; overflow: hidden; background: var(--birch); aspect-ratio: 16 / 9; }
.g-card-img img, .g-ph { width: 100%; height: 100%; object-fit: cover; display: block; }
.g-ph { background: linear-gradient(135deg, var(--birch), var(--accent-soft)); }
.g-time { position: absolute; right: 8px; bottom: 8px; background: rgba(10, 20, 40, .82); color: #fff; border-radius: 6px; padding: 1px 7px; font-size: .8rem; font-weight: 600; }
.g-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 4px; }
.g-card-title { margin: 4px 0 2px; font: 600 1.02rem/1.3 var(--sans); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.g-card-title a { color: var(--ink); text-decoration: none; }
.g-card-title a:hover { text-decoration: underline; }
.g-card-meta { margin: 0; color: var(--muted); font-size: .88rem; }

/* бейджи: сложность (4 уровня) и безопасность */
.g-badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px; border-radius: 999px; font-size: .82rem; font-weight: 600; background: var(--birch); color: var(--ink); }
.g-dots { display: inline-flex; gap: 2px; }
.g-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line); display: block; }
.g-level-0 .g-dots i:nth-child(-n+1), .g-level-1 .g-dots i:nth-child(-n+2), .g-level-2 .g-dots i:nth-child(-n+3), .g-level-3 .g-dots i { background: var(--ink); }
.g-danger { background: var(--berry); color: var(--paper); }

/* каталог */
.g-h1 { margin: 12px 0 18px; }
.g-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 32px 44px; align-items: start; padding-bottom: 40px; }
.g-filters { position: sticky; top: 130px; border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; }
.g-filters fieldset { border: 0; padding: 0; margin: 0 0 14px; }
.g-filters legend { font-weight: 700; margin-bottom: 6px; padding: 0; }
.g-check { display: flex; gap: 8px; align-items: center; font-weight: 400; margin: 0; padding: 5px 0; cursor: pointer; }
.g-check input { width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.g-warn { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--berry); color: var(--paper); font-size: .75rem; font-weight: 700; }
.g-filters select, .g-filters input[type=search] { max-width: none; }
.g-pager { display: flex; gap: 18px; align-items: center; justify-content: center; margin: 32px 0 8px; }
.g-pager a { font-weight: 600; }

/* карточка задачи */
.g-detail { max-width: 960px; }
.g-video { margin: 18px 0; }
.g-safety { border: 2px solid var(--berry); border-radius: 14px; padding: 12px 18px; margin: 14px 0; background: color-mix(in srgb, var(--berry) 8%, var(--paper)); }
.g-safety p { margin: 4px 0 0; }
.g-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.g-tags span { background: var(--birch); border-radius: 999px; padding: 2px 11px; font-size: .85rem; color: var(--muted); }

.g-detail h2 { margin: 0 0 12px; }
.g-block { margin: 36px 0 0; max-width: 760px; }
.g-shop { margin: 32px 0 0; border: 1.5px solid var(--line); border-radius: 18px; padding: 20px 24px 24px; }
.g-shop-head { display: flex; justify-content: space-between; align-items: center; gap: 12px 20px; flex-wrap: wrap; margin-bottom: 14px; }
.g-shop-head h2 { margin: 0; }
.g-shop-actions .btn { padding: 8px 20px; min-height: 0; }
.g-shop-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px 40px; }
.g-shop h3 { margin: 0 0 8px; font: 700 .85rem var(--sans); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.g-items { list-style: none; margin: 0; padding: 0; }
.g-items li { border-bottom: 1px solid var(--line); }
.g-items li:last-child { border-bottom: 0; }
.g-items label { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; font-weight: 400; margin: 0; cursor: pointer; }
.g-items input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.g-items span { display: flex; flex-direction: column; gap: 1px; }
.g-items em { font-style: normal; color: var(--muted); font-size: .92rem; }
.g-items small { color: var(--muted); font-size: .85rem; }
.g-items input:checked + span { opacity: .55; text-decoration: line-through; }
.g-steps { padding-left: 0; margin: 0; list-style: none; counter-reset: step; }
.g-steps li { counter-increment: step; position: relative; padding: 4px 0 18px 52px; }
.g-steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-weight: 700; }
.g-at { display: inline-block; margin-left: 6px; padding: 0 8px; border-radius: 6px; background: var(--birch); color: var(--muted); font-size: .82rem; font-variant-numeric: tabular-nums; }
.g-mistakes { border-left: 4px solid var(--berry); padding: 4px 0 4px 20px; }
.g-mistakes ul { margin: 0; padding-left: 20px; }
.g-mistakes li { margin: 0 0 10px; }

@media print {
  :root { --paper: #fff; --ink: #000; --muted: #333; --line: #999; --birch: #fff; --accent: #000; --on-accent: #fff; --berry: #b00; }
  .site-head, .foot, .skip, .orn, .toasts, .no-print, .g-shop-actions { display: none !important; }
  body { display: block; background: #fff; color: #000; font-size: 12pt; }
  .wrap { max-width: none; padding: 0; }
  .g-shop { border: 0; padding: 0; }
  .g-items input { appearance: auto; }
  .g-items li, .g-steps li { break-inside: avoid; }
  body.print-list .g-detail > :not(.g-shop):not(.g-h1) { display: none !important; }
}

@media (max-width: 820px) {
  .g-layout { grid-template-columns: 1fr; }
  .g-filters { position: static; }
  .g-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
}
