:root {
  --bg-deep: #0f3357;
  --bg-mid: #1e5a87;
  --bg-soft: #eaf5ff;
  --panel: rgba(255, 255, 255, 0.92);
  --panel-strong: rgba(255, 255, 255, 0.98);
  --ink: #11253f;
  --muted: #5b6c81;
  --line: rgba(17, 37, 63, 0.1);
  --lime: #b5ff65;
  --sun: #ffd866;
  --mint: #d9fff3;
  --shadow: 0 28px 80px rgba(10, 34, 58, 0.18);
  --radius-xl: 32px;
  --radius-lg: 24px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", "Aptos", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(181, 255, 101, 0.18), transparent 22%),
    radial-gradient(circle at 85% 15%, rgba(255, 216, 102, 0.18), transparent 18%),
    linear-gradient(135deg, #0d2d4d 0%, #14507b 42%, #ddecff 100%);
}

body.reference-page {
  background: #ffffff;
}

.page-shell {
  position: relative;
  overflow: hidden;
  padding: 34px 20px 48px;
}

.background-orb,
.court-lines {
  pointer-events: none;
  position: absolute;
}

.background-orb {
  border-radius: 999px;
  filter: blur(10px);
  opacity: 0.8;
}

.background-orb-a {
  top: -80px;
  right: -40px;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(181, 255, 101, 0.45), rgba(181, 255, 101, 0));
}

.background-orb-b {
  bottom: 20%;
  left: -120px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(255, 216, 102, 0.34), rgba(255, 216, 102, 0));
}

body.reference-page .background-orb,
body.reference-page .court-lines {
  display: none;
}

.court-lines {
  display: none;
}

.court-lines-a {
  top: 110px;
  left: 50%;
  width: 520px;
  height: 240px;
  transform: translateX(-56%);
}

.court-lines-b {
  bottom: 60px;
  right: 8%;
  width: 320px;
  height: 180px;
}

.hero,
.app-grid {
  position: relative;
  z-index: 1;
  width: min(1280px, 100%);
  margin: 0 auto;
}

.hero {
  margin-bottom: 26px;
}

.top-page-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  margin-bottom: 18px;
}

body.subscription-page .hero {
  z-index: 6;
}

body.subscription-page .top-page-nav {
  position: relative;
  z-index: 40;
}

body.subscription-page .top-page-dropdown-menu {
  z-index: 80;
}

body.subscription-page .library-stack {
  z-index: 1;
}

.site-search-shell {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.site-search-label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
}

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

.site-search-input {
  width: 100%;
  min-height: 34px;
  padding: 6px 11px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.14);
  font-size: 0.92rem;
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.site-search-input::placeholder {
  color: rgba(255, 255, 255, 0.68);
}

.site-search-input:focus {
  outline: 2px solid rgba(181, 255, 101, 0.34);
  outline-offset: 2px;
}

.site-search-button {
  min-height: 34px;
  padding: 6px 11px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #9df06d, #d9fff3);
  color: #143c28;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 14px 24px rgba(71, 150, 59, 0.16);
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.site-search-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 30px rgba(10, 34, 58, 0.18);
  filter: saturate(1.05);
}

.top-page-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 9px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.8rem;
  line-height: 1.05;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

body.reference-page .top-page-link {
  color: var(--ink);
  background: rgba(17, 37, 63, 0.04);
  border: 1px solid rgba(17, 37, 63, 0.12);
}

.top-page-link:hover {
  transform: translateY(-1px);
  color: white;
}

body.reference-page .top-page-link:hover {
  color: var(--ink);
}

.top-page-link-active {
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
}

.top-page-dropdown {
  position: relative;
  margin: 0;
}

.top-page-dropdown summary {
  list-style: none;
  cursor: pointer;
}

.top-page-dropdown summary::-webkit-details-marker {
  display: none;
}

.top-page-dropdown summary::after {
  content: "";
  width: 9px;
  height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  margin-left: 3px;
  opacity: 0.82;
}

.top-page-dropdown[open] summary::after {
  transform: rotate(-135deg) translateY(-1px);
}

.top-page-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 160px;
  display: grid;
  gap: 3px;
  padding: 5px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(17, 37, 63, 0.12);
  box-shadow: 0 20px 40px rgba(10, 34, 58, 0.16);
  z-index: 20;
}

.top-page-dropdown-link {
  display: block;
  padding: 7px 9px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.78rem;
  color: var(--ink);
  background: rgba(17, 37, 63, 0.03);
  transition: background 160ms ease, transform 160ms ease;
}

.top-page-dropdown-link:hover {
  background: rgba(17, 37, 63, 0.08);
  transform: translateY(-1px);
}

.top-page-dropdown-link-active {
  background: rgba(17, 37, 63, 0.12);
  font-weight: 700;
}

.top-page-link-active::before {
  content: "";
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.75) 0 18%, transparent 19%),
    radial-gradient(circle at center, #d7ff6d 0 62%, #88b42a 63% 100%);
  box-shadow:
    inset 0 0 0 1px rgba(48, 78, 8, 0.16),
    0 1px 2px rgba(17, 37, 63, 0.16);
}

body.reference-page .top-page-link-active {
  background: #163f63;
  color: #ffffff;
  border-color: #163f63;
}

body.reference-page .site-search-label {
  color: #1f69a7;
}

body.reference-page .site-search-input {
  color: var(--ink);
  background: rgba(17, 37, 63, 0.05);
  border-color: rgba(17, 37, 63, 0.12);
}

body.reference-page .site-search-input::placeholder {
  color: var(--muted);
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.brand-mark,
.brand-pill {
  display: inline-flex;
  align-items: center;
  padding: 0;
  background: transparent;
  color: white;
  border: 0;
  letter-spacing: 0.02em;
}

body.reference-page .brand-mark,
body.reference-page .brand-pill {
  color: var(--ink);
}

.brand-mark {
  font-weight: 700;
  font-size: 1.12rem;
  line-height: 1;
  transform: scale(1.05);
  transform-origin: left center;
}

.brand-pill {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.9);
}

.mode-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
}

.mode-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  padding: 10px 14px;
  border-radius: 999px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.84);
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.mode-link:hover {
  transform: translateY(-1px);
  color: white;
}

.mode-link-active {
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 22px;
  align-items: stretch;
}

.hero-copy,
.hero-preview,
.panel {
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: 38px 40px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.08)),
    linear-gradient(135deg, rgba(10, 43, 70, 0.92), rgba(21, 74, 115, 0.88));
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-copy-inline {
  padding: 8px 0 0;
  background: transparent;
  color: #ffffff;
  border: 0;
  box-shadow: none;
}

.hero-static-heading {
  margin-bottom: 12px;
}

body.reference-page .hero-copy {
  background: #ffffff;
  color: var(--ink);
  border: 1px solid rgba(17, 37, 63, 0.1);
}

body.home-page .hero-copy {
  padding: 28px 30px;
}

body.home-page .hero-grid {
  grid-template-columns: 1.28fr 0.82fr;
}

body.home-page .hero-copy h1 {
  margin: 8px 0 10px;
  max-width: none;
  font-size: clamp(1.65rem, 2.7vw, 2.5rem);
}

