/* Fehu · sistema visual compartido. Cargar después del CSS de cada módulo.
   Paleta canónica: admisiones-tokens.css. No redefinir estos alias en los módulos. */
:root {
  color-scheme: light;
  --fehu-action: var(--pos-700);
  --fehu-action-hover: var(--pos-800);
  --fehu-on-action: #fff;
  --fehu-info: var(--ext-700);
  --ui-focus: var(--pos-700);
  --ui-on-accent: var(--fehu-on-action);
  --fehu-bg: var(--ui-canvas);
  --fehu-panel: var(--ui-surface-1);
  --fehu-ink: var(--ui-text);
  --fehu-text: var(--ui-text);
  --fehu-muted: var(--ui-muted);
  --fehu-line: var(--ui-border);
  --fehu-green: var(--fehu-action);
  --fehu-green-dark: var(--ui-accent-strong);
  --fehu-green-soft: var(--ui-accent-soft);
  --fehu-blue: var(--fehu-info);
  --fehu-blue-soft: var(--ui-surface-2);
  --fehu-amber: var(--ui-warning);
  --fehu-amber-soft: var(--ui-surface-2);
  --fehu-red: var(--ui-danger);
  --fehu-red-soft: var(--ui-surface-2);
  --fehu-shadow: none;
  --fehu-radius: var(--ui-radius-control);
  --fa-bg: var(--ui-canvas);
  --fa-panel: var(--ui-surface-1);
  --fa-ink: var(--ui-text);
  --fa-muted: var(--ui-muted);
  --fa-line: var(--ui-border);
  --fa-green: var(--fehu-action);
  --fa-green-dark: var(--ui-accent-strong);
  --fa-green-soft: var(--ui-accent-soft);
  --fa-blue: var(--fehu-info);
  --fa-blue-soft: var(--ui-surface-2);
  --fa-amber: var(--ui-warning);
  --fa-amber-soft: var(--ui-surface-2);
  --fa-shadow: none;
  --fa-radius: var(--ui-radius-control);
  --fr-bg: var(--ui-canvas);
  --fr-panel: var(--ui-surface-1);
  --fr-ink: var(--ui-text);
  --fr-muted: var(--ui-muted);
  --fr-line: var(--ui-border);
  --fr-green: var(--fehu-action);
  --fr-green-dark: var(--ui-accent-strong);
  --fr-green-soft: var(--ui-accent-soft);
  --fr-blue: var(--fehu-info);
  --fr-blue-soft: var(--ui-surface-2);
  --fr-amber: var(--ui-warning);
  --fr-amber-soft: var(--ui-surface-2);
  --fr-red: var(--ui-danger);
  --fr-red-soft: var(--ui-surface-2);
  --fr-shadow: none;
  --fr-radius: var(--ui-radius-control);
  --topbar-h: 76px;
  --subbar-h: 0px;
  --top-bg: var(--ui-surface-1);
  --top-fg: var(--ui-text);
  --bs-body-bg: var(--ui-canvas);
  --bs-body-color: var(--ui-text);
  --bs-secondary-color: var(--ui-muted);
  --bs-tertiary-bg: var(--ui-surface-2);
  --bs-border-color: var(--ui-border);
  --bs-emphasis-color: var(--ui-text);
  --bs-link-color: var(--ui-accent-strong);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --fehu-action: var(--pos-300);
  --fehu-action-hover: var(--pos-200);
  --fehu-on-action: var(--ink-900-brand);
  --fehu-info: var(--ext-200);
  --ui-focus: var(--pos-300);
  --ui-on-accent: var(--fehu-on-action);
}
html[data-accent="pos"]:not([data-theme="dark"]) {
  --ui-accent-strong: var(--pos-800);
  --ui-accent-soft: color-mix(in srgb, var(--pos-500) 10%, var(--ui-surface-1));
  --ui-success: var(--pos-800);
  --ui-warning: var(--orange-800);
}
html { scroll-padding-top: 96px; }
body { margin: 0; background: var(--ui-canvas); color: var(--ui-text); font: 1rem/1.55 var(--ui-body); }
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
button, input, select, textarea { font-family: var(--ui-body); }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--ui-focus); outline-offset: 3px; }
.fehu-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.fehu-skip-link { position: fixed; top: 12px; left: 16px; z-index: 2000; padding: 12px 18px; border-radius: 12px; background: var(--fehu-action); color: var(--fehu-on-action); transform: translateY(-160%); }
.fehu-skip-link:focus { transform: translateY(0); }
body button.fr-th-sortable { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; }
input::placeholder, textarea::placeholder { color: var(--ui-muted); opacity: 1; font-weight: 400; }
input, select, textarea { accent-color: var(--fehu-action); }
body :is(.fehu-app, .fa-app, .fr-app) { font-size: 1rem; }
body :is(.fehu-app, .fa-app, .fr-app) strong { font-family: inherit; }
body :is(h1, h2, h3) { color: var(--ui-text); font-family: var(--ui-display); font-weight: 650; letter-spacing: -.025em; }
body :is(.fehu-request__top, .fa-top, .fr-top) h1 { font-size: clamp(1.65rem, 2.6vw, 2.3rem); margin: 0; line-height: 1.2; }
body :is(.fehu-section-head, .fa-section-head, .fr-section-head) h2 { font-size: 1.4rem; line-height: 1.3; }
.fehu-eyebrow { font-family: var(--ui-code); font-size: .75rem; font-weight: 500; letter-spacing: .07em; text-transform: uppercase; color: var(--ui-accent-strong); }
.fehu-product-name { font-family: var(--ui-display); font-size: 1.35rem; font-weight: 700; color: var(--ui-text); letter-spacing: -.04em; }

