/* The one stylesheet for every page. tools/build.py writes the markup these classes describe. */

:root {
  --paper: #F4F2ED;
  --panel: #ECE9E2;
  --ink: #1C1B18;
  --text: #35332E;
  --muted: #6A6862;
  --faint: #716E67;
  --rule: #DFDCD4;
  --rule-strong: #CFCBC1;
  --green: #34483C;
  --sage: #DCE2DA;
  --clay: #CC785C;
  /* the colour fields of the post visuals (blog/figures/visuals.json), used again by the figures in posts */
  --sand: #EAE5DA;
  --manilla: #EBDBBC;
  --ghost: #DFCDA6;
  --blue: #7F97A8;
  --mist: #D3DCE0;
  /* clay dark enough for small text on those fields */
  --clay-text: #9A4E36;
  --zh: 'Noto Serif SC', serif;
  --en: 'EB Garamond', 'Noto Serif SC', serif;
  /* the Japanese company page: system Mincho, with Garamond first where Latin should match the English page */
  --ja: 'Hiragino Mincho ProN', 'Yu Mincho', 'YuMincho', 'Noto Serif JP', serif;
  --ja-latin: 'EB Garamond', 'Hiragino Mincho ProN', 'Yu Mincho', 'YuMincho', 'Noto Serif JP', serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--zh); font-weight: 400; -webkit-font-smoothing: antialiased; }
/* Garamond has a small x-height; this lifts it to sit level with the Chinese pages */
html[lang="en"] body { font-family: var(--en); font-size-adjust: 0.46; }
a { color: var(--green); text-decoration: none; }
a:hover { color: var(--ink); }
::selection { background: var(--sage); }
img { display: block; max-width: 100%; height: auto; }
/* components set their own display, which would otherwise beat the hidden attribute */
[hidden] { display: none !important; }
h1, h2, h3, h4 { font-weight: 400; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 1px solid var(--green); outline-offset: 3px; }

.page { max-width: 1000px; margin: 0 auto; padding: 0 48px; }
.more { font-size: 14px; letter-spacing: 0.06em; color: var(--green); }
html[lang="en"] .more { font-size: 16px; letter-spacing: 0.02em; }

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

