/* ===== RESET & ПЕРЕМЕННЫЕ ===== */
:root {
  --bg: #f4f8fc;
  --surface: #ffffff;
  --surface-2: #eef5fb;
  --text: #0f172a;
  --muted: #5b6475;
  --line: #d9e6f2;
  --blue: #0b5ed7;
  --blue-dark: #083f9c;
  --blue-soft: #dcecff;
  --accent: #1e88ff;
  --success: #0f9d58;
  --shadow: 0 16px 40px rgba(11, 61, 145, 0.10);
  --radius: 18px;
  --radius-sm: 12px;
  --container: 1180px;
}

* { box-sizing: border-box; }

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Segoe UI', Roboto, system-ui, -apple-system, sans-serif;
  background:
    radial-gradient(circle at top right, rgba(30,136,255,0.10), transparent 22%),
    linear-gradient(180deg, #f7fbff 0%, #eef5fb 100%);
  color: var(--text);
  line-height: 1.6;
}

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: var(--blue);
  text-decoration: none;
  font-weight: 500;
}

a:hover {
  text-decoration: underline;
  color: var(--blue-dark);
}

.container {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
}

/* ===== HEADER ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, #083f9c 0%, #0b5ed7 60%, #2d8cff 100%);
}

.site-header .nav a {
  color: #fff;
}

.site-header .logo {
  color: #fff;
}

.site-header .btn-outline {
  color: #fff;
  border-color: #fff;
}

.site-header .btn-outline:hover {
  background: rgba(255,255,255,0.1);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
  padding: 10px 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 22px;
  color: var(--blue-dark);
  text-decoration: none;
  flex-shrink: 0;
}

.logo img {
  height: 40px;
  width: auto;
  display: block;
}

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
  flex: 1 1 auto;
}

.nav a {
  color: var(--text);
  font-weight: 600;
  font-size: 15px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-2px);
  text-decoration: none;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--blue-dark), var(--accent));
  box-shadow: 0 12px 28px rgba(11, 94, 215, 0.22);
}

.btn-secondary {
  color: var(--blue-dark);
  background: #fff;
  border: 1px solid var(--line);
}

.btn-outline {
  color: var(--blue-dark);
  background: transparent;
  border: 1.5px solid var(--blue-dark);
}

.btn-large {
  min-height: 56px;
  padding: 0 32px;
  font-size: 16px;
}

/* ===== HERO ===== */
.hero {
  padding: 48px 0 20px;
}

.hero-grid-custom {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 30px;
  align-items: start;
}

.hero-content {
  background: linear-gradient(135deg, #ffffff 0%, #f5faff 100%);
  border: 1px solid #dbe8f5;
  border-radius: 28px;
  padding: 32px;
  box-shadow: var(--shadow);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--blue-soft);
  color: var(--blue-dark);
  border: 1px solid #c8ddfb;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 18px;
}

h1 {
  margin: 0 0 16px;
  font-size: clamp(28px, 4.5vw, 44px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--blue-dark);
}

.lead {
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 18px;
}

.section-subtitle {
  font-size: 24px;
  margin: 28px 0 16px;
  color: var(--blue-dark);
}

.hero-list {
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-actions--center {
  display: flex;
  justify-content: center;
}

.hero-visual {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.hero-banner {
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(11, 61, 145, 0.10);
}

.hero-banner img {
  width: 100%;
  height: auto;
  display: block;
}

.hero-mobile-login {
  display: none;
}

.hero-table-wrapper {
  background: #fff;
  border-radius: 20px;
  padding: 20px;
  border: 1px solid var(--line);
  box-shadow: 0 8px 20px rgba(0,0,0,0.02);
}

.table-title {
  margin: 0 0 16px;
  font-size: 20px;
  color: var(--blue-dark);
}

.table-mini-wrap {
  overflow-x: auto;
}

.mini-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.mini-table th {
  text-align: left;
  padding: 12px 8px 8px 0;
  border-bottom: 2px solid var(--line);
  color: var(--blue-dark);
  font-weight: 700;
}

.mini-table td {
  padding: 10px 8px 10px 0;
  border-bottom: 1px solid var(--line);
}

.table-note {
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
}

/* ===== СЕКЦИИ ===== */
.section {
  padding: 5px 0;
}

.section-title {
  margin: 0 0 12px;
  font-size: 34px;
  line-height: 1.2;
  color: var(--blue-dark);
}

.section-desc {
  margin: 0 0 28px;
  color: var(--muted);
  max-width: 850px;
  font-size: 17px;
}

.grid-3,
.grid-2 {
  display: grid;
  gap: 24px;
}

.grid-3 {
  grid-template-columns: repeat(3,1fr);
}

.grid-2 {
  grid-template-columns: repeat(2,1fr);
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 24px rgba(11, 61, 145, 0.04);
  padding: 26px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.card h3 {
  margin: 0 0 12px;
  font-size: 22px;
  color: var(--blue-dark);
}

/* ===== БЛОКИ ИНСТРУКЦИЙ ===== */
.instruction-list {
  display: grid;
  gap: 24px;
}

.instruction-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 22px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 24px rgba(11, 61, 145, 0.04);
  padding: 24px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.instruction-card--landscape {
  grid-template-columns: minmax(0, 1fr) 420px;
}

.instruction-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.instruction-text h3 {
  margin: 0 0 12px;
  font-size: 22px;
  color: var(--blue-dark);
}

.instruction-text p {
  margin: 0 0 14px;
}

.instruction-text p:last-child {
  margin-bottom: 0;
}

.instruction-image {
  width: 100%;
  order: 0;
}

.instruction-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  border-radius: 16px;
  border: none;
  background: transparent;
  object-fit: contain;
}

/* ===== СПИСКИ ===== */
.check-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 34px;
  margin-bottom: 14px;
  color: var(--text);
}

.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #dff5e9;
  color: var(--success);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}

