:root {
  --jj-cream: #eff7cf;
  --jj-sage: #bad9b5;
  --jj-gold: #aba361;
  --jj-wine: #732c2c;
  --jj-burgundy: #420c14;
  --jj-paper: #fffdf6;
  --jj-ink: #2d211d;
  --jj-muted: #6d6259;
  --jj-line: rgba(66, 12, 20, 0.18);
  --jj-shadow: 0 18px 45px rgba(66, 12, 20, 0.12);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

[id^="sekcja_"] {
  scroll-margin-top: 82px;
}

.jj-legacy-anchor {
  display: block;
  height: 0;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(186, 217, 181, 0.4), transparent 34rem),
    #f7f4e8;
  color: var(--jj-ink);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.7;
}

a {
  color: var(--jj-wine);
}

a:focus-visible {
  outline: 3px solid var(--jj-gold);
  outline-offset: 3px;
}

.jj-skip-link {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 10000;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--jj-burgundy);
  color: #fff;
}

.jj-skip-link:focus {
  top: 16px;
}

.sevenba-back-link {
  position: fixed;
  right: 18px;
  top: 18px;
  z-index: 100;
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: var(--jj-burgundy);
  box-shadow: 0 6px 20px rgba(66, 12, 20, 0.24);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.sevenba-back-link:hover {
  background: var(--jj-wine);
}

.jj-shell {
  width: min(1440px, 100%);
  margin: 0 auto;
}

.jj-hero {
  min-height: 300px;
  display: grid;
  grid-template-columns: minmax(250px, 1fr) minmax(220px, 360px) minmax(320px, 1fr);
  align-items: center;
  gap: clamp(16px, 3vw, 48px);
  padding: 50px clamp(24px, 6vw, 90px) 36px;
  overflow: hidden;
  border-bottom: 8px solid var(--jj-gold);
  background:
    linear-gradient(115deg, rgba(239, 247, 207, 0.97), rgba(186, 217, 181, 0.92)),
    repeating-linear-gradient(45deg, transparent, transparent 14px, rgba(66, 12, 20, 0.03) 14px, rgba(66, 12, 20, 0.03) 15px);
}

.jj-hero__identity h1 {
  margin: 0;
  color: var(--jj-burgundy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.7rem, 5vw, 5.4rem);
  line-height: 0.95;
  letter-spacing: -0.045em;
}

.jj-eyebrow {
  margin: 0 0 6px;
  color: var(--jj-wine);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.jj-subtitle {
  margin: 14px 0 0;
  color: var(--jj-muted);
  font-size: 1.08rem;
}

.jj-crest {
  width: min(100%, 330px);
  height: auto;
  justify-self: center;
  filter: drop-shadow(0 15px 15px rgba(66, 12, 20, 0.15));
  mix-blend-mode: multiply;
}

.jj-players {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
}

.jj-players p {
  min-width: 0;
  margin: 0;
  padding: 14px 16px;
  border: 1px solid rgba(66, 12, 20, 0.14);
  border-radius: 14px;
  background: rgba(255, 253, 246, 0.68);
}

.jj-players span,
.jj-players strong {
  display: block;
}

.jj-players p > span {
  color: var(--jj-wine);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.jj-players strong {
  color: var(--jj-burgundy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.15rem, 2vw, 1.65rem);
  line-height: 1.15;
}

.jj-ampersand {
  color: var(--jj-gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  font-weight: 700;
}

.jj-main-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  gap: 2px;
  padding: 8px clamp(16px, 4vw, 56px);
  overflow: visible;
  background: var(--jj-burgundy);
  box-shadow: 0 8px 24px rgba(66, 12, 20, 0.18);
  scrollbar-width: none;
}

.jj-main-nav::-webkit-scrollbar {
  display: none;
}

.jj-main-nav__item {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}

.jj-main-nav a {
  flex: 0 0 auto;
  padding: 9px 12px;
  border-radius: 7px;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}

.jj-main-nav__item--has-children > a {
  padding-right: 7px;
  border-radius: 7px 0 0 7px;
}

.jj-main-nav__toggle {
  align-self: stretch;
  min-width: 28px;
  padding: 0 8px;
  border: 0;
  border-radius: 0 7px 7px 0;
  background: transparent;
  color: #fff;
  font: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.jj-main-nav__toggle:hover,
.jj-main-nav__toggle:focus-visible,
.jj-main-nav__item.is-open > .jj-main-nav__toggle {
  background: var(--jj-gold);
  color: var(--jj-burgundy);
}

.jj-main-nav__toggle:focus-visible {
  outline: 3px solid var(--jj-gold);
  outline-offset: 2px;
}

.jj-main-nav__toggle-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  transition: transform 150ms ease, background 150ms ease;
}

.jj-main-nav__toggle-icon svg {
  display: block;
  transition: transform 150ms ease;
}

.jj-main-nav__toggle[aria-expanded="true"] .jj-main-nav__toggle-icon {
  transform: none;
}

.jj-main-nav__toggle[aria-expanded="true"] .jj-main-nav__toggle-icon svg {
  transform: rotate(180deg);
}

.jj-main-nav__dropdown {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  z-index: 80;
  width: max-content;
  min-width: 250px;
  max-width: 360px;
  max-height: min(65vh, 560px);
  display: none;
  padding: 8px;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  background: var(--jj-burgundy);
  box-shadow: 0 18px 40px rgba(66, 12, 20, 0.28);
}

.jj-main-nav__item.is-open > .jj-main-nav__dropdown {
  display: grid;
  gap: 2px;
}

.jj-main-nav .jj-main-nav__dropdown a {
  padding: 9px 11px;
  border-radius: 7px;
  color: #fff;
  font-size: 0.83rem;
  line-height: 1.35;
  white-space: normal;
}

.jj-main-nav .jj-main-nav__dropdown a:hover,
.jj-main-nav .jj-main-nav__dropdown a:focus-visible {
  background: var(--jj-gold);
  color: var(--jj-burgundy);
}

.jj-main-nav a:hover,
.jj-main-nav a[aria-current="page"] {
  background: var(--jj-gold);
  color: var(--jj-burgundy);
}

.jj-category {
  padding: clamp(38px, 6vw, 86px) clamp(20px, 6vw, 90px) 90px;
}

.jj-home {
  background: linear-gradient(180deg, rgba(239, 247, 207, 0.3), transparent 24rem);
}

.jj-home .jj-card {
  min-height: 126px;
}

.jj-home .jj-card p {
  display: none;
}

.jj-page-title {
  max-width: 920px;
  margin: 0;
  color: var(--jj-burgundy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.2rem, 5vw, 4.4rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
}

.jj-lead {
  max-width: 780px;
  margin: 18px 0 42px;
  color: var(--jj-muted);
  font-size: 1.18rem;
}

.jj-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: 14px;
}

.jj-card {
  position: relative;
  min-height: 158px;
  display: flex;
  flex-direction: column;
  padding: 20px;
  overflow: hidden;
  border: 1px solid var(--jj-line);
  border-radius: 18px;
  background: var(--jj-paper);
  box-shadow: 0 10px 28px rgba(66, 12, 20, 0.07);
  color: var(--jj-ink);
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.jj-card::after {
  content: "";
  position: absolute;
  right: -32px;
  bottom: -45px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--jj-sage);
  opacity: 0.45;
}

.jj-card:hover {
  transform: translateY(-4px);
  border-color: var(--jj-gold);
  box-shadow: var(--jj-shadow);
}

.jj-card__number {
  color: var(--jj-wine);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.jj-card h2 {
  margin: 11px 0 7px;
  color: var(--jj-burgundy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  line-height: 1.14;
}

.jj-card p {
  margin: 0 0 12px;
  color: var(--jj-muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.jj-card__cta {
  z-index: 1;
  margin-top: auto;
  color: var(--jj-wine);
  font-weight: 750;
  font-size: 0.88rem;
}

.jj-accordion-menu {
  margin-top: clamp(48px, 7vw, 88px);
  padding: clamp(24px, 4vw, 44px);
  border: 1px solid var(--jj-line);
  border-radius: 22px;
  background: rgba(255, 253, 246, 0.82);
  box-shadow: 0 16px 40px rgba(66, 12, 20, 0.08);
}

.jj-accordion-menu > h2 {
  max-width: 760px;
  margin: 0;
  color: var(--jj-burgundy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.08;
}

.jj-accordion-menu__lead {
  margin: 12px 0 28px;
  color: var(--jj-muted);
}

.jj-accordion {
  display: grid;
  gap: 8px;
}

.jj-accordion details {
  border: 1px solid var(--jj-line);
  border-radius: 12px;
  background: var(--jj-paper);
}

.jj-accordion summary {
  position: relative;
  padding: 13px 48px 13px 16px;
  color: var(--jj-burgundy);
  font-weight: 750;
  line-height: 1.35;
  cursor: pointer;
  list-style: none;
}

.jj-accordion summary::-webkit-details-marker {
  display: none;
}

.jj-accordion summary::after {
  content: "+";
  position: absolute;
  right: 16px;
  top: 50%;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  border-radius: 50%;
  background: var(--jj-cream);
  color: var(--jj-wine);
  font-size: 1.15rem;
}

.jj-accordion details[open] > summary::after {
  content: "−";
  background: var(--jj-gold);
  color: var(--jj-burgundy);
}

.jj-accordion__group[open] > summary {
  background: var(--jj-burgundy);
  color: #fff;
  border-radius: 11px 11px 0 0;
}

.jj-accordion__content {
  padding: 12px 16px 18px;
  border-top: 1px solid var(--jj-line);
}

.jj-accordion__subgroups {
  display: grid;
  gap: 7px;
}

.jj-accordion .jj-accordion__subgroup {
  background: rgba(239, 247, 207, 0.28);
}

.jj-accordion__open-page {
  display: inline-block;
  margin: 7px 10px 8px;
  color: var(--jj-wine);
  font-size: 0.88rem;
  font-weight: 750;
}

.jj-accordion__links {
  margin: 4px 0 8px;
  padding: 0 12px 0 30px;
  columns: 2 280px;
  column-gap: 32px;
}

.jj-accordion__links li {
  break-inside: avoid;
  margin: 0 0 4px;
  color: var(--jj-gold);
}

.jj-accordion__links a {
  color: var(--jj-ink);
  font-size: 0.86rem;
  line-height: 1.35;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.jj-accordion__links a:hover {
  color: var(--jj-wine);
}

.jj-accordion__level-3 {
  margin-left: 12px !important;
}

.jj-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  align-items: start;
}

.jj-page-toc {
  position: sticky;
  top: 59px;
  max-height: calc(100vh - 59px);
  padding: 24px 16px 50px;
  overflow-y: auto;
  background: var(--jj-cream);
  border-right: 1px solid var(--jj-line);
}

.jj-page-toc__title {
  margin: 0 0 12px;
  padding: 0 10px 12px;
  border-bottom: 1px solid var(--jj-line);
  color: var(--jj-burgundy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.2rem;
  font-weight: 700;
}

.jj-page-toc nav {
  display: grid;
  gap: 2px;
}

.jj-page-toc a {
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--jj-burgundy);
  font-size: 0.9rem;
  font-weight: 620;
  line-height: 1.35;
  text-decoration: none;
}

.jj-page-toc a:hover,
.jj-page-toc a[aria-current="location"] {
  background: var(--jj-wine);
  color: #fff;
}

.jj-page-toc__level-3 {
  margin-left: 13px;
  color: #6b3a3a !important;
  font-size: 0.84rem !important;
  font-weight: 560 !important;
}

.jj-page-toc__level-3:hover,
.jj-page-toc__level-3[aria-current="location"] {
  color: #fff !important;
}

.jj-page-toc__auction-group {
  margin: 3px 0 3px 13px;
  border: 1px solid rgba(123, 47, 47, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.24);
}

.jj-page-toc__auction-group summary {
  position: relative;
  padding: 9px 30px 9px 12px;
  color: var(--jj-burgundy);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.3;
  cursor: pointer;
  list-style: none;
}

.jj-page-toc__auction-group summary::-webkit-details-marker {
  display: none;
}

.jj-page-toc__auction-group summary::after {
  position: absolute;
  top: 50%;
  right: 11px;
  content: "›";
  font-size: 1.15rem;
  transform: translateY(-52%) rotate(90deg);
  transition: transform 0.16s ease;
}

.jj-page-toc__auction-group[open] summary::after {
  transform: translateY(-52%) rotate(-90deg);
}

.jj-page-toc__auction-group[open] summary {
  border-bottom: 1px solid rgba(123, 47, 47, 0.13);
  background: rgba(255, 255, 255, 0.34);
}

.jj-page-toc__auction-children {
  display: grid;
  gap: 1px;
  padding: 4px 5px 6px 7px;
}

.jj-page-toc .jj-page-toc__auction-link {
  margin-left: 0;
  padding: 7px 9px 7px 17px;
  font-size: 0.8rem !important;
  line-height: 1.3;
}

.jj-content {
  width: min(100%, 980px);
  min-height: 70vh;
  padding: clamp(34px, 5vw, 70px) clamp(20px, 6vw, 80px) 80px;
}

.jj-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 9px;
  margin-bottom: 22px;
  color: var(--jj-muted);
  font-size: 0.86rem;
}

.jj-breadcrumbs a {
  color: var(--jj-wine);
  font-weight: 650;
}

.jj-document {
  margin-top: 38px;
}

.jj-document h1,
.jj-document h2 {
  margin: 52px 0 22px;
  padding: 15px 20px;
  border-left: 7px solid var(--jj-gold);
  border-radius: 0 12px 12px 0;
  background: var(--jj-cream);
  color: var(--jj-burgundy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.55rem, 3vw, 2.25rem);
  line-height: 1.18;
}

.jj-document h3 {
  margin: 38px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--jj-sage);
  color: var(--jj-wine);
  font-size: 1.28rem;
  line-height: 1.28;
}

.jj-document strong {
  color: var(--jj-wine);
  font-weight: 720;
}

.jj-auction-lead {
  position: relative;
  margin: 28px 0 18px;
  padding: 13px 16px 13px 20px;
  border: 1px solid rgba(115, 44, 44, 0.2);
  border-left: 5px solid var(--jj-gold);
  border-radius: 0 10px 10px 0;
  background: linear-gradient(
    90deg,
    rgba(239, 247, 207, 0.72),
    rgba(255, 253, 246, 0.9)
  );
}

.jj-auction-lead > :first-child {
  margin-top: 0;
}

.jj-auction-lead > :last-child {
  margin-bottom: 0;
}

.jj-auction-lead strong {
  line-height: 1.45;
}

.jj-opponent-bid {
  display: inline-block;
  margin: 0 0.08em;
  padding: 0.02em 0.3em;
  border: 1px solid #c8c5bd;
  border-radius: 0.32em;
  background: #e8e7e2;
  color: inherit;
  line-height: 1.35;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.jj-document table {
  max-width: 100%;
  border-collapse: collapse;
  background: var(--jj-paper);
}

.jj-document th,
.jj-document td {
  border: 1px solid var(--jj-line);
  padding: 7px 9px;
}

.jj-document img {
  max-width: 100%;
  height: auto;
}

.jj-page-nav {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  margin-top: 70px;
  padding-top: 28px;
  border-top: 1px solid var(--jj-line);
}

.jj-page-nav a {
  display: flex;
  flex-direction: column;
  padding: 18px;
  border: 1px solid var(--jj-line);
  border-radius: 12px;
  background: var(--jj-paper);
  text-decoration: none;
}

.jj-page-nav a:last-child {
  text-align: right;
}

.jj-page-nav span {
  color: var(--jj-muted);
  font-size: 0.8rem;
}

.jj-page-nav strong {
  color: var(--jj-burgundy);
}

@media (max-width: 1050px) {
  .jj-hero {
    grid-template-columns: 1fr minmax(180px, 260px);
  }

  .jj-players {
    grid-column: 1 / -1;
    width: min(620px, 100%);
    justify-self: center;
  }
}

@media (max-width: 820px) {
  .sevenba-back-link {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 8px 12px;
    font-size: 0.82rem;
  }

  .jj-hero {
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 70px 20px 28px;
    text-align: center;
  }

  .jj-crest {
    width: min(230px, 65vw);
    grid-row: 1;
  }

  .jj-hero__identity {
    grid-row: 2;
  }

  .jj-players {
    grid-row: 3;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .jj-ampersand {
    font-size: 1.35rem;
    line-height: 1;
  }

  .jj-main-nav {
    top: 0;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .jj-main-nav__dropdown {
    position: fixed;
    left: 12px;
    right: 12px;
    top: 58px;
    width: auto;
    max-width: none;
    max-height: min(70vh, 560px);
  }

  .jj-layout {
    display: block;
  }

  .jj-page-toc {
    position: relative;
    top: auto;
    max-height: 310px;
    border-right: 0;
    border-bottom: 1px solid var(--jj-line);
  }

  .jj-content {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .jj-category,
  .jj-content {
    padding-left: 16px;
    padding-right: 16px;
  }

  .jj-card {
    min-height: 142px;
    padding: 17px;
  }

  .jj-accordion-menu {
    padding: 20px 14px;
    border-radius: 16px;
  }

  .jj-accordion__content {
    padding: 10px;
  }

  .jj-accordion__links {
    columns: 1;
    padding-left: 26px;
  }

  .jj-document {
    font-size: 0.96rem;
  }

  .jj-document h1,
  .jj-document h2 {
    padding: 12px 14px;
  }

  .jj-document table {
    display: block;
    overflow-x: auto;
  }

  .jj-page-nav {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .jj-card {
    transition: none;
  }
}

.jj-suit-club { color: #2f7d3a; }
.jj-suit-diamond { color: #c1591a; }
.jj-suit-heart { color: #b0261d; }
.jj-suit-spade { color: #1b2a4a; }

.jj-main-nav .jj-suit-club,
.jj-main-nav .jj-suit-diamond,
.jj-main-nav .jj-suit-heart,
.jj-main-nav .jj-suit-spade {
  -webkit-text-stroke: 0.6px #fff;
  text-stroke: 0.6px #fff;
  text-shadow: 0 0 3px rgba(255, 255, 255, 0.55);
}
