/* Estandarizadas: study UI, host-local tokens; shared Admisión styles are unchanged. */
:root {
    --app-border-radius-xs: 8px; --app-border-radius-sm: 8px;
    --app-border-radius: 8px; --app-border-radius-lg: 8px;
    --bottom-nav-height: 80px; --bottom-nav-clearance: calc(96px + env(safe-area-inset-bottom, 0px));
    --bottom-nav-compact-clearance: var(--bottom-nav-clearance);
}
* { box-sizing: border-box; }
body { margin: 0; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: var(--font-body); line-height: 1.5; color: var(--mud-palette-text-primary, var(--preboot-ink)); background: var(--mud-palette-background, var(--preboot-bg)); }
h1, h2, h3, h4, h5, h6 { font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-style: normal; text-wrap: balance; }
h1 { font-size: var(--font-headline); line-height: 1.25; margin: 0 0 16px; font-weight: 800; }
h2 { font-size: var(--font-title); line-height: 1.5; margin: 0 0 16px; font-weight: 700; }
h3 { font-size: var(--font-body); line-height: 1.5; font-weight: 600; }
p { margin: 0 0 16px; }
a { color: var(--app-study-link); text-underline-offset: 8px; }
button:not(.mud-button-root) { font: inherit; }
:is(button, a, input, textarea, select, summary):focus-visible { outline: 2px solid var(--mud-palette-text-primary); outline-offset: 8px; }
::selection { background: var(--app-study-action); color: var(--mud-palette-primary-text); }
input, textarea { caret-color: var(--mud-palette-text-primary); }
body:has(dialog[open]) { overflow: hidden; }
.skip-link { position: absolute; left: -10000px; }
.skip-link:focus { left: 16px; top: 16px; z-index: 9999; background: var(--mud-palette-surface); padding: 16px; }
#blazor-error-ui { display: none; position: fixed; inset: auto 0 0; padding: 16px; background: var(--mud-palette-surface); z-index: 9999; }
.main-content, .header-big.estandarizadas-header { max-width: 768px; width: calc(100% - 32px); margin: 0 auto; }
.header-big.estandarizadas-header { padding: 32px 0 0; text-align: left; background: transparent; color: var(--mud-palette-text-primary); border: 0; border-radius: 0; min-height: 0; }
.title-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 16px; }
.estandarizadas-header h1 { margin: 0; font-size: var(--font-headline); font-weight: 800; }
.study-description { margin: 8px 0 0; max-width: 72ch; }
body .study-content { padding: 32px 0; overflow-wrap: anywhere; }
.study-section { min-width: 0; margin: 0; padding: 0; border: 0; background: transparent; }
.study-section + .study-section { margin-top: 32px; }
.study-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.study-meta { font-size: var(--font-label); font-weight: 400; }
.study-details { margin-top: 16px; }
.study-details summary { cursor: pointer; min-height: 48px; padding: 8px 0; }
.study-details p { margin: 0 0 8px; }
/* Keep form boundaries; remove layout-only cards and component decoration. */
.mud-paper, .mud-card { box-shadow: none; border: 0; border-radius: 8px; }
body .study-content .mud-card, body .study-content .mud-paper { background: transparent; }
.mud-card-content { padding: 0; }
.mud-card-actions { padding: 16px 0; gap: 8px; flex-wrap: wrap; }
.mud-card-header { padding: 16px 0; }
.mud-button-root { min-height: 48px; padding: 8px 16px; border-radius: 8px; box-shadow: none !important; }
.mud-icon-button { width: 48px; height: 48px; padding: 8px; }
.mud-button-outlined { border: 0; }
.mud-button-filled-primary, .mud-button-filled-success { background: var(--app-study-action); color: var(--mud-palette-primary-text); }
.mud-button-text-primary, .mud-button-outlined-primary, .mud-button-outlined-secondary, a.mud-link { color: var(--app-study-link); }
.mud-button-root:disabled { color: var(--mud-palette-action-disabled); background: var(--mud-palette-action-disabled-background); }
.mud-input-control { margin: 8px 0; }
.mud-input-outlined .mud-input-outlined-border { border-radius: 8px; }
.mud-input-outlined input, .mud-input-outlined textarea { padding: 16px; }
.mud-alert { padding: 16px; margin: 16px 0; border-radius: 8px; box-shadow: none; }
.mud-alert-message { padding: 0; }
.mud-dialog { padding: 16px; border-radius: 8px; box-shadow: none; }
.mud-dialog-content { padding: 16px; }
.mud-dialog-actions { padding: 16px; gap: 8px; flex-wrap: wrap; }
.mud-skeleton { border-radius: 8px; }
.mud-chip { margin: 0; padding: 0; background: transparent; border: 0; border-radius: 0; font-size: var(--font-body); }
/* Host-local account presentation; sign-in retains the shared component styles. */
body .study-content .account-summary, body .study-content .account-card { border: 0; box-shadow: none; }
body .estado-catalogo { padding: 24px 0; border: 0; border-radius: 0; background: transparent; text-align: left; box-shadow: none; }
.estado-catalogo-icono { display: none; }
/* Shared chat styles are overridden here, never in Ubot.UI. */
body .tutor-page .conversation-welcome { margin: 0; padding: 24px 0; text-align: left; }
body .tutor-page .conversation-welcome > img { display: none; }
body .tutor-page .conversation-welcome h2 { font-size: var(--font-headline); margin: 0 0 16px; }
body .tutor-page .conversation-welcome p { max-width: 72ch; margin: 0 0 24px; }
body .tutor-page .welcome-suggestions { display: flex; flex-direction: column; gap: 8px; }
body .tutor-page .conversation-header, body .tutor-page .conversation-context { padding: 16px; }
body .tutor-page .conversation-input { max-width: 768px; padding: 16px; border-radius: 8px; }
body .tutor-page .conversation-input textarea { min-height: 48px; padding: 0; }
body .tutor-page .composer-actions { gap: 8px; margin-top: 8px; }
body .tutor-page .composer-actions .composer-send { min-height: 48px; min-width: 48px; }
body .tutor-page .assistant-message, body .tutor-page .user-message { border: 0; border-radius: 0; box-shadow: none; padding: 16px 0; background: transparent; }
body .tutor-page .conversation-list-item { border-radius: 8px; padding: 8px; margin: 0 0 8px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
/* Host-local presentation for reused account and chat controls. */
:root { --app-box-shadow: none; --app-box-shadow-sm: none; --app-box-shadow-hover: none; }
.study-note { margin-top: 16px; }
body .study-content .account-card { padding: 24px; }
body .study-content .account-meta-row { gap: 8px; margin-top: 8px; }
body .study-content .account-plan { letter-spacing: normal; }
body .study-content .account-coins { gap: 8px; }
body .tutor-page .conversation-bubble.user-message { color: var(--mud-palette-text-primary); background: transparent; }
body .tutor-page .conversation-bubble .speaker { margin-bottom: 8px; gap: 8px; }
body .tutor-page .conversation-bubble .sources { border: 0; padding-top: 16px; margin-top: 0; gap: 8px; }
body .tutor-page .conversation-search { border-radius: 8px; padding: 8px; margin-bottom: 16px; }
body .tutor-page .conversation-select { min-height: 48px; padding: 8px; gap: 8px; border: 0; border-radius: 8px; }
body .tutor-page .conversation-list, body .tutor-page .conversation-list-row { gap: 8px; }
body .study-content .pregunta-meta, body .study-content .revision-cabecera { font-size: var(--font-body); font-weight: 600; line-height: 1.5; }
body .study-content .study-meta { font-weight: 400; }
body .tutor-page .conversation-title { gap: 8px; }

/* Circular affordances keep their native geometry; section radii do not apply. */
.mud-icon-button, .mud-avatar { border-radius: 50%; }

/* Elevation groups a whole task or reading unit, never its individual labels. */
:root {
    --study-surface-padding: 24px;
    --study-surface-shadow: 0 8px 24px -16px color-mix(in srgb, var(--mud-palette-black) 32%, transparent), 0 8px 16px -16px color-mix(in srgb, var(--mud-palette-black) 24%, transparent);
}
.study-surface, .study-section.study-surface {
    padding: var(--study-surface-padding);
    border: 0;
    border-radius: 8px;
    background: var(--mud-palette-surface);
    box-shadow: var(--study-surface-shadow);
}
body .study-content .account-card { background: var(--mud-palette-surface); box-shadow: var(--study-surface-shadow); }
@media (max-width: 600px) { :root { --study-surface-padding: 16px; } }

@media (max-width:950px) {
    body.tutor-keyboard-open .study-page:has(.tutor-page) { padding-bottom:0; }
    body.tutor-keyboard-open:has(.tutor-page) .study-bottom-nav { display:none; }
}
