/* Chinese Grocery Guide — calm light aisle tool */
:root {
  --bg: #f7f6f3;
  --bg-card: #ffffff;
  --bg-soft: #efece6;
  --bg-callout: #fff8e8;
  --bg-skip: #fdeeee;
  --bg-buy: #eef8f1;
  --border: #ddd6c8;
  --border-soft: #ebe6dc;
  --text: #1c1917;
  --text-muted: #5c564e;
  --accent: #b45309;
  --accent-hover: #92400e;
  --accent-dim: rgba(180, 83, 9, 0.1);
  --link: #9a3412;
  --good: #166534;
  --warn: #92400e;
  --radius: 12px;
  --radius-sm: 8px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --tap: 44px;
  --max: 720px;
  --shadow: 0 1px 2px rgba(28, 25, 23, 0.04);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  font-size: 17px;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

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

.wrap {
  width: min(var(--max), 100% - 1.5rem);
  margin-inline: auto;
}

.wrap-wide {
  width: min(960px, 100% - 1.5rem);
  margin-inline: auto;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--border-soft);
  background: rgba(247, 246, 243, 0.92);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 40;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
  min-height: var(--tap);
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}
.brand:hover { text-decoration: none; }
.brand-name {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.02em;
  color: var(--text);
}
.brand-tag {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-toggle {
  display: none;
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  min-width: var(--tap);
  min-height: var(--tap);
  font: inherit;
  cursor: pointer;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
  align-items: center;
}

.site-nav a {
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.35rem 0;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
  text-decoration: none;
}
.site-nav a[aria-current="page"] {
  box-shadow: inset 0 -2px 0 var(--accent);
}

@media (max-width: 720px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding-bottom: 0.75rem;
  }
  .site-nav.is-open { display: flex; }
  .header-inner { flex-wrap: wrap; }
  .site-nav a { padding: 0.65rem 0; border-bottom: 1px solid var(--border-soft); }
}

/* Hero / page */
main { padding: 1.5rem 0 3rem; }

.hero {
  padding: 1.25rem 0 1.75rem;
}
.hero h1 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.75rem, 5vw, 2.35rem);
  line-height: 1.2;
  letter-spacing: -0.03em;
}
.hero .lede {
  margin: 0 0 1.25rem;
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 38rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  padding: 0.65rem 1.1rem;
  border-radius: var(--radius-sm);
  font: inherit;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-secondary {
  background: var(--bg-card);
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover { background: var(--bg-soft); color: var(--text); }

.trust-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-top: 1.25rem;
  padding: 0.85rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-size: 0.9rem;
  color: var(--text-muted);
}
.trust-bar strong { color: var(--text); font-weight: 600; }

/* Cards */
.section { margin: 2rem 0; }
.section h2 {
  margin: 0 0 0.85rem;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 1rem 1.05rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  text-decoration: none;
  color: inherit;
}
a.card:hover {
  border-color: var(--border);
  text-decoration: none;
}
.card h3 {
  margin: 0;
  font-size: 1.05rem;
}
.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.card .meta {
  margin-top: auto;
  padding-top: 0.5rem;
  font-size: 0.82rem;
  color: var(--accent);
  font-weight: 600;
}

.callout {
  background: var(--bg-callout);
  border: 1px solid #f0d9a8;
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  margin: 1rem 0;
}
.callout strong { color: var(--warn); }
.callout.rule {
  border-left: 4px solid var(--accent);
}

.placeholder-banner {
  background: #fef3c7;
  border: 1px dashed #d97706;
  color: #92400e;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  margin: 1rem 0;
  font-size: 0.95rem;
  font-weight: 600;
}

/* Article layout */
.article-header { margin-bottom: 1.25rem; }
.article-header .job {
  color: var(--text-muted);
  margin: 0.4rem 0 0.75rem;
}
.meta-line {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.quick-answer {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  margin: 1rem 0 1.5rem;
}
.quick-answer h2 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.toc {
  background: var(--bg-soft);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  margin: 0 0 1.5rem;
}
.toc h2 {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
}
.toc ol {
  margin: 0;
  padding-left: 1.2rem;
}
.toc a { color: var(--text); }

.article-section {
  margin: 1.75rem 0;
  padding-top: 0.25rem;
}
.article-section > h2 {
  margin: 0 0 0.75rem;
  font-size: 1.2rem;
  scroll-margin-top: 4.5rem;
}

.module-label {
  display: inline-block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  background: var(--bg-soft);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  margin-bottom: 0.45rem;
}

table.compare {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
}
table.compare th,
table.compare td {
  text-align: left;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: top;
}
table.compare th {
  background: var(--bg-soft);
  font-weight: 600;
}
table.compare tr:last-child td { border-bottom: 0; }

.buy-skip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
@media (max-width: 560px) {
  .buy-skip { grid-template-columns: 1fr; }
}
.buy-box, .skip-box {
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  border: 1px solid var(--border-soft);
}
.buy-box { background: var(--bg-buy); }
.skip-box { background: var(--bg-skip); }
.buy-box h3, .skip-box h3 { margin: 0 0 0.45rem; font-size: 1rem; }

.faq details {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.9rem;
  margin: 0.45rem 0;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
}
.faq details p { margin: 0.5rem 0 0; color: var(--text-muted); }

.disclaimer {
  margin-top: 2rem;
  padding: 1rem;
  background: var(--bg-soft);
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Checklist */
.checklist-chrome {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
  justify-content: space-between;
  margin: 1rem 0;
  padding: 0.85rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--text-muted);
}
.checklist-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.checklist-actions button {
  min-height: 40px;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  font: inherit;
  cursor: pointer;
}

.checklist-group {
  margin: 1.25rem 0;
}
.checklist-group h2 {
  margin: 0 0 0.65rem;
  font-size: 1.1rem;
  scroll-margin-top: 4.5rem;
}

.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
}
.checklist li {
  border-bottom: 1px solid var(--border-soft);
}
.checklist li:last-child { border-bottom: 0; }
.checklist label {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.85rem 1rem;
  min-height: var(--tap);
  cursor: pointer;
}
.checklist input[type="checkbox"] {
  width: 1.2rem;
  height: 1.2rem;
  margin-top: 0.15rem;
  flex-shrink: 0;
  accent-color: var(--accent);
}
.checklist .item-body { flex: 1; min-width: 0; }
.checklist .item-title { font-weight: 600; }
.checklist .item-note {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.checklist label.is-checked .item-title {
  text-decoration: line-through;
  color: var(--text-muted);
}

.progress {
  font-weight: 600;
  color: var(--text);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-soft);
  padding: 1.5rem 0 2rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.site-footer .wrap {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.1rem;
}
.footer-trust { max-width: 40rem; }

/* Print */
@media print {
  .site-header, .site-footer, .nav-toggle, .checklist-actions, .cta-row, .no-print {
    display: none !important;
  }
  body { background: #fff; color: #000; font-size: 12pt; }
  .checklist-chrome { border: 0; padding: 0; }
  .checklist, .card, .quick-answer { box-shadow: none; }
  a { color: inherit; text-decoration: none; }
  .checklist label { break-inside: avoid; }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
