/* Section band (every public page with a section menu, and the department home pages): a full-width navy band with the
   page's name and the section's links as a directory board, replacing the old left sidebar. The menu stays the page's
   own <aside> markup; on phones the shared script in header.jsp folds it into one toggle bar. Prefix kda-, kn-. */
.kda-hero, .kda-layout {
  --kda-navy: var(--kc-navy, #0d2847);
  --kda-blue: var(--kc-blue, #285690);
  --kda-gold: var(--kc-gold, #e0a526);
  --kda-ink: var(--kc-ink, #1b2a3d);
  --kda-line: var(--kc-line, #e3e8f0);
  --kda-soft: var(--kc-soft, #f3f6fb);
  --kda-rule: var(--kc-rule-on-navy, rgba(255, 255, 255, .14));
  --kda-mist: var(--kc-on-navy-soft, #b9c7dc);
  --kda-ease: var(--kc-ease, cubic-bezier(.2, .7, .2, 1));
  --kda-edge: max(24px, calc((100vw - 1280px) / 2 + 24px));
}

/* The band */
.kda-hero {
  position: relative; isolation: isolate; color: #fff; font-family: Inter, 'Open Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--kda-navy);
}
.kda-hero::before {
  content: ""; position: absolute; z-index: -1; inset: 0; background: url(/images/college.webp) center 40% / cover no-repeat; filter: saturate(.75);
  -webkit-mask-image: linear-gradient(90deg, #000 0, #000 22%, transparent 46%); mask-image: linear-gradient(90deg, #000 0, #000 22%, transparent 46%);
  opacity: .42;
}
.kda-hero::after { content: ""; position: absolute; right: 0; bottom: 0; left: 0; height: 4px; background: var(--kda-gold); }
.kda-hero-in {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: center;
  padding: 56px var(--kda-edge) 60px;
}
.kda-hero h1.kda-name {
  margin: 0; color: #fff; font-family: Lora, Georgia, 'Times New Roman', serif; font-size: clamp(34px, 3.6vw, 52px); font-weight: 600; line-height: 1.12; letter-spacing: -.01em; text-wrap: balance;
}
.kda-tag { margin: 14px 0 0; color: var(--kda-mist); font-size: 16px; line-height: 1.5; }
/* Key facts typed in Website Content; js/department-about.js shows only those with a value */
.kda-facts ul { display: flex; flex-wrap: wrap; gap: 14px 40px; margin: 0; padding: 0; list-style: none; }
.kda-facts:has(.kda-fact-on) { margin-top: 24px; padding: 16px 0; border-top: 1px solid var(--kda-rule); border-bottom: 1px solid var(--kda-rule); }
.kda-facts li { display: none; }
.kda-facts li.kda-fact-on { display: block; min-width: 0; }
.kda-fact-value { display: block; color: #fff; font-size: 17px; font-weight: 600; line-height: 1.3; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.kda-fact-label { display: block; margin-top: 2px; color: var(--kda-mist); font-size: 13px; }
.kda-acts { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.kda-hero a.kda-pill {
  display: inline-flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 22px; border: 1px solid rgba(255, 255, 255, .4); border-radius: 999px;
  color: #fff; font-size: 14.5px; font-weight: 600; text-decoration: none; transition: background-color .2s var(--kda-ease), color .2s var(--kda-ease), border-color .2s var(--kda-ease);
}
.kda-hero a.kda-pill:hover { border-color: #fff; background: #fff; color: var(--kda-navy); }
.kda-hero a.kda-pill-solid { border-color: var(--kda-gold); background: var(--kda-gold); color: var(--kda-navy); }
.kda-hero a.kda-pill-solid:hover { border-color: #fff; background: #fff; }
.kda-pill i { font-size: 12px; transition: transform .3s var(--kda-ease); }
.kda-pill:hover i { transform: translateX(4px); }
.kda-social { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.kda-hero .kda-social a {
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1px solid var(--kda-rule); border-radius: 50%;
  color: var(--kda-mist); text-decoration: none; transition: background-color .2s var(--kda-ease), color .2s var(--kda-ease);
}
.kda-hero .kda-social a:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.kda-hero a:focus-visible, .kda-board button:focus-visible { outline: 2px solid var(--kda-gold); outline-offset: 2px; }

/* The directory board: every section of the department (sidebar.jsp) */
.kda-hero .kda-board aside { width: 100% !important; max-width: none !important; margin: 0 !important; padding: 0 !important; float: none !important; position: static !important; height: auto !important; background: none !important; }
.kda-hero .kda-board .region, .kda-hero .kda-board :is(#block-menu-block-3, section.block) { margin: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: none !important; box-shadow: none !important; overflow: visible !important; }
.kda-hero .kda-board :is(#block-menu-block-3, section.block) h2.block-title { position: absolute; width: 1px; height: 1px; margin: 0; padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.kda-hero .kda-board :is(#block-menu-block-3, section.block) ul.menu { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; margin: 0 !important; padding: 0 !important; border-top: 1px solid var(--kda-rule); list-style: none; background: none !important; }
.kda-hero .kda-board :is(#block-menu-block-3, section.block) ul.menu > li { position: relative; margin: 0 !important; padding: 0 !important; border: 0 !important; border-bottom: 1px solid var(--kda-rule) !important; background: none !important; animation: kda-row .6s var(--kda-ease) backwards; }
.kda-hero .kda-board :is(#block-menu-block-3, section.block) ul.menu > li:nth-child(2n) { animation-delay: 45ms; }
.kda-hero .kda-board :is(#block-menu-block-3, section.block) ul.menu > li:nth-child(n+3) { animation-delay: 120ms; }
.kda-hero .kda-board :is(#block-menu-block-3, section.block) ul.menu > li:nth-child(n+5) { animation-delay: 200ms; }
.kda-hero .kda-board :is(#block-menu-block-3, section.block) ul.menu > li:nth-child(n+7) { animation-delay: 280ms; }
.kda-hero .kda-board :is(#block-menu-block-3, section.block) ul.menu > li:nth-child(n+9) { animation-delay: 360ms; }
.kda-hero .kda-board :is(#block-menu-block-3, section.block) ul.menu > li:nth-child(n+11) { animation-delay: 440ms; }
@keyframes kda-row { from { opacity: 0; transform: translateX(-10px); } }
/* gold rule drawn from the left on hover and focus */
.kda-hero .kda-board :is(#block-menu-block-3, section.block) ul.menu > li::after { content: ""; position: absolute; right: 0; bottom: -1px; left: 0; height: 1px; background: var(--kda-gold); transform: scaleX(0); transform-origin: left; transition: transform .45s var(--kda-ease); }
.kda-hero .kda-board :is(#block-menu-block-3, section.block) ul.menu > li:hover::after, .kda-hero .kda-board :is(#block-menu-block-3, section.block) ul.menu > li:focus-within::after { transform: scaleX(1); }
.kda-hero .kda-board :is(#block-menu-block-3, section.block) ul.menu > li > a {
  position: relative; display: flex !important; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; margin: 0 !important; padding: 8px 4px !important;
  border: 0 !important; border-radius: 0 !important; background: none !important; color: #fff !important; font-size: 15px !important; font-weight: 500 !important; line-height: 1.3 !important; text-decoration: none !important;
}
.kda-hero .kda-board :is(#block-menu-block-3, section.block) ul.menu > li > a::before { display: none !important; }
.kda-hero .kda-board :is(#block-menu-block-3, section.block) ul.menu > li > a::after {
  content: "\f054" !important; position: static !important; flex: none; margin: 0 !important; border: 0 !important; color: var(--kda-mist) !important; font-family: "Font Awesome 5 Free" !important; font-size: 11px !important; font-weight: 900 !important; opacity: 1 !important;
  transform: none !important; transition: transform .3s var(--kda-ease), color .2s var(--kda-ease);
}
.kda-hero .kda-board :is(#block-menu-block-3, section.block) ul.menu > li > a:hover::after, .kda-hero .kda-board :is(#block-menu-block-3, section.block) ul.menu > li > a:focus-visible::after { color: var(--kda-gold) !important; transform: translateX(5px) !important; }
.kda-hero .kda-board :is(#block-menu-block-3, section.block) ul.menu > li > a[aria-current="page"] { color: var(--kda-gold) !important; font-weight: 600 !important; }


/* The content column, now the full width under the band. Prose stays a comfortable measure; tables and documents get room. */
:is(.row, .flex, .grid, [class*="md:flex"], [class*="md:grid"], [class*="lg:grid"]):has(> .kn-main) { display: block !important; width: auto !important; margin: 0 !important; }
.container:has(.kn-main) { width: 100% !important; max-width: 1280px !important; margin: 0 auto !important; padding: 0 24px !important; }
.container .container:has(.kn-main) { padding: 0 !important; }
/* :is(#kn, ...) only lifts the priority above the long shared text-page rules in site-fixes.css */
:is(#kn#kn#kn, .kn-main) { float: none !important; box-sizing: border-box; width: 100% !important; max-width: 1232px !important; min-width: 0 !important; margin: 32px auto 48px !important; flex: none !important; }
:is(#kn#kn#kn, .kn-main):not(:has(table, iframe, object, embed, .kap-page, .fc-grid, .cf-page, .hs-card)) { max-width: 960px !important; }
.row:has(.kn-main) { margin-right: 0 !important; margin-left: 0 !important; }

@media (max-width: 1099.98px) {
  .kda-hero-in { grid-template-columns: minmax(0, 1fr); gap: 32px; padding-top: 40px; padding-bottom: 44px; }
}
@media (max-width: 767.98px) {
  .kda-hero-in { padding: 28px 16px 32px; gap: 24px; }
  .kda-hero h1.kda-name { font-size: clamp(28px, 8vw, 34px); }
  .kda-acts a.kda-pill { flex: 1 1 auto; justify-content: center; }
  .kda-hero::before { -webkit-mask-image: none; mask-image: none; opacity: .18; }
  .kda-hero .kda-board :is(#block-menu-block-3, section.block).ks-side:not(.ks-open) { display: none !important; }
  .kda-hero .kda-board :is(#block-menu-block-3, section.block).ks-side.ks-open { display: block !important; margin-top: 8px !important; }
  .kda-hero .kda-board :is(#block-menu-block-3, section.block) ul.menu { grid-template-columns: minmax(0, 1fr); }
  .container:has(.kn-main) { padding: 0 16px !important; }
  :is(#kn#kn#kn, .kn-main) { margin: 20px auto 32px !important; }
  .kn-main img, .kn-main table { max-width: 100%; }
  #page-blocks.kec-blocks { box-sizing: border-box; width: calc(100% - 32px) !important; max-width: calc(100% - 32px) !important; margin-right: auto !important; margin-left: auto !important; }
}
@media (prefers-reduced-motion: reduce) {
  .kda-hero .kda-board :is(#block-menu-block-3, section.block) ul.menu > li { animation: none; }
  .kda-hero .kda-board :is(#block-menu-block-3, section.block) ul.menu > li::after, .kda-hero .kda-board :is(#block-menu-block-3, section.block) ul.menu > li > a::after, .kda-pill i { transition: none; }
  .kda-hero .kda-board :is(#block-menu-block-3, section.block) ul.menu > li > a:hover::after, .kda-pill:hover i { transform: none !important; }
}

/* Inner pages: a compact band, so the page's own content stays near the top. The department home page keeps the full band. */
.kda-hero:not(:has(.kda-acts)) .kda-hero-in { grid-template-columns: minmax(0, 3fr) minmax(0, 8fr); gap: 40px; padding-top: 32px; padding-bottom: 36px; }
.kda-hero:not(:has(.kda-acts)) h1.kda-name { font-size: clamp(26px, 2.6vw, 38px); }
.kda-hero:not(:has(.kda-acts)) .kda-tag { margin-top: 8px; font-size: 14.5px; }
.kda-hero:not(:has(.kda-acts)) .kda-social { margin-top: 16px; }
.kda-hero:not(:has(.kda-acts)) .kda-board :is(#block-menu-block-3, section.block) ul.menu { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 24px; }
.kda-hero:not(:has(.kda-acts)) .kda-board :is(#block-menu-block-3, section.block) ul.menu > li > a { min-height: 42px; padding: 6px 2px !important; font-size: 14px !important; }
@media (max-width: 1099.98px) {
  .kda-hero:not(:has(.kda-acts)) .kda-hero-in { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .kda-hero:not(:has(.kda-acts)) .kda-board :is(#block-menu-block-3, section.block) ul.menu { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767.98px) {
  .kda-hero:not(:has(.kda-acts)) .kda-board :is(#block-menu-block-3, section.block) ul.menu { grid-template-columns: minmax(0, 1fr); }
  .kda-hero:not(:has(.kda-acts)) .kda-board :is(#block-menu-block-3, section.block) ul.menu > li > a { min-height: 48px; }
  .kda-hero::before { display: none; } /* slow connections: no band photo on phones */
}

/* Content columns with no .container around them keep the page gutter */
:is(#kn#kn#kn, .kn-main):not(.container .kn-main) { width: calc(100% - 48px) !important; }
@media (max-width: 767.98px) { :is(#kn#kn#kn, .kn-main):not(.container .kn-main) { width: calc(100% - 32px) !important; } }

/* A link out of the content column, e.g. CSE Labs to its full list of labs */
.kn-more { box-sizing: border-box; width: calc(100% - 48px); max-width: 960px; margin: -24px auto 48px; font-family: Inter, 'Open Sans', system-ui, sans-serif; }
.kn-more a { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 20px; border: 1px solid var(--kc-navy, #0d2847); border-radius: 999px; color: var(--kc-navy, #0d2847); font-size: 14px; font-weight: 600; text-decoration: none; transition: background-color .2s var(--kc-ease, ease), color .2s var(--kc-ease, ease); }
.kn-more a:hover { background: var(--kc-navy, #0d2847); color: #fff; }
.kn-more a:focus-visible { outline: 2px solid var(--kc-gold, #e0a526); outline-offset: 2px; }
@media (max-width: 767.98px) { .kn-more { width: calc(100% - 32px); margin-top: -8px; } }
