@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/source-sans-3-cyrillic-400-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/source-sans-3-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/source-sans-3-cyrillic-600-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/source-sans-3-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/source-serif-4-cyrillic-500-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/source-serif-4-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/source-serif-4-cyrillic-600-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/source-serif-4-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #f6f5f2;
  --ink: #1c1914;
  --muted: #5c564e;
  --line: #d9d4cb;
  --line-strong: #1c1914;
  --paper: #fff;
  --sell: #8c2f2a;
  --warn: #8c2f2a;
  --path: #1c1914;
  --dca: #b45309;
  --hold: #1d4e89;
  --page: min(1120px, calc(100% - 40px));
  --sans: "Source Sans 3", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --serif: "Source Serif 4", "Iowan Old Style", Palatino, "Palatino Linotype", Georgia, serif;
  --fs-0: 0.75rem;
  --fs-1: 0.875rem;
  --fs-2: 1rem;
  --fs-3: 1.25rem;
  --fs-4: 1.625rem;
  --fs-5: 2rem;
  --fs-6: 2.75rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--sans);
  font-size: var(--fs-2);
  font-weight: 400;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}
img, svg { max-width: 100%; }
a { color: var(--ink); }
a:hover { color: var(--hold); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  background: var(--ink);
  color: var(--bg);
  padding: 8px 12px;
  z-index: 5;
}
.skip:focus { top: 12px; }

.site-header,
.site-footer,
.wrap { width: var(--page); margin-left: auto; margin-right: auto; }

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px 28px;
  padding: 22px 0 14px;
  border-bottom: 1px solid var(--line-strong);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}
.brand:hover { color: inherit; }
.mark { width: 36px; height: 36px; display: block; flex: none; }
.brand-text { display: flex; flex-direction: column; gap: 2px; }
.wordmark {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.85rem;
  letter-spacing: -0.03em;
  line-height: 0.95;
}
.brand-tag {
  font-size: var(--fs-0);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.nav { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; }
.nav a {
  text-decoration: none;
  font-size: 0.95rem;
  color: var(--ink);
  padding: 4px 0;
}
.nav a[aria-current="page"] { font-weight: 600; box-shadow: inset 0 -2px 0 var(--ink); }
.lang {
  border-left: 1px solid var(--ink);
  padding: 0 0 0 14px;
  letter-spacing: 0.08em;
  font-size: var(--fs-0);
  font-weight: 600;
}

.wrap { padding-top: 28px; }
.kicker {
  margin: 0 0 6px;
  font-size: var(--fs-0);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 0.4em;
}
h1 { font-size: var(--fs-6); }
h2 { font-size: var(--fs-4); margin-top: 1.4em; }
h3 { font-size: var(--fs-3); margin-top: 1.2em; }
.lede {
  font-size: 1.125rem;
  line-height: 1.45;
  max-width: 46rem;
  margin: 0 0 8px;
}
p { margin: 0 0 0.8em; }

#plan-form,
#ch7-form,
.rule {
  border-top: 1px solid var(--line-strong);
  margin-top: 28px;
  padding-top: 16px;
}
#plan-form h2,
#ch7-form h2,
.rule > h2:first-child { margin-top: 0; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px 16px;
  align-items: start;
}
.span-2 { grid-column: span 2; }
.span-4 { grid-column: span 4; }
.field label,
.field .label,
fieldset legend {
  display: block;
  font-size: var(--fs-1);
  font-weight: 600;
  margin: 0 0 4px;
}
.hint { margin: 4px 0 0; color: var(--muted); font-size: var(--fs-0); font-weight: 400; line-height: 1.4; }
input, select, button { font: inherit; font-variant-numeric: tabular-nums; }
input[type="text"],
input[type="number"],
select {
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
}
input[aria-invalid="true"] { border-color: var(--sell); }
fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}
.choice, .check {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-weight: 400;
  font-size: var(--fs-1);
  margin: 6px 0;
}
.choice input, .check input { margin-top: 3px; width: 1rem; height: 1rem; accent-color: var(--ink); }

