/* acbuyqc.org — hand-written stylesheet
   QC photo-evidence reference. Paper-white ground, near-black ink,
   indigo-grey hairlines. No gradients, no glow, no glassmorphism. */

/* ---------- design tokens ---------- */
:root {
  --bg: #fbfaf6;
  --surface: #ffffff;
  --surface-2: #f4f2ec;
  --ink: #17191d;
  --ink-soft: #40454d;
  --muted: #6c727b;
  --line: #e5e1d7;
  --line-strong: #d0ccc0;
  --accent: #3a3f5c;          /* indigo-grey */
  --accent-ink: #2b2f45;
  --tag-source-bg: #eceae3;
  --tag-source-ink: #4b4f57;
  --tag-qc-bg: #e7e8f2;
  --tag-qc-ink: #3a3f5c;
  --tag-none-bg: #f3ece2;
  --tag-none-ink: #7a5a34;
  --warn-bg: #fbf4e6;
  --warn-line: #e7d4a8;
  --warn-ink: #6d5320;
  --link: #35405f;
  --link-hover: #1f2740;
  --focus: #2b6cb0;

  --font: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --measure: 68ch;
  --wrap: 1200px;
  --radius: 6px;
  --gap-section: 56px;
  --gap-section-m: 40px;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--link); text-underline-offset: 2px; }
a:hover { color: var(--link-hover); }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 3px;
}
h1, h2, h3 { text-wrap: balance; margin: 0; }
p { margin: 0; }
ul, ol { margin: 0; }

/* ---------- typography scale (§17) ---------- */
h1, .h1 { font-size: 48px; font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; }
h2, .h2 { font-size: 28px; font-weight: 700; line-height: 1.3; }
h3, .h3 { font-size: 18px; font-weight: 600; line-height: 1.4; }
.small { font-size: 14px; }
.tiny { font-size: 13px; }

/* ---------- layout helpers ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 20px; }
.wrap-narrow { max-width: 760px; }
.stack > * + * { margin-top: var(--gap-section); }
.flow > * + * { margin-top: 16px; }
.flow-tight > * + * { margin-top: 8px; }
.eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 10px;
  display: inline-block; border-top: 2px solid var(--accent); padding-top: 6px;
}
.lede { font-size: 18px; line-height: 1.6; color: var(--ink-soft); max-width: 62ch; }
.muted { color: var(--muted); }
.divider { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* ---------- skip link ---------- */
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 60;
  background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 6px;
  transition: top .15s;
}
.skip:focus { top: 12px; color: #fff; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(251,250,246,0.94);
  backdrop-filter: saturate(1.1) blur(2px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 20px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -0.01em; color: var(--ink); text-decoration: none; font-size: 17px; white-space: nowrap; }
.brand:hover { color: var(--ink); }
.brand .mark { flex: none; }
.brand .brand-sub { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.nav { margin-left: auto; }
.nav ul { list-style: none; display: flex; align-items: center; gap: 4px; padding: 0; }
.nav a {
  display: inline-block; font-size: 14px; font-weight: 500; color: var(--ink-soft);
  text-decoration: none; padding: 8px 10px; border-radius: 6px; white-space: nowrap;
}
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
.menu-toggle {
  display: none; margin-left: auto; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--line-strong); color: var(--ink);
  font: inherit; font-size: 14px; font-weight: 600; padding: 8px 12px; border-radius: 6px; cursor: pointer;
}

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 72px; background: var(--surface); }
.site-footer .wrap { padding-block: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.footer-grid h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 12px; font-weight: 700; }
.footer-grid ul { list-style: none; padding: 0; }
.footer-grid li + li { margin-top: 8px; }
.footer-grid a { font-size: 14px; color: var(--ink-soft); text-decoration: none; }
.footer-grid a:hover { color: var(--ink); text-decoration: underline; }
.footer-note { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); max-width: 70ch; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  font-size: 15px; font-weight: 600; line-height: 1.2; text-decoration: none;
  padding: 11px 18px; border-radius: var(--radius); cursor: pointer;
  border: 1px solid transparent; transition: background .12s, border-color .12s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-ink); color: #fff; }
.btn-outline { background: var(--surface); border-color: var(--line-strong); color: var(--ink); }
.btn-outline:hover { border-color: var(--accent); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--link); padding: 8px 4px; }

/* ---------- search ---------- */
.search {
  display: flex; gap: 8px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line-strong);
  padding: 8px; border-radius: 10px; align-items: center;
}
.search input[type="search"] {
  flex: 1 1 220px; min-width: 0; font: inherit; font-size: 15px;
  border: 0; background: transparent; padding: 8px 10px; color: var(--ink);
}
.search input[type="search"]::placeholder { color: var(--muted); }
.search .btn { flex: none; }
.search-note { margin-top: 8px; font-size: 13px; color: var(--muted); }

