:root {
  --paper: #ffffff;
  --ink: #111111;
  --muted: #2c2c2c;
  --rule: #e2e2e2;
  --accent: #565656;
  --subtitle: #565656;
  --image-surface: #ffffff;
}

:root[data-theme="dark"] {
  --paper: #161412;
  --ink: #efe6d8;
  --muted: #c0b4a1;
  --rule: #4f473e;
  --accent: #9cbad9;
  --subtitle: #a89d8e;
  --image-surface: #211d19;
}

* {
  box-sizing: border-box;
}

html {
  background: transparent;
  color-scheme: light dark;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Newsreader", Georgia, "Times New Roman", Times, serif;
  transition: background-color 240ms ease, color 240ms ease;
}

::selection { background: #ffe14a; color: var(--ink); }
::-moz-selection { background: #ffe14a; color: var(--ink); }

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-underline-offset: 2px;
  transition: text-decoration-color 140ms ease;
}
a:hover { text-decoration-color: var(--ink); }

.page {
  max-width: 980px;
  margin: 0 auto;
  padding: 40px 22px 72px;
}

.masthead {
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--rule);
}

.kicker {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.95rem;
  font-style: italic;
}

.section-kicker {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h1,
h2 {
  font-family: "Libre Bodoni", "Bodoni 72", "Didot", Georgia, serif;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.1rem);
}

h2 {
  margin: 0 0 14px;
  font-size: 1.45rem;
}

.post-subtitle {
  margin: 10px 0 0;
  color: var(--subtitle);
  font-size: 0.98rem;
  line-height: 1.5;
}

.part-title {
  font-weight: 600;
}

.lede,
.section-copy,
.subhead,
.aside,
.code-item {
  color: var(--muted);
  line-height: 1.65;
  font-size: 1.02rem;
}

.section {
  margin: 0 0 40px;
}

.section+.section {
  padding-top: 18px;
  border-top: 1px solid var(--rule);
}

.subhead {
  margin: -6px 0 10px;
  font-style: italic;
}

.section-list {
  margin: 0 0 14px 22px;
  color: var(--muted);
  line-height: 1.65;
  font-size: 1.02rem;
}

.section-list li {
  margin: 0 0 8px;
}

.aside {
  margin: 16px 0 0;
  padding-left: 14px;
  border-left: 2px solid var(--rule);
}

.chart {
  min-height: 420px;
  margin-top: 22px;
  width: 100%;
}

#qwi-software-vs-all-hires,
#qwi-turnover-comparison,
#qwi-software-turnover,
#qwi-software-earnings,
#qwi-age-benchmark-earnings {
  margin-top: 0;
}

.tight-qwi-block .section-copy {
  margin-bottom: 0;
}

.tight-qwi-block .subhead {
  margin-bottom: 6px;
}

.tight-cps-block .chart {
  margin-top: 12px;
}

.tight-cps-block .section-copy {
  margin-bottom: 8px;
}

.tight-cps-block .subhead {
  margin-bottom: 6px;
}

.tall-chart {
  min-height: 560px;
}

.image-block {
  margin: 22px 0;
}

.content-image {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: var(--image-surface);
}

.code-lists {
  display: grid;
  gap: 14px;
}

.code-list {
  padding: 14px 0;
  border-top: 1px solid var(--rule);
}

.code-list:first-child {
  border-top: 0;
  padding-top: 0;
}

.code-list-title {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 600;
}

.code-items {
  display: grid;
  gap: 6px;
}

.code-value {
  color: var(--ink);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.92rem;
}

.closing-cta {
  margin: 44px 0 0;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
}

.closing-cta p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
  font-size: 1.02rem;
}

.closing-cta .ps {
  font-style: italic;
  font-weight: 600;
  color: var(--ink);
}

.cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  font-size: 17px;
  font-style: italic;
  color: var(--ink);
  text-decoration: none;
  padding: 7px 13px;
  border-radius: 11px;
  line-height: 1.2;
  vertical-align: middle;
  transition: transform .2s ease, box-shadow .25s ease;
}
.cta em { position: relative; z-index: 2; font-style: italic; display: inline-block; transition: transform .18s ease; }
@keyframes cta-pastel { to { background-position: 300% center; } }
.cta:hover {
  background-image: linear-gradient(90deg,#ffd1e8,#ffe0c2,#fff4c2,#d4f5dd,#cdeffd,#e3d4ff,#ffd1e8);
  background-size: 300% auto;
  animation: cta-pastel 3s linear infinite;
  transform: translateY(-1px);
}
.cta:hover em { color: #fff; -webkit-text-fill-color: #fff; -webkit-text-stroke: 1px #3a1d6369; paint-order: stroke fill; text-shadow: 0 1px 2px rgba(40,20,80,.3); }
.cta-stk { position: relative; display: inline-block; width: 46px; height: 30px; flex: none; }
.cta-stk img {
  position: absolute; top: 50%; height: 30px; width: auto; margin-top: -15px; opacity: 0; transform: scale(0) rotate(0deg);
  filter: drop-shadow(0 2px 3px rgba(0,0,0,.20));
  transition: transform .34s cubic-bezier(.34,1.7,.5,1), opacity .2s ease;
}
.cta-stk .a { right: 20px; } .cta-stk .b { right: 0; }
.cta:hover .cta-stk .a { opacity: 1; transform: scale(1) rotate(-11deg); transition-delay: .03s; }
.cta:hover .cta-stk .b { opacity: 1; transform: scale(1) rotate(10deg); transition-delay: .1s; }
@media (prefers-reduced-motion: reduce) {
  .cta:hover { animation: none; transform: none; }
  .cta-stk img { transition: opacity .2s; }
  .cta:hover .cta-stk img { transform: scale(1) rotate(0deg); transition-delay: 0s; }
}

@media (max-width: 820px) {
  .page {
    padding: 24px 16px 56px;
  }
}