/* Инструкция по шаблону прайса (m1-pro-instruction.html).
 * Решение владельца: тёмный хром темы + основной текст на СВЕТЛОМ листе (.sheet).
 * Стили перенесены из inline <style> страницы и ограничены .instr-hero / .instr-sheet,
 * чтобы не пересекаться с компонентами темы (.btn, .card, .steps, .lead).
 * Грузится ПОСЛЕ site-base.css и site-theme.css. */

/* ===== Герой (тёмный) ===== */
.instr-hero { padding-bottom: 56px; text-align: left; }
.instr-hero .heroGrid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .78fr); gap: 48px; align-items: end; }
.instr-hero h1 { max-width: 14ch; margin: 0 0 24px; font-size: clamp(38px, 5vw, 64px); }
.instr-hero .lead { max-width: 640px; margin: 0; }
.instr-hero .actions { justify-content: flex-start; }
.instr-hero .sheetNote { max-width: 650px; margin-top: 16px; color: var(--site-muted); font-size: 14px; line-height: 1.5; }

.heroCard { padding: 18px; border-radius: var(--site-radius-lg); background: var(--site-surface); border: 1px solid #ffffff12; }
.sample { width: 100%; border-collapse: collapse; font-size: 14px; }
.sample th { padding: 13px 12px; text-align: left; font-weight: 500; background: var(--site-accent); color: var(--site-on-accent); }
.sample th:first-child { border-radius: 12px 0 0 12px; }
.sample th:last-child { border-radius: 0 12px 12px 0; }
.sample td { padding: 12px; border-top: 1px solid var(--site-line); color: var(--site-muted); }
.sample tr:first-child td { border-top: 0; }
.sample caption { caption-side: bottom; padding-top: 12px; text-align: left; font-size: 13px; line-height: 1.4; color: var(--site-muted); }

.instr-toc { display: flex; gap: 8px; margin-top: 48px; overflow-x: auto; scrollbar-width: none; }
.instr-toc::-webkit-scrollbar { display: none; }
.instr-toc a {
  flex: none;
  padding: 9px 16px;
  border: 1px solid #ffffff24;
  border-radius: 999px;
  background: #ffffff0f;
  color: var(--site-muted);
  font-size: 14px;
  line-height: 1.4;
  white-space: nowrap;
  transition: background .2s, color .2s;
}
.instr-toc a:hover { background: #ffffff1f; color: var(--site-text); }

/* ===== Светлый лист с текстом инструкции ===== */
.instr-body { padding-bottom: 104px; }
.instr-sheet { max-width: none; padding: 8px 56px 24px; }
.instr-sheet .wrap { width: auto; }
.instr-sheet section { padding: 56px 0; border-top: 1px solid var(--sheet-line); }
.instr-sheet section:first-child { border-top: 0; }
.instr-sheet .head { display: grid; grid-template-columns: minmax(0, .92fr) minmax(260px, .45fr); gap: 28px; align-items: end; margin-bottom: 28px; }
.instr-sheet .label { margin-bottom: 12px; color: #8a5f00; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.instr-sheet h2 { margin: 0; font-size: clamp(28px, 3.4vw, 40px); line-height: 1.12; font-weight: 500; letter-spacing: -.03em; }
.instr-sheet h3 { margin: 0 0 12px; font-size: 21px; line-height: 1.3; font-weight: 600; letter-spacing: -.01em; color: var(--sheet-text); }
.instr-sheet .desc { margin: 0; color: var(--sheet-muted); font-size: 17px; line-height: 1.55; }

.instr-sheet .steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 0; }
.instr-sheet .step { min-height: 180px; padding: 22px; border: 1px solid var(--sheet-line); border-radius: var(--site-radius-md); background: #f6f5f1; }
.instr-sheet .step span {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 24px;
  border-radius: 50%;
  background: var(--site-accent);
  color: var(--site-on-accent);
  font-weight: 600;
}
.instr-sheet .step p, .instr-sheet .card p { margin: 0; color: var(--sheet-muted); font-size: 16px; line-height: 1.55; }
.instr-sheet .idea { margin-top: 16px; padding: 20px; border: 1px solid #f5c65599; border-radius: var(--site-radius-sm); background: #fff9ea; line-height: 1.55; }

.instr-sheet .grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.instr-sheet .card {
  display: block;
  padding: 24px;
  border: 1px solid var(--sheet-line);
  border-radius: var(--site-radius-md);
  background: #fff;
  color: var(--sheet-text);
  box-shadow: 0 14px 40px #1010100a;
}
.instr-sheet .list { display: grid; gap: 12px; margin: 16px 0 0; padding: 0; list-style: none; }
.instr-sheet .list li { position: relative; margin: 0; padding-left: 22px; color: #33373d; font-size: 16px; line-height: 1.5; }
.instr-sheet .list li::before { content: ''; position: absolute; left: 0; top: .58em; width: 7px; height: 7px; border-radius: 50%; background: var(--site-accent); }

.instr-sheet .mediaFrame { padding: 12px; border: 1px solid var(--sheet-line); border-radius: var(--site-radius-md); background: #fff; box-shadow: 0 18px 54px #1010100f; }
.instr-sheet .mediaFrame img { display: block; width: 100%; height: auto; border-radius: 10px; }
.instr-sheet .mediaFrame.wide { overflow: auto; }
.instr-sheet .mediaFrame.wide img { width: max(100%, 980px); max-width: none; }
.instr-sheet .zoomBtn {
  width: 100%;
  min-height: 44px;
  margin-top: 10px;
  border: 1px solid var(--sheet-line);
  border-radius: var(--site-radius-sm);
  background: #f6f5f1;
  color: #33373d;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
}
.instr-sheet .zoomBtn:hover { background: #eeece6; }

.instr-sheet .columns { overflow: hidden; border: 1px solid var(--sheet-line); border-radius: var(--site-radius-md); background: #fff; }
.instr-sheet .columns table { width: 100%; margin: 0; border-collapse: collapse; font-size: 16px; }
.instr-sheet .columns td { padding: 17px 18px; border: 0; border-bottom: 1px solid var(--sheet-line); vertical-align: top; line-height: 1.5; }
.instr-sheet .columns tr:last-child td { border-bottom: 0; }
.instr-sheet .columns td:first-child { width: 280px; }
.instr-sheet .columns td strong { display: block; font-weight: 600; }
.instr-sheet .columns span { display: inline-flex; margin-top: 7px; padding: 4px 10px; border-radius: 999px; background: #f1efe9; color: #5a626d; font-size: 12px; font-weight: 600; }
.instr-sheet .scrollHint { display: none; }

.instr-sheet .mapper { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .72fr); gap: 18px; align-items: start; }
.instr-sheet .mapBox { padding: 10px 22px; border: 1px solid var(--sheet-line); border-radius: var(--site-radius-md); background: #fff; }
.instr-sheet .mapRow { display: grid; grid-template-columns: minmax(130px, .7fr) 34px minmax(170px, 1fr); gap: 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--sheet-line); }
.instr-sheet .mapRow:last-child { border-bottom: 0; }
.instr-sheet .mapRow b { font-size: 16px; font-weight: 600; }
.instr-sheet .mapRow span { color: var(--sheet-muted); }
.instr-sheet .mapRow .arrow { color: #8a5f00; }
.instr-sheet .phonePanel { margin: 0; padding: 18px; border: 1px solid var(--sheet-line); border-radius: var(--site-radius-md); background: linear-gradient(180deg, #f4f2f8, #fff); }
.instr-sheet .phonePanel img { display: block; width: 100%; max-width: 360px; height: auto; margin: auto; border-radius: 10px; }

.instr-sheet .chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.instr-sheet .chips span { padding: 8px 14px; border-radius: 999px; background: #f1efe9; color: #4a5059; font-size: 14px; font-weight: 500; }
.instr-sheet .gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.instr-sheet .shot { margin: 0; padding: 12px; border: 1px solid var(--sheet-line); border-radius: var(--site-radius-md); background: #fff; box-shadow: 0 14px 42px #1010100d; }
.instr-sheet .shot img { display: block; width: 100%; height: auto; border-radius: 10px; background: #fff; }
.instr-sheet .shot figcaption { margin-top: 10px; color: var(--sheet-muted); font-size: 14px; line-height: 1.4; }
.instr-sheet .shot.wide { grid-column: 1 / -1; }

.instr-sheet .rules { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.instr-sheet .rule.good { border-top: 3px solid #2d7d558c; }
.instr-sheet .rule.bad { border-top: 3px solid #b4473c80; }
.instr-sheet .check { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 36px; margin: 0; padding: 0; list-style: none; }
.instr-sheet .check li { position: relative; margin: 0; padding-left: 26px; line-height: 1.5; }
.instr-sheet .check li::before { content: '✓'; position: absolute; left: 0; color: #8a5f00; font-weight: 700; }
.instr-sheet .finalNote { margin-top: 24px; padding: 24px; border: 1px solid var(--sheet-line); border-radius: var(--site-radius-md); background: #f6f5f1; }
.instr-sheet .finalNote p { margin: 0; }

/* Просмотр скриншота крупно */
.modal { position: fixed; inset: 0; z-index: 1150; display: none; align-items: center; justify-content: center; padding: 28px; background: #0c0c0cd1; }
.modal.open { display: flex; }
.modal img { max-width: 100%; max-height: 88vh; border-radius: 12px; background: #fff; box-shadow: 0 24px 90px #00000059; }
.modal button {
  position: absolute;
  top: 16px;
  right: 16px;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid #ffffff59;
  border-radius: var(--site-radius-sm);
  background: #ffffff1f;
  color: #fff;
  cursor: pointer;
}

@media (max-width: 900px) {
  .instr-hero .heroGrid, .instr-sheet .head, .instr-sheet .mapper { grid-template-columns: minmax(0, 1fr); }
  .instr-sheet .steps, .instr-sheet .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .instr-sheet .grid2, .instr-sheet .rules, .instr-sheet .check { grid-template-columns: minmax(0, 1fr); }
  .instr-sheet .mediaFrame.wide img { width: 100%; }
  .instr-sheet { padding-inline: 32px; }
}

@media (max-width: 600px) {
  .instr-hero h1 { font-size: 34px; }
  .instr-hero .actions .btn { width: 100%; }
  .instr-toc { margin-top: 32px; }
  .instr-body { padding-bottom: 72px; }
  .instr-sheet { padding: 0 18px 8px; }
  .instr-sheet section { padding: 40px 0; }
  .instr-sheet h2 { font-size: 28px; }
  .instr-sheet .desc { font-size: 16px; }
  .instr-sheet .steps, .instr-sheet .gallery { grid-template-columns: minmax(0, 1fr); }
  .instr-sheet .step { min-height: 0; }
  .instr-sheet .card, .instr-sheet .finalNote { padding: 20px; }
  .instr-sheet .mapBox { padding: 6px 16px; }
  .instr-sheet .mapRow { grid-template-columns: minmax(0, 1fr); gap: 5px; }
  .instr-sheet .mapRow .arrow { display: none; }
  .instr-sheet .phonePanel img { max-width: 100%; }
  .instr-sheet .columns { overflow: auto; -webkit-overflow-scrolling: touch; }
  .instr-sheet .columns table { min-width: 620px; }
  .instr-sheet .columns td:first-child { width: 200px; }
  .instr-sheet .scrollHint {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 44px;
    margin: -2px 0 12px;
    padding: 10px 12px 10px 62px;
    overflow: hidden;
    border: 1px solid var(--sheet-line);
    border-radius: var(--site-radius-sm);
    background: #f6f5f1;
    color: #5c6268;
    font-size: 13px;
    font-weight: 500;
  }
  .instr-sheet .scrollHint::before { content: ''; position: absolute; left: 12px; top: 50%; width: 38px; height: 22px; border-radius: 999px; background: linear-gradient(90deg, #e6e8ea, #f7f7f5); box-shadow: inset 0 0 0 1px #0000000f; transform: translateY(-50%); }
  .instr-sheet .scrollHint::after { content: ''; position: absolute; left: 24px; top: 50%; width: 9px; height: 9px; border-top: 2px solid #6b7178; border-right: 2px solid #6b7178; animation: swipeCue 1.65s ease-in-out infinite; }
}

@keyframes swipeCue {
  0%, 100% { opacity: .35; transform: translate(0, -50%) rotate(45deg); }
  50% { opacity: 1; transform: translate(13px, -50%) rotate(45deg); }
}

@media (prefers-reduced-motion: reduce) {
  .instr-sheet .scrollHint::after { animation: none; opacity: .8; transform: translate(8px, -50%) rotate(45deg); }
  .instr-toc a { transition: none; }
}
