/* ============================================
   rummy8 — Design v2.1
   Hand-crafted · Indian character · Rummy feel
   No web fonts · No AI templates · All CSS
   ============================================ */

/* ——— Design Tokens ——— */
:root {
  /* backgrounds — warm, lived-in */
  --paper:       #f4efe6;
  --paper-dark:  #e8dfd2;
  --paper-wash:  #faf7f2;

  /* ink — deep, readable */
  --ink:        #1a1e2b;
  --ink-soft:   #3c4152;
  --ink-muted:  #7a7f8d;

  /* surfaces */
  --surface:    #ffffff;
  --surface-warm: #f6f1e9;

  /* borders — earthy, not grey */
  --border:       #cbc0ab;
  --border-lt:    #ded5c5;
  --border-st:    #a7987e;

  /* green — card-table felt, not a brand colour */
  --green:     #0e6b37;
  --green-dk:  #085228;
  --green-lt:  #1d8f4b;

  /* gold — Diwali, winnings, warmth */
  --gold:     #b8890c;
  --gold-lt:  #d4a620;
  --gold-dim: #8a6a0a;

  /* saffron — accent, never overwhelming */
  --saffron: #e07a1a;

  /* utility */
  --red:   #b91c1c;
  --blue:  #1d4ed8;

  /* spacing — slightly irregular for human feel */
  --s1: 0.25rem;
  --s2: 0.5rem;
  --s3: 0.75rem;
  --s4: 1rem;
  --s5: 1.25rem;
  --s6: 1.5rem;
  --s7: 2rem;
  --s8: 2.5rem;
  --s9: 3.5rem;

  /* type */
  --fs-xs:   0.75rem;
  --fs-sm:   0.875rem;
  --fs-base: 1rem;
  --fs-ml:   1.125rem;
  --fs-lg:   1.25rem;
  --fs-xl:   1.5rem;
  --fs-2xl:  1.875rem;
  --fs-3xl:  2.25rem;

  /* layout */
  --mw: 1100px;
}

/* ============ RESET ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font: 400 var(--fs-base)/1.65 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans', sans-serif;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ——— Typography: Georgia-led serif for headings — human, authoritative ——— */
h1, h2, h3, h4 {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
}
h1 { font-size: var(--fs-2xl); }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-lg); }

/* serif for body-ish elements that need character */
.hero__title,
.section-header__title,
.app-card__name,
.quick-link__title,
.cta-bar__title,
.faq__question,
.modal__header h2 {
  font-family: 'Georgia', 'Times New Roman', serif;
}

p { color: var(--ink-soft); margin-bottom: var(--s4); }
a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-dk); text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

/* small-caps utility — gives an artisanal print feel */
.smcaps {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans', sans-serif;
}

/* ============ LAYOUT ============ */
.container { width: 100%; max-width: var(--mw); margin: 0 auto; padding: 0 var(--s4); }
.section { padding: var(--s7) 0; }

/* ============ SKIP LINK ============ */
.skip-link {
  position: absolute; top: -100px; left: 0;
  background: var(--ink); color: #fff;
  padding: var(--s2) var(--s4);
  z-index: 200; font-size: var(--fs-sm);
}
.skip-link:focus { top: 0; }

/* ============ HEADER ============ */
.site-header {
  background: var(--surface);
  box-shadow: 0 1px 0 var(--border-lt), inset 0 -3px 0 var(--gold);
  position: sticky; top: 0; z-index: 100;
}
.header-inner {
  display: flex; align-items: center; gap: var(--s3);
  max-width: var(--mw); margin: 0 auto;
  padding: 0 var(--s4); height: 54px;
}
.site-logo { flex-shrink: 0; display: flex; }
.site-logo img { height: 32px; width: auto; }

.nav-toggle {
  display: none; background: none; border: none; cursor: pointer;
  padding: var(--s1); margin-left: auto;
}
.nav-toggle span {
  display: block; width: 24px; height: 2.5px;
  background: var(--ink); margin: 5px 0;
}

.site-nav__list {
  display: flex; gap: var(--s4); list-style: none;
  align-items: center;
}
.site-nav__list a {
  font-size: var(--fs-xs); font-weight: 600;
  color: var(--ink-muted); text-transform: uppercase;
  letter-spacing: 0.06em; padding: var(--s1) 0;
  white-space: nowrap;
}
.site-nav__list a:hover { color: var(--green); text-decoration: none; }

