:root {
  color-scheme: light;
  --ground: #F4F6F8;
  --surface: #FFFFFF;
  --ink: #16233B;
  --muted: #4A5568;
  --line: #DCE1E8;
  --primary: #1D4E89;
  --primary-soft: #E8EEF6;
  --accent: #C2410C;
  --shadow-soft: 0 6px 18px rgb(22 35 59 / 8%);
  font-family: "Mukta", "Noto Sans Devanagari", sans-serif;
  color: var(--ink);
  background: var(--ground);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--ground);
  color-scheme: light;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.45;
}

button,
input,
select {
  color-scheme: light;
  font: inherit;
}

button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #82A8D4;
  outline-offset: 2px;
}

.site-header {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(100px, 1fr) minmax(420px, 2.5fr) minmax(140px, 1fr);
  align-items: center;
  gap: 22px;
  min-height: 124px;
  padding: 18px 34px;
  border-bottom: 3px solid var(--primary);
  background: var(--surface);
}

.brand-logo {
  display: flex;
  min-width: 0;
  height: 82px;
  align-items: center;
  justify-content: flex-start;
}

.brand-logo-right {
  justify-content: flex-end;
}

.brand-logo img {
  display: block;
  width: auto;
  max-width: 100%;
  height: 76px;
  object-fit: contain;
}

.logo-fallback {
  display: inline-flex;
  min-width: 82px;
  min-height: 66px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--primary);
  background: #fff;
  font-weight: 800;
  line-height: 1.05;
  text-align: center;
}

.logo-fallback-scert {
  font-size: 18px;
  letter-spacing: 0.04em;
}

.logo-fallback-scert small {
  margin-top: 4px;
  font-size: 8px;
  letter-spacing: 0.12em;
}

.logo-fallback-nipun {
  min-width: 100px;
  color: var(--accent);
  font-size: 20px;
}

.logo-fallback-nipun small {
  margin-top: 2px;
  font-size: 15px;
}

.brand-title {
  text-align: center;
}

.brand-title-main {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.2;
}

.brand-title-subtitle {
  margin-top: 5px;
  color: var(--muted);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.35;
}

.shell-grid {
  position: relative;
  display: grid;
  grid-template-columns: 265px minmax(0, 1fr);
  align-items: stretch;
  min-height: 620px;
}

