:root {
  --bg: #1d1d2d;
  --surface: #f6f7fb;
  --ink: #13192b;
  --muted: #55627e;
  --accent: #f2645b;
  --accent-dark: #d85349;
  --line: rgba(120, 136, 170, 0.24);
  --panel: #23253a;
  --panel-soft: #2c3151;
  --success: #2d8f5a;
  --shadow: 0 26px 64px rgba(7, 11, 22, 0.22);
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --max: 1320px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: #f5f6fb;
  background:
    radial-gradient(circle at top center, rgba(242, 100, 91, 0.08), transparent 22%),
    linear-gradient(180deg, #202230 0%, #1c1d2c 34%, #1f2031 100%);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

body.home-neutral {
  background:
    radial-gradient(circle at top center, rgba(242, 100, 91, 0.08), transparent 22%),
    linear-gradient(180deg, #202230 0%, #1c1d2c 34%, #1f2031 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

.page-shell {
  min-height: 100vh;
  width: 100%;
  overflow-x: clip;
}

main {
  width: 100%;
  min-width: 0;
}

.admin-page > * {
  width: min(calc(100% - 48px), var(--max));
  margin-left: auto;
  margin-right: auto;
}

.topbar,
.footer,
.hero,
.stats-grid,
.content-grid,
.pricing,
.cta-band,
.download-band,
.auth-shell,
.dashboard-grid,
.app-hero,
.admin-header,
.admin-grid {
  width: min(calc(100% - 48px), var(--max));
  margin: 0 auto;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 30px 0 20px;
  border-bottom: 1px solid rgba(242, 100, 91, 0.28);
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  min-width: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, #272b46 0%, #1f2238 100%);
  border: 3px solid var(--accent);
  color: #fff;
  position: relative;
  box-shadow: 0 0 18px rgba(242, 100, 91, 0.22), 0 16px 28px rgba(0, 0, 0, 0.16);
}

.brand-mark-text {
  position: relative;
  z-index: 2;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  font-size: 1.48rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: #ffd36a;
  text-shadow: 0 0 10px rgba(255, 211, 106, 0.18);
}

.brand-mark-track {
  position: absolute;
  left: 11px;
  right: 10px;
  bottom: 11px;
  height: 10px;
  z-index: 1;
}

.brand-mark-track::before,
.brand-mark-track::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  border-radius: 999px;
}

.brand-mark-track::before {
  bottom: 1px;
  height: 2px;
  background: linear-gradient(90deg, #ffd36a 0%, #ffb94d 45%, #ea5a57 100%);
  transform: skewX(-28deg);
}

.brand-mark-track::after {
  width: 58%;
  left: 18%;
  bottom: 4px;
  height: 2px;
  background: #ffd36a;
  transform: skewX(28deg);
}

.brand-copy {
  display: flex;
  flex-direction: column;
}

.brand-copy small,
.muted {
  color: var(--muted);
  font-weight: 500;
}

.brand-copy strong {
  color: #ff7769;
  font-size: clamp(2rem, 2.4vw, 2.35rem);
  line-height: 1;
  letter-spacing: 0.01em;
  text-shadow: 0 0 14px rgba(242, 100, 91, 0.16);
}

.brand-copy small {
  font-style: italic;
  font-size: 0.98rem;
  line-height: 1.25;
  color: #a7aed4;
}

.nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  align-items: center;
  min-width: 0;
}

.nav a,
.nav a:visited,
.nav a:hover,
.nav a:focus,
.nav a:active {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 0;
  border-bottom: 3px solid transparent;
  color: #d9deef;
  background: transparent;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  font-size: 0.96rem;
  font-weight: 700;
  text-decoration: none !important;
  box-shadow: none;
  outline: none;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.nav a:hover,
.nav a:focus-visible {
  color: #ffffff;
  background: rgba(242, 100, 91, 0.18);
  border-bottom-color: #f2645b;
}

.today-badge {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(242, 100, 91, 0.46);
  background: rgba(255, 255, 255, 0.03);
  color: #ffe2dc;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
}

.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: center;
  padding: 56px 0 32px;
}

.eyebrow {
  margin: 0 0 10px;
  color: #d94f45;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
}

h1,
h2,
h3,
strong {
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
}

h1 {
  margin: 0;
  font-size: clamp(3rem, 5vw, 5.2rem);
  line-height: 1.02;
}

h2 {
  margin: 0 0 14px;
  font-size: clamp(1.5rem, 4vw, 2.4rem);
}

.hero-text,
.pillar-card p,
.feature-list li,
.pricing-card p,
.auth-card p,
.race-card p,
.footer p {
  color: var(--muted);
  line-height: 1.6;
  font-size: 1rem;
  font-weight: 500;
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  font-weight: 700;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: #ea5a57;
  color: #fff;
  box-shadow: 0 12px 28px rgba(242, 100, 91, 0.26);
}

.button-secondary {
  border-color: #ea5a57;
  background: #ffffff;
  color: #10203d;
}

.button-primary:hover {
  background: #f2645b;
}

.button-secondary:hover {
  background: #fff1ee;
  color: #10203d;
}

.panel-card,
.stat-card,
.pillar-card,
.pricing-card,
.auth-card,
.race-card,
.watchlist-card,
.table-card,
.summary-box {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(244, 246, 251, 0.96) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  color: var(--ink);
}

.glass {
  background:
    linear-gradient(135deg, rgba(15, 26, 46, 0.95), rgba(20, 34, 60, 0.88)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent);
  color: #f9efe0;
}

.panel-card {
  padding: 34px;
}

.chip {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: inherit;
  font-size: 0.82rem;
  margin-bottom: 16px;
}

.pricing-card-meta .chip,
.pricing-card-meta .plan-badge {
  margin-bottom: 0;
}

.support-summary-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 12px 0 18px;
}

.admin-support-summary {
  padding: 0 0 14px;
}

.support-chip {
  font-size: 0.76rem;
  margin-bottom: 0;
}

.support-chip-open {
  background: rgba(251, 191, 36, 0.18);
  color: #92400e;
}

.support-chip-answered {
  background: rgba(59, 130, 246, 0.14);
  color: #1d4ed8;
}

.support-chip-closed {
  background: rgba(34, 197, 94, 0.16);
  color: #166534;
}

.support-message-card {
  border-left: 4px solid rgba(194, 77, 44, 0.14);
}

.support-message-card-open {
  border-left-color: #f59e0b;
}

.support-message-card-answered {
  border-left-color: #3b82f6;
}

.support-message-card-closed {
  border-left-color: #22c55e;
}

.support-message-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}

.support-message-card strong,
.support-message-card p,
.support-message-card label,
.support-message-card textarea,
.support-message-card select,
.support-message-card input {
  color: #12284a;
}

.support-message-card p {
  font-weight: 600;
}

.support-message-card .muted {
  color: #5f739a;
  font-weight: 600;
}

.support-message-card .demo-box p {
  color: #28446f;
}

.support-message-card textarea::placeholder,
.support-message-card input::placeholder {
  color: #6e80a5;
  opacity: 1;
}

.panel-list,
.feature-list {
  margin: 0;
  padding-left: 18px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  padding: 24px 0 12px;
}

.stat-card {
  padding: 28px;
}

.stat-card strong {
  display: block;
  font-size: 2rem;
  margin-bottom: 6px;
}

.home-stats-shell {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: min(calc(100% - 48px), var(--max));
  margin: 28px auto 34px;
  padding: 26px 30px 30px;
  background: linear-gradient(180deg, rgba(251, 252, 255, 0.99) 0%, rgba(243, 246, 251, 0.96) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 50px rgba(6, 10, 24, 0.18);
}

.home-stats-shell .eyebrow,
.home-stats-shell h2 {
  text-align: center;
}

.home-stats-grid {
  width: 100%;
  margin: 0;
  padding: 8px 0 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  justify-content: stretch;
  align-items: stretch;
  gap: 18px;
}

.home-stats-grid .stat-card {
  min-width: 0;
  text-align: center;
  background: linear-gradient(180deg, rgba(255, 251, 244, 0.98) 0%, rgba(252, 244, 233, 0.95) 100%);
  border-color: rgba(194, 77, 44, 0.14);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.home-stats-grid:hover .stat-card {
  transform: translateY(-6px) scale(1.035);
  box-shadow: 0 30px 90px rgba(18, 30, 52, 0.18);
  border-color: rgba(194, 77, 44, 0.22);
}

.home-hub-shell {
  margin-top: 28px;
}

.home-hub-card {
  display: grid;
  gap: 18px;
}

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

.home-hub-metrics .subpage-card {
  min-height: 0;
}

.home-hub-metrics .subpage-card strong {
  display: block;
  margin-bottom: 4px;
}

body.home-neutral .eyebrow {
  color: #d94f45;
}

body.home-neutral .home-stats-shell {
  background: linear-gradient(180deg, rgba(251, 252, 255, 0.99) 0%, rgba(243, 246, 251, 0.96) 100%);
  border-color: rgba(255, 255, 255, 0.06);
}

body.home-neutral .home-stats-grid .stat-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 1) 0%, rgba(245, 247, 252, 0.98) 100%);
  border-color: rgba(120, 136, 170, 0.18);
}

