:root {
  --bg: #cabb95;
  --card-bg: rgba(202, 187, 149, 0.8);
  --card-bg-solid: #cabb95;
  --card-border: #33291f;
  --card-highlight: rgba(51, 41, 31, 0.06);
  --text-primary: #33291f;
  --text-secondary: rgba(51, 41, 31, 0.64);
  --text-tertiary: rgba(51, 41, 31, 0.44);

  --accent-1: #33291f;
  --accent-2: #33291f;
  --accent-3: #6b5136;
  --accent-soft: rgba(51, 41, 31, 0.07);
  --badge-free-bg: #8c3f34;
  --badge-free-text: #f2e9d8;

  --interest: #786246;
  --interest-soft: rgba(120, 98, 70, 0.18);
  --contrib: #33291f;
  --contrib-soft: rgba(51, 41, 31, 0.14);
  --multiple: #6b5136;

  --shadow-sm: none;
  --shadow-md: none;
  --shadow-lg: none;
  --shadow-glow: none;

  --track: rgba(51, 41, 31, 0.25);
  --input-bg: rgba(51, 41, 31, 0.05);
  --input-border: #33291f;

  --radius-lg: 0px;
  --radius-md: 0px;
  --radius-sm: 0px;

  --blob-1: transparent;
  --blob-2: transparent;
  --blob-3: transparent;
}

[data-theme="dark"] {
  --bg: #21170f;
  --card-bg: rgba(33, 23, 15, 0.78);
  --card-bg-solid: #21170f;
  --card-border: #e6d9bd;
  --card-highlight: rgba(230, 217, 189, 0.06);
  --text-primary: #e6d9bd;
  --text-secondary: rgba(230, 217, 189, 0.66);
  --text-tertiary: rgba(230, 217, 189, 0.44);

  --accent-1: #e6d9bd;
  --accent-2: #e6d9bd;
  --accent-3: #c2a67d;
  --accent-soft: rgba(230, 217, 189, 0.08);
  --badge-free-bg: #a8564a;
  --badge-free-text: #f2e9d8;

  --interest: #b39a76;
  --interest-soft: rgba(179, 154, 118, 0.2);
  --contrib: #e6d9bd;
  --contrib-soft: rgba(230, 217, 189, 0.14);
  --multiple: #c2a67d;

  --shadow-sm: none;
  --shadow-md: none;
  --shadow-lg: none;
  --shadow-glow: none;

  --track: rgba(230, 217, 189, 0.26);
  --input-bg: rgba(230, 217, 189, 0.06);
  --input-border: #e6d9bd;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: 'shackleton', Georgia, 'Times New Roman', serif;
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  transition: background 0.4s ease, color 0.4s ease;
  position: relative;
  overflow-x: hidden;
}

.bg-decoration {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background-image: url("TableV2Background.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: filter 0.4s ease;
}
[data-theme="dark"] .bg-decoration {
  filter: brightness(0.32) contrast(1.15) saturate(0.9);
}

.app {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 48px 24px 72px;
}

.app-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 36px;
  padding-bottom: 24px;
  border-bottom: 2px solid var(--text-primary);
}

.brand {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.brand-mark {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  background: transparent;
  text-decoration: none;
  transition: opacity 0.15s ease;
}
.brand-mark:hover { opacity: 0.7; }
.brand-mark svg { width: 22px; height: 22px; }
/* Recolor the raster silhouette by using it as a mask over a solid-color
   box, rather than drawing the (fixed-black) image directly — this way it
   always matches --text-primary exactly, in both themes, with no separate
   dark-mode override needed */
.brand-mark-icon {
  display: inline-block;
  position: relative;
  top: -7px;
  left: 5px;
  width: 42px;
  height: 42px;
  background-color: var(--text-primary);
  -webkit-mask-image: url(/BuffaloImage.png);
  mask-image: url(/BuffaloImage.png);
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

.kicker {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--accent-3);
  margin-bottom: 6px;
}
.kicker:hover { text-decoration: underline; }

.header-text h1 {
  font-family: 'shackleton', Georgia, serif;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin: 0 0 6px;
  letter-spacing: -0.01em;
  font-weight: 400;
  line-height: 1.15;
}

.header-text p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 1.1rem;
  white-space: nowrap;
}

