:root {
  --bg: #f6f8fb;
  --text: #10141d;
  --muted: #626b78;
  --faint: #edf2f7;
  --line: #d7dee8;
  --accent: #0b2d5c;
  --accent-strong: #061933;
  --accent-ink: #123d76;
  --accent-soft: #e8eef7;
  --accent-mist: #f1f5fb;
  --surface: #ffffff;
  --surface-soft: #fbfcff;
  --surface-tint: #f7faff;
  --ring: rgba(11, 45, 92, 0.18);
  --shadow-soft: 0 18px 44px rgba(16, 30, 54, 0.08);
  --shadow-card: 0 22px 60px rgba(12, 35, 68, 0.1);
  --shadow-lift: 0 16px 34px rgba(12, 35, 68, 0.12);
  --shadow-hairline: 0 1px 0 rgba(11, 45, 92, 0.06);
  --font-sans: "Inter", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;

  /* ── Typography Font-Size Tokens ── */
  /*
    Hierarchy: Page Title > Section Title > H2 > H3 > Subtitle >
               Modal Title > Card Title > Body LG > Body > Button >
               Secondary > Label
    Minimum: 13px (no 12px anywhere in the system)
  */
  --fs-page-title: clamp(42px, 5.6vw, 74px);       /* Hero h1 */
  --fs-section-title: clamp(34px, 5vw, 68px);       /* Section heading h2 */
  --fs-h2: 24px;                                     /* Module / panel heading */
  --fs-h3: clamp(24px, 3vw, 36px);                  /* Timeline content h3 */
  --fs-subtitle: 23px;                              /* Section subtitle */
  --fs-modal-title: 22px;                            /* Modal dialog heading */
  --fs-card-title: 20px;                            /* Card / item title */
  --fs-body-lg: 18px;                               /* Larger body (mobile) */
  --fs-body: 16px;                                   /* Default body text */
  --fs-button: 15px;                                 /* Button / input text */
  --fs-secondary: 14px;                              /* Secondary / nav text */
  --fs-label: 13px;                                  /* Labels, tags, captions */
  --fs-kpi-lg: 34px;                                /* Hero KPI numbers */
  --fs-kpi: clamp(24px, 3vw, 34px);                 /* Impact metric numbers */

  /* ── Typography Line-Height Tokens ── */
  --lh-tight: 1.04;          /* Page title — display */
  --lh-heading: 1.2;         /* H2 / H3 headings */
  --lh-heading-sm: 1.25;     /* Modal / card headings */
  --lh-body: 1.65;           /* Default body text */
  --lh-relaxed: 1.7;         /* Relaxed body text */
  --lh-loose: 1.8;           /* Loose body text */
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  letter-spacing: 0;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 3px;
}

button,
input {
  font: inherit;
}

.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;
}

.container {
  width: calc(100% - 40px);
  max-width: 1200px;
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 253, 255, 0.92);
  border-bottom: 1px solid rgba(215, 222, 232, 0.82);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-hairline);
}

.header-inner {
  width: calc(100% - 40px);
  max-width: 1200px;
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.brand {
  font-weight: 800;
  font-size: var(--fs-card-title);
  color: var(--accent);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 34px;
}

.site-nav a {
  color: #2f3742;
  font-size: var(--fs-secondary);
  font-weight: 600;
  transition:
    color 180ms ease,
    transform 180ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--accent-ink);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  box-shadow: var(--shadow-hairline);
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 5px auto;
  background: currentColor;
  transition:
    transform 180ms ease,
    opacity 180ms ease;
}

body.nav-open .menu-toggle span:first-child {
  transform: translateY(3.5px) rotate(45deg);
}

body.nav-open .menu-toggle span:last-child {
  transform: translateY(-3.5px) rotate(-45deg);
}

.section {
  padding: 112px 0;
  scroll-margin-top: 92px;
}

.hero {
  min-height: calc(100vh - 72px);
  display: flex;
  align-items: center;
  padding-top: 80px;
  background: var(--bg);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  align-items: center;
  gap: 72px;
}