.site-header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 16px 40px; padding: 56px 0 24px; border-bottom: 1px solid var(--ink); }
.brand { margin-right: auto; display: flex; flex-direction: column; gap: 9px; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-name { font-size: 28px; line-height: 1.1; letter-spacing: 0.14em; }
.brand-alt { font-family: var(--en); font-size: 13px; font-size-adjust: none; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
html[lang="en"] .brand-name { font-size: 30px; letter-spacing: 0.06em; }
html[lang="en"] .brand-alt { font-family: var(--zh); letter-spacing: 0.3em; text-transform: none; }
.site-nav { display: flex; gap: 34px; }
.site-nav a { color: var(--ink); font-size: 15px; letter-spacing: 0.16em; }
/* tracking suits Chinese and capitals, not lowercase Latin */
html[lang="en"] .site-nav a { font-size: 17px; letter-spacing: 0.02em; }
.site-nav a:hover { color: var(--green); }
.site-nav a[aria-current="page"] { color: var(--green); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 9px; }
.lang { display: flex; gap: 8px; font-family: var(--en); font-size: 14px; font-size-adjust: none; letter-spacing: 0.06em; color: var(--rule-strong); }
.lang a { color: var(--faint); }
.lang a:hover { color: var(--green); }
.lang [aria-current] { color: var(--ink); }

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

main { padding-top: 8px; }
.split { display: grid; grid-template-columns: 132px minmax(0, 1fr); column-gap: 48px; }
.col { max-width: 620px; min-width: 0; }
.label { margin: 0; text-align: right; font-family: var(--en); font-size-adjust: none; font-style: italic; font-size: 17px; font-weight: 400; letter-spacing: 0.04em; color: var(--green); padding-top: 4px; }
.section { padding: 64px 0; border-top: 1px solid var(--rule); }
.intro { padding: 72px 0 64px; }
.lead { margin: 0; max-width: 700px; font-size: 26px; font-weight: 300; line-height: 1.85; letter-spacing: 0.02em; text-wrap: balance; }
html[lang="en"] .lead { font-size: 30px; font-weight: 400; line-height: 1.4; letter-spacing: 0; }
.sub { margin: 20px 0 0; font-size: 15px; line-height: 2; color: var(--muted); }
html[lang="en"] .sub { font-size: 17px; line-height: 1.6; }
.date { font-family: var(--en); font-size: 15px; font-size-adjust: none; letter-spacing: 0.04em; color: var(--faint); }
.letter { font-family: var(--en); font-size-adjust: none; font-style: italic; color: var(--green); }

/* ---- home -------------------------------------------------------------------------------------------------------- */

.hero { padding: 88px 0 72px; }
.hero-line { margin: 0; max-width: 860px; font-size: 40px; font-weight: 400; line-height: 1.6; letter-spacing: 0.03em; }
html[lang="en"] .hero-line { max-width: 820px; font-size: 48px; line-height: 1.2; letter-spacing: -0.005em; }
.hero-intro { margin: 28px 0 0; max-width: 620px; font-size: 17px; line-height: 2; color: var(--muted); text-wrap: pretty; }
html[lang="en"] .hero-intro { font-size: 20px; line-height: 1.6; }
.hero-figure { margin: 64px 0 0; }
.hero-figure figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; margin-top: 20px; font-size: 14px; line-height: 1.8; color: var(--faint); }
html[lang="en"] .hero-figure figcaption { font-size: 16px; }
.grid { display: block; width: 100%; height: auto; overflow: visible; }
.grid.narrow { display: none; }
.grid path { stroke: var(--ink); stroke-width: 1.1; vector-effect: non-scaling-stroke; }
.grid .ring { fill: none; }
.grid .made { fill: var(--ink); }
.grid .seat { fill: var(--green); fill-opacity: 0; animation: take 1.1s ease-out var(--t) forwards; }
@keyframes take { to { fill-opacity: 1; stroke: var(--green); } }
@media (prefers-reduced-motion: reduce) { .grid .seat { animation: none; fill-opacity: 1; stroke: var(--green); } }

.feature { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 28px; align-items: start; color: var(--ink); }
.feature-visual { width: 100%; }
.feature-text { display: flex; flex-direction: column; gap: 8px; }
.feature-title { font-size: 21px; font-weight: 500; letter-spacing: 0.04em; line-height: 1.6; text-wrap: balance; }
html[lang="en"] .feature-title { font-size: 24px; letter-spacing: 0; line-height: 1.3; }
.feature-summary { font-size: 15px; line-height: 2; color: var(--muted); }
html[lang="en"] .feature-summary { font-size: 17px; line-height: 1.6; }
.feature:hover .feature-title { color: var(--green); }

.series-brief { margin-bottom: 40px; }
.series-brief h3 { display: flex; align-items: baseline; gap: 14px; margin: 0 0 6px; font-size: 19px; font-weight: 500; letter-spacing: 0.05em; }
html[lang="en"] .series-brief h3 { font-size: 22px; letter-spacing: 0; }
.series-brief .letter { font-size: 22px; }
.series-brief p { margin: 0 0 12px; font-size: 15px; line-height: 2; color: var(--muted); }
html[lang="en"] .series-brief p { font-size: 17px; line-height: 1.6; }
.series-brief ul { margin: 0; padding: 0; list-style: none; border-left: 1px solid var(--rule); }
.series-brief li { padding: 3px 0 3px 18px; font-size: 15px; line-height: 1.9; }
html[lang="en"] .series-brief li { font-size: 17px; line-height: 1.5; }
.series-brief a { color: var(--text); }
.series-brief a:hover { color: var(--green); }


.band a { display: block; }
.band-caption { display: flex; justify-content: space-between; gap: 16px; margin: 14px 0 0; font-family: var(--en); font-size: 15px; font-size-adjust: none; letter-spacing: 0.04em; color: var(--muted); }
/* the ways to get in touch, on the home and about pages: each opens a drafted email */
/* "Build with me?": the verbs share one slot; the one on show sits in it, the one leaving slides up and out */
.with-me { margin: 0; font-family: var(--en); font-size-adjust: none; font-size: 64px; font-weight: 400; line-height: 1.15; letter-spacing: -0.01em; color: var(--ink); }
.offering-brief .with-me { font-size: 44px; }
.verbs { display: inline-grid; vertical-align: bottom; overflow: hidden; transition: width 0.5s ease; }
.verb { grid-area: 1 / 1; justify-self: start; padding-right: 0.06em; white-space: nowrap; font-style: italic; color: var(--green); opacity: 0; transform: translateY(0.9em); transition: transform 0.5s ease, opacity 0.5s ease; }
.verb.on { opacity: 1; transform: none; }
.verb.off { transform: translateY(-0.9em); }
@media (prefers-reduced-motion: reduce) { .verbs, .verb { transition: none; } }
.way-verb { font-family: var(--en); font-size-adjust: none; font-style: italic; font-size: 18px; color: var(--green); }

.offer-head .email { margin: 14px 0 0; font-size: 26px; }
.ways-in .label { padding-top: 21px; }
.doors { display: grid; grid-template-columns: 1fr 1fr; gap: 36px 40px; }
.door { display: flex; flex-direction: column; gap: 8px; padding-top: 16px; border-top: 1px solid var(--ink); color: var(--text); transition: border-color 0.4s; }
.door.lit { border-top-color: var(--green); box-shadow: inset 0 1px 0 var(--green); }
.door.lit h3 { color: var(--green); }
.door h3 { margin: 0; font-size: 17px; font-weight: 500; letter-spacing: 0.04em; color: var(--ink); }
html[lang="en"] .door h3 { font-size: 20px; letter-spacing: 0; }
.door p { flex: 1; margin: 0; font-size: 14px; line-height: 1.9; color: var(--muted); text-wrap: pretty; }
html[lang="en"] .door p { font-size: 16px; line-height: 1.5; }
.door:hover { color: var(--text); }
.door:hover h3 { color: var(--green); }
/* the same four, one line each, on the home page */
.ways { margin: 28px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.ways li { border-bottom: 1px solid var(--rule); }
.ways a { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 16px; align-items: baseline; padding: 12px 0; font-size: 16px; color: var(--text); transition: color 0.3s; }
html[lang="en"] .ways a { font-size: 18px; }
.ways a.lit, .ways a:hover { color: var(--green); }
.direct { margin: 32px 0 0; font-size: 15px; color: var(--muted); }
html[lang="en"] .direct { font-size: 17px; }
.direct a { font-size: 17px; }
html[lang="en"] .direct a { font-size: 19px; }
.hook { margin: 28px 0 0; padding: 16px 20px; background: var(--panel); font-size: 15px; line-height: 1.8; }
html[lang="en"] .hook { font-size: 17px; line-height: 1.5; }
.demo-hook { margin: 12px 0 0; font-size: 14px; }
html[lang="en"] .demo-hook { font-size: 16px; }

/* ---- writing ----------------------------------------------------------------------------------------------------- */

.ask label { display: block; margin-bottom: 12px; font-size: 19px; font-weight: 500; letter-spacing: 0.04em; }
html[lang="en"] .ask label { font-size: 22px; letter-spacing: 0; }
.ask-row { display: flex; border-bottom: 1px solid var(--ink); }
.ask-row input { flex: 1; min-width: 0; padding: 10px 0; border: 0; background: none; font: inherit; font-size: 17px; color: var(--ink); outline: none; }
.ask-row input::placeholder { color: var(--faint); }
.ask-row input::-webkit-search-cancel-button { display: none; }
.ask-row button { padding: 10px 4px 10px 16px; border: 0; background: none; font-size: 15px; letter-spacing: 0.1em; color: var(--green); cursor: pointer; }
.ask-suggest { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; }
.ask-suggest button { padding: 4px 12px; border: 1px solid var(--rule-strong); border-radius: 999px; background: none; font-size: 13px; line-height: 1.8; color: var(--muted); cursor: pointer; }
html[lang="en"] .ask-suggest button { font-size: 15px; line-height: 1.5; }
.ask-suggest button:hover { border-color: var(--green); color: var(--green); }
.ask-note { margin: 18px 0 0; font-size: 13px; line-height: 1.9; color: var(--faint); }
html[lang="en"] .ask-note { font-size: 15px; line-height: 1.5; }
.ask-results { margin: 8px 0 0; padding: 0; list-style: none; }
.ask-results:empty { display: none; }
.ask-results li { border-bottom: 1px solid var(--rule); }
.ask-results a { display: block; padding: 18px 0; color: var(--text); }
.ask-results a:hover .hit-src { color: var(--ink); }
.hit-src { display: block; margin-bottom: 6px; font-size: 13px; letter-spacing: 0.04em; color: var(--green); }
html[lang="en"] .hit-src { font-size: 15px; letter-spacing: 0; }
.hit-text { font-size: 15px; line-height: 2; }
html[lang="en"] .hit-text { font-size: 17px; line-height: 1.6; }
.hit-text mark { background: var(--sage); color: var(--ink); }
.ask-results .none { padding: 18px 0; font-size: 15px; color: var(--muted); }

.series h2 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: 0; font-size: 22px; font-weight: 500; letter-spacing: 0.04em; }
html[lang="en"] .series h2 { font-size: 26px; letter-spacing: 0; }
.series .count { font-family: var(--en); font-size-adjust: none; font-size: 15px; font-weight: 400; color: var(--faint); letter-spacing: 0.04em; }
.series .label.letter { font-size: 40px; line-height: 1; padding-top: 0; }
.series-intro { margin: 8px 0 0; font-size: 15px; line-height: 2; color: var(--muted); }
html[lang="en"] .series-intro { font-size: 17px; line-height: 1.6; }
.post-list { margin: 36px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 32px; }
.post-item h3 { margin: 0 0 6px; font-size: 19px; font-weight: 500; line-height: 1.6; letter-spacing: 0.05em; }
html[lang="en"] .post-item h3 { font-size: 22px; line-height: 1.3; letter-spacing: 0; }
.post-item h3 a { color: var(--ink); }
.post-item h3 a:hover { color: var(--green); }
.post-item p { margin: 0 0 4px; font-size: 15px; line-height: 2; color: var(--muted); text-wrap: pretty; }
html[lang="en"] .post-item p { font-size: 17px; line-height: 1.6; }
.thumb-link { display: block; padding-top: 5px; }
.thumb { width: 132px; transition: opacity 0.2s; }
.thumb-link:hover .thumb { opacity: 0.85; }

/* ---- post -------------------------------------------------------------------------------------------------------- */

.post { padding-top: 72px; }
.post-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; padding-top: 6px; text-align: right; font-size: 13px; line-height: 1.7; color: var(--faint); }
.post-meta a { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; color: var(--green); }
.post-meta .letter { font-size: 30px; line-height: 1; }
html[lang="en"] .post-meta { font-size: 15px; line-height: 1.4; }
.post-visual { margin: 0 0 40px; }
.post-visual svg { display: block; width: 100%; height: auto; }
/* the short film that takes the post visual's place (assets/video.js), and its captions */
.post-body .post-video { margin: 0 0 40px; }
.post-video video { display: block; width: 100%; height: auto; aspect-ratio: 2 / 1; cursor: pointer; background: var(--panel); }
.video-progress { height: 1px; background: var(--rule); overflow: hidden; }
.video-progress i { display: block; height: 100%; background: var(--green); transform-origin: left; transform: scaleX(0); }
.video-bar { display: flex; align-items: baseline; gap: 16px; margin-top: 12px; }
.video-cue { flex: 1; font-size: 15px; line-height: 1.85; color: var(--text); text-wrap: pretty; transition: opacity 0.22s; }
html[lang="en"] .video-cue { font-size: 17px; line-height: 1.5; }
.video-cue.out { opacity: 0; }
.video-toggle { flex: 0 0 auto; padding: 0; border: 0; background: none; font-size: 13px; letter-spacing: 0.06em; color: var(--muted); cursor: pointer; }
html[lang="en"] .video-toggle { font-size: 15px; letter-spacing: 0; }
.video-toggle:hover { color: var(--green); }
.post-body h1 { margin: 0 0 22px; font-size: 32px; font-weight: 400; line-height: 1.5; letter-spacing: 0.03em; text-wrap: balance; }
html[lang="en"] .post-body h1 { font-size: 40px; line-height: 1.2; letter-spacing: 0; }
.post-body .lede { margin: 0 0 56px; font-size: 18px; font-weight: 300; line-height: 2; color: var(--muted); text-wrap: pretty; }
html[lang="en"] .post-body .lede { margin-bottom: 48px; font-size: 21px; font-weight: 400; line-height: 1.55; }
.post-body h2 { margin: 56px 0 16px; font-size: 20px; font-weight: 500; letter-spacing: 0.05em; }
html[lang="en"] .post-body h2 { font-size: 24px; letter-spacing: 0; }
.post-body h3 { margin: 36px 0 12px; font-size: 17px; font-weight: 500; letter-spacing: 0.04em; }
.post-body p, .post-body li { font-size: 16px; line-height: 2.05; color: var(--text); letter-spacing: 0.01em; text-wrap: pretty; }
html[lang="en"] .post-body p, html[lang="en"] .post-body li { font-size: 18px; line-height: 1.7; letter-spacing: 0; }
.post-body p { margin: 0 0 22px; }
html[lang="en"] .post-body p { margin-bottom: 18px; }
.post-body ul { margin: 0 0 22px; padding-left: 1.2em; }
.post-body ol { margin: 0 0 22px; padding-left: 1.5em; }
/* the local fonts stop at 500, so bold is 500 plus the darker ink */
.post-body strong { font-weight: 500; color: var(--ink); }
.post-body blockquote { margin: 32px 0; padding-left: 22px; border-left: 1px solid var(--green); }
.post-body blockquote p { color: var(--muted); }
.post-body blockquote > :last-child { margin-bottom: 0; }
/* a paragraph the search box linked to */
.post-body :target { background: var(--sage); box-shadow: 0 0 0 10px var(--sage); scroll-margin-top: 30vh; transition: background 1.2s; }
.post-body .table-wrap { margin: 28px 0 32px; overflow-x: auto; }
.post-body table { width: 100%; border-collapse: collapse; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.post-body th, .post-body td { padding: 10px 14px 10px 0; text-align: left; vertical-align: top; font-size: 14px; line-height: 1.8; color: var(--text); border-bottom: 1px solid var(--rule); }
html[lang="en"] .post-body th, html[lang="en"] .post-body td { font-size: 16px; line-height: 1.5; }
.post-body th { font-weight: 500; color: var(--ink); white-space: nowrap; border-bottom-color: var(--ink); }
.post-body tr:last-child td { border-bottom: none; }
.post-body td:first-child { min-width: 5.5em; }
.post-body figure { margin: 36px 0; }
.post-body figure svg { display: block; width: 100%; max-width: 520px; height: auto; }
.post-body figcaption { margin-top: 14px; font-size: 13px; line-height: 1.9; color: var(--faint); letter-spacing: 0.02em; }

/* ---- interactive figures in posts: assets/figs.js and assets/figs/<key>.js draw them ---------------------------- */

.post-body .fig { margin: 44px 0 48px; }
.fig-stage { background: var(--fig-bg, var(--panel)); }
.fig.live .fig-stage svg { display: block; width: 100%; max-width: none; height: auto; overflow: visible; }
/* before the script runs, a figure that replaces a static one shows that one, just as it looked before */
.fig:not(.live) .fig-stage { background: none; }
.fig .fig-t { font-size: 13px; fill: var(--muted); letter-spacing: 0.02em; }
html[lang="en"] .fig .fig-t { font-size: 15px; letter-spacing: 0; }
.fig .fig-strong { fill: var(--ink); }
/* a figure drawn for a phone-width stage sets its labels a size smaller */
.fig .narrow .fig-t { font-size: 12px; letter-spacing: 0; }
html[lang="en"] .fig .narrow .fig-t { font-size: 13px; }
.fig .narrow .quad .q-name { font-size: 13px; }
html[lang="en"] .fig .narrow .quad .q-name { font-size: 14px; }
.fig .fig-num-t { font-family: var(--en); font-size-adjust: none; }
.fig-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 16px; }
.fig-choice { display: flex; flex-wrap: wrap; gap: 8px; }
.fig button { padding: 5px 14px; border: 1px solid var(--rule-strong); border-radius: 999px; background: none; font-size: 13px; line-height: 1.7; letter-spacing: 0.04em; color: var(--text); cursor: pointer; transition: background 0.2s, color 0.2s, border-color 0.2s; }
html[lang="en"] .fig button { font-size: 15px; line-height: 1.5; letter-spacing: 0; }
.fig button:hover { border-color: var(--green); color: var(--green); }
.fig button[aria-pressed="true"] { border-color: var(--green); background: var(--green); color: var(--paper); }
.fig button:disabled { opacity: 0.4; cursor: default; border-color: var(--rule-strong); color: var(--text); }
.fig .fig-play { margin-left: auto; border-color: transparent; color: var(--muted); }
.fig-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px 28px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--rule); }
.fig-readout { flex: 1 1 260px; min-width: 0; }
.fig-read-line { font-size: 15px; line-height: 1.6; color: var(--ink); }
html[lang="en"] .fig-read-line { font-size: 17px; line-height: 1.4; }
.fig-num { margin-right: 0.15em; font-family: var(--en); font-size-adjust: none; font-size: 34px; line-height: 1; letter-spacing: 0.01em; color: var(--green); }
.fig-read-note { margin-top: 6px; font-size: 13px; line-height: 1.9; color: var(--muted); }
html[lang="en"] .fig-read-note { font-size: 15px; line-height: 1.5; }
.fig-legend { display: flex; flex-direction: column; gap: 4px; font-size: 13px; line-height: 1.7; color: var(--muted); }
html[lang="en"] .fig-legend { font-size: 15px; line-height: 1.45; }
.fig-legend span::before { content: ''; display: inline-block; width: 10px; height: 10px; margin-right: 8px; border-radius: 50%; vertical-align: -1px; }
.fig-legend .key-ring::before { border: 1px solid var(--ink); }
.fig-legend .key-ink::before { background: var(--ink); }
.fig-legend .key-green::before { background: var(--green); }
.fig-legend .key-clay::before { background: var(--clay); }
.post-body .fig figcaption { margin-top: 16px; }

