@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=Lato:ital,wght@0,300;0,400;0,700;1,300;1,700&display=swap");

:root {
  --berkeley-blue: #23415f;
  --california-gold: #9d7c3d;
  --ink: #26313a;
  --muted-ink: #66727d;
  --paper-bg: #f7f2ea;
  --panel-bg: #fbf8f2;
  --panel-border: #ddd4c7;
  --surface: #fffdf9;
  --surface-border: #e3dbcf;
}

body {
  background: linear-gradient(180deg, #f4eee5 0%, #fbf8f2 220px, #f8f4ed 100%);
  background-attachment: fixed;
  box-sizing: border-box;
  color: var(--ink);
  padding:50px;
  font:15px/1.62 Lato, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight:300;
  letter-spacing: 0.004em;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--berkeley-blue);
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-weight: 600;
  letter-spacing: 0.015em;
  margin:0 0 20px;
}

p, ul, ol, table, pre, dl {
  margin:0 0 20px;
}

li {
  margin: 10px 0;
}

ul {
  margin: 0 10px;
}
ul.dashed {
  list-style-type: none;
}
ul.dashed > li {
  text-indent: -5px;
}
ul.dashed > li:before {
  content: "- ";
  text-indent: -5px;
}

h1, h2, h3 {
  line-height:1.1;
}

h1 {
  font-size:31px;
}

h2 {
  color: var(--berkeley-blue);
}

h3, h4, h5, h6 {
  color: var(--berkeley-blue);
}

a {
  color: var(--berkeley-blue);
  font-weight:400;
  text-decoration:none;
  transition: color 140ms ease;
}

a:visited,
a:active,
a:focus {
  color: var(--berkeley-blue);
}

a:hover {
  color: var(--california-gold);
}

header a,
header a:visited,
header a:active,
header a:focus {
  color: var(--berkeley-blue);
  font-weight: 700;
}

header a:hover {
  color: var(--california-gold);
  font-weight: 700;
}

section p a,
section p a:visited,
section p a:active,
section p a:focus {
  color: var(--berkeley-blue);
  font-weight: 700;
}

section p a:hover {
  color: var(--california-gold);
  font-weight: 700;
}

section li > b,
section li > b > a,
section li > b > a:visited,
section li > b > a:active,
section li > b > a:focus {
  color: var(--berkeley-blue);
  font-weight: 700;
}

section li > b > a:hover {
  color: var(--california-gold);
  font-weight: 700;
}

section ul li a,
section ul li a:visited,
section ul li a:active,
section ul li a:focus {
  color: var(--berkeley-blue);
  font-weight: 700;
}

section ul li a:hover {
  color: var(--california-gold);
  font-weight: 700;
}

button {
  font: inherit;
}

a small {
  font-size:11px;
  color: var(--berkeley-blue);
  margin-top:-0.6em;
  display:block;
}

.wrapper {
  width:940px;
  margin:0 auto;
}

blockquote {
  border-left:1px solid #ddd2c3;
  margin:0;
  padding:0 0 0 20px;
  font-style:italic;
}

code, pre {
  font-family:Monaco, Bitstream Vera Sans Mono, Lucida Console, Terminal;
  color:#333;
  font-size:12px;
}

pre {
  padding:8px 15px;
  background: #fbf8f2;  
  border-radius:5px;
  border:1px solid #e2d9cc;
  overflow-x: auto;
}

table {
  width:100%;
  border-collapse:collapse;
}

th, td {
  text-align:left;
  padding:5px 10px;
  border-bottom:1px solid #e2d9cc;
}

dt {
  color:#444;
  font-weight:700;
}

th {
  color:#444;
}

img {
  max-width:100%;
}

header {
  width:270px;
  float:left;
  position:fixed;
}

header img {
  max-width: 82%;
}

header ul {
  list-style:none;
  height:40px;
  padding:0;
  background: linear-gradient(180deg, rgba(255, 253, 249, 0.98) 0%, rgba(245, 239, 230, 0.98) 100%);
  border-radius:5px;
  border:1px solid #ddd2c4;
  box-shadow: inset rgba(255,255,255,0.85) 0 1px 0, 0 3px 10px rgba(50, 41, 28, 0.04);
  width:270px;
}

header li {
  width:89px;
  float:left;
  border-right:1px solid #ddd2c4;
  height:40px;
}

header ul a {
  line-height:1;
  font-size:11px;
  color:#7b776f;
  display:block;
  text-align:center;
  padding-top:6px;
  height:40px;
}

strong {
  color: var(--ink);
  font-weight:700;
}

header ul li + li {
  width:88px;
  border-left:1px solid rgba(255,255,255,0.9);
}

header ul li + li + li {
  border-right:none;
  width:89px;
}

header ul a strong {
  font-size:14px;
  display:block;
  color: var(--berkeley-blue);
}

section {
  width:580px;
  float:right;
  padding-bottom:50px;
}

small {
  font-size:11px;
}

hr {
  border:0;
  background:#ddd4c8;
  height:1px;
  margin:0 0 20px;
}

footer {
  width:270px;
  float:left;
  position:fixed;
  bottom:50px;
}

/* Custom spacing fixes for the academic website */
section h3 {
  margin-bottom: 12px;
  margin-top: 28px;
}

