/* Personal workspaces: firm interface text, with the existing paper headings,
   desktop figures and handwritten mark kept in their own type roles. */
:root [data-public-surface="account"] { --ny-text: #f8fbfc; --ny-muted: #d5e2e7; }
:root[data-theme="light"] [data-public-surface="account"] { --ny-text: #2b5868; --ny-muted: #466370; }
:root .workspace-page { --desk-ink: var(--ny-text); --desk-muted: var(--ny-muted); }
:root [data-settings-page].settings-page,
:root :is(.shelves-workspace, .shelves-form-panel, .reading-history.shell),
:root .rewards-shell:not(.hx-management-module) {
  font-family: var(--nylon-type-ui);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.75;
  color: var(--ny-text);
}

:root [data-personal-workspace] .personal-workspace-nav a {
  font-family: var(--nylon-type-ui);
  font-weight: 600;
}
:root [data-personal-workspace] .personal-workspace-nav a[aria-current=page] {
  font-weight: 700;
}

/* Account labels contain arbitrary names. Only the chapter titles keep the
   account folio's serif; fields and the live identity preview use the UI face. */
:root [data-settings-page] :is(.settings-nav-heading h1,
  .settings-section-heading h2, .tier-current h3) {
  font-family: var(--nylon-type-paper);
  font-weight: 700;
  color: var(--ny-text);
}
:root [data-settings-page] :is(.settings-identity-copy strong,
  .settings-public-preview > strong, .settings-related h3,
  .settings-detail-row h3, .settings-leave-dialog h2, .tier-step strong) {
  font-family: var(--nylon-type-ui);
  font-weight: 650;
  color: var(--ny-text);
}
:root [data-settings-page] .settings-nav nav a {
  font-family: var(--nylon-type-ui);
  font-weight: 600;
  color: var(--ny-text);
}
:root [data-settings-page] .settings-nav nav a[aria-current=page] { font-weight: 700; }
:root [data-settings-page] :is(.settings-field > label, .settings-toggle,
  .settings-export label, .settings-recovery dt) {
  font-family: var(--nylon-type-ui);
  font-size: 15px;
  font-weight: 600;
  color: var(--ny-text);
}
:root [data-settings-page] :is(.settings-field input:not([type=checkbox]):not([type=radio]):not([type=hidden]),
  .settings-field textarea, .settings-field select, .settings-section-picker select,
  .settings-export input),
:root [data-settings-page] .settings-field .ny-select > button.ny-select-trigger {
  font-family: var(--nylon-type-ui);
  font-size: 16px;
  font-weight: 500;
}
:root [data-settings-page] :is(button, .primary-button, .secondary-button,
  .settings-related a, .settings-related-links a, .settings-detail-row > a,
  .settings-shortcuts a, .settings-avatar-link, .settings-save > a) {
  font-family: var(--nylon-type-ui);
  font-weight: 600;
}
:root [data-settings-page] :is(.settings-nav nav small, .settings-role,
  .settings-email, .settings-badge, .settings-signout-link,
  .settings-public-preview > small, .settings-field .field-help,
  .settings-save [role=status], .settings-note, .settings-profile-visibility,
  .settings-recovery, .tier-step p, .tier-next) {
  font-size: 13px;
  font-weight: 500;
}
:root [data-settings-page] :is(.settings-nav nav small, .settings-role,
  .settings-email, .settings-public-preview > small, .settings-field .field-help,
  .settings-preview-signature, .settings-preview-bio, .settings-note,
  .settings-related p, .settings-detail-row p, .settings-section-heading > p,
  .tier-step p, .tier-summary, .tier-can-list li) {
  color: var(--ny-muted);
  font-weight: 500;
}
:root [data-settings-page] :is(.settings-section-heading > p:not(.settings-kicker),
  .settings-preview-signature, .settings-preview-bio, .settings-related p,
  .settings-detail-row p, .tier-summary, .tier-can-list li) { font-size: 15px; }
:root [data-settings-page] .settings-profile-visibility { font-size: 13px; }
:root [data-settings-page] :is(.settings-kicker, .settings-nav nav i, .tier-step i) {
  font-size: 13px;
  color: var(--ny-muted);
}
:root [data-settings-page] .settings-identity .settings-signout-link {
  font-weight: 600;
  color: var(--ny-link);
}

/* The collection ledger: names stand out; counts, dates and saved positions
   remain readable without competing with the one opening action. */
:root .shelves-workspace .shelves-heading h1,
:root .shelves-form-panel h1,
:root .reading-history .reading-history-intro h1 {
  font-family: var(--nylon-type-ui);
  font-weight: 700;
  color: var(--ny-text);
}
:root .shelves-workspace :is(.shelves-folder-main h3, .shelves-entry h3,
  .shelves-result-heading h2, .shelves-empty h2, .shelves-empty h3,
  .shelves-pick-row h3),
:root .shelves-form-panel .shelves-form-target strong,
:root .reading-history :is(.reading-history-list-heading h2,
  .reading-history-copy h3, .reading-history-empty h3) {
  font-family: var(--nylon-type-ui);
  font-weight: 650;
  color: var(--ny-text);
}
:root .reading-history .reading-history-copy h3 { font-size: 19px; }
:root .shelves-workspace .shelves-entry.is-unavailable h3 { color: var(--ny-muted); }
/* Beat interface.css's (0,4,2) font shorthand with the same typed exclusions:
   this module rule is (0,5,1), including native selects and textareas. */
:root :is(.shelves-workspace, .shelves-form-panel, .reading-history)
  :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]), select, textarea),
