/* UD / CHRC brand layer over Material. Colors and layout mirror chrc.udel.edu. */
:root {
  --ud-blue: #00539f;
  --ud-gold: #ffd200;
  --md-primary-fg-color: var(--ud-blue);
  --md-primary-fg-color--light: #1a6bb5;
  --md-primary-fg-color--dark: #003d75;
  --md-accent-fg-color: var(--ud-blue);
  --md-typeset-a-color: var(--ud-blue);
}
[data-md-color-scheme="slate"] {
  --md-typeset-a-color: #7db7ee;
  --md-accent-fg-color: #7db7ee;
}

/* UD blue bar with logo */
.ud-bar { background: var(--ud-blue); }
.ud-bar__logo { display: inline-block; padding: 0.5rem 1rem; line-height: 0; }
.ud-bar__logo img { height: 3.1rem; width: auto; color: #fff; }

/* CHRC gold bar: site name + CHRC menu */
.chrc-bar { background: var(--ud-gold); color: #000; position: relative; z-index: 5; }
.chrc-bar__inner {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 2rem;
  max-width: 61rem; margin: 0 auto; padding: 0.4rem 1rem;
}
.chrc-bar__title { display: flex; flex-direction: column; color: #000; text-decoration: none; line-height: 1.15; }
.chrc-bar__center, .chrc-bar__name { text-transform: uppercase; font-weight: 600; }
.chrc-bar__center { font-size: 0.7rem; letter-spacing: 0.08em; }
.chrc-bar__name { font-size: 0.95rem; }
.chrc-nav ul { list-style: none; margin: 0; padding: 0; }
.chrc-nav > ul { display: flex; flex-wrap: wrap; gap: 0 1.2rem; }
.chrc-nav li { position: relative; }
.chrc-nav a, .chrc-nav span[role="button"] {
  display: block; padding: 0.5rem 0; color: rgba(0, 0, 0, 0.7);
  font-size: 0.7rem; font-weight: 600; text-decoration: none; cursor: pointer;
}
.chrc-nav a:hover, .chrc-nav a:focus, .chrc-nav span[role="button"]:focus,
.chrc-nav__current > span { color: #000; }
.chrc-nav__has-sub > span::after, .chrc-nav__has-sub > a::after { content: " \25BE"; font-size: 0.6rem; }
.chrc-nav ul ul {
  display: none; position: absolute; left: 0; top: 100%; min-width: 15rem;
  background: #fff; border-top: 3px solid var(--ud-blue); box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}
.chrc-nav ul ul a { padding: 0.5rem 0.9rem; color: #222; font-weight: 400; font-size: 0.7rem; }
.chrc-nav ul ul a:hover { background: #eef4fa; color: var(--ud-blue); }
.chrc-nav li:hover > ul, .chrc-nav li:focus-within > ul { display: block; }

/* Slim brand strip on inner pages (partials/ud-brand-slim.html); the home page keeps the full bars */
.chrc-slim { position: relative; z-index: 5; background: var(--ud-gold); color: #000; }
.chrc-slim__inner { display: flex; align-items: center; gap: 0.8rem; max-width: 61rem; min-height: 2.2rem; margin: 0 auto; padding: 0.25rem 1rem; }
.chrc-slim__ud { display: inline-flex; line-height: 0; }
.chrc-slim__title { color: #000; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none; }
.chrc-slim__title:hover, .chrc-slim__title:focus { text-decoration: underline; }
.chrc-nav--menu { margin-left: auto; }
.chrc-nav--menu > ul > li > ul { left: auto; right: 0; min-width: 17rem; }
/* inside the slim dropdown, show each group's links as a flat list instead of a second flyout */
.chrc-nav--menu ul ul ul { display: block; position: static; min-width: 0; border: 0; box-shadow: none; padding: 0 0 0.3rem; }
.chrc-nav--menu ul ul > li > a, .chrc-nav--menu ul ul > li > span[role="button"] { padding: 0.5rem 0.9rem 0.2rem; color: #000; font-weight: 700; cursor: default; }
.chrc-nav--menu ul ul > li > a:hover { background: none; color: var(--ud-blue); }
.chrc-nav--menu ul ul ul a { padding: 0.25rem 0.9rem 0.25rem 1.5rem; color: #222; font-weight: 400; }
.chrc-nav--menu .chrc-nav__has-sub > span::after, .chrc-nav--menu ul ul .chrc-nav__has-sub > a::after { content: none; }
.chrc-nav--menu > ul > li > span::after { content: " \25BE"; font-size: 0.6rem; }
@media screen and (max-width: 44.9375em) { .chrc-nav--menu { display: none; } }
@media print { .chrc-slim { display: none; } }

/* Material's own header becomes a slim site-name + search strip under the brand bars */
.md-header { box-shadow: none; }
.md-header__button.md-logo { display: none; }

/* UD footer */
.ud-footer { background: #fff; color: #333; border-top: 4px solid var(--ud-blue); font-size: 0.7rem; }
[data-md-color-scheme="slate"] .ud-footer { background: #1d2433; color: #ddd; }
.ud-footer__inner { max-width: 61rem; margin: 0 auto; padding: 1.2rem 1rem 1rem; }
.ud-footer__top { display: flex; align-items: center; gap: 1rem; border-bottom: 1px solid rgba(128,128,128,.4); padding-bottom: 0.8rem; }
.ud-footer__home { font-size: 0.9rem; font-weight: 600; color: var(--ud-blue); text-decoration: none; }
.ud-footer__cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 1rem; margin-top: 1rem; }
.ud-footer h3 { margin: 0 0 0.4rem; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: inherit; }
.ud-footer ul { list-style: none; margin: 0; padding: 0; }
.ud-footer li { margin: 0.25rem 0; }
.ud-footer a { color: var(--ud-blue); text-decoration: none; }
[data-md-color-scheme="slate"] .ud-footer a { color: #7db7ee; }
.ud-footer a:hover { text-decoration: underline; }
.ud-footer__social a { margin-right: 0.7rem; }
.ud-footer__legal { margin: 1rem 0 0; }
.ud-footer__legal a { margin-left: 0.8rem; }

@media screen and (max-width: 44.9375em) {
  .chrc-nav ul ul { display: none !important; }
  .chrc-nav__has-sub > span::after, .chrc-nav__has-sub > a::after { content: none; }
}

/* Home page */
.md-typeset .hp-hero {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.2rem 1.6rem; border-radius: 6px; color: #fff;
  background: linear-gradient(110deg, #003c71 0%, #00539f 100%);
}
.hp-hero p { margin: 0; }
.md-typeset .hp-hero__title {
  font-family: "Oswald", "Open Sans", sans-serif; font-weight: 700; font-size: 1.7rem;
  letter-spacing: 0.04em; text-transform: uppercase; line-height: 1.2;
}
.md-typeset .hp-hero__sub { max-width: 28rem; margin-top: 0.4rem; font-size: 0.8rem; opacity: 0.95; }
.md-typeset a.hp-hero__btn {
  display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.7rem 1.2rem; border-radius: 4px;
  background: rgba(255, 255, 255, 0.12); color: #fff; font-weight: 600; text-decoration: none;
}
.md-typeset a.hp-hero__btn:hover { background: rgba(255, 255, 255, 0.22); color: #fff; }
.hp-ico { width: 1.1rem; height: 1.1rem; fill: currentColor; flex: none; }

.hp-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 1rem; margin: 1rem 0 1.5rem; }
.md-typeset a.hp-card, .md-typeset a.hp-news__item {
  display: flex; align-items: flex-start; gap: 0.8rem; padding: 0.9rem 1rem; border-radius: 6px;
  border: 1px solid var(--md-default-fg-color--lightest); background: var(--md-default-bg-color);
  color: var(--md-default-fg-color); font-size: 0.72rem; line-height: 1.4; text-decoration: none;
}
.md-typeset a.hp-card:hover, .md-typeset a.hp-news__item:hover { border-color: var(--ud-blue); box-shadow: 0 1px 6px rgba(0, 0, 0, 0.12); }
.hp-card strong, .hp-news__item strong { font-size: 0.8rem; }
.hp-card__icon {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 2rem; height: 2rem; border-radius: 4px;
}
.hp-card__icon .hp-ico { width: 1.1rem; height: 1.1rem; }
.hp-card__icon--blue { background: #eaf3fb; color: #00539f; }
.hp-card__icon--purple { background: #efe8fb; color: #6b3fb5; }
.hp-card__icon--green { background: #e7f5e7; color: #107c10; }
.hp-card__icon--yellow { background: #fff8cc; color: #8a7400; }
.hp-card__icon--orange { background: #fdeee3; color: #c25a00; }

.hp-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 0 2.5rem; }
.md-typeset .hp-label { margin: 0.5rem 0; font-size: 0.65rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--md-default-fg-color--light); }
.hp-steps { list-style: none; margin: 0 !important; padding: 0 !important; counter-reset: hp; }
.md-typeset .hp-steps li {
  position: relative; margin: 0 0 1rem; padding-left: 2.6rem; counter-increment: hp; font-size: 0.72rem;
  color: var(--md-default-fg-color--light);
}
.hp-steps li::before {
  content: counter(hp); position: absolute; left: 0; top: 0; width: 1.8rem; height: 1.8rem; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; background: var(--ud-blue); color: #fff; font-weight: 700;
}
.hp-steps strong { display: block; font-size: 0.85rem; color: var(--md-default-fg-color); }
.hp-news { display: grid; gap: 0.6rem; }
.hp-pill { margin-left: auto; padding: 0.1rem 0.6rem; border-radius: 1rem; background: #eaf3fb; color: #00539f; font-size: 0.6rem; font-weight: 600; }
.hp-note { margin-top: 1.5rem; padding: 0.2rem 1rem; border-left: 3px solid var(--ud-blue); background: rgba(0, 83, 159, 0.07); }
.md-content__inner:has(.hp-hero) > h1 { display: none; }
.hp-pill { white-space: nowrap; }

/* Assistant chat (ud/assistant.md, assets/assistant.js) */
.assistant { display: flex; flex-direction: column; gap: 1rem; margin-top: 1rem; }
.assistant__messages { display: flex; flex-direction: column; gap: 0.75rem; min-height: 6rem; }
.assistant__msg {
  max-width: 100%; padding: 0.6rem 0.9rem; border-radius: 6px; font-size: 0.75rem; overflow-wrap: anywhere;
  border: 1px solid var(--md-default-fg-color--lightest); background: var(--md-default-bg-color);
}
.assistant__msg--user { align-self: flex-end; max-width: 85%; border-color: var(--ud-blue); background: rgba(0, 83, 159, 0.08); white-space: pre-wrap; }
.assistant__msg--assistant { align-self: flex-start; }
.assistant__msg--thinking { color: var(--md-default-fg-color--light); font-style: italic; }
.assistant__msg--refused { border-left: 3px solid var(--ud-blue); }
.assistant__msg--error { align-self: flex-start; border-color: #c62828; border-left-width: 3px; }
.assistant__answer > :first-child { margin-top: 0; }
.assistant__answer > :last-child { margin-bottom: 0; }
.md-typeset .assistant__sources-title { margin: 0.8rem 0 0.2rem; font-size: 0.65rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--md-default-fg-color--light); }
.md-typeset .assistant__sources { margin: 0 0 0 1.2rem; font-size: 0.7rem; }
.assistant__form { display: flex; flex-direction: column; gap: 0.4rem; }
.assistant__label { font-size: 0.7rem; font-weight: 600; }
.assistant__input {
  width: 100%; box-sizing: border-box; padding: 0.6rem 0.8rem; resize: vertical; font: inherit; font-size: 0.75rem;
  color: var(--md-default-fg-color); background: var(--md-default-bg-color);
  border: 1px solid var(--md-default-fg-color--lightest); border-radius: 6px;
}
.assistant__input:focus { outline: 2px solid var(--ud-blue); outline-offset: 1px; border-color: var(--ud-blue); }
.assistant__footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.assistant__counter { font-size: 0.65rem; color: var(--md-default-fg-color--light); }
.assistant__send {
  padding: 0.45rem 1.4rem; border: 0; border-radius: 4px; background: var(--ud-blue); color: #fff;
  font: inherit; font-size: 0.75rem; font-weight: 600; cursor: pointer;
}
.assistant__send:hover { filter: brightness(1.15); }
.assistant__send:focus-visible { outline: 2px solid var(--ud-blue); outline-offset: 2px; }
.assistant__send:disabled { opacity: 0.55; cursor: not-allowed; }
[data-md-color-scheme="slate"] .assistant__msg--user { background: rgba(77, 148, 214, 0.18); border-color: #4d94d6; }
[data-md-color-scheme="slate"] .assistant__msg--error { border-color: #ef9a9a; }
[data-md-color-scheme="slate"] .assistant__input:focus { outline-color: #4d94d6; border-color: #4d94d6; }

.hp-news__item--static { cursor: default; }
.hp-news__item small { color: var(--md-default-fg-color--light); font-size: 0.65rem; }
.hp-hero__btns { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.hp-news--compact { gap: 0; border: 1px solid var(--md-default-fg-color--lightest); border-radius: 6px; }
.md-typeset a.hp-news__row { display: flex; align-items: baseline; gap: 0.8rem; padding: 0.55rem 0.8rem; color: inherit; border-bottom: 1px solid var(--md-default-fg-color--lightest); }
.md-typeset a.hp-news__row:last-child { border-bottom: 0; }
.md-typeset a.hp-news__row:hover { background: rgba(0, 83, 159, 0.06); color: var(--ud-blue); }
.hp-news__date { flex: none; width: 3.2rem; font-size: 0.65rem; color: var(--md-default-fg-color--light); }
.hp-news__row strong { font-size: 0.8rem; }
.md-typeset .hp-more { margin: 0.4rem 0 0; font-size: 0.7rem; }

/* Floating assistant balloon (assets/assistant-widget.js) */
.chat-widget__btn {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 20; width: 3.4rem; height: 3.4rem; padding: 0;
  display: flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; cursor: pointer;
  background: var(--ud-blue); color: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}
.chat-widget__btn:hover { filter: brightness(1.15); }
.chat-widget__btn:focus-visible { outline: 3px solid var(--ud-gold); outline-offset: 2px; }
.chat-widget__panel {
  position: fixed; right: 1rem; bottom: 5rem; z-index: 20; display: flex; flex-direction: column;
  width: min(26rem, calc(100vw - 2rem)); height: min(34rem, calc(100vh - 7rem));
  background: var(--md-default-bg-color); color: var(--md-default-fg-color);
  border: 1px solid var(--md-default-fg-color--lighter); border-radius: 8px; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
}
.chat-widget__panel[hidden] { display: none; }
.chat-widget__head { display: flex; align-items: center; justify-content: space-between; padding: 0.6rem 0.8rem; background: var(--ud-blue); color: #fff; border-radius: 8px 8px 0 0; font-size: 0.8rem; }
.chat-widget__close { border: 0; background: transparent; color: #fff; font-size: 1.3rem; line-height: 1; cursor: pointer; }
.chat-widget__body { flex: 1; overflow-y: auto; padding: 0.8rem; font-size: 0.75rem; }
.chat-widget__note { margin: 0 0 0.5rem; font-size: 0.65rem; color: var(--md-default-fg-color--light); }
.chat-widget__signin { padding: 0.5rem 1rem; border: 0; border-radius: 4px; background: var(--ud-blue); color: #fff; font-weight: 600; cursor: pointer; }
.chat-widget__body .assistant { margin-top: 0; }
@media print { .chat-widget__btn, .chat-widget__panel { display: none; } }
.chat-widget__panel--compact { height: auto; }

/* Sign-in status and UD-only cues (assets/site-auth.js) */
.site-userbar { display: flex; align-items: center; gap: 0.9rem; margin: 0 0.8rem 0 auto; font-size: 0.7rem; color: #fff; white-space: nowrap; }
.site-userbar a { color: #fff; text-decoration: none; }
.site-userbar a:hover, .site-userbar a:focus { text-decoration: underline; }
.site-userbar__signin { padding: 0.25rem 0.7rem; border: 1px solid rgba(255, 255, 255, 0.7); border-radius: 4px; font-weight: 600; }
.site-userbar__who { max-width: 14rem; overflow: hidden; text-overflow: ellipsis; opacity: 0.95; }
@media (max-width: 60em) { .site-userbar__who { display: none; } }
@media (max-width: 40em) { .site-userbar { gap: 0.5rem; } }
.site-signedin-banner { margin: 0 0 1rem; padding: 0.4rem 0.8rem; border-left: 3px solid #107c10; background: rgba(16, 124, 16, 0.09); font-size: 0.7rem; }
a.ud-link::after {
  content: ""; display: inline-block; width: 0.85em; height: 0.85em; margin-left: 0.3em; vertical-align: -0.1em; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 17a2 2 0 0 0 2-2 2 2 0 0 0-2-2 2 2 0 0 0-2 2 2 2 0 0 0 2 2m6-9a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V10a2 2 0 0 1 2-2h1V6a5 5 0 0 1 5-5 5 5 0 0 1 5 5v2zm-6-5a3 3 0 0 0-3 3v2h6V6a3 3 0 0 0-3-3'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 17a2 2 0 0 0 2-2 2 2 0 0 0-2-2 2 2 0 0 0-2 2 2 2 0 0 0 2 2m6-9a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V10a2 2 0 0 1 2-2h1V6a5 5 0 0 1 5-5 5 5 0 0 1 5 5v2zm-6-5a3 3 0 0 0-3 3v2h6V6a3 3 0 0 0-3-3'/%3E%3C/svg%3E") center / contain no-repeat;
}
html[data-signed-in="true"] a.ud-link::after {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 17c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m6-9h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6h1.9c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2m0 12H6V10h12z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 17c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m6-9h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6h1.9c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2m0 12H6V10h12z'/%3E%3C/svg%3E");
}
html[data-signed-in="true"] .chat-widget__btn::after {
  content: ""; position: absolute; top: 0.1rem; right: 0.1rem; width: 0.8rem; height: 0.8rem; border-radius: 50%;
  background: #2e9e48; border: 2px solid #fff;
}
@media print { .site-userbar { display: none; } }

/* KB article details (scripts/mkdocs_hooks.py): metadata table collapsed at the end of the article */
.md-typeset details.kb-meta { margin: 2rem 0 1rem; padding: 0.4rem 0.8rem; font-size: 0.7rem; border: 1px solid var(--md-default-fg-color--lightest); border-radius: 4px; }
.md-typeset details.kb-meta > summary { cursor: pointer; font-weight: 600; color: var(--md-default-fg-color--light); }
.md-typeset details.kb-meta table:not([class]) { display: table; width: 100%; margin-top: 0.6rem; font-size: inherit; box-shadow: none; }

/* Top tab dropdowns (theme/partials/tabs.html). Material clips overflow on the tab bar, so lift that. */
.md-tabs, .md-tabs__list { overflow: visible; contain: none; }
.md-tabs__item { position: relative; }
.md-tabs__sub {
  display: none; position: absolute; left: 0; top: 100%; z-index: 6; min-width: 15rem; margin: 0; padding: 0.3rem 0;
  list-style: none; background: var(--md-default-bg-color); color: var(--md-default-fg-color);
  border-top: 3px solid var(--ud-gold); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
.md-tabs__item--has-sub:hover > .md-tabs__sub, .md-tabs__item--has-sub:focus-within > .md-tabs__sub { display: block; }
.md-tabs__sub li { margin: 0; }
.md-tabs__sub a { display: block; padding: 0.4rem 0.9rem; font-size: 0.7rem; line-height: 1.3; color: inherit; opacity: 1; text-decoration: none; }
.md-tabs__sub a:hover, .md-tabs__sub a:focus { background: rgba(0, 83, 159, 0.1); color: var(--ud-blue); }
[data-md-color-scheme="slate"] .md-tabs__sub a:hover, [data-md-color-scheme="slate"] .md-tabs__sub a:focus { color: #7db7ee; }
.md-tabs__sub--wide { column-count: 3; column-gap: 0; min-width: 42rem; max-height: 75vh; overflow-x: hidden; overflow-y: auto; }
.md-tabs__sub--wide li { break-inside: avoid; }
@media print { .md-tabs__sub { display: none !important; } }