/* a1: one rep's doctors over a year, counted in hours or in decisions */
.a1 .tick { fill: var(--paper); opacity: 0.8; }
.a1 .tick.past { fill: var(--ink); opacity: 1; }
.a1 .dot { fill: var(--green); fill-opacity: 0; stroke: var(--ink); stroke-width: 1.1; transform-box: fill-box; transform-origin: center; transition: fill-opacity 0.5s, stroke 0.5s; }
.a1 .dot.reg { fill: var(--ink); fill-opacity: 1; }
.a1[data-mode="1"] .dot:not(.reg) { fill-opacity: 0.55; stroke: var(--green); }
.a1 .beat-a .reg { animation: a1-pulse-a 0.5s ease-out; }
.a1 .beat-b .reg { animation: a1-pulse-b 0.5s ease-out; }
.a1[data-mode="1"] .beat-a .dot:not(.reg) { animation: a1-fill-a 0.6s ease-out calc(var(--c) * 12ms) both; }
.a1[data-mode="1"] .beat-b .dot:not(.reg) { animation: a1-fill-b 0.6s ease-out calc(var(--c) * 12ms) both; }
@keyframes a1-pulse-a { 35% { transform: scale(1.3); } }
@keyframes a1-pulse-b { 35% { transform: scale(1.3); } }
@keyframes a1-fill-a { 0% { fill-opacity: 0.55; } 30% { fill-opacity: 1; } 100% { fill-opacity: 0.55; } }
@keyframes a1-fill-b { 0% { fill-opacity: 0.55; } 30% { fill-opacity: 1; } 100% { fill-opacity: 0.55; } }

/* b1: a project list run through one question; each card moves to one of two piles */
.b1 { padding: 22px 24px 24px; }
.b1-q { margin-bottom: 20px; font-size: 17px; line-height: 1.8; color: var(--ink); text-wrap: balance; }
html[lang="en"] .b1-q { font-size: 20px; line-height: 1.35; }
.b1-label { display: block; margin-bottom: 10px; font-size: 13px; letter-spacing: 0.06em; color: var(--muted); }
html[lang="en"] .b1-label { font-size: 15px; letter-spacing: 0; }
.b1-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.b1-bins { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 22px; }
.b1-list:not([hidden]) + .b1-bins .b1-pile:empty { min-height: 36px; }
.b1-bin { padding-top: 10px; border-top: 1px solid var(--green); }
.b1-show { border-top-color: var(--clay); }
.b1-real .b1-label { color: var(--green); }
.b1-show .b1-label { color: var(--clay-text); }
.b1-pile { display: flex; flex-direction: column; gap: 8px; }
.fig .b1-card { display: flex; flex-direction: column; gap: 2px; width: 100%; padding: 10px 12px 11px; border: 1px solid transparent; border-radius: 0; background: var(--paper); text-align: left; font-size: 14px; line-height: 1.6; letter-spacing: 0.02em; color: var(--ink); }
html[lang="en"] .fig .b1-card { font-size: 16px; line-height: 1.35; letter-spacing: 0; }
.fig .b1-card:hover { border-color: var(--ink); color: var(--ink); }
.fig .b1-card:disabled { opacity: 1; cursor: default; border-color: transparent; }
.b1-name { font-weight: 500; }
.b1-sub { font-size: 13px; color: var(--muted); }
html[lang="en"] .b1-sub { font-size: 15px; }
.b1-verdict { display: none; margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--rule); font-size: 13px; }
html[lang="en"] .b1-verdict { font-size: 15px; }
.b1-card.done .b1-verdict { display: block; }
.b1-card.pass { box-shadow: inset 3px 0 0 var(--green); }
.b1-card.pass .b1-verdict { color: var(--green); }
.b1-card.fail { background: transparent; box-shadow: inset 0 0 0 1px var(--rule-strong); }
.b1-card.fail .b1-name, .b1-card.fail .b1-sub { color: var(--muted); }
.b1-card.fail .b1-verdict { color: var(--clay-text); border-top-color: var(--rule-strong); }

/* the four-quadrant map shared by b3 and c4 (Fig.quadrant) */
.quad .q-trap { fill: var(--manilla); }
.quad .q-decide { fill: var(--sage); }
.quad .q-low { fill: var(--paper); }
.quad .q-frame { fill: none; stroke: var(--ink); stroke-width: 1; }
.quad .q-mid { stroke: var(--rule-strong); stroke-width: 1; }
.fig .quad .q-axis { fill: var(--green); }
.fig .quad .q-name { fill: var(--ink); font-size: 14px; transition: fill 0.4s; }
html[lang="en"] .fig .quad .q-name { font-size: 16px; }
.fig .quad .q-name.on { fill: var(--green); font-weight: 500; }

