/* PeakLedger v1.55.0 · typography harmonization.
   Load last on every application page. The earlier stylesheets intentionally
   remain intact; this layer adjusts only weight, readability, and text shadow.
   Important figures stay emphasized, while supporting copy stays quiet. */

/* Common supporting-page type scale */
body.peakledger-unified .title-row h1,
body.peakledger-unified .settings-topbar h1,
body.peakledger-unified .data-topbar h1 {
    font-weight: 610 !important;
    letter-spacing: -.035em !important;
    text-shadow: none !important;
}
body.peakledger-unified h2,
body.peakledger-unified h3 {
    font-weight: 580 !important;
    letter-spacing: -.018em !important;
}
body.peakledger-unified .title-row p,
body.peakledger-unified .settings-topbar p,
body.peakledger-unified .data-topbar p {
    font-weight: 400 !important;
    line-height: 1.45 !important;
}
body.peakledger-unified .sidebar .brand strong,
body.peakledger-unified .sidebar .nav,
body.peakledger-unified .sidebar .nav a,
body.peakledger-unified .sidebar .connection-heading strong,
body.peakledger-unified .sidebar .logout {
    font-weight: 530 !important;
}
body.peakledger-unified .sidebar .nav a.active,
body.peakledger-unified .sidebar .nav.active,
body.peakledger-unified .page-scopebar > a.active,
body.peakledger-unified .page-entitybar > a.active {
    font-weight: 610 !important;
}
body.peakledger-unified .back-dashboard,
body.peakledger-unified .page-scopebar>a,
body.peakledger-unified .page-entitybar>a,
body.peakledger-unified .account-view-tabs button {
    font-weight: 510 !important;
}
body.peakledger-unified .page-scopebar > span,
body.peakledger-unified .page-entitybar > span,
body.peakledger-unified .settings-eyebrow {
    font-size: 10px !important;
    font-weight: 570 !important;
    letter-spacing: .065em !important;
}
body.peakledger-unified .scope-tag,
body.peakledger-unified .account-group-head > div > span {
    font-weight: 540 !important;
}

/* Accounts: keep balances prominent but let names and metadata breathe */
body.peakledger-unified .data-summary-card > span,
body.peakledger-unified .account-view-toolbar > span,
body.peakledger-unified .account-group-head > div > span {
    font-weight: 540 !important;
    letter-spacing: .045em !important;
}
body.peakledger-unified .data-summary-card > strong,
body.peakledger-unified .account-detail-balance strong,
body.peakledger-unified .account-detail-balance b,
body.peakledger-unified .account-detail-balance .balance {
    font-weight: 670 !important;
    text-shadow: none !important;
    font-variant-numeric: tabular-nums;
}
body.peakledger-unified .account-group-head h2 {font-weight: 600 !important;}
body.peakledger-unified .account-detail-main strong,
body.peakledger-unified .account-entity-field strong,
body.peakledger-unified .account-detail-row strong {font-weight: 560 !important;}
body.peakledger-unified .account-group-head p,
body.peakledger-unified .account-detail-main small,
body.peakledger-unified .account-purpose-note,
body.peakledger-unified .account-source-sync {font-weight: 400 !important;}

/* Activity: readable ledger names, restrained table header, clear signed amounts */
body.peakledger-unified .activity-summary span,
body.peakledger-unified .activity-table-head,
body.peakledger-unified .activity-view-context>div>span {
    font-weight: 530 !important;
    letter-spacing: .045em !important;
}
body.peakledger-unified .activity-summary strong,
body.peakledger-unified .activity-amount,
body.peakledger-unified .activity-day-modal-summary strong,
body.peakledger-unified .activity-trend-tooltip strong {
    font-weight: 650 !important;
    text-shadow: none !important;
    font-variant-numeric: tabular-nums;
}
body.peakledger-unified .activity-merchant strong,
body.peakledger-unified .activity-day-modal-row strong {font-weight: 540 !important;}
body.peakledger-unified .activity-account,
body.peakledger-unified .activity-category,
body.peakledger-unified .activity-date,
body.peakledger-unified .activity-merchant small,
body.peakledger-unified .activity-ledger-note {font-weight: 400 !important;}
body.peakledger-unified .activity-filters label,
body.peakledger-unified .activity-filters button,
body.peakledger-unified .activity-clear,
body.peakledger-unified .activity-trend-tools button {font-weight: 520 !important;}
body.peakledger-unified .activity-trend h2 {font-weight: 590 !important;}

