.primary-button,
.ghost-button,
.weak-button,
.icon-button {
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  min-height: 38px;
  padding: 0 14px;
  background: #fff;
  color: var(--text);
}

/* v0.6.8-A — business cockpit training rhythm controls and time distribution. */
.home-dashboard--cockpit .home-v4-rhythm-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 18px 0 20px;
}

.home-dashboard--cockpit .home-v4-rhythm-view-switch,
.home-dashboard--cockpit .home-v4-rhythm-periods {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  border-radius: 12px;
  padding: 4px;
  background: #f1f4f4;
}

.home-dashboard--cockpit .home-v4-rhythm-periods {
  overflow-x: auto;
  scrollbar-width: none;
}

.home-dashboard--cockpit .home-v4-rhythm-periods::-webkit-scrollbar {
  display: none;
}

.home-dashboard--cockpit .home-v4-rhythm-view-switch button,
.home-dashboard--cockpit .home-v4-rhythm-periods button,
.home-dashboard--cockpit .home-v4-rhythm-custom > button {
  min-height: 34px;
  border: 0;
  border-radius: 9px;
  padding: 7px 13px;
  background: transparent;
  color: #667386;
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color 160ms ease,
    box-shadow 160ms ease,
    color 160ms ease;
}

.home-dashboard--cockpit .home-v4-rhythm-view-switch button:hover,
.home-dashboard--cockpit .home-v4-rhythm-periods button:hover {
  color: #1f3e3a;
}

.home-dashboard--cockpit .home-v4-rhythm-view-switch button:focus-visible,
.home-dashboard--cockpit .home-v4-rhythm-periods button:focus-visible,
.home-dashboard--cockpit .home-v4-rhythm-custom input:focus-visible,
.home-dashboard--cockpit .home-v4-rhythm-custom > button:focus-visible {
  outline: 3px solid rgba(20, 125, 111, 0.16);
  outline-offset: 1px;
}

.home-dashboard--cockpit .home-v4-rhythm-view-switch button.is-active,
.home-dashboard--cockpit .home-v4-rhythm-periods button.is-active {
  background: #fff;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.07);
  color: #176f63;
}

.home-dashboard--cockpit .home-v4-rhythm-custom {
  display: flex;
  align-items: end;
  gap: 10px;
  margin: -8px 0 20px auto;
  width: fit-content;
  max-width: 100%;
  border: 1px solid rgba(100, 116, 139, 0.12);
  border-radius: 12px;
  padding: 10px;
  background: #fafbfb;
}

.home-dashboard--cockpit .home-v4-rhythm-custom label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.home-dashboard--cockpit .home-v4-rhythm-custom label > span {
  color: #6b7788;
  font-size: 11px;
  font-weight: 700;
}

.home-dashboard--cockpit .home-v4-rhythm-custom input {
  min-width: 142px;
  min-height: 36px;
  border: 1px solid #dce2e6;
  border-radius: 9px;
  padding: 7px 9px;
  background: #fff;
  color: #1e293b;
  font: inherit;
  font-size: 12px;
}

.home-dashboard--cockpit .home-v4-rhythm-custom > span {
  align-self: center;
  margin-top: 16px;
  color: #8a96a6;
  font-size: 11px;
}

.home-dashboard--cockpit .home-v4-rhythm-custom > button {
  background: #1f3e3a;
  color: #fff;
}

.home-dashboard--cockpit .home-v4-rhythm-custom > button:hover {
  background: #152f2b;
}

.home-dashboard--cockpit .home-v4-rhythm-filter-error {
  margin: -10px 0 18px;
  color: #a24848;
  font-size: 12px;
  line-height: 1.5;
  text-align: right;
}

.home-dashboard--cockpit .home-v4-time-layout {
  display: grid;
  grid-template-columns: minmax(170px, 0.25fr) minmax(0, 1fr);
  gap: 24px;
  min-width: 0;
  border: 1px solid rgba(100, 116, 139, 0.08);
  border-radius: 16px;
  padding: 24px;
  background: rgba(249, 251, 251, 0.72);
}

.home-dashboard--cockpit .home-v4-time-summary {
  display: grid;
  align-content: center;
  gap: 5px;
  min-width: 0;
  border-right: 1px solid rgba(100, 116, 139, 0.12);
  padding-right: 22px;
}

.home-dashboard--cockpit .home-v4-time-summary > span,
.home-dashboard--cockpit .home-v4-time-summary > small {
  color: #697688;
  font-size: 12px;
  line-height: 1.5;
}

.home-dashboard--cockpit .home-v4-time-summary > strong {
  color: #173b36;
  font-size: clamp(22px, 2.1vw, 31px);
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.home-dashboard--cockpit .home-v4-time-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}

.home-dashboard--cockpit .home-v4-time-grid article {
  display: grid;
  min-width: 0;
  gap: 7px;
  border: 1px solid rgba(100, 116, 139, 0.1);
  border-radius: 13px;
  padding: 14px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.035);
}

.home-dashboard--cockpit .home-v4-time-grid article.is-peak {
  border-color: rgba(20, 125, 111, 0.24);
  background: #f2f8f6;
  box-shadow: 0 12px 28px rgba(20, 85, 74, 0.08);
}

.home-dashboard--cockpit .home-v4-time-grid article > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.home-dashboard--cockpit .home-v4-time-grid article > header span {
  overflow: hidden;
  color: #344457;
  font-size: 12px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-dashboard--cockpit .home-v4-time-grid article > header em {
  border-radius: 999px;
  padding: 3px 7px;
  background: #dcefeb;
  color: #176f63;
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.home-dashboard--cockpit .home-v4-time-grid article > strong {
  color: #1c2b3b;
  font-size: 24px;
  line-height: 1;
}

.home-dashboard--cockpit .home-v4-time-grid article > strong small {
  margin-left: 3px;
  color: #778397;
  font-size: 11px;
  font-weight: 650;
}

.home-dashboard--cockpit .home-v4-time-grid article > p {
  margin: 0;
  color: #748092;
  font-size: 11px;
}

.home-dashboard--cockpit .home-v4-time-grid article > div {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9eeee;
}

.home-dashboard--cockpit .home-v4-time-grid article > div i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #8ea7a2;
}

.home-dashboard--cockpit .home-v4-time-grid article.is-peak > div i {
  background: #147d6f;
}

@media (max-width: 980px) {
  .home-dashboard--cockpit .home-v4-rhythm-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .home-dashboard--cockpit .home-v4-rhythm-view-switch,
  .home-dashboard--cockpit .home-v4-rhythm-periods {
    width: fit-content;
    max-width: 100%;
  }

  .home-dashboard--cockpit .home-v4-time-layout {
    grid-template-columns: 1fr;
  }

  .home-dashboard--cockpit .home-v4-time-summary {
    border-right: 0;
    border-bottom: 1px solid rgba(100, 116, 139, 0.12);
    padding-right: 0;
    padding-bottom: 18px;
  }
}

@media (max-width: 700px) {
  .home-dashboard--cockpit .home-v4-rhythm-toolbar {
    gap: 10px;
    margin-top: 14px;
  }

  .home-dashboard--cockpit .home-v4-rhythm-view-switch,
  .home-dashboard--cockpit .home-v4-rhythm-periods {
    width: 100%;
  }

  .home-dashboard--cockpit .home-v4-rhythm-view-switch button {
    flex: 1;
  }

  .home-dashboard--cockpit .home-v4-rhythm-custom {
    display: grid;
    width: 100%;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    margin-top: 0;
  }

  .home-dashboard--cockpit .home-v4-rhythm-custom input {
    width: 100%;
    min-width: 0;
  }

  .home-dashboard--cockpit .home-v4-rhythm-custom > button {
    grid-column: 1 / -1;
  }

  .home-dashboard--cockpit .home-v4-rhythm-filter-error {
    text-align: left;
  }

  .home-dashboard--cockpit .home-v4-time-layout {
    gap: 16px;
    padding: 14px;
  }

  .home-dashboard--cockpit .home-v4-time-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  .home-dashboard--cockpit .home-v4-time-grid {
    grid-template-columns: 1fr;
  }
}

/* Stage 6B-3B: experience customers and schedule person routing. */
.experience-customer-filters .filter-grid {
  grid-template-columns: minmax(180px, 1.4fr) repeat(2, minmax(150px, 1fr)) auto auto;
}

.experience-customer-list-card,
.experience-customer-detail,
.import-experience-group-item {
  min-width: 0;
}

.experience-customer-table {
  min-width: 1120px;
}

.experience-customer-table th,
.experience-customer-table td {
  white-space: nowrap;
}

.experience-customer-modal {
  width: min(680px, calc(100vw - 32px));
}

.experience-phone-editor {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 0;
  padding: 12px;
  background: #f8fafc;
}

.experience-phone-editor legend {
  padding: 0 4px;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

.experience-phone-current {
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.experience-phone-editor p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.experience-phone-editor [hidden] {
  display: none;
}

.experience-phone-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.member-form .experience-phone-actions label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
}

.member-form .experience-phone-actions input {
  width: auto;
  min-height: 0;
  padding: 0;
}

.experience-customer-detail {
  display: grid;
  gap: 12px;
  scroll-margin-top: 16px;
}

.experience-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
}

.experience-detail-identity,
.experience-detail-content,
.experience-detail-item,
.experience-class-row {
  min-width: 0;
}

.experience-detail-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.experience-detail-title h2 {
  margin: 0;
  font-size: 20px;
}

.experience-detail-identity p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.experience-detail-actions {
  justify-content: flex-end;
}

.experience-detail-content {
  overflow: hidden;
  padding: 0;
}

.experience-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.experience-detail-item {
  display: grid;
  align-content: start;
  gap: 5px;
  min-height: 70px;
  padding: 13px 14px;
  background: #fff;
}

.experience-detail-item span,
.experience-detail-note > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.experience-detail-item strong {
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.experience-detail-note {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  border-top: 1px solid var(--line);
  padding: 11px 14px;
  background: #fbfcfd;
}

.experience-detail-note p {
  margin: 0;
  font-size: 13px;
  line-height: 1.65;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.experience-class-panel {
  border-top: 1px solid var(--line);
  padding: 14px;
}

.experience-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.experience-panel-heading h3 {
  margin: 0;
  font-size: 16px;
}

.experience-panel-heading span {
  color: var(--muted);
  font-size: 12px;
}

.experience-class-list {
  border-top: 1px solid var(--line);
}

.experience-class-row {
  display: grid;
  grid-template-columns: 110px minmax(140px, 1fr) 105px minmax(150px, 0.8fr);
  align-items: center;
  gap: 10px 16px;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
  font-size: 13px;
}

.experience-class-row:last-child {
  border-bottom: 0;
}

.experience-class-row time,
.experience-class-row strong {
  overflow-wrap: anywhere;
}

.experience-class-row span {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.experience-detail-empty {
  display: grid;
  gap: 3px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  padding: 11px 12px;
  background: #fbfcfd;
}

.experience-detail-empty strong {
  font-size: 13px;
}

.experience-detail-empty span {
  color: var(--muted);
  font-size: 12px;
}

.experience-detail-footer {
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  padding: 8px 14px;
}

.experience-detail-footer .danger-text {
  color: var(--danger);
}

.import-experience-group-item {
  border-left: 3px solid rgba(19, 132, 112, 0.45);
}

.import-experience-group-item .import-group-actions {
  flex-wrap: wrap;
}

@media (max-width: 900px) {
  .experience-customer-filters .filter-grid,
  .experience-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .experience-detail-head {
    display: grid;
  }

  .experience-detail-actions {
    justify-content: flex-start;
  }

  .experience-class-row {
    grid-template-columns: minmax(100px, 0.7fr) minmax(160px, 1.3fr);
  }
}

@media (max-width: 560px) {
  .experience-customer-filters .filter-grid {
    grid-template-columns: 1fr;
  }

  .experience-detail-head,
  .experience-class-panel {
    padding: 12px;
  }

  .experience-detail-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .experience-detail-actions button {
    width: 100%;
  }

  .experience-detail-item {
    min-height: 66px;
    padding: 11px 10px;
  }

  .experience-detail-note {
    grid-template-columns: 1fr;
    gap: 5px;
    padding: 10px 12px;
  }

  .experience-class-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px 10px;
  }

  .experience-customer-modal {
    width: 100%;
  }

  .experience-phone-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .experience-customer-modal .modal-actions,
  .experience-customer-modal .person-identity-conflict__actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .experience-customer-modal .modal-actions button,
  .experience-customer-modal .person-identity-conflict__actions button {
    width: 100%;
  }
}

.weak-button {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.primary-button:disabled,
.ghost-button:disabled,
.weak-button:disabled,
.icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

/* Analysis home and coach-member views intentionally keep raw operational totals secondary. */
.product-coming-soon {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  padding: 24px;
}

.product-coming-soon-copy {
  max-width: 720px;
}

.product-status-label,
.home-section-kicker {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 700;
}

.product-coming-soon .state-title {
  margin: 0;
}

.product-coming-soon .state-text {
  margin: 8px 0 0;
  line-height: 1.7;
}

.product-coming-soon-actions,
.home-entry-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 8px;
}

.product-coming-soon-actions a,
.home-entry-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.analysis-home-page {
  gap: 22px;
}

.home-renewal-entry {
  padding: 22px;
}

.home-renewal-entry--loading {
  display: flex;
  align-items: center;
  min-height: 130px;
  gap: 10px;
  color: var(--muted);
}

.home-renewal-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.home-renewal-main > a {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.home-section-copy h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: 0;
}

.home-section-copy > p {
  margin: 7px 0 0;
}

.home-renewal-conclusion {
  color: var(--text);
  font-size: 16px;
  font-weight: 650;
  line-height: 1.65;
}

.home-renewal-scope {
  color: var(--muted);
  font-size: 13px;
}

.home-renewal-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 20px;
  border-top: 1px solid var(--line);
}

.home-renewal-metric {
  min-width: 0;
  padding: 16px 16px 0 0;
}

.home-renewal-metric + .home-renewal-metric {
  border-left: 1px solid var(--line);
  padding-left: 16px;
}

.home-renewal-metric span,
.home-data-item > span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.home-renewal-metric strong {
  display: block;
  margin-top: 6px;
  overflow-wrap: anywhere;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.home-data-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.home-data-item {
  border-left: 3px solid var(--line-strong);
  padding: 16px;
}

.home-data-item--ready {
  border-left-color: var(--primary);
}

.home-data-item--attention {
  border-left-color: #d28a2e;
}

.home-data-item strong {
  display: block;
  margin-top: 6px;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

.home-data-item small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.5;
}

.home-data-loading,
.home-data-error {
  padding: 16px;
  color: var(--muted);
}

.home-data-error {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.text-link {
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

.home-quick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.home-quick-link {
  position: relative;
  min-width: 0;
  padding: 16px 38px 16px 16px;
  color: var(--text);
  text-decoration: none;
}

.home-quick-link:hover {
  border-color: var(--primary);
}

.home-quick-link strong,
.home-quick-link span {
  display: block;
}

.home-quick-link span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.home-quick-link b {
  position: absolute;
  top: 17px;
  right: 16px;
  color: var(--primary);
  font-size: 16px;
}

.home-upcoming {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  color: var(--muted);
  font-size: 12px;
}

.home-upcoming strong {
  color: var(--text);
}

.coach-member-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 10px;
}

.coach-member-select {
  display: grid;
  gap: 6px;
  min-width: 180px;
}

.coach-member-select > span {
  color: var(--muted);
  font-size: 12px;
}

.coach-member-select select {
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0 34px 0 10px;
  background: #fff;
  color: var(--text);
}

.coach-member-filters .month-selector {
  margin: 0;
}

.coach-member-basis {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.coach-members-detail {
  gap: 12px;
}

.coach-members-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px;
}

.coach-members-detail-head h2,
.coach-members-detail-head p {
  margin: 0;
}

.coach-members-detail-head p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.coach-member-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.coach-member-summary-item {
  padding: 12px 16px;
}

.coach-member-summary-item + .coach-member-summary-item {
  border-left: 1px solid var(--line);
}

.coach-member-summary-item span,
.coach-member-summary-item strong {
  display: block;
}

.coach-member-summary-item span {
  color: var(--muted);
  font-size: 12px;
}

.coach-member-summary-item strong {
  margin-top: 4px;
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

.coach-member-summary-item small {
  margin-left: 3px;
  font-size: 11px;
  font-weight: 500;
}

.coach-members-list-heading {
  margin-top: 4px;
}

@media (max-width: 900px) {
  .home-renewal-metrics,
  .home-quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-renewal-metric:nth-child(3) {
    border-left: 0;
    padding-left: 0;
  }

  .home-data-grid {
    grid-template-columns: 1fr;
  }

  .coach-member-filters {
    justify-content: stretch;
  }

  .coach-member-select {
    flex: 1 1 180px;
  }
}

@media (max-width: 640px) {
  .product-coming-soon,
  .home-renewal-main,
  .coach-members-detail-head,
  .home-data-error {
    align-items: stretch;
    flex-direction: column;
  }

  .product-coming-soon-actions,
  .home-entry-actions,
  .home-renewal-main > a {
    width: 100%;
  }

  .product-coming-soon-actions a,
  .home-entry-actions a {
    flex: 1 1 100%;
  }

  .home-renewal-metrics,
  .home-quick-grid,
  .coach-member-basis,
  .coach-member-summary {
    grid-template-columns: 1fr;
  }

  .home-renewal-metric,
  .home-renewal-metric + .home-renewal-metric {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 12px 0 0;
  }

  .home-renewal-metric:first-child {
    border-top: 0;
  }

  .coach-member-summary-item + .coach-member-summary-item {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .coach-member-filters,
  .coach-member-filters .month-selector {
    width: 100%;
  }

  .coach-member-select {
    width: 100%;
  }

  .coach-members-detail-head .scope-tabs {
    width: 100%;
    overflow-x: auto;
  }
}

/* HOME_DASHBOARD_UI_V1 — static business intelligence cockpit. */
.home-dashboard {
  display: grid;
  width: 100%;
  max-width: 1480px;
  min-width: 0;
  margin: 0 auto;
  gap: 30px;
  color: #152033;
}

.home-dashboard-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  padding: 8px 2px 0;
}

.home-dashboard-heading {
  min-width: 0;
}

.home-dashboard-eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.04em;
}

.home-prototype-badge {
  border: 1px solid #d6e2e0;
  border-radius: 999px;
  padding: 3px 8px;
  background: #f4f8f7;
  color: #58706d;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0;
}

.home-dashboard-heading h1 {
  margin: 0;
  color: #111b2b;
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.home-dashboard-heading p {
  margin: 10px 0 0;
  color: #6e7889;
  font-size: 15px;
  line-height: 1.6;
}

.home-dashboard-meta {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 16px;
}

.home-dashboard-meta > div {
  display: grid;
  justify-items: end;
  gap: 3px;
}

.home-dashboard-meta span,
.home-dashboard-meta small {
  color: #7b8493;
  font-size: 11px;
}

.home-dashboard-meta strong {
  color: #273447;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.home-refresh-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid #d9e0e8;
  border-radius: 10px;
  padding: 0 15px;
  background: #fff;
  color: #293649;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.home-refresh-button:hover {
  border-color: #b9c9c6;
  background: #f8fbfa;
  color: var(--primary-dark);
}

.home-refresh-button span {
  color: inherit;
  font-size: 17px;
}

.home-coverage-notice {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  margin-top: -18px;
  border: 1px solid #ebe2c9;
  border-radius: 11px;
  padding: 9px 13px;
  background: #fffcf5;
  color: #746443;
  font-size: 12px;
  line-height: 1.5;
}

.home-coverage-dot,
.home-status-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: #c89637;
  box-shadow: 0 0 0 3px rgba(200, 150, 55, 0.12);
}

.home-dashboard-section {
  display: grid;
  min-width: 0;
  gap: 16px;
}

.home-section-heading {
  min-width: 0;
}

.home-section-heading > span {
  display: block;
  margin-bottom: 6px;
  color: #7b8493;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-section-heading h2 {
  margin: 0;
  color: #172236;
  font-size: 21px;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.home-section-heading p {
  margin: 5px 0 0;
  color: #727c8c;
  font-size: 13px;
  line-height: 1.55;
}

.home-section-topline {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.home-section-status {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  border: 1px solid #dce7e5;
  border-radius: 999px;
  padding: 6px 10px;
  background: #f7faf9;
  color: #637571;
  font-size: 11px;
  font-weight: 650;
}

.home-section-status .home-status-dot {
  width: 6px;
  height: 6px;
  flex-basis: 6px;
  background: var(--primary);
  box-shadow: 0 0 0 3px rgba(20, 125, 111, 0.1);
}

.home-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.home-kpi-card {
  position: relative;
  min-width: 0;
  min-height: 202px;
  overflow: visible;
  border: 1px solid #e1e6ed;
  border-radius: 15px;
  padding: 20px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(31, 45, 66, 0.045);
}

.home-kpi-card::before {
  position: absolute;
  top: -1px;
  right: 22px;
  left: 22px;
  height: 2px;
  border-radius: 0 0 3px 3px;
  background: transparent;
  content: "";
}

.home-kpi-card--primary {
  border-color: #cfdedb;
  box-shadow: 0 12px 30px rgba(20, 125, 111, 0.08);
}

.home-kpi-card--primary::before {
  background: var(--primary);
}

.home-kpi-card--secondary::before {
  background: #6d87aa;
}

.home-card-label {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  color: #5f6b7b;
  font-size: 12px;
  font-weight: 700;
}

.home-card-label > span {
  min-width: 0;
}

.home-info-button {
  position: relative;
  display: inline-grid;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  place-items: center;
  border: 1px solid #d9e0e8;
  border-radius: 50%;
  padding: 0;
  background: #fff;
  color: #7a8595;
  font-family: Georgia, serif;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.home-info-button:hover,
.home-info-button:focus-visible {
  border-color: #aabbb8;
  color: var(--primary-dark);
  outline: none;
}

.home-info-button[data-tooltip]::after {
  position: absolute;
  bottom: calc(100% + 9px);
  left: 50%;
  z-index: 80;
  display: none;
  width: max-content;
  max-width: 260px;
  border: 1px solid #dfe5ec;
  border-radius: 9px;
  padding: 9px 11px;
  background: #1e2938;
  color: #f7f9fb;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.18);
  content: attr(data-tooltip);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.55;
  text-align: left;
  transform: translateX(-50%);
}

.home-info-button[data-tooltip]:hover::after,
.home-info-button[data-tooltip]:focus-visible::after {
  display: block;
}

.home-kpi-value {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin-top: 25px;
  color: #111b2b;
}

.home-kpi-value strong {
  font-size: clamp(34px, 3.4vw, 46px);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.055em;
  line-height: 1;
}

.home-kpi-value span {
  color: #475568;
  font-size: 15px;
  font-weight: 700;
}

.home-kpi-card p {
  min-height: 38px;
  margin: 18px 0 0;
  color: #6e7888;
  font-size: 12px;
  line-height: 1.55;
}

.home-kpi-card > small {
  display: block;
  margin-top: 8px;
  color: #8a93a0;
  font-size: 11px;
}

.home-rhythm-summary {
  display: grid;
  grid-template-columns: minmax(300px, 0.85fr) minmax(420px, 1.4fr);
  min-width: 0;
  gap: 32px;
  align-items: center;
  border: 1px solid #e1e6ed;
  border-radius: 15px;
  padding: 19px 22px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(31, 45, 66, 0.035);
}

.home-rhythm-highlights {
  display: flex;
  gap: 34px;
  margin-top: 16px;
}

.home-rhythm-highlights > div {
  display: grid;
  grid-template-columns: auto auto;
  align-items: baseline;
  gap: 2px 7px;
}

.home-rhythm-highlights span {
  grid-column: 1 / -1;
  color: #8a93a0;
  font-size: 10px;
  font-weight: 700;
}

.home-rhythm-highlights strong {
  color: #263448;
  font-size: 18px;
}

.home-rhythm-highlights small {
  color: #6d7787;
  font-size: 11px;
}

.home-mini-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  min-width: 0;
  height: 86px;
  gap: 10px;
  align-items: end;
}

.home-mini-week-item {
  display: grid;
  min-width: 0;
  height: 100%;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: end;
}

.home-mini-week-track {
  position: relative;
  display: flex;
  height: 100%;
  align-items: flex-end;
  border-radius: 6px 6px 3px 3px;
  background: #f2f5f7;
}

.home-mini-week-track span {
  display: block;
  width: 100%;
  min-height: 5px;
  border-radius: 6px 6px 3px 3px;
  background: #9eb4b1;
}

.home-mini-week-item:nth-child(6) .home-mini-week-track span {
  background: var(--primary);
}

.home-mini-week-item small {
  color: #7d8796;
  font-size: 10px;
  text-align: center;
}

.home-lifecycle-card {
  display: grid;
  gap: 22px;
  border: 1px solid #e1e6ed;
  border-radius: 16px;
  padding: 24px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(31, 45, 66, 0.04);
}

.home-funnel {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.home-funnel-stage {
  display: grid;
  min-width: 118px;
  flex: 1 1 0;
  min-height: 116px;
  align-content: center;
  justify-items: center;
  border: 1px solid #dde5e8;
  border-radius: 13px;
  padding: 16px 10px;
  background: #f7faf9;
  text-align: center;
}

.home-funnel-stage.is-entry {
  border-color: #cddbd9;
  background: #f0f7f5;
}

.home-funnel-stage span {
  color: #637080;
  font-size: 11px;
  font-weight: 700;
}

.home-funnel-stage strong {
  margin-top: 10px;
  color: #172337;
  font-size: 27px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.035em;
}

.home-funnel-stage small {
  margin-top: 1px;
  color: #89929f;
  font-size: 10px;
}

.home-funnel-conversion {
  display: grid;
  flex: 0 0 48px;
  justify-items: center;
  gap: 4px;
  color: #6e7b8b;
}

.home-funnel-conversion span {
  font-size: 11px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.home-funnel-conversion i {
  color: #a0aaa9;
  font-size: 17px;
  font-style: normal;
}

.home-lifecycle-insight {
  display: grid;
  grid-template-columns: 30px auto minmax(220px, 1fr);
  align-items: center;
  gap: 12px;
  border-top: 1px solid #e8ecf1;
  padding-top: 18px;
}

.home-lifecycle-insight > span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 9px;
  background: #f2f5f7;
  color: #697786;
}

.home-lifecycle-insight div {
  display: grid;
  gap: 3px;
}

.home-lifecycle-insight small {
  color: #828c9a;
  font-size: 10px;
}

.home-lifecycle-insight strong {
  color: #2b3749;
  font-size: 13px;
}

.home-lifecycle-insight strong b {
  margin: 0 5px;
  color: #9aa4af;
}

.home-lifecycle-insight p {
  justify-self: end;
  margin: 0;
  color: #87919f;
  font-size: 11px;
}

.home-behavior-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.home-analysis-card {
  display: grid;
  min-width: 0;
  min-height: 390px;
  align-content: start;
  border: 1px solid #e1e6ed;
  border-radius: 16px;
  padding: 22px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(31, 45, 66, 0.04);
}

.home-analysis-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.home-analysis-card-header p {
  margin: 7px 0 0;
  color: #7a8493;
  font-size: 11px;
}

.home-sample-status {
  flex: 0 0 auto;
  border: 1px solid #d7e5e2;
  border-radius: 999px;
  padding: 5px 8px;
  background: #f3f8f6;
  color: #52736d;
  font-size: 10px;
  font-weight: 700;
}

.home-sample-status.is-limited {
  border-color: #e8dfca;
  background: #fcf8ef;
  color: #876e3d;
}

.home-segmented-control {
  display: inline-grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: fit-content;
  max-width: 100%;
  margin-top: 22px;
  border: 1px solid #dfe5ec;
  border-radius: 10px;
  padding: 3px;
  background: #f4f6f8;
}

.home-segmented-control button {
  min-height: 32px;
  border: 0;
  border-radius: 7px;
  padding: 0 13px;
  background: transparent;
  color: #697585;
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}

.home-segmented-control button.is-active {
  background: #fff;
  color: #1f665c;
  box-shadow: 0 1px 4px rgba(31, 45, 66, 0.1);
}

.home-analysis-result {
  margin-top: 32px;
}

.home-analysis-result > span {
  color: #7b8594;
  font-size: 11px;
}

.home-analysis-result > div {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-top: 8px;
}

.home-analysis-result strong {
  color: #142033;
  font-size: 52px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.055em;
  line-height: 1;
}

.home-analysis-result b {
  color: #526073;
  font-size: 15px;
}

.home-analysis-foot {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: auto;
  border-top: 1px solid #e8ecf1;
  padding-top: 18px;
}

.home-analysis-foot > div {
  display: grid;
  gap: 5px;
}

.home-analysis-foot span,
.home-analysis-foot strong {
  display: block;
}

.home-analysis-foot span {
  color: #8a93a0;
  font-size: 10px;
}

.home-analysis-foot strong {
  color: #354255;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.home-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
  margin-top: 22px;
}

.home-range-control {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 0;
}

.home-month-field,
.home-threshold-field {
  display: grid;
  gap: 5px;
}

.home-month-field > span,
.home-threshold-field > span:first-child {
  color: #87919f;
  font-size: 10px;
}

.home-month-field input {
  width: 128px;
  min-height: 38px;
  border: 1px solid #dfe5ec;
  border-radius: 9px;
  padding: 0 9px;
  background: #fff;
  color: #354255;
  font-size: 11px;
}

.home-threshold-input {
  display: flex;
  height: 38px;
  align-items: center;
  gap: 3px;
  border: 1px solid #dfe5ec;
  border-radius: 9px;
  padding: 0 8px;
  background: #fff;
}

.home-threshold-input b {
  color: #7b8593;
  font-size: 11px;
}

.home-threshold-input input {
  width: 34px;
  border: 0;
  padding: 0;
  background: transparent;
  color: #283548;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  outline: none;
  appearance: textfield;
}

.home-threshold-input input::-webkit-inner-spin-button,
.home-threshold-input input::-webkit-outer-spin-button {
  margin: 0;
  appearance: none;
}

.home-frequency-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 31px;
}

.home-frequency-results > div {
  min-width: 0;
  border-left: 2px solid #dce5e3;
  padding-left: 16px;
}

.home-frequency-results span {
  display: block;
  color: #7c8796;
  font-size: 11px;
}

.home-frequency-results strong {
  display: inline-block;
  margin-top: 7px;
  color: #142033;
  font-size: 38px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.045em;
  line-height: 1;
}

.home-frequency-results small {
  margin-left: 4px;
  color: #586679;
  font-size: 12px;
  font-weight: 700;
}

.home-frequency-definition {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  border-top: 1px solid #e8ecf1;
  padding-top: 18px;
}

.home-frequency-definition span {
  border-radius: 999px;
  padding: 5px 9px;
  background: #f1f5f4;
  color: #586e69;
  font-size: 10px;
  font-weight: 700;
}

.home-frequency-definition small {
  color: #818b98;
  font-size: 10px;
}

.home-rhythm-legend {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 16px;
  color: #7e8897;
  font-size: 10px;
}

.home-rhythm-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.home-rhythm-legend i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: #a7b7b4;
}

.home-rhythm-legend i.is-peak {
  background: var(--primary);
}

.home-rhythm-legend i.is-low {
  border: 1px solid #c8d0d9;
  background: #e5e9ee;
}

.home-week-chart-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  min-width: 0;
  gap: 32px;
  border: 1px solid #e1e6ed;
  border-radius: 16px;
  padding: 25px 26px 18px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(31, 45, 66, 0.04);
}

.home-week-chart-summary {
  display: grid;
  align-content: center;
  gap: 20px;
}

.home-week-chart-summary > div {
  display: grid;
  gap: 4px;
}

.home-week-chart-summary span {
  color: #89929f;
  font-size: 10px;
  font-weight: 700;
}

.home-week-chart-summary strong {
  color: #263448;
  font-size: 19px;
}

.home-week-chart-summary small {
  color: #667385;
  font-size: 11px;
}

.home-week-chart {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  min-width: 0;
  height: 230px;
  gap: clamp(7px, 1.6vw, 22px);
  align-items: end;
}

.home-week-column {
  display: grid;
  min-width: 0;
  height: 100%;
  grid-template-rows: 24px minmax(0, 1fr) 24px;
  align-items: end;
  text-align: center;
}

.home-week-value {
  color: #748091;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.home-week-bar-track {
  display: flex;
  width: min(42px, 100%);
  height: 100%;
  justify-self: center;
  align-items: flex-end;
  border-radius: 8px 8px 4px 4px;
  background: #f4f6f8;
}

.home-week-bar-track span {
  width: 100%;
  min-height: 6px;
  border-radius: 8px 8px 4px 4px;
  background: #98aaa7;
}

.home-week-column.is-peak .home-week-bar-track span {
  background: var(--primary);
}

.home-week-column.is-low .home-week-bar-track span {
  border: 1px solid #cbd3dc;
  background: #e4e8ed;
}

.home-week-column strong {
  align-self: end;
  color: #657183;
  font-size: 11px;
}

.home-week-column.is-peak strong {
  color: var(--primary-dark);
}

.home-chart-caption {
  display: flex;
  grid-column: 2;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid #edf0f3;
  padding-top: 12px;
  color: #9099a5;
  font-size: 10px;
}

.home-dashboard--loading {
  gap: 22px;
}

.home-skeleton,
.home-skeleton-card span,
.home-skeleton-card strong,
.home-skeleton-card i,
.home-skeleton-notice {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background: #e9edf1;
}

.home-skeleton::after,
.home-skeleton-card span::after,
.home-skeleton-card strong::after,
.home-skeleton-card i::after,
.home-skeleton-notice::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.65), transparent);
  content: "";
  animation: home-skeleton-shimmer 1.25s infinite;
  transform: translateX(-100%);
}

.home-skeleton--header {
  width: min(580px, 82%);
  height: 78px;
}

.home-skeleton-notice {
  height: 42px;
}

.home-skeleton--title {
  width: 240px;
  height: 46px;
}

.home-skeleton--wide {
  height: 126px;
}

.home-skeleton--panel {
  height: 310px;
}

.home-skeleton-card {
  display: grid;
  align-content: start;
  gap: 18px;
}

.home-skeleton-card span {
  width: 55%;
  height: 14px;
}

.home-skeleton-card strong {
  width: 45%;
  height: 50px;
}

.home-skeleton-card i {
  width: 84%;
  height: 12px;
}

.home-state-card {
  display: grid;
  min-height: 210px;
  place-items: center;
  align-content: center;
  gap: 7px;
  border: 1px dashed #d5dce4;
  border-radius: 15px;
  padding: 24px;
  background: #fbfcfd;
  text-align: center;
}

.home-state-card > span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  background: #eef2f4;
  color: #83909f;
  font-weight: 750;
}

