:root {
  --ink: #172033;
  --ink-strong: #0d1526;
  --muted: #5e6b82;
  --paper: #f7fbff;
  --surface: #ffffff;
  --soft: #eaf7fb;
  --line: #d5e4ee;
  --line-strong: #abc3d5;
  --blue: #2458c6;
  --blue-dark: #173f94;
  --blue-soft: #e7f2fb;
  --green: #18794e;
  --signal: #dff6f7;
  --danger: #a9362b;
  --shadow: 0 24px 64px rgb(36 60 96 / 16%);
  color: var(--ink);
  font-family: "Segoe UI Variable", "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  font-synthesis: none;
  letter-spacing: 0;
  line-height: 1.65;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
}

body,
button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  border-radius: 6px;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

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

p,
h1,
h2,
h3,
figure,
dl,
dd {
  margin-top: 0;
}

h1,
h2,
h3 {
  color: var(--ink-strong);
  line-height: 1.14;
}

h1 {
  letter-spacing: 0;
}

:focus-visible {
  outline: 3px solid #7aabff;
  outline-offset: 3px;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 16px;
  z-index: 200;
  padding: 10px 14px;
  background: var(--surface);
  color: var(--blue-dark);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.nav-shell,
.section-inner,
.page-shell,
.footer-shell,
.closing-inner,
.hero-inner,
.hero-question-band {
  width: min(1200px, calc(100% - 56px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  min-height: 72px;
  border-bottom: 1px solid rgb(220 228 239 / 88%);
  background: rgb(245 248 252 / 96%);
  backdrop-filter: blur(16px);
}

.nav-shell {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.wordmark {
  min-width: 204px;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink-strong);
  text-decoration: none;
}

.wordmark-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--blue);
  border-radius: 6px;
  background: var(--blue);
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
}

.wordmark-copy {
  display: grid;
  line-height: 1.15;
}

.wordmark-copy strong {
  font-size: 15px;
}

.wordmark-copy small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  white-space: nowrap;
}

.primary-nav > a,
.primary-nav > button,
.footer-links a,
.footer-links button {
  min-height: 42px;
  padding: 9px 11px;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
}

.primary-nav > a:hover,
.primary-nav > button:hover,
.footer-links a:hover,
.footer-links button:hover {
  color: var(--blue);
}

.primary-nav .nav-consult-button {
  min-width: 138px;
  margin-left: 9px;
  padding-inline: 18px;
  background: var(--blue);
  color: #ffffff;
  font-weight: 700;
}

.primary-nav .nav-consult-button:hover {
  background: var(--blue-dark);
  color: #ffffff;
}

.language-switch {
  min-width: 106px;
  height: 38px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-left: 8px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.language-switch a {
  display: grid;
  place-items: center;
  border-radius: 4px;
  color: var(--muted);
  font-size: 12px;
  text-decoration: none;
}

.language-switch a[aria-current="true"] {
  background: var(--blue-soft);
  color: var(--blue-dark);
  font-weight: 700;
}

.mobile-menu-button {
  display: none;
  min-width: 72px;
  min-height: 42px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
}

.hero-section {
  position: relative;
  min-height: min(820px, calc(100dvh - 72px));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  isolation: isolate;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #eef4fc;
}

.hero-section::before,
.hero-section::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
}

.hero-section::before {
  inset: 0;
  opacity: 0;
}

.hero-section::after {
  inset: auto 0 0;
  height: 22%;
  background: var(--paper);
  clip-path: polygon(0 88%, 100% 38%, 100% 100%, 0 100%);
}

.hero-backdrop {
  position: absolute;
  z-index: -3;
  top: 52%;
  right: max(2vw, 16px);
  width: min(59vw, 900px);
  max-width: none;
  opacity: 0.78;
  filter: saturate(0.9) contrast(1.02);
  transform: translateY(-50%) rotate(-1deg);
}