/* Inputs remain large while action labels use the compact institutional scale. */
body :is(.fehu-app, .fa-app, .fr-app, .fehu-hub-wrap) :is(input:where(:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"])), select, textarea) {
  min-height: var(--fehu-input-height, 48px); max-width: 100%; padding: 11px 14px; border: 1px solid var(--ui-border-strong);
  border-radius: var(--ui-radius-control); background-color: var(--ui-surface-1); color: var(--ui-text);
  font-size: 1rem; font-weight: 400; line-height: 1.4; box-shadow: none;
}
body :is(.fehu-app, .fa-app, .fr-app, .fehu-hub-wrap) textarea { min-height: 112px; resize: vertical; }
body :is(.fehu-app, .fa-app, .fr-app, .fehu-hub-wrap) :is(input, select, textarea):focus { border-color: var(--ui-focus); outline: 2px solid var(--ui-focus); outline-offset: 2px; box-shadow: none; }
body :is(.fehu-app, .fa-app, .fr-app, .fehu-hub-wrap) :is(input:not([type="checkbox"]):not([type="radio"])[readonly], input:not([type="checkbox"]):not([type="radio"]):disabled, select:disabled, textarea:disabled) { background-color: var(--ui-surface-2); color: var(--ui-muted); opacity: 1; }
body :is(.fehu-field > span:first-child, .fehu-field > label, .form-label, .fa-program-select label > span, .fa-general-form label:not(.fa-toggle) > span, .fa-date-grid label:not(.fa-toggle) > span, .fr-filters label > span) {
  display: block; color: var(--ui-text); font: 500 .875rem/1.4 var(--ui-body); margin-bottom: 6px;
}
body :is(.fehu-field, .fa-program-select label) { gap: 4px; }
.fehu-field-help { display: block; font-size: .875rem; color: var(--ui-muted); margin-top: 6px; }
body :is(.fehu-grid, .fa-date-grid, .fa-general-form, .fa-doc-config-grid, .fa-role-config-grid, .fa-user-role-config-grid, .fa-stage-config-grid, .fa-responsible-config-grid) { gap: 20px 24px; }
body :is(.fehu-btn, .fa-btn, .fr-btn, .fr-action, .fr-small-btn, .fr-doc-btn, .fr-notes-save, .fehu-hub-form .btn, .fr-doc-review button) { min-height: 44px; padding: 11px 18px; border-radius: var(--ui-radius-control); font: 560 .8rem/1.4 var(--ui-body); box-shadow: none; }
body :is(.fehu-btn, .fa-btn, .fr-btn, .fr-action, .fehu-hub-form .btn) :is(span, strong) { font-family: inherit; font-size: inherit; font-weight: inherit; color: inherit; }
body :is(.fehu-btn--primary, .fa-btn--primary, .fr-action--approve, .fr-notes-save, .fehu-hub-form .btn-primary) { background: var(--fehu-action); border-color: var(--fehu-action); color: var(--fehu-on-action); }
body :is(.fehu-btn--primary, .fa-btn--primary, .fr-action--approve, .fr-notes-save, .fehu-hub-form .btn-primary):hover { background: var(--fehu-action-hover); border-color: var(--fehu-action-hover); color: var(--fehu-on-action); }
body :is(.fehu-btn--ghost, .fa-btn--ghost, .fr-small-btn, .fr-doc-btn) { background: var(--ui-surface-1); color: var(--ui-text); border-color: var(--ui-border-strong); }
body :is(.fehu-btn--ghost, .fa-btn--ghost, .fr-small-btn, .fr-doc-btn):hover { background: var(--ui-surface-2); color: var(--ui-text); }
body :is(.fa-btn--danger, .fr-action--reject) { background: var(--ui-surface-1); color: var(--ui-danger); border-color: var(--ui-border-strong); }
body :is(button:disabled, .fehu-btn:disabled, .fa-btn:disabled) { cursor: not-allowed; opacity: .6; box-shadow: none; }
body :is(.fa-card, .fr-card, .fehu-panel, .fehu-form-panel, .fehu-help-card, .fehu-hub-card) { border-radius: var(--ui-radius-panel); box-shadow: none; }
body :is(.fa-card, .fehu-panel) { padding: 24px; }
body :is(.fa-doc-config, .fa-general-hito, .fa-stage-config, .fa-responsible-config, .fa-role-config, .fa-user-role-config) { padding: 22px; border-radius: var(--ui-radius-panel); }
body :is(.fa-program-table, .fr-table, .fr-report-table) th { background: var(--ui-surface-2); color: var(--ui-muted); font-weight: 500; }
body :is(.fa-program-table, .fr-table, .fr-report-table) td { font-size: .8rem; color: var(--ui-text); padding-block: 14px; }
body :is(.fa-program-table, .fr-table, .fr-report-table) tbody tr:hover { background: var(--ui-surface-2); }
body :is(.fa-program-table-wrap, .fr-table-wrap) { overflow-x: auto; max-width: 100%; border-radius: var(--ui-radius-control); }
body :is(.fa-table-pill, .fa-status-chip, .fr-badge, .fr-pill) { font-size: .75rem; line-height: 1.4; }
body :is(.fa-date-grid input[type="date"], .fa-banner-date, .fr-date, .fehu-date-item time, .fehu-step > span) { font-family: var(--ui-code); }

/* Identity and navigation: use exact official assets. */
.fehu-signature { display: block; width: 208px; flex: 0 0 208px; line-height: 0; }
.fehu-signature img { display: block; width: 100%; height: auto; max-width: 100%; object-fit: contain; }
.fehu-applicant-sso { margin: 0; }
.fehu-login-separator { margin: 20px 0; display: flex; align-items: center; gap: 12px; color: var(--ui-muted); font-size: .85rem; text-align: center; }
.fehu-login-separator::before, .fehu-login-separator::after { content: ''; height: 1px; flex: 1; background: var(--ui-border); }
body :is(.topbar, .fehu-public-topbar, .fa-topbar, .fr-topbar) { background: var(--ui-sticky-surface); color: var(--ui-text); min-height: 76px; height: auto; border-bottom: 1px solid var(--ui-border); box-shadow: none; backdrop-filter: blur(var(--ui-sticky-blur)); -webkit-backdrop-filter: blur(var(--ui-sticky-blur)); }
body :is(.fehu-public-topbar, .fa-topbar, .fr-topbar) { padding: 14px 28px; gap: 18px; }
body :is(.fehu-public-topbar__context, .fa-topbar-context, .fr-topbar-context) { min-width: 0; }
body :is(.fehu-public-logo, .fa-top-logo, .fr-top-logo) { width: auto; padding: 0; background: transparent; border: 0; box-shadow: none; }
body :is(.fa-page-title-row > p, .fr-page-title-row > p, .fa-page-title-row > span, .fr-page-title-row > span) { font-size: .875rem; color: var(--ui-muted); }
body :is(.fehu-public-title, .fa-page-title-row, .fr-page-title-row) { gap: 10px; align-items: center; }
body .fehu-public-title p { font-size: .8rem; color: var(--ui-muted); font-weight: 400; }
body :is(.fa-user-menu, .fr-user-menu, .fehu-top-user) { background: transparent; border: 0; color: var(--ui-text); }
body :is(.fa-avatar, .fr-avatar, .fehu-user-card__avatar) { background: var(--ui-accent-soft); color: var(--ui-accent-strong); }
body :is(.fa-nav, .fr-nav, .fehu-local-nav) { background: var(--ui-surface-1); color: var(--ui-text); border-right: 1px solid var(--ui-border); box-shadow: none; overflow-y: auto; }
body :is(.fa-nav, .fr-nav, .fehu-local-nav) :is(nav a, .fa-sidebar-link, .fr-sidebar-link, .fehu-side-action, .fa-collapse-button, .fr-collapse-button, .fehu-sidebar-collapse) { color: var(--ui-muted); background: transparent; border-radius: var(--ui-radius-control); font: 500 .8rem/1.4 var(--ui-body); min-height: 44px; }
body :is(.fa-nav, .fr-nav, .fehu-local-nav) :is(nav a i, .fa-sidebar-link i, .fr-sidebar-link i, .fehu-side-action i) { color: inherit; }
body :is(.fa-nav, .fr-nav, .fehu-local-nav) :is(nav a, .fa-sidebar-link, .fr-sidebar-link, .fehu-side-action):hover { background: var(--ui-surface-2); color: var(--ui-text); }
body :is(.fa-nav, .fr-nav, .fehu-local-nav) nav a.is-active { background: var(--ui-accent-soft); color: var(--ui-accent-strong); }
body :is(.fa-nav, .fr-nav, .fehu-local-nav) nav a.is-active i { color: inherit; }
body :is(.fa-collapse-button, .fr-collapse-button, .fehu-sidebar-collapse) { min-width: 44px; height: 44px; border: 1px solid var(--ui-border); }
body :is(.fa-content, .fr-page-wrap, .fehu-main) { padding: 32px clamp(20px, 3vw, 44px) 44px; min-width: 0; }
body .fa-main { grid-template-columns: minmax(0,1fr); width: 100%; min-width: 0; }
body :is(.fa-main > *, .fa-card, .fa-top > *, .fa-section-head > *) { min-width: 0; max-width: 100%; }
body :is(.fa-top, .fr-top, .fehu-request__top) { margin-bottom: 24px; }
.fehu-theme-toggle, .fehu-mobile-menu { display: inline-grid; place-items: center; width: 44px; height: 44px; min-width: 44px; flex: 0 0 44px; border: 1px solid var(--ui-border-strong); border-radius: 12px; background: var(--ui-surface-1); color: var(--ui-text); cursor: pointer; transition: background var(--ui-speed) var(--ui-ease), transform var(--ui-speed) var(--ui-ease); }
.fehu-theme-toggle:hover, .fehu-mobile-menu:hover { background: var(--ui-surface-2); }
.fehu-theme-toggle:active { transform: scale(.985); }
.fehu-theme-toggle svg { width: 22px; height: 22px; display: block; }
.fehu-mobile-menu { display: none; font-size: 1.35rem; }
body .fehu-login-theme-toggle { display: none !important; }
.fehu-menu-backdrop { display: none; }

/* Both access screens give the form the largest share of the composition. */
body .fehu-app.is-login-active .fehu-public-topbar, body .fehu-app:has(.fehu-login-view:not([hidden])) .fehu-public-topbar { display: flex; }
body .fehu-app.is-login-active, body .fehu-app:has(.fehu-login-view:not([hidden])) { min-height: 0; padding-bottom: 0; }
body .fehu-hub-wrap.is-login { width: 100%; max-width: none; padding: 0; margin: 0; }
body :is(.fehu-login-view, .fehu-staff-login) { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1fr); align-items: center; gap: clamp(36px, 6vw, 88px); width: min(1120px, calc(100% - 64px)); max-width: none; min-height: 650px; margin: 0 auto; padding: 56px 0; }
body :is(.fehu-login-view, .fehu-staff-login)::before,
body :is(.fehu-login-view, .fehu-staff-login)::after { content: ""; position: absolute; z-index: -1; pointer-events: none; width: min(440px,75%); height: 370px; border-radius: 62% 38% 56% 44% / 42% 60% 40% 58%; background: color-mix(in srgb,var(--pos-500) 7%,transparent); }
body :is(.fehu-login-view, .fehu-staff-login)::before { top: 8%; left: 2%; transform: rotate(-8deg); animation: fehu-ambient-drift 22s ease-in-out infinite alternate; }
body :is(.fehu-login-view, .fehu-staff-login)::after { right: 6%; bottom: 7%; width: min(300px,55%); height: 240px; background: color-mix(in srgb,var(--pos-500) 4%,transparent); transform: rotate(20deg); }
@keyframes fehu-ambient-drift { to { transform: translate(12px,10px) rotate(0deg); border-radius: 48% 52% 38% 62% / 58% 42% 58% 42%; } }
.fehu-login-identity { display: flex; align-items: center; gap: 18px; margin-bottom: 28px; }
.fehu-login-identity img { display: block; width: 72px; height: 72px; flex: 0 0 72px; object-fit: contain; }
body .fehu-login-identity strong { display: block; font: 700 2rem/1.15 var(--ui-display); letter-spacing: -.04em; color: var(--ui-text); }
.fehu-login-identity .fehu-eyebrow { margin: 6px 0 0; max-width: 30ch; font-size: .7rem; line-height: 1.6; }
body :is(.fehu-login-brand-panel, .fehu-staff-login__brand) { display: block; min-height: 0; padding: 0; border: 0; border-radius: 0; background: none; color: var(--ui-text); box-shadow: none; overflow: visible; }
body :is(.fehu-login-brand-panel, .fehu-staff-login__brand) h1 { margin: 18px 0 22px; font-size: clamp(2rem, 3.7vw, 3.2rem); line-height: 1.12; font-weight: 650; }
body :is(.fehu-login-brand-panel, .fehu-staff-login__brand) > p:not(.fehu-eyebrow) { max-width: 36ch; color: var(--ui-muted); font-size: 1.0625rem; line-height: 1.7; margin-bottom: 24px; }
body :is(.fehu-login-card, .fehu-staff-login__card) { --fehu-input-height: 56px; align-self: center; width: 100%; padding: clamp(28px, 3vw, 44px); background: var(--ui-surface-1); border: 1px solid var(--ui-border); border-radius: var(--ui-radius-panel); box-shadow: none; overflow: visible; }
body :is(.fehu-login-card-head, .fehu-staff-login__head) { display: block; padding: 0; margin: 0 0 30px; border: 0; background: none; }
body :is(.fehu-login-card-head, .fehu-staff-login__head) h2 { font-size: clamp(1.6rem, 2.3vw, 2rem); line-height: 1.2; margin: 10px 0; }
body :is(.fehu-login-card-head, .fehu-staff-login__head) > p:not(.fehu-eyebrow) { font-size: 1rem; color: var(--ui-muted); margin: 0; }
body :is(.fehu-login-card-head, .fehu-staff-login__head) .fehu-eyebrow { color: var(--ui-accent-strong); font-size: .75rem; margin: 0; }
body .fehu-login-form-card { margin: 0; padding: 0; border: 0; background: none; box-shadow: none; }
body :is(.fehu-login-form, .fehu-hub-form) { display: grid; gap: 24px; }
body .fehu-login-method.is-active { display: grid; gap: 22px; }
body .fehu-hub-form .row { display: grid; grid-template-columns: 1fr; gap: 22px; margin: 0; }
body .fehu-hub-form [class*="col-"] { width: 100%; margin: 0; padding: 0; }
body :is(.fehu-login-card, .fehu-staff-login__card) input:not([type="hidden"]) { min-height: 56px; width: 100%; font-size: 1rem; }
body :is(.fehu-login-card, .fehu-staff-login__card) :is(.fehu-login-submit, .btn-primary) { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; width: 100%; }
body .fehu-login-side__note { padding: 18px 0 0; margin: 22px 0 0; border: 0; border-top: 1px solid var(--ui-border); border-radius: 0; background: none; font: 400 .875rem/1.5 var(--ui-body); color: var(--ui-muted); }
.fehu-access-help { color: var(--ui-muted); font-size: .875rem; margin: 24px 0 0; }
.fehu-access-help a { color: var(--ui-accent-strong); text-underline-offset: 3px; }
.fehu-access-link { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0; border: 0; background: none; color: var(--ui-accent-strong); font: 560 .8rem/1.5 var(--ui-body); text-decoration: none; }
.fehu-access-link:hover { color: var(--ui-accent-strong); text-decoration: underline; text-underline-offset: 4px; }
.fehu-hub-wrap:not(.is-login) { max-width: 1120px; margin: 48px auto; padding: 0 24px; }
.fehu-hub-card { padding: 32px; border: 1px solid var(--ui-border); background: var(--ui-surface-1); }
.fehu-hub-brand { display: flex; gap: 14px; align-items: center; margin-bottom: 24px; }
.fehu-hub-brand img { width: 48px; height: 48px; }
.fehu-hub-brand :is(strong,small) { display: block; }
.fehu-hub-brand small, .fehu-hub-card .lead { color: var(--ui-muted); }
.fehu-hub-user { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; padding: 20px 0; border-block: 1px solid var(--ui-border); }
.fehu-hub-user a { color: var(--ui-accent-strong); }
.fehu-hub-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(240px,100%),1fr)); gap: 20px; margin-top: 28px; }
.fehu-hub-tile { display: flex; flex-direction: column; gap: 10px; padding: 24px; border: 1px solid var(--ui-border); border-radius: 16px; color: var(--ui-text); text-decoration: none; }
.fehu-hub-tile i { color: var(--ui-accent-strong); font-size: 1.4rem; }
.fehu-hub-tile span { color: var(--ui-muted); font-size: .875rem; }
.fehu-hub-tile:hover { background: var(--ui-accent-soft); color: var(--ui-text); border-color: var(--ui-accent-strong); }

