/* ChineseBoo — Scholar Modernism */
:root {
  --ivory: #fcfaf7;
  --ink: #1a1c1e;
  --ink-soft: #3d4147;
  --red: #b22222;
  --red-dark: #8a1a1a;
  --navy: #141a2b;
  --paper: #ffffff;
  --line: #e8e4dd;
  --green: #4a6a5a;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Work Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --maxw: 1120px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  background: var(--ivory);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.65;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--red); text-decoration: none; }
a:hover { color: var(--red-dark); }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(252, 250, 247, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav-wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 22px; font-weight: 600; color: var(--ink); }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.nav-toggle { display: none; }
.nav-burger { display: none; cursor: pointer; padding: 8px; }
.nav-burger span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0; transition: 0.2s; }
.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav a { color: var(--ink-soft); font-size: 15px; font-weight: 500; }
.site-nav a:hover { color: var(--red); }
.site-nav .nav-cta {
  background: var(--red); color: #fff; padding: 9px 18px; border-radius: 8px; font-weight: 600;
}
.site-nav .nav-cta:hover { background: var(--red-dark); color: #fff; }

@media (max-width: 820px) {
  .nav-burger { display: block; }
  .site-nav {
    display: none; position: absolute; top: 68px; left: 0; right: 0;
    background: var(--ivory); border-bottom: 1px solid var(--line);
    flex-direction: column; padding: 20px 24px; gap: 18px; align-items: flex-start;
  }
  .nav-toggle:checked ~ .site-nav { display: flex; }
}

/* ---------- Hero ---------- */
.hero { padding: 72px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(38px, 5.2vw, 60px); margin-bottom: 20px; }
.hero h1 em { font-style: italic; color: var(--red); }
.hero .lede { font-size: 20px; color: var(--ink-soft); max-width: 34em; margin-bottom: 30px; }
.hero-meta { margin-top: 18px; font-size: 14px; color: var(--ink-soft); }
.hero-img { max-width: 420px; margin: 0 auto; }
@media (max-width: 820px) {
  .hero { padding: 44px 0 24px; }
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero-img { max-width: 320px; }
}

/* Store badges */
.badges { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.badges img { height: 52px; width: auto; }
.badges a { transition: transform 0.15s ease; }
.badges a:hover { transform: translateY(-2px); }

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section.alt { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 720px; margin: 0 auto 44px; text-align: center; }
.section-head h2 { font-size: clamp(28px, 3.6vw, 40px); margin-bottom: 12px; }
.section-head p { color: var(--ink-soft); font-size: 18px; }
.kicker { display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--red); margin-bottom: 10px; }

/* ---------- Screenshots ---------- */
.shots {
  display: grid; grid-auto-flow: column; grid-auto-columns: 240px;
  gap: 20px; overflow-x: auto; padding: 8px 4px 20px;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
}
.shots figure { scroll-snap-align: start; }
.shots img { border-radius: 18px; box-shadow: 0 10px 32px rgba(20, 26, 43, 0.18); }
.shots figcaption { font-size: 14px; color: var(--ink-soft); margin-top: 12px; text-align: center; }
@media (min-width: 1180px) { .shots { grid-auto-columns: 1fr; grid-auto-flow: row; grid-template-columns: repeat(6, 1fr); overflow: visible; } }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; counter-reset: step; }
.step { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 28px 24px; }
.step::before {
  counter-increment: step; content: "0" counter(step);
  font-family: var(--serif); font-size: 30px; color: var(--red); display: block; margin-bottom: 12px;
}
.step h3 { font-size: 20px; margin-bottom: 8px; }
.step p { font-size: 15px; color: var(--ink-soft); }
@media (max-width: 960px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Feature list ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.feature { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 28px 24px; }
.feature h3 { font-size: 20px; margin-bottom: 8px; }
.feature p { font-size: 15px; color: var(--ink-soft); }
.feature .tag { display: inline-block; font-size: 12px; font-weight: 600; color: var(--green); border: 1px solid currentColor; border-radius: 99px; padding: 1px 10px; margin-bottom: 12px; }
@media (max-width: 960px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }

/* ---------- Guide cards ---------- */
.guide-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.guide-card {
  display: block; background: var(--paper); border: 1px solid var(--line); border-radius: 14px;
  padding: 26px 26px 22px; color: var(--ink); transition: border-color 0.15s, transform 0.15s;
}
.guide-card:hover { border-color: var(--red); transform: translateY(-2px); color: var(--ink); }
.guide-card h3 { font-size: 21px; margin-bottom: 8px; }
.guide-card p { font-size: 15px; color: var(--ink-soft); margin-bottom: 12px; }
.guide-card .more { font-size: 14px; font-weight: 600; color: var(--red); }
@media (max-width: 720px) { .guide-cards { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */
.faq { max-width: 780px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center;
  gap: 16px; padding: 22px 4px; font-family: var(--serif); font-size: 20px; font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 26px; color: var(--red); flex-shrink: 0; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq .faq-body { padding: 0 4px 24px; color: var(--ink-soft); }
.faq .faq-body a { font-weight: 600; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--navy); color: #f5f2ec; text-align: center; padding: 80px 24px; }
.cta-band h2 { font-size: clamp(30px, 4vw, 44px); margin-bottom: 14px; }
.cta-band p { color: #c4c9d8; font-size: 18px; max-width: 38em; margin: 0 auto 30px; }
.cta-band .badges { justify-content: center; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ivory); border-top: 1px solid var(--line); padding: 52px 0 36px; font-size: 14px; color: var(--ink-soft); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 36px; margin-bottom: 36px; }
.footer-grid h4 { font-size: 15px; margin-bottom: 12px; color: var(--ink); }
.footer-grid ul { list-style: none; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a { color: var(--ink-soft); }
.footer-grid a:hover { color: var(--red); }
.footer-bottom { border-top: 1px solid var(--line); padding-top: 22px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- Article (guides & legal) ---------- */
.article { max-width: 760px; margin: 0 auto; padding: 56px 0 72px; }
.article .breadcrumbs { font-size: 14px; color: var(--ink-soft); margin-bottom: 24px; }
.article .breadcrumbs a { color: var(--ink-soft); }
.article .breadcrumbs a:hover { color: var(--red); }
.article h1 { font-size: clamp(32px, 4.4vw, 46px); margin-bottom: 18px; }
.article .article-lede { font-size: 20px; color: var(--ink-soft); margin-bottom: 8px; }
.article .article-meta { font-size: 14px; color: var(--ink-soft); border-bottom: 1px solid var(--line); padding-bottom: 24px; margin-bottom: 8px; }
.article h2 { font-size: 28px; margin: 44px 0 14px; }
.article h3 { font-size: 21px; margin: 30px 0 10px; }
.article p { margin: 14px 0; }
.article ul, .article ol { margin: 14px 0 14px 26px; }
.article li { margin: 7px 0; }
.article blockquote { border-left: 3px solid var(--red); padding: 4px 0 4px 20px; margin: 20px 0; color: var(--ink-soft); font-style: italic; }
.article table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 15px; }
.article th, .article td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.article th { background: var(--paper); font-family: var(--serif); }
.article .table-scroll { overflow-x: auto; }
.article img.inline-shot { max-width: 300px; border-radius: 16px; box-shadow: 0 10px 32px rgba(20,26,43,0.18); margin: 26px auto; }
.article hr { border: none; border-top: 1px solid var(--line); margin: 36px 0; }
.article strong { color: var(--ink); }

/* In-article CTA box */
.cta-box {
  background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--red);
  border-radius: 12px; padding: 26px 28px; margin: 36px 0;
}
.cta-box h3 { margin: 0 0 8px; font-size: 21px; }
.cta-box p { margin: 0 0 16px; color: var(--ink-soft); font-size: 15px; }

/* Related guides */
.related { border-top: 1px solid var(--line); margin-top: 48px; padding-top: 28px; }
.related h2 { font-size: 22px; margin: 0 0 16px; }
.related ul { list-style: none; margin: 0; }
.related li { margin: 10px 0; }

/* Legal pages */
.legal h2 { font-size: 24px; }
.legal .updated { font-size: 14px; color: var(--ink-soft); }

.center { text-align: center; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
