/* ============================================================
   THE TIMES OF MALAYA — Stylesheet
   Design: Typographic, minimal, editorial. Inspired by
   The New Yorker. Serif headings, clean sans body text.
   Accent: Dark Green (#2C4A3E)
   ============================================================ */

/* --- Variables -------------------------------------------- */
:root {
  --bg:       #FAFAF8;
  --surface:  #FFFFFF;
  --text:     #1A1A1A;
  --accent:   #2C4A3E;
  --muted:    #767676;
  --border:   #D9D9D4;
  --white:    #FFFFFF;

  --serif:    'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans:     'Inter', system-ui, -apple-system, sans-serif;

  --max-w:    1140px;
  --read-w:   720px;

  --sp-xs:    0.5rem;
  --sp-sm:    1rem;
  --sp-md:    2rem;
  --sp-lg:    4rem;
  --sp-xl:    7rem;
}

/* --- Reset ------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { display: block; max-width: 100%; height: auto; }
a   { color: inherit; text-decoration: none; }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

/* --- Layout helpers --------------------------------------- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--sp-md);
}
.container--reading {
  max-width: var(--read-w);
  margin: 0 auto;
  padding: 0 var(--sp-md);
}

/* ============================================================
   MASTHEAD (Homepage only)
   ============================================================ */
.masthead-wrap {
  padding: var(--sp-md) 0 0;
}
.masthead {
  text-align: center;
  padding: var(--sp-md) var(--sp-md) var(--sp-sm);
  position: relative;
}
.masthead__top-rule {
  width: 100%;
  height: 3px;
  background: var(--text);
  margin-bottom: 0.6rem;
}
.masthead__bottom-rule {
  width: 100%;
  height: 1px;
  background: var(--border);
  margin-top: 0.5rem;
}
.masthead__name {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 7vw, 5rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  line-height: 1;
}
.masthead__tagline {
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.5rem;
}

/* --- Homepage nav ----------------------------------------- */
.home-nav-wrap {
  border-top: 1px solid var(--border);
}
.home-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem var(--sp-md);
  max-width: var(--max-w);
  margin: 0 auto;
}
.home-nav__links {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
}
.home-nav a {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
  transition: color 0.15s;
}
.home-nav a:hover { color: var(--accent); }

/* ============================================================
   SLIM HEADER (Article & inner pages)
   ============================================================ */
.slim-header {
  border-bottom: 1px solid var(--border);
  padding: var(--sp-sm) 0;
}
.slim-header__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--sp-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-sm);
}
.slim-header__logo {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.slim-header__nav {
  display: flex;
  gap: var(--sp-md);
}
.slim-header__nav a {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.15s;
}
.slim-header__nav a:hover { color: var(--text); }

/* ============================================================
   SHARED — Category label
   ============================================================ */
.category {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ============================================================
   HOMEPAGE — Featured Article
   ============================================================ */
.featured {
  padding: var(--sp-lg) 0;
  border-bottom: 1px solid var(--border);
}
.featured__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-lg);
  align-items: center;
}
.featured__image {
  overflow: hidden;
  aspect-ratio: 4 / 3;
}
.featured__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.featured__image:hover img { transform: scale(1.03); }

.featured__category { margin-bottom: 0.75rem; }
.featured__title {
  font-size: clamp(1.9rem, 3.5vw, 2.9rem);
  line-height: 1.12;
  margin-bottom: 1rem;
}
.featured__title a { transition: color 0.15s; }
.featured__title a:hover { color: var(--accent); }
.featured__excerpt {
  font-size: 1.025rem;
  line-height: 1.72;
  color: var(--muted);
  margin-bottom: 1rem;
}
.featured__meta {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-bottom: 1.25rem;
}
.featured__read-more {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 2px;
  transition: opacity 0.15s;
}
.featured__read-more:hover { opacity: 0.7; }

/* ============================================================
   HOMEPAGE — Section heading + Article Grid
   ============================================================ */
.section-heading {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  padding: var(--sp-lg) 0 var(--sp-md);
}
.section-heading__text {
  font-family: var(--sans);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.section-heading__rule {
  flex: 1;
  height: 1px;
  background: var(--border);
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-lg) var(--sp-md);
  padding-bottom: var(--sp-xl);
}

.article-card__image {
  overflow: hidden;
  aspect-ratio: 16 / 10;
  margin-bottom: 0.9rem;
  background: var(--border); /* fallback if no image */
}
.article-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.article-card:hover .article-card__image img { transform: scale(1.04); }

.article-card__category { margin-bottom: 0.4rem; }
.article-card__title {
  font-size: 1.18rem;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}