/* b3: NBA in the trap, and the two ways out */
.b3 .b3-dot { fill: var(--green); }
.fig .b3 .b3-label { fill: var(--text); }
.b3 .b3-goal { fill: none; stroke: var(--green); stroke-width: 1.2; stroke-dasharray: 2 3; }
.b3 .b3-trail { fill: none; stroke: var(--ink); stroke-width: 1; stroke-dasharray: 3 3; }
.b3 .b3-nba { fill: var(--ink); stroke: var(--clay); stroke-width: 3; stroke-opacity: 0.7; transform-box: fill-box; transform-origin: center; transition: fill 0.5s, stroke 0.5s; }
.b3:not([data-q="tl"]) .b3-nba { fill: var(--green); stroke: var(--green); stroke-opacity: 0.25; }
.b3 .b3-nba.shake { animation: b3-shake 0.5s ease-in-out; }
@keyframes b3-shake { 20% { transform: translateX(-5px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }

/* b4: a type of decision on the stairs of autonomy, and its veto rate week by week */
.b4 .b4-step rect { fill: var(--ghost); transition: fill 0.5s; }
.b4 .b4-step.on rect { fill: var(--green); }
.fig .b4 .b4-step text { fill: var(--text); }
.fig .b4 .b4-step.on text { fill: var(--paper); }
.b4 .b4-ball { fill: var(--ink); transition: transform 0.7s cubic-bezier(.3, .7, .3, 1); }
.b4 .b4-next { fill: none; stroke: var(--ink); stroke-width: 1.2; stroke-dasharray: 3 3; animation: b4-glow 1.6s ease-in-out infinite; }
@keyframes b4-glow { 50% { stroke-opacity: 0.3; } }
.b4 .b4-plot { fill: var(--paper); fill-opacity: 0.6; }
.b4 .b4-up { stroke: var(--green); stroke-width: 1.2; stroke-dasharray: 4 3; }
.b4 .b4-down { stroke: var(--clay); stroke-width: 1.2; stroke-dasharray: 4 3; }
.fig .b4 .b4-up-t { fill: var(--green); }
.fig .b4 .b4-down-t { fill: var(--clay-text); }
.b4 .b4-line { fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linejoin: round; }
.b4 .b4-now { fill: var(--ink); }
.b4 .b4-mark { stroke-width: 1; }
.b4 .b4-mark.up { stroke: var(--green); }
.b4 .b4-mark.down { stroke: var(--clay); }
.fig .b4 .b4-mark-t.up { fill: var(--green); }
.fig .b4 .b4-mark-t.down { fill: var(--clay-text); }
.b4-quote { padding: 0 24px 20px; font-size: 14px; line-height: 1.8; color: var(--text); }
html[lang="en"] .b4-quote { font-size: 16px; line-height: 1.45; font-style: italic; }
.b4-quote-label { display: block; font-size: 12px; letter-spacing: 0.06em; color: var(--muted); font-style: normal; }
html[lang="en"] .b4-quote-label { font-size: 14px; letter-spacing: 0; }
.fig .b4-sign.ready { border-color: var(--green); background: var(--green); color: var(--paper); animation: b4-ready 1.6s ease-in-out infinite; }
@keyframes b4-ready { 50% { box-shadow: 0 0 0 5px rgba(52, 72, 60, 0.18); } }
@media (prefers-reduced-motion: reduce) { .b4 .b4-next, .fig .b4-sign.ready { animation: none; } .b4 .b4-ball { transition: none; } }

/* c3: the CIU with the AI CRM inside it, and what runs between them */
.c3 .c3-outer { fill: var(--sage); stroke: var(--ink); stroke-width: 1; transition: fill 0.5s, stroke-opacity 0.5s; }
.c3 .c3-inner { fill: var(--paper); stroke: var(--ink); stroke-width: 1; transition: fill 0.5s, stroke-opacity 0.5s; }
.c3 .c3-name { font-family: var(--en); font-size: 21px; font-size-adjust: none; letter-spacing: 0.05em; fill: var(--ink); }
.c3 .c3-arrow { stroke: var(--green); stroke-width: 1.3; }
.c3 .c3-head { fill: var(--green); }
.fig .c3 .c3-flow-t { fill: var(--green); }
.c3 .c3-dot.down { fill: var(--green); }
.c3 .c3-dot.ppt { fill: var(--green); }
.c3 .c3-dot.up { fill: var(--ink); }
.c3 .c3-dot.veto { fill: var(--clay); }
.fig .c3 .c3-badge { fill: var(--clay-text); }
.c3.flash .c3-outer { stroke: var(--clay); stroke-width: 2; }
.c3 .c3-ppt rect { fill: var(--paper); stroke: var(--ink); stroke-width: 1; }
.c3 .c3-ppt-t { font-family: var(--en); font-size: 14px; font-size-adjust: none; letter-spacing: 0.08em; fill: var(--ink); }
.c3 .c3-chip rect { fill: var(--paper); stroke: var(--ink); stroke-width: 1; }
.c3 .c3-bonus rect { fill: var(--manilla); stroke: var(--clay); }
.fig .c3 .c3-chip text { fill: var(--ink); }
.c3 .c3-ppt, .c3 .c3-chips { display: none; }
/* only the front line: headquarters isn't there, and the suggestion comes, meets the bonus, and goes */
.c3[data-mode="front"] .c3-hq, .c3[data-mode="front"] .c3-flows { opacity: 0.22; }
.c3[data-mode="front"] .c3-outer { fill: transparent; stroke-dasharray: 4 4; }
.c3[data-mode="front"] .c3-chips { display: inline; }
.c3[data-mode="front"] .c3-suggest { animation: c3-suggest 4s ease-in-out infinite; }
.c3[data-mode="front"] .c3-bonus { animation: c3-bonus 4s ease-in-out infinite; }
@keyframes c3-suggest { 0% { opacity: 0; transform: translateY(8px); } 12%, 55% { opacity: 1; transform: none; } 75%, 100% { opacity: 0.15; transform: none; } }
@keyframes c3-bonus { 0%, 25% { opacity: 0; } 38%, 85% { opacity: 1; } 100% { opacity: 0; } }
/* only headquarters: the plan goes down as far as the slides; the CRM is the old one */
.c3[data-mode="hq"] .c3-ppt { display: inline; }
.c3[data-mode="hq"] .c3-flows { opacity: 0.22; }
.c3[data-mode="hq"] .c3-inner { fill: var(--panel); stroke-dasharray: 4 4; }
@media (prefers-reduced-motion: reduce) { .c3[data-mode="front"] .c3-suggest, .c3[data-mode="front"] .c3-bonus { animation: none; } }

/* c4: ten apps on the map, coloured by role, behind the three constraints */
.c4 .c4-open { fill: var(--green); fill-opacity: 0; transition: fill-opacity 0.6s; }
.c4.open .c4-open { fill-opacity: 0.14; }
.fig .c4 .c4-empty { fill: var(--green); font-style: italic; }
.c4 .c4-fence line { stroke: var(--clay); stroke-width: 2.4; stroke-linecap: round; transition: opacity 0.4s; }
.c4 .c4-fence line + line { stroke-width: 1.4; }
.fig .c4 .c4-fence-t { fill: var(--clay-text); transition: opacity 0.4s; }
.c4 .c4-fence.off line { opacity: 0.12; }
.fig .c4 .c4-fence.off .c4-fence-t { opacity: 0; }
.c4 .c4-app { cursor: pointer; outline: none; }
.c4 .c4-hit { fill: transparent; }
.c4 .c4-dot { stroke-width: 1.4; transition: r 0.2s; }
.c4 .role-0 .c4-dot { fill: var(--blue); stroke: var(--blue); }
.c4 .role-1 .c4-dot { fill: var(--green); stroke: var(--green); }
.c4 .role-2 .c4-dot { fill: var(--ink); stroke: var(--ink); }
.c4 .role-3 .c4-dot { fill: none; stroke: var(--clay); stroke-dasharray: 2 2; }
.fig .c4 .c4-label { fill: var(--text); }
.c4 .c4-app:hover .c4-dot, .c4 .c4-app:focus-visible .c4-dot, .c4 .c4-app.picked .c4-dot { r: 7; }
.fig .c4 .c4-app.picked .c4-label, .fig .c4 .c4-app:focus-visible .c4-label { fill: var(--ink); font-weight: 500; }
.c4-legend { flex-direction: row; flex-wrap: wrap; gap: 4px 18px; margin-top: 12px; }
.c4-legend .c4-role-0::before { background: var(--blue); }
.c4-legend .c4-role-1::before { background: var(--green); }
.c4-legend .c4-role-2::before { background: var(--ink); }
.c4-legend .c4-role-3::before { border: 1px dashed var(--clay); }
.c4-bar-label { font-size: 13px; letter-spacing: 0.04em; color: var(--muted); }
html[lang="en"] .c4-bar-label { font-size: 15px; letter-spacing: 0; }
/* a pressed constraint is one still standing: clay, not green */
figure.fig[data-fig="c4"] button[aria-pressed="true"] { border-color: var(--clay); background: none; color: var(--clay-text); box-shadow: inset 0 0 0 1px var(--clay); }
figure.fig[data-fig="c4"] button[aria-pressed="false"] { text-decoration: line-through; color: var(--muted); }

/* a2: the pyramid caving into the shape of 工 */
.a2 .a2-shape { fill: var(--ghost); }
.a2 .a2-p.bu, .a2 .a2-p.region { fill: var(--ink); }
.a2 .a2-p.district { fill: var(--clay); }
.a2 .a2-p.rep { fill: var(--green); }
.a2 .a2-agents rect { fill: var(--green); opacity: 0.55; }
.fig .a2 .a2-job { fill: var(--ink); }
.fig .a2 .a2-ai-t { fill: var(--green); font-style: italic; }
.fig .a2 .a2-name { fill: var(--text); }
/* a slider in a figure's control row */
.a2-range { display: flex; flex: 1 1 100%; align-items: center; gap: 14px; padding-right: 4px; font-size: 14px; color: var(--muted); }
html[lang="en"] .a2-range { font-size: 16px; }
.fig input[type="range"] { flex: 1; min-width: 0; height: 24px; margin: 0; background: none; accent-color: var(--green); cursor: pointer; }

/* b2: the bought model in the middle, the harness written around it */
.b2 .b2-part { cursor: pointer; outline: none; }
.b2 .b2-part path { fill: var(--paper); stroke: var(--rule-strong); stroke-width: 1; stroke-dasharray: 3 3; transition: fill 0.4s, stroke 0.4s; }
.b2 .b2-part.on path { fill: var(--green); stroke: var(--green); stroke-dasharray: none; }
.fig .b2 .b2-part-t { fill: var(--muted); transition: fill 0.4s; }
.fig .b2 .b2-part.on .b2-part-t { fill: var(--paper); }
.b2 .b2-part:hover path, .b2 .b2-part:focus-visible path { stroke: var(--ink); stroke-width: 1.5; }
.b2 .b2-part.picked path { stroke: var(--clay); stroke-width: 3; stroke-dasharray: none; }
.b2 .b2-core { transform-box: fill-box; transform-origin: center; transition: transform 0.38s ease-in, opacity 0.38s; }
.b2 .b2-core.out { transform: scale(0.4) rotate(-40deg); opacity: 0; transition-timing-function: ease-in; }
.b2 .b2-core circle { fill: var(--ink); }
.b2 .b2-core-t { font-size: 17px; fill: var(--paper); letter-spacing: 0.08em; }
html[lang="en"] .b2 .b2-core-t { font-size: 19px; letter-spacing: 0.02em; }
.fig .b2 .b2-core-s { fill: var(--sand); }
.fig .b2 .b2-ring-label { fill: var(--green); }
@media (prefers-reduced-motion: reduce) { .b2 .b2-core { transition: none; } }

/* c1: the response curve under each policy state, and last year's allocation on it */
.c1 .c1-axis { stroke: var(--ink); stroke-width: 1; }
.c1 .c1-area { fill: var(--sage); }
.c1 .c1-line { fill: none; stroke: var(--green); stroke-width: 2.2; stroke-linejoin: round; }
.c1 .c1-plan line { stroke: var(--ink); stroke-width: 1.2; }
.fig .c1 .c1-plan-t { fill: var(--muted); }
.c1 .c1-stem { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 2 3; opacity: 0.45; }
.c1 .c1-dot { fill: var(--green); stroke: var(--sand); stroke-width: 2; transition: fill 0.3s; }
.c1 .c1-dot.flat { fill: var(--clay); }

/* c2: visits by tier against visits doctor by doctor */
.c2 .c2-bar { fill: var(--paper); }
.c2 .c2-gap { fill: var(--clay); fill-opacity: 0.45; }
.c2 .c2-line { fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linejoin: round; }
.c2 .c2-axis { stroke: var(--ink); stroke-width: 1; }
.c2 .c2-tier-line { stroke: var(--green); stroke-width: 1; stroke-dasharray: 2 3; }
.c2 .c2-tier { font-family: var(--en); font-size-adjust: none; font-style: italic; font-size: 20px; fill: var(--green); }
.fig .c2 .c2-mark { fill: var(--clay-text); }
.c2 .c2-lead { stroke: var(--clay); stroke-width: 1; stroke-dasharray: 2 2; }

.related { display: flex; flex-direction: column; gap: 10px; margin: 56px 0 0; padding: 22px 24px; background: var(--panel); }
.related-label { font-size: 13px; letter-spacing: 0.06em; color: var(--faint); }
html[lang="en"] .related-label { font-size: 15px; letter-spacing: 0; }
.product-link { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; color: var(--ink); }
.product-link strong { font-family: var(--en); font-size-adjust: none; font-size: 22px; font-weight: 400; letter-spacing: 0.05em; }
.product-link span { font-size: 15px; }
html[lang="en"] .product-link span { font-size: 17px; }
.product-link .more { margin-left: auto; }
.series-nav { margin: 48px 0 0; }
.series-nav-label { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; margin: 0 0 10px; font-size: 13px; letter-spacing: 0.06em; color: var(--faint); }
html[lang="en"] .series-nav-label { font-size: 15px; letter-spacing: 0; }
.series-nav ol { margin: 0; padding: 0 0 0 1.4em; }
.series-nav li { font-size: 15px; line-height: 2; color: var(--ink); }
html[lang="en"] .series-nav li { font-size: 17px; line-height: 1.6; }
.series-nav li::marker { font-family: var(--en); color: var(--faint); }
.post-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 32px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--rule); font-size: 14px; line-height: 1.8; letter-spacing: 0.04em; }
.post-foot a { text-wrap: balance; }
.post-foot .next { text-align: right; }
html[lang="en"] .post-foot { font-size: 16px; letter-spacing: 0; }
.author { display: flex; gap: 20px; align-items: center; margin-top: 48px; }
.author-photo { flex: 0 0 auto; }
.author img { width: 56px; height: 70px; object-fit: cover; }
.author p { margin: 0; font-size: 14px; line-height: 2; color: var(--muted); }
html[lang="en"] .author p { font-size: 16px; line-height: 1.6; }
.author strong { font-weight: 500; color: var(--ink); }

