:root {
  color-scheme: light;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;
  --container: 1180px;
  --measure: 760px;

  --bg: #f4f6f5;
  --surface: #ffffff;
  --surface-2: #f8faf9;
  --surface-3: #edf3f1;
  --text: #172033;
  --body: #2a3544;
  --muted: #657184;
  --line: #d9e1de;
  --line-strong: #bdc9c4;
  --accent: #0b6f63;
  --accent-hover: #07584f;
  --accent-soft: #e4f2ef;
  --accent-wash: #f2f8f6;
  --gold: #996316;
  --gold-soft: #f5eee2;
  --blue: #315f91;
  --danger: #b42318;
  --ok: #047857;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 40px;
  --space-9: 48px;
  --space-10: 64px;

  --radius-1: 6px;
  --radius-2: 8px;
  --shadow-xs: 0 1px 2px rgba(23, 32, 51, 0.06);
  --shadow-sm: 0 8px 24px rgba(23, 32, 51, 0.08);
  --shadow-md: 0 18px 44px rgba(23, 32, 51, 0.1);

  --focus: 0 0 0 4px rgba(11, 111, 99, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
}

body.menu-open {
  overflow: hidden;
}

::selection {
  background: var(--accent-soft);
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--accent);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 0;
  box-shadow: var(--focus);
}

img {
  max-width: 100%;
  height: auto;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  appearance: none;
}

.site-header,
.site-footer,
main {
  width: min(100%, calc(var(--container) + 40px));
  margin-inline: auto;
}

main {
  padding: 0 var(--space-5) var(--space-10);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 35;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  border-bottom: 1px solid rgba(217, 225, 222, 0.92);
  padding: 18px var(--space-5);
  background: rgba(244, 246, 245, 0.96);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
  color: var(--text);
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(23, 32, 51, 0.08);
  border-radius: var(--radius-2);
  background: var(--text);
  box-shadow: var(--shadow-xs);
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 18px;
  line-height: 1.12;
}

.brand small,
.muted,
.doc-card small,
.admin-card small,
.history-item small {
  color: var(--muted);
}

.brand small {
  margin-top: 2px;
  font-size: 13px;
  line-height: 1.25;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius-2);
  padding: 0;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: opacity 160ms ease, transform 160ms ease;
}

.menu-toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.top-nav,
.site-footer div:last-child,
.actions,
.card-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.top-nav a,
.site-footer a {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.35;
}

.top-nav a {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  border: 1px solid transparent;
  border-radius: var(--radius-2);
  padding: 8px 10px;
  white-space: nowrap;
}

.top-nav a:hover {
  border-color: var(--line);
  background: var(--surface);
  color: var(--text);
}

.top-nav a.active {
  border-color: rgba(11, 111, 99, 0.18);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}

.menu-backdrop {
  display: none;
}

.menu-backdrop[hidden] {
  display: none;
}

.hero,
.document-hero,
.content-grid,
.account-grid,
.split-band {
  display: grid;
  gap: var(--space-7);
}

.hero {
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.64fr);
  align-items: stretch;
  padding: 52px 0 32px;
}

.hero-copy,
.page-head,
.section,
.document-hero,
.content-grid {
  margin-bottom: var(--space-7);
}

.page-head {
  padding: 44px 0 var(--space-2);
}

.eyebrow {
  margin: 0 0 var(--space-3);
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  color: var(--text);
  letter-spacing: 0;
}

h1 {
  max-width: 900px;
  margin: 0 0 var(--space-4);
  font-size: 44px;
  font-weight: 750;
  line-height: 1.08;
}

h2 {
  margin: 0 0 var(--space-4);
  font-size: 25px;
  font-weight: 740;
  line-height: 1.18;
}

h3 {
  margin: 0 0 var(--space-3);
  font-size: 19px;
  font-weight: 730;
  line-height: 1.25;
}

p,
li,
dd,
dt,
input,
textarea,
button,
select {
  font-size: 16px;
  line-height: 1.58;
}

p {
  margin: 0 0 var(--space-4);
  color: var(--body);
}