/* Application progress and working area. */
body .fehu-form-panel { padding: 0; }
body .fehu-stepper { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 8px; padding: 20px 28px; border-bottom: 1px solid var(--ui-border); }
body .fehu-step { min-height: 48px; padding: 8px; border-radius: 12px; font-size: .8rem; background: var(--ui-surface-1); color: var(--ui-muted); }
body .fehu-step.is-active { background: var(--ui-accent-soft); color: var(--ui-accent-strong); }
body .fehu-step-panel { min-height: 340px; padding: 32px; }
body .fehu-grid--2 { grid-template-columns: repeat(2,minmax(0,1fr)); }
body .fehu-form-actions { padding: 20px 32px; background: var(--ui-surface-1); }
body .fehu-choice { min-height: 160px; padding: 24px; border-radius: 16px; box-shadow: none; }
body .fehu-choice strong { font-size: 1rem; }
body .fehu-choice small { font-size: .875rem; }
body .fehu-declarations label { min-height: 44px; padding-block: 12px; font-size: .9375rem; }
body .fehu-rail { gap: 16px; }
body :is(.fehu-doc-item, .fehu-summary-block) { box-shadow: none; border-radius: 16px; }
body .fehu-info-grid { gap: 24px; }

/* Feedback and overlays use the same palette as the parent page. */
body :is(.fehu-toast, .fa-toast, .fr-toast, .fehu-hub-error, .fehu-inline-note, .fehu-subsanacion-notice, .fr-reradicado-notice, .fa-locked-notice, .fa-inheritance-banner) { background: var(--ui-surface-1); color: var(--ui-text); border: 1px solid var(--ui-border); border-left: 3px solid var(--ui-accent-strong); border-radius: var(--ui-radius-control); font-size: .9rem; line-height: 1.5; font-weight: 400; }
body .fehu-hub-error { padding: 16px; margin-bottom: 24px; border-left-color: var(--ui-danger); }
body :is(.fehu-toast, .fa-toast, .fr-toast) { box-shadow: var(--ui-shadow-float); max-width: min(420px,calc(100vw - 32px)); }
body :is(.fa-confirm-dialog, .fehu-about-modal__card, .fr-about__dialog, .fr-subsanacion__dialog) { background: var(--ui-surface-1); color: var(--ui-text); border: 1px solid var(--ui-border); border-radius: 20px; max-height: calc(100dvh - 40px); overflow-y: auto; box-shadow: var(--ui-shadow-modal); }
body :is(.fa-confirm-dialog, .fehu-about-modal__card, .fr-about__dialog, .fr-subsanacion__dialog) h2 { color: var(--ui-accent-strong); }
body :is(.fa-topbar-panel, .fr-topbar-panel, .topbar-menu__panel) { border: 1px solid var(--ui-border); border-radius: 16px; box-shadow: var(--ui-shadow-float); background: var(--ui-surface-1); color: var(--ui-text); }
body :is(.fa-topbar-panel-action, .fr-topbar-panel-action, .topbar-menu__panel a) { min-height: 44px; background: var(--ui-surface-1); color: var(--ui-text); font-size: .8rem; }
body .topbar-menu__panel a:is(:hover, :focus-visible) { background: var(--ui-surface-2); color: var(--ui-text); }
body .topbar-menu__panel a.is-danger { color: var(--ui-danger); }
body .topbar-menu__panel a.is-danger:is(:hover, :focus-visible) { background: var(--ui-surface-2); color: var(--ui-danger); }
body :is(.fa-topbar-panel-action, .fr-topbar-panel-action):hover { background: var(--ui-surface-2); color: var(--ui-danger); }

/* Institutional footer: legible, neutral and secondary to the task. */
body .ua-footer-full, body .fa-main-shell > .ua-footer-full { margin-top: 0; padding: 32px 0 24px; border-top: 1px solid var(--ui-border); background: var(--ui-surface-1); color: var(--ui-text); }
body .ua-footer-inner { grid-template-columns: minmax(0,1.7fr) minmax(220px,1fr); gap: 36px; max-width: 1360px; padding: 0 32px; }
body .ua-footer-full .ua-footer-title { color: var(--ui-text); font-size: .875rem; font-weight: 600; margin-bottom: 10px; }
body .ua-footer-full :is(p, li) { font-size: .8rem; color: var(--ui-muted); }
body .ua-footer-full .ua-footer-legal { font-size: .75rem !important; line-height: 1.65; margin-top: 10px; }
body .ua-footer-logo { border: 0; border-radius: 4px; background: #fff; width: 132px; flex-basis: 132px; }
body .ua-footer-logo img { max-width: 124px; }
body .ua-footer-links { gap: 0; }
body .ua-footer-links a { min-height: 44px; color: var(--ui-muted); overflow-wrap: anywhere; }
body .ua-footer-links a:hover { color: var(--ui-accent-strong); }
body .ua-footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding-inline: 32px; font-size: .75rem; color: var(--ui-muted); }

/* Configuration forms keep two comfortable columns instead of a long row. */
body :is(.fa-general-form, .fa-general-hito-grid, .fa-doc-config-grid, .fa-stage-config-grid, .fa-responsible-config-grid, .fa-role-config-grid, .fa-user-role-config-grid) { grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; gap: 20px 24px; }
body :is(.fa-description-field, .fa-general-hito-actions) { grid-column: 1 / -1; }
body .fa-general-form > label:first-of-type { grid-column: 1 / -1; }
body :is(.fa-general-hito-grid, .fa-doc-config-grid, .fa-role-config-grid, .fa-user-role-config-grid) :is(label, input, select, textarea) { min-width: 0; }
body :is(.fa-description-field textarea, .fa-role-config-grid textarea, .fa-general-form textarea) { min-height: 112px; height: auto; }
body :is(.fa-general-active, .fa-general-hito-toggle) { min-height: 76px; background: var(--ui-surface-2); border-radius: 12px; padding: 14px 16px; }

/* One switch geometry for calendars, requirements, roles and assignments. */
body .fa-app .fa-toggle { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 44px; min-height: 44px; flex: 0 0 48px; margin: 0; padding: 0; cursor: pointer; vertical-align: middle; }
body .fa-app .fa-toggle input { position: absolute; inset: 0; width: 100%; height: 100%; min-width: 0; min-height: 0; margin: 0; padding: 0; border: 0; opacity: 0; cursor: inherit; z-index: 1; }
body .fa-app .fa-toggle > span { position: relative; display: block; inset: auto; width: 46px; height: 26px; flex: 0 0 46px; margin: 0; padding: 0; border: 1px solid var(--ui-border-strong); border-radius: 999px; background: var(--ui-surface-1); transition: background .18s ease,border-color .18s ease; }
body .fa-app .fa-toggle > span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; margin: 0; border: 0; border-radius: 50%; background: var(--ui-muted); transform: translateX(0); transition: transform .18s ease,background .18s ease; box-shadow: none; }
body .fa-app .fa-toggle input:checked + span { background: var(--fehu-action); border-color: var(--fehu-action); }
body .fa-app .fa-toggle input:checked + span::after { background: var(--fehu-on-action); transform: translateX(20px); }
body .fa-app .fa-toggle input:focus-visible + span { outline: 3px solid var(--ui-focus); outline-offset: 3px; }
body .fa-app .fa-toggle input:disabled { cursor: not-allowed; }
body .fa-app .fa-toggle input:disabled + span { opacity: .5; }
body .fa-app :is(.fa-general-active,.fa-general-hito-toggle) { display: flex; align-items: center; justify-content: space-between; gap: 16px; border: 1px solid var(--ui-border); }
body .fa-app :is(.fa-general-active,.fa-general-hito-toggle) > div { min-width: 0; flex: 1; }
body .fa-app :is(.fa-general-active,.fa-general-hito-toggle) > div > span { display: block; margin-bottom: 4px; color: var(--ui-muted); font: 500 .8rem/1.4 var(--ui-body); }
body .fa-app :is(.fa-general-active,.fa-general-hito-toggle) strong { display: block; color: var(--ui-text); font: 500 .9375rem/1.4 var(--ui-body); }

/* Context selectors follow their title; they do not pull headings to the bottom. */
body .fa-section-head { align-items: flex-start; gap: 20px; margin-bottom: 20px; }
body .fa-section-head:has(> .fa-program-select--context),
body .fa-section-head:has(> .fa-doc-selectors) { display: block; }
body .fa-section-head > .fa-program-select--context { margin-top: 20px; display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 20px 24px; align-items: start; }
body .fa-program-select label { display: block; min-width: 0; width: 100%; }
body .fa-doc-selectors { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); align-items: start; gap: 20px 24px; padding: 20px; margin-top: 20px; border: 1px solid var(--ui-border); border-radius: 16px; background: var(--ui-surface-2); }
body .fa-doc-selectors > * { min-width: 0; }
body .fa-program-select--context .fa-config-progress { width: 100%; margin-top: 0; }
body .fa-doc-selectors .fa-config-progress { margin-top: 16px; background: var(--ui-surface-1); }
body .fa-program-select--context > [data-fa-selected-config-progress] { align-self: end; }
body .fa-config-progress__steps span { margin: 0; font-weight: 500; }