.theme-toggle {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 2px solid var(--text-primary);
  background: var(--bg);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
  position: relative;
}

.theme-toggle:hover { transform: translateY(-2px); }
.theme-toggle svg { width: 19px; height: 19px; position: absolute; transition: opacity 0.25s ease, transform 0.4s ease; }
.icon-moon { opacity: 1; }
.icon-sun { opacity: 0; transform: rotate(-90deg) scale(0.7); }
[data-theme="dark"] .icon-moon { opacity: 0; transform: rotate(90deg) scale(0.7); }
[data-theme="dark"] .icon-sun { opacity: 1; transform: rotate(0) scale(1); }

.layout {
  display: grid;
  grid-template-columns: 372px 1fr;
  gap: 24px;
  align-items: start;
}

.home-layout {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.about-card {
  max-width: 1040px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 8px 0 32px;
}

.tools-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.tools-row-3 { grid-template-columns: repeat(3, 1fr); }

.tool-box {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 96px;
  color: inherit;
  text-decoration: none;
  font-family: 'shackleton', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  transition: background 0.15s ease;
}
.tool-box:hover { background: var(--accent-soft); }

.card.tool-box-featured {
  background: var(--card-border);
  color: var(--card-bg-solid);
  border-color: var(--card-border);
}
.card.tool-box-featured:hover { background: var(--accent-3); }

.tool-box-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--accent-3);
  color: var(--card-bg-solid);
  font-family: 'shackleton', Georgia, serif;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-left: 2px solid var(--card-border);
  border-bottom: 2px solid var(--card-border);
}

.tool-box-badge-free {
  background: var(--badge-free-bg);
  color: var(--badge-free-text);
}

.follow-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.follow-bar h2 { margin: 0; }
.follow-links {
  display: flex;
  align-items: center;
  gap: 24px;
}
.follow-links a {
  display: flex;
  color: var(--text-primary);
  transition: color 0.15s ease;
}
.follow-links a:hover { color: var(--interest); }
.follow-links svg { width: 26px; height: 26px; }

.youtube-embed-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 2px solid var(--card-border);
  background: #000;
  overflow: hidden;
}
.youtube-embed-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.about-photo {
  width: 320px;
  height: auto;
  flex-shrink: 0;
  display: block;
  border: 2px solid var(--card-border);
}

.about-text h2 {
  font-family: 'shackleton', Georgia, serif;
  font-size: 1.75rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  margin: 24px 0 0;
}

.bio-lede {
  font-family: 'shackleton', Georgia, serif;
  font-size: 2rem;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: 0 0 24px;
}

.bio-lede-line2 {
  display: block;
  margin-top: 12px;
}

.bio-body-line2 {
  display: block;
  margin-top: 12px;
}

.bio-body-cta {
  display: block;
  margin-top: 12px;
  color: var(--text-primary);
}
.bio-body .bio-body-cta a {
  color: var(--interest);
  text-decoration: underline;
}

.stat-highlight {
  color: var(--interest);
  font-weight: 400;
}

.bio-body {
  font-size: 1.4rem;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0 0 16px;
  max-width: 54ch;
}
.bio-body:last-of-type { margin-bottom: 0; }
.bio-body a {
  color: var(--text-primary);
  font-weight: 400;
  text-decoration: underline;
}
.bio-body a:hover { color: var(--interest); }

.card {
  background: var(--card-bg);
  border: 2px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 28px;
  position: relative;
}