/* Connections: dense organizer should use clear regular labels, not bold everywhere */
body.peakledger-unified.peakledger-manager .manager-hero h2,
body.peakledger-unified.peakledger-manager .manager-section-head h2,
body.peakledger-unified.peakledger-manager .source-card-head h3,
body.peakledger-unified.peakledger-manager .source-copy strong {
    font-weight: 590 !important;
}
body.peakledger-unified.peakledger-manager .manager-metric strong,
body.peakledger-unified.peakledger-manager .managed-account-balance strong,
body.peakledger-unified.peakledger-manager .import-account-balance strong {
    font-weight: 660 !important;
    text-shadow: none !important;
    font-variant-numeric: tabular-nums;
}
body.peakledger-unified.peakledger-manager .manager-metric span,
body.peakledger-unified.peakledger-manager .manager-ledger-health-title,
body.peakledger-unified.peakledger-manager .manager-filterbar,
body.peakledger-unified.peakledger-manager .manager-badge,
body.peakledger-unified.peakledger-manager .source-facts,
body.peakledger-unified.peakledger-manager .managed-field label,
body.peakledger-unified.peakledger-manager .entity-field label {
    font-weight: 510 !important;
}
body.peakledger-unified.peakledger-manager .managed-account-title,
body.peakledger-unified.peakledger-manager .managed-account-primary strong,
body.peakledger-unified.peakledger-manager .source-name-line strong {font-weight: 560 !important;}
body.peakledger-unified.peakledger-manager .manager-button,
body.peakledger-unified.peakledger-manager .source-actions button,
body.peakledger-unified.peakledger-manager .manager-savebar button {font-weight: 560 !important;}

/* Spending & Bills: numbers guide the eye; forms and obligations stay calm */
body.pl-planning-page .pl-plan-eyebrow {font-size: 10px !important;font-weight: 570 !important;letter-spacing: .065em !important;}
body.pl-planning-page .pl-plan-lead h2,
body.pl-planning-page .pl-plan-section>header h2,
body.pl-planning-page .pl-bill-item-head h3,
body.pl-planning-page .pl-category-dialog h2 {font-weight: 590 !important;}
body.pl-planning-page .pl-plan-total strong,
body.pl-planning-page .pl-plan-stats strong,
body.pl-planning-page .pl-plan-section>header>strong,
body.pl-planning-page .pl-bill-amount strong,
body.pl-planning-page .pl-checklist-counts strong {
    font-weight: 660 !important;
    text-shadow: none !important;
    font-variant-numeric: tabular-nums;
}
body.pl-planning-page .pl-plan-entry strong,
body.pl-planning-page .pl-edit-spend strong,
body.pl-planning-page .pl-bill-attention a strong,
body.pl-planning-page .pl-checklist-main a,
body.pl-planning-page .pl-category-merchant,
body.pl-planning-page .pl-bill-months strong,
body.pl-planning-page .pl-bill-history>summary {font-weight: 540 !important;}
body.pl-planning-page .pl-month-state,
body.pl-planning-page .pl-plan-primary,
body.pl-planning-page .pl-bill-create>summary,
body.pl-planning-page .pl-bill-archive>summary,
body.pl-planning-page .pl-category-dialog footer button {font-weight: 570 !important;}
body.pl-planning-page .pl-bill-form label,
body.pl-planning-page .pl-bill-inline label,
body.pl-planning-page .pl-plan-stats span,
body.pl-planning-page .pl-plan-section>header p,
body.pl-planning-page .pl-checklist-main small,
body.pl-planning-page .pl-plan-entry small,
body.pl-planning-page .pl-plan-disclaimer {font-weight: 400 !important;}
body.pl-planning-page .pl-plan-disclaimer strong {font-weight: 570 !important;}

