:root {
  --ink: #142e2c;
  --green: #155b4c;
  --warm: #f6f3eb;
  --line: #ced8d1;
  --serif: Georgia, "Times New Roman", serif;
  color: var(--ink);
  background: #fff;
  font:
    18px/1.62 system-ui,
    -apple-system,
    sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
header,
.hero > div,
.summary,
.layout,
footer {
  max-width: 1190px;
  margin: auto;
  padding-left: clamp(20px, 4vw, 56px);
  padding-right: clamp(20px, 4vw, 56px);
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 17px;
  padding-bottom: 17px;
}
.brand {
  font: 600 1.25rem var(--serif);
  letter-spacing: -0.03em;
}
nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
a {
  color: var(--green);
  text-underline-offset: 4px;
}
header a {
  font-size: 0.83rem;
}
a[aria-current="page"] {
  color: var(--ink);
  font-weight: 700;
  text-decoration-thickness: 2px;
}
.hero {
  background: var(--warm);
  border-block: 1px solid #ebe6d8;
}
.hero > div {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  align-items: center;
  gap: 40px;
  padding-top: 44px;
  padding-bottom: 44px;
}
h1,
h2,
h3,
blockquote {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.12;
}
h1 {
  font-size: clamp(2.15rem, 4.65vw, 3.7rem);
  letter-spacing: -0.045em;
  margin: 0 0 15px;
}
h2 {
  font-size: clamp(1.75rem, 3.2vw, 2.45rem);
  letter-spacing: -0.035em;
  margin: 0 0 18px;
}
h3 {
  font-size: 1.4rem;
  margin: 25px 0 6px;
}
.lead {
  font-size: 1.04rem;
  line-height: 1.5;
  max-width: 45ch;
  margin: 0;
}
.video {
  margin: 0;
}
video {
  display: block;
  width: 100%;
  aspect-ratio: 16/9;
  background: #103b3a;
  border-radius: 6px;
}
figcaption,
.fine,
footer {
  font-size: 0.83rem;
  color: #465d56;
}
figcaption {
  margin-top: 6px;
}
.summary {
  padding-top: 32px;
  padding-bottom: 26px;
}
.summary > div {
  border-left: 4px solid #487c66;
  padding: 4px 22px;
}
.summary h2 {
  font-size: 1.6rem;
  margin-bottom: 8px;
}
.summary ul {
  margin: 0;
  padding-left: 1.1em;
}
.summary li {
  margin: 4px 0;
}
.layout {
  display: grid;
  grid-template-columns: minmax(170px, 240px) minmax(0, 720px);
  gap: clamp(26px, 5vw, 72px);
  align-items: start;
}
.contents {
  position: sticky;
  top: 20px;
  padding-top: 24px;
}
.contents nav {
  display: grid;
  gap: 9px;
  font-size: 0.9rem;
}
.contents strong {
  display: block;
  margin-bottom: 10px;
}
.article section {
  border-top: 1px solid var(--line);
  padding: 29px 0 14px;
  scroll-margin-top: 15px;
}
.article p {
  margin: 0 0 16px;
}
.article li {
  margin: 0.5em 0;
}
.article ul,
.article ol {
  padding-left: 1.35em;
}
.article blockquote {
  margin: 22px 0;
  padding: 17px 20px;
  background: #edf4ee;
  border-left: 3px solid #6a997a;
  font-size: 1.4rem;
}
.tablewrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
  font-size: 0.94rem;
}
caption {
  text-align: left;
  font-weight: 650;
  margin: 0 0 10px;
}
td,
th {
  text-align: left;
  padding: 12px 9px;
  border-bottom: 1px solid var(--line);
}
thead {
  background: #e8efe8;
}
tbody th {
  font-size: 0.9rem;
}
th small {
  display: block;
  font-size: 0.8rem;
  font-weight: 400;
}
.fine {
  line-height: 1.45;
  padding-top: 9px;
}
.graphic,
.worksheet {
  margin: 20px 0;
  background: #f0f5ef;
  padding: clamp(14px, 3vw, 24px);
  border-radius: 5px;
}
.graphic figcaption {
  font-size: 1rem;
  font-weight: 650;
  color: var(--ink);
  margin: 0 0 14px;
}
.stack {
  display: flex;
  height: 29px;
}
.stack i:first-child {
  background: #216657;
}
.stack i:last-child {
  background: #dbae66;
}
.legend {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.85rem;
  margin-top: 12px;
}
.legend b {
  display: block;
  font-size: 1.2rem;
}
.worksheet fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr minmax(100px, 150px);
  align-items: center;
  gap: 12px;
}
.worksheet legend {
  font-weight: 650;
  margin-bottom: 14px;
}
.worksheet input {
  font: inherit;
  padding: 7px 10px;
  max-width: 100%;
  border: 1px solid #779586;
  border-radius: 3px;
}
.worksheet output {
  display: block;
  font-weight: 700;
  margin-top: 20px;
}
.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}
button {
  font: inherit;
  font-size: 0.85rem;
  border: 1px solid #55786a;
  background: white;
  color: var(--ink);
  padding: 7px 12px;
  border-radius: 3px;
  cursor: pointer;
}
details {
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}
summary {
  cursor: pointer;
  font-weight: 650;
}
details p {
  padding-top: 10px;
}
footer {
  padding-block: 24px 50px;
  border-top: 1px solid var(--line);
  margin-top: 24px;
}
.skip {
  position: absolute;
  top: -200px;
}
.skip:focus {
  top: 0;
  background: white;
  z-index: 3;
}
:focus-visible {
  outline: 3px solid #b37513;
  outline-offset: 3px;
}
@media (max-width: 780px) {
  .hero > div {
    grid-template-columns: 1fr;
    gap: 18px;
    padding-block: 25px;
  }
  .layout {
    display: block;
  }
  .contents {
    position: static;
    padding: 0 0 20px;
  }
  .contents nav {
    display: flex;
    gap: 8px 15px;
  }
  .summary {
    padding-block: 22px;
  }
  header {
    flex-wrap: wrap;
    gap: 8px;
  }
  header nav {
    gap: 12px;
  }
  .article section {
    padding-top: 23px;
  }
}
@media (max-width: 460px) {
  :root {
    font-size: 16px;
  }
  td,
  th {
    padding: 9px 5px;
    font-size: 0.81rem;
  }
  th small {
    font-size: 0.75rem;
  }
  .hero > div {
    gap: 14px;
  }
  .worksheet fieldset {
    grid-template-columns: 1fr 94px;
  }
  .brand {
    width: 100%;
  }
}
@media print {
  header nav,
  .skip,
  .video,
  .contents,
  .actions,
  footer,
  details,
  .related {
    display: none !important;
  }
  .hero > div,
  .layout {
    display: block;
  }
  .hero,
  .summary,
  .article section {
    border: 0;
  }
  body.income header,
  body.income .hero,
  body.income .summary,
  body.income .article > section:not(#worksheet) {
    display: none;
  }
  body.income #worksheet {
    margin: 0;
  }
  body.income #worksheet:before {
    content: "Retire Handbook  /  Monthly income worksheet";
    font-weight: bold;
  }
  body.income #worksheet > p {
    display: none;
  }
  .worksheet {
    border: 1px solid #777;
  }
  body {
    font-size: 11pt;
  }
  .layout,
  .summary,
  .hero > div {
    padding-inline: 0;
  }
  section {
    break-inside: auto;
  }
  table,
  figure,
  form {
    break-inside: avoid;
  }
}
.change {
  display: block;
  margin-top: 3px;
  font-size: 0.72rem;
  line-height: 1.4;
  color: #475e54;
}
.change:after {
  content: "";
  display: block;
  height: 5px;
  background: #428572;
  width: var(--w);
  margin-top: 3px;
}
.loss:after {
  background: #af7049;
}
.flat:after {
  background: #758177;
}
.tool,
.paper {
  padding: clamp(16px, 3vw, 26px);
  margin: 24px 0;
  background: #f0f5ef;
  border-radius: 5px;
}
.paper {
  background: #faf6ed;
  border: 1px solid #dcd4c2;
}
.paper > header {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  padding: 0 0 9px;
  border-bottom: 1px solid #b6ae99;
}
.paper > header span,
.paper figcaption {
  font-size: 0.85rem;
  color: #4a544d;
}
.paper dl {
  margin: 16px 0 0;
}
.paper dt {
  font-weight: 650;
}
.paper dd {
  margin: 0 0 14px;
}
.tool label {
  display: block;
  font-weight: 650;
}
.control {
  display: flex;
  align-items: center;
  gap: 16px;
}
.control input {
  flex: 1;
  width: 0;
  height: 42px;
  accent-color: var(--green);
}
.control output {
  min-width: 5ch;
  text-align: right;
  font-size: 1.25rem;
  font-variant-numeric: tabular-nums;
}
.ends {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  max-width: 80%;
}
.bars {
  margin: 20px 0 0;
}
.bars > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin: 8px 0;
}
.bars i {
  width: 100%;
  background: #d6e3d6;
  height: 8px;
  display: block;
}
.bars em {
  display: block;
  height: 8px;
  background: #327460;
}
.ledger {
  margin: 16px 0 0;
}
.ledger > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid #c8d1c6;
}
.ledger > div:last-child {
  font-weight: 700;
  border: 0;
}
.ledger dt {
  font-weight: 400;
}
.ledger dd {
  font-weight: 650;
  white-space: nowrap;
  margin: 0;
}
.yeargrid,
.periods {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  margin: 20px 0;
}
.yeargrid > div,
.periods > div {
  padding: 14px 10px;
  background: #eef3eb;
  text-align: center;
  font-size: 0.9rem;
}
.yeargrid b,
.periods strong {
  display: block;
  margin-top: 8px;
  font: normal 1.65rem var(--serif);
}
.yeargrid .selected,
.periods > div:first-child {
  background: #1e514a;
  color: #fff;
}
.periods {
  grid-template-columns: repeat(2, 1fr);
}
.periods small {
  display: block;
  line-height: 1.5;
  margin-top: 8px;
}
.bars b,
.ledger dd {
  font-variant-numeric: tabular-nums;
}
.contents {
  position: static;
}
.contents nav {
  gap: 6px;
}
.tool .fine {
  margin-bottom: 0;
}
@media (max-width: 480px) {
  .yeargrid > div {
    padding: 10px 3px;
  }
  .periods {
    grid-template-columns: 1fr;
  }
  .periods > div {
    text-align: left;
  }
  .paper > header {
    gap: 4px 10px;
  }
}
.scene {
  margin: 20px 0 26px;
}
.scene img {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  object-position: center 45%;
  display: block;
  border-radius: 4px;
}
.mobile-contents {
  display: none;
}
@media (max-width: 780px) {
  .contents {
    display: none;
  }
  .mobile-contents {
    display: block;
    border-block: 1px solid var(--line);
    margin: 0 0 15px;
  }
  .mobile-contents nav {
    display: grid;
    gap: 9px;
    padding: 10px 0;
  }
}
@media print {
  .mobile-contents {
    display: none;
  }
}

