@layer paper-type, input-contract;
/*
 * Pâtisserie Lab typography system
 *
 * This file is the only source of truth for on-screen font sizes. Component
 * styles own layout, colour and typeface; semantic roles below own size.
 */
:root {
  --app-font: -apple-system-body, ui-sans-serif, -apple-system, system-ui, "Segoe UI", "Helvetica", "Apple Color Emoji", "Arial", sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";
  --font-part-label: 7px;
  --font-micro-data: 8px;
  --font-dense-data: 10px;
  --font-graph-data: 11px;
  --font-caption: 12px;
  --font-secondary: 13px;
  --font-recipe-meta: 13px;
  --font-recipe-part: 12px;
  --font-body: 14px;
  --font-subheading: 16px;
  --font-section-title: 20px;
  --font-page-title: 28px;

  /* Owner 2026-11-05: Japanese remains 500; OS Latin glyphs render at 400.
     The native-control-safe face/axis is selected before the page is revealed. */
  --font-weight-product: 500;
  --font-weight-regular: var(--font-weight-product);
  --font-weight-medium: var(--font-weight-product);
  --font-weight-semibold: var(--font-weight-product);
}

/* Strong/selected roles share the same product weight as body text. */
strong, b { font-weight: var(--font-weight-product,500); }

body[data-genre] :is(#recipe,#selected-part-table) .recipe-table thead th,
body[data-genre] .row-add-actions .button :is(.part-button-label,.part-button-kind),
body[data-genre] .row-add-actions .button {
  font-size: var(--font-graph-data);
}

/* Compact material detail only. Do not change recipe/analysis numeric precision or type. */
#material-form,
#material-form :is(input,select,textarea,button,output,p,small,span,strong,h2,h3,label,summary,td,th) {
  font-size: var(--font-graph-data);
}

.recipe-thumbnail-part-labels > span,
.recipe-thumbnail-part-labels small {
  font-size: var(--font-part-label);
}

html,
body {
  font-size: var(--font-body);
}

body,
p,
li,
dd,
dt,
label,
output,
tbody,
td,
.metric-name,
.metric-value,
.recipe-name,
.material-name,
.ingredient-name,
.ingredient-value,
.analysis-condition-summary strong,
.analysis-point-card dd,
.analysis-help-dialog dd,
.cluster-descriptions p,
.pca-facts span,
.version-change-note,
.history-change-note,
.warning-message,
.error-message,
.notification-message {
  font-size: var(--font-body);
  font-weight: var(--font-weight-product,500);
}

button,
input,
select,
textarea,
option,
summary,
th,
thead,
nav,
.button,
.btn,
.tab,
.tabs,
.breadcrumb,
.breadcrumbs,
.main-nav,
.secondary-nav,
.pagination,
.library-pagination,
.analysis-result-actions,
.analysis-viewport-controls,
.analysis-lane-viewport-controls,
.analysis-inline-options,
.analysis-multivariate-controls,
.analysis-control-pair,
.analysis-axis-selection section > header strong,
.analysis-axis-tag,
.analysis-y-metric-row,
.analysis-method-options,
.analysis-scope-options,
.analysis-profile-options,
.analysis-category-actions,
.analysis-selector-tools,
.analysis-version-link,
.analysis-option-info,
.analysis-series-legend,
.cluster-legend,
.version-badge,
.version-status,
.version-position,
.latest-badge,
.status-badge,
.compact-status {
  font-size: var(--font-secondary);
  font-weight: var(--font-weight-product,500);
}

small,
time,
.eyebrow,
.micro,
.caption,
.metadata,
.meta,
.date,
.time,
.timestamp,
.updated-at,
.created-at,
.saved-at,
.footnote,
.helper,
.hint,
.note,
.annotation,
.secondary-value,
.unit,
.provenance,
.technical-info,
.analysis-condition-summary span,
.analysis-category-status small,
.analysis-selection-picker small,
.analysis-profile-options small,
.analysis-selected-recipes small,
.analysis-guide-summary,
.analysis-coordinate-note,
.similarity-distance-contract small,
.analysis-scope-reason,
.axis-annotation,
.graph-annotation,
.table-note,
.representative-mark,
.version-metadata,
.history-metadata,
.warning-code,
.error-code {
  font-size: var(--font-caption);
  font-weight: var(--font-weight-product,500);
}

h1,
.page-title,
.recipe-page-title,
.material-page-title,
.cake-page-title,
.title-line .recipe-name,
.cake-name-input,
.recipe-title-input,
.recipe-name-input,
.recipe-name-display {
  font-size: var(--font-page-title);
  font-weight: var(--font-weight-product,500);
}

h2,
.section-title,
.analysis-workspace-heading h2,
.result-section-title,
.recipe-section-title,
.cake-section-title,
.material-section-title,
.history-section-title,
.version-history-title {
  font-size: var(--font-section-title);
  font-weight: var(--font-weight-product,500);
}

h3,
h4,
h5,
h6,
.subheading,
.panel-title,
.card-title,
.dialog-title,
.submenu-heading,
.category-heading,
.metric-category-title,
.analysis-step-compact h3,
.analysis-step-compact h4,
.analysis-result-stage > header h3,
.analysis-point-card strong,
.analysis-help-dialog h3,
.analysis-relation-facts b,
.similarity-reason-panel header strong,
.similarity-reason-columns b,
.similarity-distance-contract strong,
.pca-axis-descriptions strong,
.pca-primary-loadings b,
.cluster-descriptions h4,
.cluster-descriptions strong,
.version-title,
.history-version-title,
.warning-title,
.error-title,
.alert-title {
  font-size: var(--font-subheading);
  font-weight: var(--font-weight-product,500);
}

/* Panel/card headings are local hierarchy, not new page sections. */
:is(article, dialog, [class*="card"], [class*="panel"], [class*="dialog"], [class*="submenu"]) h2 {
  font-size: var(--font-subheading);
  font-weight: var(--font-weight-product,500);
}

/* Brand is a compact identity block rather than a page heading. */
.brand-mark,
.brand-name,
.app-brand strong,
.brand strong,
.library-brand strong,
.source-brand strong {
  font-size: var(--font-section-title);
  font-weight: var(--font-weight-product,500);
}

.brand small,
.app-brand small,
.sidebar-foot,
.sidebar-meta {
  font-size: var(--font-caption);
}

/* Tables: data remains readable; headers are deliberately secondary. */
table th,
table thead,
table thead button {
  font-size: var(--font-secondary);
  font-weight: var(--font-weight-product,500);
}

table td,
table tbody {
  font-size: var(--font-body);
  font-weight: var(--font-weight-product,500);
}

table :is(small, time, .metadata, .meta, .unit, .note) {
  font-size: var(--font-caption);
}

/* Graph typography shares the product's centrally defined semantic roles. */
svg text,
svg .axis-label,
svg .axis-tick,
.axis-label,
.axis-tick,
.graph-tooltip,
.analysis-point-card-line {
  font-size: var(--font-body);
  font-weight: var(--font-weight-product,500);
}

.graph-title,
.metric-heading,
.analysis-y-axis-key strong {
  font-size: var(--font-subheading);
  font-weight: var(--font-weight-product,500);
}

.legend,
.graph-legend,
.analysis-series-legend,
.cluster-legend,
.graph-controls,
.analysis-viewport-controls,
.analysis-lane-viewport-controls {
  font-size: var(--font-secondary);
}