.hero-wash {
  position: absolute;
  z-index: -2;
  inset: 0;
  background: rgb(238 244 252 / 56%);
}

.hero-inner {
  padding-top: 104px;
  padding-bottom: 64px;
}

.hero-brand {
  margin-bottom: 22px;
  color: var(--blue-dark);
  font-weight: 700;
}

.hero-inner h1 {
  max-width: 780px;
  margin-bottom: 26px;
  font-size: 76px;
  font-weight: 680;
}

.hero-description {
  max-width: 650px;
  margin-bottom: 34px;
  color: #40516d;
  font-size: 19px;
  line-height: 1.7;
}

.hero-actions,
.consent-prompt > div {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.primary-button,
.secondary-button,
.primary-small-button,
.quiet-button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 20px;
  border-radius: 6px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease, transform 120ms ease;
}

.primary-button,
.primary-small-button {
  border: 1px solid var(--blue);
  background: var(--blue);
  color: #ffffff;
}

.primary-button:hover,
.primary-small-button:hover {
  border-color: var(--blue-dark);
  background: var(--blue-dark);
}

.secondary-button,
.quiet-button {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--blue-dark);
}

.secondary-button:hover,
.quiet-button:hover {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.primary-button:active,
.secondary-button:active,
.primary-small-button:active,
.quiet-button:active {
  transform: translateY(1px);
}

.hero-question-band {
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding-bottom: 58px;
}

.hero-question-band button {
  min-height: 74px;
  padding: 18px 22px;
  border: 1px solid var(--line-strong);
  border-right: 0;
  border-radius: 0;
  background: rgb(255 255 255 / 90%);
  color: var(--ink);
  font-weight: 650;
  text-align: left;
}

.hero-question-band button:first-child {
  border-radius: 6px 0 0 6px;
}

.hero-question-band button:last-child {
  border-right: 1px solid var(--line-strong);
  border-radius: 0 6px 6px 0;
}

.hero-question-band button:hover {
  background: var(--blue-soft);
  color: var(--blue-dark);
}

.section {
  padding: 112px 0;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 52px;
}

.section-heading h2,
.narrow-heading h2,
.closing-section h2,
.about-band h2,
.mission-band h2,
.about-origin h2,
.principles-section h2 {
  margin-bottom: 20px;
  font-size: 44px;
  font-weight: 650;
}

.heading-tail {
  white-space: nowrap;
}

.section-heading p,
.closing-section p,
.about-band p {
  color: var(--muted);
  font-size: 18px;
}

.narrow-heading {
  max-width: 880px;
}

.problem-section {
  background: var(--surface);
}

.problem-list {
  display: grid;
  grid-template-columns: 1.1fr 0.95fr 0.95fr;
  border-top: 1px solid var(--line);
}

.problem-list article {
  min-height: 230px;
  padding: 32px 28px 30px 0;
}

.problem-list article + article {
  padding-left: 28px;
  border-left: 1px solid var(--line);
}

.problem-list h3 {
  margin-bottom: 14px;
  font-size: 24px;
}

.problem-list p,
.method-list p,
.service-card p,
.case-row p,
.evidence-facts p,
.role-grid p,
.case-story p,
.detail-main p,
.scope-panel p {
  color: var(--muted);
}

.method-section {
  background: var(--paper);
}

.method-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.8fr) minmax(0, 1.25fr);
  gap: 92px;
}

.method-list {
  counter-reset: method;
}

.method-list article {
  position: relative;
  min-height: 158px;
  padding: 8px 0 30px 78px;
  border-bottom: 1px solid var(--line);
  counter-increment: method;
}

.method-list article + article {
  padding-top: 30px;
}

.method-list article::before {
  content: counter(method);
  position: absolute;
  left: 0;
  top: 8px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--blue);
  font-weight: 800;
}

.method-list article + article::before {
  top: 30px;
}

