/* Sample S corporation analysis (sample-s-corp-analysis/index.html).
   Uses the color and font tokens from styles.css. Inline styles are blocked by the
   site's security policy, so every chart size lives in the SVG markup or here. */

.sa {
  --save: #8a6bc0;        /* chart marks: the S corporation saves you money */
  --cost: #b97f1f;        /* chart marks: costs you more */
  --now: #a3a8b3;         /* chart marks: your LLC as it is now */
  --cost-soft: #fbf1df;
  --grid: #ebe5da;
}

.sa .sa-kicker { margin: 0 0 0.3em; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }

/* The answer, up top */
.sa-answer {
  background: var(--accent-soft);
  border: 1px solid #d3c5ea;
  border-radius: 16px;
  padding: 22px 24px 20px;
  margin: 0 0 18px;
}
.sa-answer-line { font-family: var(--font-heading); font-size: 1.65rem; line-height: 1.25; font-weight: 600; color: var(--accent-dark); margin: 0 0 16px; }
.sa-tiles { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 12px; margin: 0 0 16px; }
.sa-tile { background: var(--card); border-radius: var(--radius); padding: 14px 16px; }
.sa-tile .v { display: block; font-family: var(--font-body); font-size: 2rem; font-weight: 800; line-height: 1.05; letter-spacing: -0.02em; color: var(--ink); }
.sa-tile.hero .v { font-size: 2.6rem; color: var(--accent); }
.sa-tile .k { display: block; margin-top: 6px; font-size: 0.86rem; line-height: 1.35; color: var(--ink-soft); }
.sa-moves { list-style: none; counter-reset: move; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; }
.sa-moves li { counter-increment: move; display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 0; font-size: 0.92rem; line-height: 1.4; }
.sa-moves li::before {
  content: counter(move);
  flex: 0 0 26px; height: 26px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: #fff; font-weight: 700; font-size: 0.85rem;
}

/* Color key */
.sa-key { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 6px; font-size: 0.86rem; color: var(--ink-soft); }
.sa-key span { display: inline-flex; align-items: center; gap: 7px; }
.sa-key i { display: inline-block; width: 14px; height: 14px; border-radius: 4px; }
.sa-key .k-save { background: var(--save); }
.sa-key .k-cost { background: var(--cost); }
.sa-key .k-now { background: var(--now); }

/* Section headings with a number badge, and the one-line point under each */
.sa-section { margin-top: 2.2em; }
.sa-section h2 {
  display: flex; align-items: center; gap: 12px;
  font-size: 1.5rem; margin: 0 0 0.45em; padding-bottom: 0.35em;
  border-bottom: 1px solid var(--line);
}
.sa-num {
  flex: 0 0 34px; height: 34px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: #fff;
  font-family: var(--font-body); font-size: 1rem; font-weight: 700;
}
.sa-point { font-size: 1.08rem; font-weight: 700; line-height: 1.45; color: var(--accent-dark); margin: 0 0 14px; }
.sa h3 { font-size: 1.15rem; margin: 1.4em 0 0.4em; }
.sa-note { font-size: 0.9rem; color: var(--ink-soft); }