.home-state-card strong {
  color: #354255;
  font-size: 14px;
}

.home-state-card p {
  max-width: 440px;
  margin: 0;
  color: #7f8997;
  font-size: 12px;
  line-height: 1.6;
}

.home-state-card.is-insufficient > span {
  background: #faf5e9;
  color: #9a7c42;
}

@keyframes home-skeleton-shimmer {
  to {
    transform: translateX(100%);
  }
}

@media (max-width: 1180px) {
  .home-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-kpi-card {
    min-height: 185px;
  }

  .home-rhythm-summary {
    grid-template-columns: minmax(260px, 0.8fr) minmax(350px, 1.2fr);
  }

  .home-funnel {
    gap: 7px;
  }

  .home-funnel-stage {
    min-width: 100px;
  }

  .home-funnel-conversion {
    flex-basis: 38px;
  }
}

@media (max-width: 980px) {
  .home-funnel {
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .home-funnel-stage {
    grid-template-columns: minmax(0, 1fr) auto auto;
    min-height: 62px;
    justify-items: start;
    gap: 7px;
    padding: 13px 16px;
    text-align: left;
  }

  .home-funnel-stage strong {
    margin-top: 0;
    font-size: 22px;
  }

  .home-funnel-stage small {
    align-self: center;
    margin: 0;
  }

  .home-funnel-conversion {
    display: flex;
    min-height: 27px;
    align-items: center;
    justify-content: center;
    gap: 7px;
  }

  .home-funnel-conversion i {
    transform: rotate(90deg);
  }

  .home-lifecycle-insight {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .home-lifecycle-insight p {
    grid-column: 2;
    justify-self: start;
  }

  .home-behavior-grid {
    grid-template-columns: 1fr;
  }

  .home-analysis-card {
    min-height: 370px;
  }

  .home-week-chart-card {
    grid-template-columns: 1fr;
  }

  .home-week-chart-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-chart-caption {
    grid-column: 1;
  }
}

@media (max-width: 760px) {
  .home-dashboard {
    gap: 25px;
  }

  .home-dashboard-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }

  .home-dashboard-meta {
    width: 100%;
    justify-content: space-between;
  }

  .home-dashboard-meta > div {
    justify-items: start;
  }

  .home-coverage-notice {
    margin-top: -13px;
  }

  .home-rhythm-summary {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .home-mini-week {
    height: 76px;
  }

  .home-section-topline {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .home-rhythm-legend {
    align-self: flex-start;
  }

  .home-week-chart {
    height: 205px;
    gap: 6px;
  }

  .home-week-bar-track {
    width: min(30px, 100%);
  }

  .home-chart-caption {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
}

@media (max-width: 560px) {
  .home-dashboard-heading h1 {
    font-size: 29px;
  }

  .home-dashboard-meta {
    align-items: stretch;
  }

  .home-refresh-button {
    min-width: 88px;
  }

  .home-coverage-notice {
    align-items: flex-start;
  }

  .home-kpi-grid {
    grid-template-columns: 1fr;
  }

  .home-kpi-card {
    min-height: 178px;
  }

  .home-kpi-value {
    margin-top: 20px;
  }

  .home-rhythm-summary,
  .home-lifecycle-card,
  .home-analysis-card,
  .home-week-chart-card {
    border-radius: 13px;
    padding: 17px;
  }

  .home-rhythm-highlights {
    gap: 22px;
  }

  .home-lifecycle-insight {
    align-items: start;
  }

  .home-segmented-control {
    display: grid;
    width: 100%;
  }

  .home-segmented-control button {
    min-width: 0;
    padding: 0 7px;
  }

  .home-range-control {
    grid-template-columns: 1fr;
  }

  .home-filter-row,
  .home-month-field,
  .home-threshold-field {
    width: 100%;
  }

  .home-month-field input {
    width: 100%;
  }

  .home-threshold-input {
    width: 100%;
    justify-content: center;
  }

  .home-analysis-result strong {
    font-size: 46px;
  }

  .home-analysis-foot {
    gap: 6px;
  }

  .home-frequency-results strong {
    font-size: 34px;
  }

  .home-week-chart-summary {
    gap: 14px;
  }

  .home-week-chart {
    height: 185px;
  }

  .home-week-column strong {
    font-size: 10px;
  }

  .home-week-value {
    font-size: 9px;
  }

  .home-info-button[data-tooltip]::after {
    left: auto;
    right: -8px;
    max-width: min(250px, calc(100vw - 50px));
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-skeleton::after,
  .home-skeleton-card span::after,
  .home-skeleton-card strong::after,
  .home-skeleton-card i::after,
  .home-skeleton-notice::after {
    animation: none;
  }
}

/* Demo-only informational surfaces; no Normal Owner or Dashboard geometry rule. */
.demo-read-only-banner {
  margin: 0 0 16px;
  padding: 10px 16px;
  border: 1px solid #c9e3dc;
  border-radius: 12px;
  background: #f1faf6;
  color: #285c4e;
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.demo-read-only-note {
  margin: 0 0 16px;
  color: var(--text-muted, #64748b);
  font-size: 13px;
  line-height: 1.6;
}
.demo-data-center {
  padding: clamp(20px, 4vw, 36px);
  overflow-wrap: anywhere;
}
.demo-data-center h2 { font-size: 20px; line-height: 1.4; }
.demo-data-center p { line-height: 1.7; color: var(--text-muted, #64748b); }
.demo-data-center .ghost-button { display: inline-flex; margin-top: 12px; }
@media (max-width: 900px) {
  /* The shared header switches to a column here. Its desktop 420px flex
     basis would become vertical whitespace; keep Demo copy content-sized. */
  .demo-read-only-banner + #appView .page-header-unified .page-header-copy {
    flex-basis: auto;
  }
}

/* COACH_ANALYSIS_V1 — current-assignment business analysis */
.coach-home-page {
  display: grid;
  gap: 24px;
  min-width: 0;
  color: #172033;
}

@media (max-width: 900px) {
  .coach-home-page > .page-header-unified .page-header-copy {
    flex: 0 1 auto;
    max-width: none;
  }
}

.coach-home-control-panel,
.coach-home-section,
.coach-home-state {
  border: 1px solid #e7ebf1;
  border-radius: 16px;
  background: #fff;
}

.coach-home-control-panel {
  overflow: hidden;
  box-shadow: 0 6px 20px rgb(15 23 42 / 3%);
}

.coach-home-filter-summary,
.coach-home-filter-summary > div:first-child,
.coach-home-filter-actions,
.coach-home-filter-panel-heading {
  display: flex;
  align-items: center;
}

.coach-home-filter-summary {
  justify-content: space-between;
  gap: 18px;
  min-height: 58px;
  padding: 9px 10px 9px 18px;
}

.coach-home-filter-summary > div:first-child {
  gap: 11px;
  min-width: 0;
}

.coach-home-summary-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #147d6f;
  box-shadow: 0 0 0 4px rgb(20 125 111 / 9%);
}

.coach-home-filter-summary p {
  display: flex;
  min-width: 0;
  gap: 10px;
  margin: 0;
  color: #667085;
  font-size: 13px;
  line-height: 1.5;
}

.coach-home-filter-summary p strong {
  overflow: hidden;
  color: #253047;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.coach-home-filter-actions {
  flex: 0 0 auto;
  gap: 8px;
}

.coach-home-filter-toggle,
.coach-home-filter-panel-heading > button {
  border: 1px solid #d9dee8;
  border-radius: 9px;
  color: #344054;
  background: #fff;
}

.coach-home-filter-toggle {
  min-height: 38px;
  padding: 8px 13px;
}

.coach-home-filter-toggle:hover,
.coach-home-filter-toggle:focus-visible,
.coach-home-filter-panel-heading > button:hover,
.coach-home-filter-panel-heading > button:focus-visible {
  border-color: #a9c8c1;
  color: #0f655a;
  background: #f2f8f6;
}

.coach-home-filter-panel {
  display: grid;
  gap: 18px;
  padding: 18px 20px 20px;
  border-top: 1px solid #edf0f4;
  background: #fbfcfc;
}

.coach-home-filter-panel[hidden] {
  display: none;
}

.coach-home-filter-panel-heading {
  justify-content: space-between;
  gap: 16px;
}

.coach-home-filter-panel-heading > div {
  display: grid;
  gap: 3px;
}

.coach-home-filter-panel-heading strong {
  color: #253047;
  font-size: 14px;
}

.coach-home-filter-panel-heading span {
  color: #667085;
  font-size: 13px;
}

.coach-home-filter-panel-heading > button {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  font-size: 21px;
}

.coach-home-control-row,
.coach-home-selector,
.coach-home-basis,
.coach-home-date-pair,
.coach-home-rhythm-heading,
.coach-home-rhythm-legend,
.coach-home-modal footer {
  display: flex;
  align-items: center;
}

.coach-home-control-row {
  flex-wrap: wrap;
  gap: 14px;
}

.coach-home-control-group {
  display: grid;
  gap: 7px;
}

.coach-home-control-group > span,
.coach-home-selector > div:first-child > span {
  color: #667085;
  font-size: 12px;
  font-weight: 650;
}

.coach-home-segments {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  border-radius: 10px;
  background: #f2f4f7;
}

.coach-home-segments button,
.coach-home-coach-chips button {
  border: 0;
  color: #667085;
  background: transparent;
}

.coach-home-segments button {
  padding: 8px 13px;
  border-radius: 8px;
}

.coach-home-segments button.is-active {
  color: #1d2939;
  background: #fff;
  box-shadow: 0 1px 3px rgb(15 23 42 / 12%);
}

.coach-home-control-panel select,
.coach-home-control-panel input,
.coach-home-modal input {
  min-height: 38px;
  border: 1px solid #d9dee8;
  border-radius: 9px;
  color: #253047;
  background: #fff;
}

.coach-home-control-panel select,
.coach-home-control-panel input {
  padding: 7px 10px;
}

.coach-home-date-pair {
  gap: 8px;
  color: #98a2b3;
  align-self: end;
}

.coach-home-refresh,
.coach-home-state button,
.coach-home-link {
  border: 0;
  border-radius: 9px;
  color: #fff;
  background: #335cff;
}

.coach-home-refresh {
  min-height: 38px;
  padding: 8px 16px;
  background: #147d6f;
}

.coach-home-refresh:disabled {
  opacity: 0.55;
}

.coach-home-selector {
  align-items: flex-start;
  gap: 18px;
  padding-top: 16px;
  border-top: 1px solid #eef1f5;
}

.coach-home-selector > div:first-child {
  display: grid;
  flex: 0 0 150px;
  gap: 4px;
}

.coach-home-selector small,
.coach-home-basis {
  color: #98a2b3;
  font-size: 12px;
}

.coach-home-selector > select {
  min-width: 220px;
}

.coach-home-coach-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.coach-home-coach-chips button {
  padding: 8px 12px;
  border: 1px solid #dfe3eb;
  border-radius: 999px;
  background: #fff;
}

.coach-home-coach-chips button.is-selected {
  border-color: #a9b9ff;
  color: #2949cf;
  background: #f3f5ff;
}

.coach-home-basis {
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 0;
  padding: 11px 13px;
  border-radius: 10px;
  background: #f8fafc;
}

.coach-home-basis strong {
  color: #475467;
}

.coach-home-loading {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.coach-home-skeleton {
  min-height: 128px;
  border-radius: 14px;
  background: linear-gradient(100deg, #f3f5f8 30%, #fafbfc 50%, #f3f5f8 70%);
  background-size: 240% 100%;
  animation: coach-home-skeleton 1.3s ease infinite;
}

@keyframes coach-home-skeleton {
  to { background-position-x: -240%; }
}

.coach-home-state {
  display: grid;
  justify-items: start;
  gap: 8px;
  padding: 24px;
}

.coach-home-state span {
  color: #667085;
}

.coach-home-state button {
  padding: 8px 13px;
}

.coach-home-state--error {
  border-color: #f1c6c6;
  background: #fffafa;
}

.coach-home-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(230px, 1.15fr) minmax(300px, 1fr) minmax(230px, 0.8fr);
  align-items: center;
  min-height: 164px;
  min-width: 0;
  overflow: hidden;
  padding: 24px 28px;
  border: 1px solid #cfe1dc;
  border-radius: 18px;
  background: #edf7f4;
  box-shadow: 0 10px 30px rgb(20 50 45 / 5%);
}

.coach-home-hero::after {
  position: absolute;
  right: -46px;
  bottom: -76px;
  width: 190px;
  height: 190px;
  border: 1px solid rgb(20 125 111 / 12%);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.coach-home-hero-identity {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.coach-home-avatar {
  display: grid;
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #147d6f;
  box-shadow: 0 8px 22px rgb(20 125 111 / 18%);
  font-size: 22px;
  font-weight: 760;
}

.coach-home-hero-kicker {
  display: block;
  margin-bottom: 5px;
  color: #0f655a;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.coach-home-hero h2 {
  margin: 0;
  color: #172033;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.045em;
}

.coach-home-hero-identity p {
  margin: 5px 0 0;
  color: #5f6b7a;
  font-size: 13px;
  line-height: 1.55;
}

.coach-home-hero-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  min-width: 0;
  border-right: 1px solid rgb(20 125 111 / 13%);
  border-left: 1px solid rgb(20 125 111 / 13%);
}

.coach-home-hero-facts div {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 5px 24px;
}

.coach-home-hero-facts span,
.coach-home-hero-period p > span {
  color: #5f6b7a;
  font-size: 13px;
  line-height: 1.5;
}

.coach-home-hero-facts strong {
  color: #172033;
  font-size: 28px;
  letter-spacing: -0.04em;
}

.coach-home-hero-facts strong small {
  margin-left: 3px;
  color: #5f6b7a;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0;
}

.coach-home-hero-period {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: start;
  gap: 8px;
  padding-left: 28px;
}

.coach-home-hero-period p {
  display: grid;
  gap: 2px;
  margin: 0;
}

.coach-home-hero-period p strong {
  color: #253047;
  font-size: 13px;
}

.coach-home-hero-status {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.coach-home-hero-status span {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0 9px;
  border-radius: 999px;
  color: #0f655a;
  background: rgb(255 255 255 / 82%);
  font-size: 10px;
  font-weight: 800;
}

.coach-home-hero-status span.is-inactive {
  color: #775f37;
  background: #fff8eb;
}

.coach-home-hero-status span.is-neutral {
  color: #667085;
  background: #f7f8fa;
}

.coach-home-hero .coach-home-coverage-note {
  position: absolute;
  z-index: 1;
  right: 28px;
  bottom: 10px;
  max-width: calc(100% - 56px);
  margin: 0;
  text-align: right;
}

.coach-home-section-heading h2 {
  margin: 3px 0 0;
  color: #172033;
}

.coach-home-coverage-note {
  flex-basis: 100%;
  margin: -10px 0 0;
  color: #966b25;
  font-size: 12px;
}

.coach-home-section {
  min-width: 0;
  padding: 24px;
}

.coach-home-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.coach-home-section-heading h2 {
  font-size: 18px;
}

.coach-home-section-heading p {
  margin: 5px 0 0;
  color: #7b8496;
  font-size: 13px;
}

.coach-home-definition-toggle {
  flex: 0 0 auto;
  padding: 4px 0;
  border: 0;
  color: #0f655a;
  background: transparent;
  font-size: 13px;
  font-weight: 720;
}

.coach-home-definition-toggle:hover,
.coach-home-definition-toggle:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.coach-home-module-status {
  margin: -8px 0 16px;
  padding: 9px 11px;
  border-radius: 9px;
  color: #667085;
  background: #f7f8fa;
  font-size: 12px;
}

.coach-home-module-status.is-partial,
.coach-home-module-status.is-limited,
.coach-home-module-status.is-insufficient {
  color: #8b6422;
  background: #fff9ed;
}

.coach-home-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.coach-home-kpis article {
  position: relative;
  display: grid;
  align-content: space-between;
  min-width: 0;
  min-height: 144px;
  overflow: hidden;
  padding: 18px;
  border: 1px solid #e3e8ec;
  border-radius: 13px;
  background: #fbfcfc;
}

.coach-home-kpis article.is-primary {
  border-color: #b9d7d0;
  background: #edf7f4;
}

.coach-home-kpis article.is-secondary {
  border-color: #d4ddec;
  background: #f2f5fa;
}

.coach-home-kpi-accent {
  position: absolute;
  top: 16px;
  left: 0;
  width: 3px;
  height: 24px;
  border-radius: 0 3px 3px 0;
  background: #147d6f;
}

.coach-home-kpis article.is-secondary .coach-home-kpi-accent {
  background: #587ba8;
}

.coach-home-kpis article > span {
  color: #667085;
  font-size: 13px;
}

.coach-home-kpis article > strong {
  display: block;
  margin: 12px 0 8px;
  font-size: clamp(25px, 3vw, 34px);
  letter-spacing: -0.035em;
}

.coach-home-kpis article > strong small {
  margin-left: 3px;
  font-size: 13px;
  font-weight: 600;
}

.coach-home-kpis article p {
  margin: 0;
  color: #667085;
  font-size: 13px;
  line-height: 1.55;
}

.coach-home-definitions {
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid #e3e8ec;
  border-radius: 11px;
  background: #f8faf9;
}

.coach-home-definitions[hidden] {
  display: none;
}

.coach-home-definitions dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

.coach-home-definitions dl div {
  display: grid;
  gap: 3px;
  padding: 12px 14px;
}

.coach-home-definitions dt {
  color: #253047;
  font-size: 13px;
  font-weight: 750;
}

.coach-home-definitions dd {
  margin: 0;
  color: #667085;
  font-size: 13px;
  line-height: 1.55;
}

.coach-home-lifecycle {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) auto minmax(110px, 1fr) auto minmax(110px, 1fr) auto minmax(110px, 1fr) auto minmax(110px, 1fr);
  align-items: center;
  gap: 10px;
}

.coach-home-lifecycle button {
  min-height: 104px;
  padding: 15px;
  border: 1px solid #e8ecf2;
  border-radius: 12px;
  text-align: left;
  background: #fff;
}

.coach-home-lifecycle button:hover,
.coach-home-lifecycle button:focus-visible {
  border-color: #bfcaff;
  box-shadow: 0 6px 18px rgb(51 92 255 / 8%);
}

.coach-home-lifecycle button span,
.coach-home-lifecycle button small {
  display: block;
  color: #7b8496;
}

.coach-home-lifecycle button strong {
  display: block;
  margin: 8px 0;
  font-size: 22px;
}

.coach-home-section-heading--numbered { margin-bottom: 22px; }

.coach-home-section-heading--numbered > div:first-child {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 10px;
  align-items: center;
}

.coach-home-section-heading--numbered h2 {
  grid-column: 2;
  font-size: 19px;
  font-weight: 760;
  letter-spacing: -0.015em;
}

.coach-home-section-heading--numbered p {
  grid-column: 2;
  color: #667085;
  font-size: 13px;
  line-height: 1.55;
}

.coach-home-section-index {
  grid-row: 1 / 3;
  align-self: start;
  margin-top: 4px;
  color: #147d6f;
  font-size: 12px;
  font-weight: 820;
  letter-spacing: 0.07em;
}

.coach-home-insight-chip {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 0 11px;
  border-radius: 999px;
  color: #685332;
  background: #faf4e9;
  font-size: 13px;
  font-weight: 680;
  white-space: nowrap;
}

.coach-home-lifecycle-section { overflow: hidden; }

.coach-home-lifecycle-flow {
  display: grid;
  grid-template-columns: minmax(132px, 1fr) 46px minmax(132px, 1fr) 46px minmax(132px, 1fr) 46px minmax(132px, 1fr) 46px minmax(132px, 1fr);
  align-items: center;
  gap: 8px;
}

.coach-home-lifecycle-stage {
  display: grid;
  min-height: 126px;
  align-content: center;
  gap: 7px;
  padding: 18px;
  border: 1px solid #e5e9ed;
  border-radius: 14px;
  color: #172033;
  text-align: left;
  background: #fff;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.coach-home-lifecycle-stage.is-highest {
  border-color: #b9d7d0;
  background: #f3f9f7;
}

.coach-home-lifecycle-stage:hover,
.coach-home-lifecycle-stage:focus-visible {
  border-color: #9fc8bf;
  box-shadow: 0 9px 24px rgb(20 125 111 / 9%);
  transform: translateY(-2px);
}

.coach-home-lifecycle-stage > span {
  color: #526071;
  font-size: 13px;
  font-weight: 680;
}

.coach-home-lifecycle-stage > strong {
  font-size: clamp(23px, 2.6vw, 31px);
  letter-spacing: -0.035em;
}

.coach-home-lifecycle-stage > small {
  color: #667085;
  font-size: 13px;
  line-height: 1.5;
}

.coach-home-lifecycle-connector {
  display: grid;
  justify-items: center;
  gap: 3px;
  color: #758192;
}

.coach-home-lifecycle-connector strong {
  color: #455468;
  font-size: 13px;
}

.coach-home-lifecycle-connector i {
  color: #70a89d;
  font-size: 22px;
  font-style: normal;
  line-height: 1;
}

.coach-home-behavior-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.coach-home-behavior-card {
  display: flex;
  flex-direction: column;
}

.coach-home-link {
  align-self: flex-start;
  margin-top: auto;
  padding: 8px 12px;
  color: #2949cf;
  background: #eef2ff;
}

.coach-home-compact-control {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 7px;
  color: #5f6b7a;
  font-size: 13px;
  font-weight: 650;
}

.coach-home-compact-control input,
.coach-home-compact-control select,
.coach-home-frequency-controls > input {
  min-height: 34px;
  padding: 5px 8px;
  border: 1px solid #d9e0e5;
  border-radius: 8px;
  color: #253047;
  background: #fff;
  font: inherit;
}

.coach-home-compact-control input[type="number"] { width: 62px; }

.coach-home-completion-card {
  border-color: #ebe5da;
  background: #fdfbf7;
}

.coach-home-completion-summary {
  display: grid;
  grid-template-columns: minmax(180px, 1.05fr) minmax(210px, 1fr);
  gap: 26px;
  align-items: center;
  min-height: 180px;
}

.coach-home-completion-primary {
  display: grid;
  justify-items: start;
  gap: 7px;
}

.coach-home-completion-primary > span {
  color: #6d665c;
  font-size: 14px;
  font-weight: 680;
}

.coach-home-completion-primary > strong {
  color: #27231e;
  font-size: clamp(39px, 5vw, 54px);
  letter-spacing: -0.055em;
  line-height: 1;
}

.coach-home-completion-primary > strong small,
.coach-home-frequency-primary > strong small {
  margin-left: 4px;
  color: #6d665c;
  font-size: 16px;
  font-weight: 680;
  letter-spacing: 0;
}

.coach-home-completion-primary .coach-home-link {
  margin-top: 9px;
  color: #7a5b29;
  background: #f5ecd9;
}

.coach-home-completion-facts,
.coach-home-frequency-facts {
  display: grid;
  gap: 0;
  margin: 0;
}

.coach-home-completion-facts div,
.coach-home-frequency-facts div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgb(100 88 67 / 12%);
}

.coach-home-completion-facts dt,
.coach-home-frequency-facts dt {
  color: #667085;
  font-size: 13px;
}

.coach-home-completion-facts dd,
.coach-home-frequency-facts dd {
  margin: 0;
  color: #253047;
  font-size: 16px;
  font-weight: 760;
}

.coach-home-completion-range {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  color: #716a60;
  font-size: 13px;
}

.coach-home-completion-range > i {
  position: relative;
  display: block;
  height: 4px;
  border-radius: 999px;
  background: #e6dcc9;
}

.coach-home-completion-range > i b {
  position: absolute;
  top: 50%;
  left: var(--coach-home-range-position, 50%);
  width: 11px;
  height: 11px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #a47b38;
  box-shadow: 0 2px 7px rgb(77 58 24 / 18%);
  transform: translate(-50%, -50%);
}

.coach-home-completion-range.is-empty > i b { display: none; }

.coach-home-frequency-card {
  border-color: #ded8eb;
  background: #f8f6fb;
}

.coach-home-frequency-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px 10px;
}

.coach-home-frequency-summary {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) 132px;
  gap: 22px;
  align-items: center;
}

.coach-home-frequency-primary {
  display: grid;
  justify-items: start;
  gap: 6px;
}

.coach-home-frequency-primary > span {
  color: #635b72;
  font-size: 14px;
  font-weight: 680;
}

.coach-home-frequency-primary > strong {
  color: #2f293b;
  font-size: clamp(39px, 5vw, 54px);
  letter-spacing: -0.055em;
  line-height: 1;
}

.coach-home-frequency-primary > strong small { color: #635b72; }

.coach-home-frequency-primary .coach-home-link {
  margin-top: 9px;
  color: #66538e;
  background: #ebe6f5;
}

.coach-home-frequency-ring {
  display: grid;
  width: 126px;
  height: 126px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(#75649f calc(var(--coach-home-share) * 1%), #e7e2ef 0);
}

.coach-home-frequency-ring::before {
  content: "";
  grid-area: 1 / 1;
  width: 94px;
  height: 94px;
  border-radius: 50%;
  background: #f8f6fb;
}

.coach-home-frequency-ring > div {
  z-index: 1;
  grid-area: 1 / 1;
  display: grid;
  justify-items: center;
  gap: 2px;
}

.coach-home-frequency-ring strong {
  color: #332b42;
  font-size: 24px;
  letter-spacing: -0.03em;
}

.coach-home-frequency-ring span {
  color: #71677f;
  font-size: 13px;
}

.coach-home-frequency-ring.is-empty { background: #e7e2ef; }

.coach-home-frequency-progress {
  display: grid;
  gap: 7px;
  margin: 21px 0 4px;
}

.coach-home-frequency-progress > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #655d72;
  font-size: 13px;
}

.coach-home-frequency-progress > i {
  display: block;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7e2ef;
}

.coach-home-frequency-progress > i b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #75649f;
  transition: width 220ms ease;
}

.coach-home-frequency-facts {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 20px;
  margin-top: 3px;
}

.coach-home-rhythm-section { overflow: visible; }

.coach-home-rhythm-section .coach-home-rhythm-heading {
  align-items: flex-start;
  margin-bottom: 18px;
}

.coach-home-rhythm-section .coach-home-rhythm-heading > .coach-home-section-heading {
  flex: 1 1 auto;
  margin-bottom: 0;
}

.coach-home-rhythm-visual {
  position: relative;
  min-width: 0;
}

.coach-home-chart-tooltip {
  position: absolute;
  z-index: 20;
  display: grid;
  width: max-content;
  max-width: min(210px, calc(100% - 16px));
  gap: 4px;
  padding: 10px 12px;
  border-radius: 9px;
  color: #fff;
  background: #202938;
  box-shadow: 0 10px 26px rgb(15 23 42 / 25%);
  pointer-events: none;
}

.coach-home-chart-tooltip[hidden] { display: none; }

.coach-home-chart-tooltip strong { font-size: 13px; }

.coach-home-chart-tooltip span {
  color: #d9e0e8;
  font-size: 12px;
  line-height: 1.45;
}

.coach-home-rhythm-heading {
  justify-content: space-between;
  gap: 20px;
}

.coach-home-rhythm-legend {
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 18px;
}

.coach-home-rhythm-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #667085;
  font-size: 12px;
}

.coach-home-rhythm-legend i {
  background: var(--coach-home-series-color);
}

.coach-home-rhythm-legend span:nth-child(1) { --coach-home-series-color: #335cff; }
.coach-home-rhythm-legend span:nth-child(2) { --coach-home-series-color: #14a38b; }
.coach-home-rhythm-legend span:nth-child(3) { --coach-home-series-color: #8d68d8; }
.coach-home-rhythm-legend span:nth-child(4) { --coach-home-series-color: #d28a32; }

.coach-home-rhythm-legend i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

/* ANALYTICS_EXPERIENCE_V1_1_MIGRATION_STAGE_3_COMPARE */
.coach-home-compare-selector-tools {
  display: grid;
  flex: 1 1 560px;
  gap: 10px;
  min-width: 0;
}

.coach-home-compare-search {
  display: flex;
  width: min(320px, 100%);
  align-items: center;
  gap: 9px;
  color: #667085;
  font-size: 13px;
  font-weight: 650;
}

.coach-home-compare-search input {
  min-width: 0;
  flex: 1 1 auto;
}

.coach-home-compare-selection-note {
  margin: 0;
  color: #667085;
  font-size: 13px;
  line-height: 1.55;
}

.coach-home-compare-filter-summary {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 16px;
}

.coach-home-compare-filter-summary p {
  display: grid;
  gap: 2px;
  margin: 0;
  padding-left: 16px;
  border-left: 1px solid rgba(100, 116, 139, 0.12);
}

.coach-home-compare-filter-summary p span {
  color: #7a8594;
  font-size: 11px;
  line-height: 1.35;
}

.coach-home-compare-filter-summary p strong {
  overflow: hidden;
  max-width: 260px;
  color: #29364a;
  font-size: 13px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.coach-home-compare-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.42fr);
  grid-template-areas:
    "heading meta"
    "identities identities";
  gap: 24px 32px;
  align-items: start;
  min-width: 0;
  padding: 30px;
  border: 1px solid rgba(20, 125, 111, 0.12);
  border-radius: 18px;
  background: #f6faf8;
}

.coach-home-compare-hero-heading {
  grid-area: heading;
}

.coach-home-compare-hero-heading > span,
.coach-home-compare-hero-meta span {
  color: #5e746f;
  font-size: 13px;
  font-weight: 680;
}

.coach-home-compare-hero-heading h2 {
  margin: 5px 0 7px;
  color: #162c28;
  font-size: clamp(26px, 2.7vw, 36px);
  letter-spacing: -0.04em;
}

.coach-home-compare-hero-heading p,
.coach-home-compare-hero-meta p {
  margin: 0;
  color: #5d6d69;
  font-size: 13px;
  line-height: 1.55;
}

.coach-home-compare-identities {
  grid-area: identities;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px 22px;
  min-width: 0;
  padding-top: 20px;
  border-top: 1px solid rgba(100, 116, 139, 0.12);
}

.coach-home-compare-identities > span {
  color: #6d7a89;
  font-size: 12px;
  font-weight: 700;
}

.coach-home-compare-identities > div {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 20px;
}

.coach-home-compare-identities article {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.coach-home-compare-identities article > i {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 50%;
  background: var(--coach-home-series-color);
}

.coach-home-compare-identities strong {
  overflow: hidden;
  color: #263a36;
  font-size: 14px;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.coach-home-compare-hero-meta {
  grid-area: meta;
  display: grid;
  gap: 10px;
  min-width: 0;
}

.coach-home-compare-hero-meta p {
  display: grid;
  gap: 3px;
}

.coach-home-compare-hero-meta strong {
  color: #253a36;
  font-size: 13px;
  line-height: 1.45;
}

.coach-home-compare-metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.coach-home-compare-metric {
  display: grid;
  gap: 16px;
  min-width: 0;
  padding: 18px;
  border: 1px solid #e7ebee;
  border-radius: 14px;
  background: #fbfcfc;
}

.coach-home-compare-metric header span,
.coach-home-compare-metric header small {
  display: block;
}

.coach-home-compare-metric header span {
  color: #253047;
  font-size: 15px;
  font-weight: 760;
}

.coach-home-compare-metric header small {
  margin-top: 4px;
  color: #667085;
  font-size: 13px;
  line-height: 1.5;
}

.coach-home-compare-metric-rows {
  display: grid;
  gap: 11px;
}

.coach-home-compare-metric-row {
  display: grid;
  grid-template-columns: minmax(72px, 0.7fr) minmax(80px, 1.35fr) minmax(60px, auto);
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.coach-home-compare-metric-row > span {
  overflow: hidden;
  color: #4c596c;
  font-size: 13px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.coach-home-compare-metric-row > i,
.coach-home-compare-ranking-bar {
  display: block;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #eaedef;
}

.coach-home-compare-metric-row > i b,
.coach-home-compare-ranking-bar > i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--coach-home-series-color);
  transition: width 220ms ease;
}

.coach-home-compare-metric-row > strong {
  color: #253047;
  font-size: 14px;
  text-align: right;
  white-space: nowrap;
}

.coach-home-compare-data-notes {
  display: grid;
  gap: 7px;
  margin-top: 13px;
}

.coach-home-compare-data-notes:empty {
  display: none;
}

.coach-home-compare-data-notes p {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: #786237;
  font-size: 13px;
  line-height: 1.5;
}

.coach-home-compare-data-notes p i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--coach-home-series-color);
}

.coach-home-compare-data-notes p strong {
  color: #5b4b2e;
}

.coach-home-compare-toggle {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  border-radius: 9px;
  background: #f0f3f4;
}

.coach-home-compare-toggle button {
  min-height: 31px;
  padding: 5px 11px;
  border: 0;
  border-radius: 7px;
  color: #667085;
  background: transparent;
  font-size: 13px;
  font-weight: 680;
}

.coach-home-compare-toggle button.is-active {
  color: #1f3a34;
  background: #fff;
  box-shadow: 0 1px 4px rgb(15 23 42 / 10%);
}

.coach-home-compare-lifecycle-scroll {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

.coach-home-compare-lifecycle {
  display: grid;
  gap: 8px;
  min-width: 850px;
}

.coach-home-compare-lifecycle-head,
.coach-home-compare-lifecycle-track {
  display: grid;
  grid-template-columns: minmax(120px, 0.8fr) repeat(5, minmax(120px, 1fr));
  gap: 8px;
  align-items: stretch;
}

.coach-home-compare-lifecycle-head span {
  padding: 0 10px 6px;
  color: #667085;
  font-size: 12px;
  font-weight: 700;
}

.coach-home-compare-lifecycle-track > strong {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 10px;
  color: #344054;
  font-size: 13px;
}

.coach-home-compare-lifecycle-track > strong i,
.coach-home-compare-ranking-title i {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 50%;
  background: var(--coach-home-series-color);
}

.coach-home-compare-lifecycle-track button {
  display: grid;
  min-height: 72px;
  align-content: center;
  gap: 3px;
  padding: 10px;
  border: 1px solid #e7ebee;
  border-radius: 11px;
  color: #253047;
  text-align: left;
  background: #fff;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.coach-home-compare-lifecycle-track button:hover,
.coach-home-compare-lifecycle-track button:focus-visible {
  border-color: color-mix(in srgb, var(--coach-home-series-color) 40%, #dfe5e8);
  transform: translateY(-1px);
}

.coach-home-compare-lifecycle-track button.is-column-highest {
  border-color: color-mix(in srgb, var(--coach-home-series-color) 30%, #dfe5e8);
  background: color-mix(in srgb, var(--coach-home-series-color) 7%, #fff);
}

.coach-home-compare-lifecycle-track button b {
  font-size: 17px;
}

.coach-home-compare-lifecycle-track button small {
  color: #667085;
  font-size: 12px;
}

.coach-home-compare-behavior-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  min-width: 0;
}

.coach-home-compare-ranking-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.coach-home-compare-completion {
  border-color: #ebe5da;
  background: #fdfbf7;
}

.coach-home-compare-frequency {
  border-color: #e4deee;
  background: #f9f7fc;
}

.coach-home-compare-period-note {
  margin: -8px 0 15px;
  color: #6e647d;
  font-size: 13px;
  line-height: 1.5;
}

.coach-home-compare-ranking {
  display: grid;
  gap: 9px;
}

.coach-home-compare-ranking-row {
  display: grid;
  grid-template-columns: minmax(92px, 0.75fr) minmax(90px, 1fr) minmax(86px, auto);
  align-items: center;
  gap: 8px 12px;
  min-width: 0;
  padding: 13px;
  border: 1px solid rgb(71 84 103 / 10%);
  border-radius: 11px;
  background: rgb(255 255 255 / 76%);
}

.coach-home-compare-ranking-title {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.coach-home-compare-ranking-title strong {
  overflow: hidden;
  color: #344054;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.coach-home-compare-ranking-value {
  display: grid;
  justify-items: end;
  gap: 1px;
}

.coach-home-compare-ranking-value strong {
  color: #253047;
  font-size: 16px;
}

.coach-home-compare-ranking-value span,
.coach-home-compare-ranking-details span,
.coach-home-compare-row-status {
  color: #667085;
  font-size: 12px;
  line-height: 1.45;
}

.coach-home-compare-ranking-details {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 13px;
  padding-top: 4px;
}

.coach-home-compare-ranking-details button {
  margin-left: auto;
  padding: 5px 8px;
  border: 0;
  border-radius: 7px;
  color: #3659c5;
  background: #edf1ff;
  font-size: 12px;
  font-weight: 680;
}

.coach-home-compare-frequency .coach-home-compare-ranking-details button {
  color: #66538e;
  background: #eee9f6;
}

.coach-home-compare-ranking-details button:disabled {
  cursor: default;
  opacity: 0.5;
}

.coach-home-compare-row-status {
  grid-column: 1 / -1;
  margin: 0;
  padding-top: 4px;
  color: #8a672d;
}

.coach-home-compare-rhythm-legend i,
.coach-home-compare-rhythm-bars button {
  background: var(--coach-home-series-color);
}

.coach-home-compare-rhythm-chart {
  display: grid;
  grid-template-columns: repeat(7, minmax(78px, 1fr));
  gap: 14px;
  min-width: 680px;
  min-height: 260px;
  padding: 10px 8px 0;
  border-bottom: 1px solid #dfe5e8;
}

.coach-home-compare-rhythm-day {
  display: grid;
  grid-template-rows: minmax(210px, 1fr) auto;
  gap: 8px;
  min-width: 0;
}

.coach-home-compare-rhythm-day > strong {
  color: #667085;
  font-size: 13px;
  text-align: center;
}

.coach-home-compare-rhythm-bars {
  display: flex;
  min-height: 210px;
  align-items: end;
  justify-content: center;
  gap: 4px;
}

.coach-home-compare-rhythm-bars button {
  width: min(18px, calc((100% - 12px) / var(--coach-home-compare-count)));
  min-width: 6px;
  min-height: 2px;
  padding: 0;
  border: 0;
  border-radius: 5px 5px 1px 1px;
  box-shadow: 0 7px 14px color-mix(in srgb, var(--coach-home-series-color) 16%, transparent);
  transition: opacity 160ms ease, transform 160ms ease;
}

.coach-home-compare-rhythm-bars button:hover,
.coach-home-compare-rhythm-bars button:focus-visible {
  opacity: 0.78;
  transform: translateY(-2px);
}

@media (max-width: 1180px) {
  .coach-home-compare-hero {
    grid-template-columns: 1fr;
    grid-template-areas:
      "heading"
      "meta"
      "identities";
  }

  .coach-home-compare-hero-meta {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .coach-home-compare-behavior-grid {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 720px) {
  .coach-home-compare-selector-tools,
  .coach-home-compare-search {
    width: 100%;
    flex-basis: auto;
  }

  .coach-home-compare-search {
    align-items: stretch;
    flex-direction: column;
    gap: 5px;
  }

  .coach-home-compare-hero {
    gap: 17px;
    padding: 20px;
    border-radius: 15px;
  }

  .coach-home-compare-identities {
    grid-template-columns: 1fr;
    gap: 9px;
    padding-top: 16px;
  }

  .coach-home-compare-hero-meta {
    grid-template-columns: 1fr;
  }

  .coach-home-compare-filter-summary {
    width: 100%;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 9px 14px;
  }

  .coach-home-compare-filter-summary p {
    min-width: 128px;
    flex: 1 1 128px;
    padding-left: 12px;
  }

  .coach-home-compare-metric-grid,
  .coach-home-compare-behavior-grid {
    grid-template-columns: 1fr;
  }

  .coach-home-compare-metric {
    padding: 15px;
  }

  .coach-home-compare-metric-row {
    grid-template-columns: minmax(70px, 0.8fr) minmax(60px, 1fr) auto;
    gap: 8px;
  }

  .coach-home-compare-lifecycle-scroll,
  .coach-home-compare-rhythm-section .coach-home-rhythm-visual {
    margin-right: -16px;
    margin-left: -16px;
    padding: 0 16px 8px;
  }

  .coach-home-compare-ranking-row {
    grid-template-columns: minmax(90px, 1fr) minmax(76px, 1fr) auto;
  }

  .coach-home-compare-ranking-details {
    align-items: flex-start;
    flex-direction: column;
  }

  .coach-home-compare-ranking-details button {
    width: 100%;
    margin-left: 0;
    text-align: center;
  }

  .coach-home-compare-rhythm-section .coach-home-rhythm-visual {
    margin-right: -16px;
    margin-left: -16px;
    padding: 0 16px 8px;
  }

  .coach-home-compare-rhythm-section .coach-home-rhythm-heading {
    gap: 13px;
  }

  .coach-home-compare-rhythm-section .coach-home-date-pair {
    flex-wrap: nowrap;
  }
}

body:has(.coach-home-modal-layer) {
  overflow: hidden;
}

.coach-home-modal-layer {
  position: fixed;
  z-index: 1200;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
}

.coach-home-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgb(15 23 42 / 42%);
}

.coach-home-modal {
  position: relative;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  width: min(860px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 70px rgb(15 23 42 / 28%);
}

.coach-home-modal > header {
  position: sticky;
  z-index: 4;
  top: 0;
  display: flex;
  justify-content: space-between;
  padding: 20px 22px 14px;
  background: #fff;
}

.coach-home-modal > header span,
.coach-home-modal > header p {
  color: #7b8496;
  font-size: 13px;
  line-height: 1.5;
}

.coach-home-modal > header h2 {
  margin: 4px 0;
  font-size: 20px;
}

.coach-home-modal > header p {
  margin: 0;
}

.coach-home-modal > header button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  font-size: 22px;
  background: #f3f5f7;
}

.coach-home-modal-toolbar {
  position: sticky;
  z-index: 3;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 22px 14px;
  background: #fff;
}

.coach-home-modal-toolbar label {
  width: min(420px, 100%);
}

.coach-home-modal-toolbar input {
  width: 100%;
  padding: 8px 11px;
}

.coach-home-modal-toolbar > span {
  color: #667085;
  font-size: 13px;
  line-height: 1.5;
  white-space: nowrap;
}

.coach-home-modal-table {
  min-height: 0;
  margin: 0 22px;
  overflow: auto;
  border: 1px solid #e8ecf2;
  border-radius: 10px;
}

.coach-home-modal-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  min-width: 650px;
}

.coach-home-modal-table.is-four-columns .coach-home-modal-row {
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  min-width: 520px;
}

.coach-home-modal-row > * {
  padding: 11px 12px;
  border-bottom: 1px solid #eef1f5;
  color: #475467;
  font-size: 12px;
}

.coach-home-modal-head {
  position: sticky;
  z-index: 2;
  top: 0;
  background: #f8fafc;
}

.coach-home-modal-body > p {
  padding: 24px;
  color: #667085;
  text-align: center;
}

.coach-home-modal-error {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 24px;
  color: #667085;
  text-align: center;
}

.coach-home-modal-error p {
  margin: 0;
}

.coach-home-modal-error button {
  padding: 8px 12px;
  border: 1px solid #c8d8d4;
  border-radius: 8px;
  color: #0f655a;
  background: #f2f8f6;
  font-weight: 680;
}

.coach-home-modal footer {
  justify-content: space-between;
  gap: 12px;
  padding: 14px 22px 18px;
  color: #7b8496;
  font-size: 12px;
}

.coach-home-modal footer div {
  display: flex;
  gap: 8px;
}

.coach-home-modal footer button {
  padding: 7px 11px;
  border: 1px solid #dfe3eb;
  border-radius: 8px;
  background: #fff;
}

@media (max-width: 1100px) {
  .coach-home-hero {
    grid-template-columns: minmax(220px, 1fr) minmax(260px, 1fr);
  }

  .coach-home-hero-period {
    grid-column: 1 / -1;
    grid-template-columns: auto repeat(2, minmax(0, 1fr));
    align-items: center;
    justify-items: start;
    margin-top: 17px;
    padding: 14px 0 0;
    border-top: 1px solid rgb(20 125 111 / 13%);
  }

  .coach-home-hero .coach-home-coverage-note {
    position: static;
    grid-column: 1 / -1;
    max-width: none;
    margin-top: 3px;
    text-align: left;
  }

  .coach-home-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .coach-home-lifecycle {
    grid-template-columns: repeat(5, minmax(120px, 1fr));
    overflow-x: auto;
  }

  .coach-home-lifecycle-flow {
    grid-template-columns: minmax(132px, 1fr) 42px minmax(132px, 1fr) 42px minmax(132px, 1fr) 42px minmax(132px, 1fr) 42px minmax(132px, 1fr);
    width: 100%;
    min-width: 0;
    padding-bottom: 7px;
    overflow-x: auto;
  }

}

@media (max-width: 720px) {
  .coach-home-page {
    gap: 16px;
  }

  .coach-home-section {
    padding: 16px;
    border-radius: 13px;
  }

  .coach-home-filter-summary {
    align-items: flex-start;
    flex-direction: column;
    padding: 13px;
  }

  .coach-home-filter-summary p {
    display: grid;
    gap: 1px;
  }

  .coach-home-filter-summary p strong {
    white-space: normal;
  }

  .coach-home-filter-actions {
    width: 100%;
  }

  .coach-home-filter-toggle,
  .coach-home-filter-actions .coach-home-refresh {
    flex: 1 1 0;
  }

  .coach-home-filter-panel {
    padding: 16px;
  }

  .coach-home-filter-panel-heading {
    align-items: flex-start;
  }

  .coach-home-control-row,
  .coach-home-selector,
  .coach-home-rhythm-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .coach-home-refresh {
    width: 100%;
  }

  .coach-home-selector > div:first-child {
    flex: auto;
  }

  .coach-home-selector > select {
    width: 100%;
    min-width: 0;
  }

  .coach-home-hero {
    grid-template-columns: 1fr;
    padding: 20px;
    border-radius: 15px;
  }

  .coach-home-hero-facts {
    border-top: 1px solid rgb(20 125 111 / 13%);
    border-right: 0;
    border-left: 0;
    margin-top: 17px;
    padding-top: 16px;
  }

  .coach-home-hero-facts div {
    padding: 0;
  }

  .coach-home-hero-period {
    grid-column: auto;
    grid-template-columns: 1fr 1fr;
  }

  .coach-home-hero-status {
    grid-column: 1 / -1;
  }

  .coach-home-hero .coach-home-coverage-note {
    grid-column: 1 / -1;
  }

  .coach-home-kpis,
  .coach-home-behavior-grid {
    grid-template-columns: 1fr;
  }

  .coach-home-section-heading {
    align-items: flex-start;
  }

  .coach-home-section-heading--numbered {
    align-items: stretch;
    flex-direction: column;
  }

  .coach-home-insight-chip {
    align-self: flex-start;
    min-height: 28px;
    white-space: normal;
  }

  .coach-home-definition-toggle {
    max-width: 110px;
    text-align: right;
  }

  .coach-home-definitions dl {
    grid-template-columns: 1fr;
  }

  .coach-home-lifecycle {
    grid-template-columns: repeat(5, minmax(128px, 1fr));
  }

  .coach-home-lifecycle-flow {
    width: 100%;
    min-width: 0;
    grid-template-columns: repeat(5, minmax(146px, 1fr));
    gap: 10px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
  }

  .coach-home-lifecycle-stage {
    min-height: 118px;
    scroll-snap-align: start;
  }

  .coach-home-lifecycle-connector {
    display: none;
  }

  .coach-home-completion-summary {
    grid-template-columns: 1fr;
    gap: 15px;
    min-height: 0;
  }

  .coach-home-completion-facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .coach-home-completion-facts div {
    display: grid;
    justify-content: stretch;
    gap: 3px;
    padding: 11px;
    border: 1px solid #eee7db;
    border-radius: 9px;
  }

  .coach-home-frequency-controls {
    justify-content: flex-start;
  }

  .coach-home-frequency-facts {
    grid-template-columns: 1fr;
  }

  .coach-home-rhythm-section .coach-home-rhythm-heading {
    align-items: stretch;
  }

  .coach-home-rhythm-section .coach-home-date-pair {
    width: 100%;
  }

  .coach-home-rhythm-section .coach-home-date-pair input {
    min-width: 0;
    flex: 1 1 0;
  }

  .coach-home-rhythm-visual {
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
  }

  .coach-home-modal-layer {
    align-items: end;
    padding: 8px 8px 0;
  }

  .coach-home-modal {
    width: 100%;
    max-height: calc(100dvh - 8px);
    border-radius: 16px 16px 0 0;
  }

  .coach-home-modal > header,
  .coach-home-modal-toolbar,
  .coach-home-modal footer {
    padding-right: 14px;
    padding-left: 14px;
  }

  .coach-home-modal-table {
    margin: 0 14px;
  }

  .coach-home-modal-toolbar {
    display: grid;
    gap: 7px;
  }

  .coach-home-modal-toolbar label,
  .coach-home-modal-toolbar input {
    width: 100%;
  }

  .coach-home-modal-toolbar > span {
    white-space: normal;
  }
}

.schedule-problem-progress {
  display: grid;
  gap: 18px;
}

.schedule-preview-expired {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.schedule-preview-expired span {
  flex: 1 1 360px;
  color: var(--text-soft);
}

.schedule-progress-metrics,
.schedule-problem-workbench__metrics {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.schedule-problem-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.schedule-problem-summary__item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 12px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px 14px;
  background: var(--panel);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.schedule-problem-summary__item:hover {
  border-color: rgba(20, 125, 111, 0.35);
  background: rgba(20, 125, 111, 0.025);
}

.schedule-problem-summary__item span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 650;
}

.schedule-problem-summary__item strong {
  font-size: 15px;
}

.schedule-problem-summary__item small {
  grid-column: 1 / -1;
  color: var(--muted);
}

.schedule-processed-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.schedule-processed-summary > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  color: var(--text-soft);
  font-size: 13px;
}

.schedule-processed-summary strong {
  color: var(--text);
}

.schedule-problem-workbench {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  width: min(1180px, calc(100vw - 32px));
  max-height: 92dvh;
  overflow: hidden;
  border-radius: 16px;
}

.schedule-problem-workbench__head {
  background: var(--panel);
}

.schedule-problem-workbench__head p {
  margin-bottom: 0;
}

.schedule-problem-workbench__metrics {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 10px 16px;
  background: #f8fafc;
}

.schedule-problem-workbench__metrics .import-batch-summary__item {
  min-height: 62px;
  padding: 9px 11px;
}

.schedule-problem-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  padding: 8px 12px;
  scrollbar-width: thin;
}

.schedule-problem-tabs button {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  border: 0;
  border-radius: 9px;
  padding: 8px 10px;
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
}

.schedule-problem-tabs button:hover,
.schedule-problem-tabs button.is-active {
  background: rgba(20, 125, 111, 0.08);
  color: var(--primary);
}

.schedule-problem-tabs strong {
  min-width: 22px;
  border-radius: 999px;
  padding: 2px 6px;
  background: rgba(15, 23, 42, 0.06);
  font-size: 11px;
  text-align: center;
}

.schedule-problem-workbench__body {
  display: grid;
  align-content: start;
  min-height: 0;
  gap: 12px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 14px 16px 18px;
}

.schedule-problem-list {
  display: grid;
  gap: 10px;
}

.schedule-problem-item {
  display: grid;
  min-width: 0;
  gap: 12px;
  border-radius: 12px;
  padding: 14px;
}

.schedule-problem-item.is-selected {
  border-color: rgba(20, 125, 111, 0.42);
  background: rgba(20, 125, 111, 0.035);
}

.schedule-problem-item.is-processed {
  opacity: 0.86;
}

.schedule-problem-item__identity {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.schedule-problem-item__identity input {
  width: 17px;
  height: 17px;
  accent-color: var(--primary);
}

.schedule-problem-item__identity > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.schedule-problem-item__identity strong {
  overflow-wrap: anywhere;
}

.schedule-problem-item__identity span,
.schedule-problem-item__identity small {
  color: var(--muted);
}

.schedule-candidate-list {
  display: grid;
  gap: 7px;
}

.schedule-candidate-list > small {
  color: var(--muted);
  font-weight: 700;
}

.schedule-candidate-list .picker-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: default;
}

.schedule-candidate-list .picker-result > span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.schedule-candidate-list .picker-result small {
  color: var(--muted);
}

.schedule-problem-item__actions {
  align-items: center;
}

@media (max-width: 900px) {
  .schedule-progress-metrics,
  .schedule-problem-workbench__metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .schedule-problem-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .schedule-problem-progress > .section-heading,
  .schedule-processed-summary {
    align-items: stretch;
  }

  .schedule-problem-progress > .section-heading .primary-button,
  .schedule-processed-summary .ghost-button,
  .schedule-preview-expired .ghost-button {
    width: 100%;
  }

  .schedule-progress-metrics,
  .schedule-problem-workbench__metrics,
  .schedule-problem-summary {
    grid-template-columns: 1fr 1fr;
  }

  .schedule-problem-workbench {
    width: 100%;
    max-height: calc(100dvh - 12px);
    border-radius: 12px;
  }

  .schedule-problem-workbench__head {
    padding: 13px;
  }

  .schedule-problem-workbench__metrics {
    padding: 8px 10px;
  }

  .schedule-problem-tabs {
    padding: 7px 8px;
  }

  .schedule-problem-workbench__body {
    padding: 10px;
  }

  .schedule-candidate-list .picker-result {
    align-items: stretch;
    flex-direction: column;
  }

  .schedule-candidate-list .picker-result button,
  .schedule-problem-item__actions button {
    width: 100%;
  }
}

/* Stage 6C-1B: calm, decision-first coach analysis. */
.content:has(.coach-analysis-page) {
  background: #f8fafc;
}

.coach-analysis-page {
  min-width: 0;
  min-height: 100%;
  padding-bottom: 20px;
  background: #f8fafc;
}

.coach-analysis-page .page-header {
  align-items: flex-start;
  margin-bottom: 18px;
}

.coach-analysis-page .page-header-copy {
  flex: 0 1 auto;
  max-width: none;
}

.coach-analysis-page .page-title {
  color: #172033;
  font-size: clamp(26px, 2.2vw, 34px);
  font-weight: 760;
  letter-spacing: -0.025em;
}

.coach-analysis-page .page-desc {
  margin-top: 7px;
  color: #718096;
  font-size: 14px;
}

.coach-filter-bar {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-bottom: 18px;
  border: 1px solid #e3e8ef;
  border-radius: 14px;
  padding: 10px 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(30, 41, 59, 0.03);
}

.coach-filter-group,
.coach-custom-dates,
.coach-history-toggle {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.coach-date-filter {
  flex: 0 1 auto;
}

.coach-filter-label {
  flex: 0 0 auto;
  color: #718096;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.coach-segmented {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 2px;
  border: 1px solid #e6eaf0;
  border-radius: 10px;
  padding: 3px;
  background: #f8fafc;
}

.coach-segment-button {
  min-height: 30px;
  border: 0;
  border-radius: 7px;
  padding: 0 9px;
  background: transparent;
  color: #687386;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}

.coach-segment-button:hover,
.coach-segment-button:focus-visible {
  color: #172033;
  outline: none;
}

.coach-segment-button.is-active {
  background: #fff;
  box-shadow: 0 1px 3px rgba(30, 41, 59, 0.1);
  color: #172033;
  font-weight: 700;
}

.coach-segment-button.is-disabled {
  box-shadow: none;
  color: #a8b1bf;
  cursor: not-allowed;
}

.coach-custom-dates {
  color: #94a3b8;
  font-size: 12px;
}

.coach-custom-date-control {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.coach-custom-date-error {
  color: #b7791f;
  font-size: 10px;
  line-height: 1.25;
}

.coach-custom-dates input {
  width: 128px;
  min-height: 34px;
  border: 1px solid #dfe5ed;
  border-radius: 8px;
  padding: 0 8px;
  background: #fff;
  color: #334155;
  font-size: 12px;
}

.coach-custom-dates input:focus {
  border-color: #8db4ad;
  outline: 2px solid rgba(20, 125, 111, 0.1);
}

.coach-history-toggle {
  flex: 0 0 auto;
  color: #586579;
  font-size: 12px;
  white-space: nowrap;
}

.coach-history-toggle input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: #2f756b;
}

.coach-refresh-button {
  display: inline-flex;
  min-height: 36px;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  border: 1px solid #dbe2e9;
  border-radius: 9px;
  padding: 0 12px;
  background: #fff;
  color: #263548;
  font-size: 12px;
  font-weight: 650;
}

.coach-refresh-button:hover,
.coach-refresh-button:focus-visible {
  border-color: #a7b8c4;
  background: #f8fafc;
  outline: none;
}

.coach-period-meta {
  display: flex;
  min-width: 0;
  flex: 1 0 100%;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 18px;
  border-top: 1px solid #edf0f3;
  padding: 8px 2px 0;
  color: #7b8798;
  font-size: 11px;
}

.coach-period-meta strong {
  color: #526174;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}

.coach-core-grid {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 34px;
}

.coach-core-card {
  display: flex;
  min-width: 0;
  min-height: 146px;
  align-items: flex-start;
  gap: 14px;
  border: 1px solid #e3e8ef;
  border-radius: 16px;
  padding: 20px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(30, 41, 59, 0.035);
}

.coach-core-icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border-radius: 10px;
  background: #f1f5f5;
  font-size: 17px;
}

.coach-core-card > div:last-child {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.coach-core-card p {
  margin: 1px 0 5px;
  color: #687386;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.4;
}

.coach-core-card strong {
  color: #172033;
  font-size: clamp(28px, 2.7vw, 38px);
  font-variant-numeric: tabular-nums;
  font-weight: 760;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.coach-core-card span {
  color: #8a96a8;
  font-size: 12px;
}

.coach-core-card small {
  color: #9aa5b4;
  font-size: 10px;
  line-height: 1.35;
}

.coach-section {
  display: grid;
  min-width: 0;
  gap: 14px;
  margin-top: 34px;
}

.coach-section-heading {
  display: flex;
  min-width: 0;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.coach-section-heading h2,
.coach-section-heading p {
  margin: 0;
}

.coach-section-heading h2 {
  color: #202b3c;
  font-size: 19px;
  font-weight: 730;
  letter-spacing: -0.012em;
}

.coach-section-heading p {
  margin-top: 4px;
  color: #8a96a8;
  font-size: 12px;
}

.coach-chart-grid,
.coach-detail-charts {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.coach-chart-card,
.coach-comparison-card,
.coach-detail-shell,
.coach-heatmap-card {
  min-width: 0;
  border: 1px solid #e3e8ef;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(30, 41, 59, 0.025);
}

.coach-chart-card {
  overflow: visible;
  padding: 18px 18px 14px;
}

.coach-chart-card h3,
.coach-card-heading h3 {
  margin: 0;
  color: #334155;
  font-size: 14px;
  font-weight: 700;
}

.coach-chart-heading p {
  margin: 4px 0 0;
  color: #8a96a8;
  font-size: 11px;
  line-height: 1.45;
}

.coach-vertical-chart {
  display: grid;
  height: 228px;
  min-width: 0;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: clamp(6px, 1.2vw, 14px);
  align-items: end;
  margin-top: 16px;
  border-bottom: 1px solid #e6ebf0;
  padding: 12px 4px 0;
}

.coach-vertical-item {
  position: relative;
  display: grid;
  height: 100%;
  min-width: 0;
  grid-template-rows: minmax(0, 1fr) 29px;
  gap: 0;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
}

.coach-vertical-item:focus-visible {
  border-radius: 6px;
  outline: 2px solid rgba(47, 117, 107, 0.25);
  outline-offset: 2px;
}

.coach-vertical-track {
  position: relative;
  display: block;
  min-width: 0;
  height: 100%;
}

.coach-vertical-fill {
  position: absolute;
  right: 16%;
  bottom: 0;
  left: 16%;
  height: var(--bar-height);
  border-radius: 5px 5px 2px 2px;
  background: #5e8f87;
  transition: height 0.16s ease, background 0.16s ease;
}

.coach-vertical-item:hover .coach-vertical-fill,
.coach-vertical-item:focus-visible .coach-vertical-fill {
  background: #336f66;
}

.coach-axis-label {
  display: grid;
  min-width: 0;
  place-items: center;
  color: #7d8999;
  font-size: 11px;
  white-space: nowrap;
}

.coach-chart-tooltip {
  position: absolute;
  bottom: calc(var(--bar-height, 50%) + 34px);
  left: 50%;
  z-index: 5;
  display: none;
  width: 148px;
  gap: 6px;
  border: 1px solid #dce3e9;
  border-radius: 10px;
  padding: 9px 10px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(30, 41, 59, 0.13);
  color: #64748b;
  pointer-events: none;
  transform: translateX(-50%);
}

.coach-vertical-item:first-child .coach-chart-tooltip {
  left: 0;
  transform: none;
}

.coach-vertical-item:last-child .coach-chart-tooltip {
  right: 0;
  left: auto;
  transform: none;
}

.coach-vertical-item:hover .coach-chart-tooltip,
.coach-vertical-item:focus-visible .coach-chart-tooltip {
  display: grid;
}

.coach-chart-tooltip > span {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
}

.coach-chart-tooltip b {
  font-weight: 500;
}

.coach-chart-tooltip strong {
  color: #263548;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
}

.coach-comparison-grid {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(340px, 0.85fr) minmax(550px, 1.4fr);
  gap: 14px;
  align-items: stretch;
}

.coach-comparison-card {
  padding: 16px;
}

.coach-card-heading {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.coach-card-heading > span {
  color: #94a3b8;
  font-size: 11px;
  white-space: nowrap;
}

.coach-metric-switch {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 2px;
  border: 1px solid #e6eaf0;
  border-radius: 9px;
  padding: 2px;
  background: #f8fafc;
}

.coach-metric-switch .coach-segment-button {
  min-height: 27px;
  padding: 0 8px;
  font-size: 11px;
}

.coach-horizontal-bars {
  display: grid;
  max-height: 432px;
  gap: 3px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.coach-horizontal-row {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(76px, 108px) minmax(90px, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 8px;
  padding: 7px 8px;
  background: transparent;
  color: #334155;
  text-align: left;
}

.coach-horizontal-row:hover,
.coach-horizontal-row:focus-visible,
.coach-horizontal-row.is-selected {
  background: #f5f8f8;
  outline: none;
}

.coach-horizontal-row.is-selected {
  box-shadow: inset 2px 0 0 #5e8f87;
}

.coach-horizontal-name {
  overflow: hidden;
  font-size: 12px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.coach-horizontal-track {
  display: block;
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf1f3;
}

.coach-horizontal-track > span {
  display: block;
  width: var(--bar-width);
  height: 100%;
  border-radius: inherit;
  background: #6f9892;
}

.coach-horizontal-row.is-sample-insufficient .coach-horizontal-track > span {
  background: #aeb9bc;
  opacity: 0.58;
}

.coach-horizontal-row.is-sample-insufficient .coach-horizontal-name,
.coach-horizontal-row.is-sample-insufficient strong {
  color: #8994a3;
  font-weight: 550;
}

.coach-horizontal-row strong {
  color: #425267;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  white-space: nowrap;
}

.coach-analysis-table-wrap {
  width: 100%;
  max-height: 432px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.coach-table-sample-note {
  margin: -4px 0 10px;
  color: #8a96a8;
  font-size: 10px;
  line-height: 1.5;
}

.coach-analysis-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.coach-analysis-table th,
.coach-analysis-table td {
  border-bottom: 1px solid #edf0f3;
  padding: 10px 7px;
  color: #526174;
  font-size: 11px;
  line-height: 1.35;
  text-align: left;
  vertical-align: middle;
}

.coach-analysis-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff;
  color: #8995a5;
  font-size: 10px;
  font-weight: 650;
}

.coach-analysis-table th:first-child {
  width: 18%;
}

.coach-analysis-table th:last-child {
  width: 11%;
}

.coach-analysis-table tbody tr:hover td,
.coach-analysis-table tbody tr.is-selected td {
  background: #f7f9f9;
}

.coach-analysis-table td:first-child button {
  max-width: 100%;
  overflow: hidden;
  border: 0;
  padding: 0;
  background: transparent;
  color: #263548;
  font-size: 12px;
  font-weight: 700;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.coach-analysis-table td:first-child button:hover,
.coach-analysis-table td:first-child button:focus-visible {
  color: #2f756b;
  outline: none;
}

.coach-sample-pill {
  display: inline-flex;
  border: 1px solid #dfe5ea;
  border-radius: 999px;
  padding: 3px 7px;
  background: #f7f8fa;
  color: #6b7789;
  font-size: 10px;
  font-weight: 650;
  white-space: nowrap;
}

.coach-sample-pill.is-sufficient {
  border-color: #c7ddd8;
  background: #eef7f4;
  color: #397267;
}

.coach-sample-pill.is-limited {
  border-color: #ead9ad;
  background: #fff9e9;
  color: #8a6b16;
}

.coach-sample-pill.is-insufficient {
  border-color: #dfe5ea;
  background: #f4f6f8;
  color: #788495;
}

.coach-no-data-details {
  margin-top: 10px;
  border-top: 1px solid #edf0f3;
  padding-top: 9px;
}

.coach-no-data-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #697689;
  cursor: pointer;
  font-size: 11px;
  font-weight: 650;
  list-style: none;
}

.coach-no-data-details summary::-webkit-details-marker {
  display: none;
}

.coach-no-data-details summary > span {
  color: #94a3b8;
  font-size: 10px;
  font-weight: 500;
}

.coach-no-data-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 9px;
}

.coach-no-data-list button {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid #e7ebef;
  border-radius: 8px;
  padding: 8px 9px;
  background: #fafbfc;
  color: #7b8798;
  text-align: left;
}

.coach-no-data-list button:hover,
.coach-no-data-list button:focus-visible,
.coach-no-data-list button.is-selected {
  border-color: #c9d8d5;
  background: #f5f8f8;
  outline: none;
}

.coach-no-data-list strong {
  min-width: 0;
  overflow: hidden;
  color: #5f6d80;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.coach-no-data-list span {
  flex: 0 0 auto;
  color: #9aa5b3;
  font-size: 9px;
  white-space: nowrap;
}

.coach-detail-shell {
  display: grid;
  gap: 14px;
  margin-top: 4px;
  padding: 18px;
  scroll-margin-top: 132px;
}

.coach-detail-heading {
  position: sticky;
  top: 116px;
  z-index: 4;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin: -18px -18px 0;
  border-bottom: 1px solid #e7ebef;
  border-radius: 16px 16px 0 0;
  padding: 13px 18px 11px;
  background: rgba(255, 255, 255, 0.97);
}

.coach-detail-heading span {
  color: #94a3b8;
  font-size: 11px;
  font-weight: 650;
}

.coach-detail-heading h3 {
  margin: 0;
  color: #202b3c;
  font-size: 17px;
  line-height: 1.5;
}

.coach-detail-close {
  min-height: 32px;
  border: 1px solid #e0e6ec;
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
  color: #687386;
  font-size: 11px;
}

.coach-detail-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.coach-detail-metrics article {
  display: grid;
  min-width: 0;
  gap: 7px;
  border: 1px solid #e8ecf1;
  border-radius: 12px;
  padding: 13px 14px;
  background: #fbfcfd;
}

.coach-detail-metrics span {
  color: #7f8b9c;
  font-size: 11px;
}

.coach-detail-metrics strong {
  color: #263548;
  font-size: 21px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.025em;
}

.coach-detail-metrics small {
  color: #9aa5b3;
  font-size: 10px;
  line-height: 1.4;
}

.coach-detail-charts .coach-chart-card {
  box-shadow: none;
}

.coach-heatmap-card {
  max-height: 300px;
  overflow: hidden;
  padding: 15px 16px 14px;
  box-shadow: none;
}

.coach-heatmap-card .coach-card-heading {
  margin-bottom: 10px;
}

.coach-heatmap {
  display: grid;
  min-width: 0;
  grid-template-columns: 28px repeat(7, minmax(0, 1fr));
  gap: 4px;
  align-items: center;
}

.coach-heatmap-column,
.coach-heatmap-row-label {
  display: grid;
  min-width: 0;
  place-items: center;
  color: #8592a3;
  font-size: 9px;
  line-height: 1.15;
  text-align: center;
}

.coach-heatmap-cell {
  display: grid;
  min-width: 0;
  height: 24px;
  place-items: center;
  border: 1px solid rgba(79, 118, 111, 0.08);
  border-radius: 5px;
  background: #f4f7f7;
  color: #6f7c8b;
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

.coach-heatmap-cell.level-1 {
  background: #e4efed;
}

.coach-heatmap-cell.level-2 {
  background: #c8deda;
}

.coach-heatmap-cell.level-3 {
  background: #93bbb4;
  color: #1f4c45;
}

.coach-heatmap-cell.level-4 {
  background: #5f948b;
  color: #fff;
}

.coach-request-error,
.coach-inline-error,
.coach-skeleton-panel,
.coach-detail-loading,
.coach-compact-empty {
  border: 1px solid #e1e7ed;
  border-radius: 12px;
  background: #fff;
}

.coach-request-error {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
}

.coach-request-error > div {
  display: grid;
  gap: 4px;
}

.coach-request-error strong {
  color: #334155;
  font-size: 14px;
}

.coach-request-error span,
.coach-inline-error {
  color: #7b8798;
  font-size: 12px;
}

.coach-request-error button {
  min-height: 34px;
  border: 1px solid #dce3e9;
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  color: #334155;
  font-size: 12px;
}

.coach-inline-error {
  margin-bottom: 12px;
  padding: 10px 12px;
  background: #fafbfc;
}

.coach-skeleton-card {
  display: grid;
  min-height: 146px;
  align-content: center;
  gap: 10px;
  border: 1px solid #e3e8ef;
  border-radius: 16px;
  padding: 20px;
  background: #fff;
}

.coach-skeleton-card span,
.coach-skeleton-card b,
.coach-skeleton-card i {
  display: block;
  border-radius: 6px;
  background: #edf1f4;
  animation: coach-soft-pulse 1.1s ease-in-out infinite alternate;
}

.coach-skeleton-card span {
  width: 42%;
  height: 12px;
}

.coach-skeleton-card b {
  width: 28%;
  height: 34px;
}

.coach-skeleton-card i {
  width: 54%;
  height: 10px;
}

.coach-skeleton-panel,
.coach-detail-loading {
  display: flex;
  min-height: 120px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: #718096;
  font-size: 12px;
}

.coach-loading-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #5e8f87;
  animation: coach-soft-pulse 0.8s ease-in-out infinite alternate;
}

.coach-compact-empty {
  display: grid;
  min-height: 140px;
  place-items: center;
  border-style: dashed;
  background: #fbfcfd;
  color: #8a96a8;
  font-size: 12px;
}

@keyframes coach-soft-pulse {
  from { opacity: 0.48; }
  to { opacity: 1; }
}

@media (max-width: 1180px) {
  .coach-filter-bar {
    flex-wrap: wrap;
  }

  .coach-refresh-button {
    margin-left: 0;
  }

  .coach-comparison-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .coach-analysis-page .page-header {
    margin-bottom: 14px;
  }

  .coach-core-grid {
    grid-template-columns: 1fr;
    margin-bottom: 28px;
  }

  .coach-core-card {
    min-height: 118px;
  }

  .coach-chart-grid,
  .coach-detail-charts {
    grid-template-columns: 1fr;
  }

  .coach-detail-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .coach-analysis-page .page-title {
    font-size: 27px;
  }

  .coach-filter-bar,
  .coach-filter-group,
  .coach-date-filter {
    width: 100%;
    align-items: flex-start;
  }

  .coach-filter-group,
  .coach-date-filter {
    flex-direction: column;
  }

  .coach-segmented {
    width: 100%;
    flex-wrap: wrap;
  }

  .coach-segment-button {
    flex: 1 1 auto;
  }

  .coach-custom-date-control,
  .coach-custom-dates {
    width: 100%;
  }

  .coach-custom-dates input {
    min-width: 0;
    flex: 1 1 0;
    width: auto;
  }

  .coach-history-toggle {
    min-height: 36px;
  }

  .coach-refresh-button {
    margin-left: auto;
  }

  .coach-core-card {
    padding: 17px;
  }

  .coach-vertical-chart {
    height: 210px;
    gap: 4px;
  }

  .coach-vertical-fill {
    right: 20%;
    left: 20%;
  }

  .coach-axis-label {
    font-size: 9px;
  }

  .coach-card-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .coach-metric-switch {
    width: 100%;
  }

  .coach-metric-switch .coach-segment-button {
    flex: 1 1 0;
  }

  .coach-analysis-table-wrap {
    max-height: none;
    overflow: visible;
  }

  .coach-analysis-table,
  .coach-analysis-table tbody,
  .coach-analysis-table tr,
  .coach-analysis-table td {
    display: block;
    width: 100%;
  }

  .coach-analysis-table thead {
    display: none;
  }

  .coach-analysis-table tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    border: 1px solid #e7ebef;
    border-radius: 11px;
    margin-bottom: 9px;
    padding: 4px 10px;
    background: #fff;
  }

  .coach-analysis-table tr.is-selected {
    border-color: #b9d0cc;
    background: #f6f9f8;
  }

  .coach-analysis-table td,
  .coach-analysis-table tbody tr:hover td,
  .coach-analysis-table tbody tr.is-selected td {
    display: flex;
    min-width: 0;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    border-bottom: 0;
    padding: 7px 4px;
    background: transparent;
  }

  .coach-analysis-table td::before {
    color: #94a3b8;
    content: attr(data-label);
    font-size: 9px;
  }

  .coach-analysis-table td:first-child {
    grid-column: 1 / -1;
    border-bottom: 1px solid #edf0f3;
  }

  .coach-analysis-table td:first-child::before {
    content: none;
  }

  .coach-analysis-table td:first-child button {
    font-size: 13px;
  }

  .coach-detail-shell {
    padding: 14px;
  }

  .coach-detail-heading {
    top: 112px;
    margin: -14px -14px 0;
    padding: 11px 14px 10px;
  }

  .coach-detail-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .coach-heatmap-card {
    padding: 12px 8px;
  }

  .coach-heatmap {
    grid-template-columns: 20px repeat(7, minmax(0, 1fr));
    gap: 3px;
  }

  .coach-heatmap-column,
  .coach-heatmap-row-label,
  .coach-heatmap-cell {
    font-size: 8px;
  }

  .coach-heatmap-cell {
    height: 23px;
  }

  .coach-no-data-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  body:has(.coach-analysis-page) .user-chip {
    display: none;
  }

  body:has(.coach-analysis-page) .topbar-title,
  body:has(.coach-analysis-page) .topbar .ghost-button {
    white-space: nowrap;
  }

  .coach-analysis-page .page-desc {
    max-width: 310px;
  }

  .coach-core-grid {
    gap: 10px;
  }

  .coach-section {
    margin-top: 28px;
  }

  .coach-chart-card,
  .coach-comparison-card {
    padding: 14px 12px;
  }

  .coach-horizontal-row {
    grid-template-columns: minmax(68px, 88px) minmax(72px, 1fr) auto;
    gap: 7px;
    padding-right: 2px;
    padding-left: 2px;
  }

  .coach-request-error {
    align-items: flex-start;
    flex-direction: column;
  }
}

.primary-button {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
  font-weight: 700;
}

.primary-button:hover {
  background: var(--primary-dark);
}

.ghost-button:hover,
.weak-button:hover,
.icon-button:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.small {
  min-height: 34px;
  padding: 0 10px;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  max-width: 180px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 12px;
  background: #f8fafc;
  color: var(--muted);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 1px 2px rgba(22, 34, 51, 0.04);
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
  min-width: 0;
}

.page-header-copy,
.page-header-controls,
.section-heading > div {
  min-width: 0;
}

.page-header-copy {
  flex: 1 1 420px;
  max-width: 780px;
}

.page-header-controls {
  display: flex;
  flex: 0 1 auto;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 10px;
}

.page-meta {
  margin-bottom: 6px;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 700;
}

.page-title {
  margin: 0;
  font-size: 24px;
  line-height: 1.3;
  letter-spacing: 0;
}

.page-desc {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.dashboard-header {
  align-items: center;
}

.dashboard-stack {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.dashboard-section {
  display: grid;
  gap: 12px;
  min-width: 0;
}

#member-list-results,
#risk-list-results,
#batch-list-results,
#preview-table-results {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
}

.section-heading h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0;
}

.section-heading p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.month-selector {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: flex-end;
  gap: 8px;
}

.month-selector label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.month-selector input {
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  min-height: 38px;
  padding: 0 10px;
  color: var(--text);
}

.month-selector input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(20, 125, 111, 0.12);
  outline: none;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

.metric-card {
  display: flex;
  min-height: 126px;
  flex-direction: column;
  justify-content: flex-start;
  padding: 16px;
}

.metric-card.is-primary {
  border-color: #c7ded9;
}

.metric-label {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.metric-value {
  margin-top: 8px;
  font-size: 30px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0;
}

.metric-hint {
  margin-top: auto;
  padding-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.more-metrics {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.more-metrics summary {
  padding: 12px 16px;
  color: var(--muted);
  cursor: pointer;
}

.mini-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 0 16px 16px;
}

.mini-metric-grid .metric-card {
  min-height: 92px;
  padding: 14px;
  box-shadow: none;
}

.mini-metric-grid .metric-value {
  margin-top: 6px;
  font-size: 20px;
}

.comparison-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.comparison-panel {
  padding: 16px;
}

.comparison-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.comparison-panel h3 {
  margin: 0;
  font-size: 17px;
}

.comparison-panel p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.comparison-list {
  display: grid;
  gap: 8px;
}

.comparison-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.comparison-name {
  font-weight: 700;
}

.comparison-sub {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.comparison-result {
  display: grid;
  justify-items: end;
  gap: 3px;
  min-width: 112px;
  font-weight: 750;
}

.comparison-result em {
  font-style: normal;
  font-weight: 600;
  font-size: 12px;
}

.comparison-result.positive {
  color: var(--primary-dark);
}

.comparison-result.negative {
  color: var(--danger);
}

.comparison-result.muted {
  color: var(--muted);
}

.comparison-rate {
  font-size: 13px;
}

.trend-card {
  padding: 16px;
  min-width: 0;
  max-width: 100%;
}

.trend-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.trend-tab {
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  min-height: 34px;
  padding: 0 12px;
  background: #fff;
  color: var(--muted);
}

.trend-tab.is-active,
.trend-tab:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.trend-scroll {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.trend-chart {
  display: block;
  min-width: 760px;
  width: 100%;
  height: auto;
}

.chart-grid {
  stroke: #e3e9f1;
  stroke-width: 1;
}

.chart-line {
  stroke: var(--primary);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-point {
  fill: #fff;
  stroke: var(--primary);
  stroke-width: 3;
}

.chart-point-group:focus {
  outline: none;
}

.chart-point-group:focus .chart-point,
.chart-point-group:hover .chart-point {
  fill: var(--primary);
}

.chart-tooltip {
  opacity: 0;
  pointer-events: none;
}

.chart-tooltip rect {
  fill: #1f2937;
}

.chart-tooltip text {
  fill: #fff;
  font-size: 11px;
}

.chart-point-group:focus .chart-tooltip,
.chart-point-group:hover .chart-tooltip {
  opacity: 1;
}

.chart-label {
  fill: var(--muted);
  font-size: 11px;
}

.state-card {
  padding: 24px;
}

.state-title {
  margin: 0;
  font-size: 18px;
}

.state-text {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.placeholder-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.placeholder-card {
  padding: 18px;
}

.placeholder-label {
  color: var(--muted);
  font-size: 13px;
}

.placeholder-value {
  margin-top: 8px;
  font-weight: 750;
}

.notice {
  border-left: 4px solid var(--primary);
  padding: 14px 16px;
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.error-box {
  border: 1px solid #f2b8b5;
  border-radius: 8px;
  padding: 14px;
  background: #fff3f2;
  color: var(--danger);
}

.basis-note {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 14px 16px;
  background: #fbfdff;
}

.basis-note div {
  display: grid;
  gap: 5px;
}

.basis-note strong {
  color: var(--text);
}

.basis-note span,
.muted-text,
.table-sub {
  color: var(--muted);
  font-size: 12px;
}

.table-scroll {
  overflow-x: auto;
  max-width: 100%;
  min-width: 0;
  scrollbar-width: thin;
}

.data-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  border-bottom: 1px solid var(--line);
  padding: 11px 14px;
  text-align: left;
  vertical-align: top;
  line-height: 1.45;
}

.data-table th {
  background: #f8fafc;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
}

.data-table tbody tr:hover td {
  background: #f5faf8;
}

.data-table tr.is-selected td {
  background: var(--primary-soft);
}

.data-table .primary-button.small,
.data-table .ghost-button.small {
  min-height: 32px;
  padding: 0 10px;
}

.coach-table-card {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.coach-table td {
  min-width: 116px;
}

.coach-table td:first-child {
  min-width: 150px;
}

.coach-management-notice {
  line-height: 1.7;
}

.coach-management-card {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.coach-management-table {
  min-width: 760px;
}

.coach-management-table td:first-child {
  min-width: 180px;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.coach-form-modal {
  max-width: 560px;
}

.link-button {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--primary-dark);
  font: inherit;
  font-weight: 800;
  text-align: left;
}

.link-button:hover {
  text-decoration: underline;
}

.coach-name-button {
  max-width: 160px;
  overflow-wrap: anywhere;
}

.rate-cell {
  display: grid;
  gap: 3px;
}

.rate-cell strong {
  font-size: 16px;
}

.rate-cell span {
  color: var(--muted);
  font-size: 12px;
}

.mini-comparison-stack {
  display: grid;
  gap: 5px;
  min-width: 120px;
}

.mini-comparison {
  display: inline-grid;
  gap: 2px;
  justify-items: start;
}

.mini-comparison strong {
  font-size: 13px;
}

.mini-comparison span,
.mini-comparison em {
  font-size: 11px;
  font-style: normal;
}

.mini-comparison.positive {
  color: var(--primary-dark);
}

.mini-comparison.negative {
  color: var(--danger);
}

.mini-comparison.muted {
  color: var(--muted);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-list.is-compact {
  max-width: 260px;
}

.tag-detail {
  position: relative;
}

.tag-detail summary {
  list-style: none;
}

.tag-detail summary::-webkit-details-marker {
  display: none;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 8px;
  background: #fff;
  cursor: pointer;
  font-size: 12px;
  white-space: nowrap;
}

.tag-pill em {
  font-style: normal;
  color: var(--muted);
}

.tag-pill.success,
.tag-card.success {
  border-color: #badfd7;
  background: #f0fbf8;
  color: var(--primary-dark);
}

.tag-pill.info,
.tag-card.info {
  border-color: #cbd8e6;
  background: #f5f8fb;
}

.tag-pill.warning,
.tag-card.warning {
  border-color: #eed39b;
  background: #fff8e7;
  color: #8a5b00;
}

.tag-pill.critical,
.tag-card.critical {
  border-color: #f2b8b5;
  background: #fff3f2;
  color: var(--danger);
}

.tag-body {
  margin-top: 6px;
  width: min(320px, 70vw);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  box-shadow: var(--shadow);
  color: var(--text);
}

.tag-body p {
  margin: 0 0 8px;
  line-height: 1.6;
}

.tag-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.tag-card-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.tag-card-head span {
  color: var(--muted);
  font-size: 12px;
}

.tag-card p {
  margin: 8px 0;
  line-height: 1.7;
}

.evidence-list {
  display: grid;
  gap: 6px;
  margin: 0;
}

.evidence-list div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 8px;
}

.evidence-list dt {
  color: var(--muted);
  font-size: 12px;
}

.evidence-list dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.inline-warning {
  border-bottom: 1px solid var(--line);
  padding: 10px 14px;
  background: #fff8e7;
  color: #8a5b00;
}

.coach-detail-section {
  scroll-margin-top: 16px;
}

.coach-detail-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
}

.coach-detail-head h2 {
  margin: 0;
  font-size: 20px;
}

.coach-detail-head p {
  margin: 6px 0 0;
  color: var(--muted);
}

.scope-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.detail-metric .rate-cell strong {
  font-size: 28px;
}

.detail-two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 14px;
}

.detail-panel {
  padding: 16px;
}

.detail-panel h3 {
  margin: 0 0 12px;
  font-size: 17px;
}

.summary-list {
  display: grid;
  gap: 10px;
}

.summary-list p {
  margin: 0;
  line-height: 1.7;
}

.profile-list {
  display: grid;
  gap: 10px;
}

.profile-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.profile-row dt {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.profile-row dd {
  margin: 0;
  min-width: 0;
  color: var(--text);
  line-height: 1.6;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.profile-row.is-multiline dd {
  white-space: pre-wrap;
  word-break: break-word;
}

.member-list-card {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.member-list-card .data-table {
  min-width: 860px;
}

.pagination-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
}

.pagination-summary,
.pagination-page-size-text {
  color: var(--muted);
  font-size: 13px;
}

.pagination-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.pagination-size-control,
.pagination-jump-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.pagination-size-control select,
.pagination-jump-control input {
  height: 32px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
}

.pagination-size-control select {
  min-width: 66px;
  padding: 0 24px 0 8px;
}

.pagination-jump-control input {
  width: 62px;
  padding: 0 7px;
  text-align: center;
}

.pagination-size-control select:focus,
.pagination-jump-control input:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(20, 125, 111, 0.12);
}

.pagination-error {
  width: 100%;
  margin: 0;
  color: var(--danger);
  font-size: 12px;
  text-align: right;
}

.risk-chip {
  display: inline-flex;
  border-radius: 999px;
  padding: 4px 8px;
  background: #f5f8fb;
  color: var(--muted);
  font-size: 12px;
}

.risk-chip.medium {
  background: #fff8e7;
  color: #8a5b00;
}

.risk-chip.high,
.risk-chip.critical {
  background: #fff3f2;
  color: var(--danger);
}

.member-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-card {
  padding: 16px;
  box-shadow: none;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.filter-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.filter-actions {
  display: flex;
  align-items: end;
  gap: 8px;
}

.filter-actions > button {
  flex: 1 1 0;
}

.member-primary-filters {
  grid-template-columns: minmax(220px, 1.4fr) minmax(150px, 1fr) minmax(140px, 0.8fr) minmax(180px, 0.9fr);
}

.member-quick-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.filter-chip {
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 6px 10px;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
}

.filter-chip:hover,
.filter-chip.is-active {
  border-color: var(--primary);
  background: #f0f8f6;
  color: var(--primary-dark);
}

.filter-more,
.form-more-section {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.filter-more summary,
.form-more-section summary {
  width: fit-content;
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.filter-more-content,
.form-more-content {
  margin-top: 12px;
}

.purchase-range-field {
  min-width: 0;
  margin: 0;
  border: 0;
  padding: 0;
}

.purchase-range-field legend {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
}

.purchase-range-inputs {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) auto minmax(90px, 1fr);
  align-items: end;
  gap: 8px;
}

.filter-grid input,
.filter-grid select {
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  min-height: 38px;
  padding: 0 10px;
  background: #fff;
  color: var(--text);
}

.filter-grid input:focus,
.filter-grid select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(20, 125, 111, 0.12);
  outline: none;
}

.filter-note,
.table-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.table-note {
  border-bottom: 1px solid var(--line);
  padding: 10px 14px;
  background: #fbfdff;
}

.member-table-card {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.member-table,
.risk-table {
  min-width: 1180px;
}

.compact-table {
  min-width: 680px;
}

.member-name-button {
  max-width: 160px;
  overflow-wrap: anywhere;
}

.member-detail-section {
  scroll-margin-top: 16px;
}

.member-business-summary {
  min-width: 0;
  overflow: hidden;
}

.member-business-summary__primary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.member-summary-item {
  display: grid;
  align-content: start;
  gap: 5px;
  min-width: 0;
  border-left: 1px solid var(--line);
  padding: 15px 16px;
}

.member-summary-item:first-child {
  border-left: 0;
}

.member-summary-item.is-emphasized {
  background: #f2faf7;
}

.member-summary-item > span,
.member-summary-aux > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.member-summary-item > strong {
  min-width: 0;
  color: var(--text);
  font-size: 21px;
  font-variant-numeric: tabular-nums;
  overflow-wrap: break-word;
}

.member-summary-item.is-emphasized > strong {
  color: var(--primary-dark);
}

.member-summary-item > small,
.member-summary-aux > small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.member-business-summary__secondary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  background: #fbfcfd;
}

.member-summary-aux {
  display: grid;
  grid-template-columns: minmax(96px, auto) minmax(0, 1fr);
  align-items: baseline;
  gap: 4px 14px;
  min-width: 0;
  border-left: 1px solid var(--line);
  padding: 11px 16px;
}

.member-summary-aux:first-child {
  border-left: 0;
}

.member-summary-aux > strong {
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}

.member-summary-aux > small {
  grid-column: 2;
}

.member-summary-aux.is-warning > strong,
.member-summary-aux.is-warning > small {
  color: #95610b;
}

.member-data-context {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid var(--line);
  padding: 11px 16px;
}

.member-data-context > div {
  display: grid;
  gap: 3px;
}

.member-data-context strong {
  font-size: 13px;
}

.member-data-context span,
.member-data-context p,
.member-calculation-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.member-data-context p,
.member-calculation-note {
  margin: 0;
}

.member-data-context.is-warning {
  background: #fffaf0;
}

.member-data-context.is-warning strong,
.member-data-context.is-warning p {
  color: #84580a;
}

.member-data-context p {
  max-width: 460px;
}

.member-calculation-note {
  border-top: 1px solid var(--line);
  padding: 9px 16px;
  background: #f8fafc;
}

.risk-type-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.risk-type-list span {
  display: inline-flex;
  border-radius: 999px;
  padding: 3px 7px;
  background: #f5f8fb;
  color: var(--muted);
  font-size: 12px;
}

.reason-list {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 16px;
}

.reason-list li {
  line-height: 1.55;
}

.import-uploader-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  min-width: 0;
}

.import-uploader {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 16px;
}

.section-heading.compact h3 {
  margin: 0;
  font-size: 17px;
  letter-spacing: 0;
}

.section-heading.compact p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.upload-dropzone {
  display: grid;
  gap: 10px;
  min-width: 0;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  padding: 14px;
  background: #fbfdff;
}

.upload-dropzone input {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.upload-hint {
  display: grid;
  gap: 4px;
}

.upload-hint strong {
  overflow-wrap: anywhere;
}

.upload-hint span {
  color: var(--muted);
  font-size: 12px;
}

.upload-date-field {
  display: grid;
  gap: 6px;
}

.upload-date-field span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.upload-date-field input {
  width: 100%;
}

.form-actions,
.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.success-box,
.warning-box {
  border-radius: 8px;
  padding: 12px 14px;
  background: #eefbf6;
  color: var(--primary-dark);
}

.warning-box {
  background: #fff8e7;
  color: #8a5b00;
}

.error-box.compact,
.success-box.compact {
  margin-top: 0;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 3px 8px;
  background: #f5f8fb;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.status-pill.success {
  background: #eefbf6;
  color: var(--primary-dark);
}

.status-pill.warning,
.status-pill.medium,
.status-pill.high {
  background: #fff8e7;
  color: #8a5b00;
}

.status-pill.danger,
.status-pill.critical {
  background: #fff3f2;
  color: var(--danger);
}

.status-pill.muted,
.status-pill.info {
  background: #f5f8fb;
  color: var(--muted);
}

.import-table-card {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.import-table-card .table-scroll {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
}

.import-preview-scroll {
  overflow-x: auto;
  overflow-y: visible;
  padding: 0 0 8px;
  scroll-padding-inline: 0;
}

.import-scroll-hint {
  margin: 8px 14px 10px;
  color: var(--muted);
  font-size: 12px;
}

.import-preview-table {
  width: max-content;
  min-width: 100%;
  max-width: none;
  margin: 0;
  border-collapse: separate;
  border-spacing: 0;
}

.import-preview-table th,
.import-preview-table td {
  white-space: nowrap;
}

.purchase-preview-table {
  min-width: 1280px;
}

.class-schedule-preview-table {
  min-width: 2060px;
  table-layout: fixed;
}

.import-preview-table .import-col-row {
  width: 72px;
  min-width: 72px;
  max-width: 72px;
}

.import-preview-table .import-col-member {
  width: 160px;
  min-width: 160px;
  max-width: 160px;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.class-schedule-preview-table th:nth-child(2),
.class-schedule-preview-table td:nth-child(2) {
  width: 120px;
}

.class-schedule-preview-table th:nth-child(3),
.class-schedule-preview-table td:nth-child(3) {
  width: 96px;
}

.class-schedule-preview-table th:nth-child(4),
.class-schedule-preview-table td:nth-child(4) {
  width: 220px;
}

.class-schedule-preview-table th:nth-child(5),
.class-schedule-preview-table td:nth-child(5) {
  width: 160px;
}

.class-schedule-preview-table th:nth-child(6),
.class-schedule-preview-table td:nth-child(6) {
  width: 140px;
}

.class-schedule-preview-table th:nth-child(7),
.class-schedule-preview-table td:nth-child(7),
.class-schedule-preview-table th:nth-child(8),
.class-schedule-preview-table td:nth-child(8) {
  width: 140px;
}

.class-schedule-preview-table th:nth-child(9),
.class-schedule-preview-table td:nth-child(9),
.class-schedule-preview-table th:nth-child(10),
.class-schedule-preview-table td:nth-child(10),
.class-schedule-preview-table th:nth-child(11),
.class-schedule-preview-table td:nth-child(11) {
  width: 110px;
}

.import-format-note {
  width: fit-content;
  max-width: 100%;
  margin: 10px 0;
  padding: 7px 10px;
  border: 1px solid #cfe5dc;
  background: #f3faf7;
  color: var(--text);
  font-size: 13px;
}

.import-batch-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.import-batch-summary__item {
  min-width: 0;
  min-height: 76px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-left: 3px solid #cbd5e1;
  border-radius: 6px;
  background: var(--panel);
}

.import-batch-summary__item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.import-batch-summary__item strong {
  display: block;
  margin-top: 4px;
  font-size: 25px;
  font-weight: 750;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.import-batch-summary__item--success {
  border-left-color: var(--primary);
}

.import-batch-summary__item--warning {
  border-left-color: #d97706;
}

.import-batch-summary__item--danger {
  border-left-color: #dc2626;
}

.import-batch-summary--member {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.member-summary-change-section {
  margin: 4px 0 12px;
}

.member-summary-change-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.member-summary-change-item {
  display: flex;
  min-width: 150px;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-left: 3px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
}

.member-summary-change-item span {
  color: var(--muted);
  font-size: 12px;
}

.member-summary-change-item strong {
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

.member-summary-change-item small {
  margin-left: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.member-summary-change-item--danger {
  border-left-color: #dc2626;
}

.import-problem-section {
  margin-bottom: 12px;
}

.import-problem-section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.import-problem-section__head h3 {
  margin: 0;
  font-size: 15px;
}

.import-problem-section__head span {
  color: var(--muted);
  font-size: 12px;
}

.import-problem-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.import-problem-card {
  display: flex;
  min-width: 0;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #f0c98d;
  border-radius: 6px;
  background: #fffbf5;
}

.import-problem-card__label {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.import-problem-card strong {
  display: block;
  margin-top: 2px;
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}

.import-problem-card strong small {
  margin-left: 3px;
  font-size: 12px;
  font-weight: 600;
}

.import-problem-card p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.import-group-resolver {
  min-width: 0;
}

.import-group-heading {
  margin-bottom: 12px;
}

.import-member-import-hint,
.import-course-suggestion-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.import-member-import-hint p {
  margin: 3px 0 0;
}

.import-group-result-meta {
  margin: 8px 0;
  color: var(--muted);
  font-size: 13px;
}

.import-member-group-list,
.import-course-group-list,
.import-status-group-list {
  display: grid;
  gap: 8px;
}

.import-member-group-item {
  display: grid;
  grid-template-columns: minmax(150px, 0.75fr) minmax(0, 2fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 96px;
  padding: 12px 14px;
  box-shadow: none;
}

.import-member-group-item__identity strong,
.import-member-group-item__identity span,
.import-member-group-item__identity small {
  display: block;
}

.import-member-group-item__identity strong {
  font-size: 16px;
}

.import-member-group-item__identity span,
.import-member-group-item__identity small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.import-group-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.import-group-facts div {
  min-width: 0;
}

.import-group-facts dt {
  color: var(--muted);
  font-size: 11px;
}

.import-group-facts dd {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
  font-size: 13px;
}

.import-group-actions {
  display: flex;
  max-width: 250px;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.import-course-group-item {
  display: grid;
  grid-template-columns: minmax(220px, 1.6fr) minmax(100px, 0.6fr) minmax(150px, 0.7fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  box-shadow: none;
}

.import-course-group-item__name strong,
.import-course-group-item__name span,
.import-course-group-item__suggestion span,
.import-course-group-item__suggestion strong {
  display: block;
}

.import-course-group-item__name strong {
  overflow-wrap: anywhere;
}

.import-course-group-item__name span,
.import-course-group-item__suggestion span,
.import-course-type-select span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.import-course-type-select {
  min-width: 0;
}

.import-course-save-mapping {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}

.import-course-save-mapping input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.course-mapping-filters {
  margin-top: 16px;
}

.course-mapping-card {
  margin-top: 16px;
  overflow: hidden;
}

.course-mapping-table {
  min-width: 880px;
}

.course-mapping-table th:first-child,
.course-mapping-table td:first-child {
  min-width: 240px;
  white-space: normal;
  word-break: break-word;
}

.course-mapping-pagination {
  flex-wrap: wrap;
  justify-content: flex-end;
  padding: 12px 16px;
}

.course-mapping-pagination label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.course-mapping-pagination select {
  min-width: 72px;
}

.course-mapping-modal {
  width: min(680px, calc(100vw - 32px));
}

.member-table {
  min-width: 1160px;
}

.member-table th:nth-child(3),
.member-table td:nth-child(3) {
  white-space: nowrap;
  min-width: 110px;
}

.table-secondary {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.action-menu {
  position: relative;
}

.action-menu > summary {
  display: inline-flex;
  align-items: center;
  list-style: none;
  cursor: pointer;
}

.action-menu > summary::-webkit-details-marker {
  display: none;
}

.action-menu-popover {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  right: 0;
  display: grid;
  min-width: 150px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 5px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.14);
}

.action-menu-popover button {
  border: 0;
  border-radius: 4px;
  padding: 8px 10px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.action-menu-popover button:hover {
  background: #f5f8fb;
}

.action-menu-popover .danger-text {
  color: var(--danger);
}

.member-table .action-menu-popover {
  position: static;
  margin-top: 6px;
  box-shadow: none;
}

@media (max-width: 720px) {
  .course-mapping-pagination {
    justify-content: flex-start;
  }

  .import-course-save-mapping {
    width: 100%;
  }
}

.import-course-type-select select {
  width: 100%;
  min-width: 0;
  margin-top: 4px;
}

.import-status-group-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  box-shadow: none;
}

.import-status-group-item strong,
.import-status-group-item span {
  display: block;
}

.import-status-group-item span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.class-schedule-preview-table .import-notes-col,
.class-schedule-preview-table .import-notes-cell {
  width: 360px;
}

.class-schedule-preview-table .import-actions-col,
.class-schedule-preview-table .import-actions-cell {
  width: 260px;
}

.import-notes-cell {
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.import-preview-table .import-actions-col,
.import-preview-table .import-actions-cell {
  width: 260px;
  min-width: 260px;
  max-width: 260px;
}

.import-preview-table .is-sticky-left,
.import-preview-table .is-sticky-left-2,
.import-preview-table .is-sticky-right {
  position: sticky;
  background: #fff;
  z-index: 3;
}

.import-preview-table .is-sticky-left {
  left: 0;
  box-shadow: 1px 0 0 var(--line);
}

.import-preview-table .is-sticky-left-2 {
  left: 72px;
  box-shadow: 1px 0 0 var(--line);
}

.import-preview-table .is-sticky-right {
  right: 0;
  box-shadow: -1px 0 0 var(--line);
}

.import-preview-table thead .is-sticky-left,
.import-preview-table thead .is-sticky-left-2,
.import-preview-table thead .is-sticky-right {
  background: #f8fafc;
  z-index: 5;
}

.member-summary-preview-table {
  width: 1960px;
  min-width: 1960px;
  table-layout: fixed;
}

.member-summary-preview-table th,
.member-summary-preview-table td {
  white-space: nowrap;
}

.member-summary-preview-table th:nth-child(1),
.member-summary-preview-table td:nth-child(1) {
  width: 72px;
}

.member-summary-preview-table th:nth-child(2),
.member-summary-preview-table td:nth-child(2) {
  width: 160px;
  min-width: 160px;
}

.member-summary-preview-table th:nth-child(3),
.member-summary-preview-table td:nth-child(3) {
  width: 110px;
}

.member-summary-preview-table th:nth-child(4),
.member-summary-preview-table td:nth-child(4) {
  width: 96px;
}

.member-summary-preview-table th:nth-child(5),
.member-summary-preview-table td:nth-child(5) {
  width: 56px;
}

.member-summary-preview-table th:nth-child(6),
.member-summary-preview-table td:nth-child(6) {
  width: 100px;
}

.member-summary-preview-table th:nth-child(7),
.member-summary-preview-table td:nth-child(7) {
  width: 84px;
}

.member-summary-preview-table th:nth-child(8),
.member-summary-preview-table td:nth-child(8) {
  width: 74px;
}

.member-summary-preview-table th:nth-child(9),
.member-summary-preview-table td:nth-child(9) {
  width: 96px;
}

.member-summary-preview-table .member-summary-renewal-col {
  white-space: normal;
  line-height: 1.35;
}

.member-summary-preview-table .member-summary-renewal-col .table-sub {
  display: block;
  margin-top: 2px;
  white-space: nowrap;
}

.member-summary-preview-table th:nth-child(10),
.member-summary-preview-table td:nth-child(10) {
  width: 104px;
}

.member-summary-preview-table th:nth-child(11),
.member-summary-preview-table td:nth-child(11),
.member-summary-preview-table th:nth-child(12),
.member-summary-preview-table td:nth-child(12) {
  width: 100px;
  min-width: 100px;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.member-summary-preview-table th:nth-child(13),
.member-summary-preview-table td:nth-child(13) {
  width: 86px;
}

.member-summary-preview-table th:nth-child(14),
.member-summary-preview-table td:nth-child(14) {
  width: 96px;
}

.member-summary-preview-table th:nth-child(15),
.member-summary-preview-table td:nth-child(15) {
  width: 74px;
}

.member-summary-preview-table th:nth-child(16),
.member-summary-preview-table td:nth-child(16) {
  width: 320px;
  min-width: 320px;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.member-change-lines {
  display: grid;
  gap: 3px;
  line-height: 1.45;
}

.member-change-lines span {
  display: block;
}

.member-change-lines.is-conflict,
.member-change-conflict {
  color: #a33a2b;
}

.member-change-conflict {
  margin-top: 5px;
  font-size: 12px;
  line-height: 1.45;
}

.member-change-more {
  margin-top: 4px;
}

.member-change-more summary {
  width: fit-content;
  cursor: pointer;
  color: var(--primary-dark);
  font-size: 12px;
}

.member-change-more[open] summary {
  margin-bottom: 4px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.36);
}

.modal-panel {
  width: min(760px, 100%);
  max-height: min(760px, calc(100vh - 36px));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.member-form-modal {
  width: min(680px, 100%);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding: 16px;
}

.modal-head h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: 0;
}

.modal-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.modal-body {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.member-form .form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.member-form .form-grid.two-column {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-section-label {
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

.member-purchase-modal {
  width: min(680px, 100%);
}

.member-purchase-member {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  background: #f8fafc;
}

.member-purchase-member span,
.member-purchase-member small {
  color: var(--muted);
  font-size: 12px;
}

.member-history-panel {
  min-width: 0;
}

.member-record-list {
  border-top: 1px solid var(--line);
}

.member-record-row {
  display: grid;
  gap: 8px;
  min-width: 0;
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}

.member-record-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.member-record-row__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
}

.member-record-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.member-record-title time,
.member-record-row__head > strong {
  color: var(--text);
  font-weight: 700;
  overflow-wrap: break-word;
}

.member-record-amount {
  flex: 0 0 auto;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.member-record-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 16px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.member-record-note {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
  overflow-wrap: break-word;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.member-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.member-form label.full-span {
  grid-column: 1 / -1;
}

.member-form input,
.member-form select,
.member-form textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  min-height: 38px;
  padding: 0 10px;
  background: #fff;
  color: var(--text);
}

.member-form textarea {
  min-height: 86px;
  padding: 10px;
  resize: vertical;
}

.member-form input:focus,
.member-form select:focus,
.member-form textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(20, 125, 111, 0.12);
  outline: none;
}

.member-form input:disabled {
  background: #f8fafc;
  color: var(--muted);
}

.required-mark {
  margin-left: 3px;
  color: var(--danger);
  font-style: normal;
}

.form-error {
  border: 1px solid #f2b8b5;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff3f2;
  color: var(--danger);
}

.person-identity-conflict {
  display: grid;
  gap: 12px;
  border: 1px solid #e8bd7c;
  border-radius: 8px;
  padding: 12px;
  background: #fffaf2;
  color: var(--text);
}

.person-identity-conflict__content > strong {
  color: #8a5700;
  font-size: 15px;
}

.person-identity-conflict__content > p {
  margin: 5px 0 9px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.person-identity-conflict dl {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 0;
}

.person-identity-conflict dl > div {
  display: flex;
  gap: 7px;
  min-width: 0;
}

.person-identity-conflict dt {
  color: var(--muted);
}

.person-identity-conflict dd {
  margin: 0;
  font-weight: 650;
  word-break: break-word;
}

.person-identity-conflict__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.form-readonly-note {
  border-radius: 8px;
  padding: 10px 12px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.member-form-modal .modal-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin: 0 -16px -16px;
  border-top: 1px solid var(--line);
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.98);
}

.compact-actions {
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 6px;
  width: 100%;
  max-width: 260px;
  min-width: 0;
}

.tiny-button {
  flex: 0 1 auto;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--text);
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 12px;
  line-height: 1.2;
  cursor: pointer;
}

.tiny-button:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.picker-modal {
  max-width: 640px;
}

.picker-body {
  display: grid;
  gap: 14px;
}

.picker-body label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.picker-body input,
.picker-body textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  min-height: 38px;
  padding: 0 10px;
  background: #fff;
  color: var(--text);
}

.picker-body textarea {
  min-height: 92px;
  padding: 10px;
  resize: vertical;
}

.picker-results {
  display: grid;
  gap: 8px;
  max-height: min(420px, 55vh);
  overflow: auto;
}

.picker-option {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto;
  gap: 4px 12px;
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
}

.picker-option:hover {
  border-color: var(--primary);
  background: #f8fffd;
}

.picker-option strong,
.picker-option span {
  white-space: nowrap;
}

.picker-option small {
  grid-column: 1 / -1;
  color: var(--muted);
  word-break: break-word;
}

.empty-state.compact {
  padding: 16px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
}

.import-batch-table {
  min-width: 1180px;
}

.import-detail-section {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  scroll-margin-top: 16px;
}

#preview-table-results {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.small-value {
  overflow-wrap: anywhere;
  font-size: 18px;
}

.preview-filter-tabs {
  align-items: center;
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.renewal-attendance-panel {
  min-width: 0;
}

.renewal-level-cards,
.monthly-class-cards {
  margin-bottom: 16px;
}

.renewal-basis-note {
  margin-bottom: 16px;
}

.renewal-attendance-table-card {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.renewal-attendance-table-card .table-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
}

.renewal-level-table {
  min-width: 920px;
}

.monthly-class-table {
  min-width: 620px;
}

.renewal-attendance-panel .metric-unit {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.renewal-analysis-panel {
  min-width: 0;
}

.page-header-unified:has(.renewal-analysis-filters) {
  align-items: stretch;
  flex-wrap: wrap;
}

.page-header-unified:has(.renewal-analysis-filters) .page-header-copy,
.page-header-unified:has(.renewal-analysis-filters) .page-header-controls {
  width: 100%;
  max-width: none;
  flex-basis: 100%;
}

.renewal-analysis-filters {
  width: 100%;
  min-width: 0;
  padding: 16px;
  box-shadow: none;
}

.renewal-filter-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr)) auto;
  gap: 12px;
  align-items: end;
}

.renewal-filter-field {
  display: grid;
  min-width: 0;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.renewal-filter-field input,
.renewal-filter-field select {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
  color: var(--text);
}

.renewal-filter-field input:focus,
.renewal-filter-field select:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(20, 125, 111, 0.12);
}

.renewal-coach-filter {
  position: relative;
}

.renewal-coach-multi {
  position: relative;
  min-width: 0;
}

.renewal-coach-multi > summary {
  display: flex;
  min-width: 0;
  min-height: 38px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0 32px 0 10px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  list-style: none;
}

.renewal-coach-multi > summary::-webkit-details-marker {
  display: none;
}

.renewal-coach-multi > summary::after {
  position: absolute;
  top: 14px;
  right: 12px;
  border: solid var(--muted);
  border-width: 0 1.5px 1.5px 0;
  padding: 3px;
  content: "";
  transform: translateY(-2px) rotate(45deg);
}

.renewal-coach-multi[open] > summary,
.renewal-coach-multi > summary:focus-visible {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(20, 125, 111, 0.12);
}

.renewal-coach-multi[open] > summary::after {
  transform: translateY(2px) rotate(225deg);
}

.renewal-coach-multi > summary span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.renewal-coach-multi.is-disabled > summary {
  background: #f5f7f8;
  color: var(--muted);
  cursor: not-allowed;
  pointer-events: none;
}

.renewal-coach-options {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  display: grid;
  width: max(100%, 260px);
  max-height: 280px;
  gap: 2px;
  overflow-y: auto;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 6px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(18, 32, 45, 0.12);
}

.renewal-coach-clear {
  width: 100%;
  border: 0;
  border-radius: 6px;
  padding: 8px;
  background: transparent;
  color: var(--primary-dark);
  text-align: left;
  cursor: pointer;
}

.renewal-coach-clear:hover,
.renewal-coach-option:hover {
  background: var(--primary-soft);
}

.renewal-coach-option {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  border-radius: 6px;
  padding: 8px;
  color: var(--text);
  cursor: pointer;
}

.renewal-coach-option input {
  width: 16px;
  min-height: 16px;
  flex: 0 0 16px;
  border: 0;
  margin: 0;
  padding: 0;
  box-shadow: none;
  accent-color: var(--primary);
}

.renewal-coach-option span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.renewal-coach-empty {
  margin: 0;
  padding: 8px;
  color: var(--muted);
}

.renewal-filter-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.renewal-filter-error,
.renewal-coach-state {
  margin: 10px 0 0;
  color: var(--danger);
  font-size: 12px;
  line-height: 1.5;
}

.renewal-coach-state:not(.is-error) {
  color: var(--muted);
}

.renewal-filter-context {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.renewal-filter-context p {
  margin: 0;
}

.renewal-filter-context strong {
  color: var(--text);
  font-weight: 650;
}

.renewal-core-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.renewal-core-card {
  display: flex;
  min-width: 0;
  min-height: 104px;
  flex-direction: column;
  padding: 14px;
}

.renewal-core-card--weakest {
  border-color: #edc69f;
  box-shadow: inset 3px 0 0 #cf762c;
}

.renewal-core-card-head {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.renewal-core-value {
  margin-top: 6px;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.renewal-weakest-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 5px 12px;
  margin-top: auto;
  padding-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.renewal-weakest-summary strong {
  color: #9a531b;
  font-size: 14px;
}

.renewal-insight {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  border: 1px solid #d5e6e2;
  border-left: 3px solid var(--primary);
  border-radius: 8px;
  padding: 8px 12px;
  background: #fff;
  color: var(--text);
  line-height: 1.6;
}

.renewal-insight strong {
  min-width: 0;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.renewal-insight-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.renewal-insight-secondary {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 16px;
  color: var(--muted);
  font-size: 12px;
}

.renewal-insight-label {
  flex: 0 0 auto;
  border-radius: 4px;
  padding: 3px 7px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 700;
}

.renewal-loss-badge {
  border: 1px solid #f0c79f;
  border-radius: 999px;
  padding: 3px 7px;
  background: #fff8ef;
  color: #9a531b;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.renewal-count-loss-badge,
.renewal-baseline-label {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 7px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}

.renewal-benchmark-bar {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 18px;
  margin: -6px 0 12px;
  border: 1px solid #cfe0dc;
  border-radius: 6px;
  padding: 9px 12px;
  background: #f8fbfa;
  color: var(--muted);
  font-size: 12px;
}

.renewal-benchmark-bar strong,
.renewal-benchmark-bar b {
  color: var(--primary-dark);
}

.renewal-benchmark-bar.is-loading {
  border-color: var(--line);
  background: #fafbfc;
}

.renewal-benchmark-bar.is-error {
  border-color: #f0d29e;
  background: #fffaf2;
}

.renewal-retention-section,
.renewal-coach-comparison {
  min-width: 0;
  margin-bottom: 14px;
}

.renewal-retention-flow {
  display: grid;
  min-width: 0;
  gap: 0;
  padding: 8px;
}

.renewal-retention-stage {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 10px;
  background: #fff;
}

.renewal-stage-heading {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.renewal-stage-heading > div:first-child {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 10px;
}

.renewal-stage-heading strong {
  color: var(--text);
  font-size: 14px;
}

.renewal-stage-heading span {
  color: var(--muted);
  font-size: 12px;
}

.renewal-stage-rate {
  display: flex;
  flex: 0 0 auto;
  align-items: baseline;
  gap: 7px;
}

.renewal-stage-rate strong {
  color: var(--primary-dark);
  font-size: 14px;
}

.renewal-retention-track {
  height: 4px;
  margin-top: 4px;
  overflow: hidden;
  border-radius: 4px;
  background: #e8efed;
}

.renewal-retention-fill {
  display: block;
  height: 100%;
  min-width: 0;
  border-radius: inherit;
  background: var(--primary);
}

.renewal-stage-transition {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 1px 8px;
  border-left: 2px solid #cad8d5;
  padding: 3px 8px;
}

.renewal-stage-transition.is-weakest-conversion {
  border: 1px solid #edc69f;
  border-left: 3px solid #cf762c;
  border-radius: 6px;
  background: #fff9f2;
}

.renewal-transition-route {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.renewal-transition-route strong {
  min-width: 0;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.renewal-transition-summary {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 3px 6px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  text-align: right;
}

.renewal-transition-summary strong {
  color: var(--text);
  font-weight: 700;
}

.renewal-stage-selector {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.renewal-stage-selector > span {
  flex: 0 0 auto;
  padding-bottom: 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.renewal-stage-selector-scroll {
  display: flex;
  min-width: 0;
  gap: 2px;
  overflow-x: auto;
}

.renewal-stage-selector-button {
  min-width: 58px;
  flex: 0 0 auto;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 8px 10px 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
}

.renewal-stage-selector-button:hover,
.renewal-stage-selector-button:focus-visible {
  background: var(--primary-soft);
  color: var(--primary-dark);
  outline: none;
}

.renewal-stage-selector-button.is-active {
  border-bottom-color: var(--primary);
  color: var(--primary-dark);
  font-weight: 700;
}

.renewal-stage-conclusion-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.renewal-stage-conclusion {
  display: grid;
  min-width: 0;
  min-height: 78px;
  align-content: center;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  background: #fff;
}

.renewal-stage-conclusion > span,
.renewal-stage-conclusion small {
  color: var(--muted);
  font-size: 11px;
}

.renewal-stage-conclusion strong {
  min-width: 0;
  color: var(--text);
  font-size: 15px;
  overflow-wrap: anywhere;
}

.renewal-stage-conclusion.is-highest,
.renewal-stage-conclusion.is-benchmark {
  border-color: #c7ded9;
}

.renewal-stage-conclusion.is-lowest {
  border-color: #edc69f;
}

.renewal-stage-conclusion.is-insufficient {
  grid-column: span 2;
  background: #fafbfc;
}

.renewal-coach-stage-chart,
.renewal-coach-heatmap {
  min-width: 0;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.renewal-subsection-heading {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.renewal-subsection-heading h3,
.renewal-subsection-heading p {
  margin: 0;
}

.renewal-subsection-heading h3 {
  font-size: 15px;
}

.renewal-subsection-heading p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.renewal-benchmark-key {
  flex: 0 0 auto;
  border: 1px solid #c7ded9;
  border-radius: 999px;
  padding: 4px 8px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}

.renewal-coach-bars {
  display: grid;
  gap: 2px;
}

.renewal-coach-bar-row {
  display: grid;
  grid-template-columns: minmax(145px, 175px) minmax(180px, 1fr) 78px minmax(150px, 190px);
  min-width: 0;
  min-height: 50px;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #edf1f2;
  padding: 5px 2px;
}

.renewal-coach-bar-name {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 5px;
}

.renewal-coach-bar-name strong {
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.renewal-coach-bar-name span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 10px;
}

.renewal-coach-bar-track {
  position: relative;
  height: 16px;
  overflow: visible;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #f3f6f6;
}

.renewal-coach-bar-fill {
  display: block;
  width: var(--coach-rate-width);
  height: 100%;
  border-radius: 3px;
  background: #78958f;
}

.renewal-coach-bar-row.is-above .renewal-coach-bar-fill {
  background: var(--primary);
}

.renewal-coach-bar-row.is-below .renewal-coach-bar-fill {
  background: #d68a42;
}

.renewal-coach-bar-row.is-small_sample .renewal-coach-bar-fill {
  background: #a8b2b7;
}

.renewal-coach-bar-track.is-zero .renewal-coach-bar-fill {
  width: 2px;
}

.renewal-coach-benchmark-line {
  position: absolute;
  z-index: 2;
  top: -4px;
  bottom: -4px;
  left: var(--benchmark-position);
  width: 1px;
  background: #315f57;
}

.renewal-coach-benchmark-line::before {
  position: absolute;
  top: -2px;
  left: -2px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #315f57;
  content: "";
}

.renewal-coach-bar-value {
  display: grid;
  justify-items: end;
  gap: 1px;
  white-space: nowrap;
}

.renewal-coach-bar-value strong {
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.renewal-coach-bar-value span {
  color: var(--muted);
  font-size: 10px;
}

.renewal-coach-bar-difference {
  display: grid;
  justify-items: end;
  gap: 1px;
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
}

.renewal-coach-bar-difference-label {
  font-size: 11px;
  font-weight: 600;
}

.renewal-coach-bar-difference-value {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
}

.renewal-coach-bar-difference-value strong {
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.renewal-coach-bar-difference-value span {
  font-size: 10px;
  font-weight: 400;
}

.renewal-coach-bar-difference.is-above {
  color: var(--primary-dark);
}

.renewal-coach-bar-difference.is-below {
  color: #9a531b;
}

.renewal-coach-bar-difference.is-near,
.renewal-coach-bar-difference.is-even,
.renewal-coach-bar-difference.is-neutral {
  color: var(--muted);
}

.renewal-small-sample-group {
  margin-top: 12px;
  border-top: 1px dashed var(--line-strong);
  padding-top: 9px;
}

.renewal-small-sample-group h4,
.renewal-no-sample-note {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.renewal-no-sample-note {
  margin-top: 8px;
  font-weight: 400;
}

.renewal-heatmap-scroll {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
}

.renewal-heatmap-table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 4px;
}

.renewal-heatmap-table th,
.renewal-heatmap-table td {
  width: 128px;
  min-width: 128px;
  height: 68px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 9px;
  background: #fff;
  text-align: left;
  vertical-align: middle;
}

.renewal-heatmap-table thead th {
  height: 54px;
  background: #f8fafc;
}

.renewal-heatmap-table th > strong,
.renewal-heatmap-table th > span,
.renewal-heatmap-cell > strong,
.renewal-heatmap-cell > span,
.renewal-heatmap-cell > small {
  display: block;
}

.renewal-heatmap-table th > strong,
.renewal-heatmap-cell > strong {
  color: var(--text);
  font-size: 13px;
}

.renewal-heatmap-table th > span,
.renewal-heatmap-cell > span,
.renewal-heatmap-cell > small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.renewal-heatmap-coach-column {
  position: sticky;
  left: 0;
  z-index: 2;
  width: 166px !important;
  min-width: 166px !important;
  background: #fff !important;
}

.renewal-heatmap-table thead .renewal-heatmap-coach-column {
  z-index: 3;
  background: #f8fafc !important;
}

.renewal-heatmap-cell.is-above {
  border-color: #bcd8d2;
  background: #f1f8f6;
}

.renewal-heatmap-cell.is-below {
  border-color: #edc69f;
  background: #fff8ef;
}

.renewal-heatmap-cell.is-near {
  background: #fafbfc;
}

.renewal-heatmap-cell.is-small_sample {
  border-style: dashed;
  background: #f4f6f7;
}

.renewal-heatmap-cell.is-no-sample {
  background: #f7f8f9;
}

.renewal-heatmap-table .is-selected-stage {
  box-shadow: inset 0 0 0 1px var(--primary);
}

.renewal-heatmap-cell:hover {
  border-color: var(--primary);
}

.renewal-comparison-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.renewal-advanced-detail {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.renewal-advanced-detail-toggle {
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 0;
  border-radius: 8px;
  padding: 10px 12px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.renewal-advanced-detail-toggle:hover,
.renewal-advanced-detail-toggle:focus-visible {
  background: #f8faf9;
  outline: none;
}

.renewal-advanced-detail-toggle > span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.renewal-advanced-detail-toggle strong {
  font-size: 13px;
}

.renewal-advanced-detail-toggle small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.renewal-advanced-detail-toggle b {
  flex: 0 0 auto;
  color: var(--primary-dark);
  font-size: 12px;
}

.renewal-advanced-detail-content {
  min-width: 0;
  border-top: 1px solid var(--line);
  padding: 0 12px 12px;
}

.renewal-advanced-detail-content .renewal-coach-heatmap {
  margin-bottom: 0;
  border: 0;
  padding: 12px 0 0;
}

.renewal-methodology {
  border-top: 1px solid var(--line);
  padding: 12px 2px 0;
  color: var(--muted);
  font-size: 12px;
}

.renewal-methodology summary {
  width: fit-content;
  color: var(--muted);
  cursor: pointer;
  font-weight: 650;
}

.renewal-methodology summary:hover,
.renewal-methodology summary:focus-visible {
  color: var(--primary-dark);
}

.renewal-methodology ol {
  display: grid;
  gap: 5px;
  margin: 10px 0 0;
  padding-left: 22px;
  line-height: 1.6;
}

.sample-status {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.sample-status.small_sample {
  border-color: #f0d29e;
  background: #fff9ed;
  color: #8a5b00;
}

.sample-status.sufficient {
  border-color: #c7ded9;
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.renewal-analysis-panel .metric-unit {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

@media (min-width: 901px) and (max-width: 1240px) {
  .renewal-filter-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .renewal-filter-actions {
    align-self: end;
  }

}

.data-check-card {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.data-check-card h3 {
  margin: 0;
  font-size: 16px;
  letter-spacing: 0;
}

.data-check-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.check-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.check-card-header strong {
  font-size: 22px;
}

.toast-region {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
  display: grid;
  gap: 10px;
}

.toast {
  max-width: 360px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  background: #fff;
  box-shadow: var(--shadow);
}

.toast.error {
  border-color: #f2b8b5;
  color: var(--danger);
}

.toast.success {
  border-color: #b8dfd8;
  color: var(--primary-dark);
}

@media (max-width: 900px) {
  .placeholder-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-header,
  .page-header-unified {
    align-items: stretch;
    flex-direction: column;
  }

  .page-header-controls {
    width: 100%;
    justify-content: flex-start;
  }

  .month-selector {
    justify-content: flex-start;
  }

  .metric-grid,
  .comparison-grid,
  .mini-metric-grid,
  .renewal-core-grid {
    grid-template-columns: 1fr;
  }

  .comparison-row {
    grid-template-columns: 1fr;
  }

  .comparison-result {
    justify-items: start;
  }

  .basis-note,
  .detail-grid,
  .detail-two-column {
    grid-template-columns: 1fr;
  }

  .member-business-summary__primary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .member-summary-item:nth-child(odd) {
    border-left: 0;
  }

  .member-summary-item:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .member-data-context {
    flex-direction: column;
  }

  .coach-detail-head {
    flex-direction: column;
  }

  .pagination-row {
    align-items: stretch;
    flex-direction: column;
  }

  .pagination-controls {
    justify-content: flex-start;
  }

  .pagination-error {
    text-align: left;
  }

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

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

  .filter-actions {
    align-items: stretch;
  }

  .purchase-range-inputs {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  }

  .action-menu-popover {
    right: auto;
    left: 0;
  }

  .member-purchase-member {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .renewal-filter-grid {
    grid-template-columns: 1fr;
  }

  .renewal-coach-options {
    position: static;
    width: 100%;
    margin-top: 6px;
    box-shadow: none;
  }

  .renewal-filter-actions > button {
    flex: 1 1 0;
  }

  .renewal-insight {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .renewal-core-card {
    min-height: 100px;
  }

  .renewal-retention-flow {
    padding: 8px;
  }

  .renewal-stage-heading {
    align-items: center;
    gap: 6px;
  }

  .renewal-stage-rate {
    width: auto;
    justify-content: flex-end;
  }

  .renewal-stage-transition {
    gap: 5px;
    margin-right: 8px;
    margin-left: 8px;
  }

  .renewal-transition-route {
    align-items: center;
    flex-direction: row;
  }

  .renewal-transition-summary {
    justify-content: flex-start;
    text-align: left;
  }

  .renewal-benchmark-bar {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .renewal-stage-selector {
    align-items: flex-start;
    flex-direction: column;
    gap: 0;
  }

  .renewal-stage-selector > span {
    padding-bottom: 3px;
  }

  .renewal-stage-selector-scroll {
    width: 100%;
  }

  .renewal-stage-conclusion-grid {
    grid-template-columns: 1fr;
  }

  .renewal-stage-conclusion.is-insufficient {
    grid-column: auto;
  }

  .renewal-subsection-heading {
    flex-direction: column;
    gap: 7px;
  }

  .renewal-coach-bar-row {
    grid-template-areas:
      "coach value"
      "track track"
      "difference difference";
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 74px;
    gap: 5px 10px;
    padding: 8px 2px;
  }

  .renewal-coach-bar-name {
    grid-area: coach;
  }

  .renewal-coach-bar-track {
    grid-area: track;
  }

  .renewal-coach-bar-value {
    grid-area: value;
  }

  .renewal-coach-bar-difference {
    grid-area: difference;
    display: flex;
    align-items: baseline;
    justify-content: flex-start;
    gap: 6px;
    text-align: left;
  }

  .renewal-coach-stage-chart,
  .renewal-coach-heatmap {
    padding: 10px;
  }

  .renewal-advanced-detail-toggle {
    align-items: flex-start;
  }

  .import-uploader-grid,
  .check-grid {
    grid-template-columns: 1fr;
  }

  .import-batch-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .import-problem-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .import-member-import-hint,
  .import-course-suggestion-bar,
  .import-member-group-item,
  .import-course-group-item {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .import-member-import-hint,
  .import-course-suggestion-bar {
    flex-direction: column;
  }

  .import-group-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .import-group-actions {
    max-width: none;
    justify-content: flex-start;
  }
}

.basis-note.coach-member-basis {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 640px) {
  .modal-backdrop {
    align-items: center;
    padding: 10px;
  }

  .member-form-modal,
  .member-purchase-modal {
    width: 100%;
    max-height: calc(100dvh - 20px);
  }

  .member-form .form-grid.two-column,
  .member-business-summary__secondary {
    grid-template-columns: 1fr;
  }

  .member-summary-aux {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .member-summary-aux:first-child {
    border-top: 0;
  }

  .member-form-modal .modal-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .member-form-modal .modal-actions button {
    width: 100%;
  }

  .member-record-row__head {
    align-items: stretch;
    flex-direction: column;
    gap: 6px;
  }

  .member-record-amount {
    align-self: flex-start;
  }

  .basis-note.coach-member-basis {
    grid-template-columns: 1fr;
  }

  .import-batch-summary,
  .import-problem-grid,
  .import-group-facts {
    grid-template-columns: 1fr;
  }

  .member-summary-change-item {
    width: 100%;
  }

  .import-problem-card,
  .import-status-group-item,
  .import-problem-section__head {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Stage 6C-2B-1A-UI: read-only experience identity overview and detail window. */
body.experience-identity-modal-open {
  overflow: hidden;
}

.experience-identity-overview {
  min-width: 0;
}

.experience-identity-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.experience-identity-summary strong {
  color: var(--text);
  font-weight: 700;
}

.experience-identity-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.experience-identity-card {
  display: flex;
  min-width: 0;
  min-height: 210px;
  flex-direction: column;
  align-items: flex-start;
  padding: 18px;
  box-shadow: none;
}

.experience-identity-card__code {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.experience-identity-card h3 {
  margin: 8px 0 0;
  font-size: 18px;
  line-height: 1.35;
}

.experience-identity-card > p {
  margin: 7px 0 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.experience-identity-card__counts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: auto;
  color: var(--muted);
  font-size: 12px;
}

.experience-identity-card__counts strong {
  color: var(--text);
  font-size: 22px;
  line-height: 1.2;
}

.experience-identity-card > button {
  margin-top: 14px;
}

.experience-identity-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.experience-identity-modal-backdrop {
  overflow: hidden;
  overscroll-behavior: contain;
}

.experience-identity-modal {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(1180px, 88vw);
  max-height: 88dvh;
  overflow: hidden;
  border-radius: 14px;
}

.experience-identity-modal__head {
  background: var(--panel);
}

.experience-identity-modal__head > div {
  min-width: 0;
}

.experience-identity-modal__head p {
  max-width: 760px;
  line-height: 1.55;
}

.experience-identity-modal__body {
  display: grid;
  min-height: 0;
  gap: 12px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px;
}

.experience-identity-detail-list {
  display: grid;
  gap: 10px;
}

.experience-identity-detail-list .import-member-group-item {
  grid-template-columns: minmax(160px, 0.7fr) minmax(0, 2fr);
  align-items: start;
}

.experience-identity-detail-list .import-member-group-item > :nth-child(n + 3) {
  grid-column: 1 / -1;
}

.experience-identity-modal__body > .pagination-row {
  border-top: 1px solid var(--line);
  padding-right: 0;
  padding-bottom: 0;
  padding-left: 0;
}

.experience-identity-confirm-toolbar {
  position: sticky;
  z-index: 2;
  top: -16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

.experience-identity-confirm-toolbar > div:first-child {
  display: grid;
  gap: 2px;
}

.experience-identity-confirm-toolbar span {
  color: var(--muted);
  font-size: 12px;
}

.experience-identity-bulk-confirmation {
  display: grid;
  gap: 8px;
}

.experience-identity-bulk-confirmation p {
  margin: 0;
  line-height: 1.6;
}

.experience-identity-action-result ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.experience-identity-confirm-item.is-actionable {
  grid-template-columns: 24px minmax(170px, 0.85fr) minmax(220px, 1.15fr);
}

.experience-identity-confirm-item.is-selected {
  border-color: rgba(20, 125, 111, 0.45);
  background: rgba(20, 125, 111, 0.035);
}

.experience-identity-select {
  grid-column: 1;
  align-self: start;
  padding-top: 3px;
}

.experience-identity-select input {
  width: 17px;
  height: 17px;
  accent-color: var(--primary);
}

.experience-identity-confirm-item.is-actionable .import-member-group-item__identity {
  grid-column: 2;
}

.experience-identity-candidate-panel {
  display: grid;
  min-width: 0;
  gap: 8px;
}

.experience-identity-confirm-item.is-actionable .experience-identity-candidate-panel {
  grid-column: 3;
}

.experience-identity-candidate-panel > small,
.experience-identity-confirm-item .import-member-group-item__identity > small:first-child {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.experience-identity-candidate-panel .picker-result {
  cursor: default;
}

.experience-identity-item-actions,
.experience-identity-source-details,
.experience-identity-confirm-item.is-actionable > .form-error,
.experience-identity-confirm-item.is-actionable > .warning-box {
  grid-column: 2 / -1;
}

.experience-identity-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.experience-identity-source-details {
  border-top: 1px solid var(--line);
  padding-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.experience-identity-source-details summary {
  cursor: pointer;
  color: var(--text-soft);
}

.experience-identity-source-details p {
  margin: 8px 0 0;
  overflow-wrap: anywhere;
  line-height: 1.6;
}

@media (max-width: 1180px) {
  .experience-identity-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .experience-identity-detail-list .import-member-group-item {
    grid-template-columns: 1fr;
  }

  .experience-identity-detail-list .import-member-group-item > * {
    grid-column: 1;
  }

  .experience-identity-confirm-item.is-actionable {
    grid-template-columns: 24px minmax(0, 1fr);
  }

  .experience-identity-confirm-item.is-actionable .import-member-group-item__identity,
  .experience-identity-confirm-item.is-actionable .experience-identity-candidate-panel,
  .experience-identity-confirm-item.is-actionable .experience-identity-item-actions,
  .experience-identity-confirm-item.is-actionable .experience-identity-source-details,
  .experience-identity-confirm-item.is-actionable > .form-error,
  .experience-identity-confirm-item.is-actionable > .warning-box {
    grid-column: 2;
  }
}

@media (max-width: 640px) {
  .experience-identity-summary {
    display: grid;
    gap: 5px;
  }

  .experience-identity-card-grid {
    grid-template-columns: 1fr;
  }

  .experience-identity-card {
    min-height: 0;
  }

  .experience-identity-modal {
    width: 100%;
    max-height: calc(100dvh - 20px);
  }

  .experience-identity-modal__head {
    padding: 14px;
  }

  .experience-identity-modal__head h2 {
    font-size: 18px;
  }

  .experience-identity-modal__body {
    padding: 12px;
  }

  .experience-identity-confirm-toolbar {
    top: -12px;
    align-items: stretch;
  }

  .experience-identity-confirm-toolbar .row-actions,
  .experience-identity-item-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .experience-identity-confirm-toolbar button,
  .experience-identity-item-actions button {
    width: 100%;
  }
}

/* HOME_DASHBOARD_UI_V2 — business insight cockpit. */
.home-dashboard--v2 {
  --home-v2-accent: #147d6f;
  --home-v2-accent-dark: #0c5f55;
  --home-v2-ink: #142033;
  --home-v2-muted: #687386;
  --home-v2-surface: #ffffff;
  --home-v2-soft: #f1f6f5;
  --home-v2-warm: #f7f4ec;
  --home-v2-line: rgba(100, 116, 139, 0.18);
  display: grid;
  gap: 54px;
  width: 100%;
  min-width: 0;
  padding: 30px 34px 58px;
  color: var(--home-v2-ink);
}

.home-dashboard--v2 button,
.home-dashboard--v2 input {
  font: inherit;
}

.home-v2-header {
  align-items: flex-start;
  margin-bottom: -28px;
}

.home-dashboard--v2 .home-dashboard-heading h1 {
  max-width: 760px;
  margin-top: 12px;
  font-size: clamp(34px, 4vw, 54px);
  letter-spacing: -0.045em;
  line-height: 1.04;
}

.home-dashboard--v2 .home-dashboard-heading p {
  max-width: 660px;
  margin-top: 14px;
  font-size: 16px;
  line-height: 1.65;
}

.home-dashboard--v2 .home-dashboard-eyebrow {
  color: var(--home-v2-accent-dark);
}

.home-dashboard--v2 .home-prototype-badge {
  border-color: rgba(20, 125, 111, 0.2);
  background: rgba(255, 255, 255, 0.76);
  color: #557069;
}

.home-dashboard--v2 .home-dashboard-meta {
  align-items: center;
}

.home-dashboard--v2 .home-dashboard-meta > div {
  min-width: 148px;
  border: 0;
  padding: 0 2px;
  background: transparent;
  box-shadow: none;
  text-align: right;
}

.home-dashboard--v2 .home-refresh-button {
  min-height: 42px;
  border-color: rgba(100, 116, 139, 0.22);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.home-v2-coverage {
  width: fit-content;
  max-width: 100%;
  margin-bottom: -28px;
  border-color: rgba(181, 139, 54, 0.16);
  border-radius: 999px;
  padding: 9px 13px;
  background: rgba(255, 251, 240, 0.72);
  font-size: 12px;
}

.home-dashboard--v2 .home-dashboard-section {
  display: grid;
  gap: 24px;
  min-width: 0;
}

.home-dashboard--v2 .home-section-heading {
  display: grid;
  gap: 7px;
}

.home-dashboard--v2 .home-section-heading > span {
  color: var(--home-v2-accent-dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.home-dashboard--v2 .home-section-heading h2 {
  margin: 0;
  color: var(--home-v2-ink);
  font-size: clamp(25px, 2.5vw, 34px);
  letter-spacing: -0.035em;
  line-height: 1.12;
}

.home-dashboard--v2 .home-section-heading p {
  margin: 0;
  color: var(--home-v2-muted);
  font-size: 14px;
  line-height: 1.6;
}

.home-v2-overview {
  position: relative;
}

.home-v2-overview::before {
  position: absolute;
  z-index: -1;
  top: -26px;
  right: -34px;
  bottom: -24px;
  left: -34px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 18% 0%, rgba(20, 125, 111, 0.07), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.65), rgba(242, 246, 248, 0));
  content: "";
}

.home-v2-overview-heading,
.home-v2-rhythm-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
}

.home-v2-period-shell {
  display: grid;
  min-width: 450px;
  gap: 8px;
}

.home-v2-period-shell > span,
.home-v2-rhythm-period > span {
  color: var(--home-v2-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.home-v2-period-control,
.home-segmented-control {
  display: flex;
  width: fit-content;
  max-width: 100%;
  padding: 4px;
  border-radius: 11px;
  background: #e9eef1;
}

.home-v2-period-control button,
.home-segmented-control button {
  min-height: 32px;
  border: 0;
  border-radius: 8px;
  padding: 6px 13px;
  background: transparent;
  color: #637083;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.home-v2-period-control button:hover,
.home-segmented-control button:hover {
  color: var(--home-v2-ink);
}

.home-v2-period-control button.is-active,
.home-segmented-control button.is-active {
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.09);
  color: var(--home-v2-accent-dark);
}

.home-v2-custom-dates {
  display: flex;
  align-items: end;
  gap: 8px;
}

.home-v2-custom-dates label {
  display: grid;
  gap: 4px;
}

.home-v2-custom-dates label > span {
  color: var(--home-v2-muted);
  font-size: 10px;
}

.home-v2-custom-dates input,
.home-v2-month-field input {
  min-height: 35px;
  border: 1px solid var(--home-v2-line);
  border-radius: 8px;
  padding: 6px 9px;
  background: #fff;
  color: var(--home-v2-ink);
  font-size: 12px;
}

.home-v2-custom-dates > i {
  padding-bottom: 9px;
  color: var(--home-v2-muted);
  font-style: normal;
}

.home-v2-custom-dates > button {
  min-height: 35px;
  border: 0;
  border-radius: 8px;
  padding: 7px 14px;
  background: var(--home-v2-ink);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.home-v2-coverage-line {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding-bottom: 2px;
  color: var(--home-v2-muted);
  font-size: 12px;
}

.home-v2-coverage-line::before {
  width: 22px;
  height: 1px;
  background: var(--home-v2-accent);
  content: "";
}

.home-v2-coverage-line strong {
  color: #455267;
  font-size: 13px;
}

.home-v2-coverage-line small {
  border-left: 1px solid var(--home-v2-line);
  padding-left: 10px;
}

.home-v2-metric-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
  min-width: 0;
}

.home-v2-metric {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 190px;
  grid-column: span 2;
  align-content: space-between;
  gap: 15px;
  overflow: hidden;
  border: 1px solid rgba(100, 116, 139, 0.13);
  border-radius: 16px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.035);
}

.home-v2-metric::after {
  position: absolute;
  right: -35px;
  bottom: -45px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(100, 116, 139, 0.035);
  content: "";
}

.home-v2-metric--hero {
  min-height: 220px;
  grid-column: span 4;
  padding: 24px;
}

.home-v2-metric--hero[data-metric="renewal"] {
  border-color: rgba(20, 125, 111, 0.18);
  background: linear-gradient(145deg, #ffffff, #edf6f3);
}

.home-v2-metric--hero[data-metric="active"] {
  border-color: rgba(61, 89, 126, 0.16);
  background: linear-gradient(145deg, #ffffff, #f0f4f9);
}

.home-v2-metric .home-card-label {
  position: relative;
  z-index: 1;
  color: #657184;
  font-size: 13px;
}

.home-v2-metric--hero .home-card-label {
  color: #445267;
  font-size: 14px;
}

.home-v2-metric-value {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.home-v2-metric-value strong {
  color: var(--home-v2-ink);
  font-size: clamp(38px, 4.3vw, 64px);
  font-weight: 760;
  letter-spacing: -0.055em;
  line-height: 0.95;
}

.home-v2-metric--supporting .home-v2-metric-value strong {
  font-size: clamp(32px, 3vw, 44px);
}

.home-v2-metric-value span {
  color: #536075;
  font-size: 16px;
  font-weight: 700;
}

.home-v2-metric p,
.home-v2-metric small {
  position: relative;
  z-index: 1;
  margin: 0;
}

.home-v2-metric p {
  color: #5d687a;
  font-size: 12px;
  line-height: 1.55;
}

.home-v2-metric small {
  color: #8791a0;
  font-size: 11px;
}

.home-v2-rhythm-summary {
  display: grid;
  grid-template-columns: minmax(260px, 0.75fr) minmax(420px, 1.25fr);
  align-items: center;
  gap: 28px;
  min-width: 0;
  border-top: 1px solid var(--home-v2-line);
  border-bottom: 1px solid var(--home-v2-line);
  padding: 18px 4px;
}

.home-v2-rhythm-copy {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: end;
  gap: 12px;
}

.home-v2-rhythm-copy > span {
  grid-column: 1 / -1;
  color: var(--home-v2-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.home-v2-rhythm-copy > div {
  display: grid;
  gap: 3px;
}

.home-v2-rhythm-copy strong {
  font-size: 20px;
}

.home-v2-rhythm-copy small {
  color: var(--home-v2-muted);
  font-size: 11px;
}

.home-v2-mini-week {
  display: grid;
  height: 76px;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: end;
  gap: 8px;
}

.home-v2-mini-week > div {
  display: grid;
  height: 100%;
  grid-template-rows: 1fr auto;
  align-items: end;
  gap: 6px;
  text-align: center;
}

.home-v2-mini-week span {
  display: block;
  width: min(100%, 42px);
  min-height: 8px;
  justify-self: center;
  border-radius: 6px 6px 2px 2px;
  background: #9aacaa;
}

.home-v2-mini-week > div:nth-child(6) span {
  background: var(--home-v2-accent);
}

.home-v2-mini-week small {
  color: var(--home-v2-muted);
  font-size: 10px;
}

.home-v2-lifecycle-section {
  gap: 18px !important;
}

.home-dashboard--v2 .home-section-topline {
  align-items: end;
}

.home-v2-lifecycle-insight {
  display: grid;
  grid-template-columns: auto auto;
  gap: 3px 10px;
  border-left: 2px solid rgba(20, 125, 111, 0.45);
  padding: 2px 0 2px 15px;
}

.home-v2-lifecycle-insight span,
.home-v2-lifecycle-insight small {
  color: var(--home-v2-muted);
  font-size: 11px;
}

.home-v2-lifecycle-insight strong {
  grid-column: 1;
  font-size: 14px;
}

.home-v2-lifecycle-insight small {
  grid-column: 2;
  grid-row: 2;
}

.home-v2-lifecycle-flow {
  display: grid;
  grid-template-columns:
    minmax(125px, 1fr) 52px
    minmax(125px, 1fr) 52px
    minmax(125px, 1fr) 52px
    minmax(125px, 1fr) 52px
    minmax(125px, 1fr);
  align-items: center;
  gap: 5px;
  min-width: 0;
  border-top: 1px solid var(--home-v2-line);
  border-bottom: 1px solid var(--home-v2-line);
  padding: 15px 0;
}

.home-v2-flow-stage {
  display: grid;
  min-width: 0;
  min-height: 94px;
  align-content: center;
  gap: 7px;
  border: 0;
  border-radius: 13px;
  padding: 13px;
  background: transparent;
  color: var(--home-v2-ink);
  text-align: left;
  transition: background 0.16s ease, transform 0.16s ease;
}

.home-v2-flow-stage:hover,
.home-v2-flow-stage:focus-visible {
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
  transform: translateY(-2px);
}

.home-v2-flow-stage > span {
  color: #667386;
  font-size: 12px;
  font-weight: 700;
}

.home-v2-flow-stage > strong {
  font-size: 27px;
  letter-spacing: -0.035em;
}

.home-v2-flow-stage > strong small {
  margin-left: 3px;
  color: var(--home-v2-muted);
  font-size: 11px;
  font-weight: 600;
}

.home-v2-flow-stage > i {
  color: var(--home-v2-accent-dark);
  font-size: 10px;
  font-style: normal;
  opacity: 0;
  transition: opacity 0.16s ease;
}

.home-v2-flow-stage:hover > i,
.home-v2-flow-stage:focus-visible > i {
  opacity: 1;
}

.home-v2-flow-rate {
  display: grid;
  justify-items: center;
  gap: 3px;
  color: #84909f;
}

.home-v2-flow-rate strong {
  font-size: 11px;
}

.home-v2-flow-rate span {
  font-size: 17px;
}

.home-v2-behavior-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  min-width: 0;
}

.home-v2-analysis-card {
  position: relative;
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 20px;
  border-top: 2px solid rgba(20, 125, 111, 0.45);
  border-radius: 16px;
  padding: 24px;
  background: var(--home-v2-surface);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.06);
}

.home-v2-behavior-grid .home-v2-analysis-card:nth-child(2) {
  border-top-color: rgba(61, 89, 126, 0.42);
}

.home-v2-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.home-v2-card-header > div {
  display: grid;
  gap: 4px;
}

.home-v2-card-header > div > span {
  color: var(--home-v2-accent-dark);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.home-v2-card-header h3 {
  margin: 0;
  font-size: 19px;
  letter-spacing: -0.02em;
}

.home-v2-card-header p {
  margin: 0;
  color: var(--home-v2-muted);
  font-size: 12px;
  line-height: 1.5;
}

.home-v2-query-version {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 5px 9px;
  background: #f1f4f6;
  color: #788496;
  font-size: 10px;
}

.home-v2-card-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--home-v2-line);
  padding-bottom: 14px;
}

.home-v2-card-toolbar > span,
.home-v2-frequency-filters label > span {
  color: var(--home-v2-muted);
  font-size: 11px;
  font-weight: 700;
}

.home-v2-completion-main {
  display: grid;
  gap: 7px;
  padding: 4px 0 8px;
}

.home-v2-completion-main > span {
  color: var(--home-v2-muted);
  font-size: 12px;
}

.home-v2-completion-main > div {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.home-v2-completion-main strong {
  font-size: 54px;
  letter-spacing: -0.055em;
  line-height: 1;
}

.home-v2-completion-main b {
  color: #566276;
  font-size: 16px;
}

.home-v2-stat-strip,
.home-v2-frequency-results {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border-radius: 11px;
  background: var(--home-v2-line);
}

.home-v2-stat-strip > div,
.home-v2-frequency-results > div {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 13px;
  background: #f7f9fa;
}

.home-v2-stat-strip span,
.home-v2-frequency-results span {
  overflow: hidden;
  color: var(--home-v2-muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-v2-stat-strip strong {
  font-size: 14px;
}

.home-v2-frequency-results strong {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-size: 29px;
  letter-spacing: -0.035em;
}

.home-v2-frequency-results strong small {
  color: var(--home-v2-muted);
  font-size: 11px;
}

.home-v2-explore-link {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--home-v2-accent-dark);
  font-size: 12px;
  font-weight: 800;
}

.home-v2-explore-link span {
  transition: transform 0.16s ease;
}

.home-v2-explore-link:hover span {
  transform: translate(2px, -2px);
}

.home-v2-frequency-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
  border-bottom: 1px solid var(--home-v2-line);
  padding-bottom: 14px;
}

.home-v2-frequency-filters > label {
  display: grid;
  gap: 6px;
}

.home-v2-threshold-field > span:last-child {
  display: flex;
  min-height: 40px;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--home-v2-line);
  border-radius: 9px;
  padding: 5px 9px;
  background: #fff;
}

.home-v2-threshold-field b {
  color: #596679;
  font-size: 12px;
}

.home-v2-threshold-field input {
  width: 42px;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--home-v2-ink);
  font-size: 14px;
  font-weight: 800;
  outline: 0;
  text-align: center;
}

.home-v2-month-field input {
  min-height: 40px;
}

.home-v2-query-button {
  min-height: 40px;
  border: 0;
  border-radius: 9px;
  padding: 8px 18px;
  background: var(--home-v2-ink);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.home-v2-query-button:hover {
  background: #24344d;
}

.home-v2-query-status {
  min-height: 18px;
  margin-top: -10px;
  color: #798597;
  font-size: 10px;
}

.home-v2-query-status.is-dirty {
  color: #946b1b;
}

.home-v2-rhythm-section {
  padding-bottom: 10px;
}

.home-v2-rhythm-period {
  display: grid;
  grid-template-columns: auto auto;
  align-items: baseline;
  gap: 3px 12px;
  border-left: 2px solid rgba(20, 125, 111, 0.4);
  padding-left: 14px;
}

.home-v2-rhythm-period strong {
  color: var(--home-v2-ink);
  font-size: 15px;
}

.home-v2-rhythm-period small {
  grid-column: 1 / -1;
  color: var(--home-v2-muted);
  font-size: 11px;
}

.home-v2-week-layout {
  display: grid;
  grid-template-columns: minmax(150px, 0.25fr) minmax(0, 1fr);
  gap: 28px;
  min-width: 0;
  border-top: 1px solid var(--home-v2-line);
  padding-top: 22px;
}

.home-v2-week-summary {
  display: grid;
  align-content: center;
  gap: 22px;
}

.home-v2-week-summary > div {
  display: grid;
  gap: 3px;
}

.home-v2-week-summary span,
.home-v2-week-summary small {
  color: var(--home-v2-muted);
  font-size: 11px;
}

.home-v2-week-summary strong {
  font-size: 24px;
}

.home-v2-week-chart {
  display: grid;
  height: 250px;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: end;
  gap: 14px;
  min-width: 0;
}

.home-v2-week-chart > div {
  display: grid;
  height: 100%;
  grid-template-rows: 20px 1fr 20px;
  align-items: end;
  gap: 7px;
  text-align: center;
}

.home-v2-week-chart > div > span {
  color: #7a8697;
  font-size: 10px;
}

.home-v2-week-chart > div > div {
  position: relative;
  width: min(100%, 54px);
  height: 100%;
  justify-self: center;
  overflow: hidden;
  border-radius: 8px 8px 3px 3px;
  background: #eef1f3;
}

.home-v2-week-chart i {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  border-radius: 8px 8px 3px 3px;
  background: #9aa9a8;
}

.home-v2-week-chart .is-peak i {
  background: var(--home-v2-accent);
}

.home-v2-week-chart .is-low i {
  background: #d7dde4;
}

.home-v2-week-chart strong {
  color: #5d687a;
  font-size: 11px;
}

body.home-modal-open {
  overflow: hidden;
}

.home-v2-modal-layer {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
}

.home-v2-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(4px);
}

.home-v2-modal {
  position: relative;
  display: grid;
  width: min(880px, 100%);
  max-height: min(720px, calc(100dvh - 48px));
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.24);
}

.home-v2-modal > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 26px 18px;
}

.home-v2-modal > header > div {
  display: grid;
  gap: 5px;
}

.home-v2-modal > header span {
  color: var(--home-v2-accent-dark);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.home-v2-modal > header h2 {
  margin: 0;
  color: var(--home-v2-ink);
  font-size: 25px;
  letter-spacing: -0.025em;
}

.home-v2-modal > header p {
  margin: 0;
  color: var(--home-v2-muted);
  font-size: 12px;
}

.home-v2-modal-close {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #f0f3f5;
  color: #536074;
  font-size: 22px;
  line-height: 1;
}

.home-v2-modal-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--home-v2-line);
  border-bottom: 1px solid var(--home-v2-line);
  padding: 12px 26px;
  background: #fafbfc;
}

.home-v2-modal-toolbar label {
  position: relative;
  width: min(320px, 100%);
}

.home-v2-modal-toolbar input {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--home-v2-line);
  border-radius: 9px;
  padding: 8px 11px;
  background: #fff;
  color: var(--home-v2-ink);
  outline: 0;
}

.home-v2-modal-toolbar input:focus {
  border-color: rgba(20, 125, 111, 0.5);
  box-shadow: 0 0 0 3px rgba(20, 125, 111, 0.08);
}

.home-v2-modal-toolbar small {
  color: var(--home-v2-muted);
  font-size: 10px;
}

.home-v2-modal-grid {
  min-height: 0;
  overflow: auto;
  padding: 10px 26px 16px;
}

.home-v2-modal-grid-head,
.home-v2-modal-row {
  display: grid;
  grid-template-columns: var(--home-modal-columns);
  gap: 12px;
  align-items: center;
}

.home-v2-modal-grid-head {
  position: sticky;
  z-index: 1;
  top: -10px;
  border-bottom: 1px solid var(--home-v2-line);
  padding: 11px 12px 9px;
  background: #fff;
  color: #7b8797;
  font-size: 10px;
  font-weight: 800;
}

.home-v2-modal-row {
  min-height: 50px;
  border-bottom: 1px solid rgba(100, 116, 139, 0.11);
  padding: 10px 12px;
  color: #4f5b6e;
  font-size: 12px;
}

.home-v2-modal-row span:first-child {
  color: var(--home-v2-ink);
  font-weight: 700;
}

.home-v2-modal-empty {
  padding: 44px 16px;
  color: var(--home-v2-muted);
  text-align: center;
}

.home-v2-modal > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--home-v2-line);
  padding: 14px 26px;
  background: #fafbfc;
}

.home-v2-modal > footer span {
  color: var(--home-v2-muted);
  font-size: 10px;
}

.home-v2-modal > footer button {
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  padding: 7px 18px;
  background: var(--home-v2-ink);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.home-dashboard--v2 button:focus-visible,
.home-dashboard--v2 input:focus-visible {
  outline: 3px solid rgba(20, 125, 111, 0.18);
  outline-offset: 2px;
}

.home-dashboard--v2 .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

@media (max-width: 1180px) {
  .home-dashboard--v2 {
    padding-right: 26px;
    padding-left: 26px;
  }

  .home-v2-period-shell {
    min-width: 390px;
  }

  .home-v2-metric--hero {
    grid-column: span 6;
  }

  .home-v2-metric--supporting {
    grid-column: span 6;
    min-height: 160px;
  }

  .home-v2-lifecycle-flow {
    grid-template-columns:
      minmax(110px, 1fr) 42px
      minmax(110px, 1fr) 42px
      minmax(110px, 1fr) 42px
      minmax(110px, 1fr) 42px
      minmax(110px, 1fr);
  }

  .home-v2-flow-stage {
    padding: 10px;
  }
}

@media (max-width: 980px) {
  .home-v2-overview-heading,
  .home-v2-rhythm-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .home-v2-period-shell {
    min-width: 0;
  }

  .home-v2-rhythm-summary {
    grid-template-columns: 1fr;
  }

  .home-v2-lifecycle-flow {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .home-v2-flow-stage {
    min-height: 70px;
    grid-template-columns: 1fr auto auto;
    align-items: center;
  }

  .home-v2-flow-stage > i {
    opacity: 1;
  }

  .home-v2-flow-rate {
    grid-template-columns: auto auto;
    justify-content: center;
    gap: 8px;
    padding: 2px 0;
  }

  .home-v2-flow-rate span {
    transform: rotate(90deg);
  }

  .home-v2-behavior-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .home-dashboard--v2 {
    gap: 42px;
    padding: 22px 18px 44px;
  }

  .home-v2-header {
    margin-bottom: -18px;
  }

  .home-v2-overview::before {
    right: 0;
    left: 0;
  }

  .home-dashboard--v2 .home-dashboard-heading h1 {
    font-size: 36px;
  }

  .home-dashboard--v2 .home-dashboard-meta {
    align-items: stretch;
  }

  .home-dashboard--v2 .home-dashboard-meta > div {
    text-align: left;
  }

  .home-v2-coverage {
    width: 100%;
    margin-bottom: -18px;
    border-radius: 11px;
  }

  .home-v2-period-control {
    width: 100%;
    overflow-x: auto;
  }

  .home-v2-period-control button {
    flex: 1 0 auto;
  }

  .home-v2-custom-dates {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .home-v2-custom-dates > i {
    display: none;
  }

  .home-v2-custom-dates > button {
    grid-column: 1 / -1;
  }

  .home-v2-coverage-line {
    flex-wrap: wrap;
  }

  .home-v2-metric--hero,
  .home-v2-metric--supporting {
    min-height: 0;
    grid-column: 1 / -1;
  }

  .home-v2-metric {
    padding: 20px;
  }

  .home-v2-rhythm-summary {
    gap: 20px;
  }

  .home-v2-rhythm-copy {
    grid-template-columns: 1fr 1fr;
  }

  .home-dashboard--v2 .home-section-topline {
    align-items: stretch;
  }

  .home-v2-lifecycle-insight {
    width: 100%;
  }

  .home-v2-analysis-card {
    padding: 19px;
  }

  .home-v2-card-toolbar,
  .home-v2-card-header {
    align-items: stretch;
    flex-direction: column;
  }

  .home-v2-frequency-filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .home-v2-frequency-filters > label:first-child {
    grid-column: 1 / -1;
  }

  .home-range-control {
    width: 100%;
    overflow-x: auto;
  }

  .home-range-control button {
    flex: 1 0 auto;
  }

  .home-v2-query-button {
    align-self: end;
  }

  .home-v2-frequency-results,
  .home-v2-stat-strip {
    grid-template-columns: 1fr;
  }

  .home-v2-stat-strip > div,
  .home-v2-frequency-results > div {
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .home-v2-week-layout {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .home-v2-week-summary {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  .home-v2-week-chart {
    height: 210px;
    gap: 5px;
  }

  .home-v2-week-chart > div > div {
    width: min(100%, 34px);
  }

  .home-v2-modal-layer {
    align-items: end;
    padding: 10px;
  }

  .home-v2-modal {
    width: 100%;
    max-height: calc(100dvh - 20px);
    border-radius: 17px;
  }

  .home-v2-modal > header,
  .home-v2-modal-toolbar,
  .home-v2-modal-grid,
  .home-v2-modal > footer {
    padding-right: 16px;
    padding-left: 16px;
  }

  .home-v2-modal-toolbar,
  .home-v2-modal > footer {
    align-items: stretch;
    flex-direction: column;
  }

  .home-v2-modal-toolbar label {
    width: 100%;
  }

  .home-v2-modal-grid-head {
    display: none;
  }

  .home-v2-modal-row {
    grid-template-columns: 1fr 1fr !important;
    gap: 12px;
    padding: 14px 4px;
  }

  .home-v2-modal-row span {
    display: grid;
    gap: 3px;
  }

  .home-v2-modal-row span::before {
    color: var(--home-v2-muted);
    content: attr(data-label);
    font-size: 9px;
    font-weight: 600;
  }
}

@media (max-width: 430px) {
  .home-dashboard--v2 {
    padding-right: 14px;
    padding-left: 14px;
  }

  .home-dashboard--v2 .home-dashboard-heading h1 {
    font-size: 32px;
  }

  .home-dashboard--v2 .home-dashboard-heading p {
    font-size: 14px;
  }

  .home-v2-custom-dates,
  .home-v2-frequency-filters {
    grid-template-columns: 1fr;
  }

  .home-v2-custom-dates > button,
  .home-v2-frequency-filters > label:first-child {
    grid-column: 1;
  }

  .home-v2-flow-stage {
    grid-template-columns: 1fr auto;
  }

  .home-v2-flow-stage > i {
    grid-column: 1 / -1;
  }

  .home-v2-mini-week {
    gap: 4px;
  }

  .home-v2-modal-row {
    grid-template-columns: 1fr !important;
  }
}

/* Home: state overlays use the actual responsive result structure as their scaffold. */
.home-dashboard .home-layout-frame {
  position: relative;
  min-width: 0;
}

.home-dashboard .home-layout-content {
  display: grid;
  gap: 20px;
  min-width: 0;
}

.home-dashboard .home-layout-content[inert],
.home-dashboard .home-layout-placeholder,
.home-dashboard .home-layout-lifecycle-insight.is-placeholder {
  visibility: hidden;
}

.home-dashboard .home-layout-state {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  min-width: 0;
}

.home-dashboard .home-layout-loading {
  display: grid;
  place-items: center;
  height: 100%;
  border-radius: 12px;
  padding: 16px;
  color: var(--home-v2-muted);
  background: linear-gradient(100deg, #f3f6f8, #fafcfd, #f3f6f8);
}

.home-dashboard .home-layout-summary .home-layout-state .home-state-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 12px;
  min-height: 0;
  padding: 12px;
}

.home-dashboard .home-layout-summary .home-state-card p {
  margin: 0;
  overflow-wrap: anywhere;
}

.home-dashboard .home-layout-content .home-v3-insight {
  min-block-size: 3.2em;
}

.home-dashboard .home-v2-stat-strip strong {
  line-height: 1.5;
}

@media (max-width: 700px) {
  .home-dashboard [data-frequency-query-status] {
    min-block-size: 2lh;
  }

  .home-dashboard .home-layout-content .home-v3-insight {
    min-block-size: 6.4em;
  }
}

/* Home dashboard V3 polish */
.home-dashboard--v2 {
  --home-v3-radius-lg: 16px;
  --home-v3-radius-md: 12px;
  --home-v3-shadow: 0 16px 42px rgba(15, 23, 42, 0.055);
}

.home-v2-metric-grid,
.home-v2-overview,
.home-v2-coverage {
  overflow: visible;
}

.home-v2-metric {
  z-index: 1;
  overflow: visible;
  border-color: rgba(100, 116, 139, 0.1);
  border-radius: var(--home-v3-radius-lg);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.035);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.home-v2-metric:hover,
.home-v2-metric:has(.home-tooltip-trigger:focus-visible) {
  z-index: 30;
  border-color: rgba(100, 116, 139, 0.16);
  box-shadow: var(--home-v3-shadow);
  transform: translateY(-2px);
}

.home-v2-metric::after {
  display: none;
}

.home-v2-metric::before {
  position: absolute;
  top: 23px;
  left: 0;
  width: 2px;
  height: 31px;
  border-radius: 0 999px 999px 0;
  background: var(--home-v2-accent);
  content: "";
  opacity: 0.44;
}

.home-v2-metric--priority-primary {
  min-height: 224px;
  border-color: rgba(20, 125, 111, 0.15);
  background:
    radial-gradient(circle at 94% 10%, rgba(20, 125, 111, 0.08), transparent 38%),
    #fff;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.065);
}

.home-v2-metric--priority-primary::before {
  width: 3px;
  height: 38px;
  opacity: 0.86;
}

.home-v2-metric--priority-primary .home-v2-metric-value strong {
  font-size: clamp(48px, 5vw, 68px);
}

.home-v2-metric--priority-secondary {
  min-height: 214px;
  background:
    radial-gradient(circle at 94% 10%, rgba(61, 89, 126, 0.055), transparent 38%),
    #fff;
}

.home-v2-metric--priority-secondary::before {
  background: #6886a3;
  opacity: 0.66;
}

.home-v2-metric--priority-secondary .home-v2-metric-value strong {
  font-size: clamp(44px, 4.6vw, 59px);
}

.home-v2-metric--priority-tertiary,
.home-v2-metric--priority-quaternary {
  min-height: 174px;
  box-shadow: none;
}

.home-v2-metric--priority-tertiary .home-v2-metric-value strong {
  font-size: clamp(34px, 3vw, 43px);
}

.home-v2-metric--priority-quaternary::before {
  background: #97a4b2;
  opacity: 0.32;
}

.home-v2-metric--priority-quaternary .home-v2-metric-value strong {
  font-size: clamp(31px, 2.7vw, 39px);
}

.home-tooltip-trigger {
  position: relative;
  z-index: 2;
  overflow: visible;
}

.home-tooltip-trigger > span:first-child {
  display: block;
  line-height: 1;
}

.home-tooltip-bubble {
  position: absolute;
  z-index: 120;
  bottom: calc(100% + 10px);
  left: 50%;
  width: min(248px, calc(100vw - 48px));
  border: 1px solid rgba(100, 116, 139, 0.15);
  border-radius: 10px;
  padding: 9px 11px;
  background: rgba(19, 29, 45, 0.97);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.2);
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.55;
  opacity: 0;
  pointer-events: none;
  text-align: left;
  transform: translate(-50%, 5px);
  transition:
    opacity 160ms ease,
    transform 160ms ease,
    visibility 160ms ease;
  visibility: hidden;
  white-space: normal;
}

.home-tooltip-trigger[data-tooltip-align="start"] .home-tooltip-bubble {
  right: auto;
  left: -8px;
  transform: translateY(5px);
}

.home-tooltip-trigger[data-tooltip-align="end"] .home-tooltip-bubble {
  right: -8px;
  left: auto;
  transform: translateY(5px);
}

.home-tooltip-trigger:hover .home-tooltip-bubble,
.home-tooltip-trigger:focus .home-tooltip-bubble,
.home-tooltip-trigger:focus-visible .home-tooltip-bubble {
  opacity: 1;
  transform: translate(-50%, 0);
  visibility: visible;
}

.home-tooltip-trigger[data-tooltip-align="start"]:hover .home-tooltip-bubble,
.home-tooltip-trigger[data-tooltip-align="start"]:focus .home-tooltip-bubble,
.home-tooltip-trigger[data-tooltip-align="start"]:focus-visible .home-tooltip-bubble,
.home-tooltip-trigger[data-tooltip-align="end"]:hover .home-tooltip-bubble,
.home-tooltip-trigger[data-tooltip-align="end"]:focus .home-tooltip-bubble,
.home-tooltip-trigger[data-tooltip-align="end"]:focus-visible .home-tooltip-bubble {
  transform: translateY(0);
}

.home-v2-lifecycle-section {
  gap: 12px !important;
}

.home-dashboard--v2 .home-section-topline {
  gap: 24px;
}

.home-v2-lifecycle-insight {
  max-width: 480px;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 5px 9px;
  border-left-width: 1px;
  padding-left: 13px;
}

.home-v2-lifecycle-insight span {
  grid-row: 1;
}

.home-v2-lifecycle-insight strong {
  grid-column: 2;
  grid-row: 1;
  font-size: 12px;
  font-weight: 700;
}

.home-v2-lifecycle-insight small {
  grid-column: 3;
  grid-row: 1;
  white-space: nowrap;
}

.home-v2-lifecycle-flow {
  gap: 3px;
  padding: 8px 0;
}

.home-v2-flow-stage {
  position: relative;
  min-height: 64px;
  gap: 3px;
  border-radius: var(--home-v3-radius-md);
  padding: 8px 10px;
}

.home-v2-flow-stage > strong {
  font-size: 23px;
}

.home-v2-flow-stage > i {
  position: absolute;
  top: 8px;
  right: 9px;
}

.home-v2-flow-rate {
  gap: 1px;
}

.home-v2-analysis-card {
  gap: 17px;
  overflow: visible;
  border: 1px solid rgba(100, 116, 139, 0.09);
  border-top: 0;
  border-radius: var(--home-v3-radius-lg);
  padding: 24px 25px;
  box-shadow: var(--home-v3-shadow);
}

.home-v2-analysis-card::before {
  position: absolute;
  top: 25px;
  left: 0;
  width: 2px;
  height: 34px;
  border-radius: 0 999px 999px 0;
  background: rgba(20, 125, 111, 0.58);
  content: "";
}

.home-v2-behavior-grid .home-v2-analysis-card:nth-child(2) {
  border-top-color: transparent;
}

.home-v2-behavior-grid .home-v2-analysis-card:nth-child(2)::before {
  background: rgba(61, 89, 126, 0.54);
}

.home-v3-number {
  animation: home-v3-number-enter 260ms cubic-bezier(0.22, 1, 0.36, 1);
  transform-origin: left bottom;
}

@keyframes home-v3-number-enter {
  from {
    filter: blur(1.5px);
    opacity: 0.35;
    transform: translateY(5px);
  }

  to {
    filter: blur(0);
    opacity: 1;
    transform: translateY(0);
  }
}

.home-v3-insight {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: -2px 0 0;
  border-left: 1px solid rgba(20, 125, 111, 0.42);
  padding: 2px 0 2px 11px;
  color: #5b6879;
  font-size: 11px;
  line-height: 1.55;
}

.home-v3-insight > span {
  flex: 0 0 auto;
  color: var(--home-v2-accent-dark);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.home-v3-insight--rhythm {
  width: fit-content;
  max-width: 100%;
  margin-top: -4px;
}

.home-v2-week-chart {
  overflow: visible;
}

.home-v2-week-chart > div {
  position: relative;
  border-radius: 10px;
  outline: 0;
}

.home-v2-week-chart > div:focus-visible {
  box-shadow: 0 0 0 3px rgba(20, 125, 111, 0.14);
}

.home-v2-week-chart > div > .home-v3-bar-tooltip {
  position: absolute;
  z-index: 80;
  top: 2px;
  left: 50%;
  display: grid;
  width: 180px;
  height: auto;
  gap: 4px;
  overflow: visible;
  border: 1px solid rgba(100, 116, 139, 0.14);
  border-radius: 10px;
  padding: 10px 11px;
  background: rgba(19, 29, 45, 0.97);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.2);
  color: #e7edf4;
  opacity: 0;
  pointer-events: none;
  text-align: left;
  transform: translate(-50%, -6px);
  transition:
    opacity 160ms ease,
    transform 160ms ease,
    visibility 160ms ease;
  visibility: hidden;
}

.home-v2-week-chart > div:first-child > .home-v3-bar-tooltip {
  left: 0;
  transform: translateY(-6px);
}

.home-v2-week-chart > div:last-child > .home-v3-bar-tooltip {
  right: 0;
  left: auto;
  transform: translateY(-6px);
}

.home-v2-week-chart > div:hover > .home-v3-bar-tooltip,
.home-v2-week-chart > div:focus > .home-v3-bar-tooltip,
.home-v2-week-chart > div:focus-visible > .home-v3-bar-tooltip {
  opacity: 1;
  transform: translate(-50%, 0);
  visibility: visible;
}

.home-v2-week-chart > div:first-child:hover > .home-v3-bar-tooltip,
.home-v2-week-chart > div:first-child:focus > .home-v3-bar-tooltip,
.home-v2-week-chart > div:first-child:focus-visible > .home-v3-bar-tooltip,
.home-v2-week-chart > div:last-child:hover > .home-v3-bar-tooltip,
.home-v2-week-chart > div:last-child:focus > .home-v3-bar-tooltip,
.home-v2-week-chart > div:last-child:focus-visible > .home-v3-bar-tooltip {
  transform: translateY(0);
}

.home-v3-bar-tooltip > strong {
  margin-bottom: 2px;
  color: #fff;
  font-size: 12px;
}

.home-v3-bar-tooltip > span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #aeb9c7;
  font-size: 10px;
}

.home-v3-bar-tooltip b {
  color: #fff;
  font-weight: 700;
}

.home-v2-modal > header,
.home-v2-modal-toolbar {
  position: sticky;
  z-index: 4;
  background: #fff;
}

.home-v2-modal > header {
  top: 0;
}

.home-v2-modal-toolbar {
  top: 0;
  box-shadow: 0 7px 18px rgba(15, 23, 42, 0.035);
}

.home-v2-modal-grid-head {
  z-index: 3;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 14px rgba(15, 23, 42, 0.025);
  backdrop-filter: blur(8px);
}

@media (max-width: 1180px) {
  .home-v2-metric--priority-primary,
  .home-v2-metric--priority-secondary,
  .home-v2-metric--priority-tertiary,
  .home-v2-metric--priority-quaternary {
    grid-column: span 6;
  }

  .home-v2-metric--priority-tertiary,
  .home-v2-metric--priority-quaternary {
    min-height: 156px;
  }
}

@media (max-width: 980px) {
  .home-v2-lifecycle-insight {
    max-width: none;
  }

  .home-v2-lifecycle-flow {
    gap: 2px;
  }

  .home-v2-flow-stage {
    min-height: 58px;
  }

  .home-v2-flow-stage > i {
    position: static;
  }
}

@media (max-width: 700px) {
  .home-v2-metric--priority-primary,
  .home-v2-metric--priority-secondary,
  .home-v2-metric--priority-tertiary,
  .home-v2-metric--priority-quaternary {
    min-height: 0;
    grid-column: 1 / -1;
  }

  .home-v2-metric--priority-primary .home-v2-metric-value strong {
    font-size: 54px;
  }

  .home-v2-metric--priority-secondary .home-v2-metric-value strong {
    font-size: 48px;
  }

  .home-tooltip-bubble,
  .home-tooltip-trigger[data-tooltip-align="start"] .home-tooltip-bubble,
  .home-tooltip-trigger[data-tooltip-align="center"] .home-tooltip-bubble,
  .home-tooltip-trigger[data-tooltip-align="end"] .home-tooltip-bubble {
    position: fixed;
    right: 22px;
    bottom: max(22px, env(safe-area-inset-bottom));
    left: 22px;
    width: auto;
    transform: translateY(5px);
  }

  .home-tooltip-trigger:hover .home-tooltip-bubble,
  .home-tooltip-trigger:focus .home-tooltip-bubble,
  .home-tooltip-trigger:focus-visible .home-tooltip-bubble {
    transform: translateY(0);
  }

  .home-v2-lifecycle-insight {
    grid-template-columns: 1fr auto;
  }

  .home-v2-lifecycle-insight span {
    grid-column: 1 / -1;
  }

  .home-v2-lifecycle-insight strong {
    grid-column: 1;
    grid-row: 2;
  }

  .home-v2-lifecycle-insight small {
    grid-column: 2;
    grid-row: 2;
  }

  .home-v3-insight {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .home-v2-week-chart > div > .home-v3-bar-tooltip {
    width: 154px;
  }

  .home-v2-week-chart > div:nth-child(-n + 3) > .home-v3-bar-tooltip {
    right: auto;
    left: 0;
    transform: translateY(-6px);
  }

  .home-v2-week-chart > div:nth-child(n + 5) > .home-v3-bar-tooltip {
    right: 0;
    left: auto;
    transform: translateY(-6px);
  }

  .home-v2-week-chart > div:nth-child(-n + 3):hover > .home-v3-bar-tooltip,
  .home-v2-week-chart > div:nth-child(-n + 3):focus > .home-v3-bar-tooltip,
  .home-v2-week-chart > div:nth-child(n + 5):hover > .home-v3-bar-tooltip,
  .home-v2-week-chart > div:nth-child(n + 5):focus > .home-v3-bar-tooltip {
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-v3-number,
  .home-tooltip-bubble,
  .home-v3-bar-tooltip {
    animation: none;
    transition: none;
  }
}

/* v0.6.6 stage 1-B — formal business cockpit presentation. */
.home-dashboard--cockpit {
  --home-cockpit-border: rgba(100, 116, 139, 0.12);
  --home-cockpit-soft: rgba(239, 246, 244, 0.72);
  position: relative;
  isolation: isolate;
}

.home-dashboard--cockpit .home-v2-header {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 26px 34px;
  overflow: hidden;
  margin-bottom: -24px;
  border: 1px solid rgba(20, 125, 111, 0.1);
  border-radius: 22px;
  padding: 30px 32px 26px;
  background:
    radial-gradient(circle at 92% 8%, rgba(20, 125, 111, 0.08), transparent 32%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(246, 250, 249, 0.96));
  box-shadow: 0 20px 52px rgba(15, 23, 42, 0.06);
}

.home-dashboard--cockpit .home-v2-header::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  background: linear-gradient(180deg, #147d6f, rgba(20, 125, 111, 0.18));
  content: "";
}

.home-dashboard--cockpit .home-v2-hero-copy {
  position: relative;
  z-index: 1;
  display: grid;
  min-width: 0;
  gap: 0;
}

.home-dashboard--cockpit .home-dashboard-eyebrow {
  color: #147d6f;
  font-size: 11px;
  letter-spacing: 0.14em;
}

.home-dashboard--cockpit .home-dashboard-heading h1 {
  max-width: none;
  margin-top: 10px;
  font-size: clamp(38px, 4.4vw, 58px);
}

.home-dashboard--cockpit .home-dashboard-heading > p {
  margin-top: 12px;
  color: #5d6979;
}

.home-dashboard--cockpit .home-dashboard-meta {
  position: relative;
  z-index: 1;
  align-self: start;
  border-left: 1px solid rgba(100, 116, 139, 0.14);
  padding-left: 24px;
}

.home-dashboard--cockpit .home-dashboard-meta span,
.home-dashboard--cockpit .home-dashboard-meta small {
  color: #6d7888;
}

.home-dashboard--cockpit .home-refresh-button {
  background: #fff;
}

.home-v2-hero-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(92px, 0.8fr)) minmax(150px, 1.35fr);
  gap: 0;
  min-width: 0;
  margin-top: 24px;
  border-top: 1px solid rgba(100, 116, 139, 0.13);
  padding-top: 18px;
}

.home-v2-hero-stat {
  display: grid;
  min-width: 0;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  gap: 4px 6px;
  border-right: 1px solid rgba(100, 116, 139, 0.12);
  padding: 0 16px;
}

.home-v2-hero-stat:first-child {
  padding-left: 0;
}

.home-v2-hero-stat:last-child {
  border-right: 0;
  padding-right: 0;
}

.home-v2-hero-stat > span {
  grid-column: 1 / -1;
  color: #758091;
  font-size: 11px;
  font-weight: 700;
}

.home-v2-hero-stat > strong {
  min-width: 0;
  color: #172236;
  font-size: 22px;
  font-weight: 760;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.home-v2-hero-stat > small {
  overflow: hidden;
  color: #738092;
  font-size: 10px;
  line-height: 1.45;
  text-overflow: ellipsis;
}

.home-v2-hero-stat--range > strong {
  font-size: 17px;
}

.home-dashboard--cockpit .home-v2-coverage {
  margin-left: 10px;
  border-color: rgba(181, 139, 54, 0.19);
  background: rgba(255, 252, 243, 0.9);
}

.home-dashboard--cockpit > .home-dashboard-section:not(.home-v2-overview) {
  border-top: 1px solid var(--home-cockpit-border);
  padding-top: 34px;
}

.home-dashboard--cockpit .home-v2-overview::before {
  top: -18px;
  right: -18px;
  bottom: -20px;
  left: -18px;
  border: 1px solid rgba(100, 116, 139, 0.06);
  background:
    radial-gradient(circle at 8% 0%, rgba(20, 125, 111, 0.07), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(242, 246, 248, 0.28));
}

.home-dashboard--cockpit .home-v2-metric {
  border-color: rgba(100, 116, 139, 0.11);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.04);
}

.home-dashboard--cockpit .home-v2-metric--priority-primary {
  border-color: rgba(20, 125, 111, 0.18);
  box-shadow: 0 20px 48px rgba(20, 65, 58, 0.09);
}

.home-dashboard--cockpit .home-v2-metric--priority-secondary {
  border-color: rgba(72, 99, 132, 0.15);
}

.home-dashboard--cockpit .home-v2-lifecycle-flow {
  border: 1px solid rgba(100, 116, 139, 0.08);
  border-radius: 16px;
  padding: 10px 12px;
  background: rgba(249, 251, 251, 0.74);
}

.home-dashboard--cockpit .home-v2-analysis-card {
  border-color: rgba(100, 116, 139, 0.1);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.055);
}

.home-dashboard--cockpit .home-v2-query-version {
  border: 1px solid rgba(100, 116, 139, 0.1);
  background: #f7f9fa;
  color: #637083;
  font-weight: 700;
}

.home-dashboard--cockpit .home-v2-week-layout {
  border: 1px solid rgba(100, 116, 139, 0.08);
  border-radius: 16px;
  padding: 24px;
  background: rgba(249, 251, 251, 0.72);
}

@media (max-width: 980px) {
  .home-dashboard--cockpit .home-v2-header {
    grid-template-columns: 1fr;
  }

  .home-dashboard--cockpit .home-dashboard-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid rgba(100, 116, 139, 0.12);
    border-left: 0;
    padding-top: 18px;
    padding-left: 0;
  }
}

@media (max-width: 700px) {
  .home-dashboard--cockpit .home-v2-header {
    margin-bottom: -14px;
    border-radius: 18px;
    padding: 24px 20px 20px;
  }

  .home-dashboard--cockpit .home-dashboard-heading h1 {
    font-size: 36px;
  }

  .home-v2-hero-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 16px;
    margin-top: 20px;
    padding-top: 16px;
  }

  .home-v2-hero-stat {
    min-height: 52px;
    padding: 0 12px;
  }

  .home-v2-hero-stat:nth-child(2) {
    border-right: 0;
  }

  .home-v2-hero-stat:nth-child(3) {
    padding-left: 0;
  }

  .home-v2-hero-stat--range {
    border-right: 0;
  }

  .home-dashboard--cockpit .home-dashboard-meta {
    align-items: stretch;
  }

  .home-dashboard--cockpit .home-v2-coverage {
    margin-left: 0;
  }

  .home-dashboard--cockpit > .home-dashboard-section:not(.home-v2-overview) {
    padding-top: 28px;
  }

  .home-dashboard--cockpit .home-v2-lifecycle-flow,
  .home-dashboard--cockpit .home-v2-week-layout {
    padding: 14px;
  }
}

/* v0.6.7 — lightweight member query workspace. */
.content:has(.member-query-page) {
  background: #f5f7f8;
}

.member-query-page {
  display: grid;
  width: 100%;
  max-width: 1500px;
  min-width: 0;
  margin: 0 auto;
  gap: 22px;
  color: #172236;
}

.member-query-page > .page-header {
  margin-bottom: 0;
  padding: 6px 2px 0;
}

.member-query-page .page-title {
  color: #121d2f;
  font-size: clamp(28px, 2.4vw, 34px);
  font-weight: 760;
  letter-spacing: -0.025em;
}

.member-query-page .page-desc {
  margin-top: 7px;
  color: #667284;
  font-size: 14px;
}

.member-query-page .dashboard-stack {
  gap: 22px;
}

.member-query-shell {
  gap: 14px;
}

.member-query-heading {
  align-items: flex-end;
  padding: 0 2px;
}

.member-query-heading-copy h2 {
  color: #1a2537;
  font-size: 19px;
  font-weight: 740;
  letter-spacing: -0.012em;
}

.member-query-heading-copy p {
  margin-top: 5px;
  color: #758092;
  font-size: 13px;
  line-height: 1.55;
}

.member-query-create-button {
  min-height: 40px;
  border-radius: 10px;
  padding: 0 17px;
  box-shadow: 0 7px 18px rgba(20, 125, 111, 0.13);
}

.member-query-page .filter-card {
  display: grid;
  gap: 10px;
  border-color: rgba(100, 116, 139, 0.13);
  border-radius: 15px;
  padding: 14px 16px 12px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.045);
}

.member-query-page .member-primary-filters {
  grid-template-columns: minmax(250px, 1.55fr) minmax(160px, 0.9fr) minmax(150px, 0.82fr) minmax(188px, 0.82fr);
  align-items: end;
  gap: 10px;
}

.member-query-page .filter-grid label {
  gap: 5px;
  color: #687587;
  font-size: 12px;
  font-weight: 650;
}

.member-query-page .filter-grid input,
.member-query-page .filter-grid select {
  min-height: 40px;
  border-color: #dbe1e8;
  border-radius: 10px;
  padding-right: 11px;
  padding-left: 11px;
  color: #243247;
  font-size: 13px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.member-query-page .filter-grid input:hover,
.member-query-page .filter-grid select:hover {
  border-color: #bdc8d2;
}

.member-query-page .filter-grid input:focus,
.member-query-page .filter-grid select:focus {
  border-color: rgba(20, 125, 111, 0.68);
  box-shadow: 0 0 0 3px rgba(20, 125, 111, 0.1);
}

.member-query-page .filter-actions {
  justify-content: flex-end;
  gap: 7px;
}

.member-query-page .filter-actions > button {
  min-height: 40px;
  flex: 0 1 auto;
  border-radius: 10px;
  padding: 0 15px;
  white-space: nowrap;
}

.member-query-page .filter-actions > .primary-button {
  min-width: 72px;
}

.member-query-page .member-quick-filters {
  gap: 6px;
  margin-top: 0;
}

.member-query-page .filter-chip {
  border-color: #dce2e8;
  border-radius: 999px;
  padding: 6px 11px;
  background: #fafbfc;
  color: #687587;
  font-size: 12px;
  font-weight: 650;
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.member-query-page .filter-chip:hover {
  border-color: #b9cbc7;
  background: #f4f8f7;
}

.member-query-page .filter-chip.is-active {
  border-color: rgba(20, 125, 111, 0.3);
  background: #edf7f4;
  color: #116d61;
}

.member-query-page .filter-more {
  margin-top: 0;
  border-top-color: #edf0f3;
  padding-top: 8px;
}

.member-query-page .filter-more summary {
  color: #536174;
  font-size: 12px;
  font-weight: 680;
}

.member-query-page .filter-more summary:hover {
  color: #116d61;
}

.member-query-page .filter-more-content {
  margin-top: 10px;
}

.member-query-page .filter-note {
  margin: 0;
  color: #87919f;
  font-size: 11px;
  line-height: 1.55;
}

.member-query-results {
  min-width: 0;
}

.member-query-result-summary {
  margin: 0 0 8px;
  border: 0;
  padding: 0 2px;
  background: transparent;
  color: #707c8d;
  font-size: 12px;
  font-weight: 650;
}

.member-query-page .member-table-card {
  border-color: rgba(100, 116, 139, 0.13);
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.05);
}

.member-query-page .table-scroll {
  border-radius: 15px 15px 0 0;
}

.member-query-page .member-table {
  min-width: 1160px;
}

.member-query-page .member-table th,
.member-query-page .member-table td {
  border-bottom-color: #edf0f3;
  padding: 14px 15px;
  vertical-align: middle;
}

.member-query-page .member-table th {
  background: #f7f9fa;
  color: #667386;
  font-size: 12px;
  font-weight: 740;
  letter-spacing: 0.01em;
}

.member-query-page .member-table td {
  color: #344155;
  font-size: 13px;
}

.member-query-page .member-table tbody tr {
  transition: background 0.15s ease;
}

.member-query-page .member-table tbody tr:hover td {
  background: #f5faf8;
}

.member-query-page .member-name-button {
  color: #176f65;
  font-weight: 750;
  text-decoration: none;
}

.member-query-page .member-name-button:hover {
  color: #0f5c53;
}

.member-query-page .table-secondary {
  margin-top: 4px;
  color: #8993a1;
  font-size: 11px;
}

.member-query-page .row-actions {
  flex-wrap: nowrap;
  gap: 6px;
}

.member-query-page .member-table .primary-button.small,
.member-query-page .member-table .ghost-button.small,
.member-query-page .member-table .action-menu > summary {
  min-height: 32px;
  border-radius: 8px;
  padding: 0 10px;
  font-size: 12px;
  white-space: nowrap;
}

.member-query-page .member-table .primary-button.small {
  box-shadow: none;
}

.member-query-page .member-table .action-menu-popover {
  min-width: 142px;
  margin-top: 7px;
  border-color: #e1e6eb;
  border-radius: 9px;
  padding: 5px;
  background: #fafbfc;
}

.member-query-page .member-table .action-menu-popover button {
  border-radius: 6px;
  padding: 8px 9px;
  font-size: 12px;
}

.member-query-page .pagination-row {
  border-top: 1px solid #edf0f3;
  padding: 13px 15px;
  background: #fbfcfd;
}

.member-query-page .pagination-summary,
.member-query-page .pagination-page-size-text,
.member-query-page .pagination-size-control,
.member-query-page .pagination-jump-control {
  color: #727e8f;
  font-size: 12px;
}

.member-query-page .pagination-size-control select,
.member-query-page .pagination-jump-control input {
  border-color: #dbe1e8;
  border-radius: 8px;
  background: #fff;
}

@media (max-width: 980px) {
  .member-query-page .member-primary-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .member-query-page .filter-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .member-query-page {
    gap: 18px;
  }

  .member-query-page > .page-header {
    padding-top: 2px;
  }

  .member-query-page .page-title {
    font-size: 27px;
  }

  .member-query-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .member-query-create-button {
    width: 100%;
  }

  .member-query-page .filter-card {
    border-radius: 13px;
    padding: 13px;
  }

  .member-query-page .member-primary-filters {
    grid-template-columns: 1fr;
  }

  .member-query-page .filter-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .member-query-page .filter-actions > button {
    width: 100%;
  }

  .member-query-page .member-quick-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 3px;
    scrollbar-width: thin;
  }

  .member-query-page .filter-chip {
    flex: 0 0 auto;
  }

  .member-query-page .member-table-card,
  .member-query-page .table-scroll {
    border-radius: 13px;
  }

  .member-query-page .table-scroll {
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
  }

  .member-query-page .pagination-row {
    padding: 12px;
  }
}

/* v0.6.7 stage 2 — member detail workspace and renewal visual alignment. */
.member-query-page .member-table .action-menu {
  z-index: 1;
}

.member-query-page .member-table .action-menu[open] {
  z-index: 80;
}

.member-query-page .member-table .action-menu-popover {
  position: absolute;
  z-index: 90;
  top: calc(100% + 6px);
  right: 0;
  left: auto;
  margin: 0;
  background: #fff;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.14);
}

.content:has(.member-detail-page),
.content:has(.renewal-workspace) {
  background: #f5f7f8;
}

.member-detail-page {
  width: 100%;
  max-width: 1360px;
  min-width: 0;
  margin: 0 auto;
  color: #172236;
}

.member-detail-view {
  display: grid;
  min-width: 0;
  gap: 18px;
}

.member-detail-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 20px;
  border: 1px solid rgba(100, 116, 139, 0.13);
  border-radius: 18px;
  padding: 54px 24px 22px;
  background: #fff;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.05);
}

.member-detail-back {
  position: absolute;
  top: 17px;
  left: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  padding: 4px 0;
  background: transparent;
  color: #637083;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}

.member-detail-back:hover,
.member-detail-back:focus-visible {
  color: #116d61;
  outline: none;
}

.member-detail-identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 16px;
}

.member-detail-avatar {
  display: grid;
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  place-items: center;
  border-radius: 15px;
  background: #e9f5f2;
  color: #116d61;
  font-size: 21px;
  font-weight: 780;
}

.member-detail-eyebrow {
  margin: 0 0 3px;
  color: #718094;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.member-detail-identity h1 {
  margin: 0;
  color: #111d2f;
  font-size: clamp(26px, 2.6vw, 34px);
  font-weight: 780;
  letter-spacing: -0.025em;
}

.member-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 7px;
  color: #697689;
  font-size: 13px;
}

.member-detail-status,
.member-detail-kind {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 8px;
  background: #edf7f4;
  color: #116d61;
  font-size: 12px;
  font-weight: 700;
}

.member-detail-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.member-detail-actions > button,
.member-detail-actions > .action-menu > summary {
  min-height: 38px;
  border-radius: 9px;
  padding: 0 14px;
}

.member-detail-actions .action-menu-popover {
  min-width: 150px;
}

.member-detail-profile {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border-color: rgba(100, 116, 139, 0.13);
  border-radius: 15px;
  padding: 0;
  box-shadow: none;
}

.member-detail-profile-item {
  display: grid;
  min-width: 0;
  gap: 6px;
  border-left: 1px solid #edf0f3;
  padding: 16px 18px;
}

.member-detail-profile-item:first-child {
  border-left: 0;
}

.member-detail-profile-item span,
.member-detail-metric > span {
  color: #748094;
  font-size: 12px;
  font-weight: 680;
}

.member-detail-profile-item strong {
  color: #263449;
  font-size: 14px;
  font-weight: 720;
  overflow-wrap: anywhere;
}

.member-detail-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.member-detail-metric {
  display: grid;
  min-width: 0;
  gap: 7px;
  border-color: rgba(100, 116, 139, 0.12);
  border-radius: 15px;
  padding: 18px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.04);
}

.member-detail-metric > strong {
  color: #172236;
  font-size: 24px;
  font-weight: 780;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.member-detail-metric > small {
  color: #7b8798;
  font-size: 12px;
  line-height: 1.5;
}

.member-detail-section-card {
  min-width: 0;
  border-color: rgba(100, 116, 139, 0.12);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.045);
}

.member-detail-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 15px;
}

.member-detail-section-heading h2 {
  margin: 0;
  color: #182438;
  font-size: 18px;
  font-weight: 750;
}

.member-detail-section-heading p {
  margin: 5px 0 0;
  color: #778396;
  font-size: 13px;
  line-height: 1.5;
}

.member-detail-table-scroll {
  max-width: 100%;
  overflow-x: auto;
}

.member-detail-purchase-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
}

.member-detail-purchase-table th,
.member-detail-purchase-table td {
  border-bottom: 1px solid #edf0f3;
  padding: 12px 14px;
  color: #344155;
  font-size: 13px;
  text-align: left;
}

.member-detail-purchase-table th {
  background: #f7f9fa;
  color: #687587;
  font-size: 12px;
  font-weight: 730;
}

.member-detail-purchase-table tbody tr:last-child td {
  border-bottom: 0;
}

.member-detail-compact-empty {
  margin: 0;
  border-radius: 10px;
  padding: 16px;
  background: #f7f9fa;
  color: #7b8798;
  font-size: 13px;
  text-align: center;
}

.member-class-timeline {
  display: grid;
  gap: 17px;
}

.member-class-month {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 18px;
}

.member-class-month > h3 {
  margin: 4px 0 0;
  color: #536174;
  font-size: 13px;
  font-weight: 720;
}

.member-class-month-items {
  display: grid;
}

.member-class-timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 14px;
  border-left: 1px solid #dce6e3;
  padding: 0 0 18px 20px;
}

.member-class-timeline-item:last-child {
  padding-bottom: 2px;
}

.member-class-timeline-dot {
  position: absolute;
  top: 4px;
  left: -5px;
  width: 9px;
  height: 9px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #188071;
  box-shadow: 0 0 0 1px #b9d9d2;
}

.member-class-timeline-item time {
  color: #697689;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.member-class-timeline-copy {
  display: grid;
  gap: 4px;
}

.member-class-timeline-copy strong {
  color: #253348;
  font-size: 14px;
}

.member-class-timeline-copy span {
  color: #7a8697;
  font-size: 12px;
}

.renewal-workspace {
  display: grid;
  width: 100%;
  max-width: 1500px;
  min-width: 0;
  margin: 0 auto;
  gap: 22px;
  color: #172236;
}

.renewal-workspace > .page-header {
  gap: 18px;
  margin: 0;
  padding: 6px 2px 0;
}

.renewal-workspace .page-title {
  color: #121d2f;
  font-size: clamp(28px, 2.4vw, 34px);
  font-weight: 760;
  letter-spacing: -0.025em;
}

.renewal-workspace .page-desc {
  margin-top: 7px;
  color: #667284;
  font-size: 14px;
}

.renewal-workspace .renewal-analysis-filters {
  border-color: rgba(100, 116, 139, 0.13);
  border-radius: 15px;
  padding: 15px 16px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.045);
}

.renewal-workspace .renewal-filter-field {
  color: #687587;
  font-size: 12px;
  font-weight: 650;
}

.renewal-workspace .renewal-filter-field input,
.renewal-workspace .renewal-filter-field select,
.renewal-workspace .renewal-coach-multi > summary {
  min-height: 40px;
  border-color: #dbe1e8;
  border-radius: 10px;
  color: #243247;
}

.renewal-workspace .renewal-filter-actions > button {
  min-height: 40px;
  border-radius: 10px;
}

.renewal-workspace .renewal-filter-context {
  border-top-color: #edf0f3;
  color: #758194;
  font-size: 12px;
}

.renewal-workspace .renewal-analysis-panel {
  display: grid;
  gap: 15px;
  border: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.renewal-workspace .renewal-insight {
  margin: 0;
  border-color: #d7e8e4;
  border-left-color: #188071;
  border-radius: 12px;
  padding: 12px 14px;
  background: #f8fbfa;
}

.renewal-workspace .renewal-core-grid {
  gap: 12px;
  margin: 0;
}

.renewal-workspace .renewal-core-card {
  min-height: 118px;
  border-color: rgba(100, 116, 139, 0.12);
  border-radius: 15px;
  padding: 17px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.04);
}

.renewal-workspace .renewal-core-card--weakest {
  border-color: rgba(100, 116, 139, 0.12);
  box-shadow: inset 3px 0 0 #d18a4f, 0 10px 28px rgba(15, 23, 42, 0.04);
}

.renewal-workspace .renewal-core-value {
  color: #172236;
  font-size: 25px;
  letter-spacing: -0.02em;
}

.renewal-workspace .renewal-retention-flow,
.renewal-workspace .renewal-coach-comparison,
.renewal-workspace .renewal-methodology {
  border-color: rgba(100, 116, 139, 0.12);
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.04);
}

.renewal-workspace .renewal-coach-comparison {
  margin: 0;
}

@media (max-width: 900px) {
  .member-detail-hero {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .member-detail-actions {
    justify-content: flex-start;
  }

  .member-detail-profile {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .member-detail-profile-item:nth-child(odd) {
    border-left: 0;
  }

  .member-detail-profile-item:nth-child(n + 3) {
    border-top: 1px solid #edf0f3;
  }

  .member-detail-metrics {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .member-detail-hero {
    border-radius: 15px;
    padding: 52px 16px 17px;
  }

  .member-detail-back {
    left: 16px;
  }

  .member-detail-identity {
    align-items: flex-start;
  }

  .member-detail-avatar {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
    border-radius: 12px;
    font-size: 18px;
  }

  .member-detail-identity h1 {
    font-size: 25px;
  }

  .member-detail-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .member-detail-actions > button,
  .member-detail-actions > .action-menu,
  .member-detail-actions > .action-menu > summary {
    width: 100%;
  }

  .member-detail-profile {
    grid-template-columns: 1fr;
  }

  .member-detail-profile-item,
  .member-detail-profile-item:nth-child(odd) {
    border-top: 1px solid #edf0f3;
    border-left: 0;
  }

  .member-detail-profile-item:first-child {
    border-top: 0;
  }

  .member-detail-section-card {
    border-radius: 14px;
    padding: 16px;
  }

  .member-detail-section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .member-class-month {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .member-class-timeline-item {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .renewal-workspace {
    gap: 18px;
  }

  .renewal-workspace > .page-header {
    padding-top: 2px;
  }

  .renewal-workspace .page-title {
    font-size: 27px;
  }

  .renewal-workspace .renewal-analysis-filters {
    border-radius: 13px;
    padding: 13px;
  }
}

/* v0.6.8-B1 — coach business team overview entry. */
.coach-home-team-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 0.42fr) minmax(184px, 0.32fr);
  align-items: center;
  gap: 28px;
  overflow: hidden;
  border: 1px solid rgba(20, 125, 111, 0.14);
  border-radius: 22px;
  padding: 34px 36px;
  background:
    radial-gradient(circle at 92% 12%, rgba(20, 125, 111, 0.1), transparent 36%),
    linear-gradient(135deg, #f7fbfa 0%, #f4f7f8 100%);
  box-shadow: 0 22px 54px rgba(15, 23, 42, 0.06);
}

.coach-home-team-hero::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  background: #147d6f;
  content: "";
}

.coach-home-team-hero.is-loading {
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.3fr);
}

.coach-home-team-hero-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 9px;
  min-width: 0;
}

.coach-home-team-hero-copy > span,
.coach-home-team-heading > div > span {
  color: #147d6f;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.coach-home-team-hero-copy h2,
.coach-home-team-heading h2 {
  margin: 0;
  color: #172236;
  letter-spacing: -0.035em;
}

.coach-home-team-hero-copy h2 {
  font-size: clamp(29px, 3.1vw, 44px);
}

.coach-home-team-hero-copy p,
.coach-home-team-heading p {
  max-width: 680px;
  margin: 0;
  color: #647184;
  font-size: 13px;
  line-height: 1.65;
}

.coach-home-team-count {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 5px;
  min-width: 0;
}

.coach-home-team-count > span,
.coach-home-team-count > p {
  margin: 0;
  color: #6c788a;
  font-size: 11px;
  line-height: 1.5;
}

.coach-home-team-scope,
.coach-home-team-summary {
  position: relative;
  z-index: 1;
  min-width: 0;
  border-left: 1px solid rgba(100, 116, 139, 0.14);
  padding-left: 26px;
}

.coach-home-team-scope {
  display: grid;
  align-content: center;
  gap: 7px;
}

.coach-home-team-scope > span,
.coach-home-team-scope > small {
  color: #6c788a;
  font-size: 11px;
  line-height: 1.5;
}

.coach-home-team-scope > strong {
  color: #273848;
  font-size: 14px;
  line-height: 1.45;
}

.coach-home-team-summary {
  display: grid;
  gap: 14px;
}

.coach-home-team-count > strong {
  color: #173b36;
  font-size: clamp(36px, 4vw, 52px);
  line-height: 1;
  letter-spacing: -0.055em;
}

.coach-home-team-count > strong small {
  margin-left: 5px;
  color: #596779;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
}

.coach-home-team-compare {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 40px;
  border: 1px solid rgba(20, 125, 111, 0.2);
  border-radius: 11px;
  padding: 9px 14px;
  background: rgba(255, 255, 255, 0.86);
  color: #176f63;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.coach-home-team-compare:hover,
.coach-home-team-compare:focus-visible {
  border-color: rgba(20, 125, 111, 0.42);
  box-shadow: 0 10px 24px rgba(20, 85, 74, 0.1);
  transform: translateY(-1px);
}

.coach-home-team-section {
  display: grid;
  gap: 16px;
  border-top: 1px solid rgba(100, 116, 139, 0.12);
  padding-top: 30px;
}

.coach-home-team-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.coach-home-team-heading > div {
  display: grid;
  gap: 7px;
}

.coach-home-team-heading h2 {
  font-size: 23px;
}

.coach-home-team-heading > small {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 6px 10px;
  background: #eef4f2;
  color: #426860;
  font-size: 11px;
  font-weight: 750;
}

.coach-home-team-sort-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border-radius: 12px;
  padding: 11px 13px;
  background: #f4f8f7;
}

.coach-home-team-sort-note > span {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  margin-top: 5px;
  border-radius: 999px;
  background: #398f81;
}

.coach-home-team-sort-note p {
  display: grid;
  gap: 2px;
  margin: 0;
}

.coach-home-team-sort-note strong {
  color: #3f514f;
  font-size: 11px;
}

.coach-home-team-sort-note small {
  color: #748092;
  font-size: 10px;
  line-height: 1.5;
}

.coach-home-team-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.coach-home-team-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  min-width: 0;
  min-height: 104px;
  border: 1px solid rgba(100, 116, 139, 0.1);
  border-radius: 16px;
  padding: 16px;
  background: #fff;
  box-shadow: 0 9px 24px rgba(15, 23, 42, 0.035);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.coach-home-team-card:hover,
.coach-home-team-card:focus-visible {
  border-color: rgba(20, 125, 111, 0.28);
  box-shadow: 0 18px 40px rgba(15, 65, 58, 0.08);
  outline: 0;
  transform: translateY(-2px);
}

.coach-home-team-avatar {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 13px;
  background: #e7f2ef;
  color: #176f63;
  font-size: 17px;
  font-weight: 850;
}

.coach-home-team-card-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.coach-home-team-card-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.coach-home-team-card-heading strong {
  overflow: hidden;
  color: #1d2939;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.coach-home-team-card-heading em {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 3px 7px;
  background: #eef3f4;
  color: #657284;
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
}

.coach-home-team-card-heading em.is-active {
  background: #e4f3ef;
  color: #176f63;
}

.coach-home-team-card-heading em.is-ready {
  background: #e7f3f0;
  color: #176f63;
}

.coach-home-team-card-heading em.is-partial,
.coach-home-team-card-heading em.is-limited {
  background: #f6f1e7;
  color: #846c3d;
}

.coach-home-team-card-heading em.is-no-data,
.coach-home-team-card-heading em.is-pending,
.coach-home-team-card-heading em.is-loading {
  background: #f0f3f4;
  color: #657284;
}

.coach-home-team-card-copy > small {
  overflow: hidden;
  color: #778396;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.coach-home-team-card-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #567069;
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

.coach-home-team-card-action i {
  color: #147d6f;
  font-style: normal;
}

.coach-home-analysis-navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: -4px;
}

.coach-home-analysis-navigation > button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  border: 1px solid rgba(100, 116, 139, 0.15);
  border-radius: 10px;
  padding: 7px 11px;
  background: #fff;
  color: #4f5f71;
  font: inherit;
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
}

.coach-home-analysis-navigation > button:hover,
.coach-home-analysis-navigation > button:focus-visible {
  border-color: rgba(20, 125, 111, 0.32);
  color: #176f63;
  outline: 0;
}

.coach-home-analysis-navigation > span {
  color: #7a8697;
  font-size: 11px;
  font-weight: 700;
}

@media (max-width: 1100px) {
  .coach-home-team-hero {
    grid-template-columns: minmax(0, 1fr) minmax(220px, 0.55fr);
  }

  .coach-home-team-summary {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid rgba(100, 116, 139, 0.12);
    border-left: 0;
    padding-top: 18px;
    padding-left: 0;
  }

  .coach-home-team-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .coach-home-team-hero {
    grid-template-columns: 1fr;
    gap: 20px;
    border-radius: 18px;
    padding: 25px 20px;
  }

  .coach-home-team-count {
    padding: 0;
  }

  .coach-home-team-scope,
  .coach-home-team-summary {
    border-left: 0;
    padding-left: 0;
  }

  .coach-home-team-scope {
    border-top: 1px solid rgba(100, 116, 139, 0.12);
    padding-top: 18px;
  }

  .coach-home-team-summary {
    align-items: stretch;
    flex-direction: column;
  }

  .coach-home-team-compare {
    width: 100%;
  }

  .coach-home-team-heading {
    align-items: flex-start;
  }

  .coach-home-team-grid {
    grid-template-columns: 1fr;
  }

  .coach-home-team-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .coach-home-team-card-action {
    grid-column: 2;
  }

  .coach-home-analysis-navigation {
    align-items: flex-start;
  }
}

/* v0.6.8-B2 — coach business overview, comparison hierarchy and time distribution. */
.coach-home-team-heading-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  color: #718093;
  font-size: 11px;
}

.coach-home-team-heading-meta > span.is-error {
  color: #a45c55;
}

.coach-home-team-heading-meta > small {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 6px 10px;
  background: #eef4f2;
  color: #426860;
  font-size: 11px;
  font-weight: 750;
}

.coach-home-team-card {
  display: flex;
  min-height: 184px;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
  padding: 18px;
}

.coach-home-team-card-top {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.coach-home-team-card-heading {
  justify-content: space-between;
}

.coach-home-team-card-heading > span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.coach-home-team-card-heading > span > small {
  color: #7a8695;
  font-size: 10px;
  font-weight: 650;
}

.coach-home-team-card-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  overflow: visible;
  background: transparent;
}

.coach-home-team-card-metrics.is-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.coach-home-team-card-metrics > span {
  display: grid;
  align-content: space-between;
  gap: 6px;
  min-width: 0;
  min-height: 66px;
  border-radius: 10px;
  padding: 10px;
  background: #f6f9f8;
}

.coach-home-team-card-metrics small {
  color: #788495;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.4;
}

.coach-home-team-card-metrics strong {
  color: #263647;
  font-size: 14px;
  letter-spacing: -0.02em;
}

.coach-home-team-card-empty,
.coach-home-team-card-loading {
  display: flex;
  min-height: 51px;
  align-items: center;
  border-radius: 11px;
  padding: 11px 12px;
  background: #f8faf9;
  color: #788495;
  font-size: 11px;
}

.coach-home-team-card-loading {
  display: grid;
  gap: 8px;
}

.coach-home-team-card-loading i {
  display: block;
  width: 78%;
  height: 8px;
  border-radius: 999px;
  background: #e7edeb;
}

.coach-home-team-card-loading i:last-child {
  width: 52%;
}

.coach-home-team-card-action {
  justify-content: space-between;
  margin-top: auto;
  border-top: 1px solid rgba(100, 116, 139, 0.1);
  padding-top: 12px;
}

.coach-home-analysis-navigation > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.coach-home-analysis-navigation > div > span {
  color: #7a8697;
  font-size: 11px;
  font-weight: 700;
}

.coach-home-analysis-navigation .coach-home-analysis-primary {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #147d6f;
  border-radius: 10px;
  padding: 8px 13px;
  background: #147d6f;
  color: #fff;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 9px 22px rgba(20, 125, 111, 0.16);
  transition:
    background 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.coach-home-analysis-navigation .coach-home-analysis-primary:hover,
.coach-home-analysis-navigation .coach-home-analysis-primary:focus-visible {
  background: #106b5f;
  box-shadow: 0 12px 28px rgba(20, 125, 111, 0.22);
  outline: 0;
  transform: translateY(-1px);
}

.coach-home-analysis-navigation .coach-home-analysis-primary i {
  font-style: normal;
}

.coach-home-page--compare .coach-home-control-panel {
  border-color: transparent;
  background: #f8faf9;
  box-shadow: none;
}

.coach-home-page--compare .coach-home-filter-summary {
  min-height: 58px;
}

.coach-home-page--compare .coach-home-compare-hero {
  border-color: rgba(20, 125, 111, 0.12);
  box-shadow: none;
}

.coach-home-page--compare .coach-home-compare-hero-heading h2 {
  font-size: clamp(28px, 3vw, 40px);
  letter-spacing: -0.04em;
}

.coach-home-page--compare .coach-home-section {
  border-color: rgba(100, 116, 139, 0.11);
}

.coach-home-rhythm-switch {
  display: inline-flex;
  gap: 3px;
  border: 1px solid rgba(100, 116, 139, 0.13);
  border-radius: 10px;
  padding: 3px;
  background: #f5f8f7;
}

.coach-home-rhythm-switch button {
  min-height: 30px;
  border: 0;
  border-radius: 7px;
  padding: 6px 10px;
  background: transparent;
  color: #6c7888;
  font: inherit;
  font-size: 10px;
  font-weight: 750;
  cursor: pointer;
}

.coach-home-rhythm-switch button.is-active {
  background: #fff;
  color: #176f63;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

/* v0.6.8-D1-B2 — single-coach training rhythm distribution. */
.coach-home-rhythm-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  margin: -5px 0 18px;
}

.coach-home-rhythm-toolbar > small {
  color: #738092;
  font-size: 11px;
  white-space: nowrap;
}

.coach-home-rhythm-periods {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  border-radius: 12px;
  padding: 4px;
  background: #f1f4f4;
  scrollbar-width: none;
}

.coach-home-rhythm-periods::-webkit-scrollbar {
  display: none;
}

.coach-home-rhythm-periods button,
.coach-home-rhythm-custom > button {
  min-height: 34px;
  border: 0;
  border-radius: 9px;
  padding: 7px 13px;
  background: transparent;
  color: #667386;
  font: inherit;
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color 160ms ease,
    box-shadow 160ms ease,
    color 160ms ease;
}

.coach-home-rhythm-periods button:hover {
  color: #1f3e3a;
}

.coach-home-rhythm-periods button:focus-visible,
.coach-home-rhythm-custom input:focus-visible,
.coach-home-rhythm-custom > button:focus-visible {
  outline: 3px solid rgba(20, 125, 111, 0.16);
  outline-offset: 1px;
}

.coach-home-rhythm-periods button.is-active {
  background: #fff;
  color: #176f63;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.07);
}

.coach-home-rhythm-custom {
  display: flex;
  width: fit-content;
  max-width: 100%;
  align-items: end;
  gap: 10px;
  margin: -7px 0 18px auto;
  border: 1px solid rgba(100, 116, 139, 0.12);
  border-radius: 12px;
  padding: 10px;
  background: #fafbfb;
}

.coach-home-rhythm-custom label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.coach-home-rhythm-custom label > span {
  color: #6b7788;
  font-size: 10px;
  font-weight: 700;
}

.coach-home-rhythm-custom input {
  min-width: 142px;
  min-height: 36px;
  border: 1px solid #dce2e6;
  border-radius: 9px;
  padding: 7px 9px;
  background: #fff;
  color: #1e293b;
  font: inherit;
  font-size: 11px;
}

.coach-home-rhythm-custom > span {
  align-self: center;
  margin-top: 16px;
  color: #8a96a6;
  font-size: 11px;
}

.coach-home-rhythm-custom > button {
  background: #1f3e3a;
  color: #fff;
}

.coach-home-rhythm-filter-error {
  margin: -9px 0 17px;
  color: #a24848;
  font-size: 11px;
  line-height: 1.5;
  text-align: right;
}

.coach-home-time-state {
  display: flex;
  min-height: 170px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 14px;
  background: #f8faf9;
  color: #667487;
  font-size: 12px;
}

.coach-home-time-state.is-error {
  color: #9b554f;
}

.coach-home-time-state button {
  border: 1px solid rgba(20, 125, 111, 0.2);
  border-radius: 8px;
  padding: 6px 9px;
  background: #fff;
  color: #176f63;
  font: inherit;
  font-size: 10px;
  font-weight: 750;
  cursor: pointer;
}

.coach-home-time-layout {
  display: grid;
  grid-template-columns: minmax(176px, 0.27fr) minmax(0, 1fr);
  gap: 22px;
  min-width: 0;
  border: 1px solid rgba(100, 116, 139, 0.08);
  border-radius: 16px;
  padding: 22px;
  background: rgba(249, 251, 251, 0.74);
}

.coach-home-time-summary {
  display: grid;
  min-width: 0;
  align-content: center;
  gap: 7px;
  border-right: 1px solid rgba(100, 116, 139, 0.12);
  padding-right: 21px;
}

.coach-home-time-summary > span,
.coach-home-time-summary > p {
  margin: 0;
  color: #697688;
  font-size: 11px;
  line-height: 1.5;
}

.coach-home-time-summary > strong {
  color: #173b36;
  font-size: clamp(22px, 2.1vw, 31px);
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.coach-home-time-summary > b {
  color: #25384a;
  font-size: 22px;
  line-height: 1.1;
}

.coach-home-time-summary > b small {
  margin-left: 3px;
  color: #748092;
  font-size: 11px;
  font-weight: 700;
}

.coach-home-time-summary > p em {
  margin-left: 4px;
  color: #176f63;
  font-style: normal;
  font-weight: 800;
}

.coach-home-time-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}

.coach-home-time-grid article {
  display: grid;
  min-width: 0;
  gap: 7px;
  border: 1px solid rgba(100, 116, 139, 0.11);
  border-radius: 13px;
  padding: 14px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.035);
}

.coach-home-time-grid article.is-peak {
  border-color: rgba(20, 125, 111, 0.24);
  background: #f2f8f6;
  box-shadow: 0 12px 28px rgba(20, 85, 74, 0.08);
}

.coach-home-time-grid article > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.coach-home-time-grid article > header span {
  overflow: hidden;
  color: #344457;
  font-size: 11px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.coach-home-time-grid article > header em {
  border-radius: 999px;
  padding: 3px 7px;
  background: #dcefeb;
  color: #176f63;
  font-size: 8px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.coach-home-time-grid article > strong {
  color: #1c2b3b;
  font-size: 24px;
  line-height: 1;
}

.coach-home-time-grid article > strong small {
  margin-left: 3px;
  color: #778397;
  font-size: 11px;
  font-weight: 650;
}

.coach-home-time-grid article > p {
  margin: 0;
  color: #748092;
  font-size: 10px;
}

.coach-home-time-grid article > div {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9eeee;
}

.coach-home-time-grid article > div i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #8ea7a2;
}

.coach-home-time-grid article.is-peak > div i {
  background: #147d6f;
}

.coach-home-week-layout {
  display: grid;
  grid-template-columns: minmax(150px, 0.25fr) minmax(0, 1fr);
  gap: 28px;
  min-width: 0;
  border-top: 1px solid rgba(100, 116, 139, 0.12);
  padding-top: 22px;
}

.coach-home-week-summary {
  display: grid;
  min-width: 0;
  align-content: center;
  gap: 22px;
}

.coach-home-week-summary > div {
  display: grid;
  gap: 3px;
}

.coach-home-week-summary span,
.coach-home-week-summary small {
  color: #697688;
  font-size: 11px;
  line-height: 1.5;
}

.coach-home-week-summary strong {
  color: #1c2b3b;
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.coach-home-week-summary > div:first-child strong {
  color: #176f63;
}

.coach-home-week-chart {
  display: grid;
  height: 250px;
  min-width: 0;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: end;
  gap: 14px;
}

.coach-home-week-chart > div {
  position: relative;
  display: grid;
  height: 100%;
  min-width: 0;
  grid-template-rows: 20px minmax(0, 1fr) 20px;
  align-items: end;
  gap: 7px;
  border-radius: 10px;
  outline: 0;
  text-align: center;
}

.coach-home-week-chart > div:focus-visible {
  box-shadow: 0 0 0 3px rgba(20, 125, 111, 0.14);
}

.coach-home-week-chart > div > span {
  color: #7a8697;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.coach-home-week-chart > div > div {
  position: relative;
  width: min(100%, 54px);
  height: 100%;
  justify-self: center;
  overflow: hidden;
  border-radius: 8px 8px 3px 3px;
  background: #eef1f3;
  transition: background-color 160ms ease;
}

.coach-home-week-chart > div:hover > div[aria-hidden="true"],
.coach-home-week-chart > div:focus > div[aria-hidden="true"] {
  background: #e8eded;
}

.coach-home-week-chart > div > div i {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: block;
  border-radius: 8px 8px 3px 3px;
  background: #9aa9a8;
}

.coach-home-week-chart > div.is-peak > div i {
  background: #147d6f;
}

.coach-home-week-chart > div.is-low > div i {
  background: #d7dde4;
}

.coach-home-week-chart > div > strong {
  overflow: hidden;
  max-width: 100%;
  color: #5d687a;
  font-size: 11px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.coach-home-week-chart > div.is-peak > strong {
  color: #176f63;
}

.coach-home-week-chart > div > .coach-home-week-tooltip {
  position: absolute;
  z-index: 80;
  top: 2px;
  left: 50%;
  display: grid;
  width: 180px;
  height: auto;
  justify-self: auto;
  gap: 4px;
  overflow: visible;
  border: 1px solid rgba(100, 116, 139, 0.14);
  border-radius: 10px;
  padding: 10px 11px;
  background: rgba(19, 29, 45, 0.97);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.2);
  color: #e7edf4;
  opacity: 0;
  pointer-events: none;
  text-align: left;
  transform: translate(-50%, -6px);
  transition:
    opacity 160ms ease,
    transform 160ms ease,
    visibility 160ms ease;
  visibility: hidden;
}

.coach-home-week-chart > div:first-child > .coach-home-week-tooltip {
  left: 0;
  transform: translateY(-6px);
}

.coach-home-week-chart > div:last-child > .coach-home-week-tooltip {
  right: 0;
  left: auto;
  transform: translateY(-6px);
}

.coach-home-week-chart > div:hover > .coach-home-week-tooltip,
.coach-home-week-chart > div:focus > .coach-home-week-tooltip,
.coach-home-week-chart > div:focus-visible > .coach-home-week-tooltip {
  opacity: 1;
  transform: translate(-50%, 0);
  visibility: visible;
}

.coach-home-week-chart > div:first-child:hover > .coach-home-week-tooltip,
.coach-home-week-chart > div:first-child:focus > .coach-home-week-tooltip,
.coach-home-week-chart > div:first-child:focus-visible > .coach-home-week-tooltip,
.coach-home-week-chart > div:last-child:hover > .coach-home-week-tooltip,
.coach-home-week-chart > div:last-child:focus > .coach-home-week-tooltip,
.coach-home-week-chart > div:last-child:focus-visible > .coach-home-week-tooltip {
  transform: translateY(0);
}

.coach-home-week-tooltip > strong {
  margin-bottom: 2px;
  color: #fff;
  font-size: 12px;
}

.coach-home-week-tooltip > span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #aeb9c7;
  font-size: 10px;
  line-height: 1.45;
}

.coach-home-week-tooltip b {
  color: #fff;
  font-weight: 700;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .coach-home-team-card-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .coach-home-team-card-metrics:not(.is-two) > span:last-child {
    grid-column: 1 / -1;
  }

  .coach-home-time-layout {
    grid-template-columns: 1fr;
  }

  .coach-home-week-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .coach-home-time-summary {
    border-right: 0;
    border-bottom: 1px solid rgba(100, 116, 139, 0.12);
    padding-right: 0;
    padding-bottom: 17px;
  }

  .coach-home-week-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }

  .coach-home-week-chart {
    height: 220px;
  }
}

@media (max-width: 700px) {
  .coach-home-team-heading-meta {
    align-items: flex-end;
    flex-direction: column;
  }

  .coach-home-team-card {
    min-height: 182px;
  }

  .coach-home-team-card-action {
    grid-column: auto;
  }

  .coach-home-analysis-navigation {
    align-items: stretch;
    flex-direction: column;
  }

  .coach-home-analysis-navigation > div {
    justify-content: space-between;
  }

  .coach-home-analysis-navigation > div > span {
    display: none;
  }

  .coach-home-analysis-navigation .coach-home-analysis-primary {
    width: 100%;
  }

  .coach-home-rhythm-switch {
    width: 100%;
  }

  .coach-home-rhythm-switch button {
    flex: 1;
  }

  .coach-home-rhythm-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .coach-home-rhythm-toolbar > small {
    text-align: right;
  }

  .coach-home-rhythm-periods {
    width: 100%;
  }

  .coach-home-rhythm-custom {
    display: grid;
    width: 100%;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    margin-top: -4px;
  }

  .coach-home-rhythm-custom input {
    width: 100%;
    min-width: 0;
  }

  .coach-home-rhythm-custom > button {
    grid-column: 1 / -1;
  }

  .coach-home-rhythm-filter-error {
    text-align: left;
  }

  .coach-home-time-layout {
    gap: 16px;
    padding: 14px;
  }

  .coach-home-week-layout {
    gap: 16px;
    padding-top: 18px;
  }

  .coach-home-week-chart {
    height: 190px;
    gap: 8px;
  }

  .coach-home-week-chart > div {
    gap: 5px;
  }

  .coach-home-week-chart > div > .coach-home-week-tooltip {
    width: 154px;
  }

  .coach-home-week-chart > div:nth-child(-n + 3) > .coach-home-week-tooltip {
    right: auto;
    left: 0;
    transform: translateY(-6px);
  }

  .coach-home-week-chart > div:nth-child(n + 5) > .coach-home-week-tooltip {
    right: 0;
    left: auto;
    transform: translateY(-6px);
  }

  .coach-home-week-chart > div:nth-child(-n + 3):hover > .coach-home-week-tooltip,
  .coach-home-week-chart > div:nth-child(-n + 3):focus > .coach-home-week-tooltip,
  .coach-home-week-chart > div:nth-child(-n + 3):focus-visible > .coach-home-week-tooltip,
  .coach-home-week-chart > div:nth-child(n + 5):hover > .coach-home-week-tooltip,
  .coach-home-week-chart > div:nth-child(n + 5):focus > .coach-home-week-tooltip,
  .coach-home-week-chart > div:nth-child(n + 5):focus-visible > .coach-home-week-tooltip {
    transform: translateY(0);
  }

  .coach-home-time-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .coach-home-week-summary {
    gap: 12px;
  }

  .coach-home-week-summary strong {
    font-size: 20px;
  }

  .coach-home-week-chart {
    height: 170px;
    gap: 4px;
  }

  .coach-home-week-chart > div > span,
  .coach-home-week-chart > div > strong {
    font-size: 9px;
  }

  .coach-home-week-chart > div > div {
    width: min(100%, 30px);
  }

  .coach-home-week-chart > div > .coach-home-week-tooltip {
    width: min(154px, calc(100vw - 40px));
  }

  .coach-home-time-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .coach-home-week-chart > div > div,
  .coach-home-week-chart > div > .coach-home-week-tooltip {
    transition: none;
  }
}