.method-list h3 {
  margin-bottom: 10px;
  font-size: 23px;
}

.services-section {
  background: var(--surface);
}

.services-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  grid-template-rows: 1fr 1fr;
  gap: 14px;
}

.service-card {
  min-height: 286px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
}

.service-card-featured {
  grid-row: 1 / span 2;
  min-height: 586px;
  background: var(--blue-soft);
}

.service-id,
.detail-id {
  display: block;
  margin-bottom: 22px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
}

.service-card h3 {
  margin-bottom: 18px;
  font-size: 31px;
}

.service-card-footer {
  padding-top: 22px;
  border-top: 1px solid var(--line-strong);
}

.service-card-footer p {
  font-size: 14px;
}

.text-link,
.back-link {
  display: inline-flex;
  width: fit-content;
  margin-top: 12px;
  color: var(--blue-dark);
  font-weight: 700;
  text-underline-offset: 5px;
}

.cases-section {
  background: #edf3fb;
}

.case-list {
  border-top: 1px solid var(--line-strong);
}

.case-row {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) 170px;
  align-items: center;
  gap: 34px;
  padding: 32px 0;
  border-bottom: 1px solid var(--line-strong);
}

.case-disclosure {
  margin: 0;
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
}

.case-row h3 {
  margin-bottom: 8px;
  font-size: 25px;
}

.case-row p {
  margin-bottom: 0;
}

.evidence-section {
  background: var(--surface);
}

.evidence-layout {
  display: grid;
  grid-template-columns: 0.88fr 1.12fr;
  gap: 64px;
  align-items: stretch;
}

.evidence-facts {
  border-top: 1px solid var(--line);
}

.evidence-facts article {
  display: grid;
  grid-template-columns: 94px minmax(160px, 0.7fr) minmax(0, 1.2fr);
  gap: 18px;
  align-items: baseline;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.evidence-facts strong {
  color: var(--blue);
  font-size: 42px;
  line-height: 1;
}

.evidence-facts h3,
.evidence-facts p {
  margin-bottom: 0;
}

.data-model {
  position: relative;
  min-height: 430px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr auto;
  gap: 18px;
  padding: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--paper);
}

.data-model::before {
  content: "";
  position: absolute;
  inset: 50% 20% auto;
  height: 1px;
  background: var(--blue);
}

.data-model::after {
  content: "";
  position: absolute;
  inset: 20% auto 23% 50%;
  width: 1px;
  background: var(--blue);
}

.model-node {
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
}

.model-node strong {
  margin-bottom: 8px;
  font-size: 20px;
}

.model-node span {
  color: var(--muted);
  font-family: Consolas, monospace;
  font-size: 12px;
}

.data-model > p {
  grid-column: 1 / -1;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.about-band {
  background: var(--signal);
}

.about-band-layout,
.about-origin-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
  gap: 100px;
  align-items: start;
}

.about-band h2,
.about-band p {
  color: var(--ink-strong);
}

.about-band p {
  max-width: 650px;
}

.about-band .secondary-button {
  margin-top: 18px;
  border-color: var(--ink-strong);
  background: transparent;
  color: var(--ink-strong);
}

.about-band .secondary-button:hover {
  background: var(--ink-strong);
  color: #ffffff;
}

.process-section {
  background: var(--paper);
}

.process-visual {
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
}

.process-visual img {
  width: 100%;
  height: auto;
}

.faq-preview-section,
.related-faq-section {
  background: var(--surface);
}

.faq-preview-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.75fr) minmax(0, 1.25fr);
  gap: 84px;
}

.faq-list {
  border-top: 1px solid var(--line);
}

.faq-row {
  border-bottom: 1px solid var(--line);
}

.faq-row summary {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 2px;
  cursor: pointer;
  color: var(--ink-strong);
  font-weight: 700;
}

.faq-row summary::marker {
  color: var(--blue);
}

