/* ============================================================
   TwoWays.AI / 双途智能 — one shared stylesheet for the EN and
   ZH trees and all blog posts. System fonts only, no webfonts,
   no CDN, no JS frameworks: hard performance / China-access
   requirement (§10 of the requirements).

   ACCENT DECISION (required by §9): deep teal #0f766e, used only
   for the primary CTA, links and small labels. Chosen over the
   alternative vermilion #e34234 because (a) vermilion reads as
   China-only/urgent marketing, while teal reads as sober and
   belongs to both audiences — foreign firms in China and Chinese
   SMEs going out — and (b) white-on-teal passes WCAG AA for
   normal text (~5.5:1) where white-on-vermilion (~3.9:1) fails.
   ============================================================ */

:root{
  --bg:#faf9f6;         /* near-white, warm */
  --soft:#f3f1ea;       /* chips, code, dashed slot fills */
  --ink:#14262e;        /* deep ink — 14.8:1 on --bg */
  --muted:#46565c;      /* secondary text — 7.3:1 on --bg */
  --rule:#ddd8ce;       /* hairline rules */
  --teal:#0f766e;       /* accent — 5.2:1 on --bg; white on it 5.5:1 */
  --teal-deep:#0b5a54;  /* accent hover */
  --line:#c9c2b4;       /* form borders */
  --maxw:64rem;
}

*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  margin:0;background:var(--bg);color:var(--ink);
  font:400 1rem/1.65 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,
    "Helvetica Neue",Arial,"PingFang SC","Hiragino Sans GB",
    "Microsoft YaHei","Noto Sans CJK SC",sans-serif;
}
:lang(zh-CN){line-height:1.75}
img,svg{max-width:100%}
h1,h2,h3,h4{line-height:1.3;margin:0 0 .6rem;font-weight:700}
h2{font-size:clamp(1.3rem,3vw,1.7rem)}
h3{font-size:1.0625rem}
p{margin:0 0 1rem}
a{color:var(--teal)}
a:hover{color:var(--teal-deep)}
ul,ol{margin:0 0 1rem;padding-left:1.35rem}
li{margin-bottom:.35rem}
code,kbd{font:.92em/1.4 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  background:var(--soft);padding:.08em .3em;border-radius:2px}
pre{overflow-x:auto}
pre code{background:none;padding:0}
dl,dd{margin:0}

.wrap{max-width:var(--maxw);margin-inline:auto;padding-inline:clamp(1rem,4vw,2rem)}
.narrow{max-width:46rem}
.more-link{margin-top:1.4rem}
.more-link a{font-weight:600;text-decoration:none}

/* --- focus & skip link (WCAG AA) --- */
:where(a,button,summary,input,textarea,select,[tabindex]):focus-visible{
  outline:2px solid var(--teal);outline-offset:2px;border-radius:2px}
