:root {
  --green: #2f9e44;
  --green-dark: #237a34;
  --green-soft: #e8f7ec;
  --ink: #222;
  --muted: #667085;
  --line: #e4e7ec;
  --bg: #f3f5f7;
  --white: #fff;
  --navy: #1f2937;
  --warn: #c2410c;
  --blue: #2563eb;
  --bad: #dc2626;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.08);
  --font: "Source Sans 3", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  font-size: 16px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
h1,h2,h3 { margin: 0 0 .55em; color: var(--navy); font-weight: 700; line-height: 1.2; }
h1 { font-size: clamp(1.6rem, 2.5vw, 2rem); }
h2 { font-size: 1.35rem; }
p { margin-top: 0; }
.container { width: min(1180px, calc(100% - 2rem)); margin-inline: auto; }
.narrow { width: min(720px, calc(100% - 2rem)); margin-inline: auto; }
.muted { color: var(--muted); }

/* Header */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 64px;
}
.brand, .brand a { display: flex; align-items: center; text-decoration: none; }
.brand img, .brand-logo, .custom-logo { height: 40px; width: auto; }
.custom-logo-link { display: flex; }
.primary-nav { flex: 1; }
.menu {
  display: flex; gap: 1.25rem; list-style: none; margin: 0; padding: 0;
}
.menu a {
  color: var(--navy); font-weight: 600; font-size: .95rem; text-decoration: none;
}
.menu a:hover { color: var(--green); }
.header-actions { display: flex; align-items: center; gap: .6rem; }
.hdr-link { color: var(--navy); font-weight: 600; font-size: .92rem; text-decoration: none; }
.header-search {
  display: flex; align-items: center;
  background: var(--bg); border: 1px solid var(--line); border-radius: 6px; overflow: hidden;
}
.header-search input {
  border: 0; outline: 0; background: transparent; padding: .45rem .7rem; width: 140px; font: inherit;
}
.header-search button {
  border: 0; background: transparent; padding: .45rem .65rem; cursor: pointer; color: var(--muted); display: flex;
}
.nav-toggle {
  display: none; margin-left: auto; width: 40px; height: 40px;
  border: 1px solid var(--line); background: var(--white); border-radius: 6px; cursor: pointer; padding: 9px;
}
.nav-toggle span { display: block; height: 2px; background: var(--navy); margin: 5px 0; }