/* ===== TOC ===== */
.toc-section {
  background: #e7f0fe;
  padding: 20px 0;
}

.toc-card {
  background: #ffffffdd;
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.toc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
}

.toc-title {
  font-size: 28px;
  margin: 0;
  color: var(--blue-dark);
  display: flex;
  align-items: center;
  gap: 10px;
}

.toc-toggle {
  font-size: 24px;
  color: var(--blue);
  transition: transform 0.2s;
}

.toc-content {
  margin-top: 20px;
}

.toc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px,1fr));
  gap: 12px 30px;
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc-list li {
  margin-bottom: 12px;
  font-weight: 500;
}

.toc-list ul {
  list-style: none;
  padding-left: 20px;
  margin-top: 8px;
}

.toc-list ul li {
  font-weight: 400;
  font-size: 15px;
}

/* ===== FAQ ===== */
.faq {
  display: grid;
  gap: 14px;
}

.faq-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  background: #fff;
  border: none;
  text-align: left;
  padding: 18px 24px;
  font-size: 18px;
  font-weight: 700;
  color: var(--blue-dark);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-question::after {
  content: "▼";
  font-size: 14px;
  color: var(--blue);
  transition: transform 0.2s;
}

.faq-item.active .faq-question::after {
  transform: rotate(180deg);
}

