/* Shared presentation tokens. Loaded after the existing feature styles. */
:root {
  --canvas:#F8F3E7; --paper:#FFFFFF; --surface:var(--paper); --surface-alt:#EAF0F8;
  --ink:#102D54; --muted:#506078; --teal:#245EA8; --teal-dark:#245EA8;
  --accent:var(--teal); --teal-wash:var(--surface-alt); --line:#CFD8E4; --soft-line:#E4E9F0;
  --control-line:#73839B; --focus:#245EA8; --action-bg:#245EA8; --action-ink:#FFFFFF;
  --warning:#75541F; --danger:#8B352F; --chart-grid:#C6D2E2; --chart-label:var(--muted);
  --sidebar:#F1EDE3; --shadow:0 8px 28px #102D5414; --brand-sky:#80ADE0; color-scheme:light;
}
:root[data-theme="dark"] {
  --canvas:#102D54; --paper:#142F52; --surface-alt:#203C60;
  --ink:#F8F3E7; --muted:#C3CFDE; --teal:#80ADE0; --teal-dark:#A9CCF3;
  --line:#536E90; --soft-line:#304D71; --control-line:#8FA7C5; --focus:#80ADE0;
  --action-bg:#F8F3E7; --action-ink:#102D54; --warning:#EDD093; --danger:#F0B1A7;
  --chart-grid:#536E90; --sidebar:#112949; --shadow:0 8px 28px #00000038; color-scheme:dark;
}
html[data-theme] .account-preview { color-scheme:inherit; }
html[data-theme] :is(button,a,input,select,textarea,summary,[tabindex]):focus-visible { outline:3px solid var(--focus); outline-offset:3px; }
html[data-theme] :is(input,select,textarea) { color:var(--ink); background-color:var(--paper); border-color:var(--control-line); accent-color:var(--teal); }
html[data-theme] :is(input,textarea)::placeholder { color:var(--muted); opacity:1; }
html[data-theme] :is(input,select,textarea):disabled { color:var(--muted); background-color:var(--canvas); }
html[data-theme] .connect-data input:not([type=radio]):not([type=checkbox]),
html[data-theme] .connect-data select,
html[data-theme] .source-setup-grid input[readonly],
html[data-theme] #label-editor-name { color:var(--ink); background:var(--paper); border-color:var(--control-line); }
html[data-theme] #label-editor-name[aria-invalid='true'] { border-color:var(--danger); box-shadow:inset 0 0 0 1px var(--danger); }
html[data-theme] .label-editor-swatch input:checked ~ .label-editor-swatch-circle { border-color:var(--teal); }
html[data-theme] .label-editor-swatch input:focus-visible ~ .label-editor-swatch-circle { outline-color:var(--focus); }
html[data-theme] .topbar { background:var(--paper); }
html[data-theme] :is(.info-dialog,.account-preview:is(dialog),.context-menu,.label-editor,.label-overflow>div,.avatar-menu,.entry-product-glimpse,.entry-journeys>div) { color:var(--ink); background:var(--paper); border-color:var(--line); box-shadow:var(--shadow); }
html[data-theme] :is(.info-dialog,.account-preview:is(dialog))::backdrop { background:#0c171c70; }
html[data-theme] :is(.drawing-card,.mini-metric,.activity-card,.component-panel,.source-choice,.page-source-card,.account-preview .card,.account-preview .button,.account-preview .org-symbol,.account-preview .choice,.fleet-section .fleet-list) { background:var(--paper); border-color:var(--line); color:var(--ink); }
html[data-theme] :is(.context-sidebar,.account-preview .sidebar) { background:var(--sidebar); }
html[data-theme] :is(.sample-tag,.synthetic-badge,.archived-badge,.entity-label-chip,.account-preview .tag,.public-orbit-badge,.entry-glimpse-mark,.account-preview .avatar,.account-preview .banner,.source-sample,.short-comparison,.stream-inline-note,.stream-undo-note,.stream-source-icon,.diagnostic-list pre,.raw-sample pre,.connect-data-reading,.connect-data-provenance pre,.pages-notice,.related-note,.orbit-notice,.form-orbit-review:not(:empty),.reference-placeholder,.fleet-list-note,.entry-context,.entry-feedback,.entry-invite-details,.entry-state-symbol,.preview-recipient) { color:var(--muted); background:var(--surface-alt); border-color:var(--line); }
html[data-theme] :is(.context-menu-item:hover,.context-menu-item:focus-visible,.craft-nav:hover,.fleet-row:hover,.avatar-menu button:hover,.entry-journeys button:hover,.account-preview .choice:hover,.account-preview .choice.active,.source-choice:has(input:checked),.connect-data-choice:has(input:checked),.component-chip:hover,.mini-metric.active) { color:var(--ink); background:var(--surface-alt); border-color:var(--teal); }
html[data-theme] .page-source-card:has(input:checked) { color:var(--ink); background:var(--surface-alt); border-color:var(--teal); box-shadow:0 0 0 1px var(--teal); }
html[data-theme] .page-source-card.is-unavailable { background:var(--canvas); }
html[data-theme] .page-source-card:focus-within { outline-color:var(--focus); }
html[data-theme] .pages-dialog .page-source-selection input { accent-color:var(--teal); }
html[data-theme] .account-preview .toast { color:var(--canvas); background:var(--ink); }
html[data-theme] .account-preview .entry-feedback { color:var(--teal-dark) !important; }
html[data-theme] .account-preview :is(.notice,.page-preview,.record-symbol) { color:var(--muted); background:var(--surface-alt); border-color:var(--line); }
html[data-theme] .account-preview :is(.footer,.preview-mark,.story-number) { color:var(--muted); }
html[data-theme] .account-preview :is(.footer button,.choice-tag) { color:var(--teal-dark); }
html[data-theme] :is(.sidebar-heading,.source-choice-state) { color:var(--muted); }
html[data-theme] :is(.craft-nav.active,.account-preview .side-link.active,.component-chip.selected,.dialog-close,.account-preview .record:hover) { background:var(--surface-alt); color:var(--teal-dark); border-color:var(--teal); }
html[data-theme] :is(.craft-icon,.close-button,.label-overflow>summary,.account-preview .small-button,.account-preview .pending-row,.source-choice:has(input:disabled)) { color:var(--muted); background:var(--canvas); border-color:var(--line); }
html[data-theme] :is(.primary-button,.account-preview .button.primary) { background:var(--action-bg); color:var(--action-ink); border-color:var(--action-bg); }
html[data-theme] :is(.primary-button,.account-preview .button.primary):hover { filter:brightness(.95); }
html[data-theme] :is(.primary-button,.account-preview .button.primary):disabled { background:var(--surface-alt); color:var(--muted); border-color:var(--line); }
html[data-theme] :is(.account-preview .button.danger,.context-menu-item.dangerous,.mapping-error,.account-preview .error) { color:var(--danger) !important; }
html[data-theme] :is(.account-preview .button.danger,.entry-error:not(:empty)) { background:var(--paper); border-color:var(--danger); }
html[data-theme] :is(.context-menu-item:disabled,.context-menu-arrow) { color:var(--muted); }
html[data-theme] .context-menu-item:focus-visible { outline:2px solid var(--focus); outline-offset:-2px; box-shadow:none; }
html[data-theme] :is(.quiet-button,.text-link,.account-preview .text-button,.account-preview .side-link,.account-preview .rule-item dt,.account-preview .role-badge,.stream-diagnostics>summary,.history-records>summary,.mapping-detail>summary,.trash-histories>summary,.context-menu-check,.disconnect-list li span,.diagnostic-list strong,.entry-glimpse-nav .active,.entry-card-link button,.entry-text-action,.entry-reset,.account-preview details summary,.account-preview .entry-journeys button,.entry-login-links button) { color:var(--teal-dark); }
html[data-theme] :is(.stream-status,.connection-indicator.working,.freshness-indicator.live,.delta,.added-label,.entry-scope) { color:var(--teal-dark) !important; }
html[data-theme] :is(.stream-status.quiet,.freshness-indicator,.connection-indicator,.delta.neutral) { color:var(--muted); }
html[data-theme] :is(.global-nav>:is(a,button),.settings,.eyebrow,.lede,.period-control,.metric-label,.metric-value small,.metric-note,.metric-subtitle,.card-header p,.chart-unit,.chart-legend,.chart-caption,.observation-content p,.craft-subtitle,.fleet-number small,.footer-note,.group-label,.side-note,.craft-nav,.craft-nav small,.craft-heading p,.craft-id,.detail-topline,.mini-metric>span,.mini-metric>small,.mini-metric strong small,.drawing-header p,.drawing-header .eyebrow,.diagram-tag,.drawing-legend,.panel-index,.panel-description,.component-panel>p,.component-value-label,.component-figure small,.panel-footnote,.overview-stat>span,.overview-stat small,.overview-stat p,.source-details,.source-details summary,.source-details dl,.source-details dt,.source-details p,.source-details caption,.source-details thead th,.metadata-strip>div>span,.metadata-strip strong,.info-dialog p,.dialog-number>small,.dialog-number>span,.reference-placeholder,.schematic-caption,.entry-glimpse-nav,.entry-glimpse-bottom,.entry-footer,.entry-welcome-points article>span,.account-preview .side-note,.account-preview .entry-product-glimpse p,.account-preview .entry-footer,.account-preview .entry-glimpse-bottom,.account-preview .entry-glimpse-nav) { color:var(--muted); }
html[data-theme] :is(.global-nav>:is(a,button).active,.global-nav>:is(a,button):hover,.mini-metric>strong,.component-figure,.overview-stat strong,.dialog-number,.fleet-number,.briefing-aside p,.briefing-aside strong,.footer-note strong,.account-preview .entry-address,.related-note strong,.account-preview .entry-form-card p strong) { color:var(--ink) !important; }
html[data-theme] :is(.account-preview .member-row,.account-preview .summary-stat,.entry-glimpse-nav,.source-details th,.source-details td,.side-note,.component-panel,.diagram-tag,.component-chip,.entry-orbit,.label-editor,.entity-label-chip,.label-overflow>summary,.account-preview .org-symbol,.entry-state-symbol) { border-color:var(--line); }
html[data-theme] .history-table-wrap th { color:var(--ink); background:var(--surface-alt); }
html[data-theme] .account-preview .entry-spacecraft { background:radial-gradient(ellipse at center,var(--surface-alt),var(--paper)); }
html[data-theme] .account-preview .entry-spacecraft svg { color:var(--muted); }
html[data-theme] :is(.chart,.panel-chart,.live-chart,.page-trend) text { fill:var(--chart-label); }
html[data-theme] :is(.chart,.panel-chart,.live-chart,.page-trend) line { stroke:var(--chart-grid); }
html[data-theme] :is(.chart,.panel-chart,.live-chart,.page-trend) [stroke="#3f7569"] { stroke:var(--teal); }
html[data-theme] :is(.chart,.panel-chart,.live-chart,.page-trend) [fill="#3f7569"] { fill:var(--teal); }
html[data-theme] :is(.chart,.panel-chart,.live-chart,.page-trend) [stroke="white"] { stroke:var(--paper); }
html[data-theme] .schematic-hull { fill:var(--paper); stroke:var(--control-line); }
html[data-theme] .schematic-hinge { stroke:var(--control-line); }
html[data-theme] .drawing-stage .schematic .component-body { fill:var(--canvas); stroke:var(--control-line); }
html[data-theme] .drawing-stage .schematic .component:hover .component-body,
html[data-theme] .drawing-stage .schematic .component:focus-visible .component-body,
html[data-theme] .drawing-stage .schematic .component.selected .component-body { fill:var(--surface-alt); stroke:var(--teal); }
html[data-theme] .schematic :is(.schematic-callout-label,.schematic-callout-value) { fill:var(--ink); }
html[data-theme] :is(.schematic-leader,.drawing-stage .schematic .component.selected .schematic-leader) { stroke:var(--control-line); }
html[data-theme] .drawing-stage :is(.leader-label,.component-name) { fill:var(--muted); }
html[data-theme] .drawing-stage .selected .leader-label { fill:var(--ink); }
html[data-theme] .skip-link { background:var(--ink); color:var(--canvas); }

.account-preview .appearance-card { max-width:740px; }
.account-preview .appearance-card>h2 { margin-bottom:8px; }
.account-preview .appearance-options { border:0; padding:0; margin:22px 0 15px; display:grid; gap:10px; min-width:0; }
.account-preview .appearance-option { display:flex; align-items:center; gap:13px; margin:0; padding:16px; min-height:76px; cursor:pointer; border:1px solid var(--control-line); border-radius:9px; background:var(--paper); }
.account-preview .appearance-option:has(input:checked) { background:var(--surface-alt); border-color:var(--teal); box-shadow:inset 0 0 0 1px var(--teal); }
.account-preview .appearance-option:has(input:focus-visible) { outline:3px solid var(--focus); outline-offset:3px; }
.account-preview .appearance-option input { margin:0; padding:0; width:18px; height:18px; min-height:0; flex:0 0 18px; }
.account-preview .appearance-option>span:not(.appearance-swatch) { min-width:0; flex:1; }
.account-preview .appearance-option strong { display:block; color:var(--ink); font-size:13px; font-weight:600; }
.account-preview .appearance-option small { display:block; margin-top:3px; color:var(--muted); font-size:12px; font-weight:400; line-height:1.6; overflow-wrap:anywhere; }
.appearance-swatch { display:block; width:38px; height:28px; flex:0 0 38px; border:1px solid var(--control-line); border-radius:5px; background:#fff; }
.appearance-swatch-dark { background:#102D54; }
.appearance-swatch-device { background:linear-gradient(90deg,#fff 50%,#102D54 50%); }
.account-preview .appearance-status { min-height:22px; }
.account-preview .settings-navigation .side-link { width:100%; text-align:left; white-space:normal; overflow-wrap:anywhere; }

@media(max-width:700px) {
  .account-preview .settings-navigation { flex-wrap:wrap; overflow:visible; gap:5px; }
  .account-preview .settings-nav-group { display:contents; }
  .account-preview .settings-navigation .side-link { width:auto; flex:0 1 auto; min-height:44px; white-space:normal; }
  .account-preview .settings-navigation .secondary { display:block; }
}
@media(max-width:380px) {
  .account-preview .appearance-option { padding:12px; gap:10px; }
  .appearance-swatch { width:28px; flex-basis:28px; }
}
@media(prefers-reduced-motion:reduce) {
  *, *::before, *::after { animation:none !important; transition:none !important; scroll-behavior:auto !important; }
}

/* Identity 1.1 polish. Existing layouts, navigation and semantic states stay intact. */
body, .account-preview { font-variant-numeric:tabular-nums; }
.account-preview { font-size:16px; line-height:1.5; }
.brand { height:auto; gap:0; letter-spacing:normal; }
.brand-wordmark { display:block; width:160px; height:auto; flex:0 0 auto; }
.brand-wordmark-dark { display:none; }
:root[data-theme="dark"] .brand-wordmark-light { display:none; }
:root[data-theme="dark"] .brand-wordmark-dark { display:block; }
/* The SVG canvas includes 0.5x clear space. Never crop it or go below 140px. */
.account-preview .entry-glimpse-mark { display:block; width:32px; height:32px; flex:0 0 32px; border-radius:0; }
html[data-theme] .account-preview .entry-glimpse-mark { background:none; }
:is(h1,.hero-title,.craft-title,.craft-title h1), .account-preview h1 { font-weight:600; }
:is(h2,h3), .account-preview :is(h2,h3) { font-weight:500; }
.account-preview .entry-main h1 { font-size:40px; line-height:1.1; letter-spacing:-.8px; }
:is(.primary-button,.quiet-button), .account-preview .button { min-height:44px; font-size:14px; font-weight:600; line-height:20px; }
:is(.primary-button,.quiet-button), .account-preview .button { border-radius:8px; }
.account-preview :is(.entry-hero,.entry-intro) .lede { font-size:16px; line-height:24px; }
.account-preview :is(.entry-small-print,.entry-form-card>p,.entry-welcome-points p,.entry-glimpse-body p,.entry-footer,.hint,.error) { font-size:14px; line-height:20px; }
.account-preview :is(.entry-scope,.entry-context,.entry-card-link,.entry-feedback) { font-size:14px !important; line-height:20px !important; }
.account-preview :is(.entry-back,.entry-card-link button,.entry-login-links button,.entry-text-action,.entry-reset,.entry-journeys summary) { min-height:44px; font-size:14px; }
.account-preview label { font-size:14px; line-height:20px; }
.account-preview :is(input,select,textarea) { font-size:16px; line-height:24px; }
.account-preview .entry-glimpse-top { gap:12px; }
.account-preview .entry-glimpse-nav { font-size:14px; }
.account-preview .entry-glimpse-bottom { font-size:12px; line-height:18px; }
.account-preview .entry-welcome-points h2 { line-height:1.4; }
.account-preview .entry-welcome-points p { max-width:none; }
.account-preview .entry-line-art span { background:var(--brand-sky); }
.account-preview .entry-line-art span:nth-child(2) { background:var(--teal); }
.account-preview .entry-line-art span:nth-child(3) { background:var(--ink); }
.account-preview .entry-local-dot, .sample-dot { background:var(--teal); }
.appearance-swatch { background:#F8F3E7; }
.appearance-swatch-dark { background:#102D54; }
.appearance-swatch-device { background:linear-gradient(90deg,#F8F3E7 50%,#102D54 50%); }
@media(max-width:1150px) {
  .brand-wordmark { width:140px; }
  .topbar:not(.account-entry-topbar) { height:118px; grid-template-rows:64px 54px; }
  .global-nav>:is(a,button) { font-size:14px; font-weight:500; }
  .component-panel { scroll-margin-top:138px; }
}
@media(max-width:750px) {
  .topbar.account-entry-topbar { height:72px; grid-template-rows:72px; }
}
@media(max-width:560px) {
  .topbar:not(.account-entry-topbar) { height:114px; grid-template-rows:64px 50px; }
  .account-preview .entry-main h1 { font-size:34px; line-height:1.15; letter-spacing:-.6px; }
  .account-preview .entry-main { padding-top:28px; }
  .account-preview .entry-glimpse-top { padding:16px; flex-wrap:wrap; }
  .account-preview .entry-form-card { padding:22px; }
  .account-preview .entry-login-links { flex-wrap:wrap; }
}

/* Apply the identity type scale to the existing product surfaces as well as entry.
   Keep chart SVG coordinates and large measurement values at their existing sizes. */
html[data-theme] :is(strong,b) { font-weight:600; }
html[data-theme] :is(.stream-value,.live-reading-button strong,.history-summary strong,.review-sample strong) { font-weight:500; }
html[data-theme] :is(.eyebrow,.group-label,.account-preview .side-heading,.account-preview .preview-mark,.diagnostic-list strong,.account-preview .role-badge) {
  text-transform:none; letter-spacing:normal;
}
html[data-theme] :is(.home-heading h1,.hero-title,.craft-title h1,.page-title-row h1,.pages-empty h1,.account-preview h1) {
  font-family:var(--sans); font-size:40px; line-height:44px; font-weight:600; letter-spacing:-.8px;
}
html[data-theme] :is(.home-section-heading h2,.home-ticker-heading h2,.home-selected-name,
  .page-widget-heading h2,.stream-empty h2,.spacecraft-view-title,.stream-row-heading h2,
  .live-home-widget h2,.live-dialog h2,.info-dialog h2,.card-header h2,.fleet-section h2,
  .drawing-header h2,.component-panel h2,.empty-panel h2,.section-title,
  .account-preview h2,.account-preview .record-name,.account-preview .entry-form-card>h2,
  .account-preview .entry-glimpse-body h2,.account-preview .entry-welcome-points h2) {
  font-family:var(--sans); font-size:28px; line-height:34px; font-weight:500; letter-spacing:-.4px;
}
html[data-theme] :is(.home-part-inspector h3,.page-preview-empty h3,.data-explainer h3,
  .live-dialog h3,.short-comparison h3,.history-version-line h3,.observation-content h3,
  .reference-placeholder h3,.connect-data-satnogs-mapping h3,.account-preview h3,
  .account-preview .page-preview h3) {
  font-family:var(--sans); font-size:16px; line-height:24px; font-weight:600; letter-spacing:normal;
}

/* Descriptions and form content use the body scale; labels and provenance follow below. */
html[data-theme] :is(.home-heading p,.home-directory-empty,.home-readings-empty,.home-selected-empty,
  .page-unavailable,.pages-empty p,.stream-empty p,.stream-row-heading p,.data-explainer p,
  .live-dialog p,.info-dialog p,.source-management>p,.trash-panel>p,.lede,
  .briefing-aside p,.observation-content p,.craft-heading p,.component-panel>p,
  .empty-panel p,.reference-placeholder p,.panel-description,.source-details>p,
  .account-preview .card p,.account-preview .history p,.account-preview .lede,
  .account-preview .entry-intro .lede,.account-preview .entry-hero .lede,
  .account-preview .entry-welcome-points p,.account-preview .entry-glimpse-body>p:not(.eyebrow)) {
  font-size:16px; line-height:24px;
}
html[data-theme] :is(.home-craft-select strong,.craft-name,.live-organisation-craft strong,
  .source-choice strong,.connect-data-system strong,.connect-data-review-item strong,
  .account-preview .member-name,.account-preview .choice-title,.account-preview .preview-recipient strong) {
  font-size:16px; line-height:24px; font-weight:500;
}
html[data-theme] :is(.page-title-row input,.live-craft-picker select,.field-mapping select,
  .source-setup-grid select,.history-version-line select,.source-setup-grid input,
  .entity-action-field input,.reading-editor-field input,.reading-editor-field select,
  .home-part-inspector select,.pages-dialog input,.pages-dialog select,
  .connect-data input:not([type=radio]):not([type=checkbox]),.connect-data select,.connect-data textarea,
  .account-preview input,.account-preview select,.account-preview textarea),
html[data-theme] #label-editor-name {
  font-family:var(--sans); font-size:16px; line-height:24px; font-weight:400;
}

/* Small text is 14/20, including mobile and the setup stylesheet loaded after this one. */
html[data-theme] :is(.eyebrow,.group-label,.skip-link,.storage-notice,.sample-tag,.header-end .sample-tag,
  .future-label,.global-nav .future-label,.period-control,.metric-label,.metric-label>span,
  .metric-note,.metric-subtitle,.metric-value small,.metric-card .delta,.delta,.card-header p,.chart-unit,.chart-legend,
  .chart-caption,.craft-subtitle,.fleet-number small,.fleet-list-note,.footer-note,
  .sidebar-heading,.sidebar-heading>span,.spacecraft-navigation .sidebar-heading,
  .craft-nav small,.spacecraft-navigation .craft-nav small,.side-note,.side-note p,.craft-id,
  .detail-topline,.mini-metric>span,.mini-metric>small,.mini-metric>strong>small,.mini-metric .metric-label,.mini-metric .metric-note,
  .drawing-header p,.drawing-header .eyebrow,.drawing-legend,.diagram-tag,.panel-index,
  .panel-footnote,.component-stat-note,.component-panel>.component-stat-note,.component-value-label,.component-figure small,
  .overview-stat>span,.overview-stat small,.overview-stat p,.related-note,.component-panel>p.related-note,
  .source-details summary,.source-details dl,.source-details table,.source-details caption,
  .metadata-strip span,.metadata-strip strong,.metadata-strip dt,.metadata-strip dd,
  .metadata-label,.metadata-value,.schematic-caption,.spacecraft-sidebar-empty,.section-title>.muted,
  .dialog-number>small,.dialog-number>span) {
  font-size:14px; line-height:20px; letter-spacing:normal;
}
html[data-theme] :is(.home-section-heading>span,.home-ticker-heading>span,.home-craft-select small,
  .home-globe-controls p,.home-orbit-status,.home-orbit-coordinates dt,.home-orbit-coordinates small,
  .home-orbit-detail,.home-orbit-detail p,.home-part-context,.home-part-inspector,
  .home-part-inspector h3 small,.home-part-inspector label,.home-part-bound-context,.home-part-choice-detail,
  .home-part-choice-detail small,.home-part-link-note,.home-part-storage-note,.home-diagram-note,
  .home-reading-label,.home-reading-label>small,.home-ticker-reading .home-reading-label,
  .home-diagram-reading>strong>small,.home-ticker-reading>strong>small,.home-reading-context,
  .home-ticker-empty,.home-footnote,.home-orbit-proposal,.home-orbit-proposal dt) {
  font-size:14px; line-height:20px;
}
html[data-theme] :is(.page-visibility,.pages-notice,.page-layout-controls,.page-widget-caption,
  .pages-version,.page-dialog-note,.page-widget-times,.page-widget-provenance,.page-readings-table table,
  .page-source-badge,.page-orbit-facts dt,.pages-dialog label,.page-layout-history strong,
  .page-layout-history span,.page-layout-history small,.page-source-gallery legend,.page-source-selection span,
  .page-source-preview .page-widget-caption,.page-source-preview .page-widget-times,.page-preview-object,
  .page-source-provenance,.page-source-missing-link) {
  font-size:14px; line-height:20px;
}
html[data-theme] :is(.live-craft-picker label,.live-craft-picker>span,.stream-context-bar,.synthetic-badge,
  .live-organisation-craft small,.stream-status,.stream-reading-context,.added-label,.stream-times dt,
  .stream-times dd,.stream-times dd small,.stream-source-line,.stream-footnote,.stream-empty .stream-footnote,
  .stream-inline-note,.stream-diagnostics>summary,.stream-diagnostics>summary>span,.history-records>summary,
  .record-counts,.mapping-summary,.diagnostic-list strong,.diagnostic-list small,.diagnostic-list details,
  .live-reading-button span,.live-widget-footer,.history-summary p,.comparison-windows span,
  .comparison-windows small,.history-table-wrap table,.history-table-wrap td:last-child,.source-sample small,
  .field-mapping label>span,.fixed-mapping>span,.fixed-mapping strong,.mapping-check,.stream-indicators,
  .connection-indicator small,.freshness-indicator small,.source-management-row,.indicator-context,
  .history-summary .stream-indicators strong,.archived-badge,.archived-indicators>small,
  .source-setup-grid label>span,.source-setup-grid label>small,.source-choices legend,.source-choice small,
  .source-choice-state,.review-sample p,.review-sample dt,.review-sample dd,.mapping-detail>summary,
  .mapping-detail>p,.mapping-detail .raw-sample,.history-version-line p,.history-version-line>label>span,
  .disconnect-list,.disconnect-list li,.entity-action-field span,.trash-panel,.entity-label-chip,
  .label-overflow,.stream-undo-note,.trash-histories,.trash-histories button small,.reading-editor-heading,
  .reading-editor-field,.reading-editor p,.reading-editor legend,.reading-editor-labels label,.reading-labels,
  .spacecraft-field small,.spacecraft-metadata dt,.spacecraft-metadata dd small,.spacecraft-metadata-history li,
  .public-orbit-badge,.orbit-object,.orbit-time-context,.orbit-facts dt,.orbit-facts p,.orbit-meaning,
  .orbit-cache-note,.orbit-notice,.orbit-source-details summary,.orbit-history summary,.orbit-fallback summary,
  .orbit-source-details p,.orbit-provenance,.orbit-provenance dd,.orbit-provenance dd small,
  .form-orbit-lookup>small,.iss-original,.iss-chart-boundary) {
  font-size:14px; line-height:20px;
}
/* These two validation sizes were already important in the source styles. */
html[data-theme] :is(.mapping-error,.mapping-validation) { font-size:14px !important; line-height:20px; }
html[data-theme] :is(.connect-data label,.connect-data legend,.connect-data-system span:first-of-type,
  .connect-data-testing small,.connect-data-choice small,.connect-data-pagination,.connect-data-satnogs-sample,
  .connect-data-review-item small,.connect-data-reading strong small,.connect-data-reading dl,
  .connect-data-provenance dl,.connect-data-provenance,.connect-data .connect-data-note,
  .connect-data-label-picker,.connect-data-label-chip,.connect-data-literal-type,
  .connect-data-symbol-group>span,.connect-data-unit-symbols>small) {
  font-size:14px; line-height:20px;
}
html[data-theme] .account-preview :is(.subtext,.tenant-name,.tag,.banner,.side-heading,.side-note,
  .member-email,.role-badge,.pending-row,.notice,.summary-stat,.rule-item,.story-number,
  .scope-note,.record-detail,.history time,.preview-mark,.footer,.toast,.hint,.error,
  p.hint,p.error,.card p.hint,.card p.error,.choice-meta,.choice-tag,.avatar-menu p,
  .entry-small-print,.entry-form-card>p,.entry-glimpse-top,.entry-glimpse-top .tag,
  .entry-glimpse-nav,.entry-glimpse-bottom,.entry-welcome-points article>span,.entry-footer,
  .entry-inviter,.entry-invite-details>span,.entry-invite-details strong,.entry-error:not(:empty),
  .appearance-option strong,.appearance-option small,.member-capabilities legend,.member-capabilities label) {
  font-size:14px; line-height:20px;
}
html[data-theme] .account-preview.account-shell-header :is(.tenant-name,.tenant-button .subtext) {
  font-size:14px; line-height:20px;
}
html[data-theme] .account-preview.account-shell-header :is(.identity-button,.avatar) { font-size:14px; line-height:20px; }
html[data-theme] .sidebar-heading>span { color:var(--muted); background:var(--surface-alt); }
html[data-theme] .craft-nav .nav-dot { background:var(--muted); }
html[data-theme] .craft-nav.active .nav-dot { background:var(--teal); }
html[data-theme] :is(.setup-host,.setup-progress,.setup-launcher>span,.setup-step-list li>span,
  .setup-step-list small,.setup-step-marker,.setup-note) { font-size:14px; line-height:20px; }

/* Preserve icon-only glyph sizes; standard text actions share the button scale. */
html[data-theme] :is(.primary-button,.quiet-button,.text-link,.back-link,.settings,.tab-button,
  .global-nav>a,.global-nav>button,.craft-nav,.spacecraft-navigation .craft-nav,.component-chip,
  .home-create,.home-motion-control,.home-orbit-lookup,.home-orbit-details-link,.home-selected-link,
  .home-part-detail,.home-part-link,.home-part-unlink,.home-more-readings,.page-source-missing-link,
  .page-widget-provenance>summary,.page-source-provenance summary,.spacecraft-record summary,
  .trash-histories button,.label-editor-actions .text-link,.context-menu,.context-menu-item,
  .context-menu-inline-group .context-menu-item,.setup-toggle,.setup-launcher,.setup-step-list button,
  .setup-dismiss,.account-preview .button,.account-preview .text-button,.account-preview .small-button,
  .account-preview .side-link,.account-preview .footer button,.account-preview .story a,
  .account-preview details summary,.account-preview .avatar-menu button,.account-preview .entry-journeys button,
  .account-preview .entry-back,.account-preview .entry-card-link button,.account-preview .entry-login-links button,
  .account-preview .entry-text-action,.account-preview .entry-reset,.account-preview .entry-invite-fixtures button) {
  font-family:var(--sans); font-size:14px; line-height:20px; font-weight:500;
}
html[data-theme] :is(.primary-button,.account-preview .button.primary) { font-weight:600; }

/* The compact header has two explicit rows, without an inherited grid row gap. */
html[data-theme] .topbar { row-gap:0; }
@media(min-width:751px) and (max-width:1150px) {
  html[data-theme] :is(.spacecraft-navigation:has(>.setup-host),.setup-data-navigation) {
    top:118px; height:calc(100dvh - 118px);
  }
}
@media(max-width:560px) {
  .header-end .sample-tag { display:none; }
  .topbar:not(.account-entry-topbar) { grid-template-columns:140px minmax(0,1fr); }
}
@media(max-width:350px) {
  #account-header .account-preview.account-shell-header .tenant-name { max-width:55px; }
}
/* Supplied logo pixels need a known backing in either forced-colour scheme. */
@media(forced-colors:active) {
  .brand { forced-color-adjust:none; background:#F8F3E7; }
  :root[data-theme] .brand-wordmark-light { display:block; }
  :root[data-theme] .brand-wordmark-dark { display:none; }
  html[data-theme] .brand:focus-visible { outline-color:Highlight; }
  /* SVG presentation colours otherwise keep the saved app theme in forced colours. */
  html[data-theme] :is(.chart,.panel-chart,.live-chart,.page-trend) text { fill:CanvasText; }
  html[data-theme] :is(.chart,.panel-chart,.live-chart,.page-trend) line { stroke:GrayText; }
  html[data-theme] :is(.chart,.panel-chart,.live-chart,.page-trend) :is(path,polyline)[stroke] { stroke:Highlight; }
  html[data-theme] :is(.chart,.panel-chart,.live-chart,.page-trend) circle { fill:Highlight; stroke:Canvas; }
}