body.home-neutral .home-stats-grid:hover .stat-card {
  border-color: rgba(242, 100, 91, 0.22);
}

body.home-neutral .positioning-card-light,
body.home-neutral .positioning-card-dark {
  background: linear-gradient(180deg, rgba(251, 249, 244, 0.98) 0%, rgba(244, 240, 233, 0.94) 100%);
  border-color: rgba(113, 129, 153, 0.14);
  color: var(--ink);
}

body.home-neutral .positioning-icon-check,
body.home-neutral .positioning-icon-cross {
  background: rgba(113, 129, 153, 0.12);
  color: #526074;
  box-shadow: none;
}

body.home-neutral .positioning-item,
body.home-neutral .positioning-mission {
  border-color: rgba(113, 129, 153, 0.14);
  background: rgba(255, 255, 255, 0.72);
}

body.home-neutral .positioning-negative-list li {
  border-bottom-color: rgba(113, 129, 153, 0.12);
}

body.home-neutral .positioning-mission span {
  color: #6e7686;
}

body.home-neutral .download-band {
  background: linear-gradient(180deg, rgba(252, 252, 255, 0.99) 0%, rgba(243, 246, 251, 0.96) 100%);
  color: var(--ink);
}

body.home-neutral .download-band .eyebrow {
  color: #d94f45;
}

.hub-page-shell {
  width: min(calc(100% - 48px), var(--max));
  margin: 0 auto 44px;
  display: grid;
  gap: 26px;
}

.hub-page-shell .app-hero,
.hub-page-shell .content-grid,
.hub-page-shell .module-shell,
.hub-page-shell .wide-block {
  width: 100%;
  margin: 0;
}

.hub-page-shell .content-grid,
.hub-page-shell .module-shell {
  padding: 0;
}

.hub-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  gap: 28px;
  align-items: start;
  padding: 10px 0 0;
}

.hub-hero-copy {
  max-width: 920px;
}

.hub-hero-copy h1 {
  font-size: clamp(3rem, 4.2vw, 4.8rem);
}

.hub-hero-copy .hero-text {
  max-width: 860px;
  font-size: 1.08rem;
}

.hub-metric-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-self: stretch;
}

.hub-metric-card {
  min-height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hub-metric-card strong {
  display: block;
  margin: 8px 0 6px;
  font-size: clamp(1.9rem, 2vw, 2.5rem);
}

.hub-split-grid,
.hub-data-grid {
  grid-template-columns: minmax(0, 0.92fr) minmax(320px, 0.78fr);
  gap: 18px;
  width: 100%;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

.dual-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px;
  width: 100%;
  max-width: none;
  margin: 0;
}

.hub-grid-2 {
  margin-top: 8px;
}

.hub-story-shell {
  display: grid;
  gap: 24px;
}

.hub-inline-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
  width: 100%;
  max-width: none;
  margin: 0;
}