/* ---- work -------------------------------------------------------------------------------------------------------- */

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* the offering page: each product in a few lines, its own page a click away */
.product-brief + .product-brief { margin-top: 56px; padding-top: 56px; border-top: 1px solid var(--rule); }
.products .label { padding-top: 12px; }
.product-brief .project-name a { color: var(--ink); }
.product-brief .project-name a:hover { color: var(--green); }
.brief { margin: 18px 0 0; font-size: 15px; line-height: 2.1; color: var(--text); text-wrap: pretty; }
html[lang="en"] .brief { font-size: 18px; line-height: 1.65; }
.product-brief .meta { margin-top: 18px; }
.product-brief .more { display: inline-block; margin-top: 18px; }
main > .project { padding-top: 72px; }
.project-head .label a { color: var(--green); }
.project > header { margin-bottom: 44px; }
.project-name { margin: 0; font-family: var(--en); font-size-adjust: none; font-size: 34px; font-weight: 400; letter-spacing: 0.05em; line-height: 1.2; }
.project-name em { margin-left: 12px; font-size: 17px; color: var(--muted); letter-spacing: 0.02em; }
.project-sub { margin: 10px 0 0; font-size: 17px; font-weight: 500; letter-spacing: 0.04em; }
html[lang="en"] .project-sub { font-size: 20px; letter-spacing: 0; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 12px 0 0; font-family: var(--en); font-size: 14px; font-size-adjust: none; letter-spacing: 0.05em; color: var(--faint); }
.project .label { font-size: 16px; }
.project header .label { font-size: 17px; padding-top: 12px; }
html[lang="zh-CN"] .part .label { font-family: var(--zh); font-style: normal; font-size: 14px; letter-spacing: 0.1em; padding-top: 6px; }
.part { margin-top: 36px; }
.part p { margin: 0; font-size: 16px; line-height: 2.05; color: var(--text); text-wrap: pretty; }
html[lang="en"] .part p { font-size: 18px; line-height: 1.7; }
.build, .reading { margin: 0; padding: 0; list-style: none; }
.build li { position: relative; padding: 0 0 12px 22px; font-size: 16px; line-height: 2; color: var(--text); }
html[lang="en"] .build li { font-size: 18px; line-height: 1.65; }
.build li::before { content: ''; position: absolute; left: 2px; top: 0.9em; width: 7px; height: 7px; border: 1px solid var(--green); border-radius: 50%; }
.reading li { font-size: 16px; line-height: 2.1; }
html[lang="en"] .reading li { font-size: 18px; line-height: 1.7; }
.demo-title { margin: 0 0 18px; font-size: 17px; font-weight: 500; letter-spacing: 0.04em; }
html[lang="en"] .demo-title { font-size: 20px; letter-spacing: 0; }
.demo-note { margin: 14px 0 0; font-size: 13px; color: var(--faint); }
html[lang="en"] .demo-note { font-size: 15px; }

.chart { margin: 0; }
.ciu-chart { display: block; width: 100%; height: auto; overflow: visible; }
.ciu-chart.narrow { display: none; }
.c-title { fill: var(--ink); }
.c-count { fill: var(--green); }
.c-signal { fill: none; stroke: var(--ink); stroke-width: 1.2; }
.c-plan { fill: none; stroke: var(--green); stroke-width: 2.2; stroke-linejoin: round; }
.c-gap { fill: var(--clay); fill-opacity: 0.32; fill-rule: evenodd; }
.c-move { fill: var(--green); stroke: var(--paper); stroke-width: 1.5; }
.c-event { stroke: var(--rule-strong); stroke-dasharray: 2 3; }
.c-event-label, .c-axis { fill: var(--faint); }
.chart figcaption { margin-top: 16px; font-size: 13px; line-height: 1.9; color: var(--faint); }
html[lang="en"] .chart figcaption { font-size: 15px; line-height: 1.5; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-bottom: 6px; color: var(--text); }
.key::before { content: ''; display: inline-block; width: 16px; margin-right: 8px; vertical-align: middle; }
.key-signal::before { border-top: 1.2px solid var(--ink); }
.key-plan::before { border-top: 2.2px solid var(--green); }
.key-gap::before { height: 10px; background: var(--clay); opacity: 0.4; }

/* the AI CRM demo: a rep's morning, one decision at a time */
.demo { padding: 22px 24px 24px; background: var(--panel); }
.demo-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 16px; font-size: 13px; letter-spacing: 0.03em; color: var(--muted); }
html[lang="en"] .demo-head { font-size: 15px; letter-spacing: 0; }
.demo-dots { display: flex; gap: 7px; }
.demo-dots i { width: 11px; height: 11px; border: 1px solid var(--ink); border-radius: 50%; }
.demo-dots i.on { border-color: var(--green); outline: 1px solid var(--green); outline-offset: 2px; }
.demo-dots i.yes { background: var(--green); border-color: var(--green); }
.demo-dots i.no { background: linear-gradient(135deg, transparent 45%, var(--clay) 45%, var(--clay) 55%, transparent 55%); border-color: var(--clay); }
.cards { margin: 18px 0 0; padding: 0; list-style: none; }
.card { padding: 16px 0; border-top: 1px solid var(--rule-strong); }
.demo.live .card { display: none; padding: 20px 0 6px; animation: rise 0.35s ease-out; }
.demo.live .card.current { display: block; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
.card-kind { font-size: 13px; letter-spacing: 0.1em; color: var(--green); }
html[lang="en"] .card-kind { font-size: 15px; letter-spacing: 0.02em; }
.card-title { margin: 6px 0 12px; font-size: 19px; font-weight: 500; line-height: 1.6; letter-spacing: 0.02em; }
html[lang="en"] .card-title { font-size: 22px; line-height: 1.3; letter-spacing: 0; }
.card-line { display: grid; grid-template-columns: 4.2em minmax(0, 1fr); margin: 0 0 6px; font-size: 15px; line-height: 1.9; color: var(--text); }
html[lang="en"] .card-line { grid-template-columns: 4em minmax(0, 1fr); font-size: 17px; line-height: 1.5; }
.card-line span { color: var(--faint); }
.demo-actions { margin-top: 14px; }
.choose, .reasons { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.demo button { padding: 8px 22px; border: 1px solid var(--green); background: none; font-size: 15px; letter-spacing: 0.08em; color: var(--green); cursor: pointer; }
html[lang="en"] .demo button { font-size: 17px; letter-spacing: 0.02em; }
.demo button:hover, .demo .accept { background: var(--green); color: var(--paper); }
.demo .accept:hover { background: var(--ink); border-color: var(--ink); }
.demo .veto:hover { background: none; border-color: var(--clay); color: var(--clay); }
.reasons span { width: 100%; font-size: 13px; color: var(--muted); }
html[lang="en"] .reasons span { font-size: 15px; }
.demo .reason { padding: 5px 14px; border-color: var(--rule-strong); border-radius: 999px; font-size: 13px; letter-spacing: 0.02em; color: var(--text); }
html[lang="en"] .demo .reason { font-size: 15px; }
.demo .reason:hover { border-color: var(--clay); background: none; color: var(--clay); }
.demo-end { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--rule-strong); }
.demo-end h4, .after-lead { margin: 0 0 10px; font-size: 15px; font-weight: 500; }
html[lang="en"] .demo-end h4, html[lang="en"] .after-lead { font-size: 17px; }
.plan, .veto-list { margin: 0 0 14px; padding: 0; list-style: none; }
.plan li, .veto-list li { padding: 5px 0 5px 20px; position: relative; font-size: 15px; line-height: 1.8; color: var(--text); white-space: pre-wrap; }
html[lang="en"] .plan li, html[lang="en"] .veto-list li { font-size: 17px; line-height: 1.5; }
.plan li::before { content: ''; position: absolute; left: 0; top: 0.75em; width: 9px; height: 9px; border-radius: 50%; background: var(--green); }
.plan li.empty { padding-left: 0; }
.plan li.empty::before { display: none; }
.veto-list li::before { content: ''; position: absolute; left: 0; top: 0.75em; width: 9px; height: 9px; border-radius: 50%; border: 1px solid var(--clay); }
.vetoed, .loop { margin: 0 0 10px; font-size: 14px; line-height: 1.9; color: var(--muted); }
html[lang="en"] .vetoed, html[lang="en"] .loop { font-size: 16px; line-height: 1.5; }
.vetoed:empty { display: none; }
.after { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--rule-strong); }
.demo.live .after { display: none; }
.demo.live.done .after { display: block; animation: rise 0.35s ease-out; }
.after blockquote { margin: 0 0 16px; padding-left: 16px; border-left: 1px solid var(--green); font-size: 15px; line-height: 1.9; color: var(--muted); }
html[lang="en"] .after blockquote { font-size: 17px; line-height: 1.55; font-style: italic; }
.after dl { margin: 0; display: grid; gap: 8px; }
.after dl div { display: grid; grid-template-columns: 5.5em minmax(0, 1fr); gap: 12px; font-size: 15px; line-height: 1.8; }
html[lang="en"] .after dl div { grid-template-columns: 7.5em minmax(0, 1fr); font-size: 17px; line-height: 1.5; }
.after dt { color: var(--green); }
.after dd { margin: 0; color: var(--text); }
.coda { margin: 16px 0 0; font-size: 15px; font-weight: 500; }
html[lang="en"] .coda { font-size: 17px; }
.demo .again { margin-top: 18px; background: none; color: var(--green); }

