.phil-org-shell {
  width: min(1440px, 94vw);
}

.phil-org-body button,
.phil-org-body input {
  font: inherit;
}

.phil-org-body button {
  cursor: pointer;
}

.phil-org-gate,
.phil-org-hero,
.phil-org-card,
.phil-org-members,
.phil-org-stat {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.24);
}

.phil-org-gate {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(242, 249, 252, 0.94)),
    linear-gradient(135deg, rgba(253, 188, 74, 0.16), transparent 38%);
  color: #163252;
  display: grid;
  gap: 1rem;
  margin: min(8vh, 5rem) auto;
  max-width: 620px;
  padding: clamp(1.4rem, 4vw, 2.2rem);
}

.phil-org-brand-lockup img,
.phil-org-wordmark img {
  display: block;
  height: auto;
  width: min(260px, 70vw);
}

.phil-org-eyebrow,
.phil-org-card-label {
  color: #8fdfff;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  margin: 0 0 0.65rem;
  text-transform: uppercase;
}

.phil-org-gate .phil-org-eyebrow,
.phil-org-card-label {
  color: #0a73a8;
}

.phil-org-gate h1,
.phil-org-hero h1 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  margin: 0;
}

.phil-org-gate h1 {
  color: #163252;
  font-size: clamp(2.2rem, 8vw, 4rem);
}

.phil-org-hero h1 {
  color: #f8fbff;
  font-size: clamp(2.35rem, 6vw, 5rem);
  max-width: 920px;
}

.phil-org-lead {
  color: rgba(232, 244, 255, 0.84);
  font-size: 1.02rem;
  line-height: 1.65;
  margin: 0;
  max-width: 760px;
}

.phil-org-gate .phil-org-lead {
  color: rgba(22, 50, 82, 0.78);
}

.phil-org-gate-form,
.phil-org-search {
  display: grid;
  gap: 0.5rem;
}

.phil-org-gate-form {
  margin-top: 0.6rem;
}

