.tools-page {
  align-content: start;
}

.tools-section {
  display: grid;
  gap: 0.85rem;
}

.tools-section + .tools-section {
  margin-top: 0.35rem;
}

.tools-section-title {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--swim-muted, #5c6678);
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 360px));
  gap: 1rem;
  justify-content: start;
  align-content: start;
}

/* ---------------------------------------------------------------- launch card */

.tools-launch-card {
  display: grid;
  gap: 0.85rem;
  align-content: start;
  align-self: start;
  height: auto;
  text-align: start;
  cursor: pointer;
  background: var(--surface, #fff);
  border: 1px solid var(--swim-border, #dce6ec);
  border-radius: var(--radius-surface, 18px);
  padding: 1.25rem;
  box-shadow: var(--shadow-surface, 0 16px 40px rgba(53, 73, 94, 0.08));
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  font-family: inherit;
}

.tools-launch-card:hover,
.tools-launch-card:focus-visible {
  transform: translateY(-2px);
  border-color: var(--swim-aqua, #41a6c6);
  box-shadow: 0 20px 46px rgba(53, 73, 94, 0.14);
  outline: none;
}

.tools-launch-icon {
  flex-shrink: 0;
  justify-self: start;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--swim-aqua-strong, #1d6b85);
  background: linear-gradient(135deg, rgba(65, 166, 198, 0.16), rgba(148, 66, 197, 0.12));
  border: 1px solid rgba(65, 166, 198, 0.2);
}

.tools-launch-icon--coach {
  color: var(--swim-purple-deep, #7a35a8);
  background: linear-gradient(135deg, rgba(148, 66, 197, 0.14), rgba(65, 166, 198, 0.1));
  border-color: rgba(148, 66, 197, 0.22);
}

.tools-launch-card--coach .tools-launch-eyebrow {
  color: var(--swim-purple-deep, #7a35a8);
}

.tools-launch-body {
  display: grid;
  gap: 0.2rem;
}

.tools-launch-eyebrow {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--swim-aqua-strong, #1d6b85);
}

.tools-launch-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--swim-navy, #35495e);
  line-height: 1.25;
}

.tools-launch-desc {
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--swim-muted, #5c6678);
}

.tools-launch-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  justify-self: start;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--swim-aqua-strong, #1d6b85);
}

.tools-launch-cta svg path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* --------------------------------------------------------------------- modal */

body.tools-modal-open {
  overflow: hidden;
}

.tools-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.tools-modal[hidden] {
  display: none;
}

.tools-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 23, 36, 0.55);
  backdrop-filter: blur(2px);
}

.tools-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  max-height: calc(100vh - 2.5rem);
  display: flex;
  flex-direction: column;
  background: var(--surface, #fff);
  border-radius: 20px;
  box-shadow: 0 30px 70px rgba(12, 23, 36, 0.35);
  overflow: hidden;
  outline: none;
}

.tools-modal-head {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1.25rem 1.35rem 0.85rem;
  border-bottom: 1px solid var(--swim-border, #dce6ec);
}

.tools-modal-head-text {
  flex: 1;
  min-width: 0;
}

.tools-modal-head-text .eyebrow {
  margin: 0;
}

.tools-modal-head h2 {
  margin: 0.1rem 0 0;
  font-size: 1.3rem;
  color: var(--swim-navy, #35495e);
}

.tools-modal-close {
  flex-shrink: 0;
  border: 0;
  background: var(--surface-muted, #eef4f6);
  color: var(--swim-navy, #35495e);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.tools-modal-close:hover {
  background: var(--swim-border, #dce6ec);
}

.tools-modal-tabs {
  display: flex;
  gap: 0.25rem;
  padding: 0.75rem 1.35rem 0;
}

.tools-modal-tab {
  border: 0;
  background: transparent;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--swim-muted, #5c6678);
  cursor: pointer;
}

.tools-modal-tab.is-active {
  background: var(--surface-muted, #eef4f6);
  color: var(--swim-navy, #35495e);
}

.tools-modal-body {
  padding: 1.1rem 1.35rem;
  overflow-y: auto;
}

.tools-modal-foot {
  padding: 0.85rem 1.35rem 1.1rem;
  border-top: 1px solid var(--swim-border, #dce6ec);
}

/* ------------------------------------------------------------ guided wizard */

.fina-guide {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.fina-guide-steps {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.fina-step {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.fina-step--done {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.55rem 0.8rem;
  background: var(--surface-muted, #eef4f6);
  border-radius: 12px;
}

.fina-step--done .fina-step-q {
  font-size: 0.82rem;
  color: var(--swim-muted, #5c6678);
  font-weight: 600;
}

.fina-step-a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.fina-answer-chip {
  font-weight: 800;
  color: var(--swim-navy, #35495e);
  font-size: 0.9rem;
}

.fina-step-edit {
  border: 0;
  background: transparent;
  color: var(--swim-aqua-strong, #1d6b85);
  font-weight: 700;
  font-size: 0.78rem;
  cursor: pointer;
  padding: 0;
}

.fina-step--active .fina-step-q {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--swim-navy, #35495e);
}

.fina-choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.6rem;
}

.fina-choice {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  text-align: start;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--swim-border, #dce6ec);
  background: var(--swim-white, #fff);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
  font-family: inherit;
}

.fina-choice:hover,
.fina-choice:focus-visible {
  border-color: var(--swim-aqua, #41a6c6);
  background: rgba(65, 166, 198, 0.06);
  transform: translateY(-1px);
  outline: none;
}

.fina-choice-label {
  font-weight: 700;
  color: var(--swim-navy, #35495e);
  font-size: 0.95rem;
}

.fina-choice-hint {
  font-size: 0.75rem;
  color: var(--swim-muted, #5c6678);
}

.fina-value-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.tools-input-form {
  display: contents;
}

.fina-value-field input {
  width: 100%;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--swim-border, #dce6ec);
  border-radius: 12px;
  font-size: 1.1rem;
  color: var(--swim-navy, #35495e);
  background: var(--swim-white, #fff);
  font-family: inherit;
}

.fina-value-field input:focus {
  outline: none;
  border-color: var(--swim-aqua, #41a6c6);
  box-shadow: 0 0 0 3px rgba(65, 166, 198, 0.18);
}

.fina-value-hint {
  font-size: 0.76rem;
  color: var(--swim-muted, #5c6678);
}

.fina-guide-result {
  margin-top: 0.85rem;
  border-radius: 14px;
  padding: 1rem 1.1rem;
  background: linear-gradient(135deg, rgba(65, 166, 198, 0.12), rgba(148, 66, 197, 0.08));
  border: 1px solid rgba(65, 166, 198, 0.18);
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
  min-height: 2.6rem;
}

.fina-guide-result-value {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1;
  color: var(--swim-navy, #35495e);
  font-variant-numeric: tabular-nums;
}

.fina-guide-result-unit {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--swim-aqua-strong, #1d6b85);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.fina-guide-result-empty {
  font-size: 0.88rem;
  color: var(--swim-muted, #5c6678);
}

.fina-guide-restart {
  align-self: flex-start;
  border: 0;
  background: transparent;
  color: var(--swim-muted, #5c6678);
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  padding: 0.2rem 0;
}

.fina-guide-restart:hover {
  color: var(--swim-navy, #35495e);
}

.fina-guide-empty {
  color: var(--swim-muted, #5c6678);
  font-size: 0.9rem;
}

/* -------------------------------------------------------- medley relay tool */

.relay-leg-field {
  display: grid;
  gap: 0.75rem;
}

.relay-leg-continue {
  justify-self: start;
  border: 0;
  border-radius: 999px;
  padding: 0.55rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  background: var(--swim-aqua-strong, #1d6b85);
  cursor: pointer;
  font-family: inherit;
}

.relay-leg-continue:hover {
  background: var(--swim-aqua-hover, #358fb0);
}

.relay-result-table {
  display: grid;
  gap: 0.35rem;
  font-size: 0.88rem;
}

.relay-result-head,
.relay-result-row {
  display: grid;
  grid-template-columns: 2.5rem 1.2fr 1fr 4.5rem;
  gap: 0.5rem;
  align-items: center;
}

.relay-result-head {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--swim-muted, #5c6678);
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--swim-border, #dce6ec);
}

.relay-result-row span:last-child {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--swim-navy, #35495e);
}

.split-result-table {
  border: 1px solid var(--swim-border, #dce6ec);
  border-radius: 14px;
  overflow: hidden;
  background: var(--swim-white, #fff);
  font-size: 0.9rem;
}

.split-result-head,
.split-result-row {
  display: grid;
  grid-template-columns: 3.25rem 1fr 1fr;
  gap: 0.65rem;
  align-items: center;
  padding: 0.62rem 0.9rem;
}

.split-result-head {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--swim-muted, #5c6678);
  background: #f3f8fa;
  border-bottom: 1px solid var(--swim-border, #dce6ec);
}

.split-result-body {
  max-height: min(52vh, 22rem);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.split-result-row {
  border-bottom: 1px solid rgba(220, 230, 236, 0.85);
}

.split-result-row:last-child {
  border-bottom: 0;
}

.split-result-row:nth-child(even) {
  background: rgba(65, 166, 198, 0.045);
}

.split-col-at {
  font-weight: 700;
  color: var(--swim-muted, #5c6678);
  font-size: 0.82rem;
}

.split-col-time {
  font-variant-numeric: tabular-nums;
  text-align: right;
  font-weight: 600;
  color: var(--swim-navy, #35495e);
}

.split-col-cumulative {
  font-weight: 800;
  color: var(--swim-aqua-strong, #1d6b85);
}

.split-result-head .split-col-time {
  text-align: right;
  font-weight: 800;
}

.relay-result-step .split-result-table {
  margin-top: 0.35rem;
}

.relay-result-step .split-result-table + .fina-guide-result {
  margin-top: 1rem;
}

.relay-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.fina-step > .relay-result-actions,
.tools-result .relay-result-actions {
  margin-top: 0.85rem;
}

.relay-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border-radius: 999px;
  padding: 0.55rem 0.95rem;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.relay-action-icon {
  display: inline-flex;
  flex-shrink: 0;
}

.relay-action-btn--pdf {
  border: 1px solid rgba(65, 166, 198, 0.35);
  color: var(--swim-aqua-strong, #1d6b85);
  background: rgba(65, 166, 198, 0.1);
}

.relay-action-btn--pdf:hover {
  background: rgba(65, 166, 198, 0.18);
}

.relay-action-btn--whatsapp {
  border: 1px solid rgba(37, 211, 102, 0.35);
  color: #128c7e;
  background: rgba(37, 211, 102, 0.1);
}

.relay-action-btn--whatsapp:hover {
  background: rgba(37, 211, 102, 0.18);
}

.relay-action-btn:disabled {
  opacity: 0.65;
  cursor: wait;
}

.relay-result-step {
  gap: 0.85rem;
}

/* ------------------------------------------------------- shared form styles */

.tools-source-badge {
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  background: rgba(65, 166, 198, 0.12);
  color: var(--swim-aqua-strong, #1d6b85);
  border: 1px solid rgba(65, 166, 198, 0.25);
  white-space: nowrap;
}

.tools-source-badge[data-source="builtin"] {
  background: rgba(232, 173, 50, 0.14);
  color: #8a6510;
  border-color: rgba(232, 173, 50, 0.3);
}

.tools-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.tools-mode {
  display: inline-flex;
  padding: 0.25rem;
  gap: 0.25rem;
  background: var(--surface-muted, #eef4f6);
  border-radius: 999px;
  align-self: flex-start;
  max-width: 100%;
}

.tools-mode-btn {
  border: 0;
  background: transparent;
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--swim-muted, #5c6678);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.tools-mode-btn.is-active {
  background: var(--swim-white, #fff);
  color: var(--swim-navy, #35495e);
  box-shadow: 0 2px 6px rgba(53, 73, 94, 0.12);
}

.tools-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.tools-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.tools-field--wide {
  grid-column: 1 / -1;
}

.tools-field-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--swim-muted, #5c6678);
}

.tools-field select,
.tools-field input {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--swim-border, #dce6ec);
  border-radius: 12px;
  font-size: 1rem;
  color: var(--swim-navy, #35495e);
  background: var(--swim-white, #fff);
  font-family: inherit;
}

.tools-field select:focus,
.tools-field input:focus {
  outline: none;
  border-color: var(--swim-aqua, #41a6c6);
  box-shadow: 0 0 0 3px rgba(65, 166, 198, 0.18);
}

.tools-field-hint {
  font-size: 0.74rem;
  color: var(--swim-muted, #5c6678);
}

.tools-result {
  border-radius: 16px;
  padding: 1.25rem;
  background: linear-gradient(135deg, rgba(65, 166, 198, 0.12), rgba(148, 66, 197, 0.08));
  border: 1px solid rgba(65, 166, 198, 0.18);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.tools-result-main {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tools-result-value {
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1;
  color: var(--swim-navy, #35495e);
  font-variant-numeric: tabular-nums;
}

.tools-result-unit {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--swim-aqua-strong, #1d6b85);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tools-result-meta {
  margin: 0;
  font-size: 0.85rem;
  color: var(--swim-muted, #5c6678);
}

.tools-footnote {
  margin: 0;
  font-size: 0.8rem;
  color: var(--swim-muted, #5c6678);
  line-height: 1.5;
}

.tools-footnote a {
  color: var(--swim-aqua-strong, #1d6b85);
  font-weight: 600;
}

@media (min-width: 768px) {
  .fina-choices {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
}

@media (max-width: 560px) {
  .tools-modal {
    padding: 0;
  }

  .tools-modal-dialog {
    width: 100%;
    max-height: 100vh;
    height: 100%;
    border-radius: 0;
  }

  .tools-field-grid {
    grid-template-columns: 1fr;
  }

  .tools-result-value {
    font-size: 2.1rem;
  }

  .tools-mode {
    align-self: stretch;
  }

  .tools-mode-btn {
    flex: 1;
    text-align: center;
  }

  .relay-result-actions {
    flex-direction: column;
  }

  .split-result-head,
  .split-result-row {
    padding: 0.7rem 0.75rem;
    gap: 0.5rem;
  }

  .split-result-body {
    max-height: min(48vh, 20rem);
  }

  .split-col-time {
    font-size: 0.92rem;
  }

  .relay-action-btn {
    justify-content: center;
    width: 100%;
  }
}

/* ------------------------------------------- coach AI swimmer scout */

.tools-launch-card--ai {
  position: relative;
  overflow: hidden;
}

.tools-launch-card--ai::before {
  content: "";
  position: absolute;
  inset: -40% -20%;
  background: conic-gradient(from 120deg, rgba(65, 166, 198, 0.12), rgba(148, 66, 197, 0.18), rgba(65, 166, 198, 0.12));
  animation: coach-ai-spin 8s linear infinite;
  pointer-events: none;
}

.tools-launch-icon--ai {
  background: linear-gradient(135deg, rgba(65, 166, 198, 0.18), rgba(148, 66, 197, 0.22));
  color: var(--swim-aqua-strong, #2f8fad);
}

.tools-modal-dialog--wide {
  max-width: min(52rem, 96vw);
}

.tools-source-badge--ai {
  background: linear-gradient(135deg, rgba(65, 166, 198, 0.14), rgba(148, 66, 197, 0.16));
  color: var(--swim-ink, #0c1724);
  border: 1px solid rgba(65, 166, 198, 0.28);
}

.tools-modal-head--coach-ai {
  align-items: center;
}

.coach-ai-modal-title,
.coach-ai-launch-title {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.coach-ai-title-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.14rem 0.5rem;
  border-radius: 999px;
  font-size: 0.68em;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  color: #2f8fad;
  background: linear-gradient(135deg, rgba(65, 166, 198, 0.16), rgba(148, 66, 197, 0.2));
  border: 1px solid rgba(65, 166, 198, 0.32);
  box-shadow: 0 0 0 0 rgba(65, 166, 198, 0.2);
  animation: coach-ai-title-glow 2.8s ease-in-out infinite;
}

.tools-launch-title.coach-ai-launch-title .coach-ai-title-badge {
  font-size: 0.62em;
}

.coach-ai-modal-icon {
  position: relative;
  flex-shrink: 0;
  width: 3.5rem;
  height: 3.5rem;
}

.coach-ai-modal-icon__halo {
  position: absolute;
  inset: -0.35rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(65, 166, 198, 0.28), transparent 68%);
  opacity: 0.75;
  animation: coach-ai-modal-halo 2.6s ease-in-out infinite;
}

.coach-ai-modal-icon__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #41a6c6, #9442c5, #5ec4e8, #41a6c6);
  animation: coach-ai-spin 5s linear infinite;
}

.coach-ai-modal-icon__core {
  position: absolute;
  inset: 3px;
  z-index: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(180deg, #fff 0%, #f4fafc 100%);
  box-shadow: inset 0 0 0 1px rgba(65, 166, 198, 0.22);
  color: var(--swim-aqua-strong, #2f8fad);
  animation: coach-ai-modal-breathe 2.8s ease-in-out infinite;
}

.coach-ai-modal-icon__svg {
  display: block;
}

.coach-ai-modal-icon__spark {
  position: absolute;
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 50%;
  background: #9442c5;
  box-shadow: 0 0 8px rgba(148, 66, 197, 0.55);
  opacity: 0;
  animation: coach-ai-modal-spark 2.4s ease-in-out infinite;
}

.coach-ai-modal-icon__spark--1 {
  top: 0.1rem;
  right: 0.45rem;
  animation-delay: 0s;
}

.coach-ai-modal-icon__spark--2 {
  bottom: 0.55rem;
  left: -0.05rem;
  animation-delay: 0.8s;
}

.coach-ai-modal-icon__spark--3 {
  top: 1.15rem;
  right: -0.15rem;
  animation-delay: 1.6s;
}

[data-coach-match-modal]:not([hidden]).coach-ai-modal--entered .coach-ai-modal-icon {
  animation: coach-ai-modal-enter 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-coach-match-modal]:not([hidden]).coach-ai-modal--entered .tools-modal-head-text {
  animation: coach-ai-modal-text-enter 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.08s both;
}

.coach-ai-guide {
  gap: 1rem;
}

.coach-ai-scan {
  border-radius: var(--radius-surface, 14px);
  padding: 1rem 1.1rem;
  background:
    radial-gradient(circle at top left, rgba(65, 166, 198, 0.16), transparent 55%),
    linear-gradient(180deg, rgba(12, 23, 36, 0.03), rgba(65, 166, 198, 0.05));
  border: 1px solid rgba(65, 166, 198, 0.18);
}

.coach-ai-scan-head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.55rem;
}

.coach-ai-pulse {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 999px;
  background: var(--swim-aqua, #41a6c6);
  box-shadow: 0 0 0 0 rgba(65, 166, 198, 0.45);
  animation: coach-ai-pulse 1.4s ease-out infinite;
}

.coach-ai-scan-line {
  min-height: 1.4rem;
  margin: 0;
  color: var(--swim-ink-muted, #5d6b7a);
  font-size: 0.95rem;
}

.coach-ai-scan-bars {
  display: flex;
  gap: 0.35rem;
  margin-top: 0.85rem;
  height: 0.35rem;
}

.coach-ai-scan-bars span {
  flex: 1;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(65, 166, 198, 0.15), rgba(148, 66, 197, 0.35));
  animation: coach-ai-bar 1.1s ease-in-out infinite;
}

.coach-ai-scan-bars span:nth-child(2) { animation-delay: 0.12s; }
.coach-ai-scan-bars span:nth-child(3) { animation-delay: 0.24s; }
.coach-ai-scan-bars span:nth-child(4) { animation-delay: 0.36s; }
.coach-ai-scan-bars span:nth-child(5) { animation-delay: 0.48s; }

.coach-ai-results-shell {
  display: grid;
  gap: 1rem;
}

.coach-ai-summary {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.95rem 1rem;
  border-radius: var(--radius-surface, 14px);
  background: linear-gradient(135deg, rgba(65, 166, 198, 0.08), rgba(148, 66, 197, 0.08));
  border: 1px solid rgba(65, 166, 198, 0.16);
}

.coach-ai-summary-icon {
  font-size: 1.1rem;
  line-height: 1;
  color: var(--swim-aqua-strong, #2f8fad);
  animation: coach-ai-twinkle 2.4s ease-in-out infinite;
}

.coach-ai-summary p {
  margin: 0;
  color: var(--swim-ink, #0c1724);
  line-height: 1.5;
}

.coach-ai-picks {
  display: grid;
  gap: 0.75rem;
}

.coach-scout-hero {
  display: grid;
  gap: 0.85rem;
}

.coach-scout-hero-copy {
  display: grid;
  gap: 0.35rem;
}

.coach-scout-hero-eyebrow {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--swim-aqua-strong, #2f8fad);
}

.coach-scout-hero-filters {
  margin: 0;
  color: var(--swim-ink-muted, #5d6b7a);
  font-size: 0.86rem;
}

.coach-scout-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.8rem 0.95rem;
  border-radius: var(--radius-surface, 14px);
  border: 1px solid rgba(12, 23, 36, 0.08);
  background: #fff;
}

.coach-scout-toolbar-count {
  margin: 0;
  font-size: 0.9rem;
  color: var(--swim-ink, #0c1724);
  font-weight: 600;
}

.coach-scout-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

.coach-scout-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.9rem;
  border: 1px solid rgba(37, 211, 102, 0.35);
  border-radius: 999px;
  background: rgba(37, 211, 102, 0.1);
  color: #128c7e;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, opacity 0.15s ease;
}

.coach-scout-whatsapp:hover:not(:disabled) {
  transform: translateY(-1px);
  background: rgba(37, 211, 102, 0.18);
}

.coach-scout-whatsapp:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.coach-scout-export {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.9rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--swim-aqua, #41a6c6), #9442c5);
  color: #fff;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.coach-scout-export:hover:not(:disabled) {
  transform: translateY(-1px);
}

.coach-scout-export:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.coach-scout-export-icon {
  display: inline-flex;
}

.coach-scout-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(17.5rem, 1fr));
  gap: 0.9rem;
}

.coach-scout-card {
  position: relative;
  display: grid;
  gap: 0.75rem;
  padding: 1rem 1rem 1.05rem;
  border-radius: 18px;
  border: 1px solid rgba(65, 166, 198, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 253, 0.98));
  box-shadow: 0 14px 34px rgba(12, 23, 36, 0.07);
  overflow: hidden;
  opacity: 0;
  transform: translateY(12px) scale(0.985);
  transition:
    opacity 0.42s ease,
    transform 0.42s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.coach-scout-card.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.coach-scout-card.is-removing {
  opacity: 0;
  transform: translateY(-8px) scale(0.96);
  pointer-events: none;
}

.coach-scout-card--lead {
  border-color: rgba(148, 66, 197, 0.28);
  box-shadow: 0 18px 40px rgba(148, 66, 197, 0.12);
}

.coach-scout-card__glow {
  position: absolute;
  inset: -30% auto auto -20%;
  width: 70%;
  height: 70%;
  background: radial-gradient(circle, rgba(65, 166, 198, 0.16), transparent 68%);
  pointer-events: none;
}

.coach-scout-card--lead .coach-scout-card__glow {
  background: radial-gradient(circle, rgba(148, 66, 197, 0.18), transparent 68%);
}

.coach-scout-card__remove {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  z-index: 2;
  width: 1.85rem;
  height: 1.85rem;
  border: 0;
  border-radius: 999px;
  background: rgba(12, 23, 36, 0.06);
  color: var(--swim-ink-muted, #5d6b7a);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.coach-scout-card__remove:hover {
  background: rgba(224, 51, 47, 0.12);
  color: #c62828;
  transform: scale(1.05);
}

.coach-scout-card__rank {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--swim-aqua, #41a6c6), #2f8fad);
  box-shadow: 0 8px 18px rgba(65, 166, 198, 0.28);
}

.coach-scout-card--lead .coach-scout-card__rank {
  background: linear-gradient(135deg, #9442c5, #6d2f91);
  box-shadow: 0 8px 18px rgba(148, 66, 197, 0.28);
}

.coach-scout-card__head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
  padding-right: 1.8rem;
}

.coach-scout-card__badge {
  display: inline-block;
  margin-bottom: 0.3rem;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--swim-aqua-strong, #2f8fad);
  background: rgba(65, 166, 198, 0.12);
}

.coach-scout-card--lead .coach-scout-card__badge {
  color: #6d2f91;
  background: rgba(148, 66, 197, 0.12);
}

.coach-scout-card__name {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.25;
}

.coach-scout-card__name a {
  color: inherit;
  text-decoration: none;
}

.coach-scout-card__name a:hover {
  color: var(--swim-aqua-strong, #2f8fad);
}

.coach-scout-card__club {
  margin: 0.2rem 0 0;
  color: var(--swim-ink-muted, #5d6b7a);
  font-size: 0.86rem;
}

.coach-scout-card__score {
  min-width: 3.4rem;
  text-align: center;
  padding: 0.45rem 0.55rem;
  border-radius: 14px;
  background: rgba(148, 66, 197, 0.09);
  color: #6d2f91;
  font-weight: 800;
  line-height: 1;
  flex-shrink: 0;
}

.coach-scout-card__score small {
  font-size: 0.72rem;
}

.coach-scout-card__stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem 0.75rem;
  margin: 0;
  padding: 0.7rem 0.75rem;
  border-radius: 12px;
  background: rgba(12, 23, 36, 0.03);
}

.coach-scout-card__stats div {
  display: grid;
  gap: 0.12rem;
}

.coach-scout-card__stats dt {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--swim-ink-muted, #5d6b7a);
}

.coach-scout-card__stats dd {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--swim-ink, #0c1724);
}

.coach-scout-card__insight {
  margin: 0;
  padding-top: 0.15rem;
  color: var(--swim-ink-muted, #5d6b7a);
  font-size: 0.86rem;
  line-height: 1.45;
}

.coach-ai-pick {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem;
  padding: 0.95rem 1rem;
  border-radius: var(--radius-surface, 14px);
  border: 1px solid rgba(12, 23, 36, 0.08);
  background: #fff;
  box-shadow: 0 10px 24px rgba(12, 23, 36, 0.05);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.coach-ai-pick.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.coach-ai-pick-rank {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--swim-aqua, #41a6c6), #9442c5);
}

.coach-ai-pick-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
}

.coach-ai-pick-badge {
  display: inline-block;
  margin-bottom: 0.25rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--swim-aqua-strong, #2f8fad);
  background: rgba(65, 166, 198, 0.12);
}

.coach-ai-pick h3 {
  margin: 0;
  font-size: 1.05rem;
}

.coach-ai-pick h3 a {
  color: inherit;
  text-decoration: none;
}

.coach-ai-pick h3 a:hover {
  color: var(--swim-aqua-strong, #2f8fad);
}

.coach-ai-pick-club {
  margin: 0.15rem 0 0;
  color: var(--swim-ink-muted, #5d6b7a);
  font-size: 0.88rem;
}

.coach-ai-pick-score {
  min-width: 3.2rem;
  text-align: center;
  padding: 0.35rem 0.5rem;
  border-radius: 12px;
  background: rgba(148, 66, 197, 0.08);
  color: #6d2f91;
  font-weight: 800;
  line-height: 1;
}

.coach-ai-pick-score small {
  font-size: 0.72rem;
  font-weight: 700;
}

.coach-ai-pick-event {
  margin: 0.45rem 0 0;
  font-size: 0.92rem;
}

.coach-ai-pick-copy {
  margin: 0.45rem 0 0;
  color: var(--swim-ink-muted, #5d6b7a);
  font-size: 0.9rem;
  line-height: 1.45;
}

.coach-ai-disclaimer,
.coach-ai-empty {
  margin: 0;
  color: var(--swim-ink-muted, #5d6b7a);
  font-size: 0.84rem;
  line-height: 1.45;
}

@keyframes coach-ai-spin {
  to { transform: rotate(360deg); }
}

@keyframes coach-ai-pulse {
  0% { box-shadow: 0 0 0 0 rgba(65, 166, 198, 0.45); }
  70% { box-shadow: 0 0 0 10px rgba(65, 166, 198, 0); }
  100% { box-shadow: 0 0 0 0 rgba(65, 166, 198, 0); }
}

@keyframes coach-ai-bar {
  0%, 100% { transform: scaleY(0.55); opacity: 0.55; }
  50% { transform: scaleY(1.35); opacity: 1; }
}

@keyframes coach-ai-twinkle {
  0%, 100% { opacity: 0.65; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}

@keyframes coach-ai-modal-halo {
  0%, 100% { transform: scale(0.92); opacity: 0.55; }
  50% { transform: scale(1.08); opacity: 0.9; }
}

@keyframes coach-ai-modal-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

@keyframes coach-ai-modal-spark {
  0%, 100% { opacity: 0; transform: scale(0.4); }
  20%, 60% { opacity: 1; transform: scale(1); }
  80% { opacity: 0; transform: scale(0.2); }
}

@keyframes coach-ai-modal-enter {
  0% { opacity: 0; transform: scale(0.55) rotate(-18deg); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

@keyframes coach-ai-modal-text-enter {
  0% { opacity: 0; transform: translateY(8px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes coach-ai-title-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(65, 166, 198, 0.15); }
  50% { box-shadow: 0 0 0 4px rgba(148, 66, 197, 0.12); }
}

@media (prefers-reduced-motion: reduce) {
  .coach-ai-modal-icon__halo,
  .coach-ai-modal-icon__ring,
  .coach-ai-modal-icon__core,
  .coach-ai-modal-icon__spark,
  .coach-ai-title-badge,
  [data-coach-match-modal].coach-ai-modal--entered .coach-ai-modal-icon,
  [data-coach-match-modal].coach-ai-modal--entered .tools-modal-head-text {
    animation: none !important;
  }
}

@media (max-width: 680px) {
  .coach-scout-grid {
    grid-template-columns: 1fr;
  }

  .coach-scout-toolbar {
    align-items: stretch;
  }

  .coach-scout-toolbar-actions {
    flex-direction: column;
    width: 100%;
  }

  .coach-scout-whatsapp,
  .coach-scout-export {
    justify-content: center;
    width: 100%;
  }
}
