/* Contrino Consulting — an accountant's working ledger.
   Pale green ruled paper, black ink, one red for totals. Tabular figures throughout. */

:root {
  --paper: #e8efe0;
  --sheet: #f3f7ed;
  --sheet-2: #eef4e7;
  --rule: #d3e2cb;
  --rule-2: #aac7a2;
  --rule-3: #86a97e;
  --ink: #131b15;
  --ink-2: #3f4f44;
  --ink-3: #5b6b5f;
  --red: #b3261e;
  --red-soft: rgba(179, 38, 30, .55);
  --serif: "Newsreader", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --line: 32px;
  --wrap: 1280px;
  --gut: 20px;
}
@media (min-width: 900px) { :root { --gut: 40px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 24px; }
body {
  margin: 0;
  color: var(--ink);
  background-color: var(--paper);
  background-image: linear-gradient(to bottom, transparent calc(var(--line) - 1px), var(--rule) calc(var(--line) - 1px));
  background-size: 100% var(--line);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.6;
  font-optical-sizing: auto;
  font-variant-numeric: lining-nums tabular-nums;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--red); }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.num, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums slashed-zero; letter-spacing: -.01em; }
.red { color: var(--red); }
.r { text-align: right; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--sheet); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }

.eyebrow {
  font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-3); margin: 0 0 12px;
}

/* ---------- Masthead ---------- */
.folio { background: var(--ink); color: #dfe9d8; font-family: var(--mono); font-size: 11.5px; letter-spacing: .06em; }
.folio__in { display: flex; justify-content: space-between; gap: 16px; padding-top: 7px; padding-bottom: 7px; white-space: nowrap; }
.folio__mid { display: none; }
.folio__r .num { color: #fff; }
@media (min-width: 760px) { .folio__mid { display: inline; opacity: .75; } }

.mast { background: var(--sheet); border-bottom: 3px double var(--ink); }
.mast__in { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 18px; padding-bottom: 16px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; min-width: 0; }
.brand img { width: 40px; height: 40px; flex: none; }
.brand__words { display: flex; flex-direction: column; min-width: 0; }
.brand__name { font-family: var(--serif); font-weight: 600; font-size: 25px; line-height: 1.05; letter-spacing: -.015em; }
.brand__tag { font-family: var(--mono); font-size: 11px; color: var(--ink-3); letter-spacing: .02em; margin-top: 4px; }
.brand:hover { color: var(--ink); }
.brand:hover .brand__name { color: var(--red); }
.util { display: none; gap: 24px; font-family: var(--mono); font-size: 13px; }
.util a { text-decoration: none; border-bottom: 1px solid var(--rule-3); padding-bottom: 2px; }
@media (min-width: 900px) { .util { display: flex; } .brand__name { font-size: 30px; } .brand img { width: 44px; height: 44px; } }

/* Chart of accounts nav: ledger column headers */
.coa { border-top: 1px solid var(--rule-2); background: var(--sheet-2); }
.coa__in { display: flex; align-items: stretch; padding-right: 0; }
.coa__label { display: none; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-3); padding: 12px 16px 12px 0; border-right: 1px solid var(--rule-2); align-self: center; }
.coa ul { list-style: none; margin: 0; padding: 0; display: flex; overflow-x: auto; scrollbar-width: none; flex: 1; }
.coa ul::-webkit-scrollbar { display: none; }
.coa li { flex: 1 0 auto; border-right: 1px solid var(--rule-2); }
.coa li:first-child { border-left: 1px solid var(--rule-2); }
.coa a { display: flex; flex-direction: column; padding: 8px 14px 9px; text-decoration: none; white-space: nowrap; height: 100%; }
.coa__code { font-family: var(--mono); font-size: 11px; color: var(--ink-3); }
.coa__name { font-size: 15px; line-height: 1.3; }
.coa a:hover, .coa a[aria-current] { background: var(--sheet); }
.coa a[aria-current] { box-shadow: inset 0 -3px 0 var(--red); }
.coa a[aria-current] .coa__code, .coa a:hover .coa__code { color: var(--red); }
@media (min-width: 1100px) { .coa__label { display: block; } .coa ul { overflow: visible; } }

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-block; font-family: var(--mono); font-size: 13px; font-weight: 500; letter-spacing: .02em;
  background: var(--ink); color: var(--sheet); text-decoration: none; padding: 13px 18px; border: 1px solid var(--ink);
  box-shadow: 3px 3px 0 var(--rule-3);
}
.btn:hover { background: var(--red); border-color: var(--red); color: #fff; }
.lnk { font-family: var(--mono); font-size: 13px; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.lnk::after { content: " \2192"; }

/* ---------- Hero ---------- */
.hero { padding: 40px 0 56px; }
.hero__grid { display: grid; gap: 40px; }
.hero__h1 {
  font-family: var(--serif); font-weight: 500; font-size: clamp(36px, 8.4vw, 64px); line-height: 1.02;
  letter-spacing: -.028em; margin: 0 0 20px; font-variation-settings: "opsz" 72;
}
.hero__intro { font-size: 18.5px; line-height: 1.6; color: var(--ink-2); margin: 0 0 28px; max-width: 34em; }
.hero__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-bottom: 32px; }
.hero__keys { margin: 0; display: grid; gap: 0; border-top: 1px solid var(--ink); }
.hero__keys div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--rule-2); }
.hero__keys dt { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; padding-top: 3px; }
.hero__keys dd { margin: 0; font-size: 16px; color: var(--ink-2); }
@media (min-width: 1040px) {
  .hero { padding: 56px 0 80px; }
  .hero__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: start; }
  .hero__text { padding-top: 8px; }
}

