/* Юридические страницы «Дневник рыбака» — палитра и шапка из index-prod.html */
:root {
  --bg: #f5f8f4;
  --surface: #ffffff;
  --surface-soft: #e7f0e9;
  --ink: #14332c;
  --ink2: #4d6b62;
  --ink3: #829790;
  --muted: #60756f;
  --line: #dce7e0;
  --green: #1f765f;
  --green-dark: #145443;
  --green-soft: #dff0e7;
  --green-fade: #edf5f0;
  --orange: #ef8c2f;
  --orange-dark: #d56e12;
  --yellow: #f5c75b;
  --shadow: 0 20px 60px rgba(20, 51, 44, .10);
  --shadow-soft: 0 12px 32px rgba(20, 51, 44, .07);
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 6% 3%, rgba(245, 199, 91, .18), transparent 24rem),
    radial-gradient(circle at 92% 9%, rgba(31, 118, 95, .11), transparent 28rem),
    var(--bg);
  font-family: Inter, ui-sans-serif, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.container { width: min(var(--max), calc(100% - 40px)); margin-inline: auto; }

/* ---------- шапка ---------- */
.topbar { height: 84px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 800; letter-spacing: -.02em; }
.brand img { width: 42px; height: 42px; border-radius: 13px; }
.nav { display: flex; align-items: center; gap: 26px; color: #34564d; font-weight: 700; font-size: 15px; }
.nav a:hover { color: var(--green); }
@media (max-width: 900px) { .nav { display: none; } }

.btn {
  min-height: 54px; padding: 0 22px; border: 0; border-radius: 16px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: inherit; font-weight: 800; cursor: pointer; white-space: nowrap;
  transition: transform .18s ease, box-shadow .18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { color: #fff; background: linear-gradient(135deg, var(--orange), var(--orange-dark)); box-shadow: 0 14px 30px rgba(239,140,47,.30); }
.btn.small { min-height: 44px; padding: 0 16px; font-size: 15px; border-radius: 13px; }

/* ---------- заголовок документа ---------- */
.doc-wrap { padding-bottom: 40px; }
.crumbs { display: flex; gap: 8px; align-items: center; color: var(--ink3); font-size: 14px; font-weight: 600; padding: 6px 0 22px; }
.crumbs a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.crumbs a:hover { color: var(--green); }

.doc-head { max-width: 860px; margin-bottom: 34px; }
.doc-badge {
  display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 999px;
  background: var(--green-soft); color: var(--green-dark);
  font-weight: 800; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 16px;
}
.doc-head h1 {
  margin: 0 0 14px; font-size: clamp(30px, 3.6vw, 46px); line-height: 1.1;
  letter-spacing: -.035em; font-weight: 800;
}
.doc-sub { margin: 0 0 10px; color: var(--muted); font-size: clamp(17px, 1.6vw, 19px); }
.doc-date {
  margin: 0; display: inline-flex; align-items: center; gap: 8px;
  color: var(--green-dark); font-weight: 700; font-size: 14px;
  background: rgba(255,255,255,.75); border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 14px;
}

/* ---------- раскладка: оглавление + текст ---------- */
.doc-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 34px; align-items: start; }
@media (max-width: 1000px) { .doc-layout { grid-template-columns: 1fr; gap: 20px; } }

.toc-in {
  position: sticky; top: 24px;
  border: 1px solid var(--line); border-radius: 22px;
  background: rgba(255,255,255,.86); box-shadow: var(--shadow-soft);
  padding: 20px 18px; max-height: calc(100vh - 48px); overflow: auto;
}
.toc-t { font-weight: 800; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink3); margin-bottom: 12px; }
.toc ol { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.toc li { color: var(--muted); font-size: 14.5px; line-height: 1.35; }
.toc a { text-decoration: none; }
.toc a:hover { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 1000px) {
  .toc-in { position: static; max-height: none; }
  .toc ol { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
}

/* ---------- сам документ ---------- */
.doc {
  border: 1px solid var(--line); border-radius: 26px;
  background: rgba(255,255,255,.92); box-shadow: var(--shadow-soft);
  padding: 40px 44px 44px;
  font-size: 16.5px; color: #24443c;
}
@media (max-width: 640px) { .doc { padding: 26px 20px 30px; border-radius: 22px; font-size: 16px; } }

.doc h2 {
  margin: 34px 0 14px; padding-top: 22px; border-top: 1px solid var(--line);
  font-size: clamp(20px, 2vw, 24px); line-height: 1.2; letter-spacing: -.025em;
  font-weight: 800; color: var(--ink); scroll-margin-top: 20px;
}
.doc h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.doc p { margin: 0 0 14px; }
.doc p:last-child { margin-bottom: 0; }
.doc a { color: var(--green); text-decoration: underline; text-underline-offset: 3px; word-break: break-word; }
.doc a:hover { color: var(--orange-dark); }

.doc ul { margin: 0 0 16px; padding: 0; list-style: none; display: grid; gap: 10px; }
.doc li { position: relative; padding-left: 26px; }
.doc li::before {
  content: ""; position: absolute; left: 8px; top: .62em;
  width: 7px; height: 7px; border-radius: 50%; background: var(--green); opacity: .55;
}

/* таблицы */
.tbl { margin: 0 0 18px; overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.doc table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 560px; }
.doc thead th {
  text-align: left; padding: 12px 16px; background: var(--green-fade);
  color: var(--green-dark); font-weight: 800; font-size: 13px;
  letter-spacing: .03em; text-transform: uppercase; white-space: nowrap;
}
.doc tbody td { padding: 13px 16px; border-top: 1px solid var(--line); vertical-align: top; line-height: 1.45; }
.doc tbody tr:nth-child(even) td { background: rgba(237, 245, 240, .45); }

@media (max-width: 640px) {
  .tbl { border: 0; border-radius: 0; overflow: visible; }
  .doc table, .doc tbody, .doc tr, .doc td { display: block; width: 100%; min-width: 0; }
  .doc thead { display: none; }
  .doc tbody tr {
    border: 1px solid var(--line); border-radius: 16px; background: #fff;
    padding: 6px 0; margin-bottom: 12px;
  }
  .doc tbody tr:nth-child(even) td { background: transparent; }
  .doc tbody td { border-top: 0; padding: 8px 16px; }
  .doc tbody td + td { border-top: 1px solid var(--line); }
  .doc tbody td[data-l]:not([data-l=""])::before {
    content: attr(data-l); display: block; margin-bottom: 3px;
    font-size: 11.5px; font-weight: 800; letter-spacing: .04em;
    text-transform: uppercase; color: var(--ink3);
  }
}

/* реквизиты */
.req { margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line); }
.req h2 { margin: 0 0 16px; padding: 0; border: 0; font-size: clamp(20px, 2vw, 24px); font-weight: 800; letter-spacing: -.025em; }
.req dl { margin: 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.req-row { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 1px; background: var(--line); }
.req dt { margin: 0; padding: 12px 16px; background: var(--green-fade); font-weight: 700; color: var(--green-dark); font-size: 14.5px; }
.req dd { margin: 0; padding: 12px 16px; background: #fff; font-size: 15.5px; }
@media (max-width: 640px) {
  .req-row { grid-template-columns: 1fr; }
  .req dt { padding-bottom: 4px; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; background: #fff; color: var(--ink3); }
  .req dd { padding-top: 0; }
  .req-row + .req-row { padding-top: 1px; }
}

/* ---------- другие документы ---------- */
.other { margin-top: 46px; }
.other h2 { margin: 0 0 16px; font-size: 22px; font-weight: 800; letter-spacing: -.03em; }
.other-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.other-card {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.88);
  box-shadow: var(--shadow-soft); padding: 16px 18px;
  font-weight: 700; font-size: 15.5px; color: #2a4d44;
  transition: transform .16s ease, color .16s ease;
}
.other-card::before { content: "→"; color: var(--green); font-weight: 800; }
.other-card:hover { transform: translateY(-2px); color: var(--green); }

/* ---------- подвал ---------- */
footer { border-top: 1px solid var(--line); padding: 28px 0 44px; color: var(--muted); font-size: 14px; background: rgba(255,255,255,.5); }
.foot-grid { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; }
.foot-brand { font-weight: 800; color: var(--ink); margin-bottom: 8px; }
.foot-line { margin-top: 8px; }
.foot-legal { display: flex; flex-wrap: wrap; gap: 10px 18px; max-width: 720px; align-content: flex-start; }
.foot-legal a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.foot-legal a:hover { color: var(--green); }
.foot-legal a.is-current { color: var(--green); font-weight: 700; }
.foot-legal span { width: 100%; color: var(--ink3); }
.foot-legal span a { color: var(--ink3); }

/* ---------- печать ---------- */
@media print {
  body { background: #fff; }
  header, .toc, .other, footer, .crumbs, .doc-badge { display: none !important; }
  .doc { border: 0; box-shadow: none; padding: 0; background: #fff; }
  .doc-layout { display: block; }
  .doc h2 { break-after: avoid; }
  .tbl { break-inside: avoid; }
}