ul,
ol {
  margin-top: 0;
}

.hero-copy > p:not(.eyebrow),
.page-head > p,
.document-hero > div > p:not(.eyebrow) {
  max-width: 780px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.62;
}

.section {
  scroll-margin-top: 96px;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.section-head h2 {
  margin-bottom: 0;
}

.section-head a,
.article-card > a,
.step-card a {
  color: var(--accent);
  font-weight: 750;
}

.section-head a:hover,
.article-card > a:hover,
.step-card a:hover {
  color: var(--accent-hover);
}

.breadcrumbs {
  display: flex;
  gap: var(--space-2);
  margin: var(--space-4) 0 var(--space-6);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
  flex-wrap: wrap;
}

.breadcrumbs a {
  color: var(--accent);
}

.hero-panel,
.document-preview,
.doc-card,
.category-card,
.article-card,
.side-panel,
.admin-card,
.trust-card,
.notice-block,
.account-panel,
.history-item,
.tool-card,
.tool-surface,
.table-wrap,
.result-panel,
.generated-draft {
  border: 1px solid var(--line);
  border-radius: var(--radius-2);
  background: var(--surface);
}

.hero-panel,
.document-preview,
.doc-card,
.category-card,
.article-card,
.side-panel,
.admin-card,
.trust-card,
.notice-block,
.account-panel,
.tool-card,
.tool-surface {
  box-shadow: var(--shadow-sm);
}

.category-card,
.article-card,
.doc-card,
.admin-card,
.side-panel,
.trust-card,
.notice-block,
.account-panel,
.tool-card,
.tool-surface {
  padding: var(--space-6);
}

.category-card,
.article-card,
.doc-card,
.tool-card,
.mini-list a {
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease, background 160ms ease;
}

.category-card:hover,
.article-card:hover,
.doc-card:hover,
.tool-card:hover,
.mini-list a:hover {
  border-color: rgba(11, 111, 99, 0.36);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.hero-panel,
.document-preview {
  position: relative;
  overflow: hidden;
  background: var(--surface);
}

.hero-panel {
  min-height: 360px;
  padding: var(--space-8);
}

.hero-panel::before,
.document-preview::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(217, 225, 222, 0.78);
  border-radius: var(--radius-2);
  pointer-events: none;
}

.hero-panel::after,
.document-preview::after {
  content: "Бланковик";
  position: absolute;
  right: 24px;
  bottom: 28px;
  color: #dfe7e4;
  font-size: 28px;
  font-weight: 800;
  transform: rotate(-12deg);
}

.hero-panel span,
.document-preview span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  margin-bottom: var(--space-7);
  border-radius: var(--radius-1);
  padding: 4px 8px;
  background: var(--gold-soft);
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
}

.hero-panel h2,
.document-preview h2 {
  font-family: var(--font-serif);
  font-size: 28px;
  line-height: 1.15;
}

.hero-panel p,
.document-preview p {
  color: var(--body);
}

.hero-panel small {
  color: var(--ok);
  font-weight: 750;
}

.search-box {
  display: flex;
  max-width: 720px;
  margin-top: var(--space-6);
  border: 1px solid var(--line);
  border-radius: var(--radius-2);
  padding: var(--space-1);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.search-box:focus-within {
  border-color: rgba(11, 111, 99, 0.42);
  box-shadow: var(--focus);
}

.search-box input {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: var(--radius-1);
  padding: 0 var(--space-4);
  background: transparent;
  color: var(--text);
  outline: none;
}

.search-box input::placeholder,
input::placeholder,
textarea::placeholder {
  color: #8b95a4;
}

button,
.button,
.search-box button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-2);
  padding: 10px 16px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-weight: 750;
  line-height: 1.35;
  text-align: center;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

button:hover,
.button:hover {
  border-color: var(--line-strong);
  background: var(--surface-2);
  color: var(--text);
}

.button.primary,
button.primary,
.search-box button {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 18px rgba(11, 111, 99, 0.16);
}