/* The ledger sheet */
.sheet {
  position: relative; margin: 0; background: var(--sheet);
  border: 1px solid var(--rule-3);
  box-shadow: 0 1px 0 var(--rule-2), 6px 6px 0 -1px var(--sheet-2), 6px 6px 0 0 var(--rule-2), 12px 12px 0 -1px var(--sheet-2), 12px 12px 0 0 var(--rule-2);
  padding: 0 0 20px;
  background-image: linear-gradient(to bottom, transparent 43px, var(--rule) 43px);
  background-size: 100% 44px;
  background-position: 0 3px;
}
.sheet::before { /* red double margin */
  content: ""; position: absolute; top: 0; bottom: 0; left: 44px; width: 5px;
  border-left: 1px solid var(--red-soft); border-right: 1px solid var(--red-soft); pointer-events: none;
}
.sheet__top {
  position: relative; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap;
  padding: 14px 16px 12px 60px; background: var(--sheet); border-bottom: 2px solid var(--ink);
}
.sheet__title { font-family: var(--serif); font-style: italic; font-size: 18px; }
.sheet__meta { font-size: 11px; color: var(--ink-3); letter-spacing: .06em; text-transform: uppercase; }
.sheet__t { width: 100%; border-collapse: collapse; font-size: 15px; position: relative; }
.sheet__t th, .sheet__t td { padding: 0 10px; height: 44px; vertical-align: middle; text-align: left; font-weight: 400; }
.sheet__t thead th {
  font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3);
  height: 34px; border-bottom: 1px solid var(--rule-3); background: var(--sheet);
}
.c-ref { width: 50px; text-align: center !important; color: var(--ink-3); font-size: 12px; padding: 0 !important; }
.c-acct { width: 54px; text-align: center !important; font-family: var(--mono); font-size: 12px; border-left: 1px solid var(--rule-2); border-right: 1px solid var(--rule-2); }
.c-acct a { text-decoration: none; border-bottom: 1px dotted var(--ink-3); }
.c-amt { width: 104px; text-align: right !important; font-family: var(--mono); font-size: 14px; border-left: 1px solid var(--rule-2); white-space: nowrap; }
.sheet__t thead .c-amt, .sheet__t thead .c-acct { font-size: 10.5px; }
.c-item { line-height: 1.25; padding-top: 6px !important; padding-bottom: 6px !important; }
.c-src { display: block; font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); letter-spacing: .01em; margin-top: 2px; }
.c-pencil { text-align: center !important; font-family: var(--serif) !important; font-style: italic; color: var(--ink-3); }
.c-pencil span { border-bottom: 1px dashed var(--ink-3); }
.sheet__t tr.sub th, .sheet__t tr.sub td { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); }
.sheet__t tr.sub .c-amt { font-size: 14px; text-transform: none; letter-spacing: -.01em; color: var(--ink); border-top: 1px solid var(--ink); }
.sheet__t tr.total th { font-family: var(--serif); font-weight: 600; font-size: 18px; color: var(--red); height: 64px; line-height: 1.1; }
.sheet__t tr.total th .c-src { color: var(--red-soft); font-weight: 400; }
.sheet__t tr.total .c-amt { color: var(--red); font-weight: 700; font-size: 16px; height: 64px; }
.dbl { display: inline-block; border-top: 1.5px solid var(--red); border-bottom: 4px double var(--red); padding: 4px 0 2px; }
.sheet__note { font-family: var(--mono); font-size: 11.5px; line-height: 1.6; color: var(--ink-2); padding: 14px 120px 0 60px; background: var(--sheet); margin-top: 6px; }
.sheet__seal { position: absolute; right: 4px; bottom: -30px; width: 104px; height: 104px; transform: rotate(-12deg); opacity: .82; mix-blend-mode: multiply; pointer-events: none; }
@media (min-width: 700px) { .sheet__seal { width: 132px; height: 132px; right: -28px; bottom: -40px; } }
@media (max-width: 1039px) { .hero__text { display: contents; } .hero__grid { gap: 0; } .hero .eyebrow { order: 1; } .hero__h1 { order: 2; } .sheet { order: 3; margin: 8px 0 56px; } .hero__intro { order: 4; } .hero__cta { order: 5; } .hero__keys { order: 6; } }

