﻿:root {
  --bg: #f3efe6;
  --bg-2: #e9ddc8;
  --card: #fffdf8;
  --text: #1f1f1f;
  --muted: #675f53;
  --line: #d6c7ae;
  --accent: #c24d2c;
  --accent-2: #0f6d68;
  --shadow: 0 12px 40px rgba(71, 51, 24, 0.12);
  --radius: 18px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Manrope, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 10%, #fff7ea 0%, transparent 42%),
    radial-gradient(circle at 80% 5%, #efe7d4 0%, transparent 36%),
    linear-gradient(180deg, var(--bg), #f8f3e8 60%, #f2ebdc);
}

.hero { padding: 64px 24px 40px; }
.hero__inner {
  max-width: 1100px;
  margin: 0 auto;
  background: linear-gradient(130deg, #fff9ee, #f5ebd8);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
  padding: 34px;
}
.eyebrow {
  font-family: "Space Grotesk", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-2);
  font-size: 12px;
  margin: 0;
}
h1 { margin: 10px 0 12px; font-size: clamp(30px, 4.2vw, 52px); line-height: 1.04; }
.lead { max-width: 760px; color: var(--muted); margin: 0; }
.hero__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 24px; }
.hero__stats article { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--card); }
.hero__stats strong { display: block; font-size: 28px; color: var(--accent); }
.hero__stats span { color: var(--muted); font-size: 13px; }

.layout { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 280px 1fr; gap: 22px; padding: 0 24px 48px; }
.toc { position: sticky; top: 20px; align-self: start; background: #fff8ea; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.toc h2 { margin: 0 0 14px; font-size: 17px; }
.toc nav { display: grid; gap: 6px; max-height: 68vh; overflow: auto; }
.toc a { color: var(--muted); text-decoration: none; font-size: 13px; padding: 6px 8px; border-radius: 8px; }
.toc a:hover, .toc a:focus-visible { background: #f2e6d0; color: var(--text); }

.content { display: grid; gap: 14px; }
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  padding: 24px 24px 20px;
  box-shadow: 0 5px 16px rgba(72, 54, 28, 0.08);
}
.card h3 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 24px;
  line-height: 1.25;
}
.doc-file {
  font-size: 12px;
  color: var(--accent-2);
  margin: 10px 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--line);
}

.card p {
  margin: 0;
  color: #2f2d29;
  white-space: normal;
}
.card p + p { margin-top: 10px; }

.p-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: 26px;
  line-height: 1.2;
  margin-top: 18px !important;
}
.p-meta {
  color: #4f4a42;
  font-size: 14px;
  font-weight: 600;
  background: #f8f0e1;
  border-left: 3px solid var(--accent);
  padding: 8px 10px;
  border-radius: 6px;
}
.p-subtitle {
  font-size: 18px;
  line-height: 1.35;
  font-weight: 700;
  margin-top: 16px !important;
  padding-top: 8px;
  border-top: 1px solid #ead9bd;
}
.p-label {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #7a6e5c;
  margin-top: 14px !important;
}
.p-body {
  font-size: 16px;
  line-height: 1.68;
  color: #272622;
}

.footer { text-align: center; color: var(--muted); padding: 26px; border-top: 1px solid var(--line); }

@media (max-width: 940px) {
  .layout { grid-template-columns: 1fr; }
  .toc { position: static; }
  .hero__stats { grid-template-columns: 1fr; }
  .card { padding: 18px; }
  .p-title { font-size: 22px; }
  .p-subtitle { font-size: 17px; }
  .p-body { font-size: 15px; }
}

