/* Approved application roles. Dormant until a component explicitly opts in.
   Never target body, generic WordPress/theme elements, public pages or documents. */
:where(.rr-ui, .rr-ui-system, .rr-ui-pilot-page, .rr-account-bar) {
  --rr-ui-font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  --rr-ui-navy: #17324d;
  --rr-ui-orange: #f47c20;
  --rr-ui-title: 700 24px/1.25 var(--rr-ui-font);
  --rr-ui-section: 700 20px/1.3 var(--rr-ui-font);
  --rr-ui-subheading: 700 16px/1.35 var(--rr-ui-font);
  --rr-ui-label: 700 14px/1.4 var(--rr-ui-font);
  --rr-ui-field: 400 14px/1.4 var(--rr-ui-font);
  --rr-ui-support: 400 12px/1.5 var(--rr-ui-font);
  --rr-ui-border: #b9c7d4;
  --rr-ui-surface: #ffffff;
  --rr-ui-muted: #526579;
  --rr-ui-radius: 6px;
  --rr-ui-gap: 12px;
  --rr-ui-control-height: 36px;
  --rr-ui-label-weight: 700;
  --rr-ui-button-size: 14px;
  --rr-ui-utility-height: 32px;
  --rr-ui-selected-bg: var(--rr-ui-orange);
}
.rr-ui .rr-ui-title {font:var(--rr-ui-title);color:var(--rr-ui-navy)}
.rr-ui .rr-ui-section {font:var(--rr-ui-section);color:var(--rr-ui-navy)}
.rr-ui .rr-ui-subheading {font:var(--rr-ui-subheading);color:var(--rr-ui-navy)}
.rr-ui .rr-ui-label {font:var(--rr-ui-label);color:var(--rr-ui-navy)}
.rr-ui .rr-ui-field {font:var(--rr-ui-field);color:var(--rr-ui-navy)}
.rr-ui .rr-ui-support {font:var(--rr-ui-support)}
.rr-ui .rr-ui-primary {font:var(--rr-ui-label);background:var(--rr-ui-orange);color:var(--rr-ui-navy);border:1px solid var(--rr-ui-orange);border-radius:var(--rr-ui-radius);min-height:var(--rr-ui-control-height);padding:6px 12px}
.rr-ui .rr-ui-secondary {font:var(--rr-ui-label);background:var(--rr-ui-surface);color:var(--rr-ui-navy);border:1px solid var(--rr-ui-border);border-radius:var(--rr-ui-radius);min-height:var(--rr-ui-control-height);padding:6px 12px}
.rr-ui :where(.rr-ui-field,.rr-ui-primary,.rr-ui-secondary):focus-visible {outline:2px solid var(--rr-ui-navy);outline-offset:2px}

/* Single authority for normal application roles, including legacy-name aliases. */
:where(.rr-ui, .rr-ui-system, .rr-ui-pilot-page, .rr-account-bar) {
 --rr-ui-input-height:36px;--rr-ui-action-padding:6px 12px;--rr-ui-field-padding:6px 10px;--rr-ui-title-line:1.25;--rr-ui-section-line:1.3;--rr-ui-subheading-line:1.35;--rr-ui-label-line:1.4;--rr-ui-field-line:1.4;--rr-ui-support-line:1.5;
 --rr-ui-title-size:24px;--rr-ui-section-size:20px;--rr-ui-subheading-size:16px;
 --rr-ui-label-size:14px;--rr-ui-field-size:14px;--rr-ui-support-size:12px;
 --rr-ui-utility-copy-size:11px;--rr-ui-status-caption-size:13px;--rr-ui-chrome-size:13px;--rr-ui-nav-size:12px;--rr-ui-nav-compact-size:11px;--rr-ui-sequence-size:13px;--rr-ui-nav-title-size:17px;--rr-ui-nav-title-line:1.2;--rr-ui-component-line:1.55;--rr-ui-link:#17365f;--rr-ui-heading-weight:700;--rr-ui-field-weight:400;--rr-ui-language:600 13px/1.3 var(--rr-ui-font);
 --rr-navy:var(--rr-ui-navy);--rr-orange:var(--rr-ui-orange);--rr-ink:var(--rr-ui-navy);
 --rr-muted:var(--rr-ui-muted);--rr-line:#d6e0ea;--rr-border:#d7e0e8;
 --rr-blue:#2e74b5;--rr-pale:#f4f7fa;--rr-panel:#fff;
 --rr-green:#13a94d;--rr-red:#b42318;--rr-danger:#9b1c1c;
}
.rr-ui-system .rr-ui {font:var(--rr-ui-field);color:var(--rr-ui-navy)}

