/* Налоговый гайд для иностранных инвесторов: /investoram/tax-guide (EN) и
   /investoram/nalogi-dlya-inostrannyh-investorov (RU). Подключается после
   objavleniya.css: шапка, подвал и тёмная тема — оттуда, здесь только блоки
   самого гайда. Всё внутри .tg, чтобы не задеть остальной сайт.
   Страницы собирает zaman-content-plan/build_tax_guide_pages.py из черновиков. */

.tg {
  --tg-blue: var(--zaman-green);
  --tg-head: #052E80;
  --tg-title: #052E80;
  --tg-zero: #0B7A4B;
  --tg-wash: var(--zaman-green-wash);
  --tg-row: #FAFBFD;
  --tg-chip: var(--zaman-green-soft);
  max-width: 860px; margin: 0 auto; padding: 0 20px 72px;
  font-size: 16px; line-height: 1.6; color: var(--fg-1);
}
body.dark .tg {
  --tg-blue: #7BA3F2;
  --tg-head: #1B315E;
  --tg-title: #9DBBF5;
  --tg-zero: #4CC38A;
  --tg-row: #151B1A;
}
.tg a { color: var(--tg-blue); text-decoration: underline; text-underline-offset: 2px; }
.tg p { margin: 0 0 14px; }
.tg ul, .tg ol { margin: 0 0 14px; padding-left: 22px; }
.tg li { margin-bottom: 6px; }
.tg b { font-weight: 700; }
.tg .law { font-size: 12.5px; color: var(--fg-2); font-weight: 600; white-space: nowrap; }

/* hero */
.tg-hero { padding: 40px 0 6px; }
.tg-langs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.tg-langs a, .tg-langs span {
  font-size: 13px; font-weight: 600; text-decoration: none; padding: 5px 12px;
  border-radius: 999px; border: 1px solid var(--border); color: var(--fg-2);
}
.tg-langs span { background: var(--tg-wash); color: var(--fg-1); border-color: transparent; }
.tg-hint {
  display: none; margin: 0 0 18px; padding: 10px 14px; border-radius: 12px;
  background: var(--tg-wash); font-size: 14px;
}
.tg-hint.on { display: block; }
.tg .eyebrow { margin-bottom: 12px; }
.tg h1 {
  font-family: var(--font-display); font-size: clamp(30px, 4vw, 42px); line-height: 1.1;
  letter-spacing: -0.03em; font-weight: 700; margin: 0 0 16px;
}
.tg .lead { font-size: 18px; color: var(--fg-1); opacity: .86; margin: 0 0 10px; }
.tg .meta { font-size: 13px; color: var(--fg-2); }
.tg-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 0; }
.tg-actions .pill { height: 42px; font-size: 14px; text-decoration: none; }

/* key figures */
.tg .glance { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 28px 0 8px; }
.tg .g { background: var(--tg-wash); border-radius: 14px; padding: 16px; }
.tg .g .n { font-size: 30px; font-weight: 800; color: var(--tg-blue); line-height: 1; }
.tg .g .n.z { color: var(--tg-zero); }
.tg .g .t { font-weight: 700; margin: 8px 0 4px; font-size: 14.5px; line-height: 1.3; }
.tg .g .d { font-size: 13px; color: var(--fg-2); line-height: 1.45; }

/* contents */
.tg .toc { background: var(--ink-100); border-radius: 14px; padding: 16px 20px; margin: 26px 0 0; }
.tg .toc b { display: block; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--fg-2); margin-bottom: 6px; }
.tg .toc ol { margin: 0; columns: 2; column-gap: 28px; font-size: 14.5px; }
.tg .toc a { text-decoration: none; }

/* headings */
.tg h2 {
  font-family: var(--font-display); font-size: 26px; line-height: 1.2; letter-spacing: -0.02em;
  margin: 52px 0 14px; font-weight: 700; color: var(--tg-title); scroll-margin-top: 90px;
}
.tg h2 .n { color: var(--fg-3); font-weight: 700; margin-right: 6px; }
.tg h3 { font-size: 18px; margin: 26px 0 8px; font-weight: 800; }