/* Mobile sheet: hide acct col, tighten */
@media (max-width: 559px) {
  .sheet::before { left: 30px; }
  .sheet__top, .sheet__note { padding-left: 44px; }
  .c-ref { width: 34px; font-size: 11px; }
  .sheet__t .c-acct { display: none; }
  .c-amt { width: 76px; font-size: 12.5px !important; padding: 0 6px !important; }
  .sheet__t th, .sheet__t td { padding: 0 6px; }
  .sheet__t { font-size: 14px; }
  .sheet__t tr.total th { font-size: 16px; }
  .sheet__t tr.total .c-amt { font-size: 13px !important; }
  .c-src { font-size: 10px; }
  .sheet__t tr.sub th { font-size: 10.5px; }
}

/* Entry animation: each line is posted, then the total is struck */
@media (prefers-reduced-motion: no-preference) {
  .sheet__t tbody tr { animation: post .5s ease-out both; animation-delay: calc(var(--i, 8) * 110ms + 150ms); }
  .sheet__t tbody tr.sub { animation-delay: 700ms; }
  .sheet__t tbody tr.sub:last-child { animation-delay: 1150ms; }
  .sheet__t tfoot tr { animation: post .5s ease-out 1.35s both; }
  .sheet__t tfoot .dbl { animation: strike .6s ease-out 1.6s both; }
  .sheet__seal { animation: stamp .35s cubic-bezier(.3,1.6,.5,1) 1.95s both; }
}
@keyframes post { from { opacity: 0; } to { opacity: 1; } }
@keyframes strike { from { border-color: transparent; } to { border-color: var(--red); } }
@keyframes stamp { from { opacity: 0; transform: rotate(-12deg) scale(1.5); } to { opacity: .82; transform: rotate(-12deg) scale(1); } }