/* Stretch the title link to cover the entire card — whole card is clickable */
.article-card { position: relative; }
.article-card__title a {
  transition: color 0.15s;
}
.article-card__title a::after {
  content: '';
  position: absolute;
  inset: 0;
}
.article-card__title a:hover { color: var(--accent); }
.article-card__excerpt {
  font-size: 0.875rem;
  line-height: 1.68;
  color: var(--muted);
  margin-bottom: 0.5rem;
}
.article-card__meta {
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* ============================================================
   ARTICLE PAGE
   ============================================================ */
.article { padding-bottom: var(--sp-xl); }

.article__hero {
  width: 100%;
  max-height: 540px;
  overflow: hidden;
  margin-bottom: var(--sp-lg);
}
.article__hero img {
  width: 100%;
  max-height: 540px;
  object-fit: cover;
}

.article__meta-top { margin-bottom: 0.75rem; }

.article__title {
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.article__byline {
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.05em;
  padding-bottom: var(--sp-md);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--sp-lg);
}

/* Body text — the reading experience */
.article__body {
  font-size: 1.125rem;
  line-height: 1.88;
  color: var(--text);
}
.article__body > * + * { margin-top: 1.5em; }
.article__body p { }
.article__body h2 {
  font-size: 1.65rem;
  margin-top: 2.5em;
  margin-bottom: 0.5em;
}
.article__body h3 {
  font-size: 1.3rem;
  margin-top: 2em;
  margin-bottom: 0.4em;
}
.article__body blockquote {
  border-left: 3px solid var(--accent);
  padding: 0.4em 0 0.4em 1.5em;
  margin: 2em 0;
  font-style: italic;
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1.7;
  color: var(--muted);
}
.article__body img {
  width: 100%;
  margin: 2em 0;
}
.article__body a {
  color: var(--accent);
  border-bottom: 1px solid currentColor;
  transition: opacity 0.15s;
}
.article__body a:hover { opacity: 0.7; }
.article__body ul, .article__body ol {
  padding-left: 1.5em;
}

.article__footer {
  margin-top: var(--sp-lg);
  padding-top: var(--sp-md);
  border-top: 1px solid var(--border);
}
.back-link {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.15s;
}
.back-link:hover { color: var(--text); }

/* ============================================================
   RELATED ARTICLES
   ============================================================ */
.related-articles {
  margin-top: var(--sp-lg);
  padding-top: var(--sp-md);
  border-top: 1px solid var(--border);
}
.related-articles__label {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--sp-md);
}
.related-articles__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--sp-md);
}
.related-card {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  text-decoration: none;
  color: inherit;
}
.related-card:hover .related-card__title { color: var(--accent); }
.related-card__image {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--border);
}
.related-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.related-card:hover .related-card__image img { transform: scale(1.04); }
.related-card__body { display: flex; flex-direction: column; gap: 0.25rem; }
.related-card__cat {
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.related-card__title {
  font-family: var(--serif);
  font-size: 0.95rem;
  line-height: 1.35;
  transition: color 0.15s;
}

/* ============================================================
   STATIC PAGES (About, Partner)
   ============================================================ */
.page-content {
  padding: var(--sp-lg) 0 var(--sp-xl);
  max-width: var(--read-w);
}
.page-title {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: var(--sp-md);
  padding-bottom: var(--sp-md);
  border-bottom: 1px solid var(--border);
}
.page-body {
  font-size: 1.1rem;
  line-height: 1.85;
}
.page-body p { margin-bottom: 1.5em; }
.page-body h2 {
  font-size: 1.5rem;
  margin-top: 2em;
  margin-bottom: 0.75em;
}
.page-body strong { font-weight: 500; }

/* Partner page */
.partner-tiers {
  margin: var(--sp-lg) 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-md);
}
.tier {
  padding: var(--sp-md);
  border: 1px solid var(--border);
}
.tier__name {
  font-family: var(--sans);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
.tier__title {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}
.tier__desc {
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--muted);
}

.form-section {
  margin-top: var(--sp-lg);
}
.form-section__label {
  font-family: var(--sans);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  margin-bottom: var(--sp-md);
}
.form-section__label::before,
.form-section__label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.form-embed-wrapper {
  border: 1px solid var(--border);
  background: var(--white);
  overflow: hidden;
}
.form-embed-wrapper iframe {
  display: block;
  width: 100%;
  border: none;
}
/* Placeholder shown if no iframe is embedded yet */
.form-placeholder {
  min-height: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: var(--muted);
  text-align: center;
  padding: var(--sp-md);
}
.form-placeholder__icon {
  font-size: 2rem;
  opacity: 0.4;
}
.form-placeholder__text {
  font-size: 0.85rem;
  line-height: 1.6;
  max-width: 32ch;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  border-top: 3px solid var(--text);
  padding: var(--sp-md) 0;
}
.site-footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-sm);
  flex-wrap: wrap;
}
.site-footer__name {
  font-family: var(--serif);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.site-footer__links {
  display: flex;
  gap: var(--sp-md);
}
.site-footer__links a {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.15s;
}
.site-footer__links a:hover { color: var(--text); }
.site-footer__copy {
  font-size: 0.68rem;
  color: var(--muted);
}
.site-footer__disclaimer {
  font-size: 0.65rem;
  color: var(--muted);
  line-height: 1.65;
  margin-top: var(--sp-sm);
  padding-top: var(--sp-sm);
  border-top: 1px solid var(--border);
  max-width: 72ch;
}
.site-footer__disclaimer a {
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  transition: color 0.15s;
}
.site-footer__disclaimer a:hover { color: var(--text); }

/* ============================================================
   SOCIAL MEDIA EXPORT
   ============================================================ */

.export-wrap {
  border-top: 1px solid var(--border);
  padding: var(--sp-lg) 0 var(--sp-xl);
  background: var(--bg);
}

/* Toggle button */
.export-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.65em 1.2em;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  margin-bottom: var(--sp-lg);
}
.export-toggle::before {
  content: '↗';
  font-style: normal;
}
.export-toggle:hover,
.export-toggle[aria-expanded="true"] {
  color: var(--accent);
  border-color: var(--accent);
}
.export-toggle[aria-expanded="true"]::before { content: '✕'; }