/* header search — crafty little unit */
.header-search {
  display: flex; align-items: center; margin-left: auto; flex-shrink: 0;
}
.header-search input {
  width: 150px; padding: var(--s1) var(--s2);
  font-size: var(--fs-xs);
  border: 1px solid var(--border);
  border-right: 0;
  background: var(--paper-wash);
  outline: none;
  height: 32px;
}
.header-search input:focus { background: var(--surface); border-color: var(--green); }
.header-search button {
  height: 32px; width: 34px; padding: 0;
  background: var(--green); border: 1px solid var(--green);
  color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 -2px 0 var(--green-dk);
}
.header-search button:hover { background: var(--green-dk); }
.header-search button:active { box-shadow: inset 0 1px 0 var(--green-dk); }

/* ============ HERO ============ */
.hero {
  background: var(--surface-warm);
  border-bottom: 1px double var(--border);
  padding: var(--s8) 0 var(--s7);
  position: relative;
}
/* tiny hand-drawn-ish diamond motif */
.hero::before {
  content: '\25C6';
  position: absolute; top: -9px; left: 50%;
  transform: translateX(-50%);
  font-size: 14px;
  color: var(--gold);
  background: var(--paper);
  padding: 0 var(--s2);
  line-height: 1;
}
.hero__label {
  display: block;
  font-size: var(--fs-xs); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--saffron); margin-bottom: var(--s1);
}
.hero__title {
  font-size: var(--fs-3xl); font-weight: 900;
  line-height: 1.05; margin-bottom: var(--s3);
  max-width: 750px;
}
.hero__title em { color: var(--green); font-style: normal; }
.hero__desc {
  font-size: var(--fs-base); color: var(--ink-muted);
  max-width: 600px; margin-bottom: var(--s4);
}
.hero__quick-stats { display: flex; gap: var(--s5); flex-wrap: wrap; }
.hero__stat { font-size: var(--fs-sm); color: var(--ink-muted); }
.hero__stat strong { color: var(--ink); }

/* ============ SECTION HEADER ============ */
.section-header {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: var(--s4);
  flex-wrap: wrap; gap: var(--s2);
  padding-bottom: var(--s2);
  border-bottom: 3px double var(--ink);
}
.section-header__title { font-size: var(--fs-xl); font-weight: 900; }
.section-header__title .hl { color: var(--saffron); }
.section-header__link {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans', sans-serif;
  font-size: 0.6875rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--green);
}
.section-header__link:hover { color: var(--green-dk); }

/* ============ APP GRID ============ */
.app-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s3);
}

/* ============ APP CARD ============ */
.app-card {
  background: var(--surface);
  border: 1px solid var(--border-lt);
  border-radius: 0;
  padding: var(--s3) var(--s4);
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: var(--s3);
  align-items: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: box-shadow 0.2s, border-color 0.15s;
}
.app-card:hover {
  border-color: var(--border-st);
  box-shadow:
    0 2px 8px rgba(0,0,0,0.06),
    inset 0 -3px 0 var(--green);
}
.app-card__icon {
  width: 48px; height: 48px;
  border-radius: 10px;
  background: var(--surface-warm);
  border: 1px solid var(--border-lt);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.app-card__icon img { width: 100%; height: 100%; object-fit: cover; }
.app-card__body { min-width: 0; }
.app-card__name {
  font-size: var(--fs-base); font-weight: 700;
  margin: 0 0 2px; line-height: 1.2;
}
.app-card__name a { color: var(--ink); }
.app-card__name a:hover { color: var(--green); text-decoration: none; }
.app-card__meta {
  display: flex; flex-wrap: wrap; gap: var(--s1);
  align-items: center;
}
.app-card__action { flex-shrink: 0; }

/* ============ APP LIST (compact) ============ */
.app-list { display: flex; flex-direction: column; gap: var(--s2); }

.app-row {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  gap: var(--s2);
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border-lt);
  border-left: 3px solid var(--border-lt);
  padding: var(--s2) var(--s3);
  transition: border-left-color 0.15s, background 0.15s;
}
.app-row:hover { border-left-color: var(--gold); background: var(--paper-wash); }

