:root {
  --paper: #ffffff;
  --ink: #1d2a38;
  --muted: #5f6e7d;
  --accent: #20425b;
  --accent-dark: #163347;
  --border: #20425b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Tahoma, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

.page-shell {
  width: 100%;
  margin: 0 auto;
  padding: 0;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h2 {
  margin: 0;
  font-family: Tahoma, sans-serif;
  font-weight: 700;
  line-height: 1.05;
  font-size: clamp(1.8rem, 2.2vw, 2.4rem);
}

.results-meta,
.alumni-meta,
.auth-copy {
  color: var(--muted);
}

.card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  transition: box-shadow 180ms ease, border-color 180ms ease;
}

.card.is-expanded {
  box-shadow: 0 18px 40px rgba(32, 66, 91, 0.08);
}

body.modal-embed .page-shell {
  height: 100%;
}

body.modal-embed .card {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  background: transparent;
}

body.modal-embed .toolbar {
  display: none;
}

body.modal-embed .widget-content {
  margin-top: 0;
  display: block;
  opacity: 1;
}

body.modal-embed .widget-content-inner {
  min-height: 100vh;
}

body.modal-embed .auth-panel,
body.modal-embed #directory-panel {
  margin-top: 0;
  padding: 24px 26px 26px;
}

body.modal-embed .status-banner {
  margin: 18px 26px 0;
}

body.modal-embed .auth-copy {
  max-width: none;
}

.toolbar,
.results-meta,
.alumni-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.intro-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 20px;
}

.intro-copy {
  margin: 0;
  max-width: 54ch;
  color: var(--muted);
  line-height: 1.6;
}

.widget-content {
  display: grid;
  grid-template-rows: 1fr;
  overflow: hidden;
  opacity: 1;
  transition: grid-template-rows 260ms ease, opacity 220ms ease, margin-top 220ms ease;
  margin-top: 18px;
}

.card.is-collapsed .widget-content {
  grid-template-rows: 0fr;
  opacity: 0;
  margin-top: 0;
}

.widget-content-inner {
  min-height: 0;
}

.card.is-collapsed .widget-content-inner {
  min-height: 0;
}

.hidden {
  display: none;
}

.status-banner {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(32, 66, 91, 0.18);
  background: rgba(32, 66, 91, 0.05);
}

.status-banner.success {
  background: rgba(42, 123, 90, 0.08);
  border-color: rgba(42, 123, 90, 0.2);
  color: #23563e;
}

.status-banner.error {
  background: rgba(164, 53, 51, 0.08);
  border-color: rgba(164, 53, 51, 0.18);
  color: #7a2524;
}

.auth-panel {
  margin-top: 22px;
}

.auth-copy {
  margin: 0 0 18px;
  max-width: 56ch;
  line-height: 1.6;
}

.auth-copy a {
  color: var(--ink);
}

.login-form {
  display: flex;
  align-items: end;
  gap: 16px;
}

.login-form label,
.filters-grid label {
  display: grid;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 600;
}

.login-form label {
  flex: 1;
}

.filters-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}

input,
select,
button {
  font: inherit;
}

input,
select {
  width: 100%;
  border: 1px solid rgba(32, 66, 91, 0.18);
  border-radius: 14px;
  background: #ffffff;
  color: var(--ink);
  min-height: 52px;
  padding: 0 16px;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

input:focus,
select:focus {
  outline: none;
  border-color: rgba(32, 66, 91, 0.55);
  box-shadow: 0 0 0 4px rgba(32, 66, 91, 0.08);
}

select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 48px;
  background-image:
    linear-gradient(45deg, transparent 50%, #20425b 50%),
    linear-gradient(135deg, #20425b 50%, transparent 50%);
  background-position:
    calc(100% - 23px) calc(50% - 2px),
    calc(100% - 17px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

select:hover {
  border-color: rgba(32, 66, 91, 0.32);
  background-color: rgba(32, 66, 91, 0.015);
}

button {
  border: 0;
  border-radius: 16px;
  min-height: 52px;
  padding: 0 20px;
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease, color 120ms ease;
}

button:hover {
  transform: translateY(-1px);
}

.primary-button {
  background: var(--accent);
  color: #ffffff;
}

.primary-button:hover,
.secondary-button:hover {
  background: var(--accent-dark);
  color: #ffffff;
}

.secondary-button {
  background: rgba(32, 66, 91, 0.12);
  color: var(--accent);
}

.text-button {
  min-height: auto;
  padding: 0;
  background: transparent;
  color: var(--accent);
  white-space: nowrap;
}

.results-meta {
  margin: 20px 0 16px;
}

.results-list {
  display: grid;
  gap: 14px;
}

.alumni-card {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
}

.alumni-header h3 {
  margin: 0;
  font-size: 1.15rem;
}

.alumni-header a {
  color: var(--ink);
  text-decoration-color: #20425b;
}

.alumni-header a:hover {
  color: var(--accent);
}

.alumni-meta {
  margin: 8px 0 0;
  font-size: 0.95rem;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.chip {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(32, 66, 91, 0.08);
  color: var(--accent-dark);
  font-size: 0.88rem;
  font-weight: 600;
}

.empty-state {
  padding: 32px 20px;
  text-align: center;
  border: 1px dashed rgba(29, 42, 56, 0.2);
  border-radius: 22px;
  color: var(--muted);
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
}

.pagination button {
  min-width: 44px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(32, 66, 91, 0.22);
  background: #ffffff;
  color: var(--ink);
}

.pagination button.active {
  background: #20425b;
  color: #ffffff;
  border-color: #20425b;
}

.pagination button:disabled {
  opacity: 0.45;
  cursor: default;
  transform: none;
}

@media (max-width: 760px) {
  .intro-panel,
  .login-form,
  .toolbar,
  .results-meta,
  .alumni-header {
    flex-direction: column;
    align-items: stretch;
  }

  .filters-grid {
    grid-template-columns: 1fr;
  }
}
