:root {
  --bg: #f4f7fc;
  --paper: #fff;
  --ink: #14213d;
  --muted: #667085;
  --line: #dbe5f2;
  --blue: #075cff;
  --blue-dark: #071f4d;
  --soft: #eef5ff;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 6% 0, rgba(25, 183, 255, .13), transparent 25rem),
    var(--bg);
  font-family: "Avenir Next", "IBM Plex Sans", "Segoe UI", sans-serif;
  line-height: 1.62;
}

a { color: var(--blue); }

.shell {
  width: min(1040px, calc(100vw - 34px));
  margin: 0 auto;
  padding: 26px 0 60px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--blue-dark);
  font-weight: 900;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 11px 11px 11px 4px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), #19b7ff);
  font-family: Georgia, serif;
  font-size: 20px;
}

.top-actions { display: flex; flex-wrap: wrap; gap: 9px; }

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 11px 11px 11px 4px;
  color: var(--ink);
  background: #fff;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.button.primary { border-color: var(--blue); color: #fff; background: var(--blue); }

.document {
  padding: clamp(26px, 5vw, 58px);
  border: 1px solid var(--line);
  border-radius: 26px 26px 26px 8px;
  background: var(--paper);
  box-shadow: 0 24px 70px rgba(7, 31, 77, .10);
}

.kicker {
  margin: 0 0 12px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

h1 {
  max-width: 840px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -.045em;
}

.subtitle {
  max-width: 820px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 30px 0 0;
}

.meta-grid div {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f9fbff;
}

.meta-grid small,
.meta-grid strong { display: block; }
.meta-grid small { color: var(--muted); font-size: 11px; text-transform: uppercase; }
.meta-grid strong { margin-top: 3px; font-size: 14px; }

.toc {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 32px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--soft);
}

.toc a {
  padding: 7px 9px;
  border-radius: 8px;
  color: #23426d;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.toc a:hover { background: #fff; }

.preamble {
  margin: 30px 0;
  padding: 20px 22px;
  border-left: 4px solid var(--blue);
  border-radius: 0 12px 12px 0;
  color: #334155;
  background: var(--soft);
}

section { scroll-margin-top: 20px; }

h2 {
  margin: 42px 0 14px;
  color: var(--blue-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 27px;
  font-weight: 500;
  line-height: 1.2;
}

h3 { margin: 25px 0 8px; font-size: 17px; }

p, li, td, th { color: #4b5c72; font-size: 15px; }
p { margin: 10px 0; }
ol, ul { padding-left: 24px; }
li { margin: 7px 0; padding-left: 3px; }

.clause { counter-reset: none; }
.clause > p strong { color: var(--ink); }

.table-wrap { overflow-x: auto; margin: 20px 0; }

table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--line);
  background: #fff;
}

th, td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th { color: var(--ink); background: #f6f9fe; font-weight: 800; }
tr:last-child td { border-bottom: 0; }

.note {
  margin: 24px 0;
  padding: 17px 19px;
  border: 1px solid #bfd7ff;
  border-radius: 13px;
  color: #25426f;
  background: var(--soft);
}

.requisites {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 24px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #f9fbff;
}

.requisites p { margin: 3px 0; }

footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 28px 4px 0;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 720px) {
  .shell { width: calc(100vw - 18px); padding-top: 10px; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .document { padding: 24px 20px; border-radius: 18px 18px 18px 6px; }
  .meta-grid, .toc, .requisites { grid-template-columns: 1fr; }
  p, li, td, th { font-size: 14px; }
  .table-wrap { margin-inline: -8px; }
}

@media print {
  body { background: #fff; }
  .shell { width: auto; padding: 0; }
  .topbar, footer { display: none; }
  .document { padding: 0; border: 0; border-radius: 0; box-shadow: none; }
  .toc { display: none; }
  h2 { break-after: avoid; }
  table, .note, .requisites { break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
}