.card h2 {
  font-family: 'shackleton', Georgia, serif;
  font-size: 1.15rem;
  margin: 0 0 22px;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.inputs-card {
  position: sticky;
  top: 24px;
}

.field {
  margin-bottom: 24px;
}

.field:last-child { margin-bottom: 0; }

.field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--text-secondary);
  margin-bottom: 9px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.field-hint {
  display: block;
  margin: -6px 0 9px;
  font-size: 0.82rem;
  font-style: italic;
  color: var(--text-tertiary);
}

.input-prefix, .input-suffix {
  display: flex;
  align-items: center;
  background: var(--input-bg);
  border: 2px solid var(--input-border);
  border-radius: var(--radius-sm);
  padding: 0 16px;
  transition: background 0.15s ease;
}

.input-prefix:focus-within, .input-suffix:focus-within {
  background: var(--accent-soft);
}

.input-prefix span, .input-suffix span {
  color: var(--text-tertiary);
  font-weight: 400;
  font-size: 0.98rem;
}

.input-prefix input, .input-suffix input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--text-primary);
  padding: 12px 8px;
  width: 100%;
  font-family: 'shackleton', Georgia, serif;
  letter-spacing: -0.01em;
}

.input-suffix input { text-align: left; }

select#frequency {
  width: 100%;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--input-border);
  background: var(--input-bg);
  color: var(--text-primary);
  font-size: 0.98rem;
  font-weight: 400;
  outline: none;
  cursor: pointer;
  appearance: none;
  font-family: inherit;
  transition: background 0.15s ease;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%232c2822' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
[data-theme="dark"] select#frequency {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23e7dcc4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}
select#frequency:focus {
  background: var(--accent-soft);
}

.slider {
  width: 100%;
  margin-top: 14px;
  -webkit-appearance: none;
  appearance: none;
  height: 3px;
  border-radius: 0;
  background: linear-gradient(to right, var(--text-primary) 0%, var(--text-primary) var(--fill, 50%), var(--track) var(--fill, 50%), var(--track) 100%);
  outline: none;
  cursor: pointer;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--text-primary);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 1.5px var(--text-primary);
  cursor: pointer;
  transition: transform 0.12s ease;
}
.slider::-webkit-slider-thumb:hover { transform: scale(1.15); }

.slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--text-primary);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 1.5px var(--text-primary);
  cursor: pointer;
}
.slider::-moz-range-progress {
  background: var(--text-primary);
  height: 3px;
  border-radius: 0;
}

.segmented {
  display: flex;
  background: transparent;
  border: 2px solid var(--input-border);
  border-radius: var(--radius-sm);
  padding: 0;
  gap: 0;
}

.seg-btn {
  flex: 1;
  padding: 10px 8px;
  border: none;
  border-right: 2px solid var(--input-border);
  background: transparent;
  border-radius: 0;
  color: var(--text-secondary);
  font-weight: 400;
  font-size: 0.85rem;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s ease, color 0.2s ease;
}
.seg-btn:last-child { border-right: none; }

.seg-btn.active {
  background: var(--text-primary);
  color: var(--bg);
}

.results-col {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.summary-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: stretch;
}

.ledger-table {
  margin: 24px -28px -28px;
  border-top: 2px solid var(--card-border);
  overflow: hidden;
}

.section-note {
  margin: -12px 0 0;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-style: italic;
}

.chart-target-note {
  margin: 24px 0 14px;
  color: var(--text-secondary);
  font-size: 0.98rem;
}
.chart-target-note strong {
  color: var(--text-primary);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

.newsletter-signup .formkit-form {
  margin: 0 auto;
}
/* Kit's embed reserves space for a modal-style header above ~700px wide,
   which reads as an oversized gap here since this is an inline form */
.newsletter-signup [data-style="clean"] {
  padding-top: 16px !important;
  padding-bottom: 0 !important;
}
/* Kit's default button blue is inline-styled on the element itself, so it
   needs !important here to override it with a tone that fits the palette */
.newsletter-signup .formkit-submit {
  background-color: #5C7A8A !important;
}

.ledger-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  border-bottom: 2px solid var(--card-border);
  font-size: 1.02rem;
  font-weight: 400;
}
.ledger-row:last-child { border-bottom: none; }

