/* Local presentation only. Action Center retains its own tokens and geometry. */
html[data-theme="dark"] :is(.message-stream, .composer-shell, .thread-list, .profile-toolbar, .profile-menu, .thread-topbar, .live-strip,
  .thread-action-sheet, .thread-confirm-sheet, .settings-page, .runtime-policy-page) {
  --text-secondary: #dce1de;
  --muted: #afb9b3;
  --faint: #9da8a1;
}

.thread-list :is(.row-meta, .row-meta time, .row-title em, .thread-group-label, .workspace-picker small,
  .workspace-menu small, .thread-tools-menu small),
.profile-toolbar :is(small, .profile-summary small),
.thread-detail :is(.message-meta, .conversation-marker, .native-card-summary-head small,
  .native-card-summary-head em, .native-card-summary-tags > span, .native-direction-source pre),
.composer-shell :is(.composer textarea::placeholder, .composer-attachment small, .composer-note[data-error="true"]),
.runtime-policy-page :is(small, .runtime-policy-field, .runtime-policy-page-header p,
  .runtime-policy-inspector dt, .runtime-policy-inspector dd, .runtime-policy-fast-state, .runtime-policy-issue) {
  font-size: var(--font-size-secondary);
}
.thread-detail .native-card-summary-head strong { font-size: var(--font-size-base); }
.thread-list .thread-row:not(.native-thread-row) .row-meta > span { white-space: normal; overflow-wrap: anywhere; }
.thread-list .row-meta { align-items: start; }
.thread-list .row-meta time { flex-shrink: 0; }
.thread-list .row-title { flex-wrap: wrap; }
.thread-action-panel { background: var(--surface-raised); }
.thread-action-cancel { border-top: 1px solid var(--line) !important; }
/* The panel's divider colour must not show through a fixed item or the cancel gap. */
.thread-action-panel > button:disabled { color: var(--muted); cursor: default; opacity: 1; }
.thread-action-cancel { box-shadow: 0 -8px 0 var(--surface-raised); }

.runtime-policy-tabs { grid-template-columns: minmax(0, 1fr); }
.runtime-policy-page-header h1 { font-size: var(--font-size-title); }
.runtime-provider-role { min-width: 0; border-bottom: 1px solid var(--line-soft); }
.runtime-provider-role > summary {
  display: flex; min-height: 44px; align-items: center; flex-wrap: wrap; gap: 4px 12px;
  cursor: pointer; color: var(--text); font-weight: 600; padding: 8px 0;
}
.runtime-provider-role > summary::before { content: '›'; color: var(--mint); }
.runtime-provider-role[open] > summary::before { content: '⌄'; }
.runtime-provider-role > summary small { flex: 1 1 180px; color: var(--muted); font-weight: 400; overflow-wrap: anywhere; }
.runtime-policy-page :is(select, input) { font: inherit; accent-color: var(--mint); }
.runtime-policy-page :is(select, input[type="number"], input[type="text"]) {
  min-width: 0; max-width: 100%; min-height: 44px; padding: 8px;
  color: var(--text-secondary); background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
}
.runtime-policy-page button { font: inherit; }
.runtime-policy-page :is(input, select, summary):focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; }
.runtime-policy-navigation button:disabled, .runtime-policy-tabs button:disabled { cursor: not-allowed; opacity: .5; }
.runtime-policy-page .runtime-policy-actions { background: var(--bg); flex-wrap: wrap; }
.runtime-policy-page .runtime-policy-actions [data-provider-save] { color: var(--mint-ink); background: var(--mint); border-color: var(--mint); }
.runtime-policy-page .runtime-policy-actions p { flex-basis: 100%; margin: 0; }
.runtime-policy-page .runtime-policy-actions p:empty { display: none; }
.settings-page-scroll > .settings-child-section { margin-bottom: 28px; }
.settings-page-scroll h2 { scroll-margin-top: 12px; }

.runtime-policy-page .runtime-provider-status { flex-basis: 100%; }
.runtime-policy-page :is(.runtime-provider-status, .runtime-policy-issue) pre { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; }

/* Controls grow with the chosen font size. */
.composer-icon-control svg,
.composer-open-control svg { width: calc(17px * var(--font-scale)); height: calc(17px * var(--font-scale)); }
.composer-icon-control,
.composer-open-control { min-width: max(44px, calc(36px * var(--font-scale))); min-height: max(44px, calc(36px * var(--font-scale))); }

/* Pointer and touch focus keep no ring; keyboard focus keeps :focus-visible. */
html[data-input-modality="pointer"] :focus-visible { outline: none !important; }

/* Process notes stay distinct from the final reply without a floating indent. */
.native-receipt-commentary {
  width: 100%;
  margin-inline-start: 0;
  padding-inline-start: 12px;
  border-inline-start: 2px solid var(--line);
}