.rr-ui-system .rr-ui :where(h1):not(:where(.rr-proposal-sheet *,.rr-package-preview *,.rr-doc-preview *,.rr-template-preview *,.rr-communication-preview *,.rr-correspondence-body *)){font:var(--rr-ui-title);color:var(--rr-ui-navy)}

.rr-ui-system .rr-ui :where(h2,legend):not(:where(.rr-proposal-sheet *,.rr-package-preview *,.rr-doc-preview *,.rr-template-preview *,.rr-communication-preview *,.rr-correspondence-body *)){font:var(--rr-ui-section);color:var(--rr-ui-navy)}

.rr-ui-system .rr-ui :where(h3):not(:where(.rr-proposal-sheet *,.rr-package-preview *,.rr-doc-preview *,.rr-template-preview *,.rr-communication-preview *,.rr-correspondence-body *)){font:var(--rr-ui-subheading);color:var(--rr-ui-navy)}

.rr-ui-system .rr-ui :where(label):not(:where(.rr-proposal-sheet *,.rr-package-preview *,.rr-doc-preview *,.rr-template-preview *,.rr-communication-preview *,.rr-correspondence-body *)){font:var(--rr-ui-label);}

.rr-ui-system .rr-ui :where(p,small):not(:where(.rr-proposal-sheet *,.rr-package-preview *,.rr-doc-preview *,.rr-template-preview *,.rr-communication-preview *,.rr-correspondence-body *)){font:var(--rr-ui-support);}

.rr-ui-system .rr-ui :where(input:not([type=hidden]):not([type=checkbox]):not([type=radio]),select,textarea):not(:where(.rr-proposal-sheet *,.rr-package-preview *,.rr-doc-preview *,.rr-template-preview *,.rr-communication-preview *,.rr-correspondence-body *)){font:var(--rr-ui-field);}

@media(max-width:760px){:where(.rr-ui,.rr-ui-system){--rr-ui-input-height:40px}}
@media(max-width:600px){:where(.rr-ui,.rr-ui-system){--rr-ui-sequence-size:11px}}