/* Panel — hidden until toggled */
.export-panel {
  display: none;
  flex-direction: column;
  gap: var(--sp-lg);
}
.export-panel.is-open {
  display: flex;
}

/* Each platform block */
.export-block {
  border: 1px solid var(--border);
  padding: var(--sp-md);
}

.export-block__header {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: var(--sp-md);
  padding-bottom: var(--sp-sm);
  border-bottom: 1px solid var(--border);
}
.export-platform {
  font-family: var(--sans);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.export-platform-desc {
  font-size: 0.78rem;
  color: var(--muted);
}

/* Canvas preview */
.export-canvas-wrap {
  position: relative;
  margin-bottom: var(--sp-sm);
  background: var(--accent); /* visible while canvas renders */
  aspect-ratio: 1 / 1;
  max-width: 360px;
}
.export-canvas-wrap canvas {
  display: block;
  width: 100%;
  height: auto;
}

/* Download button */
.export-btn {
  display: inline-block;
  background: var(--accent);
  color: var(--white);
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: none;
  padding: 0.7em 1.4em;
  cursor: pointer;
  margin-bottom: var(--sp-md);
  transition: opacity 0.15s;
}
.export-btn:hover { opacity: 0.82; }

/* Caption blocks */
.export-caption-block {
  position: relative;
}
.export-caption-label {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.6rem;
}
.export-caption-text {
  font-family: var(--sans);
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--white);
  border: 1px solid var(--border);
  padding: var(--sp-sm);
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: var(--sp-sm);
  min-height: 80px;
}
.export-caption-text--tall { min-height: 220px; }

/* Copy button */
.export-copy-btn {
  display: inline-block;
  background: none;
  border: 1px solid var(--text);
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.55em 1.2em;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.export-copy-btn:hover {
  background: var(--text);
  color: var(--white);
}
.export-copy-btn.is-copied {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Tablet */
@media (max-width: 900px) {
  .featured__inner {
    grid-template-columns: 1fr;
    gap: var(--sp-md);
  }
  .featured__image { aspect-ratio: 16 / 9; }

  .article-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .partner-tiers {
    grid-template-columns: 1fr;
  }
}

/* Mobile */
@media (max-width: 600px) {
  :root {
    --sp-md: 1.25rem;
    --sp-lg: 2.5rem;
    --sp-xl: 4rem;
  }

  .masthead__name {
    letter-spacing: 0.03em;
  }

  .article-grid {
    grid-template-columns: 1fr;
    gap: var(--sp-lg);
  }

  .slim-header__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--sp-xs);
  }
  .slim-header__nav {
    gap: var(--sp-sm);
  }

  .home-nav {
    gap: var(--sp-sm);
    flex-wrap: wrap;
  }

  .site-footer__inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .site-footer__links {
    gap: var(--sp-sm);
    flex-wrap: wrap;
  }

  .article__title {
    font-size: 2rem;
  }

  .page-content {
    padding-top: var(--sp-md);
  }
}

/* ============================================================
   PRINT (nice for readers who print articles)
   ============================================================ */
@media print {
  .slim-header__nav, .home-nav, .site-footer, .back-link { display: none; }
  body { font-size: 12pt; background: white; }
  .article__body { font-size: 12pt; line-height: 1.7; }
}

/* ============================================================
   SOCIAL PROOF & FOMO
   ============================================================ */