.eyebrow,
.panel-label,
.project-index,
.info-label {
  margin: 0;
  color: var(--accent);
  font-size: var(--fs-label);
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.info-label {
  font-size: var(--fs-card-title);
  line-height: 1.35;
  align-self: start;
}

.hero h1 {
  margin: 24px 0 28px;
  max-width: 760px;
  font-size: var(--fs-page-title);
  line-height: var(--lh-tight);
  letter-spacing: 0;
  overflow-wrap: anywhere;
  color: var(--text);
}

.hero h1 span {
  display: block;
}

.hero h1 span + span {
  margin-top: 18px;
  color: var(--accent-strong);
}

.hero-summary {
  max-width: 640px;
  margin: 0;
  color: #35404c;
  font-size: var(--fs-card-title);
  line-height: var(--lh-loose);
  overflow-wrap: anywhere;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  max-width: 660px;
  margin-top: 52px;
  padding-top: 28px;
  border-top: 1px solid rgba(11, 45, 92, 0.16);
}

.hero-metrics div {
  min-width: 0;
}

.hero-metrics strong {
  display: block;
  color: var(--accent-ink);
  font-size: var(--fs-kpi-lg);
  font-weight: 800;
  line-height: 1;
}

.hero-metrics span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: var(--fs-secondary);
}

.agent-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  height: 560px;
  max-height: calc(100vh - 80px);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.agent-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--accent);
}

.agent-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 28px;
  border-bottom: 1px solid var(--faint);
  background: var(--surface-tint);
}

.agent-head h2 {
  margin: 8px 0 0;
  font-size: var(--fs-h2);
  line-height: var(--lh-heading);
  letter-spacing: 0;
}

.agent-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-size: var(--fs-secondary);
  font-weight: 700;
  white-space: nowrap;
}

.agent-status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #16a36a;
  box-shadow: var(--shadow-hairline);
}

.chat-log {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px 28px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.message {
  width: fit-content;
  max-width: 90%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  animation: messageIn 220ms ease both;
  box-shadow: var(--shadow-hairline);
}

.message p {
  margin: 0;
  color: #27313d;
  font-size: var(--fs-body);
  line-height: var(--lh-relaxed);
  white-space: pre-wrap;
}

.message-ai strong {
  color: var(--accent);
  font-weight: 800;
}

.message-ai .reply-heading {
  display: block;
  margin: 0.1rem 0 0.16rem;
  color: var(--text);
  font-size: 1.05em;
  font-weight: 800;
  line-height: var(--lh-heading-sm);
}

.message-ai .reply-bullet {
  display: block;
  padding-left: 1.1em;
  text-indent: -1.1em;
}

.message-ai .reply-bullet-marker {
  color: var(--accent);
  font-weight: 900;
}

/* ── Chat Markdown Rendering ── */
.message-ai h1,
.message-ai h2,
.message-ai h3,
.message-ai h4 {
  margin: 0.6em 0 0.3em;
  color: var(--text);
  font-weight: 800;
  line-height: var(--lh-heading);
}

.message-ai h1 {
  font-size: 1.3em;
}

.message-ai h2 {
  font-size: 1.15em;
}

.message-ai h3 {
  font-size: 1.05em;
}

.message-ai h4 {
  font-size: 1em;
}

.message-ai ul,
.message-ai ol {
  margin: 0.4em 0;
  padding-left: 1.4em;
}

.message-ai li {
  margin: 0.2em 0;
  line-height: var(--lh-relaxed);
}

.message-ai blockquote {
  margin: 0.5em 0;
  padding: 0.3em 0.8em;
  border-left: 3px solid var(--accent-soft);
  color: var(--muted);
  font-style: italic;
  font-size: var(--fs-secondary);
}

.message-ai code {
  padding: 0.15em 0.35em;
  border-radius: 4px;
  background: var(--faint);
  font-family: "SF Mono", "Fira Code", "Consolas", monospace;
  font-size: 0.88em;
}

.message-ai pre {
  margin: 0.5em 0;
  padding: 0.8em;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--faint);
  overflow-x: auto;
}

.message-ai pre code {
  padding: 0;
  border: 0;
  background: none;
  font-size: 0.88em;
}

.message-ai p + p {
  margin-top: 0.5em;
}

.message-ai a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.message-user {
  align-self: flex-end;
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: var(--shadow-lift);
}

.message-user p {
  color: #fff;
}

.message-ai {
  align-self: flex-start;
  background: var(--surface-soft);
}

.chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 18px;
  border-top: 1px solid var(--faint);
  background: var(--surface);
}

.chat-form input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 14px;
  color: var(--text);
  background: var(--surface-soft);
  font-size: var(--fs-body);
  outline: none;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.chat-form input:focus {
  border-color: var(--accent);
  background: #fff;
  box-shadow: var(--shadow-hairline);
}

