/* Strategy guides, odds, glossary, news and the legal pages. Loaded after marketing.css. */

.guide-article {
  max-width: 760px;
}

.guide-article h2 {
  scroll-margin-top: calc(var(--header-h) + 1rem);
}

.guide-article h3 {
  margin: 1.5rem 0 0.5rem;
  font-size: 1.1rem;
  color: var(--home-text);
}

.guide-article ol {
  margin: 0 0 1rem;
  padding-left: 1.4rem;
}

.guide-article ol li {
  color: var(--home-muted);
  line-height: 1.75;
}

.guide-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  margin: 0 0 1.5rem;
  font-size: 0.9rem;
  color: var(--home-muted);
}

.guide-meta time {
  font-weight: 500;
  color: var(--home-text);
}

/* Contents box at the top of long articles */
.guide-toc {
  margin: 0 0 2rem;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(0, 77, 64, 0.12);
}

.guide-toc strong {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--home-teal);
}

.guide-toc ol {
  margin: 0;
  padding-left: 1.2rem;
}

.guide-toc a {
  display: inline-block;
  padding: 0.2rem 0;
  min-height: 32px;
  vertical-align: top;
}

/* Playing cards as text chips: <span class="pc h">A<i>♥</i></span> */
.hand {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin: 0.5rem 0 1.25rem;
}

.hand-label {
  flex-basis: 100%;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--home-muted);
}

.pc {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.05em;
  min-width: 2.4rem;
  height: 3.1rem;
  padding: 0 0.3rem;
  border-radius: 6px;
  border: 1px solid #c9d3d1;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1;
  color: #1b1b1b;
  white-space: nowrap;
}

.pc i {
  font-style: normal;
  font-size: 1.1em;
}

.pc.h,
.pc.d {
  color: #c62828;
}

/* Trump cards get a gold edge, cards thrown away are faded */
.pc.is-trump {
  border-color: #d4a017;
  box-shadow: 0 0 0 2px rgba(245, 200, 66, 0.55);
}

.pc.is-out {
  opacity: 0.4;
  text-decoration: line-through;
}

/* Inline card in running text */
.pc.inline {
  min-width: 0;
  height: auto;
  padding: 0.05rem 0.3rem;
  font-size: 0.95em;
  vertical-align: baseline;
  box-shadow: none;
}

/* One trick: who played what */
.trick {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  margin: 0.5rem 0 1.25rem;
  max-width: 420px;
}

.trick > div {
  display: grid;
  justify-items: center;
  gap: 0.3rem;
  padding: 0.5rem 0.25rem;
  border-radius: 10px;
  background: rgba(0, 77, 64, 0.06);
  font-size: 0.85rem;
  color: var(--home-muted);
  text-align: center;
}

.trick > div.is-winner {
  background: rgba(245, 200, 66, 0.25);
  color: var(--home-text);
  font-weight: 500;
}

.callout {
  margin: 1.25rem 0;
  padding: 0.9rem 1.1rem;
  border-radius: 10px;
  border-left: 4px solid var(--home-teal-light);
  background: #fff;
}

.callout p:last-child {
  margin-bottom: 0;
}

.callout-tip {
  border-left-color: #2e7d32;
}

.callout-warn {
  border-left-color: #c62828;
}

.callout strong:first-child {
  color: var(--home-text);
}

/* Data tables scroll sideways on phones instead of squeezing */
.table-scroll {
  margin: 0.5rem 0 1.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 10px;
  border: 1px solid rgba(0, 77, 64, 0.12);
  background: #fff;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.data-table caption {
  padding: 0.6rem 0.9rem;
  text-align: left;
  font-size: 0.85rem;
  color: var(--home-muted);
  caption-side: bottom;
}

.data-table th,
.data-table td {
  padding: 0.55rem 0.9rem;
  border-bottom: 1px solid rgba(0, 77, 64, 0.08);
  text-align: left;
  white-space: nowrap;
}