.hub-inline-row .section-block h2,
.hub-inline-row .section-dark h2 {
  font-size: clamp(1.35rem, 1.5vw, 2rem);
  line-height: 1.25;
}

.profile-overview-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  width: 100%;
  max-width: none;
}

.profile-sire-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.profile-story-grid {
  width: 100%;
  max-width: none;
}

.hub-story-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  width: 100%;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

.hub-wide-card {
  padding: 30px;
}

.hub-page-shell .section-block,
.hub-page-shell .section-dark {
  min-height: 100%;
  max-width: 100%;
}

.hub-page-shell .dashboard-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 0;
}

.hub-page-shell .subpage-card {
  min-height: 118px;
}

.hub-page-shell .subpage-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1.05rem;
}

.content-grid,
.dashboard-grid,
.admin-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 26px;
  padding: 42px 0;
}

.content-grid > *,
.dashboard-grid > *,
.admin-grid > * {
  min-width: 0;
}

.admin-grid-full {
  grid-template-columns: minmax(0, 1fr);
}

.section-block,
.section-dark {
  padding: 32px;
  border-radius: var(--radius-lg);
}

.section-block {
  background: linear-gradient(180deg, rgba(251, 252, 255, 0.99) 0%, rgba(243, 246, 251, 0.96) 100%);
  border: 1px solid var(--line);
  color: var(--ink);
}

.section-dark {
  background: linear-gradient(180deg, rgba(37, 41, 67, 0.98) 0%, rgba(31, 34, 56, 0.96) 100%);
  color: #f4f6ff;
}

.about-contact-block {
  display: grid;
  gap: 10px;
}

.about-contact-label {
  margin-bottom: 0;
  color: #ff7a68;
  font-weight: 800;
}

.about-contact-email {
  margin: 0;
  color: #ffffff;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.35;
}

.faq-shell {
  display: grid;
  gap: 18px;
}

.faq-shell h2 {
  margin-bottom: 0;
}

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

.faq-item {
  border: 1px solid rgba(120, 136, 170, 0.2);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.82);
  overflow: hidden;
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 22px;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  color: #10203d;
  position: relative;
  padding-right: 56px;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.35rem;
  line-height: 1;
  color: #ea5a57;
}

.faq-item[open] summary::after {
  content: "-";
}

.faq-item p {
  margin: 0;
  padding: 0 22px 18px;
  color: #445574;
  line-height: 1.65;
  font-weight: 500;
}

.positioning-shell {
  width: min(calc(100% - 48px), var(--max));
  margin: 0 auto 34px;
  display: grid;
  gap: 22px;
}

.positioning-intro {
  max-width: 860px;
}

.positioning-intro h2 {
  margin-bottom: 12px;
}

.positioning-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.92fr);
  gap: 22px;
  align-items: stretch;
}

.positioning-card {
  padding: 34px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.positioning-card-light {
  background: linear-gradient(180deg, rgba(251, 252, 255, 0.99) 0%, rgba(243, 246, 251, 0.96) 100%);
}

.positioning-card-dark {
  background: linear-gradient(180deg, rgba(245, 247, 253, 0.99) 0%, rgba(237, 241, 249, 0.96) 100%);
  color: var(--ink);
  border-color: rgba(242, 100, 91, 0.16);
}

.positioning-card-head {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 26px;
}

.positioning-card-head h3 {
  margin: 4px 0 0;
  font-size: clamp(1.45rem, 2vw, 2rem);
  line-height: 1.18;
}

.positioning-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  flex: 0 0 auto;
}

.positioning-icon-check {
  background: linear-gradient(180deg, #ff7e70 0%, #f2645b 100%);
  color: #fff;
  box-shadow: 0 16px 34px rgba(242, 100, 91, 0.22);
}

.positioning-icon-cross {
  background: rgba(242, 100, 91, 0.12);
  color: var(--accent-dark);
}

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

.positioning-item {
  padding: 18px 20px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(242, 100, 91, 0.12);
  background: rgba(255, 255, 255, 0.72);
}

.positioning-item strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.08rem;
}

.positioning-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.positioning-negative-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 16px;
}

.positioning-negative-list li {
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(242, 100, 91, 0.12);
  color: var(--ink);
  font-size: 1.05rem;
  line-height: 1.55;
}

.positioning-negative-list li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.positioning-mission {
  margin-top: 24px;
  padding: 18px 20px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(242, 100, 91, 0.14);
}

.positioning-mission span {
  display: block;
  margin-bottom: 8px;
  color: var(--accent-dark);
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.positioning-mission strong {
  font-size: 1.08rem;
  line-height: 1.5;
}

.pillar-grid,
.pricing-grid,
.cards-stack,
.subpage-grid {
  display: grid;
  gap: 16px;
}

.pricing-card-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.pillar-grid {
  grid-template-columns: repeat(3, 1fr);
}

.pillar-card,
.pricing-card,
.race-card,
.watchlist-card,
.table-card,
.summary-box,
.subpage-card {
  padding: 26px;
}

.subpage-grid {
  grid-template-columns: repeat(2, 1fr);
}

.subpage-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(244, 247, 252, 0.97) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--ink);
}

.subpage-card p,
.subpage-card .muted,
.stat-card span,
.summary-box span,
.table-header span,
.qr-card p,
.qr-card small {
  color: var(--muted);
  font-weight: 500;
}

.subpage-card strong,
.stat-card strong,
.summary-box strong,
.table-header h2,
h3 {
  color: #10203d;
}