.segment {
  display: inline-flex;
  border: 1px solid var(--ink);
  background: var(--paper);
}
.segment label { margin: 0; font-weight: 600; font-size: var(--fs-1); position: relative; }
.segment input {
  position: absolute;
  opacity: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
}
.segment span { display: block; padding: 10px 14px; min-height: 44px; line-height: 24px; }
.segment input:checked + span { background: var(--ink); color: var(--bg); }
.segment input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }

button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 16px;
  border-radius: 0;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
  cursor: pointer;
  font-weight: 600;
}
button:hover, .button:hover { background: #33302b; color: var(--bg); }
button.secondary, a.secondary {
  background: transparent;
  color: var(--ink);
}
button.secondary:hover, a.secondary:hover { background: var(--ink); color: var(--bg); }
button.ghost {
  background: transparent;
  color: var(--muted);
  border-color: var(--line);
  font-weight: 600;
  min-height: 36px;
}
button.linkish {
  background: none;
  color: var(--ink);
  border: 0;
  padding: 0;
  min-height: 0;
  font-weight: 600;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 3px;
}
button.linkish:hover { background: none; color: var(--hold); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; align-items: center; }

.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--ink);
  margin-top: 32px;
}
.tabs button {
  background: transparent;
  color: var(--muted);
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  margin-bottom: -1px;
  padding: 10px 18px;
  font-weight: 600;
}
.tabs button[aria-selected="true"] {
  color: var(--ink);
  border-bottom-color: var(--ink);
  background: transparent;
}
.tabs button:hover { background: transparent; color: var(--ink); }