:root :is(.shelves-workspace, .shelves-form-panel, .reading-history)
  .ny-select > button.ny-select-trigger[aria-expanded] {
  font-family: var(--nylon-type-ui);
  font-size: 16px;
  font-weight: 500;
}
:root :is(.shelves-workspace, .shelves-form-panel, .reading-history)
  :is(input, textarea)::placeholder {
  color: var(--ny-muted);
  opacity: 1;
}
:root .shelves-workspace :is(.shelves-search > label, .shelves-search-main > label,
  .shelves-refinement-fields > label),
:root .shelves-form-panel .shelves-field > label,
:root .reading-history .reading-history-search label {
  font-weight: 600;
  color: var(--ny-text);
}
:root :is(.shelves-workspace, .shelves-form-panel) :is(button,
  .shelves-primary, .shelves-secondary, .shelves-danger, .shelves-parent,
  .shelves-entry-actions a, .shelves-folder-row > div > a,
  .shelves-form-actions > a, .shelves-maintenance a),
:root .reading-history :is(.reading-history-search button,
  .reading-history-actions button, .reading-history-actions a,
  .reading-history-find, .reading-history-list-footer nav a) {
  font-family: var(--nylon-type-ui);
  font-weight: 600;
}
:root .shelves-workspace :is(.shelves-folder-label > span, .shelves-folder-row time,
  .shelves-entry-kind, .shelves-entry-position, .shelves-entry-main > p,
  .shelves-footnote, .shelves-result-heading > span, .shelves-context,
  .shelves-pagination, .study-pagination),
:root .shelves-form-panel :is(.shelves-form-target span, .field-help),
:root .reading-history :is(.reading-history-course, .reading-history-course a,
  .reading-history-meta, .reading-history-hint, .reading-history-state,
  .reading-history-list-heading h2 > span, .reading-history-list-footer,
  .reading-history-copy h3 a > .reading-history-open-label) {
  font-family: var(--nylon-type-ui);
  font-size: 13px;
  font-weight: 500;
}
:root .shelves-workspace :is(.shelves-heading p, .shelves-empty p),
:root .shelves-form-panel header > p,
:root .reading-history :is(.reading-history-intro p, .reading-history-empty p) {
  font-size: 15px;
  font-weight: 500;
  color: var(--ny-muted);
}
:root .reading-history .reading-history-position { font-weight: 600; }
:root .reading-history .reading-history-copy h3 a > .reading-history-open-label {
  font-weight: 600;
  color: var(--ny-link);
}

/* Personal rewards stay a folio, rather than becoming another management
   table. The motto and engraved headings retain their literary family. */
