/* ============================================================
   OPEN GAITS — Design tokens
   Palette pulled directly from the chosen colorway:
   maroon (deep, top-of-image) -> teal-deep -> teal-sage -> cream
   ============================================================ */
:root {
  --maroon:      #3B2229;
  --maroon-ink:  #2A181D;
  --teal-deep:   #2C4F52;
  --teal-sage:   #6FA69C;
  --cream:       #EDE6E1;
  --cream-dim:   #DDD3CC;

  --font-display: "Fraunces", Georgia, serif;
  --font-body:    "Libre Franklin", -apple-system, sans-serif;
  --font-mono:    "IBM Plex Mono", ui-monospace, monospace;

  --radius: 3px;
  --max-width: 1100px;

  /* Retune Bootstrap 5's own variables to the same palette, so any
     Bootstrap component (cards, grid, buttons) inherits our brand
     automatically instead of Bootstrap's default blue. */
  --bs-primary: var(--teal-deep);
  --bs-link-color: var(--teal-deep);
  --bs-link-hover-color: var(--teal-sage);
  --bs-body-font-family: var(--font-body);
  --bs-body-color: var(--maroon-ink);
  --bs-body-bg: var(--cream);
  --bs-border-color: var(--cream-dim);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--maroon-ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--maroon);
}

a { color: var(--teal-deep); }
a:hover { color: var(--teal-sage); }

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--teal-sage);
  outline-offset: 2px;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header / nav ---------- */
.site-header {
  background: var(--maroon);
  border-bottom: 4px solid var(--teal-sage);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
}

.wordmark {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--cream);
  text-decoration: none;
  letter-spacing: 0.01em;
}

.wordmark span {
  color: var(--teal-sage);
}

.site-logo {
  height: 40px;
  width: auto;
  display: block;
}

.site-nav {
  display: flex;
  gap: 28px;
  align-items: center;
}

.site-nav a {
  color: var(--cream-dim);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--teal-sage);
}

.og-nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 3px;
  margin-left: 4px;
  border-radius: 999px;
  background: #c0392b;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  vertical-align: middle;
}

.site-nav a.cta {
  background: var(--teal-sage);
  color: var(--maroon-ink);
  padding: 8px 16px;
  border-radius: var(--radius);
}

.site-nav a.cta:hover {
  background: var(--cream);
  color: var(--maroon);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--cream);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle.nav-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.nav-open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.nav-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Community dropdown ---------- */
.site-nav .dropdown-toggle {
  color: var(--cream-dim);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
}

.site-nav .dropdown-toggle:hover,
.site-nav .dropdown-toggle.active {
  color: var(--teal-sage);
}

.site-nav .dropdown-toggle::after {
  margin-left: 6px;
}

.site-nav .dropdown-menu {
  background: var(--maroon);
  border: 1px solid var(--teal-sage);
  border-radius: var(--radius);
  padding: 6px;
  margin-top: 12px;
}

.site-nav .dropdown-item {
  color: var(--cream-dim);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--radius);
  padding: 8px 12px;
}

.site-nav .dropdown-item:hover,
.site-nav .dropdown-item:focus {
  background: var(--teal-sage);
  color: var(--maroon-ink);
}

.site-nav .dropdown-header {
  color: var(--teal-sage);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 8px 12px 2px;
}

.site-nav .dropdown-divider {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  margin: 6px 4px;
}

/* ---------- Gait Bar — the site's signature element ----------
   Four footfall rhythms, rendered as literal beat patterns.
   Used as a hero centerpiece and as section dividers in place
   of a plain <hr>. Each pattern is a real gait's footfall
   timing, not decoration. */
.gait-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 28px;
  margin: 0 auto;
}

.gait-bar .beat {
  background: currentColor;
  border-radius: 50%;
  opacity: 0;
  animation: beat-in 0.5s ease-out forwards;
}