.app-row__icon {
  width: 38px; height: 38px;
  border-radius: 6px; overflow: hidden;
  background: var(--surface-warm);
  border: 1px solid var(--border-lt);
  display: flex; align-items: center; justify-content: center;
}
.app-row__icon img { width: 100%; height: 100%; object-fit: cover; }
.app-row__body { min-width: 0; }
.app-row__name {
  font-size: var(--fs-sm);
  font-weight: 600; margin: 0 0 1px;
  line-height: 1.2;
}
.app-row__name a { color: var(--ink); }
.app-row__name a:hover { color: var(--green); text-decoration: none; }
.app-row__meta {
  display: flex; flex-wrap: wrap;
  gap: var(--s1);
  font-size: var(--fs-xs);
  color: var(--ink-muted);
}
.app-row__action { flex-shrink: 0; }

/* ============ BADGE ============ */
.badge {
  display: inline-block;
  padding: 1px 7px;
  font-size: 0.6875rem;
  font-weight: 600;
  background: var(--surface-warm);
  border: 1px solid var(--border-lt);
  border-radius: 2px;
  color: var(--ink-muted);
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.badge--bonus {
  background: #e4f0e6;
  border-color: #aac8b2;
  color: var(--green-dk);
  font-weight: 700;
}
.badge--rating {
  background: #fcf3d6;
  border-color: #e0c78a;
  color: #7a5d00;
  font-weight: 700;
}

/* ============ BUTTONS ============ */
/* Tactile, solid-color, real-3D — no gradients, no AI flatness */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans', sans-serif;
  font-size: 0.6875rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.07em;
  padding: var(--s1) var(--s4);
  border: 1px solid;
  cursor: pointer;
  white-space: nowrap; text-decoration: none; line-height: 1.2;
  min-height: 36px; min-width: 72px;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }

.btn--sm { padding: var(--s1) var(--s2); font-size: 0.625rem; min-height: 30px; min-width: 60px; }
.btn--lg { padding: var(--s2) var(--s5); font-size: var(--fs-sm); min-height: 44px; }

.btn--primary {
  background: var(--green);
  color: #fff;
  border-color: var(--green-dk);
  box-shadow:
    inset 0 -3px 0 var(--green-dk),
    0 2px 4px rgba(14,107,55,0.2);
}
.btn--primary:hover {
  background: var(--green-dk);
  box-shadow:
    inset 0 -3px 0 #043d1b,
    0 2px 6px rgba(14,107,55,0.25);
  color: #fff;
}
.btn--primary:active {
  background: #043d1b;
  box-shadow: inset 0 2px 0 #043d1b;
}

.btn--outline {
  background: var(--surface);
  color: var(--green);
  border-color: var(--border);
  box-shadow: inset 0 -2px 0 var(--border-lt);
}
.btn--outline:hover {
  background: var(--green);
  color: #fff;
  border-color: var(--green-dk);
  box-shadow:
    inset 0 -3px 0 var(--green-dk),
    0 2px 4px rgba(14,107,55,0.15);
}
.btn--outline:active {
  background: var(--green-dk);
  box-shadow: inset 0 2px 0 var(--green-dk);
}

.btn--gold {
  background: var(--gold);
  color: #fff;
  border-color: var(--gold-dim);
  box-shadow:
    inset 0 -3px 0 var(--gold-dim),
    0 2px 4px rgba(184,137,12,0.25);
}
.btn--gold:hover {
  background: var(--gold-dim);
  box-shadow:
    inset 0 -3px 0 #5c4607,
    0 2px 6px rgba(184,137,12,0.3);
  color: #fff;
}
.btn--gold:active {
  background: #5c4607;
  box-shadow: inset 0 2px 0 #5c4607;
}

/* ============ QUICK LINKS ============ */
.quick-links {
  display: grid; gap: var(--s3);
}
.quick-link {
  background: var(--surface);
  border: 1px solid var(--border-lt);
  border-top: 3px solid var(--border);
  padding: var(--s5) var(--s4);
  display: flex; flex-direction: column; gap: var(--s1);
  transition: border-top-color 0.2s, background 0.15s;
}
.quick-link:hover { border-top-color: var(--green); background: var(--paper-wash); text-decoration: none; }
.quick-link__title {
  font-size: var(--fs-ml); font-weight: 700;
  color: var(--ink);
}
.quick-link__desc { font-size: var(--fs-sm); color: var(--ink-muted); }