.button.primary:hover,
button.primary:hover,
.search-box button:hover {
  border-color: var(--accent-hover);
  background: var(--accent-hover);
  color: #fff;
}

.button.ghost {
  border-color: transparent;
  background: transparent;
  color: var(--accent);
}

.button.ghost:hover {
  border-color: rgba(11, 111, 99, 0.18);
  background: var(--accent-soft);
}

.category-grid,
.doc-list,
.article-grid,
.admin-grid,
.policy-grid,
.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
}

.category-card {
  display: flex;
  min-height: 204px;
  flex-direction: column;
}

.category-card span {
  display: grid;
  width: 40px;
  height: 40px;
  margin-bottom: var(--space-5);
  place-items: center;
  border: 1px solid rgba(11, 111, 99, 0.16);
  border-radius: var(--radius-2);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 800;
}

.category-card p,
.article-card p,
.tool-card p,
.doc-card p {
  color: var(--muted);
}

.doc-card {
  display: flex;
  min-height: 248px;
  flex-direction: column;
}

.doc-card small {
  display: block;
  margin-bottom: var(--space-2);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.35;
}

.doc-card h3 a {
  color: var(--text);
}

.doc-card p {
  margin-bottom: var(--space-5);
}

.card-actions {
  margin-top: auto;
  padding-top: var(--space-1);
}

.card-actions a {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  border: 1px solid rgba(11, 111, 99, 0.16);
  border-radius: var(--radius-1);
  padding: 7px 10px;
  background: var(--accent-wash);
  color: var(--accent);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.3;
}

.card-actions a:hover {
  border-color: rgba(11, 111, 99, 0.36);
  background: var(--accent-soft);
  color: var(--accent-hover);
}

.article-card {
  min-height: 210px;
}

.article-card small {
  display: block;
  margin-bottom: var(--space-2);
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.text-page {
  max-width: 980px;
}

.article-body {
  max-width: var(--measure);
}

.article-body h2 {
  margin-top: var(--space-8);
}

.article-body p,
.article-body li {
  color: var(--body);
}

.article-body .section {
  padding-top: var(--space-2);
}

.trust-card ul,
.notice-block p {
  margin-bottom: 0;
}

.trust-card li + li,
.check-list li + li,
.strong-list li + li {
  margin-top: var(--space-2);
}

.check-list,
.strong-list {
  padding-left: 20px;
  color: var(--body);
}

.step-list {
  display: grid;
  gap: var(--space-4);
}

.step-card {
  position: relative;
}

.step-card small {
  display: inline-flex;
  margin-bottom: var(--space-3);
  border-radius: var(--radius-1);
  padding: 4px 8px;
  background: var(--gold-soft);
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
}

.public-form {
  margin-bottom: var(--space-8);
}

.document-hero {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  align-items: start;
  padding-top: var(--space-1);
}

.document-preview {
  position: sticky;
  top: 96px;
  min-height: 420px;
  padding: var(--space-7);
}

.trust-line {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
  margin: var(--space-5) 0 0;
}

.trust-line div {
  border: 1px solid var(--line);
  border-radius: var(--radius-2);
  padding: var(--space-3);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.trust-line dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
}

.trust-line dd {
  margin: 2px 0 0;
  color: var(--text);
  font-weight: 800;
  line-height: 1.35;
}

.content-grid {
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: start;
}

.side-panel {
  position: sticky;
  top: 96px;
}

.side-panel h2 + ul,
.side-panel h2 + p {
  margin-top: calc(var(--space-2) * -1);
}

.side-panel a {
  color: var(--accent);
  font-weight: 700;
}

.faq details {
  border-top: 1px solid var(--line);
  padding: var(--space-4) 0;
}

.faq details:last-child {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  cursor: pointer;
  color: var(--text);
  font-weight: 750;
}

.faq p {
  margin: var(--space-3) 0 0;
}

.fill-form,
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}

.fill-form {
  max-width: 860px;
}

.fill-form label,
.admin-form label,
.tool-controls label {
  display: grid;
  gap: var(--space-2);
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.35;
}