/* Live reader counter */
.strip-live {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  font-weight: 500;
}
.strip-live__dot {
  width: 7px;
  height: 7px;
  background: #5bb87a;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 0 rgba(91,184,122,0.6);
  animation: pulse-live 2s ease-out infinite;
}
@keyframes pulse-live {
  0%   { box-shadow: 0 0 0 0 rgba(91,184,122,0.6); }
  70%  { box-shadow: 0 0 0 6px rgba(91,184,122,0); }
  100% { box-shadow: 0 0 0 0 rgba(91,184,122,0); }
}
/* In the date strip — white text to match the strip */
.date-strip .strip-live { color: rgba(255,255,255,0.85); }
.date-strip .strip-live__dot { background: #7ee89e; box-shadow: 0 0 0 0 rgba(126,232,158,0.5); }
@keyframes pulse-live-white {
  0%   { box-shadow: 0 0 0 0 rgba(126,232,158,0.5); }
  70%  { box-shadow: 0 0 0 6px rgba(126,232,158,0); }
  100% { box-shadow: 0 0 0 0 rgba(126,232,158,0); }
}
.date-strip .strip-live__dot { animation: pulse-live-white 2s ease-out infinite; }

/* Est. badge in masthead */
.masthead__est {
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.3rem;
}


/* Trending badge */
.badge-trending {
  display: inline-block;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: #c9a84c;
  color: #fff;
  padding: 0.2em 0.55em;
  margin-left: 0.5rem;
  vertical-align: middle;
}

/* Most Read section */
.most-read {
  border-top: 1px solid var(--border);
  padding: var(--sp-lg) 0;
}
.most-read__list {
  list-style: none;
  counter-reset: most-read;
}
.most-read__item {
  counter-increment: most-read;
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border);
}
.most-read__item::before {
  content: counter(most-read, decimal-leading-zero);
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--border);
  min-width: 2.5rem;
  flex-shrink: 0;
}
.most-read__content { flex: 1; min-width: 0; }
.most-read__category {
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.25rem;
}
.most-read__title {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.2rem;
}
.most-read__title a { transition: color 0.15s; }
.most-read__title a:hover { color: var(--accent); }
.most-read__meta {
  font-size: 0.65rem;
  color: var(--muted);
}

/* Subscriber count in newsletter */
.newsletter-strip__count {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  padding: 0.3em 0.85em;
  margin-bottom: 0.75rem;
}

/* ============================================================
   LANGUAGE TOGGLE
   ============================================================ */
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin-left: auto;
}
.lang-btn {
  background: none;
  border: none;
  font-family: var(--sans);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--muted);
  cursor: pointer;
  padding: 0.2em 0.3em;
  transition: color 0.15s;
}
.lang-btn.active { color: var(--accent); }
.lang-btn:hover { color: var(--text); }
.lang-divider { font-size: 0.6rem; color: var(--border); }

/* ============================================================
   DATE STRIP — newspaper edition line
   ============================================================ */
.date-strip {
  background: var(--accent);
  color: rgba(255,255,255,0.85);
  text-align: center;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.45rem var(--sp-md);
}

/* ============================================================
   CATEGORY NAV — horizontal topic strip
   ============================================================ */
.category-nav {
  display: flex;
  justify-content: center;
  gap: 0;
  padding: 0;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.category-nav::-webkit-scrollbar { display: none; }
.category-nav a {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.7rem 1.1rem;
  white-space: nowrap;
  transition: color 0.15s, border-bottom 0.15s;
  border-bottom: 2px solid transparent;
}
.category-nav a:hover {
  color: var(--text);
  border-bottom-color: var(--text);
}
.category-nav a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ============================================================
   STICKY HEADER (article pages, activates on scroll)
   ============================================================ */
.slim-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250,250,248,0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: box-shadow 0.2s;
}
.slim-header.is-scrolled {
  box-shadow: 0 1px 12px rgba(0,0,0,0.08);
}

/* ============================================================
   READING TIME
   ============================================================ */
.reading-time {
  display: inline-block;
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.reading-time::before {
  content: '·';
  margin-right: 0.4em;
}

/* ============================================================
   ARTICLE LAYOUT WITH SIDEBAR (desktop)
   ============================================================ */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: var(--sp-xl);
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--sp-md);
}
.article-layout__main {
  min-width: 0;
}
.article-layout__main .container--reading {
  max-width: 100%;
  padding: 0;
}
.article-layout__sidebar {
  padding-top: var(--sp-lg);
}
.sidebar-sticky {
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: var(--sp-lg);
}

/* ============================================================
   AD UNITS
   ============================================================ */

/* Shared label */
.ad-label {
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.4rem;
  display: block;
}

/* — Leaderboard — compact strip — */
.ad-leaderboard-wrap {
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--sp-md);
}
.ad-leaderboard-wrap .ad-label {
  text-align: center;
  padding-top: 0.5rem;
}
.ad-leaderboard {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 60px;
  text-decoration: none;
  transition: opacity 0.2s;
}
.ad-leaderboard:hover { opacity: 0.9; }
.ad-leaderboard__inner {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  padding: 0.7rem var(--sp-md);
  flex-wrap: wrap;
  justify-content: center;
  text-align: center;
}
.ad-leaderboard__brand {
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.6;
}
.ad-leaderboard__headline {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
}
.ad-leaderboard__sub {
  font-size: 0.75rem;
  opacity: 0.75;
}
.ad-leaderboard__cta {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid;
  padding: 0.35em 0.85em;
  white-space: nowrap;
  transition: opacity 0.15s;
}
.ad-leaderboard__cta:hover { opacity: 0.75; }

/* — Medium Rectangle (300×250) — */
.ad-sidebar-wrap { }
.ad-rectangle {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  width: 100%;
  min-height: 250px;
  padding: var(--sp-md);
  text-decoration: none;
  transition: opacity 0.2s;
}
.ad-rectangle:hover { opacity: 0.9; }
.ad-rectangle__brand {
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.7;
}
.ad-rectangle__headline {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
  white-space: pre-line;
  flex: 1;
}
.ad-rectangle__sub {
  font-size: 0.78rem;
  opacity: 0.85;
  letter-spacing: 0.02em;
}
.ad-rectangle__cta {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.55em 1.1em;
  align-self: flex-start;
  margin-top: auto;
  transition: opacity 0.15s;
}
.ad-rectangle__cta:hover { opacity: 0.85; }