/* ---------- Sections ---------- */
.sec { padding: 56px 0; border-top: 1px solid var(--ink); }
.sec--tight { padding-top: 8px; border-top: 0; }
.sec__head { margin-bottom: 28px; max-width: 760px; }
.sec__head--split { max-width: none; display: grid; gap: 8px 40px; }
@media (min-width: 900px) { .sec__head--split { grid-template-columns: 1fr 1fr; align-items: end; } .sec { padding: 80px 0; } }
.sec__h { font-family: var(--serif); font-weight: 500; font-size: clamp(28px, 4.6vw, 42px); line-height: 1.08; letter-spacing: -.02em; margin: 0 0 12px; }
.sec__lede { color: var(--ink-2); margin: 0; font-size: 17.5px; }

/* Plates: generated ink drawings, with a ruled fallback */
.plate {
  position: relative; overflow: hidden; aspect-ratio: 4 / 3; background: var(--sheet-2);
  background-image:
    linear-gradient(to right, transparent 23px, var(--red-soft) 23px, var(--red-soft) 24px, transparent 24px, transparent 27px, var(--red-soft) 27px, var(--red-soft) 28px, transparent 28px),
    linear-gradient(to bottom, transparent 19px, var(--rule-2) 19px);
  background-size: 100% 100%, 100% 20px;
  border-bottom: 1px solid var(--rule-3);
}
.plate__fallback { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: flex-end; padding: 10px 14px; }
.plate__fallback .num { font-size: clamp(48px, 7vw, 84px); font-weight: 700; line-height: .9; color: transparent; -webkit-text-stroke: 1px var(--rule-3); letter-spacing: -.04em; }
.plate > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; mix-blend-mode: multiply; }
.plate--tall { aspect-ratio: 4 / 5; border: 1px solid var(--rule-3); }
.plate--tall .plate__fallback .num { font-size: 160px; }

/* Accounts grid: ledger divider cards with staggered tabs */
.accts { list-style: none; margin: 0; padding: 0; display: grid; gap: 40px 20px; grid-template-columns: 1fr; }
@media (min-width: 600px) { .accts { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .accts { grid-template-columns: repeat(4, 1fr); } }
.acct { position: relative; padding-top: 26px; }
.acct a { display: flex; flex-direction: column; height: 100%; background: var(--sheet); border: 1px solid var(--rule-3); text-decoration: none; position: relative; transition: transform .15s ease, box-shadow .15s ease; }
.acct__tab {
  position: absolute; top: -26px; left: calc(var(--tab) * 22% - 1px); height: 26px; padding: 0 12px; display: flex; align-items: center;
  background: var(--sheet); border: 1px solid var(--rule-3); border-bottom: 0; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase;
}
.acct a:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--rule-3); color: var(--ink); }
.acct a:hover .acct__tab { background: var(--ink); color: var(--sheet); border-color: var(--ink); }
.acct a:hover .acct__name { color: var(--red); }
.acct__body { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px 18px; flex: 1; }
.acct__name { font-size: 22px; line-height: 1.15; font-weight: 500; letter-spacing: -.01em; }
.acct__desc { font-size: 15.5px; line-height: 1.5; color: var(--ink-2); flex: 1; }
.acct__count { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; padding-top: 10px; border-top: 1px solid var(--rule-2); display: flex; gap: 6px; }
.acct__count .num { color: var(--red); font-weight: 700; }
.acct--current a { border-color: var(--ink); }