.skip{position:absolute;left:-100vw;top:.5rem;z-index:20;background:var(--teal);
  color:#fff;padding:.55rem 1rem;border-radius:2px;text-decoration:none}
.skip:focus{left:.5rem}

/* --- founder-fill placeholders ([[CV: …]], [[TODO: …]] …) --- */
.ph{background:var(--soft);border:1px dashed #b9b2a3;color:var(--muted);
  padding:.06em .4em;border-radius:2px;font-size:.94em}

/* --- header: brand · lang selector (top right) · CTA · nav row --- */
.site-head{border-bottom:1px solid var(--rule)}
.head-grid{display:flex;flex-wrap:wrap;align-items:center;gap:.6rem 1.1rem;padding-block:.8rem}
.brand{font-weight:700;font-size:1.0625rem;color:var(--ink);text-decoration:none;
  margin-right:auto;white-space:nowrap}
.brand .zh{color:var(--muted);font-weight:500;margin-left:.4rem;font-size:.95em}
.head-right{display:flex;align-items:center;gap:.55rem 1rem;flex-wrap:wrap;justify-content:flex-end}
.lang{display:flex;align-items:center;gap:.15rem;font-size:.9375rem}
.lang a,.lang span{padding:.2rem .35rem;color:var(--muted);text-decoration:none}
.lang a:hover{color:var(--teal)}
.lang [aria-current]{color:var(--ink);font-weight:700;box-shadow:inset 0 -2px 0 var(--teal)}
.lang-missing{opacity:.45}
.btn{display:inline-block;background:var(--teal);color:#fff;text-decoration:none;
  font-weight:600;font-size:.9375rem;line-height:1.2;padding:.62rem 1.05rem;
  border:1px solid var(--teal);border-radius:2px}
.btn:hover{background:var(--teal-deep);border-color:var(--teal-deep);color:#fff}
.btn-ghost{background:transparent;color:var(--teal)}
.btn-ghost:hover{background:#e9f0ee;color:var(--teal-deep)}
.btn-head{padding:.5rem .8rem;font-size:.875rem}
.site-nav{display:flex;flex-wrap:wrap;gap:.1rem 1.35rem;padding-block:.5rem;
  font-size:.9375rem;overflow-x:auto}
.site-nav a{color:var(--muted);text-decoration:none;padding:.3rem 0;white-space:nowrap}
.site-nav a:hover{color:var(--teal)}
.site-nav [aria-current]{color:var(--ink);font-weight:600;box-shadow:inset 0 -2px 0 var(--teal)}

/* --- hero --- */
.hero{padding-block:clamp(2.4rem,7vw,4.2rem) clamp(2rem,5vw,3.2rem);border-bottom:1px solid var(--rule)}
.kicker{font-size:.8125rem;letter-spacing:.09em;text-transform:uppercase;
  color:var(--muted);margin:0 0 1.1rem;font-weight:600}
.hero h1{font-size:clamp(1.7rem,4.6vw,2.7rem);letter-spacing:-.01em;max-width:22ch}
.hero .lede{font-size:1.0625rem;color:var(--muted);max-width:40rem}
.hero-cta{display:flex;flex-wrap:wrap;gap:.9rem 1.15rem;align-items:center;margin-top:1.6rem}
.cta-sub{color:var(--muted);font-size:.9375rem}
.proof-line{margin-top:1.5rem;color:var(--muted);font-size:.9375rem}
/* --- sections --- */
section{padding-block:clamp(2rem,5vw,3rem)}
.section-head p{color:var(--muted);max-width:44rem;margin-top:-.2rem}
.final-cta{border-top:1px solid var(--rule)}
.final-cta p{max-width:44rem}
.final-cta .btn{margin-top:.4rem}
.page-head{padding-block:2.4rem 2rem;border-bottom:1px solid var(--rule)}
.page-head h1{font-size:clamp(1.6rem,3.6vw,2.2rem)}
.page-head .lede{color:var(--muted);max-width:44rem;margin-top:.2rem}

/* --- hairline grids: visible grid, thin rules, no boxes --- */
.grid{display:grid;gap:1px;background:var(--rule);border-block:1px solid var(--rule)}
.grid>*{background:var(--bg);padding:1.4rem 1.3rem;margin:0}
.grid3{grid-template-columns:repeat(3,1fr)}
.grid2{grid-template-columns:repeat(2,1fr)}
.num{font-size:1.7rem;font-weight:700;color:var(--teal);line-height:1;margin:0 0 .7rem}
.grid h3{margin-bottom:.45rem}
.grid .cell-p{color:var(--muted);margin:0}

/* --- home services preview --- */
.svc-list{list-style:none;margin:0;padding:0;border-top:1px solid var(--rule)}
.svc-list li{border-bottom:1px solid var(--rule);padding:1.05rem 0;display:grid;grid-template-columns:3rem 1fr;gap:.1rem 1rem;align-items:baseline}
.svc-list .sid{font-weight:700;color:var(--teal);font-size:.9375rem}
.svc-t{margin:0;font-weight:600;font-size:1.0625rem}
.svc-t a{color:var(--ink);text-decoration:none}
.svc-t a:hover{color:var(--teal)}
.tier{display:block;font-size:.6875rem;letter-spacing:.07em;text-transform:uppercase;color:var(--muted);font-weight:600;margin-top:.2rem}
.svc-list .sum{margin:.2rem 0 0;color:var(--muted)}

/* --- honest proof strip + evidence slots --- */
.honest h2{font-size:1.25rem}
.honest p{max-width:44rem;color:var(--muted)}
.slot{border:1px dashed #b9b2a3;background:var(--soft);color:var(--muted);padding:1.5rem 1.25rem;text-align:center;font-size:.9375rem;border-radius:2px}
.slot-line{color:var(--muted);font-size:.9375rem;margin-top:1.3rem}
.slot-photo{padding:2.6rem 1.25rem}

/* --- service cards (services page) --- */
.tier-block{margin-top:2.4rem}
.tier-kicker{font-size:.75rem;letter-spacing:.09em;text-transform:uppercase;font-weight:700;color:var(--teal);margin:0 0 .2rem}
.tier-meta{color:var(--muted);font-size:.9375rem;margin:0 0 1.2rem}
.svc{border-top:1px solid var(--ink);padding:1.4rem 0 1.7rem}
.svc + .svc{border-top:1px solid var(--rule)}
.svc h3{font-size:1.15rem;margin-bottom:.6rem}
.svc .pain{font-weight:600}
.anat{margin:1rem 0 0;padding:0;display:grid;gap:.6rem}
.anat>div{display:grid;grid-template-columns:6.8rem 1fr;gap:.9rem}
.anat dt{font-size:.75rem;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);padding-top:.28em;font-weight:600}
.anat dd{margin:0}
.notforyou{color:var(--muted)}
.svc-sub{border-top:1px solid var(--rule);margin-top:1.3rem;padding-top:1.2rem}
.svc-cta{margin-top:1.1rem}
.svc-cta a{font-weight:600;text-decoration:none}
.close-line{margin-top:2.2rem;font-size:1.0625rem;max-width:44rem}

/* --- method steps --- */
.steps{list-style:none;counter-reset:s;margin:0;padding:0;display:grid;grid-template-columns:repeat(4,1fr);gap:1px;background:var(--rule);border-block:1px solid var(--rule)}
.steps li{background:var(--bg);padding:1.4rem 1.25rem;counter-increment:s;margin:0}
.steps li::before{content:"0" counter(s);display:block;font-size:.8125rem;font-weight:700;letter-spacing:.08em;color:var(--teal);margin-bottom:.7rem}
.steps h3{margin-bottom:.4rem}
.steps p{color:var(--muted);margin:0}
.rules{display:grid;grid-template-columns:1fr 1fr;gap:1px;background:var(--rule);border-block:1px solid var(--rule);margin-top:2.4rem}
.rules>div{background:var(--bg);padding:1.4rem 1.3rem;margin:0}
.rules h3{margin-bottom:.45rem}
.rules p{margin:0;color:var(--muted)}
@media(max-width:860px){.grid3,.grid2,.steps,.rules{grid-template-columns:1fr}}

/* --- FAQ --- */
.faq{border-top:1px solid var(--rule)}
.faq details{border-bottom:1px solid var(--rule)}
.faq summary{cursor:pointer;list-style:none;position:relative;padding:1.05rem 2.4rem 1.05rem 0;font-weight:600}
.faq summary::-webkit-details-marker{display:none}
.faq summary::after{content:"+";position:absolute;right:.4rem;top:50%;transform:translateY(-50%);color:var(--teal);font-weight:700;font-size:1.3rem;line-height:1}
.faq details[open] summary::after{content:"–"}
.faq .a{padding:0 2.4rem 1.2rem 0}
.faq .a p{margin:0 0 .6rem;max-width:44rem}
/* --- footer --- */
.site-foot{border-top:1px solid var(--rule);margin-top:1rem}
.foot-grid{display:flex;flex-wrap:wrap;gap:1rem 2.5rem;justify-content:space-between;padding-block:2rem 1.4rem;font-size:.9375rem}
.foot-brand{font-weight:700}
.foot-note{font-size:.8125rem;color:var(--muted);font-weight:400}
.foot-col{min-width:8rem}
.foot-col h3{font-size:.75rem;letter-spacing:.07em;text-transform:uppercase;color:var(--muted);margin:0 0 .55rem}
.foot-col ul{list-style:none;margin:0;padding:0}
.foot-col li{margin:0 0 .4rem}
.foot-meta{border-top:1px solid var(--rule);padding-block:1rem 2rem;font-size:.8125rem;color:var(--muted);display:flex;flex-wrap:wrap;gap:.4rem 1.5rem;justify-content:space-between}
.foot-meta p{margin:0}
.foot-meta a{color:var(--muted)}

/* --- contact page --- */
.contact-grid{display:grid;grid-template-columns:minmax(0,26rem) minmax(0,1fr);gap:2.5rem;align-items:start}
@media(max-width:860px){.contact-grid{grid-template-columns:1fr}}
.tiny{font-size:.8125rem;color:var(--muted)}

/* --- forms --- */
.field{margin-bottom:1.15rem}
.field label{display:block;font-weight:600;margin-bottom:.3rem}
.req{color:var(--teal)}
.hint{display:block;font-weight:400;font-size:.8125rem;color:var(--muted);margin-top:.15rem}
input[type=text],input[type=email],textarea,select{width:100%;font:inherit;color:var(--ink);background:#fff;border:1px solid var(--line);border-radius:2px;padding:.55rem .7rem}
textarea{min-height:7.5rem;resize:vertical}
.checkline{display:flex;gap:.6rem;align-items:flex-start;margin-bottom:1.2rem}
.checkline input{margin-top:.35em;width:auto}
.checkline label{font-weight:400;color:var(--muted);font-size:.9375rem}
.alt-contact{border-top:1px solid var(--rule);margin-top:2rem;padding-top:1.4rem}
.alt-contact h3{margin-bottom:.4rem}
.err{color:#b42318;font-weight:600}

/* --- badges --- */
.badge{display:inline-block;font-size:.6875rem;letter-spacing:.05em;text-transform:uppercase;font-weight:700;color:var(--muted);background:var(--soft);border:1px solid var(--rule);border-radius:999px;padding:.25rem .65rem;vertical-align:middle}

/* --- blog --- */
.post-list{list-style:none;margin:0;padding:0}
.post-list li{border-top:1px solid var(--rule);padding:1.2rem 0}
.post-list li:last-child{border-bottom:1px solid var(--rule)}
.post-list time{font-size:.8125rem;color:var(--muted);letter-spacing:.03em}
.post-list h3{margin:.2rem 0 .3rem;font-size:1.15rem}
.post-list h3 a{color:var(--ink);text-decoration:none}
.post-list h3 a:hover{color:var(--teal)}
.post-list .sum{color:var(--muted);margin:0;max-width:44rem}
.article{padding-block:clamp(1.8rem,4vw,2.6rem) 2rem}
.article-header h1{font-size:clamp(1.5rem,3.4vw,2rem);max-width:30ch}
.byline{color:var(--muted);font-size:.9375rem;margin:.4rem 0 1.6rem}
.prose h2{margin-top:2.2rem}
.prose h3{margin-top:1.7rem}
.prose blockquote{margin:1.2rem 0;padding:.2rem 0 .2rem 1.1rem;border-left:3px solid var(--teal);color:var(--muted)}
.prose table{border-collapse:collapse;width:100%;margin:1.2rem 0;font-size:.9375rem}
.prose th,.prose td{border:1px solid var(--rule);padding:.5rem .65rem;text-align:left;vertical-align:top}
.prose th{background:var(--soft)}
.post-tags{margin:2.2rem 0 0;font-size:.8125rem;color:var(--muted)}
.foot-nav{margin-top:2.5rem;border-top:1px solid var(--rule);padding-top:1.4rem}
.foot-nav a{text-decoration:none;font-weight:600}
.noscript-note{background:var(--soft);border:1px solid var(--rule);padding:1rem 1.2rem;border-radius:2px;color:var(--muted);font-size:.9375rem}

/* --- blog post: related + author note --- */
.related{border-top:1px solid var(--rule);margin-top:2.6rem;padding-top:1.4rem}
.related h2{font-size:1.05rem}
.related p{color:var(--muted);margin:0}
.author-note{border:1px solid var(--rule);background:var(--soft);padding:1.3rem 1.4rem;margin-top:1.6rem;border-radius:2px}
.author-note h2{font-size:1.05rem;margin-bottom:.4rem}
.author-note p{margin:0;max-width:44rem}

/* small screens: let the header wrap gracefully */
@media(max-width:560px){
  .btn-head{padding:.5rem .7rem}
  .hero-cta{gap:.7rem}
}
