/* ==========================================================================
   Qiwang Technology — company site
   Palette: warm paper, deep green, clay accent
   No external fonts, no external scripts, no CDN.
   ========================================================================== */

:root {
  --paper:    #FBF8F3;
  --paper-2:  #F3EDE3;
  --paper-3:  #EDE5D8;
  --ink:      #1B1A17;
  --ink-2:    #35322C;
  --muted:    #6C675D;
  --line:     #E0D8C8;
  --line-2:   #CFC4AF;
  --green:    #2E4739;
  --green-2:  #3D5C4B;
  --green-3:  #5B7A67;
  --clay:     #A9613F;
  --sand:     #C6A176;

  --serif: ui-serif, Georgia, "Iowan Old Style", "Times New Roman", "Songti SC", "STSong", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue",
          "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;

  --w: 1140px;
  --pad: 28px;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; display: block; }

a {
  color: var(--green-2);
  text-decoration: none;
  border-bottom: 1px solid rgba(46, 71, 57, .28);
  transition: border-color .18s ease, color .18s ease;
}
a:hover { color: var(--green); border-bottom-color: var(--green); }

h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--ink);
  font-weight: 400;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 1.05em; }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0 0 1.05em; padding-left: 1.15em; }
li { margin-bottom: .45em; }
li:last-child { margin-bottom: 0; }

strong { color: var(--ink); font-weight: 600; }

/* ---------- layout ------------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--w);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.section { padding: 80px 0; }
.section--tight { padding: 52px 0; }
.section--flush-top { padding-top: 0; }

.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

.skip {
  position: absolute; left: -9999px;
  background: var(--green); color: #fff; padding: 10px 18px; z-index: 99;
}
.skip:focus { left: 12px; top: 12px; }

/* ---------- header ------------------------------------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 248, 243, .92);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 26px;
  min-height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  border: 0;
  color: var(--ink);
  flex: 0 0 auto;
}
.brand:hover { color: var(--ink); }
.brand__mark { width: 30px; height: 30px; flex: 0 0 auto; }
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__name {
  font-family: var(--serif);
  font-size: 19px;
  letter-spacing: .02em;
  color: var(--ink);
}
.brand__sub {
  font-size: 9.5px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 3px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  flex-wrap: wrap;
}
.nav a {
  border: 0;
  color: var(--ink-2);
  font-size: 14.5px;
  padding: 8px 12px;
  border-radius: 6px;
  transition: background .16s ease, color .16s ease;
}
.nav a:hover { background: var(--paper-2); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--green); font-weight: 600; }

.lang {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 10px;
  padding-left: 16px;
  border-left: 1px solid var(--line);
  font-size: 13px;
  letter-spacing: .04em;
}
.lang a { border: 0; color: var(--muted); padding: 4px 2px; }
.lang a:hover { color: var(--ink); }
.lang .on { color: var(--ink); font-weight: 600; }
.lang .sep { color: var(--line-2); }

/* ---------- hero -------------------------------------------------------- */

.hero { padding: 84px 0 78px; }
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr);
  gap: 68px;
  align-items: center;
}

.eyebrow {
  font-size: 11px;
  letter-spacing: .17em;
  text-transform: uppercase;
  color: var(--clay);
  margin: 0 0 20px;
  font-weight: 600;
}

.hero h1 {
  font-size: clamp(2.5rem, 4.6vw, 3.75rem);
  line-height: 1.06;
  letter-spacing: -0.026em;
  margin-bottom: 22px;
}

.lede {
  font-size: 18px;
  line-height: 1.68;
  color: var(--muted);
  max-width: 44ch;
  margin-bottom: 30px;
}