.phil-org-gate-form label,
.phil-org-search {
  color: rgba(22, 50, 82, 0.76);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.phil-org-search {
  color: rgba(232, 244, 255, 0.78);
}

.phil-org-gate-form input,
.phil-org-search input {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(22, 50, 82, 0.16);
  border-radius: 8px;
  color: #163252;
  min-height: 48px;
  outline: none;
  padding: 0 0.9rem;
  text-transform: none;
}

.phil-org-gate-form input:focus,
.phil-org-search input:focus {
  border-color: #52d1ff;
  box-shadow: 0 0 0 4px rgba(82, 209, 255, 0.18);
}

.phil-org-password-error {
  color: #a73434;
  font-weight: 800;
  margin: 0;
}

.phil-org-button,
.phil-org-segmented button,
.phil-org-icon-button {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  color: #e8f4ff;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.phil-org-button {
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  min-height: 44px;
  padding: 0.72rem 1rem;
  text-decoration: none;
  white-space: nowrap;
}

.phil-org-gate .phil-org-button {
  border-color: rgba(22, 50, 82, 0.14);
  color: #163252;
}

.phil-org-button:hover,
.phil-org-button:focus-visible,
.phil-org-segmented button:hover,
.phil-org-segmented button:focus-visible,
.phil-org-icon-button:hover,
.phil-org-icon-button:focus-visible {
  border-color: rgba(82, 209, 255, 0.62);
  transform: translateY(-1px);
}

.phil-org-button--primary {
  background: #fdbc4a;
  border-color: #fdbc4a;
  color: #003468;
}

.phil-org-button--primary:hover,
.phil-org-button--primary:focus-visible {
  background: #ffca63;
  color: #002b56;
}

.phil-org-button--small {
  min-height: 38px;
  padding: 0.5rem 0.72rem;
}

.phil-org-hero {
  align-items: end;
  background:
    linear-gradient(180deg, rgba(2, 23, 49, 0.94), rgba(4, 40, 76, 0.9)),
    linear-gradient(90deg, rgba(0, 180, 250, 0.08), transparent);
  display: grid;
  gap: 1.2rem;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-bottom: 1rem;
  padding: clamp(1.3rem, 4vw, 2.2rem);
}

.phil-org-wordmark {
  display: inline-flex;
  margin-bottom: 1rem;
}

.phil-org-hero-copy {
  display: grid;
  gap: 0.85rem;
}

.phil-org-hero-actions,
.phil-org-button-row,
.phil-org-segmented {
  align-items: center;
  display: flex;
  gap: 0.6rem;
}

.phil-org-hero-actions {
  flex-wrap: wrap;
  justify-content: end;
}

.phil-org-toolbar {
  align-items: end;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  padding: 0.5rem 0 1rem;
}

.phil-org-segmented {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  padding: 0.25rem;
}

.phil-org-segmented button {
  background: transparent;
  border-color: transparent;
  min-height: 38px;
  padding: 0.45rem 0.75rem;
}

.phil-org-segmented button.active {
  background: rgba(255, 255, 255, 0.94);
  color: #003468;
}

.phil-org-stats {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  margin-bottom: 1rem;
}

.phil-org-stat {
  background: rgba(255, 255, 255, 0.9);
  color: #163252;
  min-height: 92px;
  padding: 0.9rem;
}

.phil-org-stat span {
  color: #0a73a8;
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.25;
  min-height: 34px;
}

.phil-org-stat strong {
  color: #163252;
  display: block;
  font-size: 2rem;
  line-height: 1;
}

.phil-org-result-count {
  color: rgba(232, 244, 255, 0.84);
  font-weight: 700;
  margin: 0 0 1rem;
}

.phil-org-grid {
  display: grid;
  gap: 1rem;
}

.phil-org-chart-view {
  grid-template-columns: repeat(5, minmax(210px, 1fr));
}

.phil-org-list-view {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.phil-org-card,
.phil-org-members {
  background: rgba(255, 255, 255, 0.94);
  color: #163252;
  overflow: hidden;
}

.phil-org-card:nth-child(5n + 1) {
  border-top: 5px solid #52d1ff;
}

.phil-org-card:nth-child(5n + 2) {
  border-top: 5px solid #fdbc4a;
}

.phil-org-card:nth-child(5n + 3) {
  border-top: 5px solid #3ab795;
}

.phil-org-card:nth-child(5n + 4) {
  border-top: 5px solid #e86c7a;
}

.phil-org-card:nth-child(5n + 5) {
  border-top: 5px solid #7da2ff;
}

.phil-org-card-header {
  align-items: start;
  display: flex;
  gap: 0.8rem;
  justify-content: space-between;
  padding: 1rem;
}

.phil-org-card h2 {
  color: #163252;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.35rem;
  line-height: 1.12;
  margin: 0 0 0.55rem;
}

.phil-org-manager {
  color: rgba(22, 50, 82, 0.74);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
}

.phil-org-icon-button {
  align-items: center;
  background: #eef7fb;
  color: #003468;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 1.25rem;
  font-weight: 900;
  height: 34px;
  justify-content: center;
  line-height: 1;
  width: 34px;
}

.phil-org-team-list {
  border-top: 1px solid rgba(22, 50, 82, 0.12);
  display: grid;
}

.phil-org-team-row {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  padding: 0.9rem 1rem;
}

.phil-org-team-row + .phil-org-team-row {
  border-top: 1px solid rgba(22, 50, 82, 0.1);
}

.phil-org-team-name {
  color: #163252;
  font-weight: 850;
  line-height: 1.3;
}

.phil-org-coach-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.phil-org-coach-chip {
  background: #eef7fb;
  border: 1px solid #c7e9f5;
  border-radius: 999px;
  color: #003468;
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.2;
  padding: 0.35rem 0.55rem;
}

.phil-org-members {
  display: grid;
}

.phil-org-member-row {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr 1.1fr 1.1fr 1.6fr 0.8fr;
  padding: 0.9rem 1rem;
}

.phil-org-member-row + .phil-org-member-row {
  border-top: 1px solid rgba(22, 50, 82, 0.1);
}

.phil-org-member-head {
  background: #003468;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.phil-org-member-row span,
.phil-org-member-row strong {
  min-width: 0;
}

.phil-org-member-row strong {
  color: #163252;
}

.phil-org-member-row span {
  color: rgba(22, 50, 82, 0.74);
}

.phil-org-member-head span {
  color: #fff;
}

.phil-org-notes {
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(232, 244, 255, 0.82);
  margin-top: 1.6rem;
  padding-top: 1.2rem;
}

.phil-org-notes h2 {
  color: #f8fbff;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.35rem;
  margin: 0 0 0.6rem;
}

.phil-org-notes p {
  line-height: 1.5;
  margin: 0 0 0.45rem;
}

@media (max-width: 1180px) {
  .phil-org-chart-view,
  .phil-org-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .phil-org-hero,
  .phil-org-toolbar {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .phil-org-hero-actions {
    justify-content: start;
  }
}

@media (max-width: 720px) {
  .phil-org-shell {
    width: min(100%, 100vw);
    padding-top: 1rem;
  }

  .phil-org-hero,
  .phil-org-gate {
    border-radius: 8px;
  }

  .phil-org-hero-actions,
  .phil-org-button-row,
  .phil-org-segmented {
    flex-wrap: wrap;
  }

  .phil-org-chart-view,
  .phil-org-list-view,
  .phil-org-stats {
    grid-template-columns: 1fr;
  }

  .phil-org-stat {
    min-height: 72px;
  }

  .phil-org-team-row,
  .phil-org-member-row {
    grid-template-columns: 1fr;
  }

  .phil-org-member-head {
    display: none;
  }
}

@media print {
  body.phil-org-body {
    background: #fff;
    color: #111;
  }

  .phil-org-shell {
    max-width: none;
    padding: 0;
    width: 100%;
  }

  .print-hidden {
    display: none !important;
  }

  .print-compact {
    border-bottom: 1px solid #777;
    padding: 0 0 14px;
  }

  .phil-org-hero,
  .phil-org-card,
  .phil-org-members,
  .phil-org-stat {
    background: #fff;
    box-shadow: none;
    color: #111;
  }

  .phil-org-hero h1,
  .phil-org-notes h2 {
    color: #111;
  }

  .phil-org-lead,
  .phil-org-notes,
  .phil-org-manager,
  .phil-org-stat span,
  .phil-org-member-row span {
    color: #333;
  }

  .phil-org-stats,
  .phil-org-chart-view,
  .phil-org-list-view {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .phil-org-card,
  .phil-org-members,
  .phil-org-stat {
    break-inside: avoid;
  }

  .phil-org-card {
    margin-bottom: 12px;
  }
}