/* Buttons — guru style */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font: inherit; font-weight: 700; border-radius: 6px; border: 1px solid transparent;
  padding: .55rem 1rem; cursor: pointer; text-decoration: none !important; white-space: nowrap;
}
.btn--visit {
  background: var(--green); color: #fff !important; border-color: var(--green);
}
.btn--visit:hover { background: var(--green-dark); }
.btn--review {
  background: var(--white); color: var(--navy) !important; border-color: var(--line);
}
.btn--review:hover { border-color: #c0c6d0; background: #fafafa; }
.btn--sm { padding: .4rem .85rem; font-size: .9rem; }
.btn--block { width: 100%; }
.text-link { font-weight: 700; color: var(--green-dark); white-space: nowrap; }

/* Intro / stats */
.intro-bar {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  padding: 1.5rem 0 1.25rem;
}
.intro-bar h1 { margin-bottom: .4rem; }
.intro-bar p { margin: 0; color: var(--muted); max-width: 720px; }
.intro-bar--compact { padding: 1.1rem 0; }
.stats-strip { background: var(--white); border-bottom: 1px solid var(--line); padding: .85rem 0 1.1rem; }
.stats-strip__grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem;
}
.stat-pill {
  display: flex; flex-direction: column; gap: .1rem;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: .75rem .9rem; text-decoration: none !important; color: inherit;
}
.stat-pill:hover { border-color: #c5cdd8; }
.stat-pill strong { font-size: 1.25rem; color: var(--green-dark); }
.stat-pill span { font-size: .85rem; color: var(--muted); }

/* Sections / layout */
.section { padding: 1.75rem 0 2.25rem; }
.section--tight { padding-top: 1.35rem; }
.section--gray { background: var(--white); border-block: 1px solid var(--line); }
.section-head { margin-bottom: 1rem; }
.section-head p { margin: 0; color: var(--muted); }
.section-head--row {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap;
}
.layout-main {
  display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 1.25rem; align-items: start;
}

/* Ranking list — core casino.guru pattern */
.rank-list {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.rank-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1.35fr) minmax(0, 1.2fr) auto;
  gap: .85rem;
  align-items: center;
  padding: .85rem 1rem;
  border-top: 1px solid var(--line);
  background: var(--white);
}
.rank-row:first-child { border-top: 0; }
.rank-row:hover { background: #fafbfc; }
.rank-row__pos {
  font-weight: 700; color: var(--muted); text-align: center; font-size: 1.05rem;
}
.rank-row__brand { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.brand-tile {
  width: 52px; height: 52px; border-radius: 8px; flex-shrink: 0;
  background: var(--tile, var(--green));
  color: #fff; display: grid; place-items: center;
  font-weight: 800; font-size: 1rem; letter-spacing: .02em;
}
.brand-tile--lg { width: 72px; height: 72px; font-size: 1.35rem; border-radius: 10px; }
.rank-row__info { min-width: 0; display: grid; gap: .35rem; }
.rank-row__title {
  color: var(--navy); font-weight: 700; font-size: 1.05rem; text-decoration: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rank-row__title:hover { color: var(--green-dark); }
.rank-row__bonus { min-width: 0; }
.rank-row__bonus-label {
  display: block; font-size: .75rem; color: var(--muted); text-transform: uppercase;
  letter-spacing: .04em; font-weight: 600; margin-bottom: .15rem;
}
.rank-row__bonus strong {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; font-size: .92rem; font-weight: 600; color: var(--ink);
}
.rank-row__actions { display: flex; gap: .45rem; justify-content: flex-end; }

/* Safety Index */
.safety-index {
  display: inline-flex; align-items: center; gap: .45rem;
}
.safety-index__value {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 2.1rem; height: 2.1rem; padding: 0 .35rem;
  border-radius: 6px; color: #fff; font-weight: 800; font-size: .95rem;
  background: var(--green);
}
.safety-index__meta { display: none; line-height: 1.15; }
.safety-index--md .safety-index__meta,
.safety-index--lg .safety-index__meta { display: grid; }
.safety-index--md .safety-index__name,
.safety-index--lg .safety-index__name {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700;
}
.safety-index--md .safety-index__label,
.safety-index--lg .safety-index__label {
  font-size: .88rem; font-weight: 700; color: var(--navy);
}
.safety-index--md .safety-index__value { min-width: 2.6rem; height: 2.6rem; font-size: 1.15rem; }
.score--very-high, .score--very-high .safety-index__value, .si-circle.score--very-high, .mini-score.score--very-high, .dot.score--very-high { background: #1f9d55; }
.score--high, .score--high .safety-index__value, .si-circle.score--high, .mini-score.score--high, .dot.score--high { background: #2f9e44; }
.score--above, .score--above .safety-index__value, .si-circle.score--above, .mini-score.score--above, .dot.score--above { background: #74b816; }
.score--average, .score--average .safety-index__value, .si-circle.score--average, .mini-score.score--average, .dot.score--average { background: #f59f00; }
.score--low, .score--low .safety-index__value, .si-circle.score--low, .mini-score.score--low, .dot.score--low { background: #e03131; }

.si-circle {
  width: 110px; height: 110px; border-radius: 50%;
  display: grid; place-content: center; text-align: center; color: #fff;
  box-shadow: inset 0 0 0 6px rgba(255,255,255,.25);
}
.si-circle--xl { width: 120px; height: 120px; }
.si-circle__num { font-size: 2.2rem; font-weight: 800; line-height: 1; }
.si-circle__of { font-size: .85rem; opacity: .9; }
.mini-score {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 1.8rem; height: 1.5rem; padding: 0 .3rem; border-radius: 4px;
  color: #fff; font-size: .78rem; font-weight: 800;
}

/* Side boxes */
.side-box {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem 1.05rem; margin-bottom: .85rem; box-shadow: var(--shadow);
}
.side-box h3 { font-size: 1rem; margin-bottom: .5rem; }
.side-box p { color: var(--muted); font-size: .92rem; margin-bottom: .75rem; }
.side-box--green { background: var(--green-soft); border-color: #c6e6cf; }
.si-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; font-size: .88rem; }
.si-legend .dot {
  display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: .35rem; vertical-align: middle;
}

/* Complaints */
.complaint-filters {
  display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem;
}
.cf {
  background: var(--white); border: 1px solid var(--line); border-radius: 999px;
  padding: .35rem .8rem; font-size: .88rem; color: var(--muted);
  text-decoration: none !important; display: inline-flex; align-items: center; gap: .15rem;
}
.cf:hover { border-color: #c5cdd8; color: var(--navy); }
.pagination-wrap { margin-top: 1rem; }
.pagination-wrap .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 2rem; height: 2rem; margin-right: .25rem; padding: 0 .45rem;
  border: 1px solid var(--line); border-radius: 6px; background: var(--white);
  color: var(--navy); text-decoration: none; font-weight: 600; font-size: .9rem;
}
.pagination-wrap .page-numbers.current,
.pagination-wrap .page-numbers:hover { border-color: var(--green); color: var(--green-dark); }
.cf strong { color: var(--navy); margin-left: .2rem; }
.cf.is-active { border-color: var(--green); background: var(--green-soft); color: var(--green-dark); }
.complaint-toolbar { margin-bottom: 1rem; }
.complaint-list { display: grid; gap: .65rem; }
.review-complaints {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.85fr);
  gap: 1.25rem;
  align-items: start;
}
.review-complaints__form .panel { position: sticky; top: 80px; }
.form-locked-book {
  margin: 0;
  padding: .65rem .8rem;
  background: var(--green-soft);
  border: 1px solid #c6e6cf;
  border-radius: 6px;
  font-size: .92rem;
}
.complaint-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: .95rem 1.05rem; box-shadow: var(--shadow);
}
.complaint-card__top {
  display: flex; justify-content: space-between; gap: .75rem;
  margin-bottom: .4rem; font-size: .82rem; color: var(--muted);
}
.complaint-card h3 { font-size: 1.05rem; margin-bottom: .3rem; }
.complaint-card h3 a { color: var(--navy); text-decoration: none; }
.complaint-card h3 a:hover { color: var(--green-dark); }
.complaint-card p { margin: 0; color: var(--muted); font-size: .92rem; }
.complaint-card__meta {
  display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-top: .7rem; font-size: .88rem;
}
.complaint-card__book {
  display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; color: var(--navy); text-decoration: none;
}
.status {
  display: inline-flex; align-items: center; border-radius: 999px;
  padding: .15rem .55rem; font-size: .75rem; font-weight: 700; border: 1px solid transparent;
}
.status--open { background: #fff7ed; color: var(--warn); border-color: #ffedd5; }
.status--in_progress { background: #eff6ff; color: var(--blue); border-color: #dbeafe; }
.status--resolved { background: var(--green-soft); color: var(--green-dark); border-color: #c6e6cf; }
.status--rejected { background: #fef2f2; color: var(--bad); border-color: #fecaca; }

/* Review page */
.review-top {
  background: var(--white); border-bottom: 1px solid var(--line); padding: 1.5rem 0;
}
.review-top__grid {
  display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 1.25rem; align-items: start;
}
.review-top__brand { display: flex; gap: 1rem; align-items: center; margin-bottom: .85rem; }
.crumb { margin: 0 0 .35rem; font-size: .85rem; color: var(--muted); }
.review-excerpt { color: var(--muted); max-width: 48rem; }
.fact-row {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .65rem; margin-top: 1rem;
}
.fact-row div {
  background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: .65rem .75rem;
}
.product-flags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .85rem; }
.flag {
  display: inline-flex; align-items: center; border-radius: 999px;
  padding: .25rem .65rem; font-size: .78rem; font-weight: 700;
  background: var(--bg); border: 1px solid var(--line); color: var(--navy);
}
.flag--yes { background: var(--green-soft); border-color: #c6e6cf; color: var(--green-dark); }
.info-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.info-table th, .info-table td {
  text-align: left; vertical-align: top; padding: .55rem .35rem;
  border-bottom: 1px solid var(--line);
}
.info-table th { width: 34%; color: var(--muted); font-weight: 600; }
.info-table td { color: var(--ink); }
.review-top__card {
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  padding: 1.1rem; display: grid; justify-items: center; gap: .65rem; text-align: center;
}
.si-caption { margin: 0; font-size: .92rem; color: var(--muted); }
.player-score { margin: 0; font-size: .9rem; }
.complaint-link { font-size: .88rem; font-weight: 600; }

.review-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 1.25rem; align-items: start;
}
.panel {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.1rem 1.2rem; margin-bottom: .85rem; box-shadow: var(--shadow);
}
.panel--pros { border-top: 3px solid var(--green); }
.panel--cons { border-top: 3px solid var(--bad); }
.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: .85rem; }
.feature-list { margin: 0; padding-left: 1.1rem; display: grid; gap: .35rem; }
.feature-list--pros li::marker { color: var(--green); }
.feature-list--cons li::marker { color: var(--bad); }
.facts { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .7rem; }
.facts li { display: grid; gap: .15rem; }
.facts span { color: var(--muted); font-size: .82rem; }
.sticky-panel { position: sticky; top: 80px; }
.rating-bars { display: grid; gap: .75rem; }
.rating-bar__top { display: flex; justify-content: space-between; font-size: .9rem; margin-bottom: .25rem; }
.rating-bar__track { height: 7px; background: #e9edf2; border-radius: 999px; overflow: hidden; }
.rating-bar__track span { display: block; height: 100%; background: var(--green); }

.review-list { display: grid; gap: .65rem; margin-bottom: 1rem; }
.review-card {
  border: 1px solid var(--line); border-radius: 6px; padding: .85rem .95rem; background: #fafbfc;
}
.review-card__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .35rem; }
.review-card time { color: var(--muted); font-size: .8rem; }

/* Forms / pages */
.page-hero, .content-card { /* legacy aliases */ }
.content-card, .notice-box {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.1rem 1.2rem; box-shadow: var(--shadow); margin-bottom: 1rem;
}
.complaint-form, .comment-form { display: grid; gap: .8rem; }
.complaint-form label, .comment-form label { display: grid; gap: .3rem; font-weight: 600; }
.complaint-form label em, .book-picker__label em { color: #dc2626; font-style: normal; }
.complaint-form input, .complaint-form select, .complaint-form textarea,
.comment-form input, .comment-form textarea,
.book-picker__search {
  font: inherit; border: 1px solid var(--line); border-radius: 6px; padding: .7rem .8rem; background: var(--white);
}
.form-note { color: var(--muted); font-size: .88rem; }
.notice-box--error { background: #fef2f2; border-color: #fecaca; color: var(--bad); }
.notice-box--ok { background: var(--green-soft); border-color: #c6e6cf; color: var(--green-dark); }

.book-picker { display: grid; gap: .35rem; }
.book-picker__label { font-weight: 600; color: var(--navy); }
.book-picker__list {
  list-style: none; margin: 0; padding: .35rem;
  max-height: 220px; overflow: auto;
  border: 1px solid var(--line); border-radius: 6px; background: var(--white);
  box-shadow: var(--shadow);
}
.book-picker__list li { margin: 0; }
.book-picker__option {
  width: 100%; text-align: left; border: 0; background: transparent;
  padding: .55rem .65rem; border-radius: 4px; cursor: pointer; font: inherit;
}
.book-picker__option:hover, .book-picker__option:focus {
  background: var(--green-soft); outline: none;
}
.book-picker__selected { margin: 0; font-size: .9rem; font-weight: 600; color: var(--green-dark); }
.search-results { display: grid; gap: .75rem; }

/* Footer */
.site-footer {
  background: #1a1f26; color: rgba(255,255,255,.78); padding: 2.5rem 0 1.25rem; margin-top: 1rem;
}
.site-footer a { color: #8fdf9f; }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr .8fr .8fr; gap: 1.5rem; margin-bottom: 1.5rem;
}
.footer-logo {
  height: 42px; width: auto; margin-bottom: .75rem;
  background: #fff; border-radius: 6px; padding: .3rem .5rem;
}
.site-footer h3 { color: #fff; font-size: .95rem; }
.site-footer ul, .footer-menu { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1); padding-top: .9rem;
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .88rem;
}
.age-badge strong {
  display: inline-flex; width: 1.7rem; height: 1.7rem; align-items: center; justify-content: center;
  border-radius: 50%; background: #e11d48; color: #fff; margin-right: .35rem; font-size: .75rem;
}

@media (max-width: 980px) {
  .stats-strip__grid { grid-template-columns: 1fr 1fr; }
  .layout-main, .review-top__grid, .review-layout, .footer-grid, .pros-cons, .review-complaints { grid-template-columns: 1fr; }
  .review-complaints__form .panel { position: static; }
  .fact-row { grid-template-columns: 1fr 1fr; }
  .rank-row {
    grid-template-columns: 28px 1fr;
    grid-template-areas:
      "pos brand"
      "pos bonus"
      "pos actions";
  }
  .rank-row__pos { grid-area: pos; }
  .rank-row__brand { grid-area: brand; }
  .rank-row__bonus { grid-area: bonus; }
  .rank-row__actions { grid-area: actions; justify-content: flex-start; }
  .sticky-panel { position: static; }
  .nav-toggle { display: inline-block; }
  .primary-nav, .header-actions { display: none; }
  body.nav-open .primary-nav,
  body.nav-open .header-actions {
    display: flex; flex-direction: column; align-items: stretch;
    position: absolute; left: 1rem; right: 1rem; top: 64px;
    background: var(--white); border: 1px solid var(--line); border-radius: 8px;
    padding: .9rem; box-shadow: var(--shadow);
  }
  body.nav-open .header-actions { top: 200px; }
  body.nav-open .menu { flex-direction: column; gap: .75rem; }
  .header-inner { position: relative; }
  .header-search input { width: 100%; }
}

@media (max-width: 560px) {
  .stats-strip__grid, .fact-row { grid-template-columns: 1fr; }
  .rank-row__actions { flex-wrap: wrap; }
}
