/* Josh Willingham, Fractional CFO
   Written phone first. Every rule below is the small screen; the few
   min-width blocks are the only things a desktop adds.
   Serif for what a person says. Sans for what a ledger says. */

@font-face {
  font-family: 'Inter var';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/inter-latin-var.woff2') format('woff2');
}

:root {
  /* Light only. The palette below is the whole palette. */
  color-scheme: light;

  --paper:    #FBFAF7;
  --raise:    #F4F2EC;
  --ink:      #14140F;
  --ink-soft: #55554C;
  --rule:     rgba(20, 20, 15, 0.13);
  --rule-2:   rgba(20, 20, 15, 0.28);
  --tap:      rgba(20, 20, 15, 0.06);
  --warn:     #8E3A22;

  --serif: ui-serif, 'New York', Georgia, 'Times New Roman', serif;
  --sans: 'Inter var', -apple-system, BlinkMacSystemFont, 'Segoe UI',
          system-ui, Helvetica, Arial, sans-serif;

  --ease: cubic-bezier(0.22, 0.61, 0.24, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  /* Nothing on either page may push the viewport sideways. */
  overflow-x: hidden;
}

h1, h2, p, dl, dd, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

a { color: inherit; touch-action: manipulation; -webkit-tap-highlight-color: var(--tap); }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--ink); color: var(--paper); }

.vh {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}

/* Safe-area padding so a notched phone in landscape never clips the text. */
.card {
  max-width: 34rem;
  margin-inline: auto;
  padding: 2.75rem
           max(1.375rem, env(safe-area-inset-right))
           max(3rem, env(safe-area-inset-bottom))
           max(1.375rem, env(safe-area-inset-left));
}
.card--read { max-width: 38rem; }

@media (min-width: 40rem) {
  .card { padding-top: 4rem; padding-inline: 2rem; padding-bottom: 4.5rem; }
}

/* ---------- Letterhead ---------- */

.who { display: flex; align-items: center; gap: 0.875rem; }

.who__face {
  flex: none; width: 3.25rem; height: auto;
  border-radius: 2px; filter: saturate(0.85);
}
.who__name {
  font-family: var(--serif); font-size: 1.5rem;
  font-weight: 400; line-height: 1.1; letter-spacing: -0.017em;
}
.who__role {
  margin-top: 0.3125rem; color: var(--ink-soft);
  font-size: 0.8125rem; line-height: 1.4;
}

.lede {
  margin-top: 2.25rem;
  font-family: var(--serif);
  font-size: 1.3125rem; line-height: 1.32; letter-spacing: -0.016em;
  text-wrap: pretty;
}

@media (min-width: 40rem) {
  .who__face { width: 3.75rem; }
  .who__name { font-size: 1.75rem; }
  .lede { margin-top: 2.75rem; font-size: 1.625rem; max-width: 22ch; text-wrap: balance; }
}

/* ---------- Scale ----------
   Three numbers, banded by hairlines so they read as a spec block and not
   as floating text. This is the part that gets scanned. */

.figs__k {
  margin-top: 2.25rem; color: var(--ink-soft);
  font-size: 0.625rem; font-weight: 500; letter-spacing: 0.16em;
  text-transform: uppercase;
}

.figs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0 1rem;
  margin-top: 0.875rem;
  padding-block: 1.375rem;
  border-block: 1px solid var(--rule);
}