/* Journal: ledger rows */
.journal { background: var(--sheet); border: 1px solid var(--rule-3); border-top: 2px solid var(--ink); position: relative; }
.journal__head, .jrow { display: grid; grid-template-columns: 58px 1fr 34px; column-gap: 0; }
.journal__head span:nth-child(2), .jrow__date { display: none; }
.journal__head span:nth-child(4) { display: none; }
.jrow__acct { display: none; }
.journal__head { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); border-bottom: 1px solid var(--rule-3); }
.journal__head span { padding: 9px 10px; }
.jrow { text-decoration: none; border-bottom: 1px solid var(--rule); position: relative; }
.jrow:last-child { border-bottom: 0; }
.jrow > span { padding: 14px 10px; }
.jrow__no { font-size: 12px; color: var(--ink-3); border-right: 1px solid var(--red-soft); box-shadow: 3px 0 0 -2px var(--red-soft), 4px 0 0 -2px var(--sheet); }
.jrow__title { display: block; font-size: 19px; line-height: 1.3; font-weight: 500; letter-spacing: -.005em; }
.jrow__sum { display: block; margin-top: 4px; font-size: 15px; line-height: 1.5; color: var(--ink-3); }
.jrow__min, .jrow__acct { font-size: 13px; padding-top: 17px !important; }
.jrow:hover { background: #fff; color: var(--ink); }
.jrow:hover .jrow__title { color: var(--red); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
@media (min-width: 760px) {
  .journal__head, .jrow { grid-template-columns: 70px 92px 1fr 70px 60px; }
  .journal__head span:nth-child(2), .jrow__date, .journal__head span:nth-child(4), .jrow__acct { display: block; }
  .jrow--noacct, .journal:has(.jrow--noacct) .journal__head { grid-template-columns: 84px 92px 1fr 60px; }
  .jrow__date, .jrow__acct, .jrow__min { border-left: 1px solid var(--rule-2); }
  .jrow__date { font-size: 13px; padding-top: 17px !important; color: var(--ink-2); }
  .jrow__acct { color: var(--ink); }
  .jrow__sum { max-width: 60em; }
}

/* Notes to the accounts */
.sec--notes { background: var(--sheet); }
.notes { display: grid; gap: 40px; }
@media (min-width: 900px) { .notes { grid-template-columns: 5fr 7fr; gap: 64px; align-items: start; } }
.notes__list { list-style: none; margin: 8px 0 28px; padding: 0; counter-reset: n; }
.notes__list li { display: grid; grid-template-columns: 1fr; gap: 2px 20px; padding: 16px 0; border-top: 1px solid var(--rule-2); }
@media (min-width: 600px) { .notes__list li { grid-template-columns: 88px 1fr; } .notes__list li p, .notes__list li h3 { grid-column: 2; } .notes__n { grid-row: 1 / span 2; } }
.notes__n { font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--red); padding-top: 5px; }
.notes__list h3 { margin: 0; font-size: 21px; font-weight: 500; line-height: 1.3; }
.notes__list p { margin: 0; color: var(--ink-2); font-size: 16.5px; }

/* ---------- Category head ---------- */
.acc-head { padding: 32px 0 40px; }
.acc-head__grid { display: grid; gap: 20px; }
.acc-head__code { font-size: 88px; font-weight: 700; line-height: .8; letter-spacing: -.06em; color: transparent; -webkit-text-stroke: 1.5px var(--red); }
.crumbs { font-family: var(--mono); font-size: 12px; color: var(--ink-3); display: flex; flex-wrap: wrap; gap: 6px 8px; margin: 0 0 16px; }
.crumbs a { text-decoration: none; border-bottom: 1px solid var(--rule-3); }
.acc-head__h1 { font-weight: 500; font-size: clamp(36px, 7vw, 60px); line-height: 1.02; letter-spacing: -.025em; margin: 0 0 16px; }
.acc-head__desc { font-size: 19px; color: var(--ink-2); margin: 0 0 24px; max-width: 36em; }
.acc-head__stats { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; margin: 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.acc-head__stats div { padding: 8px 20px 8px 0; margin-right: 20px; border-right: 1px solid var(--rule-2); }
.acc-head__stats div:last-child { border-right: 0; margin-right: 0; }
.acc-head__stats dt { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); }
.acc-head__stats dd { margin: 0; font-size: 18px; font-weight: 500; }
.plate--head { border: 1px solid var(--rule-3); }
@media (min-width: 960px) {
  .acc-head { padding: 56px 0 56px; }
  .acc-head__grid { grid-template-columns: 220px minmax(0, 1fr) 380px; gap: 40px; align-items: start; }
  .acc-head__code { font-size: 112px; padding-top: 40px; }
}
.acc-foot { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); text-align: right; margin: 12px 0 0; padding-top: 8px; border-top: 4px double var(--ink); }
.empty { background: var(--sheet); border: 1px dashed var(--rule-3); padding: 24px; }
.sec--others .accts { gap: 36px 16px; }

