:root {
  --bg: #f5f3f0;
  --surface: #fff;
  --ink: #28252d;
  --muted: #706b76;
  --border: #ded9e3;
  --purple: #5b2c83;
  --teal: #16897e;
  --orange: #c65d3e;
  --blue: #376eaa;
  --lilac: #8d6d9e;
  --tint: #f4eff8;
  --radius: 10px;
  font-family: 'Instrument Sans',sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

button,input,select {
  font: inherit;
}

button,a,select,input,summary {
  -webkit-tap-highlight-color: transparent;
}

button,select,summary {
  cursor: pointer;
}

button {
  color: inherit;
}

button:focus-visible,a:focus-visible,summary:focus-visible,input:focus-visible,select:focus-visible {
  outline: 3px solid #986ab8;
  outline-offset: 3px;
}

button:disabled {
  cursor: default;
  opacity: .35;
}

a {
  color: var(--purple);
  text-underline-offset: 3px;
}

.masthead {
  height: 78px;
  padding: 0 4%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-size: 12px;
  text-decoration: none;
  font-weight: 600;
}

.brand-mark {
  background: var(--purple);
  color: white;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  font-weight: 700;
  letter-spacing: -.5px;
}

.brand-sub {
  display: block;
  color: var(--muted);
  font-weight: 400;
  padding-top: 3px;
}

.masthead nav {
  height: 100%;
  display: flex;
  gap: 24px;
}

.nav-button {
  border: 0;
  border-bottom: 3px solid transparent;
  padding: 3px 0 0;
  background: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.nav-button.active {
  border-bottom-color: var(--purple);
  color: var(--purple);
}

.quiet-button,.text-button {
  background: none;
  border: 0;
  padding: 6px 0;
  color: var(--muted);
  font-size: 12px;
}

.quiet-button span {
  padding-left: 12px;
}

.text-button {
  color: var(--purple);
  font-weight: 600;
}

.text-button:hover {
  text-decoration: underline;
}

main {
  max-width: 1640px;
  margin: 0 auto;
  padding: 34px 4% 30px;
}

.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 28px;
}

.eyebrow {
  font-size: 10px;
  letter-spacing: 1.35px;
  font-weight: 700;
  color: var(--purple);
  margin: 0 0 10px;
}

h1 {
  font-family: 'Instrument Serif',Georgia,serif;
  font-weight: 400;
  font-size: 48px;
  line-height: 1.05;
  letter-spacing: -.7px;
  margin: 0 0 10px;
}

h2,h3,p {
  margin: 0;
}

h2 {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
}

h3 {
  font-size: 12px;
  font-weight: 600;
}

.standfirst {
  color: var(--muted);
  font-size: 14px;
}

.date-stamp {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
}

.date-stamp>span:first-child {
  font-size: 13px;
  letter-spacing: .8px;
  color: var(--ink);
  font-weight: 600;
}

.story-navigation {
  display: flex;
  gap: 18px;
  align-items: center;
  margin-bottom: 19px;
  font-size: 12px;
}

.story-navigation>label {
  font-weight: 600;
}

.story-select {
  display: flex;
  gap: 6px;
  align-items: center;
}

.story-select button {
  width: 30px;
  height: 30px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 5px;
}

.story-select select {
  padding: 8px 31px 8px 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  min-width: 310px;
  border-radius: 5px;
  color: var(--ink);
  font-weight: 500;
}

.chapter-counter {
  margin-left: auto;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0,1fr) 330px;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  min-width: 0;
}

.plot-column {
  padding: 22px 22px 16px;
  min-width: 0;
}

.chart-heading {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: flex-start;
}

.chart-heading p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 5px;
}

.view-toggle {
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  white-space: nowrap;
}

.view-toggle input {
  accent-color: var(--purple);
}

.series-controls {
  border: 0;
  margin: 19px 0 12px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 15px;
}

.series-label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 11px;
}

.series-label input {
  width: 13px;
  height: 13px;
  margin: 0;
  accent-color: var(--series-color);
}

.series-label input:not(:checked)+span {
  color: var(--muted);
}

.chart-meta {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--muted);
  padding: 0 1px 1px;
}

.timeline-chart {
  width: 100%;
  height: 535px;
}