/* Data Health: distinguish diagnostics from measures */
body.pl-health .pl-kicker {font-size: 10px !important;font-weight: 550 !important;letter-spacing: .07em !important;}
body.pl-health .pl-health-intro h2,
body.pl-health .pl-health-section h2 {font-weight: 590 !important;}
body.pl-health .pl-health-stats span,
body.pl-health .pl-health-table th,
body.pl-health .pl-history-confidence-grid small {font-weight: 530 !important;letter-spacing: .045em !important;}
body.pl-health .pl-health-stats strong,
body.pl-health .pl-history-confidence-grid strong,
body.pl-health .pl-bridge-row>b,
body.pl-health .pl-health-bottom-line>strong {font-weight: 660 !important;font-variant-numeric: tabular-nums;}
body.pl-health .pl-bridge-row>div strong,
body.pl-health .pl-category-row strong,
body.pl-health .pl-saved-rule strong,
body.pl-health .pl-health-table td strong,
body.pl-health .pl-health-bottom-line>span:first-child {font-weight: 550 !important;}
body.pl-health .pl-category-row button,
body.pl-health .pl-category-undo button,
body.pl-health .pl-date-status,
body.pl-health .pl-health-intro a,
body.pl-health .pl-health-section>header>a {font-weight: 540 !important;}

/* Updates: installer instructions should read like prose, not a headline */
body.update-page .update-hero h2,
body.update-page .update-review h2,
body.update-page .update-upload h2,
body.update-page .update-history h3,
body.update-page .update-security h3 {font-weight: 580 !important;}
body.update-page .update-status strong,
body.update-page .update-review strong,
body.update-page .update-facts strong {font-weight: 560 !important;}
body.update-page .zip-drop strong,
body.update-page .verify-update-button,
body.update-page .update-actions button {font-weight: 560 !important;}
body.update-page .update-hero p,
body.update-page .update-review p,
body.update-page .update-security p,
body.update-page .update-history small,
body.update-page .update-file-list {font-weight: 400 !important;}

/* Overview has different markup and its own visual hierarchy. */
body.wm2 .wm2-title h1 {font-weight: 610 !important;letter-spacing: -.035em !important;text-shadow: none !important;}
body.wm2 .wm2-title-subline p {font-weight: 400 !important;}
body.wm2 .wm2-brand strong,
body.wm2 .wm2-nav a,
body.wm2 .wm2-security strong,
body.wm2 .wm2-profile strong {font-weight: 540 !important;}
body.wm2 .wm2-nav a.is-active,
body.wm2 .wm2-header-scope a.selected {font-weight: 610 !important;}
body.wm2 .wm2-eyebrow,
body.wm2 .wm2-history-method strong,
body.wm2 .wm2-section-title .wm2-count {font-weight: 560 !important;}
body.wm2 .wm2-networth {font-weight: 630 !important;text-shadow: none !important;}
body.wm2 .wm2-change strong {font-weight: 590 !important;}
body.wm2 .wm2-hero-values strong,
body.wm2 .wm2-summary-copy strong,
body.wm2 .wm2-pulse-headline>strong,
body.wm2 .wm2-account-amount>strong,
body.wm2 .wm2-cash-stat strong,
body.wm2 .wm2-cash-modal-summary strong,
body.wm2 .wm2-quick-modal-metrics strong {
    font-weight: 670 !important;
    text-shadow: none !important;
    font-variant-numeric: tabular-nums;
}
body.wm2 .wm2-hero-values span,
body.wm2 .wm2-summary-copy small,
body.wm2 .wm2-cash-stat small,
body.wm2 .wm2-pulse-headline>span,
body.wm2 .wm2-pulse-bar>span {font-weight: 460 !important;}
body.wm2 .wm2-section-title h2,
body.wm2 .wm2-panel header h3,
body.wm2 .pl-planning-head h2,
body.wm2 .wm2-quick-modal-header h3,
body.wm2 .wm2-cash-modal-header h3 {font-weight: 590 !important;}
body.wm2 .wm2-institution-head strong,
body.wm2 .wm2-account-name strong,
body.wm2 .wm2-row>span:nth-child(2) strong,
body.wm2 .wm2-insight-copy strong,
body.wm2 .pl-bill-preview a span {font-weight: 550 !important;}
body.wm2 .wm2-insight-copy small,
body.wm2 .wm2-insight-copy em,
body.wm2 .wm2-institution-head span,
body.wm2 .wm2-account-name small,
body.wm2 .wm2-account-amount small {font-weight: 420 !important;}
body.wm2 .wm2-insight-copy small {letter-spacing: .06em !important;}
body.wm2 .wm2-row>b,
body.wm2 .wm2-pulse-bar>strong,
body.wm2 .pl-mini-spending strong,
body.wm2 .pl-bill-alert strong {font-weight: 650 !important;text-shadow: none !important;}
body.wm2 .wm2-mini-filters button,
body.wm2 .wm2-period button,
body.wm2 .wm2-refresh,
body.wm2 .wm2-cash-ranges button,
body.wm2 .wm2-cash-zoom button {font-weight: 520 !important;}
body.wm2 .wm2-mini-filters button.selected,
body.wm2 .wm2-period button.selected,
body.wm2 .wm2-cash-ranges button.selected {font-weight: 600 !important;}
body.wm2 .wm2-quick-modal-kicker,
body.wm2 .wm2-cash-modal-kicker,
body.wm2 .pl-planning-tile>small {font-weight: 470 !important;}
body.wm2 .pl-planning-head h2 {font-weight: 590 !important;}