.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 7px;
  border: 1px solid var(--green);
  background: var(--green);
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .01em;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.btn:hover { background: var(--green-2); border-color: var(--green-2); color: #fff; }
.btn:active { transform: translateY(1px); }

.btn--ghost {
  background: transparent;
  color: var(--green);
  border-color: var(--line-2);
}
.btn--ghost:hover {
  background: var(--paper-2);
  border-color: var(--green-3);
  color: var(--green);
}

.hero__note {
  margin-top: 26px;
  font-size: 13px;
  color: var(--muted);
  display: flex;
  align-items: flex-start;
  gap: 9px;
}
.hero__note svg { width: 15px; height: 15px; flex: 0 0 auto; margin-top: 4px; }

/* collage */
.collage {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}
.collage__cell {
  border-radius: 14px;
  overflow: hidden;
  background: var(--paper-2);
  border: 1px solid var(--line);
  aspect-ratio: 1 / 1;
}
.collage__cell svg,
.collage__cell img { width: 100%; height: 100%; object-fit: cover; }

.tile-brand {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  background: var(--green);
  color: #EFE8DA;
}
.tile-brand__word {
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: .2em;
  color: #F4EEE1;
}
.tile-brand__meta {
  font-size: 9.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #9FB2A4;
  line-height: 1.5;
}

/* ---------- section heading -------------------------------------------- */

.sec-head { max-width: 60ch; margin-bottom: 46px; }
.sec-head h2 {
  font-size: clamp(1.75rem, 2.9vw, 2.4rem);
  line-height: 1.16;
  margin-bottom: 14px;
}
.sec-head p { color: var(--muted); font-size: 17px; margin: 0; }

/* ---------- category cards --------------------------------------------- */

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
}
.card {
  padding: 30px 28px 6px 0;
  border-right: 1px solid var(--line);
}
.card:last-child { border-right: 0; padding-right: 0; }
.card:nth-child(n+2) { padding-left: 28px; }

.card__tag {
  font-size: 10.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--clay);
  font-weight: 600;
  margin-bottom: 12px;
}
.card h3 {
  font-size: 1.32rem;
  line-height: 1.28;
  margin-bottom: 10px;
}
.card p { color: var(--muted); font-size: 15.5px; line-height: 1.62; margin: 0; }

/* ---------- numbered steps --------------------------------------------- */

.steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 60px;
}
.step {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 18px;
  padding: 26px 0;
  border-top: 1px solid var(--line);
}
.step__n {
  font-family: var(--serif);
  font-size: 15px;
  color: var(--clay);
  letter-spacing: .08em;
  padding-top: 3px;
}
.step h3 { font-size: 1.1rem; margin-bottom: 7px; }
.step p { font-size: 15.5px; color: var(--muted); margin: 0; line-height: 1.6; }

/* ---------- brand band -------------------------------------------------- */

.band {
  background: var(--green);
  color: #EDE7DA;
  padding: 76px 0;
}
.band .wrap {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 64px;
  align-items: center;
}
.band__word {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  letter-spacing: .13em;
  color: #F6F1E6;
  line-height: 1;
  margin-bottom: 18px;
}
.band p { color: #C9D3C8; font-size: 16px; line-height: 1.7; }
.band .eyebrow { color: var(--sand); }

.band__facts { border-top: 1px solid rgba(255,255,255,.18); }
.band__fact {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 16px;
  padding: 15px 0;
  border-bottom: 1px solid rgba(255,255,255,.18);
  font-size: 14.5px;
}
.band__fact dt { color: #9FB2A4; letter-spacing: .03em; }
.band__fact dd { margin: 0; color: #F1EBDD; }

/* ---------- product rows ------------------------------------------------ */

.prow {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 64px;
  align-items: center;
  padding: 72px 0;
  border-top: 1px solid var(--line);
}
.prow:first-of-type { border-top: 0; padding-top: 8px; }
.prow--rev .prow__media { order: 2; }

.prow__media {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--paper-2);
  aspect-ratio: 1 / 1;
}
.prow__media svg,
.prow__media img { width: 100%; height: 100%; object-fit: cover; }

.prow__body h2 {
  font-size: clamp(1.6rem, 2.6vw, 2.15rem);
  line-height: 1.15;
  margin-bottom: 14px;
}
.prow__body > p { color: var(--muted); }

.specs {
  list-style: none;
  padding: 0;
  margin: 26px 0 0;
  border-top: 1px solid var(--line);
}
.specs li {
  position: relative;
  padding: 11px 0 11px 24px;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  color: var(--ink-2);
  margin: 0;
}
.specs li::before {
  content: "";
  position: absolute;
  left: 2px; top: 20px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green-3);
}

/* ---------- data table -------------------------------------------------- */

.table-wrap { overflow-x: auto; margin: 0 0 1.2em; }
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
table.data th, table.data td {
  text-align: left;
  padding: 12px 16px 12px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
table.data th {
  font-weight: 600;
  color: var(--ink);
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line-2);
  padding-bottom: 10px;
  white-space: nowrap;
}
table.data tr:last-child td { border-bottom: 0; }

/* ---------- CTA --------------------------------------------------------- */

.cta {
  background: var(--paper-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 72px 0;
  text-align: center;
}
.cta h2 {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  margin-bottom: 14px;
}
.cta p {
  color: var(--muted);
  max-width: 52ch;
  margin: 0 auto 28px;
}

/* ---------- footer ------------------------------------------------------ */

.site-footer {
  padding: 60px 0 40px;
  font-size: 14px;
  color: var(--muted);
}
.foot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line);
}
.foot-brand .brand { margin-bottom: 16px; }
.foot-brand p { font-size: 14px; line-height: 1.65; max-width: 34ch; margin-bottom: 14px; }
.foot-col h4 {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--ink);
  font-weight: 600;
  margin: 0 0 14px;
}
.foot-col ul { list-style: none; padding: 0; margin: 0; }
.foot-col li { margin-bottom: 9px; }
.foot-col a { border: 0; color: var(--muted); }
.foot-col a:hover { color: var(--ink); }