/* ---------- Article ---------- */
.entry { padding: 32px 0 56px; }
.entry__grid { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); }
.entry__h1 { font-weight: 500; font-size: clamp(34px, 6.4vw, 56px); line-height: 1.05; letter-spacing: -.024em; margin: 0 0 18px; max-width: 20em; font-variation-settings: "opsz" 72; }
.entry__meta { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); margin: 0; }
.tag { text-decoration: none; background: var(--ink); color: var(--sheet); padding: 4px 9px; }
.tag:hover { background: var(--red); color: #fff; }
.slip__card { background: var(--sheet); border: 1px solid var(--rule-3); border-top: 2px solid var(--ink); padding: 14px 16px; }
.slip__h { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-3); margin: 0 0 8px; }
.slip__h--toc { margin-top: 20px; }
.slip dl { margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); }
.slip dl div { padding: 6px 0; border-bottom: 1px solid var(--rule); }
.slip dt { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
.slip dd { margin: 0; font-size: 15px; }
.slip dd a { text-decoration: none; border-bottom: 1px solid var(--rule-3); }
.slip__p { font-size: 16px; color: var(--ink-2); margin: 0; }
.slip__seal { width: 110px; height: 110px; margin: 16px 0 0 auto; transform: rotate(-10deg); mix-blend-mode: multiply; opacity: .85; }
.toc { list-style: none; margin: 0; padding: 0; font-size: 14.5px; line-height: 1.35; }
.toc li { border-bottom: 1px solid var(--rule); }
.toc a { display: grid; grid-template-columns: 30px 1fr; padding: 7px 0; text-decoration: none; color: var(--ink-2); }
.toc a .num { font-size: 11px; color: var(--red); padding-top: 2px; }
.toc a:hover { color: var(--red); }
@media (max-width: 1039px) { .slip .toc, .slip__h--toc { display: none; } }

@media (min-width: 1040px) {
  .entry { padding: 48px 0 80px; }
  .entry__grid { grid-template-columns: 250px minmax(0, 760px); column-gap: 72px; justify-content: start; }
  .entry__head { grid-column: 2; }
  .slip { grid-column: 1; grid-row: 1 / span 2; position: relative; }
  .slip__card { position: sticky; top: 20px; max-height: calc(100vh - 40px); overflow: auto; }
  .entry__main { grid-column: 2; position: relative; }
  .entry__main::before, .entry__head::before { /* red double margin rule down the page */
    content: ""; position: absolute; top: -24px; bottom: 0; left: -38px; width: 5px;
    border-left: 1px solid var(--red-soft); border-right: 1px solid var(--red-soft);
  }
  .entry__head { position: relative; }
}
@media (min-width: 1240px) { .entry__grid { grid-template-columns: 280px minmax(0, 760px); column-gap: 88px; } .entry__main::before, .entry__head::before { left: -46px; } }

/* TL;DR */
.tldr { background: var(--sheet); border: 1px solid var(--ink); margin: 8px 0 40px; position: relative; }
.tldr__h { display: flex; justify-content: space-between; margin: 0; padding: 8px 16px; border-bottom: 1px solid var(--ink); font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .12em; }
.tldr__h .num { color: var(--red); font-weight: 700; }
.tldr__t { margin: 0; padding: 16px 18px 18px; font-size: 19px; line-height: 1.55; }
.tldr::after { content: ""; display: block; height: 4px; border-top: 1px solid var(--red); border-bottom: 1px solid var(--red); margin: 0 18px 12px; }

/* Prose (writer body) */
.prose { font-size: 19px; line-height: 1.68; counter-reset: sec; }
.prose > * { max-width: 40em; }
.prose p { margin: 0 0 1.1em; }
.prose h2 {
  counter-increment: sec; font-weight: 500; font-size: clamp(26px, 3.6vw, 33px); line-height: 1.16; letter-spacing: -.018em;
  margin: 2.1em 0 .7em; padding-top: 14px; border-top: 1px solid var(--ink); position: relative; scroll-margin-top: 20px;
}
.prose h2::before { content: "§ " counter(sec); display: block; font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em; color: var(--red); margin-bottom: 8px; }
.prose h3 { font-size: 22px; font-weight: 600; line-height: 1.3; margin: 1.6em 0 .5em; }
.prose a { color: var(--ink); text-decoration-color: var(--red); }
.prose a:hover { color: var(--red); }
.prose strong { font-weight: 600; }
.prose ul, .prose ol { padding-left: 0; margin: 0 0 1.3em; list-style: none; }
.prose li { position: relative; padding-left: 34px; margin: 0 0 .5em; }
.prose ul > li::before { content: ""; position: absolute; left: 6px; top: .72em; width: 14px; height: 1px; background: var(--ink); }
.prose ol { counter-reset: li; }
.prose ol > li { counter-increment: li; }
.prose ol > li::before { content: counter(li, decimal-leading-zero); position: absolute; left: 0; top: .28em; font-family: var(--mono); font-size: 12.5px; color: var(--red); }
.prose blockquote { margin: 1.6em 0; padding: 14px 20px 14px 22px; background: var(--sheet); border-left: 5px double var(--red); font-style: italic; font-size: 20px; color: var(--ink-2); }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose hr { border: 0; border-top: 4px double var(--ink); margin: 2em 0; }
.prose code { font-family: var(--mono); font-size: .82em; background: var(--sheet); padding: 1px 5px; }

/* Tables in the body: ledger sheets */
.prose table {
  max-width: none; width: 100%; border-collapse: collapse; margin: 1.6em 0 2em; background: var(--sheet); font-size: 15.5px; line-height: 1.4;
  border-top: 2px solid var(--ink); border-bottom: 4px double var(--ink);
  display: block; overflow-x: auto;
}
@media (min-width: 700px) { .prose table { display: table; } }
.prose thead th {
  font-family: var(--mono); font-size: 10.5px; font-weight: 500; text-transform: uppercase; letter-spacing: .09em; color: var(--ink-3);
  text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--rule-3); vertical-align: bottom;
}
.prose td, .prose tbody th { padding: 11px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; text-align: left; min-width: 110px; }
.prose td + td, .prose th + th, .prose th + td { border-left: 1px solid var(--rule-2); }
.prose td:not(:first-child):not(:last-child) { font-family: var(--mono); font-size: 13.5px; font-variant-numeric: tabular-nums slashed-zero; white-space: nowrap; }
.prose td:last-child:not(:first-child) { font-size: 15px; color: var(--ink-2); }
.prose td:first-child { font-weight: 500; }
.prose tbody tr:hover td { background: #fff; }
.prose tbody tr:has(strong) td { font-weight: 700; }
.prose tbody tr:last-child:has(strong) td { color: var(--red); border-top: 1px solid var(--ink); }
.prose caption { caption-side: bottom; text-align: left; font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); padding-top: 8px; }

