/* Sub-pages: blog, free audit, cost calculator, checklist. Loaded after styles.css. */

.nav a.lang { display: inline-block; text-decoration: none; }
.nav a.lang:hover { color: var(--ink); }

.page-hero { padding-top: clamp(40px, 6vw, 80px); padding-bottom: clamp(28px, 4vw, 48px); }
.page-title {
  font: 400 clamp(40px, 6vw, 84px)/1 var(--serif); letter-spacing: -0.02em;
  max-width: 16ch; text-wrap: balance;
}
.page-title em { font-style: italic; color: var(--accent); }
.page-lede { margin-top: 22px; max-width: 58ch; font-size: clamp(16px, 1.5vw, 19px); color: var(--ink-2); }
.mini-h { font: 400 12px/1.3 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); }

html[lang="zh-CN"] .page-title { font-weight: 500; letter-spacing: 0; line-height: 1.2; max-width: 14em; }
html[lang="zh-CN"] .page-title em,
html[lang="zh-CN"] .prose em { font-style: normal; }
html[lang="zh-CN"] .page-lede,
html[lang="zh-CN"] .prose { line-height: 1.85; }
html[lang="zh-CN"] .mini-h { letter-spacing: 0.04em; }

/* Buttons */
.btn-ink {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; cursor: pointer; text-decoration: none;
  background: var(--ink); color: var(--paper);
  font: 500 15px/1 var(--sans); padding: 16px 24px; border-radius: 999px;
  transition: background .2s, transform .25s cubic-bezier(.2,.7,.2,1);
}
.btn-ink:hover { background: var(--accent); transform: translateY(-1px); }
.btn-ink[disabled] { opacity: .6; cursor: progress; transform: none; }
.link-u { font-size: 15px; font-weight: 500; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 3px; }
.link-u:hover { color: var(--accent); }

/* Blog list */
.post-list { border-top: 1px solid var(--ink); margin-bottom: clamp(48px, 7vw, 88px); }
.post-list li { border-bottom: 1px solid var(--rule); }
.post-list a {
  display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; column-gap: 32px; row-gap: 8px;
  padding: 28px 0; text-decoration: none; transition: padding .3s cubic-bezier(.2,.7,.2,1);
}
.pl-date { grid-row: span 2; font: 400 12px/1.6 var(--mono); color: var(--ink-3); }
.pl-title { font: 400 clamp(24px, 2.6vw, 34px)/1.15 var(--serif); letter-spacing: -0.01em; }
.pl-desc { grid-column: 2; color: var(--ink-2); font-size: 15px; max-width: 62ch; }
.pl-go { grid-column: 3; grid-row: 1; font-size: 14px; color: var(--ink-3); white-space: nowrap; }
.post-list a:hover { padding-left: 10px; }
.post-list a:hover .pl-title, .post-list a:hover .pl-go { color: var(--accent); }
html[lang="zh-CN"] .pl-title { font-weight: 500; letter-spacing: 0; }

/* Article */
.post { max-width: 820px; padding-top: clamp(32px, 5vw, 64px); padding-bottom: clamp(48px, 7vw, 96px); }
.back { font-size: 14px; color: var(--ink-3); text-decoration: none; }
.back:hover { color: var(--accent); }
.post-head { margin-top: 28px; padding-bottom: 28px; border-bottom: 1px solid var(--ink); }
.post-head h1 { margin-top: 18px; font: 400 clamp(36px, 5vw, 60px)/1.05 var(--serif); letter-spacing: -0.02em; text-wrap: balance; }
html[lang="zh-CN"] .post-head h1 { font-weight: 500; letter-spacing: 0; line-height: 1.25; }
.post-lede { margin-top: 18px; font-size: 18px; color: var(--ink-2); }

