/* ==========================================================================
   Winston Salem Blackjack - main stylesheet

   Naming convention (project rule, follow it everywhere):

     wsb-<block>__<element>--<modifier>

   - Every class starts with the "wsb-" namespace so nothing collides with
     third-party embeds or a future widget dropped on the page.
   - Blocks are nouns    : wsb-card, wsb-table, wsb-nav
   - Elements use "__"   : wsb-card__title
   - Modifiers use "--"  : wsb-card--featured
   - State classes are separate and always boolean: is-open, is-hidden.
   - JavaScript never hooks onto a styling class. JS uses "js-" classes or
     data-* attributes, so restyling can never break behaviour.
   - IDs are only used for anchor targets and form label bindings and are
     written as wsb-<page>-<thing>, e.g. #wsb-home-list.

   Sections below follow the page order: tokens, base, layout, components.
   ========================================================================== */

/* --- Design tokens -------------------------------------------------------- */
:root {
  --wsb-ink: #10161c;
  --wsb-ink-soft: #46535f;
  --wsb-paper: #f4f2ed;
  --wsb-surface: #ffffff;
  --wsb-line: #d9d5cb;
  --wsb-felt: #12502f;
  --wsb-felt-dark: #0c3a22;
  --wsb-brass: #b98a2f;
  --wsb-warn: #8c2f2f;

  --wsb-radius: 10px;
  --wsb-shadow: 0 1px 2px rgba(16, 22, 28, 0.06), 0 8px 24px rgba(16, 22, 28, 0.06);
  --wsb-wrap: 1120px;
  --wsb-font: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --wsb-font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

/* --- Base ----------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--wsb-paper);
  color: var(--wsb-ink);
  font-family: var(--wsb-font-ui);
  font-size: 17px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

h1,
h2,
h3 {
  font-family: var(--wsb-font);
  line-height: 1.2;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
}

h3 {
  font-size: 1.2rem;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--wsb-felt);
}

a:hover {
  color: var(--wsb-felt-dark);
}

img,
svg {
  max-width: 100%;
}

/* Skip link - keyboard users land on the content, not the nav, every time. */
.wsb-skip {
  position: absolute;
  left: -9999px;
}

.wsb-skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 50;
  background: var(--wsb-surface);
  padding: 0.6rem 1rem;
  border-radius: var(--wsb-radius);
}

/* --- Layout --------------------------------------------------------------- */
.wsb-wrap {
  width: 100%;
  max-width: var(--wsb-wrap);
  margin: 0 auto;
  padding: 0 20px;
}

.wsb-section {
  padding: 56px 0;
}

.wsb-section--tight {
  padding: 32px 0;
}

.wsb-prose {
  max-width: 68ch;
}

.wsb-prose ul {
  padding-left: 1.2em;
}

.wsb-prose li {
  margin-bottom: 0.4em;
}

/* --- Age gate strip ------------------------------------------------------- */
.wsb-agebar {
  background: var(--wsb-warn);
  color: #fff;
  font-size: 0.86rem;
  letter-spacing: 0.02em;
}

.wsb-agebar__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: center;
  padding: 9px 20px;
  text-align: center;
}

.wsb-agebar__badge {
  border: 2px solid #fff;
  border-radius: 999px;
  padding: 0 8px;
  font-weight: 700;
}

.wsb-agebar a {
  color: #fff;
}

/* --- Header --------------------------------------------------------------- */
.wsb-head {
  background: var(--wsb-felt);
  color: #fff;
}

.wsb-head__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.wsb-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-family: var(--wsb-font);
  font-size: 1.15rem;
  line-height: 1.15;
}

.wsb-logo__mark {
  width: 34px;
  height: 34px;
  flex: none;
}

.wsb-logo__sub {
  display: block;
  font-family: var(--wsb-font-ui);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.75;
}

.wsb-nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.wsb-nav__link {
  color: #fff;
  text-decoration: none;
  font-size: 0.95rem;
  opacity: 0.88;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}

.wsb-nav__link:hover,
.wsb-nav__link--current {
  color: #fff;
  opacity: 1;
  border-bottom-color: var(--wsb-brass);
}

.wsb-nav__toggle {
  display: none;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: #fff;
  border-radius: 8px;
  padding: 7px 11px;
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}

/* --- Hero ----------------------------------------------------------------- */
.wsb-hero {
  background: linear-gradient(180deg, var(--wsb-felt) 0%, var(--wsb-felt-dark) 100%);
  color: #fff;
  padding: 52px 0 60px;
}

.wsb-hero__lead {
  font-size: 1.1rem;
  max-width: 60ch;
  opacity: 0.92;
}

.wsb-hero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
}

.wsb-hero__fact {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.9rem;
}

/* --- Disclosure ----------------------------------------------------------- */
.wsb-disclosure {
  background: #fff6df;
  border: 1px solid #e6d2a0;
  border-radius: var(--wsb-radius);
  padding: 14px 16px;
  font-size: 0.92rem;
  margin: 24px 0 0;
}

/* --- Filter bar ----------------------------------------------------------- */
.wsb-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  background: var(--wsb-surface);
  border: 1px solid var(--wsb-line);
  border-radius: var(--wsb-radius);
  padding: 14px 16px;
  margin-bottom: 22px;
}

.wsb-filter__field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.82rem;
  color: var(--wsb-ink-soft);
}

