/* Portal-only interaction tokens. Load after application styles, not from global.css. */
:root {
    --portal-link: #175c9e;
    --portal-link-hover: #103f72;
    --portal-link-visited: #65458b;
    --portal-focus: #527d68;
    --portal-action: #326454;
    --portal-action-hover: #244f41;
    --portal-action-text: #fff;
}

/* Text is a link even before hover. Component links opt out by semantics, not color. */
a:any-link:where(:not(.button, .pages-button, .account-primary, .account-secondary, .app-go-btn, .grid-card, .modern-chip, .account-admin-action)):where(:not(nav a, #navigation a, #header a, .crumb a, .account-site-list a, .app-go-back a)) {
    color: var(--portal-link);
    text-decoration-line: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
    text-decoration-skip-ink: auto;
}
a:visited:where(:not(.button, .pages-button, .account-primary, .account-secondary, .app-go-btn, .grid-card, .modern-chip, .account-admin-action)):where(:not(nav a, #navigation a, #header a, .crumb a, .account-site-list a, .app-go-back a)) {
    color: var(--portal-link-visited);
}
a:any-link:hover:where(:not(.button, .pages-button, .account-primary, .account-secondary, .app-go-btn, .grid-card, .modern-chip, .account-admin-action)):where(:not(nav a, #navigation a, #header a, .crumb a, .account-site-list a, .app-go-back a)) {
    color: var(--portal-link-hover);
    text-decoration-thickness: 2px;
}

/* Navigation and whole-card controls have their own persistent shape/context. */
:where(nav, #navigation, .crumb) a:any-link,
:where(.account-site-list, .app-go-back) a:any-link,
a:any-link:where(.account-admin-action) {
    color: var(--portal-link);
    text-decoration: none;
}
:where(nav, #navigation, .crumb) a:any-link:hover,
:where(.account-site-list) a:any-link:hover {
    color: var(--portal-link-hover);
    text-decoration: underline;
    text-underline-offset: 0.18em;
}
#header #r1 :where(.c2, .c3) a:any-link {
    color: var(--portal-link);
    text-decoration: none;
}
#header #r1 :where(.c2, .c3) a:any-link:hover {
    color: var(--portal-link-hover);
    text-decoration: underline;
    text-underline-offset: 0.18em;
}
a:any-link:where(.button, .pages-button, .account-primary, .account-secondary, .app-go-btn, .grid-card, .modern-chip),
:where(.app-go-back) a:any-link,
a:any-link:where(.portal-image-link) {
    text-decoration: none;
}
/* Existing primary controls consume the same action tokens, including legacy management forms. */
:is(a, button, input).button:not(.cancel):not(.account-secondary) {
    color: var(--portal-action-text);
    background: var(--portal-action);
    border-color: var(--portal-action);
    text-decoration: none;
}
:is(a, button, input).button:not(.cancel):not(.account-secondary):hover {
    color: var(--portal-action-text);
    background: var(--portal-action-hover);
    border-color: var(--portal-action-hover);
    text-decoration: none;
}
:is(a, button, input).button:focus-visible,
a:any-link:focus-visible {
    outline: 3px solid var(--portal-focus);
    outline-offset: 3px;
    border-radius: 2px;
}
