:root {
  --bg: #0f172a;
  --bg-gradient-start: #0b1220;
  --bg-gradient-end: #0f172a;
  --card: rgba(17, 24, 39, 0.9);
  --text: #e5e7eb;
  --muted: #9ca3af;
  --accent: #22c55e;
  --border: #1f2937;
  --link: #93c5fd;
  --h2: #ffffff;
  --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

body[data-theme="light"] {
  --bg: #f3f4f6;
  --bg-gradient-start: #ffffff;
  --bg-gradient-end: #eef2ff;
  --card: rgba(255, 255, 255, 0.96);
  --text: #0f172a;
  --muted: #475569;
  --accent: #0f766e;
  --border: #dbe3f0;
  --link: #1d4ed8;
  --h2: #0b1220;
  --card-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: linear-gradient(180deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
  color: var(--text);
  transition: background-color .28s ease, color .28s ease;
}

.container {
  max-width: 920px;
  margin: 28px auto;
  padding: 0 16px 40px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 20px;
  margin-bottom: 14px;
  box-shadow: var(--card-shadow);
  transition: background-color .28s ease, border-color .28s ease, transform .2s ease;
}

.card:hover { transform: translateY(-1px); }

.hero {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.hero-actions {
  --control-height: 42px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}


.lang-toggle {
  display: inline-flex;
  align-items: stretch;
  height: var(--control-height);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: transparent;
}

.lang-btn {
  border: none;
  background: transparent;
  color: var(--text);
  height: var(--control-height);
  min-height: var(--control-height);
  padding: 0 12px;
  line-height: 1;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  min-width: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.lang-btn + .lang-btn {
  border-left: 1px solid var(--border);
}

.lang-btn.active {
  background: rgba(148, 163, 184, 0.2);
}

.pdf-btn {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  border-radius: 10px;
  height: var(--control-height);
  min-height: var(--control-height);
  padding: 0 13px;
  line-height: 1;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color .2s ease, border-color .2s ease;
}

.pdf-btn:hover {
  background: rgba(148, 163, 184, 0.12);
}

.theme-toggle {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  border-radius: 10px;
  height: var(--control-height);
  min-height: var(--control-height);
  padding: 0 13px;
  line-height: 1;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.theme-toggle:hover {
  background: rgba(148, 163, 184, 0.12);
}

h1, h2, h3 { margin: 0 0 10px; }
h1 {
  font-size: 34px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
h2 { font-size: 20px; color: var(--h2); }
h3 { font-size: 16px; }

.role { color: var(--accent); margin: 0 0 6px; font-weight: 600; }
.muted { color: var(--muted); margin: 0; }

.contacts {
  display: grid;
  gap: 6px;
  text-align: right;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

ul { margin: 0; padding-left: 18px; }
li { margin: 7px 0; }

.footer {
  text-align: center;
  color: var(--muted);
  margin-top: 10px;
}

@media (max-width: 900px) {
  .container { padding: 0 14px 34px; }
  h1 { font-size: 30px; }
}

@media (max-width: 760px) {
  .container { margin: 16px auto; padding: 0 12px 28px; }
  .hero { flex-direction: column; gap: 10px; }
  .contacts {
    text-align: left;
    width: 100%;
    gap: 8px;
  }
  .grid { grid-template-columns: 1fr; }
  .hero-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
    position: sticky;
    top: 8px;
    z-index: 10;
  }
  
.lang-toggle {
  display: inline-flex;
  align-items: stretch;
  height: var(--control-height);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: transparent;
}

.lang-btn {
  border: none;
  background: transparent;
  color: var(--text);
  height: var(--control-height);
  min-height: var(--control-height);
  padding: 0 12px;
  line-height: 1;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  min-width: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.lang-btn + .lang-btn {
  border-left: 1px solid var(--border);
}

.lang-btn.active {
  background: rgba(148, 163, 184, 0.2);
}

.pdf-btn {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  border-radius: 10px;
  height: var(--control-height);
  min-height: var(--control-height);
  padding: 0 13px;
  line-height: 1;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color .2s ease, border-color .2s ease;
}

.pdf-btn:hover {
  background: rgba(148, 163, 184, 0.12);
}

.theme-toggle {
    background: var(--card);
    backdrop-filter: blur(4px);
  }
  .card {
    border-radius: 14px;
    padding: 16px 14px;
    margin-bottom: 10px;
  }
  h1 { font-size: 28px; }
  h2 { font-size: 18px; }
  p, li, a, .muted { font-size: 15px; line-height: 1.45; }
}


@media print {
  body {
    background: #fff !important;
    color: #000 !important;
  }
  .hero-actions {
    display: none !important;
  }
  .card {
    box-shadow: none !important;
    border: 1px solid #ddd !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }
  a {
    color: #000 !important;
    text-decoration: none !important;
  }
}


body:not([data-theme]),
body[data-theme="dark"] {
  --control-bg: rgba(30, 41, 59, 0.85);
  --control-border: #334155;
  --control-shadow: 0 4px 14px rgba(2, 6, 23, 0.45);
}

body[data-theme="light"] {
  --control-bg: rgba(255, 255, 255, 0.95);
  --control-border: #cbd5e1;
  --control-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
}

.hero-actions .lang-toggle,
.hero-actions .pdf-btn,
.hero-actions .theme-toggle {
  background: var(--control-bg);
  border-color: var(--control-border);
  box-shadow: var(--control-shadow);
}

.hero-actions .lang-btn.active {
  background: rgba(56, 189, 248, 0.28);
}

.hero-actions .pdf-btn:hover,
.hero-actions .theme-toggle:hover,
.hero-actions .lang-btn:hover {
  background: rgba(148, 163, 184, 0.22);
}

.hero-actions .pdf-btn:active,
.hero-actions .theme-toggle:active,
.hero-actions .lang-btn:active {
  transform: translateY(1px);
}
