/* Project Dynasty Teams depth styles (P42/P51 direction).
   Premium collectible franchise wall for the directory cards and the team
   detail résumé/intelligence/cornerstone surfaces. Loaded after redesign.css
   and the wave-one sheets so it only adds new .pd-tw-* surfaces; no existing
   selector is renamed or removed. Light and dark themes included, and the
   theme base tokens stay untouched (the neutral-gray shell pass has not
   landed yet). No stadium or placeholder imagery is used. */

.pd-tw-card {
  display: flex;
  flex-direction: column;
  padding: 0 !important;
  overflow: hidden;
}

.pd-tw-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding: 16px 16px 12px;
}

.pd-tw-card .team-card-open {
  margin: 0 16px 14px;
}

.pd-tw-card__honors {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pd-tw-card__honors span {
  border: 1px solid color-mix(in srgb, var(--team-primary) 40%, var(--subtle));
  border-radius: 999px;
  background: color-mix(in srgb, var(--team-primary) 12%, transparent);
  padding: 3px 9px;
  font-size: 9.5px;
  font-weight: 950;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.pd-tw-card__head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.pd-tw-card__head .team-title {
  min-width: 0;
}

.pd-tw-card__head .team-title h3 {
  margin: 0;
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pd-tw-card__head .team-title h3 a {
  color: inherit;
  text-decoration: none;
}

.pd-tw-card__head .team-title p {
  margin: 2px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pd-tw-card__rank {
  margin-left: auto;
  align-self: flex-start;
  border: 1px solid var(--subtle);
  border-radius: 999px;
  background: color-mix(in srgb, var(--team-primary) 10%, transparent);
  color: var(--ink);
  padding: 3px 9px;
  font-size: 10px;
  font-weight: 950;
}

.pd-tw-card__vitals {
  display: grid;
  grid-template-columns: minmax(74px, 1.1fr) repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-items: stretch;
}

.pd-tw-vital {
  display: grid;
  align-content: center;
  gap: 2px;
  min-width: 0;
  border: 1px solid var(--subtle);
  border-radius: 12px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--team-primary) 7%, transparent), transparent);
  padding: 8px 10px;
}

.pd-tw-vital em {
  color: var(--muted);
  font-size: 8.5px;
  font-style: normal;
  font-weight: 950;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.pd-tw-vital strong {
  overflow: hidden;
  font-size: 15px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pd-tw-vital--ovr strong {
  font-size: 26px;
  line-height: 1;
}

.pd-tw-dev {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.pd-tw-dev__tier {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--subtle);
  border-radius: 999px;
  background: #fff;
  padding: 3px 9px 3px 6px;
}

.pd-tw-dev__tier img {
  width: 15px;
  height: 15px;
  object-fit: contain;
}

.pd-tw-dev__tier strong {
  font-size: 11.5px;
  font-weight: 950;
}

.pd-tw-dev__label {
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
  font-weight: 850;
  letter-spacing: .02em;
}

.pd-tw-corners {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: auto;
}

.pd-tw-corner {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--subtle);
  border-left: 3px solid var(--team-primary);
  border-radius: 12px;
  background: linear-gradient(145deg, #fff, color-mix(in srgb, var(--team-primary) 8%, #fff));
  color: var(--ink);
  padding: 8px 7px;
  text-decoration: none;
}

.pd-tw-corner__label {
  position: absolute;
  top: 4px;
  right: 7px;
  color: var(--muted);
  font-size: 7.5px;
  font-weight: 1000;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.pd-tw-corner__portrait {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--team-primary) 34%, var(--subtle));
  border-radius: 50%;
  background: linear-gradient(160deg, color-mix(in srgb, var(--team-primary) 30%, #0b1727), #0b1727);
}

.pd-tw-corner__blank {
  position: absolute;
  inset: 0;
  border-radius: 50%;
}

.pd-tw-corner__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pd-tw-corner__img.is-hidden {
  display: none;
}

.pd-tw-corner__who {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.pd-tw-corner__who strong {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 12px;
  font-weight: 950;
  line-height: 1.15;
}

.pd-tw-corner__who small {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pd-tw-corner__ovr {
  display: grid;
  justify-items: center;
  gap: 0;
  padding-top: 6px;
}

.pd-tw-corner__ovr strong {
  font-size: 16px;
  font-weight: 1000;
  line-height: 1;
}

.pd-tw-corner__ovr em {
  color: var(--muted);
  font-size: 7px;
  font-style: normal;
  font-weight: 950;
  letter-spacing: .08em;
}

/* Team detail surfaces */

.pd-tw-resume {
  display: grid;
  gap: 14px;
  overflow: hidden;
  margin-bottom: 14px;
  border: 1px solid color-mix(in srgb, var(--team-primary) 42%, #25384e);
  border-left: 6px solid var(--team-primary);
  border-radius: 22px;
  background: radial-gradient(circle at 90% 8%, color-mix(in srgb, var(--team-secondary) 32%, transparent), transparent 36%), linear-gradient(135deg, #081424, #17314f);
  color: #fff;
  padding: 22px 26px;
}

.pd-tw-resume__head h2 {
  margin: 4px 0 0;
  color: #fff;
  font-size: clamp(26px, 2.6vw, 38px);
  letter-spacing: -.04em;
  line-height: .95;
}

.pd-tw-resume__head .eyebrow {
  color: #efc66c;
}

.pd-tw-resume__head small {
  display: block;
  margin-top: 6px;
  color: #b7c4d2;
  font-size: 11px;
  font-weight: 750;
}

.pd-tw-resume__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
}

.pd-tw-resume__grid span {
  display: grid;
  gap: 3px;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 14px;
  background: rgba(255, 255, 255, .07);
  padding: 11px 14px;
}

.pd-tw-resume__grid em {
  color: #b7c4d2;
  font-size: 8px;
  font-style: normal;
  font-weight: 950;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.pd-tw-resume__grid strong {
  color: #f2cb72;
  font-size: 24px;
  font-weight: 1000;
  line-height: 1;
}

.pd-tw-panel {
  margin-bottom: 14px;
  border-left: 5px solid var(--team-primary);
}

.pd-tw-panel .section-head small {
  display: block;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
}

.pd-tw-franchise__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.pd-tw-franchise__grid .metric {
  border: 1px solid var(--subtle);
  border-radius: 12px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--team-primary) 7%, transparent), transparent);
}

.pd-tw-panel--corners .pd-tw-corners {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pd-tw-panel--corners .pd-tw-corner {
  padding: 12px;
}

.pd-tw-panel--corners .pd-tw-corner__portrait {
  width: 58px;
  height: 58px;
}

.pd-tw-panel--corners .pd-tw-corner__who strong {
  font-size: 15px;
}

.pd-tw-panel--corners .pd-tw-corner__who small {
  font-size: 10px;
}

.pd-tw-panel--corners .pd-tw-corner__ovr strong {
  font-size: 24px;
}

.pd-tw-corner:hover {
  border-color: color-mix(in srgb, var(--team-primary) 55%, var(--subtle));
}

html[data-theme="dark"] .pd-tw-card {
  background-color: #111d2a;
  background-image: none;
}

html[data-theme="dark"] .pd-tw-card__body,
html[data-theme="dark"] .pd-tw-corner {
  color: #eef3f9;
}

html[data-theme="dark"] .pd-tw-vital,
html[data-theme="dark"] .pd-tw-dev__tier {
  border-color: #2b3c52;
  background: #101f31;
}

html[data-theme="dark"] .pd-tw-corner {
  background: linear-gradient(145deg, #12233a, color-mix(in srgb, var(--team-primary) 18%, #0c1826));
}

html[data-theme="dark"] .pd-tw-rank {
  border-color: #2b3c52;
  color: #eef3f9;
}

@media (max-width: 43.75rem) {
  .pd-tw-corner {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .pd-tw-panel--corners .pd-tw-corners {
    grid-template-columns: 1fr;
  }

  .pd-tw-resume {
    padding: 18px;
  }

  .pd-tw-resume__grid strong {
    font-size: 20px;
  }
}
