:root {
  --brand: #963048;
  --secondary: #BB3B60;
  --accent: #BB3B60;
  --highlight: #FAD885;
  --paper: #fffcf7;
  --surface: #fff;
  --ink: #3b2026;
  --muted: #715d61;
  --line: #eadde0;
  --soft: #fbeff0;
  --band: #6A2B38;
  --on-band: #fff;
  --button: #963048;
  --on-button: #fff;
  --hero-ink: #fff;
  --hero-overlay: linear-gradient(90deg, #6a2b38ed, #963048ab 55%, #bb3b6033);
  --footer: #6A2B38;
  --wine: var(--brand);
  --wine-deep: var(--band);
  --gold: var(--highlight);
}

:root[data-theme="dark"] {
  --brand: #ECDFCC;
  --secondary: #697565;
  --accent: #697565;
  --highlight: #ECDFCC;
  --paper: #181C14;
  --surface: #3C3D37;
  --ink: #ECDFCC;
  --muted: #ECDFCC;
  --line: #697565;
  --soft: #181C14;
  --band: #181C14;
  --on-band: #ECDFCC;
  --button: #ECDFCC;
  --on-button: #181C14;
  --hero-ink: #ECDFCC;
  --hero-overlay: linear-gradient(90deg, #181c14f5, #181c14cf 55%, #181c1470);
  --footer: #181C14;
  --wine: var(--brand);
  --wine-deep: var(--band);
  --gold: var(--highlight);
}

body { line-height: 1.7; }
h1, h2 { font-family: 'Noto Sans', 'Noto Sans Devanagari', sans-serif; }
h2 { font-size: calc(26px * var(--text-scale, 1)); font-weight: 600; }
:focus-visible, button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; }
.header-search input:focus-visible { outline-offset: -2px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.utility-bar { background: var(--band); color: var(--on-band); font-size: calc(14px * var(--text-scale, 1)); font-weight: 700; }
.utility-bar__inner { justify-content: flex-end; }
.utility-bar nav { flex-wrap: wrap; justify-content: flex-end; gap: 12px 26px; }
.text-size-controls { display: flex; align-items: center; gap: 10px; }
.text-size-controls button { min-width: 28px; font-weight: 700; }
.text-size-controls button[aria-pressed="true"] { text-decoration: underline; text-underline-offset: 4px; }
.identity-bar { background: #000; }
:root[data-theme="light"] .identity-bar { background: var(--surface); }
.identity-bar__inner { display: grid; grid-template-columns: minmax(250px, 1.1fr) minmax(0, 1.9fr) minmax(220px, .95fr); padding-block: 12px; align-items: center; gap: 24px; }
.identity { display: flex; justify-content: center; min-width: 0; }
.identity img { display: block; width: 100%; height: auto; max-width: 100%; max-height: 126px; object-fit: contain; object-position: center; }
.university-mark { display: block; min-width: 0; }
.university-mark img { display: block; width: 100%; height: auto; max-height: 110px; object-fit: contain; }
.primary-nav { border-bottom: 2px solid var(--secondary); }
.primary-nav li > a { font-size: calc(16.5px * var(--text-scale, 1)); }
.primary-nav ul { flex-wrap: wrap; }
.primary-nav .is-active { color: var(--brand); box-shadow: inset 0 -2px var(--highlight); }
.has-submenu > a > span { display: none; }
.nav-submenu { border-top-color: var(--accent); box-shadow: none; border-inline: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.nav-submenu a { color: var(--ink); font-weight: 700; }

.header-search { display: block; position: relative; z-index: 40; width: 100%; margin: 0; }
.header-search__field { display: flex; border: 1px solid var(--line); background: var(--surface); }
.header-search input { width: 100%; min-width: 0; padding: 10px; border: 0; background: transparent; color: var(--ink); font-size: calc(12px * var(--text-scale, 1)); }
.header-search input::placeholder { color: var(--muted); }
.header-search button { display: block; border: 0; border-left: 1px solid var(--line); background: var(--button); color: var(--on-button); padding: 10px 12px; font-size: calc(12px * var(--text-scale, 1)); }
#search-results { position: absolute; top: calc(100% + 4px); right: 0; width: min(480px, calc(100vw - 32px)); max-height: 340px; overflow: auto; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 8px 24px #0003; padding: 8px 14px; font-size: calc(12px * var(--text-scale, 1)); }
#search-results a { padding: 9px 2px; color: var(--brand); }
#search-results p { margin: 8px 0; }

.home-slider { --slides-per-view: 2; position: relative; background: var(--soft); }
.home-slider__slides { position: relative; height: max(0px, calc(100dvh - var(--home-chrome-height, 290px) - 16px)); overflow: hidden; }
.home-slider__track { display: flex; gap: 8px; height: 100%; transition: transform .6s ease; }
.home-slider__slide { flex: 0 0 calc((100% - (var(--slides-per-view) - 1) * 8px) / var(--slides-per-view)); min-width: 0; height: 100%; }
.home-slider__slide img { display: block; width: 100%; height: 100%; object-fit: cover; }
.home-slider__controls button { position: absolute; top: 50%; transform: translateY(-50%); border: 1px solid #ffffff66; border-radius: 3px; background: #181c1466; color: #fff; width: 44px; height: 52px; padding: 0; font-size: calc(36px * var(--text-scale, 1)); line-height: 1; }
.home-slider__controls button:hover, .home-slider__controls button:focus-visible { background: #181c14b3; }
[data-slider-prev] { left: 16px; }
[data-slider-next] { right: 16px; }
@media (prefers-reduced-motion: reduce) { .home-slider__track { transition: none; } }
@media (max-width: 759px) { .home-slider { --slides-per-view: 1; } }
.button { padding: 10px 18px; border-radius: 2px; }
.button--gold { background: var(--highlight); color: #561A26; border-color: var(--highlight); }
.button--ghost { background: transparent; border-color: var(--hero-ink); color: var(--hero-ink); }
.button:hover { text-decoration: underline; }
:root[data-theme="dark"] .button--gold { color: #181C14; }

.ticker { background: var(--soft); border-bottom: 1px solid var(--line); }
.ticker__inner { display: flex; align-items: center; gap: 16px; padding-block: 12px; font-size: calc(14.4px * var(--text-scale, 1)); font-weight: 400; }
.ticker strong { color: var(--brand); flex-shrink: 0; font-size: calc(15px * var(--text-scale, 1)); font-weight: 700; }
.ticker__viewport { flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: thin; }
.ticker__track { display: flex; align-items: center; width: max-content; }
.ticker__item { display: inline-flex; align-items: center; gap: 16px; white-space: nowrap; padding: 5px 24px; border-right: 1px solid var(--line); }
.ticker__item:first-child { padding-left: 0; }
.ticker__item time { color: var(--muted); font-size: calc(12px * var(--text-scale, 1)); font-weight: 400; }
.ticker__pause { flex-shrink: 0; min-width: 64px; background: var(--surface); color: var(--brand); border: 1px solid var(--line); padding: 5px 10px; font-size: calc(13.2px * var(--text-scale, 1)); font-weight: 400; }

.cic-desk { padding-block: 36px 46px; }
.cic-desk__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; align-items: stretch; }
.cic-desk__card { display: flex; flex-direction: column; border: 1px solid var(--line); background: var(--surface); min-width: 0; scroll-margin-top: 24px; }
.cic-desk__header { padding: 14px 15px; min-height: 52px; background: var(--band); color: var(--on-band); border-top: 3px solid var(--secondary); }
.cic-desk__header h2 { margin: 0; color: var(--on-band); font-size: calc(13px * var(--text-scale, 1)); font-weight: 600; line-height: 1.6; text-align: left; }
.cic-desk__tabs { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; min-height: 21px; }
.cic-desk__tabs button { border: 0; padding: 0; background: transparent; color: var(--on-band); font-size: calc(12px * var(--text-scale, 1)); font-weight: 600; }
.cic-desk__tabs button.is-active { color: var(--highlight); text-decoration: underline; text-underline-offset: 5px; }
.cic-desk__body { display: flex; flex: 1; flex-direction: column; padding: 19px; }
[data-desk-panel], .du-updates-list { max-height: 360px; overflow: auto; scrollbar-width: thin; }
.cic-desk__notice { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 13px; padding-bottom: 15px; margin-bottom: 15px; border-bottom: 1px solid var(--line); }
.cic-desk__date { color: var(--brand); text-align: center; background: var(--soft); padding-block: 5px; border-top: 2px solid var(--accent); }
.cic-desk__date strong { display: block; font-size: calc(23px * var(--text-scale, 1)); line-height: 1.2; }
.cic-desk__date span { display: block; font-size: calc(11px * var(--text-scale, 1)); }
.cic-desk__notice p { font-size: calc(12px * var(--text-scale, 1)); margin: 0; line-height: 1.65; }
.cic-desk__notice a { color: var(--brand); }
.cic-desk__notice small { color: var(--muted); font-size: calc(10px * var(--text-scale, 1)); }
.cic-desk__button { display: inline-block; align-self: flex-start; margin-top: auto; font-size: calc(12px * var(--text-scale, 1)); color: var(--on-button); background: var(--button); border: 1px solid var(--button); padding: 7px 16px; border-radius: 2px; }
.cic-desk__body > [role="tabpanel"], .du-updates-list { margin-bottom: 18px; }
.cic-desk__director { text-align: left; }
.cic-desk__portrait { display: block; width: 100%; height: 190px; object-fit: contain; background: var(--soft); margin: 0 0 15px; }
.cic-desk__director h3 { font-size: calc(16px * var(--text-scale, 1)); margin: 0 0 12px; text-align: center; }
.cic-desk__director p { font-size: calc(13px * var(--text-scale, 1)); line-height: 1.8; }
.notice-more { display: inline-block; margin-top: 3px; font-size: calc(11px * var(--text-scale, 1)); color: var(--brand); }

.site-footer { background: var(--footer); color: var(--on-band); padding-top: 36px; }
.site-footer__grid { display: grid; grid-template-columns: .85fr .85fr 1.2fr 1.1fr; gap: 30px; padding-bottom: 30px; }
.site-footer__grid h2 { font: 600 13px/1.5 'Noto Sans', sans-serif; color: var(--on-band); margin-bottom: 17px; }
.site-footer__grid a { display: block; padding-block: 4px; font-size: calc(12px * var(--text-scale, 1)); }
.social-placeholder { display: block; padding-block: 4px; font-size: calc(12px * var(--text-scale, 1)); }
.social-placeholder small { font-size: calc(10px * var(--text-scale, 1)); }
.site-footer__grid address { font-style: normal; font-size: calc(12px * var(--text-scale, 1)); line-height: 1.8; margin-bottom: 10px; }
.footer-map iframe { display: block; width: 100%; height: 170px; border: 0; }
.site-footer__bottom { border-top: 1px solid var(--secondary); }
.site-footer__bottom > .container, .site-footer__bottom nav { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.site-footer__bottom p { padding-block: 18px; margin: 0; font-size: calc(10px * var(--text-scale, 1)); }
.site-footer__bottom a { font-size: calc(10px * var(--text-scale, 1)); }
.floating-contact { position: fixed; right: 20px; bottom: 20px; z-index: 30; display: grid; place-items: center; width: 43px; height: 43px; border-radius: 50%; background: var(--button); color: var(--on-button); border: 1px solid var(--line); }

@media (max-width: 1200px) {
  .identity-bar__inner { grid-template-columns: minmax(200px, 1.1fr) minmax(0, 1.6fr) 210px; gap: 18px; }
}
@media (max-width: 950px) {
  .cic-desk__grid { grid-template-columns: 1fr 1fr; gap: 20px; }
  .cic-desk__card:last-child { grid-column: 1 / -1; }
  .site-footer__grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .ticker__inner { flex-wrap: wrap; gap: 10px; }
  .ticker__viewport { flex-basis: 100%; order: 3; }
  .ticker__pause { margin-left: auto; }
}
@media (max-width: 650px) {
  .utility-bar__inner { padding-block: 8px; }
  .utility-bar nav { width: 100%; justify-content: space-between; gap: 4px 12px; }
  .utility-bar nav > a { display: block; font-size: calc(12px * var(--text-scale, 1)); }
  .utility-bar button { padding-block: 4px; }
  .identity-bar__inner { grid-template-columns: 1.1fr 1.4fr; gap: 12px 16px; padding-block: 14px; }
  .identity { grid-column: 2; grid-row: 1; }
  .university-mark { grid-column: 1; grid-row: 1; }
  .header-search { grid-column: 1 / -1; grid-row: 2; }
  .ticker__track { align-items: flex-start; }
  .ticker__item { flex-direction: column; align-items: flex-start; gap: 2px; white-space: normal; max-width: calc(100vw - 32px); }
  .ticker__item span { max-width: calc(100vw - 68px); }
  #search-results { width: 100%; }
  .home-slider__controls button { width: 36px; height: 44px; font-size: calc(30px * var(--text-scale, 1)); }
  [data-slider-prev] { left: 8px; }
  [data-slider-next] { right: 8px; }
  .cic-desk__grid { grid-template-columns: 1fr; }
  .cic-desk__card:last-child { grid-column: auto; }
  .site-footer__grid { grid-template-columns: 1fr; }
  .footer-map iframe { height: 190px; }
  .site-footer__bottom > .container { flex-direction: column; align-items: flex-start; gap: 0; padding-bottom: 18px; }
}

@media (min-width: 651px) and (max-width: 850px) {
  .identity-bar__inner { grid-template-columns: 1fr 1.5fr; }
  .header-search { grid-column: 1 / -1; max-width: 420px; justify-self: end; }
}

@media (max-width: 950px) and (max-height: 500px) and (orientation: landscape) {
  .identity-bar__inner { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.5fr) minmax(180px, 1fr); gap: 12px; padding-block: 8px; }
  .university-mark { grid-column: 1; grid-row: 1; }
  .identity { grid-column: 2; grid-row: 1; }
  .header-search { grid-column: 3; grid-row: 1; }
  .university-mark img { max-height: 56px; }
  .identity img { max-height: 64px; }
}
