/* Readability: retain the Journal Ink design and existing content hierarchy. */
/* Technology schematics use a flat display surface and no lighting effects. */
:root[data-site-style="journal-ink"] :is(.card-art,.detail-art,.compare-head .recorder-illustration) { background-image:none; }
:root[data-site-style="journal-ink"] .recorder-illustration img { filter:none; }
:root[data-site-style="journal-ink"] .tech-card:hover .recorder-illustration img { transform:none; }
body { font-size:16px; }
:is(.home-introduction .hero-description,.home-process-step p,.home-use p,.page-intro p,.section-title p,.wide-intro,.history-intro-row p,.chapter-story>p,.principle-card p,.timeline-content p,.history-month .timeline-content p,.paper-entry p,.method-copy p,.metric-definitions dd,.detail-summary,.detail-spec-grid dd,.source-paper-title,.resource-description p,.resource-section-heading p,.ct-page-description,.ct-dialog-definition,.ct-dialog-claim p,.ct-dialog-note) { font-size:16px; line-height:1.75; }
:is(.eyebrow,.hero-copy .eyebrow,.home-index,.home-footer>span,.art-id,.card-art .art-id,.detail-art .art-id,.card-topline,.card-meta,.tech-card .badge,.atlas-table .badge,.results-footer,.context-note p,.context-note>a,.history-preprint-date,.history-month .history-preprint-date,.timeline-meta .eyebrow,.history-month .timeline-meta .eyebrow,.history-month-date>small,.timeline-date>small,.source-links a,.illustration-note,.paper-meta,.paper-meta>span,.paper-tech,.compare-foot,.detail-spec-grid dt,.detail-source small,.quiet-note,.snapshot-label,.resource-scope,.resource-jumps small,.resource-venue,.resource-study .resource-venue,.resource-paper,.resource-kind,.resource-example,.resource-section-tag,.resource-access-note p,.feedback-kinds small,.feedback-address>span,.feedback-address>small,.feedback-dialog .form-note,.feedback-dialog #form-result,.form-note,.footer-bottom,.footer-bottom>span:nth-child(2),.footer-bottom button,.footer-links>div>span) { font-size:12px; line-height:1.6; }
:is(.main-nav a,.nav-compare,.nav-feedback,.button,.text-link,.filter,.checkbox-label,.search-field input,.atlas-filter-row select,.atlas-toolbar select,.card-meta button,.detail-source,.resource-action,.context-note>a,.method-sidebar a,.chapter-techs a,.footer-links a,.footer-links button,.compare-tray,.compare-tray .button,.compare-tray>button) { font-size:14px; }
.theme-toggle { font-size:13px; }
.selection-count { font-size:12px; }
.card-body>p { font-size:15px; line-height:1.7; }
.card-topline,.card-meta { flex-wrap:wrap; white-space:normal; gap:10px; }
.card-topline>* { max-width:100%; }
.tech-card .badge { white-space:normal; }
.card-meta button { white-space:nowrap; }
:is(.detail-tags .badge,.paper-entry>.badge,.chapter-navigation>span,.principle-card .principle-number) { font-size:12px; }
.era-tabs b { font-size:12px; white-space:normal; }
.search-field kbd { font-size:11px; }
.atlas-table { font-size:14px; }
.atlas-table :is(th,td) { font-size:14px; }
.atlas-table td:first-child span { font-size:12px; }
.compare-table :is(th,td) { font-size:14px; line-height:1.6; }
:is(.compare-head p,.compare-remove,.compare-claim-context,.compare-capability-status,.compare-capability-note,.compare-missing,.compare-claim .source-links a,.compare-claim-setting) { font-size:12px; line-height:1.6; }
.compare-claim strong { font-size:15px; }
.metric-definitions dt { font-size:16px; }
.footer-top p { font-size:14px; }
:is(.feedback-dialog>p,.feedback-dialog form label,.feedback-dialog form input,.feedback-dialog form textarea,.feedback-save,.feedback-dialog .feedback-address,.feedback-form-actions .button,.feedback-context dl,.comparison-share-dialog p,.comparison-share-dialog label,.comparison-share-link,.compare-share-actions>p,.compare-setting-label,.compare-setting-label select) { font-size:14px; line-height:1.6; }

/* Table values and their experimental context have distinct, readable sizes. */
:is(.ct-search,.ct-filter,.ct-sort,.ct-table-meta,.ct-column-menu>strong,.ct-dialog-header p,.ct-dialog-select,.ct-dialog-setting,.ct-data-body,.ct-data-details>summary,.ct-study-context strong,.ct-study-context span) { font-size:13px; }
:is(.ct-search input,.ct-filter select,.ct-sort select,.ct-dialog-select select,.ct-columns>summary,.ct-export,.ct-share,.ct-toolbar-actions .ct-export,.ct-toolbar-actions summary,.ct-column-menu label,.ct-column-reset,.ct-view-switch button,.ct-page-heading .board-feedback-actions>button,.ct-data-downloads a,.ct-data-downloads button,.ct-share-dialog input,.ct-share-dialog p) { font-size:14px; }
.ct-table { font-size:14px; line-height:1.6; }
.ct-table thead th { font-size:12px; }
.ct-claim-value { font-size:14px; }
:is(.ct-recorder-publication,.ct-recorder-role,.ct-claim-context,.ct-more,.ct-missing,.ct-row-evidence,.ct-help,.ct-source-links a,.ct-evidence-status,.ct-add-compare,.ct-selection,.ct-selection label,.ct-claim-id,.ct-correction,.ct-claim-review,.ct-data-details>summary span,.ct-review-footer,.ct-share-dialog label,.ct-share-dialog .ct-share-note) { font-size:12px; line-height:1.6; }
.ct-recorder-name { font-size:17px; }
.ct-setting { font-size:11px; }
.ct-definition { font-size:12px; }
:is(.ctp-count,.ctp-measure,.ctp-legend,.ctp-reading-note,.ctp-result-list>summary>span,.ctp-data-scroll table,.ctp-data-scroll thead th,.ctp-data-scroll small,.ctp-data-scroll button,.ctp-publication,.ctp-setting,.ctp-evidence-kind,.ctp-evidence-context,.ctp-evidence-button,.ctp-evidence-label) { font-size:12px; }
.ctp-definition,.ctp-empty p { font-size:15px; }
.ctp-measure select,.ctp-result-list>summary { font-size:14px; }
.ctp-column-label { font-size:11px; }
.ctp-tick { font-size:12px; }
.ctp-model-label,.ctp-value-label,.ctp-axis-title { font-size:14px; }

/* The visual viewport keeps its previous dimensions; a normal-flow footer fits larger labels. */
.linear-story.hero-scene { --story-visual-height:378px; }
.linear-story.history-scene { --story-visual-height:418px; }
.linear-story.hero-scene,.linear-story.history-scene { display:flex; flex-direction:column; height:auto; min-height:0; }
.linear-story .protein-canvas { position:relative; inset:auto; flex:0 0 auto; height:var(--story-visual-height); margin-top:55px; }
.linear-story .soma-annotations { inset:55px 0 auto; height:var(--story-visual-height); }
.story-footer { display:flex; flex-direction:column; gap:10px; padding:12px 22px; }
.linear-story .story-caption,.linear-story .fiber-legend,.linear-story .story-controls,.linear-story .story-footnote { position:static; inset:auto; }
.linear-story .story-caption { min-height:0; }
.linear-story .story-scale { font-size:11px; line-height:1.4; margin-bottom:5px; }
.linear-story .story-caption>strong { font-size:19px; line-height:1.35; }
.linear-story .story-caption>p { font-size:13px; line-height:1.5; max-width:none; }
.linear-story .fiber-legend { display:flex; flex-wrap:wrap; gap:6px 14px; min-height:18px; font-size:11px; line-height:1.5; }
.linear-story .fiber-legend[hidden] { display:none!important; }
.linear-story .story-progress { margin:0; gap:10px; min-height:28px; }
.linear-story .story-progress>label { min-height:28px; }
.linear-story .story-progress>span { font-size:11px; line-height:1.5; }
.linear-story .story-progress input { height:4px; }
.linear-story .story-progress input::-webkit-slider-thumb { width:12px; height:12px; }
.linear-story .story-progress input::-moz-range-thumb { width:12px; height:12px; }
.linear-story .story-footnote { display:flex; flex-wrap:wrap; gap:4px 14px; font-size:11px; line-height:1.5; min-height:17px; }
.scene-references,.scene-references>span:last-child { font-size:11px; line-height:1.6; }
.linear-story .scene-top { font-size:11px; letter-spacing:.6px; align-items:flex-start; }
.linear-story .scene-top>span { max-width:calc(100% - 72px); line-height:1.4; }
.linear-story .soma-annotations>span { font-size:11px; }
.linear-story .activity-monitor { width:210px; }
.linear-story .monitor-eyebrow,.linear-story .monitor-state,.linear-story .monitor-note { font-size:11px; line-height:1.4; }
.linear-story .activity-monitor>strong { font-size:13px; }
.linear-story .cell-type-key { font-size:11px; line-height:1.4; }
.linear-story .cell-type-key .cell-key-title { font-size:11px; }
.linear-story .scale-monitor>span,.linear-story .scale-monitor>small { font-size:11px; line-height:1.5; }
.linear-story[data-cell-view=true] .scale-monitor { top:122px; }

/* Scientific colors stay independent of the muted interface accent. */
:root { --record-structure:#8dc9e4; --record-signal:#ff7e42; --record-growth:#f8d46b; }
:root[data-theme="light"] { --record-structure:#3d7f9a; --record-signal:#d34b23; --record-growth:#8f6809; }
:root[data-site-style="journal-ink"] .fiber-legend i.structure { background:var(--record-structure); }
:root[data-site-style="journal-ink"] .fiber-legend i.reporter { background:var(--record-signal); }
:root[data-site-style="journal-ink"] .fiber-legend i.growth { background:transparent; border-color:var(--record-growth); }
:root[data-site-style="journal-ink"] .linear-story .activity-monitor[data-writing=true] .monitor-state,
:root[data-site-style="journal-ink"] .linear-story .activity-monitor[data-writing=true] .monitor-state:before { color:var(--record-signal); }

@media (min-width:951px) and (max-height:800px) {
  .linear-story.hero-scene { --story-visual-height:293px; }
}
@media (max-width:720px) {
  :is(.home-introduction .hero-description,.home-process-step p,.home-use p,.page-intro p,.section-title p,.wide-intro,.history-intro-row p,.chapter-story>p,.principle-card p,.timeline-content p,.history-month .timeline-content p,.paper-entry p,.method-copy p,.metric-definitions dd,.detail-summary,.detail-spec-grid dd,.source-paper-title,.resource-description p,.resource-section-heading p,.ct-page-description) { font-size:15px; line-height:1.75; }
  .main-nav a { font-size:12px; line-height:1.3; white-space:normal; text-align:center; }
  .nav-feedback,.nav-compare { font-size:14px; }
  .theme-toggle { font-size:12px; }
  .nav-wrap { grid-template-columns:minmax(0,1fr) auto auto; }
  .site-header { overflow-wrap:normal; }
  :root :is(input,select,textarea,.search-field input,.ct-search input,.ct-filter select,.ct-sort select,.ct-dialog-select select,.ctp-measure select,.feedback-dialog form input,.feedback-dialog form textarea,.comparison-share-link,.compare-setting-label select) { font-size:16px; }
  .card-topline,.card-meta { flex-wrap:wrap; white-space:normal; }
  .linear-story.hero-scene { --story-visual-height:319px; }
  .linear-story.history-scene { --story-visual-height:349px; }
  .linear-story .protein-canvas { margin-top:54px; }
  .linear-story .soma-annotations { top:54px; }
  .story-footer { padding:12px 16px; }
  .linear-story .story-caption { min-height:0; }
  .linear-story .story-caption>strong { font-size:18px; line-height:1.35; }
  .linear-story .story-caption>p { font-size:12px; line-height:1.5; }
  .linear-story .fiber-legend { min-height:0; gap:6px 10px; }
  .linear-story .story-footnote { min-height:36px; }
  .linear-story .activity-monitor { width:164px; }
  .linear-story .cell-type-key { max-width:calc(100% - 32px); }
  .linear-story[data-cell-view=true] .scale-monitor { top:138px; }
  .scene-references { padding-inline:13px; }
  .resource-action { font-size:14px; }
  .ct-table-meta { font-size:12px; }
  .ct-sort { font-size:12px; }
  :root .ct-sort select { font-size:16px; }
}
@media (max-width:440px) {
  .linear-story.hero-scene { --story-visual-height:299px; }
  .linear-story.history-scene { --story-visual-height:329px; }
  .linear-story .activity-monitor { width:150px; }
  .linear-story .monitor-note { font-size:10px; }
}

/* Mouse activity is a dedicated visual pane, never an overlay on the fiber. */
.linear-story { container-type:inline-size; }
.linear-story .story-visual { display:grid; grid-template-columns:minmax(0,1fr); margin-top:55px; min-width:0; }
.linear-story .story-primary { position:relative; min-width:0; }
.linear-story .story-primary .protein-canvas { margin-top:0; }
.linear-story .story-primary .soma-annotations { inset:0; height:100%; }
.linear-story .story-primary .cell-type-key { top:8px; }
.linear-story .story-primary .scale-monitor { top:15px; }
.linear-story[data-cell-view=true] .story-primary .scale-monitor { top:67px; }
.story-context { min-width:0; }
.linear-story .story-visual .activity-monitor {
  position:static; inset:auto; width:100%; max-width:none; min-width:0;
  display:grid; grid-template-columns:minmax(0,1fr);
  grid-template-rows:auto auto 168px auto auto;
  grid-template-areas:"label" "episode" "arena" "state" "note";
  align-items:start; gap:6px; padding:14px 16px; text-align:left;
  background:var(--panel2); border:0; border-bottom:1px solid var(--line); border-radius:0;
}
.linear-story .story-visual .brain-inset-space {
  grid-area:arena; position:relative; width:100%; height:100%; min-height:0; max-height:160px; align-self:center; margin:0; overflow:hidden;
}
.linear-story .story-visual .monitor-eyebrow { grid-area:label; font-size:12px; line-height:1.4; color:var(--quiet); white-space:normal; letter-spacing:.8px; }
.linear-story .story-visual .activity-monitor>strong { grid-area:episode; margin:0; font-size:19px; line-height:1.35; color:var(--text); }
.linear-story .story-visual .monitor-state { grid-area:state; margin:0; padding-top:8px; border-top:1px solid var(--line); font-size:13px; line-height:1.45; font-weight:600; color:var(--text); }
.linear-story .story-visual .monitor-note { grid-area:note; margin:0; font-size:12px; line-height:1.4; color:var(--muted); }
.linear-story .story-visual :is(.monitor-eyebrow,.monitor-state,.monitor-note),
.linear-story .story-visual .activity-monitor>strong { background:transparent; }
.linear-story .story-progress>span { letter-spacing:0; }
.linear-story .scene-top { font-size:12px; font-weight:500; }
/* On narrow scenes, show the larger mouse pane before the fiber view. */
.story-visual:has(.activity-monitor:not([hidden])) .story-primary { grid-row:2; }
.story-visual .activity-monitor { grid-row:1; }
@container (min-width:620px) {
  .story-visual:has(.activity-monitor:not([hidden])) { grid-template-columns:minmax(0,1fr) 240px; }
  .story-visual:has(.activity-monitor:not([hidden])) .story-primary { grid-row:1; grid-column:1; }
  .linear-story .story-visual .activity-monitor {
    grid-column:2; grid-row:1; height:var(--story-visual-height);
    grid-template-rows:auto auto minmax(100px,1fr) auto auto;
    padding:14px 12px; border-left:1px solid var(--line); border-bottom:0;
  }
}
@media (max-width:720px) {
  .linear-story .story-visual { margin-top:54px; }
  .linear-story[data-cell-view=true] .story-primary .scale-monitor { top:83px; }
}

/* Recording contexts share one viewport and one active animation controller. */
.story-example-bar { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px 16px; margin-bottom:10px; }
.story-example-modes { display:flex; gap:3px; padding:3px; border:1px solid var(--line); background:var(--panel); border-radius:2px; }
.story-example-modes button { min-height:36px; padding:7px 17px; font-size:14px; color:var(--muted); border:1px solid transparent; border-radius:1px; }
.story-example-modes button[aria-pressed="true"] { background:var(--text); border-color:var(--text); color:var(--bg); }
.story-example-modes button:focus-visible { outline:2px solid var(--lime); outline-offset:3px; }
.story-example-status { font-size:12px; line-height:1.5; color:var(--muted); margin:0 0 8px; }
.story-example-status:empty { display:none; }

/* A passive activity readout remains visible while the tape is enlarged. */
.culture-visual-status {
  --culture-activity:#edb198; --culture-active-bg:#30251f; --culture-blue:#8dc9e4;
  position:absolute; inset:0; z-index:5; pointer-events:none;
}
:root[data-theme="light"] .culture-visual-status { --culture-activity:#a5492b; --culture-active-bg:#fff0e5; --culture-blue:#326b86; }
.culture-status-panel { position:absolute; top:12px; right:12px; width:186px; padding:10px 12px; border:1px solid var(--line); background:var(--panel); }
.culture-activity-status { display:grid; grid-template-columns:1fr 34px; align-items:center; gap:8px; color:var(--muted); }
.culture-state-copy { display:flex; flex-direction:column; gap:2px; }
.culture-state-copy>span { font-size:10px; line-height:1.3; letter-spacing:.6px; }
.culture-activity-status strong { font-size:24px; line-height:1.1; font-weight:600; }
.culture-activity-meter { display:block; width:34px; height:28px; fill:currentColor; opacity:.5; }
.culture-visual-status[data-activity="high"] .culture-status-panel { background:var(--culture-active-bg); border-color:var(--culture-activity); }
.culture-visual-status[data-activity="high"] .culture-activity-status { color:var(--culture-activity); }
.culture-visual-status[data-activity="high"] .culture-activity-meter { opacity:1; }
.culture-growth-status { display:grid; grid-template-columns:40px 1fr; align-items:center; gap:8px; margin-top:8px; padding-top:7px; border-top:1px solid var(--line); color:var(--culture-blue); }
.culture-growth-status strong { font-size:12px; line-height:1.3; font-weight:600; }
.culture-growth-status .culture-state-copy>span { color:var(--muted); font-size:9px; letter-spacing:.6px; }
.culture-growth-flow { display:block; width:40px; height:26px; fill:currentColor; }
.culture-growth-track { fill:none; stroke:currentColor; stroke-width:1.2; opacity:.55; }
.culture-visual-status[data-growing="false"] .culture-growth-flow { opacity:.4; }
@container (max-width:400px) {
  .culture-status-panel { top:8px; right:8px; width:158px; padding:8px; }
  .culture-activity-status { grid-template-columns:1fr 30px; gap:6px; }
  .culture-activity-status strong { font-size:22px; }
  .culture-activity-meter { width:30px; }
  .culture-growth-status { grid-template-columns:32px 1fr; gap:6px; margin-top:6px; padding-top:6px; }
  .culture-growth-flow { width:32px; }
}
@media (max-width:440px) {
  .story-example-modes { flex:1; }
  .story-example-modes button { flex:1; padding-inline:12px; }
}