/* ---- photography ------------------------------------------------------------------------------------------------- */

.photos .gear { font-family: var(--en); font-size-adjust: none; letter-spacing: 0.06em; color: var(--faint); }
.stop { padding: 0 0 40px; }
.stop h2 { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 18px; padding-top: 18px; border-top: 1px solid var(--ink); font-size: 18px; font-weight: 500; letter-spacing: 0.08em; }
html[lang="en"] .stop h2 { font-size: 22px; letter-spacing: 0.02em; }
.stop .when { font-family: var(--en); font-size-adjust: none; font-size: 15px; font-weight: 400; letter-spacing: 0.04em; color: var(--faint); }
/* photos in a row grow in proportion to their aspect ratio, so they share one height */
.photo-row { display: flex; gap: 16px; margin-bottom: 16px; }
.photo { flex: var(--r) 1 0; min-width: 0; cursor: zoom-in; }
.photo img { width: 100%; background: var(--panel); }

.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(20, 19, 17, 0.94); cursor: zoom-out; animation: fade 0.2s ease-out; }
/* the gallery copy and the large one sit in the same spot; the small one shows until the large one loads */
.lightbox img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; padding: 40px; object-fit: contain; }
.lightbox .caption { position: absolute; left: 0; right: 0; bottom: 14px; text-align: center; font-size: 13px; letter-spacing: 0.06em; color: rgba(244, 242, 237, 0.7); }
.rotate-hint { display: none; position: absolute; left: 0; right: 0; bottom: 56px; flex-direction: column; align-items: center; gap: 16px; color: rgba(244, 242, 237, 0.8); font-size: 13px; letter-spacing: 0.12em; }
.phone-icon { width: 12px; height: 20px; border: 1.5px solid; border-radius: 3px; animation: turn 2.4s ease-in-out infinite; }
@keyframes fade { from { opacity: 0; } }
@keyframes turn { 0%, 25% { transform: none; } 55%, 100% { transform: rotate(90deg); } }
/* touch screens: the photo goes edge to edge; a wide one held upright asks to be turned sideways */
@media (hover: none) and (pointer: coarse) {
  .lightbox img { padding: 0; }
  .lightbox .caption { display: none; }
}
@media (hover: none) and (pointer: coarse) and (orientation: portrait) {
  .lightbox.wide .rotate-hint { display: flex; }
}

/* ---- about ------------------------------------------------------------------------------------------------------- */

.about-intro { padding: 72px 0 64px; }
.portrait { justify-self: end; width: 132px; height: 165px; object-fit: cover; }
.about-intro p { margin: 0 0 18px; font-size: 17px; line-height: 2.05; color: var(--text); text-wrap: pretty; }
html[lang="en"] .about-intro p { font-size: 20px; line-height: 1.6; }
.about-intro p:first-child { margin-top: -6px; }
.jobs { display: flex; flex-direction: column; gap: 44px; }
.title-row { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; margin-bottom: 12px; }
.title-row h3 { margin: 0; font-size: 19px; font-weight: 500; letter-spacing: 0.05em; }
html[lang="en"] .title-row h3 { font-size: 22px; letter-spacing: 0; }
.title-row .date { margin-left: auto; }
.job p { margin: 0; font-size: 15px; line-height: 2.05; color: var(--text); text-wrap: pretty; }
html[lang="en"] .job p { font-size: 17px; line-height: 1.6; }
.schools { display: flex; flex-direction: column; gap: 26px; }
.school h3 { margin: 0 0 4px; font-size: 16px; font-weight: 500; letter-spacing: 0.04em; }
html[lang="en"] .school h3 { font-size: 19px; letter-spacing: 0; }
.school p { margin: 0; font-size: 13px; line-height: 2; color: var(--muted); letter-spacing: 0.04em; }
html[lang="en"] .school p { font-size: 16px; line-height: 1.5; letter-spacing: 0; }
.contact .email { margin: 0 0 8px; font-size: 26px; }
.to-offering { margin: 0; font-size: 15px; }
html[lang="en"] .to-offering { font-size: 17px; }
.contact dl { margin: 28px 0 0; display: flex; flex-direction: column; gap: 8px; }
.contact dl div { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 24px; align-items: baseline; }
.contact dt { font-size: 13px; letter-spacing: 0.1em; color: var(--faint); }
html[lang="en"] .contact dt { font-size: 15px; letter-spacing: 0.02em; }
.contact dd { margin: 0; font-size: 15px; line-height: 2; color: var(--text); overflow-wrap: anywhere; }
html[lang="en"] .contact dd { font-size: 17px; line-height: 1.7; }

/* ---- 404 --------------------------------------------------------------------------------------------------------- */

.not-found { padding: 120px 0 80px; }
.not-found .en-line { margin-top: 12px; font-family: var(--en); font-size-adjust: 0.46; }
.not-found .links { margin-top: 36px; font-size: 15px; letter-spacing: 0.06em; }

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

.site-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin-top: 72px; padding: 24px 0 56px; border-top: 1px solid var(--ink); font-family: var(--en); font-size: 15px; font-size-adjust: none; letter-spacing: 0.04em; color: var(--muted); }
.site-footer .city { margin-left: auto; letter-spacing: 0.16em; text-transform: uppercase; }
/* the box from the first version of the site: a bordered invitation that fills in on hover */
.say-hello { flex: 0 0 100%; display: flex; justify-content: center; padding: 14px 0 10px; }
.say-hello a { padding: 9px 24px; border: 1px solid var(--green); color: var(--green); line-height: 1.6; text-align: center; transition: background 0.2s, color 0.2s; }
.say-hello a:hover { background: var(--green); color: var(--paper); }

/* ---- company (en/company/, ja/company/) --------------------------------------------------------------------------
   Tianze AI Inc's page for CIU: its own sticky header and footer, full-width sections, one accent (green) for the
   demo buttons and the key numbers, and clay for the people in the Claude diagram. */

html[lang="ja"] body { font-family: var(--ja); }
/* Japanese: no small kana or closing marks at a line start, and headings break between phrases, not inside words */
html[lang="ja"] .firm { line-break: strict; }
html[lang="ja"] .firm :is(h1, h2, h3, h4, .chart-claim, .flow-title) { word-break: auto-phrase; }
.firm [id] { scroll-margin-top: 92px; }

.firm-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px 30px; padding: 16px 0; background: var(--paper); border-bottom: 1px solid var(--rule-strong); }
.firm-brand { margin-right: auto; font-family: var(--en); font-size-adjust: none; font-size: 21px; letter-spacing: 0.02em; color: var(--ink); white-space: nowrap; }
.firm-brand:hover { color: var(--ink); }
.firm-nav { display: flex; align-items: center; gap: 26px; }
.firm-links { display: flex; gap: 22px; }
.firm-links a { font-size: 16px; color: var(--text); white-space: nowrap; }
html[lang="ja"] .firm-links a { font-size: 14px; letter-spacing: 0.04em; }
.firm-links a:hover { color: var(--green); }
.firm-lang { display: flex; gap: 6px; font-family: var(--ja-latin); font-size-adjust: none; font-size: 14px; color: var(--faint); white-space: nowrap; }
.firm-lang a { color: var(--faint); }
.firm-lang a:hover { color: var(--green); }
.firm-lang [aria-current] { color: var(--ink); }
.firm-lang .sep { color: var(--rule-strong); }
.firm-menu { display: none; }

.cta-button { display: inline-block; padding: 13px 26px; background: var(--green); color: var(--paper); font-size: 18px; line-height: 1.2; letter-spacing: 0.02em; white-space: nowrap; transition: background 0.3s; }
html[lang="ja"] .cta-button { font-size: 15px; letter-spacing: 0.08em; }
.cta-button:hover { background: var(--ink); color: var(--paper); }
.firm-book { padding: 9px 18px; font-size: 16px; }
html[lang="ja"] .firm-book { font-size: 13px; }
.cta-email { margin: 14px 0 0; font-size: 16px; color: var(--muted); }
html[lang="ja"] .cta-email { font-size: 13px; }
.cta-email span { font-family: var(--ja-latin); font-size-adjust: none; color: var(--text); -webkit-user-select: all; user-select: all; }