/* Each chapter starts with the reader's question. Smaller headings carry the examples. */
.contents {
  position: sticky;
  top: 18px;
  padding: 18px 16px;
  border-block: 1px solid var(--line);
}
.contents nav a {
  text-decoration: none;
  display: block;
  padding: 6px 0;
  line-height: 1.4;
}
.contents nav a:hover,
.contents nav a:focus-visible {
  text-decoration: underline;
}
.article .chapter {
  border-top: 2px solid #557e72;
  padding-top: 32px;
}
.article .subtopic {
  border-top: none;
  padding: 12px 0 16px;
}
.article .subtopic > h3:first-child {
  font-size: clamp(1.45rem, 2.4vw, 1.9rem);
  margin: 4px 0 15px;
}
.article h4 {
  font-size: 1.04rem;
  margin: 20px 0 5px;
}
.article p {
  max-width: 66ch;
}
.explainer {
  margin: 20px 0 24px;
  padding: clamp(16px, 3vw, 28px);
  border: 1px solid #c4d4cb;
  border-radius: 8px;
  background: #f5f7f1;
}
.explainer figcaption {
  font: 600 1.13rem/1.35 var(--serif);
  color: var(--ink);
  margin: 0 0 18px;
}
.article .figure-note {
  margin: 14px 0 0;
  font-size: 0.85rem;
  line-height: 1.5;
  color: #425750;
}
.statements,
.spread {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.statements > div,
.spread a {
  display: grid;
  gap: 4px;
  background: white;
  border: 1px solid #cfdbd3;
  border-top: 4px solid #377d6b;
  padding: clamp(10px, 2vw, 19px);
}
.statements > div:last-child {
  border-top-color: #a76d43;
}
.statements b,
.spread b {
  font: 500 clamp(1.5rem, 3vw, 2rem) / 1.3 var(--serif);
  font-variant-numeric: tabular-nums;
}
.statements span,
.spread small {
  font-size: 0.9rem;
  font-weight: 650;
}
.statements small,
.spread span {
  font-size: 0.89rem;
  line-height: 1.45;
}
.spread a {
  text-decoration: none;
  color: var(--ink);
}
.spread small {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.loss-strip,
.months {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 3px;
}
.loss-strip i {
  height: 30px;
  border-radius: 3px;
  background: #377d6b;
}
.visual-key {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 12px;
  font-size: 0.88rem;
}
.visual-key i {
  width: 12px;
  height: 12px;
  display: inline-block;
  background: #377d6b;
  margin-right: 6px;
}
.loss-strip .owner,
.visual-key .owner,
.cashbar i:last-child {
  background: repeating-linear-gradient(135deg, #e9c998 0 5px, #b47d43 5px 7px);
}
.rowchart {
  margin: 0;
}
.rowchart > div {
  padding: 8px 0;
}
.rowchart dt {
  font-size: 0.9rem;
}
.rowchart dd {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 5ch;
  gap: 14px;
  align-items: center;
  margin: 4px 0 0;
}
.rowchart dd span {
  background: linear-gradient(
    to right,
    #317867 var(--share),
    #dce7df var(--share)
  );
  height: 12px;
  border-radius: 3px;
}
.rowchart dd b {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.article .steps {
  padding-left: 1.7em;
}
.steps li::marker {
  color: #245c4b;
  font-weight: 700;
}
.cashbar {
  display: flex;
  height: 35px;
  border-radius: 3px;
  overflow: hidden;
}
.cashbar i:nth-child(1) {
  width: 65.625%;
  background: #256659;
}
.cashbar i:nth-child(2) {
  width: 18.75%;
  background: #a4c8b2;
}
.cashbar i:nth-child(3) {
  width: 15.625%;
}
.cashkey {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 26px;
  margin: 14px 0 0;
}
.cashkey dt {
  font-size: 0.85rem;
}
.cashkey dd {
  margin: 2px 0 0;
  font: 1.45rem var(--serif);
}
.months span {
  text-align: center;
  font-size: 0.79rem;
  padding: 9px 0;
  font-weight: 650;
}
.months .before {
  background: #377d6b;
  color: white;
}
.months .after {
  background: #e7c493;
}
@media (max-width: 570px) {
  .months {
    grid-template-columns: repeat(6, 1fr);
  }
  .statements,
  .spread {
    gap: 6px;
  }
  .statements b {
    font-size: clamp(1.15rem, 4.9vw, 1.6rem);
  }
  .spread {
    grid-template-columns: 1fr;
  }
  .cashkey {
    gap: 8px 16px;
  }
}
@media print {
  body.income #worksheet h2,
  body.income #worksheet h3 {
    margin-bottom: 10px;
  }
}