@keyframes beat-in {
  from { opacity: 0; transform: scale(0.4); }
  to   { opacity: 1; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .gait-bar .beat { animation: none; opacity: 1; }
}

/* Walk: even 4-beat, evenly spaced, all same size */
.gait-bar.walk .beat { width: 10px; height: 10px; }
.gait-bar.walk .beat:nth-child(1) { animation-delay: 0s; }
.gait-bar.walk .beat:nth-child(2) { animation-delay: 0.15s; }
.gait-bar.walk .beat:nth-child(3) { animation-delay: 0.3s; }
.gait-bar.walk .beat:nth-child(4) { animation-delay: 0.45s; }

/* Trot: 2-beat diagonal pairs — beats cluster in twos */
.gait-bar.trot { gap: 6px; }
.gait-bar.trot .beat { width: 11px; height: 11px; }
.gait-bar.trot .beat:nth-child(2n) { margin-right: 22px; }
.gait-bar.trot .beat:nth-child(1) { animation-delay: 0s; }
.gait-bar.trot .beat:nth-child(2) { animation-delay: 0.05s; }
.gait-bar.trot .beat:nth-child(3) { animation-delay: 0.35s; }
.gait-bar.trot .beat:nth-child(4) { animation-delay: 0.4s; }

/* Canter: 3-beat, uneven grouping (1 - 2&3 together) */
.gait-bar.canter .beat:nth-child(1) { width: 13px; height: 13px; animation-delay: 0s; }
.gait-bar.canter .beat:nth-child(2) { width: 9px;  height: 9px;  margin-left: 18px; animation-delay: 0.25s; }
.gait-bar.canter .beat:nth-child(3) { width: 9px;  height: 9px;  animation-delay: 0.32s; }

/* Gallop: rapid 4-beat, tight and small, fast succession */
.gait-bar.gallop .beat { width: 8px; height: 8px; }
.gait-bar.gallop .beat:nth-child(1) { animation-delay: 0s; }
.gait-bar.gallop .beat:nth-child(2) { animation-delay: 0.06s; }
.gait-bar.gallop .beat:nth-child(3) { animation-delay: 0.12s; }
.gait-bar.gallop .beat:nth-child(4) { animation-delay: 0.18s; }

.gait-divider {
  color: var(--teal-sage);
  margin: 48px 0;
}

.gait-divider.center { justify-content: center; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(180deg, var(--maroon) 0%, var(--teal-deep) 100%);
  color: var(--cream);
  padding: 96px 0 84px;
  text-align: center;
}

.hero .gait-bar {
  justify-content: center;
  color: var(--teal-sage);
  margin-bottom: 28px;
}

.hero h1 {
  color: var(--cream);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  max-width: 16ch;
  margin: 0 auto 18px;
}

.hero h1 em {
  font-style: normal;
  color: var(--teal-sage);
}

.hero p.lede {
  max-width: 56ch;
  margin: 0 auto 36px;
  font-size: 1.15rem;
  color: var(--cream-dim);
}

.hero-ctas {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.98rem;
  padding: 14px 28px;
  border-radius: var(--radius);
  text-decoration: none;
  letter-spacing: 0.01em;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--teal-sage);
  color: var(--maroon-ink);
}
.btn-primary:hover { background: var(--cream); color: var(--maroon); }

.btn-ghost {
  background: transparent;
  color: var(--cream);
  border-color: var(--cream-dim);
}
.btn-ghost:hover { border-color: var(--teal-sage); color: var(--teal-sage); }

/* ---------- Generic sections ---------- */
.section {
  padding: 72px 0;
}

.section-head {
  text-align: center;
  max-width: 60ch;
  margin: 0 auto 48px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--teal-deep);
  display: block;
  margin-bottom: 10px;
}

/* ---------- Discipline cards ---------- */
.discipline-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.discipline-card {
  background: #fff;
  border: 1px solid var(--cream-dim);
  border-top: 4px solid var(--teal-sage);
  border-radius: var(--radius);
  padding: 28px 24px;
}