.fill-form textarea,
.fill-form label.full,
.form-grid .full {
  grid-column: 1 / -1;
}

.fill-form input,
.fill-form textarea,
.admin-form input,
.admin-form textarea,
.admin-form select,
.account-panel input,
.account-panel textarea,
.tool-controls input,
.tool-controls select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius-2);
  padding: 11px 12px;
  background: #fff;
  color: var(--text);
  font: inherit;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.fill-form input:focus,
.fill-form textarea:focus,
.admin-form input:focus,
.admin-form textarea:focus,
.admin-form select:focus,
.account-panel input:focus,
.account-panel textarea:focus,
.tool-controls input:focus,
.tool-controls select:focus {
  border-color: rgba(11, 111, 99, 0.44);
}

select {
  overflow: hidden;
  text-overflow: ellipsis;
}

.fill-form textarea {
  min-height: 112px;
}

.generated-draft {
  max-width: 860px;
  margin-top: var(--space-4);
  overflow-x: auto;
  padding: var(--space-5);
  color: var(--text);
  white-space: pre-wrap;
}

.notice {
  max-width: 720px;
  border-radius: var(--radius-2);
  padding: var(--space-3) var(--space-4);
}

.notice.ok {
  background: rgba(4, 120, 87, 0.08);
  color: var(--ok);
}

.notice.danger {
  background: rgba(180, 35, 24, 0.08);
  color: var(--danger);
}

.admin-card.ok {
  border-color: rgba(4, 120, 87, 0.35);
}

.admin-card.warn {
  border-color: rgba(180, 35, 24, 0.35);
}

.admin-form {
  max-width: 980px;
}

.auth-form {
  display: grid;
  gap: var(--space-4);
  max-width: 420px;
}

.account-grid {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.55fr);
  align-items: start;
}

.account-panel {
  min-width: 0;
}

.history-list {
  display: grid;
  gap: var(--space-3);
}

.history-item {
  padding: var(--space-4);
  box-shadow: none;
}

.history-item p:last-child {
  margin-bottom: 0;
}

.history-item a {
  color: var(--accent);
  font-weight: 750;
}

.delete-form {
  margin-top: var(--space-7);
}

.delete-form button {
  border-color: rgba(180, 35, 24, 0.35);
  color: var(--danger);
}

.table-wrap {
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
}

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

th {
  background: var(--surface-3);
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
}

td {
  color: var(--body);
}

tr:last-child td {
  border-bottom: 0;
}

.tool-card {
  display: flex;
  min-height: 220px;
  flex-direction: column;
}

.tool-card small {
  display: inline-flex;
  width: fit-content;
  margin-bottom: var(--space-3);
  border-radius: var(--radius-1);
  padding: 4px 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

.tool-card h2 {
  font-size: 22px;
}

.tool-surface {
  padding: var(--space-6);
}

.tool-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  gap: var(--space-4);
  align-items: end;
}

.result-panel {
  margin-top: var(--space-5);
  padding: var(--space-5);
  background: var(--surface-2);
}

.result-panel h2,
.result-panel h3 {
  margin-top: 0;
}

.split-band {
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: start;
  border-top: 1px solid var(--line);
  padding-top: var(--space-7);
}

.mini-list {
  display: grid;
  gap: var(--space-3);
}

.mini-list a {
  display: grid;
  gap: var(--space-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-2);
  padding: var(--space-4);
  background: var(--surface);
  color: var(--text);
  font-weight: 750;
  box-shadow: var(--shadow-xs);
}

.mini-list span {
  color: var(--muted);
  font-weight: 400;
}

.strong-list li {
  margin-bottom: var(--space-2);
}

.progress-line {
  display: grid;
  gap: var(--space-2);
  margin: var(--space-3) 0 var(--space-5);
}

.progress-bar {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--line);
}

.progress-bar span {
  display: block;
  height: 100%;
  width: var(--progress, 0%);
  background: var(--accent);
}

.check-item {
  display: flex;
  gap: var(--space-3);
  min-height: 44px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 10px 0;
}