.ledger-row span:last-child {
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

.ledger-row.cols-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  justify-items: end;
  text-align: right;
}
.ledger-row.cols-3 span:first-child {
  justify-self: start;
  text-align: left;
}
.ledger-row.cols-3 span:nth-child(2) {
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

.ledger-head {
  background: transparent;
  border-bottom-width: 2px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.76rem;
  color: var(--text-secondary);
  padding-top: 12px;
  padding-bottom: 12px;
}
.ledger-head span:last-child { font-weight: 400; }

.headline-title {
  text-transform: none;
  letter-spacing: -0.01em;
  padding-top: 20px;
  padding-bottom: 20px;
}
.ledger-head.headline-title span {
  font-family: 'shackleton', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--text-primary);
}

.headline-card {
  padding: 0;
  min-width: 220px;
  display: flex;
  flex-direction: column;
}

.card.summary-card {
  padding-top: 20px;
}

.summary-card .ledger-table {
  margin-top: 22px;
}

.headline-value {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'shackleton', Georgia, serif;
  font-size: clamp(2rem, 4.4vw, 2.9rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  padding: 24px;
  text-align: center;
}

.headline-value-caption {
  display: block;
  margin-top: 8px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.dot-contrib { background: var(--contrib); }
.dot-interest { background: var(--interest); }
.dot-multiple { background: var(--multiple); }

.chart-header, .table-header, .youtube-embed-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.chart-header h2, .table-header h2, .youtube-embed-header h2 { margin: 0; }

.legend {
  display: flex;
  gap: 16px;
}
.legend span {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 400;
}

.chart-card { position: relative; }

#chart {
  width: 100%;
  display: block;
  cursor: crosshair;
}

.chart-tooltip {
  position: absolute;
  pointer-events: none;
  background: var(--text-primary);
  color: var(--bg);
  padding: 10px 14px;
  border-radius: 0;
  font-size: 0.8rem;
  font-weight: 400;
  opacity: 0;
  transform: translate(-50%, -112%);
  transition: opacity 0.12s ease;
  white-space: nowrap;
  z-index: 5;
  box-shadow: var(--shadow-sm);
  line-height: 1.55;
}

.chart-years-control {
  margin-top: 20px;
}
.chart-years-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 9px;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}
.chart-years-label span:last-child {
  font-weight: 400;
  color: var(--text-primary);
  text-transform: none;
  letter-spacing: normal;
  font-family: 'shackleton', Georgia, serif;
  font-size: 0.95rem;
}

.link-btn {
  display: inline-block;
  background: transparent;
  border: 2px solid var(--text-primary);
  color: var(--text-primary);
  font-weight: 400;
  font-size: 0.85rem;
  text-decoration: none;
  cursor: pointer;
  padding: 8px 14px;
  border-radius: 0;
  font-family: inherit;
  transition: background 0.15s ease, color 0.15s ease;
}
.link-btn:hover { background: var(--text-primary); color: var(--bg); }

.share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}
.share-actions .link-btn:disabled { opacity: 0.6; cursor: default; }

.share-status {
  margin: 12px 0 0;
  font-size: 0.85rem;
  font-style: italic;
  color: var(--text-secondary);
}
.share-status:empty { margin: 0; }

.table-wrap {
  border-radius: var(--radius-sm);
  border: 2px solid var(--card-border);
  overflow-x: auto;
}
.table-wrap.hidden { display: none; }

.stock-table {
  table-layout: fixed;
}
.stock-table th:first-child, .stock-table td:first-child { width: 25%; }
.stock-table th:not(:first-child), .stock-table td:not(:first-child) { width: 15%; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

thead th {
  position: sticky;
  top: 0;
  background: var(--bg);
  text-align: right;
  padding: 12px 18px;
  font-weight: 400;
  color: var(--text-primary);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid var(--card-border);
}
thead th:first-child, tbody td:first-child { text-align: left; }

tbody td {
  padding: 11px 18px;
  text-align: right;
  border-bottom: 1px solid var(--input-border);
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
  font-weight: 400;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--accent-soft); }