.chat-form button {
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  padding: 0 18px;
  font-size: var(--fs-button);
  font-weight: 700;
  cursor: pointer;
  transition:
    background 180ms ease,
    color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.chat-form button:hover,
.chat-form button:focus-visible {
  background: var(--accent-strong);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-lift);
}

.section-heading {
  margin-bottom: 54px;
}

.section-heading h2 {
  margin: 12px 0 0;
  font-size: var(--fs-section-title);
  line-height: 1;
  letter-spacing: 0;
  color: var(--text);
}

.section-heading-wide {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 0.85fr);
  align-items: end;
  gap: 56px;
}

.section-subtitle {
  margin: 0;
  color: #35404c;
  font-size: var(--fs-subtitle);
  line-height: var(--lh-body);
}

.section-subtitle strong {
  color: var(--accent);
}

.profile-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 56px;
  align-items: start;
}

.profile-photo {
  width: 100%;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.profile-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center top;
}

.info-list {
  border-top: 1px solid rgba(11, 45, 92, 0.42);
}

.info-row {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 40px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
  transition:
    background 180ms ease,
    border-color 180ms ease;
}

.info-row:hover {
  background: rgba(255, 255, 255, 0.62);
  border-color: rgba(11, 45, 92, 0.22);
}

.info-row p {
  margin: 0;
  color: #18202b;
  font-size: var(--fs-card-title);
}

.info-stack {
  display: grid;
  gap: 12px;
}

.competition-list {
  display: grid;
  gap: 0;
}

.competition-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 156px;
  gap: 18px;
  align-items: start;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.competition-item:first-child {
  padding-top: 0;
  border-top: 0;
}

.competition-item:last-child {
  padding-bottom: 0;
}

.competition-copy {
  min-width: 0;
}

.competition-copy span {
  display: block;
  margin-bottom: 7px;
  color: var(--accent);
  font-size: var(--fs-label);
  font-weight: 800;
}

.competition-copy h3 {
  margin: 0;
  color: #18202b;
  font-size: var(--fs-card-title);
  line-height: var(--lh-heading-sm);
}

.competition-copy p {
  margin-top: 8px;
  color: #35404c;
  font-size: var(--fs-body);
  line-height: var(--lh-relaxed);
}

.competition-visual {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-hairline);
  transition:
    border-color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.competition-visual:hover,
.competition-visual:focus-visible {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

.competition-visual img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
}

.timeline {
  position: relative;
  display: grid;
  gap: 0;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 16px;
  bottom: 16px;
  left: calc(180px + 16px);
  width: 1px;
  background: rgba(11, 45, 92, 0.18);
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 180px 33px minmax(0, 1fr);
  gap: 28px;
  padding: 38px 0;
  border-top: 1px solid rgba(215, 222, 232, 0.78);
  transition:
    background 180ms ease,
    border-color 180ms ease;
}

.timeline-item:hover {
  background: rgba(255, 255, 255, 0.52);
  border-color: rgba(11, 45, 92, 0.18);
}

.timeline-item:last-child {
  border-bottom: 1px solid var(--faint);
}

.timeline-item-20,
.timeline-item-15 {
  padding: 30px 0;
}

.timeline-item-20 .timeline-content h3,
.timeline-item-15 .timeline-content h3 {
  font-size: clamp(22px, 2.4vw, 30px);
}

.timeline-item-20 .case-section,
.timeline-item-15 .case-section {
  gap: 12px;
  padding-top: 18px;
  margin-top: 18px;
}

.timeline-item-15 .case-section {
  padding-top: 16px;
  margin-top: 16px;
}

.timeline-item-20 .case-section p,
.timeline-item-15 .case-section p {
  font-size: var(--fs-body);
  line-height: var(--lh-relaxed);
}

.timeline-item time {
  color: var(--muted);
  font-size: var(--fs-secondary);
  font-weight: 700;
}

.timeline-node {
  position: relative;
  z-index: 2;
  width: 33px;
  height: 33px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--shadow-hairline);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.timeline-node::after {
  content: "";
  position: absolute;
  inset: 11px;
  border-radius: 50%;
  background: var(--accent);
}

.timeline-item:hover .timeline-node,
.timeline-node:hover {
  transform: scale(1.08);
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: var(--shadow-soft);
}