.check-item input {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  margin: 0;
  accent-color: var(--accent);
}

.site-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-6);
  border-top: 1px solid var(--line);
  padding: var(--space-7) var(--space-5);
  color: var(--muted);
}

.site-footer strong {
  color: var(--text);
}

.site-footer p {
  max-width: 420px;
  margin: var(--space-2) 0 0;
  color: var(--muted);
}

.site-footer div:last-child {
  justify-content: flex-end;
  max-width: 620px;
}

.site-footer a:hover {
  color: var(--accent);
}

.cookie-banner {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  display: flex;
  max-width: min(460px, calc(100vw - 28px));
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  border: 1px solid var(--line);
  border-radius: var(--radius-2);
  padding: 10px 12px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.cookie-banner[hidden] {
  display: none;
}

.cookie-banner p {
  flex: 1 1 220px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.cookie-banner a {
  color: var(--accent);
  font-weight: 750;
}

.cookie-banner a,
.cookie-banner button {
  align-self: center;
}

.cookie-banner button {
  min-height: 36px;
  padding: 7px 12px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 980px) {
  .site-header {
    position: sticky;
    top: 0;
    align-items: center;
    gap: var(--space-3);
    padding: 14px;
  }

  .brand {
    flex: 1 1 auto;
  }

  .brand small {
    font-size: 13px;
  }

  .menu-toggle {
    display: inline-grid;
  }

  .top-nav {
    position: fixed;
    top: 76px;
    right: 14px;
    left: 14px;
    z-index: 45;
    display: none;
    align-items: stretch;
    flex-direction: column;
    gap: 0;
    max-height: calc(100dvh - 92px);
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius-2);
    padding: 8px;
    background: var(--surface);
    box-shadow: var(--shadow-md);
  }

  .top-nav.is-open {
    display: flex;
  }

  .top-nav a {
    min-height: 44px;
    border-radius: var(--radius-1);
    padding: 10px 12px;
    color: var(--text);
  }

  .menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: block;
    background: rgba(23, 32, 51, 0.18);
    backdrop-filter: blur(2px);
  }

  .menu-backdrop[hidden] {
    display: none;
  }
}

@media (max-width: 900px) {
  .hero,
  .document-hero,
  .content-grid,
  .account-grid,
  .tool-controls,
  .split-band {
    grid-template-columns: 1fr;
  }

  .category-grid,
  .doc-list,
  .article-grid,
  .admin-grid,
  .policy-grid,
  .tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .document-preview,
  .side-panel {
    position: static;
  }
}

@media (max-width: 640px) {
  main {
    padding-inline: 14px;
    padding-bottom: var(--space-8);
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    padding-inline: 14px;
  }

  .site-footer div:last-child {
    justify-content: flex-start;
  }

  h1 {
    font-size: 32px;
    line-height: 1.12;
  }

  h2 {
    font-size: 22px;
  }

  .hero {
    gap: var(--space-5);
    padding-top: var(--space-7);
  }

  .page-head {
    padding-top: var(--space-7);
  }

  .search-box,
  .actions,
  .fill-form,
  .form-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  .actions .button,
  .actions button,
  .search-box button {
    width: 100%;
  }

  .category-grid,
  .doc-list,
  .article-grid,
  .admin-grid,
  .policy-grid,
  .tool-grid,
  .trust-line {
    grid-template-columns: 1fr;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-panel,
  .document-preview {
    min-height: 260px;
  }

  .document-preview span,
  .hero-panel span {
    margin-bottom: var(--space-5);
  }

  .doc-card {
    min-height: auto;
  }

  .hero-panel,
  .document-preview,
  .category-card,
  .article-card,
  .doc-card,
  .admin-card,
  .side-panel,
  .trust-card,
  .notice-block,
  .account-panel,
  .tool-card,
  .tool-surface {
    padding: var(--space-4);
  }

  .cookie-banner {
    right: 14px;
    bottom: 14px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: stretch;
    gap: var(--space-2);
    max-width: calc(100vw - 28px);
  }

  .cookie-banner p {
    flex: none;
  }
}