.app-footer {
  margin-top: 36px;
  text-align: center;
}
.app-footer p {
  color: var(--text-tertiary);
  font-size: 0.8rem;
  margin: 0;
  font-style: italic;
}

.app-footer-link {
  margin-top: 8px !important;
}
.app-footer-link a {
  color: var(--text-tertiary);
  font-style: normal;
  text-decoration: underline;
}
.app-footer-link a:hover {
  color: var(--text-primary);
}

/* ---------- Financial Freedom Roadmap page ---------- */
.narrow-layout {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.rm-intro {
  text-align: center;
}
.rm-quote {
  font-family: 'shackleton', Georgia, serif;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0 auto 20px;
  max-width: 20ch;
}
.rm-lede {
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 60ch;
  margin: 0 auto 28px;
}
.rm-lede a {
  color: var(--interest);
  text-decoration: underline;
}

/* M.O.B. Method */
.mob-card { text-align: center; }
.mob-card h2 {
  font-family: 'shackleton', Georgia, serif;
  font-size: 1.5rem;
  margin: 0 0 4px;
}
.mob-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 22px 0;
}
.mob-col {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.mob-letter {
  width: 76px;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--card-border);
  background: var(--card-bg-solid);
  font-family: 'shackleton', Georgia, serif;
  font-size: 2.4rem;
  color: var(--interest);
  margin-bottom: 14px;
  transition: background 0.15s ease, color 0.15s ease;
}
.mob-col:hover .mob-letter {
  background: var(--accent-soft);
  color: var(--text-primary);
}
.mob-col h3 {
  font-family: 'shackleton', Georgia, serif;
  font-size: 1.2rem;
  margin: 0 0 10px;
}
.mob-col p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