/* Repeated records have a numbered start, a framed body and separated actions. */
body :is(.fa-general-hito-list,.fa-doc-list,.fa-milestones,.fa-stage-list,.fa-responsible-list,.fa-role-list,.fa-user-role-list) { display: grid; gap: 24px; padding: 16px; background: var(--ui-surface-2); border: 1px solid var(--ui-border); border-radius: 20px; }
body :is(.fa-general-hito-list,.fa-doc-list,.fa-milestones,.fa-stage-list,.fa-responsible-list,.fa-role-list,.fa-user-role-list):empty { display: none; }
body :is(.fa-doc-config,.fa-general-hito,.fa-stage-config,.fa-responsible-config,.fa-role-config,.fa-user-role-config) { padding: 24px; gap: 24px; border: 1px solid var(--ui-border-strong); background: var(--ui-surface-1); }
.fa-record-head { display: flex; align-items: center; gap: 12px; padding: 14px 24px; margin: -24px -24px 0; border-bottom: 1px solid var(--ui-border-strong); border-radius: 19px 19px 0 0; background: var(--ui-surface-2); }
.fa-record-head p { margin: 0; color: var(--ui-text); font: 600 .875rem/1.4 var(--ui-body); }
.fa-record-index { display: grid; place-items: center; min-width: 30px; height: 30px; padding: 0 6px; border-radius: 8px; color: var(--ui-accent-strong); background: var(--ui-accent-soft); font: 500 .8rem var(--ui-code); }
body .fa-app .fa-record-collapsible { padding: 0; gap: 0; }
body .fa-app .fa-record-collapsible .fa-record-head { display: block; margin: 0; padding: 0; letter-spacing: normal; }
.fa-record-toggle { display: grid; grid-template-columns: 30px minmax(0,1fr) auto 18px; align-items: center; gap: 14px; width: 100%; min-height: 80px; margin: 0; padding: 16px 24px; border: 0; border-radius: inherit; background: transparent; color: var(--ui-text); text-align: left; cursor: pointer; font: 500 var(--ui-action-text)/1.45 var(--ui-body); }
.fa-record-toggle:is(:hover,:focus-visible) { background: var(--ui-accent-soft); color: var(--ui-text); }
.fa-record-toggle:focus-visible { outline-offset: -3px; }
.fa-record-summary { display: grid; gap: 4px; min-width: 0; overflow-wrap: anywhere; }
.fa-record-kind { color: var(--ui-accent-strong); font: 500 .7rem/1.4 var(--ui-code); }
body .fa-app .fa-record-title { color: var(--ui-text); font: 600 .9375rem/1.4 var(--ui-body); }
.fa-record-meta { color: var(--ui-muted); font-size: .8rem; font-weight: 400; }
.fa-record-action { color: var(--ui-accent-strong); font-size: .75rem; white-space: nowrap; }
.fa-record-chevron { color: var(--ui-muted); transition: transform 240ms var(--ui-ease); }
.fa-record-panel { display: grid; gap: 24px; min-width: 0; padding: 24px; }
.fa-record-panel:not([hidden]) { animation: fehu-record-reveal 240ms var(--ui-ease); }
body .fa-app .fa-record-collapsible.is-record-collapsed .fa-record-head { border-bottom: 0; border-radius: 19px; }
.is-record-collapsed .fa-record-chevron { transform: rotate(-90deg); }
@keyframes fehu-record-reveal { from { opacity: .6; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
body :is(.fa-general-hitos,.fa-doc-program-section) { margin-top: 32px; padding-top: 28px; border-top: 2px solid var(--ui-border-strong); }
body .fa-app :is(.fa-general-hito-actions,.fa-doc-config-actions) { grid-column: 1 / -1; width: 100%; margin-top: 0; padding-top: 20px; border-top: 1px solid var(--ui-border); }
body .fa-app :is(.fa-general-hito-grid,.fa-doc-config-grid,.fa-role-config-grid,.fa-user-role-config-grid,.fa-stage-config-grid,.fa-responsible-config-grid) > label:not(.fa-toggle) { display: block; min-width: 0; }
body .fa-app :is(.fa-general-hito-grid,.fa-doc-config-grid,.fa-role-config-grid,.fa-user-role-config-grid,.fa-stage-config-grid,.fa-responsible-config-grid) > label:not(.fa-toggle) > span { display: block; margin-bottom: 6px; color: var(--ui-text); font: 500 .875rem/1.4 var(--ui-body); }
body .fa-app :is(.fa-general-hito-grid,.fa-doc-config-grid,.fa-role-config-grid,.fa-user-role-config-grid) > .fa-description-field { grid-column: 1 / -1; }
body .fa-doc-config-meta { grid-column: 1 / -1; }
body .fa-app :is(.fa-role-config-grid,.fa-user-role-config-grid) > label { grid-column: auto; }

/* Search icons retain their own space in every module. */
body .fa-app .fa-search-box input { padding-left: 44px; }
body .fa-search-box > i { left: 16px; width: 16px; line-height: 1; text-align: center; }
body .fr-search { min-height: 48px; border-color: var(--ui-border-strong); background: var(--ui-surface-1); padding: 0 14px; gap: 12px; }
body .fr-search > i { width: 18px; flex: 0 0 18px; line-height: 1; }
body .fr-app .fr-search input { min-width: 0; width: 100%; padding: 11px 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
body .fr-search:focus-within { outline: 2px solid var(--ui-focus); outline-offset: 2px; }
body .fr-app .fr-search input:focus { outline: 0; }
body .fr-support-grid { grid-template-columns: minmax(0,1fr); }
body :is(.fr-support-grid > *, .fr-ops-card, .fr-table-card) { min-width: 0; max-width: 100%; }
body .fr-table-wrap { width: 100%; }
body .fr-summary-grid { grid-template-columns: repeat(auto-fit,minmax(min(148px,100%),1fr)); }
body .fr-stat { padding: 18px; min-height: 104px; border-radius: 16px; }
body .fr-stat strong { font-family: var(--ui-code); font-weight: 500; color: var(--ui-text); }
body .topbar__brand { text-decoration: none; }
body .topbar__brand-system { font: 700 1.35rem var(--ui-display); color: var(--ui-text); letter-spacing: -.04em; }
body .topbar-menu__toggle { background: var(--ui-surface-1); color: var(--ui-text); border: 1px solid var(--ui-border); font: 560 .8rem var(--ui-body); min-height: 44px; border-radius: 12px; }
body .fehu-pill--draft { color: var(--fehu-info); }
body .fehu-pill--info { color: var(--fehu-info); }
body .fehu-local-nav nav a:not(.is-active) i { color: var(--ui-muted); }
body .fehu-local-nav nav a span { color: inherit; }
body .fehu-local-nav nav a.is-complete:not(.is-active) { color: var(--ui-accent-strong); }
body .fehu-entity-input-row { min-height: 48px; padding: 0 14px; border: 1px solid var(--ui-border-strong); border-radius: 12px; background: var(--ui-surface-1); }
body .fehu-app .fehu-entity-input-row input { min-width: 0; border: 0; padding-left: 0; background: transparent; box-shadow: none; }
body .fehu-entity-input-row:focus-within { outline: 2px solid var(--ui-focus); outline-offset: 2px; }
body .fehu-app .fehu-entity-input-row input:focus { outline: 0; }
.fehu-filter-trigger { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; min-height: 48px; padding: 11px 14px; border: 1px solid var(--ui-border-strong); border-radius: 12px; background: var(--ui-surface-1); color: var(--ui-text); font: 500 .8rem/1.4 var(--ui-body); text-align: left; }
.fehu-filter-trigger span { color: inherit !important; font-size: inherit !important; }
.fehu-filter-summary { padding: 0 18px 16px; margin: 0; color: var(--ui-muted); font-size: .8rem; }
.fehu-filter-overlay { position: fixed; inset: 0; z-index: 1200; display: grid; place-items: center; padding: 20px; background: rgb(0 0 0 / 50%); }
.fehu-filter-dialog { display: flex; flex-direction: column; width: min(680px,100%); max-height: calc(100dvh - 40px); border: 1px solid var(--ui-border); border-radius: 20px; background: var(--ui-surface-1); box-shadow: var(--ui-shadow-modal); overflow: hidden; }
.fehu-filter-dialog header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px; background: var(--ui-accent-soft); }
.fehu-filter-dialog header h2 { margin: 0; color: var(--ui-accent-strong); font-size: 1.4rem; }
.fehu-filter-body { padding: 24px; overflow-y: auto; overscroll-behavior: contain; }
.fehu-filter-body fieldset { min-width: 0; border: 0; margin: 0 0 24px; padding: 0; }
.fehu-filter-body fieldset:last-child { margin-bottom: 0; }
.fehu-filter-body legend { float: none; width: auto; font: 600 1rem var(--ui-body); margin-bottom: 12px; }
.fehu-filter-options { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(240px,100%),1fr)); gap: 10px; }
.fehu-filter-options label { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 12px 14px; border: 1px solid var(--ui-border); border-radius: 12px; font-size: .875rem; cursor: pointer; }
.fehu-filter-options label:has(input:checked) { background: var(--ui-accent-soft); border-color: var(--ui-accent-strong); color: var(--ui-accent-strong); }
.fehu-filter-options input { width: 18px; height: 18px; flex: 0 0 18px; }
.fehu-filter-body input[type="search"] { width: 100%; min-height: 48px; border: 1px solid var(--ui-border-strong); border-radius: 12px; padding: 12px; background: var(--ui-surface-1); color: var(--ui-text); margin-bottom: 16px; }
.fehu-filter-dialog footer { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 12px; padding: 20px 24px; border-top: 1px solid var(--ui-border); }
body :is(.fa-confirm-dialog, .fehu-about-modal__card, .fr-about__dialog) { padding: 28px; width: min(640px,calc(100vw - 32px)); }
body :is(.fa-confirm-dialog, .fehu-about-modal__card, .fr-about__dialog) h2 { background: var(--ui-accent-soft); padding: 16px 20px; margin: 0 0 20px; border-radius: 12px; font-size: 1.4rem; }
body :is(.fa-confirm-icon, .fehu-login-error-modal__icon) { width: 44px; height: 44px; font-size: 22px; background: var(--ui-accent-soft); color: var(--ui-accent-strong); margin-bottom: 16px; }
body :is(.fa-confirm-dialog, .fehu-about-modal__card, .fr-about__dialog) p { color: var(--ui-muted); font-size: 1rem; line-height: 1.6; }
@supports not (backdrop-filter: blur(1px)) { body :is(.topbar, .fehu-public-topbar, .fa-topbar, .fr-topbar) { background: var(--ui-canvas); } }
.fa-period-fields { min-width: 0; padding: 0; margin: 0; border: 0; }
.fa-catalog-count { flex-shrink: 0; padding: 10px 14px; border: 1px solid var(--ui-border); border-radius: 12px; color: var(--ui-muted); background: var(--ui-surface-2); }
.fa-catalog-count strong { color: var(--ui-text); }
.fa-catalog-notice { display: flex; align-items: flex-start; gap: 12px; padding: 16px; margin-bottom: 24px; background: var(--ui-surface-2); border: 1px solid var(--ui-border); border-radius: 12px; }
.fa-catalog-notice > i { color: var(--ui-accent-strong); flex-shrink: 0; }
.fa-catalog-notice p { margin: 0; color: var(--ui-muted); }
.fa-catalog-notice a { color: var(--ui-accent-strong); text-decoration: underline; }
.fa-catalog-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-block: 24px 16px; }
.fa-catalog-search-label { display: grid; gap: 8px; flex: 0 1 480px; min-width: 0; font-weight: 500; }
.fa-catalog-search-label .fa-search-box { display: block; width: 100%; }
.fa-catalog-toolbar > p { color: var(--ui-muted); margin: 0 0 12px; }
.fa-catalog-table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--ui-border-strong); border-radius: 16px; }
body .fa-catalog-table { width: 100%; border-collapse: collapse; min-width: 720px; margin: 0; }
body .fa-catalog-table :is(th,td) { padding: 16px 20px; vertical-align: middle; border-bottom: 1px solid var(--ui-border); text-align: left; color: var(--ui-text); background: var(--ui-surface-1); }
body .fa-catalog-table thead th { background: var(--ui-surface-2); font-size: .8rem; font-weight: 560; white-space: nowrap; }
body .fa-catalog-table tbody th { font-weight: 500; min-width: 240px; }
body .fa-catalog-table tbody tr:last-child > * { border-bottom: 0; }
body .fa-catalog-table tr.is-pending > * { background: var(--ui-accent-soft); }
.fa-catalog-table small { display: block; color: var(--ui-muted); font-size: .8rem; margin-top: 4px; overflow-wrap: anywhere; }
.fa-catalog-code { font-family: var(--font-mono, 'Google Sans Code', monospace); }
.fa-catalog-state { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.fa-catalog-state .fa-toggle { margin: 0; }
.fa-catalog-savebar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--ui-border); }
.fa-catalog-savebar > p { flex: 1 1 200px; margin: 0; color: var(--ui-muted); }
.fa-catalog-savebar > p.is-error { color: var(--ui-danger); }
body .fa-catalog-savebar .fa-actions { margin: 0; padding: 0; flex-wrap: wrap; }
@media (max-width: 767.98px) {
  .fa-catalog-toolbar { flex-wrap: wrap; gap: 12px; }
  .fa-catalog-toolbar > p { margin: 0; }
  .fa-catalog-search-label { flex-basis: 100%; }
  .fa-catalog-savebar .fa-actions { width: 100%; }
  .fa-catalog-savebar .fa-btn { flex: 1 1 160px; }
  body .fa-catalog-table { min-width: 0; display: block; }
  .fa-catalog-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .fa-catalog-table tbody { display: block; }
  .fa-catalog-table tr { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 16px; padding: 16px; border-bottom: 1px solid var(--ui-border-strong); }
  .fa-catalog-table tr:last-child { border-bottom: 0; }
  body .fa-catalog-table tr > :is(th,td) { padding: 0; border: 0; min-width: 0; background: transparent; }
  .fa-catalog-table tr.is-pending { background: var(--ui-accent-soft); }
  .fa-catalog-table th[scope="row"] { grid-column: 1; grid-row: 1; }
  .fa-catalog-table td:last-child { grid-column: 2; grid-row: 1; }
  .fa-catalog-table td[data-label] { grid-column: 1 / -1; }
  .fa-catalog-table td[data-label]::before { content: attr(data-label); display: block; font-size: .8rem; color: var(--ui-muted); margin-bottom: 4px; }
  .fa-catalog-state { flex-direction: column; gap: 0; font-size: .8rem; }
}
@media (max-width: 1100px) {
  body :is(.fehu-login-view, .fehu-staff-login) { gap: 32px; width: calc(100% - 48px); }
  body .fr-layout { grid-template-columns: minmax(0,1fr); }
  body :is(.fa-content, .fr-page-wrap, .fehu-main) { padding: 24px; }
}
@media (max-width: 767.98px) {
  body .topbar__inner { flex-direction: row; flex-wrap: nowrap; justify-content: space-between; gap: 12px; min-height: 68px; padding-block: 12px; }
  body .topbar__actions { width: auto; gap: 8px; flex: 0 0 auto; }
  body .topbar-menu__toggle { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; }
  body .topbar-menu__toggle > span, body .topbar-menu__caret, body .topbar__brand-app { display: none; }
  body .topbar-menu__panel { width: min(288px,calc(100vw - 32px)); }
  body :is(.fehu-public-topbar, .fa-topbar, .fr-topbar) { min-height: 68px; padding: 12px 16px; gap: 12px; }
  body .fehu-public-topbar { flex-direction: row; flex-wrap: nowrap; align-items: center; }
  body .fehu-public-topbar__context { width: auto; }
  body .fehu-public-actions { width: auto; flex: 0 0 auto; }
  body .fehu-top-user { padding: 0; }
  body .fehu-top-user button { width: 44px; height: 44px; min-width: 44px; border-radius: 12px; }
  .fehu-signature { width: 160px; flex-basis: 160px; }
  body :is(.fehu-public-title p, .fa-page-title-row > p, .fr-page-title-row > p, .fa-topbar-divider, .fr-topbar-divider, .fehu-public-divider, .fa-user-menu-copy, .fr-user-menu-copy, .fehu-top-user > span) { display: none; }
  body :is(.fa-topbar-context, .fr-topbar-context, .fehu-public-topbar__context) { flex: 1; gap: 12px; }
  body :is(.fehu-public-actions, .fa-top-actions, .fr-top-actions) { gap: 8px; }
  body :is(.fehu-public-title, .fa-page-title-row, .fr-page-title-row, .fa-icon-button, .fr-icon-button) { display: none; }
  body :is(.fehu-login-view, .fehu-staff-login) { width: calc(100% - 32px); grid-template-columns: minmax(0,1fr); gap: 28px; min-height: 0; padding: 32px 0; }
  body :is(.fehu-login-brand-panel, .fehu-staff-login__brand) h1 { font-size: 2rem; margin: 12px 0; }
  .fehu-login-identity { gap: 14px; margin-bottom: 20px; }
  .fehu-login-identity img { width: 56px; height: 56px; flex-basis: 56px; }
  body .fehu-login-identity strong { font-size: 1.7rem; }
  .fehu-login-identity .fehu-eyebrow { font-size: .65rem; }
  body :is(.fehu-login-view, .fehu-staff-login)::before { width: 95%; height: 300px; top: 0; left: 0; animation: none; }
  body :is(.fehu-login-view, .fehu-staff-login)::after { display: none; }
  body :is(.fehu-login-brand-panel, .fehu-staff-login__brand) h1 br { display: none; }
  body :is(.fehu-login-brand-panel, .fehu-staff-login__brand) > p:not(.fehu-eyebrow) { font-size: 1rem; max-width: 100%; margin-bottom: 10px; }
  body :is(.fehu-login-card, .fehu-staff-login__card) { padding: 24px; }
  body .fehu-hub-wrap:not(.is-login) { padding: 0 16px; margin-block: 24px; }
  body :is(.fa-content, .fr-page-wrap, .fehu-main) { padding: 24px 16px 32px; }
  body .fa-program-toolbar { grid-template-columns: minmax(0,1fr); }
  body .fa-doc-selectors, body .fa-section-head > .fa-program-select--context { grid-template-columns: minmax(0,1fr); }
  body .fa-doc-selectors { padding: 16px; }
  body :is(.fa-general-hito-list,.fa-doc-list,.fa-milestones,.fa-stage-list,.fa-responsible-list,.fa-role-list,.fa-user-role-list) { padding: 8px; gap: 20px; }
  body :is(.fa-doc-config,.fa-general-hito,.fa-stage-config,.fa-responsible-config,.fa-role-config,.fa-user-role-config) { padding: 16px; gap: 20px; }
  .fa-record-head { padding: 12px 16px; margin: -16px -16px 0; }
  .fa-record-toggle { grid-template-columns: 30px minmax(0,1fr) 18px; gap: 10px; padding: 16px; }
  .fa-record-action { display: none; }
  .fa-record-panel { padding: 16px; gap: 20px; }
  body :is(.fa-section-head, .fa-top) { flex-wrap: wrap; }
  body :is(.fa-main-shell, .fr-main-shell), body.sidebar-collapsed .fa-main-shell, body.fr-sidebar-collapsed .fr-main-shell { width: 100%; margin-left: 0; }
  body .fehu-shell, body .fehu-app.sidebar-collapsed .fehu-shell { display: block; }
  body :is(.fa-nav, .fr-nav, .fehu-local-nav), body.sidebar-collapsed .fa-nav, body.fr-sidebar-collapsed .fr-nav { position: fixed; top: 0; left: 0; bottom: 0; width: min(292px,calc(100vw - 44px)); min-height: 0; height: 100dvh; padding: 24px 16px; z-index: 1100; transform: translateX(-105%); visibility: hidden; display: flex; flex-direction: column; flex-wrap: nowrap; }
  body.fehu-menu-open :is(.fa-nav, .fr-nav, .fehu-local-nav) { transform: translateX(0); visibility: visible; box-shadow: var(--ui-shadow-float); }
  body.fehu-menu-open { overflow: hidden; }
  body .fehu-mobile-menu { display: inline-grid; }
  body .is-login-active .fehu-mobile-menu, body .fehu-app:has(.fehu-program-view:not([hidden])) .fehu-mobile-menu { display: none; }
  body :is(.fa-nav, .fr-nav, .fehu-local-nav) nav { display: flex !important; flex-direction: column; width: 100%; }
  body :is(.fa-nav, .fr-nav, .fehu-local-nav) nav a { width: 100% !important; padding: 12px 16px !important; justify-content: flex-start !important; }
  body :is(.fa-nav, .fr-nav, .fehu-local-nav) :is(nav a span, .fa-sidebar-link span, .fr-sidebar-link span, .fehu-side-action span) { display: inline !important; position: static !important; width: auto !important; height: auto !important; overflow: visible !important; }
  body .fehu-menu-backdrop { position: fixed; inset: 0; z-index: 1090; border: 0; background: rgb(0 0 0 / 45%); }
  body.fehu-menu-open .fehu-menu-backdrop { display: block; }
  body .fehu-stepper { grid-template-columns: minmax(0,1fr); padding: 16px 20px; }
  body .fehu-stepper .fehu-step:not(.is-active) { display: none; }
  body .fehu-step-panel { padding: 24px 20px; min-height: 0; }
  body :is(.fehu-grid--2, .fehu-beneficiary-grid, .fehu-review-grid, .fa-general-form, .fa-general-hito-grid, .fa-date-grid, .fa-doc-config-grid, .fa-stage-config-grid, .fa-responsible-config-grid, .fa-role-config-grid, .fa-user-role-config-grid, .fr-detail-grid) { grid-template-columns: minmax(0,1fr); }
  body :is(.fa-general-form, .fa-doc-config-grid, .fa-role-config-grid, .fa-user-role-config-grid) > * { grid-column: auto; }
  body .fehu-form-actions { padding: 16px 20px; }
  body .fehu-form-actions__right { display: flex; flex-wrap: wrap; }
  body :is(.fa-card, .fehu-panel, .fehu-hub-card) { padding: 20px; }
  body .fehu-rail { grid-template-columns: minmax(0,1fr); min-width: 0; }
  body .fehu-status-panel .fehu-panel__head { flex-wrap: wrap; }
  body .fehu-panel__head > div:first-child { min-width: 0; overflow-wrap: anywhere; }
  body .ua-footer-inner { grid-template-columns: minmax(0,1fr); padding: 0 20px; gap: 24px; }
  body .ua-footer-brand { flex-wrap: wrap; gap: 16px; }
  body .ua-footer-bottom { padding-inline: 20px; }
}
@media (max-width: 359.98px) {
  body :is(.fehu-public-topbar,.fa-topbar,.fr-topbar) { padding-inline: 12px; gap: 8px; }
  body :is(.fehu-public-topbar,.fa-topbar,.fr-topbar) .fehu-signature { width: 128px; flex-basis: 128px; }
}
@media (max-height: 700px) and (min-width: 768px) { body :is(.fehu-login-view, .fehu-staff-login) { min-height: 0; padding-block: 36px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }
@media (prefers-reduced-motion: reduce) { body :is(.fehu-login-view,.fehu-staff-login)::before { animation: none; } }
@media print {
  body .fa-app .fa-record-panel[hidden] { display: grid !important; }
  .fa-record-action, .fa-record-chevron { display: none; }
  html, body { background: white !important; color: black !important; }
  body :is(.fa-nav, .fr-nav, .fehu-local-nav, .fehu-theme-toggle, .fehu-mobile-menu, .fa-topbar, .fr-topbar, .fehu-public-topbar, .topbar, .fehu-form-actions, .fehu-menu-backdrop) { display: none !important; }
  body :is(.fa-main-shell, .fr-main-shell, .fehu-shell) { display: block; width: 100% !important; margin: 0 !important; }
  body :is(.fa-content, .fr-page-wrap, .fehu-main) { padding: 0; }
  body :is(.fa-card, .fr-card, .fehu-form-panel, .fehu-panel) { background: white; color: black; box-shadow: none; break-inside: avoid; }
}

/* Fehu · runa canónica y órbita POS. Solo gira .orbit-rotor. */
.rune-emblem { --orbit-period: 20s; --rune-size: 48px; }
.fehu-top-rune { display: inline-flex; align-items: center; flex: 0 0 auto; line-height: 0; }
.fehu-top-rune .rune-emblem { --rune-size: 44px; }
.fehu-login-identity .rune-emblem { --rune-size: 104px; }
.fehu-hub-brand .rune-emblem { --rune-size: 64px; }
.fehu-block-rune { display: inline-block; margin: 28px 0 12px; }
.fehu-block-rune .rune-emblem { --rune-size: 96px; }
body :is(.fehu-about-modal__mark, .fehu-about-rune, .fr-about__dialog) > .rune-emblem { --rune-size: 96px; margin-bottom: 16px; }
body .fehu-about-modal__mark { display: block; width: auto; height: auto; border: 0; background: transparent; }
body .fa-about-modal .fa-confirm-dialog { display: block; }
body .fa-about-modal .fa-confirm-actions { margin-top: 24px; }
body :is(.fa-brand, .fr-brand, .fehu-brand) { background: transparent; box-shadow: none; }
body :is(.fa-brand, .fr-brand) { min-width: 48px; min-height: 48px; }
html[data-fehu-motion="paused"] :is(.fehu-login-view, .fehu-staff-login)::before { animation-play-state: paused; }
html[data-fehu-motion="paused"] .rune-emblem .orbit-rotor { animation-play-state: paused; }
.fehu-motion-toggle {
  position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px;
  min-width: 44px; flex: 0 0 44px; padding: 0; border: 1px solid var(--ui-border-strong);
  border-radius: var(--ui-radius-control); background: var(--ui-surface-1); color: var(--ui-text);
  font-size: 1.25rem; cursor: pointer;
}
.fehu-motion-toggle:hover { background: var(--ui-surface-2); }
.fehu-motion-toggle[aria-pressed="true"] { color: var(--ui-accent-strong); border-color: var(--ui-accent-strong); }
.fehu-motion-toggle[aria-disabled="true"] { cursor: default; }
.fehu-theme-toggle { position: relative; }
[data-fehu-hint]::after {
  content: attr(data-fehu-hint); position: absolute; z-index: 1300; top: calc(100% + 8px); right: 0;
  width: max-content; max-width: min(240px, calc(100vw - 32px)); padding: 8px 12px;
  border: 1px solid var(--ui-border-strong); border-radius: 8px; background: var(--ui-surface-1);
  color: var(--ui-text); font: 400 .8rem/1.4 var(--ui-body); box-shadow: var(--ui-shadow-float);
  pointer-events: none; opacity: 0; visibility: hidden;
}
[data-fehu-hint]:is(:hover,:focus-visible)::after { opacity: 1; visibility: visible; }
[data-fehu-hint][data-hint-dismissed="true"]::after { opacity: 0; visibility: hidden; }
body .fehu-block-card .fehu-motion-toggle { position: absolute; top: 14px; right: 66px; }

/* La identidad permanece visible cuando la barra lateral está contraída. */
body :is(.fehu-public-topbar__context, .fa-topbar-context, .fr-topbar-context) { gap: 14px; min-width: 0; }
body :is(.fehu-public-title, .fa-page-title-row, .fr-page-title-row) { min-width: 0; }
body :is(.fa-page-title-row, .fr-page-title-row) > span { display: none; }
body :is(.fa-page-title-row, .fr-page-title-row) { flex-wrap: wrap; gap: 2px 12px; }
body :is(.fa-page-title-row, .fr-page-title-row) > p { margin: 0; }
body :is(.fa-top-actions, .fr-top-actions, .fehu-public-actions) { gap: 8px; flex-shrink: 0; }
body :is(.fa-user-menu, .fr-user-menu) { min-height: 44px; }
body :is(.fa-user-menu-copy, .fr-user-menu-copy) strong { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body :is(.fa-user-panel, .fr-user-panel) { max-height: min(640px, calc(100dvh - 120px)); overflow-y: auto; }

/* Barra de funcionarios: identidad, accesos globales y preferencias. */
body .topbar { position: sticky; color-scheme: inherit; }
body.fehu-staff-body { padding-top: 0; }
body .topbar__inner { width: 100%; min-height: 84px; display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); gap: 20px; }
body .topbar__brand { width: auto; gap: 14px; }
body .topbar__brand-app { gap: 10px; }
.fehu-global-nav { justify-self: center; }
body .topbar__actions { justify-self: end; margin: 0; gap: 8px; }
.fehu-session-name { display: inline-block; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body .topbar-menu__panel { background: var(--ui-surface-1); border-color: var(--ui-border); color: var(--ui-text); border-radius: 20px; box-shadow: var(--ui-shadow-float); max-width: calc(100vw - 32px); }
body .topbar-menu__panel a { min-height: 44px; color: var(--ui-text); font: 560 .8rem/1.4 var(--ui-body); text-decoration: none; }
body .topbar-menu__panel a:hover { background: var(--ui-accent-soft); color: var(--ui-accent-strong); }
body .topbar-menu__panel a.is-danger { color: var(--ui-danger); border-top: 1px solid var(--ui-border); margin-top: 8px; }
body .topbar-user-card { background: var(--ui-surface-2); color: var(--ui-text); }
body :is(.topbar-user-card__label, .topbar-user-card__role) { color: var(--ui-muted); }
body .topbar-menu__toggle { box-shadow: none; }
body .topbar-menu__toggle:hover { color: var(--ui-accent-strong); background: var(--ui-accent-soft); transform: none; }
body .fehu-hub-wrap.is-login { padding-top: 0; }
body .fr-ops-card__head > div { min-width: 0; }
body .fr-ops-card__sub { white-space: normal; overflow-wrap: anywhere; }

@media (min-width: 768px) and (max-width: 1199.98px) {
  body :is(.fehu-public-title p, .fa-page-title-row > p, .fr-page-title-row > p, .fa-user-menu-copy, .fr-user-menu-copy) { display: none; }
  body .topbar__inner { grid-template-columns: auto 1fr auto; gap: 12px; }
  .fehu-session-name { max-width: 90px; }
  body .topbar__brand .fehu-signature { width: 160px; flex-basis: 160px; }
}
@media (max-width: 767.98px) {
  :root { --topbar-h: 128px; }
  body :is(.fehu-public-topbar, .fa-topbar, .fr-topbar) {
    display: grid; grid-template-columns: 44px minmax(0,1fr) auto; gap: 10px 12px; padding: 12px 16px;
  }
  body :is(.fehu-public-topbar__context, .fa-topbar-context, .fr-topbar-context) { grid-column: 1 / -1; grid-row: 1; width: 100%; gap: 12px; }
  body :is(.fehu-public-title, .fa-page-title-row, .fr-page-title-row) { display: flex; }
  body :is(.fehu-public-title p, .fa-page-title-row > p, .fr-page-title-row > p) { display: none; }
  body :is(.fehu-public-actions, .fa-top-actions, .fr-top-actions) { grid-column: 2 / -1; grid-row: 2; justify-self: end; width: auto; }
  body :is(.fehu-public-topbar, .fa-topbar, .fr-topbar) > .fehu-mobile-menu { grid-row: 2; grid-column: 1; }
  body :is(.fehu-public-topbar, .fa-topbar, .fr-topbar, .topbar__brand) .fehu-signature { width: 140px; flex-basis: 140px; }
  .fehu-top-rune .rune-emblem { --rune-size: 40px; }
  .fehu-login-identity .rune-emblem { --rune-size: 80px; }
  body .topbar__inner { grid-template-columns: auto minmax(0,1fr); gap: 10px; padding: 12px 16px !important; }
  body .topbar__brand { grid-column: 1 / -1; gap: 12px; }
  body .topbar__brand-app { display: flex; }
  body .fehu-global-nav .topbar-menu__toggle { display: inline-flex; width: auto; height: 44px; }
  body .fehu-global-nav .topbar-menu__toggle > span { display: inline; }
  body .fa-about-summary { grid-template-columns: minmax(0,1fr); }
  .fehu-global-nav { grid-row: 2; grid-column: 1; justify-self: start; }
  body .topbar__actions { grid-row: 2; grid-column: 2; width: auto; }
  body .topbar-menu { flex: 0 0 auto; }
  body .topbar-menu__toggle { padding: 10px; gap: 8px; width: auto; }
  body .topbar__actions .topbar-menu__toggle { width: 44px; justify-content: center; }
  body .topbar__actions .topbar-menu__toggle :is(.fehu-session-name, .topbar-menu__caret) { display: none; }
  body .topbar__actions .topbar-menu__panel { position: fixed; left: auto; right: 16px; top: 124px; }
  body .fehu-global-nav .topbar-menu__panel { left: 0; right: auto; }
  body :is(.fa-topbar-panel, .fr-topbar-panel) { position: fixed; top: 124px; left: 16px; right: 16px; width: auto; max-height: calc(100dvh - 140px); }
}
@media print {
  .fehu-motion-toggle, [data-fehu-hint]::after { display: none !important; }
  .rune-emblem .orbit-rotor { animation: none !important; }
}

/* Guía de consulta: recorrido principal y retorno opcional a revisión. */
.fa-process { width: 100%; min-width: 0; }
.fa-process-intro { margin-bottom: 32px; }
.fa-process-intro > p:not(.fehu-eyebrow) { max-width: 76ch; color: var(--ui-muted); margin-bottom: 20px; }
.fa-process-jumps { display: flex; flex-wrap: wrap; gap: 8px; }
.fa-process-jumps a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 10px 16px;
  border: 1px solid var(--ui-border-strong); border-radius: var(--ui-radius-control);
  color: var(--ui-accent-strong); background: var(--ui-surface-1);
  font: 560 .8rem/1.4 var(--ui-body); text-decoration: none;
}
.fa-process-jumps a:hover { background: var(--ui-accent-soft); text-decoration: underline; text-underline-offset: 3px; }
.fa-process-steps { list-style: none; margin: 0; padding: 0; }
.fa-process-steps > li {
  position: relative; display: grid; grid-template-columns: 44px minmax(0,1fr);
  gap: 24px; padding-bottom: 32px; scroll-margin-top: 100px;
}
.fa-process-steps > li:not(:last-child)::before {
  content: ""; position: absolute; top: 52px; bottom: 8px; left: 21px;
  width: 2px; background: var(--ui-border-strong);
}
.fa-process-number {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
  color: var(--ui-accent-strong); background: var(--ui-accent-soft); font: 500 1rem/1 var(--ui-code);
}
.fa-process-copy { min-width: 0; padding-bottom: 28px; border-bottom: 1px solid var(--ui-border); }
body .fa-process-copy h2 { font-size: clamp(1.35rem, 2vw, 1.75rem); margin: 6px 0 16px; }
.fa-process-copy > p { max-width: 76ch; }
.fa-process-owner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; color: var(--ui-accent-strong); font-size: .8rem; }
.fa-process-facts { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,2fr); gap: 16px 24px; margin: 22px 0; }
.fa-process-facts dt { margin-bottom: 4px; color: var(--ui-muted); font: 500 .75rem/1.5 var(--ui-code); }
.fa-process-facts dd { margin: 0; font-size: 1rem; }
.fa-process-note { color: var(--ui-muted); font-size: .875rem; margin: 16px 0 0; }
.fa-process-return {
  margin-top: 24px; padding: 24px; border: 1px solid var(--ui-border);
  border-left: 3px solid var(--ui-accent-strong); border-radius: 20px; background: var(--ui-surface-1);
}
body .fa-process h3 { font-size: 1.125rem; margin: 0 0 14px; line-height: 1.5; }
.fa-process h3 i { color: var(--ui-accent-strong); margin-right: 6px; }
.fa-process-return ol { margin: 0; padding-left: 22px; }
.fa-process-return li + li { margin-top: 14px; }
.fa-process-return > p { margin: 16px 0 0; color: var(--ui-muted); font-size: .875rem; }
.fa-process-outcomes { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px; margin: 24px 0; }
.fa-process-outcomes section { padding: 20px; border: 1px solid var(--ui-border); border-radius: 20px; background: var(--ui-surface-1); }
.fa-process-outcomes p { margin: 0; }
.fa-process-outcomes section:last-child h3 i { color: var(--ui-danger); }
.fa-process-context { padding: 24px; border: 1px solid var(--ui-border); border-radius: 20px; background: var(--ui-surface-1); }
body .fa-process-context h2 { font-size: 1.35rem; margin: 0 0 12px; }
.fa-process-context p { max-width: 76ch; color: var(--ui-muted); }
.fa-process-context-links { display: flex; flex-wrap: wrap; gap: 12px 28px; }
@media (max-width: 767.98px) {
  .fa-process-steps > li { grid-template-columns: 32px minmax(0,1fr); gap: 12px; scroll-margin-top: 148px; }
  .fa-process-number { width: 32px; height: 32px; border-radius: 8px; font-size: .8rem; }
  .fa-process-steps > li:not(:last-child)::before { left: 15px; top: 40px; }
  .fa-process-facts, .fa-process-outcomes { grid-template-columns: minmax(0,1fr); gap: 16px; }
  .fa-process-return, .fa-process-context, .fa-process-outcomes section { padding: 16px; }
}
@media print {
  .fa-process-jumps, .fa-process-context-links { display: none; }
  .fa-process-steps > li { break-inside: avoid; scroll-margin-top: 0; }
  .fa-process { max-width: none; }
}