.discipline-card h3 {
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.discipline-card p {
  margin: 0;
  color: #4a3a3e;
  font-size: 0.96rem;
}

/* ---------- Loop / cycle steps ---------- */
.cycle {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.cycle-step {
  text-align: center;
  padding: 20px 14px;
}

.cycle-step .num {
  font-family: var(--font-mono);
  color: var(--teal-sage);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: 10px;
}

.cycle-step h4 {
  font-size: 1.05rem;
  margin-bottom: 6px;
}

.cycle-step p {
  margin: 0;
  font-size: 0.92rem;
  color: #4a3a3e;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--maroon);
  color: var(--cream-dim);
  padding: 40px 0;
  font-size: 0.9rem;
}

.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.site-footer a {
  color: var(--cream-dim);
}

.site-footer a:hover { color: var(--teal-sage); }

.footer-links {
  display: flex;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* ---------- Rules page ---------- */
.rules-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
  align-items: start;
  padding: 56px 0 96px;
}

.rules-toc {
  position: sticky;
  top: 24px;
  font-size: 0.9rem;
}

.rules-toc h2 {
  font-size: 1rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--teal-deep);
}

.rules-toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

.rules-toc li a {
  display: block;
  padding: 6px 0;
  text-decoration: none;
  color: var(--maroon-ink);
  border-left: 2px solid transparent;
  padding-left: 10px;
}

.rules-toc li a:hover {
  border-left-color: var(--teal-sage);
  color: var(--teal-deep);
}

.rule-section {
  margin-bottom: 52px;
  scroll-margin-top: 24px;
}

.rule-section h2 {
  font-size: 1.6rem;
  border-bottom: 2px solid var(--cream-dim);
  padding-bottom: 12px;
  margin-bottom: 20px;
}

.rule-item {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--cream-dim);
}

.rule-item .rule-num {
  font-family: var(--font-mono);
  color: var(--teal-sage);
  font-size: 0.85rem;
  padding-top: 2px;
}

.rule-item h3 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--maroon-ink);
}

.rule-item p {
  margin: 0;
  font-size: 0.96rem;
  color: #4a3a3e;
}

.rule-item ul {
  margin: 8px 0 0;
  padding-left: 20px;
  font-size: 0.96rem;
  color: #4a3a3e;
}

.page-title-band {
  background: var(--teal-deep);
  color: var(--cream);
  padding: 56px 0 40px;
  text-align: center;
}

.page-title-band h1 {
  color: var(--cream);
  margin-bottom: 8px;
}

.page-title-band p {
  color: var(--cream-dim);
  margin: 0;
}

.band-back-link {
  color: var(--cream-dim);
  text-decoration: underline;
}

.band-back-link:hover {
  color: var(--cream);
}

/* ---------- Admin ---------- */
.admin-tile-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.admin-tile {
  transition: border-color 0.15s ease;
}

.admin-tile-link:hover .admin-tile {
  border-color: var(--teal-sage);
}

.admin-tile-count {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--teal-deep);
  margin: 8px 0 2px;
}

.admin-photo-preview {
  height: 200px;
  object-fit: cover;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .discipline-grid,
  .cycle {
    grid-template-columns: 1fr;
  }
  .rules-layout {
    grid-template-columns: 1fr;
  }
  .rules-toc {
    position: static;
  }
  .site-nav {
    gap: 16px;
  }
}

