.cancer-records {
  --records-ink: #292923;
  --records-muted: #5e5c51;
  --records-paper: #fbf7ee;
  --records-line: #ddd6c8;
  --records-accent: #a54727;
  --records-green: #2e5b4d;
  --records-tint: #e6eee7;
  padding-bottom: 3rem;
}
.cancer-records [hidden] { display: none !important; }
.records-bar {
  padding: .5rem 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: .45rem 1.1rem;
  border-bottom: 1px solid var(--records-line);
}
.records-story-tabs .section-nav { display: flex; }
.records-review-link { flex-basis: 100%; }
.records-brand { display: flex; align-items: center; gap: .5rem; font-weight: 750; }
.records-brand a { color: var(--records-ink); text-decoration: none; }
.records-brand .records-site-link { display: inline-grid; place-items: center; width: 2.05rem; height: 2.05rem; background: #ff8a26; letter-spacing: -.06em; }
.records-hero {
  background: var(--records-paper);
  color: var(--records-ink);
  border: 1px solid var(--records-line);
  border-radius: 1.5rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(1rem, 5vw, 4rem);
  padding: clamp(1.2rem, 5vw, 3.25rem);
  margin-top: 1.5rem;
}
.records-hero img { width: clamp(6rem, 16vw, 11rem); height: auto; border-radius: 1rem; }
.records-kicker { color: var(--records-accent); font-size: .84rem; font-weight: 750; margin: 0 0 .3rem; }
.records-hero h1, .records-heading h1 { margin: 0; font-size: clamp(2.1rem, 6vw, 4.05rem); letter-spacing: -.045em; line-height: 1.02; }
.records-summary { color: var(--records-muted); margin: .7rem 0 0; font-size: clamp(1rem, 2.2vw, 1.23rem); }
.records-profile-lead p { margin: 0; }
.records-profile-lead strong { color: var(--records-ink); }
.records-profile-link { display: inline-block; margin-top: .7rem; }
.records-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; margin: 1rem 0; }
.records-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: .2rem .9rem;
  padding: .85rem 1rem;
  border: 1px solid var(--records-line);
  border-radius: .75rem;
  background: #fffdf9;
  color: var(--records-ink);
  text-decoration: none;
}
.records-card:hover { border-color: var(--records-accent); background: var(--records-paper); }
.records-card strong { font-size: 1.07rem; grid-column: 1; }
.records-card span:not(.arrow) { color: var(--records-muted); grid-column: 1; font-size: .9rem; }
.records-card .arrow { color: var(--records-accent); grid-column: 2; grid-row: 1 / span 2; }
.records-status {
  margin: 0 0 1rem;
  padding: clamp(1rem, 3vw, 1.65rem);
  background: #f5eadd;
  border-left: 4px solid var(--records-accent);
  border-radius: 0 .85rem .85rem 0;
}
.records-status-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem .75rem; }
.records-status h2 { font-size: 1.17rem; margin: 0; }
.records-status time { color: #843817; font-size: .84rem; font-weight: 700; }
.records-status p { margin: .55rem 0 0; color: var(--records-ink); }
.records-profile {
  margin: 1.5rem 0 0;
  padding: clamp(1rem, 4vw, 2rem);
  background: #fffdf9;
  border: 1px solid var(--records-line);
  border-top: 3px solid #c98359;
  border-radius: .9rem;
  overflow-wrap: anywhere;
}
.records-profile > h2 { margin-top: 0; }
.records-profile > :last-child { margin-bottom: 0; }
.records-heading { padding: 1.65rem 0 1rem; }
.records-heading p { color: var(--records-muted); margin: .55rem 0 0; }
.records-heading-timeline { padding-bottom: .75rem; }
.records-prose-imaging img { display: block; width: min(100%, 42rem); height: auto; border-radius: .7rem; background: #101010; }
.records-prose-imaging h2 { margin-top: 2rem; }
.records-story-intro, .records-story-chapter {
  color: var(--records-ink);
  padding: clamp(1rem, 4vw, 2rem);
  border-radius: .9rem;
}
.records-story-intro {
  background: #f3e9db;
  border: 1px solid #e1cbb2;
  margin-bottom: 1.1rem;
}
.records-prose-story .records-story-intro > p:first-child {
  margin-top: 0;
  color: #702e18;
  font: 1.55rem/1.35 Georgia, serif;
  font-size: clamp(1.38rem, 3.4vw, 2.05rem);
  letter-spacing: -.025em;
}
.records-story-chapter {
  background: #fffdf9;
  border: 1px solid var(--records-line);
  border-top: 3px solid #c98359;
  margin: 0 0 .95rem;
}
.records-story-chapter:nth-child(3n) { background: #f1f4ed; border-top-color: #70907b; }
.records-story-chapter:nth-child(3n + 1) { background: #fbf3e9; }
.records-prose-story .records-story-chapter > h2 {
  margin: 0 0 .7rem;
  color: #663320;
  font: 1.65rem/1.12 Georgia, serif;
  font-size: clamp(1.55rem, 3.1vw, 2.25rem);
  letter-spacing: -.025em;
}
.records-prose-story .records-story-chapter:nth-child(3n) > h2 { color: #315544; }
.records-prose-story .records-story-chapter > h2 + p { color: var(--records-ink); font-weight: 600; }
.records-prose-story :is(.records-story-intro, .records-story-chapter) > p + p { margin-top: .75rem; }
.records-story-intro > :last-child, .records-story-chapter > :last-child { margin-bottom: 0; }

.records-prose .biopsy-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0 .45rem;
  margin: .85rem 0 1.35rem;
  font-size: .95rem;
  line-height: 1.55;
}
.records-prose .biopsy-table th { padding: .3rem .8rem .5rem; border-bottom: 0; color: var(--records-muted); background: transparent; }
.biopsy-table th:nth-child(1) { width: 14%; }
.biopsy-table th:nth-child(2) { width: 18%; }
.biopsy-table th:nth-child(3) { width: 36%; }
.records-prose .biopsy-table td {
  padding: .9rem .8rem;
  vertical-align: top;
  border-block: 1px solid var(--records-line);
  background: #fffdf9;
  overflow-wrap: anywhere;
}
.records-prose .biopsy-table td:first-child { border-left: 3px solid #c9815b; border-radius: .55rem 0 0 .55rem; }
.records-prose .biopsy-table td:last-child { border-right: 1px solid var(--records-line); border-radius: 0 .55rem .55rem 0; }
.biopsy-date { color: #783c24; font-weight: 700; }
.biopsy-sample-name { display: inline-block; padding: .2rem .55rem; border-radius: .42rem; background: #efe8f3; color: #57446a; font-weight: 650; }
.biopsy-sample-name[data-sample-type="blood"] { background: #f5e2dc; color: #843b34; }
.biopsy-sample-name[data-sample-type="fluid"] { background: #e4eeeb; color: #2d584c; }
.biopsy-mobile-label { display: none; }

.cancer-records .story-timeline { margin-top: 0; padding-top: 0; }
.cancer-records .story-timeline-panel {
  background: #fffdf9;
  border: 1px solid var(--records-line);
  border-radius: 1rem;
  padding: 0 clamp(.85rem, 3vw, 1.65rem) 1rem;
}
.cancer-records .story-timeline-panel .story-controls {
  margin: 0 calc(-1 * clamp(.85rem, 3vw, 1.65rem)) 1rem;
  padding: .8rem clamp(.85rem, 3vw, 1.65rem);
  background: #f5eee2;
  border-bottom: 1px solid var(--records-line);
  border-radius: 1rem 1rem 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .55rem .85rem;
}
.cancer-records .story-timeline-panel .story-view-switch { flex-wrap: wrap; gap: .45rem; border: 0; margin: 0; }
.cancer-records .story-timeline-panel .story-view-switch button {
  border: 1px solid #b9a996;
  border-radius: .48rem;
  background: #fffdf9;
  padding: .5rem .75rem;
  color: #503b30;
  font-size: .91rem;
  font-weight: 700;
  cursor: pointer;
}
.cancer-records .story-timeline-panel .story-view-switch button[aria-pressed="true"] { background: #9b3b1e; border-color: #9b3b1e; color: #fff; }
.cancer-records .story-timeline-panel .story-view-switch button[aria-pressed="false"]:hover { background: #f4e3d4; }
.cancer-records .story-timeline-panel .story-filter-result { margin: 0; }
.story-timeline-panel :is(.story-milestones, .story-activity-list) {
  margin: .45rem 0 0;
  padding: 0;
}
.story-timeline-panel .story-event:not([hidden]) {
  display: grid;
  grid-template-columns: minmax(8rem, 11rem) minmax(0, 1fr);
  gap: .25rem .95rem;
  padding: .66rem 0;
  border: 0;
  border-top: 1px solid var(--records-line);
}
.story-timeline-panel .story-event::before { content: none; }
.story-timeline-panel .story-event-date { flex-direction: column; gap: .08rem; margin: 0; }
.story-timeline-panel .story-event-date > span { font-size: .76rem; }
.story-timeline-panel .story-event-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .2rem .55rem;
}
.story-timeline-panel .story-event-title {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.3;
}
.story-timeline-panel .story-event-copy p {
  margin: .14rem 0 0;
  line-height: 1.45;
}
.story-timeline-panel .story-event-links { margin-top: .22rem; gap: .15rem .65rem; }
.story-timeline-panel .story-event:has(.story-event-title:focus) { background: #f8efe4; }
@media (max-width: 620px) {
  .story-timeline-panel .story-event:not([hidden]) { grid-template-columns: minmax(0, 1fr); gap: .2rem; }
  .story-timeline-panel .story-event-date { flex-direction: row; gap: .1rem .45rem; }
}
.story-activity { margin: 0 0 1.25rem; scroll-margin-top: 1rem; }
.story-activity-head { display: flex; flex-wrap: wrap; gap: .25rem .8rem; align-items: baseline; }
.story-activity-head h2 { margin: 0; font-size: clamp(1.25rem, 2.7vw, 1.6rem); }
.story-activity-head p { color: var(--records-muted); font-size: .84rem; margin: 0; }
.story-activity-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; margin: .8rem 0 .65rem; padding: 0; }
.story-activity-card {
  --activity-ink: #814126;
  --activity-paper: #f6e9db;
  position: relative;
  display: flex;
  flex-direction: column-reverse;
  justify-content: end;
  min-width: 0;
  min-height: 8rem;
  padding: .8rem .85rem;
  background: var(--activity-paper);
  color: var(--activity-ink);
  border: 1px solid color-mix(in srgb, var(--activity-ink) 25%, var(--activity-paper));
  border-radius: .75rem;
}
.story-activity-card[data-activity-metric="visits"] { --activity-ink: #305748; --activity-paper: #e7efe7; }
.story-activity-card[data-activity-metric="imaging"] { --activity-ink: #514562; --activity-paper: #eee9f2; }
.story-activity-card[data-activity-metric="messages"] { --activity-ink: #6e4e21; --activity-paper: #f5edd7; }
.story-activity-card dd { font-size: clamp(1.9rem, 5vw, 2.75rem); font-weight: 750; letter-spacing: -.06em; margin: 0 0 .25rem; line-height: 1.05; }
.story-activity-card dt { color: var(--records-ink); font-size: .82rem; font-weight: 650; line-height: 1.3; }
.story-activity-icon { position: absolute; top: .7rem; right: .7rem; width: 1.55rem; height: 1.55rem; color: var(--activity-ink); }

.lab-explorer { color: var(--records-ink); }
.lab-explorer .muted, .lab-status, .lab-explorer .chart-note { color: var(--records-muted); }
.lab-status { margin: 0 0 1rem; }
.lab-explorer button, .lab-explorer select { font: inherit; color: inherit; cursor: pointer; }
.lab-explorer .workspace { display: grid; grid-template-columns: minmax(11rem, 15rem) minmax(0, 1fr); gap: .8rem; align-items: start; }
.lab-explorer .panel { min-width: 0; background: #fffdf9; border: 1px solid var(--records-line); border-radius: .85rem; padding: clamp(.8rem, 2vw, 1.35rem); }
.lab-explorer label { font-size: .88rem; font-weight: 700; display: block; margin: 0 0 .3rem; }
.lab-explorer input, .lab-explorer select {
  display: block;
  width: 100%;
  min-height: 2.65rem;
  padding: .4rem .55rem;
  background: white;
  border: 1px solid #9e998c;
  border-radius: .4rem;
}
.lab-explorer .filter-group + .filter-group { margin-top: .8rem; }
.lab-explorer .lab-series-control { max-width: 24rem; margin-block: .65rem; }
.lab-explorer #match-count, .lab-explorer .details, .lab-explorer .chart-note { margin: .2rem 0 0; font-size: .84rem; }
.lab-explorer .stat { display: flex; justify-content: space-between; align-items: start; gap: .65rem; flex-wrap: wrap; }
.lab-explorer h2 { margin: 0; font-size: clamp(1.5rem, 4vw, 2.4rem); letter-spacing: -.025em; }
.lab-explorer .latest { font-variant-numeric: tabular-nums; }
.lab-explorer .latest strong { color: var(--records-green); display: block; font-size: clamp(1.1rem, 2.8vw, 1.85rem); line-height: 1.15; }
.lab-explorer .latest small { display: block; }
.lab-explorer .chart { position: relative; overflow: hidden; margin: .85rem 0 .1rem; }
.lab-explorer #plot { display: block; width: 100%; height: 290px; color: var(--records-muted); }
.lab-explorer #plot text { fill: currentColor; font-size: 11px; font-variant-numeric: tabular-nums; }
.lab-explorer #plot .grid { stroke: var(--records-line); }
.lab-explorer #plot .band { fill: var(--records-tint); }
.lab-explorer #plot .trend { fill: none; stroke: var(--records-green); stroke-width: 2.2; stroke-linejoin: round; }
.lab-explorer #plot .point { fill: #fffdf9; stroke: var(--records-green); stroke-width: 1.6; }
.lab-explorer #plot .treatment { stroke: var(--records-accent); stroke-dasharray: 4 5; }
.lab-explorer #plot .cursor { stroke: var(--records-ink); stroke-dasharray: 3 4; }
.lab-explorer .tooltip { position: absolute; pointer-events: none; padding: .4rem .55rem; border-radius: .4rem; background: var(--records-ink); color: white; font-size: .8rem; max-width: 13rem; }
.lab-explorer .table-title { font-size: 1rem; margin: 1.2rem 0 .35rem; }
.lab-explorer .table-wrap { overflow: auto; max-height: 24rem; }
.lab-explorer table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.lab-explorer th, .lab-explorer td { text-align: left; padding: .45rem .55rem; border-bottom: 1px solid var(--records-line); vertical-align: top; overflow-wrap: anywhere; }
.lab-explorer thead th { position: sticky; top: 0; background: var(--records-paper); }
.lab-download { font-size: .88rem; }
@media (max-width: 700px) {
  .records-hero { border-radius: .9rem; }
  .records-hero img { width: clamp(4.4rem, 17vw, 6rem); }
  .records-grid { grid-template-columns: 1fr; }
  .records-prose .biopsy-table { display: block; border-spacing: 0; }
  .biopsy-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .biopsy-table tbody { display: grid; gap: .65rem; }
  .biopsy-table tr { display: grid; grid-template-columns: minmax(6rem, 1fr) minmax(0, 1.4fr); padding: .8rem; border: 1px solid var(--records-line); border-left: 3px solid #c9815b; border-radius: .65rem; background: #fffdf9; }
  .records-prose .biopsy-table td { display: block; padding: .25rem 0; border: 0; background: none; }
  .records-prose .biopsy-table td:first-child, .records-prose .biopsy-table td:last-child { border: 0; border-radius: 0; }
  .records-prose .biopsy-table .biopsy-sample { padding-left: .35rem; }
  .biopsy-description { grid-column: 1 / -1; }
  .biopsy-mobile-label { display: block; color: var(--records-muted); font-size: .8rem; font-weight: 700; margin: .4rem 0 .15rem; }
  .story-activity-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .story-activity-card { min-height: 7rem; }
  .lab-explorer .workspace { grid-template-columns: 1fr; }
  .lab-explorer #plot { height: 232px; }
  .lab-explorer table { table-layout: fixed; font-size: .8rem; }
  .lab-explorer th:first-child { width: 33%; }
  .lab-explorer th:nth-child(2) { width: 29%; }
  .lab-explorer th, .lab-explorer td { padding: .4rem .35rem; }
}


.lab-explorer .lab-panels { display: flex; flex-wrap: wrap; gap: .45rem; margin: .75rem 0 1rem; }
.lab-explorer .lab-panels button {
  padding: .55rem .85rem;
  border: 1px solid var(--records-line);
  border-radius: 2rem;
  background: #fffdf9;
  font-weight: 650;
}
.lab-explorer .lab-panels button[aria-pressed="true"] {
  background: var(--records-green);
  color: #fff;
  border-color: var(--records-green);
}
.lab-explorer .lab-main { min-width: 0; display: grid; gap: .8rem; }
.lab-explorer .lab-panel-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr));
  gap: .65rem;
  margin-top: .95rem;
}
.lab-explorer .lab-panel-cards button {
  border: 1px solid var(--records-line);
  border-radius: .6rem;
  padding: .7rem .75rem;
  background: var(--records-paper);
  text-align: left;
  font-size: .88rem;
}
.lab-explorer .lab-panel-cards button[aria-pressed="true"] {
  border-color: var(--records-green);
  background: var(--records-tint);
}
.lab-explorer .lab-panel-cards strong { display: block; margin: .3rem 0 .15rem; color: var(--records-green); font-size: 1.15rem; }
.lab-explorer .lab-panel-cards span { display: block; color: var(--records-muted); font-size: .78rem; }
.lab-explorer .lab-panel-cards svg { display: block; max-width: 100%; width: 6rem; height: 1.75rem; margin-top: .35rem; }
.lab-explorer .lab-panel-cards polyline { fill: none; stroke: var(--records-green); stroke-width: 1.6; }
.lab-explorer .lab-main:not(:has(> :not([hidden]))) { display: none; }
.lab-explorer .workspace:has(#all-lab-controls:not([hidden])) { grid-template-columns: minmax(0, 1fr); }
.lab-explorer #match-count:empty { margin: 0; }
@media (min-width: 701px) {
  .lab-explorer .filters:has(#all-lab-controls:not([hidden])),
  .lab-explorer #all-lab-controls:not([hidden]) { display: grid; align-items: start; gap: .8rem; }
  .lab-explorer .filters:has(#all-lab-controls:not([hidden])) { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
  .lab-explorer #all-lab-controls:not([hidden]) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lab-explorer #all-lab-controls .filter-group + .filter-group { margin-top: 0; }
}
@media (max-width: 700px) {
  .lab-explorer #all-lab-controls:not([hidden]) + .filter-group { margin-top: .8rem; }
}
@media (max-width: 700px) {
  .lab-explorer table { table-layout: auto; min-width: 31rem; }
}

.ct-player {
  margin: 0 0 clamp(1.5rem, 5vw, 3rem);
  padding: clamp(.85rem, 2.4vw, 1.65rem);
  border-radius: 1rem;
  background: #171c1c;
  color: #f5f1e9;
  color-scheme: dark;
}
.ct-heading h2 { margin: 0; font-size: clamp(1.45rem, 3.1vw, 2.25rem); letter-spacing: -.025em; }
.ct-heading p { margin: .35rem 0 1.15rem; color: #cbd0cd; }
.ct-study-nav { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: 1rem; }
.ct-study-nav button { text-align: left; }
.ct-study-nav time { display: block; font-size: .75rem; font-weight: 400; margin-top: .12rem; }
.ct-series { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: .75rem; }
.ct-player button, .ct-player select {
  background: #242c2c;
  color: #f5f1e9;
  border: 1px solid #61706b;
  border-radius: .5rem;
  padding: .45rem .65rem;
  font: inherit;
}
.ct-player button:focus-visible, .ct-player select:focus-visible, .ct-player input:focus-visible { outline: 2px solid #ffb374; outline-offset: 3px; }
.ct-player button { cursor: pointer; }
.ct-player button:disabled { opacity: .5; cursor: default; }
.ct-player button[aria-pressed="true"] { background: #ffb374; border-color: #ffb374; color: #23190f; font-weight: 700; }
.ct-workspace { display: grid; grid-template-columns: minmax(0, 2.3fr) minmax(13rem, 1fr); gap: 1rem; }
.ct-workspace:has(.ct-bookmarks[hidden]) { grid-template-columns: minmax(0, 1fr); }
.ct-viewport { min-width: 0; border: 1px solid #5b6662; border-radius: .65rem; overflow: hidden; background: #101414; }
.ct-viewport[data-bookmarked] { border-color: #ffb374; }
.ct-image { display: grid; place-items: center; background: #000; }
.ct-image canvas { display: block; width: min(100%, 45rem); height: auto; aspect-ratio: 7 / 5; }
.ct-meta { display: flex; justify-content: space-between; gap: .6rem; padding: .45rem .8rem; color: #cbd0cd; font-size: .82rem; }
.ct-active { color: #ffbe8a; }
.ct-meta output { color: #f5f1e9; font-variant-numeric: tabular-nums; }
.ct-controls { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; padding: .6rem .65rem; border-bottom: 1px solid #47504d; font-size: .83rem; }
.ct-controls button:first-child { min-width: 4.1rem; }
.ct-controls label { display: flex; align-items: center; gap: .3rem; }
.ct-controls label[hidden] { display: none; }
.ct-scrubber { flex: 1 0 8.5rem; min-width: 0; }
.ct-scrubber input { width: 100%; min-width: 0; }
.ct-controls input { accent-color: #ffb374; }
.ct-error { margin: .5rem .75rem; color: #ffc18d; }
.ct-bookmarks h3 { margin: .1rem 0 .6rem; font-size: 1rem; }
.ct-bookmarks button { display: block; text-align: left; width: 100%; margin-bottom: .45rem; padding: .65rem .75rem; }
.ct-bookmarks button[aria-current] { border-color: #ffb374; box-shadow: inset 3px 0 #ffb374; }
.ct-bookmarks span, .ct-bookmarks small { display: block; margin-top: .25rem; font-size: .83rem; line-height: 1.35; color: #d0d9d4; }
.ct-bookmarks small { color: #ffbe8a; }
@media (max-width: 740px) {
  .ct-workspace { grid-template-columns: minmax(0, 1fr); }
  .ct-bookmarks [data-ct-bookmarks] { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); gap: .45rem; }
}
