:root {
  color-scheme: light;
  --ink: #101214;
  --muted-ink: #4b5055;
  --quiet-ink: #778087;
  --accent: #173d66;
  --hairline: rgba(16, 18, 20, 0.18);
  --studio-white: #e9e9e7;
  --header-height: 60px;
  --nav-gap: 42px;
  --visual-scale: 1.07;
  --visual-x: 64%;
  --visual-y: 51.5%;
  --copy-x: 9vw;
  --copy-y: 45.5%;
  --capability-height: 96px;
  --hero-transition-depth: clamp(250px, 32dvh, 340px);
}

@property --cta-gradient-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

@property --cta-gradient-angle-offset {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

@property --cta-gradient-percent {
  syntax: "<percentage>";
  initial-value: 5%;
  inherits: false;
}

@property --cta-gradient-shine {
  syntax: "<color>";
  initial-value: #ffffff;
  inherits: false;
}

/* ========================================================================== */
/* 03 / CMB CRM case study                                                    */
/* ========================================================================== */

.crm-case {
  --crm-red: #e5232f;
  --crm-red-dark: #b81824;
  --crm-ink: #122943;
  --crm-text: #2d435a;
  --crm-muted: #718196;
  --crm-line: rgba(24, 55, 87, 0.13);
  --crm-paper: #f7f9fb;
  --crm-blue: #2878da;
  position: relative;
  overflow: clip;
  color: var(--crm-ink);
  background:
    radial-gradient(circle at 82% 2%, rgba(113, 162, 216, 0.13), transparent 28%),
    linear-gradient(180deg, #edf3f8 0%, #f8fafc 12%, #fff 30%, #f6f8fb 100%);
}

.crm-case button,
.crm-case a { font: inherit; }

.crm-case em { color: var(--crm-red); font-style: normal; }

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

.crm-bridge {
  width: min(calc(100% - clamp(48px, 10vw, 160px)), 1600px);
  height: clamp(230px, 32vh, 320px);
  margin-inline: auto;
  padding-top: clamp(48px, 6vh, 72px);
}

.crm-bridge > p {
  margin: 0;
  color: #4f6680;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.crm-bridge > p::before {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 9px;
  content: "";
  background: var(--crm-blue);
  vertical-align: 1px;
}

.crm-bridge__nodes {
  display: grid;
  grid-template-columns: repeat(5, minmax(110px, 1fr));
  gap: clamp(14px, 2vw, 34px);
  width: min(100%, 1120px);
  margin: clamp(34px, 4.8vh, 48px) auto 0;
}

.crm-bridge__nodes span {
  position: relative;
  min-height: 62px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(66, 129, 199, 0.18);
  border-radius: 18px;
  color: #415b75;
  background: rgba(255, 255, 255, 0.46);
  box-shadow: 0 16px 42px rgba(61, 95, 130, 0.04);
  font-size: 12px;
  font-weight: 600;
}

.crm-bridge__nodes span::after {
  position: absolute;
  top: 100%;
  left: 50%;
  width: 1px;
  height: 34px;
  content: "";
  background: linear-gradient(rgba(67, 135, 210, 0.34), rgba(67, 135, 210, 0));
}

.crm-bridge__line {
  position: relative;
  width: min(66%, 780px);
  height: 54px;
  margin: 32px auto 0;
  border-top: 1px solid rgba(40, 120, 218, 0.3);
}

.crm-bridge__line::before {
  position: absolute;
  top: -4px;
  left: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  content: "";
  background: var(--crm-blue);
  box-shadow: 0 0 0 6px rgba(40, 120, 218, 0.08);
}

.crm-bridge__line i {
  position: absolute;
  top: -1px;
  left: 50%;
  width: 34%;
  height: 46px;
  border-top: 1px solid rgba(229, 35, 47, 0.7);
  border-right: 1px solid rgba(229, 35, 47, 0.7);
  border-radius: 0 18px 0 0;
}

.crm-case-hero {
  width: min(calc(100% - clamp(48px, 9vw, 152px)), 1700px);
  min-height: auto;
  margin-inline: auto;
  padding: clamp(34px, 4.5vh, 58px) 0 clamp(76px, 9vh, 112px);
  display: grid;
  grid-template-columns: minmax(340px, 0.74fr) minmax(0, 1.36fr);
  align-items: center;
  gap: clamp(44px, 6vw, 110px);
}

.crm-kicker,
.crm-section-heading > p {
  margin: 0;
  color: #556b81;
  font-size: 10px;
  font-weight: 720;
  letter-spacing: 0.16em;
}

.crm-kicker span { color: var(--crm-red); font-size: 1.35em; }

.crm-case-hero__copy h2 {
  max-width: 700px;
  margin: 28px 0 0;
  font-size: clamp(44px, 4.8vw, 78px);
  font-weight: 720;
  letter-spacing: -0.055em;
  line-height: 1.02;
}

.crm-case-hero__copy h3 {
  margin: 12px 0 0;
  color: #253b52;
  font-size: clamp(24px, 2.3vw, 40px);
  font-weight: 420;
  letter-spacing: -0.035em;
}

.crm-case-hero__summary {
  max-width: 570px;
  margin: clamp(28px, 4vh, 46px) 0 0;
  color: var(--crm-text);
  font-size: clamp(14px, 1vw, 16px);
  line-height: 1.85;
}

.crm-meta {
  display: grid;
  gap: 12px;
  margin: clamp(28px, 4vh, 46px) 0 0;
}

.crm-meta div {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 14px;
  align-items: baseline;
}

.crm-meta dt { color: #8a99a9; font-size: 9px; font-weight: 700; letter-spacing: 0.12em; }
.crm-meta dd { margin: 0; color: #40566c; font-size: 12px; font-weight: 580; }

.crm-primary-link {
  display: inline-flex;
  align-items: center;
  gap: 24px;
  margin-top: clamp(34px, 5vh, 54px);
  padding: 0 0 8px;
  border-bottom: 1px solid var(--crm-red);
  color: var(--crm-red);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}

.crm-primary-link i { font-style: normal; transition: transform 220ms ease; }
.crm-primary-link:hover i { transform: translate(4px, 4px); }

.crm-product-stage { min-width: 0; }

.crm-product-stage__toolbar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--crm-line);
}

.crm-product-stage__toolbar button {
  position: relative;
  min-height: 54px;
  border: 0;
  color: #52677d;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
}

.crm-product-stage__toolbar button::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  content: "";
  background: var(--crm-red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 220ms ease;
}

.crm-product-stage__toolbar button.is-active { color: var(--crm-ink); font-weight: 650; }
.crm-product-stage__toolbar button.is-active::after { transform: scaleX(1); }

.crm-product-stage__canvas {
  position: relative;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.66);
  box-shadow: 0 32px 90px rgba(31, 60, 89, 0.12), inset 0 0 0 1px rgba(30, 69, 108, 0.05);
}

.crm-product-stage__canvas > img {
  width: 100%;
  aspect-ratio: 1.72 / 1;
  object-fit: contain;
  cursor: zoom-in;
  transition: opacity 180ms ease, transform 260ms ease;
}

.crm-product-stage__canvas.is-changing > img { opacity: 0; transform: translateY(8px); }

.crm-product-stage__canvas figcaption {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  align-items: center;
  min-height: 66px;
  padding: 0 24px;
  border-top: 1px solid var(--crm-line);
  color: #67798b;
  background: rgba(250, 252, 254, 0.82);
  font-size: 11px;
}

.crm-product-stage__canvas figcaption span strong { color: var(--crm-red); font-size: 15px; }
.crm-product-stage__canvas figcaption p { margin: 0; color: var(--crm-ink); font-weight: 650; }
.crm-product-stage__canvas figcaption button { border: 0; color: #67798b; background: transparent; cursor: pointer; }

.crm-chapter-nav {
  position: sticky;
  z-index: 15;
  top: 0;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  width: 100%;
  border-block: 1px solid var(--crm-line);
  background: rgba(248, 250, 252, 0.91);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.crm-chapter-nav a {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-right: 1px solid var(--crm-line);
  color: #5f7285;
  font-size: 10px;
  text-decoration: none;
  transition: color 180ms ease, background 180ms ease;
}

.crm-chapter-nav a:last-child { border-right: 0; }
.crm-chapter-nav a span { color: #9aa7b5; font-size: 9px; }
.crm-chapter-nav a.is-active { color: var(--crm-red); background: rgba(229, 35, 47, 0.035); }
.crm-chapter-nav a.is-active span { color: var(--crm-red); }

.crm-story { width: min(calc(100% - clamp(48px, 9vw, 152px)), 1540px); margin-inline: auto; }
.crm-section { position: relative; padding: clamp(110px, 14vw, 190px) 0; scroll-margin-top: 68px; }
.crm-section + .crm-section { border-top: 1px solid var(--crm-line); }

.crm-section-heading { display: grid; grid-template-columns: minmax(0, 0.72fr) minmax(440px, 1.28fr); column-gap: clamp(50px, 8vw, 140px); align-items: end; }
.crm-section-heading > p { grid-column: 1; }
.crm-section-heading h2 { grid-column: 1; margin: 26px 0 0; font-size: clamp(38px, 4vw, 66px); font-weight: 620; letter-spacing: -0.05em; line-height: 1.12; }
.crm-section-heading > span { grid-column: 2; grid-row: 1 / 3; max-width: 660px; padding-bottom: 8px; color: var(--crm-text); font-size: clamp(15px, 1.2vw, 18px); line-height: 1.8; }

.crm-context-grid { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: clamp(70px, 8vw, 120px); border-block: 1px solid var(--crm-line); }
.crm-context-grid article { min-height: 230px; padding: 32px clamp(22px, 2.3vw, 38px); border-right: 1px solid var(--crm-line); }
.crm-context-grid article:last-child { border-right: 0; }
.crm-context-grid article > span { color: var(--crm-red); font-size: 14px; font-weight: 720; }
.crm-context-grid h3 { margin: 54px 0 0; font-size: 19px; font-weight: 650; }
.crm-context-grid p { margin: 14px 0 0; color: var(--crm-text); font-size: 13px; line-height: 1.75; }

.crm-evidence-frame,
.crm-feature-figure { margin: clamp(60px, 8vw, 110px) 0 0; border: 1px solid rgba(28, 67, 106, 0.1); border-radius: 26px; overflow: hidden; background: #fff; box-shadow: 0 30px 86px rgba(30, 60, 90, 0.07); }
.crm-evidence-frame img,
.crm-feature-figure img { width: 100%; cursor: zoom-in; }
.crm-evidence-frame figcaption,
.crm-feature-figure figcaption { display: flex; min-height: 72px; align-items: center; gap: 28px; padding: 0 clamp(22px, 3vw, 46px); border-top: 1px solid var(--crm-line); }
.crm-evidence-frame figcaption span { color: var(--crm-red); font-size: 9px; font-weight: 720; letter-spacing: 0.14em; }
.crm-evidence-frame figcaption p { margin: 0; color: var(--crm-text); font-size: 12px; }
.crm-evidence-frame figcaption button { margin-left: auto; border: 0; color: #52677b; background: transparent; cursor: pointer; font-size: 11px; }

.crm-compare { display: grid; grid-template-columns: minmax(280px, 0.58fr) minmax(0, 1.42fr); gap: clamp(42px, 6vw, 100px); align-items: center; margin-top: clamp(70px, 8vw, 120px); }
.crm-compare__copy > p { margin: 0; color: var(--crm-red); font-size: 9px; font-weight: 720; letter-spacing: 0.14em; }
.crm-compare__copy h3 { margin: 18px 0 0; font-size: clamp(25px, 2.3vw, 38px); letter-spacing: -0.035em; }
.crm-compare__copy > span { display: block; margin-top: 20px; color: var(--crm-text); font-size: 14px; line-height: 1.8; }
.crm-compare__copy > div { display: inline-flex; gap: 4px; margin-top: 34px; padding: 4px; border: 1px solid var(--crm-line); border-radius: 999px; background: #fff; }
.crm-compare__copy button { min-width: 84px; min-height: 38px; border: 0; border-radius: 999px; color: #68798a; background: transparent; cursor: pointer; font-size: 11px; }
.crm-compare__copy button.is-active { color: #fff; background: var(--crm-red); }
.crm-compare figure { margin: 0; overflow: hidden; border: 1px solid rgba(28, 67, 106, 0.1); border-radius: 26px; background: #fff; box-shadow: 0 28px 76px rgba(30, 60, 90, 0.08); }
.crm-compare figure img { width: 100%; cursor: zoom-in; transition: opacity 180ms ease, transform 240ms ease; }
.crm-compare figure.is-changing img { opacity: 0; transform: translateY(7px); }
.crm-compare figure figcaption { padding: 14px 22px; border-top: 1px solid var(--crm-line); color: #53687c; font-size: 11px; }

.crm-two-up { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(22px, 3vw, 42px); margin-top: clamp(56px, 7vw, 94px); }
.crm-two-up figure,
.crm-three-up figure,
.crm-detail-grid figure,
.crm-analytics-layout figure,
.crm-system-layout figure { margin: 0; overflow: hidden; border: 1px solid rgba(28, 67, 106, 0.1); border-radius: 22px; background: rgba(255,255,255,.84); box-shadow: 0 24px 64px rgba(30, 60, 90, 0.06); }
.crm-two-up img,
.crm-three-up img,
.crm-detail-grid img,
.crm-analytics-layout img,
.crm-system-layout img { width: 100%; cursor: zoom-in; }
.crm-two-up figcaption,
.crm-three-up figcaption,
.crm-analytics-layout figcaption,
.crm-system-layout figcaption { min-height: 56px; padding: 18px 22px; border-top: 1px solid var(--crm-line); color: #465d73; font-size: 12px; }

.crm-feature-figure figcaption { justify-content: space-between; }
.crm-feature-figure figcaption strong { font-size: 15px; }
.crm-feature-figure figcaption span { color: #718195; font-size: 11px; }

.crm-detail-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 2.6vw, 36px); margin-top: clamp(42px, 6vw, 80px); }
.crm-detail-grid figure { display: grid; grid-template-rows: auto 1fr; }
.crm-detail-grid figcaption { display: grid; grid-template-columns: 34px 1fr; padding: 22px; border-top: 1px solid var(--crm-line); }
.crm-detail-grid figcaption span { grid-row: 1 / 3; color: var(--crm-red); font-size: 11px; font-weight: 720; }
.crm-detail-grid figcaption strong { font-size: 14px; }
.crm-detail-grid figcaption p { margin: 7px 0 0; color: #718195; font-size: 11px; line-height: 1.6; }

.crm-process-row { display: grid; grid-template-columns: 1fr 44px 1fr 44px 1fr; align-items: center; margin-top: clamp(68px, 8vw, 112px); }
.crm-process-row article { min-height: 166px; padding: 28px; border: 1px solid var(--crm-line); border-radius: 20px; background: rgba(255,255,255,.68); }
.crm-process-row article span { color: var(--crm-red); font-size: 11px; font-weight: 720; }
.crm-process-row article strong { display: block; margin-top: 30px; font-size: 17px; }
.crm-process-row article p { margin: 10px 0 0; color: #687b8e; font-size: 12px; line-height: 1.65; }
.crm-process-row > i { height: 1px; background: var(--crm-line); }

.crm-three-up { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 2.6vw, 36px); margin-top: clamp(42px, 6vw, 80px); }
.crm-three-up figure { display: flex; flex-direction: column; }
.crm-three-up figure img { flex: 1; object-fit: cover; }

.crm-analytics-layout { display: grid; grid-template-columns: 1.35fr .65fr; gap: clamp(22px, 3vw, 42px); margin-top: clamp(70px, 8vw, 120px); }
.crm-analytics-layout__main { grid-row: 1 / 3; }
.crm-analytics-layout__main img { height: 100%; object-fit: cover; }

.crm-system-layout { margin-top: clamp(70px, 8vw, 120px); }
.crm-system-flow { display: grid; grid-template-columns: repeat(9, auto); align-items: center; justify-content: center; gap: clamp(12px, 2vw, 34px); margin-bottom: 42px; }
.crm-system-flow span { min-width: 118px; min-height: 50px; display: grid; place-items: center; border: 1px solid var(--crm-line); border-radius: 14px; color: #40576e; background: #fff; font-size: 11px; }
.crm-system-flow i { color: var(--crm-red); font-style: normal; }

.crm-validation-list { margin-top: clamp(64px, 8vw, 106px); border-top: 1px solid var(--crm-line); }
.crm-validation-list article { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 30px; padding: 32px 0; border-bottom: 1px solid var(--crm-line); }
.crm-validation-list article > span { color: var(--crm-red); font-size: 13px; font-weight: 720; }
.crm-validation-list h3 { margin: 0; font-size: 18px; }
.crm-validation-list p { max-width: 780px; margin: 10px 0 0; color: var(--crm-text); font-size: 14px; line-height: 1.75; }
.crm-validation-note { max-width: 820px; margin: 38px 0 0 120px; padding-left: 18px; border-left: 2px solid rgba(229, 35, 47, 0.45); color: #728296; font-size: 12px; line-height: 1.7; }

.crm-reveal { opacity: 0; transform: translateY(18px); transition: opacity 620ms cubic-bezier(.2,.75,.25,1), transform 620ms cubic-bezier(.2,.75,.25,1); }
.crm-reveal.is-visible { opacity: 1; transform: none; }

.crm-lightbox[hidden] { display: none; }
.crm-lightbox { position: fixed; z-index: 1000; inset: 0; display: grid; place-items: center; padding: 4vw; }
.crm-lightbox__backdrop { position: absolute; inset: 0; border: 0; background: rgba(13, 28, 44, 0.72); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.crm-lightbox figure { position: relative; z-index: 1; width: min(92vw, 1600px); max-height: 88vh; margin: 0; padding: 18px; overflow: auto; border: 1px solid rgba(255,255,255,.5); border-radius: 22px; background: rgba(248,250,252,.96); box-shadow: 0 40px 120px rgba(0,0,0,.24); }
.crm-lightbox figure > button { position: sticky; z-index: 2; top: 0; float: right; width: 38px; height: 38px; border: 1px solid var(--crm-line); border-radius: 50%; color: var(--crm-ink); background: rgba(255,255,255,.9); cursor: pointer; font-size: 23px; line-height: 1; }
.crm-lightbox img { width: 100%; height: auto; border-radius: 14px; }
.crm-lightbox figcaption { padding: 14px 4px 2px; color: #53687d; font-size: 12px; }
body.crm-lightbox-open { overflow: hidden; }
body.crm-case-in-view .tune-panel:not([open]) { opacity: 0; pointer-events: none; transform: translateY(8px); }

.crm-case button:focus-visible,
.crm-case a:focus-visible,
.crm-lightbox button:focus-visible { outline: 2px solid var(--crm-blue); outline-offset: 4px; }

@media (max-width: 1100px) {
  .crm-case-hero { grid-template-columns: minmax(290px, .68fr) minmax(0, 1.32fr); gap: 44px; }
  .crm-section-heading { grid-template-columns: 1fr; }
  .crm-section-heading > span { grid-column: 1; grid-row: auto; max-width: 720px; margin-top: 24px; }
  .crm-context-grid { grid-template-columns: 1fr 1fr; }
  .crm-context-grid article:nth-child(2) { border-right: 0; }
  .crm-context-grid article:nth-child(-n+2) { border-bottom: 1px solid var(--crm-line); }
  .crm-detail-grid { grid-template-columns: 1fr 1fr; }
  .crm-detail-grid figure:last-child { grid-column: 1 / -1; }
  .crm-system-flow { grid-template-columns: 1fr; justify-items: stretch; }
  .crm-system-flow span { width: 100%; }
  .crm-system-flow i { transform: rotate(90deg); text-align: center; }
}

@media (max-width: 760px) {
  .crm-bridge { width: calc(100% - 36px); height: 230px; padding-top: 56px; }
  .crm-bridge__nodes { display: flex; gap: 10px; margin-top: 36px; overflow-x: auto; scrollbar-width: none; }
  .crm-bridge__nodes::-webkit-scrollbar { display: none; }
  .crm-bridge__nodes span { min-width: 116px; min-height: 52px; flex: 0 0 116px; font-size: 10px; }
  .crm-bridge__nodes span::after, .crm-bridge__line { display: none; }

  .crm-case-hero { width: calc(100% - 36px); min-height: auto; display: block; padding: 72px 0 84px; }
  .crm-case-hero__copy h2 { margin-top: 22px; font-size: clamp(40px, 13vw, 62px); }
  .crm-case-hero__copy h3 { font-size: 24px; }
  .crm-case-hero__summary { font-size: 15px; line-height: 1.75; }
  .crm-meta { gap: 10px; }
  .crm-meta div { grid-template-columns: 76px 1fr; }
  .crm-product-stage { margin-top: 62px; }
  .crm-product-stage__toolbar { display: flex; overflow-x: auto; scrollbar-width: none; }
  .crm-product-stage__toolbar::-webkit-scrollbar { display: none; }
  .crm-product-stage__toolbar button { min-width: 110px; flex: 0 0 110px; }
  .crm-product-stage__canvas { border-radius: 18px; }
  .crm-product-stage__canvas figcaption { grid-template-columns: 60px 1fr; min-height: 58px; padding: 0 16px; }
  .crm-product-stage__canvas figcaption button { display: none; }

  .crm-chapter-nav { top: 0; display: flex; overflow-x: auto; scrollbar-width: none; }
  .crm-chapter-nav::-webkit-scrollbar { display: none; }
  .crm-chapter-nav a { min-width: 132px; min-height: 56px; flex: 0 0 132px; }
  .crm-story { width: calc(100% - 36px); }
  .crm-section { padding: 92px 0; scroll-margin-top: 58px; }
  .crm-section-heading h2 { margin-top: 20px; font-size: clamp(34px, 10vw, 48px); }
  .crm-section-heading > span { font-size: 15px; line-height: 1.7; }

  .crm-context-grid { grid-template-columns: 1fr; margin-top: 54px; }
  .crm-context-grid article { min-height: auto; padding: 25px 4px; border-right: 0; border-bottom: 1px solid var(--crm-line); }
  .crm-context-grid article:last-child { border-bottom: 0; }
  .crm-context-grid h3 { margin-top: 20px; }
  .crm-evidence-frame, .crm-feature-figure { margin-top: 50px; border-radius: 16px; }
  .crm-evidence-frame figcaption, .crm-feature-figure figcaption { min-height: 64px; padding: 14px 16px; flex-wrap: wrap; gap: 8px 18px; }
  .crm-evidence-frame figcaption button { display: none; }

  .crm-compare { display: block; margin-top: 54px; }
  .crm-compare figure { margin-top: 34px; border-radius: 16px; }
  .crm-two-up, .crm-three-up, .crm-detail-grid, .crm-analytics-layout { grid-template-columns: 1fr; gap: 20px; margin-top: 42px; }
  .crm-detail-grid figure:last-child, .crm-analytics-layout__main { grid-column: auto; grid-row: auto; }
  .crm-process-row { grid-template-columns: 1fr; gap: 12px; margin-top: 52px; }
  .crm-process-row > i { width: 1px; height: 18px; justify-self: center; }
  .crm-process-row article { min-height: 142px; }
  .crm-system-flow { margin-bottom: 28px; }
  .crm-validation-list article { grid-template-columns: 48px 1fr; gap: 14px; padding: 26px 0; }
  .crm-validation-note { margin: 28px 0 0; }
  .crm-lightbox { padding: 12px; }
  .crm-lightbox figure { width: 100%; max-height: 92vh; padding: 10px; border-radius: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .crm-reveal { opacity: 1; transform: none; transition: none; }
  .crm-primary-link i,
  .crm-product-stage__canvas > img,
  .crm-compare figure img { transition: none; }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--studio-white);
  color: var(--ink);
  font-family: "Helvetica Neue", "PingFang SC", "Microsoft YaHei", Arial,
    sans-serif;
  -webkit-font-smoothing: antialiased;
}

body.contact-is-open {
  overflow: hidden;
}

button,
a {
  color: inherit;
  font: inherit;
}

button {
  border: 0;
}

a {
  text-decoration: none;
}

.page {
  min-height: 100vh;
  overflow-x: clip;
  background: var(--studio-white);
}

.site-header {
  position: relative;
  z-index: 20;
  width: 100%;
  height: var(--header-height);
  border-bottom: 1px solid rgba(30, 55, 90, 0.08);
  background: rgba(248, 250, 253, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: min(calc(100% - 96px), 1600px);
  height: var(--header-height);
  margin-inline: auto;
}

.brand {
  display: inline-flex;
  flex-direction: column;
  justify-self: start;
  gap: 1px;
  line-height: 1;
}

.brand-primary {
  font-size: 14px;
  font-weight: 750;
  letter-spacing: 0.05em;
}

.brand-secondary {
  color: #555c61;
  font-size: 8px;
  font-weight: 650;
  letter-spacing: 0.18em;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-self: center;
  gap: var(--nav-gap);
}

.site-nav a,
.site-nav button {
  position: relative;
  padding: 10px 0;
  background: transparent;
  cursor: pointer;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.14em;
  white-space: nowrap;
}

.site-nav a::after,
.site-nav button::after {
  position: absolute;
  right: 0;
  bottom: 3px;
  left: 0;
  height: 1px;
  content: "";
  background: currentColor;
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left center;
  transition: opacity 180ms ease, transform 180ms ease;
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after,
.site-nav button:hover::after,
.site-nav button:focus-visible::after {
  opacity: 1;
  transform: scaleX(1);
}

.header-balance {
  width: 100%;
  justify-self: end;
}

.mobile-menu {
  position: relative;
  display: none;
  justify-self: end;
}

.menu-button {
  display: grid;
  width: 36px;
  height: 36px;
  place-content: center;
  gap: 6px;
  cursor: pointer;
  list-style: none;
}

.menu-button::-webkit-details-marker {
  display: none;
}

.menu-button span {
  display: block;
  width: 18px;
  height: 1px;
  background: var(--ink);
  transition: transform 180ms ease;
}

.mobile-menu[open] .menu-button span:first-child {
  transform: translateY(3.5px) rotate(45deg);
}

.mobile-menu[open] .menu-button span:last-child {
  transform: translateY(-3.5px) rotate(-45deg);
}

.mobile-menu-panel {
  position: absolute;
  top: 42px;
  right: 0;
  display: grid;
  min-width: 190px;
  padding: 14px 18px;
  border: 1px solid rgba(16, 18, 20, 0.12);
  background: rgba(247, 248, 249, 0.96);
  box-shadow: 0 16px 40px rgba(57, 65, 70, 0.12);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.mobile-menu-panel a,
.mobile-menu-panel button {
  padding: 10px 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.12em;
}

.hero {
  position: relative;
  min-height: calc(100vh - var(--header-height));
  min-height: calc(100dvh - var(--header-height));
  height: calc(100vh - var(--header-height));
  height: calc(100dvh - var(--header-height));
  overflow: hidden;
  isolation: isolate;
  background: var(--studio-white);
}

.hero-visual {
  position: absolute;
  z-index: 0;
  top: var(--visual-y);
  left: var(--visual-x);
  height: 100%;
  width: auto;
  aspect-ratio: 16 / 9;
  transform: translate(-50%, -50%) scale(var(--visual-scale));
  transform-origin: center bottom;
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent 0%,
    rgba(0, 0, 0, 0.42) 8%,
    #000 19%,
    #000 100%
  );
  mask-image: linear-gradient(
    90deg,
    transparent 0%,
    rgba(0, 0, 0, 0.42) 8%,
    #000 19%,
    #000 100%
  );
}

.hero-poster,
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-poster {
  z-index: 0;
  background-color: var(--studio-white);
  background-image: url("https://future-ai-assistant-d4by601f3916-1467924997.tcloudbaseapp.com/hero-poster.png");
  background-position: center bottom;
  background-repeat: no-repeat;
  background-size: contain;
  opacity: 1;
  transition: opacity 420ms ease;
}

.hero-video {
  z-index: 1;
  display: block;
  object-fit: contain;
  object-position: center bottom;
  opacity: 0;
  transition: opacity 420ms ease;
}

.hero-video.is-ready {
  opacity: 1;
}

.hero.has-video .hero-poster {
  opacity: 0;
}

.hero-wash {
  position: absolute;
  z-index: 2;
  inset: 0 auto 0 0;
  width: 64%;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(244, 245, 245, 0.94) 0%,
    rgba(244, 245, 245, 0.84) 30%,
    rgba(244, 245, 245, 0.44) 55%,
    rgba(244, 245, 245, 0.1) 79%,
    rgba(244, 245, 245, 0) 100%
  );
}

.sound-toggle {
  position: absolute;
  z-index: 6;
  right: clamp(20px, 2.5vw, 42px);
  bottom: clamp(20px, 2.5vw, 42px);
  width: 28px;
  height: 28px;
  padding: 0;
  background: transparent;
  color: #9ca7ae;
  cursor: pointer;
  transition: color 180ms ease, opacity 180ms ease;
}

.sound-toggle:hover {
  color: #74828b;
}

.sound-toggle__icon {
  display: block;
  width: 18px;
  height: 18px;
  margin: auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sound-toggle.is-unmuted .sound-toggle__mute-line {
  display: none;
}

.sound-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.hero-content {
  position: absolute;
  z-index: 3;
  top: var(--copy-y);
  left: var(--copy-x);
  width: min(560px, 42vw);
  transform: translateY(-50%);
}

.eyebrow {
  margin: 0 0 18px;
  color: #30363a;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.17em;
  line-height: 1.45;
}

.hero-content h1 {
  display: flex;
  flex-direction: column;
  margin: 0;
  font-family: "Arial Narrow", "Avenir Next Condensed", "Helvetica Neue",
    sans-serif;
  font-size: clamp(50px, 4.5vw, 82px);
  font-stretch: condensed;
  font-weight: 800;
  letter-spacing: -0.065em;
  line-height: 0.88;
  text-transform: uppercase;
}

.title-line {
  display: block;
  overflow: hidden;
  padding-right: 0.08em;
}

.title-line > span {
  display: block;
}

.hero-copy {
  width: min(530px, 100%);
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--hairline);
}

.hero-copy h2 {
  margin: 0 0 10px;
  font-size: clamp(19px, 1.34vw, 24px);
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.3;
}

.hero-copy h2 span {
  display: block;
}

.hero-copy p {
  margin: 0;
  color: var(--muted-ink);
  font-size: 13px;
  letter-spacing: 0.01em;
  line-height: 1.72;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-top: 21px;
}

.primary-action {
  --cta-bg: #050608;
  --cta-bg-subtle: #1a1c22;
  --cta-highlight: #2f6bff;
  --cta-highlight-subtle: #8aa6ff;
  --cta-gradient-angle: 0deg;
  --cta-gradient-angle-offset: 0deg;
  --cta-gradient-percent: 5%;
  --cta-gradient-shine: #ffffff;
  position: relative;
  isolation: isolate;
  display: inline-flex;
  min-height: 50px;
  overflow: hidden;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 17px 0 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  outline-offset: 4px;
  background:
    linear-gradient(var(--cta-bg), var(--cta-bg)) padding-box,
    conic-gradient(
        from calc(var(--cta-gradient-angle) - var(--cta-gradient-angle-offset)),
        transparent,
        var(--cta-highlight) var(--cta-gradient-percent),
        var(--cta-gradient-shine) calc(var(--cta-gradient-percent) * 2),
        var(--cta-highlight) calc(var(--cta-gradient-percent) * 3),
        transparent calc(var(--cta-gradient-percent) * 4)
      )
      border-box;
  box-shadow:
    inset 0 0 0 1px var(--cta-bg-subtle),
    0 10px 28px rgba(17, 33, 68, 0.12);
  color: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  animation: primary-action-gradient-angle 3s linear infinite;
  transition:
    transform 180ms ease,
    box-shadow 800ms cubic-bezier(0.25, 1, 0.5, 1),
    --cta-gradient-angle-offset 800ms cubic-bezier(0.25, 1, 0.5, 1),
    --cta-gradient-percent 800ms cubic-bezier(0.25, 1, 0.5, 1),
    --cta-gradient-shine 800ms cubic-bezier(0.25, 1, 0.5, 1);
}

.primary-action::before,
.primary-action::after,
.primary-action__label::before {
  position: absolute;
  top: 50%;
  left: 50%;
  content: "";
  pointer-events: none;
  translate: -50% -50%;
}

.primary-action::before {
  --cta-gradient-angle: 0deg;
  z-index: 0;
  width: calc(100% - 6px);
  height: calc(100% - 6px);
  border-radius: inherit;
  background: radial-gradient(circle at 2px 2px, #ffffff 0.5px, transparent 0.6px);
  background-size: 4px 4px;
  -webkit-mask-image: conic-gradient(
    from calc(var(--cta-gradient-angle) + 45deg),
    #000,
    transparent 10% 90%,
    #000
  );
  mask-image: conic-gradient(
    from calc(var(--cta-gradient-angle) + 45deg),
    #000,
    transparent 10% 90%,
    #000
  );
  opacity: 0.34;
  animation: primary-action-gradient-angle 3s linear infinite;
}

.primary-action::after {
  z-index: 0;
  width: 100%;
  aspect-ratio: 1;
  background: linear-gradient(-50deg, transparent, var(--cta-highlight), transparent);
  -webkit-mask-image: radial-gradient(circle at bottom, transparent 40%, #000);
  mask-image: radial-gradient(circle at bottom, transparent 40%, #000);
  opacity: 0.55;
  animation: primary-action-shimmer 7.5s linear infinite paused;
}

.primary-action__label,
.primary-action__arrow {
  position: relative;
  z-index: 1;
  display: inline-block;
}

.primary-action__label::before {
  z-index: -1;
  width: calc(100% + 1rem);
  height: calc(100% + 1rem);
  border-radius: 999px;
  box-shadow: inset 0 -1ex 2rem 4px var(--cta-highlight);
  opacity: 0;
  animation: primary-action-breathe 4.5s linear infinite;
  transition: opacity 800ms cubic-bezier(0.25, 1, 0.5, 1);
}

.primary-action__arrow {
  transition: transform 180ms ease;
}

.primary-action:is(:hover, :focus-visible) {
  --cta-gradient-angle-offset: 95deg;
  --cta-gradient-percent: 20%;
  --cta-gradient-shine: var(--cta-highlight-subtle);
  box-shadow:
    inset 0 0 0 1px rgba(138, 166, 255, 0.2),
    0 14px 34px rgba(47, 107, 255, 0.2);
  transform: translateY(-2px);
}

.primary-action:is(:hover, :focus-visible)::after {
  animation-play-state: running;
}

.primary-action:is(:hover, :focus-visible) .primary-action__label::before {
  opacity: 1;
}

.primary-action:is(:hover, :focus-visible) .primary-action__arrow {
  transform: translate(3px, -3px);
}

.primary-action:active {
  transform: translateY(1px);
}

/* Pause every Hero CTA paint loop, including pseudo-elements, outside its viewport. */
.hero.is-motion-paused .primary-action,
.hero.is-motion-paused .primary-action::before,
.hero.is-motion-paused .primary-action::after,
.hero.is-motion-paused .primary-action__label::before,
.hero .primary-action.is-motion-paused,
.hero .primary-action.is-motion-paused::before,
.hero .primary-action.is-motion-paused::after,
.hero .primary-action.is-motion-paused .primary-action__label::before {
  animation-play-state: paused !important;
}

@keyframes primary-action-gradient-angle {
  to {
    --cta-gradient-angle: 360deg;
  }
}

@keyframes primary-action-shimmer {
  to {
    rotate: 360deg;
  }
}

@keyframes primary-action-breathe {
  0%,
  100% {
    scale: 1;
  }

  50% {
    scale: 1.2;
  }
}

.secondary-action {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 0 8px;
  font-size: 12px;
  font-weight: 600;
}

.secondary-action::after {
  position: absolute;
  right: 0;
  bottom: 4px;
  left: 0;
  height: 1px;
  content: "";
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 200ms ease;
}

.secondary-action__arrow {
  display: inline-block;
  transition: transform 180ms ease;
}

.secondary-action:hover::after,
.secondary-action:focus-visible::after {
  transform: scaleX(1);
}

.secondary-action:hover .secondary-action__arrow {
  transform: translateY(3px);
}

.primary-action:focus-visible,
.secondary-action:focus-visible,
.brand:focus-visible,
.site-nav a:focus-visible,
.site-nav button:focus-visible,
.mobile-menu-panel a:focus-visible,
.mobile-menu-panel button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.capability-index {
  position: absolute;
  z-index: 4;
  right: clamp(76px, 6vw, 116px);
  bottom: clamp(16px, 2vh, 26px);
  left: clamp(48px, 6vw, 110px);
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  min-height: var(--capability-height);
}

.capability-item {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 0 clamp(12px, 1.2vw, 22px);
  border-left: 1px solid rgba(16, 18, 20, 0.14);
  opacity: 1;
  transition: opacity 180ms ease;
}

.capability-item:last-child {
  border-right: 1px solid rgba(16, 18, 20, 0.14);
}

.capability-index.has-active .capability-item:not(.is-active) {
  opacity: 0.45;
}

.capability-number {
  flex: 0 0 auto;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.04em;
  transition: color 180ms ease, transform 180ms ease;
}

.capability-name {
  display: block;
  min-height: 31px;
  margin-top: 5px;
  color: #34393d;
  font-size: clamp(11px, 0.82vw, 13px);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.28;
  transition: transform 180ms ease;
}

.capability-category {
  display: block;
  margin-top: 3px;
  color: #596066;
  font-size: 8px;
  font-weight: 650;
  letter-spacing: 0.11em;
  line-height: 1.35;
  white-space: nowrap;
  transition: color 180ms ease, transform 180ms ease;
}

.capability-rule {
  position: relative;
  display: block;
  width: 100%;
  height: 1px;
  margin-top: 8px;
  overflow: hidden;
  background: rgba(16, 18, 20, 0.16);
}

.capability-rule::after {
  position: absolute;
  inset: 0;
  content: "";
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 220ms ease;
}

.capability-description {
  display: block;
  min-height: 20px;
  margin-top: 8px;
  overflow: hidden;
  color: #4d5358;
  font-size: 9px;
  line-height: 1.45;
  opacity: 0;
  text-overflow: ellipsis;
  transform: translateY(4px);
  transition: opacity 180ms ease, transform 180ms ease;
  visibility: hidden;
  white-space: nowrap;
}

.capability-item.is-active .capability-number {
  color: var(--accent);
  transform: translateY(-2px);
}

.capability-item.is-active .capability-name {
  transform: translateX(5px);
}

.capability-item.is-active .capability-category {
  color: var(--accent);
  transform: translateX(5px);
}

.capability-item.is-active .capability-rule::after {
  transform: scaleX(1);
}

.capability-item.is-active .capability-description {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

.capability-item:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Only the first video playback reveals these phases. Without JS, content stays visible. */
.hero.intro-active [data-intro-phase]:not(.title-line) {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 460ms ease, transform 460ms ease;
}

.hero.intro-active [data-intro-phase].is-visible:not(.title-line) {
  opacity: 1;
  transform: translateY(0);
}

.hero.intro-active .title-line > span {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 460ms ease, transform 460ms ease;
}

.hero.intro-active .title-line.is-visible > span {
  opacity: 1;
  transform: translateY(0);
}

.contact-layer {
  position: fixed;
  z-index: 50;
  inset: var(--header-height) 0 0;
}

.contact-layer[hidden] {
  display: none;
}

.contact-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  background: rgba(17, 24, 31, 0);
  cursor: default;
  transition: background-color 220ms ease;
}

.contact-panel {
  position: absolute;
  inset: 0 auto 0 0;
  width: min(420px, 36vw);
  min-width: 330px;
  overflow-y: auto;
  padding: clamp(52px, 6vh, 74px) clamp(30px, 3vw, 48px) 36px;
  border-right: 1px solid rgba(16, 18, 20, 0.12);
  background: rgba(248, 250, 252, 0.97);
  box-shadow: 18px 0 54px rgba(34, 42, 49, 0.11);
  outline: 0;
  transform: translateX(-102%);
  transition: transform 240ms cubic-bezier(0.22, 0.7, 0.25, 1);
}

.contact-layer.is-open .contact-backdrop {
  background: rgba(17, 24, 31, 0.12);
}

.contact-layer.is-open .contact-panel {
  transform: translateX(0);
}

.contact-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 30px;
  height: 30px;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.contact-close span {
  position: absolute;
  top: 14px;
  left: 6px;
  display: block;
  width: 18px;
  height: 1px;
  background: var(--ink);
}

.contact-close span:first-child {
  transform: rotate(45deg);
}

.contact-close span:last-child {
  transform: rotate(-45deg);
}

.contact-kicker {
  margin: 0 0 42px;
  color: #555d63;
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.16em;
}

.contact-panel h2 {
  margin: 0;
  font-size: clamp(34px, 3vw, 46px);
  font-weight: 650;
  letter-spacing: -0.045em;
}

.contact-role {
  max-width: 290px;
  margin: 9px 0 0;
  color: #4b5257;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.6;
}

.contact-direction {
  margin-top: 48px;
  padding-top: 22px;
  border-top: 1px solid var(--hairline);
}

.contact-direction > span {
  color: #697177;
  font-size: 11px;
}

.contact-direction p {
  margin: 8px 0 0;
  font-size: 14px;
  font-weight: 550;
  line-height: 1.7;
}

.contact-actions {
  display: grid;
  margin-top: 38px;
  border-top: 1px solid rgba(16, 18, 20, 0.14);
}

.contact-actions button {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0;
  border-bottom: 1px solid rgba(16, 18, 20, 0.14);
  background: transparent;
  cursor: pointer;
  text-align: left;
  font-size: 12px;
  transition: color 160ms ease, padding 160ms ease;
}

.contact-actions button:not(:disabled):hover {
  padding-left: 5px;
  color: var(--accent);
}

.contact-actions button:disabled {
  color: #8a9298;
  cursor: not-allowed;
}

.contact-actions [data-contact-state] {
  flex: 0 0 auto;
  color: #8b9399;
  font-size: 9px;
  letter-spacing: 0.08em;
}

.contact-status {
  min-height: 20px;
  margin: 16px 0 0;
  color: var(--accent);
  font-size: 10px;
}

.contact-close:focus-visible,
.contact-actions button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.tune-panel {
  position: fixed;
  z-index: 9999;
  left: 18px;
  bottom: calc(var(--capability-height) + 42px);
  width: min(304px, calc(100vw - 36px));
  max-height: calc(100vh - 36px);
  overflow: auto;
  border: 1px solid rgba(16, 18, 20, 0.13);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 54px rgba(24, 31, 38, 0.18);
  color: #151719;
  font-size: 12px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.tune-panel[hidden] {
  display: none;
}

.tune-panel:not([open]) {
  width: auto;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(16, 18, 20, 0.86);
  color: #fff;
}

.tune-panel__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 14px;
  cursor: pointer;
  font-weight: 700;
  letter-spacing: 0.02em;
  list-style: none;
}

.tune-panel__summary::-webkit-details-marker {
  display: none;
}

.tune-panel__summary::after {
  margin-left: 18px;
  color: #686d72;
  content: "收起";
  font-size: 10px;
  font-weight: 500;
}

.tune-panel:not([open]) .tune-panel__summary::after {
  margin-left: 10px;
  color: #fff;
  content: "+";
  font-size: 14px;
}

.tune-panel__body {
  padding: 0 14px 14px;
  border-top: 1px solid rgba(16, 18, 20, 0.09);
}

.tune-panel__mode {
  margin: 10px 0 5px;
  color: #60656a;
  font-size: 11px;
}

.tune-control {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 10px;
  margin-top: 10px;
}

.tune-control label {
  font-weight: 600;
}

.tune-control output {
  min-width: 48px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.tune-control small {
  grid-column: 1 / -1;
  color: #74797e;
  font-size: 10px;
}

.tune-control input[type="range"] {
  grid-column: 1 / -1;
  width: 100%;
  margin: 1px 0 0;
  accent-color: #151719;
}

.tune-panel__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}

.tune-panel__actions button {
  min-height: 34px;
  padding: 7px 9px;
  border: 1px solid rgba(16, 18, 20, 0.16);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.76);
  color: inherit;
  cursor: pointer;
  font: inherit;
}

.tune-panel__actions button:last-child {
  grid-column: 1 / -1;
}

.tune-panel__status {
  min-height: 16px;
  margin: 9px 0 0;
  color: #326b45;
  text-align: center;
  font-size: 11px;
}

@media (max-width: 1100px) {
  .site-nav a,
  .site-nav button {
    font-size: 9px;
  }

  .hero-content {
    width: min(520px, 44vw);
  }

  .capability-description {
    font-size: 8px;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 72px;
    --nav-gap: 24px;
    --visual-scale: 1;
    --visual-x: 58%;
    --visual-y: 50%;
    --copy-x: 22px;
    --copy-y: 50%;
    --capability-height: 92px;
  }

  .header-inner {
    grid-template-columns: 1fr auto;
    width: calc(100% - 40px);
  }

  .brand-primary {
    font-size: 13px;
  }

  .brand-secondary {
    font-size: 7px;
  }

  .site-nav,
  .header-balance {
    display: none;
  }

  .mobile-menu {
    display: block;
  }

  .hero::after {
    position: absolute;
    z-index: 2;
    inset: 33% 0 0;
    content: "";
    pointer-events: none;
    background: linear-gradient(
      0deg,
      rgba(242, 243, 243, 0.99) 0%,
      rgba(242, 243, 243, 0.9) 37%,
      rgba(242, 243, 243, 0.46) 68%,
      rgba(242, 243, 243, 0) 100%
    );
  }

  .hero-wash {
    width: 58%;
    opacity: 0.54;
  }

  .hero-content {
    top: auto;
    bottom: calc(var(--capability-height) + 18px);
    left: 22px;
    width: calc(100% - 44px);
    transform: none;
  }

  .eyebrow {
    max-width: 62vw;
    margin-bottom: 6px;
    font-size: 6.5px;
    letter-spacing: 0.13em;
  }

  .hero-content h1 {
    max-width: 62vw;
    font-size: clamp(26px, 7vw, 31px);
    letter-spacing: -0.06em;
    line-height: 0.89;
  }

  .hero-copy {
    width: min(66vw, 270px);
    margin-top: 8px;
    padding-top: 7px;
  }

  .hero-copy h2 {
    margin-bottom: 4px;
    font-size: 12.5px;
    line-height: 1.28;
  }

  .hero-copy p {
    font-size: 8px;
    line-height: 1.35;
  }

  .hero-actions {
    gap: 14px;
    margin-top: 8px;
  }

  .primary-action {
    min-height: 36px;
    gap: 12px;
    padding: 0 12px 0 14px;
    font-size: 9px;
  }

  .secondary-action {
    gap: 5px;
    padding-top: 9px;
    font-size: 9px;
  }

  .capability-index {
    right: 54px;
    bottom: max(10px, env(safe-area-inset-bottom));
    left: 18px;
    display: flex;
    min-height: var(--capability-height);
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
  }

  .capability-index::-webkit-scrollbar {
    display: none;
  }

  .capability-item {
    min-width: 220px;
    flex: 0 0 220px;
    padding: 0 14px;
    scroll-snap-align: start;
  }

  .capability-number {
    font-size: 17px;
  }

  .capability-name {
    min-height: 30px;
    font-size: 11.5px;
    line-height: 1.3;
  }

  .capability-category {
    font-size: 7.5px;
  }

  .capability-description {
    min-height: 30px;
    overflow: visible;
    font-size: 8px;
    text-overflow: clip;
    white-space: normal;
  }

  .sound-toggle {
    right: 14px;
    bottom: max(14px, env(safe-area-inset-bottom));
  }

  .contact-panel {
    width: 60vw;
    min-width: 0;
    padding: 48px 18px 24px;
  }

  .contact-close {
    top: 16px;
    right: 14px;
  }

  .contact-kicker {
    margin-bottom: 28px;
    font-size: 7px;
    line-height: 1.5;
  }

  .contact-panel h2 {
    font-size: 30px;
  }

  .contact-role {
    font-size: 8px;
  }

  .contact-direction {
    margin-top: 32px;
    padding-top: 16px;
  }

  .contact-direction p {
    font-size: 11px;
  }

  .contact-actions {
    margin-top: 24px;
  }

  .contact-actions button {
    min-height: 48px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    font-size: 10px;
  }

  .tune-panel {
    top: calc(var(--header-height) + 12px);
    right: 18px;
    bottom: auto;
    left: auto;
  }
}

@media (max-width: 390px) and (max-height: 760px) {
  .hero-content {
    bottom: calc(var(--capability-height) + 20px);
  }

  .eyebrow {
    margin-bottom: 6px;
  }

  .hero-content h1 {
    font-size: 28px;
  }

  .hero-copy {
    margin-top: 8px;
    padding-top: 8px;
  }

  .hero-copy h2 {
    font-size: 12px;
  }

  .hero-copy p {
    font-size: 8.5px;
    line-height: 1.45;
  }

  .hero-actions {
    margin-top: 8px;
  }

  .primary-action {
    min-height: 36px;
  }
}

@media (max-height: 760px) and (min-width: 769px) {
  .hero-content {
    width: min(520px, 41vw);
  }

  .eyebrow {
    margin-bottom: 11px;
    font-size: 8px;
  }

  .hero-content h1 {
    font-size: clamp(46px, 4vw, 65px);
  }

  .hero-copy {
    margin-top: 15px;
    padding-top: 13px;
  }

  .hero-copy h2 {
    margin-bottom: 6px;
    font-size: 17px;
  }

  .hero-copy p {
    font-size: 11px;
    line-height: 1.55;
  }

  .hero-actions {
    margin-top: 13px;
  }

  .primary-action {
    min-height: 43px;
  }

  .capability-index {
    bottom: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

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

  .hero.intro-active [data-intro-phase]:not(.title-line),
  .hero.intro-active .title-line > span {
    opacity: 1;
    transform: none;
  }
}

/* AI portfolio copilot: appended only; the existing Hero rules above stay intact. */
.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;
}

.hero-transition-shell {
  --hero-copy-opacity: 1;
  --hero-project-opacity: 1;
  --hero-visual-opacity: 1;
  --hero-shift-x: 0vw;
  --hero-shift-y: 0vh;
  --hero-copy-shift: 0px;
  position: relative;
  height: calc(100dvh - var(--header-height) + var(--hero-transition-depth));
  min-height: calc(100vh - var(--header-height) + clamp(250px, 32vh, 340px));
  background: var(--studio-white);
}

.hero-transition-shell > .hero {
  position: sticky;
  top: 0;
}

.hero-transition-shell .hero-content {
  opacity: var(--hero-copy-opacity);
  transform: translateY(calc(-50% + var(--hero-copy-shift)));
  transition: none;
}

.hero-transition-shell .capability-index,
.hero-transition-shell .sound-toggle {
  opacity: var(--hero-project-opacity);
}

.hero-transition-shell > .hero.intro-active .capability-index.is-visible {
  opacity: var(--hero-project-opacity);
}

.hero-transition-shell .hero-visual {
  opacity: var(--hero-visual-opacity);
  transform: translate(
      calc(-50% + var(--hero-shift-x)),
      calc(-50% + var(--hero-shift-y))
    )
    scale(var(--visual-scale));
  transition: none;
}

.portfolio-copilot {
  position: relative;
  z-index: 9;
  min-height: 100dvh;
  margin-top: calc(0px - var(--hero-transition-depth));
  overflow: hidden;
  padding: clamp(24px, 3.2vh, 42px) clamp(48px, 6vw, 110px) clamp(68px, 8vh, 100px);
  color: #10233a;
  background:
    radial-gradient(circle at 76% 22%, rgba(160, 197, 230, 0.22), transparent 32%),
    linear-gradient(180deg, rgba(245, 247, 248, 0) 0, rgba(239, 243, 246, 0.86) 82px, #e9eef2 180px, #dce6ef 100%);
  isolation: isolate;
}

.copilot-background {
  position: absolute;
  z-index: -1;
  inset: 0;
  background-image: url("https://future-ai-assistant-d4by601f3916-1467924997.tcloudbaseapp.com/hero-poster.png");
  background-repeat: no-repeat;
  background-position: 103% -31vw;
  background-size: 70vw auto;
  filter: grayscale(0.45) contrast(0.82);
  opacity: 0.035;
  -webkit-mask-image: linear-gradient(150deg, transparent 12%, #000 48%, transparent 88%);
  mask-image: linear-gradient(150deg, transparent 12%, #000 48%, transparent 88%);
}

.copilot-inner {
  width: min(100%, 1600px);
  margin-inline: auto;
}

.knowledge-strip {
  display: grid;
  grid-template-columns: 180px 1fr;
  align-items: stretch;
  border-top: 1px solid rgba(20, 55, 88, 0.2);
  border-bottom: 1px solid rgba(20, 55, 88, 0.17);
}

.knowledge-strip > p,
.copilot-workflow > p {
  margin: 0;
  color: #5c6c7b;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.knowledge-strip > p {
  display: flex;
  align-items: center;
  padding-right: 20px;
}

.knowledge-strip__scroller {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.knowledge-strip button {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 70px;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border-left: 1px solid rgba(20, 55, 88, 0.13);
  background: transparent;
  color: #263a4e;
  cursor: default;
  text-align: left;
  transition: color 180ms ease, background-color 180ms ease;
}

.knowledge-strip button::after {
  position: absolute;
  right: 14px;
  bottom: -1px;
  left: 14px;
  height: 2px;
  content: "";
  background: #2f83df;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 220ms ease;
}

.knowledge-strip button span {
  color: #7d8a96;
  font-size: 9px;
}

.knowledge-strip button strong {
  overflow: hidden;
  font-size: clamp(9px, 0.75vw, 12px);
  font-weight: 620;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.knowledge-strip button.is-retrieved {
  background: rgba(67, 143, 223, 0.07);
  color: #1e6ec4;
}

.knowledge-strip button.is-retrieved::after { transform: scaleX(1); }

.copilot-workflow {
  display: grid;
  grid-template-columns: 180px 1fr;
  align-items: center;
  margin-top: 24px;
}

.copilot-workflow ol {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.copilot-workflow li {
  position: relative;
  display: flex;
  min-height: 38px;
  align-items: center;
  gap: 9px;
  color: rgba(50, 67, 82, 0.38);
  font-size: 10px;
  font-weight: 620;
  transition: color 180ms ease;
}

.copilot-workflow li:not(:last-child)::after {
  position: absolute;
  top: 50%;
  right: 15%;
  width: 34%;
  height: 1px;
  content: "";
  background: currentColor;
  opacity: 0.45;
}

.copilot-workflow li span {
  display: grid;
  width: 24px;
  height: 24px;
  border: 1px solid currentColor;
  border-radius: 50%;
  place-items: center;
  font-size: 7px;
}

.copilot-workflow li.is-active,
.copilot-workflow li.is-complete { color: #2d82df; }
.copilot-workflow li.is-complete span { background: rgba(45, 130, 223, 0.1); }

.copilot-layout {
  display: grid;
  grid-template-columns: minmax(280px, 34fr) minmax(0, 66fr);
  gap: clamp(34px, 4.6vw, 76px);
  align-items: start;
  margin-top: clamp(34px, 5vh, 62px);
}

.copilot-intro {
  padding-top: 10px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 620ms cubic-bezier(0.22, 0.7, 0.25, 1), transform 620ms cubic-bezier(0.22, 0.7, 0.25, 1);
}

.portfolio-copilot.is-revealed .copilot-intro { opacity: 1; transform: translateY(0); }

.copilot-kicker {
  margin: 0 0 28px;
  color: #2578cf;
  font-size: 9px;
  font-weight: 720;
  letter-spacing: 0.16em;
}

.copilot-intro h2 {
  margin: 0;
  font-size: clamp(46px, 4.6vw, 78px);
  font-weight: 560;
  letter-spacing: -0.06em;
  line-height: 1.04;
}

.copilot-subtitle {
  max-width: 410px;
  margin: 24px 0 0;
  color: #4f6171;
  font-size: 13px;
  line-height: 1.75;
}

.prompt-list {
  display: grid;
  gap: 8px;
  margin-top: 40px;
}

.prompt-list button {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  min-height: 54px;
  align-items: center;
  gap: 9px;
  padding: 0 15px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.31);
  box-shadow: inset 0 0 0 1px rgba(31, 72, 109, 0.06);
  color: #24384b;
  cursor: pointer;
  text-align: left;
  font-size: 11px;
  line-height: 1.45;
  backdrop-filter: blur(13px);
  -webkit-backdrop-filter: blur(13px);
  transition: background-color 180ms ease, transform 180ms ease, border-color 180ms ease;
}

.prompt-list button:hover,
.prompt-list button:focus-visible {
  border-color: rgba(45, 130, 223, 0.34);
  background: rgba(255, 255, 255, 0.58);
  transform: translateY(-1px);
}

.prompt-list button span { color: #6d7d8b; font-size: 8px; }
.prompt-list button i { color: #2d82df; font-style: normal; transition: transform 180ms ease; }
.prompt-list button:hover i { transform: translate(2px, -2px); }

.copilot-trust {
  display: flex;
  max-width: 390px;
  align-items: flex-start;
  gap: 9px;
  margin: 26px 0 0;
  color: #6c7a86;
  font-size: 9px;
  line-height: 1.55;
}

.copilot-trust span {
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  margin-top: 4px;
  border-radius: 50%;
  background: #3188e4;
  box-shadow: 0 0 0 4px rgba(49, 136, 228, 0.08);
}

.chat-panel {
  display: flex;
  min-height: 690px;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 28px;
  background: rgba(244, 248, 251, 0.48);
  box-shadow: inset 0 0 0 1px rgba(28, 66, 100, 0.06), 0 24px 80px rgba(50, 79, 104, 0.12);
  opacity: 0;
  transform: translateY(16px);
  backdrop-filter: blur(25px) saturate(1.04);
  -webkit-backdrop-filter: blur(25px) saturate(1.04);
  transition: opacity 680ms 100ms cubic-bezier(0.22, 0.7, 0.25, 1), transform 680ms 100ms cubic-bezier(0.22, 0.7, 0.25, 1);
}

.portfolio-copilot.is-revealed .chat-panel { opacity: 1; transform: translateY(0); }

.chat-panel__header {
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 24px;
  border-bottom: 1px solid rgba(25, 61, 94, 0.1);
}

.ai-identity { display: flex; align-items: center; gap: 12px; }
.ai-avatar {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border: 1px solid rgba(45, 130, 223, 0.5);
  border-radius: 50%;
  place-items: center;
  background: rgba(255, 255, 255, 0.48);
  color: #2375cc;
  font-size: 10px;
  font-weight: 760;
  box-shadow: 0 0 0 7px rgba(45, 130, 223, 0.06);
}
.ai-identity strong { display: block; font-size: 10px; letter-spacing: 0.12em; }
.ai-identity small { display: flex; align-items: center; gap: 6px; margin-top: 4px; color: #6e7c88; font-size: 7px; letter-spacing: 0.1em; }
.ai-identity small i { width: 5px; height: 5px; border-radius: 50%; background: #3a91ec; }

.chat-panel__controls { display: flex; gap: 16px; }
.chat-panel__controls button {
  padding: 7px 0;
  background: transparent;
  color: #667583;
  cursor: pointer;
  font-size: 9px;
}
.chat-panel__controls button:hover { color: #1e6fc6; }

.chat-status {
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  padding: 0 24px;
  border-bottom: 1px solid rgba(25, 61, 94, 0.07);
  color: #7a8792;
  font-size: 8px;
}
.chat-status p { margin: 0; }
.chat-status > span { width: 5px; height: 5px; border-radius: 50%; background: #a8b2ba; }
.chat-status.is-active > span { background: #3188e4; box-shadow: 0 0 0 4px rgba(49, 136, 228, 0.1); }
.chat-status.is-error > span { background: #a45b5b; }

.chat-thread {
  display: flex;
  min-height: 250px;
  max-height: 380px;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  padding: 24px;
  scroll-behavior: smooth;
}

.message { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; align-items: start; }
.message--user { grid-template-columns: minmax(0, 1fr); justify-items: end; }
.message__role {
  display: grid;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(45, 130, 223, 0.28);
  border-radius: 50%;
  place-items: center;
  color: #2c7ed6;
  font-size: 8px;
  font-weight: 720;
}
.message__body {
  max-width: 92%;
  padding: 15px 17px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.36);
  color: #263b4e;
  font-size: 11px;
  line-height: 1.72;
  box-shadow: inset 0 0 0 1px rgba(24, 63, 99, 0.035);
}
.message--user .message__body { max-width: 76%; background: rgba(43, 124, 211, 0.09); border-color: rgba(59, 136, 220, 0.15); }
.message__body p { margin: 0; }
.message__body p + p { margin-top: 6px; }
.message__body.is-streaming::after { display: inline-block; width: 5px; height: 1em; margin-left: 3px; content: ""; background: #2f83df; vertical-align: -2px; animation: copilot-cursor 760ms steps(1) infinite; }
@keyframes copilot-cursor { 50% { opacity: 0; } }

.response-intro { margin-bottom: 13px !important; font-weight: 560; }
.response-steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin-top: 12px; }
.response-step { padding: 10px; border-top: 1px solid rgba(32, 75, 113, 0.15); }
.response-step strong { display: block; color: #1e6fc6; font-size: 9px; letter-spacing: 0.04em; }
.response-step span { display: block; margin-top: 4px; color: #536575; font-size: 9px; line-height: 1.55; }
.message--error .message__body { border-color: rgba(163, 79, 79, 0.2); color: #824b4b; }
.message--empty .message__body { color: #5f6d78; }

.evidence-area,
.follow-up-area {
  margin: 0 24px 16px 68px;
  padding-top: 15px;
  border-top: 1px solid rgba(24, 63, 99, 0.11);
}
.evidence-area[hidden], .follow-up-area[hidden], [data-chat-stop][hidden] { display: none; }
.evidence-area__heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.evidence-area__heading p, .follow-up-area > p { margin: 0; color: #647584; font-size: 8px; font-weight: 700; letter-spacing: 0.15em; }
.evidence-area__heading a { color: #286fbc; font-size: 9px; }
.evidence-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.evidence-grid button {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3px 9px;
  min-height: 68px;
  padding: 11px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.29);
  color: #30465a;
  cursor: pointer;
  text-align: left;
  transition: background-color 180ms ease, transform 180ms ease;
}
.evidence-grid button:hover { background: rgba(255, 255, 255, 0.6); transform: translateY(-1px); }
.evidence-grid button span { grid-row: 1 / 3; color: #2e7fd6; font-size: 8px; }
.evidence-grid button strong { font-size: 9px; font-weight: 650; }
.evidence-grid button small { color: #7a8792; font-size: 7px; letter-spacing: 0.1em; }
.evidence-preview { min-height: 15px; margin: 8px 0 0; color: #566878; font-size: 8px; line-height: 1.45; }
.capability-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.capability-tags span { padding: 5px 8px; border: 1px solid rgba(41, 110, 180, 0.18); border-radius: 999px; color: #326fae; font-size: 7px; font-weight: 650; letter-spacing: 0.06em; }

.follow-up-area > div { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.follow-up-area button { padding: 7px 10px; border: 1px solid rgba(31, 78, 119, 0.14); border-radius: 999px; background: rgba(255,255,255,.28); color: #43596b; cursor: pointer; font-size: 8px; }
.follow-up-area button:hover { color: #236fc1; border-color: rgba(45,130,223,.32); }

.chat-composer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: end;
  margin: auto 24px 0;
  padding: 8px 8px 8px 18px;
  border: 1px solid rgba(23, 53, 81, 0.36);
  border-radius: 18px;
  background: rgba(248, 250, 252, 0.45);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 520ms 280ms ease, transform 520ms 280ms ease, border-color 180ms ease;
}
.portfolio-copilot.is-revealed .chat-composer { opacity: 1; transform: translateY(0); }

body.copilot-in-view .tune-panel:not([open]) {
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
}
.chat-composer:focus-within { border-color: rgba(45, 130, 223, 0.6); box-shadow: 0 0 0 3px rgba(45, 130, 223, 0.06); }
.chat-composer textarea { width: 100%; min-height: 42px; max-height: 130px; resize: none; padding: 12px 0 8px; border: 0; outline: 0; background: transparent; color: #20364b; font: inherit; font-size: 11px; line-height: 1.45; }
.chat-composer textarea::placeholder { color: #8d9aa5; }
.chat-submit { display: flex; min-width: 82px; min-height: 42px; align-items: center; justify-content: center; gap: 8px; border-radius: 12px; background: #14283c; color: white; cursor: pointer; font-size: 9px; font-weight: 700; letter-spacing: 0.1em; transition: background-color 180ms ease, transform 180ms ease; }
.chat-submit:hover { background: #236ebc; transform: translateY(-1px); }
.chat-submit:disabled { background: #9ca9b4; cursor: wait; transform: none; }
.chat-submit i { font-style: normal; }
.chat-disclaimer { margin: 9px 24px 15px; color: #82909b; text-align: center; font-size: 7px; }

.prompt-list button:focus-visible,
.knowledge-strip button:focus-visible,
.chat-panel button:focus-visible,
.chat-panel a:focus-visible,
.chat-composer textarea:focus-visible { outline: 2px solid #2f83df; outline-offset: 3px; }

@media (max-width: 1100px) {
  .knowledge-strip, .copilot-workflow { grid-template-columns: 140px 1fr; }
  .copilot-layout { grid-template-columns: minmax(250px, 32fr) minmax(0, 68fr); gap: 32px; }
  .chat-panel { min-height: 660px; }
  .copilot-intro h2 { font-size: clamp(42px, 4.5vw, 58px); }
}

@media (max-width: 768px) {
  :root { --hero-transition-depth: clamp(180px, 24dvh, 230px); }
  .hero-transition-shell { height: calc(100dvh - var(--header-height) + var(--hero-transition-depth)); min-height: calc(100vh - var(--header-height) + clamp(180px, 24vh, 230px)); }
  .hero-transition-shell .hero-content { transform: translateY(var(--hero-copy-shift)); }

  .portfolio-copilot { min-height: 100dvh; margin-top: calc(0px - var(--hero-transition-depth)); padding: 28px 18px 70px; overflow: hidden; }
  .copilot-background { background-position: 125% -8vh; background-size: 120vw auto; opacity: 0.025; }
  .knowledge-strip { display: block; border-bottom: 0; }
  .knowledge-strip > p { min-height: 36px; padding: 0; }
  .knowledge-strip__scroller { display: flex; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; scroll-snap-type: x proximity; }
  .knowledge-strip__scroller::-webkit-scrollbar { display: none; }
  .knowledge-strip button { min-width: 154px; min-height: 58px; flex: 0 0 154px; scroll-snap-align: start; }
  .knowledge-strip button strong { font-size: 10px; }
  .copilot-workflow { display: block; margin-top: 20px; }
  .copilot-workflow > p { margin-bottom: 10px; }
  .copilot-workflow ol { gap: 4px; }
  .copilot-workflow li { min-height: 46px; flex-direction: column; justify-content: center; gap: 4px; font-size: 8px; text-align: center; }
  .copilot-workflow li:not(:last-child)::after { top: 13px; right: -16%; width: 32%; }
  .copilot-layout { display: block; margin-top: 32px; }
  .copilot-intro { padding-top: 0; }
  .copilot-kicker { margin-bottom: 16px; font-size: 8px; }
  .copilot-intro h2 { font-size: clamp(44px, 13vw, 60px); }
  .copilot-subtitle { max-width: 330px; margin-top: 18px; font-size: 11px; }
  .prompt-list { margin-top: 24px; }
  .prompt-list button { min-height: 48px; font-size: 10px; }
  .copilot-trust { margin-bottom: 30px; }
  .chat-panel { min-height: 670px; border-radius: 22px; }
  .chat-panel__header { min-height: 70px; padding: 0 16px; }
  .chat-panel__controls { gap: 10px; }
  .chat-panel__controls button { font-size: 8px; }
  .chat-status { padding: 0 16px; }
  .chat-thread { min-height: 250px; max-height: 420px; padding: 18px 15px; }
  .message { grid-template-columns: 30px minmax(0,1fr); gap: 7px; }
  .message__role { width: 28px; height: 28px; }
  .message__body { max-width: 100%; padding: 13px; font-size: 10px; }
  .message--user .message__body { max-width: 88%; }
  .response-steps { grid-template-columns: 1fr; }
  .evidence-area, .follow-up-area { margin: 0 15px 14px; }
  .evidence-grid { display: flex; overflow-x: auto; scrollbar-width: none; }
  .evidence-grid::-webkit-scrollbar { display: none; }
  .evidence-grid button { min-width: 156px; flex: 0 0 156px; }
  .chat-composer { position: sticky; bottom: 0; margin: auto 14px 0; padding-left: 13px; background: rgba(248,250,252,.88); }
  .chat-submit { min-width: 68px; }
  .chat-disclaimer { margin-bottom: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-transition-shell { height: auto; min-height: 0; }
  .hero-transition-shell > .hero { position: relative; top: auto; }
  .portfolio-copilot { margin-top: 0; }
  .hero-transition-shell .hero-content,
  .hero-transition-shell .capability-index,
  .hero-transition-shell .sound-toggle,
  .hero-transition-shell .hero-visual { opacity: 1; }
  .hero-transition-shell .hero-visual { transform: translate(-50%, -50%) scale(var(--visual-scale)); }
  .copilot-intro, .chat-panel, .chat-composer { opacity: 1; transform: none; }
  .message__body.is-streaming::after { animation: none; }
}

/* AI Portfolio Copilot v2 — centered conversational workspace. */
.portfolio-copilot {
  --copilot-blue: #176ee8;
  --copilot-ink: #132942;
  --copilot-muted: #687b8f;
  --copilot-line: rgba(28, 67, 106, 0.13);
  --copilot-glass: rgba(248, 251, 254, 0.72);
  min-height: 100svh;
  margin-top: calc(0px - var(--hero-transition-depth));
  padding: clamp(26px, 3.4vh, 42px) max(2vw, 24px) clamp(48px, 6vh, 72px);
  background:
    radial-gradient(circle at 76% 17%, rgba(138, 185, 232, 0.17), transparent 34%),
    linear-gradient(180deg, rgba(245, 248, 250, 0.04) 0, rgba(239, 244, 248, 0.9) 94px, #e8eef3 40%, #dce6ef 100%);
}

.portfolio-copilot .copilot-background {
  inset: 0;
  background-position: 105% -30vw;
  background-size: min(72vw, 1200px) auto;
  filter: grayscale(0.3) contrast(0.82);
  opacity: 0.055;
  -webkit-mask-image: linear-gradient(160deg, transparent 8%, #000 38%, transparent 74%);
  mask-image: linear-gradient(160deg, transparent 8%, #000 38%, transparent 74%);
}

.copilot-bridge {
  position: absolute;
  z-index: 0;
  top: 0;
  right: 4.2vw;
  width: min(36vw, 560px);
  height: 72px;
  pointer-events: none;
}

.copilot-bridge::before,
.copilot-bridge::after,
.copilot-bridge span {
  position: absolute;
  content: "";
  background: rgba(36, 132, 236, 0.58);
  transform-origin: right center;
  transform: scaleX(0);
  transition: transform 720ms 120ms cubic-bezier(0.22, 0.7, 0.25, 1);
}

.copilot-bridge::before { top: 18px; right: 0; width: 44%; height: 1px; }
.copilot-bridge::after { top: 18px; right: 44%; width: 32%; height: 1px; transform-origin: left center; }
.copilot-bridge span {
  top: 18px;
  right: calc(44% - 1px);
  width: 1px;
  height: 28px;
  transform: scaleY(0);
  transform-origin: top center;
}

.portfolio-copilot.is-revealed .copilot-bridge::before,
.portfolio-copilot.is-revealed .copilot-bridge::after { transform: scaleX(1); }
.portfolio-copilot.is-revealed .copilot-bridge span { transform: scaleY(1); }

.portfolio-copilot .copilot-inner {
  position: relative;
  z-index: 1;
  width: min(96vw, 1680px);
  margin-inline: auto;
}

.copilot-heading {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  min-height: clamp(52px, 6.5vh, 70px);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 400ms 160ms ease, transform 400ms 160ms ease;
}

.portfolio-copilot.is-revealed .copilot-heading { opacity: 1; transform: none; }
.copilot-heading .copilot-kicker {
  justify-self: start;
  margin: 3px 0 0;
  color: #216ab9;
  font-size: clamp(8px, 0.65vw, 11px);
  font-weight: 720;
  letter-spacing: 0.14em;
}

.copilot-heading > div { justify-self: center; text-align: center; }
.copilot-heading h2 {
  margin: 0;
  color: var(--copilot-ink);
  font-size: clamp(18px, 1.45vw, 26px);
  font-weight: 620;
  letter-spacing: 0.08em;
}
.copilot-heading > div p {
  margin: 7px 0 0;
  color: var(--copilot-muted);
  font-size: clamp(9px, 0.66vw, 11px);
  letter-spacing: 0.05em;
}

.chat-workspace {
  display: flex;
  width: 100%;
  height: clamp(690px, 82svh, 880px);
  min-height: 690px;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: clamp(22px, 2vw, 34px);
  background: rgba(247, 250, 253, 0.66);
  box-shadow:
    inset 0 0 0 1px rgba(28, 65, 99, 0.06),
    0 30px 100px rgba(61, 91, 119, 0.13),
    0 0 0 7px rgba(255, 255, 255, 0.12);
  opacity: 0;
  clip-path: inset(49% 0 49% 0 round 30px);
  backdrop-filter: blur(22px) saturate(1.04);
  -webkit-backdrop-filter: blur(22px) saturate(1.04);
  transition:
    opacity 180ms ease,
    clip-path 760ms cubic-bezier(0.22, 0.72, 0.24, 1);
}

.portfolio-copilot.is-revealed .chat-workspace {
  opacity: 1;
  clip-path: inset(0 0 0 0 round 30px);
}

.workspace-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  min-height: 76px;
  align-items: center;
  gap: 18px;
  padding: 0 clamp(20px, 3vw, 48px);
  border-bottom: 1px solid var(--copilot-line);
}

.ai-identity { display: flex; min-width: 0; align-items: center; gap: 13px; }
.ai-avatar {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border: 1px solid rgba(51, 120, 193, 0.22);
  border-radius: 50%;
  place-items: center;
  background: rgba(232, 240, 248, 0.9);
  color: var(--copilot-blue);
  font-size: 9px;
  font-weight: 760;
  letter-spacing: 0.08em;
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.28);
}
.ai-identity strong { display: block; overflow: hidden; color: var(--copilot-ink); font-size: 12px; font-weight: 650; letter-spacing: 0.08em; text-overflow: ellipsis; white-space: nowrap; }
.ai-identity small { display: flex; align-items: center; gap: 6px; margin-top: 5px; color: var(--copilot-blue); font-size: 8px; font-weight: 700; letter-spacing: 0.12em; }
.ai-identity small i { width: 6px; height: 6px; border-radius: 50%; background: var(--copilot-blue); box-shadow: 0 0 0 4px rgba(23, 110, 232, 0.08); }

.workspace-status {
  display: flex;
  justify-self: center;
  align-items: center;
  gap: 8px;
  color: #738393;
  font-size: 9px;
  font-weight: 620;
  letter-spacing: 0.06em;
}
.workspace-status p { margin: 0; }
.workspace-status > span { width: 6px; height: 6px; border-radius: 50%; background: #aeb9c2; }
.workspace-status.is-active { color: var(--copilot-blue); }
.workspace-status.is-active > span { background: var(--copilot-blue); box-shadow: 0 0 0 5px rgba(23, 110, 232, 0.09); }
.workspace-status.is-error { color: #9a5656; }
.workspace-status.is-error > span { background: #b66666; }

.workspace-controls { display: flex; justify-self: end; align-items: center; gap: 18px; }
.workspace-controls button,
.answer-actions button {
  min-height: 44px;
  padding: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  color: #607285;
  cursor: pointer;
  font-size: 9px;
  transition: color 180ms ease, border-color 180ms ease;
}
.workspace-controls button:hover,
.answer-actions button:hover { border-color: var(--copilot-blue); color: var(--copilot-blue); }

.portfolio-copilot .copilot-workflow {
  display: block;
  margin: 0;
  padding: 0 clamp(26px, 4vw, 64px);
  border-bottom: 1px solid var(--copilot-line);
}
.portfolio-copilot .copilot-workflow ol {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 0;
  padding: 0;
}
.portfolio-copilot .copilot-workflow li {
  position: relative;
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: rgba(59, 78, 97, 0.4);
  font-size: clamp(9px, 0.75vw, 12px);
  transition: color 200ms ease;
}
.portfolio-copilot .copilot-workflow li:not(:last-child)::after {
  position: absolute;
  top: 50%;
  right: -18%;
  width: 36%;
  height: 1px;
  content: "";
  background: rgba(54, 83, 111, 0.16);
  transition: background-color 200ms ease;
}
.workflow-icon {
  position: relative;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border: 1px solid currentColor;
  border-radius: 50%;
}
.portfolio-copilot .copilot-workflow li.is-running { color: var(--copilot-blue); }
.portfolio-copilot .copilot-workflow li.is-running .workflow-icon {
  border-width: 2px;
  box-shadow: 0 0 0 5px rgba(23, 110, 232, 0.09);
  animation: workflow-pulse 1s ease-in-out infinite alternate;
}
.portfolio-copilot .copilot-workflow li.is-complete { color: var(--copilot-blue); }
.portfolio-copilot .copilot-workflow li.is-complete .workflow-icon { border-color: var(--copilot-blue); background: var(--copilot-blue); }
.portfolio-copilot .copilot-workflow li.is-complete .workflow-icon::after {
  position: absolute;
  top: 5px;
  left: 7px;
  width: 7px;
  height: 4px;
  border-bottom: 1.5px solid #fff;
  border-left: 1.5px solid #fff;
  content: "";
  transform: rotate(-45deg);
}
.portfolio-copilot .copilot-workflow li.is-complete:not(:last-child)::after { background: rgba(23, 110, 232, 0.55); }
.portfolio-copilot .copilot-workflow li.is-error { color: #a45f5f; }
@keyframes workflow-pulse { to { box-shadow: 0 0 0 8px rgba(23, 110, 232, 0.025); } }

.workspace-body {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.question-navigation {
  height: 100%;
  overflow-y: auto;
  padding: clamp(22px, 3vh, 34px) clamp(28px, 4vw, 64px) 24px;
  transition: opacity 320ms ease, transform 320ms ease;
}
.question-navigation.is-leaving { opacity: 0; transform: translateY(-10px); }
.question-navigation__intro { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 20px; margin-bottom: clamp(18px, 2.3vh, 26px); }
.question-navigation__intro > p { justify-self: start; margin: 0; color: var(--copilot-blue); font-size: 8px; font-weight: 720; letter-spacing: 0.15em; }
.question-navigation__intro h3 { justify-self: center; margin: 0; color: var(--copilot-ink); font-size: clamp(24px, 2vw, 34px); font-weight: 580; letter-spacing: -0.03em; }
.question-navigation__intro > span { justify-self: end; color: #788794; font-size: 9px; }

.question-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(10px, 1.1vw, 18px); }
.question-card {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  grid-template-rows: auto 1fr auto;
  min-height: clamp(132px, 16.5vh, 170px);
  gap: 8px 12px;
  padding: clamp(18px, 1.7vw, 26px);
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.34);
  box-shadow: inset 0 0 0 1px rgba(24, 64, 103, 0.045), 0 8px 24px rgba(54, 83, 111, 0.035);
  color: var(--copilot-ink);
  cursor: pointer;
  opacity: 0;
  text-align: left;
  transform: translateY(12px);
  transition: opacity 400ms ease, transform 210ms ease, border-color 210ms ease, background-color 210ms ease, box-shadow 210ms ease;
}
.portfolio-copilot.is-revealed .question-card { opacity: 1; transform: none; }
.portfolio-copilot.is-revealed .question-card:nth-child(1) { transition-delay: 260ms, 0ms, 0ms, 0ms, 0ms; }
.portfolio-copilot.is-revealed .question-card:nth-child(2) { transition-delay: 330ms, 0ms, 0ms, 0ms, 0ms; }
.portfolio-copilot.is-revealed .question-card:nth-child(3) { transition-delay: 400ms, 0ms, 0ms, 0ms, 0ms; }
.portfolio-copilot.is-revealed .question-card:nth-child(4) { transition-delay: 470ms, 0ms, 0ms, 0ms, 0ms; }
.portfolio-copilot.is-revealed .question-card:nth-child(5) { transition-delay: 540ms, 0ms, 0ms, 0ms, 0ms; }
.portfolio-copilot.is-revealed .question-card:nth-child(6) { transition-delay: 610ms, 0ms, 0ms, 0ms, 0ms; }
.question-card:hover,
.question-card:focus-visible,
.question-card.is-selected {
  border-color: rgba(23, 110, 232, 0.48);
  background: rgba(255, 255, 255, 0.59);
  box-shadow: inset 0 0 0 1px rgba(23, 110, 232, 0.05), 0 12px 30px rgba(47, 97, 145, 0.09);
  transform: translateY(-3px);
}
.question-card--accent { background: rgba(223, 237, 252, 0.5); }
.question-card__number { grid-row: 1 / 4; color: var(--copilot-blue); font-size: 9px; font-weight: 740; letter-spacing: 0.1em; }
.question-card strong { font-size: clamp(12px, 0.95vw, 16px); font-weight: 650; }
.question-card p { align-self: start; margin: 2px 18px 0 0; color: #566b7e; font-size: clamp(10px, 0.72vw, 12px); line-height: 1.6; }
.question-card small { color: #75889a; font-size: 8px; font-weight: 680; letter-spacing: 0.1em; }
.question-card i { grid-column: 3; grid-row: 1 / 4; align-self: center; color: var(--copilot-blue); font-size: 14px; font-style: normal; transition: transform 200ms ease; }
.question-card:hover i,
.question-card:focus-visible i { transform: translate(4px, -4px); }

.copilot-trust {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 9px;
  max-width: none;
  margin: clamp(15px, 2vh, 22px) 0 0;
  color: #718292;
  font-size: 8px;
}
.copilot-trust span { width: 5px; height: 5px; margin: 0; background: var(--copilot-blue); box-shadow: 0 0 0 4px rgba(23, 110, 232, 0.07); }

.conversation {
  height: 100%;
  overflow-y: auto;
  padding: clamp(20px, 2.7vh, 30px) clamp(26px, 4vw, 64px) 28px;
  scrollbar-color: rgba(74, 102, 128, 0.25) transparent;
}
.conversation[hidden],
.answer-card[hidden],
.project-evidence[hidden],
.completion-actions[hidden],
.conversation-notice[hidden],
[data-question-back][hidden] { display: none; }

.conversation-history:empty { display: none; }
.conversation-history {
  display: grid;
  gap: 24px;
  margin: 0 54px 26px 0;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(29, 70, 108, 0.12);
}
.conversation-history__turn { display: grid; gap: 12px; }
.conversation-history__question {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}
.conversation-history__question p {
  max-width: min(72%, 780px);
  margin: 0;
  padding: 11px 15px;
  border: 1px solid rgba(23, 110, 232, 0.18);
  border-radius: 13px;
  background: rgba(219, 234, 252, 0.4);
  color: #29455f;
  font-size: 13px;
  line-height: 1.55;
}
.conversation-history__question > span,
.conversation-history__answer > span {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  place-items: center;
  border: 1px solid rgba(38, 100, 162, 0.15);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  color: #52708b;
  font-size: 7px;
  font-weight: 720;
}
.conversation-history__answer {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.conversation-history__answer > div {
  min-width: 0;
  max-width: min(86%, 900px);
  padding: 13px 16px;
  border-left: 2px solid rgba(23, 110, 232, 0.34);
  background: rgba(248, 251, 254, 0.36);
}
.conversation-history__copy {
  color: #405a72;
  font-size: 13px;
  line-height: 1.68;
}
.conversation-history__copy p,
.conversation-history__copy ul,
.conversation-history__copy ol { margin: 0 0 8px; }
.conversation-history__copy h4 { margin: 8px 0 5px; color: #294863; font-size: 14px; }
.conversation-history__copy li { margin: 3px 0; }

.user-query { display: flex; justify-content: flex-end; align-items: center; gap: 14px; }
.user-query__bubble {
  max-width: min(72%, 900px);
  padding: 15px 22px;
  border: 1px solid rgba(23, 110, 232, 0.28);
  border-radius: 16px;
  background: rgba(219, 234, 252, 0.62);
  color: #193452;
  font-size: clamp(11px, 0.85vw, 14px);
  line-height: 1.55;
  box-shadow: 0 8px 24px rgba(39, 99, 160, 0.08);
}
.user-avatar { display: grid; width: 40px; height: 40px; flex: 0 0 40px; border: 1px solid rgba(38, 100, 162, 0.17); border-radius: 50%; place-items: center; background: rgba(255,255,255,.5); color: #45637e; font-size: 7px; font-weight: 720; }

.execution-track,
.answer-card {
  margin: 14px 54px 0 0;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.34);
  box-shadow: inset 0 0 0 1px rgba(27, 67, 105, 0.045);
}
.execution-track { padding: 0 20px; }
.execution-track > header { display: flex; min-height: 44px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--copilot-line); }
.execution-track > header strong { font-size: 10px; font-weight: 650; }
.execution-track > header button { display: flex; min-height: 40px; align-items: center; gap: 8px; background: transparent; color: #617386; cursor: pointer; font-size: 8px; }
.execution-track > header button i { font-style: normal; transition: transform 180ms ease; }
.execution-track.is-collapsed > header { border-bottom: 0; }
.execution-track.is-collapsed > header button i { transform: rotate(180deg); }
.execution-track.is-collapsed ol { display: none; }
.execution-track ol { margin: 0; padding: 0; list-style: none; }
.execution-track li { display: grid; grid-template-columns: 22px 82px 1fr; min-height: 34px; align-items: center; gap: 9px; border-bottom: 1px solid rgba(28,67,106,.09); color: #687b8e; font-size: 9px; }
.execution-track li:last-child { border-bottom: 0; }
.track-state { position: relative; width: 14px; height: 14px; border: 1px solid #a9b6c2; border-radius: 50%; }
.execution-track li.is-running { color: #285f9e; }
.execution-track li.is-running .track-state { border: 2px solid var(--copilot-blue); box-shadow: 0 0 0 4px rgba(23,110,232,.07); }
.execution-track li.is-complete .track-state { border-color: var(--copilot-blue); background: var(--copilot-blue); }
.execution-track li.is-complete .track-state::after { position:absolute; top:3px; left:4px; width:5px; height:3px; border-bottom:1px solid #fff; border-left:1px solid #fff; content:""; transform:rotate(-45deg); }
.execution-track li.is-error .track-state { border-color: #ab6363; background: #ab6363; }
.execution-track li strong { color: #334d67; font-weight: 650; }

.answer-card { padding: clamp(20px, 2vw, 30px); }
.answer-stream { color: #304a63; font-size: clamp(10px, 0.77vw, 13px); line-height: 1.7; }
.answer-stream.is-streaming::after { display:inline-block; width:6px; height:1em; margin-left:4px; content:""; background:var(--copilot-blue); vertical-align:-2px; animation: copilot-cursor 760ms steps(1) infinite; }
.ai-answer-copy--live {
  min-height: 1.7em;
  white-space: pre-wrap;
}
.answer-stream h3 { margin: 0; color: #17314d; font-size: clamp(20px, 1.55vw, 27px); font-weight: 650; letter-spacing: -0.03em; }
.answer-stream > p { max-width: 980px; margin: 9px 0 0; }
.answer-modules { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.answer-module { min-height: 116px; padding: 15px; border: 1px solid rgba(29,70,108,.11); border-radius: 12px; background: rgba(248,251,254,.46); }
.answer-module span { display: inline-grid; width: 28px; height: 28px; margin-bottom: 10px; border: 1px solid rgba(23,110,232,.18); border-radius: 9px; place-items:center; color:var(--copilot-blue); font-size:8px; font-weight:700; }
.answer-module strong { display:block; color:#263f58; font-size:10px; }
.answer-module p { margin:6px 0 0; color:#65778a; font-size:8px; line-height:1.55; }

.project-evidence { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--copilot-line); }
.project-evidence__heading { display:flex; align-items:center; justify-content:space-between; gap:18px; }
.project-evidence__heading p { margin:0; color:#405b75; font-size:9px; font-weight:650; }
.project-evidence__heading a { color:var(--copilot-blue); font-size:8px; }
.portfolio-copilot .evidence-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin-top:12px; }
.portfolio-copilot .evidence-grid button { min-height:72px; border-color:rgba(29,70,108,.12); background:rgba(248,251,254,.42); }
.portfolio-copilot .evidence-grid button:hover { border-color:rgba(23,110,232,.3); background:rgba(255,255,255,.7); }
.evidence-preview { margin: 9px 0 0; }
.completion-actions { margin-top: 18px; padding-top: 15px; border-top:1px solid var(--copilot-line); }
.follow-up-list { display:flex; flex-wrap:wrap; gap:8px; }
.follow-up-list button { min-height:38px; padding:0 13px; border:1px solid rgba(29,70,108,.14); border-radius:999px; background:rgba(255,255,255,.35); color:#47627c; cursor:pointer; font-size:8px; }
.follow-up-list button:hover { border-color:rgba(23,110,232,.4); color:var(--copilot-blue); }
.answer-actions { display:flex; justify-content:flex-end; gap:18px; margin-top:8px; }

.conversation-notice { margin:14px 54px 0 0; padding:16px 18px; border:1px solid rgba(29,70,108,.13); border-radius:13px; background:rgba(255,255,255,.38); color:#526a80; font-size:10px; }
.conversation-notice.is-error { border-color:rgba(164,84,84,.2); color:#895353; }
.notice-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; }
.notice-actions button { min-height:38px; padding:0 13px; border:1px solid currentColor; border-radius:999px; background:transparent; color:inherit; cursor:pointer; font-size:8px; }

.composer-wrap { flex: 0 0 auto; padding: 9px clamp(20px, 3vw, 48px) 14px; border-top:1px solid var(--copilot-line); background:rgba(244,248,251,.56); }
.composer-hint { min-height:15px; margin:0 0 4px 17px; color:#9a5f5f; font-size:8px; }
.portfolio-copilot .chat-composer {
  display:grid;
  grid-template-columns:1fr auto;
  align-items:end;
  gap:12px;
  margin:0;
  padding:7px 8px 7px 18px;
  border:1px solid rgba(29,65,101,.38);
  border-radius:19px;
  background:rgba(251,253,255,.52);
  opacity:1;
  transform:none;
  transition:border-color 180ms ease, box-shadow 180ms ease;
}
.portfolio-copilot .chat-composer:focus-within { border-color:rgba(23,110,232,.62); box-shadow:0 0 0 4px rgba(23,110,232,.055); }
.portfolio-copilot .chat-composer textarea { min-height:42px; max-height:120px; padding:11px 0 7px; font-size:11px; }
.portfolio-copilot .chat-submit { min-width:88px; min-height:42px; border:1px solid rgba(23,110,232,.18); border-radius:14px; background:rgba(233,242,252,.82); color:var(--copilot-blue); }
.portfolio-copilot .chat-submit:hover { background:var(--copilot-blue); color:#fff; }
.portfolio-copilot .chat-submit.is-stop { border-color:rgba(112,77,77,.18); background:rgba(245,237,237,.88); color:#875454; }

.question-card:focus-visible,
.workspace-controls button:focus-visible,
.execution-track button:focus-visible,
.answer-card button:focus-visible,
.answer-card a:focus-visible,
.portfolio-copilot .chat-composer textarea:focus-visible,
.portfolio-copilot .chat-submit:focus-visible { outline:2px solid var(--copilot-blue); outline-offset:3px; }

body.copilot-in-view .tune-panel:not([open]) { opacity:0; pointer-events:none; transform:translateY(6px); }

@media (max-width: 1100px) {
  .chat-workspace { height: clamp(680px, 84svh, 820px); }
  .question-navigation { padding-inline: 30px; }
  .question-card { min-height: 140px; }
  .answer-modules { grid-template-columns: repeat(3, minmax(0,1fr)); }
}

@media (max-width: 768px) {
  .portfolio-copilot {
    min-height:100svh;
    margin-top:calc(0px - var(--hero-transition-depth));
    padding:22px 12px max(28px, env(safe-area-inset-bottom));
    overflow:hidden;
  }
  .portfolio-copilot .copilot-background { background-position:130% -8vh; background-size:120vw auto; opacity:.035; }
  .portfolio-copilot .copilot-inner { width:calc(100vw - 24px); }
  .copilot-bridge { right:6vw; width:48vw; height:52px; }
  .copilot-heading { display:block; min-height:84px; padding:0 4px; }
  .copilot-heading .copilot-kicker { margin:0 0 10px; font-size:8px; }
  .copilot-heading > div { text-align:left; }
  .copilot-heading h2 { font-size:21px; }
  .copilot-heading > div p { margin-top:5px; font-size:8px; }
  .chat-workspace { height:calc(100svh - 150px); min-height:660px; border-radius:22px; }
  .workspace-header { grid-template-columns:1fr auto; min-height:70px; gap:8px; padding:0 15px; }
  .ai-avatar { width:42px; height:42px; flex-basis:42px; }
  .ai-identity strong { font-size:9px; }
  .workspace-status { display:none; }
  .workspace-controls { gap:10px; }
  .workspace-controls button { min-height:44px; font-size:7px; }
  .portfolio-copilot .copilot-workflow { overflow-x:auto; padding:0 12px; scrollbar-width:none; }
  .portfolio-copilot .copilot-workflow::-webkit-scrollbar { display:none; }
  .portfolio-copilot .copilot-workflow ol { width:520px; }
  .portfolio-copilot .copilot-workflow li {
    min-height:60px;
    flex-direction:row;
    justify-content:flex-start;
    gap:7px;
    padding-left:8px;
    font-size:8px;
    text-align:left;
  }
  .portfolio-copilot .copilot-workflow li:not(:last-child)::after { top:50%; right:-13%; width:26%; }
  .workflow-icon { width:21px; height:21px; flex-basis:21px; }
  .question-navigation { padding:20px 14px 22px; }
  .question-navigation__intro { display:block; margin-bottom:16px; }
  .question-navigation__intro > p { margin-bottom:8px; }
  .question-navigation__intro h3 { font-size:26px; }
  .question-navigation__intro > span { display:block; margin-top:7px; font-size:8px; }
  .question-grid { grid-template-columns:1fr; gap:9px; }
  .question-card { min-height:124px; padding:17px; }
  .question-card strong { font-size:13px; }
  .question-card p { font-size:10px; }
  .copilot-trust { justify-content:flex-start; line-height:1.5; }
  .conversation { padding:16px 12px 22px; }
  .conversation-history {
    gap: 20px;
    margin-right: 0;
    padding-bottom: 20px;
  }
  .conversation-history__question p { max-width: 82%; font-size: 12px; }
  .conversation-history__answer > div { max-width: calc(100% - 44px); padding: 12px 13px; }
  .conversation-history__copy { font-size: 14px; }
  .user-query__bubble { max-width:82%; padding:12px 14px; font-size:10px; }
  .user-avatar { width:34px; height:34px; flex-basis:34px; }
  .execution-track,
  .answer-card,
  .conversation-notice { margin-right:0; }
  .execution-track { padding:0 12px; }
  .execution-track li { grid-template-columns:18px 68px 1fr; gap:6px; font-size:8px; }
  .answer-card { padding:17px 13px; }
  .answer-modules { display:flex; overflow-x:auto; overscroll-behavior-x:contain; scrollbar-width:none; }
  .answer-modules::-webkit-scrollbar { display:none; }
  .answer-module { min-width:172px; flex:0 0 172px; }
  .portfolio-copilot .evidence-grid { display:flex; overflow-x:auto; scrollbar-width:none; }
  .portfolio-copilot .evidence-grid::-webkit-scrollbar { display:none; }
  .portfolio-copilot .evidence-grid button { min-width:156px; flex:0 0 156px; }
  .project-evidence__heading { align-items:flex-start; }
  .project-evidence__heading a { text-align:right; }
  .composer-wrap { padding:8px 10px max(12px, env(safe-area-inset-bottom)); }
  .portfolio-copilot .chat-composer { padding-left:13px; background:rgba(249,252,254,.92); }
  .portfolio-copilot .chat-submit { min-width:68px; min-height:44px; }
}

@media (prefers-reduced-motion: reduce) {
  .portfolio-copilot { margin-top:0; }
  .copilot-heading,
  .chat-workspace,
  .question-card { opacity:1; clip-path:none; transform:none; transition:none; }
  .copilot-bridge::before,
  .copilot-bridge::after { transform:scaleX(1); }
  .copilot-bridge span { transform:scaleY(1); }
  .portfolio-copilot .copilot-workflow li.is-running .workflow-icon,
  .answer-stream.is-streaming::after { animation:none; }
}

/* Answer-complete hierarchy: conclusion → process → evidence → follow-up. */
.execution-track.is-collapsed {
  background: rgba(239, 246, 253, 0.55);
  border-color: rgba(23, 110, 232, 0.16);
}
.execution-track.is-collapsed > header {
  min-height: 52px;
}
.execution-track.is-collapsed > header strong {
  color: #294764;
  font-size: 13px;
  font-weight: 620;
  letter-spacing: 0.01em;
}
.execution-track.is-collapsed > header button {
  color: #176ee8;
  font-size: 12px;
}

.answer-card {
  padding: clamp(32px, 3.2vw, 48px);
}
.answer-stream,
.project-evidence,
.completion-actions {
  width: min(100%, 1160px);
  margin-inline: auto;
}
.answer-stream {
  color: #213b55;
  font-size: 15px;
  line-height: 1.7;
}
.answer-stream h3 {
  margin: 0;
  color: #122c47;
  font-size: clamp(28px, 2.1vw, 32px);
  font-weight: 680;
  letter-spacing: -0.035em;
  line-height: 1.25;
}
.answer-stream > p {
  max-width: 860px;
  margin: 14px 0 0;
  color: #263f58;
  font-size: clamp(16px, 1.15vw, 18px);
  line-height: 1.7;
}
.ai-answer-copy {
  max-width: 900px;
  margin-top: 14px;
  color: #263f58;
  font-size: clamp(15px, 1.05vw, 17px);
  line-height: 1.72;
}
.ai-answer-copy h4 {
  margin: 22px 0 7px;
  color: #173653;
  font-size: 17px;
  font-weight: 650;
}
.ai-answer-copy p { margin: 8px 0 0; }
.ai-answer-copy ul,
.ai-answer-copy ol { margin: 9px 0 0; padding-left: 1.4em; }
.ai-answer-copy li { margin-top: 5px; padding-left: 0.25em; }

.answer-process {
  margin-top: 30px;
}
.answer-process > h4,
.project-evidence__heading p,
.completion-actions > h4 {
  margin: 0;
  color: #1a3652;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.process-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 15px;
  border-top: 1px solid rgba(29, 70, 108, 0.17);
  border-bottom: 1px solid rgba(29, 70, 108, 0.17);
}
.process-step {
  position: relative;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  min-width: 0;
  min-height: 88px;
  align-content: center;
  gap: 3px 8px;
  padding: 12px 14px;
  border-right: 1px solid rgba(29, 70, 108, 0.12);
  background: transparent;
  color: #536a7f;
  cursor: pointer;
  text-align: left;
  transition: color 220ms ease, background-color 220ms ease, border-color 220ms ease;
}
.process-step:last-child { border-right: 0; }
.process-step::after {
  position: absolute;
  right: 14px;
  bottom: -1px;
  left: 14px;
  height: 2px;
  content: "";
  background: #176ee8;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 230ms ease;
}
.process-step__number {
  grid-row: 1 / 4;
  color: #73869a;
  font-size: 12px;
  font-weight: 720;
}
.process-step strong {
  overflow: hidden;
  color: #2c465f;
  font-size: 15px;
  font-weight: 620;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.process-step small {
  color: #7c8b98;
  font-size: 12px;
}
.process-step i {
  overflow: hidden;
  color: #798b9c;
  font-size: 11px;
  font-style: normal;
  letter-spacing: 0.06em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.process-step:hover,
.process-step.is-active {
  background: rgba(225, 239, 253, 0.42);
  color: #176ee8;
}
.process-step.is-active::after { transform: scaleX(1); }
.process-step.is-active .process-step__number,
.process-step.is-active strong { color: #176ee8; }
.process-step:focus-visible {
  z-index: 1;
  outline: 2px solid #176ee8;
  outline-offset: -3px;
}

.process-detail {
  min-height: 142px;
  margin-top: 18px;
  padding: 24px 28px;
  border-left: 2px solid #176ee8;
  background: rgba(239, 246, 253, 0.5);
  opacity: 1;
  transform: translateY(0);
  transition: opacity 220ms ease, transform 220ms ease;
}
.process-detail.is-changing {
  opacity: 0;
  transform: translateY(6px);
}
.process-detail h5 {
  margin: 0;
  color: #183651;
  font-size: 18px;
  font-weight: 650;
}
.process-detail p {
  max-width: 880px;
  margin: 9px 0 0;
  color: #2d4862;
  font-size: 15px;
  line-height: 1.68;
}
.process-detail__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}
.process-detail__tags span {
  padding: 5px 8px;
  border: 1px solid rgba(23, 110, 232, 0.2);
  border-radius: 999px;
  color: #356fAD;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.05em;
}

.project-evidence {
  margin-top: 30px;
  padding-top: 24px;
}
.portfolio-copilot .evidence-grid {
  display: block;
  margin-top: 12px;
  border-top: 1px solid rgba(29, 70, 108, 0.17);
}
.portfolio-copilot .evidence-grid button {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  min-height: 78px;
  width: 100%;
  align-items: center;
  gap: 12px;
  padding: 0 4px;
  border: 0;
  border-bottom: 1px solid rgba(29, 70, 108, 0.14);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #1d3954;
  transition: background-color 200ms ease;
}
.portfolio-copilot .evidence-grid button:hover,
.portfolio-copilot .evidence-grid button:focus-visible {
  border-color: rgba(29, 70, 108, 0.14);
  background: rgba(226, 239, 252, 0.38);
  transform: none;
}
.portfolio-copilot .evidence-grid button > span:first-child {
  grid-row: auto;
  color: #176ee8;
  font-size: 12px;
  font-weight: 720;
}
.portfolio-copilot .evidence-grid button > .evidence-copy {
  display: flex;
  min-width: 0;
  grid-column: 2;
  grid-row: 1;
  flex-direction: column;
  gap: 6px;
  color: #1d3954;
  font-size: inherit;
}
.portfolio-copilot .evidence-grid .evidence-copy strong {
  color: #203d58;
  font-size: 15px;
  font-weight: 630;
}
.portfolio-copilot .evidence-grid .evidence-copy small {
  color: #607488;
  font-size: 13px;
  letter-spacing: 0;
  line-height: 1.45;
}
.portfolio-copilot .evidence-grid button > i {
  grid-column: 3;
  grid-row: 1;
  color: #296fba;
  font-size: 13px;
  font-style: normal;
  transition: transform 200ms ease;
}
.portfolio-copilot .evidence-grid button:hover > i,
.portfolio-copilot .evidence-grid button:focus-visible > i { transform: translateX(4px); }
.evidence-preview {
  min-height: 0;
  margin: 10px 0 0;
  color: #3c5871;
  font-size: 14px;
  line-height: 1.6;
}

.completion-actions {
  margin-top: 30px;
  padding-top: 24px;
}
.follow-up-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.follow-up-list button {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  border: 1px solid rgba(38, 78, 116, 0.25);
  border-radius: 12px;
  background: rgba(251, 253, 255, 0.5);
  color: #243f5a;
  font-size: 14px;
  line-height: 1.45;
  text-align: left;
  transition: border-color 200ms ease, background-color 200ms ease, transform 200ms ease;
}
.follow-up-list button i {
  flex: 0 0 auto;
  color: #176ee8;
  font-style: normal;
  transition: transform 200ms ease;
}
.follow-up-list button:hover,
.follow-up-list button:focus-visible {
  border-color: rgba(23, 110, 232, 0.52);
  background: rgba(229, 241, 253, 0.55);
  color: #183b5d;
  transform: translateY(-2px);
}
.follow-up-list button:hover i,
.follow-up-list button:focus-visible i { transform: translate(3px, -3px); }
.answer-actions { margin-top: 12px; }

@media (max-width: 768px) {
  .execution-track.is-collapsed > header {
    align-items: flex-start;
    gap: 10px;
    padding-block: 10px;
  }
  .execution-track.is-collapsed > header strong {
    font-size: 12px;
    line-height: 1.55;
  }
  .execution-track.is-collapsed > header button {
    flex: 0 0 auto;
    font-size: 11px;
  }
  .answer-card { padding: 22px 14px; }
  .answer-stream,
  .project-evidence,
  .completion-actions { width: 100%; }
  .answer-stream { font-size: 15px; }
  .answer-stream h3 { font-size: 27px; }
  .answer-stream > p { font-size: 15px; line-height: 1.7; }
  .ai-answer-copy { font-size: 15px; line-height: 1.7; }
  .ai-answer-copy h4 { font-size: 16px; }
  .answer-process { margin-top: 26px; }
  .process-tabs {
    display: flex;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
  }
  .process-tabs::-webkit-scrollbar { display: none; }
  .process-step {
    min-width: 168px;
    min-height: 92px;
    flex: 0 0 168px;
    scroll-snap-align: start;
  }
  .process-step strong { font-size: 15px; }
  .process-detail { min-height: 178px; padding: 20px 16px; }
  .process-detail p { font-size: 15px; }
  .project-evidence { margin-top: 26px; }
  .portfolio-copilot .evidence-grid { display: block; overflow: visible; }
  .portfolio-copilot .evidence-grid button {
    grid-template-columns: 32px minmax(0, 1fr) auto;
    min-width: 0;
    min-height: 88px;
    width: 100%;
    padding: 8px 2px;
  }
  .portfolio-copilot .evidence-grid .evidence-copy small { font-size: 13px; }
  .portfolio-copilot .evidence-grid button > i { font-size: 0; }
  .portfolio-copilot .evidence-grid button > i::after { content: "↗"; font-size: 15px; }
  .follow-up-list { grid-template-columns: 1fr; }
  .follow-up-list button { min-height: 60px; font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .process-step,
  .process-step::after,
  .process-detail,
  .portfolio-copilot .evidence-grid button > i,
  .follow-up-list button,
  .follow-up-list button i { transition: none; }
}