.sidebar {
  min-width: 0;
  padding: 22px 15px 28px;
  border-right: 1px solid var(--line);
  background: var(--surface);
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.nav-section {
  display: grid;
  gap: 3px;
}

.nav-section-label {
  margin: 0 10px 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.09em;
  line-height: 1.4;
  text-transform: uppercase;
}

.nav-link {
  display: flex;
  min-height: 44px;
  align-items: center;
  padding: 8px 11px;
  border-radius: 8px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 120ms ease, color 120ms ease;
}

.nav-link:hover {
  background: var(--primary-soft);
}

.nav-link.is-active {
  color: #fff;
  background: var(--primary);
  font-weight: 700;
}

.nav-link-disabled {
  color: #7B8492;
  cursor: not-allowed;
}

.nav-link-disabled small {
  margin-left: 4px;
  color: #858E9A;
  font-size: 13px;
}

.workspace {
  min-width: 0;
  padding: 0 26px 34px;
}

.mobile-menu-button {
  display: none;
}

.filter-bar {
  position: sticky;
  z-index: 10;
  top: 0;
  margin: 18px -6px 0;
  padding: 16px 18px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.filter-bar-heading {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  min-height: 34px;
  align-items: center;
  gap: 5px;
  margin-bottom: 9px;
}

.filter-bar-heading h2 {
  grid-column: 1;
  margin: 0;
  font-size: 19px;
  font-weight: 700;
}

.filter-bar-heading > .info-wrap {
  grid-column: 2;
}

.filter-panel-toggle {
  grid-column: 4;
  flex: 0 0 auto;
  justify-self: end;
  width: 44px;
  min-width: 44px;
  padding: 9px;
}

.filter-panel-toggle-icon {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  transition: transform 150ms ease;
}

.filter-panel-toggle[aria-expanded="true"] .filter-panel-toggle-icon {
  transform: rotate(180deg);
}

.filter-bar.is-collapsed .filter-bar-heading {
  margin-bottom: 0;
}

.filter-load-status {
  grid-column: 3;
  min-height: 20px;
  min-width: 0;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

.filter-load-status.is-error {
  color: #9B3412;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  align-items: end;
  gap: 11px 12px;
}

.filter-control {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.filter-control label,
.filter-spacer-label {
  min-height: 21px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.filter-control select,
.filter-control input {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 8px 35px 8px 11px;
  border: 1px solid #BFC8D4;
  border-radius: 8px;
  color: var(--ink);
  background-color: #fff;
  font-size: 14px;
}

.filter-control select:disabled {
  color: #707A89;
  background-color: #F2F4F6;
  cursor: not-allowed;
}

.filter-control input {
  padding-right: 11px;
}

.school-search-wrap {
  position: relative;
}

.school-results {
  position: absolute;
  z-index: 30;
  top: calc(100% + 5px);
  right: 0;
  left: 0;
  max-height: 320px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 24px rgb(22 35 59 / 16%);
}

.school-result {
  display: flex;
  width: 100%;
  min-height: 58px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 1px;
  padding: 8px 11px;
  border: 0;
  border-bottom: 1px solid #EEF0F3;
  color: var(--ink);
  background: #fff;
  cursor: pointer;
  text-align: left;
}

.school-result:last-child {
  border-bottom: 0;
}

.school-result:hover,
.school-result.is-highlighted {
  background: var(--primary-soft);
}

.school-result-name {
  font-weight: 600;
  line-height: 1.2;
}

.school-result-meta {
  color: var(--muted);
  font-size: 12px;
}

.school-results-message {
  padding: 11px;
  color: var(--muted);
  font-size: 14px;
}

.filter-reset-control {
  justify-content: flex-end;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 9px 13px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
}

.button-secondary {
  border-color: #AEB9C7;
  color: var(--primary);
  background: #fff;
}

.button-secondary:hover {
  background: var(--primary-soft);
}

.filter-summary {
  display: flex;
  min-height: 24px;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 5px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.filter-summary strong {
  color: var(--ink);
  font-weight: 700;
}

.info-wrap {
  position: relative;
  display: inline-flex;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
}

.info-button {
  display: inline-flex;
  width: 44px;
  min-width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.info-button span {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border: 1px solid #AAB4C1;
  border-radius: 50%;
  background: #fff;
  font-size: 15px;
  font-weight: 800;
}

.info-button:hover span {
  border-color: var(--primary);
  color: var(--primary);
}

.info-popover {
  position: absolute;
  z-index: 40;
  top: calc(100% + 3px);
  left: 0;
  width: min(290px, calc(100vw - 38px));
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
}

.page-content {
  min-height: 370px;
  padding: 28px 0 40px;
}

.page-heading {
  display: flex;
  align-items: flex-end;
  gap: 9px;
  margin-bottom: 18px;
}

.page-heading h1 {
  margin: 0;
  font-size: 32px;
  font-weight: 800;
  line-height: 1.15;
}

.page-heading .info-wrap {
  margin-bottom: -5px;
}

.stage-note {
  max-width: 820px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.stage-note p {
  margin: 0;
  color: var(--muted);
}

.stage-note .stage-note-title {
  margin-bottom: 5px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
}

.site-footer {
  display: flex;
  min-height: 156px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 18px 20px 23px;
  border-top: 1px solid var(--line);
  background: var(--surface);
  text-align: center;
}

.footer-partner-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.footer-logo {
  display: flex;
  height: 60px;
  align-items: center;
  justify-content: center;
}

.footer-logo img {
  display: block;
  width: auto;
  max-width: min(210px, 60vw);
  height: 60px;
  object-fit: contain;
}

.logo-fallback-vopa {
  min-width: 112px;
  min-height: 43px;
  border: 0;
  color: var(--primary);
  font-size: 31px;
  letter-spacing: 0.08em;
}

.site-footer p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.chat-widget {
  position: fixed;
  z-index: 50;
  right: 22px;
  bottom: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 9px;
}

.chat-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 10px 16px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: var(--accent);
  box-shadow: 0 5px 16px rgb(22 35 59 / 20%);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.chat-button:hover {
  background: #A9370A;
}

.chat-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.chat-note {
  max-width: 290px;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  background: #fff;
  box-shadow: var(--shadow-soft);
  font-size: 14px;
}

[hidden] {
  display: none !important;
}

@media (max-width: 1120px) {
  .filter-grid {
    grid-template-columns: repeat(3, minmax(140px, 1fr));
  }

  .site-header {
    grid-template-columns: minmax(85px, 0.8fr) minmax(360px, 2.7fr) minmax(120px, 1fr);
    gap: 14px;
    padding-right: 24px;
    padding-left: 24px;
  }
}

@media (max-width: 900px) {
  .site-header {
    grid-template-columns: 64px minmax(0, 1fr) 90px;
    min-height: 112px;
    gap: 10px;
    padding: 14px 18px;
  }

  .brand-logo {
    height: 60px;
  }

  .brand-logo img {
    height: 48px;
  }

  .logo-fallback {
    min-width: 47px;
    min-height: 46px;
    font-size: 13px;
  }

  .logo-fallback-scert small {
    font-size: 6px;
  }

  .logo-fallback-nipun {
    min-width: 58px;
    font-size: 14px;
  }

  .logo-fallback-nipun small {
    font-size: 10px;
  }

  .brand-title-main {
    font-size: 23px;
  }

  .shell-grid {
    display: block;
    min-height: 600px;
  }

  .sidebar {
    position: absolute;
    z-index: 21;
    top: 54px;
    left: 12px;
    display: none;
    width: min(285px, calc(100vw - 24px));
    max-height: calc(100vh - 80px);
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: 0 12px 32px rgb(22 35 59 / 20%);
  }

  .sidebar.is-open {
    display: block;
  }

  .workspace {
    padding: 0 18px 26px;
  }

  .mobile-menu-button {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    margin: 10px 0 0;
    padding: 8px 15px;
    border: 1px solid #AEB9C7;
    border-radius: 8px;
    color: var(--primary);
    background: #fff;
    font-weight: 700;
    cursor: pointer;
  }

  .filter-bar {
    margin-top: 9px;
    border-top: 1px solid var(--line);
    border-radius: 10px;
  }
}

@media (max-width: 640px) {
  .site-header {
    grid-template-columns: 56px minmax(0, 1fr) 64px;
    row-gap: 6px;
    min-height: 0;
    padding: 12px 14px 15px;
  }

  .brand-logo {
    height: 54px;
  }

  .brand-logo-left {
    justify-content: flex-start;
  }

  .brand-logo-right {
    grid-column: 3;
    justify-content: flex-end;
  }

  .brand-logo img {
    max-width: 58px;
    height: 48px;
  }

  .brand-title {
    grid-row: 2;
    grid-column: 1 / -1;
  }

  .brand-title-main {
    font-size: 26px;
    line-height: 1.12;
  }

  .brand-title-subtitle {
    margin-top: 6px;
    font-size: 16px;
    line-height: 1.25;
  }

  .workspace {
    padding-right: 12px;
    padding-left: 12px;
  }

  .filter-bar {
    padding: 13px 12px 12px;
  }

  .filter-bar-heading {
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    margin-bottom: 7px;
  }

  .filter-load-status {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    min-height: 0;
    margin: 0;
    text-align: left;
  }

  .filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .school-search-control,
  .filter-reset-control {
    grid-column: 1 / -1;
  }

  .filter-control label,
  .filter-spacer-label {
    font-size: 12px;
  }

  .filter-control select,
  .filter-control input {
    font-size: 13px;
  }

  .filter-reset-control {
    align-items: stretch;
  }

  .filter-summary {
    align-items: flex-start;
    flex-direction: column;
    gap: 0;
    font-size: 13px;
  }

  .page-content {
    min-height: 310px;
    padding-top: 24px;
  }

  .page-heading h1 {
    font-size: 29px;
  }

  .stage-note {
    padding: 18px;
  }

  .site-footer {
    padding-bottom: 84px;
  }

  .site-footer p {
    max-width: 360px;
    font-size: 13px;
  }

  .chat-widget {
    right: 12px;
    bottom: 12px;
  }

  .chat-button {
    min-height: 46px;
    padding: 9px 13px;
    font-size: 14px;
  }
}