svg .annotation,
svg .secondary-value,
.graph-annotation,
.analysis-coordinate-note,
.analysis-guide-summary {
  font-size: var(--font-caption);
}

/* Analysis Workspace semantic hierarchy. */
.analysis-step-compact > b,
.analysis-result-stage > header > div > b {
  font-size: var(--font-caption);
  font-weight: var(--font-weight-product,500);
}

.analysis-method-picker > summary strong,
.analysis-scope-picker > summary strong,
.analysis-selection-picker > summary strong,
.analysis-selection-picker > summary > span,
.analysis-inline-picker > summary,
.analysis-selected-scope-summary,
.analysis-y-selection-summary,
.analysis-profile-options label > span,
.analysis-metric-categories label > span {
  font-size: var(--font-body);
}

label:has(> input[type="checkbox"]),
label:has(> input[type="radio"]),
.checkbox-label,
.radio-label {
  font-size: var(--font-secondary);
}

.analysis-metric-categories summary > span:first-child,
.analysis-axis-selection h4,
.analysis-selector-genre > span,
.analysis-selected-recipes header strong,
.analysis-recipe-selector h4 {
  font-size: var(--font-subheading);
  font-weight: var(--font-weight-product,500);
}

.analysis-condition-summary span,
.analysis-scope-reason,
.analysis-workspace-heading > p,
.analysis-method-options small,
.analysis-profile-picker > div + p {
  font-size: var(--font-caption);
}

.analysis-point-card header strong {
  font-size: var(--font-subheading);
}

.analysis-point-card header small,
.analysis-point-card .version,
.analysis-point-card .metadata {
  font-size: var(--font-caption);
}

.pca-loading-label,
.analysis-y-metric-row small,
.similarity-primary-table td small {
  font-size: var(--font-caption);
}

.analysis-option-info-panel strong {
  font-size: var(--font-subheading);
  font-weight: var(--font-weight-product,500);
}

.analysis-result-title h3 {
  font-size: var(--font-section-title);
  font-weight: var(--font-weight-product,500);
}

/* Recipe Version: title, status, metadata and memo remain distinct. */
.recipe-version-current,
.recipe-current-version,
.recipe-version-position,
.version-current-position,
.version-chip,
.version-pill,
.latest-label {
  font-size: var(--font-secondary);
  font-weight: var(--font-weight-product,500);
}

.recipe-version-panel h3,
.recipe-version-panel h4,
.version-history-item h3,
.version-history-item h4,
.version-history-entry strong {
  font-size: var(--font-subheading);
  font-weight: var(--font-weight-product,500);
}

.recipe-version-panel time,
.version-history-item time,
.version-history-entry time,
.version-history-entry small {
  font-size: var(--font-caption);
}

.recipe-version-panel p,
.version-history-item p,
.version-history-entry p,
.version-change-memo,
.recipe-version-change {
  font-size: var(--font-body);
}

.context-rail h2,
.context-rail h3,
.context-rail h4 {
  font-size: var(--font-subheading);
  font-weight: var(--font-weight-product,500);
}

/*
 * Product Owner detailed allocation — 2026-08-28
 *
 * The size-count restriction was withdrawn by the Owner on 2026-09-11.
 * Semantic roles remain centralized; there is no fixed number of sizes.
 */

/* D1, D4–D5, D7–D14: standard copy and dense data read at 13px. */
html,
body,
p,
li,
dd,
dt,
label,
output,
.metric-value,
.ingredient-value,
.analysis-condition-summary strong,
.analysis-point-card dd,
.analysis-help-dialog dd,
.cluster-descriptions p,
.pca-facts span,
.version-change-note,
.history-change-note,
.version-change-memo,
.recipe-version-change,
.warning-message,
.error-message,
.notification-message,
table td,
table tbody,
svg text,
svg .axis-label,
svg .axis-tick,
.axis-label,
.axis-tick,
.graph-tooltip,
.analysis-point-card-line,
.recipe-version-panel p,
.version-history-item p,
.version-history-entry p,
:is(.warning, .error, .alert, [role="alert"]) :is(p, li, dd) {
  font-size: var(--font-secondary);
}

/* D2–D3 and D6: named product data and selected Analysis values remain 14px. */
.recipe-name,
.material-name,
.ingredient-name,
.material-row td:first-child strong,
.paper-material-name,
.source-material-control,
.analysis-method-picker > summary strong,
.analysis-scope-picker > summary strong,
.analysis-selection-picker > summary strong,
.analysis-selection-picker > summary > span,
.analysis-inline-picker > summary,
.analysis-selected-scope-summary,
.analysis-y-selection-summary {
  font-size: var(--font-body);
}

.recipe-card-name {
  font-size: var(--font-caption);
}

/* E2–E4: compact selector choices, check/radio labels and ordinary inputs. */
select,
option,
input,
textarea,
.analysis-method-options,
.analysis-scope-options,
.analysis-profile-options,
.analysis-category-actions,
.analysis-selector-tools,
.analysis-inline-picker > div,
.analysis-method-options button,
.analysis-scope-options button,
.analysis-profile-options button,
.analysis-category-actions button,
.analysis-inline-picker > div button,
.analysis-profile-options label > span,
.analysis-metric-categories label > span,
[role="menu"] :is(button, option),
[class*="submenu"] :is(button, option),
label:has(> input[type="checkbox"]),
label:has(> input[type="radio"]),
.checkbox-label,
.radio-label {
  font-size: var(--font-caption);
}

/* C2, C9, C11 and C12: compact local, Version, alert and card headings. */
h3,
h4,
h5,
h6,
.category-heading,
.card-title,
.version-title,
.history-version-title,
.warning-title,
.error-title,
.alert-title,
.analysis-point-card header strong,
.similarity-reason-panel header strong,
.similarity-reason-columns b,
.analysis-relation-facts b,
.recipe-version-panel h3,
.recipe-version-panel h4,
.version-history-item h3,
.version-history-item h4,
.version-history-entry strong,
.recipe-version-card li strong {
  font-size: var(--font-secondary);
  font-weight: var(--font-weight-product,500);
}

:is(article, [class*="card"], [class*="panel"]) h2 {
  font-size: var(--font-secondary);
  font-weight: var(--font-weight-product,500);
}

/* C1 and C3: Base names and Analysis step headings stay at 16px. */
.genre-tile h2,
.base-card h3,
.analysis-step-compact h3,
.analysis-step-compact h4 {
  font-size: var(--font-subheading);
}

/* C4–C5, C7 and C10: analytical and contained headings use 14px. */
.analysis-metric-categories summary > span:first-child,
.metric-category-title,
.analysis-axis-selection h4,
.analysis-axis-tag,
.analysis-selector-genre > span,
.analysis-y-axis-key strong,
.pca-axis-descriptions strong,
.pca-primary-loadings b,
.cluster-descriptions h4,
.cluster-descriptions strong,
.graph-title,
.metric-heading,
.analysis-y-metric-row > strong,
.chart-panel h3,
.graph-group-heading h3,
.cake-graph-title-row h3,
.panel-title,
.dialog-title,
.submenu-heading,
dialog :is(h2, h3, h4),
[class*="dialog"] :is(h2, h3, h4),
[class*="submenu"] :is(h2, h3, h4),
.analysis-help-dialog h3,
.analysis-option-info-panel strong,
.context-rail h2,
.context-rail h3,
.context-rail h4 {
  font-size: var(--font-body);
  font-weight: var(--font-weight-product,500);
}