.chart-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  color: var(--muted);
  gap: 12px;
  padding: 0 2px;
}

.chart-foot>span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dot {
  width: 7px;
  height: 7px;
  display: inline-block;
  border-radius: 50%;
}

.macro-dot {
  background: var(--muted);
}

.diamond {
  padding-left: 10px;
  color: var(--purple);
}

.method-note {
  margin-top: 11px;
  font-size: 10px;
  color: var(--muted);
  line-height: 1.55;
  max-width: 720px;
}

.event-access {
  font-size: 12px;
  margin-top: 14px;
  border-top: 1px solid var(--border);
  padding-top: 13px;
}

.event-access summary {
  color: var(--purple);
}

#accessible-events {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 6px;
  margin-top: 10px;
}

.list-event {
  background: none;
  border: 0;
  text-align: left;
  padding: 7px;
  font-size: 11px;
  line-height: 1.5;
  border-radius: 5px;
}

.list-event:hover {
  background: var(--tint);
}

.decision-column {
  padding: 23px 24px;
  background: #fcfafc;
  border-left: 1px solid var(--border);
  min-width: 0;
}

.episode-label {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}

.episode-label .eyebrow {
  margin: 0;
  font-size: 9px;
}

.episode-label>span:last-child {
  font-size: 10px;
  color: var(--muted);
}

.decision-column>h2 {
  font-family: 'Instrument Serif',Georgia,serif;
  font-size: 29px;
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 12px;
}

.episode-summary {
  font-size: 12px;
  line-height: 1.6;
  color: #625a68;
}

.episode-insight {
  font-size: 12px;
  line-height: 1.6;
  margin: 14px 0 20px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.episode-insight strong {
  font-weight: 600;
  color: var(--purple);
}

.decision-detail {
  min-height: 200px;
}

.decision-top {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  margin-bottom: 7px;
  color: var(--muted);
}

.company-key {
  font-weight: 600;
  color: var(--purple);
}

.decision-detail h3 {
  font-size: 17px;
  line-height: 1.3;
  font-weight: 600;
  margin-bottom: 9px;
}

.decision-detail p {
  font-size: 12px;
  line-height: 1.65;
}

.decision-detail .interpretation {
  margin-top: 12px;
  color: #625a68;
}

.interpretation-label {
  font-size: 9px;
  letter-spacing: .7px;
  font-weight: 700;
  display: block;
  color: var(--purple);
  margin-bottom: 3px;
}

.event-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 14px;
  margin-top: 12px;
}

.event-sources a {
  font-size: 10px;
}

.related {
  border-top: 1px solid var(--border);
  margin-top: 20px;
  padding-top: 16px;
}

.related h3 {
  margin-bottom: 8px;
  color: var(--muted);
}

.related-event {
  width: 100%;
  background: none;
  border: 0;
  text-align: left;
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 9px;
  padding: 8px 0;
  font-size: 11px;
  border-bottom: 1px solid #eee8f0;
  line-height: 1.45;
}

