/* SynthTax · статья журнала. Prefix .ar- (содержимое статьи — обычная разметка внутри .ar-prose) */

.ar-progress { position: fixed; z-index: 650; top: 0; left: 0; right: 0; height: 3px; pointer-events: none; }
.ar-progress i { display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; }

/* Head ------------------------------------------------------------------- */
.ar-head { padding: clamp(36px, 5.5vw, 80px) 0 clamp(32px, 4vw, 56px); border-bottom: var(--bw) solid var(--line); margin-bottom: clamp(32px, 4vw, 48px); }
.ar-head .crumbs { margin-bottom: clamp(28px, 4vw, 48px); }
.ar-head-in { max-width: 860px; margin-left: calc(240px + clamp(32px, 4.5vw, 64px)); }
.ar-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-bottom: 20px; font-size: 14px; color: var(--ink-3); }
.ar-title { font-family: var(--font-display); font-weight: var(--w-display); font-size: clamp(32px, 4.2vw, 56px); line-height: 1.06; letter-spacing: var(--track-display); text-wrap: balance; font-variation-settings: "opsz" var(--opsz); }
.ar-by { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 30px; padding-top: 20px; border-top: var(--bw) solid var(--line); }
.ar-by .grow { display: grid; line-height: 1.4; font-size: 14px; color: var(--ink-3); }
.ar-by .grow a { color: var(--ink); font-weight: 500; border-bottom: 1px solid var(--line-2); transition: border-color var(--t-fast), color var(--t-fast); }
.ar-by .grow a:hover { color: var(--accent-text); border-color: currentColor; }

/* Layout + table of contents -------------------------------------------- */
.ar-layout { display: grid; grid-template-columns: 240px minmax(0, 760px); gap: clamp(32px, 4.5vw, 64px); align-items: start; padding-bottom: clamp(56px, 7vw, 96px); }
.ar-toc { --ar-top: 136px; position: sticky; top: var(--ar-top); display: grid; gap: 14px; max-height: calc(100vh - var(--ar-top) - 24px); overflow: auto; scrollbar-width: none; overscroll-behavior: contain; }
.ar-toc::-webkit-scrollbar { display: none; }
.ar-toc-list { position: relative; display: grid; border-left: var(--bw) solid var(--line); }
.ar-toc-list a { display: grid; grid-template-columns: 22px minmax(0, 1fr); padding: 6px 0 6px 14px; font-size: 13.5px; line-height: 1.35; color: var(--ink-3); transition: color var(--t-fast); }
.ar-toc-list a span { font-family: var(--font-mono); font-size: 11.5px; padding-top: 1px; color: var(--ink-4); }
.ar-toc-list a:hover { color: var(--ink); }
.ar-toc-list a.is-on { color: var(--ink); }
.ar-toc-list a.is-on span { color: var(--accent-text); }
.ar-toc-ink { position: absolute; left: -1px; top: 0; width: 2px; height: 0; background: var(--ink); opacity: 0; transition: transform .4s var(--ease-out), height .4s var(--ease-out), opacity .2s; }
.ar-toc-m { display: none; }

/* Prose ------------------------------------------------------------------ */
.ar-body { min-width: 0; }
.ar-prose { font-size: 17.5px; }
.ar-prose h2, .ar-prose h3 { scroll-margin-top: 136px; }
@media (max-width: 1080px) { .ar-prose h2, .ar-prose h3 { scroll-margin-top: 104px; } }
.ar-prose > .lead:first-child { font-family: var(--font-h); font-weight: var(--w-h); font-size: clamp(21px, 2vw, 25px); line-height: 1.45; letter-spacing: var(--track-h); color: var(--ink); font-variation-settings: "opsz" var(--opsz); max-width: none; }
.ar-prose > .lead:first-child + p { margin-top: 1.4em; }
.ar-prose a[target="_blank"] { text-decoration-color: color-mix(in srgb, var(--accent-text) 45%, transparent); transition: text-decoration-color var(--t-fast); }
.ar-prose a[target="_blank"]:hover { text-decoration-color: currentColor; }
.ar-prose ol li + li { margin-top: .45em; }
.ar-prose li > ul { margin-top: .45em; }

/* Tables inside the article */
.ar-prose .table-wrap { margin-top: 1.4em; overflow-x: auto; border-top: var(--bw) solid var(--line-strong); -webkit-overflow-scrolling: touch; }
.ar-prose table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.45; }
.ar-prose th { padding: 12px 14px 10px 0; text-align: left; vertical-align: bottom; font-family: var(--font-mono); font-size: 11.5px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); border-bottom: var(--bw) solid var(--line-strong); }
.ar-prose td { padding: 12px 14px 12px 0; vertical-align: top; color: var(--ink); border-bottom: var(--bw) solid var(--line); }
.ar-prose th:last-child, .ar-prose td:last-child { padding-right: 0; }
.ar-prose tbody tr { transition: background-color var(--t-fast); }
.ar-prose tbody tr:hover { background: color-mix(in srgb, var(--surface) 80%, transparent); }
.ar-prose td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 500; }
.ar-prose tr:has(td.num) th:last-child { text-align: right; }
.ar-prose tbody tr:last-child td { border-bottom-color: var(--line-strong); }