:root .rewards-shell:not(.hx-management-module) :is(.reward-heading h1,
  .reward-heading h2, .achievement h2) { font-weight: 700; }
:root .rewards-shell:not(.hx-management-module) :is(.reward-ticket-label strong,
  .reward-empty strong, .reward-opportunities strong) { font-weight: 650; }
:root .rewards-shell:not(.hx-management-module) :is(.reward-heading p,
  .reward-ticket p, .reward-empty p, .reward-opportunities p, .achievement p) {
  font-family: var(--nylon-type-ui);
  font-size: 16px;
  font-weight: 500;
}
:root .rewards-shell:not(.hx-management-module) .achievement-heading .achievement-motto {
  font-family: var(--nylon-type-reading);
  font-size: 18px;
  font-weight: 500;
}
:root .rewards-shell:not(.hx-management-module) :is(.reward-nav a,
  .reward-button, .reward-code button, .reward-link, .achievement-tabs button) {
  font-family: var(--nylon-type-ui);
  font-weight: 600;
}
:root .rewards-shell:not(.hx-management-module) .achievement-tools
  :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]), select, textarea),
:root .rewards-shell:not(.hx-management-module) .achievement-tools
  .ny-select > button.ny-select-trigger {
  font-family: var(--nylon-type-ui);
  font-size: 16px;
  font-weight: 500;
}
:root .rewards-shell:not(.hx-management-module) :is(.reward-state,
  .reward-ticket footer, .reward-opportunities .muted, .reward-refresh span,
  .reward-use-note, .achievement-category, .achievement small,
  .achievement-progress, .achievement .reward-ticket-label > span) {
  font-size: 13px;
  font-weight: 500;
}
/* The existing wallet note declares its size important. It is essential usage
   information, so lift that single declaration while retaining its meaning. */
:root .rewards-shell:not(.hx-management-module) .reward-use-note { font-size: 13px !important; }

/* Desktop: keep the landscape and expressive display roles. Its compact
   functional text previously fell to 9–12px and several font shorthands reset
   it to regular. These are application labels, not decorative captions. */
:root .workspace-page {
  font-family: var(--nylon-type-ui);
  font-size: 16px;
  font-weight: 500;
}
:root .workspace-page :is(.desktop-header nav a, .desktop-header nav button,
  .annual-window-bar > div:first-child, .desktop-tabs button,
  .workspace-filters button, .workspace-start button, .workspace-next header button,
  .desktop-primary-button, .workspace-secondary, .workspace-text-button,
  .desktop-text-button, .workspace-course-form button, .workspace-todo-add button,
  .desktop-year-toggle, .desktop-year-native button, .window-bottom-link a) {
  font-family: var(--nylon-type-ui);
  font-size: 14px;
  font-weight: 600;
}
:root .workspace-page .desktop-header nav :is(a, button) { font-size: 13px; }
/* The greeting is a paper title, not the system Songti fallback. Scope its
   paired ink here so the coast's inherited theme color cannot override it;
   the landscape, clock and other display figures keep their own roles. */
:root .workspace-page .desktop-intro h1,
:root .workspace-page .desktop-greeting h1 {
  --desk-ink: var(--ny-text);
  font-family: var(--nylon-type-reading);
  font-weight: 700;
  color: var(--desk-ink);
}
:root .workspace-page :is(.desktop-greeting h1, .workspace-today h2,
  .annual-window-content h2, .desktop-library-heading h2) {
  font-weight: 700;
  color: var(--desk-ink, var(--ny-text));
}
:root .workspace-page :is(.workspace-search input, .desktop-app-search input,
  .workspace-course-form input, .workspace-todo-add input, #focus-task,
  .desktop-year-native select),
:root .workspace-page main textarea.desktop-scratch {
  font-family: var(--nylon-type-ui);
  font-size: 16px;
  font-weight: 500;
}
:root .workspace-page :is(.desktop-greeting > p, .workspace-empty,
  .workspace-list li, .workspace-todos label, .workspace-agenda h3,
  .desktop-course-row h3, .desktop-note-row h3, .desktop-timeline h3) {
  font-family: var(--nylon-type-ui);
  font-size: 15px;
  font-weight: 500;
}
:root .workspace-page :is(.workspace-list li > div > a, .workspace-next-event strong,
  .workspace-agenda h3, .desktop-course-row h3, .desktop-note-row h3,
  .desktop-timeline h3, .desktop-overview-item strong) { font-weight: 600; }