/* B4–B5: Version/history and Cake major region names use 14px. */
.history-section-title,
.version-history-title,
.version-drawer h2,
.recipe-version-card > header h2,
.cake-section-title h2 {
  font-size: var(--font-body);
  font-weight: var(--font-weight-product,500);
}

/* A7: Cake's legacy internal h1 is a section title, not a page title. */
.cake-section-title h1 {
  font-size: var(--font-section-title);
  font-weight: var(--font-weight-product,500);
}

/* E10: multivariate model/PC/group controls are the explicit 13px exception. */
.analysis-multivariate-controls,
.analysis-multivariate-controls button,
.analysis-multivariate-controls summary,
.analysis-multivariate-controls label:has(> input[type="checkbox"]),
.analysis-control-pair,
.analysis-control-pair button,
.analysis-control-pair summary {
  font-size: var(--font-secondary);
}

/* Alerts use colour/icon/spacing for importance, never tiny body copy. */
:is(.warning, .error, .alert, [role="alert"]) :is(h2, h3, h4, strong):first-child {
  font-size: var(--font-secondary);
  font-weight: var(--font-weight-product,500);
}

:is(.warning, .error, .alert, [role="alert"]) :is(p, li, dd) {
  font-size: var(--font-secondary);
}

:is(.warning, .error, .alert, [role="alert"]) :is(small, time, code, .metadata) {
  font-size: var(--font-caption);
}

/* 2026-08-30 — Material and Cake semantic allocations. */
.material-form-panel,
.material-form-panel :is(input, select, textarea, button, label, span, strong, small, output),
.seven-grid label,
.seven-grid input,
.material-genre-manager > header span,
.cake-table-display-mode button,
.cake-source-recipe-table tbody,
.cake-analysis-steps > section > small,
.cake-analysis-metric-options label,
.cake-population-mode,
.cake-population-options,
.cake-multivariate-controls label,
.cake-multivariate-controls select,
.cake-analysis-series-legend,
.cake-analysis-note,
.cake-similarity-table,
#analysis-workspace .similarity-primary-table table,
body[data-genre] #recipe .recipe-totals span,
body[data-genre] .subrecipe-strip :is(span, small) {
  font-size: var(--font-caption);
}

.material-completion-card,
.material-completion-card :is(span, strong, small),
.cake-source-recipe-table thead,
.cake-point-axis-labels,
.cake-point-legend,
.cake-point-legend small,
.cake-analysis-chart svg text,
body[data-genre] .recipe-display-sheet.is-cream-recipe .recipe-book-column h3,
body[data-genre] .subrecipe-seven small {
  font-size: var(--font-graph-data);
}

.context-status-section h3,
.context-fact { font-size: var(--font-body); }

.material-point-legend {
  font-size: var(--font-dense-data);
}

.paper-material-name,
.cake-source-recipe-table .source-material-control,
.cake-point-grid > section > h4,
.cake-point-plot > header,
.cake-analysis-fixed-population {
  font-size: var(--font-secondary);
}

.paper-material-row strong,
.cake-analysis-steps strong,
.cake-analysis-steps select {
  font-size: var(--font-body);
}

.paper-material-row strong {
  font-size: var(--font-graph-data);
}

#analysis-workspace .similarity-primary-table table,
.cake-similarity-table,
.cake-analysis-point-value {
  font-size: var(--font-graph-data);
}

@media (max-width: 900px) {
  /* Responsive layout may reflow, but the semantic type scale never changes. */
  h1,
  .page-title,
  .recipe-page-title,
  .material-page-title,
  .cake-page-title,
  .title-line .recipe-name,
  .cake-name-input,
  .recipe-title-input,
  .recipe-name-input,
  .recipe-name-display {
    font-size: var(--font-page-title);
  }
}

/*
 * Product Owner direct-edit sheet — 2026-08-28 (latest explicit instruction)
 *
 * The sheet intentionally makes dense Recipe and Material tables 12px while
 * assigning semantic roles. Later Owner allocations below supersede the sizes;
 * the fixed-size-count rule was withdrawn on 2026-09-11.
 */

/* Home */
.home-page .home-header h1 {
  font-size: var(--font-section-title);
}

.home-page .genre-tile > div > p {
  font-size: var(--font-caption);
}

.home-page .cake-panel h2 {
  font-size: var(--font-subheading);
}

.home-page .material-panel h2 {
  font-size: var(--font-body);
}

/* Recipe library */
.library-content-head h2 {
  font-size: var(--font-subheading);
}

.recipe-card-meta {
  font-size: var(--font-caption);
}

/* Four Base Recipe pages and their Cake equivalents. */
.title-line .recipe-name,
.cake-name-input {
  font-size: var(--font-section-title);
}

.recipe-display-head > div > span,
.recipe-display-title-row :is(dt, dd) {
  font-size: var(--font-caption);
}

.recipe-display-title-row h2,
.recipe-ingredient-item :is(strong, b) {
  font-size: var(--font-secondary);
}

.recipe-book-column h3 {
  font-size: var(--font-caption);
}

.recipe-book-column h3 i {
  font-size: var(--font-secondary);
}

.calculation-input-heading > div > p,
.selected-recipe-source strong,
.recipe-totals > span {
  font-size: var(--font-secondary);
}

.calculation-input-heading > div > span,
.recipe-totals strong {
  font-size: var(--font-caption);
}

.recipe-table :is(th, td, input, select, button, small, strong, b, span),
.cake-workspace table :is(th, td, input, select, button, small, strong, b, span) {
  font-size: var(--font-caption);
}

#genre-calculation > .section-heading h2 {
  font-size: var(--font-subheading);
}

.subrecipe-strip .subrecipe-item > span {
  font-size: var(--font-secondary);
}

.subrecipe-strip .subrecipe-item :is(strong, small),
.subrecipe-detail > header :is(span, h3, small, dt, dd),
.subrecipe-table :is(th, td),
.subrecipe-seven :is(small, strong, em) {
  font-size: var(--font-caption);
}

.data-extraction-heading .eyebrow,
.data-extraction-heading > p {
  font-size: var(--font-caption);
}

.data-extraction-heading h2 {
  font-size: var(--font-section-title);
}

.data-extraction-note-toggle {
  font-size: var(--font-secondary);
}

/* Recipe graphs */
.graph-panel-grid .chart-panel h3 {
  font-size: var(--font-secondary);
}

.graph-panel-grid .chart-contract-details summary,
.graph-panel-grid :is(
  .composition-overview-head,
  .composition-supply-head,
  .emulsion-summary-value-group > strong,
  .emulsion-ratio-row > header,
  .chocolat-denominator-group > header
) {
  font-size: var(--font-secondary);
}

.graph-panel-grid :is(
  .legend,
  .graph-legend,
  .legend-label,
  .legend-value,
  .metric-dot-axis,
  .metric-dot-value-list,
  .composition-overall-legend,
  .composition-supply-legend,
  .emulsion-phase-legend,
  .emulsion-system-axis,
  .structure-coverage-axis-note,
  .mini-position,
  svg text
) {
  font-size: var(--font-caption);
}

/* Analysis workspace */
.analysis-step-compact h3,
.analysis-result-title h3 {
  font-size: var(--font-body);
}