.faq-answer {
  display: none;
  padding: 0 24px 20px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.faq-item.active .faq-answer {
  display: block;
}

/* ===== FOOTER ===== */
.footer {
  background: linear-gradient(135deg, #083f9c 0%, #0b5ed7 60%, #2d8cff 100%);
  margin-top: 20px;
  color: #f8fbff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);
}

.footer h3 {
  color: #fff;
}

.footer p,
.footer a,
.footer li {
  color: rgba(255,255,255,0.85);
}

.footer a:hover {
  color: #fff;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 30px;
  padding: 40px 0 20px;
}

.footer h3 {
  margin: 0 0 16px;
  font-size: 18px;
  color: #ffffff;
}

.footer p,
.footer li,
.footer a {
  color: rgba(255,255,255,0.85);
}

.footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.app-version {
  margin-top: 20px;
  background: rgba(255,255,255,0.12);
  padding: 12px 16px;
  border-radius: 30px;
  font-weight: 500;
  color: #ffffff;
  border: 1px solid rgba(255,255,255,0.16);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.2);
  padding: 18px 0 28px;
  color: rgba(255,255,255,0.72);
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.internal-link {
  font-weight: 600;
  border-bottom: 1px dashed var(--blue);
}

.text-center {
  text-align: center;
  margin-top: 30px;
}

/* ===== АДАПТИВ ===== */
@media (max-width: 1024px) {
  .hero-grid-custom,
  .grid-3,
  .grid-2,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .nav {
    display: none;
  }

  .site-header-inner {
    gap: 14px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .instruction-card {
    grid-template-columns: minmax(0, 1fr) 240px;
    align-items: center;
  }

  .instruction-card--landscape {
    grid-template-columns: minmax(0, 1fr) 320px;
  }

  .instruction-image {
    order: 0;
  }
}

@media (max-width: 768px) {
  .container {
    width: min(100%, calc(100% - 20px));
  }

  .site-header-inner {
    min-height: auto;
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
  }

  .logo {
    min-width: 0;
  }

  .logo img {
    height: 30px;
  }

  .header-actions {
    display: flex;
    gap: 6px;
    margin-left: auto;
  }

  .header-actions .btn {
    min-height: 40px;
    padding: 0 14px;
    font-size: 14px;
    width: auto;
  }

  .hero-actions--center .btn {
    width: 100%;
    max-width: 100%;
  }

  .hero {
    padding-top: 16px;
  }

  .hero-grid-custom {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  .hero-visual,
  .hero-content {
    width: 100%;
    max-width: 100%;
  }

  .hero-banner,
  .hero-mobile-login,
  .hero-table-wrapper {
    width: 100%;
    max-width: 100%;
  }

  .hero-visual {
    order: 1;
    gap: 14px;
  }

  .hero-content {
    order: 2;
    padding: 20px;
    border-radius: 22px;
  }

  .hero-banner img {
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
  }

  .hero-mobile-login {
    display: block;
    width: 100%;
    margin: 14px 0;
  }

  .hero-mobile-login .btn {
    width: 100%;
    display: flex;
  }
  
  .hero-actions:not(.hero-actions--center) {
    display: none;
  }

  h1 {
    font-size: 28px;
  }

  .lead {
    font-size: 16px;
  }

  .section-title {
    font-size: 28px;
  }

  .toc-card {
    padding: 18px;
  }

  .toc-title {
    font-size: 22px;
  }

  .hero-table-wrapper {
    padding: 16px;
  }

  .mini-table {
    font-size: 14px;
  }

  .instruction-card {
    grid-template-columns: minmax(0, 1fr) 150px;
    gap: 14px;
    padding: 18px;
    align-items: center;
  }

  .instruction-card--landscape {
    grid-template-columns: minmax(0, 1fr) 220px;
  }

  .instruction-image {
    order: 0;
  }

  .instruction-text h3 {
    font-size: 18px;
    margin-bottom: 10px;
  }

  .instruction-text p {
    margin: 0 0 10px;
    font-size: 14px;
    line-height: 1.45;
  }

  .instruction-image img {
    width: 100%;
    height: auto;
    max-height: 180px;
    object-fit: contain;
  }

  .footer-bottom {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .instruction-card {
    grid-template-columns: minmax(0, 1fr) 130px;
    gap: 12px;
    padding: 16px;
  }

  .instruction-text h3 {
    font-size: 16px;
  }

  .instruction-text p {
    font-size: 13px;
    line-height: 1.4;
  }

  .instruction-image img {
    max-height: 150px;
  }

  .hero-actions--center .btn {
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 310px) {
  .container {
    width: calc(100% - 12px);
  }

  .site-header {
    overflow: hidden;
  }

  .site-header-inner {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    min-height: auto;
    padding: 8px 0;
    gap: 0;
  }

  .header-actions,
  .nav {
    display: none;
  }

  .logo {
    display: flex;
    align-items: center;
    min-width: 0;
    max-width: 100%;
    gap: 6px;
  }

  .logo img {
    height: 22px;
    width: auto;
    max-width: 100%;
  }

  .hero-grid-custom {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .hero-visual,
  .hero-content,
  .hero-banner,
  .hero-mobile-login,
  .hero-table-wrapper {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .hero-banner img {
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
  }

  .hero-mobile-login {
    display: block;
    width: 100%;
    margin: 12px 0;
  }

  .hero-mobile-login .btn {
    width: 100%;
    min-height: 44px;
    font-size: 14px;
    padding: 0 12px;
  }

  .hero-content,
  .hero-table-wrapper,
  .card,
  .instruction-card,
  .toc-card {
    padding: 14px;
  }

  .hero-actions--center .btn {
    width: 100%;
    max-width: 100%;
  }

  .instruction-card {
    grid-template-columns: minmax(0, 1fr) 110px;
    gap: 10px;
  }

  .instruction-card--landscape {
    grid-template-columns: minmax(0, 1fr) 140px;
  }

  .instruction-card--landscape {
    grid-template-columns: minmax(0, 1fr) 180px;
  }

  .instruction-image {
    order: 0;
  }

  .instruction-image img {
    max-height: 130px;
  }

  .table-mini-wrap {
    overflow-x: hidden;
  }

  .mini-table {
    width: 100%;
    font-size: 13px;
    table-layout: fixed;
  }

  .mini-table th,
  .mini-table td {
    word-break: break-word;
    padding-right: 4px;
  }
}