:root .workspace-page :is(.desktop-greeting small, .workspace-today > p,
  .workspace-overview :is(button, a), .workspace-next h3, .workspace-next-event,
  .workspace-next-event small, .workspace-start small, .workspace-start button > span:last-child,
  .workspace-list small, .workspace-list li > a:last-child, .workspace-local-note,
  .workspace-note-status, .workspace-timer-status, .workspace-item-tag,
  .workspace-agenda :is(small, p), .desktop-course-row p, .desktop-note-row p,
  .desktop-record-summary, .desktop-record-explanation, .desktop-data-notes,
  .desktop-year-form > label, .desktop-year-status, .window-date,
  .desktop-library-heading p, .desktop-overview-item > span:last-child,
  .desktop-window-overview > footer span, .desktop-task-title, .dock-tooltip,
  .desktop-preview-note, .desktop-launcher > span:last-child,
  .desktop-library .desktop-launcher small, .workspace-small-link) {
  font-family: var(--nylon-type-ui);
  font-size: 13px;
  font-weight: 500;
}
:root .workspace-page .desktop-library .desktop-launcher > span:last-child {
  font-weight: 600;
}
:root .workspace-page .desktop-library .desktop-launcher small { font-weight: 500; }
:root .workspace-page .workspace-small-link { font-size: 13px; }
:root .workspace-page :is(.desktop-header nav a, .desktop-header nav button,
  .annual-window-bar > div:first-child, .desktop-tabs button,
  .workspace-filters button, .workspace-next h3, .workspace-next-event strong,
  .workspace-list li > div > a, .workspace-todos label,
  .workspace-agenda h3, .desktop-course-row h3, .desktop-note-row h3,
  .desktop-timeline h3, .desktop-note-label, .workspace-focus-window label,
  .desktop-library .desktop-launcher, .desktop-overview-item strong) {
  color: var(--desk-ink, var(--ny-text));
}
:root .workspace-page :is(.desktop-greeting small, .workspace-today > p,
  .workspace-next-event small, .workspace-start button > span:last-child,
  .workspace-list small, .workspace-local-note, .workspace-timer-status,
  .workspace-agenda :is(small, p), .desktop-course-row p, .desktop-note-row p,
  .desktop-record-explanation, .desktop-data-notes, .desktop-library-heading p,
  .desktop-overview-item > span:last-child, .desktop-window-overview > footer span,
  .desktop-library .desktop-launcher small, .desktop-preview-note) {
  color: var(--desk-muted, var(--ny-muted));
}
:root .workspace-page .desktop-tabs button[aria-selected=true],
:root .workspace-page .workspace-filters button[aria-pressed=true] {
  font-weight: 700;
  color: var(--desk-accent, var(--ny-accent));
}
:root .workspace-page .desktop-data-notes table {
  font-family: var(--nylon-type-ui);
  font-size: 13px;
  font-weight: 500;
}
:root .workspace-page .desktop-data-notes th { font-weight: 600; }
:root .workspace-page :is(.workspace-focus-window label, .desktop-note-label) {
  font-family: var(--nylon-type-ui);
  font-size: 15px;
  font-weight: 600;
}
/* A stronger timer still uses the original monospace family and tabular
   figures. Neither the handwritten mark nor the display figures are restyled. */
:root .workspace-page :is(.workspace-clock, .workspace-timer) {
  font-weight: 500;
  color: var(--desk-ink, var(--ny-text));
}

@media (max-width: 700px) {
  :root .reading-history .reading-history-copy h3 { font-size: 18px; }
}
@media (forced-colors: active) {
  :root [data-public-surface="account"] { --ny-text: CanvasText; --ny-muted: CanvasText; }
  :root .workspace-page { --desk-ink: CanvasText; --desk-muted: CanvasText; }
}
