/* ==========================================================================
   STANAG 6001 — słownictwo w kartach + wizualne otwarcia podstron
   Tabela trzykolumnowa jest nieczytelna przy 12 pozycjach z przykładami.
   Karta pokazuje jedno hasło jako jedną rzecz do zapamiętania.
   ========================================================================== */

/* --- Karty słownictwa --------------------------------------------------- */
.vgrid {
  display: grid; gap: .7rem;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  margin: 1.5rem 0;
}

.vcard {
  position: relative;
  background: var(--p-000);
  border: 1px solid var(--line);
  border-left: 3px solid var(--br-400);
  padding: .85rem 1rem .9rem;
  transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}
.vcard:hover {
  border-left-color: var(--br-600);
  box-shadow: var(--sh-2);
  transform: translateY(-2px);
}

.vcard__en {
  display: block;
  font-size: 1.06rem; font-weight: 750; line-height: 1.25;
  color: var(--n-900);
}
.vcard__pl {
  display: block; margin-top: .12rem;
  font-size: .93rem; color: var(--ink-2);
}
.vcard__ex {
  display: block; margin-top: .6rem; padding-top: .55rem;
  border-top: 1px dashed var(--line-2);
  font-size: .87rem; font-style: italic; color: var(--muted);
}
.vcard__ex::before {
  content: "\201C"; color: var(--br-500);
  font-style: normal; font-weight: 700; margin-right: .15rem;
}
.vcard__ex::after {
  content: "\201D"; color: var(--br-500);
  font-style: normal; font-weight: 700; margin-left: .1rem;
}

/* Warianty na ciemnym tle (okno sceny stoi na jasnym, ale sekcje bywają ciemne) */
.section--dark .vcard {
  background: rgba(255, 255, 255, .05);
  border-color: rgba(255, 255, 255, .14);
  border-left-color: var(--br-400);
}
.section--dark .vcard__en { color: #fff; }
.section--dark .vcard__pl { color: #cfcbb8; }
.section--dark .vcard__ex { color: #9d9a87; border-top-color: rgba(255, 255, 255, .18); }

/* Zwarty wariant do okna sceny — tam liczy się każdy piksel wysokości */
.vgrid--tight { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .55rem; }
.vgrid--tight .vcard { padding: .7rem .85rem .75rem; }
.vgrid--tight .vcard__en { font-size: 1rem; }

/* --- Licznik haseł w bloku ---------------------------------------------- */
.vcount {
  display: inline-flex; align-items: baseline; gap: .45rem;
  font-family: var(--mono); font-size: .74rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
  margin-left: .6rem;
}
.vcount b { color: var(--br-600); font-size: 1rem; }

/* ==========================================================================
   WIZUALNE OTWARCIE PODSTRONY
   ========================================================================== */
.opener {
  display: grid; gap: 1.6rem;
  grid-template-columns: 1.05fr .95fr;
  align-items: center;
  margin: 0 0 .6rem;
}
@media (max-width: 860px) { .opener { grid-template-columns: 1fr; } }

.opener__txt > p:last-child { margin-bottom: 0; }

.opener__art {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--n-900);
  overflow: hidden;
}
.opener__art img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(.35) contrast(1.06);
}
.opener__art::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(160deg, transparent 45%, rgba(10, 11, 8, .75));
}
.opener__badge {
  position: absolute; left: 0; bottom: 0; z-index: 2;
  padding: .8rem 1rem;
  font-family: var(--mono); font-size: .74rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--br-300);
}
.opener__num {
  position: absolute; right: -.5rem; top: -1.5rem; z-index: 2;
  font-family: var(--cond); font-weight: 700;
  font-size: clamp(5rem, 14vw, 9rem); line-height: 1;
  color: rgba(219, 176, 75, .22);
  pointer-events: none;
}

/* --- Pasek kluczowych liczb pod otwarciem ------------------------------- */
.stats {
  display: grid; gap: 1px; margin: 1.8rem 0 0;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  background: var(--line);
  border: 1px solid var(--line);
}
.stats div { background: var(--p-000); padding: .95rem 1rem; }
.stats b {
  display: block; font-family: var(--cond); font-size: 1.7rem;
  line-height: 1; color: var(--n-900); font-variant-numeric: tabular-nums;
}
.stats span {
  display: block; margin-top: .35rem;
  font-family: var(--mono); font-size: .7rem; letter-spacing: .09em;
  text-transform: uppercase; color: var(--muted);
}
.section--dark .stats { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .14); }
.section--dark .stats div { background: var(--n-900); }
.section--dark .stats b { color: var(--br-400); }
.section--dark .stats span { color: #9d9a87; }

/* --- Ozdobny pas z warstwicami (rysowany w CSS, bez pliku) -------------- */
.contours {
  position: relative; overflow: hidden;
  height: 74px; margin: 0;
  background:
    repeating-radial-gradient(circle at 18% 140%,
      transparent 0 16px, rgba(147, 160, 119, .30) 16px 17px),
    repeating-radial-gradient(circle at 72% -40%,
      transparent 0 20px, rgba(198, 154, 62, .22) 20px 21px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.section--dark + .contours, .contours--dark {
  background:
    repeating-radial-gradient(circle at 18% 140%,
      transparent 0 16px, rgba(147, 160, 119, .16) 16px 17px),
    repeating-radial-gradient(circle at 72% -40%,
      transparent 0 20px, rgba(219, 176, 75, .14) 20px 21px);
  border-color: rgba(255, 255, 255, .1);
}

@media print {
  .opener__art, .contours { display: none; }
  .vgrid { grid-template-columns: 1fr 1fr; }
  .vcard { break-inside: avoid; }
}