.wsb-filter__control {
  font: inherit;
  font-size: 0.95rem;
  padding: 8px 10px;
  border: 1px solid var(--wsb-line);
  border-radius: 8px;
  background: #fff;
  color: var(--wsb-ink);
  min-width: 190px;
}

.wsb-filter__count {
  margin-left: auto;
  font-size: 0.88rem;
  color: var(--wsb-ink-soft);
}

/* --- Casino card ---------------------------------------------------------- */
.wsb-list {
  display: grid;
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.wsb-card {
  display: grid;
  /* Rank badge on the left, content, then the score/action column. */
  grid-template-columns: 64px 1fr 200px;
  gap: 20px;
  background: var(--wsb-surface);
  border: 1px solid var(--wsb-line);
  border-radius: var(--wsb-radius);
  box-shadow: var(--wsb-shadow);
  padding: 18px 20px;
  align-items: center;
}

.wsb-card--featured {
  border-color: var(--wsb-brass);
  box-shadow: 0 0 0 1px var(--wsb-brass), var(--wsb-shadow);
}

.wsb-card__brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.wsb-card__rank {
  font-family: var(--wsb-font);
  font-size: 1.3rem;
  line-height: 1;
  color: var(--wsb-brass);
}

.wsb-card__title {
  margin: 0 0 4px;
}

.wsb-card__licence {
  font-size: 0.85rem;
  color: var(--wsb-ink-soft);
  margin: 0 0 10px;
}

.wsb-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
}

.wsb-card__tag {
  background: #eef1ec;
  border: 1px solid var(--wsb-line);
  border-radius: 999px;
  font-size: 0.8rem;
  padding: 3px 10px;
}

.wsb-card__note {
  font-size: 0.93rem;
  margin: 0;
  color: var(--wsb-ink-soft);
}

.wsb-card__side {
  text-align: center;
}

.wsb-card__score {
  font-family: var(--wsb-font);
  font-size: 2rem;
  line-height: 1;
}

.wsb-card__score-label {
  display: block;
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--wsb-ink-soft);
  margin-bottom: 10px;
}

/* --- Buttons -------------------------------------------------------------- */
.wsb-btn {
  display: inline-block;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px 18px;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.wsb-btn--primary {
  background: var(--wsb-felt);
  color: #fff;
}

.wsb-btn--primary:hover {
  background: var(--wsb-felt-dark);
  color: #fff;
}

.wsb-btn--ghost {
  background: transparent;
  border-color: var(--wsb-line);
  color: var(--wsb-ink);
}

.wsb-btn--block {
  display: block;
  width: 100%;
}

.wsb-btn__sub {
  display: block;
  margin-top: 6px;
  font-size: 0.76rem;
  font-weight: 400;
  color: var(--wsb-ink-soft);
}

.wsb-btn--primary .wsb-btn__sub {
  /* The muted grey is unreadable on the felt green button. */
  color: rgba(255, 255, 255, 0.78);
}

/* --- Generic panels ------------------------------------------------------- */
.wsb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.wsb-panel {
  background: var(--wsb-surface);
  border: 1px solid var(--wsb-line);
  border-radius: var(--wsb-radius);
  padding: 20px;
}

.wsb-panel--quiet {
  background: transparent;
  box-shadow: none;
}

.wsb-callout {
  border-left: 4px solid var(--wsb-warn);
  background: #fdf1f1;
  padding: 16px 18px;
  border-radius: 0 var(--wsb-radius) var(--wsb-radius) 0;
}

.wsb-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--wsb-surface);
  border: 1px solid var(--wsb-line);
  border-radius: var(--wsb-radius);
  overflow: hidden;
  font-size: 0.93rem;
}

.wsb-table th,
.wsb-table td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--wsb-line);
  vertical-align: top;
}

.wsb-table th {
  background: #eef1ec;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

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

/* --- Footer --------------------------------------------------------------- */
.wsb-foot {
  background: var(--wsb-ink);
  color: #c8d0d6;
  padding: 44px 0 28px;
  font-size: 0.92rem;
}

.wsb-foot a {
  color: #fff;
}

.wsb-foot__cols {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
}

.wsb-foot__title {
  color: #fff;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 10px;
}

.wsb-foot__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 7px;
}

.wsb-foot__orgs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.85rem;
}

.wsb-foot__legal {
  margin-top: 18px;
  font-size: 0.82rem;
  color: #93a0a8;
}

/* --- Responsive ----------------------------------------------------------- */
@media (max-width: 900px) {
  .wsb-card {
    grid-template-columns: 48px 1fr;
  }

  .wsb-card__side {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    text-align: left;
  }

  .wsb-card__side .wsb-btn {
    flex: 1;
    text-align: center;
  }

  .wsb-foot__cols {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .wsb-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 2px;
    padding-bottom: 10px;
  }

  .wsb-nav.is-open {
    display: flex;
  }

  .wsb-nav__toggle {
    display: block;
  }

  .wsb-head__inner {
    flex-wrap: wrap;
  }

  .wsb-card {
    grid-template-columns: 1fr;
  }


  .wsb-foot__cols {
    grid-template-columns: 1fr;
  }

  .wsb-filter__control {
    min-width: 0;
    width: 100%;
  }

  .wsb-filter__field {
    flex: 1 1 100%;
  }
}