.faq-row summary small {
  color: var(--muted);
  font-weight: 400;
  text-align: right;
}

.faq-answer {
  max-width: 820px;
  padding: 0 30px 26px;
  color: var(--muted);
}

.faq-answer p:last-child {
  margin-bottom: 0;
}

.answer-boundary {
  color: var(--danger);
  font-size: 13px;
}

.closing-section {
  padding: 86px 0;
  background: var(--blue-soft);
}

.closing-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.75fr) auto;
  align-items: center;
  gap: 34px;
}

.closing-section h2,
.closing-section p {
  margin-bottom: 0;
}

.site-footer {
  padding: 50px 0;
  background: #111827;
  color: #d7deea;
}

.footer-shell {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px 50px;
}

.footer-brand {
  margin-bottom: 8px;
  color: #ffffff;
  font-weight: 800;
}

.footer-links {
  display: flex;
  gap: 6px;
}

.footer-links a,
.footer-links button {
  color: #d7deea;
}

.footer-note {
  grid-column: 1 / -1;
  margin: 0;
  padding-top: 24px;
  border-top: 1px solid rgb(255 255 255 / 16%);
  color: #9ba8bc;
  font-size: 13px;
}

.detail-hero,
.case-hero,
.about-hero,
.page-intro {
  padding: 90px 0 82px;
  border-bottom: 1px solid var(--line);
  background-color: #edf3fb;
}

.detail-hero h1,
.case-hero h1,
.about-hero h1,
.page-intro h1 {
  max-width: 880px;
  margin-bottom: 24px;
  font-size: 58px;
  font-weight: 660;
}

.detail-hero .page-shell > p:last-of-type,
.case-hero .page-shell > p:not(.case-disclosure, .disclosure-note),
.about-hero .page-shell > p:last-child,
.page-intro .page-shell > p {
  max-width: 760px;
  color: var(--muted);
  font-size: 18px;
}

.detail-hero .primary-button {
  margin-top: 16px;
}

.back-link {
  margin: 0 0 50px;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(310px, 0.7fr);
  gap: 80px;
  align-items: start;
}

.detail-main section + section {
  margin-top: 68px;
}

.detail-main h2,
.scope-panel h2,
.case-story h2 {
  margin-bottom: 20px;
  font-size: 28px;
}

.problem-callout,
.disclosure-note {
  margin-top: 24px;
  padding: 20px 22px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--blue-soft);
}

.deliverable-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0;
  list-style: none;
}

.deliverable-list li {
  min-height: 68px;
  display: flex;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.plain-list,
.factor-list,
.step-list {
  padding-left: 22px;
}

.plain-list li,
.factor-list li,
.step-list li {
  margin-bottom: 10px;
}

.scope-panel {
  position: sticky;
  top: 98px;
  padding: 30px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.scope-panel .secondary-button {
  width: 100%;
  margin-top: 18px;
}

.case-hero .case-disclosure {
  margin-bottom: 20px;
}

.case-hero .disclosure-note {
  max-width: 620px;
  background: var(--surface);
  font-size: 14px;
}

.case-story {
  max-width: 920px;
}

.case-story > section {
  padding: 42px 0;
  border-bottom: 1px solid var(--line);
}

.case-story > section:first-child {
  padding-top: 0;
}

.case-story .case-boundary {
  padding: 32px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--blue-soft);
}

.case-story .case-boundary h2:nth-of-type(2) {
  margin-top: 36px;
}

.case-next {
  padding: 56px 0;
  background: var(--signal);
}

.case-next .page-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.case-next p {
  margin: 0;
  color: var(--ink-strong);
  font-size: 22px;
  font-weight: 700;
}

.about-hero {
  min-height: 480px;
  display: flex;
  align-items: center;
}

.about-origin-grid p {
  font-size: 18px;
}

.about-origin .disclosure-note {
  font-size: 14px;
}

.mission-band {
  padding: 86px 0;
  background: var(--blue);
  color: #ffffff;
}

.mission-band p {
  margin-bottom: 18px;
  color: #dfeaff;
  font-weight: 700;
}

.mission-band h2 {
  max-width: 900px;
  margin: 0;
  color: #ffffff;
}

.roles-section {
  background: var(--surface);
}

.role-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
}