.related-event span:first-child {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.related-event:hover,.related-event.selected {
  color: var(--purple);
}

.related-event.selected span:last-child {
  font-weight: 600;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  max-width: 1640px;
  margin: 0 auto;
  padding: 0 4% 25px;
  font-size: 10px;
  color: var(--muted);
}

[hidden] {
  display: none!important;
}

.loading-message {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 12px 20px;
  border-radius: 8px;
  color: var(--muted);
  box-shadow: 0 3px 20px #28252d12;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 22px;
}

.info-panel {
  background: var(--surface);
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.info-panel h2 {
  margin-bottom: 12px;
}

.info-panel p,.info-panel li {
  font-size: 13px;
  line-height: 1.7;
  color: #625a68;
}

.info-panel ul {
  padding-left: 19px;
}

.route {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin: 17px 0;
}

.route span {
  padding: 10px 13px;
  background: var(--tint);
  font-size: 12px;
  font-weight: 600;
  color: var(--purple);
}

.route i {
  font-style: normal;
  color: var(--muted);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

th,td {
  text-align: left;
  border-bottom: 1px solid var(--border);
  padding: 13px 12px;
  line-height: 1.55;
  vertical-align: top;
}

th {
  font-weight: 600;
  color: var(--purple);
  background: var(--tint);
}

.sources-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.sources-list {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 0 30px;
}

.source-item {
  padding: 17px 0;
  border-top: 1px solid var(--border);
}

.source-item a {
  font-size: 13px;
  font-weight: 600;
}

.source-item p {
  font-size: 12px;
  line-height: 1.6;
  margin-top: 6px;
  color: var(--muted);
}

.source-item small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 5px;
}

.basis-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  margin-top: 20px;
}

.simulator {
  margin-top: 20px;
}

.sim-control {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.sim-control label {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  font-size: 12px;
}

.sim-control input {
  width: 100%;
  accent-color: var(--purple);
}

.sim-result {
  display: grid;
  grid-template-columns: repeat(2,1fr);
  gap: 20px;
  margin-top: 20px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.sim-result strong {
  display: block;
  font-size: 26px;
  font-weight: 600;
  color: var(--purple);
  margin-top: 6px;
}

.sim-result span {
  font-size: 11px;
  color: var(--muted);
}

.sim-note {
  margin-top: 15px;
  font-size: 11px!important;
}

.error-message {
  padding: 30px;
  color: #922f28;
}

.toolbar-source {
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 760px;
}

.tooltip {
  font-family: 'Instrument Sans',sans-serif;
  font-size: 12px;
}

.tooltip strong {
  display: block;
  padding-bottom: 5px;
}

.tooltip-row {
  display: flex;
  justify-content: space-between;
  gap: 25px;
  margin: 5px 0;
}

.tooltip small {
  color: #706b76;
}

body.presentation .masthead {
  height: 59px;
}

body.presentation main {
  padding-top: 20px;
}

body.presentation .page-heading {
  margin-bottom: 18px;
}

body.presentation h1 {
  font-size: 38px;
}

body.presentation footer {
  display: none;
}

@media(min-width:1550px) {
  .workspace {
    grid-template-columns: minmax(0,1fr) 370px;
  }
  .timeline-chart {
    height: 560px;
  }
  .decision-column {
    padding: 25px 28px;
  }
}

@media(max-width:1100px) {
  .workspace {
    grid-template-columns: minmax(0,1fr) 290px;
  }
  .plot-column {
    padding: 18px 14px;
  }
  .decision-column {
    padding: 20px 17px;
  }
  .view-toggle {
    white-space: normal;
  }
  .chart-heading {
    gap: 10px;
  }
  .chart-heading h2 {
    font-size: 15px;
  }
  .timeline-chart {
    height: 530px;
  }
  h1 {
    font-size: 42px;
  }
  .date-stamp {
    display: none;
  }
  .masthead nav {
    gap: 17px;
  }
}

@media(max-width:850px) {
  .workspace {
    grid-template-columns: 1fr;
  }
  .decision-column {
    border-left: 0;
    border-top: 1px solid var(--border);
  }
  .decision-detail {
    min-height: 0;
  }
  .related-event {
    grid-template-columns: 60px 1fr;
  }
  .story-navigation {
    flex-wrap: wrap;
    gap: 10px;
  }
  .story-navigation>label {
    width: 100%;
  }
  .story-select {
    flex: 1;
  }
  .story-select select {
    min-width: 0;
    flex: 1;
    width: 210px;
  }
  .chapter-counter {
    display: none;
  }
  .info-grid {
    grid-template-columns: 1fr;
  }
  .masthead {
    gap: 15px;
    padding: 0 4%;
    height: 70px;
  }
  .brand>span:last-child {
    display: none;
  }
  .masthead nav {
    gap: 20px;
  }
  .quiet-button {
    font-size: 0;
  }
  .quiet-button span {
    font-size: 17px;
    padding: 0;
  }
  .timeline-chart {
    height: 530px;
  }
  main {
    padding-top: 25px;
  }
  .sources-list {
    grid-template-columns: 1fr;
  }
  .chart-heading p {
    max-width: 300px;
  }
}

@media(max-width:480px) {
  h1 {
    font-size: 35px;
  }
  .eyebrow {
    font-size: 9px;
  }
  .standfirst {
    font-size: 12px;
  }
  .page-heading {
    margin-bottom: 22px;
  }
  .masthead nav {
    gap: 12px;
  }
  .nav-button {
    font-size: 11px;
  }
  .brand-mark {
    width: 34px;
    height: 34px;
    font-size: 11px;
  }
  .plot-column {
    padding: 17px 10px 15px;
  }
  .chart-heading {
    display: block;
  }
  .view-toggle {
    margin-top: 12px;
  }
  .chart-meta>span:last-child {
    display: none;
  }
  .series-controls {
    gap: 11px 12px;
  }
  .series-label {
    font-size: 11px;
  }
  .timeline-chart {
    height: 510px;
  }
  .story-select select {
    width: 180px;
  }
  .story-navigation>.text-button {
    margin-left: 0;
  }
  .chart-foot {
    align-items: flex-start;
  }
  .chart-foot>span {
    flex-wrap: wrap;
    max-width: 180px;
  }
  .chart-foot .text-button {
    font-size: 10px;
  }
  footer {
    flex-direction: column;
    gap: 7px;
  }
  .info-panel {
    padding: 18px;
  }
  .info-panel p,.info-panel li {
    font-size: 12px;
  }
  .sources-heading {
    align-items: flex-start;
    gap: 15px;
  }
  .tooltip {
    max-width: 250px;
  }
  .chart-heading h2 {
    font-size: 16px;
  }
  #accessible-events {
    grid-template-columns: 1fr;
  }
}

@media(prefers-reduced-motion:reduce) {
  * {
    scroll-behavior: auto!important;
    transition: none!important;
  }
}

.related summary {
  font-size: 12px;
  font-weight: 600;
  color: var(--purple);
  cursor: pointer;
}

.related[open] summary {
  margin-bottom: 10px;
}

.market-snapshot {
  margin-top: 16px;
  font-size: 10px;
  color: var(--muted);
}

.market-snapshot summary {
  color: var(--purple);
}

.snapshot-values {
  margin-top: 7px!important;
  font-size: 11px!important;
}

.page-heading h1 {
  font-size: 44px;
}

@media(max-width:480px) {
  .page-heading h1 {
    font-size: 34px;
  }
}

.playback-controls { display:flex; align-items:center; gap:13px; padding:13px 16px; background:var(--surface); border:1px solid var(--border); border-radius:8px; margin-bottom:16px; }
.play-button { display:flex; align-items:center; justify-content:center; gap:9px; border:0; background:var(--purple); color:white; padding:10px 15px; border-radius:5px; min-width:139px; font-size:12px; font-weight:600; }
.rewind-button { padding:5px; font-size:20px; border:0; background:none; color:var(--purple); }
#time-cursor { flex:1; min-width:65px; accent-color:var(--purple); }
#cursor-label { min-width:86px; font-size:12px; font-weight:600; font-variant-numeric:tabular-nums; }
.speed-control { display:flex; gap:8px; align-items:center; font-size:11px; color:var(--muted); }
.speed-control select, .chart-options select { padding:6px; background:var(--surface); color:var(--ink); border:1px solid var(--border); border-radius:4px; font-size:11px; }
.chart-views { display:flex; gap:7px; flex-wrap:wrap; margin-top:16px; }
.chart-views button { background:#f5f2f7; color:var(--muted); border:1px solid transparent; border-radius:4px; padding:8px 11px; font-size:11px; font-weight:500; }
.chart-views button.selected { background:var(--purple); color:white; }
.chart-options { display:flex; flex-wrap:wrap; gap:16px; margin-top:12px; }
.chart-options label { display:flex; gap:7px; align-items:center; font-size:10px; color:var(--muted); }
.series-controls { margin-top:14px; }
.playback-note { color:var(--muted); font-size:10px; margin-top:4px; }
@media(max-width:850px) { .playback-controls { gap:9px; } .speed-control { font-size:0; } .play-button { min-width:116px; padding:10px 11px; } }
@media(max-width:480px) { .playback-controls { flex-wrap:wrap; padding:12px; } .play-button { min-width:130px; } #time-cursor { flex:1; order:4; width:100%; min-width:100%; } .speed-control { margin-left:auto; } #cursor-label { min-width:70px; font-size:11px; } .chart-options { gap:10px; } .chart-options label { flex-wrap:wrap; } .chart-views { gap:5px; } .chart-views button { padding:8px; font-size:10px; } }