.foot-legal {
  padding-top: 24px;
  font-size: 12.5px;
  color: var(--muted);
}
.foot-legal__amazon {
  font-size: 11.5px;
  line-height: 1.65;
  color: var(--muted);
  max-width: 82ch;
  margin: 0 0 16px;
}
.foot-legal__row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  align-items: baseline;
}
.foot-legal a { border: 0; color: var(--muted); }
.foot-legal a:hover { color: var(--ink); }
.foot-legal .spacer { flex: 1 1 auto; }

/* ---------- prose (legal) ---------------------------------------------- */

.prose { max-width: 760px; }
.prose h2 {
  font-size: 1.4rem;
  margin: 44px 0 12px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.prose h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.prose h3 {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  margin: 26px 0 8px;
  letter-spacing: 0;
}
.prose p, .prose li { font-size: 15.5px; line-height: 1.72; }
.prose .meta {
  font-size: 13px;
  color: var(--muted);
  padding: 12px 16px;
  background: var(--paper-2);
  border-left: 3px solid var(--line-2);
  margin-bottom: 32px;
}
.prose .meta strong { color: var(--ink-2); }

.page-head {
  padding: 66px 0 40px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 48px;
}
.page-head h1 {
  font-size: clamp(2rem, 3.6vw, 2.9rem);
  line-height: 1.1;
  margin-bottom: 14px;
}
.page-head p { color: var(--muted); max-width: 58ch; font-size: 17px; margin: 0; }

/* ---------- misc -------------------------------------------------------- */

.note {
  font-size: 13.5px;
  color: var(--muted);
  background: var(--paper-2);
  border-left: 3px solid var(--sand);
  padding: 14px 18px;
  margin: 24px 0 0;
}
.note a { border-bottom-color: rgba(46,71,57,.2); }

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: 64px;
}
.contact-list { border-top: 1px solid var(--line); }
.contact-item {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 18px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15.5px;
}
.contact-item dt { color: var(--muted); font-size: 13.5px; letter-spacing: .02em; padding-top: 2px; }
.contact-item dd { margin: 0; color: var(--ink-2); }
.contact-item dd a { border-bottom-color: rgba(46,71,57,.25); }

.addr { font-style: normal; line-height: 1.75; }

/* ---------- responsive -------------------------------------------------- */