/* Revisor: un destino por vista y navegación en orden del proceso. */
body .fr-sidebar-head { margin-bottom: 16px; flex-shrink: 0; }
body .fr-sidebar-nav { gap: 12px; flex-shrink: 0; }
.fr-nav-group { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fr-nav-group-label { color: var(--ui-muted); margin: 0 12px 4px; font: 500 .7rem/1.5 var(--ui-code); }
body.fr-sidebar-collapsed .fr-nav-group-label { display: none; }
body.fr-sidebar-collapsed .fr-nav-group + .fr-nav-group { padding-top: 8px; border-top: 1px solid var(--ui-border); }
body .fr-sidebar-foot { margin-top: auto; flex-shrink: 0; }
.fr-view, .fr-state-guide { min-width: 0; }
body .fr-view > .fr-summary-grid { grid-template-columns: repeat(auto-fit,minmax(min(100%,200px),1fr)); margin-bottom: 24px; }
body .fr-view > .fr-summary-grid .fr-stat { min-height: 100px; }
body .fr-view > .fr-summary-grid .fr-stat p { overflow-wrap: normal; word-break: normal; }
.fr-view > :is(.fr-info-section, .fr-ops-card, .fr-cohort), .fr-state-guide { width: 100%; max-width: none; }
.fr-view-help { margin: 0 0 24px; color: var(--ui-muted); }
.fr-view-help a, .fr-inbox-hint a, .fr-state-guide a { color: var(--ui-accent-strong); text-underline-offset: 3px; }
.fr-inbox-hint { margin: 0; padding: 16px 20px 0; color: var(--ui-muted); font-size: .875rem; }
.fr-detail-empty { padding: 24px; }
.fr-guide-lead { max-width: 76ch; color: var(--ui-muted); }
.fr-guide-section { margin-top: 36px; scroll-margin-top: 100px; }
body .fr-guide-section h2 { font-size: clamp(1.35rem,2vw,1.75rem); margin: 0 0 16px; }
.fr-guide-section > p { max-width: 76ch; }
.fr-state-table { min-width: 760px; }
.fr-state-table caption { caption-side: top; color: var(--ui-muted); padding: 12px 0; font-size: .875rem; }
.fr-state-table th:first-child { width: 20%; }
.fr-state-table th:last-child { width: 45%; }
.fr-state-table td, .fr-state-table tbody th { vertical-align: top; white-space: normal; }
.fr-state-table tbody th { font: 500 .8rem/1.6 var(--ui-body); }
.fr-state-definitions { margin: 0; }
.fr-state-definitions > div { display: grid; grid-template-columns: minmax(140px,1fr) minmax(0,4fr); gap: 24px; padding: 20px 0; border-bottom: 1px solid var(--ui-border); }
.fr-state-definitions dt { color: var(--ui-accent-strong); font-weight: 560; }
.fr-state-definitions dd { margin: 0; max-width: 76ch; }
@media (max-width: 767.98px) {
  body.fr-sidebar-collapsed .fr-nav-group-label { display: block; }
  body.fr-sidebar-collapsed .fr-nav-group + .fr-nav-group { border: 0; padding-top: 0; }
  .fr-state-definitions > div { grid-template-columns: minmax(0,1fr); gap: 8px; }
  .fr-guide-section { scroll-margin-top: 148px; }
}
@media print {
  .fr-state-table { min-width: 0; }
  .fr-state-definitions > div { break-inside: avoid; }
}

/* Bandeja de ancho completo; la revisión conserva su propio espacio. */
body .fr-inbox-layout { grid-template-columns: minmax(0,1fr); }
body .fr-inbox-scroll { max-height: 72vh; border-radius: 0 0 20px 20px; }
body .fr-inbox-table { min-width: 1180px; table-layout: fixed; }
.fr-inbox-table .fr-col-check { width: 48px; }
.fr-inbox-table .fr-col-person { width: 26%; }
.fr-inbox-table .fr-col-program { width: 24%; }
.fr-inbox-table .fr-col-state { width: 18%; }
.fr-inbox-table .fr-col-date { width: 144px; }
.fr-inbox-table .fr-col-docs { width: 92px; }
.fr-inbox-table .fr-col-open { width: 96px; }
body .fr-inbox-table :is(td,th) { padding: 16px; white-space: normal; overflow-wrap: normal; word-break: normal; vertical-align: top; }
body .fr-inbox-table thead th { position: sticky; top: 0; z-index: 3; vertical-align: middle; }
body .fr-inbox-table :is(td,th):first-child { padding: 16px 4px; }
body .fr-inbox-table .fr-th-sortable { text-align: left; white-space: normal; }
body .fr-inbox-table .fr-badge { white-space: normal; line-height: 1.5; }
body .fr-inbox-table small { margin-top: 7px; line-height: 1.6; }
.fr-person-link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 560; color: var(--ui-accent-strong); text-underline-offset: 3px; line-height: 1.6; }
.fr-person-code { font-family: var(--ui-code); }
body .fr-inbox-table .fr-program-name { font-weight: 500; line-height: 1.6; }
.fr-date-value { white-space: nowrap; font-family: var(--ui-code); }
.fr-open-request { display: inline-flex; min-height: 44px; gap: 8px; align-items: center; color: var(--ui-accent-strong); font-weight: 560; text-underline-offset: 3px; }
.fr-request-view { width: 100%; min-width: 0; }
.fr-request-toolbar { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; margin-bottom: 20px; }
.fr-request-toolbar p { margin: 0; color: var(--ui-muted); font-size: .875rem; }
.fr-request-view .fr-detail__header { padding: 24px; }
.fr-load-status { padding: 16px 24px; border-bottom: 1px solid var(--ui-border); display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }

/* Agenda: un hito compartido conserva el contexto de todos sus programas. */
.fr-calendar { width: 100%; min-width: 0; }
.fr-calendar-tools { display: grid; gap: 24px; }
body .fr-calendar h2 { font-size: 1.35rem; margin: 0 0 10px; }
.fr-calendar-tools p { margin: 0; color: var(--ui-muted); max-width: 76ch; }
.fr-calendar-filters { display: grid; grid-template-columns: 1fr 2fr 1fr; gap: 16px; }
.fr-calendar-filters label { display: grid; gap: 8px; min-width: 0; }
.fr-calendar-filters label > span { color: var(--ui-muted); font-size: .8rem; }
.fr-calendar-filters .fehu-filter-trigger { width: 100%; min-width: 0; text-align: left; justify-content: space-between; }
.fr-calendar-filters .fehu-filter-trigger span { min-width: 0; white-space: normal; }
.fr-calendar-result { margin: 24px 0 0; color: var(--ui-accent-strong); font: 500 .8rem/1.6 var(--ui-code); }
.fr-calendar-period { margin-top: 32px; }
.fr-calendar-events { display: grid; gap: 16px; }
.fr-calendar-event { display: grid; grid-template-columns: 100px minmax(0,1fr); gap: 28px; padding: 24px; border: 1px solid var(--ui-border); border-radius: 20px; background: var(--ui-surface-1); }
.fr-calendar-date { color: var(--ui-accent-strong); text-align: center; border-right: 1px solid var(--ui-border); padding-right: 24px; }
.fr-calendar-date time { display: grid; gap: 4px; }
.fr-calendar-date strong { font: 650 2.4rem/1.2 var(--ui-display); }
.fr-calendar-date span { display: block; font: 500 .8rem/1.6 var(--ui-code); }
.fr-calendar-timing { color: var(--ui-muted); font: 500 .75rem/1.5 var(--ui-code); }
body .fr-calendar h3 { font-size: 1.125rem; line-height: 1.5; margin: 6px 0 12px; }
.fr-calendar-copy > p { max-width: 76ch; margin-bottom: 12px; }
.fr-calendar-owner { font-size: .875rem; color: var(--ui-muted); }
.fr-calendar-programs { margin-top: 16px; border-top: 1px solid var(--ui-border); }
.fr-calendar-programs summary { min-height: 44px; padding: 12px 0; cursor: pointer; color: var(--ui-accent-strong); font-size: .8rem; font-weight: 560; }
.fr-calendar-programs summary span + span { margin-left: 16px; color: var(--ui-muted); font-weight: 400; }
.fr-calendar-programs ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px 24px; }
.fr-calendar-programs li { display: grid; gap: 4px; font-size: .875rem; }
.fr-calendar-programs small { font-family: var(--ui-code); color: var(--ui-muted); }
.fr-calendar-empty { margin-top: 24px; }
@media (max-width: 767.98px) {
  .fr-calendar-filters { grid-template-columns: minmax(0,1fr); }
  .fr-calendar-event { grid-template-columns: 60px minmax(0,1fr); gap: 16px; padding: 16px; }
  .fr-calendar-date { padding-right: 12px; }
  .fr-calendar-date strong { font-size: 1.8rem; }
  .fr-calendar-programs ul { grid-template-columns: minmax(0,1fr); }
  .fr-calendar-programs summary span + span { display: block; margin: 4px 0 0; }
}
@media print {
  body .fr-inbox-scroll { max-height: none; overflow: visible; }
  body .fr-inbox-table { min-width: 0; table-layout: auto; }
  .fr-request-toolbar, .fr-calendar-filters { display: none; }
  .fr-calendar-event { break-inside: avoid; }
}