/* FAQ: audit queries */
.queries { margin-top: 56px; border-top: 4px double var(--ink); padding-top: 24px; }
.queries__h { font-weight: 500; font-size: clamp(26px, 3.6vw, 33px); letter-spacing: -.018em; margin: 0 0 12px; }
.query { padding: 18px 0; border-bottom: 1px solid var(--rule-2); }
.query__q { margin: 0 0 8px; font-size: 20px; font-weight: 600; line-height: 1.35; display: grid; grid-template-columns: 58px 1fr; }
.query__q .num { font-size: 12px; color: var(--red); font-weight: 700; padding-top: 5px; }
.query__a { margin: 0; padding-left: 58px; font-size: 17.5px; line-height: 1.62; color: var(--ink-2); max-width: 40em; }
@media (max-width: 599px) { .query__q { grid-template-columns: 1fr; } .query__a { padding-left: 0; } }
.notes-inline { margin-top: 48px; border-top: 4px double var(--ink); padding-top: 24px; }

/* Chart of accounts list (article + 404) */
.coa-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; border-top: 2px solid var(--ink); background: var(--sheet); }
@media (min-width: 700px) { .coa-list { grid-template-columns: repeat(2, 1fr); column-gap: 0; } .coa-list li:nth-child(odd) { border-right: 1px solid var(--rule-2); } }
.coa-list li { display: flex; } .coa-list a { flex: 1; line-height: 1.3; display: grid; grid-template-columns: 56px 1fr auto; gap: 10px; padding: 13px 14px; border-bottom: 1px solid var(--rule-2); text-decoration: none; font-size: 18px; align-items: baseline; }
.coa-list .num { font-size: 12.5px; color: var(--ink-3); }
.coa-list__n { color: var(--red) !important; }
.coa-list a:hover, .coa-list a[aria-current] { background: #fff; color: var(--red); }

/* ---------- 404 ---------- */
.lost { padding: 56px 0 80px; }
.lost__in { display: grid; gap: 40px; }
@media (min-width: 900px) { .lost__in { grid-template-columns: 5fr 7fr; gap: 64px; align-items: start; } }
.lost__t { background: var(--sheet); border: 1px solid var(--rule-3); border-top: 2px solid var(--ink); }
.lost__t td, .lost__t th { border-bottom: 1px solid var(--rule); }
.lost__t tr.total th { font-family: var(--serif); font-weight: 600; font-size: 18px; color: var(--red); height: 60px; }
.lost__t tr.total .c-amt { color: var(--red); font-weight: 700; }
.lost__p { font-size: 19px; color: var(--ink-2); max-width: 32em; }
.lost .coa-list { margin-top: 32px; }

/* ---------- Footer ---------- */
.foot { background: var(--ink); color: #cfdcc7; padding: 0 0 28px; margin-top: 0; font-size: 15.5px; }
.foot__rule { height: 7px; border-bottom: 1px solid #5c6f60; border-top: 0; margin-bottom: 40px; }
.foot__grid { display: grid; gap: 32px; }
@media (min-width: 900px) { .foot__grid { grid-template-columns: 5fr 4fr 3fr; gap: 56px; } }
.foot__name { font-size: 24px; font-weight: 600; color: #fff; margin: 12px 0 6px; }
.foot p { margin: 0 0 10px; }
.foot__small { font-family: var(--mono); font-size: 11.5px; color: #9fb29a; line-height: 1.6; }
.foot__h { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: #9fb29a; }
.foot__coa { list-style: none; margin: 0; padding: 0; }
.foot__coa li { border-bottom: 1px solid #2f3b33; }
.foot__coa a { display: block; padding: 7px 0; text-decoration: none; color: #e6eee0; }
.foot__coa a:hover { color: #fff; text-decoration: underline; }
.foot__coa .num { color: #e3857e; font-size: 12px; margin-right: 8px; }
.foot__close { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 40px; padding-top: 12px; border-top: 4px double #e3857e; font-family: var(--mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: #9fb29a; }
.foot img { filter: none; }

@media (max-width: 599px) {
  .sheet__note { padding-right: 90px; }
  .acct .plate { aspect-ratio: 16 / 6; }
  .acct .plate__fallback .num { font-size: 56px; }
}
@media (max-width: 759px) {
  .plate--head { aspect-ratio: 16 / 6; }
  .jrow__sum { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .jrow__title { font-size: 18px; }
}

.plate__icon { position: absolute; left: 44px; top: 50%; width: 30%; max-width: 120px; height: auto; transform: translateY(-50%); background: var(--sheet-2); padding: 6px; outline: 1px solid var(--rule-2); }
.plate--tall .plate__icon { max-width: 180px; width: 44%; left: 50%; transform: translate(-50%, -50%); }
@media (max-width: 599px) { .acct .plate__icon, .plate--head .plate__icon { width: 64px; height: 64px; left: 40px; } }