.figs dt {
  font-family: var(--serif);
  font-size: 1.625rem; line-height: 1; letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.figs dd {
  margin-top: 0.4375rem; color: var(--ink-soft);
  font-size: 0.75rem; line-height: 1.4; text-wrap: pretty;
}

@media (min-width: 34rem) {
  .figs { gap: 0 1.75rem; }
  .figs dt { font-size: 2.25rem; }
}

.lbl {
  margin-top: 2.5rem; color: var(--ink-soft);
  font-size: 0.625rem; font-weight: 500; letter-spacing: 0.16em;
  text-transform: uppercase;
}

.prac {
  margin-top: 0.75rem; max-width: 44ch;
  font-size: 0.9375rem; line-height: 1.6; letter-spacing: -0.005em;
  text-wrap: pretty;
}

.work { margin-top: 1rem; }
.work li {
  padding-block: 0.6875rem;
  border-top: 1px solid var(--rule);
  font-size: 0.875rem; line-height: 1.5; letter-spacing: -0.004em;
}

/* ---------- The record, drawn ----------
   One unbroken bar. Two chairs, one discipline, nothing divided by an axis. */

.chart { margin-top: 1.125rem; }
.chart__k {
  margin-bottom: 0.75rem; color: var(--ink-soft);
  font-size: 0.625rem; font-weight: 500; letter-spacing: 0.16em;
  text-transform: uppercase;
}
.chart svg { display: block; width: 100%; max-width: 27rem; height: auto; }

.c-bar { fill: var(--ink); }
.c-bar--two { fill: var(--ink); opacity: 0.55; }

.c-role {
  fill: var(--ink); font-family: var(--sans);
  font-size: 12px; font-weight: 500; letter-spacing: -0.008em;
}
.c-sub {
  fill: var(--ink-soft); font-family: var(--sans);
  font-size: 10.5px; letter-spacing: -0.004em;
}
.c-year {
  fill: var(--ink-soft); font-family: var(--sans);
  font-size: 9px; font-weight: 500; letter-spacing: 0.1em;
  font-variant-numeric: tabular-nums;
}

/* ---------- Record ---------- */

.rec { margin-top: 2.25rem; }

.rec > div {
  display: grid; gap: 0.25rem 0;
  border-top: 1px solid var(--rule);
  padding-block: 0.9375rem;
}

.rec dt {
  color: var(--ink-soft);
  font-size: 0.6875rem; line-height: 1.4; letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}
.rec dd { font-size: 0.8125rem; line-height: 1.6; color: var(--ink-soft); }
.rec b {
  display: block; color: var(--ink);
  font-weight: 500; font-size: 0.9375rem; letter-spacing: -0.008em;
}

/* The role earns its own line in ink. On two of these four entries it is
   the whole signal, and it was sitting in grey with the supporting detail. */
.rec__role {
  display: block; margin-bottom: 0.3125rem;
  color: var(--ink); font-size: 0.875rem; letter-spacing: -0.006em;
}

@media (min-width: 34rem) {
  .rec > div { grid-template-columns: 6.25rem 1fr; gap: 0 1.25rem; }
  .rec dt { line-height: 1.75; }
}

/* ---------- The one onward link ----------
   Big enough to hit with a thumb without looking. */

.next {
  display: block; margin-top: 2.25rem;
  padding: 1.125rem 1.25rem 1.25rem;
  border: 1px solid var(--rule-2); border-radius: 4px;
  text-decoration: none;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.next:hover { border-color: var(--ink); background: var(--raise); }

.next__t {
  display: block;
  font-family: var(--serif); font-size: 1.125rem;
  line-height: 1.25; letter-spacing: -0.014em;
}
.next__t::after { content: ' →'; font-family: var(--sans); font-size: 0.8em; }
/* ---------- Article ---------- */

.back { font-size: 0.75rem; letter-spacing: 0.02em; }
.back a {
  color: var(--ink-soft); text-decoration: none;
  border-bottom: 1px solid var(--rule);
}
.back a::before { content: '← '; }
.back a:hover { color: var(--ink); }

.art { margin-top: 2rem; }

.art__h {
  font-family: var(--serif); font-weight: 400;
  font-size: 1.875rem; line-height: 1.13; letter-spacing: -0.024em;
  text-wrap: balance;
}
.art__sub {
  margin-top: 1rem; color: var(--ink-soft);
  font-size: 1rem; line-height: 1.55; text-wrap: pretty;
}
.art__by {
  display: flex; align-items: center; gap: 0.75rem;
  margin-top: 1.75rem; padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  font-size: 0.75rem; line-height: 1.5; color: var(--ink-soft);
}
.art__by img {
  flex: none; width: 2.5rem; height: auto;
  border-radius: 50%; filter: saturate(0.85);
}
.art__by b { display: block; color: var(--ink); font-weight: 500; font-size: 0.8125rem; }

@media (min-width: 40rem) {
  .art__h { font-size: 2.5rem; }
  .art__sub { font-size: 1.0625rem; }
}

article p {
  margin-top: 1.125rem;
  font-size: 1rem; line-height: 1.68; letter-spacing: -0.004em;
  text-wrap: pretty;
}

.drop { margin-top: 2rem; }

article h2 {
  margin-top: 2.75rem;
  font-family: var(--serif); font-weight: 400;
  font-size: 1.3125rem; line-height: 1.25; letter-spacing: -0.017em;
  text-wrap: balance;
}

.pull {
  margin-top: 1.75rem; padding-left: 1rem;
  border-left: 2px solid var(--ink);
  font-family: var(--serif); font-size: 1.125rem;
  line-height: 1.45; letter-spacing: -0.012em;
}

.pts { margin-top: 1.25rem; counter-reset: pt; }
.pts li {
  padding-block: 0.875rem;
  border-top: 1px solid var(--rule);
  font-size: 0.9375rem; line-height: 1.6; color: var(--ink-soft);
}
.pts b { color: var(--ink); font-weight: 500; }
.pts--num li { counter-increment: pt; }
.pts--num li::before {
  content: counter(pt, decimal-leading-zero);
  display: block; margin-bottom: 0.25rem;
  color: var(--ink-soft); font-size: 0.625rem;
  font-weight: 500; letter-spacing: 0.14em;
  font-variant-numeric: tabular-nums;
}

.note {
  margin-top: 1rem; color: var(--ink-soft);
  font-size: 0.8125rem; line-height: 1.6;
}

/* ---------- The spreadsheet ----------
   Thirteen columns will never fit a phone, so the grid scrolls inside its own
   box with the row labels pinned. The page itself never scrolls sideways. */

.sheetwrap {
  margin-top: 1.75rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--paper);
}

.grid {
  border-collapse: separate; border-spacing: 0; width: 100%;
  font-variant-numeric: tabular-nums; font-size: 0.75rem;
}

.grid__cap {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}

.grid th, .grid td {
  border-bottom: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
  padding: 0;
}
.grid tr > *:last-child { border-right: 0; }
.grid tfoot th, .grid tfoot td { border-bottom: 0; }

.grid thead th {
  background: var(--raise); padding: 0.5rem 0.5rem;
  color: var(--ink-soft);
  font-size: 0.625rem; font-weight: 500; letter-spacing: 0.08em;
  text-align: right;
}

.grid th[scope="row"], .grid__stub {
  position: sticky; left: 0; z-index: 2;
  background: var(--raise);
  padding: 0.5rem 0.625rem;
  min-width: 7.25rem;
  text-align: left; font-weight: 500; font-size: 0.6875rem;
  border-right: 1px solid var(--rule-2);
}

.cel {
  display: block; width: 100%; min-width: 4.75rem;
  appearance: none; border: 0; background: transparent; border-radius: 0;
  padding: 0.5rem;
  font: inherit; font-variant-numeric: tabular-nums;
  color: var(--ink); text-align: right;
}
.cel:hover { background: var(--raise); }
.cel:focus { outline: 2px solid var(--ink); outline-offset: -2px; background: var(--raise); }

.grid .is-void { background: var(--raise); }
.grid tfoot th[scope="row"] { background: var(--raise); }

.end {
  background: var(--raise); padding: 0.5625rem 0.5rem;
  text-align: right; font-weight: 500; white-space: nowrap;
}
.end.is-neg { color: var(--warn); }

@media (min-width: 40rem) {
  .grid th[scope="row"], .grid__stub { min-width: 9.5rem; padding-inline: 0.875rem; }
  .cel { min-width: 5.25rem; padding-inline: 0.625rem; }
}

.verdict {
  margin-top: 1.25rem; padding-top: 1.125rem;
  border-top: 1px solid var(--rule);
  color: var(--ink-soft); font-size: 0.9375rem; line-height: 1.65;
  text-wrap: pretty;
}
.verdict b { color: var(--ink); font-weight: 500; }

/* ---------- Close ---------- */

.cta {
  margin-top: 3.5rem; padding-top: 1.75rem;
  border-top: 2px solid var(--ink);
}
.cta__k {
  font-size: 0.625rem; font-weight: 500; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--ink-soft);
}
.cta__t {
  margin-top: 0.5rem; max-width: 34ch;
  font-size: 0.875rem; line-height: 1.55; color: var(--ink-soft);
}

.mail {
  margin-top: 1.5rem;
  font-family: var(--serif); font-size: 1.375rem;
  letter-spacing: -0.02em; overflow-wrap: anywhere;
}
.mail a, .also a {
  text-decoration: none; border-bottom: 1px solid var(--rule);
  transition: border-color 0.2s var(--ease);
}
.mail a:hover, .also a:hover { border-color: currentColor; }

.also {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  margin-top: 0.875rem; color: var(--ink-soft); font-size: 0.8125rem;
}

@media (min-width: 40rem) {
  .mail { font-size: 1.75rem; }
}

/* ---------- Foot ---------- */

.foot {
  margin-top: 3rem; padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  color: var(--ink-soft); font-size: 0.6875rem; line-height: 1.6;
}
.foot p + p { margin-top: 0.5rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

@media print {
  body { background: #fff; color: #000; }
  .next, .back { display: none; }
}