/* Sign-in page: familiar, non-shouty type without weakening form buttons */
body.peakledger-login .brand strong {font-weight: 600 !important;}
body.peakledger-login .login-copy h1 {font-weight: 610 !important;text-shadow:none !important;}
body.peakledger-login .login-copy .eyebrow {font-weight: 550 !important;}
body.peakledger-login .login-copy p,
body.peakledger-login .login-card label {font-weight: 400 !important;}
body.peakledger-login .login-card button[type="submit"] {font-weight: 570 !important;}

/* Small explanatory type should still be readable at real screen sizes. */
body.peakledger-unified .account-detail-main small,
body.peakledger-unified .activity-merchant small,
body.peakledger-unified .activity-account,
body.peakledger-unified .activity-category,
body.pl-health .pl-health-table td small,
body.pl-planning-page .pl-plan-entry small,
body.pl-planning-page .pl-checklist-main small,
body.wm2 .wm2-account-name small,
body.wm2 .wm2-account-amount small,
body.wm2 .wm2-insight-copy small,
body.wm2 .wm2-row>span:nth-child(2) small {font-size: max(10px, 0.625rem) !important;line-height: 1.35 !important;}

@media(max-width:760px){
    body.peakledger-unified .title-row h1,
    body.peakledger-unified .settings-topbar h1,
    body.peakledger-unified .data-topbar h1 {font-weight: 610 !important;}
    body.pl-planning-page .pl-plan-total strong,
    body.pl-planning-page .pl-plan-stats strong,
    body.wm2 .wm2-networth {letter-spacing: -.025em !important;}
}

/* The original micro-labels dipped below a comfortable desktop reading size. */
body.wm2 .wm2-pulse-note,
body.wm2 .wm2-pulse-top>span,
body.wm2 .wm2-history-method span,
body.wm2 .pl-mini-spending span,
body.wm2 .wm2-cash-stat em,
body.wm2 .wm2-refresh-status,
body.pl-health .pl-bridge-row>div small,
body.pl-health .pl-health-table th,
body.pl-planning-page .pl-plan-total small {
    font-size: 10px !important;
    line-height: 1.4 !important;
    font-weight: 440 !important;
}
body.wm2 .wm2-pulse-top>span,
body.pl-health .pl-health-table th {font-weight: 560 !important;}

