/* Apologética registration reading surface. Rules never affect other pages. */
body.apol-signup-consent,
body.apol-policy-reading {
    background: #f3f6f8;
    color: #233344;
}
body.apol-signup-consent .login-wrapper {
    padding: 2.5rem 1.25rem;
    height: auto;
    min-height: calc(100vh - 4rem);
    align-items: flex-start;
}
body.apol-signup-consent .login-container {
    max-width: 900px;
    width: 100%;
    padding: 0;
    margin: 0 auto;
    box-shadow: none;
    background: transparent;
}
body.apol-signup-consent #region-main {
    padding: 0;
    border: 0;
    background: transparent;
}
.apol-consent {
    --apol-ink: #233344;
    --apol-blue: #153f67;
    --apol-muted: #536576;
    --apol-rule: #cbd5df;
    box-sizing: border-box;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 2.5rem 3rem;
    border: 1px solid #dbe2e9;
    border-radius: 14px;
    background: #fff;
    color: var(--apol-ink);
    font: 400 1rem/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    text-align: left;
}
.apol-consent *, .apol-consent *::before, .apol-consent *::after { box-sizing: border-box; }
.apol-consent h1, .apol-consent h2, .apol-consent h3, .apol-consent h4 {
    color: var(--apol-blue);
    font-family: inherit;
    font-weight: 650;
    letter-spacing: -0.015em;
    overflow-wrap: break-word;
    text-wrap: balance;
}
.apol-consent h1 { margin: 0 0 .75rem; font-size: 2rem; line-height: 1.2; }
.apol-consent h2 { margin: 0 0 .6rem; font-size: 1.375rem; line-height: 1.35; }
.apol-consent h3 { font-size: 1.125rem; line-height: 1.4; }
.apol-consent p { margin: 0 0 1rem; }
.apol-consent a {
    color: var(--apol-blue);
    text-decoration: underline;
    text-underline-offset: .18em;
    overflow-wrap: anywhere;
}
.apol-consent a:hover { color: #0c2b49; text-decoration-thickness: 2px; }
.apol-consent :focus-visible {
    outline: 3px solid #bd4e08;
    outline-offset: 4px;
}
.apol-consent ::selection { background: #d9e8f7; color: #153f67; }
.apol-consent__header { padding-bottom: 1.5rem; border-bottom: 1px solid var(--apol-rule); }
.apol-consent__header p { margin: 0; max-width: 65ch; color: var(--apol-muted); }
.apol-consent__ages { margin: 0 0 1rem; }
.apol-consent__ages summary {
    width: fit-content;
    padding: .4rem 0;
    color: var(--apol-blue);
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: .18em;
}
.apol-consent__age-content { padding-top: .75rem; }
.apol-consent__ages table { border-collapse: collapse; width: 100%; font-size: .9375rem; line-height: 1.5; }
.apol-consent__ages caption { color: var(--apol-muted); text-align: left; caption-side: top; padding-bottom: .5rem; }
.apol-consent__ages th, .apol-consent__ages td { text-align: left; vertical-align: top; padding: .65rem .75rem; border-bottom: 1px solid #dbe2e9; }
.apol-consent__ages thead { background: #f3f6f8; }
.apol-consent__ages tbody th { white-space: nowrap; font-weight: 600; }
.apol-consent__support { color: var(--apol-muted); font-size: .9375rem; }
.apol-consent__choice {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    margin: 0;
    padding: .5rem 0;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1.5;
    font-weight: 500;
    color: var(--apol-ink);
}
.apol-consent__choice input[type="checkbox"] {
    appearance: auto;
    flex: 0 0 1.15rem;
    width: 1.15rem;
    height: 1.15rem;
    margin: .18rem 0 0;
    accent-color: var(--apol-blue);
    cursor: pointer;
}
.apol-consent__choice:has(input:disabled) { color: var(--apol-muted); cursor: default; }
.apol-consent__choice input:disabled { cursor: default; }
.apol-consent__version { color: var(--apol-muted); font-size: .8125rem; }
.apol-consent .apol-consent__scroll-help { margin-top: 1.5rem; color: var(--apol-muted); font-size: .875rem; line-height: 1.5; }
.apol-consent__document {
    height: 360px;
    overflow: auto;
    overscroll-behavior: auto;
    scrollbar-gutter: stable;
    border: 1px solid #b8c7d6;
    border-radius: 8px;
    padding: 1.5rem;
    background: #f7f9fb;
    color: var(--apol-ink);
    scrollbar-color: #6b8196 #e6edf3;
    scrollbar-width: auto;
}
.apol-consent__document-content { max-width: 72ch; margin: 0 auto; }
.apol-consent__document h2 { margin: 1.65rem 0 .65rem; font-size: 1.25rem; }
.apol-consent__document h3 { margin: 1.5rem 0 .5rem; font-size: 1.0625rem; }
.apol-consent__document h2:first-child, .apol-consent__document h3:first-child { margin-top: 0; }
.apol-consent__document p, .apol-consent__document li { font-size: 1rem; line-height: 1.65; }
.apol-consent__document p:last-child { margin-bottom: 0; }
.apol-consent__summary { padding-bottom: 1.25rem; margin-bottom: 1.25rem; border-bottom: 1px solid #d7e0e8; }
.apol-consent__choice--combined { margin-top: 1rem; }
.apol-consent__choice--newsletter { margin-top: .5rem; font-weight: 400; }
.apol-consent__actions { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--apol-rule); }
.apol-consent__progress { font-size: .875rem; line-height: 1.5; color: var(--apol-muted); }
.apol-consent__buttons { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem 1.5rem; }
.apol-consent__submit {
    border: 1px solid var(--apol-blue);
    border-radius: 6px;
    background: var(--apol-blue);
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    min-height: 48px;
    padding: .8rem 1.5rem;
    cursor: pointer;
}
.apol-consent__submit:hover:not(:disabled) { background: #0c2b49; border-color: #0c2b49; }
.apol-consent__submit:active:not(:disabled) { background: #071e34; }
.apol-consent__submit:disabled { background: #e0e6ec; border-color: #cbd5df; color: #536576; cursor: not-allowed; }
.apol-consent__back { font-size: .9375rem; }
.apol-consent__error { margin-top: 1.5rem; padding: 1rem; border: 1px solid #b85c58; border-radius: 6px; background: #fff4f3; color: #812b26; }
.apol-consent__noscript { margin-top: 1rem; color: var(--apol-muted); }
.apol-consent__preview { margin-top: 1rem; font-size: .875rem; color: var(--apol-muted); }

/* Public document links stay readable without changing their contents. */
body.apol-policy-reading #block-region-side-pre { display: none; }
body.apol-policy-reading #page { max-width: 960px; margin: 0 auto; padding: 2rem 1.5rem; }
body.apol-policy-reading #region-main-box,
body.apol-policy-reading #region-main {
    width: 100%;
    max-width: none;
    float: none;
    flex: 0 0 100%;
    border: 0;
    min-width: 0;
}
body.apol-policy-reading #region-main {
    padding: 2rem 2.5rem;
    background: #fff;
    border-radius: 12px;
    color: #233344;
    font: 400 1rem/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
body.apol-policy-reading #region-main h2,
body.apol-policy-reading #region-main h3,
body.apol-policy-reading #region-main h4 { color: #153f67; font-family: inherit; font-weight: 650; letter-spacing: -.015em; }
body.apol-policy-reading #region-main h2 { font-size: 1.625rem; line-height: 1.3; margin: 2rem 0 1rem; }
body.apol-policy-reading #region-main h3 { font-size: 1.25rem; line-height: 1.4; margin: 1.75rem 0 .65rem; }
body.apol-policy-reading #region-main p { max-width: 75ch; margin-bottom: 1rem; color: #233344; }
body.apol-policy-reading #region-main h2:first-child { margin-top: 0; }
body.apol-policy-reading #region-main a { color: #153f67; text-decoration: underline; text-underline-offset: .18em; overflow-wrap: anywhere; }
body.apol-policy-reading #region-main .btn-primary { background: #153f67; border-color: #153f67; color: #fff; min-height: 44px; }
body.apol-policy-reading #region-main .btn-primary:hover { background: #0c2b49; border-color: #0c2b49; }
body.apol-policy-reading #region-main :focus-visible { outline: 3px solid #bd4e08; outline-offset: 3px; }

@media (max-width: 600px) {
    body.apol-signup-consent .login-wrapper { padding: 1rem .75rem; }
    .apol-consent { padding: 1.5rem 1.125rem; border-radius: 10px; }
    .apol-consent h1 { font-size: 1.75rem; }
    .apol-consent h2 { font-size: 1.25rem; }
    .apol-consent__document { padding: 1rem; height: 360px; }
    .apol-consent__ages th, .apol-consent__ages td { padding: .6rem .4rem; }
    .apol-consent__submit { width: 100%; }
    .apol-consent__buttons { gap: 1rem; justify-content: center; }
    body.apol-policy-reading #page { padding: 1rem .75rem; }
    body.apol-policy-reading #region-main { padding: 1.5rem 1.125rem; }
    body.apol-policy-reading #region-main h2 { font-size: 1.375rem; }
    body.apol-policy-reading #region-main h3 { font-size: 1.125rem; }
}
@media print {
    .apol-consent__document { height: auto; overflow: visible; background: #fff; }
    .apol-consent__actions, .apol-consent__scroll-help { display: none; }
}

/* Moodle 5.3 login composition: use one branded reading column for this surface only. */
body.apol-signup-consent #page-content { display: block; width: 100%; padding: 2rem 1rem; }
body.apol-signup-consent .login-layout-left { display: none !important; }
body.apol-signup-consent #region-main.login-layout-right { display: block; flex: none; width: 100%; max-width: none; min-height: 0; }
body.apol-signup-consent #region-main-box.login-layout-right-content { width: 100%; max-width: 900px; margin: 0 auto; padding: 0; }
.apol-consent-brand { display: flex; align-items: center; gap: 1rem; width: fit-content; max-width: 100%; margin: 0 0 1.25rem; color: #153f67; text-decoration: none; font: 600 1rem/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.apol-consent-brand .apol-wordmark { display: block; width: 194px; padding: 5px 10px 7px; background: #f47d32; color: #fff; clip-path: polygon(0 0,100% 0,100% 80%,95% 100%,0 100%); }
.apol-consent-brand:focus-visible { outline: 3px solid #bd4e08; outline-offset: 4px; }
@media(max-width:600px) {
 body.apol-signup-consent #page-content { padding: 1rem .75rem; }
 .apol-consent-brand { gap: .75rem; font-size: .9375rem; }
 .apol-consent-brand .apol-wordmark { width: 174px; }
}

/* One document, with each purpose still identifiable in its own section. */
.apol-consent__document-policy + .apol-consent__document-policy,
.apol-consent__document-ages { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid #cbd5df; }
.apol-consent__document-policy--transfer > h2 { padding: .75rem; background: #e7eef6; color: #153f67; font-weight: 750; border-radius: 6px; }
.apol-consent__age-declaration { max-width: 72ch; color: #233344; font-size: .9375rem; line-height: 1.6; }

.apol-consent .apol-consent__newsletter-help { margin: .25rem 0 0 1.9rem; color: #536576; font-size: .875rem; line-height: 1.5; }