.data-table th {
  background: rgba(0, 77, 64, 0.06);
  font-weight: 600;
  color: var(--home-teal);
}

.data-table td.num,
.data-table th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

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

/* Big numbers row */
.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0 1.75rem;
}

.stat-row > div {
  padding: 0.9rem 1rem;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(0, 77, 64, 0.12);
}

.stat-row b {
  display: block;
  font-size: 1.6rem;
  line-height: 1.2;
  color: var(--home-teal);
  font-variant-numeric: tabular-nums;
}

.stat-row span {
  font-size: 0.88rem;
  color: var(--home-muted);
}

/* Hub pages: a grid of article cards */
.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 1rem;
  margin: 1.5rem 0 2rem;
  padding: 0;
  list-style: none;
}

.guide-grid li {
  display: flex;
}

.guide-grid a {
  display: grid;
  align-content: start;
  gap: 0.4rem;
  width: 100%;
  padding: 1.1rem 1.2rem;
  border-radius: 14px;
  border: 1px solid rgba(0, 77, 64, 0.12);
  background: #fff;
  color: var(--home-text);
  text-decoration: none;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.guide-grid a:hover,
.guide-grid a:focus-visible {
  box-shadow: 0 8px 22px rgba(0, 77, 64, 0.14);
  transform: translateY(-2px);
}

.guide-grid strong {
  font-size: 1.05rem;
  color: var(--home-teal);
}

.guide-grid span {
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--home-muted);
}

.guide-grid time,
.guide-grid .guide-grid-kicker {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--home-teal-light);
}

/* Previous / next article */
.guide-pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 2.5rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(0, 77, 64, 0.12);
}

.guide-pager a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 500;
}

/* FAQ with native <details> */
.faq details {
  border-bottom: 1px solid rgba(0, 77, 64, 0.12);
}

.faq summary {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0.6rem 0;
  font-weight: 500;
  color: var(--home-text);
  cursor: pointer;
}

.faq details[open] summary {
  color: var(--home-teal);
}

.faq details p {
  margin-top: 0;
}

/* Glossary */
.glossary dt {
  margin-top: 1.25rem;
  font-weight: 700;
  color: var(--home-text);
  scroll-margin-top: calc(var(--header-h) + 1rem);
}

.glossary dt small {
  font-weight: 400;
  color: var(--home-muted);
}

.glossary dd {
  margin: 0.3rem 0 0;
  color: var(--home-muted);
  line-height: 1.7;
}

.glossary-index {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
}

.glossary-index a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 0.7rem;
  border-radius: 999px;
  background: rgba(0, 77, 64, 0.07);
  text-decoration: none;
  font-size: 0.9rem;
}

/* Legal pages: plain long text */
.legal-article h2 {
  font-size: 1.2rem;
}

.legal-article h3 {
  font-size: 1.02rem;
}

@media (max-width: 600px) {
  .pc {
    min-width: 2.1rem;
    height: 2.8rem;
    font-size: 0.98rem;
  }

  .data-table th,
  .data-table td {
    padding: 0.5rem 0.65rem;
  }

  .stat-row b {
    font-size: 1.35rem;
  }
}

@media (max-width: 480px) {
  .guide-toc {
    padding: 0.85rem 1rem;
  }

  .pc {
    min-width: 1.95rem;
    height: 2.6rem;
    padding: 0 0.2rem;
    font-size: 0.92rem;
  }

  .hand {
    gap: 0.25rem;
  }

  .data-table {
    font-size: 0.88rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .guide-grid a {
    transition: none;
  }

  .guide-grid a:hover,
  .guide-grid a:focus-visible {
    transform: none;
  }
}

/* Home page: guides, tools and the latest news */
#guides > h3,
#vodici > h3 {
  margin: 2rem 0 0;
  text-align: center;
  font-size: 1.25rem;
  color: var(--home-teal);
}

#guides .rules-more,
#vodici .rules-more {
  text-align: center;
}