/* PeakLedger v1.55.1 · readable financial-detail text.
   Scale secondary ledger content instead of reintroducing heavy bold weights.
   Keep this layer after the legacy stylesheets; scope every adjustment. */

/* Activity: the account, category, and transaction status should be legible
   alongside the merchant and amount, not treated as miniature captions. */
body.peakledger-unified .activity-table-head {
    font-size: 11px !important;
    color: #a4b8c4 !important;
    letter-spacing: .035em !important;
}
body.peakledger-unified .activity-table-row { min-height: 65px !important; }
body.peakledger-unified .activity-merchant strong {
    font-size: 14px !important;
    font-weight: 550 !important;
    line-height: 1.38 !important;
}
body.peakledger-unified .activity-merchant small {
    font-size: 11.5px !important;
    color: #a6bbc7 !important;
    line-height: 1.45 !important;
}
body.peakledger-unified .activity-account,
body.peakledger-unified .activity-category,
body.peakledger-unified .activity-date {
    font-size: 12.5px !important;
    font-weight: 420 !important;
    line-height: 1.45 !important;
    color: #b0c3ce !important;
}
body.peakledger-unified .activity-amount {
    font-size: 14px !important;
    font-weight: 640 !important;
}
body.peakledger-unified .activity-ledger-note span,
body.peakledger-unified .activity-ledger-note small,
body.peakledger-unified .activity-pagination {
    font-size: 11.5px !important;
    color: #a0b6c2 !important;
}

/* Spending: improve every transaction row, not only its small subtitle. */
body.pl-planning-page .pl-plan-entry { padding-block: 14px; }
body.pl-planning-page .pl-plan-entry strong {
    font-size: 13.5px !important;
    font-weight: 550 !important;
    line-height: 1.4 !important;
}
body.pl-planning-page .pl-plan-entry small {
    font-size: 11.5px !important;
    color: #b1c4cf !important;
    line-height: 1.45 !important;
}
body.pl-planning-page .pl-plan-entry b {
    font-size: 13.5px !important;
    font-weight: 620 !important;
}
body.pl-planning-page .pl-plan-section>header p,
body.pl-planning-page .pl-plan-stats small,
body.pl-planning-page .pl-plan-disclaimer,
body.pl-planning-page .pl-plan-more>summary,
body.pl-planning-page .pl-plan-footnote {
    font-size: 12px !important;
    line-height: 1.5 !important;
    color: #adc2cd !important;
}
body.pl-planning-page .pl-category-detail,
body.pl-planning-page .pl-category-hint { font-size: 12px !important; }

/* Data Health: the account reconciliation and merchant-cleanup data are
   working information, so don't render them as decorative micro-labels. */
body.pl-health .pl-health-section header p,
body.pl-health .pl-health-note,
body.pl-health .pl-category-count {
    font-size: 12px !important;
    line-height: 1.55 !important;
    color: #a9bfcb !important;
}
body.pl-health .pl-bridge-row>div strong { font-size: 13px !important; }
body.pl-health .pl-bridge-row>div small,
body.pl-health .pl-bridge-row>div span {
    font-size: 11.5px !important;
    color: #aac0cd !important;
    line-height: 1.45 !important;
}
body.pl-health .pl-health-table th {
    font-size: 11px !important;
    color: #a4bdca !important;
    letter-spacing: .045em !important;
}
body.pl-health .pl-health-table td { font-size: 12.5px !important; }
body.pl-health .pl-health-table td small {
    font-size: 11.5px !important;
    color: #adc2ce !important;
}
body.pl-health .pl-date-status,
body.pl-health .pl-health-table td a { font-size: 12px !important; }
body.pl-health .pl-history-confidence-grid small,
body.pl-health .pl-history-confidence-grid span { font-size: 11.5px !important; }

/* Cleanup forms: keep the merchant readable and make category controls
   large enough to operate without changing their underlying behavior. */