.timeline-content h3 {
  margin: -4px 0 20px;
  font-size: var(--fs-h3);
  line-height: var(--lh-heading);
  letter-spacing: 0;
  color: var(--text);
}

.timeline-content dl,
.project-copy dl {
  display: grid;
  gap: 12px;
  margin: 0;
}

.timeline-content dl div,
.project-copy dl div {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 20px;
}

.timeline-content dt,
.project-copy dt {
  color: var(--accent);
  font-size: var(--fs-secondary);
  font-weight: 800;
}

.timeline-content dd,
.project-copy dd {
  margin: 0;
  color: #35404c;
}

.project-copy dd p {
  margin: 0;
}

.project-copy dd p + p,
.project-status-note {
  margin-top: 10px;
}

.project-status-note {
  width: fit-content;
  max-width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(15, 60, 115, 0.18);
  border-radius: 8px;
  background: #f5f8fc;
  color: var(--accent-ink);
  font-weight: 750;
  box-shadow: var(--shadow-hairline);
}

.case-company {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: -2px 0 12px;
  color: var(--accent);
  font-size: var(--fs-secondary);
  font-weight: 800;
}

.company-logo {
  display: block;
  width: 104px;
  height: 38px;
  padding: 4px 8px;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow-hairline);
}

.company-logo-meituan {
  width: 136px;
  height: 48px;
  padding: 0;
  object-fit: cover;
  object-position: center;
}

.company-logo-greentown {
  background: #0b2d5c;
}

.company-logo-zhongan {
  width: 136px;
  height: 46px;
  padding: 7px 10px;
  object-fit: contain;
  object-position: center;
  background: #fff;
}

.case-section {
  display: grid;
  gap: 14px;
  padding-top: 22px;
  margin-top: 22px;
  border-top: 1px solid var(--faint);
}

.case-section h4 {
  margin: 0;
  color: var(--accent);
  font-size: var(--fs-label);
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.case-section p {
  margin: 0;
  color: #35404c;
  font-size: var(--fs-body);
  line-height: var(--lh-loose);
}

.context-link {
  color: var(--accent);
  font-weight: 800;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition:
    color 180ms ease,
    text-decoration-thickness 180ms ease;
}

.context-link:hover,
.context-link:focus-visible {
  color: var(--accent-strong);
  text-decoration-thickness: 2px;
}

.agent-preview-trigger {
  position: relative;
  display: inline-block;
}

.agent-preview-link {
  white-space: nowrap;
}

.agent-preview-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 12px);
  z-index: 45;
  width: min(760px, 78vw);
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-card);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.agent-preview-trigger:hover .agent-preview-panel,
.agent-preview-trigger:focus-within .agent-preview-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.agent-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.agent-preview-shot {
  display: block;
  min-width: 0;
}

.agent-preview-shot img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  object-position: top;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
  box-shadow: var(--shadow-hairline);
}

.agent-preview-caption {
  display: block;
  margin-top: 6px;
  color: var(--accent);
  font-size: var(--fs-label);
  font-weight: 800;
  line-height: var(--lh-heading-sm);
}

.rag-flow-trigger {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.rag-flow-highlight {
  color: var(--accent);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: text-decoration-thickness 180ms ease;
}

.rag-flow-trigger:hover .rag-flow-highlight,
.rag-flow-trigger:focus-visible .rag-flow-highlight {
  text-decoration-thickness: 2px;
}

.prompt-flow-trigger {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.prompt-flow-highlight {
  color: var(--accent);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: text-decoration-thickness 180ms ease;
}

.prompt-flow-trigger:hover .prompt-flow-highlight,
.prompt-flow-trigger:focus-visible .prompt-flow-highlight {
  text-decoration-thickness: 2px;
}

body.preview-modal-open {
  overflow: hidden;
}

.agent-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 36px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.agent-preview-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.agent-preview-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(6, 15, 28, 0.66);
  cursor: zoom-out;
}

.agent-preview-dialog {
  position: relative;
  z-index: 1;
  width: min(1320px, 94vw);
  max-height: 90vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-card);
}

.agent-preview-modal-head,
.agent-preview-modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--faint);
  background: var(--surface);
}

.agent-preview-modal-head p,
.agent-preview-modal-foot p {
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-label);
  font-weight: 700;
}

.agent-preview-modal-head h2 {
  margin: 3px 0 0;
  color: var(--accent);
  font-size: var(--fs-modal-title);
  line-height: var(--lh-heading-sm);
}