/* ---------- hero ---------- */
.hero { padding-top: 44px; }
.hero .status-line {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600;
  color: var(--warn-ink); background: var(--warn-bg); border: 1px solid var(--warn-line);
  padding: 6px 12px; border-radius: 999px; margin-bottom: 18px;
}
.hero .status-line .dot { width: 8px; height: 8px; border-radius: 50%; background: #b98a2a; flex: none; }
.hero h1 { max-width: 16ch; }
.hero .lede { margin-top: 18px; }
.hero-actions { margin-top: 24px; display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- two-column evidence reading table + prose (§3) ---------- */
.two-col { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 40px; align-items: start; }
.two-col .prose { max-width: var(--measure); }

/* evidence reading table */
.evi-table { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); }
.evi-table .row { display: grid; grid-template-columns: 132px 1fr; gap: 0; border-top: 1px solid var(--line); }
.evi-table .row:first-child { border-top: 0; }
.evi-table .k { padding: 14px 16px; background: var(--surface-2); font-size: 13px; }
.evi-table .v { padding: 14px 16px; font-size: 14px; color: var(--ink-soft); line-height: 1.55; }

/* ---------- evidence badges ---------- */
.tag {
  display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; padding: 4px 8px; border-radius: 5px; white-space: nowrap;
}
.tag::before { content: ""; width: 7px; height: 7px; border-radius: 2px; flex: none; }
.tag-source { background: var(--tag-source-bg); color: var(--tag-source-ink); }
.tag-source::before { background: #8b8f97; }
.tag-qc { background: var(--tag-qc-bg); color: var(--tag-qc-ink); }
.tag-qc::before { background: var(--accent); }
.tag-none { background: var(--tag-none-bg); color: var(--tag-none-ink); }
.tag-none::before { background: #b98a2a; }

/* ---------- cards / grids ---------- */
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.grid-3 { display: grid; gap: 20px; grid-template-columns: repeat(3, 1fr); }
.grid-2 { display: grid; gap: 20px; grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  overflow: hidden; display: flex; flex-direction: column;
}
.card .thumb { position: relative; background: var(--surface-2); aspect-ratio: 1 / 1; overflow: hidden; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.card .thumb .tag { position: absolute; left: 10px; top: 10px; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card .cat { font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.card .title { font-size: 15px; font-weight: 600; line-height: 1.4; color: var(--ink); }
.card a.title-link { color: var(--ink); text-decoration: none; }
.card a.title-link:hover { text-decoration: underline; }
.card .meta { margin-top: auto; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding-top: 4px; }
.card .price { font-size: 15px; font-weight: 700; color: var(--ink); }
.card .price .cny { font-size: 12px; font-weight: 500; color: var(--muted); display: block; }
.card .qc-count { font-size: 12px; color: var(--accent); font-weight: 600; }
.card .qc-none { font-size: 12px; color: var(--muted); }

/* concept cards (feature-like but honest, text-led) */
.concept { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 20px; }
.concept h3 { margin-bottom: 8px; }
.concept p { font-size: 14px; color: var(--ink-soft); line-height: 1.6; }
.concept .tag { margin-bottom: 12px; }

/* see/cannot columns */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.split .col { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 20px 22px; }
.split .col h3 { font-size: 16px; margin-bottom: 12px; }
.split ul { list-style: none; padding: 0; }
.split li { position: relative; padding-left: 26px; font-size: 14px; color: var(--ink-soft); line-height: 1.55; }
.split li + li { margin-top: 10px; }
.split .can li::before { content: "✓"; position: absolute; left: 0; top: 0; color: #3f7d52; font-weight: 700; }
.split .cannot li::before { content: "✕"; position: absolute; left: 0; top: 0; color: #a6592f; font-weight: 700; }

/* checklist */
.checklist { list-style: none; padding: 0; counter-reset: step; display: grid; gap: 14px; }
.checklist li { position: relative; padding-left: 44px; }
.checklist li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--line-strong); color: var(--accent);
  font-size: 14px; font-weight: 700; display: grid; place-items: center;
}
.checklist h3 { font-size: 16px; margin-bottom: 2px; }
.checklist p { font-size: 14px; color: var(--ink-soft); }

/* ---------- section head ---------- */
.section-head { max-width: 62ch; margin-bottom: 24px; }
.section-head h2 + p { margin-top: 12px; }
.section-head .lede { font-size: 16px; }

/* ---------- callout / notes ---------- */
.note { border: 1px solid var(--line); border-left: 3px solid var(--accent); background: var(--surface); padding: 16px 18px; border-radius: 6px; font-size: 14px; color: var(--ink-soft); }
.note.warn { border-left-color: #c79a3a; background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn-ink); }
.note strong { color: var(--ink); }
.note.warn strong { color: var(--warn-ink); }

/* ---------- breadcrumb ---------- */
.crumbs { font-size: 13px; color: var(--muted); padding-top: 20px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; }
.crumbs li::after { content: "/"; margin-left: 6px; color: var(--line-strong); }
.crumbs li:last-child::after { content: ""; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- article ---------- */
.article { max-width: var(--measure); }
.article > * + * { margin-top: 20px; }
.article h2 { margin-top: 40px; }
.article h3 { margin-top: 28px; }
.article p, .article li { font-size: 16px; line-height: 1.7; color: var(--ink-soft); }
.article ul, .article ol { padding-left: 22px; }
.article li + li { margin-top: 8px; }
.article strong { color: var(--ink); }
.article .lede { color: var(--ink-soft); }
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; }
.toc h2 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 0 0 10px; }
.toc ul { list-style: none; padding: 0; }
.toc li + li { margin-top: 6px; }
.toc a { font-size: 14px; text-decoration: none; }
.toc a:hover { text-decoration: underline; }

/* ---------- product detail ---------- */
.product-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 40px; align-items: start; }
.product-media .main-shot { position: relative; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.product-media .main-shot .tag { position: absolute; left: 12px; top: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.product-media .main-shot img { width: 100%; height: auto; }
.product-info h1 { font-size: 32px; line-height: 1.2; }
.price-block { margin-top: 18px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.price-block .usd { font-size: 26px; font-weight: 800; color: var(--ink); }
.price-block .approx { font-size: 13px; color: var(--muted); font-weight: 600; }
.price-block .cny { font-size: 14px; color: var(--ink-soft); margin-top: 4px; }
.price-block .fx { font-size: 12px; color: var(--muted); margin-top: 8px; line-height: 1.5; }
.spec-list { list-style: none; padding: 0; margin-top: 18px; border-top: 1px solid var(--line); }
.spec-list li { display: grid; grid-template-columns: 130px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.spec-list .lbl { color: var(--muted); font-weight: 600; }
.spec-list .val { color: var(--ink-soft); }
.cta-stack { margin-top: 22px; display: flex; flex-direction: column; gap: 10px; }
.cta-stack .btn { width: 100%; }

/* QC gallery */
.qc-gallery { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.qc-gallery figure { margin: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface-2); }
.qc-gallery .ph { position: relative; aspect-ratio: 3 / 4; }
.qc-gallery .ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.qc-empty { border: 1px dashed var(--line-strong); border-radius: 10px; padding: 24px; background: var(--surface-2); font-size: 14px; color: var(--ink-soft); }

/* agent list */
.agent-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.agent-list li { font-size: 13px; font-weight: 600; color: var(--ink-soft); background: var(--surface-2); border: 1px solid var(--line); padding: 5px 10px; border-radius: 6px; }

/* category chips */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chips a { font-size: 14px; font-weight: 600; text-decoration: none; color: var(--ink-soft); background: var(--surface); border: 1px solid var(--line-strong); padding: 8px 14px; border-radius: 999px; }
.chips a:hover { border-color: var(--accent); color: var(--ink); }
.chips a[aria-current="page"] { background: var(--accent); color: #fff; border-color: var(--accent); }

/* count line */
.count-line { font-size: 14px; color: var(--muted); }

/* ---------- 404 ---------- */
.error-page { text-align: center; padding-block: 64px; }
.error-page .code { font-size: 64px; font-weight: 800; color: var(--accent); letter-spacing: -0.03em; }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .product-layout { grid-template-columns: 1fr; gap: 28px; }
  .two-col { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 860px) {
  :root { --gap-section: var(--gap-section-m); }
  .grid-3 { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; gap: 16px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
}
@media (max-width: 760px) {
  h1, .h1 { font-size: 32px; line-height: 1.2; }
  h2, .h2 { font-size: 22px; }
  h3, .h3 { font-size: 16px; }
  body { font-size: 15px; line-height: 1.6; }
  .lede { font-size: 16px; }
  .product-info h1 { font-size: 28px; }
  .nav { display: none; }
  .menu-toggle { display: inline-flex; }
  .site-header.open .nav { display: block; position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-bottom: 1px solid var(--line); padding: 8px 20px 16px; }
  .site-header.open .nav ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .site-header.open .nav a { padding: 10px 8px; font-size: 15px; }
  .header-inner { position: relative; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
  .card .body { padding: 12px 12px 14px; }
  .article p, .article li { font-size: 15px; }
}
@media (max-width: 460px) {
  .grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; }
}

/* ---------- motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* print */
@media print {
  .site-header, .site-footer, .search, .cta-stack { display: none; }
  body { background: #fff; }
}
