/* ==========================================================================
   China Chita Inspection Co., Ltd. — cci-china.cc
   Design language: the visual grammar of a laboratory report / certificate.
   Hairline rules, small-caps labels, monospaced figures, no marketing gloss.
   No external requests (no CDN, no web fonts) — must work behind the GFW.
   ========================================================================== */

:root {
  /* Ink */
  --ink:      #14181C;
  --ink-2:    #39424A;
  --ink-3:    #6C767E;
  --ink-4:    #9AA2A8;

  /* Paper */
  --paper:    #FBFBF8;
  --paper-2:  #F2F2EC;
  --paper-3:  #E6E7DF;
  --rule:     #D5D7CE;
  --rule-2:   #E3E5DC;

  /* Brand — sampled from the CCI logo. The four arcs around the disc and the
     disc itself are the five elements (五行). The colours ARE the meaning:
     do not substitute, re-tint, drop or tone down any of them.
         木 wood  = green  #035B28 / #078754   (wordmark and cheetah)
         火 fire  = red    #D7332C             (upper arc)
         土 earth = gold   #EAC041             (the disc)
         金 metal = white  #FFFFFF             (the arc bearing "INDEPENDENT INSPECTION")
         水 water = black  #303333             (lower arc)
     --el-metal is how 金 is represented on a light ground, where pure white
     would vanish. */
  --accent:   #035B28;
  --accent-2: #EAC041;
  --accent-w: #EDF4EE;

  --el-wood:  #078754;
  --el-fire:  #D7332C;
  --el-earth: #EAC041;
  --el-metal: #C9CDD2;
  --el-water: #303333;

  /* Flag — the fire red, for the "what we do NOT do" marks. */
  --flag:     #D7332C;

  --measure:  68ch;
  --wrap:     1140px;
  --wrap-narrow: 780px;

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
          Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --serif: Georgia, "Iowan Old Style", "Source Serif 4", "Times New Roman",
           "Songti SC", "SimSun", serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas,
          "Liberation Mono", "Courier New", monospace;
}

/* --------------------------------------------------------------- reset -- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ------------------------------------------------------------ typography - */
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.9rem, 4.4vw, 3.1rem); line-height: 1.16; margin: 0 0 .6em; }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.95rem); line-height: 1.25; margin: 0 0 .7em; }
h3 { font-size: 1.13rem; line-height: 1.35; margin: 0 0 .5em; }
h4 { font-size: 1rem; margin: 0 0 .4em; }
p  { margin: 0 0 1.05em; }
p:last-child { margin-bottom: 0; }
strong { font-weight: 650; }