.agent-preview-close,
.agent-preview-nav {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--accent);
  cursor: pointer;
  box-shadow: var(--shadow-hairline);
  transition:
    border-color 180ms ease,
    background 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.agent-preview-close {
  width: 42px;
  height: 42px;
  font-size: 28px;
  line-height: 1;
}

.agent-preview-close:hover,
.agent-preview-close:focus-visible,
.agent-preview-nav:hover,
.agent-preview-nav:focus-visible {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: var(--shadow-soft);
}

.agent-preview-stage {
  position: relative;
  min-height: 0;
  display: grid;
  place-items: start center;
  padding: 28px 96px 36px;
  background: var(--surface-tint);
  overflow-x: hidden;
  overflow-y: auto;
}

.agent-preview-stage img {
  display: block;
  width: min(860px, 100%);
  max-width: none;
  max-height: none;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.agent-preview-nav {
  position: absolute;
  top: 50%;
  width: 44px;
  height: 60px;
  font-size: 42px;
  line-height: 1;
  transform: translateY(-50%);
}

.agent-preview-nav:hover,
.agent-preview-nav:focus-visible {
  transform: translateY(-50%) scale(1.04);
}

.agent-preview-prev {
  left: 18px;
}

.agent-preview-next {
  right: 18px;
}

.agent-preview-modal-foot {
  border-top: 1px solid var(--faint);
  border-bottom: 0;
}

.agent-preview-modal-foot span {
  color: var(--accent);
  font-size: var(--fs-secondary);
  font-weight: 800;
}

.project-image-modal {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: grid;
  place-items: center;
  padding: 36px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.project-image-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.project-image-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(6, 15, 28, 0.66);
  cursor: zoom-out;
}

.project-image-dialog {
  position: relative;
  z-index: 1;
  width: min(1320px, 94vw);
  max-height: 90vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-card);
}

.project-image-head,
.project-image-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--faint);
  background: var(--surface);
}

.project-image-head p,
.project-image-foot p {
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-label);
  font-weight: 700;
}

.project-image-head h2 {
  margin: 3px 0 0;
  color: var(--accent);
  font-size: var(--fs-modal-title);
  line-height: var(--lh-heading-sm);
}

.project-image-close {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--accent);
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.project-image-close:hover,
.project-image-close:focus-visible {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: var(--shadow-soft);
}

.project-image-stage {
  min-height: 0;
  display: grid;
  place-items: start center;
  padding: 28px 96px 36px;
  background: var(--surface-tint);
  overflow-x: hidden;
  overflow-y: auto;
}