.subpage-tabs {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.subpage-tab,
.subpage-tab:visited,
.subpage-tab:focus,
.subpage-tab:active {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 9px 26px;
  border-radius: 999px;
  border: 1px solid #ea5a57;
  background: #fff;
  color: var(--ink);
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none !important;
  box-shadow: none;
  outline: none;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.subpage-tab:hover {
  background: #fff0ed;
  color: var(--ink);
  border-color: #ea5a57;
  transform: translateY(-1px);
}

.subpage-tab-active,
.subpage-tab-active:visited,
.subpage-tab-active:hover,
.subpage-tab-active:focus,
.subpage-tab-active:active {
  background: #ea5a57;
  color: #fff;
  border-color: #ea5a57;
  text-decoration: none !important;
}

.pricing {
  padding: 28px 0 42px;
}

.pricing-grid {
  grid-template-columns: repeat(3, 1fr);
}

.pricing-grid > *,
.subpage-grid > *,
.stats-grid > *,
.home-hub-metrics > *,
.hub-story-grid > *,
.dashboard-grid > *,
.content-grid > * {
  min-width: 0;
}

.membership-pricing-grid {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  justify-content: center;
  transition: transform 180ms ease;
}

.membership-pricing-card {
  flex: 1 1 0;
  min-width: 0;
  transform: none !important;
  transition: box-shadow 180ms ease, border-color 180ms ease;
}

.membership-pricing-grid .membership-pricing-card.featured {
  background: linear-gradient(180deg, rgba(255, 247, 245, 0.99) 0%, rgba(255, 255, 255, 0.98) 100%) !important;
  border-color: var(--line) !important;
  box-shadow: var(--shadow);
  transform: none !important;
}

.membership-pricing-grid:hover,
.membership-pricing-grid:focus-within,
.membership-pricing-grid.membership-pricing-grid-active {
  transform: translateY(-12px);
}

.membership-card-cluster {
  display: grid;
  gap: 18px;
}

.membership-shared-card {
  transform: translateY(0);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.membership-card-cluster.membership-card-cluster-active .membership-shared-card {
  transform: translateY(-12px);
}

.membership-focus-card {
  width: min(calc(100% - 48px), var(--max));
  margin: 0 auto 18px;
  padding: 26px 30px;
}

.membership-hero-title {
  font-size: clamp(2.4rem, 4.2vw, 4.6rem);
  white-space: nowrap;
}

.membership-test-box {
  border: 1px solid rgba(214, 48, 49, 0.55);
  background: linear-gradient(135deg, rgba(255, 236, 236, 0.95), rgba(255, 214, 214, 0.9));
  box-shadow: 0 18px 40px rgba(176, 24, 24, 0.18);
}

.membership-test-box strong:first-child {
  color: #b5121b;
  font-size: 1.18rem;
  letter-spacing: 0.01em;
}

.membership-test-box .hero-text {
  color: #9f172a;
  font-weight: 800;
  margin-top: 10px;
  margin-bottom: 0;
}

.membership-test-box .muted,
.membership-test-box [data-test-countdown-full] {
  color: #7f1d1d;
  font-weight: 700;
}

.membership-test-box [data-test-countdown-days] {
  color: #dc2626;
}

.membership-focus-card h2 {
  margin-bottom: 14px;
  font-size: clamp(2rem, 3vw, 2.8rem);
}

.membership-focus-card .hero-text {
  max-width: 860px;
  margin-bottom: 0;
  color: #b7c6e3;
  font-weight: 700;
  text-shadow: 0 1px 0 rgba(7, 12, 24, 0.18);
}

.membership-messages-card {
  width: min(calc(100% - 48px), var(--max));
  margin: 18px auto 0;
  padding: 28px 30px;
}

.membership-messages-card h2 {
  margin-bottom: 8px;
}

.membership-messages-card .cards-stack {
  margin-top: 12px;
}

.membership-messages-card .subpage-card {
  background: rgba(255, 255, 255, 0.78);
}

.membership-support-open-note {
  margin-bottom: 14px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(42, 122, 78, 0.22);
  background: rgba(226, 244, 233, 0.88);
}

.membership-support-open-note strong {
  display: block;
  margin-bottom: 4px;
  color: #1f6a42;
}

.modules-showcase {
  width: min(calc(100% - 48px), var(--max));
  margin: 0 auto 42px;
}

.pricing-card.featured {
  background: linear-gradient(180deg, #fff7f5 0%, #ffffff 100%);
  border-color: rgba(242, 100, 91, 0.34);
  transform: translateY(-8px);
}

.module-card-locked {
  opacity: 0.82;
}

.execution-band {
  width: min(calc(100% - 48px), var(--max));
  margin: 0 auto 26px;
}

.execution-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.execution-card {
  padding: 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(244, 247, 252, 0.97) 100%);
}

.execution-card h3 {
  margin: 8px 0 10px;
}

.execution-card p {
  margin: 0 0 18px;
  color: var(--muted);
}

.execution-step {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(194, 77, 44, 0.12);
  color: var(--accent-dark);
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cta-band {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 28px 32px;
  margin-bottom: 56px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #182541 0%, #24385b 100%);
  color: #f7f3ea;
}

.download-band {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 36px;
  align-items: center;
  padding: 46px 40px;
  margin-bottom: 56px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at top left, rgba(242, 100, 91, 0.12), transparent 24%),
    linear-gradient(180deg, rgba(252, 252, 255, 0.99) 0%, rgba(243, 246, 251, 0.96) 100%);
  color: var(--ink);
  box-shadow: 0 24px 64px rgba(7, 11, 22, 0.18);
}

.download-band .eyebrow {
  color: #ff7f6e;
}

.download-band h2 {
  max-width: 760px;
  font-size: clamp(2.8rem, 5vw, 5.4rem);
  line-height: 0.96;
}

.download-copy .hero-text {
  max-width: 720px;
  color: var(--muted);
  font-size: 1.1rem;
}

.download-actions {
  display: flex;
  gap: 16px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.store-button {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 72px;
  padding: 0 28px;
  border-radius: 20px;
  background: linear-gradient(180deg, #ff7a22 0%, #ff6820 100%);
  color: #fff;
  box-shadow: 0 18px 40px rgba(255, 104, 32, 0.26);
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  font-size: 1rem;
  font-weight: 700;
}

.store-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  font-size: 1.05rem;
}

.qr-card {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 28px;
  border-radius: 28px;
  background: #f9f8f6;
  color: #0f1a2e;
  box-shadow: 0 20px 60px rgba(7, 12, 24, 0.18);
}

.qr-image {
  width: min(100%, 260px);
  aspect-ratio: 1;
  object-fit: contain;
  padding: 10px;
  background: #fff;
  border-radius: 20px;
}

.qr-card h3 {
  margin: 6px 0 0;
  font-size: 1.8rem;
}

.qr-card p,
.qr-card small {
  margin: 0;
  color: #44526c;
  text-align: center;
}

.qr-card small {
  word-break: break-word;
}

.auth-shell {
  display: grid;
  place-items: center;
  padding: 60px 0;
}

.auth-card {
  width: min(100%, 560px);
  padding: 28px;
}

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

.auth-form label {
  display: grid;
  gap: 8px;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
}

.auth-form input {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: #fff;
  font: inherit;
}

.auth-inline-actions {
  display: flex;
  justify-content: flex-end;
}

.auth-inline-actions a {
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  font-size: 0.95rem;
}

.stack-form,
.upgrade-form {
  display: grid;
  gap: 12px;
}

.stack-form textarea,
.upgrade-form textarea,
.stack-form input,
.stack-form select {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: #fff;
  font: inherit;
  resize: vertical;
}

.filter-bar {
  display: flex;
  gap: 14px;
  align-items: end;
  flex-wrap: wrap;
  min-width: 0;
}

.date-nav {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(255, 245, 240, 0.92);
  border: 1px solid rgba(194, 77, 44, 0.18);
  max-width: 100%;
}

.date-nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: #ea5a57;
  color: #fff;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  font-weight: 800;
  line-height: 1;
}

.date-nav-button:hover,
.date-nav-button:focus-visible {
  background: #f2645b;
  text-decoration: none !important;
}

.date-nav-label {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 14px;
  border-radius: 999px;
  background: #f4f0ee;
  color: #22314d;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.filter-bar label {
  display: grid;
  gap: 8px;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
}

.filter-bar select {
  min-width: 240px;
  max-width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: #fff;
  font: inherit;
}

.filter-bar input {
  min-width: 150px;
  max-width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: #fff;
  font: inherit;
}

.primary-action {
  padding: 12px 18px;
  border: 0;
  border-radius: 999px;
  background: #c85a34;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.live-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 18px;
}

.coupon-board {
  display: grid;
  gap: 18px;
}

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

.coupon-leg-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.9);
  display: grid;
  gap: 12px;
}

.coupon-leg-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.coupon-leg-top span {
  color: var(--muted);
  font-size: 0.88rem;
}

.coupon-leg-nos {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.coupon-leg-nos span {
  min-width: 40px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #162033;
  color: #fff;
  text-align: center;
  font-weight: 700;
}

.coupon-leg-names {
  display: grid;
  gap: 6px;
  color: #1f2937;
  font-size: 0.95rem;
}

@media (max-width: 900px) {
  .coupon-leg-list,
  .live-summary-grid,
  .home-hub-metrics {
    grid-template-columns: 1fr;
  }
}

.code-box {
  margin: 0;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(194, 77, 44, 0.16);
  background: #f9f8f6;
  color: #0f1a2e;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  font-family: Consolas, monospace;
  font-size: 0.9rem;
  line-height: 1.45;
}

.code-box-tall {
  min-height: 420px;
  padding: 18px 20px;
}

.alert-box {
  padding: 16px 18px;
  border: 1px solid rgba(194, 77, 44, 0.24);
  border-radius: var(--radius-md);
  background: #fff1eb;
}

.app-hero,
.admin-header {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  align-items: end;
  padding: 22px 0 10px;
}

.admin-header-stack {
  display: grid;
  gap: 14px;
  align-items: start;
}

.admin-subnav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 18px;
  width: 100%;
  position: relative;
  z-index: 6;
}

.admin-subnav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  font-weight: 700;
  position: relative;
  z-index: 7;
  pointer-events: auto;
  cursor: pointer;
}

