/* Teams pages use the same sky, ink, and angled accents as the hub home. */
.teams-rework { --team-muted:#536b88; --team-line:#cddfe8; }
.teams-rework .desktop-nav a[aria-current="page"] { color:#c90879; }
.teams-rework .mobile-navigation a[aria-current="page"] { color:#c90879; }
.teams-hero {
  position:relative;
  min-height:235px;
  background-color:#bceffa;
  background-image:url('rework/sky-clouds.webp');
  background-size:max(100vw,calc(var(--sky-art-height) * 1.75)) auto;
  background-position:center calc(-1 * var(--header-art-height));
  background-repeat:no-repeat;
  overflow:hidden;
}
.teams-hero-inner {
  position:relative;
  z-index:1;
  padding:38px 0 82px;
}
.teams-overline {
  display:block;
  margin-bottom:12px;
  color:#086da2;
  font:700 13px Tektur,Arial,sans-serif;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.teams-hero h1 {
  max-width:900px;
  margin:0;
  color:var(--ink);
  font:800 clamp(46px,7vw,78px)/1.05 Tektur,Arial,sans-serif;
  letter-spacing:-.045em;
  overflow-wrap:anywhere;
}
.teams-hero .hub-lede {
  max-width:620px;
  margin:16px 0 0;
  color:#263d65;
  font-size:17px;
  font-weight:600;
  line-height:1.55;
}
.teams-hero .hub-hero-title {
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:16px;
}
.teams-hero .hub-hero-title h1 { flex:1 1 320px; }
.teams-hero .hub-team-logo {
  width:80px;
  height:80px;
  object-fit:cover;
  border:4px solid var(--aqua);
  background:#fff;
}
.teams-hero .hub-hero-meta,.teams-hero .hub-hero-actions {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:10px;
  margin-top:18px;
}
.teams-hero .hub-hero-meta > * {
  padding:5px 11px;
  color:var(--ink);
  background:#ffffffd9;
  border:1px solid #a9d9e9;
  font-size:13px;
  font-weight:700;
}
.teams-hero .hub-hero-actions form { margin:0; }
.teams-hero .hub-hero-actions .hub-lede { flex-basis:100%; }
.teams-hero .hero-sash { height:65px; }
.teams-content { padding:18px 0 78px; }
.teams-content > section { margin:0 0 46px; }
.profile-section-heading {
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:20px;
  margin-bottom:20px;
  border-bottom:1px solid var(--team-line);
  padding-bottom:13px;
}
.profile-section-heading h2 {
  margin:0;
  color:var(--ink);
  font:800 clamp(25px,3vw,36px)/1.2 Tektur,Arial,sans-serif;
  font-style:italic;
  letter-spacing:-.025em;
}
.profile-section-heading h2:before {
  content:'';
  display:inline-block;
  width:10px;
  height:22px;
  margin-right:35px;
  background:var(--aqua);
  transform:skew(-24deg);
  box-shadow:10px 0 var(--pink),20px 0 var(--yellow);
  vertical-align:-2px;
}
.profile-section-heading > span { color:var(--team-muted); font-size:13px; font-weight:700; }
.hub-panel {
  padding:clamp(20px,3vw,30px);
  border:1px solid var(--team-line);
  background:#f9fdff;
}
.hub-note {
  margin:0 0 17px;
  color:var(--team-muted);
  font-size:15px;
  line-height:1.55;
}
.hub-note:last-child { margin-bottom:0; }
.hub-note a { color:#0068a5; text-decoration:underline; }
.hub-flash {
  padding:14px 18px;
  margin:0 0 28px;
  border-left:5px solid var(--aqua);
  background:#e9faff;
  color:var(--ink);
  font-weight:700;
}
.hub-flash-error { border-color:var(--pink); background:#fff0f8; }
.hub-btn {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:43px;
  padding:8px 20px;
  border:2px solid var(--ink);
  color:var(--ink);
  background:white;
  font:750 14px Tektur,Arial,sans-serif;
  text-decoration:none;
  cursor:pointer;
  transform:skew(-9deg);
}
.hub-btn:hover,.hub-btn:focus-visible { background:var(--ink); color:white; }
.hub-btn-primary { border-color:var(--ink); background:var(--yellow); }
.hub-btn-small { min-height:35px; padding:5px 13px; font-size:12px; }
.hub-btn-quiet { border-color:var(--team-line); background:transparent; }
.hub-btn-danger { color:#a92149; border-color:#a92149; }
.hub-btn-danger:hover,.hub-btn-danger:focus-visible { color:white; background:#a92149; }
.hub-list { border-top:1px solid var(--team-line); }
.hub-row {
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:12px 20px;
  min-height:72px;
  padding:15px 18px;
  border-bottom:1px solid var(--team-line);
  background:white;
}
.hub-row-main {
  display:flex;
  align-items:center;
  flex:1 1 220px;
  min-width:0;
  gap:12px;
  color:var(--ink);
}
.hub-row-main strong { overflow-wrap:anywhere; font:750 17px Tektur,Arial,sans-serif; }
a.hub-row-main:hover strong,a.hub-row-main:focus-visible strong { color:#c90879; }
.hub-row form { margin:0; }
.hub-row-meta { color:var(--team-muted); font-size:12px; }
.hub-row-owner { padding:4px 8px; background:var(--yellow); font:750 12px Tektur,Arial,sans-serif; }
.hub-tag {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:52px;
  padding:5px 9px;
  border:2px solid var(--ink);
  color:var(--ink);
  background:white;
  font:750 12px Tektur,Arial,sans-serif;
  letter-spacing:.03em;
}
.teams-hero .hub-tag { border-color:var(--ink); background:var(--yellow); font-size:15px; }
.hub-avatar {
  flex:0 0 auto;
  width:44px;
  height:44px;
  border:1px solid var(--team-line);
  object-fit:cover;
  background:white;
}
.team-directory-search { display:block; width:min(100%,380px); margin:0 0 18px; }
.team-directory-search input {
  width:100%;
  min-height:44px;
  padding:9px 14px;
  border:1px solid #9bb9cc;
  border-radius:0;
  color:var(--ink);
  background:white;
}
.team-directory-search input:focus-visible { outline:2px solid var(--aqua); outline-offset:2px; }
.team-directory-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; }
.team-directory-card {
  min-width:0;
  display:flex;
  align-items:center;
  gap:16px;
  padding:19px;
  border:1px solid var(--team-line);
  border-left:5px solid var(--aqua);
  background:#f8fdff;
  transition:background .15s,border-color .15s;
}
.team-directory-card:hover,.team-directory-card:focus-visible { background:#eafaff; border-color:var(--aqua); }
.team-directory-logo {
  flex:0 0 auto;
  width:68px;
  height:68px;
  object-fit:cover;
  background:white;
  border:1px solid var(--team-line);
}
.team-directory-fallback {
  display:grid;
  place-items:center;
  color:var(--ink);
  background:#e3f9ff;
  font:800 16px Tektur,Arial,sans-serif;
}
.team-directory-info { min-width:0; display:grid; justify-items:start; gap:4px; }
.team-directory-info strong { font:750 17px/1.25 Tektur,Arial,sans-serif; overflow-wrap:anywhere; }
.team-directory-info small { color:var(--team-muted); font-size:12px; }
.hub-table-scroll { overflow-x:auto; border:1px solid var(--team-line); }
.hub-table { width:100%; border-collapse:collapse; min-width:760px; }
.hub-table th {
  padding:13px 16px;
  background:#e8faff;
  color:var(--ink);
  font:750 12px Tektur,Arial,sans-serif;
  text-align:left;
  white-space:nowrap;
}
.hub-table td { padding:14px 16px; border-top:1px solid var(--team-line); color:var(--ink); font:700 14px Tektur,Arial,sans-serif; }
.hub-table tbody tr:nth-child(even) { background:#f8fcfe; }
.hub-table tbody tr:hover { background:#effbff; }
.hub-table-rank { width:65px; color:#007ba9!important; font-size:19px!important; }
.hub-table .hub-avatar { width:34px; height:34px; }
.hub-table .hub-row-main strong { font-size:14px; }
.hub-game-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
.hub-game-panel { border-top:5px solid var(--aqua); }
.hub-game-panel:nth-child(even) { border-top-color:var(--pink); }
.hub-game-name { margin:0 0 18px; font:800 20px Tektur,Arial,sans-serif; }
.hub-game-name a:hover { color:#c90879; }
.hub-podium { margin:0; padding:0; list-style:none; }
.hub-podium-row {
  display:flex;
  align-items:center;
  gap:14px;
  padding:12px 0;
  border-top:1px solid var(--team-line);
}
.hub-podium-rank { width:26px; flex:0 0 auto; color:#007ba9; font:800 19px Tektur,Arial,sans-serif; }
.hub-podium-rating { white-space:nowrap; color:var(--team-muted); font:700 13px Tektur,Arial,sans-serif; }
.profile-empty-state { padding:28px; border:1px solid var(--team-line); background:#f8fdff; }
.profile-empty-state strong { display:block; font:800 20px Tektur,Arial,sans-serif; }
.profile-empty-state p { margin:7px 0 0; color:var(--team-muted); }
.hub-form { display:grid; justify-items:start; gap:16px; max-width:620px; }
.hub-form-row { width:100%; display:grid; grid-template-columns:2fr 1fr; gap:16px; }
.hub-field { width:100%; display:grid; gap:7px; }
.hub-field > span { font:750 14px Tektur,Arial,sans-serif; }
.hub-field small { color:var(--team-muted); font:normal 12px Arial,sans-serif; }
.hub-field input,.hub-field textarea,.hub-field select {
  width:100%;
  min-height:44px;
  padding:9px 12px;
  border:1px solid #9bb9cc;
  border-radius:0;
  color:var(--ink);
  background:white;
}
.hub-field textarea { min-height:100px; resize:vertical; }
.hub-field :is(input,textarea,select):focus-visible { border-color:var(--aqua); outline:2px solid var(--aqua); outline-offset:2px; }
.hub-confirm { display:flex; align-items:flex-start; gap:10px; font-size:14px; }
.hub-confirm input { width:18px; height:18px; margin:2px 0 0; accent-color:#087fc0; }
.hub-danger { border-color:#eaa4bd; background:#fff8fb; }
.hub-danger .hub-note { color:#872746; }
.hub-logo-editor { display:flex; align-items:flex-start; gap:22px; }
.hub-logo-preview { width:120px; height:120px; object-fit:cover; border:1px solid var(--team-line); background:white; }
.hub-logo-empty { display:grid; place-items:center; font:800 18px Tektur,Arial,sans-serif; }
.hub-logo-editor > div { flex:1; }
.hub-form-inline { margin-top:14px; }
.hub-field input[type="file"] { padding:10px; }
@media(max-width:900px) {
  .team-directory-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:680px) {
  .teams-hero { min-height:210px; }
  .teams-hero-inner { padding:30px 0 70px; }
  .teams-hero h1 { font-size:clamp(37px,10vw,54px); }
  .teams-hero .hub-lede { font-size:15px; }
  .teams-content { padding-top:15px; }
  .teams-content > section { margin-bottom:34px; }
  .profile-section-heading h2 { font-size:25px; }
  .team-directory-grid,.hub-game-grid { grid-template-columns:1fr; }
  .hub-form-row { grid-template-columns:1fr; }
  .hub-row { align-items:flex-start; }
  .hub-row-main { flex-basis:100%; }
  .hub-podium-row { flex-wrap:wrap; }
  .hub-podium-rating { margin-left:40px; }
  .hub-logo-editor { flex-wrap:wrap; }
}

/* Individual team page */
.team-detail-hero { display:grid; gap:22px; }
.team-detail-identity { display:flex; align-items:center; gap:24px; min-width:0; }
.team-detail-logo {
  display:block;
  flex:0 0 112px;
  width:112px;
  height:112px;
  object-fit:cover;
  border:5px solid var(--yellow);
  background:#fff;
  box-shadow:7px 7px 0 var(--ink);
}
.team-detail-logo-fallback {
  display:grid;
  place-items:center;
  overflow:hidden;
  color:var(--ink);
  background:#e4faff;
  font:800 22px Tektur,Arial,sans-serif;
}
.team-detail-title { min-width:0; }
.team-detail-title .hub-tag { margin-bottom:8px; }
.team-detail-title h1 { line-height:1.03; }
.team-detail-title .hub-lede { max-width:720px; margin-top:12px; }
.teams-hero .team-detail-actions { margin:0; padding-left:136px; }
.team-detail-layout { display:grid; grid-template-columns:minmax(0,1fr) 290px; align-items:start; gap:32px; padding-top:18px; }
.team-detail-roster { min-width:0; }
.team-member-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:13px; }
.team-member-card {
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:12px;
  min-width:0;
  min-height:91px;
  padding:16px;
  border:1px solid var(--team-line);
  border-left:4px solid var(--aqua);
  background:#f9fdff;
}
.team-member-card:has(.hub-row-owner) { border-left-color:var(--yellow); }
.team-member-profile { display:flex; align-items:center; flex:1 1 160px; min-width:0; gap:12px; color:var(--ink); }
.team-member-profile .hub-avatar { width:52px; height:52px; }
.team-member-profile:hover strong,.team-member-profile:focus-visible strong { color:#c90879; }
.team-member-name { display:grid; gap:4px; min-width:0; }
.team-member-name strong { overflow-wrap:anywhere; font:750 16px/1.2 Tektur,Arial,sans-serif; }
.team-member-name small { color:var(--team-muted); font-size:12px; }
.team-member-card form { margin:0; }
.team-detail-info { border-top:5px solid var(--pink); }
.team-detail-info h2 { margin:0 0 16px; font:800 21px Tektur,Arial,sans-serif; }
.team-detail-info dl { margin:0; }
.team-detail-info dl > div { display:flex; justify-content:space-between; gap:16px; padding:12px 0; border-top:1px solid var(--team-line); }
.team-detail-info dt { color:var(--team-muted); font-size:13px; }
.team-detail-info dd { margin:0; color:var(--ink); font:750 13px Tektur,Arial,sans-serif; text-align:right; }
.team-detail-notice { margin:16px 0 0; padding:16px 18px; border-left:4px solid var(--pink); background:#fff0f8; color:var(--ink); font-size:14px; line-height:1.5; }
@media(max-width:850px) {
  .team-detail-layout { grid-template-columns:1fr; }
  .team-detail-sidebar { max-width:none; }
}
@media(max-width:620px) {
  .team-detail-identity { align-items:flex-start; gap:16px; }
  .team-detail-logo { flex-basis:72px; width:72px; height:72px; border-width:3px; box-shadow:4px 4px 0 var(--ink); }
  .team-detail-logo-fallback { font-size:14px; }
  .team-detail-title h1 { font-size:clamp(31px,8vw,48px); }
  .teams-hero .team-detail-actions { padding-left:0; }
  .team-member-grid { grid-template-columns:1fr; }
}

/* Team detail refinements */
.team-detail-heading { display:flex; align-items:center; flex-wrap:wrap; gap:12px 20px; }
.team-detail-title .team-detail-heading .hub-tag { margin:0; flex:0 0 auto; font-size:15px; }
.team-detail-back { color:#fff; border-color:#fff; background:var(--ink); transition:background .15s,border-color .15s,color .15s; }
.team-detail-back:hover,.team-detail-back:focus-visible { color:#fff; border-color:#c90879; background:#c90879; }
.team-member-points { display:grid; justify-items:end; gap:3px; margin-left:auto; white-space:nowrap; color:var(--ink); }
.team-member-points strong { font:800 15px Tektur,Arial,sans-serif; }
.team-member-points small { color:var(--team-muted); font-size:11px; text-transform:uppercase; letter-spacing:.05em; }
@media(max-width:620px) {
  .team-detail-heading { align-items:baseline; gap:5px 12px; }
  .team-detail-title .team-detail-heading .hub-tag { font-size:12px; }
}
