:root {
  --paper: #f3f0e8;
  --ink: #17211c;
  --muted: #6f766f;
  --line: #d4d1c8;
  --gold: #d9a928;
  --rust: #c85732;
  --forest: #23493b;
  --mint: #a9d9c1;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: "Manrope", sans-serif; }
button, input, select { font: inherit; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
button { cursor: pointer; }
.grain { position: fixed; inset: 0; pointer-events: none; opacity: .16; z-index: 10; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.17'/%3E%3C/svg%3E"); }

.site-header { height: 84px; display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(24px, 6vw, 92px); border-bottom: 1px solid var(--line); }
.brand, .footer-brand { color: inherit; text-decoration: none; display: flex; gap: 11px; align-items: center; font-weight: 700; letter-spacing: -.02em; }
.brand-mark { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 50%; color: var(--paper); background: var(--ink); font-family: Georgia, serif; font-style: italic; }
.header-note { color: var(--muted); font: 11px "DM Mono", monospace; text-transform: uppercase; letter-spacing: .1em; }

.hero { min-height: calc(100vh - 84px); padding: clamp(70px, 9vh, 120px) clamp(24px, 10vw, 150px) 40px; position: relative; }
.eyebrow, .kicker { font: 500 11px "DM Mono", monospace; letter-spacing: .12em; text-transform: uppercase; }
.eyebrow { display: flex; align-items: center; gap: 10px; color: var(--rust); }
.eyebrow span { width: 25px; border-top: 1px solid; }
h1, h2 { margin: 0; letter-spacing: -.065em; font-weight: 500; line-height: .94; }
h1 { margin-top: 28px; font-size: clamp(58px, 9vw, 132px); max-width: 1100px; }
h1 em { color: var(--rust); font-family: Georgia, serif; font-weight: 400; }
.intro { color: #565e58; font-size: clamp(16px, 1.5vw, 20px); line-height: 1.6; max-width: 600px; margin: 33px 0 40px; }
.wealth-form { max-width: 690px; }
.wealth-form label { display: block; font: 500 11px "DM Mono", monospace; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 10px; }
.input-row { display: flex; gap: 10px; }
.money-input { flex: 1; display: flex; align-items: center; background: white; border: 1px solid #c8c7c0; min-width: 0; }
.currency { align-self: stretch; width: 92px; padding: 0 10px 0 17px; border: 0; border-right: 1px solid #deddd6; outline: 0; color: var(--ink); background: #f8f7f3; font: 500 13px "DM Mono", monospace; cursor: pointer; }
.currency:focus { box-shadow: inset 0 0 0 2px var(--rust); }
.money-input input { width: 100%; min-width: 0; padding: 18px 16px; border: 0; outline: 0; background: transparent; color: var(--ink); font: 500 clamp(20px, 3vw, 27px) "DM Mono", monospace; }
.input-row button { border: 0; padding: 0 28px; color: white; background: var(--ink); font-weight: 600; transition: .2s; }
.input-row button:hover { background: var(--rust); transform: translateY(-2px); }
.input-row button span { margin-left: 20px; }
.wealth-form > p { max-width: 620px; color: var(--muted); font-size: 11px; line-height: 1.55; margin: 0 0 12px; }
.scroll-cue { position: absolute; right: 6vw; bottom: 42px; writing-mode: vertical-rl; font: 10px "DM Mono", monospace; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); display: flex; align-items: center; gap: 9px; }
.scroll-cue span { height: 45px; border-left: 1px solid; }

.comparison { background: #e8e4d9; padding: 110px clamp(24px, 8vw, 120px) 120px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 50px; margin-bottom: 75px; }
.kicker { color: var(--rust); margin: 0 0 23px; }
h2 { font-size: clamp(46px, 6vw, 84px); }
.section-copy { max-width: 360px; color: var(--muted); line-height: 1.6; font-size: 14px; margin: 0; }
.chart-controls { display: flex; align-items: flex-start; gap: 24px; margin-bottom: 34px; }
.chart-controls > span { flex: 0 0 auto; padding-top: 10px; color: var(--muted); font: 9px "DM Mono", monospace; letter-spacing: .1em; }
#person-toggles { display: flex; flex-wrap: wrap; gap: 8px; }
.data-source { margin: -18px 0 26px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.data-source a { color: var(--ink); text-underline-offset: 2px; }
.person-toggle { border: 1px solid #b9b8af; border-radius: 999px; padding: 8px 13px; color: var(--muted); background: transparent; font-size: 11px; transition: .18s ease; }
.person-toggle:hover { border-color: var(--ink); color: var(--ink); }
.person-toggle[aria-pressed="true"] { border-color: var(--ink); color: var(--paper); background: var(--ink); }
.person-toggle.you-toggle { border-color: var(--gold); color: var(--ink); background: var(--gold); }
.person-toggle.you-toggle[aria-pressed="false"] { color: #8a6b18; background: transparent; }
.person-toggle .toggle-mark { display: inline-block; margin-right: 5px; font: 10px "DM Mono", monospace; }
.chart-wrap { border-bottom: 1px solid #aaa99f; overflow-x: auto; overflow-y: hidden; padding-bottom: 8px; scrollbar-color: var(--rust) #d4d1c8; scrollbar-width: thin; }
.chart-wrap::-webkit-scrollbar { height: 8px; }
.chart-wrap::-webkit-scrollbar-track { background: #d4d1c8; }
.chart-wrap::-webkit-scrollbar-thumb { background: var(--rust); }
.chart { display: flex; flex-direction: column; gap: 11px; min-width: 100%; background-color: #ebe8df; background-image: radial-gradient(circle, rgba(35,73,59,.10) 1px, transparent 1.2px); background-size: 12px 12px; background-position: 278px 0; }
.bar-row { display: grid; grid-template-columns: 260px minmax(0, 1fr) 150px; width: 100%; min-width: 0; max-width: 100%; gap: 18px; align-items: center; animation: emerge .6s both; }
.person { position: sticky; left: 0; z-index: 3; display: flex; align-items: center; gap: 12px; align-self: stretch; background: #e8e4d9; box-shadow: 14px 0 18px -18px rgba(23, 33, 28, .7); }
.person-toggle-label { cursor: pointer; border-radius: 4px; transition: color .18s ease; }
.person-toggle-label:hover .person-name { color: var(--rust); }
.person-toggle-label:hover .avatar { transform: scale(.94); }
.person-toggle-label:focus-visible { outline: 2px solid var(--rust); outline-offset: 3px; }
.person-toggle-label .avatar { transition: transform .18s ease; }
.avatar { width: 42px; height: 42px; flex: 0 0 42px; border-radius: 50%; display: grid; place-items: center; color: white; background: var(--forest); font: 500 12px "DM Mono", monospace; }
.person-details { min-width: 0; }
.person-title { display: flex; align-items: center; gap: 7px; min-width: 0; }
.person-name { font-size: 13px; font-weight: 600; white-space: nowrap; }
.worth-badge { flex: 0 0 auto; border: 1px solid #aaa99f; border-radius: 999px; padding: 2px 6px; color: var(--ink); background: #f3f0e8; font: 500 9px "DM Mono", monospace; }
.person-role { display: block; margin-top: 2px; font-size: 9px; color: var(--muted); white-space: nowrap; }
.bar-track { min-width: 0; height: 42px; position: relative; }
.bar-fill { position: relative; display: flex; justify-content: flex-end; align-items: center; width: 0; max-width: 100%; height: 100%; background: var(--forest); transition: width 1s cubic-bezier(.2,.8,.2,1); }
.keep-scrolling { position: sticky; right: 14px; z-index: 2; flex: 0 0 auto; margin-right: 10px; padding: 5px 9px; border: 1px solid rgba(255,255,255,.45); border-radius: 999px; color: white; background: rgba(23,33,28,.78); font: 500 9px "DM Mono", monospace; letter-spacing: .04em; text-transform: uppercase; animation: prompt-in .3s .75s both; }
@keyframes prompt-in { from { opacity: 0; transform: translateX(8px); } to { opacity: 1; transform: translateX(0); } }
.bar-row.you .bar-fill { background: var(--gold); }
.bar-row.you .avatar { background: var(--gold); color: var(--ink); }
.hidden-person .avatar { opacity: .45; }
.hidden-person .person-role { opacity: .7; }
.reveal-value { position: sticky; left: 278px; z-index: 2; height: 42px; width: max-content; max-width: min(520px, calc(100vw - 380px)); padding: 0 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border: 1px dashed #9b9b92; color: var(--muted); background: #e8e4d9; text-align: left; font-size: 11px; }
.reveal-value:hover { border-color: var(--rust); color: var(--rust); background: #f0ece2; }
.reveal-value strong { margin-right: 8px; color: var(--rust); font: 500 12px "DM Mono", monospace; }
.reveal-value span { margin-left: 12px; }
.bar-row.celebrity .bar-fill { background: var(--rust); }
.bar-row.aggregate .avatar { background: #53675e; }
.bar-row.aggregate .person-name { white-space: normal; font-size: 11px; line-height: 1.25; }
.bar-row.aggregate .person { min-height: 54px; }
.no-data { position: sticky; left: 278px; width: max-content; max-width: min(520px, calc(100vw - 380px)); padding: 12px 16px; border-left: 3px solid var(--rust); color: var(--muted); background: #e0ddd3; font-size: 11px; }
.value { position: relative; z-index: 4; display: flex; width: 150px; min-width: 150px; flex-direction: column; align-items: flex-end; justify-self: end; text-align: right; background: #e8e4d9; font: 500 14px "DM Mono", monospace; font-variant-numeric: tabular-nums; }
.value-main, .relative { display: block; width: 100%; text-align: right; }
.relative { color: var(--muted); font-size: 9px; margin-top: 3px; text-transform: uppercase; }
.chart-axis { display: flex; justify-content: space-between; padding: 18px 168px 18px 278px; min-width: 100%; color: var(--muted); font: 9px "DM Mono", monospace; }
@keyframes emerge { from { opacity: 0; transform: translateY(10px); } }

.meaning-section { padding: 120px clamp(24px, 8vw, 120px); display: grid; grid-template-columns: .85fr 1.15fr; gap: 80px; }
.meaning-context { margin-top: 42px; padding-top: 22px; border-top: 1px solid var(--line); max-width: 430px; }
.meaning-context p { margin: 0 0 18px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.meaning-context p strong { display: block; margin-bottom: 4px; color: var(--ink); font: 500 clamp(25px, 3vw, 39px) "DM Mono", monospace; letter-spacing: -.06em; }
.equivalents-panel { min-width: 0; }
#equivalent-switch { margin-bottom: 18px; padding: 11px 15px; border: 1px solid var(--ink); color: var(--paper); background: var(--ink); font-size: 11px; font-weight: 600; transition: .18s ease; }
#equivalent-switch:hover { border-color: var(--rust); background: var(--rust); transform: translateY(-1px); }
#equivalent-switch span { margin-left: 18px; }
.equivalents { border-top: 1px solid var(--line); }
.equivalent { display: grid; grid-template-columns: 55px 1fr auto; align-items: center; gap: 20px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.eq-icon { font-size: 26px; filter: grayscale(1); }
.eq-label { color: var(--muted); font-size: 12px; }
.eq-number { font: 500 clamp(22px, 3vw, 36px) "DM Mono", monospace; letter-spacing: -.06em; }

footer { border-top: 1px solid var(--line); padding: 42px clamp(24px, 6vw, 92px); display: flex; justify-content: space-between; align-items: center; gap: 30px; }
footer p { color: var(--muted); font-size: 10px; line-height: 1.7; text-align: center; }
footer button { background: none; border: 0; color: var(--ink); font: 500 10px "DM Mono", monospace; text-transform: uppercase; }

@media (max-width: 760px) {
  .header-note, .scroll-cue { display: none; }
  .hero { min-height: auto; padding-bottom: 80px; }
  .input-row { flex-direction: column; }
  .input-row button { height: 58px; }
  .section-heading { display: block; margin-bottom: 50px; }
  .chart-controls { display: block; }
  .chart-controls > span { display: block; margin-bottom: 10px; }
  .section-copy { margin-top: 28px; }
  .chart { gap: 18px; background-position: 0 0; }
  .bar-row { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 42px; gap: 7px; padding-top: 4px; }
  .person { grid-column: 1; grid-row: 1; align-self: start; width: min(330px, calc(100vw - 48px)); min-height: 44px; padding: 3px 10px 3px 0; }
  .avatar { width: 34px; height: 34px; flex-basis: 34px; font-size: 10px; }
  .bar-track { grid-column: 1; grid-row: 2; }
  .value { display: none; }
  .chart-axis { padding: 18px 0; }
  .person-title { flex-wrap: wrap; gap: 2px 6px; }
  .person-role { overflow: hidden; text-overflow: ellipsis; }
  .reveal-value, .no-data { left: 0; max-width: calc(100vw - 48px); }
  .chart-axis span:nth-child(even) { display: none; }
  .meaning-section { grid-template-columns: 1fr; }
  footer { flex-direction: column; }
}