/* — In-feed Sponsored Card — */
.ad-infeed {
  border: 1px solid var(--border);
  padding: var(--sp-md);
  border-radius: 0;
}
.ad-infeed__label {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  margin-bottom: 0.75rem;
}
.ad-infeed__advertiser {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.ad-infeed__link {
  display: block;
  text-decoration: none;
  color: inherit;
}
.ad-infeed__category {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}
.ad-infeed__headline {
  font-family: var(--serif);
  font-size: 1.18rem;
  line-height: 1.3;
  margin-bottom: 0.5rem;
  transition: opacity 0.15s;
}
.ad-infeed__link:hover .ad-infeed__headline { opacity: 0.7; }
.ad-infeed__excerpt {
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--muted);
  margin-bottom: 0.75rem;
}
.ad-infeed__cta {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ============================================================
   NEWSLETTER STRIP
   ============================================================ */
.newsletter-strip {
  background: var(--accent);
  color: var(--white);
  padding: var(--sp-lg) 0;
  text-align: center;
  margin-top: var(--sp-xl);
}
.newsletter-strip__eyebrow {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.7;
  margin-bottom: 0.5rem;
}
.newsletter-strip__title {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.newsletter-strip__desc {
  font-size: 0.9rem;
  opacity: 0.8;
  margin-bottom: var(--sp-md);
  max-width: 42ch;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.65;
}
.newsletter-form {
  display: flex;
  gap: 0;
  max-width: 440px;
  margin: 0 auto;
}
.newsletter-form input[type="email"] {
  flex: 1;
  padding: 0.75em 1em;
  font-family: var(--sans);
  font-size: 0.875rem;
  border: 1px solid rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.12);
  color: var(--white);
  outline: none;
  transition: border-color 0.15s;
}
.newsletter-form input[type="email"]::placeholder { color: rgba(255,255,255,0.5); }
.newsletter-form input[type="email"]:focus { border-color: rgba(255,255,255,0.8); }
.newsletter-form button {
  padding: 0.75em 1.4em;
  background: var(--white);
  color: var(--accent);
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s;
}
.newsletter-form button:hover { opacity: 0.88; }

/* ============================================================
   IMAGE CAPTION
   ============================================================ */
.article__hero-caption {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.03em;
  padding: 0.5rem var(--sp-md);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--sp-lg);
}

/* ============================================================
   SHARE BAR
   ============================================================ */