.eyebrow {
  font-family: var(--mono);
  font-size: .715rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 1.1em;
}
.eyebrow--accent { color: var(--accent); }
.lede { font-size: 1.13rem; line-height: 1.6; color: var(--ink-2); }
.muted { color: var(--ink-3); }
.small { font-size: .9rem; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- layout - */
.wrap { width: min(100% - 2.6rem, var(--wrap)); margin-inline: auto; }
.wrap--narrow { width: min(100% - 2.6rem, var(--wrap-narrow)); margin-inline: auto; }
section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
section + section { border-top: 1px solid var(--rule-2); }
.band { background: var(--paper-2); }
.band-ink { background: var(--ink); color: var(--paper); }
.band-ink h2, .band-ink h3 { color: #fff; }
.band-ink .eyebrow { color: var(--ink-4); }
.band-ink .muted { color: #A9B2B8; }
.band-ink a { color: #fff; border-bottom: 1px solid rgba(255,255,255,.35); }
.band-ink a:hover { color: var(--accent-2); border-bottom-color: var(--accent-2); }
.band-ink + section { border-top: 0; }

.grid { display: grid; gap: 1px; background: var(--rule-2); border: 1px solid var(--rule-2); }
/* Explicit column counts — auto-fit produced a 3+1 orphan on the 4-card rows. */
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid > * { background: var(--paper); padding: 1.7rem 1.6rem; }
.band-ink .grid { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.14); }
.band-ink .grid > * { background: var(--ink); }

/* ----------------------------------------------------------------- header */
.topline {
  background: var(--ink); color: #A9B2B8;
  font-family: var(--mono); font-size: .715rem; letter-spacing: .07em;
}
.topline .wrap { display: flex; flex-wrap: wrap; gap: 0 1.6rem; justify-content: space-between;
                 align-items: center; min-height: 34px; padding-block: 4px; }
.topline a { color: #D7DDE1; }
.topline a:hover { color: var(--accent-2); }
.topline__right { display: flex; align-items: center; gap: 1.1rem; }

.site-header { background: var(--paper); position: sticky; top: 0; z-index: 50; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between;
                     gap: 1.4rem; min-height: 82px; padding-block: .7rem; }
.brand { display: flex; align-items: center; gap: .85rem; }
.brand__mark { width: 56px; height: 56px; flex: 0 0 auto; }
.brand__name { display: block; font-family: var(--serif); font-size: 1.06rem; font-weight: 600; line-height: 1.2; letter-spacing: -.005em; }
.brand__sub { display: block; font-family: var(--mono); font-size: .655rem; letter-spacing: .13em;
              text-transform: uppercase; color: var(--ink-3); margin-top: .28em; white-space: nowrap; }

.nav { display: flex; align-items: center; gap: 1.45rem; }
.nav a { font-size: .885rem; color: var(--ink-2); padding: .35rem 0; position: relative; white-space: nowrap; }
.nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: 0;
                height: 1.5px; background: var(--accent); transition: right .22s ease; }
.nav a:hover::after, .nav a[aria-current="page"]::after { right: 0; }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }

.lang { display: flex; border: 1px solid var(--rule); font-family: var(--mono); font-size: .715rem; }
.lang button { appearance: none; border: 0; background: transparent; cursor: pointer;
               padding: .34rem .62rem; color: var(--ink-3); font: inherit; letter-spacing: .06em;
               white-space: nowrap; }
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.lang button:not([aria-pressed="true"]):hover { color: var(--accent); }

.nav-toggle { display: none; appearance: none; background: none; border: 1px solid var(--rule);
              padding: .42rem .6rem; cursor: pointer; font-family: var(--mono); font-size: .7rem;
              letter-spacing: .1em; color: var(--ink-2); }

/* The five elements as the brand's signature rule. Order is the generating
   cycle 木火土金水. This rule is the header's bottom edge — the five colours
   are the point, so it is not decoration to be trimmed. */
.elementrule { display: flex; height: 3px; }
.elementrule i { flex: 1 1 0; }
.elementrule i:nth-child(1) { background: var(--el-wood); }
.elementrule i:nth-child(2) { background: var(--el-fire); }
.elementrule i:nth-child(3) { background: var(--el-earth); }
.elementrule i:nth-child(4) { background: var(--el-metal); }
.elementrule i:nth-child(5) { background: var(--el-water); }

/* ------------------------------------------------------------------ hero - */
.hero { padding: clamp(3.2rem, 8vw, 6rem) 0 clamp(2.6rem, 6vw, 4.4rem); }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.62fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.2rem); align-items: start; }
.hero h1 { max-width: 19ch; }
.hero .lede { max-width: 56ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.9rem; }

.btn { display: inline-flex; align-items: center; gap: .5rem; padding: .72rem 1.32rem;
       font-size: .9rem; font-weight: 600; border: 1px solid var(--ink); background: var(--ink);
       color: var(--paper); transition: background .16s ease, color .16s ease; }
.btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn--ghost:hover { background: transparent; color: var(--accent); border-color: var(--accent); }
.band-ink .btn { background: #fff; border-color: #fff; color: var(--ink); }
.band-ink .btn:hover { background: var(--accent-2); border-color: var(--accent-2); color: var(--ink); }
.band-ink .btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }

/* --------------------------------------------------------- spec panel --- */
/* Right-hand "docket" — the facts strip. Borrowed from a certificate face. */
.docket { border: 1px solid var(--rule); background: var(--paper-2); }
.docket__head { font-family: var(--mono); font-size: .69rem; letter-spacing: .15em;
                text-transform: uppercase; color: var(--ink-3);
                padding: .7rem 1.1rem; border-bottom: 1px solid var(--rule); }