/* Reusable approved form roles (not keyed to a page or route). */
body.rr-ui-system .rr-stage-workspace{--rr-orange:var(--rr-ui-orange);--rr-ink:var(--rr-ui-navy)}
body.rr-ui-system :is(.rr-stage-header,.rr-stage-sidebar,.rr-stage-language-switch){font-family:var(--rr-ui-font)}
body.rr-ui-system .rr-compose-wrap.rr-ui-form{--rr-navy:var(--rr-ui-navy);--rr-orange:var(--rr-ui-orange);--rr-ink:var(--rr-ui-navy);--rr-muted:var(--rr-ui-muted);font:var(--rr-ui-field);color:var(--rr-ui-navy)}
.rr-compose-wrap.rr-ui-form .rr-compose-heading h1{font:var(--rr-ui-title);color:var(--rr-ui-navy);letter-spacing:normal}
.rr-compose-wrap.rr-ui-form :is(.rr-known h2,.rr-lead-page-copy h2,.rr-compose-form legend){font:var(--rr-ui-section);color:var(--rr-ui-navy);letter-spacing:normal}
.rr-compose-wrap.rr-ui-form :is(h3,.rr-bilingual-heading strong){font:var(--rr-ui-subheading);color:var(--rr-ui-navy)}
.rr-compose-wrap.rr-ui-form :is(.rr-compose-form label,.rr-label,.rr-call-in-pin-label,.rr-editor-label label){font:var(--rr-ui-label);color:var(--rr-ui-navy)}
.rr-compose-wrap.rr-ui-form .rr-compose-form :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea){font:var(--rr-ui-field);color:var(--rr-ui-navy);min-height:var(--rr-ui-control-height);padding:6px 10px;border-radius:var(--rr-ui-radius);box-sizing:border-box}
.rr-compose-wrap.rr-ui-form :is(p,.rr-inline-note,.rr-field-message,.rr-word-count,.rr-bilingual-count,.rr-logo-note,.rr-account-security-notice,.rr-compose-actions>span,.rr-compose-notice,.rr-known small,.rr-logo-current small,.rr-logo-empty small,.rr-lead-page-url>span){font:var(--rr-ui-support)}
.rr-compose-wrap.rr-ui-form :is(.rr-lead-page-kicker,.rr-logo-filename,.rr-pin-tooltip,.rr-pin-message,.rr-bilingual-save){font:var(--rr-ui-support)}
.rr-compose-wrap.rr-ui-form .rr-lead-page-kicker{color:var(--rr-ui-orange)}
.rr-compose-wrap.rr-ui-form :is(.rr-owner-readonly input,.rr-lead-page-url>strong){font:var(--rr-ui-field)}
.rr-compose-wrap.rr-ui-form :is(.rr-compose-button,.rr-bilingual-actions button){font:var(--rr-ui-label);min-height:var(--rr-ui-control-height);padding:6px 12px;border-radius:var(--rr-ui-radius);background:var(--rr-ui-orange);color:var(--rr-ui-navy);border:1px solid var(--rr-ui-orange);box-sizing:border-box}
.rr-compose-wrap.rr-ui-form :is(.rr-compose-secondary,.rr-bilingual-actions button){background:var(--rr-ui-surface);color:var(--rr-ui-navy);border-color:var(--rr-ui-border)}
.rr-compose-wrap.rr-ui-form .rr-compose-button:hover{background:var(--rr-ui-orange);color:var(--rr-ui-navy);filter:brightness(.96)}
.rr-compose-wrap.rr-ui-form :is(.rr-bilingual-choices button,.rr-bilingual-actions button,.rr-logo-upload){font-family:var(--rr-ui-font);font-weight:700}
.rr-compose-wrap.rr-ui-form .rr-compose-form :is(input,select,textarea):focus-visible{outline:2px solid var(--rr-ui-navy);outline-offset:2px}
body.rr-ui-system .rr-setup-topnav a{font-family:var(--rr-ui-font);color:var(--rr-ui-navy)}
body.rr-ui-system .rr-setup-topnav a.is-active{color:var(--rr-ui-navy)}