/* ============ BREADCRUMB ============ */
.breadcrumb {
  font-size: var(--fs-sm); color: var(--ink-muted);
  background: var(--surface);
  border-bottom: 1px dotted var(--border-lt);
  padding: var(--s2) 0;
}
.breadcrumb a { color: var(--ink-muted); }
.breadcrumb a:hover { color: var(--green); }
.breadcrumb__sep { margin: 0 var(--s1); color: var(--border-st); }

/* ============ APP HERO (single app) ============ */
.app-hero {
  background: var(--surface-warm);
  padding: var(--s6) 0;
  border-bottom: 1px double var(--border);
  position: relative;
}
.app-hero__inner {
  display: flex; gap: var(--s4); align-items: center;
  flex-wrap: wrap;
}
.app-hero__icon {
  width: 80px; height: 80px;
  border-radius: 14px; overflow: hidden;
  background: var(--surface-warm);
  border: 2px solid var(--border-lt);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.app-hero__icon img { width: 100%; height: 100%; object-fit: cover; }
.app-hero__icon-placeholder {
  font-family: Georgia, serif;
  font-size: var(--fs-lg); font-weight: 700;
  color: var(--ink-muted);
}
.app-hero__info { flex: 1; min-width: 200px; }
.app-hero__tag {
  display: block;
  font-size: var(--fs-xs); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--saffron); margin-bottom: var(--s1);
}
.app-hero__title {
  font-size: var(--fs-2xl); font-weight: 900;
  margin-bottom: var(--s2);
}
.app-hero__stats {
  display: flex; gap: var(--s3); flex-wrap: wrap;
  margin-bottom: var(--s3);
}
.app-hero__actions {
  display: flex; gap: var(--s2); flex-wrap: wrap;
}

/* ============ STAT ============ */
.stat {
  font-size: var(--fs-sm); font-weight: 600;
  color: var(--ink-muted); white-space: nowrap;
}
.stat--bonus { color: var(--green); font-weight: 700; }
.stat--rating { color: #7a5d00; font-weight: 700; }

/* ============ SPECS STRIP ============ */
.specs-strip {
  background: var(--surface);
  border-bottom: 1px solid var(--border-lt);
  padding: var(--s2) 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.specs-strip::-webkit-scrollbar { display: none; }
.specs-strip__inner {
  display: flex; gap: var(--s4);
  min-width: max-content;
}
.spec {
  display: flex; flex-direction: column; gap: 0;
  white-space: nowrap;
}
.spec__label {
  font-size: 0.625rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--ink-muted);
}
.spec__val {
  font-size: var(--fs-sm); font-weight: 600;
  color: var(--ink);
}

/* ============ SECTION HEADING ============ */
.section-heading {
  font-size: var(--fs-xl); font-weight: 900;
  padding-bottom: var(--s2);
  margin-bottom: var(--s4);
  position: relative;
}
.section-heading::after {
  content: '';
  position: absolute; bottom: 0; left: 0;
  width: 60px; height: 3px;
  background: var(--gold);
}
.section-heading--center { text-align: center; }
.section-heading--center::after { left: 50%; transform: translateX(-50%); }

/* ============ APP DESCRIPTION ============ */
.app-desc, .post-content {
  color: var(--ink-soft); line-height: 1.7;
  font-size: var(--fs-base);
}
.app-desc h2, .app-desc h3,
.post-content h2, .post-content h3 {
  margin-top: var(--s6); margin-bottom: var(--s3);
}
.app-desc p, .post-content p { margin-bottom: var(--s3); }
.app-desc ul, .app-desc ol,
.post-content ul, .post-content ol {
  margin: var(--s3) 0;
  padding-left: var(--s6);
}
.app-desc li, .post-content li { margin-bottom: var(--s2); }

/* ============ HOW TO ============ */
.how-to {
  padding-left: var(--s6);
  line-height: 2;
  color: var(--ink-soft);
}

/* ============ FAQ ============ */
.faq { margin: var(--s6) 0; }
.faq__item {
  border: 1px solid var(--border);
  margin-bottom: var(--s2);
  background: var(--surface);
}
.faq__question {
  font-family: Georgia, serif;
  font-size: var(--fs-base); font-weight: 700;
  padding: var(--s3) var(--s4);
  cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
  color: var(--ink); user-select: none;
}
.faq__question::after {
  content: '\002B';
  font-size: var(--fs-lg);
  color: var(--green);
  line-height: 1;
  flex-shrink: 0;
  transition: transform 0.2s;
}
.faq__item.open .faq__question::after {
  content: '\2212';
  transform: rotate(90deg);
}
.faq__answer {
  padding: 0 var(--s4) var(--s3);
  display: none;
  color: var(--ink-soft); font-size: var(--fs-sm);
  line-height: 1.6;
}
.faq__item.open .faq__answer { display: block; }

/* ============ CTA BAR ============ */
.cta-bar {
  background: var(--surface-warm);
  border: 1px var(--border) solid;
  border-top: 4px solid var(--gold);
  padding: var(--s7);
  text-align: center;
}
.cta-bar__title {
  font-size: var(--fs-xl); font-weight: 900;
  margin-bottom: var(--s4);
}
.cta-bar__actions {
  display: flex; gap: var(--s2);
  justify-content: center; flex-wrap: wrap;
}

/* ============ SIMILAR COUNT ============ */
.similar-count {
  font-size: var(--fs-xs);
  color: var(--ink-muted);
  text-align: center;
  margin-top: var(--s3);
}

/* ============ FOOTER ============ */
.site-footer {
  background: #0a2e1a;
  color: rgba(255,255,255,0.85);
  padding: var(--s8) 0 0;
  margin-top: var(--s8);
  border-top: 1px solid var(--gold);
  box-shadow: inset 0 4px 0 var(--gold);
}
.footer-inner {
  max-width: var(--mw);
  margin: 0 auto;
  padding: 0 var(--s4);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s7);
}
.footer-col h4 {
  font-size: var(--fs-xs); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--gold-lt);
  margin-bottom: var(--s3);
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: var(--s2); }
.footer-col ul li a {
  color: rgba(255,255,255,0.5); font-size: var(--fs-sm);
  transition: color 0.1s;
}
.footer-col ul li a:hover { color: var(--gold-lt); }