body.home-page .hero-text {
  max-width: none;
  font-size: 0.94rem;
}

body.home-page .hero-action-grid {
  margin-top: 14px;
}

body.builder-page .app-grid .panel {
  padding: 22px;
  border-radius: 24px;
}

body.builder-page .matchup-form {
  gap: 18px;
  margin-top: 14px;
}

body.builder-page .form-section {
  gap: 12px;
  padding: 16px;
  border-radius: 18px;
}

body.builder-page .photo-upload-card {
  grid-template-columns: 80px 1fr;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
}

body.builder-page .photo-preview-shell {
  width: 80px;
  height: 80px;
}

body.builder-page .result-column {
  gap: 16px;
}

body.builder-page .quick-insight-grid,
body.builder-page .result-grid {
  gap: 12px;
}

body.builder-page .quick-insight-grid {
  margin-top: 14px;
}

body.builder-page .insight-tile {
  padding: 14px;
  border-radius: 16px;
}

body.builder-page .panel-note,
body.builder-page .strategy-narrative,
body.builder-page .card-summary,
body.builder-page .tactic-list li,
body.builder-page .insight-tile p,
body.builder-page .field span,
body.builder-page .field-head small,
body.builder-page .player-role-caption {
  font-size: 0.88rem;
  line-height: 1.45;
}

body.builder-page .field,
body.builder-page .field-stack {
  gap: 8px;
}

body.builder-page select,
body.builder-page .text-input,
body.builder-page .file-input {
  padding: 12px 13px;
  border-radius: 12px;
  font-size: 0.92rem;
}

body.builder-page .chip {
  padding: 8px 12px;
  font-size: 0.88rem;
}

body.builder-page .rating-grid {
  gap: 10px;
}

body.builder-page .rating-card {
  gap: 6px;
  padding: 11px;
}

body.builder-page .rating-card label {
  font-size: 0.86rem;
}

body.builder-page .rating-card select {
  padding: 10px 12px;
  font-size: 0.9rem;
}

body.builder-page .panel-actions .btn,
body.builder-page .action-row .btn {
  padding: 9px 12px;
  font-size: 0.88rem;
}

body.builder-page .tactic-list {
  margin-top: 12px;
  padding-left: 18px;
}

body.builder-page .tactic-list li + li {
  margin-top: 8px;
}

.eyebrow,
.preview-label,
.insight-label,
.section-caption,
.strip-label {
  margin: 0;
  font-size: 0.79rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow {
  color: #6aa8e6;
}

.hero-copy .eyebrow {
  color: var(--lime);
}

body.reference-page .hero-copy .eyebrow {
  color: #1f69a7;
}

.hero-copy h1 {
  margin: 12px 0 14px;
  max-width: none;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.5rem, 2.35vw, 2.2rem);
  line-height: 0.98;
}

.hero-text,
.preview-copy,
.panel-note,
.card-summary,
.strategy-narrative,
.tactic-list li,
.field span,
.field-head span,
.field-head small,
.insight-tile p,
.section-heading h3 {
  line-height: 1.55;
}

.hero-text {
  max-width: none;
  font-size: 0.94rem;
  color: rgba(255, 255, 255, 0.88);
}

body.reference-page .hero-text {
  color: var(--muted);
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
  max-width: 720px;
}

.hero-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 14px 18px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
  color: #0d2d4d;
  background: linear-gradient(135deg, #9df06d, #d9fff3);
  border: 1px solid rgba(40, 93, 19, 0.18);
  box-shadow: 0 14px 24px rgba(10, 34, 58, 0.14);
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.hero-action-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 30px rgba(10, 34, 58, 0.18);
  filter: saturate(1.05);
}

.hero-action-button-wide {
  grid-column: 1 / -1;
}

.hero-action-button-subscribe {
  color: #ffffff;
  background: linear-gradient(135deg, #12395f, #214f79);
  border: 1px solid rgba(255, 255, 255, 0.88);
  box-shadow: 0 14px 24px rgba(10, 34, 58, 0.2);
}

.hero-action-button-subscribe:hover {
  box-shadow: 0 18px 30px rgba(10, 34, 58, 0.24);
  filter: saturate(1.02);
}

.library-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.library-search-bar {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  max-width: 520px;
}

.library-search-label {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--lime);
}

.library-search-input {
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.library-search-input::placeholder {
  color: rgba(255, 255, 255, 0.68);
}

.library-search-input:focus {
  outline: 2px solid rgba(181, 255, 101, 0.34);
  outline-offset: 2px;
}

.library-topic-window-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.library-topic-window {
  display: grid;
  gap: 8px;
  padding: 18px;
  border-radius: 18px;
  text-decoration: none;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 14px 28px rgba(10, 34, 58, 0.12);
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.library-topic-window:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.18);
  box-shadow: 0 18px 34px rgba(10, 34, 58, 0.16);
}

.library-topic-window-kicker {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lime);
}

.library-topic-window strong {
  font-size: 1rem;
}

.library-topic-window span:last-child {
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.5;
}

.library-switch-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 10px 22px rgba(10, 34, 58, 0.12);
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.library-switch-button:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.18);
}

.library-switch-button-active {
  color: #0d2d4d;
  background: linear-gradient(135deg, #9df06d, #d9fff3);
  border-color: rgba(40, 93, 19, 0.18);
}

body.reference-page .library-switch-button {
  color: var(--ink);
  background: rgba(17, 37, 63, 0.05);
  border-color: rgba(17, 37, 63, 0.12);
}

body.reference-page .library-switch-button:hover {
  background: rgba(17, 37, 63, 0.08);
}

body.reference-page .library-switch-button-active {
  color: #0d2d4d;
  background: linear-gradient(135deg, #9df06d, #d9fff3);
  border-color: rgba(40, 93, 19, 0.18);
}

body.reference-page .library-search-label {
  color: #1f69a7;
}

body.reference-page .library-search-input {
  color: var(--ink);
  background: rgba(17, 37, 63, 0.05);
  border-color: rgba(17, 37, 63, 0.12);
}

body.reference-page .library-search-input::placeholder {
  color: var(--muted);
}

body.reference-page .library-topic-window {
  color: var(--ink);
  background: rgba(17, 37, 63, 0.05);
  border-color: rgba(17, 37, 63, 0.1);
}

body.reference-page .library-topic-window:hover {
  background: rgba(17, 37, 63, 0.08);
}

body.reference-page .library-topic-window-kicker {
  color: #1f69a7;
}

body.reference-page .library-topic-window span:last-child {
  color: var(--muted);
}

body.reference-page .hero-action-button {
  color: #143c28;
}

.hero-tags span,
.summary-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 0.92rem;
}

.hero-tags span {
  background: rgba(255, 255, 255, 0.12);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.hero-tag-link {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 0.92rem;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.12);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.14);
  transition: transform 160ms ease, background 160ms ease;
}

.hero-tag-link:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.2);
}

body.reference-page .hero-tags span {
  background: rgba(17, 37, 63, 0.05);
  color: var(--ink);
  border: 1px solid rgba(17, 37, 63, 0.08);
}