.admin-subnav-link-active {
  background: #c85a34;
  color: #fff;
  border-color: #c85a34;
}

.admin-subnav-link-alert {
  background: #b42318;
  color: #fff;
  border-color: #b42318;
}

.admin-page a.button,
.admin-page .button {
  position: relative;
  z-index: 7;
  pointer-events: auto;
  cursor: pointer;
}

.admin-page .subpage-card,
.admin-page .table-card,
.admin-page .section-block,
.admin-page .admin-header {
  position: relative;
  z-index: 1;
}

.app-summary {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.summary-box span,
.race-meta,
table th {
  color: var(--muted);
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.race-card h2,
.watchlist-card h2 {
  margin-top: 12px;
}

.race-meta {
  display: flex;
  justify-content: space-between;
}

.table-card {
  overflow: hidden;
}

.annaliz-mesafe-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.5fr 1fr;
  gap: 16px;
}

.annaliz-inner-card {
  padding: 20px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: none;
}

.annaliz-race-copy {
  margin: 0 0 18px;
}

.annaliz-race-copy strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1.15rem;
}

.annaliz-race-copy p {
  margin: 0;
  color: var(--muted);
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
}

.annaliz-note {
  margin: 16px 4px 0;
}

.module-shell {
  width: min(calc(100% - 48px), var(--max));
  margin: 0 auto 34px;
  display: grid;
  gap: 34px;
}

.module-shell > .dashboard-grid,
.module-shell > .wide-block,
.module-shell > .shell-block {
  width: 100%;
  margin: 0;
}

.module-shell > .dashboard-grid {
  padding: 0;
}

.wide-block {
  width: min(calc(100% - 48px), var(--max));
  margin: 0 auto 34px;
}

.shell-block {
  width: min(calc(100% - 48px), var(--max));
  margin: 0 auto 34px;
}

.table-scroll {
  overflow: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

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

.history-toolbar-card {
  padding: 18px 20px;
}

.history-race-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 12px 16px;
  border-radius: 10px;
  background: rgba(255, 250, 241, 0.92);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
}