.footer-address {
  font-style: normal; color: rgba(255,255,255,0.5);
  font-size: var(--fs-sm); line-height: 1.6;
  margin-bottom: var(--s3);
}
.footer-contact {
  color: rgba(255,255,255,0.5);
  font-size: var(--fs-sm);
}
.footer-contact a { color: rgba(255,255,255,0.5); }
.footer-contact a:hover { color: var(--gold-lt); }

.footer-bottom {
  max-width: var(--mw);
  margin: var(--s7) auto 0;
  padding: var(--s4);
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: var(--fs-xs);
  color: rgba(255,255,255,0.35);
  text-align: center;
}

/* ============ MODAL ============ */
.modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 200;
}
.modal-overlay.open { display: block; }

.modal {
  display: none;
  position: fixed; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 90%; max-width: 600px;
  max-height: 85vh;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  z-index: 210;
  overflow: hidden;
  flex-direction: column;
}
.modal.open { display: flex; }

.modal__header {
  display: flex; justify-content: space-between;
  align-items: center;
  padding: var(--s4) var(--s5);
  border-bottom: 1px solid var(--border);
  background: var(--paper-wash);
  position: sticky; top: 0;
}
.modal__header h2 {
  font-size: var(--fs-lg); font-weight: 900;
}
.modal__close {
  background: none; border: none;
  font-size: 1.5rem; cursor: pointer;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-muted); line-height: 1;
  transition: background 0.1s, color 0.1s;
}
.modal__close:hover { color: var(--red); }

.modal__body {
  padding: var(--s6);
  overflow-y: auto;
  line-height: 1.7;
  color: var(--ink-soft);
  font-size: var(--fs-sm);
}
.modal__body h3 {
  font-family: Georgia, serif;
  font-size: var(--fs-ml);
  color: var(--ink);
  margin: var(--s4) 0 var(--s2);
}
.modal__body p { margin-bottom: var(--s3); }
.modal__body ul { margin-bottom: var(--s3); padding-left: var(--s6); }
.modal__body li { margin-bottom: var(--s2); }

.contact-list { list-style: none; padding-left: 0 !important; }
.contact-list li { padding: var(--s2) 0; border-bottom: 1px solid var(--border-lt); }

/* ============ RULE CARD (archive) ============ */
.rule-list { display: flex; flex-direction: column; gap: var(--s2); }

.rule-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--s2);
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border-lt);
  border-left: 3px solid var(--gold-dim);
  padding: var(--s3) var(--s4);
  transition: border-left-color 0.15s, background 0.15s;
}
.rule-card:hover { border-left-color: var(--gold); background: var(--paper-wash); }