.firm-hero { padding: 104px 0 88px; }
.firm-hero h1 { margin: 0; max-width: 860px; font-size: 70px; font-weight: 400; line-height: 1.03; letter-spacing: -0.015em; color: var(--ink); text-wrap: balance; }
html[lang="ja"] .firm-hero h1 { font-size: 46px; font-weight: 500; line-height: 1.4; letter-spacing: 0.02em; }
.hero-sub { margin: 28px 0 0; max-width: 680px; font-size: 23px; line-height: 1.45; color: var(--text); text-wrap: pretty; }
html[lang="ja"] .hero-sub { font-size: 17px; line-height: 2; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; margin-top: 40px; }
.demo-link { font-size: 18px; }
html[lang="ja"] .demo-link { font-size: 15px; }
.firm-hero.has-media { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.04fr); gap: 52px; align-items: center; padding-top: 88px; }
.firm-hero.has-media h1 { font-size: 54px; }
html[lang="ja"] .firm-hero.has-media h1 { font-size: 36px; }
.firm-hero.has-media .hero-sub { font-size: 20px; }
html[lang="ja"] .firm-hero.has-media .hero-sub { font-size: 15px; }
.hero-media { margin: 0; }
.hero-media img, .hero-media video { display: block; width: 100%; height: auto; border: 1px solid var(--rule-strong); border-radius: 10px; background: #fff; box-shadow: 0 1px 2px rgba(28, 27, 24, 0.06), 0 18px 40px -18px rgba(28, 27, 24, 0.28); }
.hero-media figcaption { margin-top: 10px; font-size: 15px; color: var(--faint); }
html[lang="ja"] .hero-media figcaption { font-size: 12px; }

.firm-eyebrow { margin: 0 0 14px; font-family: var(--en); font-size-adjust: none; font-style: italic; font-size: 19px; letter-spacing: 0.03em; color: var(--green); }
.firm-hero .firm-eyebrow { margin-bottom: 22px; }
html[lang="ja"] .firm-eyebrow { font-family: var(--ja-latin); font-style: normal; font-size: 14px; letter-spacing: 0.1em; }
html[lang="ja"] .firm-hero .firm-eyebrow { font-style: italic; font-size: 18px; letter-spacing: 0.03em; }

.proof { border-top: 1px solid var(--ink); }
.proof-stats { display: grid; grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(0, 1fr)); margin: 0; }
.proof-stats div { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 10px; padding: 28px 18px 0 0; }
.proof-stats div + div { padding-left: 22px; border-left: 1px solid var(--rule); }
.proof-stats dd { margin: 0; font-family: var(--ja-latin); font-size-adjust: none; font-size: 46px; line-height: 1; letter-spacing: -0.01em; color: var(--green); white-space: nowrap; }
html[lang="ja"] .proof-stats dd { font-size: 40px; }
.proof-stats div:first-child dd { font-size: 40px; }
html[lang="ja"] .proof-stats div:first-child dd { font-size: 30px; }
.proof-stats dt { font-size: 16px; line-height: 1.4; color: var(--muted); }
html[lang="ja"] .proof-stats dt { font-size: 13px; line-height: 1.75; }
.proof-note { margin: 28px 0 0; font-size: 18px; color: var(--text); }
html[lang="ja"] .proof-note { font-size: 14px; }

.firm-section { padding-top: 112px; }
.firm-section h2, .firm-cta h2 { margin: 0; max-width: 780px; font-size: 42px; font-weight: 400; line-height: 1.12; letter-spacing: -0.005em; color: var(--ink); text-wrap: balance; }
html[lang="ja"] .firm-section h2, html[lang="ja"] .firm-cta h2 { font-size: 28px; font-weight: 500; line-height: 1.5; letter-spacing: 0.04em; }
.firm-lead { margin: 20px 0 0; max-width: 700px; font-size: 20px; line-height: 1.55; color: var(--text); text-wrap: pretty; }
html[lang="ja"] .firm-lead { font-size: 15px; line-height: 2.05; }

.firm-chart { margin-top: 44px; }
.chart-claim { margin: 0 0 22px; font-size: 22px; font-weight: 500; line-height: 1.35; color: var(--ink); }
html[lang="ja"] .chart-claim { font-size: 16px; line-height: 1.8; }
.c-axis-title { fill: var(--muted); }
.c-ev { cursor: pointer; outline: none; }
.c-ev-hit { fill: transparent; }
.c-ev-dot { fill: var(--paper); stroke: var(--faint); stroke-width: 1.2; }
.c-ev .c-event-label { opacity: 0; transition: opacity 0.2s; }
.c-ev.on .c-event-label, .c-ev:focus-visible .c-event-label { opacity: 1; }
.c-ev.on .c-ev-dot, .c-ev:focus-visible .c-ev-dot { fill: var(--ink); stroke: var(--ink); }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 64px; margin: 48px 0 0; padding: 0; list-style: none; }
.step { position: relative; padding-top: 20px; border-top: 2px solid var(--ink); }
.step + .step::before { content: '→'; position: absolute; left: -46px; top: 18px; font-family: var(--en); font-size-adjust: none; font-size: 26px; color: var(--green); }
.step-no { font-family: var(--en); font-size-adjust: none; font-style: italic; font-size: 17px; color: var(--green); }
html[lang="ja"] .step-no { font-family: var(--ja-latin); font-style: normal; font-size: 13px; letter-spacing: 0.08em; }
.step h3 { margin: 6px 0 10px; font-size: 28px; font-weight: 400; line-height: 1.2; color: var(--ink); }
html[lang="ja"] .step h3 { font-size: 19px; font-weight: 500; line-height: 1.6; }
.step p { margin: 0; font-size: 18px; line-height: 1.5; color: var(--text); text-wrap: pretty; }
html[lang="ja"] .step p { font-size: 14px; line-height: 1.95; }
.shot { display: block; width: 100%; height: auto; margin-top: 18px; border: 1px solid var(--rule-strong); }

.cap-rows { margin-top: 44px; border-bottom: 1px solid var(--rule); }
.cap-row { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 32px; padding: 30px 0; border-top: 1px solid var(--rule); }
.cap-name { margin: 0; padding-top: 14px; font-family: var(--en); font-size-adjust: none; font-style: italic; font-size: 26px; font-weight: 400; color: var(--green); }
html[lang="ja"] .cap-name { font-family: var(--ja); font-style: normal; font-size: 17px; font-weight: 500; letter-spacing: 0.1em; }
.cap-cards { display: grid; grid-template-columns: repeat(var(--cards, 3), minmax(0, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.cap-card { padding: 20px 20px 22px; background: var(--panel); }
.cap-card h4 { margin: 0 0 8px; font-size: 21px; font-weight: 500; line-height: 1.25; color: var(--ink); }
html[lang="ja"] .cap-card h4 { font-size: 15px; line-height: 1.6; }
.cap-card p { margin: 0; font-size: 16px; line-height: 1.5; color: var(--text); text-wrap: pretty; }
html[lang="ja"] .cap-card p { font-size: 13px; line-height: 1.9; }
.cap-body .shot { margin-top: 16px; border-radius: 8px; background: #fff; }

.flow { margin: 48px 0 0; }
.flow-title { margin: 0; font-size: 23px; font-weight: 500; line-height: 1.3; color: var(--ink); }
html[lang="ja"] .flow-title { font-size: 17px; line-height: 1.6; }
.flow-sub { margin: 6px 0 26px; font-size: 17px; color: var(--muted); }
html[lang="ja"] .flow-sub { font-size: 13px; }
.flow-chart { display: block; width: 100%; height: auto; }
.flow-chart.narrow { display: none; }
.fl-node rect { fill: var(--paper); stroke: var(--faint); stroke-width: 1.25; }
.fl-ai rect { fill: color-mix(in srgb, var(--green) 11%, var(--paper)); stroke: var(--green); stroke-width: 2; }
.fl-person rect { fill: color-mix(in srgb, var(--clay) 14%, var(--paper)); stroke: var(--clay); stroke-width: 2; }
.fl-name { font-size: 17px; font-weight: 500; fill: var(--ink); }
.fl-line { font-size: 15px; fill: var(--muted); }
.fl-ai .fl-line, .fl-person .fl-line { fill: var(--text); }
html[lang="ja"] .fl-name { font-size: 15.5px; }
html[lang="ja"] .fl-line { font-size: 13px; }
.flow-chart.narrow .fl-name { font-size: 18px; }
.flow-chart.narrow .fl-line { font-size: 16px; }
html[lang="ja"] .flow-chart.narrow .fl-name { font-size: 16.5px; }
html[lang="ja"] .flow-chart.narrow .fl-line { font-size: 14px; }
.fl-conn path { fill: none; stroke: var(--faint); stroke-width: 1.25; }
.fl-head { fill: var(--faint); }
.fl-label { font-size: 15px; font-style: italic; fill: var(--muted); }
html[lang="ja"] .fl-label { font-size: 13px; font-style: normal; }
.flow-key { display: flex; flex-wrap: wrap; gap: 8px 26px; margin-top: 16px; font-size: 15px; color: var(--text); }
html[lang="ja"] .flow-key { font-size: 12px; }
.fk::before { content: ''; display: inline-block; width: 12px; height: 12px; margin-right: 8px; vertical-align: -1px; border: 1.25px solid var(--faint); border-radius: 3px; background: var(--paper); }
.fk-ai::before { border: 2px solid var(--green); background: color-mix(in srgb, var(--green) 11%, var(--paper)); }
.fk-person::before { border: 2px solid var(--clay); background: color-mix(in srgb, var(--clay) 14%, var(--paper)); }
.roles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin-top: 40px; }
.role { padding-top: 14px; border-top: 2px solid var(--faint); }
.role-ai { border-top-color: var(--green); }
.role-person { border-top-color: var(--clay); }
.role h3 { margin: 0 0 10px; font-size: 20px; font-weight: 500; color: var(--ink); }
html[lang="ja"] .role h3 { font-size: 15px; }
.role ul { margin: 0; padding: 0; list-style: none; }
.role li { position: relative; padding: 0 0 8px 16px; font-size: 17px; line-height: 1.45; color: var(--text); }
html[lang="ja"] .role li { font-size: 13px; line-height: 1.8; }
.role li::before { content: ''; position: absolute; left: 0; top: 0.6em; width: 6px; height: 6px; border-radius: 50%; background: var(--faint); }
.role-ai li::before { background: var(--green); }
.role-person li::before { background: var(--clay); }

.security-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin: 40px 0 0; padding: 0; list-style: none; }
.security-cards li { padding: 20px; background: var(--panel); }
.security-cards h3 { margin: 0 0 8px; font-size: 19px; font-weight: 500; color: var(--ink); }
.security-cards p { margin: 0; font-size: 16px; line-height: 1.5; color: var(--text); }
html[lang="ja"] .security-cards h3 { font-size: 15px; }
html[lang="ja"] .security-cards p { font-size: 13px; line-height: 1.9; }
.more-link { margin: 20px 0 0; font-size: 17px; }

.markets { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 40px; }
.market { padding: 26px 28px 28px; border: 1px solid var(--rule-strong); }
.market-apac { border: 2px solid var(--green); }
.market h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 10px; font-size: 28px; font-weight: 400; color: var(--ink); }
html[lang="ja"] .market h3 { font-size: 20px; font-weight: 500; }
.tag { padding: 2px 10px; border: 1px solid var(--green); border-radius: 999px; font-size: 14px; letter-spacing: 0.04em; color: var(--green); }
html[lang="ja"] .tag { font-size: 12px; }
.market p { margin: 0; font-size: 18px; line-height: 1.5; color: var(--text); }
html[lang="ja"] .market p { font-size: 14px; line-height: 1.95; }

.founder { display: flex; gap: 24px; align-items: flex-start; margin-top: 32px; }
.founder-photo { width: 132px; height: 165px; object-fit: cover; }
.founder h3 { margin: 0; font-size: 26px; font-weight: 400; color: var(--ink); }
.founder p { margin: 0; max-width: 560px; font-size: 17px; line-height: 1.5; color: var(--text); }
.founder .founder-role { margin: 4px 0 10px; color: var(--muted); }

.firm-cta { margin-top: 120px; padding: 72px 32px; background: var(--panel); text-align: center; }
.firm-cta h2 { margin: 0 auto; }
.firm-cta > p:not(.cta-email) { max-width: 580px; margin: 16px auto 32px; font-size: 20px; line-height: 1.5; color: var(--text); text-wrap: pretty; }
html[lang="ja"] .firm-cta > p:not(.cta-email) { font-size: 15px; line-height: 2; }

.firm-foot { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 32px; margin-top: 72px; padding: 26px 0 48px; border-top: 1px solid var(--ink); font-family: var(--ja-latin); font-size-adjust: none; font-size: 15px; color: var(--muted); }
html[lang="ja"] .firm-foot-links { font-family: var(--ja); font-size: 13px; }
.firm-foot p { margin: 0; }
.firm-entity { color: var(--ink); }
.firm-foot-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 10px; }
.firm-foot-links a { color: var(--muted); }
.firm-foot-links a:hover { color: var(--green); }
.firm-foot .sep { color: var(--rule-strong); }
.firm-copy { justify-self: end; font-size: 14px; color: var(--faint); }

