/* Shared styles for the content pages: /learn/*, /play-with-friends/,
   /faq/, /american-mahjong-apps/, and the lower half of the home page.
   Same tokens and fonts as the link landing pages (index.html, 404.html,
   support/), which keep their own inline styles. */

@font-face {
  font-family: 'TAY Barro';
  src: url('/assets/fonts/TAYBarro.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/assets/fonts/Inter-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/assets/fonts/Inter-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/assets/fonts/Inter-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --cream: #F2E8D5;
  --navy: #1A1A2E;
  --cobalt: #536AFA;
  --pink: #FB79B9;
  --dim: #5A5F72;
  --card: #FFFFFF;
  --line: rgba(26, 26, 46, 0.12);
  --tint: rgba(83, 106, 250, 0.10);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body.content {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--cream);
  color: var(--navy);
  font-size: 16px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ---- Header ---- */
.site-header {
  padding: 18px 0 8px;
}
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--navy);
}
.brand img { width: 30px; height: auto; display: block; }
.brand img.wordmark { width: auto; height: 28px; }
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
}
.site-nav a {
  color: var(--navy);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  padding: 10px 0;
}
.site-nav a[aria-current="page"] { color: var(--cobalt); }

/* ---- Article ---- */
main.article { padding-top: 24px; padding-bottom: 8px; }
.crumbs {
  font-size: 13px;
  color: var(--dim);
  margin-bottom: 10px;
}
.crumbs a { color: var(--dim); }
h1 {
  font-family: 'TAY Barro', 'Inter', -apple-system, sans-serif;
  font-weight: normal;
  font-size: 36px;
  line-height: 1.15;
  letter-spacing: -0.3px;
}
.lede {
  font-size: 18px;
  line-height: 1.55;
  color: var(--dim);
  margin-top: 12px;
}
.updated {
  font-size: 13px;
  color: var(--dim);
  margin-top: 10px;
}
/* "The short answer": the paragraph a reader (or an assistant) can quote
   on its own. Every guide opens with one. */
.answer {
  background: var(--card);
  border-radius: 16px;
  padding: 18px 20px;
  margin: 24px 0 8px;
}
.answer .label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--cobalt);
  margin-bottom: 6px;
}
h2 {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.2px;
  margin-top: 36px;
}
h3 {
  font-size: 17px;
  font-weight: 700;
  margin-top: 24px;
}
.article p, .article ul, .article ol { margin-top: 12px; }
.article ul, .article ol { padding-left: 22px; }
.article li { margin-top: 6px; }
.article a { color: var(--cobalt); font-weight: 600; text-decoration: none; }
.article a:hover { text-decoration: underline; }
strong { font-weight: 700; }

.note {
  font-size: 14px;
  color: var(--dim);
  border-left: 3px solid var(--pink);
  padding: 2px 0 2px 14px;
  margin-top: 16px;
}

/* ---- Tables ---- */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 16px;
  border-radius: 14px;
  background: var(--card);
}
table {
  border-collapse: collapse;
  width: 100%;
  min-width: 980px;
  font-size: 14px;
  line-height: 1.45;
}
th, td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
thead th { font-weight: 700; background: #EEF0FE; }
tbody th { font-weight: 700; background: var(--card); }
tr:last-child td, tr:last-child th { border-bottom: none; }
/* The app column stays put while the rest scrolls sideways on a phone.
   Sticky cells need opaque fills, so these are the tints pre-mixed on white. */
th[scope="row"], thead th:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 120px;
  box-shadow: 1px 0 0 var(--line);
}
td.us, th.us { background: #FEEFF6; }

/* ---- FAQ ---- */
.faq details {
  background: var(--card);
  border-radius: 14px;
  padding: 0 18px;
  margin-top: 10px;
}
.faq summary {
  cursor: pointer;
  font-weight: 700;
  padding: 16px 0;
  list-style: none;
  min-height: 44px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; float: right; color: var(--cobalt); font-weight: 700; }
.faq details[open] summary::after { content: '–'; }
.faq details > *:not(summary) { margin-top: 0; padding-bottom: 16px; }

/* ---- Cards (home page + hub) ---- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.tile-card {
  background: var(--card);
  border-radius: 16px;
  padding: 18px;
  display: block;
  color: var(--navy) !important;
  text-decoration: none !important;
}
.tile-card h3 { margin-top: 0; }
.tile-card p { margin-top: 6px; font-size: 15px; color: var(--dim); font-weight: 400; }
.tile-card .more { display: inline-block; margin-top: 10px; color: var(--cobalt); font-weight: 600; font-size: 14px; }

/* ---- Call to action ---- */
.cta {
  background: var(--navy);
  color: var(--cream);
  border-radius: 20px;
  padding: 24px;
  margin: 40px 0 8px;
  text-align: center;
}
.cta p { color: rgba(242, 232, 213, 0.85); margin-top: 6px; }
.cta .cta-title {
  font-family: 'TAY Barro', 'Inter', -apple-system, sans-serif;
  font-size: 24px;
  line-height: 1.2;
  color: var(--cream);
  margin-top: 0;
}
.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none !important;
  margin-top: 16px;
  min-height: 44px;
}
.btn-primary { background: var(--cobalt); color: #fff !important; }

/* ---- Footer ---- */
.site-footer {
  padding: 32px 0 40px;
  font-size: 13px;
  color: var(--dim);
}
.site-footer .links { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.site-footer a { color: var(--cobalt); font-weight: 600; text-decoration: none; }
.site-footer .independence { margin-top: 14px; line-height: 1.5; max-width: 560px; }

@media (max-width: 480px) {
  h1 { font-size: 30px; }
  .lede { font-size: 17px; }
}