/* «Инструменты SynthTax» — two tool cards */
.ar-prose .tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 1em; }
.ar-prose .tool-card { display: grid; gap: 8px; align-content: start; padding: 20px 22px; border: var(--bw) solid var(--line-2); background: var(--raised); color: var(--ink); text-decoration: none; transition: border-color var(--t-fast), transform .35s var(--ease-out), box-shadow .35s var(--ease-out); }
.ar-prose .tool-card:hover { border-color: var(--ink-3); transform: translateY(-2px); box-shadow: var(--shadow-pop); }
.ar-prose .tool-card h3 { margin: 0; font-family: var(--font-h); font-weight: var(--w-h); font-size: 19px; line-height: 1.3; letter-spacing: var(--track-h); scroll-margin-top: 0; }
.ar-prose .tool-card p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--ink-2); }
.ar-prose .tool-card .cta { margin-top: 6px; font-size: 15px; font-weight: 500; color: var(--accent-text); transition: transform var(--t-fast); }
.ar-prose .tool-card:hover .cta { transform: translateX(4px); }

/* «Главное» */
.ar-prose .summary { margin-top: 2.2em; padding: clamp(22px, 3vw, 32px); background: var(--raised); border: var(--bw) solid var(--line-strong); box-shadow: inset 0 0 0 5px var(--raised), inset 0 0 0 6px var(--line-2); }
.ar-prose .summary h2 { margin-top: 0; font-size: clamp(22px, 2vw, 27px); }
.ar-prose .summary > * + * { margin-top: .8em; }
.ar-prose .summary p { color: var(--ink); }

/* Sources + disclaimer */
.ar-prose .sources { margin-top: 2.4em; padding-top: 1.4em; border-top: var(--bw) solid var(--line-strong); }
.ar-prose .sources h2 { margin-top: 0; font-size: clamp(19px, 1.7vw, 22px); }
.ar-prose .sources ol { margin-top: 1em; font-size: 14.5px; line-height: 1.55; color: var(--ink-2); }
.ar-prose .sources ul { margin-top: .45em; }
.ar-prose .disclaimer { font-size: 13.5px; line-height: 1.55; color: var(--ink-3); }
.ar-prose .disclaimer:first-of-type { margin-top: 2em; padding-top: 1.2em; border-top: 1px dashed var(--line-2); }
.ar-prose .disclaimer strong { color: var(--ink-2); font-weight: 500; }

