/*
Theme Name: Moban 8-2-18
Description: Chủ đề WordPress tùy chỉnh cho trung tâm đánh giá game Bầu Cua Tôm Cá (Hoo Hey How) – bản sổ điểm phần trăm, phong cách phiếu ghi điểm nền giấy sáng.
Version: 1.0
Author: Moban82
Text Domain: moban82
*/

/* Google Fonts (Roboto Condensed + Be Vietnam Pro) are enqueued in functions.php — no @import here. */

/* ============================================================
   1. Design tokens — paper ledger + deep teal ink
   ============================================================ */
:root {
  --paper: #f5f1e6;
  --paper-deep: #ece5d2;
  --card: #fffdf7;
  --ink: #182420;
  --ink-soft: #47554f;
  --teal: #0c6b58;
  --teal-deep: #07463a;
  --amber: #e8a020;
  --stamp-red: #b3402e;
  --good: #1d7a4f;
  --line: rgba(24, 36, 32, 0.16);
  --radius: 4px;
  --shadow: 0 10px 24px rgba(24, 36, 32, 0.1);
  --font-display: 'Roboto Condensed', 'Be Vietnam Pro', sans-serif;
  --font-body: 'Be Vietnam Pro', 'Segoe UI', sans-serif;
  --wrap: 1160px;
}

/* ============================================================
   2. Reset & base
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    repeating-linear-gradient(0deg, rgba(24, 36, 32, 0.035) 0 1px, transparent 1px 32px),
    radial-gradient(ellipse 60% 30% at 100% 0, rgba(12, 107, 88, 0.07), transparent 60%);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--teal);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--stamp-red);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 0.55em;
}

h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.2rem); }
h3 { font-size: clamp(1.1rem, 2.3vw, 1.3rem); }

p {
  margin: 0 0 1.2em;
}

.wrap {
  width: min(var(--wrap), 92%);
  margin-inline: auto;
}

.section {
  padding: 3.2rem 0;
}

.section--tint {
  background: var(--paper-deep);
  border-block: 2px solid var(--ink);
}

.stamp {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--teal);
  border: 2px solid var(--ink);
  padding: 0.2rem 0.75rem;
  margin-bottom: 0.9rem;
  transform: rotate(-1.2deg);
}

.stamp--ghost {
  color: var(--teal);
  background: transparent;
  border: 2px dashed var(--teal);
}

.section-title {
  position: relative;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ============================================================
   3. Score tape + header + chips nav
   ============================================================ */
.score-tape {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.score-tape__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1.6rem;
  padding: 0.4rem 0;
}

.score-tape span::before {
  content: '▸ ';
  color: var(--amber);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--card);
  border-bottom: 2px solid var(--ink);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
}

.site-brand__logo {
  width: 46px;
  height: 46px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
}

.site-brand__name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.05;
}

.site-brand__tag {
  display: block;
  font-family: var(--font-body);
  font-size: 0.64rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--teal);
}

.site-nav--chips {
  display: none;
}

.site-nav__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav__link {
  display: block;
  padding: 0.42rem 0.9rem;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.site-nav__link:hover,
.site-nav__link:focus {
  background: var(--ink);
  color: var(--paper);
}

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 46px;
  height: 46px;
  padding: 12px;
  background: transparent;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  cursor: pointer;
}

.nav-toggle__bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--ink);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.site-nav--chips.is-open {
  display: block;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--card);
  border-bottom: 2px solid var(--ink);
  box-shadow: var(--shadow);
}

.site-nav--chips.is-open .site-nav__list {
  flex-direction: column;
  padding: 0.8rem 4%;
}

@media (min-width: 960px) {
  .site-nav--chips {
    display: block;
  }

  .nav-toggle {
    display: none;
  }
}

/* ============================================================
   4. Lede + overall total
   ============================================================ */
.lede {
  padding: 3.2rem 0 2.8rem;
  border-bottom: 2px solid var(--ink);
}

.lede__grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
  align-items: center;
}

@media (min-width: 900px) {
  .lede__grid {
    grid-template-columns: 1.6fr 0.8fr;
  }
}

.lede__lead {
  max-width: 60ch;
  color: var(--ink-soft);
}

.lede__total {
  border: 3px double var(--ink);
  background: var(--card);
  padding: 1.8rem 1.4rem;
  text-align: center;
  box-shadow: var(--shadow);
}