/* narrower than the header's row: sections and language fold into a menu, the demo button stays */
@media (max-width: 980px) {
  .firm-top { flex-wrap: wrap; }
  .firm-nav { order: 3; width: 100%; flex-wrap: wrap; gap: 10px 22px; }
  .firm-links { flex-wrap: wrap; gap: 8px 18px; }
  .firm-top.menu-ready { flex-wrap: nowrap; }
  .firm-top.menu-ready .firm-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: flex-start; gap: 20px; padding: 18px 0 24px; background: var(--paper); border-bottom: 1px solid var(--rule-strong); }
  .firm-top.menu-ready.menu-open .firm-nav { display: flex; }
  .firm-top.menu-ready .firm-links { flex-direction: column; gap: 14px; }
  .firm-top.menu-ready .firm-links a { font-size: 19px; }
  html[lang="ja"] .firm-top.menu-ready .firm-links a { font-size: 16px; }
  .firm-menu { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin-right: -8px; padding: 0; border: 0; background: none; cursor: pointer; }
  .firm-menu span, .firm-menu span::before, .firm-menu span::after { display: block; width: 20px; height: 1.5px; background: var(--ink); transition: transform 0.2s, background 0.2s; }
  .firm-menu span { position: relative; }
  .firm-menu span::before, .firm-menu span::after { content: ''; position: absolute; left: 0; }
  .firm-menu span::before { top: -6px; }
  .firm-menu span::after { top: 6px; }
  .menu-open .firm-menu span { background: transparent; }
  .menu-open .firm-menu span::before { transform: translateY(6px) rotate(45deg); }
  .menu-open .firm-menu span::after { transform: translateY(-6px) rotate(-45deg); }
  .firm-hero.has-media { grid-template-columns: minmax(0, 1fr); gap: 44px; }
  .firm-hero.has-media h1 { font-size: 60px; }
  .cap-row { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .cap-name { padding-top: 0; }
}

@media (max-width: 640px) {
  .firm [id] { scroll-margin-top: 76px; }
  .firm-top { gap: 10px 14px; padding: 12px 0; }
  .firm-brand { font-size: 19px; }
  .firm-book { padding: 8px 14px; font-size: 15px; }
  .firm-hero, .firm-hero.has-media { padding: 56px 0 56px; }
  .firm-hero h1, .firm-hero.has-media h1 { font-size: 42px; line-height: 1.05; }
  html[lang="ja"] .firm-hero h1, html[lang="ja"] .firm-hero.has-media h1 { font-size: 29px; line-height: 1.45; }
  .hero-sub { margin-top: 22px; font-size: 19px; }
  html[lang="ja"] .hero-sub { font-size: 15px; line-height: 1.95; }
  .hero-actions { margin-top: 32px; }
  .proof-stats { grid-template-columns: 1fr 1fr; }
  .proof-stats div, .proof-stats div + div { padding: 20px 12px 18px 0; border-left: 0; border-bottom: 1px solid var(--rule); }
  .proof-stats div:nth-child(even) { padding-left: 16px; border-left: 1px solid var(--rule); }
  .proof-stats dd, html[lang="ja"] .proof-stats dd { font-size: 36px; }
  .proof-stats div:first-child dd { font-size: 30px; }
  html[lang="ja"] .proof-stats div:first-child dd { font-size: 22px; }
  .proof-note { margin-top: 20px; font-size: 17px; }
  .firm-section { padding-top: 80px; }
  .firm-section h2, .firm-cta h2 { font-size: 31px; }
  html[lang="ja"] .firm-section h2, html[lang="ja"] .firm-cta h2 { font-size: 21px; }
  .firm-lead { font-size: 18px; }
  .chart-claim { font-size: 19px; }
  .steps { grid-template-columns: minmax(0, 1fr); gap: 52px; margin-top: 36px; }
  .step + .step::before { content: '↓'; left: 0; top: -42px; }
  .roles, .markets { grid-template-columns: minmax(0, 1fr); }
  .cap-rows { margin-top: 32px; }
  .cap-row { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 24px 0; }
  .cap-name { padding-top: 0; }
  .cap-cards { grid-template-columns: minmax(0, 1fr); }
  .flow { margin-top: 36px; }
  .flow-chart.wide { display: none; }
  .flow-chart.narrow { display: block; max-width: 400px; margin: 0 auto; }
  .firm-cta { margin: 96px -20px 0; padding: 52px 20px; }
  .firm-foot { grid-template-columns: minmax(0, 1fr); margin-top: 56px; padding-bottom: 40px; }
  .firm-foot-links { justify-content: flex-start; }
  .firm-copy { justify-self: start; }
}

/* ---- phones ------------------------------------------------------------------------------------------------------ */

@media (max-width: 640px) {
  .page { padding: 0 20px; }
  .site-header { padding-top: 32px; padding-bottom: 0; row-gap: 20px; }
  .brand-name { font-size: 26px; }
  .site-nav { order: 3; width: 100%; justify-content: space-between; gap: 8px; padding: 13px 0 12px; border-top: 1px solid var(--rule); }
  .site-nav a { font-size: 15px; letter-spacing: 0.1em; }
  html[lang="en"] .site-nav a { font-size: 17px; }
  .site-nav a[aria-current="page"] { text-underline-offset: 7px; }

  .split { grid-template-columns: minmax(0, 1fr); row-gap: 14px; }
  .label { text-align: left; padding-top: 0; }
  .section { padding: 48px 0; }
  .intro { padding: 44px 0 44px; }
  .lead { font-size: 21px; line-height: 1.85; }
  html[lang="en"] .lead { font-size: 25px; line-height: 1.35; }

  .hero { padding: 48px 0 48px; }
  .hero-line { font-size: 27px; line-height: 1.65; letter-spacing: 0.02em; }
  html[lang="en"] .hero-line { font-size: 33px; line-height: 1.2; }
  .hero-intro { font-size: 16px; }
  html[lang="en"] .hero-intro { font-size: 19px; }
  .hero-figure { margin-top: 40px; }
  .grid.wide { display: none; }
  .grid.narrow { display: block; }
  .feature { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .doors { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .with-me { font-size: 42px; }
  .offering-brief .with-me { font-size: 34px; }
  .offer-head .email { font-size: 22px; }
  .product-brief + .product-brief { margin-top: 40px; padding-top: 40px; }
  .products .label, .ways-in .label { padding-top: 0; }
  main > .project { padding-top: 40px; }

  .post-list { gap: 28px; }
  .post-item { grid-template-columns: 96px minmax(0, 1fr); column-gap: 16px; }
  .thumb { width: 96px; }
  .series .label.letter { font-size: 34px; }

  .post { padding-top: 40px; row-gap: 20px; }
  .post-meta, .post-meta a { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; text-align: left; padding-top: 0; }
  .post-meta a { gap: 8px; }
  .post-meta .letter { font-size: 20px; }
  .post-foot { grid-template-columns: minmax(0, 1fr); }
  .post-foot .next { text-align: left; }
  .post-body h1 { font-size: 26px; }
  html[lang="en"] .post-body h1 { font-size: 32px; }
  .post-body p, .post-body li { font-size: 16px; line-height: 1.95; }
  html[lang="en"] .post-body p, html[lang="en"] .post-body li { font-size: 18px; line-height: 1.65; }
  .post-body table { min-width: 480px; }
  .b1 { padding: 18px 16px 20px; }
  .b4-quote { padding: 0 16px 16px; }
  .b1-cards, .b1-bins { grid-template-columns: minmax(0, 1fr); }
  .product-link .more { margin-left: 0; width: 100%; }

  .project-name { font-size: 30px; }
  .project-name em { display: block; margin: 6px 0 0; }
  .part { margin-top: 26px; }
  html[lang="zh-CN"] .part .label { padding-top: 0; }
  .demo { margin: 0 -20px; padding: 20px; }
  .ciu-chart.wide { display: none; }
  .ciu-chart.narrow { display: block; }

  .photo-row { flex-direction: column; gap: 12px; margin-bottom: 12px; }
  .photo { flex: none; }

  .about-intro { padding: 40px 0 44px; }
  .portrait { justify-self: start; width: 112px; height: 140px; }
  .title-row .date { flex-basis: 100%; margin-left: 0; }
  .contact dl div { grid-template-columns: minmax(0, 1fr); gap: 0; }

  .site-footer { margin-top: 56px; padding-bottom: 40px; gap: 12px 20px; }
  .site-footer .city { flex-basis: 100%; margin-left: 0; }
}
