/* Spark Agency HR — Group Live (v40). Screen only. */
@media screen {
  #group-live {
    --great: #10b981;
    --good: #0a9a9c;
    --risk: #f59e0b;
    --bad: #ef4444;
  }
  .gl-toolbar {
    flex-wrap: wrap;
    align-items: center;
  }
  .gl-toolbar label {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .gl-toolbar input[type="month"] {
    margin: 0;
    width: auto;
  }
  .gl-views {
    display: inline-flex;
    padding: 4px;
    gap: 2px;
    border-radius: 12px;
    background: #e3ecea;
    flex-wrap: wrap;
  }
  .gl-views button {
    margin: 0;
    min-height: 34px;
    padding: 6px 13px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--text);
    font-size: 13px;
  }
  .gl-views button:hover {
    background: #ffffff99;
    color: var(--teal-deep);
  }
  .gl-views button[aria-selected="true"] {
    background: var(--paper);
    color: var(--teal-deep);
    box-shadow: 0 1px 3px #0f2a3622;
  }
  #gl-rate {
    margin-left: auto;
    font-variant-numeric: tabular-nums;
  }

  /* ---------- Dark band (same family as the HR dashboard cards) ---------- */
  .gl-band {
    margin: 0 0 16px;
    padding: 24px;
    border-radius: 20px;
    color: #fff;
    background:
      radial-gradient(120% 140% at 100% 0%, #a855f72b 0%, transparent 55%),
      radial-gradient(90% 120% at 0% 100%, #0a9a9c33 0%, transparent 60%),
      #080b14;
  }
  .gl-band-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    margin-bottom: 20px;
  }
  .gl-eyebrow {
    margin: 0;
    color: #f472b6;
    font-size: 13px;
    font-weight: 600;
  }
  .gl-band h2 {
    margin: 6px 0 0;
    font-size: 26px;
    font-weight: 800;
    color: #fff;
  }
  .gl-sub {
    margin: 6px 0 0;
    color: #ffffff80;
  }
  .gl-band .gl-ring {
    width: 132px;
    height: 132px;
  }
  .gl-band .gl-ring .track {
    stroke: #ffffff1c;
  }
  .gl-band .gl-ring-in b {
    color: #fff;
    font-size: 30px;
  }
  .gl-band .gl-ring-in small,
  .gl-band .gl-ring-in em {
    color: #ffffffb3;
  }
  .gl-kpis {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }
  .gl-kpi {
    position: relative;
    display: grid;
    gap: 4px;
    padding: 18px 18px 16px;
    border-radius: 16px;
    border: 1px solid #ffffff14;
    background: linear-gradient(135deg, color-mix(in srgb, var(--g1) 12%, transparent), color-mix(in srgb, var(--g2) 6%, transparent)), #ffffff08;
    transition: transform 0.3s cubic-bezier(0.22, 0.8, 0.3, 1), border-color 0.3s;
    animation: stat-in 0.5s cubic-bezier(0.22, 0.8, 0.3, 1) both;
  }
  .gl-kpi:nth-child(2) { animation-delay: 0.08s; }
  .gl-kpi:nth-child(3) { animation-delay: 0.16s; }
  .gl-kpi:nth-child(4) { animation-delay: 0.24s; }
  .gl-kpi:nth-child(5) { animation-delay: 0.32s; }
  .gl-kpi:nth-child(6) { animation-delay: 0.4s; }
  .gl-kpi:hover {
    transform: translateY(-4px) scale(1.015);
    border-color: #ffffff2b;
  }
  .gl-kpi-icon {
    position: absolute;
    top: 16px;
    right: 16px;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--g1), var(--g2));
    box-shadow: 0 8px 20px -6px var(--g1);
  }
  .gl-kpi-title {
    color: #ffffff99;
    font-size: 13px;
    font-weight: 600;
    padding-right: 52px;
  }
  .gl-kpi-value {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
  }
  .gl-kpi-sub {
    color: #ffffff8c;
    font-size: 12.5px;
  }
  .gl-band .gl-meter {
    background: #ffffff1a;
  }

  /* ---------- Rings and meters (transform / dash only) ---------- */
  .gl-ring {
    --p: 0;
    --tone: var(--good);
    position: relative;
    flex: none;
    width: 112px;
    height: 112px;
  }
  .gl-ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
  }
  .gl-ring circle {
    fill: none;
    stroke-width: 11;
  }
  .gl-ring .track {
    stroke: #e6eeed;
  }
  .gl-ring .bar {
    stroke: var(--tone);
    stroke-linecap: round;
    stroke-dasharray: 100 100;
    stroke-dashoffset: calc(100 - var(--p) * 100);
    transition: stroke-dashoffset 1.2s cubic-bezier(0.22, 0.8, 0.3, 1);
  }
  .gl-ring.great { --tone: var(--great); }
  .gl-ring.good { --tone: var(--good); }
  .gl-ring.risk { --tone: var(--risk); }
  .gl-ring.bad { --tone: var(--bad); }
  .gl-ring.none { --tone: #94a3b8; }
  .gl-ring-in {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.15;
  }
  .gl-ring-in b {
    font-size: 22px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
  }
  .gl-ring-in small {
    font-size: 11px;
    color: var(--text-2);
  }
  .gl-ring-in em {
    font-style: normal;
    font-size: 11.5px;
    font-weight: 700;
  }
  .gl-meter {
    --p: 0;
    position: relative;
    display: block;
    height: 7px;
    border-radius: 99px;
    background: #e6eeed;
    overflow: hidden;
  }
  .gl-meter i {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--g1, var(--teal)), var(--g2, #34d399));
    transform-origin: left;
    transform: scaleX(var(--p));
    transition: transform 1.1s cubic-bezier(0.22, 0.8, 0.3, 1);
  }

  /* ---------- Needs attention ---------- */
  .gl-attention {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0 0 16px;
    padding: 12px 14px;
    border-radius: 14px;
    background: #fef2f2;
    border: 1px solid #fecaca;
  }
  .gl-attention > b {
    color: #b91c1c;
    margin-right: 4px;
  }
  .gl-attention button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    min-height: 32px;
    padding: 5px 11px;
    border-radius: 999px;
    border: 1px solid #fecaca;
    background: #fff;
    color: #7f1d1d;
    font-size: 12.5px;
  }
  .gl-attention button i,
  .gl-sw,
  .gl-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--team, var(--teal));
    flex: none;
    display: inline-block;
  }

  /* ---------- Team cards ---------- */
  .gl-teams {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
  }
  .gl-team {
    position: relative;
    display: grid;
    gap: 14px;
    padding: 18px 18px 14px;
    border-radius: 18px;
    background: var(--paper);
    border: 1px solid var(--line);
    box-shadow: 0 1px 2px #0f2a360a;
    overflow: hidden;
    animation: stat-in 0.5s cubic-bezier(0.22, 0.8, 0.3, 1) both;
    transition: transform 0.3s cubic-bezier(0.22, 0.8, 0.3, 1), box-shadow 0.3s;
  }
  .gl-team:nth-child(2) { animation-delay: 0.08s; }
  .gl-team:nth-child(3) { animation-delay: 0.16s; }
  .gl-team:nth-child(n + 4) { animation-delay: 0.24s; }
  .gl-team:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 32px -12px #0f2a3640;
  }
  .gl-team::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: var(--team, var(--teal));
  }
  #group-live small,
  #group-live .gl-ring-in small,
  #group-live dd small {
    letter-spacing: 0;
  }
  .gl-team header,
  .gl-team footer {
    position: static !important;
    inset: auto !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    width: auto !important;
    background: none !important;
    box-shadow: none !important;
    transform: none !important;
  }
  .gl-team header {
    padding: 0 !important;
    display: flex;
    align-items: center;
    gap: 9px;
  }
  .gl-team h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 800;
    flex: 1;
    min-width: 0;
  }
  .gl-health {
    display: inline-flex;
    align-items: baseline;
    gap: 3px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
    background: #eef2f3;
    color: #475569;
  }
  .gl-health small {
    font-weight: 600;
    opacity: 0.7;
  }
  .gl-health.great { background: #dcfce7; color: #166534; }
  .gl-health.good { background: var(--teal-soft); color: var(--teal-deep); }
  .gl-health.risk { background: #fef3c7; color: #92400e; }
  .gl-health.bad { background: #fee2e2; color: #991b1b; }
  .gl-team-main {
    display: flex;
    align-items: center;
    gap: 16px;
  }
  .gl-team dl {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 14px;
    margin: 0;
    flex: 1;
    min-width: 0;
  }
  .gl-team dt {
    font-size: 11.5px;
    color: var(--text-2);
    font-weight: 600;
  }
  .gl-team dd {
    margin: 2px 0 0;
    font-weight: 800;
    font-size: 15px;
    font-variant-numeric: tabular-nums;
  }
  .gl-team dd small {
    font-weight: 600;
    color: var(--text-2);
    font-size: 11.5px;
  }
  .gl-pace p {
    margin: 6px 0 0;
    font-size: 12px;
    color: var(--text-2);
  }
  .gl-track {
    --p: 0;
    --m: 0;
    position: relative;
    height: 12px;
    border-radius: 99px;
    background: #eef3f2;
  }
  .gl-track .fill {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, color-mix(in srgb, var(--team) 65%, #fff), var(--team));
    transform-origin: left;
    transform: scaleX(var(--p));
    transition: transform 1.2s cubic-bezier(0.22, 0.8, 0.3, 1);
  }
  .gl-track .mark {
    position: absolute;
    top: -4px;
    bottom: -4px;
    left: calc(var(--m) * 100%);
    width: 2px;
    margin-left: -1px;
    background: var(--ink);
    border-radius: 2px;
  }
  .gl-money {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
  }
  .gl-money div {
    padding: 9px 11px;
    border-right: 1px solid var(--line);
  }
  .gl-money div:last-child {
    border-right: 0;
  }
  .gl-money span {
    display: block;
    font-size: 11px;
    color: var(--text-2);
    font-weight: 600;
  }
  .gl-money b {
    font-size: 15px;
    font-variant-numeric: tabular-nums;
  }
  .gl-money .pos {
    background: #ecfdf5;
  }
  .gl-money .pos b {
    color: #047857;
  }
  .gl-money .neg {
    background: #fef2f2;
  }
  .gl-money .neg b {
    color: #b91c1c;
  }
  .gl-cover {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
    font-size: 12.5px;
    color: var(--text-2);
    font-weight: 600;
  }
  .gl-cover b {
    color: var(--text);
    font-variant-numeric: tabular-nums;
  }
  .gl-cover .gl-meter {
    --g1: #f59e0b;
    --g2: #f97316;
  }
  .gl-cover .gl-meter.full {
    --g1: #10b981;
    --g2: #14b8a6;
  }
  .gl-roles {
    display: grid;
    gap: 4px;
    margin: 0;
    font-size: 12.5px;
  }
  .gl-role b {
    color: var(--text-2);
    font-weight: 700;
    margin-right: 4px;
  }
  .gl-warn {
    display: grid;
    gap: 5px;
    margin: 0;
    padding: 0;
    list-style: none;
  }
  .gl-warn li {
    padding: 6px 10px;
    border-radius: 9px;
    font-size: 12.5px;
    font-weight: 600;
  }
  .gl-warn li.great { background: #dcfce7; color: #166534; }
  .gl-warn li.risk { background: #fef3c7; color: #92400e; }
  .gl-warn li.bad { background: #fee2e2; color: #991b1b; }
  .gl-team footer {
    display: flex !important;
    gap: 8px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
  }
  .gl-team footer button {
    margin: 0;
    min-height: 32px;
    padding: 5px 12px;
    font-size: 12.5px;
  }
  .gl-team.reached {
    border-color: #86efac;
  }

  /* Confetti when a target is reached */
  .gl-confetti {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
  }
  .gl-confetti i {
    position: absolute;
    top: -10px;
    width: 7px;
    height: 11px;
    border-radius: 2px;
    background: #f43f5e;
    animation: gl-fall 1.9s cubic-bezier(0.3, 0.6, 0.6, 1) forwards;
  }
  .gl-confetti i:nth-child(3n) { background: #f59e0b; }
  .gl-confetti i:nth-child(3n + 1) { background: #10b981; }
  .gl-confetti i:nth-child(4n) { background: #3b82f6; }
  .gl-confetti i:nth-child(1) { left: 6%; animation-delay: 0s; }
  .gl-confetti i:nth-child(2) { left: 12%; animation-delay: 0.1s; }
  .gl-confetti i:nth-child(3) { left: 18%; animation-delay: 0.05s; }
  .gl-confetti i:nth-child(4) { left: 24%; animation-delay: 0.2s; }
  .gl-confetti i:nth-child(5) { left: 30%; animation-delay: 0.12s; }
  .gl-confetti i:nth-child(6) { left: 36%; animation-delay: 0.28s; }
  .gl-confetti i:nth-child(7) { left: 42%; animation-delay: 0.06s; }
  .gl-confetti i:nth-child(8) { left: 48%; animation-delay: 0.18s; }
  .gl-confetti i:nth-child(9) { left: 54%; animation-delay: 0.02s; }
  .gl-confetti i:nth-child(10) { left: 60%; animation-delay: 0.24s; }
  .gl-confetti i:nth-child(11) { left: 66%; animation-delay: 0.09s; }
  .gl-confetti i:nth-child(12) { left: 72%; animation-delay: 0.3s; }
  .gl-confetti i:nth-child(13) { left: 78%; animation-delay: 0.14s; }
  .gl-confetti i:nth-child(14) { left: 84%; animation-delay: 0.04s; }
  .gl-confetti i:nth-child(15) { left: 90%; animation-delay: 0.22s; }
  .gl-confetti i:nth-child(16) { left: 95%; animation-delay: 0.16s; }
  .gl-confetti i:nth-child(17) { left: 3%; animation-delay: 0.26s; }
  .gl-confetti i:nth-child(18) { left: 50%; animation-delay: 0.34s; }
  @keyframes gl-fall {
    to {
      transform: translateY(420px) rotate(540deg);
      opacity: 0;
    }
  }

  /* ---------- Tables ---------- */
  .gl-summary h2 {
    margin-top: 0;
  }
  .gl-scroll {
    max-height: none;
    min-height: 0;
    border: 1px solid var(--line);
    border-radius: 12px;
  }
  .gl-table {
    min-width: 900px;
  }
  .gl-table td,
  .gl-table th {
    padding: 0 10px;
  }
  .gl-table .who {
    min-width: 160px;
  }
  .gl-table td.pos { color: #047857; font-weight: 700; }
  .gl-table td.neg { color: #b91c1c; font-weight: 700; }
  .gl-table .gl-sw {
    margin-right: 8px;
  }
  .gl-admin-row td {
    color: var(--text-2);
    font-style: italic;
  }
  #group-live .ledger-table th.n {
    text-align: right;
    padding: 0 10px;
  }
  #group-live .ledger-table th.c {
    text-align: center;
    padding: 0 8px;
  }
  #group-live .ledger-table th.who,
  #group-live .ledger-table th.rn {
    padding: 0 10px;
  }
  .gl-grid .who {
    white-space: nowrap;
  }
  .gl-norn .who {
    left: 0 !important;
    min-width: 120px;
  }
  .gl-th-team {
    text-align: center !important;
    border-bottom: 3px solid var(--team) !important;
    padding: 0 10px !important;
  }

  /* ---------- Daily grid ---------- */
  .gl-daily-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
  }
  .gl-daily-head h2 {
    margin-top: 0;
  }
  .gl-daily-head p {
    max-width: 70ch;
  }
  .gl-save {
    display: flex;
    align-items: center;
    gap: 10px;
    position: sticky;
    top: 0;
  }
  .gl-daily .gl-scroll {
    max-height: calc(100vh - 260px);
  }
  .gl-grid {
    min-width: 0;
    width: auto;
  }
  .gl-grid thead tr:nth-child(2) th {
    top: 42px;
  }
  .gl-grid .who {
    min-width: 92px;
    max-width: 110px;
  }
  .gl-grid td.gl-cell {
    position: relative;
    padding: 0;
    height: 40px;
    min-width: 0;
  }
  .gl-grid td.gl-cell.n {
    min-width: 132px;
  }
  .gl-grid td.gl-cell.c {
    min-width: 66px;
  }
  .gl-grid input {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0 10px;
    border: 0;
    border-radius: 0;
    background: transparent;
    font: inherit;
    font-variant-numeric: tabular-nums;
    text-align: inherit;
    box-shadow: none;
  }
  .gl-grid td.n input {
    text-align: right;
    padding-bottom: 12px;
  }
  .gl-grid td.c input {
    text-align: center;
  }
  .gl-grid input:focus {
    outline: 2px solid var(--teal);
    outline-offset: -2px;
    background: #fff;
  }
  .gl-grid td.gl-cell small {
    position: absolute;
    right: 10px;
    bottom: 3px;
    font-size: 10.5px;
    color: #059669;
    font-weight: 700;
    pointer-events: none;
  }
  .gl-grid td.gl-cell small.neg {
    color: #dc2626;
  }
  .gl-grid td.edited {
    background: #fffbeb !important;
  }
  .gl-grid tr.today td {
    background: #ecfeff !important;
  }
  .gl-grid tr.today .who {
    font-weight: 800;
    color: var(--teal-deep);
  }
  .gl-grid tr.future td:not(.rn):not(.who) {
    background: #fbfcfc !important;
  }
  .gl-grid tr.future .who {
    color: #9aaeb2;
  }

  /* ---------- Teams editor ---------- */
  .gl-teams-edit {
    display: grid;
    gap: 16px;
  }
  .gl-new-team form,
  .gl-target {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
  }
  .gl-new-team label,
  .gl-target label {
    flex: 1 1 260px;
    max-width: 420px;
  }
  .gl-new-team button,
  .gl-target button {
    margin: 0;
  }
  .gl-target .muted {
    padding-bottom: 12px;
  }
  .gl-edit-team {
    border-top: 4px solid var(--team);
  }
  .gl-edit-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
  }
  .gl-edit-head h2 {
    margin: 0;
    flex: 1;
  }
  .gl-edit-head button {
    margin: 0;
  }
  .gl-edit-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 12px;
    color: var(--text-2);
    font-size: 13px;
  }
  .gl-edit-foot button {
    margin: 0;
  }
  .gl-edit-foot b {
    color: var(--text);
  }
  .gl-edit-team td.act,
  .gl-admins td.act {
    text-align: right;
    white-space: nowrap;
  }
  .gl-edit-team td.act button,
  .gl-admins td.act button {
    margin: 0 0 0 6px;
    min-height: 30px;
    padding: 4px 10px;
    font-size: 12px;
  }
  dialog.gl-dialog {
    width: min(480px, calc(100vw - 32px));
    padding: 0;
  }
  .gl-two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .gl-dialog label input,
  .gl-dialog label select {
    width: 100%;
  }
  .gl-empty {
    text-align: center;
    padding: 40px 24px;
  }

  @media (max-width: 1100px) {
    .gl-kpis {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }
  @media (max-width: 700px) {
    #gl-rate {
      margin-left: 0;
    }
    .gl-band {
      padding: 18px 14px;
    }
    .gl-band-head {
      flex-direction: column-reverse;
      align-items: flex-start;
    }
    .gl-kpis {
      gap: 10px;
    }
    .gl-kpi {
      padding: 14px 12px;
    }
    .gl-kpi-icon {
      width: 32px;
      height: 32px;
      top: 10px;
      right: 10px;
    }
    .gl-kpi-icon svg {
      width: 17px;
      height: 17px;
    }
    .gl-kpi-title {
      padding-right: 34px;
      font-size: 12px;
    }
    .gl-kpi-value {
      font-size: 20px;
    }
    .gl-teams {
      grid-template-columns: 1fr;
    }
    .gl-team-main {
      flex-direction: column;
      align-items: stretch;
    }
    .gl-team .gl-ring {
      align-self: center;
    }
    .gl-money b {
      font-size: 13.5px;
    }
  }
  @media (prefers-reduced-motion: reduce) {
    .gl-kpi,
    .gl-team,
    .gl-ring .bar,
    .gl-meter i,
    .gl-track .fill {
      animation: none !important;
      transition: none !important;
    }
    .gl-confetti {
      display: none;
    }
  }
}

/* v40.1 — Top teams, team dialog, tasks, stopped members */
@media screen {
  /* Top teams leaderboard */
  .gl-board-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 12px;
  }
  .gl-board-head h2 {
    margin: 0;
  }
  .gl-board-head p {
    margin: 4px 0 0;
  }
  .gl-seg {
    display: inline-flex;
    padding: 4px;
    gap: 2px;
    border-radius: 12px;
    background: #e9f0ef;
  }
  .gl-seg button {
    margin: 0;
    min-height: 32px;
    padding: 5px 12px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--text-2);
    font-size: 13px;
    font-weight: 600;
    box-shadow: none;
  }
  .gl-seg button[aria-pressed="true"] {
    background: #fff;
    color: var(--teal-dark, #087b7d);
    box-shadow: 0 1px 3px #0f2a361f;
  }
  .gl-ranks {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
  }
  .gl-rank {
    display: grid;
    grid-template-columns: 44px minmax(150px, 1.3fr) minmax(170px, 1.4fr) minmax(150px, 1.2fr) minmax(110px, 0.8fr) 48px;
    align-items: center;
    gap: 16px;
    padding: 12px 16px 12px 12px;
    border-radius: 14px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--team);
    background: #fff;
    animation: gl-rank-in 0.45s cubic-bezier(0.22, 0.8, 0.3, 1) both;
  }
  .gl-rank:nth-child(2) { animation-delay: 0.06s; }
  .gl-rank:nth-child(3) { animation-delay: 0.12s; }
  .gl-rank:nth-child(n + 4) { animation-delay: 0.18s; }
  @keyframes gl-rank-in {
    from { opacity: 0; transform: translateX(-12px); }
    to { opacity: 1; transform: none; }
  }
  .gl-rank.first {
    background: linear-gradient(90deg, #fff8e6, #fff 60%);
    border-color: #f2d48a;
    border-left-color: var(--team);
  }
  .gl-pos {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #eef3f2;
    color: var(--text-2);
    font-weight: 800;
    font-size: 15px;
    font-variant-numeric: tabular-nums;
  }
  .gl-rank.first .gl-pos {
    background: linear-gradient(135deg, #f5c542, #e2a21b);
    color: #fff;
    box-shadow: 0 6px 16px -6px #e2a21b;
  }
  .gl-rname,
  .gl-rstat,
  .gl-rval {
    display: grid;
    gap: 2px;
    min-width: 0;
  }
  .gl-rname b {
    font-size: 15px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .gl-rname small,
  .gl-rstat small,
  .gl-rval small {
    color: var(--text-2);
    font-size: 12px;
  }
  .gl-rstat {
    grid-template-columns: auto 1fr;
    column-gap: 5px;
    align-items: baseline;
  }
  .gl-rstat small,
  .gl-rstat .gl-meter {
    grid-column: 1 / -1;
  }
  .gl-rstat b,
  .gl-rval b {
    font-size: 15px;
    font-variant-numeric: tabular-nums;
  }
  .gl-rstat em {
    font-style: normal;
    color: var(--text-2);
    font-size: 12.5px;
    font-variant-numeric: tabular-nums;
  }
  .gl-rstat .gl-meter {
    margin-top: 4px;
    height: 5px;
  }
  .gl-meter.hours i {
    background: linear-gradient(90deg, #a855f7, #ec4899);
  }
  .gl-rval {
    text-align: right;
  }
  .gl-rval b.pos { color: #047857; }
  .gl-rval b.neg { color: #b91c1c; }
  .gl-rank .gl-health {
    justify-content: center;
  }

  /* Rank tag on team cards */
  .gl-rank-tag {
    display: inline-grid;
    place-items: center;
    min-width: 30px;
    height: 26px;
    padding: 0 7px;
    border-radius: 8px;
    background: var(--team);
    color: #fff;
    font-size: 12.5px;
    font-weight: 800;
  }
  .gl-rank-tag.first {
    background: linear-gradient(135deg, #f5c542, #e2a21b);
  }
  .gl-pace .gl-lives {
    margin: 0 0 4px;
    color: var(--text-2);
    font-size: 12.5px;
  }
  .gl-team footer {
    gap: 8px;
    flex-wrap: wrap;
  }

  /* Teams editor */
  .gl-new-team {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
  }
  .gl-new-team h2 {
    margin: 0;
  }
  .gl-new-team p {
    margin: 4px 0 0;
  }
  .gl-new-team > button {
    margin: 0;
  }
  .gl-targets {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    margin-bottom: 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
  }
  .gl-targets > div {
    display: grid;
    gap: 3px;
    padding: 12px 16px;
    border-left: 1px solid var(--line);
  }
  .gl-targets > div:first-child {
    border-left: 0;
  }
  .gl-targets span,
  .gl-targets small {
    color: var(--text-2);
    font-size: 12.5px;
  }
  .gl-targets b {
    font-size: 19px;
    font-variant-numeric: tabular-nums;
  }
  .gl-targets b em {
    font-style: normal;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-2);
  }
  .gl-notes {
    margin: 0 0 12px;
    padding: 10px 14px;
    border-radius: 10px;
    background: #f4f8f7;
    color: var(--text-2);
    font-size: 13.5px;
    white-space: pre-line;
  }
  .gl-members td {
    vertical-align: top;
  }
  .gl-person {
    display: grid;
    gap: 2px;
    justify-items: start;
  }
  .gl-person small,
  .gl-members td.n small {
    display: block;
    color: var(--text-2);
    font-size: 12px;
    font-weight: 400;
  }
  .gl-tasks {
    max-width: 340px;
    font-size: 13px;
    line-height: 1.45;
    color: var(--text);
  }
  .gl-stop,
  .gl-unlinked {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 999px;
    font-style: normal;
    font-size: 11.5px;
    font-weight: 700;
  }
  .gl-stop {
    background: #fee2e2;
    color: #b91c1c;
  }
  .gl-unlinked {
    background: #fef3c7;
    color: #92400e;
  }
  .gl-roles .gl-stop {
    margin-left: 2px;
  }
  tr.gl-stopped td {
    background: #fbfcfc;
    color: #8a9ea3;
  }
  tr.gl-stopped .gl-person b {
    text-decoration: line-through;
    text-decoration-color: #d9a3a3;
  }

  /* Dialogs */
  .gl-form textarea {
    width: 100%;
    resize: vertical;
  }
  .gl-picked {
    margin: -4px 0 0;
    font-size: 12.5px;
  }
  .gl-picked.bad {
    color: #b91c1c;
  }
  .gl-colors {
    display: flex;
    gap: 8px;
    margin: 0;
    padding: 0;
    border: 0;
  }
  .gl-colors legend {
    padding: 0;
    margin-bottom: 6px;
    font-size: 13px;
    color: var(--text-2);
  }
  .gl-swatch {
    position: relative;
    margin: 0;
    cursor: pointer;
  }
  .gl-swatch input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
  }
  .gl-swatch span {
    display: block;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--team);
    box-shadow: inset 0 0 0 2px #ffffff80;
    transition: transform 0.15s;
  }
  .gl-swatch input:checked + span {
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--team);
    transform: scale(1.08);
  }
  .gl-swatch input:focus-visible + span {
    outline: 3px solid #60a5fa;
    outline-offset: 3px;
  }
  .gl-hint {
    margin: -4px 0 0;
    font-size: 12.5px;
  }

  @media (max-width: 1100px) {
    .gl-rank {
      grid-template-columns: 40px minmax(0, 1fr) minmax(0, 1fr) 48px;
      row-gap: 10px;
    }
    .gl-rank .gl-rname { grid-column: 2 / 4; }
    .gl-rank .gl-health { grid-column: 4; grid-row: 1; }
    .gl-rank .gl-rstat:nth-of-type(3) { grid-column: 2; }
    .gl-rank .gl-rval { grid-column: 2 / 4; text-align: left; }
  }
  @media (max-width: 700px) {
    .gl-targets {
      grid-template-columns: 1fr;
    }
    .gl-targets > div {
      border-left: 0;
      border-top: 1px solid var(--line);
    }
    .gl-targets > div:first-child {
      border-top: 0;
    }
    .gl-rank {
      grid-template-columns: 36px minmax(0, 1fr) 44px;
      gap: 8px 12px;
      padding: 12px;
    }
    .gl-rank .gl-rname { grid-column: 2; }
    .gl-rank .gl-health { grid-column: 3; grid-row: 1; }
    .gl-rank .gl-rstat,
    .gl-rank .gl-rval { grid-column: 2 / 4; }
    .gl-rank .gl-rstat:nth-of-type(3) { grid-column: 2 / 4; }
    .gl-seg {
      width: 100%;
      overflow-x: auto;
    }
    .gl-seg button {
      flex: 1 0 auto;
    }
  }
  @media (prefers-reduced-motion: reduce) {
    .gl-rank { animation: none; }
  }
}

/* v40.2 — transfers and coins per anchor */
@media screen {
  .gl-moved {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 999px;
    background: #e0e7ff;
    color: #3730a3;
    font-style: normal;
    font-size: 11.5px;
    font-weight: 700;
  }
  .gl-moved.in {
    background: #dcfce7;
    color: #166534;
  }
  tr.gl-moved-row td {
    background: #fafaff;
  }
  tr.gl-moved-row .gl-person b {
    color: var(--text-2);
  }
  .gl-person .gl-moved + .gl-moved {
    margin-top: 2px;
  }
  .gl-move-note {
    margin: 0;
    padding: 10px 12px;
    border-radius: 10px;
    background: #eef6ff;
    color: #1e3a8a;
    font-size: 13px;
    line-height: 1.45;
  }
  .gl-move-note:empty {
    display: none;
  }

  /* On/off switch */
  .gl-switch {
    display: grid;
    grid-template-columns: auto auto;
    column-gap: 10px;
    align-items: center;
    margin: 0 0 0 auto;
    cursor: pointer;
  }
  .gl-switch input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
  }
  .gl-switch > span {
    grid-row: 1 / 3;
    position: relative;
    width: 44px;
    height: 26px;
    border-radius: 99px;
    background: #cfdcda;
    transition: background 0.2s;
  }
  .gl-switch > span::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px #0003;
    transition: transform 0.2s cubic-bezier(0.22, 0.8, 0.3, 1);
  }
  .gl-switch input:checked + span {
    background: var(--teal);
  }
  .gl-switch input:checked + span::after {
    transform: translateX(18px);
  }
  .gl-switch input:focus-visible + span {
    outline: 3px solid #60a5fa;
    outline-offset: 2px;
  }
  .gl-switch b {
    font-size: 14px;
  }
  .gl-switch small {
    color: var(--text-2);
    font-size: 12px;
  }

  /* Top anchor line on team cards */
  .gl-top-anchor {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 8px 12px;
    border-radius: 10px;
    background: #fff8e6;
    border: 1px solid #f2d48a;
    font-size: 13px;
  }
  .gl-top-anchor svg {
    color: #d4950f;
  }
  .gl-top-anchor span {
    color: #8a6a1f;
  }
  .gl-top-anchor em {
    font-style: normal;
    color: var(--text-2);
    margin-left: auto;
  }

  /* Coins per anchor grid */
  .gl-team-tabs {
    margin: 0 0 12px;
    flex-wrap: wrap;
  }
  .gl-team-tabs button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
  }
  .gl-team-tabs .gl-sw {
    background: var(--team);
  }
  .gl-pgrid th.gl-pcol {
    min-width: 128px;
    line-height: 1.2;
    vertical-align: middle;
  }
  .gl-pgrid th.gl-pcol span,
  .gl-pgrid th.gl-pcol small {
    display: block;
  }
  .gl-pgrid th.gl-pcol small {
    font-weight: 500;
    color: var(--text-2);
    font-size: 11px;
  }
  .gl-pgrid td.gl-off {
    background: repeating-linear-gradient(135deg, #f4f7f7 0 6px, #eef2f2 6px 12px) !important;
    color: #b5c3c5;
    text-align: center;
  }
  .gl-pgrid td.gl-daysum {
    min-width: 120px;
    font-weight: 700;
    line-height: 1.15;
  }
  .gl-pgrid td small,
  .gl-pgrid tfoot small {
    display: block;
    font-weight: 500;
    font-size: 11px;
    color: var(--text-2);
  }
  .gl-pgrid thead th {
    height: 54px;
  }

  /* Top anchors board */
  .gl-people-board {
    margin-top: 16px;
  }
  .gl-prank {
    grid-template-columns: 44px minmax(140px, 1fr) minmax(200px, 1.6fr) minmax(110px, 0.7fr) 90px;
  }
  .gl-parts {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }
  .gl-parts > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 9px;
    border-radius: 999px;
    background: #f1f5f5;
    font-size: 12.5px;
    color: var(--text-2);
  }
  .gl-parts .gl-sw {
    width: 8px;
    height: 8px;
    background: var(--team);
  }
  .gl-parts b {
    color: var(--text);
    font-variant-numeric: tabular-nums;
  }
  .gl-rshare {
    display: grid;
    text-align: right;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
  }
  .gl-rshare small {
    font-weight: 400;
    color: var(--text-2);
    font-size: 11.5px;
  }
  @media (max-width: 1100px) {
    .gl-new-team .gl-switch {
      margin-left: 0;
    }
    .gl-prank {
      grid-template-columns: 40px minmax(0, 1fr) auto;
    }
    .gl-prank .gl-parts {
      grid-column: 2 / -1;
    }
    .gl-prank .gl-rval {
      grid-column: 2;
      text-align: left;
    }
  }
}
@media screen {
  .gl-new-team > div:first-child {
    flex: 1 1 100%;
  }
  .gl-new-team .gl-switch {
    margin: 0;
  }
  .gl-new-team > button {
    margin-left: auto;
  }
}
@media screen {
  .gl-grid td.gl-cell small.sofar {
    color: var(--text-2);
    font-weight: 500;
  }
}

/* v40.6 — LIVE Backstage import */
@media screen {
  dialog.gl-dialog:has(.gl-import) {
    width: min(1020px, calc(100vw - 32px));
    max-width: none;
  }
  .gl-steps {
    margin: 0;
    padding-left: 20px;
    color: var(--text-2);
    font-size: 13.5px;
    line-height: 1.55;
  }
  .gl-file {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 74px;
    border: 2px dashed #b9d3d0;
    border-radius: 14px;
    background: #f6fbfa;
    color: #067377;
    font-weight: 700;
    cursor: pointer;
  }
  .gl-file:hover {
    background: #eef7f6;
  }
  .gl-file input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
  }
  .gl-file:focus-within {
    outline: 3px solid #60a5fa;
    outline-offset: 2px;
  }
  .gl-import-period {
    margin: 0 0 8px;
  }
  .gl-import-error {
    margin: 0;
    padding: 10px 12px;
    border-radius: 10px;
    background: #fee2e2;
    color: #991b1b;
  }
  .gl-import-table {
    width: 100%;
    font-size: 13.5px;
  }
  .gl-import-table td {
    vertical-align: top;
  }
  .gl-import-table td small {
    display: block;
    color: var(--text-2);
    font-size: 12px;
  }
  .gl-import-table select {
    min-width: 170px;
  }
  .gl-change {
    max-width: 300px;
    line-height: 1.45;
  }
  .gl-after {
    display: flex;
    gap: 6px;
    align-items: flex-start;
    margin-top: 6px;
    padding: 6px 8px;
    border-radius: 8px;
    background: #fff7e6;
    color: #8a5a00;
    font-size: 12.5px;
    font-weight: 500;
  }
  .gl-after input {
    flex: none;
    margin-top: 2px;
  }
  /* Backstage line on team cards */
  .gl-bs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 8px;
    margin: 0;
    padding: 8px 12px;
    border-radius: 10px;
    background: #f1f5f9;
    font-size: 12.5px;
    color: var(--text-2);
  }
  .gl-bs-tag,
  .gl-bs-dot {
    display: inline-block;
    padding: 1px 7px;
    border-radius: 999px;
    background: #111827;
    color: #fff;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.02em;
  }
  .gl-bs-dot {
    padding: 0 5px;
    font-size: 9px;
    vertical-align: 1px;
  }
  .gl-bs em {
    font-style: normal;
    flex-basis: 100%;
    color: var(--text);
  }
}
@media screen {
  .gl-import-table tr.gl-need td {
    background: #fff7e6;
  }
  .gl-import-table tr.gl-need select {
    border-color: #e2a21b;
  }
}

/* v40.6 — upload basket */
@media screen {
  .gl-drop {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 2px;
    padding: 18px 16px 20px;
    border: 2px dashed #b9d3d0;
    border-radius: 18px;
    background: radial-gradient(120% 90% at 50% 0%, #f2fbfa 0%, #f8fbfb 60%);
    text-align: center;
    cursor: pointer;
    transition: border-color 0.25s, background-color 0.25s, transform 0.25s;
  }
  .gl-drop input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
  }
  .gl-drop:focus-within {
    outline: 3px solid #60a5fa;
    outline-offset: 3px;
  }
  .gl-drop-title {
    font-weight: 800;
    font-size: 15.5px;
    color: #0d4f52;
  }
  .gl-drop-sub {
    font-size: 12.5px;
    color: var(--text-2);
  }
  .gl-basket {
    width: 132px;
    height: 112px;
    overflow: visible;
    pointer-events: none;
  }
  .gl-basket .b-back { fill: #b77b3d; }
  .gl-basket .b-body { fill: #d9a066; }
  .gl-basket .b-weave { stroke: #b77b3d; stroke-width: 2.4; fill: none; stroke-linecap: round; opacity: 0.75; }
  .gl-basket .b-rim { fill: none; stroke: #9a6330; stroke-width: 6; stroke-linecap: round; }
  .gl-basket .s-paper { fill: #fff; stroke: #c9d6d8; stroke-width: 1.5; }
  .gl-basket .s-fold { fill: #e8eff0; stroke: #c9d6d8; stroke-width: 1.5; stroke-linejoin: round; }
  .gl-basket .s-band { fill: #1d7a46; }
  .gl-basket .s-text { fill: #fff; font: 800 9px/1 system-ui, sans-serif; letter-spacing: 0.5px; }
  .gl-basket .s-line { stroke: #c9d6d8; stroke-width: 3; stroke-linecap: round; }
  .gl-basket .b-check circle { fill: #10b981; }
  .gl-basket .b-check path { fill: none; stroke: #fff; stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; }
  .gl-basket .b-sheet,
  .gl-basket .b-front,
  .gl-basket .b-check {
    transform-box: view-box;
    transform-origin: 70px 112px;
    transition: transform 0.35s cubic-bezier(0.22, 0.8, 0.3, 1), opacity 0.25s;
  }
  /* Idle: the sheet peeks out of the basket and breathes */
  .gl-drop[data-state="idle"] .b-sheet { transform: translateY(26px); }
  .gl-drop[data-state="idle"] .b-front { animation: gl-bob 3.2s ease-in-out infinite; }
  .gl-basket .b-check { transform: scale(0); transform-origin: 112px 26px; opacity: 0; }
  @keyframes gl-bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
  }
  /* Dragging a file over: the basket lifts, the sheet floats above it */
  .gl-drop[data-state="over"] {
    border-color: #0a9a9c;
    background: radial-gradient(120% 90% at 50% 0%, #dff5f3 0%, #eef9f8 70%);
    transform: scale(1.01);
  }
  .gl-drop[data-state="over"] .b-front { transform: translateY(4px) scale(1.06, 0.96); }
  .gl-drop[data-state="over"] .b-sheet { animation: gl-float 1s ease-in-out infinite; }
  @keyframes gl-float {
    0%, 100% { transform: translateY(-34px) rotate(-7deg); }
    50% { transform: translateY(-42px) rotate(-3deg); }
  }
  /* Dropped: the sheet falls into the basket, which squashes and bounces */
  .gl-drop[data-state="drop"] .b-sheet { animation: gl-fall 0.7s cubic-bezier(0.5, 0, 0.75, 0) both; }
  .gl-drop[data-state="drop"] .b-front { animation: gl-squash 0.75s cubic-bezier(0.22, 0.8, 0.3, 1) both; }
  @keyframes gl-fall {
    0% { transform: translateY(-48px) rotate(-12deg); opacity: 1; }
    70% { transform: translateY(22px) rotate(2deg); opacity: 1; }
    100% { transform: translateY(30px) rotate(0); opacity: 1; }
  }
  @keyframes gl-squash {
    0%, 55% { transform: none; }
    70% { transform: scale(1.08, 0.88); }
    85% { transform: scale(0.97, 1.04); }
    100% { transform: none; }
  }
  /* Read: tick pops in, the basket turns green-edged */
  .gl-drop[data-state="done"] {
    border-style: solid;
    border-color: #10b981;
    background: radial-gradient(120% 90% at 50% 0%, #e7f9f1 0%, #f5fcf9 70%);
  }
  .gl-drop[data-state="done"] .b-sheet { transform: translateY(30px); }
  .gl-drop[data-state="done"] .b-check { animation: gl-pop 0.45s cubic-bezier(0.3, 1.6, 0.5, 1) both; }
  @keyframes gl-pop {
    from { transform: scale(0); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
  }
  /* Not a Backstage file: a short shake */
  .gl-drop[data-state="error"] {
    border-color: #ef4444;
    background: #fef2f2;
    animation: gl-shake 0.45s ease both;
  }
  .gl-drop[data-state="error"] .gl-drop-title { color: #b91c1c; }
  .gl-drop[data-state="error"] .b-sheet { transform: translateY(26px); }
  @keyframes gl-shake {
    0%, 100% { transform: none; }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(7px); }
    60% { transform: translateX(-5px); }
    80% { transform: translateX(3px); }
  }
  @media (prefers-reduced-motion: reduce) {
    .gl-drop,
    .gl-drop *,
    .gl-basket * {
      animation: none !important;
      transition: none !important;
    }
    .gl-drop[data-state="done"] .b-check { transform: none; opacity: 1; }
  }
}

/* ---------- v43: Day · Week · Month ---------- */
@media screen {
  .gl-tc-glance {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
    margin-bottom: 14px;
  }
  .gl-tc-team {
    position: relative;
    padding: 16px 18px 14px;
    background: #fff;
    border: 1px solid #e2eaea;
    border-radius: 16px;
    overflow: hidden;
  }
  .gl-tc-team::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: var(--team);
  }
  .gl-tc-team h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    font-size: 15px;
  }
  .gl-tc-team dl {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 0;
  }
  .gl-tc-team dl > div {
    display: grid;
    align-content: start;
    gap: 2px;
    min-width: 0;
  }
  .gl-tc-team dt {
    font-size: 11.5px;
    color: #5d7880;
  }
  .gl-tc-team dd {
    margin: 0;
    font-size: 17px;
    font-weight: 800;
    color: #10303a;
    font-variant-numeric: tabular-nums;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .gl-tc-delta {
    font-style: normal;
    font-size: 11.5px;
    font-weight: 700;
  }
  .gl-tc-delta span {
    font-weight: 500;
    color: #6b8088;
  }
  .gl-tc-delta.up {
    color: #047857;
  }
  .gl-tc-delta.down {
    color: #b91c1c;
  }
  .gl-tc-bar {
    height: 6px;
    margin-top: 12px;
    border-radius: 999px;
    background: #edf3f3;
    overflow: hidden;
  }
  .gl-tc-bar span {
    display: block;
    height: 100%;
    width: calc(var(--p, 0) * 100%);
    background: var(--team);
    border-radius: inherit;
    transition: width 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  .gl-tc-of {
    margin: 6px 0 0;
    font-size: 12px;
    color: #5d7880;
  }
  .gl-tc-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
  }
  .gl-tc-head h2 {
    margin: 0 0 4px;
  }
  .gl-tc-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .gl-seg {
    display: inline-flex;
    padding: 3px;
    border-radius: 12px;
    background: #edf3f3;
  }
  .gl-seg button {
    margin: 0;
    padding: 7px 12px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #31525c;
    font-size: 13px;
    font-weight: 700;
    box-shadow: none;
  }
  .gl-seg button[aria-pressed="true"] {
    background: #fff;
    color: #0b3b44;
    box-shadow: 0 1px 4px rgba(15, 42, 51, 0.12);
  }
  .gl-tc-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 14px 0 4px;
    font-size: 13px;
    font-weight: 600;
  }
  .gl-tc-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }
  .gl-tc-chart {
    display: block;
    width: 100%;
    height: auto;
    margin: 4px 0 14px;
  }
  .gl-tc-grid {
    stroke: #e6eeee;
    stroke-width: 1;
  }
  .gl-tc-axis {
    font-size: 11px;
    fill: #6b8088;
  }
  .gl-tc-axis.is-now {
    fill: #0b3b44;
    font-weight: 800;
  }
  .gl-tc-now {
    fill: #00a7a9;
    opacity: 0.08;
  }
  .gl-tc-table th[data-color] {
    white-space: nowrap;
  }
  .gl-tc-table th .gl-dot {
    margin-right: 6px;
  }
  .gl-tc-table td small {
    display: block;
    font-size: 11px;
    color: #6b8088;
  }
  .gl-tc-table td small.ok {
    color: #047857;
  }
  .gl-tc-table td.gl-tc-best {
    font-weight: 800;
    color: #0b3b44;
  }
  .gl-tc-star {
    color: #e2a400;
    font-size: 12px;
  }
  .gl-tc-table tr.today td {
    background: #effafa;
  }
  .gl-tc-sum {
    font-weight: 800;
    background: #f7fafa;
  }
  .gl-tc-pill {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 7px;
    border-radius: 999px;
    background: #00a7a9;
    color: #fff;
    font-size: 10.5px;
  }
  .gl-tc-table tfoot td {
    font-weight: 700;
    color: #31525c;
  }
  @media (max-width: 640px) {
    .gl-tc-team dd {
      font-size: 15px;
    }
  }
}
@media (prefers-reduced-motion: reduce) {
  .gl-tc-bar span {
    transition: none;
  }
}

/* ---------- v43.1: LIVE Trend, recap, shared-out Backstage days ---------- */
@media screen {
  .gl-est {
    font-style: normal;
    color: #b45309;
    font-weight: 800;
  }
  .gl-est-note {
    margin: 0 0 8px;
    font-size: 12.5px;
  }
  .gl-recap {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 10px;
    margin-bottom: 14px;
  }
  .gl-recap-item {
    display: grid;
    gap: 2px;
    align-content: start;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid #e2eaea;
    border-left: 4px solid #0a9a9c;
    border-radius: 12px;
  }
  .gl-recap-item.is-trend {
    border-left-color: #e2a400;
  }
  .gl-recap-item small {
    font-size: 12px;
    color: #5d7880;
  }
  .gl-recap-item b {
    font-size: 19px;
    color: #10303a;
    font-variant-numeric: tabular-nums;
  }
  .gl-recap-item .muted {
    font-size: 12.5px;
  }
  .gl-recap-card .gl-recap {
    margin: 0;
  }
  .gl-recap-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
  }
  .gl-recap-head h2 {
    margin: 0;
    font-size: 17px;
  }
  .gl-recap-head button {
    margin: 0;
  }
  .gl-tr-clocks,
  .gl-tr-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
  }
  .gl-tr-clocks span,
  .gl-tr-preview span {
    display: grid;
    min-width: 110px;
    padding: 8px 14px;
    background: #f3f8f8;
    border-radius: 10px;
  }
  .gl-tr-clocks small,
  .gl-tr-preview small {
    font-size: 11.5px;
    color: #5d7880;
  }
  .gl-tr-clocks b,
  .gl-tr-preview b {
    font-size: 20px;
    color: #0b3b44;
    font-variant-numeric: tabular-nums;
  }
  .gl-tr-h {
    margin: 16px 0 8px;
    font-size: 15px;
  }
  .gl-tr-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 12px;
  }
  .gl-tr-card {
    position: relative;
    padding: 14px 16px 12px 20px;
    background: #fff;
    border: 1px solid #e2eaea;
    border-radius: 14px;
    overflow: hidden;
  }
  .gl-tr-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: var(--team);
  }
  .gl-tr-card.is-live {
    border-color: #f43f5e;
    box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.12);
  }
  .gl-tr-card.is-done {
    opacity: 0.7;
  }
  .gl-tr-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
  }
  .gl-tr-title {
    color: #5d7880;
    font-size: 13px;
  }
  .gl-tr-when {
    margin-left: auto;
    padding: 2px 9px;
    border-radius: 999px;
    background: #eef4f4;
    color: #31525c;
    font-size: 12px;
    font-weight: 700;
  }
  .gl-tr-when.is-soon {
    background: #fff4dc;
    color: #8a5a00;
  }
  .gl-tr-when.is-live {
    background: #f43f5e;
    color: #fff;
  }
  .gl-tr-day {
    margin: 6px 0 8px;
    font-size: 13px;
    color: #31525c;
  }
  .gl-tr-zones {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }
  .gl-tr-zones span {
    display: grid;
    padding: 6px 10px;
    border-radius: 10px;
    background: #f6f9f9;
  }
  .gl-tr-zones span.is-set {
    background: #e7f5f4;
    box-shadow: inset 0 0 0 1px #b7dcd9;
  }
  .gl-tr-zones small {
    font-size: 11px;
    color: #5d7880;
  }
  .gl-tr-zones b {
    font-size: 18px;
    color: #0b3b44;
    font-variant-numeric: tabular-nums;
  }
  .gl-tr-zones i {
    font-style: normal;
    font-size: 11px;
    color: #b45309;
  }
  .gl-tr-notes {
    margin: 8px 0 0;
    font-size: 13px;
  }
  .gl-tr-by {
    margin: 8px 0 0;
    font-size: 12px;
    color: #6b8088;
  }
  .gl-tr-by .gl-link {
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
    color: #036f72;
    font-size: 12px;
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
  }
  .gl-tr-by .gl-link.danger-text {
    color: #b91c1c;
  }
  .gl-tr-past {
    margin-top: 16px;
  }
  .gl-tr-past summary {
    cursor: pointer;
    font-weight: 700;
    margin-bottom: 10px;
  }
  .gl-tr-empty {
    padding: 18px;
    border: 1px dashed #cfe0e0;
    border-radius: 12px;
  }
}