.panel,
.hero-preview {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(18px);
}

.hero-preview {
  padding: 30px;
}

.hero-preview h2 {
  margin: 10px 0 10px;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.72rem;
  line-height: 1.02;
}

.preview-copy {
  color: var(--muted);
}

.preview-strips {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.preview-strips > div {
  border-radius: 18px;
  padding: 16px 18px;
  background: linear-gradient(145deg, rgba(223, 242, 255, 0.9), rgba(217, 255, 243, 0.78));
}

.preview-strips p {
  margin: 8px 0 0;
}

.app-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 22px;
  align-items: start;
}

.panel {
  padding: 28px;
}

.panel-head,
.field-head,
.section-heading,
.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.panel-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  align-items: center;
  position: relative;
}

.panel-actions .btn {
  background: linear-gradient(135deg, #9df06d, #d9fff3);
  color: #143c28;
  box-shadow: 0 14px 24px rgba(71, 150, 59, 0.16);
}

.btn-compact {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.84rem;
  line-height: 1.1;
  white-space: nowrap;
}

.panel-head h2,
.card-head h3,
.section-heading h3 {
  margin: 8px 0 0;
}

.panel-with-corner-toggle {
  position: relative;
}

.hero-grid-collapsible-shell {
  position: relative;
  min-height: 44px;
}

.hero-grid-collapsible-shell .hero-preview {
  padding-right: 96px;
}

.hero-grid-collapsible-shell .section-toggle-corner {
  top: 18px;
  right: 18px;
  z-index: 3;
}

.panel-with-corner-toggle.hero-preview {
  padding-right: 96px;
}

.panel-with-corner-toggle .panel-head,
.panel-with-corner-toggle .reference-sheet-head {
  padding-right: 92px;
}

.section-toggle-corner {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 2;
}

.panel-head h2,
.card-head h3 {
  font-family: "Fraunces", Georgia, serif;
}

.panel-note,
.field-head small,
.section-caption,
.insight-tile p,
.strategy-narrative,
.card-summary,
.tactic-list li {
  color: var(--muted);
}

.matchup-form {
  display: grid;
  gap: 24px;
  margin-top: 18px;
}

.preset-note {
  margin-top: 18px;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(181, 255, 101, 0.22), rgba(217, 255, 243, 0.94));
  border: 1px solid rgba(40, 93, 19, 0.16);
}

.preset-note-title,
.preset-note-text {
  margin: 0;
}

.preset-note-title {
  font-weight: 700;
  color: #1a446d;
}

.preset-note-text {
  margin-top: 6px;
  color: var(--muted);
}

.form-section {
  display: grid;
  gap: 16px;
  padding: 20px;
  border-radius: var(--radius-lg);
  background: var(--panel-strong);
  border: 1px solid var(--line);
}

.compact-section {
  background: linear-gradient(145deg, rgba(223, 242, 255, 0.74), rgba(255, 255, 255, 0.94));
}

.field,
.field-stack {
  display: grid;
  gap: 10px;
}

.photo-upload-card {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(223, 242, 255, 0.55), rgba(255, 255, 255, 0.96));
  border: 1px solid rgba(17, 37, 63, 0.08);
}

.photo-preview-shell,
.matchup-avatar-shell {
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 999px;
  background: linear-gradient(145deg, rgba(21, 61, 98, 0.14), rgba(15, 109, 184, 0.08));
  border: 1px solid rgba(17, 37, 63, 0.08);
}

.photo-preview-shell {
  width: 88px;
  height: 88px;
}

.photo-preview,
.matchup-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-fallback,
.matchup-avatar-fallback {
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #1a446d;
}

.file-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(17, 37, 63, 0.12);
  background: white;
}

.field span,
.field-head span {
  font-weight: 700;
}

select,
button {
  font: inherit;
}

select {
  width: 100%;
  padding: 15px 16px;
  border-radius: 16px;
  border: 1px solid rgba(17, 37, 63, 0.12);
  background: white;
  color: var(--ink);
}

.text-input {
  width: 100%;
  padding: 15px 16px;
  border-radius: 16px;
  border: 1px solid rgba(17, 37, 63, 0.12);
  background: white;
  color: var(--ink);
  font: inherit;
}

.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  border: 1px solid rgba(17, 37, 63, 0.12);
  background: white;
  color: var(--ink);
  border-radius: 999px;
  padding: 11px 15px;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease;
}

.chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(17, 37, 63, 0.09);
}

.chip.active {
  border-color: rgba(40, 93, 19, 0.28);
  background: linear-gradient(145deg, rgba(181, 255, 101, 0.22), rgba(217, 255, 243, 0.95));
  color: #153c20;
}

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

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

.rating-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 12px;
  background: white;
  border: 1px solid rgba(17, 37, 63, 0.12);
}

.rating-card label {
  font-weight: 700;
  font-size: 0.96rem;
}

.rating-card select {
  padding: 12px 14px;
  border-radius: 10px;
  border-color: rgba(17, 37, 63, 0.14);
  background: #ffffff;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.subscription-followup-row {
  margin-top: 14px;
}

.subscription-checkout-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.subscription-checkout-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(223, 242, 255, 0.76));
  border: 1px solid rgba(17, 37, 63, 0.08);
  box-shadow: 0 16px 34px rgba(10, 34, 58, 0.08);
}

.subscription-checkout-card-featured {
  background: linear-gradient(145deg, rgba(181, 255, 101, 0.16), rgba(255, 255, 255, 0.98));
  border-color: rgba(40, 93, 19, 0.16);
}

.subscription-checkout-card h3 {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.18rem;
  line-height: 1.08;
  color: #163f63;
}

.subscription-checkout-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.subscription-buy-button-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
}

.subscription-buy-button-wrap stripe-buy-button {
  display: inline-flex;
}

.subscription-checkout-card .btn {
  justify-self: start;
}

.subscription-checkout-card .subscription-buy-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.subscription-checkout-note {
  margin-top: 12px;
}

.subscription-value-highlight {
  display: inline-block;
  margin-top: 8px;
  padding: 6px 10px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(157, 240, 109, 0.24), rgba(217, 255, 243, 0.78));
  color: #143c28;
  font-weight: 700;
}

.preset-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: end;
}

.preset-field {
  min-width: 0;
}

.preset-field span {
  color: #7a5800;
}