.history-race-strip strong {
  font-size: 1.05rem;
  line-height: 1.2;
  white-space: nowrap;
}

.history-race-strip span {
  text-align: right;
  font-size: 0.98rem;
  line-height: 1.25;
  color: var(--muted);
}

.history-toolbar + .history-race-strip {
  display: none;
}

.module-shell > .dashboard-grid {
  align-items: stretch;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.module-shell > .dashboard-grid .subpage-card {
  min-height: 0;
  padding: 16px 18px;
}

.module-shell > .dashboard-grid .subpage-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1.2rem;
  line-height: 1.15;
}

.module-shell > .dashboard-grid .subpage-card .muted {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.35;
}

@media (max-width: 1100px) {
  .module-shell > .dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .module-shell > .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

.admin-grid .table-scroll {
  width: 100%;
  overflow-x: auto;
  overflow-y: visible;
}

.admin-grid table {
  min-width: 100%;
}

.chip-warning {
  background: rgba(214, 125, 45, 0.14);
  color: #9a4f08;
  border: 1px solid rgba(214, 125, 45, 0.28);
}

.results-summary-strip {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-top: 18px;
  padding: 14px 18px;
  border: 1px solid rgba(140, 96, 42, 0.24);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #f7f0df 0%, #f2e7cf 100%);
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
}

.results-summary-strip strong {
  color: #7a4b18;
}

.results-summary-strip span {
  color: #4b5565;
}

.results-table-card {
  border-color: rgba(140, 96, 42, 0.2);
}

.results-table-header {
  align-items: center;
}

.results-table thead th {
  background: #a36d32;
  color: #fff7eb;
  white-space: nowrap;
}

.results-table tbody tr:nth-child(odd) {
  background: rgba(163, 109, 50, 0.08);
}

.results-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.88);
}

.idman-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 18px;
}

.idman-summary-grid .subpage-card {
  padding: 16px 18px;
  min-height: 0;
}

.idman-summary-grid .subpage-card strong {
  font-size: 1.15rem;
  line-height: 1.15;
}

.idman-summary-grid .subpage-card .muted {
  margin-top: 6px;
  font-size: 0.92rem;
}

.idman-summary-note {
  margin-top: 18px;
}

.idman-leaderboard-grid {
  align-items: start;
}

.idman-panel {
  position: relative;
}

.idman-panel-galop {
  border-color: rgba(38, 121, 80, 0.22);
  background: linear-gradient(180deg, rgba(241, 252, 246, 0.98) 0%, rgba(255, 255, 255, 0.94) 100%);
}

.idman-panel-sprint {
  border-color: rgba(194, 77, 44, 0.22);
  background: linear-gradient(180deg, rgba(255, 244, 239, 0.98) 0%, rgba(255, 255, 255, 0.94) 100%);
}

.idman-panel-degree {
  border-color: rgba(163, 109, 50, 0.24);
  background: linear-gradient(180deg, rgba(247, 240, 223, 0.98) 0%, rgba(255, 255, 255, 0.94) 100%);
}

.idman-panel-gso {
  border-color: rgba(39, 99, 174, 0.22);
  background: linear-gradient(180deg, rgba(239, 247, 255, 0.98) 0%, rgba(255, 255, 255, 0.94) 100%);
}

.idman-degree-value {
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  font-size: clamp(2.4rem, 5vw, 4.4rem);
  font-weight: 800;
  line-height: 1;
  color: #7a4b18;
  margin: 4px 0 16px;
}

.idman-degree-note {
  margin: 0;
}

.idman-leaderboard-table thead th {
  white-space: nowrap;
}

.idman-leaderboard-table tbody tr:nth-child(odd) {
  background: rgba(255, 255, 255, 0.72);
}

.idman-leaderboard-table tbody tr:nth-child(even) {
  background: rgba(23, 32, 51, 0.035);
}

.idman-empty-box {
  margin-top: 8px;
}

.idman-raw-table thead th {
  position: sticky;
  top: 0;
  background: #f4ecdf;
  z-index: 1;
  white-space: nowrap;
}

.idman-raw-table tbody tr:nth-child(odd) {
  background: rgba(255, 255, 255, 0.82);
}

.idman-raw-table tbody tr:nth-child(even) {
  background: rgba(23, 32, 51, 0.04);
}

.atsoyu-overview-shell {
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.atsoyu-overview-grid {
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 20px;
  padding: 0;
}

.atsoyu-panel {
  align-self: start;
}

.atsoyu-panel .subpage-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.atsoyu-panel .subpage-card {
  padding: 16px 18px;
}

.atsoyu-panel .subpage-card strong {
  font-size: 1.05rem;
  line-height: 1.2;
}

.atsoyu-panel .subpage-card .muted {
  font-size: 0.9rem;
}

.pedigree-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1;
  border: 1px solid transparent;
  white-space: nowrap;
}

.pedigree-chip-pending {
  background: rgba(56, 80, 110, 0.1);
  color: #38506e;
}

.pedigree-chip-in_progress {
  background: rgba(39, 96, 184, 0.12);
  color: #1f58a5;
}

.pedigree-chip-retry {
  background: rgba(176, 100, 17, 0.14);
  color: #8d510d;
}

.pedigree-chip-completed,
.pedigree-chip-partial,
.pedigree-chip-cached {
  background: rgba(220, 123, 32, 0.16);
  color: #9a4f08;
  border-color: rgba(220, 123, 32, 0.3);
}

.pedigree-chip-failed {
  background: rgba(164, 48, 67, 0.12);
  color: #8d2337;
}

.pedigree-row-highlight {
  background: rgba(220, 123, 32, 0.05);
}

.pedigree-meta {
  margin-top: 6px;
}

.module-shell > .dashboard-grid.pedigree-overview-grid {
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  align-items: start;
}

.pedigree-overview-card {
  min-width: 0;
}

.pedigree-generations-shell {
  padding: 28px;
}

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

.pedigree-generation-card {
  padding: 18px 20px;
  min-width: 0;
}

.pedigree-generation-card .table-header h2 {
  font-size: 1.18rem;
}