@media (max-width: 768px) {
  .site-header .wrap {
    flex-wrap: wrap;
  }

  .nav-toggle {
    display: flex;
  }

  .site-nav {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
    order: 3;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    margin-top: 14px;
  }

  .site-nav.nav-open {
    display: flex;
  }

  .site-nav a,
  .site-nav .dropdown-toggle {
    width: 100%;
    padding: 12px 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .site-nav .dropdown {
    width: 100%;
  }

  .site-nav .dropdown-menu {
    position: static !important;
    width: 100%;
    margin: 0 0 4px;
    transform: none !important;
    box-shadow: none;
  }

  .site-nav a.cta {
    text-align: center;
    margin-top: 8px;
    border-bottom: none;
  }
}

/* ---------- Dashboard ---------- */
.og-card {
  border: 1px solid var(--cream-dim);
  border-top: 4px solid var(--teal-sage);
  border-radius: var(--radius);
}

.og-card .eyebrow {
  display: block;
  margin-bottom: 16px;
}

.dash-list {
  margin: 0 0 16px;
}

.dash-list .list-group-item {
  background: transparent;
}

.dash-list-label {
  font-size: 0.95rem;
  color: var(--maroon-ink);
}

.dash-list-value {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--teal-deep);
}

.dash-list-value .soon {
  font-family: var(--font-body);
  font-style: normal;
  font-weight: 500;
  font-size: 0.85rem;
  color: #8a7a7e;
}

.dash-empty {
  font-size: 0.92rem;
  color: #8a7a7e;
  margin: 0 0 16px;
}

.dash-link {
  display: inline-block;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
}

.dash-link-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.dash-link-row:first-of-type {
  margin-top: 12px;
}

.member-id-tag {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.55);
  margin-left: 10px;
}

.dash-stable-edit {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--teal-deep);
  text-decoration: none;
}

.dash-stable-edit:hover {
  color: var(--teal-sage);
}

.dash-divider {
  border: none;
  border-top: 1px solid var(--cream-dim);
  margin: 4px 0 12px;
}

.dash-stable-name-link {
  text-decoration: none;
}

.dash-stable-name-link:hover {
  color: var(--teal-deep);
  text-decoration: underline;
}

/* ---------- Horse table (view_all.php) ---------- */
.horse-search {
  max-width: 320px;
}

.horse-row {
  cursor: pointer;
}

.horse-thumb {
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  object-fit: cover;
  display: block;
}

.horse-thumb-placeholder {
  background: var(--teal-deep);
  color: var(--cream);
  font-family: var(--font-display);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

#horseTable,
#communityTable {
  font-size: 0.85rem;
}

#horseTable th.sortable,
#communityTable th.sortable {
  cursor: pointer;
  user-select: none;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

#horseTable th.sortable:hover,
#communityTable th.sortable:hover {
  color: var(--maroon);
}

.sort-icon {
  font-size: 0.7em;
  margin-left: 4px;
  opacity: 0.6;
}

#horseTable th.sort-asc .sort-icon,
#communityTable th.sort-asc .sort-icon,
#horseTable th.sort-desc .sort-icon,
#communityTable th.sort-desc .sort-icon {
  opacity: 1;
  color: var(--maroon);
}

/* Recolor Bootstrap's own table-dark header to the brand palette
   instead of hand-building a custom header - matches the teal
   og-card-header used on view.php. */
#horseTable thead.table-dark,
#communityTable thead.table-dark {
  --bs-table-bg: var(--teal-sage);
  --bs-table-color: var(--maroon-ink);
  --bs-table-border-color: var(--teal-deep);
}

#horseTable thead.table-dark .col-filter,
#communityTable thead.table-dark .col-filter {
  font-size: 0.8rem;
  border: none;
  color: var(--maroon-ink);
}

#horseTable thead.table-dark .col-filter::placeholder,
#communityTable thead.table-dark .col-filter::placeholder {
  color: rgba(42, 24, 29, 0.5);
}

#horseTable thead.table-dark .col-filter:focus,
#communityTable thead.table-dark .col-filter:focus {
  box-shadow: 0 0 0 2px var(--maroon);
}

.thumb-col {
  width: 46px;
}

/* ---------- Calendar ---------- */
.calendar-table {
  min-width: 700px;
  table-layout: fixed;
}