.preset-field select {
  background: linear-gradient(135deg, #fff0a6, #fffbe0);
  border-color: rgba(173, 136, 10, 0.28);
  color: #5e4300;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.preset-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  border: 0;
  border-radius: 16px;
  padding: 14px 18px;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 24px rgba(17, 37, 63, 0.12);
}

.btn-primary {
  background: linear-gradient(135deg, #9df06d, #d9fff3);
  color: #143c28;
}

.btn-secondary {
  background: linear-gradient(135deg, #d9fff3, #effcff);
  color: var(--ink);
}

.btn-preset {
  background: linear-gradient(135deg, #ffe26b, #fff8cc);
  color: #5e4300;
  box-shadow: 0 14px 24px rgba(173, 136, 10, 0.16);
}

.btn-ghost,
.btn-copy {
  background: rgba(17, 37, 63, 0.06);
  color: var(--ink);
}

.btn-copy {
  position: relative;
}

.copy-help-inline {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(160px, 48vw);
  padding: 7px 9px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.96);
  color: #ffffff;
  font-size: 0.72rem;
  line-height: 1.25;
  text-align: left;
  overflow-wrap: anywhere;
  box-shadow: 0 16px 30px rgba(10, 34, 58, 0.24);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 160ms ease, transform 160ms ease;
  z-index: 10;
}

.btn-compact:hover + .copy-help-inline,
.btn-compact:focus-visible + .copy-help-inline {
  opacity: 1;
  transform: translateY(0);
}

.matchup-form .form-section,
.matchup-form .photo-upload-card,
.matchup-form .rating-card,
.matchup-form .preset-note {
  border-radius: 10px;
}

.matchup-form .photo-upload-card {
  background: #ffffff;
}

.matchup-form select,
.matchup-form .text-input,
.matchup-form .file-input {
  border-radius: 8px;
}

.matchup-form .chip,
.matchup-form .btn {
  border-radius: 8px;
}

.result-column {
  display: grid;
  gap: 22px;
}

.matchup-tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.matchup-score-card,
.matchup-card-panel {
  align-self: stretch;
}

.score-label {
  margin: 10px 0 0;
  font-weight: 700;
  color: #1f69a7;
}

.saved-plan-panel {
  display: grid;
  gap: 14px;
}

.saved-plan-empty {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.saved-plan-list {
  display: grid;
  gap: 12px;
}

.saved-plan-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(223, 242, 255, 0.74), rgba(255, 255, 255, 0.98));
  border: 1px solid rgba(17, 37, 63, 0.08);
}

.saved-plan-copy h3 {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.05rem;
  line-height: 1.15;
}

.saved-plan-meta {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.saved-plan-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

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

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

.lineup-selection-grid-alt {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.lineup-player-card {
  background: linear-gradient(145deg, rgba(223, 242, 255, 0.54), rgba(255, 255, 255, 0.98));
}

.lineup-player-card .mini-card-head {
  align-items: flex-start;
}

.lineup-player-order {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 74px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(17, 37, 63, 0.08);
  color: #244e74;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lineup-alternate-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.lineup-alt-card,
.lineup-line-card {
  display: grid;
  gap: 14px;
  padding: 22px;
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(223, 242, 255, 0.74));
  border: 1px solid rgba(17, 37, 63, 0.08);
  box-shadow: 0 16px 34px rgba(10, 34, 58, 0.08);
}

.lineup-line-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.lineup-badge-stack {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.lineup-line-head h3,
.lineup-alt-card h3 {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.3rem;
  line-height: 1.12;
}

.lineup-score-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 78px;
  padding: 10px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, #9df06d, #d9fff3);
  color: #143c28;
  font-weight: 700;
  box-shadow: 0 14px 24px rgba(71, 150, 59, 0.14);
}

.lineup-alignment-banner {
  display: grid;
  gap: 6px;
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(17, 37, 63, 0.1);
}

.lineup-alignment-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.lineup-alignment-banner p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.4;
}

.lineup-alignment-aligned {
  background: linear-gradient(145deg, rgba(157, 240, 109, 0.22), rgba(217, 255, 243, 0.92));
  color: #184b1c;
}

.lineup-alignment-partial {
  background: linear-gradient(145deg, rgba(255, 216, 102, 0.26), rgba(255, 248, 223, 0.95));
  color: #7a5400;
}

.lineup-alignment-different {
  background: #c91f1f;
  color: #ffffff;
}

.lineup-alignment-waiting {
  background: linear-gradient(145deg, rgba(223, 242, 255, 0.85), rgba(255, 255, 255, 0.96));
  color: #1f537e;
}

.lineup-status-row {
  margin-top: 10px;
}

.lineup-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lineup-status-aligned {
  background: rgba(157, 240, 109, 0.22);
  color: #1d6a1f;
}

.lineup-status-change {
  background: rgba(255, 216, 102, 0.24);
  color: #7a5400;
}

.lineup-status-engine {
  background: rgba(31, 105, 167, 0.14);
  color: #1f69a7;
}

.lineup-status-waiting {
  background: rgba(223, 242, 255, 0.82);
  color: #1f537e;
}

.lineup-line-summary,
.lineup-alt-summary {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

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

.lineup-slot {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(17, 37, 63, 0.04);
  border: 1px solid rgba(17, 37, 63, 0.08);
}

.lineup-slot-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #1f69a7;
}

.lineup-slot strong {
  font-size: 1rem;
}

.lineup-slot-role {
  color: var(--muted);
  line-height: 1.45;
}

.lineup-demo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.lineup-demo-card {
  display: grid;
  gap: 8px;
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(223, 242, 255, 0.74));
  border: 1px solid rgba(17, 37, 63, 0.08);
}

.lineup-demo-card h3 {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.02rem;
  line-height: 1.12;
}

.lineup-demo-meta,
.lineup-demo-ratings {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.lineup-line-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lineup-line-meta span {
  display: inline-flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(17, 37, 63, 0.06);
  color: #244e74;
  font-size: 0.84rem;
}

.summary-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.matchup-visuals {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.matchup-player-card {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(223, 242, 255, 0.9), rgba(255, 255, 255, 0.96));
}

.matchup-avatar-shell {
  width: 64px;
  height: 64px;
}

.matchup-player-label {
  margin: 6px 0 0;
  color: var(--muted);
}

.summary-pill {
  background: linear-gradient(145deg, rgba(223, 242, 255, 0.9), rgba(255, 255, 255, 0.98));
  color: var(--ink);
  border: 1px solid rgba(17, 37, 63, 0.08);
}

.quick-insight-grid,
.result-grid {
  display: grid;
  gap: 16px;
}

.quick-insight-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 20px;
}

.player-plus-summary-list {
  margin: 18px 0 0;
  padding-left: 22px;
  display: grid;
  gap: 12px;
  line-height: 1.65;
}

.player-plus-summary-list li {
  color: var(--ink);
}

.player-plus-summary-list strong {
  color: #0f2f58;
}

body.player-plus-demo-page .control-panel {
  position: relative;
}

body.player-plus-demo-page .control-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 25;
  background: transparent;
}

body.player-plus-demo-page .control-panel > * {
  position: relative;
  z-index: 1;
}

body.player-plus-demo-page .matchup-form :is(input, select, button),
body.player-plus-demo-page .metric-help-trigger {
  cursor: default;
}

body.player-plus-demo-page .score-reference-link.player-plus-demo-static-note {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  pointer-events: none;
}

.player-plus-demo-action-row {
  margin: 4px 0 0;
}

.player-plus-demo-status {
  margin: 8px 0 0;
}

.insight-tile {
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(223, 242, 255, 0.92), rgba(217, 255, 243, 0.82));
}

.insight-tile p {
  margin: 10px 0 0;
}

.player-plus-wide-note {
  margin-top: 16px;
}

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

.tactic-card {
  background: rgba(255, 255, 255, 0.94);
}