/* ── Audio player ── */
.audio-player {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.audio-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45em 1em;
  background: none;
  border: 1.5px solid var(--accent);
  color: var(--accent);
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 2px;
  transition: background 0.15s, color 0.15s;
}
.audio-btn:hover,
.audio-btn.is-playing { background: var(--accent); color: #fff; }
.audio-icon { font-size: 0.8rem; }
.audio-lang-toggle {
  display: flex;
  gap: 0;
  border: 1.5px solid var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.audio-lang-btn {
  padding: 0.35em 0.75em;
  background: none;
  border: none;
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.audio-lang-btn.active { background: var(--accent); color: #fff; }
.audio-lang-btn:not(:last-child) { border-right: 1px solid var(--border); }

.share-bar {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  margin-top: var(--sp-md);
  padding-top: var(--sp-md);
  border-top: 1px solid var(--border);
}
.share-bar__label {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--muted);
  border: 1px solid var(--border);
  background: none;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  text-decoration: none;
  flex-shrink: 0;
}
.share-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.share-btn.is-copied {
  color: #2a7a4b;
  border-color: #2a7a4b;
}

/* ============================================================
   ARTICLE GRID — improved hierarchy
   ============================================================ */
/* First article card after featured — wider, image left / text right */
.article-grid .article-card:first-child {
  grid-column: span 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto;
  gap: var(--sp-md);
  align-items: start;
  padding-bottom: var(--sp-md);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--sp-sm);
}
/* Pin image to left column, spanning all rows */
.article-grid .article-card:first-child .article-card__image {
  grid-column: 1;
  grid-row: 1 / 6;
  aspect-ratio: 4/3;
  margin-bottom: 0;
  align-self: start;
}
/* All text children go to right column */
.article-grid .article-card:first-child .article-card__category,
.article-grid .article-card:first-child .article-card__title,
.article-grid .article-card:first-child .article-card__excerpt,
.article-grid .article-card:first-child .article-card__meta {
  grid-column: 2;
}
.article-grid .article-card:first-child .article-card__title {
  font-size: 1.4rem;
}

/* ============================================================
   RESPONSIVE — new components
   ============================================================ */
@media (max-width: 1000px) {
  .article-layout {
    grid-template-columns: 1fr;
    gap: var(--sp-md);
    padding: 0;
  }
  .article-layout__sidebar { display: none; }
}

@media (max-width: 900px) {
  .article-grid .article-card:first-child {
    grid-column: span 2;
    grid-template-columns: 1fr;
  }
  .article-grid .article-card:first-child .article-card__image,
  .article-grid .article-card:first-child .article-card__category,
  .article-grid .article-card:first-child .article-card__title,
  .article-grid .article-card:first-child .article-card__excerpt,
  .article-grid .article-card:first-child .article-card__meta {
    grid-column: 1;
    grid-row: auto;
  }
  .ad-leaderboard__inner {
    gap: var(--sp-sm);
  }
  .ad-leaderboard__sub { display: none; }
}

@media (max-width: 600px) {
  .article-grid .article-card:first-child {
    grid-column: span 1;
    grid-template-columns: 1fr;
  }
  .newsletter-form {
    flex-direction: column;
  }
  .category-nav {
    justify-content: flex-start;
    padding: 0 var(--sp-md);
  }
  .ad-leaderboard__headline { font-size: 1rem; }
}

/* ============================================================
   PUZZLE PAGE — KATAHARI
   ============================================================ */

/* ── Page layout ── */
.puzzle-page {
  max-width: 500px;
  margin: 0 auto;
  padding: 1rem;
  text-align: center;
}

.puzzle-title {
  font-family: var(--serif);
  font-size: 2rem;
  letter-spacing: 0.3em;
  margin: 0.5rem 0 0.25rem;
}

.puzzle-subtitle {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.puzzle-controls {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.puzzle-icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  color: var(--text);
  padding: 0.25rem 0.5rem;
  transition: color 0.15s;
}
.puzzle-icon-btn:hover { color: var(--accent); }

/* ── Board ── */
.puzzle-board {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(6, 1fr);
  gap: 5px;
  width: 336px;
  height: 336px;
  margin: 0 auto 1rem;
}

.puzzle-tile {
  width: 100%;
  aspect-ratio: 1;
  border: 2px solid #d3d6da;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  font-family: var(--sans);
  text-transform: uppercase;
  transition: border-color 0.1s;
  user-select: none;
}

.puzzle-tile[data-state="tbd"]     { border-color: #878a8c; }
.puzzle-tile[data-state="correct"] { background: #538d4e; color: white; border-color: #538d4e; }
.puzzle-tile[data-state="present"] { background: #b59f3b; color: white; border-color: #b59f3b; }
.puzzle-tile[data-state="absent"]  { background: #3a3a3c; color: white; border-color: #3a3a3c; }

/* ── Keyboard ── */
.puzzle-keyboard {
  margin: 0 auto;
  max-width: 480px;
}

.puzzle-key-row {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin-bottom: 5px;
}

.puzzle-key {
  height: 56px;
  min-width: 36px;
  padding: 0 6px;
  border: none;
  border-radius: 4px;
  background: #818384;
  color: white;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  flex: 1;
  max-width: 42px;
  text-transform: uppercase;
  transition: background 0.1s;
}

.puzzle-key[data-key="ENTER"],
.puzzle-key[data-key="BACKSPACE"] {
  min-width: 60px;
  max-width: 66px;
  font-size: 0.75rem;
}

.puzzle-key[data-state="correct"] { background: #538d4e; }
.puzzle-key[data-state="present"] { background: #b59f3b; }
.puzzle-key[data-state="absent"]  { background: #3a3a3c; }

/* ── Animations ── */
@keyframes puzzle-shake {
  0%,100% { transform: translateX(0); }
  20%     { transform: translateX(-4px); }
  40%     { transform: translateX(4px); }
  60%     { transform: translateX(-4px); }
  80%     { transform: translateX(4px); }
}
.puzzle-tile.shake { animation: puzzle-shake 0.5s ease; }

@keyframes puzzle-flip {
  0%   { transform: rotateX(0); }
  50%  { transform: rotateX(-90deg); }
  100% { transform: rotateX(0); }
}
.puzzle-tile.flip { animation: puzzle-flip 0.5s ease; }

@keyframes puzzle-bounce {
  0%,100% { transform: translateY(0); }
  40%     { transform: translateY(-20px); }
  60%     { transform: translateY(-10px); }
}
.puzzle-tile.bounce { animation: puzzle-bounce 1s ease; }

/* ── Toasts ── */
.puzzle-toasts {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.puzzle-toast {
  background: var(--text);
  color: var(--bg);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 1;
  transition: opacity 0.3s;
}
.puzzle-toast.fade-out { opacity: 0; }

/* ── Modal ── */
.puzzle-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 500;
  align-items: center;
  justify-content: center;
}
.puzzle-modal.open { display: flex; }

.puzzle-modal__inner {
  background: var(--bg);
  max-width: 480px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  border-radius: 4px;
  padding: 1.5rem;
  position: relative;
}

#puzzle-modal-close {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--text);
}

/* ── Tabs ── */
.puzzle-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid #d3d6da;
  margin-bottom: 1rem;
}

.puzzle-tab {
  background: none;
  border: none;
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-family: var(--sans);
  transition: color 0.15s;
}
.puzzle-tab.active {
  color: var(--text);
  border-bottom-color: var(--text);
  font-weight: 600;
}

.puzzle-tab-content { display: none; }
.puzzle-tab-content.active { display: block; }

/* ── Stats ── */
.puzzle-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  text-align: center;
  margin-bottom: 1.5rem;
}

.puzzle-stat-box {
  display: flex;
  flex-direction: column;
}

.puzzle-stat-num {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}

.puzzle-stat-lbl {
  font-size: 0.65rem;
  color: var(--muted);
}

.puzzle-dist { margin-bottom: 1.5rem; }

.puzzle-dist-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 4px;
  font-size: 0.8rem;
}

.puzzle-dist-bar {
  background: #818384;
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 2px;
  min-width: 20px;
  text-align: right;
  transition: width 0.3s;
}
.puzzle-dist-bar[data-current="true"] { background: #538d4e; }

#puzzle-share-btn {
  background: #538d4e;
  color: white;
  border: none;
  padding: 0.75rem 2rem;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.05em;
  transition: opacity 0.15s;
}
#puzzle-share-btn:hover { opacity: 0.85; }

.puzzle-countdown {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

/* ── Help examples ── */
.puzzle-example {
  display: flex;
  gap: 4px;
  margin: 0.5rem 0;
}

.puzzle-ex-tile {
  width: 40px;
  height: 40px;
  border: 2px solid #d3d6da;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  font-family: var(--sans);
}
.puzzle-ex-tile.correct { background: #538d4e; color: white; border-color: #538d4e; }
.puzzle-ex-tile.present { background: #b59f3b; color: white; border-color: #b59f3b; }
.puzzle-ex-tile.absent  { background: #3a3a3c; color: white; border-color: #3a3a3c; }

/* ── Puzzle page responsive ── */
@media (max-width: 400px) {
  .puzzle-board {
    width: 282px;
    height: 282px;
  }
  .puzzle-tile { font-size: 1.2rem; }
  .puzzle-key  { height: 48px; min-width: 30px; font-size: 0.75rem; }
  .puzzle-key[data-key="ENTER"],
  .puzzle-key[data-key="BACKSPACE"] { min-width: 50px; max-width: 56px; }
}

/* ── Challenge mode ── */
.puzzle-challenge-banner {
  background: #b59f3b;
  color: white;
  text-align: center;
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}
#puzzle-challenge-btn {
  display: block;
  width: 100%;
  margin: 0.5rem 0 0;
  padding: 0.6rem;
  background: transparent;
  border: 2px solid var(--accent);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 4px;
  cursor: pointer;
  letter-spacing: 0.05em;
  transition: background 0.15s, color 0.15s;
}
#puzzle-challenge-btn:hover {
  background: var(--accent);
  color: white;
}

/* ── Share panel ── */
.puzzle-share-panel {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 300;
}
.puzzle-share-panel__inner {
  background: var(--surface);
  border-radius: 12px 12px 0 0;
  padding: 1.5rem 1.5rem 2rem;
  width: 100%;
  max-width: 480px;
  position: relative;
}
.puzzle-share-panel__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.1rem;
  color: var(--muted);
  cursor: pointer;
}
.puzzle-share-panel__title {
  text-align: center;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  color: var(--text);
}
.puzzle-share-panel__buttons {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 1.25rem;
}
.puzzle-share-btn-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  background: none;
  color: var(--text);
  flex: 1;
  min-width: 60px;
  transition: background 0.15s;
}
.puzzle-share-btn-icon svg { width: 24px; height: 24px; }
.puzzle-share-btn-icon:hover { background: var(--border); }
.share-wa  { color: #25D366; border-color: #25D366; }
.share-tg  { color: #2AABEE; border-color: #2AABEE; }
.share-fb  { color: #1877F2; border-color: #1877F2; }
.share-copy { color: var(--text); }
.puzzle-share-panel__note {
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0;
}

/* ═══════════════════════════════════════════════════════════
   UJIФQ — Financial Quotient Game
   ═══════════════════════════════════════════════════════════ */

.fq-page {
  min-height: 80vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  position: relative;
  box-sizing: border-box;
}

.fq-toasts { position: fixed; top: 1rem; left: 50%; transform: translateX(-50%); z-index: 400; }

/* ── Overlay (intro / game over) ── */
.fq-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 1rem;
}
.fq-overlay__inner {
  background: var(--surface);
  border-radius: 12px;
  padding: 2rem 1.5rem;
  max-width: 380px;
  width: 100%;
  text-align: center;
}
.fq-overlay__title {
  font-size: 1.8rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
  color: var(--accent);
}
.fq-overlay__sub {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 1rem;
}
.fq-overlay__desc {
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
  color: var(--text);
}
.fq-intro-demo {
  background: var(--bg);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  text-align: left;
}
.fq-demo-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.3rem 0;
  font-size: 0.85rem;
}
.fq-demo-arrow { font-size: 1.2rem; font-weight: 700; }
.fq-left-arrow  { color: #e74c3c; }
.fq-right-arrow { color: #27ae60; }
.fq-disclaimer {
  font-size: 0.7rem;
  color: var(--muted);
  margin-bottom: 1rem;
}
.fq-cta-btn {
  display: block;
  width: 100%;
  padding: 0.85rem;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: opacity 0.15s;
}
.fq-cta-btn:hover { opacity: 0.88; }

/* ── Game header ── */
.fq-game {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.fq-header {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  font-family: var(--sans);
}
.fq-streak-label { font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; }
.fq-streak-num   { font-size: 2.5rem; font-weight: 900; color: var(--accent); line-height: 1; }
.fq-best-label   { font-size: 0.72rem; color: var(--muted); margin-left: 0.5rem; }

/* ── Card area ── */
.fq-card-area {
  position: relative;
  width: 340px;
  height: 260px;
  margin-bottom: 1rem;
  cursor: grab;
}
.fq-card-area:active { cursor: grabbing; }
.fq-card-shadow {
  position: absolute;
  inset: 6px;
  background: var(--border);
  border-radius: 14px;
  top: 10px;
  z-index: 0;
}
.fq-card {
  position: absolute;
  inset: 0;
  background: var(--surface);
  border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1.25rem 0.75rem;
  z-index: 1;
  user-select: none;
  transform-origin: center bottom;
}
.fq-swipe-overlay {
  position: absolute;
  inset: 0;
  border-radius: 14px;
  opacity: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  transition: opacity 0.1s;
}
.fq-swipe-left  { background: rgba(231,76,60,0.15); color: #e74c3c; border: 3px solid #e74c3c; }
.fq-swipe-right { background: rgba(39,174,96,0.15); color: #27ae60; border: 3px solid #27ae60; }
.fq-card-category {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 0.6rem;
}
.fq-card-question {
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text);
  flex: 1;
  font-family: var(--serif);
}
.fq-card-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 0.75rem;
}
.fq-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
}
.fq-label-left  { color: #e74c3c; background: rgba(231,76,60,0.1); }
.fq-label-right { color: #27ae60; background: rgba(39,174,96,0.1);  }

/* ── Buttons ── */
.fq-btn-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.5rem;
}
.fq-dir-btn {
  flex: 1;
  padding: 0.7rem 1rem;
  border-radius: 8px;
  border: 2px solid;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.04em;
  background: transparent;
  transition: background 0.15s, color 0.15s;
}
.fq-dir-left  { color: #e74c3c; border-color: #e74c3c; }
.fq-dir-right { color: #27ae60; border-color: #27ae60; }
.fq-dir-left:hover  { background: #e74c3c; color: white; }
.fq-dir-right:hover { background: #27ae60; color: white; }
.fq-swipe-hint { font-size: 0.7rem; color: var(--muted); margin: 0; }

/* ── Reveal panel ── */
.fq-reveal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 150;
  padding-bottom: env(safe-area-inset-bottom);
}
.fq-reveal__inner {
  background: var(--surface);
  border-radius: 16px 16px 0 0;
  padding: 1.5rem 1.5rem 2rem;
  width: 100%;
  max-width: 480px;
}
.fq-reveal__verdict {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}
.fq-correct { color: #27ae60; }
.fq-wrong   { color: #e74c3c; }
.fq-reveal__answer {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
  color: var(--text);
}
.fq-reveal__explain {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 1.25rem;
}
.fq-next-btn {
  display: block;
  width: 100%;
  padding: 0.75rem;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
}

/* ── Game Over ── */
.fq-gameover {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 180;
  padding: 1rem;
  overflow-y: auto;
}
.fq-gameover__inner {
  max-width: 380px;
  width: 100%;
  text-align: center;
}
.fq-gameover__score-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }
.fq-gameover__score { font-size: 5rem; font-weight: 900; color: var(--accent); line-height: 1; margin-bottom: 0.25rem; }
.fq-gameover__fq-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.fq-gameover__tier { font-size: 1.3rem; font-weight: 700; margin: 0.3rem 0 0.75rem; }
.fq-gameover__msg  { font-size: 0.9rem; line-height: 1.6; color: var(--text); margin-bottom: 1.5rem; }
.fq-gameover__wrong-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 0.4rem; }
.fq-gameover__wrong-q   { font-size: 0.85rem; font-weight: 600; color: var(--text); margin-bottom: 0.5rem; font-family: var(--serif); }
.fq-gameover__wrong-exp { font-size: 0.8rem; color: var(--muted); line-height: 1.6; margin-bottom: 0.5rem; }
.fq-gameover__wrong-source,
.fq-reveal__source {
  font-size: 0.7rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
}
.fq-gameover__wrong-source a,
.fq-reveal__source a {
  color: var(--accent);
  text-decoration: underline;
}
.fq-gameover__actions { display: flex; gap: 0.75rem; }
.fq-gameover__actions .fq-cta-btn { flex: 1; }
.fq-share-btn {
  flex: 1;
  padding: 0.85rem;
  background: transparent;
  border: 2px solid var(--accent);
  color: var(--accent);
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.fq-share-btn:hover { background: var(--accent); color: white; }

/* ── Responsive ── */
@media (max-width: 380px) {
  .fq-card-area { width: 300px; height: 230px; }
  .fq-card-question { font-size: 0.88rem; }
}