.rule-card__body { min-width: 0; }
.rule-card__title {
  font-size: var(--fs-base);
  font-weight: 700; margin: 0 0 2px;
  line-height: 1.3;
}
.rule-card__title a { color: var(--ink); }
.rule-card__title a:hover { color: var(--green); text-decoration: none; }
.rule-card__meta {
  display: flex; flex-wrap: wrap;
  gap: var(--s2);
  font-size: var(--fs-xs);
  color: var(--ink-muted);
  margin-bottom: var(--s1);
}
.rule-card__readtime { color: var(--ink-muted); }
.rule-card__excerpt {
  font-size: var(--fs-sm);
  color: var(--ink-soft);
  margin: 0;
  line-height: 1.5;
}
.rule-card__action { flex-shrink: 0; }

/* ============ ARTICLE HERO (single rule) ============ */
.article-hero {
  background: var(--surface-warm);
  padding: var(--s7) 0 var(--s6);
  border-bottom: 1px double var(--border);
  position: relative;
}
.article-hero::before {
  content: '\25C6';
  position: absolute; top: -9px; left: 50%;
  transform: translateX(-50%);
  font-size: 14px;
  color: var(--gold);
  background: var(--paper);
  padding: 0 var(--s2);
  line-height: 1;
}
.article-hero__tag {
  display: block;
  font-size: var(--fs-xs); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--saffron); margin-bottom: var(--s2);
}
.article-hero__title {
  font-size: var(--fs-2xl); font-weight: 900;
  line-height: 1.1; margin-bottom: var(--s3);
  max-width: 800px;
}
.article-hero__meta {
  display: flex; flex-wrap: wrap;
  gap: var(--s1);
  font-size: var(--fs-sm);
  color: var(--ink-muted);
  align-items: center;
}
.article-hero__sep { color: var(--border-st); }

/* ============ ARTICLE BODY ============ */
.article-body {
  color: var(--ink-soft); line-height: 1.8;
  font-size: var(--fs-base);
}
.article-body h2 {
  font-size: var(--fs-xl); font-weight: 900;
  margin: var(--s7) 0 var(--s3);
  padding-bottom: var(--s1);
  border-bottom: 1px solid var(--border-lt);
  color: var(--ink);
  scroll-margin-top: 70px;
}
.article-body h3 {
  font-size: var(--fs-lg); font-weight: 700;
  margin: var(--s6) 0 var(--s2);
  color: var(--ink);
}
.article-body p { margin-bottom: var(--s4); color: var(--ink-soft); }
.article-body ul, .article-body ol {
  margin: var(--s3) 0;
  padding-left: var(--s6);
}
.article-body li { margin-bottom: var(--s2); color: var(--ink-soft); }
.article-body strong { color: var(--ink); font-weight: 700; }
.article-body a { color: var(--green); font-weight: 600; }
.article-body a:hover { color: var(--green-dk); }
.article-body blockquote {
  margin: var(--s5) 0;
  padding: var(--s3) var(--s5);
  border-left: 4px solid var(--gold);
  background: var(--surface-warm);
  font-style: italic;
  color: var(--ink-soft);
}
.article-body img {
  border-radius: 6px;
  margin: var(--s5) 0;
  border: 1px solid var(--border-lt);
}
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--s5) 0;
  font-size: var(--fs-sm);
}
.article-body th, .article-body td {
  border: 1px solid var(--border);
  padding: var(--s2) var(--s3);
  text-align: left;
}
.article-body th {
  background: var(--surface-warm);
  font-weight: 700;
  color: var(--ink);
}

/* ============ ARTICLE TOC ============ */
.article-toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--gold);
  padding: var(--s5) var(--s6);
}
.article-toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.article-toc li {
  padding: var(--s1) 0;
  border-bottom: 1px dotted var(--border-lt);
}
.article-toc li:last-child { border-bottom: none; }
.article-toc a {
  font-size: var(--fs-sm);
  color: var(--green);
  font-weight: 600;
}
.article-toc a:hover { color: var(--green-dk); }