/* Session controls: one identity block and quiet secondary actions. */
body :is(.fa-user-panel, .fr-user-panel) { width: 304px; min-width: 0; padding: 8px; border-radius: 20px; box-shadow: 0 8px 28px rgba(12, 25, 20, .12); }
body :is(.fa-topbar-user-card, .fr-topbar-user-card) { padding: 12px 40px 16px 8px; gap: 12px; background: transparent; border: 0; }
body :is(.fa-topbar-user-card, .fr-topbar-user-card) > div { min-width: 0; }
body :is(.fa-topbar-user-card, .fr-topbar-user-card) strong { font-size: .9375rem; font-weight: 560; overflow-wrap: anywhere; }
body :is(.fa-topbar-user-card, .fr-topbar-user-card) small { margin-top: 4px; font-size: .8rem; line-height: 1.5; color: var(--ui-muted); }
body :is(.fa-user-menu, .fr-user-menu) strong { font-weight: 560; }
.fehu-session-close { position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 12px; background: transparent; color: var(--ui-muted); cursor: pointer; }
.fehu-session-close:hover { color: var(--ui-text); background: var(--ui-surface-2); }
.fehu-session-context { margin: 0; padding: 0 8px 12px; font-size: .8rem; color: var(--ui-muted); overflow-wrap: anywhere; }
.fehu-session-switch { border-top: 1px solid var(--ui-border); }
.fehu-session-switch summary { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px 8px; cursor: pointer; list-style: none; border-radius: 12px; font-size: .8rem; font-weight: 560; }
.fehu-session-switch summary::-webkit-details-marker { display: none; }
.fehu-session-switch summary > :last-child { margin-left: auto; font-size: .75rem; }
.fehu-session-switch[open] summary > :last-child { transform: rotate(180deg); }
.fehu-session-switch summary:hover { background: var(--ui-surface-2); }
body .fehu-session-switch .fa-view-as-form { padding: 4px 8px 16px; border: 0; border-radius: 0; background: transparent; gap: 12px; }
body .fehu-session-switch .fa-view-as-form span { font-size: .8rem; font-weight: 500; }
body .fehu-session-switch .fa-view-as-form .fa-btn { background: var(--ui-surface-1); border: 1px solid var(--ui-border-strong); }
body .fehu-session-switch .fa-view-as-form .fa-btn :is(span, i) { color: var(--ui-text); font-weight: 560; }
body :is(.fa-user-panel, .fr-user-panel) :is(.fa-topbar-panel-action, .fr-topbar-panel-action) { justify-content: flex-start; padding: 12px 8px; border-top: 1px solid var(--ui-border); border-radius: 0 0 12px 12px; font-weight: 560; gap: 10px; }