.tactic-card-primary {
  background: linear-gradient(145deg, rgba(223, 242, 255, 0.98), rgba(255, 255, 255, 0.98));
}

.tactic-card-secondary {
  background: linear-gradient(145deg, rgba(255, 249, 229, 0.98), rgba(255, 255, 255, 0.98));
}

.wide-card {
  grid-column: 1 / -1;
}

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

.player-mini-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 10px;
  border: 1px solid rgba(17, 37, 63, 0.12);
  background: #ffffff;
  min-width: 0;
}

.mini-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mini-card-head h4 {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1rem;
}

.player-role-caption {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.rating-grid-compact {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.player-mini-card .field,
.player-mini-card .rating-card {
  min-width: 0;
}

.player-mini-card .field {
  gap: 8px;
}

.player-mini-card .field span,
.player-mini-card .player-role-caption,
.rating-grid-compact .rating-card label {
  font-size: 0.84rem;
  line-height: 1.25;
}

.player-mini-card .text-input,
.player-mini-card select {
  padding: 12px 12px;
  font-size: 0.94rem;
}

.rating-grid-compact .rating-card {
  padding: 10px;
  gap: 6px;
}

.rating-grid-compact .rating-card select {
  padding: 10px 12px;
  font-size: 0.92rem;
}

#lineupForm .section-heading h3 {
  font-size: 0.98rem;
}

#lineupForm .section-caption,
#lineupForm .field span,
#lineupForm .player-mini-card .field span,
#lineupForm .player-mini-card .player-role-caption,
#lineupForm .rating-grid-compact .rating-card label {
  font-size: 0.78rem;
  line-height: 1.2;
}

#lineupForm .mini-card-head h4 {
  font-size: 0.92rem;
}

#lineupForm .player-mini-card .text-input,
#lineupForm .player-mini-card select {
  padding: 10px 11px;
  font-size: 0.88rem;
}

#lineupPriority {
  font-size: 0.84rem;
  padding: 11px 12px;
}

#lineupForm .rating-grid-compact .rating-card {
  padding: 8px;
}

#lineupForm .rating-grid-compact .rating-card select {
  padding: 9px 10px;
  font-size: 0.86rem;
}

.library-stack {
  position: relative;
  z-index: 1;
  width: min(1280px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 22px;
}

.pattern-page-switch {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 8px;
  margin-bottom: 20px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(12px);
}

.pattern-page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 160px;
  padding: 11px 16px;
  border-radius: 999px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.86);
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.pattern-page-link:hover {
  transform: translateY(-1px);
  color: white;
}

.pattern-page-link-active {
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
}

.library-section {
  display: grid;
  gap: 18px;
}

.pattern-intro-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.pattern-usage-card {
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(223, 242, 255, 0.88), rgba(255, 255, 255, 0.96));
  border: 1px solid rgba(17, 37, 63, 0.08);
}

.pattern-usage-card p:last-child {
  margin: 8px 0 0;
  color: var(--muted);
}

.list-link-stack {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.list-link-card {
  display: block;
  padding: 16px 18px;
  border-radius: 18px;
  text-decoration: none;
  color: var(--ink);
  background: linear-gradient(145deg, rgba(223, 242, 255, 0.9), rgba(255, 255, 255, 0.98));
  border: 1px solid rgba(17, 37, 63, 0.08);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.list-link-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(10, 34, 58, 0.1);
}

.feature-link-title {
  display: block;
  margin: 0 0 8px;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.28rem;
  line-height: 1.14;
}

.feature-link-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.library-split-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.library-panel-card {
  display: grid;
  gap: 14px;
  padding: 24px;
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(223, 242, 255, 0.74));
  border: 1px solid rgba(17, 37, 63, 0.08);
  text-decoration: none;
  color: var(--ink);
  box-shadow: 0 16px 34px rgba(10, 34, 58, 0.08);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.library-panel-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(10, 34, 58, 0.12);
}

.library-panel-card h3 {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.45rem;
  line-height: 1.12;
}

.library-panel-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

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

.pricing-card {
  display: grid;
  gap: 14px;
  padding: 24px;
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(223, 242, 255, 0.78));
  border: 1px solid rgba(17, 37, 63, 0.08);
  box-shadow: 0 18px 40px rgba(10, 34, 58, 0.08);
}

.pricing-card-featured {
  background: linear-gradient(145deg, rgba(181, 255, 101, 0.18), rgba(255, 255, 255, 0.98));
  border-color: rgba(40, 93, 19, 0.18);
}

.pricing-card-coming-soon {
  background: linear-gradient(145deg, rgba(243, 247, 251, 0.98), rgba(233, 240, 247, 0.88));
  border-color: rgba(17, 37, 63, 0.12);
}

.pricing-price {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: 2rem;
  line-height: 1;
  color: #163f63;
}

.pricing-price-soon {
  font-size: 1.5rem;
  color: #47617d;
}

.pricing-subtext,
.pricing-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.pricing-list {
  margin: 0;
  padding-left: 20px;
  color: var(--ink);
}

.pricing-list li + li {
  margin-top: 10px;
}

.pricing-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.subscription-compare-title {
  font-size: clamp(1.12rem, 1.95vw, 1.38rem);
  line-height: 1.05;
}

@media (min-width: 760px) {
  .subscription-compare-title {
    white-space: nowrap;
  }
}

@media (max-width: 980px) {
  .membership-matrix-wrap {
    overflow-x: auto;
    overflow-y: visible;
  }
}

.membership-matrix-wrap {
  margin-top: 6px;
  overflow: visible;
  border-radius: 24px;
  border: 1px solid rgba(17, 37, 63, 0.12);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.985), rgba(235, 245, 253, 0.9));
  box-shadow: 0 18px 40px rgba(10, 34, 58, 0.08);
}

.membership-matrix {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
}

.membership-matrix th,
.membership-matrix td {
  padding: 10px 12px;
  text-align: center;
  vertical-align: middle;
  border-right: 1px solid rgba(17, 37, 63, 0.1);
  border-bottom: 1px solid rgba(17, 37, 63, 0.1);
  font-size: 0.91rem;
}

.membership-matrix th:last-child,
.membership-matrix td:last-child {
  border-right: 0;
}

.membership-matrix tbody tr:last-child td {
  border-bottom: 0;
}

.membership-matrix th {
  background: rgba(17, 37, 63, 0.05);
  font-size: 0.77rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #1f69a7;
}

.membership-matrix th:first-child,
.membership-matrix td:first-child {
  width: 34%;
  text-align: left;
  font-weight: 700;
  color: #163f63;
}

.membership-feature-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.membership-matrix td:not(:first-child),
.membership-matrix th:not(:first-child) {
  width: 16.5%;
}

.membership-cost-row td {
  background: rgba(255, 255, 255, 0.96);
}

.membership-cost-box {
  display: grid;
  gap: 6px;
  justify-items: center;
  padding: 8px 6px;
  border-radius: 16px;
  border: 1px solid rgba(17, 37, 63, 0.08);
  background: linear-gradient(145deg, rgba(214, 235, 253, 0.98), rgba(232, 244, 255, 0.98));
}