.example-banner {
  border: 1px solid var(--ink);
  background: var(--paper);
  padding: 10px 14px;
  margin: 18px 0 0;
  font-weight: 600;
}
.answer {
  padding: 16px 0 8px;
  border-top: 1px solid var(--line);
  min-width: 0;
}
.answer-primary { border-top: 0; padding-top: 14px; }
.answers-secondary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0 28px;
}
.basis { margin: 0 0 6px; font-weight: 600; }
.figure {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.7rem, 3vw, 2.45rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0 0 6px;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.figure-secondary { font-size: clamp(1.35rem, 2.2vw, 1.85rem); }
.figure.is-neg { color: var(--sell); }
.compare-box {
  background: var(--paper);
  border: 1px solid var(--ink);
  padding: 14px 16px 4px;
  margin: 8px 0 4px;
  min-width: 0;
}
.compare-box h3 { margin: 0 0 0.35em; font-size: var(--fs-3); }
.compare-box .stats {
  border: 0;
  margin: 8px 0 4px;
  padding: 0;
}
.stats.pair { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.muted { color: var(--muted); }
.status { min-height: 1.2em; font-size: var(--fs-1); }
.warning {
  border-left: 3px solid var(--warn);
  padding: 8px 12px;
  margin: 8px 0;
  background: #fbf7f6;
  color: #6d241f;
}
.notes { margin: 8px 0 0; padding-left: 1.15rem; color: var(--muted); font-size: var(--fs-1); }
.notes li { margin: 0.25em 0; }

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px 18px;
  margin: 18px 0;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stats div { min-width: 0; }
.stats dt {
  font-size: var(--fs-0);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.stats dd {
  margin: 4px 0 0;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 1.05rem;
}

.chart-wrap {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 8px 8px 4px;
  margin-top: 8px;
}
.chart-wrap svg { width: 100%; height: auto; display: block; }
.chart-grid { stroke: #e6e1d8; stroke-width: 1; }
.chart-label { fill: var(--muted); font-size: 11px; font-family: var(--sans); }
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  list-style: none;
  padding: 8px 4px 6px;
  margin: 0;
  font-size: var(--fs-1);
}
.legend li { display: flex; align-items: center; gap: 8px; }
.swatch { width: 2.1rem; height: 0; border-top: 3px solid var(--path); display: inline-block; flex: none; }
.swatch-dca { border-top-style: dashed; border-top-color: var(--dca); }
.swatch-hold { border-top-style: dotted; border-top-color: var(--hold); }

.table-scroll { max-width: 100%; max-height: 32rem; overflow: auto; margin-top: 12px; }
table.plan {
  border-collapse: collapse;
  width: 100%;
  table-layout: fixed;
  font-variant-numeric: tabular-nums;
  font-size: 0.8125rem;
  background: var(--paper);
}
table.plan caption {
  caption-side: top;
  text-align: left;
  padding: 0 0 8px;
  color: var(--muted);
  font-size: var(--fs-1);
}
table.plan th,
table.plan td {
  padding: 6px 8px;
  text-align: right;
  vertical-align: bottom;
}
table.plan th:first-child,
table.plan td:first-child { text-align: left; }
table.plan th {
  position: sticky;
  top: 0;
  z-index: 1;
  font-size: var(--fs-0);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink);
  background: var(--paper);
  border-bottom: 1px solid var(--ink);
  white-space: normal;
}
table.plan td { border-bottom: 1px solid var(--line); white-space: nowrap; }
table.plan tr.is-sell td { color: var(--sell); }
.c-month { width: 9%; }
.c-shares { width: 12%; }

table.compare {
  width: 100%;
  border-collapse: collapse;
  background: var(--paper);
  font-size: var(--fs-1);
}
table.compare caption {
  caption-side: top;
  text-align: left;
  padding: 0 0 8px;
  color: var(--muted);
}
table.compare th,
table.compare td {
  text-align: left;
  vertical-align: top;
  white-space: normal;
  overflow-wrap: break-word;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}
table.compare thead th { border-bottom: 1px solid var(--ink); font-size: var(--fs-0); letter-spacing: 0.04em; text-transform: uppercase; }

.plans { list-style: none; padding: 0; margin: 8px 0 0; }
.plans li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 36px;
  align-items: start;
  margin-top: 12px;
}
.split h2 { margin-top: 0.6em; }

.article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 40px 48px;
  align-items: start;
  margin-top: 8px;
}
.article-body { min-width: 0; }
.article-body p,
.article-body li { max-width: 78ch; }
.article-body .wide,
.article-body table,
.article-body #ch7-form { max-width: none; }
.toc {
  position: sticky;
  top: 16px;
  font-size: var(--fs-1);
  padding-top: 4px;
}
.toc p { margin: 0 0 8px; font-size: var(--fs-0); letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; color: var(--muted); }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc li { margin: 0 0 8px; }
.toc a { text-decoration: none; border-bottom: 1px solid var(--line); }
.toc a:hover { border-bottom-color: var(--ink); }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86em;
}

.site-footer {
  border-top: 1px solid var(--line-strong);
  margin-top: 48px;
  padding: 16px 0 40px;
  color: var(--muted);
  font-size: var(--fs-1);
}
.site-footer p { margin: 0 0 0.4em; }
.page-miss { padding-bottom: 24px; }
.page-miss h2 { margin-top: 1.6em; }

@media (max-width: 1279px) {
  table.plan { min-width: 720px; table-layout: auto; }
}
@media (min-width: 981px) {
  .split .form-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 980px) {
  .form-grid { grid-template-columns: 1fr 1fr; }
  .span-4 { grid-column: span 2; }
  .stats { grid-template-columns: 1fr 1fr; }
  .article { grid-template-columns: 1fr; }
  .toc { position: static; }
  .split { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  :root { --fs-6: 2.15rem; }
  .answers-secondary, .stats.pair { grid-template-columns: 1fr; }
  h1 { font-size: var(--fs-6); }
}
@media (max-width: 560px) {
  .form-grid, .span-2, .span-4 { grid-column: auto; }
  .form-grid { grid-template-columns: 1fr; }
  .wordmark { font-size: 1.55rem; }
  body { font-size: 16px; }
}