.role-grid article {
  min-height: 190px;
  padding: 30px 32px 30px 0;
  border-bottom: 1px solid var(--line);
}

.role-grid article:nth-child(even) {
  padding-left: 32px;
  border-left: 1px solid var(--line);
}

.role-grid h3 {
  margin-bottom: 12px;
  font-size: 23px;
}

.principles-section {
  background: var(--paper);
}

.principles-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.7fr) minmax(0, 1.3fr);
  gap: 80px;
}

.principle-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line-strong);
}

.principle-list li {
  padding: 20px 0;
  border-bottom: 1px solid var(--line-strong);
  color: var(--ink-strong);
  font-size: 20px;
  font-weight: 700;
}

.faq-controls {
  display: grid;
  grid-template-columns: auto minmax(280px, 1fr) auto minmax(220px, 0.45fr);
  gap: 14px;
  align-items: center;
  margin-bottom: 26px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.faq-controls label {
  color: var(--ink-strong);
  font-weight: 700;
}

.faq-controls input,
.faq-controls select {
  min-height: 48px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
}

.result-count {
  color: var(--muted);
}

.no-results {
  padding: 54px 0;
}

.empty-page {
  min-height: 70dvh;
  display: grid;
  place-items: center;
  padding: 80px 24px;
  text-align: center;
}

.empty-page > div {
  max-width: 640px;
}

.empty-page h1 {
  font-size: 48px;
}

.empty-page .primary-button {
  margin-top: 14px;
}

.chat-panel {
  --chat-pop-overshoot: -18px;
  position: fixed;
  z-index: 100;
  top: 86px;
  right: 18px;
  bottom: 18px;
  width: min(420px, calc(100vw - 36px));
  height: auto;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto auto;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(calc(100% + 28px)) scale(0.98);
  transform-origin: right center;
  transition: none;
}

.chat-panel.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0) scale(1);
  transition-delay: 0s;
  animation: chat-panel-pop-in 520ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.chat-panel.is-closing {
  opacity: 0;
  visibility: visible;
  pointer-events: none;
  transform: translateX(calc(100% + 28px)) scale(0.94);
  animation: chat-panel-pop-out 320ms cubic-bezier(0.7, 0, 0.84, 0) both;
}

