/* Production-safe additions layered over the original Horizon V1 visual system. */
html { scroll-behavior: smooth; }
body.modal-open { overflow: hidden; }
.nav-actions a,
.nav-actions button,
.hero-actions a,
.hero-actions button,
.cream-btn,
.public-service-link { text-decoration: none; }
.nav-actions .primary,
.hero-actions .primary,
.hero-actions .ghost,
.cream-btn { display: inline-flex; align-items: center; justify-content: center; }
.match-open { border: 0; font: inherit; cursor: pointer; }
.fit-bars .fit-91 { --w: 91%; }
.fit-bars .fit-78 { --w: 78%; }
.fit-bars .fit-88 { --w: 88%; }
.logo-color-0 { --logo: #234a9f; }
.logo-color-1 { --logo: #0a527a; }
.logo-color-2 { --logo: #193e88; }
.logo-color-3 { --logo: #ba1737; }
.logo-color-4 { --logo: #18624c; }
.logo-color-5 { --logo: #d43b32; }

.nav-actions .text-btn { display: inline-flex; align-items: center; gap: 4px; }
.nav-actions .text-btn b {
  min-width: 18px;
  padding: 2px 5px;
  border-radius: 999px;
  background: #edf3ff;
  color: #1954d1;
  font-size: 9px;
  text-align: center;
}

.catalog-boundary { margin: 14px 0 24px; padding: 12px 16px; border: 1px solid #d7e3f3; border-radius: 12px; background: #f6f9fd; color: #60728a; font-size: 14px; line-height: 1.7; }

.badges .admission-coverage {
  color: #225d91;
  background: #edf7ff;
  font-weight: 750;
}
.public-heart { cursor: help; user-select: none; }
.catalog-empty {
  grid-column: 1 / -1;
  padding: 80px 24px;
  border: 1px solid #dce6ee;
  border-radius: 14px;
  background: #f8fbfe;
  color: #607288;
  text-align: center;
}
.catalog-empty strong { display: block; margin-bottom: 8px; color: #173253; font-size: 18px; }
.catalog-empty p { margin: 0; }

.service-status {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: center;
  margin-bottom: 88px;
  padding: 28px 32px;
  border: 1px solid #d8e5f4;
  border-radius: 16px;
  background: linear-gradient(125deg, #f3f8ff, #edf9f6);
}
.service-status span { color: #1c59cd; font-size: 9px; font-weight: 800; letter-spacing: 1.5px; }
.service-status h2 { margin: 8px 0 6px; color: #122846; font-size: 19px; }
.service-status p { margin: 0; color: #62758a; font-size: 12px; line-height: 1.75; }
.service-status > a,
.service-status > button {
  padding: 13px 18px;
  border: 0;
  border-radius: 9px;
  background: #1d59d1;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  font-family: inherit;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.source-card b:last-child { color: #805e1d; }
.floating-consult.public-service-link { color: #122846; }

.project-detail-dialog {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 24px;
  border: 0;
  background: transparent;
  overflow: auto;
}
.project-detail-dialog[open] {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
.project-detail-dialog::backdrop { background: rgba(11, 28, 52, .58); backdrop-filter: blur(3px); }
.project-detail-dialog .project-detail-card {
  position: relative;
  width: min(920px, 100%);
  max-height: none;
  margin: auto;
  border: 1px solid rgba(18, 40, 70, .08);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(10, 30, 56, .25);
  overflow: visible;
}
.project-detail-dialog .project-detail-close { position: absolute; z-index: 2; }
.detail-badges .resource-status { padding: 5px 9px; border-radius: 5px; font-size: 10px; }

.quick-score-section {
  display: grid;
  grid-template-columns: minmax(180px, .7fr) 1.3fr;
  gap: 16px 22px;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid #dbe5f2;
  border-radius: 11px;
  background: #f7faff;
}
.quick-score-section h3 { margin: 0 0 6px; color: #173253; font-size: 13px; }
.quick-score-section p { margin: 0; color: #66788d; font-size: 10px; line-height: 1.65; }
.quick-score-grid { display: grid; grid-template-columns: repeat(4, minmax(70px, 1fr)); gap: 8px; }
.quick-score-grid span { padding: 10px; border-radius: 8px; background: #fff; text-align: center; }
.quick-score-grid small,
.quick-score-grid b { display: block; }
.quick-score-grid small { color: #8290a2; font-size: 9px; }
.quick-score-grid b { margin-top: 3px; color: #194fae; font-size: 13px; }
.quick-score-section .score-note { grid-column: 1 / -1; padding-top: 10px; border-top: 1px solid #dce6f2; }

.admission-section {
  margin-top: 18px;
  padding: 20px;
  border: 1px solid #dce5ec;
  border-radius: 11px;
  background: #fff;
}
.admission-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.admission-heading h3,
.admission-section > h3 { margin: 0 0 6px; color: #173253; font-size: 14px; }
.admission-heading p { margin: 0; color: #66788d; font-size: 10px; line-height: 1.6; }
.admission-heading label { display: grid; gap: 6px; flex: 0 0 170px; color: #62758a; font-size: 9px; font-weight: 700; }
.admission-heading select {
  width: 100%;
  padding: 9px 28px 9px 10px;
  border: 1px solid #ccd9e8;
  border-radius: 7px;
  background: #fff;
  color: #173253;
  font: inherit;
  font-size: 11px;
}
.admission-results { margin-top: 16px; }
.admission-results > p { margin: 0; padding: 24px; color: #708197; text-align: center; }
.admission-summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 13px;
  border-radius: 8px 8px 0 0;
  background: #12335f;
  color: #fff;
  font-size: 10px;
}
.admission-summary span { color: #bcd0ea; }
.admission-table-wrap { border: 1px solid #dbe5ef; border-top: 0; overflow-x: auto; }
.admission-table-wrap table { width: 100%; border-collapse: collapse; min-width: 680px; }
.admission-table-wrap th,
.admission-table-wrap td { padding: 10px 11px; border-bottom: 1px solid #edf1f5; color: #52667e; font-size: 9px; line-height: 1.5; text-align: left; vertical-align: top; }
.admission-table-wrap th { background: #f5f8fc; color: #314e72; font-weight: 800; }
.admission-table-wrap td b { color: #153b71; font-size: 11px; }
.source-tier { display: inline-block; padding: 4px 6px; border-radius: 4px; font-weight: 750; white-space: nowrap; }
.source-tier.official { color: #136d5f; background: #e8f7f2; }
.source-tier.reference { color: #8a6419; background: #fff5da; }
.admission-record-notes { display: grid; gap: 8px; margin-top: 12px; }
.admission-record-notes article { padding: 11px 13px; border-left: 3px solid #b7cae3; background: #f8fafc; }
.admission-record-notes b { color: #25486f; font-size: 9px; }
.admission-record-notes p { margin: 4px 0; color: #52667d; font-size: 9px; line-height: 1.65; }
.admission-record-notes small { display: block; color: #77879a; font-size: 8px; line-height: 1.65; }
.admission-record-notes a { display: inline-block; margin-top: 6px; color: #1954d1; font-size: 9px; font-weight: 700; text-decoration: none; }
.admission-not-applicable { padding: 18px; border-left: 3px solid #d6a940; background: #fff9eb; }
.admission-not-applicable b { color: #8c6316; font-size: 11px; }
.admission-not-applicable p { margin: 5px 0 0; color: #766b54; font-size: 10px; line-height: 1.7; }
.source-links a small { color: #7c8ca0; font-size: 8px; font-weight: 700; white-space: nowrap; }
.source-empty { margin: 0; color: #697a8e; font-size: 10px; line-height: 1.7; }

.match-dialog {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 24px;
  border: 0;
  background: transparent;
  overflow: auto;
}
.match-dialog[open] { display: flex; align-items: flex-start; justify-content: center; }
.match-dialog::backdrop { background: rgba(11, 28, 52, .62); backdrop-filter: blur(3px); }
.match-dialog .public-match-card {
  position: relative;
  width: min(820px, 100%);
  max-height: none;
  margin: auto;
  padding: 34px;
  border: 1px solid rgba(18, 40, 70, .08);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(10, 30, 56, .28);
  overflow: visible;
}
.match-dialog .modal-close { position: absolute; top: 18px; right: 18px; z-index: 2; }
.match-dialog-heading { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 26px; padding-right: 34px; }
.match-dialog-heading > span {
  display: grid;
  flex: 0 0 44px;
  height: 44px;
  place-items: center;
  border-radius: 12px;
  background: #1958d4;
  color: #fff;
  font-size: 20px;
  font-weight: 800;
}
.match-dialog-heading small { color: #1b5dd6; font-size: 9px; font-weight: 800; letter-spacing: 1.5px; }
.match-dialog-heading h2 { margin: 5px 0 6px; color: #122846; font-size: 24px; }
.match-dialog-heading p { margin: 0; color: #65778d; font-size: 11px; line-height: 1.7; }
.match-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.match-form-grid label,
.match-budget {
  display: grid;
  gap: 7px;
  color: #173253;
  font-size: 11px;
  font-weight: 800;
}
.match-form-grid input,
.match-form-grid select,
.match-budget select {
  width: 100%;
  min-height: 45px;
  padding: 11px 13px;
  border: 1px solid #cfdae7;
  border-radius: 9px;
  background: #fff;
  color: #173253;
  font: inherit;
  font-size: 12px;
}
.match-form-grid input:focus,
.match-form-grid select:focus,
.match-budget select:focus { border-color: #1d5bd5; outline: 3px solid rgba(29, 91, 213, .12); }
.match-wide { grid-column: 1 / -1; }
.match-major-group {
  margin: 18px 0;
  padding: 16px;
  border: 1px solid #d6e1ed;
  border-radius: 11px;
}
.match-major-group legend { padding: 0 5px; color: #173253; font-size: 11px; font-weight: 800; }
.match-major-group legend small { margin-left: 5px; color: #14a78e; font-weight: 700; }
.match-major-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.match-major-options label { position: relative; cursor: pointer; }
.match-major-options input { position: absolute; opacity: 0; pointer-events: none; }
.match-major-options span {
  display: block;
  padding: 11px 8px;
  border: 1px solid #d6e1ed;
  border-radius: 8px;
  color: #52667d;
  font-size: 10px;
  font-weight: 750;
  text-align: center;
}
.match-major-options input:checked + span { border-color: #1d5bd5; background: #edf4ff; color: #1856c7; box-shadow: inset 0 0 0 1px #1d5bd5; }
.match-major-options input:focus-visible + span { outline: 3px solid rgba(29, 91, 213, .18); }
.match-field-error { margin: 10px 0 0; color: #c43b35; font-size: 10px; }
.match-budget small { color: #78889a; font-size: 9px; font-weight: 500; line-height: 1.6; }
.match-accuracy { margin-top: 17px; padding: 14px 16px; border-radius: 10px; background: #f5f8fc; }
.match-accuracy summary { color: #254a75; font-size: 10px; font-weight: 800; cursor: pointer; }
.match-accuracy[open] summary { margin-bottom: 14px; }
.match-submit-status { min-height: 18px; margin: 14px 0 5px; color: #c43b35; font-size: 10px; line-height: 1.6; }
.match-submit { width: 100%; border: 0; cursor: pointer; }
.match-submit:disabled { opacity: .62; cursor: wait; }
.match-profile-summary { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.match-profile-summary span { padding: 7px 10px; border-radius: 999px; background: #eef4ff; color: #25528d; font-size: 9px; font-weight: 750; }
.match-diagnosis { margin-bottom: 16px; padding: 14px 16px; border-left: 3px solid #17a98f; background: #edf9f6; }
.match-diagnosis b { color: #126f60; font-size: 11px; }
.match-diagnosis p { margin: 5px 0 0; color: #54736d; font-size: 10px; line-height: 1.7; }
.public-match-results { display: grid; gap: 11px; }
.public-match-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 13px;
  align-items: start;
  padding: 15px;
  border: 1px solid #dce5ef;
  border-radius: 11px;
  background: #fff;
}
.public-match-item .school-logo { width: 44px; height: 44px; }
.public-match-item h3 { margin: 1px 0 5px; color: #153253; font-size: 13px; }
.public-match-item p { margin: 0; color: #68798c; font-size: 9px; line-height: 1.65; }
.public-match-item .match-reasons { margin-top: 6px; color: #29578b; }
.public-match-item > div:last-child { display: grid; justify-items: end; gap: 8px; }
.public-match-item strong { color: #1958d4; font-size: 12px; white-space: nowrap; }
.public-match-item button { padding: 7px 9px; border: 1px solid #cfdbea; border-radius: 7px; background: #fff; color: #173c6a; font: inherit; font-size: 9px; font-weight: 750; cursor: pointer; }
.public-match-empty { padding: 28px; border-radius: 11px; background: #fff8e8; color: #75623d; text-align: center; }
.public-match-empty b { display: block; margin-bottom: 6px; color: #8c641c; }
.match-result-boundary { margin-top: 16px; padding: 14px 16px; border-radius: 10px; background: #f5f7fa; }
.match-result-boundary b { color: #263f60; font-size: 10px; }
.match-result-boundary p { margin: 5px 0 0; color: #6c7c8f; font-size: 9px; line-height: 1.7; }
.match-result-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.match-result-actions a { text-decoration: none; }

@media (max-width: 900px) {
  .service-status { grid-template-columns: 1fr; }
  .service-status > a,
  .service-status > button { justify-self: start; }
  .project-detail-dialog { padding: 14px; }
  .match-dialog { padding: 14px; }
}

@media (max-width: 700px) {
  .quick-score-section { grid-template-columns: 1fr; }
  .quick-score-section .score-note { grid-column: auto; }
  .admission-heading { align-items: stretch; flex-direction: column; }
  .admission-heading label { flex-basis: auto; }
}

@media (max-width: 520px) {
  .project-detail-dialog { padding: 0; }
  .project-detail-dialog .project-detail-card { min-height: 100%; border: 0; border-radius: 0; }
  .quick-score-grid { grid-template-columns: repeat(2, 1fr); }
  .service-status { margin-bottom: 58px; padding: 22px; }
  .service-status h2 { font-size: 17px; }
  .admission-section { padding: 14px; }
  .admission-summary { align-items: flex-start; flex-direction: column; gap: 4px; }
  .match-dialog { padding: 0; }
  .match-dialog .public-match-card { min-height: 100%; padding: 24px 17px 32px; border: 0; border-radius: 0; }
  .match-dialog-heading { gap: 11px; margin-bottom: 20px; padding-right: 25px; }
  .match-dialog-heading > span { flex-basis: 38px; height: 38px; }
  .match-dialog-heading h2 { font-size: 19px; }
  .match-form-grid { grid-template-columns: 1fr; gap: 12px; }
  .match-wide { grid-column: auto; }
  .match-major-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .public-match-item { grid-template-columns: 40px minmax(0, 1fr); }
  .public-match-item > div:last-child { grid-column: 1 / -1; grid-template-columns: 1fr auto; justify-items: stretch; align-items: center; }
  .public-match-item > div:last-child button { justify-self: end; }
  .match-result-actions { align-items: stretch; flex-direction: column-reverse; }
  .match-result-actions > * { width: 100%; justify-content: center; }
}