@media (max-width: 940px) {
  .hero__grid { grid-template-columns: 1fr; gap: 46px; }
  .lede { max-width: none; }
  .cards { grid-template-columns: 1fr; }
  .card { border-right: 0; padding: 26px 0; border-bottom: 1px solid var(--line); }
  .card:nth-child(n+2) { padding-left: 0; }
  .card:last-child { border-bottom: 0; }
  .steps { grid-template-columns: 1fr; }
  .band .wrap { grid-template-columns: 1fr; gap: 40px; }
  .prow { grid-template-columns: 1fr; gap: 34px; padding: 52px 0; }
  .prow--rev .prow__media { order: 0; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
  .legal-head { grid-template-columns: minmax(0, 1fr); gap: 30px; align-items: start; }
  .legal-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .toc { display: none; }
  .split { grid-template-columns: minmax(0, 1fr); gap: 34px; }
  .section { padding: 68px 0; }
}

@media (max-width: 700px) {
  body { font-size: 16px; }
  :root { --pad: 20px; }
  .site-header .wrap { min-height: 62px; gap: 12px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
  .nav { width: 100%; margin-left: 0; order: 3; gap: 0; }
  .nav a { padding: 7px 9px; font-size: 13.5px; }
  .lang { margin-left: auto; border-left: 0; padding-left: 0; }
  .hero { padding: 52px 0 46px; }
  .section { padding: 48px 0; }
  .page-head { padding: 44px 0 28px; margin-bottom: 34px; }
  .contact-item, .band__fact { grid-template-columns: 1fr; gap: 4px; }
  .foot-grid { grid-template-columns: 1fr; }
  .collage { gap: 9px; }
  .step { grid-template-columns: 34px minmax(0, 1fr); gap: 12px; }
}

@media print {
  .site-header, .site-footer, .cta, .band { break-inside: avoid; }
  body { background: #fff; }
}

/* ---------- legal pages: meta head + sticky contents rail ----------------- */

.legal-head,
.legal-grid {
  max-width: 1010px;
}

.legal-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 56px;
  align-items: end;
}
.legal-head__main { min-width: 0; }

.legal-meta {
  margin: 0;
  border-top: 1px solid var(--line-2);
}
.legal-meta > div {
  padding: 10px 0 11px;
  border-bottom: 1px solid var(--line);
}
.legal-meta dt {
  font-size: 10px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.legal-meta dd {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-2);
}

.legal-grid {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}
.legal-grid .prose { max-width: 70ch; }

.toc {
  position: sticky;
  top: 96px;
}
.toc__title {
  font-size: 10px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 12px;
}
.toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--line);
}
.toc li { margin: 0; }
.toc a {
  display: block;
  padding: 5px 0 5px 14px;
  margin-left: -1px;
  border: 0;
  border-left: 2px solid transparent;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.toc a:hover {
  color: var(--ink);
  border-left-color: var(--line-2);
}
.prose h2 { scroll-margin-top: 96px; }

/* ---------- text + side rail -------------------------------------------- */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 64px;
  align-items: start;
}
.rail { min-width: 0; }

.rail-facts {
  margin: 0;
  border-top: 1px solid var(--line-2);
}
.rail-facts > div {
  padding: 12px 0 13px;
  border-bottom: 1px solid var(--line);
}
.rail-facts dt {
  font-size: 10px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.rail-facts dd {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ink-2);
}

.rail-card {
  display: block;
  padding: 24px 22px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper-2);
}
.rail-card:hover { background: var(--paper-3); }
.rail-card__label {
  display: block;
  font-size: 10px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--clay);
  margin-bottom: 9px;
}
.rail-card__title {
  display: block;
  font-family: var(--serif);
  font-size: 1.1rem;
  line-height: 1.3;
  color: var(--ink);
  margin-bottom: 7px;
}
.rail-card__text {
  display: block;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--muted);
}

/* ---------- late overrides (must follow the base rules above) ------------- */

@media (max-width: 940px) {
  .legal-head {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    align-items: start;
  }
  .legal-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  .toc { display: none; }
  .split { grid-template-columns: minmax(0, 1fr); gap: 32px; }
}

@media (max-width: 700px) {
  .legal-meta > div { padding: 9px 0 10px; }
  .rail-card { padding: 20px 18px; }
}

/* ---------- paragraph wrapping ------------------------------------------ */

p, li { text-wrap: pretty; }

.lede,
.page-head p,
.sec-head p,
.cta p,
.hero__note,
.prose .meta {
  text-wrap: balance;
}

/* ---------- page head with a right-hand index ---------------------------- */

.page-head--split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 56px;
  align-items: end;
}
.page-head__main { min-width: 0; }

.head-nav {
  border-top: 1px solid var(--line-2);
}
.head-nav a {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
  padding: 12px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.4;
}
.head-nav a:hover { color: var(--green); }
.head-nav span {
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--clay);
}

.prow { scroll-margin-top: 90px; }

@media (max-width: 940px) {
  .page-head--split {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
    align-items: start;
  }
  .head-nav { margin-top: 2px; }
}

/* ---------- let short standfirsts run on one line ------------------------ */

.sec-head {
  max-width: 820px;
}
.sec-head p {
  max-width: none;
}
.cta p {
  max-width: 780px;
}
.page-head p {
  max-width: 720px;
}

@media (max-width: 940px) {
  .sec-head,
  .cta p,
  .page-head p {
    max-width: none;
  }
}

/* ---------- balance short-form copy (long body text falls back) ---------- */

.card p,
.note,
.band p,
.prow__body > p,
.rail-card__text,
.split .prose p,
.prose .meta,
.toc__title {
  text-wrap: balance;
}
