/* willaireplaceaccountants.com: green ledger paper. Blue-black ink for what grows, red ink for what shrinks,
   feint green rulings, a red double margin rule, slab headings, typewriter figures. */
@font-face { font-family: "Roboto Slab"; src: url("/fonts/roboto-slab-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("/fonts/ibm-plex-sans-latin-wght-normal.woff2") format("woff2"); font-weight: 100 700; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }

:root {
  --paper: #e9f0df;
  --band: #d9e6cc;
  --slip: #f3f7eb;
  --ink: #15233a;
  --ink-2: #36445a;
  --ink-3: #4c5a68;
  --red: #a3261d;
  --rule: #b3caa8;
  --rule-2: #7da07c;
  --margin: #c9645b;
  --slab: "Roboto Slab", Rockwell, Georgia, serif;
  --sans: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { background: var(--paper); color-scheme: light; -webkit-text-size-adjust: 100%; scroll-padding-top: 24px; scrollbar-color: var(--rule-2) var(--paper); }
body { margin: 0; font: 400 17px/1.6 var(--sans); color: var(--ink); background: var(--paper); font-variant-numeric: tabular-nums; caret-color: var(--red); overflow-wrap: break-word; }
::selection { background: var(--ink); color: var(--paper); }
a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 1.5px; text-underline-offset: 3px; transition: color 140ms var(--ease); }
a:hover { color: var(--red); }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; border-radius: 1px; }
h1, h2, p, ul, ol, dl, dd, figure { margin: 0; }
b, strong { font-weight: 600; }

/* The sheet: one page of the book, with the margin rule down its left edge */
.sheet { max-width: 1200px; margin: 0 auto 0 8px; border-left: 3px double var(--margin); }
.wrap { padding: 0 16px 0 12px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 12px; }
.skip:focus { left: 16px; z-index: 5; }

/* Masthead: the account title, then the pages as a row of column heads */
.top .title-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 24px; padding: 18px 0 12px; }
.top .name { font: 600 23px/1.15 var(--slab); color: var(--ink); text-decoration: none; }
.top .by { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: 14px; text-decoration: none; padding: 4px 0; }
.top .by:hover { color: var(--red); }
.ulsa-mark { display: block; }
.top nav { display: flex; flex-wrap: wrap; border-top: 3px double var(--ink); border-bottom: 1px solid var(--ink); }
.top nav a { flex: 1 1 auto; color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 500; line-height: 1.3; padding: 12px 14px; border-right: 1px solid var(--rule-2); border-bottom: 1px solid var(--rule-2); margin-bottom: -1px; transition: background-color 140ms var(--ease), color 140ms var(--ease); }
.top nav a:hover { background: var(--band); }
.top nav a[aria-current="page"] { background: var(--ink); color: var(--paper); }

/* Title block */
.page { padding: 36px 0 56px; }
.intro { margin-bottom: 40px; }
h1 { font: 600 31px/1.12 var(--slab); letter-spacing: -0.01em; max-width: 19em; text-wrap: balance; }
.lead { margin-top: 20px; font-size: 18px; line-height: 1.55; max-width: 34em; }
.lead-note { margin-top: 12px; color: var(--ink-2); max-width: 36em; }
.byline { margin-top: 16px; color: var(--ink-3); font-size: 15px; }
.intro-side { margin-top: 32px; min-width: 0; }
.toc { margin-top: 36px; }

/* Contents: a ruled index beside the title, or a strip of column heads on the home page */
.toc p { font: 600 16px/1.3 var(--slab); padding-bottom: 8px; border-bottom: 3px double var(--ink); }
.toc ul { list-style: none; padding: 0; }
.toc li { border-bottom: 1px solid var(--rule); }
.toc a { display: block; text-decoration: none; font-size: 16px; line-height: 1.35; padding: 10px 0; }
.toc a:hover { color: var(--red); }

/* Entries: each section opens on a thick and thin rule */
.cards { min-width: 0; }
.entry { border-top: 3px double var(--ink); padding: 20px 0 44px; min-width: 0; }
.entry h2 { font: 500 23px/1.25 var(--slab); margin-bottom: 16px; max-width: 24em; text-wrap: balance; }
.body { min-width: 0; }
.body > p, .body > ul.points { max-width: 36em; }
.body > * + * { margin-top: 16px; }
.note { color: var(--ink-3); font-size: 15px; }
.more a { font-weight: 600; }

/* Task state: three boxes plus the state named in words */
.state { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; line-height: 1.3; color: var(--ink); }
.state .sq { flex: none; }

.legend { border: 1px solid var(--ink); padding: 4px 16px 12px; background: var(--slip); }
.legend dl > div { padding: 12px 0; border-bottom: 1px solid var(--rule); }
.legend dd { color: var(--ink-2); font-size: 16px; margin-top: 4px; max-width: 46em; }
.legend .note { margin-top: 12px; }