body.pl-health .pl-category-row {
    grid-template-columns: minmax(0,1fr) minmax(140px,170px) auto;
    grid-template-areas: 'merchant category apply' 'merchant remember remember';
    row-gap: 8px;
    padding: 12px;
}
body.pl-health .pl-category-row>div { grid-area: merchant; }
body.pl-health .pl-category-row>div strong {
    font-size: 12.5px !important;
    line-height: 1.4 !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
    font-weight: 550 !important;
}
body.pl-health .pl-category-row small {
    font-size: 11px !important;
    color: #acc3ce !important;
    line-height: 1.45 !important;
}
body.pl-health .pl-category-row>label:not(.pl-rule-optin) { grid-area: category; min-width: 0; }
body.pl-health .pl-category-row select {
    font-size: 12px !important;
    min-height: 36px;
}
body.pl-health .pl-category-row .pl-rule-optin {
    grid-area: remember;
    grid-column: auto;
    font-size: 11.5px !important;
    color: #b7cbd6 !important;
}
body.pl-health .pl-category-row>button {
    grid-area: apply;
    font-size: 12px !important;
    min-height: 36px;
}
body.pl-health .pl-saved-rule strong { font-size: 12.5px !important; }
body.pl-health .pl-saved-rule small { font-size: 11.5px !important; color: #acc2ce !important; }
body.pl-health .pl-saved-rule button,
body.pl-health .pl-category-undo button { font-size: 11.5px !important; }

@media(max-width:700px) {
    body.peakledger-unified .activity-table-row { min-height: 0 !important; }
    body.peakledger-unified .activity-account,
    body.peakledger-unified .activity-category,
    body.peakledger-unified .activity-date { white-space: normal; overflow-wrap: anywhere; }
    body.pl-health .pl-category-row {
        grid-template-columns: minmax(0,1fr) auto;
        grid-template-areas: 'merchant merchant' 'category apply' 'remember remember';
    }
}

/* v1.55.2: category editing and compact Data Health merchant-rule opt-in. */
body.pl-health .pl-category-row .pl-rule-optin {
    display: inline-flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
    min-width: max-content;
    max-width: 100%;
    justify-self: start;
    line-height: 1.3 !important;
}
body.pl-health .pl-category-row .pl-rule-optin span {
    white-space: nowrap !important;
    font-size: 11.5px !important;
}
body.pl-health .pl-category-row .pl-rule-optin input {flex-shrink: 0; margin: 0 3px 0 0;}
body.peakledger-unified .activity-category-edit {
    appearance: none;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    color: #b6cad5;
    text-align: left;
    padding: 7px 6px;
    font: inherit;
    font-size: 12.5px !important;
    font-weight: 440 !important;
    line-height: 1.3;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 7px;
    min-width: 0;
    cursor: pointer;
    max-width: 100%;
}
body.peakledger-unified .activity-category-edit:hover,
body.peakledger-unified .activity-category-edit:focus-visible {
    border-color: rgba(105,185,216,.38);
    color: #e7f7ff;
    background: rgba(34,93,117,.24);
    outline-offset: 2px;
}
body.peakledger-unified .activity-category-edit .activity-category-pencil {
    font-size: 13px;
    opacity: .35;
    flex-shrink: 0;
}
body.peakledger-unified .activity-category-edit:hover .activity-category-pencil,
body.peakledger-unified .activity-category-edit:focus-visible .activity-category-pencil {opacity: 1;}
body.peakledger-unified .activity-category-feedback {
    margin: 10px 14px;
    padding: 10px 12px;
    background: rgba(12,72,70,.35);
    border: 1px solid rgba(104,204,173,.35);
    border-radius: 7px;
    color: #bde4da;
    font-size: 12px;
}
body.peakledger-unified .activity-category-feedback.is-error {background: rgba(85,34,39,.4);border-color:rgba(227,123,123,.4);color:#f5c3c3;}
body.peakledger-unified .pl-category-dialog {z-index: 2000;}
body.peakledger-unified .pl-category-dialog .pl-check[hidden] {display:none !important;}
@media(max-width:700px) {
    body.peakledger-unified .activity-category-edit {white-space:normal;overflow-wrap:anywhere;}
    body.pl-health .pl-category-row .pl-rule-optin span {font-size: 11px !important;}
}