.pedigree-generation-table th,
.pedigree-generation-table td {
  padding: 10px 0;
  font-size: 0.98rem;
}

.pedigree-generation-table th:first-child,
.pedigree-generation-table td:first-child {
  width: 32%;
  color: var(--muted);
}

.table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.table-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 36px 0 42px;
}

.footer p {
  color: #b8c7e6;
  font-weight: 600;
}

.footer-links {
  display: flex;
  gap: 16px;
  align-items: start;
  flex-wrap: wrap;
}

@media (max-width: 1280px) {
  .topbar,
  .footer,
  .hero,
  .stats-grid,
  .content-grid,
  .pricing,
  .cta-band,
  .download-band,
  .auth-shell,
  .dashboard-grid,
  .app-hero,
  .admin-header,
  .admin-grid,
  .home-stats-shell,
  .positioning-shell,
  .module-shell,
  .wide-block,
  .shell-block,
  .execution-band,
  .modules-showcase,
  .hub-page-shell,
  .flash-stack {
    width: min(calc(100% - 32px), var(--max));
  }

  .topbar {
    gap: 18px;
  }

  .nav {
    gap: 14px;
  }
}

@media (max-width: 980px) {
  .hub-hero,
  .hub-inline-row,
  .hub-split-grid,
  .hub-data-grid,
  .hub-story-grid {
    grid-template-columns: 1fr;
  }

  .hub-page-shell .dashboard-grid {
    grid-template-columns: 1fr 1fr;
  }

  .hero,
  .content-grid,
  .dashboard-grid,
  .admin-grid,
  .app-hero,
  .admin-header,
  .cta-band,
  .download-band,
  .footer {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: start;
  }

  .stats-grid,
  .pillar-grid,
  .pricing-grid,
  .app-summary,
  .subpage-grid,
  .execution-grid,
  .live-summary-grid,
  .annaliz-mesafe-grid,
  .positioning-grid {
    grid-template-columns: 1fr 1fr;
  }

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

  .topbar {
    align-items: start;
    flex-direction: column;
    gap: 16px;
  }

  .topbar-actions {
    width: 100%;
    justify-content: flex-start;
    gap: 12px;
  }

  .nav {
    width: 100%;
    gap: 10px 14px;
  }

  .nav a,
  .nav-user {
    font-size: 0.9rem;
  }

  .today-badge {
    min-height: 38px;
    padding: 0 14px;
  }

  .filter-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }

  .filter-bar > * {
    min-width: 0;
  }

  .table-header {
    flex-wrap: wrap;
    align-items: start;
    gap: 10px;
  }

  .footer {
    gap: 26px;
  }

  .footer-links {
    gap: 12px;
  }

  .membership-pricing-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .atsoyu-overview-grid,
  .atsoyu-panel .subpage-grid,
  .module-shell > .dashboard-grid.pedigree-overview-grid,
  .pedigree-generation-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .hub-page-shell {
    width: min(calc(100% - 24px), 100%);
    gap: 20px;
  }

  .hub-metric-grid,
  .hub-page-shell .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: start;
    flex-direction: column;
    gap: 16px;
  }

  .topbar-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .nav {
    gap: 10px 12px;
  }

  .nav a,
  .nav-user {
    font-size: 0.86rem;
  }

  .button {
    min-height: 40px;
    padding: 0 16px;
  }

  .filter-bar {
    grid-template-columns: 1fr;
  }

  .filter-bar label,
  .filter-bar select,
  .filter-bar input {
    width: 100%;
    min-width: 0;
  }

  .date-nav {
    width: 100%;
    justify-content: space-between;
  }

  .date-nav-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .table-card,
  .section-block,
  .section-dark,
  .summary-box,
  .subpage-card,
  .stat-card,
  .pricing-card {
    padding: 18px;
  }

  .download-band,
  .home-stats-shell,
  .hub-wide-card {
    padding: 20px;
  }

  .stats-grid,
  .pillar-grid,
  .pricing-grid,
  .app-summary,
  .subpage-grid,
  .execution-grid,
  .live-summary-grid,
  .annaliz-mesafe-grid,
  .positioning-grid {
    grid-template-columns: 1fr;
  }

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

  .membership-pricing-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  .idman-summary-grid {
    grid-template-columns: 1fr;
  }

  .atsoyu-overview-grid,
  .atsoyu-panel .subpage-grid,
  .module-shell > .dashboard-grid.pedigree-overview-grid,
  .pedigree-generation-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 2.3rem;
  }
}

@media (max-width: 420px) {
  .topbar,
  .footer,
  .hero,
  .stats-grid,
  .content-grid,
  .pricing,
  .cta-band,
  .download-band,
  .auth-shell,
  .dashboard-grid,
  .app-hero,
  .admin-header,
  .admin-grid,
  .home-stats-shell,
  .positioning-shell,
  .module-shell,
  .wide-block,
  .shell-block,
  .execution-band,
  .modules-showcase,
  .hub-page-shell,
  .flash-stack {
    width: min(calc(100% - 20px), 100%);
  }

  .brand {
    gap: 10px;
  }

  .brand-copy strong {
    font-size: 1.35rem;
  }

  .brand-copy small {
    font-size: 0.85rem;
  }

  .nav {
    gap: 8px 10px;
  }

  .nav a,
  .nav-user {
    font-size: 0.8rem;
  }

  .today-badge {
    width: 100%;
    justify-content: center;
  }

  .table-card,
  .section-block,
  .section-dark,
  .summary-box,
  .subpage-card,
  .stat-card,
  .pricing-card,
  .download-band,
  .home-stats-shell,
  .hub-wide-card {
    padding: 16px;
  }

  h1 {
    font-size: 1.9rem;
  }

  h2 {
    font-size: 1.35rem;
  }
}

.nav-user {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  font-size: 0.9rem;
  color: #f5f7ff;
}

.flash-stack {
  width: min(calc(100% - 32px), var(--max));
  margin: 0 auto;
  display: grid;
  gap: 10px;
}

