/* General Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Body Styles */
body {
  font-family: Arial, sans-serif;
  background-color: #f8f9fa;
  color: #333;
  line-height: 1.6;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 18px;
  border-bottom: 1px solid #e5e7eb;
  background: #fff;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #17324d;
  font-weight: 800;
}

.site-brand:hover {
  text-decoration: none;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
  font-size: 0.95rem;
}

.site-nav-button {
  border: 0;
  background: transparent;
  color: #007bff;
  cursor: pointer;
  font: inherit;
  padding: 0;
}

.site-nav-button:hover {
  text-decoration: underline;
}

/* Container */
.container {
  max-width: 800px;
  margin: 20px auto;
  padding: 20px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Headings */
h1 {
  font-size: 2em;
  color: #17324d;
  margin-bottom: 20px;
}

h2 {
  font-size: 1.5em;
  color: #24435f;
  margin-top: 20px;
  margin-bottom: 10px;
}

/* Paragraphs */
p {
  margin-bottom: 15px;
}

/* Forms */
.form-group {
  margin-bottom: 15px;
}

input[type="text"] {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

input[type="email"],
input[type="password"] {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font: inherit;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 10px 20px;
  font-size: 1em;
  text-align: center;
  text-decoration: none;
  border-radius: 5px;
  transition: background-color 0.3s ease-in-out;
}

.btn-primary {
  background-color: #007bff;
  color: #fff;
  border: none;
}

.btn-primary:hover {
  background-color: #0056b3;
}

.btn-secondary {
  background-color: #6c757d;
  color: #fff;
  border: none;
}

.btn-secondary:hover {
  background-color: #5a6268;
}

.btn-success {
  background-color: #28a745;
  color: #fff;
  border: none;
}

.btn-success:hover {
  background-color: #218838;
}

/* Image */
.img-fluid {
  max-width: 100%;
  height: auto;
  border-radius: 5px;
}

/* List Styles */
ul {
  list-style-type: disc;
  padding-left: 20px;
  margin-bottom: 20px;
}

li {
  margin-bottom: 10px;
}

/* Links */
a {
  color: #007bff;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.link-media,
.link-external {
  color: #087f83;
}

.link-media:hover,
.link-external:hover {
  color: #05676a;
}

.link-action {
  color: #b45f06;
  font-weight: 700;
}

.link-action:hover {
  color: #8f4700;
}

.link-context {
  color: #526a7a;
  font-weight: 600;
}

.link-context:hover {
  color: #385162;
}

details > summary {
  color: #586775;
  cursor: pointer;
}

.youtube-helper {
  max-width: 920px;
}

.youtube-helper-heading,
.youtube-helper-card,
.youtube-video-context,
.youtube-helper-actions,
.youtube-comment-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.youtube-helper-heading {
  align-items: flex-start;
  margin-bottom: 24px;
}

.youtube-helper-card {
  align-items: stretch;
  flex-direction: column;
  margin-top: 20px;
  padding: 20px;
  border: 1px solid #cfd7df;
  border-radius: 8px;
  background: #fff;
}

.youtube-helper-card h2 {
  margin-bottom: 4px;
}

.youtube-helper-card select,
.youtube-helper-card textarea {
  width: 100%;
  box-sizing: border-box;
}

.youtube-helper-card textarea {
  padding: 12px;
  resize: vertical;
  font: inherit;
  line-height: 1.45;
}

.youtube-video-context {
  flex-wrap: wrap;
  padding: 12px;
  background: #f5f8fa;
  border-radius: 6px;
}

.youtube-helper-actions,
.youtube-comment-meta {
  align-items: center;
  flex-wrap: wrap;
}

.youtube-comment-meta {
  color: #586775;
  font-size: 0.9rem;
}

.youtube-post-confirmation {
  display: grid;
  gap: 14px;
  margin-top: 8px;
  padding: 16px;
  border: 1px solid #e2c069;
  border-radius: 6px;
  background: #fff9e8;
}

.youtube-post-confirmation label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

@media (max-width: 640px) {
  .youtube-helper-heading {
    flex-direction: column;
  }
}

.link-muted {
  color: #586775;
}

.auth-container {
  max-width: 560px;
}

.auth-panel {
  display: grid;
  gap: 16px;
}

.auth-muted {
  color: #586775;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid #cfd7df;
  border-radius: 6px;
  overflow: hidden;
}

.auth-tab {
  border: 0;
  border-right: 1px solid #cfd7df;
  background: #f8fafc;
  color: #17324d;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 10px;
}

.auth-tab:last-child {
  border-right: 0;
}

.auth-tab.is-active {
  background: #17324d;
  color: #fff;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-form[hidden] {
  display: none;
}

.auth-form label {
  display: grid;
  gap: 6px;
  color: #24435f;
  font-weight: 700;
}

.auth-message {
  min-height: 1.5em;
  color: #586775;
  overflow-wrap: anywhere;
}

.auth-message-error {
  color: #9f1d20;
}

.auth-message-success {
  color: #176b3a;
}

.auth-message-neutral {
  color: #586775;
}

.account-summary {
  display: grid;
  gap: 12px;
  margin: 6px 0;
}

.account-summary div {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px solid #edf0f2;
}

.account-summary dt {
  color: #586775;
  font-weight: 700;
}

.account-summary dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pack-list {
  display: grid;
  gap: 8px;
}

.pack-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 56px 76px;
  gap: 12px;
  align-items: center;
  min-height: 66px;
  padding: 10px 12px;
  border: 1px solid #e1e7ee;
  border-radius: 6px;
  background: #fbfcfd;
}

.pack-copy {
  min-width: 0;
}

.pack-option h3 {
  margin: 0 0 2px;
  color: #17324d;
  font-size: 1rem;
}

.pack-option p {
  margin: 0;
  color: #586775;
}

.pack-action {
  display: contents;
}

.pack-action .btn {
  width: 76px;
  padding-left: 0;
  padding-right: 0;
}

.pack-action strong {
  color: #17324d;
  font-size: 1.05rem;
  text-align: right;
}

.account-section {
  display: grid;
  gap: 12px;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid #e5e7eb;
}

.account-section h2 {
  margin: 0;
}

.account-form {
  display: grid;
  gap: 14px;
}

.account-form label {
  display: grid;
  gap: 6px;
  color: #24435f;
  font-weight: 700;
}

@media (max-width: 640px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .account-summary div {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }

  .pack-option {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .pack-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .pack-action strong,
  .pack-action .btn {
    text-align: left;
    width: auto;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.my-compseek-container {
  max-width: 960px;
  padding: 28px;
}

.my-compseek-hero,
.my-compseek-section-heading,
.identity-card,
.candidate-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

.my-compseek-hero h1,
.candidate-heading h2 {
  margin-bottom: 6px;
}

.my-compseek-eyebrow {
  margin-bottom: 4px;
  color: #087f83;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.my-compseek-tabs {
  display: flex;
  gap: 4px;
  margin: 24px 0;
  padding: 4px;
  overflow-x: auto;
  border-radius: 8px;
  background: #edf2f6;
}

.my-compseek-tabs button,
.my-compseek-tabs span {
  flex: 1 0 auto;
  padding: 9px 12px;
  border-radius: 6px;
  color: #526a7a;
  text-align: center;
  font-weight: 700;
}

.my-compseek-tabs button {
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
}

.my-compseek-tabs .is-active {
  background: #fff;
  color: #17324d;
  box-shadow: 0 1px 3px rgba(23, 50, 77, 0.14);
}

.my-compseek-tabs small {
  display: block;
  font-size: 0.65rem;
  font-weight: 400;
}

.my-compseek-section {
  margin-top: 28px;
}

.my-compseek-section h2 {
  margin-top: 0;
}

.count-badge,
.primary-badge,
.recommended-badge {
  flex: 0 0 auto;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
}

.count-badge {
  background: #edf2f6;
  color: #526a7a;
}

.primary-badge {
  background: #d9f3e4;
  color: #176b3a;
}

.recommended-badge {
  background: #dceeff;
  color: #075a9c;
}

.identity-list,
.identity-search-results {
  display: grid;
  gap: 10px;
}

.identity-card,
.identity-search-result,
.candidate-card,
.my-empty-state {
  padding: 16px;
  border: 1px solid #dce3e9;
  border-radius: 8px;
  background: #fff;
}

.identity-card-heading {
  display: flex;
  align-items: center;
  gap: 8px;
}

.identity-card h3,
.identity-search-result h3,
.my-empty-state h3 {
  margin: 0;
  color: #17324d;
  font-size: 1.05rem;
}

.identity-meta,
.identity-activity,
.identity-label,
.identity-search-result p {
  margin: 3px 0 0;
  color: #586775;
}

.identity-activity {
  font-size: 0.9rem;
}

.identity-label {
  color: #24435f;
  font-weight: 700;
}

.identity-card-actions,
.candidate-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.btn-link,
.btn-danger-subtle {
  padding: 8px 10px;
  border: 1px solid #cfd7df;
  background: #fff;
  color: #24435f;
}

.btn-danger-subtle {
  border-color: #edc8c9;
  color: #9f1d20;
}

.my-empty-state,
.my-empty-inline {
  color: #586775;
  text-align: center;
}

.add-identity-panel {
  padding-top: 26px;
  border-top: 1px solid #e5e7eb;
}

.identity-search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.identity-search-form input {
  font: inherit;
}

.identity-search-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.candidate-panel {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #e5e7eb;
}

.candidate-card {
  border-color: #9ec9e8;
  background: #f8fcff;
}

.candidate-evidence {
  display: grid;
  gap: 8px;
  margin: 16px 0;
}

.candidate-evidence-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 12px;
}

.candidate-evidence dt {
  color: #526a7a;
  font-weight: 700;
}

.candidate-evidence dd {
  margin: 0;
}

.candidate-guidance {
  padding: 10px 12px;
  border-left: 3px solid #087f83;
  background: #ecf8f8;
}

.candidate-primary-option {
  display: block;
  margin: 14px 0;
  color: #24435f;
  font-weight: 700;
}

.btn:disabled {
  cursor: wait;
  opacity: 0.65;
}

.history-list {
  display: grid;
  gap: 14px;
}

.history-card {
  padding: 18px;
  border: 1px solid #dce3e9;
  border-radius: 8px;
  background: #fff;
}

.history-card-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.history-title {
  color: #17324d;
  font-size: 1.1rem;
  font-weight: 800;
}

.history-date {
  margin: 2px 0 0;
  color: #586775;
  font-size: 0.9rem;
}

.history-identities {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.history-identity {
  padding: 3px 8px;
  border-radius: 999px;
  background: #edf2f6;
  color: #526a7a;
  font-size: 0.75rem;
  font-weight: 700;
}

.history-identity.is-primary {
  background: #d9f3e4;
  color: #176b3a;
}

.history-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
}

.history-stat {
  padding: 8px;
  border-radius: 6px;
  background: #f3f6f8;
  text-align: center;
}

.history-stat strong,
.history-stat span {
  display: block;
}

.history-stat strong {
  color: #17324d;
  font-size: 1.1rem;
}

.history-stat span {
  color: #586775;
  font-size: 0.75rem;
}

.history-seekpoints,
.history-match-list {
  display: grid;
  gap: 6px;
}

.history-seekpoints h3 {
  margin: 0;
  color: #24435f;
  font-size: 0.9rem;
}

.history-seek-link {
  padding: 7px 9px;
  border-radius: 5px;
  background: #ecf8f8;
  color: #087f83;
}

.history-matches {
  margin-top: 12px;
}

.history-match-list {
  margin-top: 8px;
  padding-left: 10px;
  border-left: 2px solid #dce3e9;
}

.history-match-list p {
  margin: 0;
  color: #526a7a;
  font-size: 0.9rem;
}

.history-more {
  margin-top: 16px;
  text-align: center;
}

@media (max-width: 640px) {
  .my-compseek-container {
    margin: 0;
    padding: 18px;
    border-radius: 0;
  }

  .my-compseek-hero,
  .my-compseek-section-heading,
  .identity-card,
  .candidate-heading,
  .identity-search-result {
    align-items: stretch;
    flex-direction: column;
  }

  .identity-card-actions,
  .candidate-actions {
    justify-content: flex-start;
  }

  .identity-search-form,
  .candidate-evidence-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .history-card-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .history-identities {
    justify-content: flex-start;
  }

  .history-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Instant search (static/js/instant-search.js) */
.instant-search { position: relative; display: flex; gap: 8px; flex-wrap: wrap; }
.instant-search input[type="search"] { flex: 1 1 18em; padding: 10px 12px; font-size: 1.05em; }
.instant-results { position: absolute; top: 100%; left: 0; right: 0; z-index: 20; margin-top: 4px; max-height: 70vh; overflow-y: auto;
  background: #fff; border: 1px solid #d8dee4; border-radius: 6px; box-shadow: 0 8px 24px rgba(23, 50, 77, 0.12); }
.instant-group { padding: 8px 12px 4px; font-size: 0.75em; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: #5b6b7a; }
.instant-item { display: block; padding: 6px 12px; color: inherit; text-decoration: none; }
.instant-item:hover, .instant-item.is-active { background: #eef6f6; }
.instant-title { display: block; font-weight: 600; }
.instant-meta { display: block; font-size: 0.85em; color: #5b6b7a; }
.instant-empty { padding: 10px 12px; color: #5b6b7a; }
.search-group ul { list-style: none; padding: 0; }
.search-group li { padding: 4px 0; }
.search-group small { display: block; color: #5b6b7a; }

/* ==========================================================================
   CompSeek design layer (Oct 2026). Overrides the older rules above.
   Brand: navy ink + the logo's blue. One accent, generous spacing, soft cards.
   ========================================================================== */
:root {
  --cs-blue: #1f6bf2;          /* logo play-button blue */
  --cs-blue-dark: #1755c4;
  --cs-blue-soft: #eaf1fe;
  --cs-ink: #13283d;           /* headings, wordmark */
  --cs-text: #2b3a48;
  --cs-muted: #5f6f7e;
  --cs-line: #e3e8ee;
  --cs-bg: #f5f7fa;
  --cs-surface: #ffffff;
  --cs-win: #157a3b;
  --cs-loss: #b42318;
  --cs-radius: 10px;
  --cs-shadow: 0 1px 2px rgba(19, 40, 61, 0.06), 0 4px 16px rgba(19, 40, 61, 0.06);
  --cs-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

body { font-family: var(--cs-font); background: var(--cs-bg); color: var(--cs-text); line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: var(--cs-blue-dark); }
a:hover { color: var(--cs-blue); }
h1, h2, h3 { color: var(--cs-ink); letter-spacing: -0.01em; }
h1 { font-size: clamp(1.6rem, 3.5vw, 2.1rem); line-height: 1.2; margin-bottom: 0.5em; }
h2 { font-size: 1.25rem; margin-top: 1.4em; margin-bottom: 0.5em; }
small { color: var(--cs-muted); }

.container { max-width: 980px; margin: 24px auto; padding: 28px 32px; background: var(--cs-surface);
  border: 1px solid var(--cs-line); border-radius: var(--cs-radius); box-shadow: var(--cs-shadow); }
@media (max-width: 640px) { .container { margin: 12px 8px; padding: 18px 16px; } }

/* Header */
.site-header { position: sticky; top: 0; z-index: 30; padding: 8px 20px; background: rgba(255, 255, 255, 0.95);
  backdrop-filter: saturate(1.4) blur(6px); border-bottom: 1px solid var(--cs-line); }
.site-brand { gap: 10px; color: var(--cs-ink); font-size: 1.2rem; font-weight: 800; letter-spacing: -0.02em; }
.site-brand img { height: 34px; width: auto; }
.site-brand .site-brand-tag { font-size: 0.75rem; font-weight: 600; color: var(--cs-muted); letter-spacing: 0; }
.site-nav { gap: 6px 18px; }
.site-nav a, .site-nav-button { color: var(--cs-text); font-weight: 500; }
.site-nav a:hover, .site-nav-button:hover { color: var(--cs-blue); text-decoration: none; }
@media (max-width: 640px) { .site-brand .site-brand-tag { display: none; } }

/* Footer */
.site-footer { max-width: 980px; margin: 32px auto 40px; padding: 0 20px; color: var(--cs-muted); font-size: 0.88rem;
  display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }
.site-footer a { color: var(--cs-muted); }

/* Buttons */
.btn { border-radius: 8px; font-weight: 600; padding: 9px 18px; border: 1px solid transparent; cursor: pointer; line-height: 1.3; }
.btn-primary { background: var(--cs-blue); color: #fff; }
.btn-primary:hover { background: var(--cs-blue-dark); color: #fff; text-decoration: none; }
.btn-secondary { background: var(--cs-surface); color: var(--cs-ink); border-color: var(--cs-line); }
.btn-secondary:hover { background: var(--cs-blue-soft); color: var(--cs-blue-dark); border-color: #c9d9fb; text-decoration: none; }
.btn-small { padding: 4px 12px; font-size: 0.88rem; }

/* Forms */
input[type="text"], input[type="search"], input[type="email"], input[type="password"], textarea, select {
  font: inherit; color: var(--cs-text); background: #fff; border: 1px solid #cfd8e2; border-radius: 8px; padding: 9px 12px; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--cs-blue); box-shadow: 0 0 0 3px rgba(31, 107, 242, 0.18); }

/* Instant search, larger on the home page */
.instant-search input[type="search"] { border-radius: 10px; padding: 12px 16px; }
.instant-results { border-color: var(--cs-line); border-radius: 10px; box-shadow: 0 12px 32px rgba(19, 40, 61, 0.14); }
.instant-item.is-active, .instant-item:hover { background: var(--cs-blue-soft); }

/* Shared bits for athlete / team / video / event pages */
.match-won, .is-winner { color: var(--cs-win); }
.match-lost { color: var(--cs-loss); }
.athlete-matches li, .moment-list li, .events-list li, .division-list li, .home-list li { border-color: #eef2f6; }
.page-kicker { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--cs-blue-dark); }
.link-external { color: var(--cs-blue-dark); }
.timeline { background: var(--cs-blue-soft); }
.timeline .tick { width: 2px; margin-left: -1px; background: var(--cs-blue); opacity: 0.75; }
.timeline .tick:hover { opacity: 1; background: var(--cs-ink); width: 4px; margin-left: -2px; }
.moment-time { border-color: #c9d9fb; color: var(--cs-blue-dark); font-weight: 600; }
.moment-time:hover { background: var(--cs-blue-soft); }