/* ============ POST NAV (Prev / Next) ============ */
.post-nav {
  display: flex;
  justify-content: space-between;
  gap: var(--s4);
  margin: var(--s4) 0;
}
.post-nav__link {
  flex: 1;
  max-width: 50%;
}
.post-nav__link--next { text-align: right; }
.post-nav__dir {
  display: block;
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  margin-bottom: var(--s1);
}
.post-nav__link a {
  font-weight: 700;
  color: var(--green);
  text-decoration: none;
  line-height: 1.4;
}
.post-nav__link a:hover { color: var(--green-dk); }

@media (max-width: 480px) {
  .post-nav { flex-direction: column; }
  .post-nav__link { max-width: 100%; }
  .post-nav__link--next { text-align: left; }
}

/* ============ BONUS DETAILS (单页) ============ */
.bonus-details {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s5);
  background: var(--surface-warm);
  border-radius: 8px;
  padding: var(--s5);
  margin-top: var(--s4);
}
.bonus-detail {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.bonus-detail__label {
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}
.bonus-detail__value {
  font-size: var(--fs-ml);
  font-weight: 800;
  color: var(--ink);
}
.bonus-detail__value--green { color: var(--green); }
.bonus-detail__value--gold { color: var(--gold-dim); }

/* ——— Tooltip (CSS-only, hover/tap) ——— */
[data-tip] {
  position: relative;
  cursor: help;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  font-size: 10px;
  font-weight: 700;
  color: var(--ink-muted);
  background: var(--border-lt);
  border-radius: 50%;
  line-height: 1;
  user-select: none;
  flex-shrink: 0;
}
[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
  white-space: nowrap;
  max-width: 180px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
  z-index: 10;
}
[data-tip]:hover::after,
[data-tip]:active::after {
  opacity: 1;
}

/* ============ RESPONSIVE ============ */
@media (min-width: 600px) {
  .app-grid { grid-template-columns: repeat(2, 1fr); }
  .quick-links { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: repeat(4, 1fr); }
  :root {
    --fs-3xl: 2.75rem;
    --fs-2xl: 2.25rem;
    --fs-xl: 1.75rem;
  }
}

@media (min-width: 768px) {
  .nav-toggle { display: none !important; }
  .site-nav { display: block !important; }
}

@media (max-width: 767px) {
  .nav-toggle { display: block; }

  .site-nav {
    position: absolute;
    top: 54px; left: 0; right: 0;
    background: var(--surface);
    z-index: 100;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s;
    box-shadow: 0 3px 0 var(--gold);
  }
  .site-nav.open { max-height: 400px; }
  .site-nav__list {
    flex-direction: column; gap: 0;
    padding: var(--s2) var(--s4);
  }
  .site-nav__list li { border-bottom: 1px solid var(--border-lt); }
  .site-nav__list li:last-child { border-bottom: none; }
  .site-nav__list a {
    display: block; padding: var(--s2) 0;
    font-size: var(--fs-base);
  }

  .header-search input { width: 120px; }
  .header-search { display: none; }

  .hero { padding: var(--s7) 0 var(--s6); }
  .hero__title { font-size: var(--fs-2xl); }
  .app-hero { padding: var(--s4) 0; }
  .app-hero__inner { flex-direction: column; align-items: flex-start; }
  .app-hero__icon { width: 64px; height: 64px; }
  .app-hero__title { font-size: var(--fs-xl); }
  .app-hero__actions { flex-direction: column; width: 100%; }
  .app-hero__actions .btn { width: 100%; }

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

  :root {
    --fs-3xl: 2rem;
    --fs-2xl: 1.75rem;
    --fs-xl: 1.5rem;
  }
  .section { padding: var(--s6) 0; }
  .article-hero { padding: var(--s5) 0; }
  .article-hero__title { font-size: var(--fs-xl); }
  .article-body { font-size: var(--fs-sm); }
}

@media (max-width: 480px) {
  .container { padding: 0 var(--s3); }
  .app-card { padding: var(--s2) var(--s3); gap: var(--s2); }
  .app-card__icon { width: 44px; height: 44px; }
  .app-card__name { font-size: var(--fs-sm); }
  .app-hero__title { font-size: var(--fs-lg); }
  .footer-inner { grid-template-columns: 1fr; gap: var(--s6); }
  .cta-bar { padding: var(--s5); }
}

/* ============ ACCESSIBILITY ============ */
:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }

/* ============ PRINT ============ */
@media print {
  .site-header, .site-footer, .app-card__action,
  .app-row__action, .app-hero__actions, .cta-bar { display: none; }
  body { background: #fff; color: #000; }
}