@keyframes chat-panel-pop-in {
  0% {
    opacity: 0;
    transform: translateX(calc(100% + 28px)) scale(0.92);
  }
  66% {
    opacity: 1;
    transform: translateX(var(--chat-pop-overshoot)) scale(1.008);
  }
  84% {
    opacity: 1;
    transform: translateX(3px) scale(0.997);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes chat-panel-pop-out {
  0% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
  36% {
    opacity: 1;
    transform: translateX(var(--chat-pop-overshoot)) scale(1.004);
  }
  100% {
    opacity: 0;
    transform: translateX(calc(100% + 28px)) scale(0.94);
  }
}

.chat-panel.is-open .chat-header,
.chat-panel.is-open .chat-log,
.chat-panel.is-open .chat-quick-actions,
.chat-panel.is-open .chat-form,
.chat-panel.is-open .chat-disclaimer {
  animation: chat-content-enter 420ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.chat-panel.is-open .chat-header { animation-delay: 70ms; }
.chat-panel.is-open .chat-log { animation-delay: 110ms; }
.chat-panel.is-open .chat-quick-actions { animation-delay: 160ms; }
.chat-panel.is-open .chat-form { animation-delay: 210ms; }
.chat-panel.is-open .chat-disclaimer { animation-delay: 240ms; }

@keyframes chat-content-enter {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.chat-header {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--blue);
  color: #ffffff;
}

.chat-header h2 {
  margin: 2px 0 0;
  color: #ffffff;
  font-size: 18px;
}

.chat-header-copy {
  min-width: 0;
}

.chat-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 10px;
  margin: 0;
  color: #f2f6ff;
  font-size: 11px;
}

.chat-status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chat-dot {
  display: inline-block;
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.chat-dot--online {
  background: #86efac;
  animation: chat-status-pulse 2.4s ease-in-out infinite;
}

.chat-dot--busy {
  background: #fde047;
  animation: chat-status-pulse 3.6s ease-in-out infinite;
}

.chat-dot--crowded {
  background: #ff9b9b;
}

.chat-panel:not(.is-open) .chat-dot {
  animation-play-state: paused;
}

.chat-panel.is-closing .chat-dot {
  animation-play-state: paused;
}

@keyframes chat-status-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(0.88); }
}

.chat-close-button {
  flex-shrink: 0;
  min-width: 60px;
  min-height: 44px;
  border: 1px solid rgb(255 255 255 / 45%);
  background: transparent;
  color: #ffffff;
}

.chat-close-button:hover {
  background: rgb(255 255 255 / 14%);
}

.chat-panel button {
  transition:
    transform 160ms cubic-bezier(0.16, 1, 0.3, 1),
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    filter 180ms ease;
}

.chat-panel button:active:not(:disabled) {
  transform: translateY(1px) scale(0.97);
}

@media (hover: hover) {
  .chat-panel button:hover:not(:disabled) {
    transform: translateY(-2px);
    filter: brightness(1.18);
    box-shadow: 0 8px 20px rgb(9 4 18 / 24%);
  }
}

.chat-log {
  min-height: 0;
  overflow-y: auto;
  padding: 18px;
  background: var(--paper);
}

.chat-message {
  width: fit-content;
  max-width: 88%;
  margin-bottom: 12px;
  padding: 11px 13px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.55;
}

.chat-message-assistant {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

.chat-message-user {
  margin-left: auto;
  background: var(--blue);
  color: #ffffff;
}

.chat-typing {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
  margin-bottom: 12px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.chat-typing span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--blue);
  animation: chat-typing-bounce 900ms ease-in-out infinite;
}

.chat-typing span:nth-child(2) { animation-delay: 120ms; }
.chat-typing span:nth-child(3) { animation-delay: 240ms; }

@keyframes chat-typing-bounce {
  0%, 60%, 100% { opacity: 0.35; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

.chat-quick-actions {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.chat-quick-actions button {
  min-height: 44px;
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--blue-dark);
  font-size: 12px;
}

.chat-quick-actions button:hover {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.handoff-area {
  max-height: 310px;
  overflow-y: auto;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  background: #f8fafc;
}

.handoff-area.is-closing {
  overflow: hidden;
  pointer-events: none;
  animation: chat-handoff-exit 280ms ease-in both;
}

@keyframes chat-handoff-exit {
  from {
    height: var(--handoff-height);
    opacity: 1;
    transform: translateY(0);
  }
  to {
    height: 0;
    padding-block: 0;
    border-top-width: 0;
    opacity: 0;
    transform: translateY(12px);
  }
}

.consent-prompt {
  padding: 14px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  animation: chat-handoff-enter 300ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.consent-prompt h3 {
  margin-bottom: 8px;
  font-size: 16px;
}

.consent-prompt p {
  color: var(--muted);
  font-size: 12px;
}

.primary-small-button,
.quiet-button {
  min-height: 44px;
  padding: 8px 12px;
  font-size: 12px;
}

.followup-form,
.followup-notice {
  display: grid;
  gap: 8px;
  background: inherit;
  animation: chat-handoff-enter 300ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.followup-notice p {
  margin: 4px 0 2px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

@keyframes chat-handoff-enter {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.followup-form > * {
  animation: chat-field-enter 260ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.followup-form > *:nth-child(1) { animation-delay: 40ms; }
.followup-form > *:nth-child(2),
.followup-form > *:nth-child(3) { animation-delay: 80ms; }
.followup-form > *:nth-child(4),
.followup-form > *:nth-child(5) { animation-delay: 120ms; }
.followup-form > *:nth-child(6),
.followup-form > *:nth-child(7) { animation-delay: 160ms; }
.followup-form > *:nth-child(8) { animation-delay: 200ms; }

@keyframes chat-field-enter {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.followup-heading {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  background: inherit;
}

.followup-heading h3 {
  min-width: 0;
  margin: 0;
  font-size: 15px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.handoff-close-button {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  min-width: 48px;
  width: 48px;
  min-height: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: transparent;
  color: var(--ink-strong);
}

.handoff-close-button:hover,
.handoff-close-button:focus-visible {
  background: var(--blue-soft);
}

.handoff-close-button:active {
  background: var(--soft);
}

.followup-form label {
  color: var(--ink-strong);
  font-size: 12px;
  font-weight: 700;
}

.followup-form input,
.followup-form textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
}

.followup-form > button[type="submit"] {
  margin-top: 4px;
}

.chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 70px;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.chat-form textarea {
  min-height: 52px;
  max-height: 106px;
  resize: vertical;
  padding: 9px 10px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  font-size: 13px;
}

.chat-form button {
  border: 0;
  background: var(--blue);
  color: #ffffff;
  font-weight: 800;
}

.chat-form button:hover {
  background: var(--blue-dark);
}

.chat-disclaimer {
  margin: 0;
  padding: 0 14px 12px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

@media (max-width: 1040px) {
  .primary-nav > a,
  .primary-nav > button {
    padding-inline: 7px;
    font-size: 13px;
  }

  .wordmark {
    min-width: 170px;
  }

  .primary-nav .nav-consult-button {
    min-width: 118px;
    padding-inline: 12px;
  }
}

@media (max-width: 900px) {
  .nav-shell,
  .section-inner,
  .page-shell,
  .footer-shell,
  .closing-inner,
  .hero-inner,
  .hero-question-band {
    width: min(100% - 32px, 760px);
  }

  .mobile-menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .primary-nav {
    position: absolute;
    top: 64px;
    left: 16px;
    right: 16px;
    display: none;
    align-items: stretch;
    padding: 12px;
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    background: var(--surface);
    box-shadow: var(--shadow);
  }

  .primary-nav.is-open {
    display: grid;
  }

  .primary-nav > a,
  .primary-nav > button {
    width: 100%;
    text-align: left;
  }

  .primary-nav .nav-consult-button {
    margin: 8px 0 0;
    text-align: center;
  }

  .language-switch {
    width: 112px;
    margin: 8px 0;
  }

  .hero-section {
    min-height: 760px;
  }

  .hero-backdrop {
    right: -18%;
    width: 90vw;
    opacity: 0.5;
  }

  .hero-inner h1 {
    font-size: 60px;
  }

  .method-layout,
  .evidence-layout,
  .faq-preview-layout,
  .detail-grid,
  .closing-inner,
  .about-band-layout,
  .about-origin-grid,
  .principles-layout {
    grid-template-columns: 1fr;
  }

  .method-layout,
  .evidence-layout,
  .faq-preview-layout,
  .detail-grid,
  .about-band-layout,
  .about-origin-grid,
  .principles-layout {
    gap: 38px;
  }

  .services-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .service-card-featured {
    grid-row: auto;
    min-height: 360px;
  }

  .scope-panel {
    position: static;
  }

  .case-row {
    grid-template-columns: 130px minmax(0, 1fr);
  }

  .case-row .secondary-button {
    grid-column: 2;
    width: fit-content;
  }

  .closing-inner {
    align-items: start;
  }

  .faq-controls {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .section {
    padding: 76px 0;
  }

  .site-header,
  .nav-shell {
    min-height: 64px;
  }

  .wordmark {
    min-width: 0;
  }

  .wordmark-copy small {
    display: none;
  }

  .hero-section {
    min-height: 760px;
  }

  .hero-inner {
    padding-top: 68px;
    padding-bottom: 40px;
  }

  .hero-inner h1 {
    font-size: 46px;
  }

  .hero-description {
    font-size: 17px;
  }

  .hero-actions > *,
  .closing-inner .primary-button {
    width: 100%;
  }

  .hero-question-band {
    grid-template-columns: 1fr;
    padding-bottom: 32px;
  }

  .hero-question-band button,
  .hero-question-band button:first-child,
  .hero-question-band button:last-child {
    min-height: 56px;
    border: 1px solid var(--line-strong);
    border-bottom: 0;
    border-radius: 0;
  }

  .hero-question-band button:first-child {
    border-radius: 6px 6px 0 0;
  }

  .hero-question-band button:last-child {
    border-bottom: 1px solid var(--line-strong);
    border-radius: 0 0 6px 6px;
  }

  .section-heading h2,
  .narrow-heading h2,
  .closing-section h2,
  .about-band h2,
  .mission-band h2,
  .about-origin h2,
  .principles-section h2 {
    font-size: 34px;
  }

  .problem-list,
  .role-grid {
    grid-template-columns: 1fr;
  }

  .problem-list article,
  .problem-list article + article,
  .role-grid article,
  .role-grid article:nth-child(even) {
    min-height: 0;
    padding: 26px 0;
    border-left: 0;
    border-bottom: 1px solid var(--line);
  }

  .service-card {
    min-height: 0;
    padding: 26px 22px;
  }

  .service-card-featured {
    min-height: 390px;
  }

  .case-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .case-row .secondary-button {
    grid-column: auto;
    margin-top: 8px;
  }

  .evidence-facts article {
    grid-template-columns: 76px 1fr;
  }

  .evidence-facts article p {
    grid-column: 2;
  }

  .data-model {
    min-height: 560px;
    grid-template-columns: 1fr;
    grid-template-rows: repeat(4, 1fr) auto;
    padding: 22px;
  }

  .data-model::before,
  .data-model::after {
    display: none;
  }

  .deliverable-list {
    grid-template-columns: 1fr;
  }

  .detail-hero h1,
  .case-hero h1,
  .about-hero h1,
  .page-intro h1 {
    font-size: 42px;
    overflow-wrap: anywhere;
  }

  .case-next .page-shell {
    align-items: stretch;
    flex-direction: column;
  }

  .case-next .primary-button {
    width: 100%;
  }

  .faq-row summary {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .faq-row summary small {
    text-align: left;
  }

  .faq-answer {
    padding-inline: 2px;
  }

  .footer-shell {
    grid-template-columns: 1fr;
  }

  .footer-links {
    flex-wrap: wrap;
  }

  .chat-panel {
    --chat-pop-overshoot: -10px;
    inset: 70px 8px 8px;
    width: auto;
    height: auto;
    max-height: calc(100dvh - 78px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .chat-dot {
    animation: none;
  }

  .chat-panel.is-open .chat-header,
  .chat-panel.is-open .chat-log,
  .chat-panel.is-open .chat-quick-actions,
  .chat-panel.is-open .chat-form,
  .chat-panel.is-open .chat-disclaimer,
  .consent-prompt,
  .followup-form,
  .followup-form > *,
  .followup-notice {
    animation: none;
  }

  .chat-panel.is-open,
  .chat-panel.is-closing,
  .handoff-area.is-closing {
    animation: none;
  }

  .chat-panel button {
    transition: none;
  }

  .chat-panel button:active:not(:disabled) {
    transform: none;
  }

  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