/* The shell follows the sidebar; content panels use all of that space. */
.fa-access .fa-section-head { align-items: flex-start; flex-wrap: wrap; gap: 16px; }
.fa-access-state { color: var(--ui-accent-strong); font-size: 1rem; }
.fa-access-choice { display: flex; align-items: center; gap: 12px; min-height: 60px; cursor: pointer; margin: 16px 0; }
.fa-access-choice input { width: 22px; height: 22px; flex: 0 0 22px; accent-color: var(--fehu-action); }
.fa-access-choice strong, .fa-access-choice small { display: block; }
.fa-access-choice small, .fa-access-audit { color: var(--ui-muted); }
.fa-access-choice small { margin-top: 4px; }
.fa-access :is(#faAccessHelp, .fa-access-conditions p) { max-width: 78ch; }
.fa-access-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin: 24px 0 16px; }
.fa-access-actions p { margin: 0; flex: 1 1 240px; font-size: .9rem; }
.fa-access-audit { font-size: .8rem; overflow-wrap: anywhere; }
.fa-access-conditions { border-top: 1px solid var(--ui-border); padding-top: 24px; margin-top: 24px; }
.fa-access-conditions h3 { font-size: 1.1rem; margin-bottom: 16px; }
.fa-access-conditions ol { padding-left: 24px; }
.fa-access-conditions li { padding: 4px 0; }
.fa-access-conditions a { color: var(--ui-accent-strong); text-underline-offset: 3px; }
.fehu-access-notice { color: var(--ui-muted); line-height: 1.6; }
body :is(.fehu-experience, .fehu-main, .fa-content, .fr-page-wrap) { width: 100%; max-width: none; }
@media (max-width: 767.98px) {
  body :is(.fa-user-panel, .fr-user-panel) { width: auto; }
}

/* Reportes: el marco de la tabla mide como la pantalla (fehu-ui.js fija su alto maximo) y desplaza en ambos
   sentidos; encabezado y primera columna quedan fijos para no perder el contexto al moverse. */
.fehu-tabla-marco { overflow: auto; max-height: 70vh; overscroll-behavior-x: contain; position: relative; }
.fehu-tabla-marco:focus-visible { outline: 3px solid var(--ui-focus); outline-offset: -3px; }
.fehu-tabla-marco > table { border-collapse: separate; border-spacing: 0; }
.fehu-tabla-marco thead th { position: sticky; top: 0; z-index: 2; box-shadow: inset 0 -1px 0 var(--ui-border); }
.fehu-tabla-marco--fija :is(th, td):first-child { position: sticky; left: 0; z-index: 1; background: var(--ui-surface-1); box-shadow: inset -1px 0 0 var(--ui-border); }
.fehu-tabla-marco--fija thead th:first-child { z-index: 3; background: var(--ui-surface-2); box-shadow: inset -1px 0 0 var(--ui-border), inset 0 -1px 0 var(--ui-border); }
.fehu-tabla-marco tbody tr[hidden] { display: none; }
.fehu-tabla-barra { overflow-x: auto; overflow-y: hidden; height: 18px; margin-bottom: 4px; }
.fehu-tabla-barra[hidden] { display: none; }
.fehu-tabla-barra > div { height: 1px; }

/* Buscador local de las tablas de reporte (busqueda, no filtro: no cambia la consulta). */
.fehu-tabla-buscar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 0 0 12px; }
.fehu-tabla-buscar__campo { position: relative; flex: 1 1 320px; max-width: 520px; }
.fehu-tabla-buscar__campo > i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ui-muted); pointer-events: none; }
.fehu-tabla-buscar__campo input { width: 100%; min-height: 44px; padding: 8px 46px 8px 40px; border: 1px solid var(--ui-border); border-radius: var(--ui-radius-control); background: var(--ui-surface-1); color: var(--ui-text); font: inherit; outline: none; }
.fehu-tabla-buscar__campo input::placeholder { color: var(--ui-muted); }
.fehu-tabla-buscar__campo input:focus-visible { border-color: var(--ui-focus); box-shadow: 0 0 0 3px var(--ui-accent-soft); }
.fehu-tabla-buscar__campo input::-webkit-search-cancel-button { display: none; }
.fehu-tabla-buscar__limpiar { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: var(--ui-radius-control); background: transparent; color: var(--ui-muted); cursor: pointer; }
.fehu-tabla-buscar__limpiar[hidden] { display: none; }
.fehu-tabla-buscar__limpiar:is(:hover, :focus-visible) { color: var(--ui-text); background: var(--ui-surface-2); }
.fehu-tabla-buscar__conteo { margin: 0; color: var(--ui-muted); font-size: .9rem; font-family: "Google Sans Code", ui-monospace, monospace; }
.fehu-tabla-buscar__vacio { margin: 12px 0 0; padding: 14px 16px; border: 1px solid var(--ui-border); border-radius: var(--ui-radius-control); background: var(--ui-surface-1); color: var(--ui-muted); }
.fehu-tabla-buscar__vacio[hidden] { display: none; }
@media (max-width: 767.98px) { .fehu-tabla-buscar__campo { max-width: none; } }
