:root {
  --navy: #173f73;
  --navy-dark: #102f57;
  --gold: #d7a64c;
  --paper: #fffdf8;
  --bg: #f5f2ea;
  --text: #18243d;
  --muted: #6c7583;
  --border: #ded8ca;
  --soft: #ece8dd;
  --success: #176b4b;
  --error: #a73535;
  --radius: 20px;
  --shadow: 0 16px 42px rgba(23, 63, 115, .10);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  line-height: 1.55;
}
.wrap { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.hero {
  background: linear-gradient(135deg, var(--navy-dark), var(--navy));
  color: white;
  padding: 58px 0 52px;
  border-bottom: 5px solid var(--gold);
}
.eyebrow, .section-label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.eyebrow { color: #f4cf87; }
.hero h1 { margin: 10px 0 12px; font-size: clamp(30px, 5vw, 54px); line-height: 1.08; }
.hero p { margin: 0; max-width: 760px; color: rgba(255,255,255,.82); font-size: 17px; }
.main { padding: 34px 0 60px; }
.button-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 30px; }
.doc-button {
  display: grid;
  grid-template-columns: 48px 1fr 28px;
  gap: 13px;
  align-items: center;
  min-height: 94px;
  padding: 16px 18px;
  text-decoration: none;
  color: var(--text);
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 5px 18px rgba(23,63,115,.05);
  transition: .2s ease;
}
.doc-button:hover { transform: translateY(-2px); border-color: #aab8c9; box-shadow: var(--shadow); }
.doc-button.active { border: 2px solid var(--navy); background: #f8fbff; }
.number {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--soft);
  color: var(--navy);
  font-weight: 800;
}
.doc-button.active .number { background: var(--navy); color: white; }
.button-title { font-weight: 700; font-size: 14px; line-height: 1.35; }
.arrow { color: var(--gold); font-size: 24px; text-align: right; }
.document-card { background: var(--paper); border: 1px solid var(--border); border-radius: 26px; box-shadow: var(--shadow); overflow: hidden; }
.document-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding: 26px 28px; border-bottom: 1px solid var(--border); }
.section-label { color: var(--gold); }
.document-head h2 { margin: 6px 0 0; font-size: clamp(19px, 3vw, 28px); line-height: 1.25; }
.open-link { flex: 0 0 auto; color: var(--navy); font-weight: 700; text-decoration: none; padding: 10px 14px; background: #edf3fa; border-radius: 12px; }
.open-link:hover { background: #e2ecf7; }
.pdf-frame-wrap { background: #cfd4db; padding: 14px; }
.pdf-frame { display: block; width: 100%; height: min(78vh, 900px); min-height: 560px; border: 0; border-radius: 12px; background: white; }
.comments-section { padding: 28px; }
.comments-title-row { display: flex; justify-content: space-between; gap: 20px; align-items: end; margin-bottom: 18px; }
.comments-title-row h3 { margin: 5px 0 0; font-size: 26px; }
.comment-count { color: var(--muted); font-weight: 700; }
.comment-form { display: grid; gap: 15px; background: #f6f4ee; border: 1px solid var(--border); padding: 20px; border-radius: 16px; }
.comment-form label { display: grid; gap: 7px; font-weight: 700; font-size: 14px; }
.comment-form input, .comment-form textarea {
  width: 100%;
  border: 1px solid #cfc8b9;
  border-radius: 12px;
  padding: 13px 14px;
  font: inherit;
  color: var(--text);
  background: white;
  outline: none;
}
.comment-form input:focus, .comment-form textarea:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(23,63,115,.12); }
.submit-button { justify-self: start; border: 0; border-radius: 12px; padding: 13px 20px; background: var(--navy); color: white; font: inherit; font-weight: 800; cursor: pointer; }
.submit-button:hover { background: var(--navy-dark); }
.notice { margin-bottom: 16px; padding: 12px 14px; border-radius: 12px; font-weight: 700; }
.notice.success { color: var(--success); background: #e7f5ef; border: 1px solid #b9dfcf; }
.notice.error { color: var(--error); background: #faecec; border: 1px solid #edc2c2; }
.comment-list { display: grid; gap: 12px; margin-top: 22px; }
.comment-item { display: grid; grid-template-columns: 44px 1fr; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--navy); color: white; font-weight: 800; }
.comment-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline; }
.comment-meta time { color: var(--muted); font-size: 12px; }
.comment-body p { margin: 6px 0 0; }
.empty { color: var(--muted); padding: 10px 0; }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
footer { padding: 26px 0 36px; color: var(--muted); text-align: center; font-size: 13px; }
@media (max-width: 820px) {
  .button-grid { grid-template-columns: 1fr; }
  .document-head { flex-direction: column; }
  .open-link { width: 100%; text-align: center; }
  .pdf-frame { height: 68vh; min-height: 480px; }
}
@media (max-width: 520px) {
  .wrap { width: min(100% - 20px, 1180px); }
  .hero { padding: 36px 0 34px; }
  .main { padding-top: 20px; }
  .doc-button { grid-template-columns: 40px 1fr 20px; min-height: 86px; padding: 13px; }
  .number { width: 40px; height: 40px; border-radius: 11px; }
  .button-title { font-size: 13px; }
  .document-head, .comments-section { padding: 20px 16px; }
  .pdf-frame-wrap { padding: 6px; }
  .pdf-frame { min-height: 440px; }
  .comments-title-row { align-items: flex-start; }
}