.overview { list-style: none; padding: 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.overview li { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px 20px; padding: 12px 0; }
.overview li + li { border-top: 1px solid var(--rule); }
.overview .task { font-weight: 600; text-decoration-color: var(--rule-2); }
.overview .task:hover { text-decoration-color: var(--red); }
.overview .why { color: var(--ink-2); font-size: 16px; }

/* Tables: ledger columns. Feint rules between rows and columns, a tinted head, a red double rule before the figures */
.scroll, .ledger-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
table { border-collapse: collapse; width: 100%; font-size: 16px; }
caption { text-align: left; color: var(--ink-3); font-size: 15px; padding-bottom: 10px; }
th, td { text-align: left; vertical-align: top; padding: 11px 14px; border-bottom: 1px solid var(--rule); border-left: 1px solid var(--rule); font-weight: 400; }
tr > :first-child { border-left: 0; }
thead th { font-weight: 600; font-size: 15px; line-height: 1.35; vertical-align: bottom; background: var(--band); border-top: 2px solid var(--ink); border-bottom: 1px solid var(--ink); border-left-color: var(--rule-2); }
tbody th { font-weight: 600; }
tbody tr:last-child > * { border-bottom: 1px solid var(--ink); }
.num { font-family: var(--mono); font-size: 15px; text-align: right; white-space: nowrap; }
thead .num { font-family: var(--sans); }
.num.first { border-left: 3px double var(--margin); }
.plain { min-width: 640px; }
.scroll caption { max-width: calc(100vw - 48px); }
.bars tbody th { min-width: 150px; }
.plain td { color: var(--ink-2); }

.bars { min-width: 600px; }
.bars tbody th { font-weight: 400; }
.bars tbody th a { text-decoration-color: var(--rule-2); }
.bars .chg { font-weight: 500; }
.bars .chg.neg { color: var(--red); }
.bars .c-bar { width: 30%; }
.bar { position: relative; display: block; height: 10px; margin-top: 8px; }
.bar i { position: absolute; top: 0; height: 10px; }
.bar .pos { background: var(--ink); }
.bar .neg { background: var(--red); }
.bar .zero { top: -5px; height: 20px; width: 1px; background: var(--ink); }

/* The task ledger: stacked on small screens, ruled columns from 860px */
.ledger thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ledger, .ledger tbody, .ledger tr, .ledger th, .ledger td { display: block; }
.ledger caption { display: block; }
.ledger tr { padding: 20px 0; border-top: 1px solid var(--ink); scroll-margin-top: 16px; }
.ledger th, .ledger td, .ledger tbody tr:last-child > * { border: 0; padding: 0; }
.ledger tbody th { font: 500 19px/1.3 var(--slab); }
.ledger .c-state { margin-top: 8px; }
.ledger .c-ev { margin-top: 12px; color: var(--ink-2); }
.ledger .c-ev p + p { margin-top: 8px; }
.ledger .c-ev b { color: var(--ink); }
.ledger .c-src { margin-top: 12px; font-size: 15px; color: var(--ink-3); }
.ledger .read { display: block; margin-top: 4px; }
.ledger tr:target { background: var(--band); box-shadow: -12px 0 0 var(--band), 12px 0 0 var(--band); }

/* Study figures: typewriter numerals with the double underline of a final total */
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); padding: 16px 0; }
.facts > div { padding: 0 14px; border-left: 1px solid var(--rule); }
.facts > div:nth-child(odd) { padding-left: 0; border-left: 0; }
.facts dt { display: inline-block; font: 500 24px/1.2 var(--mono); padding-bottom: 3px; border-bottom: 3px double var(--ink); }
.facts dd { color: var(--ink-2); font-size: 15px; line-height: 1.45; margin-top: 8px; }

/* Questions: native details on rulings */
.faq { border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.faq details + details { border-top: 1px solid var(--rule); }
.faq summary { cursor: pointer; padding: 14px 32px 14px 0; font-weight: 600; font-size: 17px; line-height: 1.35; list-style: none; position: relative; transition: color 140ms var(--ease); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 6px; top: 20px; width: 8px; height: 8px; border-right: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); transform: rotate(45deg); }
.faq details[open] summary::after { transform: rotate(-135deg); top: 25px; }
.faq summary:hover { color: var(--red); }
.faq summary h3 { display: inline; margin: 0; font: inherit; }
.points { padding-left: 20px; }
.points li + li { margin-top: 8px; }
.faq .answer { padding: 0 0 16px; max-width: 36em; }
.faq .answer p + p { margin-top: 12px; }