.membership-cost-box strong {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.02rem;
  color: #163f63;
}

.membership-cost-label {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #47617d;
}

.membership-cost-box-featured {
  background: linear-gradient(145deg, rgba(214, 235, 253, 0.98), rgba(232, 244, 255, 0.98));
  border-color: rgba(17, 37, 63, 0.08);
}

.membership-cost-box-soon {
  background: linear-gradient(145deg, rgba(214, 235, 253, 0.98), rgba(232, 244, 255, 0.98));
  border-color: rgba(17, 37, 63, 0.08);
}

.plan-check,
.plan-cross {
  display: inline-block;
  font-weight: 800;
  font-size: 1.18rem;
  line-height: 1;
}

.plan-check {
  color: #118231;
}

.plan-cross {
  color: #e01616;
}

.subscription-help-trigger {
  width: 18px;
  height: 18px;
  font-size: 0.68rem;
}

.subscription-help-shell .subscription-help-copy {
  left: 14px;
  right: auto;
  top: calc(100% + 6px);
  width: min(220px, 34vw);
  z-index: 20;
}

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

.home-library-strip {
  width: min(1280px, 100%);
  margin: 0 auto 26px;
  position: relative;
  z-index: 1;
}

.home-panel-link-row {
  display: flex;
  justify-content: flex-start;
  margin: 14px 0 8px;
}

.featured-reads-window {
  display: grid;
  margin-top: 12px;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(223, 242, 255, 0.84));
  border: 1px solid rgba(17, 37, 63, 0.08);
  box-shadow: 0 14px 30px rgba(10, 34, 58, 0.08);
}

.featured-read-row {
  display: grid;
  gap: 4px;
  padding: 12px 16px;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid rgba(17, 37, 63, 0.08);
  transition: background 160ms ease, transform 160ms ease;
}

.featured-read-row:last-child {
  border-bottom: 0;
}

.featured-read-row:hover {
  background: rgba(255, 255, 255, 0.5);
}

.featured-read-title {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1rem;
  line-height: 1.16;
}

.featured-read-copy {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

body.home-page .panel-head h2 {
  font-size: 1.55rem;
}

body.home-page .panel-note {
  font-size: 0.9rem;
}

body.home-page .hero-preview h2 {
  font-size: 1.58rem;
}

body.home-page .impact-home-card h3 {
  font-size: 1.24rem;
  line-height: 1.1;
}

body.home-page .impact-home-grid {
  gap: 12px;
}

body.home-page .impact-home-card {
  gap: 10px;
  padding: 18px;
  align-content: start;
  align-items: start;
}

body.home-page .impact-home-card .action-row {
  margin-top: -2px;
  gap: 10px;
}

body.home-page .impact-home-card .strategy-narrative {
  margin-bottom: 0;
}

.home-stat-list {
  margin: 0;
  padding-left: 20px;
  color: var(--ink);
}

.home-stat-list li {
  line-height: 1.55;
}

.home-stat-list li + li {
  margin-top: 8px;
}

.home-stat-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.48;
}

.article-note-list {
  margin-top: 18px;
}

.article-note-list li {
  line-height: 1.65;
}

.note-sheet-frame {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

.note-sheet {
  width: min(560px, 100%);
  padding: 26px 26px 24px;
  border-radius: 16px;
  border: 1px solid rgba(121, 95, 55, 0.24);
  background:
    linear-gradient(to bottom, rgba(214, 229, 255, 0.62) 0 2px, transparent 2px 32px),
    repeating-linear-gradient(to bottom, transparent 0 31px, rgba(111, 153, 214, 0.28) 31px 32px),
    linear-gradient(145deg, #fffef8, #fff6dc);
  box-shadow: 0 18px 34px rgba(10, 34, 58, 0.12);
  transform: rotate(-1deg);
}

.note-sheet-label {
  margin: 0 0 12px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8c6a1f;
}

.note-sheet-list {
  margin: 0;
  padding-left: 24px;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.02rem;
  line-height: 1.92;
  color: #3a2f1c;
}

.note-sheet-list li {
  padding-right: 6px;
}

.reference-link {
  color: #163f63;
  font-weight: 600;
  text-decoration: none;
}

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

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

.pattern-card {
  display: grid;
  gap: 14px;
  padding: 22px;
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(223, 242, 255, 0.68));
  border: 1px solid rgba(17, 37, 63, 0.08);
  box-shadow: 0 18px 45px rgba(10, 34, 58, 0.08);
}

.pattern-card .pattern-kicker {
  margin-right: 120px;
}

.pattern-kicker {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #1f69a7;
}

.pattern-card h3 {
  margin: -2px 0 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.45rem;
  line-height: 1.08;
}

.pattern-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pattern-meta span {
  display: inline-flex;
  align-items: center;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(17, 37, 63, 0.06);
  color: #244e74;
  font-size: 0.9rem;
}

.pattern-list {
  margin-top: 0;
}

.pattern-card-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: -4px;
  margin-bottom: -4px;
  grid-row: 1;
  grid-column: 1;
  align-self: start;
}

.pattern-detail-button {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  justify-self: end;
  background: linear-gradient(135deg, #9df06d, #d9fff3);
  color: #143c28;
  box-shadow: 0 14px 24px rgba(71, 150, 59, 0.16);
}

.simple-list-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.simple-list-card {
  padding: 22px;
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(223, 242, 255, 0.74));
  border: 1px solid rgba(17, 37, 63, 0.08);
}

.simple-list-card h3 {
  margin: 0 0 14px;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.35rem;
}

.simple-pattern-list {
  margin: 0;
  padding-left: 22px;
  color: var(--muted);
}

.simple-pattern-list li + li {
  margin-top: 10px;
}

.reference-subheading {
  margin: 26px 0 10px;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.35rem;
  color: #163f63;
}

.reference-sheet {
  padding: 28px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(17, 37, 63, 0.08);
  box-shadow: 0 18px 46px rgba(10, 34, 58, 0.08);
}

.reference-sheet + .reference-sheet {
  margin-top: 10px;
}

.reference-sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 6px;
}

.reference-sheet-head h2 {
  margin: 8px 0 0;
  font-family: "Fraunces", Georgia, serif;
}

.reference-sheet-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.reference-sheet-title-row h2 {
  margin: 8px 0 0;
}

.reference-sheet-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 700;
  color: #143c28;
  background: linear-gradient(135deg, #d9fff3, #effcff);
  border: 1px solid rgba(17, 37, 63, 0.1);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.reference-sheet-link-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(17, 37, 63, 0.1);
}

.reference-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}

.reference-table th,
.reference-table td {
  padding: 12px 10px;
  text-align: left;
  border-bottom: 1px solid rgba(17, 37, 63, 0.1);
}

.reference-table th {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #1f69a7;
}

.reference-table td:first-child,
.reference-table th:first-child {
  width: 120px;
}

.library-topic-table td:first-child,
.library-topic-table th:first-child {
  width: 44%;
}

.reference-table td {
  color: var(--ink);
}

.reference-table tbody tr:last-child td {
  border-bottom: 0;
}

.reference-empty-row td {
  color: var(--muted);
  font-style: italic;
}