.prose { margin-top: 36px; font-size: 17.5px; line-height: 1.7; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { margin-top: 2em; font: 400 clamp(26px, 3vw, 34px)/1.15 var(--serif); letter-spacing: -0.01em; }
html[lang="zh-CN"] .prose h2 { font-weight: 500; letter-spacing: 0; line-height: 1.35; }
.prose h3 { margin-top: 1.6em; font-size: 18px; font-weight: 600; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: .45em; }
.prose a { color: var(--accent); text-underline-offset: 3px; }
.prose strong { font-weight: 600; }
.prose blockquote { margin: 1.4em 0 0; padding: 4px 0 4px 20px; border-left: 2px solid var(--accent); color: var(--ink-2); }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; }
.prose th, .prose td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.prose th { font: 400 11px/1.4 var(--mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); }
.table-scroll { overflow-x: auto; }

.cta-box {
  margin-top: clamp(48px, 6vw, 72px); padding: clamp(28px, 4vw, 44px);
  background: var(--teal); color: var(--paper); border-radius: 16px;
}
.cta-box h2 { font: 400 clamp(28px, 3.4vw, 40px)/1.1 var(--serif); letter-spacing: -0.01em; }
html[lang="zh-CN"] .cta-box h2 { font-weight: 500; letter-spacing: 0; line-height: 1.3; }
.cta-box p { margin-top: 12px; max-width: 52ch; color: rgba(243, 238, 230, .85); }
.cta-row { margin-top: 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 20px 28px; }
.cta-box .btn-ink { background: var(--paper); color: var(--ink); }
.cta-box .btn-ink:hover { background: #fff; }
section.wrap > .cta-box { margin-top: 0; margin-bottom: clamp(48px, 7vw, 88px); }

.more { margin-top: 48px; }
.more h2 { font: 400 12px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); }
.more ul { margin-top: 14px; border-top: 1px solid var(--rule); }
.more li { border-bottom: 1px solid var(--rule); }
.more a { display: block; padding: 16px 0; text-decoration: none; font: 400 22px/1.25 var(--serif); }
html[lang="zh-CN"] .more a { font-weight: 500; font-size: 19px; }
.more a:hover { color: var(--accent); }

/* Lead pages */
.lead-page {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 88px);
  align-items: start; padding-top: clamp(40px, 6vw, 80px); padding-bottom: clamp(56px, 8vw, 112px);
}
.lead-page .page-title { margin-top: 24px; }
.lead-copy .mini-h { margin-top: 40px; }
.ticks { margin-top: 16px; display: grid; gap: 12px; }
.ticks li { position: relative; padding-left: 30px; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .45em; width: 14px; height: 8px;
  border-left: 2px solid var(--teal); border-bottom: 2px solid var(--teal); transform: rotate(-45deg);
}
.aside-note { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--rule); color: var(--ink-2); font-size: 15px; }

.lead-card {
  background: #fbf8f3; border: 1px solid var(--rule); border-radius: 16px;
  padding: clamp(22px, 3vw, 34px); position: sticky; top: 88px;
  box-shadow: 0 30px 60px -40px rgba(27, 26, 23, .35);
}
.lead-card > .mini-h { color: var(--accent); }
.form-intro { margin-top: 10px; font-size: 14.5px; color: var(--ink-2); }
.lead-form { margin-top: 18px; display: grid; gap: 14px; }
.lead-form[hidden] { display: none; }
.fld { display: grid; gap: 6px; }
.fld span { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.fld input, .fld select, .fld textarea {
  width: 100%; font: 400 16px/1.4 var(--sans); color: var(--ink);
  background: #fff; border: 1px solid var(--rule); border-radius: 10px; padding: 12px 14px;
  transition: border-color .2s, box-shadow .2s;
}
.fld textarea { resize: vertical; min-height: 88px; }
.fld input:focus, .fld select:focus, .fld textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(140, 59, 42, .14); }
.fld input[aria-invalid="true"] { border-color: var(--accent); }
.fld-hint { font-size: 13px; color: var(--ink-3); margin-top: -4px; }
.lead-form .btn-ink { width: 100%; margin-top: 4px; }
.form-status { font-size: 14px; color: var(--accent); }
.form-status:empty { display: none; }
.form-privacy { font-size: 12.5px; color: var(--ink-3); }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-done { margin-top: 18px; display: grid; gap: 12px; }
.form-done[hidden] { display: none; }
.form-done h3 { font: 400 30px/1.1 var(--serif); }
html[lang="zh-CN"] .form-done h3 { font-weight: 500; font-size: 26px; }
.form-done p { color: var(--ink-2); }
.form-done .btn-ink { justify-self: start; margin-top: 6px; }