/* Mobile browsers (and DevTools' mobile emulator) hide overlay
   scrollbars by default, making the horizontal scroll invisible
   even though it works - force it visible so it's obvious there's
   more to swipe to. */
.calendar-scroll-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--teal-sage) var(--cream);
}

.calendar-scroll-wrap::-webkit-scrollbar {
  height: 10px;
}

.calendar-scroll-wrap::-webkit-scrollbar-track {
  background: var(--cream);
}

.calendar-scroll-wrap::-webkit-scrollbar-thumb {
  background: var(--teal-sage);
  border-radius: 5px;
}

.calendar-scroll-hint {
  display: none;
}

@media (max-width: 860px) {
  .calendar-scroll-hint {
    display: block;
    text-align: center;
    font-size: 0.75rem;
    color: var(--teal-deep);
    font-weight: 600;
    padding: 6px 0;
  }
}

.calendar-table th {
  background: var(--teal-sage);
  color: var(--maroon-ink);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 8px;
  width: 100px;
}

.calendar-empty {
  background: var(--cream);
  width: 100px;
}

.calendar-cell {
  background: #fff;
  vertical-align: top;
  width: 100px;
  height: 110px;
  padding: 6px !important;
}

.calendar-today {
  background: rgba(111, 166, 156, 0.15) !important;
}

.calendar-daynum {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #8a7a7e;
  margin-bottom: 4px;
}

.calendar-today .calendar-daynum {
  color: var(--maroon);
  font-weight: 700;
}

.calendar-show {
  margin-bottom: 6px;
}

.calendar-show-name {
  display: block;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--maroon-ink);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.calendar-show-name:hover {
  color: var(--teal-deep);
}

.calendar-show-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin-top: 2px;
}

.calendar-badge {
  font-size: 0.62rem;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 3px;
  line-height: 1.5;
}

.calendar-badge-discipline {
  color: #fff;
}

.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.calendar-legend-pill {
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
}

.calendar-badge-host {
  background: var(--maroon);
  color: var(--cream);
}

.calendar-badge-entered {
  background: var(--teal-sage);
  color: var(--maroon-ink);
}

.calendar-badge-done {
  background: #cfc9c6;
  color: var(--maroon-ink);
}

@media (max-width: 860px) {
  .calendar-cell {
    height: 70px;
  }
  .calendar-show-badges {
    display: none;
  }
}

@media (max-width: 500px) {
  .calendar-table {
    min-width: 490px;
  }
  .calendar-table th {
    font-size: 0.62rem;
    padding: 5px 3px;
    width: 70px;
  }
  .calendar-empty {
    width: 70px;
  }
  .calendar-cell {
    width: 70px;
    height: 58px;
    padding: 4px !important;
  }
  .calendar-daynum {
    font-size: 0.68rem;
    margin-bottom: 2px;
  }
  .calendar-show-name {
    font-size: 0.66rem;
  }
}

.leaderboard-tabs {
  border-bottom: 2px solid var(--cream-dim);
}

.leaderboard-tabs .nav-link {
  color: var(--maroon-ink);
  font-weight: 600;
  border: none;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  padding: 8px 16px;
}

.leaderboard-tabs .nav-link:hover {
  border-color: var(--cream-dim);
}

.leaderboard-tabs .nav-link.active {
  color: var(--teal-deep);
  background: transparent;
  border-color: var(--teal-sage);
}

.discipline-category-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--teal-deep);
  margin: 14px 0 6px;
}

.discipline-category-label:first-child {
  margin-top: 0;
}

.discipline-row {
  padding: 6px 0;
  border-bottom: 1px solid var(--cream-dim);
}

.discipline-levels {
  padding: 8px 0 4px 26px;
}

.discipline-levels .form-check-label {
  font-size: 0.88rem;
}

.entity-description {
  max-width: 320px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.horse-status-badge {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--cream-dim);
  color: var(--maroon-ink);
}