.subscription-page .reference-table th {
  font-size: 0.74rem;
}

.subscription-page .reference-table td {
  padding: 10px 10px;
  font-family: "Space Grotesk", "Aptos", "Segoe UI", sans-serif;
  font-size: 0.88rem;
  line-height: 1.45;
}

.subscription-page .reference-table td:first-child {
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #163f63;
}

.results-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.results-entry-form {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.results-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.results-court-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.results-court-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(223, 242, 255, 0.72));
  border: 1px solid rgba(17, 37, 63, 0.08);
}

.results-court-card .field-head {
  margin-bottom: 2px;
}

.results-form-actions {
  align-items: center;
}

.results-storage-note,
.results-form-feedback {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.5;
}

.results-storage-note {
  color: var(--muted);
}

.results-form-feedback {
  font-weight: 700;
}

.results-form-feedback[data-tone="neutral"] {
  color: var(--muted);
}

.results-form-feedback[data-tone="success"] {
  color: #1d6a1f;
}

.results-form-feedback[data-tone="error"] {
  color: #b01f1f;
}

.results-meta-chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(17, 37, 63, 0.06);
  border: 1px solid rgba(17, 37, 63, 0.08);
  color: #163f63;
  font-size: 0.84rem;
  font-weight: 700;
}

.results-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.results-summary-card {
  display: grid;
  gap: 8px;
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(223, 242, 255, 0.7));
  border: 1px solid rgba(17, 37, 63, 0.08);
}

.results-summary-label {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #1f69a7;
}

.results-summary-card strong {
  font-size: 1.25rem;
  line-height: 1.15;
  color: #163f63;
}

.result-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.result-pill-win {
  background: rgba(157, 240, 109, 0.24);
  color: #1d6a1f;
}

.result-pill-loss {
  background: rgba(255, 120, 120, 0.18);
  color: #b01f1f;
}

.result-pill-neutral {
  background: rgba(31, 105, 167, 0.12);
  color: #1f69a7;
}

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

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

.impact-home-card {
  display: grid;
  gap: 14px;
  padding: 22px;
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(223, 242, 255, 0.72));
  border: 1px solid rgba(17, 37, 63, 0.08);
  box-shadow: 0 18px 40px rgba(10, 34, 58, 0.08);
}

.impact-home-card h3,
.impact-verdict-card h3,
.impact-metric h3 {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  color: #163f63;
}

.impact-inline-image-link {
  display: inline-grid;
  gap: 8px;
  width: fit-content;
  text-decoration: none;
}

.impact-inline-image {
  display: block;
  width: min(100%, 180px);
  border-radius: 14px;
  border: 1px solid rgba(17, 37, 63, 0.1);
  box-shadow: 0 14px 28px rgba(10, 34, 58, 0.12);
}

.impact-inline-image-caption {
  font-size: 0.78rem;
  font-weight: 700;
  color: #163f63;
}

.impact-number-emphasis {
  display: inline-block;
  margin: 0 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 233, 116, 0.99), rgba(255, 247, 189, 0.99));
  color: #111111;
  box-shadow: 0 10px 20px rgba(10, 34, 58, 0.12);
  font-size: 1.08em;
  line-height: 1;
  white-space: nowrap;
}

.impact-tag-row {
  margin-top: -2px;
  gap: 8px;
}

body.home-page .impact-tag-row span {
  padding: 8px 11px;
  font-size: 0.84rem;
}

.impact-plain-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 20px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.9rem;
  line-height: 1.5;
}

.impact-plain-points span {
  position: relative;
}

.impact-plain-points span:not(:last-child)::after {
  content: "•";
  margin-left: 18px;
  color: rgba(181, 255, 101, 0.9);
}

body.impact-page .hero-copy h1 {
  display: block;
  transform: none;
}

.hero-description-flow::after {
  content: "";
  display: block;
  clear: both;
}

.hero-inline-image {
  float: right;
  width: 68px;
  max-width: 42%;
  margin: 2px 0 6px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 14px 26px rgba(10, 34, 58, 0.16);
}

.impact-metric {
  display: grid;
  gap: 8px;
  padding: 18px;
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(223, 242, 255, 0.7), rgba(255, 255, 255, 0.98));
  border: 1px solid rgba(17, 37, 63, 0.08);
}

.metric-help-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.metric-help-row .pattern-kicker {
  margin: 0;
}

.help-inline-shell {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.metric-help-trigger {
  width: 22px;
  height: 22px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(17, 37, 63, 0.14);
  background: rgba(17, 37, 63, 0.08);
  color: #163f63;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.metric-help-trigger:hover,
.metric-help-trigger:focus-visible {
  background: rgba(17, 37, 63, 0.14);
}

.metric-help-copy {
  right: 0;
  top: calc(100% + 8px);
  width: min(220px, 58vw);
}

.metric-help-trigger:hover + .metric-help-copy,
.metric-help-trigger:focus-visible + .metric-help-copy {
  opacity: 1;
  transform: translateY(0);
}

.impact-metric-value {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.9rem, 3vw, 2.6rem);
  line-height: 1;
  color: #0f4f7f;
}

.impact-metric-scoreline {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.impact-metric-target {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(17, 37, 63, 0.08);
  color: #1f69a7;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 4px;
  white-space: nowrap;
}

.impact-metric-copy {
  color: var(--muted);
  line-height: 1.6;
}

.impact-verdict-card {
  margin-top: 16px;
  padding: 22px;
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(181, 255, 101, 0.18), rgba(217, 255, 243, 0.95));
  border: 1px solid rgba(40, 93, 19, 0.14);
}

.impact-verdict-card p:last-child {
  margin-bottom: 0;
}

.impact-list {
  margin: 16px 0 0;
  padding-left: 20px;
}

.impact-list li + li {
  margin-top: 10px;
}

.impact-note {
  margin-top: 16px;
  color: var(--muted);
}

.score-reference-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #1f69a7;
  text-decoration: none;
}

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

.counter-tool-grid {
  display: grid;
  grid-template-columns: 0.88fr 1.12fr;
  gap: 18px;
}

.counter-control-card,
.counter-response-card {
  align-self: stretch;
}

.counter-select-label {
  display: block;
  margin-bottom: 10px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #1f69a7;
}

.counter-select {
  width: 100%;
  min-height: 54px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(17, 37, 63, 0.12);
  background: rgba(255, 255, 255, 0.98);
  color: var(--ink);
  font: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.counter-quick-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.counter-quick-button {
  min-height: 46px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(17, 37, 63, 0.12);
  background: rgba(17, 37, 63, 0.04);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.counter-quick-button:hover {
  transform: translateY(-1px);
  background: rgba(17, 37, 63, 0.08);
}

.counter-quick-button-active {
  background: linear-gradient(135deg, #9df06d, #d9fff3);
  border-color: rgba(40, 93, 19, 0.18);
  color: #0d2d4d;
}

.counter-left-note {
  margin-top: 16px;
  padding: 18px;
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(223, 242, 255, 0.7));
  border: 1px solid rgba(17, 37, 63, 0.08);
}

.counter-left-note p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
}

.counter-response-grid {
  margin-top: 0;
}

.counter-bullet-list {
  margin-top: 0;
}

.counter-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.counter-action-row .hero-action-button {
  min-width: 220px;
}

.video-embed-shell {
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(17, 37, 63, 0.08);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(223, 242, 255, 0.72));
  box-shadow: 0 18px 40px rgba(10, 34, 58, 0.1);
}