/* Inline VAT rate calculator */
.ar-calc { margin-top: 1.6em; margin-bottom: .4em; padding: clamp(18px, 2.4vw, 26px); border-radius: var(--r-3); background: var(--raised); border: var(--bw) solid var(--line-2); color: var(--ink); font-size: 15px; line-height: 1.5; }
.ar-calc-in { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.ar-range { display: grid; gap: 6px; }
.ar-range-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 14px; color: var(--ink-2); }
.ar-range output { font-family: var(--font-num); font-weight: var(--w-strong); font-size: 20px; color: var(--ink); letter-spacing: -.01em; white-space: nowrap; }
.ar-ticks { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--ink-4); font-variant-numeric: tabular-nums; }
.ar-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 22px; }
.ar-opt { display: grid; gap: 8px; padding: 16px 18px; border-radius: var(--r-2); border: var(--bw) solid var(--line); background: var(--surface); transition: border-color .3s, box-shadow .3s; }
.ar-opt.is-best { border-color: var(--pos); box-shadow: inset 0 0 0 1px var(--pos); }
.ar-opt-k { font-size: 14px; font-weight: 500; color: var(--ink-2); }
.ar-best { opacity: 0; transform: scale(.85); transition: opacity .25s, transform .35s var(--ease-spring, cubic-bezier(.34,1.4,.64,1)); }
.ar-opt.is-best .ar-best { opacity: 1; transform: none; }
.ar-v { font-size: clamp(26px, 3vw, 34px); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.ar-track { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.ar-fill { display: block; height: 100%; border-radius: inherit; background: var(--ink-4); transform: scaleX(0); transform-origin: left; transition: transform .55s var(--ease-out), background-color .3s; }
.ar-opt.is-best .ar-fill { background: var(--pos); }
.ar-verdict { margin-top: 16px; font-size: 17px; color: var(--ink); }
.ar-verdict b { color: var(--pos); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ar-calc-note { margin-top: 6px; }

.ar-quote { margin: 1.8em 0; padding: 2px 0 2px 24px; border-left: 3px solid var(--accent); font-family: var(--font-h); font-weight: var(--w-h); font-size: clamp(21px, 2.1vw, 27px); line-height: 1.35; letter-spacing: -.01em; color: var(--ink); }
.ar-quote cite { display: block; margin-top: 14px; font-family: var(--font-ui); font-style: normal; font-weight: 400; font-size: 14px; letter-spacing: 0; color: var(--ink-3); }
.ar-quote cite::before { content: "— "; }

.ar-example { padding: 18px 20px; border-radius: var(--r-2); background: transparent; border: 1px dashed var(--line-2); }
.ar-example-h { display: grid; gap: 4px; margin-bottom: 8px; }
.ar-example-h b { color: var(--ink); font-size: 16px; }

.ar-prose .ar-todo { list-style: none; padding: 0; border-top: var(--bw) solid var(--line-strong); }
.ar-todo li { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px; padding: 16px 0; border-bottom: var(--bw) solid var(--line); margin: 0; }
.ar-todo-d { font-family: var(--font-mono); font-size: 13px; color: var(--accent-text); padding-top: 3px; }
.ar-todo li > div { display: grid; gap: 4px; }
.ar-todo b { color: var(--ink); }
.ar-todo li > div span { font-size: 15.5px; color: var(--ink-2); }

.ar-prose table.ar-table th.r,
.ar-prose table.ar-table td.r { text-align: right; }
.ar-prose table.ar-table th { font-size: 15px; font-family: var(--font-num); font-weight: var(--w-strong); color: var(--ink); text-transform: none; letter-spacing: 0; }
.ar-prose table.ar-table th:last-child,
.ar-prose table.ar-table td:last-child { background: color-mix(in srgb, var(--accent-soft) 45%, transparent); padding-left: 14px; padding-right: 14px; }

/* End of article */
.ar-end { margin-top: 52px; padding-top: 28px; border-top: var(--bw) solid var(--line-strong); display: grid; gap: 20px; }
.ar-end-by { display: flex; gap: 16px; align-items: flex-start; }
.ar-end-by > div { display: grid; gap: 4px; }
.ar-end-by b { font-size: 16px; }
.ar-end-by span { color: var(--ink-2); font-size: 15px; max-width: 52ch; }
.ar-end-cta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.ar-end-cta .icon-btn { width: 44px; height: 44px; }

@media (max-width: 1080px) {
  .ar-layout { grid-template-columns: minmax(0, 1fr); }
  .ar-toc { display: none; }
  .ar-head-in { margin-left: 0; }
  .ar-toc-m { display: block; margin-bottom: 28px; border-top: var(--bw) solid var(--line); border-bottom: var(--bw) solid var(--line); }
  .ar-toc-m summary { list-style: none; display: flex; justify-content: space-between; align-items: center; min-height: 48px; font-weight: 500; cursor: pointer; }
  .ar-toc-m summary::-webkit-details-marker { display: none; }
  .ar-toc-m summary::after { content: ""; width: 9px; height: 9px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(45deg) translateY(-3px); transition: transform .3s var(--ease-out); }
  .ar-toc-m[open] summary::after { transform: rotate(225deg) translateY(-3px); }
  .ar-toc-m[open] nav { animation: rise .35s var(--ease-out) both; }
  .ar-toc-m nav { display: grid; padding-bottom: 10px; }
  .ar-toc-m nav a { padding: 10px 0; font-size: 15px; color: var(--ink-2); border-top: 1px dashed var(--line); }
}
@media (max-width: 760px) {
  .ar-prose { font-size: 16.5px; }
  .ar-by .grow { flex-basis: 100%; order: -1; }
  .ar-by .avatar { display: none; }
  .ar-by .btn { flex: 1 1 auto; height: 44px; }
  .ar-prose .tools { grid-template-columns: minmax(0, 1fr); }
  .ar-prose table { font-size: 14px; }
  .ar-prose td, .ar-prose th { padding-right: 12px; }
  .ar-calc { margin-inline: calc(var(--gutter, 20px) * -0.5); }
  .ar-calc-in, .ar-opts { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .ar-opts { gap: 10px; }
  .ar-todo li { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .ar-end-cta .btn { flex: 1 1 auto; }
}

/* Heading reached from the table of contents: a short marker sweep */
.ar-prose h2.ar-hit { animation: ar-hit 1.4s var(--ease-out) .35s both; }
@keyframes ar-hit { 0% { background: color-mix(in srgb, var(--mark) 0%, transparent); } 25% { background: color-mix(in srgb, var(--mark) 85%, transparent); } 100% { background: color-mix(in srgb, var(--mark) 0%, transparent); } }

/* Larger tap area for breadcrumbs without moving the layout */
.crumbs a { padding-block: 10px; margin-block: -10px; }