.analysis-method-picker > summary strong,
.analysis-scope-picker > summary strong,
.analysis-selection-picker > summary strong,
.analysis-selection-picker > summary > span,
.analysis-inline-picker > summary,
.analysis-selected-scope-summary,
.analysis-y-selection-summary {
  font-size: var(--font-secondary);
}

.analysis-condition-summary strong,
.analysis-condition-summary span,
.analysis-inline-options label,
.analysis-option-info,
.analysis-viewport-controls,
.analysis-viewport-controls button,
.analysis-viewport-controls output,
.analysis-main-graph :is(svg text, .axis-label, .axis-tick),
.analysis-coordinate-note,
.analysis-guide-summary {
  font-size: var(--font-caption);
}

.analysis-result-actions,
.analysis-result-actions button {
  font-size: var(--font-secondary);
}

/* Material database summary and ledger. */
.summary-strip :is(span, strong),
.materials-table :is(th, td, span, small),
.materials-table .material-state {
  font-size: var(--font-caption);
}

.materials-table .material-row td:first-child strong {
  font-size: var(--font-secondary);
}

/*
 * Product Owner screenshot follow-up — 2026-08-28
 *
 * Actual numeric/coefficient data in dense ledgers uses 10px. Labels and
 * headers keep their prior hierarchy. Graph item labels and values use 11px.
 */

/* Material ledger: coefficient, 100g conversion and price data. */
.materials-table td.number-cell,
.materials-table td.number-cell :is(span, small, strong, b) {
  font-size: var(--font-dense-data);
}

/* Four Base input tables and the equivalent selected-Recipe tables in Cake. */
.recipe-table-parity tbody td:nth-child(n + 3),
.recipe-table-parity tbody td:nth-child(n + 3) :is(input, output, span, small, strong, b),
.recipe-table-parity tfoot td:nth-child(n + 2),
.recipe-table-parity tfoot td:nth-child(n + 2) :is(input, output, span, small, strong, b),
.cake-source-whole-table tbody td:nth-child(n + 2),
.cake-source-whole-table tbody td:nth-child(n + 2) :is(input, output, span, small, strong, b),
.cake-source-whole-table tfoot td:nth-child(n + 2),
.cake-source-whole-table tfoot td:nth-child(n + 2) :is(input, output, span, small, strong, b),
.subrecipe-input-header :is(.subrecipe-usage-input, label > b),
.cake-shopping-table tbody td:nth-child(n + 3),
.cake-shopping-table tbody td:nth-child(n + 3) :is(span, small, strong, b) {
  font-size: var(--font-dense-data);
}

/* Subrecipe tabs, summaries, numeric table cells and 10-component values. */
.subrecipe-strip .subrecipe-item :is(strong, small),
.subrecipe-detail > header dd,
.subrecipe-table tbody td:not(:first-child),
.subrecipe-table tfoot td:not(:first-child),
.subrecipe-seven :is(strong, em) {
  font-size: var(--font-dense-data);
}

/* Four Base graph item names, axes, legends and values; panel titles stay 13px. */
.graph-panel-grid .chart-panel :is(
  span,
  strong,
  small,
  b,
  em,
  dt,
  dd,
  p,
  li,
  svg text
),
.graph-panel-grid .chart-panel :is(.donut, .metric-dot-axis, .metric-dot-value-list) {
  font-size: var(--font-graph-data);
}

/* Cake graph parity, including comparison legends, axes and value tables. */
.cake-graph-card :is(span, strong, small, b, em, dt, dd, p, li, svg text),
.cake-graph-card .donut,
.comparison-chart svg text,
.comparison-legend,
.comparison-legend :is(span, strong, small, b),
.comparison-values :is(th, td, span, strong, small, b) {
  font-size: var(--font-graph-data);
}

/* Web formal-PDF profile dialog. */
.recipe-diagram-page h2 { font-size: var(--font-body); }
.diagram-board-hint { font-size: var(--font-graph-data); }
.recipe-diagram-page h2 span, .diagram-add-row label, .diagram-paint>div>span, .diagram-tone span { font-size: var(--font-caption); }
.recipe-media button, .recipe-diagram-page button, .recipe-photo-lightbox button,
.diagram-help, .diagram-live, .diagram-step label, .diagram-toolbar label,
.recipe-diagram-legend { font-size: var(--font-secondary); }
.recipe-media small, .recipe-media-status, .recipe-media-empty span, .recipe-diagram-page small,
.recipe-diagram-page select, .recipe-diagram-page input { font-size: var(--font-caption); }

.web-pdf-dialog h2 {
  font-size: var(--font-section-title);
}
.web-account-navigation { font-size:var(--font-caption); }

.web-pdf-dialog__eyebrow {
  font-size: var(--font-graph-data);
}

.web-pdf-dialog__choices strong {
  font-size: var(--font-subheading);
}

.web-pdf-dialog__choices span,
.web-pdf-dialog__note {
  font-size: var(--font-caption);
}

/* Diagram SVGs scale with their drawing area; keep their calculated label size. */
.recipe-diagram-page svg text,
.recipe-media-preview svg text {
  font-size: var(--font-secondary);
}
#analysis-workspace .analysis-guide-value { font-size:var(--font-graph-data); }

/* Account and legal surfaces share the approved Product typography scale. */
.pl-account-avatar,.pl-account-name,.pl-account-menu>nav a { font-size:var(--font-secondary); }
.pl-account-name small { font-size:var(--font-graph-data); }
.pl-shell-ready .pl-settings-shortcut { font-size:var(--font-section-title); }
.settings-page #simulation-banner,.settings-nav>p,.settings-page>footer,.legal-links span { font-size:var(--font-caption); }
.settings-page h1 { font-size:var(--font-section-title); }
.settings-page,.settings-page .settings-nav a,.settings-page :is(p,dt,dd,label,button,input,select) { font-size:var(--font-body); }
.service-brand-name small { font-size:var(--font-caption); }
.pl-shell-ready .sidebar .main-nav a { font-size:var(--font-secondary); }
.settings-page h2,.legal-document h3,.consent-receipt h2 { font-size:var(--font-subheading); }
@media(max-width:760px){
  .settings-page .settings-nav a { font-size:var(--font-secondary); }
  .settings-page h1 { font-size:var(--font-section-title); }
}

/* Existing Cake and Cream allocations, centralized without enlarging or
 * reducing other numeric roles (Owner 2026-09-11). */
.paper-part header > span,
.paper-part header > span :is(b, small) { font-size: var(--font-dense-data); }
#cake-app .cake-preparation-row,
#cake-app .composition-weight-panel p,
#cake-app .composition-weight-panel label { font-size: var(--font-graph-data); }
#cake-app .cake-preparation-row,
#cake-app .cake-preparation-row span,
#cake-app .cake-preparation-value input,
#cake-app .cake-preparation-value b,
#cake-app .cake-preparation-multiplier :is(input, button, label),
#cake-app .cake-source-recipe-table thead th { font-size: var(--font-graph-data) !important; }
#cake-app .paper-part header > span :is(b, small) { font-size: var(--font-dense-data) !important; }
body[data-genre="cream"] #recipe #cream-gelatin-prediction { font-size: var(--font-micro-data) !important; }