.flash-message {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 250, 241, 0.96);
  box-shadow: var(--shadow);
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
}

.flash-success {
  border-color: rgba(45, 143, 90, 0.28);
  background: #eefaf2;
}

.flash-error {
  border-color: rgba(194, 77, 44, 0.28);
  background: #fff1eb;
}

.demo-box {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  border: 1px dashed rgba(23, 32, 51, 0.18);
  background: rgba(255, 255, 255, 0.55);
}

.plan-badge {
  display: inline-flex;
  margin-bottom: 14px;
  padding: 8px 12px;
  border-radius: 999px;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.plan-free {
  background: rgba(45, 143, 90, 0.12);
  color: #1f6e45;
}

.plan-pro {
  background: rgba(194, 77, 44, 0.12);
  color: #8f2f16;
}

.plan-premium {
  background: rgba(15, 26, 46, 0.12);
  color: #0f1a2e;
}

.plan-admin {
  background: rgba(93, 102, 120, 0.14);
  color: #243047;
}

.inline-form {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.inline-form select {
  min-width: 120px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: #fff;
  font: inherit;
}
.puan-payload-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.puan-payload-card {
  min-width: 0;
  padding: 16px;
}

.puan-payload-card .table-header {
  gap: 8px;
  margin-bottom: 12px;
}

.puan-payload-card .table-header h2 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
}

.puan-leg-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  align-items: start;
}

.puan-leg-card {
  min-width: 0;
  border: 1px solid #cfd8e3;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.puan-leg-card-selected {
  border-color: #ef4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.12);
}

.puan-leg-title {
  text-align: center;
  font-weight: 800;
  font-size: 0.82rem;
  color: #14213d;
  padding: 7px 4px;
  background: #f3f4f6;
  border-bottom: 1px solid #dbe1e8;
}

.puan-leg-table {
  width: 100%;
  border-collapse: collapse;
}

.puan-leg-table th,
.puan-leg-table td {
  padding: 3px 4px;
  text-align: center;
  border-bottom: 1px solid #edf2f7;
  font-size: 0.74rem;
  line-height: 1.2;
}

.puan-leg-table th {
  font-weight: 800;
  color: #0f172a;
  background: #fafafa;
}

.puan-leg-table tbody tr:last-child td {
  border-bottom: none;
}

.home-puan-shell {
  padding: 22px 24px 26px;
}

.home-puan-grid {
  margin-top: 6px;
}

.home-puan-tabs {
  margin: 10px 0 18px;
}

.home-puan-shell .table-header h2 {
  margin-bottom: 0;
}

.home-featured-shell {
  padding: 18px 24px 10px;
}

.home-history-shell {
  background: rgba(255, 250, 241, 0.92);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.home-featured-table thead th {
  background: #f6f8fb;
  color: #50617f;
  white-space: nowrap;
}

.home-featured-table tbody tr:nth-child(odd) {
  background: rgba(255, 255, 255, 0.92);
}

.home-featured-table tbody tr:nth-child(even) {
  background: rgba(246, 248, 251, 0.88);
}

.home-featured-table td strong {
  font-size: 1.02rem;
}

.home-featured-score {
  color: #16a34a;
  font-weight: 800;
}

.button-disabled {
  opacity: 0.7;
  pointer-events: none;
}

.home-loading-shell .muted {
  margin: 4px 0 10px;
}

.puan-score-green {
  color: #0ea44b;
  font-weight: 800;
}

.puan-score-amber {
  color: #f7cf00;
  font-weight: 800;
}

.puan-score-red {
  color: #dc2626;
  font-weight: 800;
}

.puan-score-blue {
  color: #2f63ff;
  font-weight: 800;
}

.puan-countdown-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(240px, 0.8fr);
  gap: 16px;
  align-items: stretch;
}

.puan-countdown-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 18px 20px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.94));
  color: #f8fafc;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.18);
}

.puan-countdown-label {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(248, 250, 252, 0.78);
}

.puan-countdown-value {
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #ffffff;
}

.puan-countdown-meta {
  font-size: 0.88rem;
  color: rgba(226, 232, 240, 0.84);
}

.puan-countdown-status {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  padding: 18px 20px;
  border-radius: 18px;
  border: 1px solid rgba(203, 213, 225, 0.9);
  background: rgba(248, 250, 252, 0.96);
}

.puan-countdown-status .muted {
  margin: 0;
}

.puan-countdown-status-chip {
  display: inline-flex;
  align-self: flex-start;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.puan-countdown-status-beklemede {
  background: rgba(59, 130, 246, 0.12);
  color: #1d4ed8;
}

.puan-countdown-status-hazirlaniyor {
  background: rgba(245, 158, 11, 0.14);
  color: #b45309;
}

.puan-countdown-status-canli {
  background: rgba(22, 163, 74, 0.14);
  color: #15803d;
}

.puan-countdown-status-sabit {
  background: rgba(100, 116, 139, 0.14);
  color: #334155;
}

.puan-payload-card-waiting .puan-countdown-shell-waiting {
  display: block;
}

.puan-payload-card-waiting .puan-countdown-card {
  max-width: 500px;
  padding: 14px 18px;
  border-radius: 16px;
  gap: 6px;
}

.puan-payload-card-waiting .puan-countdown-label {
  font-size: 0.76rem;
}

.puan-payload-card-waiting .puan-countdown-value {
  font-size: clamp(1.6rem, 2.8vw, 2.6rem);
}

.puan-payload-card-waiting .puan-countdown-meta {
  font-size: 0.8rem;
}

.winner-horse-no {
  background: #f97316;
  color: #fff !important;
  font-weight: 800;
  border-radius: 8px;
  padding: 2px 8px;
  display: inline-block;
  min-width: 1.75rem;
  text-align: center;
}

td.winner-horse-no {
  display: table-cell;
  padding: 6px 8px;
}

@media (max-width: 1400px) {
  .puan-payload-grid {
    grid-template-columns: 1fr;
  }

  .puan-countdown-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1100px) {
  .puan-leg-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .puan-leg-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