.section-media { margin: 14px 0 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
.section-media img, .section-media video { width: 100%; max-width: 100%; border: 1px solid var(--line); border-radius: 12px; background: #000; display: block; }
.section-media--single { grid-template-columns: 1fr; }


@media (max-width: 720px) {
  .section-media { grid-template-columns: 1fr; }
}

.zoomable { cursor: zoom-in; }



.table-wrap { margin: 12px 0 18px; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.doc-table { width: 100%; border-collapse: collapse; min-width: 760px; }
.doc-table th, .doc-table td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid #eadfce; font-size: 14px; line-height: 1.45; }
.doc-table th { background: #f6ecdb; font-weight: 700; }
.doc-table tr:last-child td { border-bottom: 0; }

.internal-badge { display: inline-block; margin: 10px 0 0; padding: 6px 10px; border: 1px solid #c08b7d; border-radius: 999px; background: #fff1ec; color: #7a2f1d; font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.internal-footnote { margin-top: 8px; font-size: 12px; color: #7b7265; }

.hero__actions { margin-top: 14px; }
.btn-pdf { appearance: none; border: 1px solid #b98574; background: #fff4ee; color: #6d2a1a; padding: 9px 14px; border-radius: 10px; font-weight: 700; font-size: 14px; cursor: pointer; }
.btn-pdf:hover { background: #ffe9de; }

@media print {
  body { background: #fff !important; }
  .toc, .hero__actions, .footer, .internal-badge, .hero__stats { display: none !important; }
  .hero { padding: 0 0 10px; }
  .hero__inner { box-shadow: none; border: 0; background: #fff; padding: 0 0 10px; }
  .layout { display: block; max-width: none; padding: 0; }
  .content { display: block; }
  .card { break-inside: avoid; page-break-inside: avoid; box-shadow: none; border: 1px solid #ddd; margin: 0 0 10px; }
  .section-media { grid-template-columns: 1fr 1fr; }
  .section-media video { display: none !important; }
  .zoomable { cursor: default; }
  a { color: #000; text-decoration: none; }
}

@media print {
  .table-wrap { overflow: visible !important; width: 100% !important; }
  .doc-table { width: 100% !important; min-width: 0 !important; table-layout: fixed !important; }
  .doc-table th, .doc-table td { white-space: normal !important; overflow-wrap: anywhere !important; word-break: break-word !important; font-size: 11px !important; padding: 6px 7px !important; }
}


.comment-target { position: relative; }
.comment-badge { position: absolute; transform: translate(-50%, -115%); background: #ff4f3b; color: #fff; border: 0; border-radius: 999px; padding: 2px 8px; font-size: 11px; font-weight: 700; cursor: pointer; z-index: 5; box-shadow: 0 4px 10px rgba(0,0,0,.22); }
.comment-badge::after { content: attr(data-text); position: absolute; left: 50%; top: -8px; transform: translate(-50%, -100%); background: #1f1f1f; color: #fff; padding: 8px 10px; border-radius: 8px; min-width: 220px; max-width: 380px; white-space: normal; opacity: 0; pointer-events: none; transition: opacity .15s ease; font-size: 12px; font-weight: 500; line-height: 1.35; text-align: left; }
.comment-badge:hover::after { opacity: 1; }
.comment-modal { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: none; align-items: center; justify-content: center; z-index: 5000; padding: 16px; }
.comment-modal.is-open { display: flex; }
.comment-modal__box { width: min(620px, 100%); background: #fff; border-radius: 14px; border: 1px solid #d8d8d8; padding: 16px; box-shadow: 0 14px 40px rgba(0,0,0,.22); }
.comment-modal__box h4 { margin: 0 0 10px; font-size: 18px; }
#commentInput { width: 100%; border: 1px solid #c9c9c9; border-radius: 10px; padding: 10px; font: 14px/1.45 Manrope, sans-serif; resize: vertical; min-height: 120px; }
.comment-modal__actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px; }
.comment-modal__actions button { border: 1px solid #b9b9b9; background: #f8f8f8; border-radius: 8px; padding: 8px 10px; cursor: pointer; }
.comment-modal__actions .danger { border-color: #ce4f4f; color: #952323; background: #fff4f4; }
@media print { .comment-badge, .comment-modal { display: none !important; } }

.help-tip { margin: 0; font-size: 12px; color: #4a4a4a; background: #fff6d8; border: 1px solid #e8d8a1; padding: 7px 10px; border-radius: 8px; max-width: 420px; margin-left: auto; }
@media print { .help-tip { display: none !important; } }


.section-media--s15 { display: block; }
.section-media--s15 > img { width: 100%; max-height: 420px; object-fit: contain; background: #fff; }
.section-media__videos { margin-top: 12px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.section-media__videos video { width: 100%; max-height: 420px; object-fit: cover; }
@media (max-width: 980px) { .section-media__videos { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .section-media__videos { grid-template-columns: 1fr; } .section-media--s15 > img, .section-media__videos video { max-height: 320px; } }
