  :root {
    --bg:       #ffffff;
    --bg2:      #f7f8fa;
    --bg3:      #eef1f5;
    --surface:  #e8ecf2;
    --border:   #d1d7e0;
    --blue:     #1a56db;
    --blue-dim: rgba(26,86,219,0.08);
    --red:      #dc2626;
    --green:    #16a34a;
    --text:     #111827;
    --text-dim: #374151;
    --text-muted: #6b7280;
    --radius:   6px;
  }

  * { margin: 0; padding: 0; box-sizing: border-box; }
  html { scroll-behavior: smooth; overflow-x: hidden; }

  body {
    background: var(--bg);
    color: var(--text);
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 15px;
    line-height: 1.7;
    overflow-x: hidden;
    width: 100%;
  }

  ::-webkit-scrollbar { width: 4px; }
  ::-webkit-scrollbar-track { background: var(--bg3); }
  ::-webkit-scrollbar-thumb { background: var(--blue); border-radius: 2px; }

  /* ── HEADER ── */
  header {
    position: relative;
    padding: 80px 40px 60px;
    border-bottom: 1px solid var(--border);
    overflow: hidden;
    background: var(--bg);
    width: 100%;
  }

  header::before {
    content: '';
    position: absolute;
    top: -120px; right: -120px;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(26,86,219,0.06) 0%, transparent 70%);
    pointer-events: none;
  }

  .header-flag {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--blue);
    margin-bottom: 20px;
    opacity: 0;
    animation: fadeUp 0.6s 0.1s forwards;
  }

  h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(38px, 6vw, 72px);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -1px;
    color: var(--text);
    opacity: 0;
    animation: fadeUp 0.6s 0.2s forwards;
  }

  h1 em {
    font-style: normal;
    color: var(--blue);
  }

  .header-sub {
    margin-top: 16px;
    font-size: 16px;
    color: var(--text-muted);
    max-width: 560px;
    opacity: 0;
    animation: fadeUp 0.6s 0.35s forwards;
  }

  .header-meta {
    margin-top: 28px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeUp 0.6s 0.45s forwards;
    max-width: 100%;
  }

  .badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 12px;
    color: var(--text-muted);
    font-family: 'IBM Plex Mono', monospace;
    letter-spacing: 0.5px;
    background: var(--bg2);
  }

  .badge .dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--green);
    animation: pulse 2s infinite;
  }

  @keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
  }

  /* ── LAYOUT ── */
  .layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
  }

  /* ── SIDEBAR ── */
  aside {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    border-right: 1px solid var(--border);
    padding: 32px 0;
    background: var(--bg);
    min-width: 0;
  }

  aside::-webkit-scrollbar { width: 2px; }

  .nav-section { margin-bottom: 8px; }

  .nav-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 9px;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 12px 28px 6px;
  }

  .nav-link {
    display: block;
    padding: 7px 28px;
    color: var(--text-dim);
    text-decoration: none;
    font-size: 13px;
    border-left: 2px solid transparent;
    transition: all 0.2s;
  }

  .nav-link:hover, .nav-link.active {
    color: var(--blue);
    border-left-color: var(--blue);
    background: var(--blue-dim);
  }

  /* ── MAIN ── */
  main {
    padding: 48px 56px 120px;
    max-width: 780px;
    background: var(--bg);
    min-width: 0;
    width: 100%;
  }

  /* ── SECTIONS ── */
  .section {
    margin-bottom: 80px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s, transform 0.5s;
  }

  .section.visible {
    opacity: 1;
    transform: none;
  }

  .section-number {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    color: var(--blue);
    letter-spacing: 2px;
    margin-bottom: 8px;
    opacity: 0.7;
  }

  h2 {
    font-family: 'Playfair Display', serif;
    font-size: 32px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 24px;
    line-height: 1.2;
  }

  h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin: 28px 0 12px;
  }

  h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--blue);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 20px 0 8px;
  }

  p { color: var(--text-dim); margin-bottom: 14px; }

  /* Ссылки — синие */
  a { color: var(--blue); text-decoration: none; }
  a:hover { text-decoration: underline; }

  /* Выделенный текст (strong) — красный */
  strong { color: var(--red); font-weight: 600; }

  /* ── CARDS ── */
  .card-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 20px 0;
  }

  .card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  }

  .card:hover {
    border-color: var(--blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(26,86,219,0.08);
  }

  .card-icon { font-size: 24px; margin-bottom: 12px; }
  .card h3 { margin: 0 0 8px; font-size: 15px; }
  .card p { font-size: 13px; margin: 0; }

  /* ── STEPS ── */
  .steps { margin: 20px 0; }

  .step {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
  }

  .step:last-child { border-bottom: none; }

  .step-num {
    flex-shrink: 0;
    width: 32px; height: 32px;
    border: 2px solid var(--blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    color: var(--blue);
    font-weight: 600;
    margin-top: 2px;
  }

  .step-content h3 { margin-top: 0; font-size: 15px; }
  .step-content p { font-size: 14px; }

  /* ── TABLE ── */
  .tax-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 13px;
  }

  .tax-table th {
    background: var(--bg3);
    padding: 10px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--text);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid var(--border);
  }

  .tax-table td {
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text-dim);
  }

  .tax-table tr:hover td { background: var(--bg2); }

  .rate-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 100px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    font-weight: 600;
  }

  .rate-low  { background: rgba(22,163,74,0.1);   color: #16a34a; }
  .rate-mid  { background: rgba(26,86,219,0.1);   color: var(--blue); }
  .rate-high { background: rgba(220,38,38,0.1);   color: var(--red); }

  /* ── CALLOUTS ── */
  .callout {
    padding: 16px 20px;
    border-radius: var(--radius);
    margin: 20px 0;
    border-left: 3px solid;
    font-size: 14px;
    line-height: 1.6;
  }

  .callout strong { display: block; margin-bottom: 4px; }

  .callout-warn    { background: rgba(217,119,6,0.07);  border-color: #d97706; color: var(--text-dim); }
  .callout-info    { background: rgba(26,86,219,0.06);  border-color: var(--blue); color: var(--text-dim); }
  .callout-danger  { background: rgba(220,38,38,0.06);  border-color: var(--red); color: var(--text-dim); }
  .callout-success { background: rgba(22,163,74,0.06);  border-color: var(--green); color: var(--text-dim); }

  /* Table wrapper for horizontal scroll on mobile */
  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 20px 0;
    border-radius: var(--radius);
  }

  .table-wrap .tax-table { margin: 0; }

  /* Specialist header wraps on narrow screens */
  .specialist-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 14px;
    gap: 12px;
    flex-wrap: wrap;
  }

  /* ── SPECIALIST ── */
  .specialist {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    margin: 20px 0;
    transition: border-color 0.2s, box-shadow 0.2s;
  }

  .specialist:hover {
    border-color: var(--blue);
    box-shadow: 0 4px 20px rgba(26,86,219,0.08);
  }

  .specialist-name {
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
  }

  .specialist-city {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
    font-family: 'IBM Plex Mono', monospace;
  }

  .specialist-promo {
    padding: 5px 14px;
    background: var(--blue-dim);
    border: 1px solid rgba(26,86,219,0.25);
    border-radius: 100px;
    font-size: 12px;
    color: var(--blue);
    font-family: 'IBM Plex Mono', monospace;
    white-space: nowrap;
    font-weight: 600;
  }

  .specialist-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
  }

  .tag {
    padding: 3px 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 11px;
    color: var(--text-dim);
  }

  /* ── BUTTONS ── */
  .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    padding: 10px 22px;
    background: var(--blue);
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--radius);
    text-decoration: none;
    transition: opacity 0.2s, transform 0.2s;
    border: none;
    cursor: pointer;
  }

  .btn:hover {
    opacity: 0.88;
    transform: translateY(-1px);
    text-decoration: none;
    color: #ffffff;
  }

  .btn-ghost {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-dim);
  }

  .btn-ghost:hover {
    border-color: var(--blue);
    color: var(--blue);
    background: var(--blue-dim);
  }

  /* ── COMPARISON ── */
  .compare-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 20px 0;
  }

  .compare-col {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
  }

  .compare-col h3 {
    margin-top: 0;
    font-family: 'Playfair Display', serif;
    font-size: 18px;
  }

  .compare-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 13px;
    color: var(--text-dim);
  }

  .compare-item::before {
    content: '✓';
    color: var(--green);
    flex-shrink: 0;
    margin-top: 1px;
    font-size: 12px;
    font-weight: 700;
  }

  .compare-item.minus::before {
    content: '×';
    color: var(--red);
  }

  /* ── DIVIDER ── */
  .divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 40px 0;
  }

  /* ── CODE ── */
  code {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    background: var(--bg3);
    border: 1px solid var(--border);
    padding: 2px 7px;
    border-radius: 3px;
    color: var(--red);
  }

  pre {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    overflow-x: auto;
    font-size: 12px;
    color: var(--text-dim);
    line-height: 1.6;
  }

  /* ── DEDUCTION GRID ── */
  .deduction-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 16px 0;
  }

  .deduction-item {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 18px;
    font-size: 13px;
    transition: border-color 0.2s;
  }

  .deduction-item:hover { border-color: var(--blue); }

  .deduction-item .deduction-title {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
  }

  .deduction-item .deduction-note {
    color: var(--text-muted);
    font-size: 12px;
  }

  /* ── STATS ── */
  .stats-row {
    display: flex;
    gap: 0;
    margin: 32px 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
  }

  .stat {
    flex: 1;
    padding: 24px;
    border-right: 1px solid var(--border);
    text-align: center;
    background: var(--bg2);
  }

  .stat:last-child { border-right: none; }

  .stat-value {
    font-family: 'Playfair Display', serif;
    font-size: 32px;
    font-weight: 900;
    color: var(--blue);
    line-height: 1;
  }

  .stat-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 6px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'IBM Plex Mono', monospace;
  }

  /* ── TIMELINE ── */
  .timeline { margin: 20px 0; }

  .tl-item {
    display: flex;
    gap: 20px;
    margin-bottom: 8px;
  }

  .tl-time {
    flex-shrink: 0;
    width: 100px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    color: var(--blue);
    padding-top: 3px;
    text-align: right;
    font-weight: 500;
  }

  .tl-line {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .tl-dot {
    width: 8px; height: 8px;
    border: 2px solid var(--blue);
    background: var(--blue);
    border-radius: 50%;
    margin-top: 5px;
  }

  .tl-connector {
    width: 1px;
    flex: 1;
    background: var(--border);
    margin: 4px 0;
  }

  .tl-content {
    padding-bottom: 24px;
    font-size: 14px;
    color: var(--text-dim);
  }

  .tl-content strong {
    display: block;
    margin-bottom: 3px;
    font-size: 14px;
  }

  /* ── FOOTER ── */
  footer {
    background: var(--bg2);
    border-top: 2px solid var(--border);
    padding: 40px 56px;
    margin-left: 260px;
  }

  .footer-inner {
    max-width: 780px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .footer-text { font-size: 13px; color: var(--text-muted); }

  .footer-links { display: flex; gap: 20px; }

  .footer-links a {
    font-size: 13px;
    color: var(--text-dim);
    text-decoration: none;
    transition: color 0.2s;
  }

  .footer-links a:hover { color: var(--blue); }

  /* ── ANIMATIONS ── */
  @keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  /* ── MOBILE ── */
  @media (max-width: 900px) {
    .layout {
      grid-template-columns: 1fr;
      max-width: 100vw;
      overflow-x: hidden;
    }
    aside { display: none; }

    header {
      padding: 40px 20px 32px;
      max-width: 100vw;
    }

    main {
      padding: 24px 16px 80px;
      max-width: 100vw;
      width: 100%;
      overflow-x: hidden;
    }

    footer {
      margin-left: 0;
      padding: 28px 20px;
      max-width: 100vw;
    }

    .footer-inner { flex-direction: column; gap: 16px; text-align: center; }

    /* Grids → single column */
    .card-grid,
    .compare-grid,
    .deduction-grid { grid-template-columns: 1fr; }

    /* Stats strip wraps into 2×2 */
    .stats-row { flex-wrap: wrap; border-radius: var(--radius); }
    .stat { min-width: 45%; flex: 1 1 45%; border-right: none; border-bottom: 1px solid var(--border); }
    .stat:nth-child(odd) { border-right: 1px solid var(--border); }
    .stat:last-child { border-bottom: none; }

    /* Tables: scrollable */
    .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .tax-table { font-size: 12px; min-width: 480px; }
    .tax-table th, .tax-table td { padding: 8px 10px; }

    /* Specialist card */
    .specialist-header { flex-direction: column; gap: 10px; align-items: flex-start; }
    .specialist-promo { align-self: flex-start; }
    .specialist { padding: 18px 14px; }

    /* Steps */
    .step { gap: 14px; }

    /* Timeline */
    .tl-item { gap: 12px; }
    .tl-time { width: 70px; font-size: 10px; }

    /* Typography */
    h1 { font-size: clamp(26px, 7vw, 44px); }
    h2 { font-size: 22px; }
    h3 { font-size: 15px; }

    /* Buttons */
    .btn { width: 100%; justify-content: center; box-sizing: border-box; }

    /* Code */
    pre { font-size: 11px; padding: 10px 12px; overflow-x: auto; }
    code { font-size: 11px; word-break: break-all; }

    /* Callouts */
    .callout { padding: 14px 14px; font-size: 13px; }

    /* Nav sidebar mobile */
    .nav-label { padding: 10px 20px 4px; }
    .nav-link { padding: 8px 20px; font-size: 14px; }

    /* Header meta badges wrap */
    .header-meta { gap: 10px; }
    .badge { font-size: 11px; padding: 5px 10px; }

    /* Section number */
    .section-number { font-size: 10px; }

    /* Specialist tags */
    .specialist-tags { gap: 6px; }
    .tag { font-size: 10px; padding: 2px 8px; }
  }

  /* Extra small */
  @media (max-width: 480px) {
    main { padding: 18px 12px 80px; }
    header { padding: 28px 14px 24px; }
    .stat-value { font-size: 22px; }
    .specialist-name { font-size: 17px; }
    .deduction-grid, .card-grid { gap: 10px; }
    .step-num { width: 28px; height: 28px; font-size: 11px; }
    h2 { font-size: 20px; }
    h3 { font-size: 14px; }
    .callout { font-size: 12px; padding: 12px 12px; }
    .tax-table { font-size: 11px; }
    .header-sub { font-size: 14px; }
  }


  .mobile-nav-btn {
    display: none;
    position: fixed;
    bottom: 24px; right: 24px;
    width: 52px; height: 52px;
    background: var(--blue);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    z-index: 1001;
    box-shadow: 0 4px 20px rgba(26,86,219,0.25);
    color: #ffffff;
  }

  @media (max-width: 900px) {
    .mobile-nav-btn { display: flex; align-items: center; justify-content: center; }

    aside {
      display: block !important;
      position: fixed;
      top: 0; left: 0;
      width: 280px;
      height: 100vh;
      background: var(--bg);
      border-right: 1px solid var(--border);
      z-index: 1000;
      transform: translateX(-100%);
      transition: transform 0.3s ease;
      overflow-y: auto;
      padding-top: 56px;
    }

    aside.open { transform: translateX(0); }

    .nav-overlay {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.35);
      z-index: 999;
    }

    .nav-overlay.open { display: block; }

    .nav-close-btn {
      display: flex;
      position: absolute;
      top: 14px; right: 14px;
      width: 36px; height: 36px;
      align-items: center;
      justify-content: center;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 50%;
      cursor: pointer;
      font-size: 16px;
      color: var(--text-dim);
    }
  }

  @media (min-width: 901px) {
    .nav-overlay { display: none !important; }
    .nav-close-btn { display: none !important; }
  }
  /* ── UTILITY CLASSES ── */
  .list-body  { padding-left:20px; color:var(--text-dim); font-size:14px; line-height:2.5; }
  .list-body2 { padding-left:20px; color:var(--text-dim); font-size:14px; line-height:2.2; }
  .mb-12      { margin-bottom:12px; }
  .note-sm    { font-size:13px; color:var(--text-muted); }
  .note-xs    { font-size:12px; color:var(--text-muted); }
  .text-sm    { font-size:14px; }
  .code-note  { font-size:13px; line-height:1.8; margin-top:8px; color:var(--text-dim); white-space:pre-wrap; }


/* ── LANGUAGE SWITCHER ── */
.lang-switcher {
  display: flex;
  gap: 6px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  font-family: 'IBM Plex Mono', monospace;
  color: var(--text-muted);
  text-decoration: none;
  background: var(--bg2);
  transition: all 0.2s;
  letter-spacing: 0.5px;
}

.lang-btn:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: var(--blue-dim);
  text-decoration: none;
}

.lang-btn.lang-active {
  background: var(--blue);
  color: #ffffff;
  border-color: var(--blue);
}

@media (max-width: 480px) {
  .lang-btn { padding: 4px 10px; font-size: 11px; }
  .lang-switcher { gap: 5px; margin-bottom: 18px; }
}