section h3:first-of-type {
  margin-top: 0;
}

section > p:first-of-type {
  color: #34414c;
  font-size: 15.5px;
  line-height: 1.74;
  margin-bottom: 24px;
}

section ol li {
  margin-bottom: 15px;
}

section ol li:last-child {
  margin-bottom: 0;
}

.writing-list {
  margin: 0 0 0 6px;
  padding-left: 14px;
}

.writing-list li {
  color: var(--ink);
  margin: 10px 0;
  padding-bottom: 0;
}

.writing-list li:last-child {
  margin-bottom: 0;
}

.writing-list li::marker {
  color: #b1a28b;
}

.writing-outlet {
  color: var(--muted-ink);
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-size: 1.03em;
  font-style: italic;
  letter-spacing: 0.01em;
}

.pub-journal {
  color: #4d5f6f;
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-size: 1.06em;
  font-style: italic;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.teaching-header {
  margin-top: 22px;
}

.teaching-list {
  display: grid;
  gap: 18px;
}

.teaching-block {
  border: 0 !important;
  padding-bottom: 8px;
}

.teaching-block:last-child {
  padding-bottom: 0;
}

.teaching-role {
  margin-bottom: 10px;
}

.teaching-courses {
  list-style: none;
  margin: 0;
  padding-left: 10px;
}

.teaching-courses li {
  margin: 0 0 12px;
}

.teaching-courses li:last-child {
  margin-bottom: 0;
}

.teaching-course-main {
  align-items: baseline;
  column-gap: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}

.teaching-course-main a,
.teaching-course-main > span:first-child {
  flex: 1 1 auto;
  min-width: 0;
}

.teaching-course-main > span:first-child {
  display: block;
}

.teaching-course-term {
  color: var(--muted-ink);
  display: inline-block;
  font-size: 14px;
  margin-left: auto;
  min-width: 0;
  position: relative;
  text-align: right;
  white-space: nowrap;
}

.teaching-course-term-group {
  justify-self: end;
  text-align: right;
}

.teaching-course-term-separator {
  color: var(--muted-ink);
}

.teaching-course-term {
  color: var(--muted-ink);
}

.teaching-course-term-static {
  color: var(--muted-ink);
  text-decoration: none;
}

.teaching-course-note {
  color: var(--muted-ink);
  display: block;
  font-size: 13px;
  margin-top: 2px;
  padding-left: 0;
  white-space: normal;
}

@media (max-width: 640px) {
  .teaching-course-main {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 2px;
  }

  .teaching-course-term {
    display: inline;
    margin-left: 0;
    text-align: left;
    white-space: normal;
  }

  .teaching-course-term-group {
    justify-self: start;
    text-align: left;
  }

  .teaching-course-popup {
    left: 0;
    top: calc(100% + 8px);
    transform: none;
  }
}

section div[id] {
  margin-top: 4px;
  margin-bottom: 8px;
}

.toggle-link {
  background: rgba(255, 252, 247, 0.92);
  border: 1px solid #ddd4c7;
  border-radius: 4px;
  box-shadow: none;
  color: #6f6c66;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 9px;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1;
  margin-left: 6px;
  padding: 5px 9px;
  text-transform: uppercase;
  vertical-align: middle;
}

.toggle-link::before {
  color: #9a8f80;
  content: "+";
  display: inline-block;
  font-family: inherit;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
}

.toggle-link[aria-expanded="true"]::before {
  content: "–";
}

.toggle-link:hover,
.toggle-link:focus {
  background: #fffdf9;
  border-color: #cbbda8;
  color: var(--berkeley-blue);
  text-decoration: none;
}

.paper-details {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(58, 48, 34, 0.045);
  margin-top: 12px;
  padding: 17px;
}

.paper-details.is-visible {
  display: block;
}

.paper-details p:last-child {
  margin-bottom: 0;
}

.paper-figure {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 8px;
  margin: 14px 0 16px;
  padding: 12px;
}

.paper-figure img {
  display: block;
  height: auto;
  margin: 0 auto;
  max-width: 100%;
  width: auto;
}

.paper-figure-pnas {
  max-width: 100%;
}

.figure-caption {
  color: var(--muted-ink);
  font-size: 12px;
  line-height: 1.45;
  margin: 8px 2px 0;
}

.paper-figure-placeholder {
  background: var(--surface);
  border: 1px dashed #c5baa8;
  border-radius: 8px;
  color: var(--muted-ink);
  padding: 12px;
}

.chapter-list {
  display: grid;
  gap: 12px;
  margin: 16px 0 8px;
}

.chapter-card {
  background: rgba(255, 251, 246, 0.78);
  border: 1px solid #dfd4c6;
  border-radius: 12px;
  padding: 14px;
}

.chapter-title {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
  margin-bottom: 0;
}

.chapter-toggle {
  margin-left: 0;
}

.chapter-panel {
  margin-top: 12px;
}

.chapter-panel p:last-child {
  margin-bottom: 0;
}

.chapter-inline-photo {
  align-items: end;
  background: linear-gradient(145deg, #f1eadf 0%, #e9e0d2 54%, #ddd2c0 100%);
  border: 1px solid #d1c2ae;
  border-radius: 10px;
  color: #4f473d;
  display: flex;
  font-size: 13px;
  font-weight: 700;
  margin-top: 12px;
  min-height: 164px;
  padding: 14px;
}

.chapter-gallery {
  margin-top: 18px;
}

.chapter-carousel-shell {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  margin-top: 14px;
}

.chapter-carousel-track {
  display: grid;
  gap: 12px;
  grid-auto-columns: minmax(180px, 1fr);
  grid-auto-flow: column;
  overflow-x: auto;
  padding-bottom: 6px;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}

.chapter-slide {
  align-items: end;
  background: linear-gradient(145deg, #f1eadf 0%, #e9e0d2 54%, #ddd2c0 100%);
  border: 1px solid #d1c2ae;
  border-radius: 10px;
  color: #4f473d;
  display: flex;
  font-size: 13px;
  font-weight: 700;
  justify-content: flex-start;
  min-height: 168px;
  padding: 14px;
  scroll-snap-align: start;
}

.chapter-carousel-button {
  background: var(--surface);
  border: 1px solid #d6cab9;
  border-radius: 999px;
  color: var(--berkeley-blue);
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  min-height: 34px;
  padding: 6px 11px;
}

.chapter-carousel-button:hover,
.chapter-carousel-button:focus {
  background: #f5eee4;
  border-color: #bba789;
  color: var(--berkeley-blue);
}

.paper-actions {
  border-top: 1px solid rgba(195, 181, 160, 0.7);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
  padding-top: 15px;
}

.paper-action,
.paper-action:visited,
.paper-action:active {
  background: var(--surface);
  border: 1px solid #d8ccba;
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(65, 52, 34, 0.035);
  color: var(--berkeley-blue);
  cursor: pointer;
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 7px 12px;
  text-decoration: none;
  text-transform: uppercase;
}

.paper-action:hover,
.paper-action:focus {
  background: #faf4ea;
  border-color: #bca98a;
  color: var(--berkeley-blue);
  text-decoration: none;
}

.paper-action-disabled {
  background: #f2ede6;
  border-color: #ddd2c5;
  box-shadow: none;
  color: #a09382;
  cursor: not-allowed;
  pointer-events: none;
}

.explorer-shell {
  background: linear-gradient(180deg, rgba(255, 252, 247, 0.96) 0%, rgba(249, 244, 236, 0.96) 100%);
  border: 1px solid #dfd4c6;
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(63, 52, 36, 0.045);
  margin: 8px 0 24px;
  padding: 19px;
  position: relative;
}

.explorer-page {
  background: linear-gradient(180deg, #f4eee5 0%, #fbf8f2 220px, #f8f4ed 100%);
}

.explorer-page-wrap {
  margin: 0 auto;
  max-width: 1140px;
  padding: 34px 28px 54px;
}

.explorer-page header,
.explorer-page section,
.explorer-page footer {
  float: none;
  position: static;
  width: auto;
}

.explorer-page-back {
  font-size: 13px;
  margin-bottom: 16px;
}

.explorer-page-header {
  background: rgba(255, 252, 247, 0.82);
  border: 1px solid rgba(220, 209, 193, 0.95);
  border-radius: 16px;
  box-shadow: 0 9px 22px rgba(63, 52, 36, 0.04);
  margin-bottom: 20px;
  padding: 24px 26px 22px;
}

.explorer-page-kicker {
  color: #6f665d;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.explorer-page-header h1 {
  font-size: 36px;
  line-height: 1.1;
  margin-bottom: 10px;
  max-width: 760px;
}

.explorer-page-lede {
  color: #42505b;
  font-size: 17px;
  line-height: 1.6;
  margin-bottom: 0;
  max-width: 860px;
}

.explorer-page-switch {
  margin-top: 16px;
}

.explorer-shell-standalone {
  clear: both;
  margin-top: 0;
  margin-bottom: 0;
}

.explorer-intro {
  color: #42505b;
  margin-bottom: 14px;
}

.explorer-controls {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  margin-bottom: 16px;
}

.explorer-controls-predict {
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto auto auto;
}

.explorer-control {
  display: block;
}

.explorer-control span {
  color: #6a635a;
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 5px;
  text-transform: uppercase;
}

.explorer-control select,
.explorer-control input,
.explorer-reset {
  background: #fffdf9;
  border: 1px solid #d7cbba;
  border-radius: 6px;
  box-sizing: border-box;
  color: var(--ink);
  font: inherit;
  min-height: 38px;
  padding: 8px 10px;
  width: 100%;
}

.explorer-control-search {
  min-width: 0;
}

.explorer-reset {
  color: var(--berkeley-blue);
  cursor: pointer;
  font-weight: 700;
  padding: 8px 14px;
  width: auto;
}

.explorer-stats {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 16px;
}

.explorer-stats-compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.explorer-stat {
  background: rgba(255, 253, 249, 0.92);
  border: 1px solid #e0d6c8;
  border-radius: 8px;
  padding: 10px 12px;
}

.explorer-stat-label {
  color: #5a6b7a;
  display: block;
  font-size: 11px;
  margin-bottom: 5px;
}

.explorer-stat strong {
  color: var(--berkeley-blue);
  display: block;
  font-size: 18px;
}

.explorer-visuals {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.95fr);
  margin-bottom: 16px;
}

.explorer-chart-card,
.explorer-detail-card,
.explorer-table-card {
  background: rgba(255, 253, 249, 0.94);
  border: 1px solid #e1d8cb;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(63, 52, 36, 0.03);
  padding: 15px;
}

.explorer-chart-header h4,
.explorer-table-card h4,
.explorer-detail-card h4 {
  color: var(--berkeley-blue);
  margin: 0 0 6px;
}

.explorer-chart-header p {
  color: #6a736f;
  font-size: 13px;
  margin-bottom: 12px;
}

#pnas-scatterplot {
  display: block;
  height: auto;
  width: 100%;
}

.explorer-legend {
  color: #6a736f;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 12px;
  margin-top: 10px;
}

.explorer-is-blind-mode .explorer-legend {
  display: none;
}

.legend-swatch {
  border-radius: 999px;
  display: inline-block;
  height: 10px;
  margin-right: 6px;
  width: 10px;
}

.legend-practitioner {
  background: #c73e3a;
}

.legend-public {
  background: #2c6db2;
}

.legend-gpt {
  background: #b86d1f;
}

.legend-visitor {
  background: #1b8a5a;
}

.legend-connector {
  background: #c8d4de;
}

.explorer-detail-card {
  min-height: 100%;
}

.predict-card {
  margin-top: 0;
  max-width: 880px;
}

.explorer-detail-kicker {
  color: #4f6477;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.explorer-detail-title {
  font-size: 18px;
  line-height: 1.3;
}

.explorer-detail-message {
  color: #32404b;
  font-size: 15px;
  line-height: 1.55;
  margin-bottom: 14px;
}

.explorer-detail-metrics {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.explorer-detail-metrics div {
  background: #f8f4ed;
  border-radius: 8px;
  padding: 10px;
}

.explorer-detail-metrics span {
  color: #5a6b7a;
  display: block;
  font-size: 11px;
  margin-bottom: 4px;
}

.explorer-detail-metrics strong {
  color: var(--berkeley-blue);
  display: block;
  font-size: 18px;
}

.explorer-detail-note {
  color: #5b6670;
  font-size: 13px;
  margin-top: 12px;
}

.explorer-source-card {
  background: #faf6f0;
  border: 1px solid #e3d9cc;
  border-radius: 10px;
  margin-top: 16px;
  padding: 12px 14px;
}

.explorer-source-card p {
  color: #42586c;
  font-size: 13px;
  margin: 0 0 8px;
}

.explorer-source-card p:last-child {
  margin-bottom: 0;
}

.explorer-source-label {
  color: var(--berkeley-blue);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.explorer-source-note {
  color: #5a6b7a;
}

.predict-context-card {
  background: rgba(252, 248, 241, 0.72);
  border: 1px solid #e6ddd1;
  border-radius: 12px;
  margin-bottom: 16px;
  padding: 12px 15px;
}

.predict-target-label {
  color: #6d665e;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.predict-card-title {
  color: #405160;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.28;
  margin-bottom: 0;
}

.predict-message-label {
  color: #5f6d79;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.predict-message-card {
  background: #fffdf9;
  border: 1px solid #d7cbba;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(63, 52, 36, 0.05);
  color: #1f2e39;
  font-size: 19px;
  line-height: 1.78;
  margin-bottom: 0;
  padding: 18px 20px;
}

.explorer-hidden-value {
  color: #7d8f9f;
  font-size: 12px;
  font-style: italic;
}

.prediction-lab {
  background: #f7fafc;
  border: 1px solid #dde7ef;
  border-radius: 10px;
  margin-top: 16px;
  padding: 12px;
}

.prediction-lab-header h5 {
  color: var(--berkeley-blue);
  font-size: 15px;
  margin: 0 0 4px;
}

.prediction-lab-header p {
  color: #5a6b7a;
  font-size: 13px;
  margin-bottom: 12px;
}

.prediction-lab-controls input[type="range"] {
  width: 100%;
}

.prediction-lab-input-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.prediction-lab-input-row input[type="number"] {
  background: #fff;
  border: 1px solid #c6d3df;
  border-radius: 6px;
  color: var(--ink);
  font: inherit;
  min-height: 38px;
  padding: 8px 10px;
  width: 96px;
}

.prediction-lab-input-row span {
  color: #5a6b7a;
  font-size: 13px;
}

.prediction-lab-readout {
  color: #42586c;
  font-size: 13px;
  margin-top: 10px;
}

.prediction-blind-note {
  background: #f5f8fb;
  border: 1px dashed #c8d5e0;
  border-radius: 10px;
  color: #42586c;
  font-size: 13px;
  line-height: 1.55;
  margin-top: 14px;
  padding: 12px 14px;
}

.prediction-blind-note strong {
  color: var(--berkeley-blue);
}

.ground-truth-callout {
  background: linear-gradient(135deg, rgba(0, 50, 98, 0.08) 0%, rgba(253, 181, 21, 0.16) 100%);
  border: 1px solid rgba(0, 50, 98, 0.18);
  border-radius: 12px;
  margin-top: 18px;
  padding: 12px 14px;
}

.ground-truth-callout span {
  color: #4f6477;
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.ground-truth-callout strong {
  color: var(--berkeley-blue);
  display: block;
  font-size: 24px;
  line-height: 1.1;
}

.explorer-reset-subtle {
  min-height: 0;
  padding: 8px 12px;
}

.explorer-reset[disabled] {
  color: #8ca0b1;
  cursor: default;
}

.comparison-strip {
  margin-top: 18px;
  padding: 38px 0 78px;
  position: relative;
}

.comparison-strip-axis-label {
  color: rgba(102, 114, 125, 0.38);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  pointer-events: none;
  position: absolute;
  text-transform: uppercase;
  top: 10px;
}

.comparison-strip-axis-label-left {
  padding-right: 14px;
  text-align: right;
}

.comparison-strip-axis-label-right {
  padding-left: 14px;
  text-align: left;
}

.comparison-strip-track {
  background: linear-gradient(90deg, #dbe6ee 0%, #c6d5e1 100%);
  border-radius: 999px;
  height: 4px;
}

.comparison-strip-zero {
  bottom: 18px;
  pointer-events: none;
  position: absolute;
  top: 12px;
  transform: translateX(-50%);
  width: 1px;
}

.comparison-strip-zero::before {
  background: repeating-linear-gradient(
    to bottom,
    rgba(111, 108, 102, 0.48) 0,
    rgba(111, 108, 102, 0.48) 5px,
    transparent 5px,
    transparent 10px
  );
  bottom: 0;
  content: "";
  left: 0;
  position: absolute;
  top: 0;
  width: 1px;
}

.comparison-strip-zero span {
  background: linear-gradient(180deg, rgba(251, 248, 242, 0.98) 0%, rgba(248, 244, 237, 0.98) 100%);
  color: #6d665e;
  font-size: 10px;
  font-weight: 700;
  left: 50%;
  line-height: 1;
  padding: 0 4px;
  position: absolute;
  top: -12px;
  transform: translateX(-50%);
  white-space: nowrap;
}

.comparison-marker {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
}

.comparison-marker-top {
  top: 0;
}

.comparison-marker-bottom {
  top: 58px;
}

.comparison-marker::after {
  background: #1f2d3d;
  border-radius: 999px;
  content: "";
  display: block;
  height: 10px;
  left: 50%;
  position: absolute;
  top: 38px;
  transform: translateX(-50%);
  width: 10px;
}

.comparison-marker-bottom::after {
  top: -18px;
}

.comparison-marker span,
.comparison-marker strong {
  display: block;
  text-align: center;
  white-space: nowrap;
}

.comparison-marker span {
  color: #4f6477;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.comparison-marker strong {
  color: var(--ink);
  font-size: 12px;
  margin-top: 4px;
}

.comparison-marker-actual::after {
  background: #1f2d3d;
  box-shadow: 0 0 0 4px rgba(253, 181, 21, 0.3);
  height: 14px;
  width: 14px;
}

.comparison-marker-actual span {
  color: var(--berkeley-blue);
}

.comparison-marker-actual strong {
  color: var(--berkeley-blue);
  font-size: 13px;
  font-weight: 700;
}

.comparison-marker-practitioner::after {
  background: #c73e3a;
}

.comparison-marker-public::after {
  background: #2c6db2;
}

.comparison-marker-gpt::after {
  background: #b86d1f;
}

.comparison-marker-visitor::after {
  background: #1b8a5a;
}

.comparison-summary {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 18px;
}

.comparison-summary div {
  background: #f6f9fc;
  border-radius: 8px;
  padding: 10px;
}

.comparison-summary span {
  color: #5a6b7a;
  display: block;
  font-size: 11px;
  margin-bottom: 4px;
}

.comparison-summary strong {
  color: var(--berkeley-blue);
  display: block;
  font-size: 18px;
}

.comparison-notes {
  color: #42586c;
  font-size: 13px;
  margin-top: 12px;
}

.explorer-table {
  border-collapse: collapse;
  width: 100%;
}

.explorer-table th,
.explorer-table td {
  border-bottom: 1px solid #e6edf3;
  font-size: 13px;
  padding: 10px 8px;
  vertical-align: top;
}

.explorer-table th {
  color: #4f6477;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.explorer-table tbody tr {
  cursor: pointer;
}

.explorer-table tbody tr:hover,
.explorer-table tbody tr.is-selected {
  background: #f4f8fb;
}

.explorer-message-cell {
  color: #22384a;
  line-height: 1.45;
}

.explorer-tooltip {
  background: rgba(17, 28, 39, 0.94);
  border-radius: 8px;
  color: #eef3f7;
  font-size: 12px;
  line-height: 1.45;
  max-width: 220px;
  padding: 10px 12px;
  pointer-events: none;
  position: absolute;
  z-index: 5;
}

.explorer-tooltip-title {
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
}

.explorer-tooltip-body {
  color: #edf2f7;
  margin-bottom: 6px;
}

.explorer-tooltip-metric {
  color: #d9e3ec;
}

.explorer-empty,
.explorer-error,
.explorer-empty-row {
  color: #5a6b7a;
}

.is-hidden {
  display: none !important;
}

section p {
  margin-bottom: 15px;
}

section p:last-child {
  margin-bottom: 0;
}

.media-links {
  font-size: 0.9em;
  font-variant: small-caps;
  letter-spacing: 0.04em;
  color: #767676;
}

.media-links a {
  font-weight: 600;
}

.media-links a:hover {
  text-decoration: underline;
}

@media print, screen and (max-width: 960px) {
  
  div.wrapper {
    width:auto;
    margin:0;
  }
  
  header, section, footer {
    float:none;
    position:static;
    width:auto;
  }
  
  header {
    padding-right:320px;
  }
  
  section {
    border:1px solid #e5e5e5;
    border-width:1px 0;
    padding:20px 0;
    margin:0 0 20px;
  }

  .explorer-controls,
  .explorer-stats,
  .explorer-visuals {
    grid-template-columns: 1fr;
  }

  .explorer-controls-predict,
  .explorer-stats-compact {
    grid-template-columns: 1fr;
  }

  .explorer-page-wrap {
    padding-left: 18px;
    padding-right: 18px;
  }
  
  header a small {
    display:inline;
  }
  
  header ul {
    position:absolute;
    right:50px;
    top:52px;
  }
}

.course-page {
  background: linear-gradient(180deg, #f4eee5 0%, #fbf8f2 220px, #f8f4ed 100%);
}

.course-page header,
.course-page section,
.course-page footer {
  border: 0 !important;
  float: none !important;
  margin: 0 !important;
  padding: 0 !important;
  position: static !important;
  width: auto !important;
}

.course-page-wrap {
  clear: both;
  display: block;
  margin: 0 auto;
  max-width: 860px;
  padding: 34px 28px 54px;
}

.course-page-wrap::after {
  content: "";
  display: block;
  height: 26vh;
}

.course-page h3 {
  margin: 0 0 10px;
}

.course-page p,
.course-page ul {
  margin: 0 0 12px;
}

.course-page-back {
  clear: both;
  display: block;
  float: none !important;
  font-size: 13px;
  margin-bottom: 16px;
  position: static !important;
  width: auto !important;
}


.course-page-header {
  background: rgba(255, 252, 247, 0.82);
  border: 1px solid rgba(220, 209, 193, 0.95);
  border-radius: 16px;
  box-shadow: 0 9px 22px rgba(63, 52, 36, 0.04);
  clear: both;
  display: block;
  float: none !important;
  margin-bottom: 20px;
  padding: 24px 26px 22px;
  position: static !important;
  width: auto !important;
}

.course-page-kicker {
  color: #6f665d;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.course-page-header h1 {
  font-size: 34px;
  line-height: 1.1;
  margin-bottom: 10px;
}

.course-page-lede {
  color: #42505b;
  font-size: 17px;
  line-height: 1.6;
  margin-bottom: 0;
}

.course-menu {
  backdrop-filter: blur(10px);
  background: rgba(255, 250, 244, 0.9);
  border: 1px solid #dfd4c7;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(63, 52, 36, 0.035);
  margin: 0 0 16px;
  padding: 0 12px;
  position: sticky;
  top: 14px;
  z-index: 10;
}

.course-menu-list {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.course-menu-list li {
  margin: 0;
}

.course-menu-link {
  color: #5e6f7d;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 12px 14px;
  text-decoration: none;
  text-transform: uppercase;
}

.course-menu-link:hover,
.course-menu-link:focus {
  color: var(--berkeley-blue);
  text-decoration: none;
}

.course-meta {
  background: rgba(255, 253, 249, 0.94);
  border: 1px solid #e1d8cb;
  border-radius: 12px;
  clear: both;
  display: grid;
  float: none !important;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 16px;
  padding: 14px 16px;
  position: static !important;
  width: auto !important;
}

.course-meta-item span {
  color: #6a635a;
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.course-meta-item strong {
  color: var(--berkeley-blue);
  display: block;
  font-size: 16px;
}

.course-meta-item small {
  color: var(--muted-ink);
  display: block;
  font-size: 12px;
  margin-top: 4px;
}

.course-section {
  background: rgba(255, 253, 249, 0.92);
  border: 1px solid #e1d8cb;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(63, 52, 36, 0.03);
  clear: both;
  float: none !important;
  margin-bottom: 14px;
  padding: 16px 18px;
  position: static !important;
  scroll-margin-top: 84px;
  width: auto !important;
}

.course-section:target {
  background: rgba(249, 245, 237, 0.98);
  border-color: #d5c4af;
  box-shadow: 0 0 0 3px rgba(173, 132, 82, 0.12), 0 10px 24px rgba(63, 52, 36, 0.06);
}

.course-section h3 {
  margin-top: 0;
}

.course-section p:last-child,
.course-section ul:last-child {
  margin-bottom: 0;
}

.course-list {
  margin: 0;
  padding-left: 18px;
}

.course-grid {
  align-items: start;
  clear: both;
  display: grid;
  float: none !important;
  gap: 14px;
  grid-template-columns: minmax(0, 1.35fr) minmax(250px, 0.85fr);
  position: static !important;
  width: auto !important;
}

.course-grid > main,
.course-grid > aside {
  min-width: 0;
}

.course-callout {
  background: linear-gradient(180deg, rgba(250, 244, 234, 0.95) 0%, rgba(246, 238, 227, 0.95) 100%);
  border: 1px solid #e0d5c8;
  border-radius: 12px;
  padding: 16px 18px;
}

.course-callout h3,
.course-sidebar h3 {
  margin-top: 0;
}

.course-sidebar {
  align-self: start;
  display: grid;
  float: none !important;
  gap: 14px;
  position: static !important;
  width: auto !important;
}

.course-sidebar-card {
  background: rgba(255, 253, 249, 0.92);
  border: 1px solid #e1d8cb;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(63, 52, 36, 0.03);
  padding: 16px 18px;
}

.course-sidebar-card p:last-child,
.course-sidebar-card ul:last-child {
  margin-bottom: 0;
}

.course-schedule {
  display: grid;
  gap: 8px;
}

.course-week {
  background: rgba(255, 252, 247, 0.94);
  border: 1px solid #e2d9cd;
  border-radius: 12px;
  overflow: hidden;
}

.course-week summary {
  align-items: flex-start;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  list-style: none;
  padding: 12px 14px;
}

.course-week summary::-webkit-details-marker {
  display: none;
}

.course-week summary strong {
  color: var(--berkeley-blue);
  font-size: 16px;
  line-height: 1.25;
}

.course-week summary span {
  color: var(--muted-ink);
  font-size: 13px;
  white-space: normal;
}

.course-week[open] summary {
  background: rgba(247, 241, 232, 0.85);
}

.course-week-body {
  border-top: 1px solid #e7ddd0;
  padding: 12px 14px 14px;
}

.course-week-topic {
  color: #465460;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 6px;
}

.course-week-body p:last-child,
.course-week-body ul:last-child {
  margin-bottom: 0;
}

.course-pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.course-pill-list li {
  background: #f6efe5;
  border: 1px solid #e0d4c5;
  border-radius: 999px;
  color: #5d6771;
  font-size: 12px;
  margin: 0;
  padding: 6px 10px;
}

.course-note {
  color: var(--muted-ink);
  font-size: 13px;
  margin-top: 8px;
}

@media print, screen and (max-width: 720px) {
  .course-page-wrap {
    padding: 24px 18px 40px;
  }

  .course-page-wrap::after {
    height: 20vh;
  }

  .course-menu {
    overflow-x: auto;
    padding: 0 8px;
    top: 10px;
  }

  .course-menu-list {
    flex-wrap: nowrap;
    min-width: max-content;
  }

  .course-meta {
    grid-template-columns: 1fr;
  }

  .course-grid {
    grid-template-columns: 1fr;
  }

  .course-week summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .course-week summary span {
    white-space: normal;
  }
}

@media print, screen and (max-width: 720px) {
  body {
    word-wrap:break-word;
  }
  
  header {
    padding:0;
  }
  
  header ul, header p.view {
    position:static;
  }
  
  pre, code {
    word-wrap:normal;
  }

  .explorer-shell {
    padding: 14px;
  }

  .explorer-detail-metrics {
    grid-template-columns: 1fr;
  }

  .comparison-summary {
    grid-template-columns: 1fr;
  }

  .prediction-lab-input-row {
    align-items: stretch;
  }

  .chapter-carousel-shell {
    grid-template-columns: 1fr;
  }

  .explorer-table th:nth-child(1),
  .explorer-table td:nth-child(1),
  .explorer-table th:nth-child(5),
  .explorer-table td:nth-child(5),
  .explorer-table th:nth-child(6),
  .explorer-table td:nth-child(6),
  .explorer-table th:nth-child(7),
  .explorer-table td:nth-child(7) {
    display: none;
  }
}

@media print, screen and (max-width: 480px) {
  body {
    padding:15px;
  }
  
  header ul {
    display:none;
  }
}

@media print {
  body {
    padding:0.4in;
    font-size:12pt;
    color:#444;
  }
}

/* Tonnetz Lab */
.tonnetz-page-wrap {
  max-width: 1220px;
}

.tonnetz-page-header h1 {
  max-width: none;
}

.tonnetz-shell {
  padding: 18px;
}

.tonnetz-toolbar {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: 150px 150px 150px minmax(180px, 1fr) auto;
  margin-bottom: 16px;
}

.tonnetz-check {
  align-items: center;
  background: #fffdf9;
  border: 1px solid #d7cbba;
  border-radius: 6px;
  color: #40505d;
  cursor: pointer;
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  gap: 8px;
  min-height: 38px;
  padding: 8px 10px;
}

.tonnetz-check input {
  margin: 0;
}

.tonnetz-action {
  min-width: 86px;
}

.tonnetz-main-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) 320px;
}

.tonnetz-lattice-card,
.tonnetz-panel {
  background: rgba(255, 253, 249, 0.94);
  border: 1px solid #e1d8cb;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(63, 52, 36, 0.03);
}

.tonnetz-lattice-card {
  min-width: 0;
  padding: 15px;
}

.tonnetz-card-header {
  align-items: start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 12px;
}

.tonnetz-card-header h2 {
  font-size: 30px;
  margin-bottom: 0;
}

.tonnetz-legend {
  color: #5b6670;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  line-height: 1.2;
  max-width: 330px;
}

.tonnetz-legend span {
  align-items: center;
  display: inline-flex;
  font-size: 12px;
  gap: 6px;
}

.tonnetz-swatch {
  border-radius: 999px;
  display: inline-block;
  height: 10px;
  width: 10px;
}

.tonnetz-swatch-root {
  background: #23415f;
}

.tonnetz-swatch-chord {
  background: #9d7c3d;
}

.tonnetz-swatch-selected {
  background: #3f7f67;
}

.tonnetz-svg-wrap {
  background:
    linear-gradient(rgba(35, 65, 95, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(35, 65, 95, 0.035) 1px, transparent 1px),
    #fbf8f2;
  background-size: 34px 34px;
  border: 1px solid #e0d7ca;
  border-radius: 10px;
  overflow: hidden;
}

#tonnetz-svg {
  display: block;
  height: auto;
  min-height: 480px;
  width: 100%;
}

.tonnetz-edge {
  stroke: rgba(96, 111, 124, 0.4);
  stroke-linecap: round;
  stroke-width: 1.5;
}

.tonnetz-edge-major-third {
  stroke: rgba(157, 124, 61, 0.38);
}

.tonnetz-edge-minor-third {
  stroke: rgba(66, 127, 103, 0.35);
}

.tonnetz-triad {
  opacity: 0.24;
  stroke-width: 1;
}

.tonnetz-triad-major {
  fill: #f3dfaa;
  stroke: #d5b86a;
}

.tonnetz-triad-minor {
  fill: #dcebe4;
  stroke: #9abbaa;
}

.tonnetz-node {
  cursor: pointer;
}

.tonnetz-node-circle {
  fill: #fffdf9;
  stroke: #b8aa98;
  stroke-width: 1.5;
  transition: fill 120ms ease, stroke 120ms ease, stroke-width 120ms ease;
}

.tonnetz-node-label {
  fill: #33424e;
  font-family: Lato, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
  pointer-events: none;
}

.tonnetz-node:hover .tonnetz-node-circle,
.tonnetz-node:focus .tonnetz-node-circle {
  fill: #f7efe2;
  stroke: #9d7c3d;
  stroke-width: 2;
}

.tonnetz-node.is-chord-tone .tonnetz-node-circle {
  fill: #f7e7bd;
  stroke: #ad873b;
  stroke-width: 2.2;
}

.tonnetz-node.is-root .tonnetz-node-circle {
  fill: #23415f;
  stroke: #14293e;
}

.tonnetz-node.is-root .tonnetz-node-label {
  fill: #fffdf9;
}

.tonnetz-node.is-selected .tonnetz-node-circle {
  stroke: #3f7f67;
  stroke-width: 3.5;
}

.tonnetz-side {
  display: grid;
  gap: 14px;
}

.tonnetz-panel {
  min-height: 0;
}

.tonnetz-panel h3 {
  font-size: 24px;
  margin-bottom: 10px;
}

.tonnetz-note-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.tonnetz-note-pill {
  align-items: center;
  background: #f7e7bd;
  border: 1px solid #d9bd75;
  border-radius: 999px;
  color: #354451;
  display: inline-flex;
  font-size: 14px;
  font-weight: 700;
  justify-content: center;
  min-height: 30px;
  min-width: 42px;
  padding: 4px 10px;
}

.tonnetz-note-row-muted .tonnetz-note-pill {
  background: #e9f1ed;
  border-color: #abc9bb;
}

.tonnetz-empty,
.tonnetz-panel-note {
  color: #5b6670;
  font-size: 13px;
}

.tonnetz-panel-note {
  line-height: 1.5;
  margin-bottom: 0;
}

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

.tonnetz-transform {
  background: #fffdf9;
  border: 1px solid #d8ccba;
  border-radius: 8px;
  color: #354451;
  cursor: pointer;
  min-height: 62px;
  padding: 9px;
  text-align: left;
}

.tonnetz-transform strong,
.tonnetz-transform span {
  display: block;
}

.tonnetz-transform strong {
  color: var(--berkeley-blue);
  font-size: 19px;
  line-height: 1;
  margin-bottom: 6px;
}

.tonnetz-transform span {
  color: #5d6872;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.2;
  text-transform: uppercase;
}

.tonnetz-transform:hover,
.tonnetz-transform:focus {
  background: #faf4ea;
  border-color: #bca98a;
}

.tonnetz-transform-muted {
  background: #f6f1ea;
}

.tonnetz-trace {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tonnetz-trace li {
  align-items: baseline;
  border-bottom: 1px solid #ede4d8;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin: 0;
  padding: 7px 0;
}

.tonnetz-trace li:first-child {
  padding-top: 0;
}

.tonnetz-trace li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.tonnetz-trace span {
  color: #6a635a;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tonnetz-trace strong {
  color: var(--berkeley-blue);
  font-size: 14px;
  text-align: right;
}

@media print, screen and (max-width: 960px) {
  .tonnetz-toolbar,
  .tonnetz-main-grid {
    grid-template-columns: 1fr;
  }

  .tonnetz-page section {
    border: 0;
    margin: 0;
    padding: 0;
  }

  .tonnetz-card-header {
    display: block;
  }

  .tonnetz-legend {
    justify-content: flex-start;
    margin-top: 12px;
  }
}

@media print, screen and (max-width: 560px) {
  .tonnetz-shell {
    padding: 13px;
  }

  .tonnetz-card-header h2 {
    font-size: 25px;
  }

  #tonnetz-svg {
    min-height: 360px;
  }

  .tonnetz-transform-grid {
    grid-template-columns: 1fr;
  }
}