.project-image-stage img {
  display: block;
  width: min(1100px, 100%);
  max-height: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.project-image-foot {
  justify-content: flex-end;
  border-top: 1px solid var(--faint);
  border-bottom: 0;
}

.case-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.case-action-grid-compact,
.case-action-grid-brief {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.painpoint-grid {
  grid-template-columns: 1fr;
  gap: 14px;
}

.case-action {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-hairline);
  transition:
    border-color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.case-action:hover {
  border-color: rgba(11, 45, 92, 0.3);
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

.case-action span {
  display: block;
  margin-bottom: 9px;
  color: var(--accent);
  font-size: var(--fs-label);
  font-weight: 800;
}

.case-action p {
  font-size: var(--fs-body);
  line-height: var(--lh-relaxed);
}

.painpoint-card span {
  font-size: var(--fs-label);
}

.painpoint-card p {
  font-size: var(--fs-body);
  line-height: var(--lh-relaxed);
}

.timeline-item-15 .case-action {
  padding: 14px;
}

.timeline-item-15 .case-action p {
  font-size: var(--fs-body);
  line-height: var(--lh-relaxed);
}

.impact-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.impact-metrics-brief {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
}

.impact-metrics div {
  min-width: 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--line);
}

.impact-metrics strong {
  display: block;
  color: #16191d;
  font-size: var(--fs-label);
  font-weight: 800;
}

.impact-metrics span {
  display: block;
  margin-top: 7px;
  color: var(--accent);
  font-size: var(--fs-kpi);
  font-weight: 800;
  line-height: 1;
}

.impact-metrics small {
  display: block;
  margin-top: 9px;
  color: var(--muted);
  font-size: var(--fs-label);
  line-height: 1.5;
}

.timeline-item-15 .impact-metrics span {
  font-size: clamp(22px, 2.4vw, 30px);
}

.case-tags-section {
  padding-top: 18px;
}

.case-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.case-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #2f3740;
  background: var(--surface);
  font-size: var(--fs-label);
  font-weight: 700;
  box-shadow: var(--shadow-hairline);
}

.project-list {
  border-top: 1px solid rgba(11, 45, 92, 0.42);
}

.project-item {
  display: grid;
  grid-template-columns: minmax(340px, 0.48fr) minmax(0, 1fr);
  gap: 56px;
  padding: 52px 0;
  border-bottom: 1px solid var(--line);
  transition:
    background 180ms ease,
    border-color 180ms ease;
}

.project-item:hover {
  background: rgba(255, 255, 255, 0.52);
  border-color: rgba(11, 45, 92, 0.2);
}

.project-gallery {
  align-self: center;
  position: sticky;
  top: 96px;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px;
  display: grid;
  grid-template-rows: auto auto auto;
  align-content: start;
  gap: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.project-gallery-frame {
  position: relative;
  min-height: 0;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
  overflow: hidden;
}

.project-gallery-slide {
  position: absolute;
  inset: 0;
  margin: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.project-gallery-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.project-gallery-slide img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
  object-position: center;
  background: #fff;
}

.project-gallery-zoom {
  display: block;
  width: 100%;
  min-height: 0;
  height: 100%;
  padding: 0;
  border: 0;
  background: #fff;
  cursor: zoom-in;
  overflow: hidden;
}

.project-gallery-zoom:hover img,
.project-gallery-zoom:focus-visible img {
  transform: scale(1.02);
}

.project-gallery-zoom img {
  transition: transform 180ms ease;
}

.project-gallery-slide figcaption {
  min-height: 38px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  background: rgba(251, 253, 255, 0.96);
  color: var(--accent);
  font-size: var(--fs-secondary);
  font-weight: 800;
  line-height: var(--lh-heading-sm);
}

.project-gallery-zoom[data-project-download] {
  cursor: pointer;
}

.project-gallery-slide figcaption em {
  font-style: normal;
  font-weight: 500;
  color: var(--text-tertiary, #8a8f98);
  font-size: 12px;
}

.project-gallery-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.gallery-control {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--accent);
  cursor: pointer;
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
  box-shadow: var(--shadow-hairline);
  transition:
    border-color 180ms ease,
    color 180ms ease,
    transform 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.gallery-control:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

.project-gallery-count {
  color: var(--muted);
  font-size: var(--fs-label);
  font-weight: 800;
  letter-spacing: 0.04em;
}

.gallery-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.gallery-dots button {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #c7d2df;
  cursor: pointer;
  transition:
    background 180ms ease,
    width 180ms ease;
}

.gallery-dots button[aria-current="true"] {
  width: 22px;
  background: var(--accent);
}

.project-copy {
  display: grid;
  gap: 20px;
}

.project-copy h3 {
  margin: 0;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: 0;
  color: var(--text);
}

.project-copy a {
  width: fit-content;
  color: var(--accent);
  font-weight: 800;
  border-bottom: 1px solid currentColor;
  transition:
    color 180ms ease,
    transform 180ms ease;
}

.project-copy a:hover,
.project-copy a:focus-visible {
  color: var(--accent-strong);
  transform: translateY(-1px);
}

.site-footer {
  padding: 42px 0;
  background: #06111f;
  color: #ffffff;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.footer-copy {
  display: grid;
  gap: 4px;
}

.footer-copy p,
.footer-copy span,
.footer-links a {
  margin: 0;
}

.footer-copy p {
  color: #ffffff;
  font-weight: 800;
}

.footer-copy span {
  color: rgba(255, 255, 255, 0.64);
  font-size: var(--fs-secondary);
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px 18px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.78);
  font-size: var(--fs-secondary);
  transition:
    color 180ms ease,
    transform 180ms ease;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: #ffffff;
  transform: translateY(-1px);
}

body.reveal-ready .reveal {
  opacity: 0;
  transform: translateY(22px);
}

.reveal.is-visible {
  animation: fadeUp 700ms ease forwards;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(22px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes messageIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 960px) {
  .hero-grid,
  .section-heading-wide,
  .project-item {
    grid-template-columns: 1fr;
  }

  .project-gallery {
    position: static;
    top: auto;
  }

  .hero-grid {
    justify-items: start;
    gap: 44px;
  }

  .agent-panel {
    height: 520px;
    max-height: calc(100vh - 64px);
  }

  .profile-overview {
    grid-template-columns: minmax(0, 1fr) 210px;
    gap: 36px;
  }

  .timeline::before {
    left: 16px;
  }

  .timeline-item {
    grid-template-columns: 33px minmax(0, 1fr);
    gap: 22px;
  }

  .timeline-item time {
    grid-column: 2;
    grid-row: 1;
  }

  .timeline-node {
    grid-column: 1;
    grid-row: 1 / span 2;
  }

  .timeline-content {
    grid-column: 2;
  }

  .impact-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

@media (max-width: 760px) {
  .container,
  .header-inner {
    width: calc(100% - 28px);
    max-width: 360px;
    margin-left: 14px;
    margin-right: auto;
  }

  .header-inner {
    height: 64px;
  }

  .menu-toggle {
    display: inline-block;
  }

  .site-nav {
    position: fixed;
    top: 64px;
    left: 14px;
    right: 14px;
    display: grid;
    gap: 0;
    padding: 8px 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition:
      opacity 180ms ease,
      transform 180ms ease;
  }

  body.nav-open .site-nav {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .site-nav a {
    padding: 12px 16px;
  }

  .section {
    padding: 76px 0;
  }

  .hero {
    min-height: auto;
    padding-top: 64px;
  }

  .hero h1 {
    font-size: clamp(32px, 8.4vw, 38px);
    line-height: 1.08;
    word-break: break-all;
  }

  .hero-summary {
    font-size: var(--fs-body);
    line-height: var(--lh-loose);
    word-break: break-all;
  }

  .hero-metrics {
    grid-template-columns: 1fr;
    gap: 18px;
    margin-top: 38px;
  }

  .agent-panel {
    height: 480px;
    max-height: calc(100vh - 80px);
  }

  .agent-head,
  .chat-log {
    padding: 22px;
  }

  .chat-form {
    grid-template-columns: 1fr;
  }

  .chat-form button {
    min-height: 46px;
  }

  .profile-overview {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .profile-photo {
    order: -1;
    max-width: 178px;
  }

  .info-row {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 24px 0;
  }

  .info-row p {
    font-size: var(--fs-body-lg);
  }

  .agent-preview-panel {
    left: 0;
    right: auto;
    width: min(332px, calc(100vw - 28px));
    padding: 10px;
  }

  .agent-preview-grid {
    grid-template-columns: 1fr;
  }

  .agent-preview-shot img {
    aspect-ratio: 16 / 9;
  }

  .agent-preview-modal {
    padding: 14px;
  }

  .agent-preview-dialog {
    width: 100%;
    max-height: 88vh;
  }

  .agent-preview-modal-head,
  .agent-preview-modal-foot {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px;
  }

  .agent-preview-close {
    position: absolute;
    top: 12px;
    right: 12px;
  }

  .agent-preview-stage {
    padding: 18px 48px 28px;
  }

  .agent-preview-stage img {
    width: min(760px, 100%);
    max-height: none;
  }

  .agent-preview-nav {
    width: 36px;
    height: 52px;
    font-size: 34px;
  }

  .agent-preview-prev {
    left: 8px;
  }

  .agent-preview-next {
    right: 8px;
  }

  .project-image-modal {
    padding: 14px;
  }

  .project-image-dialog {
    width: 100%;
    max-height: 88vh;
  }

  .project-image-head,
  .project-image-foot {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px;
  }

  .project-image-close {
    position: absolute;
    top: 12px;
    right: 12px;
  }

  .project-image-stage {
    padding: 18px 18px 28px;
  }

  .project-image-stage img {
    width: min(860px, 100%);
  }

  .competition-item {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .competition-visual {
    max-width: 210px;
  }

  .info-label {
    font-size: var(--fs-body);
  }

  .section-heading {
    margin-bottom: 38px;
  }

  .section-subtitle {
    font-size: var(--fs-card-title);
  }

  .timeline-content dl div,
  .project-copy dl div {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .case-action-grid,
  .impact-metrics {
    grid-template-columns: 1fr;
  }

  .case-action {
    padding: 14px;
  }

  .project-item {
    gap: 30px;
    padding: 42px 0;
  }

  .project-gallery {
    min-height: auto;
    padding: 10px;
  }

  .project-gallery-frame {
    aspect-ratio: 4 / 3;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-links {
    align-items: flex-start;
    flex-direction: column;
  }
}