.lede__total-num {
  font-family: var(--font-display);
  font-size: 5rem;
  font-weight: 700;
  line-height: 1;
  color: var(--teal);
}

.lede__total-max {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--ink-soft);
}

.lede__total-tag {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--stamp-red);
  font-weight: 700;
}

/* ============================================================
   5. Scorecard matrix
   ============================================================ */
.score-matrix {
  display: grid;
  gap: 1.2rem;
  grid-template-columns: 1fr;
  margin-top: 1.8rem;
}

@media (min-width: 620px) {
  .score-matrix {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .score-matrix {
    grid-template-columns: repeat(3, 1fr);
  }
}

.scorecard {
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 1.3rem 1.25rem 1.4rem;
  box-shadow: 6px 6px 0 rgba(24, 36, 32, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.scorecard:hover {
  transform: translate(-2px, -2px);
  box-shadow: 9px 9px 0 rgba(24, 36, 32, 0.14);
}

.scorecard__top {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 0.7rem;
}

.scorecard__pct {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1;
  color: var(--teal);
  min-width: 86px;
}

.scorecard__pct small {
  font-size: 1.1rem;
}

.scorecard__track {
  flex: 1;
  height: 10px;
  background: var(--paper-deep);
  border: 1px solid var(--ink);
  border-radius: 999px;
  overflow: hidden;
}

.scorecard__fill {
  display: block;
  height: 100%;
  background: repeating-linear-gradient(45deg, var(--teal) 0 8px, var(--teal-deep) 8px 16px);
}

.scorecard__label {
  margin-bottom: 0.3rem;
}

.scorecard__note {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

/* ============================================================
   6. Meter ledger
   ============================================================ */
.ledger-grid {
  display: grid;
  gap: 2.2rem;
  grid-template-columns: 1fr;
  align-items: start;
}

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

.ledger__img {
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  margin-top: 1rem;
}

.meter-list {
  margin: 0;
  padding: 1.4rem 1.3rem;
  list-style: none;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 6px 6px 0 rgba(24, 36, 32, 0.12);
}

.meter {
  display: grid;
  grid-template-columns: 1fr 130px 48px;
  align-items: center;
  gap: 0.8rem;
  padding: 0.65rem 0;
  border-bottom: 1px dashed var(--line);
}

.meter:last-child {
  border-bottom: 0;
}

.meter__label {
  font-size: 0.88rem;
  font-weight: 600;
}

.meter__bar {
  height: 12px;
  background: var(--paper-deep);
  border: 1px solid var(--ink);
  border-radius: 999px;
  overflow: hidden;
}

.meter__fill {
  display: block;
  height: 100%;
  background: var(--amber);
}

.meter__num {
  font-family: var(--font-display);
  font-weight: 700;
  text-align: right;
  color: var(--teal);
}

@media (max-width: 560px) {
  .meter {
    grid-template-columns: 1fr 48px;
  }

  .meter__bar {
    grid-column: 1 / -1;
  }
}

/* ============================================================
   7. Payout table
   ============================================================ */
.table-scroll {
  overflow-x: auto;
  margin-top: 1.4rem;
}

.payout-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border: 2px solid var(--ink);
  font-size: 0.94rem;
}

.payout-table caption {
  caption-side: top;
  text-align: left;
  font-style: italic;
  font-size: 0.85rem;
  color: var(--ink-soft);
  padding-bottom: 0.5rem;
}

.payout-table th,
.payout-table td {
  padding: 0.8rem 1rem;
  text-align: left;
  border: 1px solid var(--line);
}

.payout-table thead th {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.payout-table tbody tr:nth-child(even) {
  background: var(--paper-deep);
}

.payout-table td:last-child {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--stamp-red);
  white-space: nowrap;
}

/* Rubric */
.rubric p {
  max-width: 78ch;
}

/* ============================================================
   8. CTA
   ============================================================ */
.cta-btn {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--teal);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 0.8rem 2.2rem;
  box-shadow: 5px 5px 0 var(--ink);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.cta-btn:hover,
.cta-btn:focus {
  color: var(--paper);
  background: var(--teal-deep);
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 var(--ink);
}

.cta-btn--block {
  display: block;
  width: max-content;
  margin-inline: auto;
}

.cta-strip {
  text-align: center;
  padding: 2.4rem 1.2rem;
  margin: 2rem 0 3rem;
  border: 2px dashed var(--teal);
  border-radius: var(--radius);
  background: var(--card);
}

/* ============================================================
   9. Breadcrumbs
   ============================================================ */
.breadcrumbs {
  padding: 1rem 0 0;
  font-size: 0.85rem;
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--ink-soft);
}

.breadcrumbs li + li::before {
  content: '»';
  margin-right: 0.4rem;
  color: var(--teal);
}

.breadcrumbs a {
  color: var(--ink-soft);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--teal);
}

.breadcrumbs [aria-current="page"] {
  color: var(--teal);
  font-weight: 600;
}

/* ============================================================
   10. Archive / posts
   ============================================================ */
.page-head {
  padding: 2.2rem 0 0.6rem;
}

.post-grid {
  display: grid;
  gap: 1.4rem;
  grid-template-columns: 1fr;
  padding: 1.6rem 0 3rem;
}

@media (min-width: 640px) {
  .post-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .post-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.post-card {
  overflow: hidden;
  padding: 0;
}

.post-card__media {
  display: block;
  border-bottom: 2px solid var(--ink);
}

.post-card__media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.post-card__body {
  padding: 1.1rem 1.2rem 1.35rem;
}

.post-card__pct {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--paper);
  background: var(--teal);
  border-radius: var(--radius);
  padding: 0.1rem 0.55rem;
  margin-bottom: 0.5rem;
}

.post-card__title {
  font-size: 1.15rem;
  margin-bottom: 0.35rem;
}

.post-card__title a {
  color: var(--ink);
  text-decoration: none;
}

.post-card__title a:hover {
  color: var(--teal);
}

.post-card__excerpt {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin-bottom: 0.7rem;
}

.post-card__meta {
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin: 0;
}

.empty-state {
  text-align: center;
  padding: 3.4rem 1.4rem;
  color: var(--ink-soft);
  background: var(--card);
  border: 2px dashed var(--ink);
  border-radius: var(--radius);
}

.pagination,
.nav-links {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0.5rem 0 3rem;
}

.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 0.7rem;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  color: var(--ink);
  font-weight: 600;
  background: var(--card);
  text-decoration: none;
}

