/* ByJTT Experiments hub — mobile-first styles */
html, body {
  margin: 0;
  padding: 0;
  background: #faf8ef;
  color: #776e65;
  font-family: "Clear Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 18px; }

body { margin: 40px 0; }

.container {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box; }

.heading { margin-bottom: 24px; }

h1.title {
  font-size: 44px;
  font-weight: bold;
  margin: 0; }

.title-accent { color: #bbada0; }

.tagline {
  margin: 8px 0 0;
  color: #a0948a;
  font-size: 16px; }

.game-list {
  display: flex;
  flex-direction: column;
  gap: 16px; }

.game-card {
  display: block;
  background: #fff;
  border: 2px solid #eee4da;
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  color: #776e65;
  transition: border-color 150ms ease, transform 150ms ease; }
  .game-card:hover, .game-card:focus-visible {
    border-color: #bbada0;
    transform: translateY(-2px); }
  .game-card:focus-visible { outline: 3px solid #f2b179; }

.card-thumb {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center; }

.card-thumb-text {
  font-size: 56px;
  font-weight: bold;
  color: #f9f6f2;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.25); }

.card-body { padding: 16px; }

.card-title {
  margin: 0 0 6px;
  font-size: 22px;
  color: #776e65; }

.card-desc {
  margin: 0 0 10px;
  line-height: 1.55;
  font-size: 15px;
  color: #a0948a; }

.card-meta {
  font-size: 13px;
  color: #bbada0;
  text-transform: uppercase;
  letter-spacing: 0.04em; }

.game-card-empty { border-style: dashed; }

p { line-height: 1.65; }

a { color: #776e65; font-weight: bold; }

strong.important { text-transform: uppercase; }

hr {
  border: none;
  border-bottom: 1px solid #d8d4d0;
  margin-top: 28px;
  margin-bottom: 28px; }

.game-explanation { margin-top: 0; }

/* ---- Mobile-first navigation: X.com-style bottom tab bar ---- */
.tab-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  background: rgba(250, 248, 239, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-top: 1px solid #eee4da;
  padding-bottom: env(safe-area-inset-bottom); }

.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 0 6px;
  color: #a0948a;
  text-decoration: none;
  font-weight: 600;
  transition: color 150ms ease; }
  .tab-item:hover, .tab-item:focus-visible { color: #776e65; }
  .tab-item.is-active { color: #e8834a; }  /* accent like X's active tab */
  .tab-item.is-active .tab-label { color: #776e65; }
  .tab-item:focus-visible { outline: 3px solid #f2b179; outline-offset: -3px; border-radius: 8px; }

.tab-icon {
  width: 24px;
  height: 24px; }

.tab-label {
  font-size: 11px;
  line-height: 1; }

/* content padding so nothing hides behind the fixed bar */
body { padding-bottom: 64px; }

/* Desktop: tabs stay at the bottom (X keeps bottom nav on web too) */
@media (min-width: 641px) {
  .tab-bar { max-width: 640px; left: 50%; transform: translateX(-50%); border-radius: 14px 14px 0 0; }
  .tab-item { padding: 10px 0 8px; }
  .tab-icon { width: 26px; height: 26px; }
}

/* ---- Search (Pagefind) ---- */
.search-wrap {
  max-width: 640px;
  margin: 12px auto 0;
  padding: 0 20px; }

.search-trigger {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid #eee4da;
  border-radius: 8px;
  background: #fff;
  color: #a0948a;
  font-family: inherit;
  font-size: 15px;
  text-align: left;
  cursor: pointer; }
  .search-trigger:hover { border-color: #bbada0; }

/* Pagefind UI overrides — mobile-first */
.pagefind-ui { max-width: 640px; margin: 0 auto; padding: 0 20px; }
.pagefind-ui__search-clear, .pagefind-ui__search-input { border-radius: 8px !important; }
.pagefind-ui__result { padding: 10px 0 !important; }
.pagefind-ui__result-title { font-weight: bold !important; }

/* ---- Principles (mobile-first grid) ---- */
.principles { margin-top: 4px; }

.principles-title {
  font-size: 24px;
  margin: 0 0 14px; }

.principles-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px; }

.principle {
  background: #fff;
  border: 2px solid #eee4da;
  border-radius: 8px;
  padding: 14px 16px; }
  .principle h3 {
    margin: 0 0 6px;
    font-size: 17px; }
  .principle p {
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
    color: #a0948a; }

.principles-note {
  margin-top: 14px;
  font-size: 13px;
  color: #a0948a; }

@media (min-width: 641px) {
  .principles-grid { grid-template-columns: 1fr 1fr; }
}