.docket dl { margin: 0; }
.docket__row { display: grid; grid-template-columns: 6.6rem 1fr; gap: .9rem;
               padding: .68rem 1.1rem; border-bottom: 1px solid var(--rule-2); }
.docket__row:last-child { border-bottom: 0; }
.docket dt { font-family: var(--mono); font-size: .675rem; letter-spacing: .1em;
             text-transform: uppercase; color: var(--ink-3); padding-top: .18em; }
.docket dd { margin: 0; font-size: .92rem; line-height: 1.5; }

/* ------------------------------------------------------------ hairline --- */
.hairline { border: 0; border-top: 1px solid var(--rule); margin: 2.6rem 0; }

/* ---------------------------------------------------------- brand block -- */
/* Full lockup on a light ground. Never place it on .band-ink — the dark green
   wordmark all but disappears against #14181C. */
.brandblock { display: flex; justify-content: center; padding-block: 2.1rem; }
.brandblock img { width: min(300px, 74vw); height: auto; }

/* --------------------------------------------------------------- notice -- */
.notice { border: 1px solid var(--accent); background: var(--accent-w); padding: 1.15rem 1.3rem; }
.notice__label { font-family: var(--mono); font-size: .69rem; letter-spacing: .15em;
                 text-transform: uppercase; color: var(--accent); margin: 0 0 .5em; }
.notice p { margin: 0; font-size: .95rem; }
.band-ink .notice { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.28); }
.band-ink .notice__label { color: var(--accent-2); }

.flag { border-left: 3px solid var(--flag); background: #FBF3F1; padding: 1rem 1.2rem; }
.flag__label { font-family: var(--mono); font-size: .69rem; letter-spacing: .15em;
               text-transform: uppercase; color: var(--flag); margin: 0 0 .45em; }

/* ----------------------------------------------------------------- lists - */
.deflist { list-style: none; margin: 0; padding: 0; }
.deflist li { padding: .78rem 0; border-bottom: 1px solid var(--rule-2); display: grid;
              grid-template-columns: 1.5rem 1fr; gap: .85rem; align-items: start; }
.deflist li:last-child { border-bottom: 0; }
.deflist li::before { content: "—"; color: var(--accent); font-family: var(--mono); }
.band-ink .deflist li { border-bottom-color: rgba(255,255,255,.13); }
.band-ink .deflist li::before { color: var(--accent-2); }

.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { padding: .58rem 0 .58rem 1.75rem; position: relative; border-bottom: 1px solid var(--rule-2); }
.checklist li:last-child { border-bottom: 0; }
.checklist li::before { content: ""; position: absolute; left: .1rem; top: 1.02rem;
                        width: .5rem; height: .28rem; border-left: 1.6px solid var(--accent);
                        border-bottom: 1.6px solid var(--accent); transform: rotate(-45deg); }
.band-ink .checklist li { border-bottom-color: rgba(255,255,255,.13); }
.band-ink .checklist li::before { border-color: var(--accent-2); }

.crosslist { list-style: none; margin: 0; padding: 0; }
.crosslist li { padding: .58rem 0 .58rem 1.75rem; position: relative; border-bottom: 1px solid var(--rule-2); }
.crosslist li:last-child { border-bottom: 0; }
.crosslist li::before, .crosslist li::after { content: ""; position: absolute; left: .15rem; top: 1.16rem;
                                              width: .62rem; height: 1.6px; background: var(--flag); }
.crosslist li::before { transform: rotate(45deg); }
.crosslist li::after  { transform: rotate(-45deg); }

/* --------------------------------------------------------------- steps --- */
.steps { counter-reset: s; list-style: none; margin: 0; padding: 0;
         border-top: 1px solid var(--rule-2); }
.steps li { counter-increment: s; display: grid; grid-template-columns: 3.1rem 1fr;
            gap: 1.1rem; padding: 1.15rem 0; border-bottom: 1px solid var(--rule-2); }
.steps li::before { content: counter(s, decimal-leading-zero);
                    font-family: var(--mono); font-size: .8rem; color: var(--accent);
                    letter-spacing: .05em; padding-top: .22em; }

/* -------------------------------------------------------------- service -- */
.svc { display: grid; gap: 1.1rem; }
.svc__no { font-family: var(--mono); font-size: .7rem; letter-spacing: .14em; color: var(--accent); }
.svc h3 { margin-bottom: .45rem; }
.svc__meta { border-top: 1px solid var(--rule-2); margin-top: 1.15rem; padding-top: .9rem; }
.svc__meta dt { font-family: var(--mono); font-size: .665rem; letter-spacing: .11em;
                text-transform: uppercase; color: var(--ink-3); margin-bottom: .22rem; }
.svc__meta dd { margin: 0 0 .85rem; font-size: .9rem; line-height: 1.55; }
.svc__meta dd:last-child { margin-bottom: 0; }

/* ---------------------------------------------------------------- table -- */
.spec { width: 100%; border-collapse: collapse; font-size: .92rem; }
.spec th, .spec td { text-align: left; padding: .78rem 1rem; border-bottom: 1px solid var(--rule-2); vertical-align: top; }
.spec th { font-family: var(--mono); font-size: .675rem; letter-spacing: .11em;
           text-transform: uppercase; color: var(--ink-3); font-weight: 500; background: var(--paper-2); }
.spec td:first-child { font-family: var(--mono); font-size: .82rem; color: var(--ink-2); white-space: nowrap; }
.spec tr:last-child td { border-bottom: 0; }

/* ------------------------------------------------------------------ cta -- */
.cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.6rem; }
.cta__actions { display: flex; flex-wrap: wrap; gap: .7rem; }