.page-numbers.current {
  background: var(--ink);
  color: var(--paper);
}

.page-numbers:hover {
  background: var(--teal);
  color: var(--paper);
}

/* ============================================================
   11. Single post
   ============================================================ */
.single-head {
  padding: 2rem 0 1rem;
}

.single-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 1.3rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-bottom: 1.4rem;
}

.single-meta__pct {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--paper);
  background: var(--teal);
  padding: 0.1rem 0.6rem;
  border-radius: var(--radius);
}

.verdict-line {
  padding: 1rem 1.3rem;
  margin-bottom: 1.6rem;
  border-left: 6px solid var(--amber);
  background: var(--card);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.93rem;
  color: var(--ink-soft);
}

.verdict-line strong {
  color: var(--stamp-red);
  text-transform: uppercase;
  font-family: var(--font-display);
  letter-spacing: 0.08em;
}

.entry-content {
  max-width: 780px;
}

.entry-content img {
  border: 2px solid var(--ink);
  border-radius: var(--radius);
}

.entry-content h2,
.entry-content h3 {
  margin-top: 1.8em;
}

.entry-content blockquote {
  margin: 1.6em 0;
  padding: 1rem 1.4rem;
  border-left: 5px solid var(--teal);
  background: var(--paper-deep);
  font-style: italic;
}

.related-block {
  padding: 2.5rem 0 3rem;
}

/* ============================================================
   12. Footer
   ============================================================ */
.site-footer {
  border-top: 3px double var(--ink);
  background: var(--paper-deep);
  padding: 2.8rem 0 1.6rem;
  text-align: center;
}

.site-footer__nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 1.6rem;
  margin: 0 0 1.6rem;
  padding: 0;
  list-style: none;
}

.site-footer__nav a {
  color: var(--ink-soft);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
}

.site-footer__nav a:hover {
  color: var(--teal);
}

.site-footer__badge {
  margin: 1.4rem 0;
}

.site-footer__disclaimer {
  max-width: 720px;
  margin: 1.2rem auto 0;
  font-size: 0.82rem;
  line-height: 1.8;
  color: var(--ink-soft);
}

.site-footer__disclaimer p {
  margin: 0.3em 0;
}

.site-footer__copy {
  margin-top: 1.4rem;
  font-size: 0.78rem;
  color: rgba(71, 85, 79, 0.7);
}

/* ============================================================
   13. Motion & a11y
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
}