.video-embed-frame {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
}

.video-preview-shell {
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(17, 37, 63, 0.08);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(223, 242, 255, 0.72));
  box-shadow: 0 18px 40px rgba(10, 34, 58, 0.1);
}

.video-preview-link {
  position: relative;
  display: block;
  text-decoration: none;
}

.video-preview-image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #dfefff;
}

.video-preview-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 180px;
  padding: 14px 18px;
  border-radius: 999px;
  background: rgba(13, 45, 77, 0.86);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 16px 30px rgba(10, 34, 58, 0.22);
}

.signup-grid {
  align-items: start;
}

.signup-form {
  margin-top: 18px;
}

.signup-textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 8px;
  border: 1px solid rgba(17, 37, 63, 0.12);
  background: white;
  color: var(--ink);
  font: inherit;
  resize: vertical;
}

.signup-consent-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  color: var(--muted);
  line-height: 1.5;
}

.signup-consent-row input {
  margin-top: 3px;
}

.signup-success-card[hidden] {
  display: none;
}

.pattern-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.detail-block {
  padding: 22px;
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(223, 242, 255, 0.78));
  border: 1px solid rgba(17, 37, 63, 0.08);
}

.detail-copy {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.detail-list {
  margin-top: 12px;
}

.related-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.related-link {
  display: block;
  padding: 20px;
  border-radius: 22px;
  text-decoration: none;
  color: var(--ink);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(223, 242, 255, 0.72));
  border: 1px solid rgba(17, 37, 63, 0.08);
  box-shadow: 0 16px 34px rgba(10, 34, 58, 0.08);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.related-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(10, 34, 58, 0.12);
}

.related-link .pattern-kicker {
  margin-bottom: 8px;
}

.related-link h3 {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.2rem;
  line-height: 1.18;
}

.related-link p:last-child {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.site-footer {
  position: relative;
  z-index: 1;
  width: min(1280px, 100%);
  margin: 26px auto 0;
}

.site-footer-inner {
  display: grid;
  gap: 12px;
  padding: 18px 22px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(12, 44, 74, 0.96), rgba(24, 84, 126, 0.94));
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(16px);
  box-shadow: 0 16px 38px rgba(10, 34, 58, 0.2);
}

body.reference-page .site-footer-inner {
  background: linear-gradient(135deg, rgba(12, 44, 74, 0.97), rgba(24, 84, 126, 0.95));
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 16px 34px rgba(10, 34, 58, 0.18);
}

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

.site-footer-brand {
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #ffffff;
}

body.reference-page .site-footer-brand {
  color: var(--ink);
}

.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.site-footer-link {
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 700;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
  transition: transform 160ms ease, background 160ms ease;
}

.site-footer-link:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.24);
}

body.reference-page .site-footer-link {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.22);
}

body.reference-page .site-footer-link:hover {
  background: rgba(255, 255, 255, 0.24);
}

.site-footer-note {
  margin: 0;
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.5;
}

body.reference-page .site-footer-note {
  color: var(--muted);
}

.info-panel-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 18px;
}

.info-list {
  margin: 14px 0 0;
  padding-left: 20px;
  color: var(--muted);
}

.info-list li + li {
  margin-top: 10px;
}

.contact-form-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 18px;
  align-items: start;
}

.contact-side-card {
  display: grid;
  gap: 14px;
}

.legal-section-grid {
  display: grid;
  gap: 16px;
}

.legal-section-grid .detail-block h3 {
  margin-top: 0;
}

.legal-section-grid .detail-copy {
  margin-top: 10px;
}

.tactic-list {
  margin: 16px 0 0;
  padding-left: 20px;
}

.tactic-list li + li {
  margin-top: 12px;
}

@media (max-width: 1120px) {
  .hero-grid,
  .app-grid {
    grid-template-columns: 1fr;
  }

  .court-lines-a,
  .court-lines-b {
    display: none;
  }
}

@media (max-width: 760px) {
  .page-shell {
    padding: 16px 14px 32px;
  }

  .top-page-nav {
    flex-wrap: wrap;
    overflow-x: visible;
    gap: 8px;
  }

  .site-search-form {
    grid-template-columns: 1fr;
  }

  .top-page-link {
    flex: 1 1 calc(50% - 8px);
  }

  .top-page-dropdown {
    flex: 1 1 calc(50% - 8px);
  }

  .top-page-dropdown-menu {
    position: static;
    min-width: 0;
    margin-top: 8px;
  }

  .hero-copy,
  .hero-preview,
  .panel {
    border-radius: 24px;
    padding: 22px;
  }

  .panel-with-corner-toggle .panel-head,
  .panel-with-corner-toggle .reference-sheet-head {
    padding-right: 0;
  }

  .panel-with-corner-toggle.hero-preview {
    padding-right: 22px;
  }

  .hero-grid-collapsible-shell .hero-preview {
    padding-right: 22px;
  }

  .section-toggle-corner {
    top: 20px;
    right: 20px;
  }

  .brand-row,
  .panel-head,
  .field-head,
  .section-heading,
  .card-head {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .quick-insight-grid,
  .matchup-tool-grid,
  .result-grid,
  .compact-grid,
  .results-form-grid,
  .results-court-grid,
  .results-summary-grid,
  .impact-home-grid,
  .impact-metric-grid,
  .player-score-grid,
  .counter-tool-grid,
  .info-panel-grid,
  .contact-form-grid,
  .rating-grid,
  .matchup-visuals,
  .hero-action-grid,
  .library-topic-window-grid,
  .simple-list-grid,
  .library-split-grid,
  .pricing-grid,
  .faq-grid,
  .subscription-checkout-grid,
  .pattern-detail-grid,
  .pattern-intro-grid,
  .pattern-section-grid,
  .team-card-grid,
  .rating-grid-compact,
  .lineup-demo-grid,
  .lineup-player-grid,
  .lineup-alternate-results,
  .lineup-slot-grid {
    grid-template-columns: 1fr;
  }

  .related-links {
    grid-template-columns: 1fr;
  }

  .pattern-page-switch {
    width: 100%;
    justify-self: stretch;
  }

  .pattern-page-link {
    min-width: 0;
    flex: 1;
  }

  .preset-row {
    grid-template-columns: 1fr;
  }

  .preset-actions {
    width: 100%;
  }

  .hero-inline-image {
    float: none;
    display: block;
    width: min(220px, 100%);
    max-width: 100%;
    margin: 0 0 14px;
  }

  .photo-upload-card,
  .matchup-player-card {
    grid-template-columns: 1fr;
  }

  .photo-preview-shell,
  .matchup-avatar-shell {
    margin: 0 auto;
  }

  .saved-plan-row {
    grid-template-columns: 1fr;
  }

  .saved-plan-actions {
    justify-content: flex-start;
  }

}