.status-active { background: var(--teal-sage) !important; color: var(--maroon-ink) !important; }
.status-retired { background: var(--cream-dim) !important; color: var(--maroon-ink) !important; }
.status-deceased { background: var(--maroon) !important; color: var(--cream) !important; }

/* ---------- Horse profile (view.php) ---------- */
.horse-title-band {
  background: var(--teal-deep);
  color: var(--cream);
  padding: 36px 0 28px;
}

.horse-breadcrumb {
  font-size: 0.85rem;
  color: var(--cream-dim);
  margin-bottom: 10px;
}

.horse-breadcrumb a {
  color: var(--cream-dim);
  text-decoration: none;
}

.horse-breadcrumb a:hover {
  color: var(--teal-sage);
}

.horse-title-band h1 {
  color: var(--cream);
  margin-bottom: 10px;
}

.horse-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.horse-badge {
  background: rgba(255, 255, 255, 0.14) !important;
  color: var(--cream) !important;
  font-weight: 500;
  font-size: 0.8rem;
  padding: 6px 12px;
  border-radius: 999px;
}

.btn-og-gold {
  background: var(--teal-sage);
  color: var(--maroon-ink);
  border: none;
  font-weight: 700;
}

.btn-og-gold:hover {
  background: var(--cream);
  color: var(--maroon);
}

.btn-og-gold:disabled {
  background: var(--teal-sage);
  color: var(--maroon-ink);
  opacity: 0.85;
}

.horse-hero-photo {
  width: 100%;
  height: 320px;
  object-fit: cover;
  border-radius: var(--radius);
}

.horse-hero-placeholder {
  background: var(--teal-deep);
  color: var(--cream);
  font-family: var(--font-display);
  font-size: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.photo-pending-note {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  background: var(--maroon);
  color: var(--cream-dim);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: var(--radius);
  text-align: center;
}

.og-card {
  background: #fff;
  border: 1px solid var(--cream-dim);
  border-radius: var(--radius);
  overflow: hidden;
}

.og-card .card-header.og-card-header {
  background: var(--teal-sage);
  color: var(--maroon-ink);
  font-family: var(--font-display);
  font-weight: 600;
  border-bottom: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.private-tag {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.75rem;
  color: rgba(42, 24, 29, 0.65);
}

.panel-edit-link {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--maroon);
  text-decoration: underline;
}

.og-detail-table,
.og-detail-table th,
.og-detail-table td {
  background-color: #fff;
}

.og-detail-table th {
  color: #8a7a7e;
  font-weight: 500;
  width: 40%;
  border-color: var(--cream-dim);
}

.og-detail-table td {
  border-color: var(--cream-dim);
}

/* Multi-column data table (banking history, etc.) - same white-
   background fix as og-detail-table, but without the 40%-width
   rule that's only appropriate for a 2-column label/value table. */
.og-history-table,
.og-history-table th,
.og-history-table td {
  background-color: #fff;
}

.og-history-table th {
  color: #8a7a7e;
  font-weight: 500;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-color: var(--cream-dim);
}

.og-history-table td {
  border-color: var(--cream-dim);
  vertical-align: middle;
}

.competition-stat {
  background: #fff;
  border: 1px solid var(--cream-dim);
  border-radius: var(--radius);
  padding: 12px 14px;
  text-align: center;
}

.competition-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--teal-deep);
  margin-bottom: 4px;
}

/* ---------- Pedigree table ---------- */
.pedigree-table {
  font-size: 0.85rem;
}

.pedigree-table,
.pedigree-table td.pedigree-cell {
  background: #fff !important;
}

.pedigree-cell {
  vertical-align: middle;
  min-width: 140px;
}

.pedigree-name {
  display: block;
  font-size: 0.88rem;
  color: var(--maroon-ink);
}

.pedigree-breed {
  display: block;
  font-size: 0.72rem;
  color: #8a7a7e;
}

.pedigree-unknown {
  font-size: 0.82rem;
  color: #8a7a7e;
}