@media(max-width:760px){.rr-compose-wrap.rr-ui-form :is(.rr-compose-form input:not([type=checkbox]):not([type=radio]):not([type=hidden]),.rr-compose-form select,.rr-compose-button){min-height:40px}}
/* Common paired-language copy and explicit Lucy action modes. */
.rr-ui-system :is(.rr-stage-account,.rr-dashboard-welcome)>.rr-lucy-header-call{display:flex;align-items:center;gap:6px;flex:0 0 auto;width:185px;height:56px;max-width:100%;padding:3px 6px;margin:0;border:1px solid #cbd8e8;border-radius:8px;background:#fff;overflow:hidden;box-shadow:0 1px 4px #17365f20;text-align:left;line-height:1.12;box-sizing:border-box;text-decoration:none;color:var(--rr-ui-navy)}
.rr-lucy-header-call .rr-lucy-explain-portrait{display:block;width:43px;height:49px;flex:0 0 43px;object-fit:cover;object-position:40% 23%;border-radius:5px;max-width:none}
.rr-lucy-header-call strong{font:700 14px/1.2 var(--rr-ui-font);color:var(--rr-ui-navy)}
.rr-lucy-header-call[aria-disabled=true]{cursor:default}
.rr-lucy-header-call:focus-visible{outline:3px solid var(--rr-ui-orange);outline-offset:2px}
.rr-lucy-header-call .rr-setup-copy>[data-rr-setup-copy-language]{display:none}
html[data-rr-ui-language=en] .rr-lucy-header-call [data-rr-setup-copy-language=en],html[data-rr-ui-language=es] .rr-lucy-header-call [data-rr-setup-copy-language=es],html:not([data-rr-ui-language]) .rr-lucy-header-call [data-rr-default-language=en]>[data-rr-setup-copy-language=en],html:not([data-rr-ui-language]) .rr-lucy-header-call [data-rr-default-language=es]>[data-rr-setup-copy-language=es]{display:inline}
.rr-dashboard-welcome .rr-lucy-header-call{height:48px}
.rr-dashboard-welcome .rr-lucy-header-call .rr-lucy-explain-portrait{width:35px;height:40px;flex-basis:35px}

/* Approved Explain invitation; geometry retained exactly. */
/* The existing header's Lucy-ready space becomes the onboarding help control. */
body.rr-compose-unified-page .rr-compose-lucy-header-slot{display:flex!important;align-items:center!important;justify-content:flex-end!important;min-width:0!important;max-width:220px!important;}
body.rr-compose-unified-page .rr-lucy-explain-trigger{display:flex!important;align-items:center!important;gap:6px!important;flex:0 0 auto!important;width:185px!important;height:56px!important;min-height:0!important;max-width:100%!important;padding:3px 6px!important;margin:0!important;border:1px solid #cbd8e8!important;border-radius:8px!important;background:#fff!important;overflow:hidden!important;cursor:pointer!important;box-shadow:0 1px 4px #17365f20!important;text-align:left!important;line-height:1.12!important;box-sizing:border-box!important;}
body.rr-compose-unified-page .rr-lucy-explain-portrait{display:block!important;width:43px!important;height:49px!important;flex:0 0 43px!important;object-fit:cover!important;object-position:40% 23%!important;border-radius:5px!important;max-width:none!important;}
body.rr-compose-unified-page .rr-lucy-explain-copy{display:flex!important;flex-direction:column!important;gap:3px!important;min-width:0!important;}
body.rr-compose-unified-page .rr-lucy-explain-title{display:block!important;font:700 12px/1.16 'Segoe UI',Aptos,Arial,sans-serif!important;color:var(--rr-ui-navy,#17365f)!important;white-space:normal!important;}
body.rr-compose-unified-page .rr-lucy-explain-click{display:block!important;font:700 12px/1.15 'Segoe UI',Aptos,Arial,sans-serif!important;color:var(--rr-ui-orange,#e75d16)!important;white-space:normal!important;}
body.rr-compose-unified-page .rr-lucy-explain-fallback{margin:0 0 8px!important;}
body.rr-compose-unified-page .rr-lucy-explain-trigger:focus-visible{outline:3px solid var(--rr-ui-orange,#ff5a14)!important;outline-offset:2px!important;}

/* Public account-bar fit remains unchanged; the restoration below is application-header only. */
.rr-account-bar .rr-account-bar-inner{box-sizing:border-box;max-width:1200px;width:100%;min-width:0;justify-content:flex-start}
.rr-account-bar .rr-account-links{min-width:0;max-width:100%;flex-wrap:wrap;justify-content:flex-start}
.rr-ui-system .rr-account-bar-inner>[data-rr-ask-control]{order:-1;margin-right:8px}

/* Shared paired-language role, including Dashboard details added by newer STAGE.
   Keep translation selection in the owning BEGIN foundation, not a page override. */
:where(.rr-ui-system,.rr-account-bar) .rr-shared-copy>[data-rr-setup-copy-language]{display:none}
html[data-rr-ui-language=en] :where(.rr-ui-system,.rr-account-bar) .rr-shared-copy>[data-rr-setup-copy-language=en],html[data-rr-ui-language=es] :where(.rr-ui-system,.rr-account-bar) .rr-shared-copy>[data-rr-setup-copy-language=es],html:not([data-rr-ui-language]) :where(.rr-ui-system,.rr-account-bar) .rr-shared-copy[data-rr-default-language=en]>[data-rr-setup-copy-language=en],html:not([data-rr-ui-language]) :where(.rr-ui-system,.rr-account-bar) .rr-shared-copy[data-rr-default-language=es]>[data-rr-setup-copy-language=es]{display:inline}

/* Shared Save/Close states: retain component sizing and native actions. Theme hover rules must not erase text. */
[data-rr-dialog-safety] button[data-rr-button-role="primary"],
[data-rr-dialog-safety] button[data-rr-button-role="primary"]:is(:hover,:focus,:active){background:#f47c20!important;color:#17324d!important;border-color:#f47c20!important;box-shadow:none}
[data-rr-dialog-safety] button[data-rr-button-role="secondary"],
[data-rr-dialog-safety] button[data-rr-button-role="secondary"]:is(:hover,:focus,:active){background:#fff!important;color:#17324d!important;border-color:#17324d!important;box-shadow:none}
[data-rr-dialog-safety] button[data-rr-button-role]:focus-visible{outline:2px solid #17324d!important;outline-offset:2px!important}
[data-rr-dialog-safety] button[data-rr-button-role]:disabled,
[data-rr-dialog-safety] button[data-rr-button-role][aria-disabled="true"]{background:#e6ebef!important;color:#526579!important;border-color:#b9c7d4!important;opacity:1!important;cursor:not-allowed}

/* Approved authenticated header: logo alone above the existing welcome/control line.
   Shared by Dashboard and the STAGE/COMPOSE workspace; no page-specific layout patches. */
body.rr-ui-system:has(.rr-auth-header) :is(#masthead,#ast-mobile-header,.ast-mobile-header-wrap){display:none!important}
.rr-ui-system .rr-auth-header{display:block;min-height:0;max-width:100%;box-sizing:border-box;margin-top:var(--rr-auth-admin-clearance,0px);transition:none}
.rr-ui-system .rr-auth-brand-row{display:flex;align-items:center;min-width:0}
.rr-ui-system .rr-auth-controls-row{display:flex;align-items:center;flex-wrap:wrap;gap:6px 12px;min-width:0;padding-top:6px}
.rr-ui-system .rr-auth-header :is(.rr-dashboard-brand,.rr-stage-brand){display:inline-flex;flex:0 0 auto;align-items:center;gap:10px;min-width:0;max-width:100%;width:auto;padding:0;margin:0;color:inherit!important;background:transparent!important;border:0!important;box-shadow:none!important;text-decoration:none!important;transform:none!important}
.rr-ui-system .rr-auth-header :is(.rr-dashboard-brand,.rr-stage-brand) *{text-decoration:none!important;background-image:none!important}
.rr-ui-system .rr-auth-header :is(.rr-dashboard-brand,.rr-stage-brand):is(:hover,:focus,:active,:visited){text-decoration:none!important;color:inherit!important;border:0!important;background:transparent!important;box-shadow:none!important}
.rr-ui-system .rr-auth-header :is(.rr-dashboard-brand,.rr-stage-brand)::before,.rr-ui-system .rr-auth-header :is(.rr-dashboard-brand,.rr-stage-brand)::after{content:none!important}
.rr-ui-system .rr-auth-header :is(.rr-dashboard-brand,.rr-stage-brand)>img{display:block;width:47px!important;height:47px!important;max-width:47px!important;max-height:47px!important;object-fit:contain;flex:0 0 47px}
.rr-ui-system .rr-auth-header :is(.rr-dashboard-brand,.rr-stage-brand)>span{display:flex;flex-direction:column}
.rr-ui-system .rr-auth-header :is(.rr-dashboard-brand,.rr-stage-brand) strong{font-size:27px!important;line-height:1;font-weight:800;color:var(--rr-orange,#f47c20)}
.rr-ui-system .rr-auth-header :is(.rr-dashboard-brand,.rr-stage-brand) strong i{font-style:normal;color:var(--rr-ink,#17324d)}
.rr-ui-system .rr-auth-header :is(.rr-dashboard-brand,.rr-stage-brand) small{margin-top:4px;font-size:10px!important;line-height:normal;letter-spacing:.02em;color:#586983}
.rr-ui-system .rr-auth-header :is(.rr-dashboard-welcome,.rr-stage-account){display:flex;align-items:center;justify-content:flex-start;flex:1 1 auto;flex-wrap:wrap;gap:6px 12px;margin:0;min-width:0;max-width:100%;white-space:normal}
.rr-ui-system .rr-auth-header :is(.rr-dashboard-welcome,.rr-stage-account)>.rr-owner-welcome-copy{display:inline!important;min-width:0;overflow-wrap:anywhere}
.rr-ui-system .rr-auth-header :is(.rr-dashboard-welcome,.rr-stage-account)>[data-rr-ask-control]{display:flex!important;order:-1;flex:0 0 auto;margin-right:8px}
.rr-ui-system .rr-auth-header :is(.rr-dashboard-language-switch,.rr-stage-language-switch){display:flex;align-items:center;flex:0 0 auto;flex-wrap:wrap;gap:5px;max-width:100%;min-width:0;width:auto;margin-left:auto;order:10;align-self:center}
.rr-ui-system .rr-auth-header :is(.rr-dashboard-welcome,.rr-stage-account)>a,
.rr-ui-system .rr-auth-header :is(.rr-dashboard-welcome,.rr-stage-account)>a:is(:hover,:focus,:active,:visited){display:inline-flex;color:#17324d!important;background:transparent!important;text-decoration:none}
.rr-ui-system .rr-auth-header [data-rr-ask-control],.rr-ui-system .rr-auth-header [data-rr-ask-control]:is(:hover,:focus,:active){color:#17324d!important;background:#fff!important}
.rr-ui-system .rr-auth-header button[data-rr-lang],.rr-ui-system .rr-auth-header button[data-rr-lang]:is(:hover,:focus,:active){color:#17324d!important;background:#fff!important;border-color:#b9c7d4!important}
.rr-ui-system .rr-auth-header button[data-rr-lang][aria-pressed="true"],.rr-ui-system .rr-auth-header button[data-rr-lang].is-active{color:#fff!important;background:#17324d!important;border-color:#17324d!important}
.rr-ui-system .rr-auth-header :is(a,button):focus-visible{outline:2px solid #17324d!important;outline-offset:3px!important}
@media(max-width:720px){
 .rr-ui-system .rr-auth-header :is(.rr-dashboard-brand,.rr-stage-brand)>img{width:40px!important;height:40px!important;max-width:40px!important;max-height:40px!important;flex-basis:40px}
 .rr-ui-system .rr-auth-header :is(.rr-dashboard-brand,.rr-stage-brand) strong{font-size:22px!important}
 .rr-ui-system .rr-auth-header :is(.rr-dashboard-welcome,.rr-stage-account){flex-basis:100%}
}

/* One shared two-row header, including workspace shells loaded after this foundation. */
.rr-ui-system .rr-auth-header:is(.rr-dashboard-brandbar,.rr-stage-header){display:block;min-height:0}
.rr-ui-system .rr-auth-header>.rr-auth-brand-row,.rr-ui-system .rr-auth-header>.rr-auth-controls-row{width:100%;box-sizing:border-box;min-width:0}