/* ---------- About Me page ---------- */
.story {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.story-p {
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0;
}
.story-p a {
  color: var(--interest);
  text-decoration: underline;
}
.story-cta {
  color: var(--text-primary);
}
.story-photo-row {
  display: flex;
  align-items: flex-start;
  gap: 28px;
}
.story-photo {
  width: 280px;
  flex-shrink: 0;
  display: block;
  border: 2px solid var(--card-border);
}
.story-photo-row .story-p { flex: 1; }
.story-text-group {
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1;
}
.story-figure {
  flex-shrink: 0;
  margin: 0;
  text-align: center;
}
.story-caption {
  margin-top: 8px;
  font-size: 0.9rem;
  font-style: italic;
  color: var(--text-secondary);
}
.story-signoff {
  font-family: 'shackleton', Georgia, serif;
  font-size: 1.5rem;
  font-style: italic;
  font-weight: 400;
  margin: 8px 0 0;
}

/* Vertical numbered roadmap */
.roadmap {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}
.roadmap::before {
  content: "";
  position: absolute;
  left: 39px;
  top: 20px;
  bottom: 20px;
  width: 2px;
  background: var(--card-border);
}
.stage {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  position: relative;
  padding-bottom: 36px;
}
.stage:last-child { padding-bottom: 0; }
.stage-num {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  border: 2px solid var(--card-border);
  background: var(--card-bg-solid);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'shackleton', Georgia, serif;
  font-size: 2.4rem;
  line-height: 1;
  position: relative;
  z-index: 1;
}
.stage-body { padding-top: 6px; }
.stage-tag {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.72rem;
  color: var(--accent-3);
  margin-bottom: 6px;
}
.stage-body h3 {
  font-family: 'shackleton', Georgia, serif;
  font-size: 1.7rem;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}
.stage-body p {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.55;
  color: var(--text-secondary);
  max-width: 54ch;
}

/* Calculators index page */
.calculators-list {
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.calculator-entry {
  text-align: center;
}
.calculator-blurb {
  margin: 0 auto 20px;
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 60ch;
}

/* Reading list page */
.book-list {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.book-entry {
  text-align: center;
}

/* Freedom formula */
.formula-summary {
  margin-bottom: 24px;
}
.newsletter-signup { margin-bottom: 24px; }
.formula-card h2 {
  font-family: 'shackleton', Georgia, serif;
  font-size: 1.5rem;
  margin: 0 0 4px;
}
.formula {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 2px solid var(--card-border);
  margin: 22px 0;
}
.formula-term {
  min-width: 0;
  padding: 22px 16px;
  text-align: center;
  border-right: 2px solid var(--card-border);
}
.formula-term:last-child { border-right: none; }
.formula-abbr {
  display: block;
  font-family: 'shackleton', Georgia, serif;
  font-size: 2.4rem;
  line-height: 1;
  color: var(--accent-3);
}
.formula-word {
  display: block;
  margin-top: 8px;
  font-size: 0.95rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  overflow-wrap: break-word;
  hyphens: auto;
}
.formula-rule {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.55;
  color: var(--text-secondary);
}
.formula-rule strong { color: var(--text-primary); }

/* Three freedoms */
.freedoms-title {
  font-family: 'shackleton', Georgia, serif;
  font-size: 1.5rem;
  text-align: center;
  margin: 0 0 24px;
}
.freedoms {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.freedom { text-align: center; }
.freedom-num {
  display: block;
  font-family: 'shackleton', Georgia, serif;
  font-size: 2rem;
  color: var(--accent-3);
  margin-bottom: 6px;
}
.freedom h3 {
  font-family: 'shackleton', Georgia, serif;
  font-size: 1.25rem;
  margin: 0 0 10px;
}
.freedom p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.source-note {
  text-align: center;
  font-size: 0.9rem;
  font-style: italic;
  color: var(--text-tertiary);
  margin: 0;
}
.source-note a { color: var(--accent-3); }

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }
  .inputs-card {
    position: static;
  }
  .summary-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .header-text p { white-space: normal; }
  .tools-row { grid-template-columns: 1fr; }
  .freedoms { grid-template-columns: 1fr; }
  .mob-grid { grid-template-columns: 1fr; }
  .follow-bar { flex-direction: column; gap: 16px; text-align: center; }
}

@media (max-width: 480px) {
  .app { padding: 28px 14px 56px; }
  .card { padding: 20px; }
  .headline-card { padding: 0; }
  .brand { gap: 12px; }
  .brand-mark { width: 40px; height: 40px; }
  .ledger-table { margin: 20px -20px -20px; }
  .ledger-row.cols-3 { font-size: 0.9rem; gap: 8px; }
  .about-card { flex-direction: column; text-align: center; gap: 16px; padding: 8px 0 24px; }
  .about-photo { width: 230px; margin: 0 auto; }
  .story-photo-row { flex-direction: column; align-items: center; gap: 16px; }
  .story-text-group { width: 100%; }
  .story-photo { width: 200px; margin: 0 auto; }
  .narrow-layout { gap: 40px; }
  .roadmap::before { left: 29px; }
  .stage { gap: 18px; }
  .stage-num { width: 60px; height: 60px; font-size: 1.8rem; }
  .stage-body h3 { font-size: 1.4rem; }
  .stage-body p, .rm-lede, .formula-rule { font-size: 1.05rem; }
  .formula-abbr { font-size: 1.8rem; }
  .formula-word { font-size: 0.78rem; }
  .formula-term { padding: 16px 8px; }
  /* Three tight columns can't fit a long single word (e.g. "Contribution")
     without an ugly mid-word break, however small the font — stack instead */
  .formula { grid-template-columns: 1fr; }
  .formula-term { border-right: none; border-bottom: 2px solid var(--card-border); }
  .formula-term:last-child { border-bottom: none; }
}