/* --------------------------------------------------------------- footer -- */
.site-footer { background: var(--ink); color: #A9B2B8; font-size: .885rem; padding: 3.2rem 0 1.6rem; }
.site-footer a { color: #D7DDE1; }
.site-footer a:hover { color: var(--accent-2); }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(auto-fit, minmax(160px, 1fr));
             gap: 2.2rem 2rem; padding-bottom: 2.2rem; border-bottom: 1px solid rgba(255,255,255,.14); }
.foot-brand__name { font-family: var(--serif); font-size: 1.05rem; color: #fff; margin-bottom: .5rem; }
.foot-h { font-family: var(--mono); font-size: .67rem; letter-spacing: .14em; text-transform: uppercase;
          color: #fff; margin: 0 0 .85rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { padding: .24rem 0; }
.foot-note { padding-top: 1.5rem; display: grid; gap: 1.1rem; }
.foot-sig { font-family: var(--mono); font-size: .72rem; letter-spacing: .13em;
            text-transform: uppercase; color: var(--accent-2); }
.foot-legal { font-size: .79rem; line-height: 1.6; color: #7E888F; max-width: 92ch; }

/* ---------------------------------------------------------- responsive --- */
@media (max-width: 1040px) {
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero h1 { max-width: none; }
  .grid--2, .grid--3 { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .grid--4 { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .nav-toggle { display: block; }
  .nav { position: absolute; left: 0; right: 0; top: 100%; flex-direction: column;
         align-items: stretch; gap: 0; background: var(--paper);
         border-bottom: 1px solid var(--rule); padding: .4rem 1.3rem 1rem; display: none; }
  .nav.is-open { display: flex; }
  .nav a { padding: .78rem 0; border-bottom: 1px solid var(--rule-2); }
  .nav a::after { display: none; }
  .site-header .wrap { position: relative; flex-wrap: wrap; }
  .topline .wrap { justify-content: center; }
  .topline__right { gap: .8rem; }
  .docket__row { grid-template-columns: 1fr; gap: .1rem; }
  .spec td:first-child { white-space: normal; }
  .cta { flex-direction: column; align-items: flex-start; }
}

/* ---------------------------------------------------------------- print -- */
@media print {
  .topline, .site-header, .site-footer, .hero__actions, .cta__actions { display: none; }
  body { background: #fff; font-size: 11pt; }
  section { padding: 1.2rem 0; }
  a { color: #000; }
}

/* ------------------------------------------------------------- utility --- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
           overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: 1.4rem; }
.mt-3 { margin-top: 2.2rem; }