/* Cards */
.sa-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.sa-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; background: var(--card); }
.sa-card h3 { font-family: var(--font-body); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); margin: 0 0 8px; }
.sa-card p { margin: 0 0 0.5em; font-size: 0.95rem; }
.sa-card p:last-child { margin-bottom: 0; }
.sa-card ul { margin: 0; padding-left: 1.1em; font-size: 0.95rem; }
.sa-card li { margin-bottom: 0.35em; }
.sa-checks { list-style: none; padding-left: 0 !important; }
.sa-checks li { position: relative; padding-left: 26px; }
.sa-checks li::before {
  content: "\2713"; position: absolute; left: 0; top: 1px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 0.72rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.sa-numbers { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: center; margin-top: 12px; }
.sa-facts { list-style: none; margin: 0; padding: 0; font-size: 0.93rem; }
.sa-facts li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.sa-facts li:last-child { border-bottom: 0; }
.sa-facts b { font-weight: 700; white-space: nowrap; }

/* Charts */
.sa-figure { margin: 6px 0 14px; }
.sa-figure svg { display: block; width: 100%; height: auto; }
.sa-figure figcaption { font-size: 0.86rem; color: var(--ink-soft); margin-top: 4px; }
.sa-chart-title { font-size: 0.95rem; font-weight: 700; margin: 0 0 6px; color: var(--ink); }
.sa svg text { font-family: var(--font-body); fill: var(--ink); }
.sa svg .t-soft { fill: var(--ink-soft); }
.sa svg .t-bold { font-weight: 700; }
.sa svg .t-accent { fill: var(--accent-dark); font-weight: 700; }
.sa svg .grid { stroke: var(--grid); stroke-width: 1; }
.sa svg .axis { stroke: #b9b2a5; stroke-width: 1; }
.sa svg .link { stroke: #c9c1b3; stroke-width: 1; }
.sa svg .m-save { fill: var(--save); }
.sa svg .m-cost { fill: var(--cost); }
.sa svg .m-now { fill: var(--now); }
.sa svg .m-total { fill: var(--accent); }
.sa svg .m-plan { stroke: var(--ink); stroke-width: 2; }

/* Why the numbers move */
.sa-why { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.sa-why li { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; align-items: baseline; margin: 0; padding: 10px 14px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--card); }
.sa-why .amt { font-weight: 800; font-size: 1.05rem; white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; }
.sa-why .amt::before { content: ""; width: 10px; height: 10px; border-radius: 3px; flex: 0 0 10px; }
.sa-why .save .amt::before { background: var(--save); }
.sa-why .cost .amt::before { background: var(--cost); }
.sa-why b { display: block; }
.sa-why p { margin: 0; font-size: 0.93rem; line-height: 1.45; }

.sa-callout { background: var(--accent-soft); border-left: 4px solid var(--accent); border-radius: var(--radius); padding: 12px 16px; font-size: 0.95rem; margin: 0 0 12px; }
.sa-callout p { margin: 0; }

/* Salary build */
.sa-roles { width: 100%; border-collapse: collapse; font-size: 0.95rem; font-variant-numeric: tabular-nums; }
.sa-roles th, .sa-roles td { text-align: left; vertical-align: middle; padding: 9px 8px; border-bottom: 1px solid var(--line); }
.sa-roles thead th { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); border-bottom: 2px solid var(--accent); }
.sa-roles .num { text-align: right; white-space: nowrap; }
.sa-roles .bar { width: 34%; }
.sa-roles .bar svg { display: block; width: 100%; height: 14px; }
.sa-roles .calc { color: var(--ink-soft); font-size: 0.88rem; white-space: nowrap; }
.sa-roles tfoot th, .sa-roles tfoot td { font-weight: 700; border-bottom: 0; }
.sa-rounded { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin: 12px 0 14px; padding: 12px 16px; border-radius: var(--radius); background: var(--accent-soft); }
.sa-rounded b { font-size: 1.6rem; font-weight: 800; color: var(--accent); }
.sa-rounded span { color: var(--accent-dark); font-weight: 600; }

/* Salary range tiles */
.sa-range { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 8px 0 10px; }
.sa-range div { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; background: var(--card); }
.sa-range .sal { display: block; font-size: 0.86rem; font-weight: 600; color: var(--ink-soft); }
.sa-range .sv { display: block; font-size: 1.45rem; font-weight: 800; line-height: 1.2; margin-top: 2px; }
.sa-range .lab { display: block; font-size: 0.82rem; color: var(--ink-soft); }
.sa-range .tag { display: inline-block; margin-top: 8px; font-size: 0.75rem; font-weight: 700; border-radius: 999px; padding: 2px 10px; }
.sa-range .rec { border: 2px solid var(--accent); background: var(--accent-soft); }
.sa-range .rec .tag { background: var(--accent); color: #fff; }
.sa-range .low .tag { background: var(--cost-soft); color: var(--notice); border: 1px solid #ecd9ae; }

/* Timeline */
.sa-timeline { list-style: none; margin: 4px 0 12px; padding: 0; position: relative; }
.sa-timeline li { position: relative; display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 14px; margin: 0; padding: 0 0 14px 26px; }
.sa-timeline li::before { content: ""; position: absolute; left: 5px; top: 6px; bottom: -6px; width: 2px; background: #d3c5ea; }
.sa-timeline li:last-child::before { display: none; }
.sa-timeline li::after { content: ""; position: absolute; left: 0; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--card); }
.sa-timeline .when { font-weight: 700; color: var(--accent-dark); line-height: 1.35; }
.sa-timeline .what p { margin: 0 0 4px; font-size: 0.94rem; line-height: 1.45; }
.sa-timeline .what ul { margin: 0 0 4px; padding-left: 1.05em; font-size: 0.94rem; }
.sa-timeline .what li { display: list-item; position: static; padding: 0; margin: 0 0 2px; }
.sa-timeline .what li::before, .sa-timeline .what li::after { display: none; }
.sa-who { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.sa-who span { font-size: 0.74rem; font-weight: 700; border-radius: 999px; padding: 1px 9px; border: 1px solid var(--line); color: var(--ink-soft); background: var(--paper); }
.sa-who .you { background: var(--accent-soft); border-color: #d3c5ea; color: var(--accent-dark); }
.sa-who .me { background: var(--accent); border-color: var(--accent); color: #fff; }

/* What could change */
.sa-change h3 { font-family: var(--font-body); font-size: 1rem; letter-spacing: 0; text-transform: none; color: var(--ink); margin: 0 0 4px; }

/* The numbers in full */
.sa-appendix h2 { font-size: 1.35rem; }
.sa-appendix .report-table { font-size: 0.88rem; }
.sa-appendix .report-table th, .sa-appendix .report-table td { padding: 7px 10px; }
.sa-assume { columns: 2; column-gap: 28px; margin: 0; padding-left: 1.1em; font-size: 0.86rem; color: var(--ink-soft); }
.sa-assume li { break-inside: avoid; margin-bottom: 0.45em; }
.sa-sources { font-size: 0.8rem; color: var(--ink-soft); line-height: 1.5; }

@media (max-width: 719px) {
  .sa-tiles, .sa-moves, .sa-grid2, .sa-numbers { grid-template-columns: minmax(0, 1fr); }
  .sa-range { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sa-why li { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .sa-timeline li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .sa-assume { columns: 1; }
  .sa-roles .calc { display: none; }
}

.sa-numbers-card { margin-top: 12px; }
.sa .visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Page-one fact chips, three-card rows, the why grid, and the short-on-time line */
.sa-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: -0.8em 0 14px; padding: 0; }
.sa-chips li { margin: 0; padding: 3px 11px; border-radius: 999px; background: var(--paper-tint); border: 1px solid var(--line); font-size: 0.84rem; color: var(--ink); }
.sa-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.sa-grid3 .sa-figure { margin: 0; }
.sa-why-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sa-why-grid li { display: block; }
.sa-why-grid .amt { font-size: 1.35rem; margin-bottom: 2px; }
.sa-why-grid b { margin-bottom: 2px; }
.sa-short { margin: 14px 0 0; font-size: 0.9rem; font-weight: 600; color: var(--accent-dark); }
@media (max-width: 719px) {
  .sa-grid3, .sa-why-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Lists that are laid out as cards or rows don't take the report's list indent */
.sa .sa-why, .sa .sa-moves, .sa .sa-chips, .sa .sa-timeline, .sa .sa-facts { padding-left: 0; }
.sa svg .m-now-light { fill: #cdd0d6; }
.sa-change .sa-note { margin-top: 12px; }

/* Charts keep a readable size on phones: they scroll sideways instead of shrinking */
.sa-scroll { overflow-x: auto; }
.sa-scroll-hint { display: none; margin: 4px 0 0; font-size: 0.82rem; color: var(--ink-soft); }
@media (max-width: 599px) {
  .sa-scroll svg { min-width: 600px; }
  .sa-scroll-hint { display: block; }
}
@media (max-width: 479px) {
  .sa-roles .bar { display: none; }
}