.stories { list-style: none; padding: 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.stories li { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px 20px; padding: 12px 0; }
.stories li + li { border-top: 1px solid var(--rule); }
.stories time { font: 400 14px/1.7 var(--mono); color: var(--ink-3); white-space: nowrap; }
.stories .st { font-weight: 600; display: block; }
.stories .sn { color: var(--ink-2); display: block; margin-top: 4px; font-size: 16px; }
.stories .ss { color: var(--ink-3); display: block; margin-top: 4px; font-size: 15px; }

/* The one call to action: a slip pinned into the book */
.entry.cta { border: 1px solid var(--ink); background: var(--slip); padding: 20px 16px 24px; margin-bottom: 44px; }
.cta .sentence { color: var(--ink-2); }
.cta .go { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 20px; }
.cta .go span { color: var(--ink-3); font-size: 15px; flex: 1 1 240px; }
.btn { display: inline-block; background: var(--ink); color: var(--paper); font-weight: 600; text-decoration: none; padding: 11px 18px; border-radius: 2px; transition: background-color 140ms var(--ease); }
.btn:hover { background: var(--red); color: #fff; }
.btn:focus-visible { outline-offset: 3px; }

.sources ul { list-style: none; padding: 0; border-top: 1px solid var(--ink); }
.sources li { padding: 12px 0; border-bottom: 1px solid var(--rule); font-size: 16px; }
.sources li span { display: block; color: var(--ink-3); font-size: 15px; margin-top: 2px; max-width: 46em; }
.sources li a { overflow-wrap: anywhere; }

/* Footer: three short entries under the closing rule */
.foot { border-top: 3px double var(--ink); margin: 0 16px 0 12px; padding: 28px 0 40px; }
.foot .wrap { display: grid; gap: 24px; padding: 0; }
.foot h2 { font: 600 16px/1.3 var(--slab); margin-bottom: 4px; }
.foot p { color: var(--ink-2); font-size: 15px; line-height: 1.5; max-width: 34em; }

.lone h1 { margin-bottom: 16px; }

/* The figure: seven projections as ink lines across the rulings. Its box height is fixed in the markup. */
.fan { --g: 30px; --pw: calc(42% - var(--g)); }
.fan-box { position: relative; border-top: 2px solid var(--ink); }
.fan-box::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 30px; background: var(--band); border-bottom: 1px solid var(--ink); }
.fan-rule { position: absolute; left: 0; width: calc(var(--g) + var(--pw) * 0.8 + 3px); height: 0; border-top: 1px solid var(--rule); }
.fan-rule.base { border-top-color: var(--rule-2); }
.fan-rule b { position: absolute; left: 0; bottom: 1px; font: 400 11px/1 var(--mono); color: var(--ink-3); }
.fan-v { position: absolute; top: 31px; bottom: 0; width: 0; border-left: 3px double var(--margin); }
.fan-v.v0 { left: var(--g); }
.fan-v.v1 { left: calc(var(--g) + var(--pw) * 0.8); }
.fan-v b { position: absolute; bottom: 100%; left: 5px; padding-bottom: 10px; font: 500 13px/1 var(--mono); color: var(--ink); }
.fan-v.v1 b { left: auto; right: 8px; }
.fan-plot { position: absolute; top: 0; left: calc(var(--g) + 1px); width: var(--pw); height: 100%; overflow: visible; }
.fan-plot line { vector-effect: non-scaling-stroke; fill: none; stroke: var(--ink); stroke-width: 1.25; stroke-linecap: round; }
.fan-plot .neg line { stroke: var(--red); }
.fan-plot .main .fl { stroke-width: 3; }
.fan-plot .lead { stroke-width: 1; stroke-dasharray: 1 4; opacity: 0.7; }
.fan-plot .dot { stroke-width: 6; }
.fan-plot .main .dot { stroke-width: 9; }
.fan-plot .origin { stroke-width: 9; }
.fan-labels { list-style: none; padding: 0; margin: 0; }
.fan-labels li { position: absolute; left: calc(var(--g) + var(--pw) + 8px); right: 0; font-size: 14px; line-height: 1.3; color: var(--ink-2); }
.fan-labels .fig { font: 500 14px/1.3 var(--mono); color: var(--ink); margin-right: 2px; }
.fan-labels .neg .fig { color: var(--red); }
.fan-labels .main { color: var(--ink); font-weight: 600; font-size: 15px; }
.fan-labels .main .fig { font-size: 15px; }
.fan-labels span { display: block; font: 400 12.5px/1.5 var(--sans); color: var(--ink-3); }
.fan figcaption { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--ink); color: var(--ink-3); font-size: 14px; line-height: 1.5; }