/* Calculator */
.calc {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 72px);
  align-items: start; padding-bottom: clamp(56px, 8vw, 112px);
}
.calc-q { display: grid; gap: 34px; }
.calc fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.calc legend { padding: 0; font: 400 clamp(22px, 2.2vw, 28px)/1.2 var(--serif); margin-bottom: 14px; }
html[lang="zh-CN"] .calc legend { font-weight: 500; font-size: clamp(19px, 2vw, 23px); }
.opts { display: flex; flex-wrap: wrap; gap: 10px; }
.opts-type { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.opt { position: relative; cursor: pointer; }
.opt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.opt span {
  display: grid; gap: 3px; height: 100%;
  padding: 12px 16px; border: 1px solid var(--rule); border-radius: 12px; background: #fbf8f3;
  transition: border-color .2s, background .2s, color .2s;
}
.opt b { font-weight: 500; font-size: 15px; }
.opt small { font-size: 13px; color: var(--ink-3); }
.opt:hover span { border-color: var(--ink-2); }
.opt input:checked + span { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.opt input:checked + span small { color: rgba(243, 238, 230, .7); }
.opt input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.opt-rush { justify-self: start; }

.calc-out { display: grid; gap: 18px; position: sticky; top: 88px; }
.calc-out .lead-card { position: static; }
.est { background: var(--night); color: var(--night-ink); border-radius: 16px; padding: clamp(22px, 3vw, 32px); }
.est .mini-h { color: #d9a07f; }
.est-num { margin-top: 12px; font: 400 clamp(34px, 4vw, 52px)/1.05 var(--serif); letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.est-note { margin-top: 10px; font-size: 13px; color: var(--night-ink-2); }

/* Homepage lead band */
.hooks { padding: clamp(72px, 10vw, 136px) 0 0; }
.hook-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 28px; }
.hook {
  display: flex; flex-direction: column; gap: 12px; text-decoration: none;
  padding: 28px; border-radius: 16px; border: 1px solid var(--rule); background: #fbf8f3;
  transition: border-color .2s, transform .3s cubic-bezier(.2,.7,.2,1), box-shadow .3s;
}
.hook:hover { border-color: var(--ink); transform: translateY(-3px); box-shadow: 0 24px 50px -36px rgba(27, 26, 23, .5); }
.hook .h-tag { font: 400 11px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); }
.hook h3 { font: 400 28px/1.1 var(--serif); }
html[lang="zh-CN"] .hook h3 { font-weight: 500; font-size: 24px; }
.hook p { font-size: 14.5px; color: var(--ink-2); flex: 1; }
.hook .h-go { font-size: 14px; font-weight: 500; }
.hook:hover .h-go { color: var(--accent); }
.hook.is-primary { background: var(--accent); border-color: var(--accent); color: var(--paper); }
.hook.is-primary .h-tag, .hook.is-primary p { color: rgba(243, 238, 230, .85); }
.hook.is-primary:hover .h-go { color: #fff; }
.contact-row .link-light { color: var(--paper); font-size: 16px; font-weight: 500; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 3px; }

@media (max-width: 960px) {
  .lead-page, .calc { grid-template-columns: minmax(0, 1fr); }
  .lead-card, .calc-out { position: static; }
  .hook-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .nav a.lang { display: inline-block; }
  .post-list a { grid-template-columns: minmax(0, 1fr); }
  .pl-date { grid-row: auto; }
  .pl-desc { grid-column: 1; }
  .pl-go { grid-column: 1; grid-row: auto; }
  .post-list a:hover { padding-left: 0; }
  .prose { font-size: 17px; }
  .opts-type { grid-template-columns: minmax(0, 1fr); }
}