/* tables: wide ones scroll sideways on phones instead of squeezing */
.tg .tw { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 8px 0 16px; }
.tg table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14.5px; line-height: 1.45; margin: 0; }
.tg th, .tg td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.tg thead th { background: var(--tg-head); color: #fff; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; font-weight: 700; border: 0; }
.tg thead th:first-child { border-radius: 10px 0 0 0; }
.tg thead th:last-child { border-radius: 0 10px 0 0; }
.tg td.rate { font-weight: 800; color: var(--tg-blue); }
.tg td.rate.z { color: var(--tg-zero); }
.tg td.rate small { display: block; font-weight: 600; color: var(--fg-2); font-size: 12px; margin-top: 2px; }
.tg tbody tr:nth-child(even) td { background: var(--tg-row); }
.tg .matrix { min-width: 600px; }
.tg .matrix td:first-child { font-weight: 700; width: 46%; }
.tg .matrix th, .tg .matrix td.rate { text-align: center; }
.tg .matrix th:first-child { text-align: left; }
.tg .matrix tr.max td { background: var(--tg-head) !important; color: #fff; font-weight: 800; }
.tg .matrix tr.max td.rate { color: #fff; }
.tg .groups td.rate { width: 16%; font-size: 20px; }
.tg .fn { font-size: 13px; color: var(--fg-2); margin: -6px 0 14px; }

/* callouts, cards, examples */
.tg .callout { border-left: 5px solid var(--tg-blue); background: var(--tg-wash); padding: 14px 18px; border-radius: 0 12px 12px 0; margin: 16px 0; }
.tg .callout p:last-child, .tg .callout ul:last-child { margin-bottom: 0; }
.tg .two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 18px; }
.tg .card { border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; }
.tg .card h4 { margin: 0 0 6px; font-size: 16px; color: var(--tg-title); }
.tg .card p { font-size: 14.5px; margin-bottom: 8px; }
.tg .card .tag { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; background: var(--tg-chip); color: var(--tg-title); margin-bottom: 8px; }
.tg .calc { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; margin: 12px 0 16px; }
.tg .calc .h { background: var(--ink-100); padding: 12px 16px; font-weight: 700; font-size: 14.5px; }
.tg .calc .tw { margin: 0; }
.tg .calc td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tg .calc tr.tot td { font-weight: 800; background: var(--tg-wash) !important; }

/* FAQ */
.tg .faq details { border-bottom: 1px solid var(--border); padding: 14px 0; }
.tg .faq summary { font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.tg .faq summary::-webkit-details-marker { display: none; }
.tg .faq summary:after { content: "+"; color: var(--tg-blue); font-weight: 800; }
.tg .faq details[open] summary:after { content: "–"; }
.tg .faq details p { margin: 10px 0 0; color: var(--fg-2); }

.tg .src { font-size: 14px; }
.tg .src li { margin-bottom: 8px; }
.tg .src span { color: var(--fg-2); }

.tg .cta { background: #052E80; color: #fff; border-radius: 18px; padding: 28px; margin: 48px 0 24px; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.tg .cta h3 { margin: 0 0 6px; color: #fff; font-size: 21px; }
.tg .cta p { margin: 0; color: #DCE6FC; font-size: 15px; }
.tg .cta .btn { display: inline-block; background: #fff; color: #052E80; text-decoration: none; font-weight: 700; font-size: 14px; padding: 11px 20px; border-radius: 999px; }
body.dark .tg .cta { background: #142A57; }
.tg .disc { font-size: 12.5px; color: var(--fg-2); border-top: 1px solid var(--border); padding: 18px 0 0; margin-top: 8px; }

@media (max-width: 760px) {
  .tg { font-size: 15.5px; }
  .tg h1 { font-size: 29px; }
  .tg .lead { font-size: 16.5px; }
  .tg h2 { font-size: 22px; margin-top: 40px; }
  .tg .glance { grid-template-columns: 1fr 1fr; }
  .tg .two { grid-template-columns: 1fr; }
  .tg .toc ol { columns: 1; }
  .tg table { font-size: 13.5px; }
  .tg th, .tg td { padding: 10px; }
  /* сводная таблица на телефоне: уже, первая колонка остаётся на месте при прокрутке вбок */
  .tg .matrix { min-width: 520px; }
  .tg .matrix td:first-child { width: 38%; position: sticky; left: 0; z-index: 1; background: var(--paper); box-shadow: 1px 0 0 var(--border); }
  .tg .matrix tbody tr:nth-child(even) td:first-child { background: var(--tg-row); }
  .tg .matrix th:first-child { position: sticky; left: 0; z-index: 2; }
  .tg .matrix tr.max td:first-child { background: var(--tg-head) !important; }
  .tg .law { white-space: normal; }
  .tg .cta { padding: 22px; }
}