@media (max-width: 599px) {
  .scroll th, .scroll td { padding: 10px; font-size: 15px; }
  .scroll .num { font-size: 14px; }
}

@media (min-width: 600px) {
  .sheet { margin-left: 16px; }
  .wrap { padding: 0 28px 0 24px; }
  .foot { margin: 0 28px 0 24px; }
  .top .name { font-size: 28px; }
  .top nav a { flex: 0 1 auto; padding: 11px 20px; }
  .top nav a:first-child { border-left: 1px solid var(--rule-2); }
  h1 { font-size: 40px; }
  .lead { font-size: 19px; }
  .entry.cta { padding: 28px; }
  .overview li { grid-template-columns: minmax(0, 1fr) 190px; align-items: baseline; }
  .overview .why { grid-column: 1 / -1; }
  .facts { grid-template-columns: repeat(4, 1fr); }
  .facts > div:nth-child(odd) { padding-left: 14px; border-left: 1px solid var(--rule); }
  .facts > div:first-child { padding-left: 0; border-left: 0; }
  .stories li { grid-template-columns: 150px minmax(0, 1fr); }
  .foot .wrap { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
  .fan { --g: 34px; --pw: calc(46% - var(--g)); }
}

@media (min-width: 860px) {
  .ledger { display: table; }
  .ledger caption { display: table-caption; }
  .ledger thead { display: table-header-group; position: static; width: auto; height: auto; clip: auto; overflow: visible; white-space: normal; }
  .ledger tbody { display: table-row-group; }
  .ledger tr { display: table-row; padding: 0; border: 0; }
  .ledger th, .ledger td { display: table-cell; padding: 16px 14px; border-bottom: 1px solid var(--rule); border-left: 1px solid var(--rule); }
  .ledger tr > :first-child { border-left: 0; }
  .ledger thead th { padding-top: 10px; padding-bottom: 10px; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--ink); }
  .ledger tbody tr:last-child > * { padding: 16px 14px; border-bottom: 1px solid var(--ink); border-left: 1px solid var(--rule); }
  .ledger tbody tr:last-child > :first-child { border-left: 0; }
  .ledger tbody th { font-size: 17px; width: 21%; }
  .ledger .c-state { width: 17%; margin: 0; }
  .ledger .c-ev, .ledger .c-src { margin: 0; }
  .ledger .c-src { width: 17%; }
  .ledger tr:target { box-shadow: none; }
  .ledger .state { align-items: flex-start; flex-direction: column; gap: 6px; }
}

@media (min-width: 1000px) {
  .sheet { margin-left: max(24px, calc(50% - 600px)); }
  .wrap { padding: 0 40px; }
  .foot { margin: 0 40px; }
  .top .title-row { padding: 26px 0 16px; }
  .top .name { font-size: 34px; }
  .page { padding-top: 52px; }
  h1 { font-size: 52px; }
  .intro { display: grid; grid-template-columns: minmax(0, 1fr) 320px; column-gap: 64px; margin-bottom: 64px; }
  .intro.with-fig { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); column-gap: 56px; grid-template-rows: auto auto 1fr; }
  .intro h1 { grid-column: 1 / -1; }
  .lead { margin-top: 28px; }
  .intro .toc { grid-column: 2; grid-row: 2; margin-top: 32px; }
  .with-fig .intro-side { grid-column: 2; grid-row: 2 / span 2; margin-top: 32px; }
  .with-fig .toc { grid-column: 1; grid-row: 3; margin-top: 36px; }
  .with-fig .toc ul { columns: 2; column-gap: 32px; }
  .with-fig .toc li { break-inside: avoid; }
  .entry { display: grid; grid-template-columns: 240px minmax(0, 1fr); column-gap: 28px; padding: 0; }
  .entry h2 { margin: 0; padding-top: 24px; }
  .entry > .body { border-left: 1px solid var(--rule-2); padding: 26px 0 60px 28px; }
  .entry.cta { padding: 4px 32px 0; margin-bottom: 56px; grid-template-columns: 208px minmax(0, 1fr); }
  .entry.cta > .body { padding-bottom: 32px; }
  .overview li { grid-template-columns: 250px minmax(0, 1fr) 170px; }
  .overview .why { grid-column: 2; grid-row: 1; }
  .overview .state { grid-column: 3; }
  .lone .entry { display: block; max-width: 720px; padding-top: 24px; }
  .lone .entry > .body { border: 0; padding-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

@media print {
  .top nav, .toc, .cta, .skip { display: none; }
  body, html { background: #fff; }
  .sheet { border: 0; }
}

@media (min-width: 1000px) {
  .entry.cta { padding: 28px 32px 32px; }
  .entry.cta h2 { padding-top: 0; }
  .entry.cta > .body { border: 0; padding: 0; }
}