/* Owner: material side panels use 11px text and 10px numeric values. */
#material-form, #material-form :is(input,select,textarea,button,output,p,small,span,strong,h2,h3,label,summary,td,th),
.material-genre-manager, .material-genre-manager :is(input,button,label,span,strong,small,p),
.material-review-panel, .material-review-panel :is(button,span,small,p),
#material-bulk-actions, #material-bulk-actions :is(button,label,select),
.material-genre-manage { font-size:var(--font-graph-data); }
.material-overview, .material-overview button { font-size:var(--font-caption); }
#material-form :is(input[type="number"],input[data-spreadsheet-number],input[name^="coefficient:"],output,.material-numeric),
#material-form .history-entry > strong,
#material-form #coefficient-total,
.material-genre-manager .material-numeric { font-size:var(--font-dense-data) !important; }




/* Owner: material coefficient input and total use 10px. */
:root { --font-material-coefficient: 10px; }
#material-form input[name^="coefficient:"], #material-form #coefficient-total { font-size:var(--font-material-coefficient) !important; }
#category-filter :is(button,span) { font-size:var(--font-caption) !important; }

/* Library controls retain the approved compact sizes in the central scale. */
#history-app .library-content-tools :is(button,a,input,span),
#history-app :is(.library-filters,.library-subbase-filters) :is(button,a,small,span),
#subbases-app :is(.sb-tabs,.sb-subbase-row) :is(button,small,span),
#history-app .library-content-head p,
.library-page-size,
#analysis-workspace .analysis-recipe-selector .analysis-search-material-matches { font-size:var(--font-graph-data); }
.library-selection-drag-badge { font-size:var(--font-caption); }
#library-assignment-status { font-size:var(--font-caption); }
@media(max-width:700px){ #history-app .library-pagination { font-size:var(--font-graph-data); } }

.analysis-sample-mode { font-size: var(--font-caption); }

/* Material input, sub-base and guide roles. */
#material-form :is(input,textarea)::placeholder { font-size:var(--font-dense-data); }
.subbase-management { font-size:var(--font-graph-data); }
.subbase-management :is(button,input,select,label,summary,strong,small,h3) { font-size:var(--font-graph-data); }
.subbase-management h3 { font-size:var(--font-caption); }
.subbase-management :is(.subbase-count,[data-assignment-count]) { font-size:var(--font-dense-data); }
.illustration-picker h2 { font-size:var(--font-subheading); }
.illustration-picker p { font-size:var(--font-caption); }
.illustration-picker label { font-size:var(--font-caption); }
.illustration-picker button { font-size:var(--font-caption); }
.illustration-picker footer { font-size:var(--font-caption); }
.guide-breadcrumb { font-size:var(--font-caption); }
.guide-detail header small { font-size:var(--font-graph-data); }
.guide-contents { font-size:var(--font-secondary); }
.guide-detail figcaption { font-size:var(--font-caption); }
.guide-table table { font-size:var(--font-secondary); }
.guide-note { font-size:var(--font-secondary); }
.guide-page-nav { font-size:var(--font-secondary); }
#material-form :is(#price-conversion-result,#price-helper-suggestion,#material-usage-count),
.material-review-panel .material-numeric { font-size:var(--font-dense-data) !important; }

.cake-batch-summary :is(small,strong,input) {font-size:var(--font-caption);}

.illustration-picker-list button,.illustration-picker-list strong {font-size:var(--font-graph-data);}
body[data-genre] #recipe .batch-total-field > span:first-child {font-size:var(--font-secondary);}
body[data-genre] #recipe .batch-total-field :is(input,b) {font-size:var(--font-caption);}

/* Owner 2026-09-15: only recipe BASE/usage entries and the prediction change size. */
:root { --font-recipe-entry:11px; --font-recipe-calculated:10px; --font-holding-prediction:9px; }
@layer input-contract {
 /* Numeric values only; item labels keep their size except the two compact headers. */
 body[data-genre] :is(#recipe,#selected-part-table) .recipe-table-parity tbody tr[data-index] td:nth-child(n + 4),
 body[data-genre] :is(#recipe,#selected-part-table) .recipe-table-parity tbody tr[data-index] td:nth-child(n + 4) :is(span,small,strong,b,output),
 body[data-genre] :is(#recipe,#selected-part-table) .recipe-table-parity tfoot tr:first-child td:nth-child(n + 4) {
   font-size:var(--font-recipe-calculated) !important;
 }
 body[data-genre] #recipe :is(.base-input,.subrecipe-usage-input) { font-size:var(--font-recipe-entry) !important; }
 body[data-genre] #recipe #cream-gelatin-prediction { font-size:var(--font-holding-prediction) !important; }
 body[data-genre] #recipe .subrecipe-usage-controls :is(label,button) { font-size:var(--font-dense-data) !important; }
 body[data-genre] #recipe .subrecipe-total-percent { font-size:var(--font-recipe-calculated) !important; }
 body[data-genre] :is(#recipe,#selected-part-table) .recipe-table-parity :is(.batch-amount-heading,.protein-gluten-heading),
 body[data-genre] :is(#recipe,#selected-part-table) .recipe-table-parity .protein-gluten-heading > span { font-size:var(--font-dense-data) !important; }
 body[data-genre] #recipe :is(.part-select,.dough-process-select,.subrecipe-part-code) { font-size:var(--font-graph-data) !important; }
}

/* Read-only subrecipe details: same labels and calculated numbers as the main table. */
@layer input-contract {
 body[data-genre] #special-content .subrecipe-detail :is(h3,dt,th,td:first-child),
 body[data-genre] #special-content .subrecipe-strip .subrecipe-item > span { font-size:var(--font-graph-data) !important; }
 body[data-genre] #special-content .subrecipe-detail :is(dd,.subrecipe-unused-label),
 body[data-genre] #special-content .subrecipe-table :is(tbody,tfoot) td:not(:first-child),
 body[data-genre] #special-content .subrecipe-seven :is(small,strong,em),
 body[data-genre] #special-content .subrecipe-strip small { font-size:var(--font-recipe-calculated) !important; }
 body[data-genre] #special-content .subrecipe-table th:last-child { font-size:var(--font-dense-data) !important; }
}

/* Recipe numeric weight matches the Material DB's nonzero coefficients. */
@layer input-contract {
 body[data-genre] :is(#recipe,#selected-part-table) .recipe-table-parity tbody tr[data-index] td:nth-child(n + 3):not(:last-child),
 body[data-genre] :is(#recipe,#selected-part-table) .recipe-table-parity tbody tr[data-index] td:nth-child(n + 3) :is(input,span,small,strong,b,output),
 body[data-genre] :is(#recipe,#selected-part-table) .recipe-table-parity tfoot tr:first-child td:nth-child(n + 3),
 body[data-genre] #recipe :is(.subrecipe-usage-input,.subrecipe-total-percent),
 body[data-genre] #special-content .subrecipe-table :is(tbody,tfoot) td:not(:first-child),
 body[data-genre] #special-content .subrecipe-detail dd,
 body[data-genre] #special-content .subrecipe-seven em { font-weight: var(--font-weight-product,500) !important; }
}

/* Table text weight trial: remove this block to restore the previous text weights. */
@layer input-contract {
 body[data-genre] :is(#recipe,#selected-part-table) .recipe-table-parity thead :is(th,th span),
 body[data-genre] #recipe :is(.part-select,.dough-process-select,.material-name-input),
 body[data-genre] #recipe .subrecipe-input-header :is(strong,small,.subrecipe-part-code),
 body[data-genre] #recipe .subrecipe-usage-controls :is(label,button),
 body[data-genre] :is(#recipe,#selected-part-table) .recipe-table-parity tfoot tr:first-child td:nth-child(2),
 body[data-genre] #special-content .subrecipe-detail :is(h3,dt,th,.subrecipe-unused-label),
 body[data-genre] #special-content .subrecipe-table :is(tbody,tfoot) td:first-child,
 body[data-genre] #special-content .subrecipe-seven small { font-weight: var(--font-weight-product,500) !important; }
}

/* Material names follow body text; coefficient and price numbers retain their weights. */
@layer input-contract {
.materials-table .material-row td:first-child strong { font-weight: var(--font-weight-product,500) !important; }
}

/* Numeric roles retain their pre-550 weights, independently of body/label text. */
@layer input-contract {
 input[type="number"],
 .recipe-version-position small,
 .workflow-index b,
 .recipe-display-head dd,
 .composition-dot-axis span,
 .composition-heading-mark,
 .metric-dot-axis span,
 .emulsion-system-axis span,
 .air-volume-result strong,
 .legend-value,
 .analysis-viewport-controls output,
 .materials-table .number-cell,
 .materials-table .number-cell > span,
 #notebook-filters button > b,
 #recipe-page-size,
 .pl-numbered-pagination .pl-page-button,
 .readiness-ring strong,
 .core-readiness strong,
 .population-card strong,
 .population-card dd,
 .context-fact-number,
 #preparation-multiplier,
 .part-input-box input,
 .paper-part header small,
 .cake-source-recipe-table tbody tr:not(.subrecipe-input-header) td:nth-child(n + 3),
 .cake-point-plot > header > span,
 .cake-point-axis-labels span,
 .axis-tick,
 .analysis-guide-value,
 .source-workspace-totals strong,
 .composition-overview-legend b,
 .metric-contract-counts strong,
 .recipe-position-median b,
 .stage-id,
 .flow-number { font-weight: var(--font-weight-product,500) !important; }

 .air-comparison-bar > b,
 .analysis-result-title > b,
 .analysis-step-compact > b,
 .guide-chart-row strong,
 .summary-strip b,
 #count-base, #count-archived, #count-review, #count-price-missing,
 #material-trash-count, #recipe-trash-count,
 .hero-facts b,
 .cake-preparation-value input,
 .subrecipe-readonly-usage strong,
 .cake-source-recipe-table tfoot td:nth-child(n + 3),
 .ratio-strip strong,
 .mini-values strong,
 .analysis-copy dd,
 .component-profile-value strong,
 .absorption-grid input,
 .dispersion-values strong,
 .recipe-position-current strong,
 .category-chip > span,
 .stage-percent { font-weight: var(--font-weight-product,500) !important; }

 .materials-table .seven-ledger-value.is-nonzero > span,
 .part-row .part-cake-x input { font-weight: var(--font-weight-product,500) !important; }
 body[data-genre] .metric-data-values strong { font-weight: var(--font-weight-product,500) !important; }
}

/* Paper recipe quantities match the adjacent material label weight. */
@layer input-contract {
 body[data-genre] #paper-recipe .recipe-ingredient-item > b { font-weight: var(--font-weight-product,500) !important; }
}

/* Numeric strong elements previously inherited the browser's bold weight. */
@layer input-contract {
 .composition-overall-legend strong,
 .metric-dot-total strong,
 .structure-coverage-summary > div > strong,
 .structure-coverage-plot > strong { font-weight: var(--font-weight-product,500) !important; }
 body[data-genre]:not([data-genre="cake"]) .structure-coverage-summary > div:first-child > strong { font-weight: var(--font-weight-product,500) !important; }
 body[data-genre]:not([data-genre="cake"]) .structure-coverage-plot > strong { font-weight: var(--font-weight-product,500) !important; }
}

/* Owner 2026-09-18: keep only the top recipe at the reviewed reading size.
   Input tables, subrecipes, graph/data/analysis and other pages use their
   pre-layout semantic sizes and weights above. */
@layer paper-type {
 body.pl-shell-ready .recipe-visual-summary {
   --font-micro-data: var(--font-body); --font-dense-data: var(--font-body); --font-graph-data: var(--font-body);
   --font-caption: var(--font-body); --font-secondary: var(--font-body);
   
   font-family: var(--app-font);
   font-size: var(--font-body);
   letter-spacing: normal;
   color: var(--product-text-color, #292929);
 }
 body.pl-shell-ready .recipe-visual-summary * { font-weight: var(--font-weight-product,500) !important; }
 body.pl-shell-ready .recipe-visual-summary :is(strong,b,.is-active,.is-selected) { font-weight: var(--font-weight-product,500) !important; }
 body.pl-shell-ready .recipe-visual-summary :is(h1,h2,h3,h4,h5,h6,.recipe-name) { font-weight: var(--font-weight-product,500) !important; }
 body.pl-shell-ready .recipe-visual-summary .recipe-display-meta :is(dt,dd) { font-size:var(--font-recipe-meta) !important; }
 body.pl-shell-ready .recipe-visual-summary .recipe-book-column h3 { font-size:var(--font-recipe-meta) !important; }
 /* Owner 2026-11-04: smaller part names on Four Base screens only. */
 body.pl-shell-ready:is([data-genre="cream"],[data-genre="dough"],[data-genre="chocolat"],[data-genre="ice"]):not(:has(.pdf-capture)) .recipe-visual-summary .recipe-book-column h3 { font-size:var(--font-recipe-part) !important; }
 body.pl-shell-ready:is([data-genre="cream"],[data-genre="dough"],[data-genre="chocolat"],[data-genre="ice"]):not(:has(.pdf-capture)) .recipe-visual-summary .recipe-book-column h3 .paper-subrecipe-usage { font-size:var(--font-recipe-meta) !important; }
 body.pl-shell-ready .recipe-visual-summary :is(.recipe-ingredient-item > strong,.recipe-ingredient-item > b,.paper-material-name,.paper-material-quantity) {
   color: var(--product-text-color, #292929);
   font-size: var(--font-body) !important;
   font-weight: var(--font-weight-product,500) !important;
   line-height: 1.5;
 }
}

/* Keep the accepted navigation presentation while restoring workspace text. */
@layer paper-type {
 body.pl-shell-ready .sidebar {  font-family:var(--app-font); letter-spacing:normal; }
 body.pl-shell-ready .sidebar * { font-weight: var(--font-weight-product,500) !important; }
 body.pl-shell-ready .sidebar :is(strong,b,.is-active,.is-selected) { font-weight: var(--font-weight-product,500) !important; }
 body.pl-shell-ready .sidebar :is(.brand strong,.brand-name) { font-weight: var(--font-weight-product,500) !important; }
 body.pl-shell-ready .sidebar :is(.main-nav,.main-nav a,.nav-base-label) { font-size:var(--font-body) !important; }
}

/* Owner 2026-09-18: the material price uses the adjacent coefficient typography. */
@layer input-contract {
 .materials-table td.number-cell:last-child > span:not(.price-missing) { font-weight: var(--font-weight-product,500) !important; }
 #material-form input[name="pricePer100g"] { font-size:var(--font-dense-data) !important; font-weight: var(--font-weight-product,500) !important; }
}

.materials-table .materials-table-component-head th[data-component="タンパク質グルテン"],
.materials-table .materials-table-component-head th[data-component="タンパク質グルテン"] > span { font-size:var(--font-micro-data) !important; }

/* Coefficient widths use the same digit measure as their displayed numbers. */
.sb-page h1 { font-size:var(--font-page-title); }
.sb-page h2,.sb-dialog h2 { font-size:var(--font-subheading); }
.sb-page small,.sb-kicker,.sb-page #sb-current-title { font-size:var(--font-caption); }

.materials-table, .materials-table col.materials-coefficient-column { font-size:var(--font-dense-data); }

/* Owner 2026-09-19: complete material ledger overview on narrow screens. */
@media (max-width:1180px) {
 body.pl-shell-ready.pl-web-responsive .materials-table thead th { font-size:var(--font-micro-data) !important; }
 body.pl-shell-ready.pl-web-responsive .materials-table .materials-table-component-head th[data-component="タンパク質グルテン"] { font-size:var(--font-part-label) !important; }
}

@media (max-width:699px) {
 body.pl-shell-ready.pl-web-responsive[data-genre] :is(#recipe,#selected-part-table) .recipe-table-parity thead th { font-size:var(--font-micro-data) !important; }
}

/* Four-chapter guide: chapter sections and grouped contents use shared type roles. */
.guide-detail > section > h2 { font-size:var(--font-section-title); }
.guide-contents h2 { font-size:var(--font-secondary); }

/* Phone reading scale. Desktop type roles and numerical notation are unchanged. */
@media (max-width:699px) {
  body.pl-shell-ready.pl-web-responsive {
    --font-micro-data:11px; --font-dense-data:11px; --font-graph-data:12px;
    --font-caption:11px; --font-secondary:11px; --font-recipe-meta:11px;
    --font-body:12px; --font-subheading:12px; --font-section-title:16px; --font-page-title:18px;
    font-size:var(--font-body);
    --font-recipe-entry:12px; --font-recipe-calculated:12px; --font-holding-prediction:11px; --font-material-coefficient:12px;
  }
  @layer paper-type {
    body.pl-shell-ready.pl-web-responsive :is(input:not([type=checkbox]):not([type=radio]),select,textarea) { font-size:var(--font-body) !important; }
    body.pl-shell-ready.pl-web-responsive :is(.material-overview button,.materials-table th[rowspan],.materials-table td,.materials-table td > span,.materials-table td strong) { font-size:var(--font-body) !important; }
    body.pl-shell-ready.pl-web-responsive :is(#material-form,.top-actions,.workflow-index,.sb-panel,#analysis-workspace) { font-size:var(--font-body); }
    body.pl-shell-ready.pl-web-responsive :is(.recipe-name,#recipe-name) { font-size:var(--font-page-title) !important; }
    body.pl-shell-ready.pl-web-responsive :is(#recipe,#selected-part-table) .recipe-table-parity thead th { font-size:var(--font-micro-data) !important; }
  }
}

@media (max-width:699px) {
 @layer input-contract {
  body.pl-shell-ready.pl-web-responsive :is(#recipe,#material-form) :is(input,select,textarea) { font-size:var(--font-body) !important; }
 }
}

@media(max-width:699px) {
 @layer input-contract {
  body.pl-shell-ready.pl-web-responsive .cake-source-recipe-table :is(td,td span,td strong,td small,td b) { font-size:var(--font-body) !important; }
  body.pl-shell-ready.pl-web-responsive .cake-source-recipe-table th { font-size:var(--font-caption) !important; }
  body.pl-shell-ready.pl-web-responsive .cake-source-recipe-table input { font-size:var(--font-body) !important; }
 }
}

@media(max-width:699px) {
  body.pl-shell-ready.pl-web-responsive .sidebar .brand > span:last-child { font-size:var(--font-section-title); }
  body.pl-shell-ready.pl-web-responsive :is(.workflow-index a,.sb-tabs button,.sb-master-list button,.web-mobile-menu-toggle,.workspace-breadcrumbs) { font-size:var(--font-secondary); }
}

@media(max-width:699px) {
  body.pl-shell-ready.pl-web-responsive :is(.context-rail,.sb-dialog,.recipe-material-picker) :is(button,input,select,textarea) { font-size:var(--font-body); }
}

@media(max-width:699px) {
 @layer input-contract {
  body.pl-shell-ready.pl-web-responsive #material-form .seven-grid label > span { font-size:var(--font-caption) !important; }
  body.pl-shell-ready.pl-web-responsive #cake-app :is(.part-row,.part-row strong,.paper-part h3,.paper-material-row,.recipe-diagram-legend,.cake-preparation-row,.cake-batch-summary strong) { font-size:var(--font-body) !important; }
  body.pl-shell-ready.pl-web-responsive #cake-app :is(.part-row small,.part-row label,.cake-batch-summary small) { font-size:var(--font-caption) !important; }
 }
}

/* Owner 2026-10-06: compact Cake paper recipes; input and graph type stays unchanged. */
:root { --font-cake-paper:12px; }
@layer paper-type {
 body.pl-shell-ready #cake-app .cake-master-recipe :is(strong,b,small,h3,.paper-material-name,.paper-material-row) { font-size:var(--font-cake-paper) !important; }
}
@layer input-contract {
 body[data-genre=cake] #selected-part-table .recipe-table-parity tbody tr[data-index] td:nth-child(3),
 body[data-genre=cake] #selected-part-table .subrecipe-readonly-usage strong { font-size:var(--font-recipe-entry) !important; }
 body[data-genre=cake] #selected-part-table .subrecipe-total-percent { font-size:var(--font-recipe-calculated) !important; }
 body[data-genre=cake] #selected-part-table :is(.source-part-control,.subrecipe-part-code,.source-material-control,.subrecipe-readonly-usage small) { font-size:var(--font-graph-data) !important; }
}

/* Owner 2026-10-16: illustration part labels match adjacent Cake recipe type. */
@layer input-contract {
 body.pl-shell-ready #cake-app .cake-preparation-row .cake-preparation-name { font-size:var(--font-cake-paper) !important; }
 body.pl-shell-ready #cake-app .cake-section-title h1 { font-size:var(--font-body); }
}

/* Owner 2026-10-19: editable subrecipe titles match material inputs. */
@layer input-contract {
 body[data-genre] #recipe .subrecipe-source-name { font-weight: var(--font-weight-product,500) !important; }
}
#analysis-workspace .analysis-range-label { font-size:var(--font-caption); }
#analysis-workspace .analysis-point-card :is(dt,dd) { font-size:var(--font-caption); }

/* Product-wide OS typography also covers UA monospace defaults outside the shell. */
code, pre, kbd, samp { font-family: inherit; }


/* Owner 2026-11-02: text-only palette. Size/family remain in their existing roles. */
:root { --product-text-color: #292929; }
@layer paper-type {
  body, body *, body *::before, body *::after, input::placeholder, textarea::placeholder { font-weight: var(--font-weight-product,500) !important; font-synthesis:weight !important; }
  body, body *, body *::before, body *::after, input::placeholder, textarea::placeholder { font-variation-settings: var(--product-font-variation,normal) !important; }
  body, input, textarea, select, button,
  :is(h1,h2,h3,h4,h5,h6,p,span,a,strong,b,em,small,label,summary,dt,dd,td,th,li,legend,figcaption,code,pre,kbd,samp,output):not(:empty):not(.structure-coverage-track) {
    color: var(--product-text-color, #292929) !important;
  }
  svg text, svg tspan { fill: var(--product-text-color, #292929) !important; font-weight:var(--font-weight-product,500) !important; }
  /* Owner 2026-11-04: search hints share the unselected-choice gray.
     The two attribute selectors cover search fields without type="search". */
  body :is(input[type="search"],input[data-analysis-search],input[data-picker-search])::placeholder {
    color: #999999 !important;
    opacity: 1;
  }
}
/* The variables inherit through labels/counts inside each choice. */
:is(.library-filters,.library-filter-bar,.library-subbase-filters) button:not(.is-active):not([aria-current="true"]),
:is(#sb-bases,.sb-master-list) button[aria-pressed="false"],
.category-chip:not(.is-active),
#analysis-workspace :is(button[aria-pressed="false"],button[aria-checked="false"],button[role="radio"][aria-checked="false"],button[data-analysis-method]:not([aria-current="true"]),button[data-analysis-scope]:not([aria-current="true"])) {
  --product-text-color: #999999;
}
:is(.library-filters,.library-filter-bar,.library-subbase-filters) button:is(.is-active,[aria-current="true"]),
:is(#sb-bases,.sb-master-list) button[aria-pressed="true"],
.category-chip.is-active,
#analysis-workspace :is(button[aria-pressed="true"],button[aria-checked="true"],button[aria-current="true"]) {
  --product-text-color: #292929;
}
/* Values retain their real zero/missing/unused semantics. */
body[data-genre] :is(.subrecipe-item,.subrecipe-detail).is-unused,
body[data-genre] .metric-data-item:is(.is-zero,.is-missing),
body[data-genre] .metric-data-item:is(.is-zero,.is-missing):is(:focus-within,[open]) { opacity:1 !important; }
body[data-genre] tr.is-unused .component-value,
body[data-genre] .subrecipe-detail.is-unused,
body[data-genre] .subrecipe-item.is-unused,
body[data-genre] .metric-data-item:is(.is-zero,.is-missing) .metric-data-values {
  --product-text-color:#b3b3b3;
}
/* Preserve the previous dimmed non-text decorations, without fading the text twice. */
body[data-genre] :is(.subrecipe-item,.subrecipe-detail).is-unused { border-color:#b3b3b3 !important; }
body[data-genre] .subrecipe-detail.is-unused :is(header,table,thead,tbody,tfoot,th,td,.subrecipe-seven,.subrecipe-seven span) { border-color:#b3b3b3 !important; }
body[data-genre] .subrecipe-detail.is-unused .subrecipe-seven > span { --component-color:#b3b3b3 !important; border-top-color:#b3b3b3 !important; }
body[data-genre] .metric-data-item.is-zero { --text-decoration-opacity:.26; }
body[data-genre] .metric-data-item.is-missing { --text-decoration-opacity:.28; }
body[data-genre] .metric-data-item.is-zero:is([open],:focus-within) { --text-decoration-opacity:.72; }
body[data-genre] .metric-data-item:is(.is-zero,.is-missing) .metric-info-button { border-color:rgb(216 212 205 / var(--text-decoration-opacity)); }
body[data-genre] .metric-data-item:is(.is-zero,.is-missing) .metric-info-context { background:rgb(250 248 244 / var(--text-decoration-opacity)) !important; border-left-color:color-mix(in srgb,var(--base-accent-soft) calc(var(--text-decoration-opacity)*100%),transparent) !important; }
/* Approved dark-surface exception; active light-background chips are not inverse. */
:is(.button-primary,.pl-shell-ready .button.button-primary,.context-form-actions .is-primary,.validation-review-actions .is-primary,.home-actions a.primary,#recovery-execute,.pl-onboarding footer a),
:is(.subbase-management,.subbase-create-form) button.is-primary,
.new-recipe-guide li.is-current b,
:is(.pl-undo-toast,.pl-recovery-banner),
body:not(.pl-shell-ready) .analysis-scope-summary > button,
body:has(#import-review-app) .primary {
  --product-text-color:#ffffff;
}

/* Owner 2026-11-02 follow-up: choice state, paper labels and local emphasis. */
#analysis-workspace label:has(> input:is([type="checkbox"],[type="radio"]):not(:checked)) { --product-text-color:#999999; }
#analysis-workspace label:has(> input:is([type="checkbox"],[type="radio"]):checked) { --product-text-color:#292929; }
.material-overview [data-material-review] { --product-text-color:#999999; }
.material-overview [data-material-review="active"] { --product-text-color:#292929; }
body:has(.context-rail[aria-hidden="false"] [data-material-review-kind]:not([data-material-review-kind="active"])) .material-overview [data-material-review="active"] { --product-text-color:#999999; }
body:has(.context-rail[aria-hidden="false"] [data-material-review-kind="active"]) .material-overview [data-material-review="active"] { --product-text-color:#292929; }
body:has(.context-rail[aria-hidden="false"] [data-material-review-kind="archived"]) .material-overview [data-material-review="archived"] { --product-text-color:#292929; }
body:has(.context-rail[aria-hidden="false"] [data-material-review-kind="coefficients"]) .material-overview [data-material-review="coefficients"] { --product-text-color:#292929; }
body:has(.context-rail[aria-hidden="false"] [data-material-review-kind="price"]) .material-overview [data-material-review="price"] { --product-text-color:#292929; }

@layer input-contract {
 body #history-app :is(.library-filters,.library-subbase-filters) :is(button,a,b,small,span),
 body #subbases-app :is(.sb-tabs,.sb-subbase-row) :is(button,b,small,span) { font-size:var(--font-caption) !important; }
}
body[data-genre] .recipe-book-column h3 { --product-text-color:#999999; }
body[data-genre] .recipe-book-column h3 .paper-subrecipe-usage { --product-text-color:#292929; }
body[data-genre="cake"] .paper-part > header h3 { --product-text-color:#999999; }

@media(max-width:699px) {
 @layer input-contract {
  body #subbases-app :is(.sb-tabs,.sb-subbase-row) :is(button,b,small,span) { font-size:var(--font-caption) !important; }
 }
}

/* Owner 2026-11-02: analysis step labels share the established analysis blue. */
#analysis-workspace :is(.analysis-step-compact > h3,.analysis-result-title h3) { --product-text-color:#3979ae; }
@layer paper-type {
 #analysis-workspace :is(.analysis-step-compact > h3,.analysis-result-title h3) { font-size:var(--font-body) !important; }
}

body #materials-app .topbar h1,
body #subbases-app .sb-heading h1 { font-size:var(--font-section-title); }
body #subbases-app .sb-recipe-select > small[data-assigned="false"] { --product-text-color:#999999; }

/* Owner 2026-11-07: match the corresponding material database text roles. */
body #subbases-app .sb-recipe-select > span { font-size:var(--font-secondary); }
body #subbases-app #sb-recipe-search { font-size:var(--font-caption); }
body #subbases-app #sb-count { font-size:var(--font-caption); }
@media(max-width:699px) {
 body #subbases-app .sb-recipe-select > span { font-size:var(--font-body); }
 body #subbases-app #sb-recipe-search { font-size:var(--font-body); }
 body #subbases-app #sb-count { font-size:var(--font-body); }
 body #subbases-app #sb-toggle-selection { font-size:var(--font-caption); }
}

body[data-genre="ice"] [data-graph-target="ICE-09"] #guide-mode { font-size:var(--font-caption); }
body[data-genre="ice"] [data-graph-target="ICE-09"] [data-ice-guide-mode][aria-pressed="false"] { --product-text-color:#999999; }
body[data-genre="ice"] [data-graph-target="ICE-09"] [data-ice-guide-mode][aria-pressed="true"] { --product-text-color:#292929; }
